@gientech/modual 1.0.5 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/LeftOutlined-BDNvU9GN.js +1 -0
- package/assets/index-CZ9KcyHq.js +31 -0
- package/assets/index-C_syaGTO.js +217 -0
- package/assets/index-CkrtMipy.js +1230 -0
- package/assets/index-CtbH8bkI.js +1 -0
- package/assets/index-CwZH-3RQ.js +1577 -0
- package/assets/index-DHmv5xUB.js +1 -0
- package/assets/index-DhLqP5fb.js +1 -0
- package/assets/{plus-B679mjyt.js → plus-0NfJVqOP.js} +1 -1
- package/assets/style.css +1 -1
- package/assets/styled-components.browser.esm-DPkS13KC.js +2 -0
- package/assets/{x-CdZQbi--.js → x-CRBeKR4J.js} +1 -1
- package/chat.js +287 -260
- package/database.js +2 -2
- package/databaseId.js +5 -10
- package/databaseTable.js +8 -8
- package/modelManage.js +1 -1
- package/package.json +20 -5
- package/sensitive.js +1 -1
- package/streamFilesReader.d.ts +6 -10
- package/streamFilesReader.js +333 -33
- package/assets/LeftOutlined-C1Tv2UIq.js +0 -35
- package/assets/chevron-right-CrkLSPrQ.js +0 -6
- package/assets/createLucideIcon-Bj5DlX2s.js +0 -21
- package/assets/index-BW1L5s38.js +0 -10
- package/assets/index-Bt4pq4lJ.js +0 -1
- package/assets/index-CGHNxHzA.js +0 -167
- package/assets/index-Df9lUffW.js +0 -1
- package/assets/index-DkrRMiqX.js +0 -1
- package/assets/index-E7FJJ9zV.js +0 -30
- package/assets/index-JdQHnMoG.js +0 -1
- package/assets/index-NIGUFBhG.js +0 -6
- package/assets/styled-components.browser.esm-BKnFpJ_S.js +0 -2
- package/gientechStreamFilesReader.d.ts +0 -37
- package/gientechStreamFilesReader.js +0 -12
|
@@ -0,0 +1,1230 @@
|
|
|
1
|
+
import*as d from"react";import ee,{forwardRef as dn,useState as wt,useRef as Ve,useCallback as gt,useEffect as Ot,version as _w,createElement as xs,useContext as Ir,createContext as Fn,useMemo as Et,Children as Hw,useImperativeHandle as ei,useLayoutEffect as Nb,isValidElement as Ww,cloneElement as Kw,useReducer as qw,Component as Vw,memo as Uw}from"react";import*as Xw from"react-dom";import Hi,{flushSync as ud,unstable_batchedUpdates as Pb,createPortal as jb}from"react-dom";import{s as Qs,I as Nl}from"./index-CZ9KcyHq.js";var gn={},Gw=Object.defineProperty,Yw=(e,t,r)=>t in e?Gw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,rr=(e,t,r)=>Yw(e,typeof t!="symbol"?t+"":t,r),Pl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pm={exports:{}},mi={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var jm;function Zw(){if(jm)return mi;jm=1;var e=ee,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(l,s,u){var c,f={},p=null,h=null;u!==void 0&&(p=""+u),s.key!==void 0&&(p=""+s.key),s.ref!==void 0&&(h=s.ref);for(c in s)n.call(s,c)&&!a.hasOwnProperty(c)&&(f[c]=s[c]);if(l&&l.defaultProps)for(c in s=l.defaultProps,s)f[c]===void 0&&(f[c]=s[c]);return{$$typeof:t,type:l,key:p,ref:h,props:f,_owner:o.current}}return mi.Fragment=r,mi.jsx=i,mi.jsxs=i,mi}var Rm;function Jw(){return Rm||(Rm=1,Pm.exports=Zw()),Pm.exports}var ae=Jw();/*!
|
|
10
|
+
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
13
|
+
* Released under the MIT License.
|
|
14
|
+
*/function Im(e){return Object.prototype.toString.call(e)==="[object Object]"}function Vr(e){var t,r;return Im(e)===!1?!1:(t=e.constructor,t===void 0?!0:(r=t.prototype,!(Im(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}var Rb=Symbol.for("immer-nothing"),Tm=Symbol.for("immer-draftable"),yn=Symbol.for("immer-state");function In(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ia=Object.getPrototypeOf;function Jo(e){return!!e&&!!e[yn]}function Qo(e){var t;return e?Ib(e)||Array.isArray(e)||!!e[Tm]||!!((t=e.constructor)!=null&&t[Tm])||tu(e)||ru(e):!1}var Qw=Object.prototype.constructor.toString();function Ib(e){if(!e||typeof e!="object")return!1;const t=Ia(e);if(t===null)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===Qw}function ws(e,t){eu(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function eu(e){const t=e[yn];return t?t.type_:Array.isArray(e)?1:tu(e)?2:ru(e)?3:0}function cd(e,t){return eu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Tb(e,t,r){const n=eu(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function eE(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function tu(e){return e instanceof Map}function ru(e){return e instanceof Set}function Lo(e){return e.copy_||e.base_}function dd(e,t){if(tu(e))return new Map(e);if(ru(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=Ib(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[yn];let o=Reflect.ownKeys(n);for(let a=0;a<o.length;a++){const i=o[a],l=n[i];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(n[i]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[i]})}return Object.create(Ia(e),n)}else{const n=Ia(e);if(n!==null&&r)return{...e};const o=Object.create(n);return Object.assign(o,e)}}function ep(e,t=!1){return nu(e)||Jo(e)||!Qo(e)||(eu(e)>1&&(e.set=e.add=e.clear=e.delete=tE),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>ep(n,!0))),e}function tE(){In(2)}function nu(e){return Object.isFrozen(e)}var rE={};function ea(e){const t=rE[e];return t||In(0,e),t}var Wi;function Mb(){return Wi}function nE(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Mm(e,t){t&&(ea("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function fd(e){pd(e),e.drafts_.forEach(oE),e.drafts_=null}function pd(e){e===Wi&&(Wi=e.parent_)}function zm(e){return Wi=nE(Wi,e)}function oE(e){const t=e[yn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Lm(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[yn].modified_&&(fd(t),In(4)),Qo(e)&&(e=Es(t,e),t.parent_||ks(t,e)),t.patches_&&ea("Patches").generateReplacementPatches_(r[yn].base_,e,t.patches_,t.inversePatches_)):e=Es(t,r,[]),fd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Rb?e:void 0}function Es(e,t,r){if(nu(t))return t;const n=t[yn];if(!n)return ws(t,(o,a)=>_m(e,n,t,o,a,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return ks(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const o=n.copy_;let a=o,i=!1;n.type_===3&&(a=new Set(o),o.clear(),i=!0),ws(a,(l,s)=>_m(e,n,o,l,s,r,i)),ks(e,o,!1),r&&e.patches_&&ea("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function _m(e,t,r,n,o,a,i){if(Jo(o)){const l=a&&t&&t.type_!==3&&!cd(t.assigned_,n)?a.concat(n):void 0,s=Es(e,o,l);if(Tb(r,n,s),Jo(s))e.canAutoFreeze_=!1;else return}else i&&r.add(o);if(Qo(o)&&!nu(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Es(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&ks(e,o)}}function ks(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ep(t,r)}function aE(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Mb(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=n,a=tp;r&&(o=[n],a=Ki);const{revoke:i,proxy:l}=Proxy.revocable(o,a);return n.draft_=l,n.revoke_=i,l}var tp={get(e,t){if(t===yn)return e;const r=Lo(e);if(!cd(r,t))return iE(e,r,t);const n=r[t];return e.finalized_||!Qo(n)?n:n===Vu(e.base_,t)?(Uu(e),e.copy_[t]=hd(n,e)):n},has(e,t){return t in Lo(e)},ownKeys(e){return Reflect.ownKeys(Lo(e))},set(e,t,r){const n=zb(Lo(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const o=Vu(Lo(e),t),a=o==null?void 0:o[yn];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(eE(r,o)&&(r!==void 0||cd(e.base_,t)))return!0;Uu(e),md(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Vu(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Uu(e),md(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Lo(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){In(11)},getPrototypeOf(e){return Ia(e.base_)},setPrototypeOf(){In(12)}},Ki={};ws(tp,(e,t)=>{Ki[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Ki.deleteProperty=function(e,t){return Ki.set.call(this,e,t,void 0)};Ki.set=function(e,t,r){return tp.set.call(this,e[0],t,r,e[0])};function Vu(e,t){const r=e[yn];return(r?Lo(r):e)[t]}function iE(e,t,r){var o;const n=zb(t,r);return n?"value"in n?n.value:(o=n.get)==null?void 0:o.call(e.draft_):void 0}function zb(e,t){if(!(t in e))return;let r=Ia(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ia(r)}}function md(e){e.modified_||(e.modified_=!0,e.parent_&&md(e.parent_))}function Uu(e){e.copy_||(e.copy_=dd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var lE=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const a=r;r=t;const i=this;return function(l=a,...s){return i.produce(l,u=>r.call(this,u,...s))}}typeof r!="function"&&In(6),n!==void 0&&typeof n!="function"&&In(7);let o;if(Qo(t)){const a=zm(this),i=hd(t,void 0);let l=!0;try{o=r(i),l=!1}finally{l?fd(a):pd(a)}return Mm(a,n),Lm(o,a)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===Rb&&(o=void 0),this.autoFreeze_&&ep(o,!0),n){const a=[],i=[];ea("Patches").generateReplacementPatches_(t,o,a,i),n(a,i)}return o}else In(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...i)=>this.produceWithPatches(a,l=>t(l,...i));let n,o;return[this.produce(t,r,(a,i)=>{n=a,o=i}),n,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Qo(e)||In(8),Jo(e)&&(e=sE(e));const t=zm(this),r=hd(e,void 0);return r[yn].isManual_=!0,pd(t),r}finishDraft(e,t){const r=e&&e[yn];(!r||!r.isManual_)&&In(9);const{scope_:n}=r;return Mm(n,t),Lm(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));const n=ea("Patches").applyPatches_;return Jo(e)?n(e,t):this.produce(e,o=>n(o,t))}};function hd(e,t){const r=tu(e)?ea("MapSet").proxyMap_(e,t):ru(e)?ea("MapSet").proxySet_(e,t):aE(e,t);return(t?t.scope_:Mb()).drafts_.push(r),r}function sE(e){return Jo(e)||In(10,e),Lb(e)}function Lb(e){if(!Qo(e)||nu(e))return e;const t=e[yn];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=dd(e,t.scope_.immer_.useStrictShallowCopy_)}else r=dd(e,!0);return ws(r,(n,o)=>{Tb(r,n,Lb(o))}),t&&(t.finalized_=!1),r}var Cn=new lE,rp=Cn.produce;Cn.produceWithPatches.bind(Cn);Cn.setAutoFreeze.bind(Cn);Cn.setUseStrictShallowCopy.bind(Cn);Cn.applyPatches.bind(Cn);var Hm=Cn.createDraft.bind(Cn),Wm=Cn.finishDraft.bind(Cn),uE={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=oe.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},cE={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=It.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},dE={transform(e,t){var{current:r,affinity:n}=e;if(r!=null){var o=Ee.transform(r,t,{affinity:n});e.current=o,o==null&&e.unref()}}},Ds=new WeakMap,Ss=new WeakMap,Ai=new WeakMap,_b=new WeakMap,Km=new WeakMap,qm=new WeakMap,Vm=new WeakMap,oe={ancestors(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=oe.levels(e,t);return r?n=n.slice(1):n=n.slice(0,-1),n},common(e,t){for(var r=[],n=0;n<e.length&&n<t.length;n++){var o=e[n],a=t[n];if(o!==a)break;r.push(o)}return r},compare(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return 0},endsAfter(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),a=e[r],i=t[r];return oe.equals(n,o)&&a>i},endsAt(e,t){var r=e.length,n=e.slice(0,r),o=t.slice(0,r);return oe.equals(n,o)},endsBefore(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),a=e[r],i=t[r];return oe.equals(n,o)&&a<i},equals(e,t){return e.length===t.length&&e.every((r,n)=>r===t[n])},hasPrevious(e){return e[e.length-1]>0},isAfter(e,t){return oe.compare(e,t)===1},isAncestor(e,t){return e.length<t.length&&oe.compare(e,t)===0},isBefore(e,t){return oe.compare(e,t)===-1},isChild(e,t){return e.length===t.length+1&&oe.compare(e,t)===0},isCommon(e,t){return e.length<=t.length&&oe.compare(e,t)===0},isDescendant(e,t){return e.length>t.length&&oe.compare(e,t)===0},isParent(e,t){return e.length+1===t.length&&oe.compare(e,t)===0},isPath(e){return Array.isArray(e)&&(e.length===0||typeof e[0]=="number")},isSibling(e,t){if(e.length!==t.length)return!1;var r=e.slice(0,-1),n=t.slice(0,-1),o=e[e.length-1],a=t[t.length-1];return o!==a&&oe.equals(r,n)},levels(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,n=[],o=0;o<=e.length;o++)n.push(e.slice(0,o));return r&&n.reverse(),n},next(e){if(e.length===0)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(e.length===0)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(e.length===0)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!oe.isAncestor(t,e)&&!oe.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!e)return null;var n=[...e],{affinity:o="forward"}=r;if(e.length===0)return n;switch(t.type){case"insert_node":{var{path:a}=t;(oe.equals(a,n)||oe.endsBefore(a,n)||oe.isAncestor(a,n))&&(n[a.length-1]+=1);break}case"remove_node":{var{path:i}=t;if(oe.equals(i,n)||oe.isAncestor(i,n))return null;oe.endsBefore(i,n)&&(n[i.length-1]-=1);break}case"merge_node":{var{path:l,position:s}=t;oe.equals(l,n)||oe.endsBefore(l,n)?n[l.length-1]-=1:oe.isAncestor(l,n)&&(n[l.length-1]-=1,n[l.length]+=s);break}case"split_node":{var{path:u,position:c}=t;if(oe.equals(u,n)){if(o==="forward")n[n.length-1]+=1;else if(o!=="backward")return null}else oe.endsBefore(u,n)?n[u.length-1]+=1:oe.isAncestor(u,n)&&e[u.length]>=c&&(n[u.length-1]+=1,n[u.length]-=c);break}case"move_node":{var{path:f,newPath:p}=t;if(oe.equals(f,p))return n;if(oe.isAncestor(f,n)||oe.equals(f,n)){var h=p.slice();return oe.endsBefore(f,p)&&f.length<p.length&&(h[f.length-1]-=1),h.concat(n.slice(f.length))}else oe.isSibling(f,p)&&(oe.isAncestor(p,n)||oe.equals(p,n))?oe.endsBefore(f,n)?n[f.length-1]-=1:n[f.length-1]+=1:oe.endsBefore(p,n)||oe.equals(p,n)||oe.isAncestor(p,n)?(oe.endsBefore(f,n)&&(n[f.length-1]-=1),n[p.length-1]+=1):oe.endsBefore(f,n)&&(oe.equals(p,n)&&(n[p.length-1]+=1),n[f.length-1]-=1);break}}return n}};function qi(e){"@babel/helpers - typeof";return qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qi(e)}function fE(e,t){if(qi(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(qi(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pE(e){var t=fE(e,"string");return qi(t)==="symbol"?t:String(t)}function rn(e,t,r){return t=pE(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Um(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function hi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Um(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Um(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var mE=(e,t,r)=>{switch(r.type){case"insert_node":{var{path:n,node:o}=r,a=Ue.parent(e,n),i=n[n.length-1];if(i>a.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));if(a.children.splice(i,0,o),t)for(var[l,s]of Ee.points(t))t[s]=It.transform(l,r);break}case"insert_text":{var{path:u,offset:c,text:f}=r;if(f.length===0)break;var p=Ue.leaf(e,u),h=p.text.slice(0,c),v=p.text.slice(c);if(p.text=h+f+v,t)for(var[g,m]of Ee.points(t))t[m]=It.transform(g,r);break}case"merge_node":{var{path:b}=r,y=Ue.get(e,b),C=oe.previous(b),D=Ue.get(e,C),w=Ue.parent(e,b),k=b[b.length-1];if(st.isText(y)&&st.isText(D))D.text+=y.text;else if(!st.isText(y)&&!st.isText(D))D.children.push(...y.children);else throw new Error('Cannot apply a "merge_node" operation at path ['.concat(b,"] to nodes of different interfaces: ").concat(Rr.stringify(y)," ").concat(Rr.stringify(D)));if(w.children.splice(k,1),t)for(var[E,x]of Ee.points(t))t[x]=It.transform(E,r);break}case"move_node":{var{path:F,newPath:j}=r;if(oe.isAncestor(F,j))throw new Error("Cannot move a path [".concat(F,"] to new path [").concat(j,"] because the destination is inside itself."));var $=Ue.get(e,F),P=Ue.parent(e,F),A=F[F.length-1];P.children.splice(A,1);var O=oe.transform(F,r),S=Ue.get(e,oe.parent(O)),B=O[O.length-1];if(S.children.splice(B,0,$),t)for(var[R,N]of Ee.points(t))t[N]=It.transform(R,r);break}case"remove_node":{var{path:T}=r,L=T[T.length-1],X=Ue.parent(e,T);if(X.children.splice(L,1),t)for(var[_,q]of Ee.points(t)){var Q=It.transform(_,r);if(t!=null&&Q!=null)t[q]=Q;else{var te=void 0,z=void 0;for(var[Y,V]of Ue.texts(e))if(oe.compare(V,T)===-1)te=[Y,V];else{z=[Y,V];break}var G=!1;te&&z&&(oe.equals(z[1],T)?G=!oe.hasPrevious(z[1]):G=oe.common(te[1],T).length<oe.common(z[1],T).length),te&&!G?(_.path=te[1],_.offset=te[0].text.length):z?(_.path=z[1],_.offset=0):t=null}}break}case"remove_text":{var{path:K,offset:W,text:re}=r;if(re.length===0)break;var U=Ue.leaf(e,K),J=U.text.slice(0,W),ne=U.text.slice(W+re.length);if(U.text=J+ne,t)for(var[ue,me]of Ee.points(t))t[me]=It.transform(ue,r);break}case"set_node":{var{path:Ce,properties:Ne,newProperties:pe}=r;if(Ce.length===0)throw new Error("Cannot set properties on the root node!");var he=Ue.get(e,Ce);for(var ve in pe){if(ve==="children"||ve==="text")throw new Error('Cannot set the "'.concat(ve,'" property of nodes!'));var be=pe[ve];be==null?delete he[ve]:he[ve]=be}for(var ye in Ne)pe.hasOwnProperty(ye)||delete he[ye];break}case"set_selection":{var{newProperties:Ae}=r;if(Ae==null)t=Ae;else{if(t==null){if(!Ee.isRange(Ae))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Rr.stringify(Ae)," when there is no current selection."));t=hi({},Ae)}for(var we in Ae){var He=Ae[we];if(He==null){if(we==="anchor"||we==="focus")throw new Error('Cannot remove the "'.concat(we,'" selection property'));delete t[we]}else t[we]=He}}break}case"split_node":{var{path:Me,position:Fe,properties:ge}=r;if(Me.length===0)throw new Error('Cannot apply a "split_node" operation at path ['.concat(Me,"] because the root node cannot be split."));var Se=Ue.get(e,Me),qe=Ue.parent(e,Me),Ye=Me[Me.length-1],Xe;if(st.isText(Se)){var Re=Se.text.slice(0,Fe),lt=Se.text.slice(Fe);Se.text=Re,Xe=hi(hi({},ge),{},{text:lt})}else{var je=Se.children.slice(0,Fe),at=Se.children.slice(Fe);Se.children=je,Xe=hi(hi({},ge),{},{children:at})}if(qe.children.splice(Ye+1,0,Xe),t)for(var[vt,At]of Ee.points(t))t[At]=It.transform(vt,r);break}}return t},hE={transform(e,t){e.children=Hm(e.children);var r=e.selection&&Hm(e.selection);try{r=mE(e,r,t)}finally{e.children=Wm(e.children),r?e.selection=Jo(r)?Wm(r):r:e.selection=null}}},gE={insertNodes(e,t,r){e.insertNodes(t,r)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,r){e.setNodes(t,r)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,r){e.unsetNodes(t,r)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,r){e.wrapNodes(t,r)}},vE={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,r){e.setPoint(t,r)},setSelection(e,t){e.setSelection(t)}},Hb=(e,t)=>{for(var r in e){var n=e[r],o=t[r];if(Vr(n)&&Vr(o)){if(!Hb(n,o))return!1}else if(Array.isArray(n)&&Array.isArray(o)){if(n.length!==o.length)return!1;for(var a=0;a<n.length;a++)if(n[a]!==o[a])return!1}else if(n!==o)return!1}for(var i in t)if(e[i]===void 0&&t[i]!==void 0)return!1;return!0};function bE(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function vo(e,t){if(e==null)return{};var r=bE(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var yE=["anchor","focus"];function Xm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function CE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Xm(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ee={edges(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{reverse:r=!1}=t,{anchor:n,focus:o}=e;return Ee.isBackward(e)===r?[n,o]:[o,n]},end(e){var[,t]=Ee.edges(e);return t},equals(e,t){return It.equals(e.anchor,t.anchor)&&It.equals(e.focus,t.focus)},includes(e,t){if(Ee.isRange(t)){if(Ee.includes(e,t.anchor)||Ee.includes(e,t.focus))return!0;var[r,n]=Ee.edges(e),[o,a]=Ee.edges(t);return It.isBefore(r,o)&&It.isAfter(n,a)}var[i,l]=Ee.edges(e),s=!1,u=!1;return It.isPoint(t)?(s=It.compare(t,i)>=0,u=It.compare(t,l)<=0):(s=oe.compare(t,i.path)>=0,u=oe.compare(t,l.path)<=0),s&&u},intersection(e,t){var r=vo(e,yE),[n,o]=Ee.edges(e),[a,i]=Ee.edges(t),l=It.isBefore(n,a)?a:n,s=It.isBefore(o,i)?o:i;return It.isBefore(s,l)?null:CE({anchor:l,focus:s},r)},isBackward(e){var{anchor:t,focus:r}=e;return It.isAfter(t,r)},isCollapsed(e){var{anchor:t,focus:r}=e;return It.equals(t,r)},isExpanded(e){return!Ee.isCollapsed(e)},isForward(e){return!Ee.isBackward(e)},isRange(e){return Vr(e)&&It.isPoint(e.anchor)&&It.isPoint(e.focus)},*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=Ee.edges(e);return t},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return rp(e,n=>{if(n===null)return null;var{affinity:o="inward"}=r,a,i;if(o==="inward"){var l=Ee.isCollapsed(n);Ee.isForward(n)?(a="forward",i=l?a:"backward"):(a="backward",i=l?a:"forward")}else o==="outward"?Ee.isForward(n)?(a="backward",i="forward"):(a="forward",i="backward"):(a=o,i=o);var s=It.transform(n.anchor,t,{affinity:a}),u=It.transform(n.focus,t,{affinity:i});if(!s||!u)return null;n.anchor=s,n.focus=u})}},Gm=e=>Vr(e)&&Ue.isNodeList(e.children)&&!I.isEditor(e),ct={isAncestor(e){return Vr(e)&&Ue.isNodeList(e.children)},isElement:Gm,isElementList(e){return Array.isArray(e)&&e.every(t=>ct.isElement(t))},isElementProps(e){return e.children!==void 0},isElementType:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"type";return Gm(e)&&e[r]===t},matches(e,t){for(var r in t)if(r!=="children"&&e[r]!==t[r])return!1;return!0}},xE=["children"],wE=["text"],Ym=new WeakMap,Ue={ancestor(e,t){var r=Ue.get(e,t);if(st.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Rr.stringify(r)));return r},ancestors(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of oe.ancestors(t,r)){var o=Ue.ancestor(e,n),a=[o,n];yield a}})()},child(e,t){if(st.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Rr.stringify(e)));var r=e.children[t];if(r==null)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Rr.stringify(e)));return r},children(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var{reverse:n=!1}=r,o=Ue.ancestor(e,t),{children:a}=o,i=n?a.length-1:0;n?i>=0:i<a.length;){var l=Ue.child(o,i),s=t.concat(i);yield[l,s],i=n?i-1:i+1}})()},common(e,t,r){var n=oe.common(t,r),o=Ue.get(e,n);return[o,n]},descendant(e,t){var r=Ue.get(e,t);if(I.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Rr.stringify(r)));return r},descendants(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Ue.nodes(e,t))n.length!==0&&(yield[r,n])})()},elements(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Ue.nodes(e,t))ct.isElement(r)&&(yield[r,n])})()},extractProps(e){if(ct.isAncestor(e)){var t=vo(e,xE);return t}else{var t=vo(e,wE);return t}},first(e,t){for(var r=t.slice(),n=Ue.get(e,r);n&&!(st.isText(n)||n.children.length===0);)n=n.children[0],r.push(0);return[n,r]},fragment(e,t){if(st.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(Rr.stringify(e)));var r=rp({children:e.children},n=>{var[o,a]=Ee.edges(t),i=Ue.nodes(n,{reverse:!0,pass:p=>{var[,h]=p;return!Ee.includes(t,h)}});for(var[,l]of i){if(!Ee.includes(t,l)){var s=Ue.parent(n,l),u=l[l.length-1];s.children.splice(u,1)}if(oe.equals(l,a.path)){var c=Ue.leaf(n,l);c.text=c.text.slice(0,a.offset)}if(oe.equals(l,o.path)){var f=Ue.leaf(n,l);f.text=f.text.slice(o.offset)}}I.isEditor(n)&&(n.selection=null)});return r.children},get(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(st.isText(r)||!r.children[o])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Rr.stringify(e)));r=r.children[o]}return r},has(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(st.isText(r)||!r.children[o])return!1;r=r.children[o]}return!0},isNode(e){return st.isText(e)||ct.isElement(e)||I.isEditor(e)},isNodeList(e){if(!Array.isArray(e))return!1;var t=Ym.get(e);if(t!==void 0)return t;var r=e.every(n=>Ue.isNode(n));return Ym.set(e,r),r},last(e,t){for(var r=t.slice(),n=Ue.get(e,r);n&&!(st.isText(n)||n.children.length===0);){var o=n.children.length-1;n=n.children[o],r.push(o)}return[n,r]},leaf(e,t){var r=Ue.get(e,t);if(!st.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Rr.stringify(r)));return r},levels(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function*(){for(var n of oe.levels(t,r)){var o=Ue.get(e,n);yield[o,n]}})()},matches(e,t){return ct.isElement(e)&&ct.isElementProps(t)&&ct.matches(e,t)||st.isText(e)&&st.isTextProps(t)&&st.matches(e,t)},nodes(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var{pass:r,reverse:n=!1}=t,{from:o=[],to:a}=t,i=new Set,l=[],s=e;!(a&&(n?oe.isBefore(l,a):oe.isAfter(l,a)));){if(i.has(s)||(yield[s,l]),!i.has(s)&&!st.isText(s)&&s.children.length!==0&&(r==null||r([s,l])===!1)){i.add(s);var u=n?s.children.length-1:0;oe.isAncestor(l,o)&&(u=o[l.length]),l=l.concat(u),s=Ue.get(e,l);continue}if(l.length===0)break;if(!n){var c=oe.next(l);if(Ue.has(e,c)){l=c,s=Ue.get(e,l);continue}}if(n&&l[l.length-1]!==0){var f=oe.previous(l);l=f,s=Ue.get(e,l);continue}l=oe.parent(l),s=Ue.get(e,l),i.add(s)}})()},parent(e,t){var r=oe.parent(t),n=Ue.get(e,r);if(st.isText(n))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return n},string(e){return st.isText(e)?e.text:e.children.map(Ue.string).join("")},texts(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){for(var[r,n]of Ue.nodes(e,t))st.isText(r)&&(yield[r,n])})()}};function Zm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ar(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zm(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Di={isNodeOperation(e){return Di.isOperation(e)&&e.type.endsWith("_node")},isOperation(e){if(!Vr(e))return!1;switch(e.type){case"insert_node":return oe.isPath(e.path)&&Ue.isNode(e.node);case"insert_text":return typeof e.offset=="number"&&typeof e.text=="string"&&oe.isPath(e.path);case"merge_node":return typeof e.position=="number"&&oe.isPath(e.path)&&Vr(e.properties);case"move_node":return oe.isPath(e.path)&&oe.isPath(e.newPath);case"remove_node":return oe.isPath(e.path)&&Ue.isNode(e.node);case"remove_text":return typeof e.offset=="number"&&typeof e.text=="string"&&oe.isPath(e.path);case"set_node":return oe.isPath(e.path)&&Vr(e.properties)&&Vr(e.newProperties);case"set_selection":return e.properties===null&&Ee.isRange(e.newProperties)||e.newProperties===null&&Ee.isRange(e.properties)||Vr(e.properties)&&Vr(e.newProperties);case"split_node":return oe.isPath(e.path)&&typeof e.position=="number"&&Vr(e.properties);default:return!1}},isOperationList(e){return Array.isArray(e)&&e.every(t=>Di.isOperation(t))},isSelectionOperation(e){return Di.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation(e){return Di.isOperation(e)&&e.type.endsWith("_text")},inverse(e){switch(e.type){case"insert_node":return ar(ar({},e),{},{type:"remove_node"});case"insert_text":return ar(ar({},e),{},{type:"remove_text"});case"merge_node":return ar(ar({},e),{},{type:"split_node",path:oe.previous(e.path)});case"move_node":{var{newPath:t,path:r}=e;if(oe.equals(t,r))return e;if(oe.isSibling(r,t))return ar(ar({},e),{},{path:t,newPath:r});var n=oe.transform(r,e),o=oe.transform(oe.next(r),e);return ar(ar({},e),{},{path:n,newPath:o})}case"remove_node":return ar(ar({},e),{},{type:"insert_node"});case"remove_text":return ar(ar({},e),{},{type:"insert_text"});case"set_node":{var{properties:a,newProperties:i}=e;return ar(ar({},e),{},{properties:i,newProperties:a})}case"set_selection":{var{properties:l,newProperties:s}=e;return l==null?ar(ar({},e),{},{properties:s,newProperties:null}):s==null?ar(ar({},e),{},{properties:null,newProperties:l}):ar(ar({},e),{},{properties:s,newProperties:l})}case"split_node":return ar(ar({},e),{},{type:"merge_node",path:oe.next(e.path)})}}},Jm=new WeakMap,EE=e=>{var t=Jm.get(e);if(t!==void 0)return t;if(!Vr(e))return!1;var r=typeof e.addMark=="function"&&typeof e.apply=="function"&&typeof e.deleteFragment=="function"&&typeof e.insertBreak=="function"&&typeof e.insertSoftBreak=="function"&&typeof e.insertFragment=="function"&&typeof e.insertNode=="function"&&typeof e.insertText=="function"&&typeof e.isElementReadOnly=="function"&&typeof e.isInline=="function"&&typeof e.isSelectable=="function"&&typeof e.isVoid=="function"&&typeof e.normalizeNode=="function"&&typeof e.onChange=="function"&&typeof e.removeMark=="function"&&typeof e.getDirtyPaths=="function"&&(e.marks===null||Vr(e.marks))&&(e.selection===null||Ee.isRange(e.selection))&&Ue.isNodeList(e.children)&&Di.isOperationList(e.operations);return Jm.set(e,r),r},I={above(e,t){return e.above(t)},addMark(e,t,r){e.addMark(t,r)},after(e,t,r){return e.after(t,r)},before(e,t,r){return e.before(t,r)},deleteBackward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteBackward(r)},deleteForward(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{unit:r="character"}=t;e.deleteForward(r)},deleteFragment(e,t){e.deleteFragment(t)},edges(e,t){return e.edges(t)},elementReadOnly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.elementReadOnly(t)},end(e,t){return e.end(t)},first(e,t){return e.first(t)},fragment(e,t){return e.fragment(t)},hasBlocks(e,t){return e.hasBlocks(t)},hasInlines(e,t){return e.hasInlines(t)},hasPath(e,t){return e.hasPath(t)},hasTexts(e,t){return e.hasTexts(t)},insertBreak(e){e.insertBreak()},insertFragment(e,t,r){e.insertFragment(t,r)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock(e,t){return e.isBlock(t)},isEdge(e,t,r){return e.isEdge(t,r)},isEditor(e){return EE(e)},isElementReadOnly(e,t){return e.isElementReadOnly(t)},isEmpty(e,t){return e.isEmpty(t)},isEnd(e,t,r){return e.isEnd(t,r)},isInline(e,t){return e.isInline(t)},isNormalizing(e){return e.isNormalizing()},isSelectable(e,t){return e.isSelectable(t)},isStart(e,t,r){return e.isStart(t,r)},isVoid(e,t){return e.isVoid(t)},last(e,t){return e.last(t)},leaf(e,t,r){return e.leaf(t,r)},levels(e,t){return e.levels(t)},marks(e){return e.getMarks()},next(e,t){return e.next(t)},node(e,t,r){return e.node(t,r)},nodes(e,t){return e.nodes(t)},normalize(e,t){e.normalize(t)},parent(e,t,r){return e.parent(t,r)},path(e,t,r){return e.path(t,r)},pathRef(e,t,r){return e.pathRef(t,r)},pathRefs(e){return e.pathRefs()},point(e,t,r){return e.point(t,r)},pointRef(e,t,r){return e.pointRef(t,r)},pointRefs(e){return e.pointRefs()},positions(e,t){return e.positions(t)},previous(e,t){return e.previous(t)},range(e,t,r){return e.range(t,r)},rangeRef(e,t,r){return e.rangeRef(t,r)},rangeRefs(e){return e.rangeRefs()},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start(e,t){return e.start(t)},string(e,t,r){return e.string(t,r)},unhangRange(e,t,r){return e.unhangRange(t,r)},void(e,t){return e.void(t)},withoutNormalizing(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:(e,t,r)=>e.shouldMergeNodesRemovePrevNode(t,r)},kE={isSpan(e){return Array.isArray(e)&&e.length===2&&e.every(oe.isPath)}};function Qm(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function eh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qm(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qm(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var It={compare(e,t){var r=oe.compare(e.path,t.path);return r===0?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter(e,t){return It.compare(e,t)===1},isBefore(e,t){return It.compare(e,t)===-1},equals(e,t){return e.offset===t.offset&&oe.equals(e.path,t.path)},isPoint(e){return Vr(e)&&typeof e.offset=="number"&&oe.isPath(e.path)},transform(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return rp(e,n=>{if(n===null)return null;var{affinity:o="forward"}=r,{path:a,offset:i}=n;switch(t.type){case"insert_node":case"move_node":{n.path=oe.transform(a,t,r);break}case"insert_text":{oe.equals(t.path,a)&&(t.offset<i||t.offset===i&&o==="forward")&&(n.offset+=t.text.length);break}case"merge_node":{oe.equals(t.path,a)&&(n.offset+=t.position),n.path=oe.transform(a,t,r);break}case"remove_text":{oe.equals(t.path,a)&&t.offset<=i&&(n.offset-=Math.min(i-t.offset,t.text.length));break}case"remove_node":{if(oe.equals(t.path,a)||oe.isAncestor(t.path,a))return null;n.path=oe.transform(a,t,r);break}case"split_node":{if(oe.equals(t.path,a)){if(t.position===i&&o==null)return null;(t.position<i||t.position===i&&o==="forward")&&(n.offset-=t.position,n.path=oe.transform(a,t,eh(eh({},r),{},{affinity:"forward"})))}else n.path=oe.transform(a,t,r);break}}})}},th=void 0,Rr={setScrubber(e){th=e},stringify(e){return JSON.stringify(e,th)}},DE=["text"],SE=["anchor","focus"];function rh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function lo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rh(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var st={equals(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{loose:n=!1}=r;function o(a){var i=vo(a,DE);return i}return Hb(n?o(e):e,n?o(t):t)},isText(e){return Vr(e)&&typeof e.text=="string"},isTextList(e){return Array.isArray(e)&&e.every(t=>st.isText(t))},isTextProps(e){return e.text!==void 0},matches(e,t){for(var r in t)if(r!=="text"&&(!e.hasOwnProperty(r)||e[r]!==t[r]))return!1;return!0},decorations(e,t){var r=[lo({},e)];for(var n of t){var o=vo(n,SE),[a,i]=Ee.edges(n),l=[],s=0,u=a.offset,c=i.offset;for(var f of r){var{length:p}=f.text,h=s;if(s+=p,u<=h&&s<=c){Object.assign(f,o),l.push(f);continue}if(u!==c&&(u===s||c===h)||u>s||c<h||c===h&&h!==0){l.push(f);continue}var v=f,g=void 0,m=void 0;if(c<s){var b=c-h;m=lo(lo({},v),{},{text:v.text.slice(b)}),v=lo(lo({},v),{},{text:v.text.slice(0,b)})}if(u>h){var y=u-h;g=lo(lo({},v),{},{text:v.text.slice(0,y)}),v=lo(lo({},v),{},{text:v.text.slice(y)})}Object.assign(v,o),g&&l.push(g),l.push(v),m&&l.push(m)}r=l}return r}},np=e=>e.selection?e.selection:e.children.length>0?I.end(e,[]):[0],ti=(e,t)=>{var[r]=I.node(e,t);return n=>n===r},op=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=!t,n=t?NE(e):e,o=St.None,a=St.None,i=0,l=null,s=null;for(var u of n){var c=u.codePointAt(0);if(!c)break;var f=KE(u,c);if([o,a]=r?[a,f]:[f,o],ka(o,St.ZWJ)&&ka(a,St.ExtPict)&&(r?l=nh(e.substring(0,i)):l=nh(e.substring(0,e.length-i)),!l)||ka(o,St.RI)&&ka(a,St.RI)&&(s!==null?s=!s:r?s=!0:s=GE(e.substring(0,e.length-i)),!s)||o!==St.None&&a!==St.None&&VE(o,a))break;i+=u.length}return i||1},$E=/\s/,BE=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,OE=/['\u2018\u2019]/,AE=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=0,n=!1;e.length>0;){var o=op(e,t),[a,i]=ap(e,o,t);if(FE(a,i,t))n=!0,r+=o;else if(!n)r+=o;else break;e=i}return r},ap=(e,t,r)=>{if(r){var n=e.length-t;return[e.slice(n,e.length),e.slice(0,n)]}return[e.slice(0,t),e.slice(t)]},FE=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if($E.test(t))return!1;if(OE.test(t)){var o=op(r,n),[a,i]=ap(r,o,n);if(e(a,i,n))return!0}return!BE.test(t)},NE=function*(e){for(var t=e.length-1,r=0;r<e.length;r++){var n=e.charAt(t-r);if(jE(n.charCodeAt(0))){var o=e.charAt(t-r-1);if(PE(o.charCodeAt(0))){yield o+n,r++;continue}}yield n}},PE=e=>e>=55296&&e<=56319,jE=e=>e>=56320&&e<=57343,St;(function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"})(St||(St={}));var RE=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,IE=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,TE=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,ME=/^[\u1100-\u115F\uA960-\uA97C]$/,zE=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,LE=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,_E=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,HE=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,WE=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,KE=(e,t)=>{var r=St.Any;return e.search(RE)!==-1&&(r|=St.Extend),t===8205&&(r|=St.ZWJ),t>=127462&&t<=127487&&(r|=St.RI),e.search(IE)!==-1&&(r|=St.Prepend),e.search(TE)!==-1&&(r|=St.SpacingMark),e.search(ME)!==-1&&(r|=St.L),e.search(zE)!==-1&&(r|=St.V),e.search(LE)!==-1&&(r|=St.T),e.search(_E)!==-1&&(r|=St.LV),e.search(HE)!==-1&&(r|=St.LVT),e.search(WE)!==-1&&(r|=St.ExtPict),r};function ka(e,t){return(e&t)!==0}var qE=[[St.L,St.L|St.V|St.LV|St.LVT],[St.LV|St.V,St.V|St.T],[St.LVT|St.T,St.T],[St.Any,St.Extend|St.ZWJ],[St.Any,St.SpacingMark],[St.Prepend,St.Any],[St.ZWJ,St.ExtPict],[St.RI,St.RI]];function VE(e,t){return qE.findIndex(r=>ka(e,r[0])&&ka(t,r[1]))===-1}var UE=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,nh=e=>e.search(UE)!==-1,XE=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,GE=e=>{var t=e.match(XE);if(t===null)return!1;var r=t[0].length/2;return r%2===1},YE={delete(e,t){e.delete(t)},insertFragment(e,t,r){e.insertFragment(t,r)},insertText(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};I.withoutNormalizing(e,()=>{var{voids:n=!1}=r,{at:o=np(e)}=r;if(oe.isPath(o)&&(o=I.range(e,o)),Ee.isRange(o))if(Ee.isCollapsed(o))o=o.anchor;else{var a=Ee.end(o);if(!n&&I.void(e,{at:a}))return;var i=Ee.start(o),l=I.pointRef(e,i),s=I.pointRef(e,a);Ie.delete(e,{at:o,voids:n});var u=l.unref(),c=s.unref();o=u||c,Ie.setSelection(e,{anchor:o,focus:o})}if(!(!n&&I.void(e,{at:o})||I.elementReadOnly(e,{at:o}))){var{path:f,offset:p}=o;t.length>0&&e.apply({type:"insert_text",path:f,offset:p,text:t})}})}};function oh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function jl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oh(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ie=jl(jl(jl(jl({},hE),gE),vE),YE),Ql=new WeakMap,ZE=e=>Ql.get(e)||!1,JE=(e,t,r)=>{var n=Ql.get(e)||!1;Ql.set(e,!0);try{t(),r()}finally{Ql.set(e,n)}};function Wb(e,t,r){var n=Ds.get(e)||[],o=Ss.get(e)||new Set,a,i,l=f=>{if(f){var p=f.join(",");i.has(p)||(i.add(p),a.push(f))}};if(r){a=[],i=new Set;for(var s of n){var u=r(s);l(u)}}else a=n,i=o;for(var c of t)l(c);Ds.set(e,a),Ss.set(e,i)}var QE=(e,t)=>{for(var r of I.pathRefs(e))uE.transform(r,t);for(var n of I.pointRefs(e))cE.transform(n,t);for(var o of I.rangeRefs(e))dE.transform(o,t);if(!ZE(e)){var a=oe.operationCanTransformPath(t)?i=>oe.transform(i,t):void 0;Wb(e,e.getDirtyPaths(t),a)}Ie.transform(e,t),e.operations.push(t),I.normalize(e,{operation:t}),t.type==="set_selection"&&(e.marks=null),Ai.get(e)||(Ai.set(e,!0),Promise.resolve().then(()=>{Ai.set(e,!1),e.onChange({operation:t}),e.operations=[]}))},ek=(e,t)=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":{var{path:r}=t;return oe.levels(r)}case"insert_node":{var{node:n,path:o}=t,a=oe.levels(o),i=st.isText(n)?[]:Array.from(Ue.nodes(n),j=>{var[,$]=j;return o.concat($)});return[...a,...i]}case"merge_node":{var{path:l}=t,s=oe.ancestors(l),u=oe.previous(l);return[...s,u]}case"move_node":{var{path:c,newPath:f}=t;if(oe.equals(c,f))return[];var p=[],h=[];for(var v of oe.ancestors(c)){var g=oe.transform(v,t);p.push(g)}for(var m of oe.ancestors(f)){var b=oe.transform(m,t);h.push(b)}var y=h[h.length-1],C=f[f.length-1],D=y.concat(C);return[...p,...h,D]}case"remove_node":{var{path:w}=t,k=oe.ancestors(w);return[...k]}case"split_node":{var{path:E}=t,x=oe.levels(E),F=oe.next(E);return[...x,F]}default:return[]}},tk=e=>{var{selection:t}=e;return t?Ue.fragment(e,t):[]},rk=(e,t)=>{var[r,n]=t;if(!st.isText(r)){if(ct.isElement(r)&&r.children.length===0){var o={text:""};Ie.insertNodes(e,o,{at:n.concat(0),voids:!0});return}for(var a=I.isEditor(r)?!1:ct.isElement(r)&&(e.isInline(r)||r.children.length===0||st.isText(r.children[0])||e.isInline(r.children[0])),i=0,l=0;l<r.children.length;l++,i++){var s=Ue.get(e,n);if(!st.isText(s)){var u=s.children[i],c=s.children[i-1],f=l===r.children.length-1,p=st.isText(u)||ct.isElement(u)&&e.isInline(u);if(p!==a)Ie.removeNodes(e,{at:n.concat(i),voids:!0}),i--;else if(ct.isElement(u)){if(e.isInline(u)){if(c==null||!st.isText(c)){var h={text:""};Ie.insertNodes(e,h,{at:n.concat(i),voids:!0}),i++}else if(f){var v={text:""};Ie.insertNodes(e,v,{at:n.concat(i+1),voids:!0}),i++}}}else{if(!st.isText(u)&&!("children"in u)){var g=u;g.children=[]}c!=null&&st.isText(c)&&(st.equals(u,c,{loose:!0})?(Ie.mergeNodes(e,{at:n.concat(i),voids:!0}),i--):c.text===""?(Ie.removeNodes(e,{at:n.concat(i-1),voids:!0}),i--):u.text===""&&(Ie.removeNodes(e,{at:n.concat(i),voids:!0}),i--))}}}}},nk=(e,t)=>{var{iteration:r,initialDirtyPathsLength:n}=t,o=n*42;if(r>o)throw new Error("Could not completely normalize the editor after ".concat(o," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},ok=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{voids:r=!1,mode:n="lowest",at:o=e.selection,match:a}=t;if(o){var i=I.path(e,o),l=n==="lowest";for(var[s,u]of I.levels(e,{at:i,voids:r,match:a,reverse:l}))if(!st.isText(s)){if(Ee.isRange(o)){if(oe.isAncestor(u,o.anchor.path)&&oe.isAncestor(u,o.focus.path))return[s,u]}else if(!oe.equals(i,u))return[s,u]}}};function ah(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ih(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ah(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ah(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ak=(e,t,r)=>{var{selection:n}=e;if(n){var o=(f,p)=>{if(!st.isText(f))return!1;var[h,v]=I.parent(e,p);return!e.isVoid(h)||e.markableVoid(h)},a=Ee.isExpanded(n),i=!1;if(!a){var[l,s]=I.node(e,n);if(l&&o(l,s)){var[u]=I.parent(e,s);i=u&&e.markableVoid(u)}}if(a||i)Ie.setNodes(e,{[t]:r},{match:o,split:!0,voids:!0});else{var c=ih(ih({},I.marks(e)||{}),{},{[t]:r});e.marks=c,Ai.get(e)||e.onChange()}}};function lh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function sh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lh(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ik=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=I.point(e,t,{edge:"end"}),o=I.end(e,[]),a={anchor:n,focus:o},{distance:i=1}=r,l=0,s;for(var u of I.positions(e,sh(sh({},r),{},{at:a}))){if(l>i)break;l!==0&&(s=u),l++}return s};function uh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ch(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uh(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var lk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=I.start(e,[]),o=I.point(e,t,{edge:"start"}),a={anchor:n,focus:o},{distance:i=1}=r,l=0,s;for(var u of I.positions(e,ch(ch({},r),{},{at:a,reverse:!0}))){if(l>i)break;l!==0&&(s=u),l++}return s},sk=(e,t)=>{var{selection:r}=e;r&&Ee.isCollapsed(r)&&Ie.delete(e,{unit:t,reverse:!0})},uk=(e,t)=>{var{selection:r}=e;r&&Ee.isCollapsed(r)&&Ie.delete(e,{unit:t})},ck=function(e){var{direction:t="forward"}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e;r&&Ee.isExpanded(r)&&Ie.delete(e,{reverse:t==="backward"})},dk=(e,t)=>[I.start(e,t),I.end(e,t)];function dh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function fh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dh(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var fk=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return I.above(e,fh(fh({},t),{},{match:r=>ct.isElement(r)&&I.isElementReadOnly(e,r)}))},pk=(e,t)=>I.point(e,t,{edge:"end"}),mk=(e,t)=>{var r=I.path(e,t,{edge:"start"});return I.node(e,r)},hk=(e,t)=>{var r=I.range(e,t);return Ue.fragment(e,r)};function ph(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function mh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ph(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ph(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var gk=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return I.above(e,mh(mh({},t),{},{match:r=>ct.isElement(r)&&I.isVoid(e,r)}))},vk=(e,t)=>t.children.some(r=>ct.isElement(r)&&I.isBlock(e,r)),bk=(e,t)=>t.children.some(r=>st.isText(r)||I.isInline(e,r)),yk=(e,t)=>Ue.has(e,t),Ck=(e,t)=>t.children.every(r=>st.isText(r)),xk=e=>{Ie.splitNodes(e,{always:!0})},wk=(e,t,r)=>{Ie.insertNodes(e,t,r)},Ek=e=>{Ie.splitNodes(e,{always:!0})};function hh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function kk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hh(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Dk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n,marks:o}=e;if(n){if(o){var a=kk({text:t},o);Ie.insertNodes(e,a,{at:r.at,voids:r.voids})}else Ie.insertText(e,t,r);e.marks=null}},Sk=(e,t)=>!e.isInline(t),$k=(e,t,r)=>I.isStart(e,t,r)||I.isEnd(e,t,r),Bk=(e,t)=>{var{children:r}=t,[n]=r;return r.length===0||r.length===1&&st.isText(n)&&n.text===""&&!e.isVoid(t)},Ok=(e,t,r)=>{var n=I.end(e,r);return It.equals(t,n)},Ak=e=>{var t=_b.get(e);return t===void 0?!0:t},Fk=(e,t,r)=>{if(t.offset!==0)return!1;var n=I.start(e,r);return It.equals(t,n)},Nk=(e,t)=>{var r=I.path(e,t,{edge:"end"});return I.node(e,r)},Pk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=I.path(e,t,r),o=Ue.leaf(e,n);return[o,n]};function jk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,reverse:n=!1,voids:o=!1}=t,{match:a}=t;if(a==null&&(a=()=>!0),!!r){var i=[],l=I.path(e,r);for(var[s,u]of Ue.levels(e,l))if(a(s,u)&&(i.push([s,u]),!o&&ct.isElement(s)&&I.isVoid(e,s)))break;n&&i.reverse(),yield*i}})()}var Rk=["text"],Ik=["text"],Tk=function(e){var{marks:t,selection:r}=e;if(!r)return null;var{anchor:n,focus:o}=r;if(t)return t;if(Ee.isExpanded(r)){var a=I.isEnd(e,n,n.path);if(a){var i=I.after(e,n);i&&(n=i)}var[l]=I.nodes(e,{match:st.isText,at:{anchor:n,focus:o}});if(l){var[s]=l,u=vo(s,Rk);return u}else return{}}var{path:c}=n,[f]=I.leaf(e,c);if(n.offset===0){var p=I.previous(e,{at:c,match:st.isText}),h=I.above(e,{match:C=>ct.isElement(C)&&I.isVoid(e,C)&&e.markableVoid(C)});if(!h){var v=I.above(e,{match:C=>ct.isElement(C)&&I.isBlock(e,C)});if(p&&v){var[g,m]=p,[,b]=v;oe.isAncestor(b,m)&&(f=g)}}}var y=vo(f,Ik);return y},Mk=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:o,at:a=e.selection}=t;if(a){var i=I.after(e,a,{voids:n});if(i){var[,l]=I.last(e,[]),s=[i.path,l];if(oe.isPath(a)&&a.length===0)throw new Error("Cannot get the next node from the root node!");if(o==null)if(oe.isPath(a)){var[u]=I.parent(e,a);o=f=>u.children.includes(f)}else o=()=>!0;var[c]=I.nodes(e,{at:s,match:o,mode:r,voids:n});return c}}},zk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=I.path(e,t,r),o=Ue.get(e,n);return[o,n]};function Lk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,mode:n="all",universal:o=!1,reverse:a=!1,voids:i=!1,ignoreNonSelectable:l=!1}=t,{match:s}=t;if(s||(s=()=>!0),!!r){var u,c;if(kE.isSpan(r))u=r[0],c=r[1];else{var f=I.path(e,r,{edge:"start"}),p=I.path(e,r,{edge:"end"});u=a?p:f,c=a?f:p}var h=Ue.nodes(e,{reverse:a,from:u,to:c,pass:D=>{var[w]=D;return ct.isElement(w)?!!(!i&&(I.isVoid(e,w)||I.isElementReadOnly(e,w))||l&&!I.isSelectable(e,w)):!1}}),v=[],g;for(var[m,b]of h)if(!(l&&ct.isElement(m)&&!I.isSelectable(e,m))){var y=g&&oe.compare(b,g[1])===0;if(!(n==="highest"&&y)){if(!s(m,b)){if(o&&!y&&st.isText(m))return;continue}if(n==="lowest"&&y){g=[m,b];continue}var C=n==="lowest"?g:[m,b];C&&(o?v.push(C):yield C),g=[m,b]}}n==="lowest"&&g&&(o?v.push(g):yield g),o&&(yield*v)}})()}var _k=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{force:r=!1,operation:n}=t,o=u=>Ds.get(u)||[],a=u=>Ss.get(u)||new Set,i=u=>{var c=o(u).pop(),f=c.join(",");return a(u).delete(f),c};if(I.isNormalizing(e)){if(r){var l=Array.from(Ue.nodes(e),u=>{var[,c]=u;return c}),s=new Set(l.map(u=>u.join(",")));Ds.set(e,l),Ss.set(e,s)}o(e).length!==0&&I.withoutNormalizing(e,()=>{for(var u of o(e))if(Ue.has(e,u)){var c=I.node(e,u),[f,p]=c;ct.isElement(f)&&f.children.length===0&&e.normalizeNode(c,{operation:n})}for(var h=o(e),v=h.length,g=0;h.length!==0;){if(!e.shouldNormalize({dirtyPaths:h,iteration:g,initialDirtyPathsLength:v,operation:n}))return;var m=i(e);if(Ue.has(e,m)){var b=I.node(e,m);e.normalizeNode(b,{operation:n})}g++,h=o(e)}})}},Hk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=I.path(e,t,r),o=oe.parent(n),a=I.node(e,o);return a},Wk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,o={current:t,affinity:n,unref(){var{current:i}=o,l=I.pathRefs(e);return l.delete(o),o.current=null,i}},a=I.pathRefs(e);return a.add(o),o},Kk=e=>{var t=Km.get(e);return t||(t=new Set,Km.set(e,t)),t},qk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:n,edge:o}=r;if(oe.isPath(t)){if(o==="start"){var[,a]=Ue.first(e,t);t=a}else if(o==="end"){var[,i]=Ue.last(e,t);t=i}}return Ee.isRange(t)&&(o==="start"?t=Ee.start(t):o==="end"?t=Ee.end(t):t=oe.common(t.anchor.path,t.focus.path)),It.isPoint(t)&&(t=t.path),n!=null&&(t=t.slice(0,n)),t},Vk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,o={current:t,affinity:n,unref(){var{current:i}=o,l=I.pointRefs(e);return l.delete(o),o.current=null,i}},a=I.pointRefs(e);return a.add(o),o},Uk=e=>{var t=qm.get(e);return t||(t=new Set,qm.set(e,t)),t},Xk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:n="start"}=r;if(oe.isPath(t)){var o;if(n==="end"){var[,a]=Ue.last(e,t);o=a}else{var[,i]=Ue.first(e,t);o=i}var l=Ue.get(e,o);if(!st.isText(l))throw new Error("Cannot get the ".concat(n," point in the node at path [").concat(t,"] because it has no ").concat(n," text node."));return{path:o,offset:n==="end"?l.text.length:0}}if(Ee.isRange(t)){var[s,u]=Ee.edges(t);return n==="start"?s:u}return t};function Gk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return(function*(){var{at:r=e.selection,unit:n="offset",reverse:o=!1,voids:a=!1,ignoreNonSelectable:i=!1}=t;if(!r)return;var l=I.range(e,r),[s,u]=Ee.edges(l),c=o?u:s,f=!1,p="",h=0,v=0,g=0;for(var[m,b]of I.nodes(e,{at:r,reverse:o,voids:a,ignoreNonSelectable:i})){if(ct.isElement(m)){if(!a&&(e.isVoid(m)||e.isElementReadOnly(m))){yield I.start(e,b);continue}if(e.isInline(m))continue;if(I.hasInlines(e,m)){var y=oe.isAncestor(b,u.path)?u:I.end(e,b),C=oe.isAncestor(b,s.path)?s:I.start(e,b);p=I.string(e,{anchor:C,focus:y},{voids:a}),f=!0}}if(st.isText(m)){var D=oe.equals(b,c.path);for(D?(v=o?c.offset:m.text.length-c.offset,g=c.offset):(v=m.text.length,g=o?v:0),(D||f||n==="offset")&&(yield{path:b,offset:g},f=!1);;){if(h===0){if(p==="")break;h=w(p,n,o),p=ap(p,h,o)[1]}if(g=o?g-h:g+h,v=v-h,v<0){h=-v;break}h=0,yield{path:b,offset:g}}}}function w(k,E,x){return E==="character"?op(k,x):E==="word"?AE(k,x):E==="line"||E==="block"?k.length:1}})()}var Yk=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:r="lowest",voids:n=!1}=t,{match:o,at:a=e.selection}=t;if(a){var i=I.before(e,a,{voids:n});if(i){var[,l]=I.first(e,[]),s=[i.path,l];if(oe.isPath(a)&&a.length===0)throw new Error("Cannot get the previous node from the root node!");if(o==null)if(oe.isPath(a)){var[u]=I.parent(e,a);o=f=>u.children.includes(f)}else o=()=>!0;var[c]=I.nodes(e,{reverse:!0,at:s,match:o,mode:r,voids:n});return c}}},Zk=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:n="forward"}=r,o={current:t,affinity:n,unref(){var{current:i}=o,l=I.rangeRefs(e);return l.delete(o),o.current=null,i}},a=I.rangeRefs(e);return a.add(o),o},Jk=e=>{var t=Vm.get(e);return t||(t=new Set,Vm.set(e,t)),t},Qk=(e,t,r)=>{if(Ee.isRange(t)&&!r)return t;var n=I.start(e,t),o=I.end(e,r||t);return{anchor:n,focus:o}};function gh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function eD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gh(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var tD=(e,t)=>{var{selection:r}=e;if(r){var n=(c,f)=>{if(!st.isText(c))return!1;var[p,h]=I.parent(e,f);return!e.isVoid(p)||e.markableVoid(p)},o=Ee.isExpanded(r),a=!1;if(!o){var[i,l]=I.node(e,r);if(i&&n(i,l)){var[s]=I.parent(e,l);a=s&&e.markableVoid(s)}}if(o||a)Ie.unsetNodes(e,t,{match:n,split:!0,voids:!0});else{var u=eD({},I.marks(e)||{});delete u[t],e.marks=u,Ai.get(e)||e.onChange()}}},rD=(e,t)=>{_b.set(e,t)},nD=(e,t)=>I.point(e,t,{edge:"start"}),oD=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,o=I.range(e,t),[a,i]=Ee.edges(o),l="";for(var[s,u]of I.nodes(e,{at:o,match:st.isText,voids:n})){var c=s.text;oe.equals(u,i.path)&&(c=c.slice(0,i.offset)),oe.equals(u,a.path)&&(c=c.slice(a.offset)),l+=c}return l},aD=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:n=!1}=r,[o,a]=Ee.edges(t);if(o.offset!==0||a.offset!==0||Ee.isCollapsed(t)||oe.hasPrevious(a.path))return t;var i=I.above(e,{at:a,match:h=>ct.isElement(h)&&I.isBlock(e,h),voids:n}),l=i?i[1]:[],s=I.start(e,o),u={anchor:s,focus:a},c=!0;for(var[f,p]of I.nodes(e,{at:u,match:st.isText,reverse:!0,voids:n})){if(c){c=!1;continue}if(f.text!==""||oe.isBefore(p,l)){a={path:p,offset:f.text.length};break}}return{anchor:o,focus:a}},iD=(e,t)=>{var r=I.isNormalizing(e);I.setNormalizing(e,!1);try{t()}finally{I.setNormalizing(e,r)}I.normalize(e)},lD=(e,t,r)=>{var[n,o]=t;return ct.isElement(n)&&I.isEmpty(e,n)||st.isText(n)&&n.text===""&&o[o.length-1]!==0},sD=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};I.withoutNormalizing(e,()=>{var r,n,{reverse:o=!1,unit:a="character",distance:i=1,voids:l=!1}=t,{at:s=e.selection,hanging:u=!1}=t;if(s){var c=!1;if(Ee.isRange(s)&&Ee.isCollapsed(s)&&(c=!0,s=s.anchor),It.isPoint(s)){var f=I.void(e,{at:s,mode:"highest"});if(!l&&f){var[,p]=f;s=p}else{var h={unit:a,distance:i},v=o?I.before(e,s,h)||I.start(e,[]):I.after(e,s,h)||I.end(e,[]);s={anchor:s,focus:v},u=!0}}if(oe.isPath(s)){Ie.removeNodes(e,{at:s,voids:l});return}if(!Ee.isCollapsed(s)){if(!u){var[,g]=Ee.edges(s),m=I.end(e,[]);It.equals(g,m)||(s=I.unhangRange(e,s,{voids:l}))}var[b,y]=Ee.edges(s),C=I.above(e,{match:U=>ct.isElement(U)&&I.isBlock(e,U),at:b,voids:l}),D=I.above(e,{match:U=>ct.isElement(U)&&I.isBlock(e,U),at:y,voids:l}),w=C&&D&&!oe.equals(C[1],D[1]),k=oe.equals(b.path,y.path),E=l?null:(r=I.void(e,{at:b,mode:"highest"}))!==null&&r!==void 0?r:I.elementReadOnly(e,{at:b,mode:"highest"}),x=l?null:(n=I.void(e,{at:y,mode:"highest"}))!==null&&n!==void 0?n:I.elementReadOnly(e,{at:y,mode:"highest"});if(E){var F=I.before(e,b);F&&C&&oe.isAncestor(C[1],F.path)&&(b=F)}if(x){var j=I.after(e,y);j&&D&&oe.isAncestor(D[1],j.path)&&(y=j)}var $=[],P;for(var A of I.nodes(e,{at:s,voids:l})){var[O,S]=A;P&&oe.compare(S,P)===0||(!l&&ct.isElement(O)&&(I.isVoid(e,O)||I.isElementReadOnly(e,O))||!oe.isCommon(S,b.path)&&!oe.isCommon(S,y.path))&&($.push(A),P=S)}var B=Array.from($,U=>{var[,J]=U;return I.pathRef(e,J)}),R=I.pointRef(e,b),N=I.pointRef(e,y),T="";if(!k&&!E){var L=R.current,[X]=I.leaf(e,L),{path:_}=L,{offset:q}=b,Q=X.text.slice(q);Q.length>0&&(e.apply({type:"remove_text",path:_,offset:q,text:Q}),T=Q)}if(B.reverse().map(U=>U.unref()).filter(U=>U!==null).forEach(U=>Ie.removeNodes(e,{at:U,voids:l})),!x){var te=N.current,[z]=I.leaf(e,te),{path:Y}=te,V=k?b.offset:0,G=z.text.slice(V,y.offset);G.length>0&&(e.apply({type:"remove_text",path:Y,offset:V,text:G}),T=G)}!k&&w&&N.current&&R.current&&Ie.mergeNodes(e,{at:N.current,hanging:!0,voids:l}),c&&o&&a==="character"&&T.length>1&&T.match(/[\u0E00-\u0E7F]+/)&&Ie.insertText(e,T.slice(0,T.length-i));var K=R.unref(),W=N.unref(),re=o?K||W:W||K;t.at==null&&re&&Ie.select(e,re)}}})},uD=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};I.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:o=!1}=r,{at:a=np(e),batchDirty:i=!0}=r;if(t.length){if(Ee.isRange(a))if(n||(a=I.unhangRange(e,a,{voids:o})),Ee.isCollapsed(a))a=a.anchor;else{var[,l]=Ee.edges(a);if(!o&&I.void(e,{at:l}))return;var s=I.pointRef(e,l);Ie.delete(e,{at:a}),a=s.unref()}else oe.isPath(a)&&(a=I.start(e,a));if(!(!o&&I.void(e,{at:a}))){var u=I.above(e,{at:a,match:Q=>ct.isElement(Q)&&I.isInline(e,Q),mode:"highest",voids:o});if(u){var[,c]=u;if(I.isEnd(e,a,c)){var f=I.after(e,c);a=f}else if(I.isStart(e,a,c)){var p=I.before(e,c);a=p}}var h=I.above(e,{match:Q=>ct.isElement(Q)&&I.isBlock(e,Q),at:a,voids:o}),[,v]=h,g=I.isStart(e,a,v),m=I.isEnd(e,a,v),b=g&&m,y=!g||g&&m,C=!m,[,D]=Ue.first({children:t},[]),[,w]=Ue.last({children:t},[]),k=[],E=Q=>{var[te,z]=Q,Y=z.length===0;return Y?!1:b?!0:!(y&&oe.isAncestor(z,D)&&ct.isElement(te)&&!e.isVoid(te)&&!e.isInline(te)||C&&oe.isAncestor(z,w)&&ct.isElement(te)&&!e.isVoid(te)&&!e.isInline(te))};for(var x of Ue.nodes({children:t},{pass:E}))E(x)&&k.push(x);var F=[],j=[],$=[],P=!0,A=!1;for(var[O]of k)ct.isElement(O)&&!e.isInline(O)?(P=!1,A=!0,j.push(O)):P?F.push(O):$.push(O);var[S]=I.nodes(e,{at:a,match:Q=>st.isText(Q)||I.isInline(e,Q),mode:"highest",voids:o}),[,B]=S,R=I.isStart(e,a,B),N=I.isEnd(e,a,B),T=I.pathRef(e,m&&!$.length?oe.next(v):v),L=I.pathRef(e,N?oe.next(B):B);Ie.splitNodes(e,{at:a,match:Q=>A?ct.isElement(Q)&&I.isBlock(e,Q):st.isText(Q)||I.isInline(e,Q),mode:A?"lowest":"highest",always:A&&(!g||F.length>0)&&(!m||$.length>0),voids:o});var X=I.pathRef(e,!R||R&&N?oe.next(B):B);if(Ie.insertNodes(e,F,{at:X.current,match:Q=>st.isText(Q)||I.isInline(e,Q),mode:"highest",voids:o,batchDirty:i}),b&&!F.length&&j.length&&!$.length&&Ie.delete(e,{at:v,voids:o}),Ie.insertNodes(e,j,{at:T.current,match:Q=>ct.isElement(Q)&&I.isBlock(e,Q),mode:"lowest",voids:o,batchDirty:i}),Ie.insertNodes(e,$,{at:L.current,match:Q=>st.isText(Q)||I.isInline(e,Q),mode:"highest",voids:o,batchDirty:i}),!r.at){var _;if($.length>0&&L.current?_=oe.previous(L.current):j.length>0&&T.current?_=oe.previous(T.current):X.current&&(_=oe.previous(X.current)),_){var q=I.end(e,_);Ie.select(e,q)}}X.unref(),T.unref(),L.unref()}}})},cD=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{edge:r="anchor"}=t,{selection:n}=e;if(n){if(r==="anchor")Ie.select(e,n.anchor);else if(r==="focus")Ie.select(e,n.focus);else if(r==="start"){var[o]=Ee.edges(n);Ie.select(e,o)}else if(r==="end"){var[,a]=Ee.edges(n);Ie.select(e,a)}}else return},dD=e=>{var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},fD=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{selection:r}=e,{distance:n=1,unit:o="character",reverse:a=!1}=t,{edge:i=null}=t;if(r){i==="start"&&(i=Ee.isBackward(r)?"focus":"anchor"),i==="end"&&(i=Ee.isBackward(r)?"anchor":"focus");var{anchor:l,focus:s}=r,u={distance:n,unit:o,ignoreNonSelectable:!0},c={};if(i==null||i==="anchor"){var f=a?I.before(e,l,u):I.after(e,l,u);f&&(c.anchor=f)}if(i==null||i==="focus"){var p=a?I.before(e,s,u):I.after(e,s,u);p&&(c.focus=p)}Ie.setSelection(e,c)}},pD=(e,t)=>{var{selection:r}=e;if(t=I.range(e,t),r){Ie.setSelection(e,t);return}if(!Ee.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(Rr.stringify(t)));e.apply({type:"set_selection",properties:r,newProperties:t})};function vh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function bh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vh(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var mD=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{selection:n}=e,{edge:o="both"}=r;if(n){o==="start"&&(o=Ee.isBackward(n)?"focus":"anchor"),o==="end"&&(o=Ee.isBackward(n)?"anchor":"focus");var{anchor:a,focus:i}=n,l=o==="anchor"?a:i;Ie.setSelection(e,{[o==="anchor"?"anchor":"focus"]:bh(bh({},l),t)})}},hD=(e,t)=>{var{selection:r}=e,n={},o={};if(r){for(var a in t)(a==="anchor"&&t.anchor!=null&&!It.equals(t.anchor,r.anchor)||a==="focus"&&t.focus!=null&&!It.equals(t.focus,r.focus)||a!=="anchor"&&a!=="focus"&&t[a]!==r[a])&&(n[a]=r[a],o[a]=t[a]);Object.keys(n).length>0&&e.apply({type:"set_selection",properties:n,newProperties:o})}},gD=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};I.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:o=!1,mode:a="lowest",batchDirty:i=!0}=r,{at:l,match:s,select:u}=r;if(Ue.isNode(t)&&(t=[t]),t.length!==0){var[c]=t;if(l||(l=np(e),u!==!1&&(u=!0)),u==null&&(u=!1),Ee.isRange(l))if(n||(l=I.unhangRange(e,l,{voids:o})),Ee.isCollapsed(l))l=l.anchor;else{var[,f]=Ee.edges(l),p=I.pointRef(e,f);Ie.delete(e,{at:l}),l=p.unref()}if(It.isPoint(l)){s==null&&(st.isText(c)?s=F=>st.isText(F):e.isInline(c)?s=F=>st.isText(F)||I.isInline(e,F):s=F=>ct.isElement(F)&&I.isBlock(e,F));var[h]=I.nodes(e,{at:l.path,match:s,mode:a,voids:o});if(h){var[,v]=h,g=I.pathRef(e,v),m=I.isEnd(e,l,v);Ie.splitNodes(e,{at:l,match:s,mode:a,voids:o});var b=g.unref();l=m?oe.next(b):b}else return}var y=oe.parent(l),C=l[l.length-1];if(!(!o&&I.void(e,{at:y}))){if(i){var D=[],w=oe.levels(y);JE(e,()=>{var F=function(){var $=y.concat(C);C++;var P={type:"insert_node",path:$,node:j};e.apply(P),l=oe.next(l),D.push(P),st.isText?w.push(...Array.from(Ue.nodes(j),A=>{var[,O]=A;return $.concat(O)})):w.push($)};for(var j of t)F()},()=>{Wb(e,w,F=>{var j=F;for(var $ of D)if(oe.operationCanTransformPath($)&&(j=oe.transform(j,$),!j))return null;return j})})}else for(var k of t){var E=y.concat(C);C++,e.apply({type:"insert_node",path:E,node:k}),l=oe.next(l)}if(l=oe.previous(l),u){var x=I.end(e,l);x&&Ie.select(e,x)}}}})},vD=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};I.withoutNormalizing(e,()=>{var{at:r=e.selection,mode:n="lowest",voids:o=!1}=t,{match:a}=t;if(a==null&&(a=oe.isPath(r)?ti(e,r):C=>ct.isElement(C)&&I.isBlock(e,C)),!!r){var i=I.nodes(e,{at:r,match:a,mode:n,voids:o}),l=Array.from(i,C=>{var[,D]=C;return I.pathRef(e,D)});for(var s of l){var u=s.unref();if(u.length<2)throw new Error("Cannot lift node at a path [".concat(u,"] because it has a depth of less than `2`."));var c=I.node(e,oe.parent(u)),[f,p]=c,h=u[u.length-1],{length:v}=f.children;if(v===1){var g=oe.next(p);Ie.moveNodes(e,{at:u,to:g,voids:o}),Ie.removeNodes(e,{at:p,voids:o})}else if(h===0)Ie.moveNodes(e,{at:u,to:p,voids:o});else if(h===v-1){var m=oe.next(p);Ie.moveNodes(e,{at:u,to:m,voids:o})}else{var b=oe.next(u),y=oe.next(p);Ie.splitNodes(e,{at:b,voids:o}),Ie.moveNodes(e,{at:u,to:y,voids:o})}}}})},bD=["text"],yD=["children"],Kb=(e,t)=>{if(ct.isElement(t)){var r=t;return I.isVoid(e,t)?!0:r.children.length===1?Kb(e,r.children[0]):!1}else return!I.isEditor(t)},CD=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};I.withoutNormalizing(e,()=>{var{match:r,at:n=e.selection}=t,{hanging:o=!1,voids:a=!1,mode:i="lowest"}=t;if(n){if(r==null)if(oe.isPath(n)){var[l]=I.parent(e,n);r=F=>l.children.includes(F)}else r=F=>ct.isElement(F)&&I.isBlock(e,F);if(!o&&Ee.isRange(n)&&(n=I.unhangRange(e,n,{voids:a})),Ee.isRange(n))if(Ee.isCollapsed(n))n=n.anchor;else{var[,s]=Ee.edges(n),u=I.pointRef(e,s);Ie.delete(e,{at:n}),n=u.unref(),t.at==null&&Ie.select(e,n)}var[c]=I.nodes(e,{at:n,match:r,voids:a,mode:i}),f=I.previous(e,{at:n,match:r,voids:a,mode:i});if(!(!c||!f)){var[p,h]=c,[v,g]=f;if(!(h.length===0||g.length===0)){var m=oe.next(g),b=oe.common(h,g),y=oe.isSibling(h,g),C=Array.from(I.levels(e,{at:h}),F=>{var[j]=F;return j}).slice(b.length).slice(0,-1),D=I.above(e,{at:h,mode:"highest",match:F=>C.includes(F)&&Kb(e,F)}),w=D&&I.pathRef(e,D[1]),k,E;if(st.isText(p)&&st.isText(v)){var x=vo(p,bD);E=v.text.length,k=x}else if(ct.isElement(p)&&ct.isElement(v)){var x=vo(p,yD);E=v.children.length,k=x}else throw new Error("Cannot merge the node at path [".concat(h,"] with the previous sibling because it is not the same kind: ").concat(Rr.stringify(p)," ").concat(Rr.stringify(v)));y||Ie.moveNodes(e,{at:h,to:m,voids:a}),w&&Ie.removeNodes(e,{at:w.current,voids:a}),I.shouldMergeNodesRemovePrevNode(e,f,c)?Ie.removeNodes(e,{at:g,voids:a}):e.apply({type:"merge_node",path:m,position:E,properties:k}),w&&w.unref()}}}})},xD=(e,t)=>{I.withoutNormalizing(e,()=>{var{to:r,at:n=e.selection,mode:o="lowest",voids:a=!1}=t,{match:i}=t;if(n){i==null&&(i=oe.isPath(n)?ti(e,n):h=>ct.isElement(h)&&I.isBlock(e,h));var l=I.pathRef(e,r),s=I.nodes(e,{at:n,match:i,mode:o,voids:a}),u=Array.from(s,h=>{var[,v]=h;return I.pathRef(e,v)});for(var c of u){var f=c.unref(),p=l.current;f.length!==0&&e.apply({type:"move_node",path:f,newPath:p}),l.current&&oe.isSibling(p,f)&&oe.isAfter(p,f)&&(l.current=oe.next(l.current))}l.unref()}})},wD=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};I.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:n=!1,mode:o="lowest"}=t,{at:a=e.selection,match:i}=t;if(a){i==null&&(i=oe.isPath(a)?ti(e,a):p=>ct.isElement(p)&&I.isBlock(e,p)),!r&&Ee.isRange(a)&&(a=I.unhangRange(e,a,{voids:n}));var l=I.nodes(e,{at:a,match:i,mode:o,voids:n}),s=Array.from(l,p=>{var[,h]=p;return I.pathRef(e,h)});for(var u of s){var c=u.unref();if(c){var[f]=I.node(e,c);e.apply({type:"remove_node",path:c,node:f})}}}})},ED=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};I.withoutNormalizing(e,()=>{var{match:n,at:o=e.selection,compare:a,merge:i}=r,{hanging:l=!1,mode:s="lowest",split:u=!1,voids:c=!1}=r;if(o){if(n==null&&(n=oe.isPath(o)?ti(e,o):E=>ct.isElement(E)&&I.isBlock(e,E)),!l&&Ee.isRange(o)&&(o=I.unhangRange(e,o,{voids:c})),u&&Ee.isRange(o)){if(Ee.isCollapsed(o)&&I.leaf(e,o.anchor)[0].text.length>0)return;var f=I.rangeRef(e,o,{affinity:"inward"}),[p,h]=Ee.edges(o),v=s==="lowest"?"lowest":"highest",g=I.isEnd(e,h,h.path);Ie.splitNodes(e,{at:h,match:n,mode:v,voids:c,always:!g});var m=I.isStart(e,p,p.path);Ie.splitNodes(e,{at:p,match:n,mode:v,voids:c,always:!m}),o=f.unref(),r.at==null&&Ie.select(e,o)}a||(a=(E,x)=>E!==x);for(var[b,y]of I.nodes(e,{at:o,match:n,mode:s,voids:c})){var C={},D={};if(y.length!==0){var w=!1;for(var k in t)k==="children"||k==="text"||a(t[k],b[k])&&(w=!0,b.hasOwnProperty(k)&&(C[k]=b[k]),i?t[k]!=null&&(D[k]=i(b[k],t[k])):t[k]!=null&&(D[k]=t[k]));w&&e.apply({type:"set_node",path:y,properties:C,newProperties:D})}}}})},kD=(e,t)=>{if(Ee.isCollapsed(t))return t.anchor;var[,r]=Ee.edges(t),n=I.pointRef(e,r);return Ie.delete(e,{at:t}),n.unref()},DD=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};I.withoutNormalizing(e,()=>{var{mode:r="lowest",voids:n=!1}=t,{match:o,at:a=e.selection,height:i=0,always:l=!1}=t;if(o==null&&(o=N=>ct.isElement(N)&&I.isBlock(e,N)),Ee.isRange(a)&&(a=kD(e,a)),oe.isPath(a)){var s=a,u=I.point(e,s),[c]=I.parent(e,s);o=N=>N===c,i=u.path.length-s.length+1,a=u,l=!0}if(a){var f=I.pointRef(e,a,{affinity:"backward"}),p;try{var[h]=I.nodes(e,{at:a,match:o,mode:r,voids:n});if(!h)return;var v=I.void(e,{at:a,mode:"highest"}),g=0;if(!n&&v){var[m,b]=v;if(ct.isElement(m)&&e.isInline(m)){var y=I.after(e,b);if(!y){var C={text:""},D=oe.next(b);Ie.insertNodes(e,C,{at:D,voids:n}),y=I.point(e,D)}a=y,l=!0}var w=a.path.length-b.length;i=w+1,l=!0}p=I.pointRef(e,a);var k=a.path.length-i,[,E]=h,x=a.path.slice(0,k),F=i===0?a.offset:a.path[k]+g;for(var[j,$]of I.levels(e,{at:x,reverse:!0,voids:n})){var P=!1;if($.length<E.length||$.length===0||!n&&ct.isElement(j)&&I.isVoid(e,j))break;var A=f.current,O=I.isEnd(e,A,$);if(l||!f||!I.isEdge(e,A,$)){P=!0;var S=Ue.extractProps(j);e.apply({type:"split_node",path:$,position:F,properties:S})}F=$[$.length-1]+(P||O?1:0)}if(t.at==null){var B=p.current||I.end(e,[]);Ie.select(e,B)}}finally{var R;f.unref(),(R=p)===null||R===void 0||R.unref()}}})},SD=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Array.isArray(t)||(t=[t]);var n={};for(var o of t)n[o]=null;Ie.setNodes(e,n,r)},$D=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};I.withoutNormalizing(e,()=>{var{mode:r="lowest",split:n=!1,voids:o=!1}=t,{at:a=e.selection,match:i}=t;if(a){i==null&&(i=oe.isPath(a)?ti(e,a):p=>ct.isElement(p)&&I.isBlock(e,p)),oe.isPath(a)&&(a=I.range(e,a));var l=Ee.isRange(a)?I.rangeRef(e,a):null,s=I.nodes(e,{at:a,match:i,mode:r,voids:o}),u=Array.from(s,p=>{var[,h]=p;return I.pathRef(e,h)}).reverse(),c=function(){var p=f.unref(),[h]=I.node(e,p),v=I.range(e,p);n&&l&&(v=Ee.intersection(l.current,v)),Ie.liftNodes(e,{at:v,match:g=>ct.isAncestor(h)&&h.children.includes(g),voids:o})};for(var f of u)c();l&&l.unref()}})};function yh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ch(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yh(Object(r),!0).forEach(function(n){rn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yh(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var BD=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};I.withoutNormalizing(e,()=>{var{mode:n="lowest",split:o=!1,voids:a=!1}=r,{match:i,at:l=e.selection}=r;if(l){if(i==null&&(oe.isPath(l)?i=ti(e,l):e.isInline(t)?i=v=>ct.isElement(v)&&I.isInline(e,v)||st.isText(v):i=v=>ct.isElement(v)&&I.isBlock(e,v)),o&&Ee.isRange(l)){var[s,u]=Ee.edges(l),c=I.rangeRef(e,l,{affinity:"inward"});Ie.splitNodes(e,{at:u,match:i,voids:a}),Ie.splitNodes(e,{at:s,match:i,voids:a}),l=c.unref(),r.at==null&&Ie.select(e,l)}var f=Array.from(I.nodes(e,{at:l,match:e.isInline(t)?v=>ct.isElement(v)&&I.isBlock(e,v):v=>I.isEditor(v),mode:"lowest",voids:a})),p=function(){var v=Ee.isRange(l)?Ee.intersection(l,I.range(e,h)):l;if(!v)return 0;var g=Array.from(I.nodes(e,{at:v,match:i,mode:n,voids:a}));if(g.length>0){var[m]=g,b=g[g.length-1],[,y]=m,[,C]=b;if(y.length===0&&C.length===0)return 0;var D=oe.equals(y,C)?oe.parent(y):oe.common(y,C),w=I.range(e,y,C),k=I.node(e,D),[E]=k,x=D.length+1,F=oe.next(C.slice(0,x)),j=Ch(Ch({},t),{},{children:[]});Ie.insertNodes(e,j,{at:F,voids:a}),Ie.moveNodes(e,{at:w,match:$=>ct.isAncestor(E)&&E.children.includes($),to:F.concat(0),voids:a})}};for(var[,h]of f)p()}})},OD=()=>{var e={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return QE(e,...r)},addMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ak(e,...r)},deleteBackward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return sk(e,...r)},deleteForward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return uk(e,...r)},deleteFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ck(e,...r)},getFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return tk(e,...r)},insertBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return xk(e,...r)},insertSoftBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ek(e,...r)},insertFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return uD(e,...r)},insertNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return wk(e,...r)},insertText:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Dk(e,...r)},normalizeNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return rk(e,...r)},removeMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return tD(e,...r)},getDirtyPaths:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ek(e,...r)},shouldNormalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return nk(e,...r)},above:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ok(e,...r)},after:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ik(e,...r)},before:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return lk(e,...r)},collapse:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return cD(e,...r)},delete:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return sD(e,...r)},deselect:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return dD(e,...r)},edges:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return dk(e,...r)},elementReadOnly:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return fk(e,...r)},end:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return pk(e,...r)},first:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return mk(e,...r)},fragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return hk(e,...r)},getMarks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Tk(e,...r)},hasBlocks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return vk(e,...r)},hasInlines:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return bk(e,...r)},hasPath:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return yk(e,...r)},hasTexts:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ck(e,...r)},insertNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return gD(e,...r)},isBlock:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Sk(e,...r)},isEdge:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $k(e,...r)},isEmpty:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Bk(e,...r)},isEnd:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ok(e,...r)},isNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ak(e,...r)},isStart:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Fk(e,...r)},last:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Nk(e,...r)},leaf:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Pk(e,...r)},levels:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return jk(e,...r)},liftNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return vD(e,...r)},mergeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return CD(e,...r)},move:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return fD(e,...r)},moveNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return xD(e,...r)},next:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Mk(e,...r)},node:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return zk(e,...r)},nodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Lk(e,...r)},normalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _k(e,...r)},parent:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Hk(e,...r)},path:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return qk(e,...r)},pathRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Wk(e,...r)},pathRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Kk(e,...r)},point:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Xk(e,...r)},pointRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Vk(e,...r)},pointRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Uk(e,...r)},positions:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Gk(e,...r)},previous:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Yk(e,...r)},range:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Qk(e,...r)},rangeRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Zk(e,...r)},rangeRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Jk(e,...r)},removeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return wD(e,...r)},select:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return pD(e,...r)},setNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ED(e,...r)},setNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return rD(e,...r)},setPoint:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return mD(e,...r)},setSelection:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return hD(e,...r)},splitNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return DD(e,...r)},start:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return nD(e,...r)},string:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return oD(e,...r)},unhangRange:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return aD(e,...r)},unsetNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return SD(e,...r)},unwrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $D(e,...r)},void:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return gk(e,...r)},withoutNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return iD(e,...r)},wrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return BD(e,...r)},shouldMergeNodesRemovePrevNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return lD(e,...r)}};return e},Xu,xh;function AD(){if(xh)return Xu;xh=1,Xu=o;var e="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",t="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",r=new RegExp("^[^"+t+"]*["+e+"]"),n=new RegExp("^[^"+e+"]*["+t+"]");function o(a){return a=String(a||""),r.test(a)?"rtl":n.test(a)?"ltr":"neutral"}return Xu}var FD=AD();const qb=gl(FD);var Gu,wh;function ip(){if(wh)return Gu;wh=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return Gu=e,Gu}var Yu,Eh;function ND(){if(Eh)return Yu;Eh=1;var e=typeof Pl=="object"&&Pl&&Pl.Object===Object&&Pl;return Yu=e,Yu}var Zu,kh;function Vb(){if(kh)return Zu;kh=1;var e=ND(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return Zu=r,Zu}var Ju,Dh;function PD(){if(Dh)return Ju;Dh=1;var e=Vb(),t=function(){return e.Date.now()};return Ju=t,Ju}var Qu,Sh;function jD(){if(Sh)return Qu;Sh=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return Qu=t,Qu}var ec,$h;function RD(){if($h)return ec;$h=1;var e=jD(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return ec=r,ec}var tc,Bh;function Ub(){if(Bh)return tc;Bh=1;var e=Vb(),t=e.Symbol;return tc=t,tc}var rc,Oh;function ID(){if(Oh)return rc;Oh=1;var e=Ub(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,o=e?e.toStringTag:void 0;function a(i){var l=r.call(i,o),s=i[o];try{i[o]=void 0;var u=!0}catch{}var c=n.call(i);return u&&(l?i[o]=s:delete i[o]),c}return rc=a,rc}var nc,Ah;function TD(){if(Ah)return nc;Ah=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return nc=r,nc}var oc,Fh;function MD(){if(Fh)return oc;Fh=1;var e=Ub(),t=ID(),r=TD(),n="[object Null]",o="[object Undefined]",a=e?e.toStringTag:void 0;function i(l){return l==null?l===void 0?o:n:a&&a in Object(l)?t(l):r(l)}return oc=i,oc}var ac,Nh;function zD(){if(Nh)return ac;Nh=1;function e(t){return t!=null&&typeof t=="object"}return ac=e,ac}var ic,Ph;function LD(){if(Ph)return ic;Ph=1;var e=MD(),t=zD(),r="[object Symbol]";function n(o){return typeof o=="symbol"||t(o)&&e(o)==r}return ic=n,ic}var lc,jh;function _D(){if(jh)return lc;jh=1;var e=RD(),t=ip(),r=LD(),n=NaN,o=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,i=/^0o[0-7]+$/i,l=parseInt;function s(u){if(typeof u=="number")return u;if(r(u))return n;if(t(u)){var c=typeof u.valueOf=="function"?u.valueOf():u;u=t(c)?c+"":c}if(typeof u!="string")return u===0?u:+u;u=e(u);var f=a.test(u);return f||i.test(u)?l(u.slice(2),f?2:8):o.test(u)?n:+u}return lc=s,lc}var sc,Rh;function Xb(){if(Rh)return sc;Rh=1;var e=ip(),t=PD(),r=_D(),n="Expected a function",o=Math.max,a=Math.min;function i(l,s,u){var c,f,p,h,v,g,m=0,b=!1,y=!1,C=!0;if(typeof l!="function")throw new TypeError(n);s=r(s)||0,e(u)&&(b=!!u.leading,y="maxWait"in u,p=y?o(r(u.maxWait)||0,s):p,C="trailing"in u?!!u.trailing:C);function D(A){var O=c,S=f;return c=f=void 0,m=A,h=l.apply(S,O),h}function w(A){return m=A,v=setTimeout(x,s),b?D(A):h}function k(A){var O=A-g,S=A-m,B=s-O;return y?a(B,p-S):B}function E(A){var O=A-g,S=A-m;return g===void 0||O>=s||O<0||y&&S>=p}function x(){var A=t();if(E(A))return F(A);v=setTimeout(x,k(A))}function F(A){return v=void 0,C&&c?D(A):(c=f=void 0,h)}function j(){v!==void 0&&clearTimeout(v),m=0,c=g=f=v=void 0}function $(){return v===void 0?h:F(t())}function P(){var A=t(),O=E(A);if(c=arguments,f=this,g=A,O){if(v===void 0)return w(g);if(y)return clearTimeout(v),v=setTimeout(x,s),D(g)}return v===void 0&&(v=setTimeout(x,s)),h}return P.cancel=j,P.flush=$,P}return sc=i,sc}var HD=Xb();const WD=gl(HD);var uc,Ih;function KD(){if(Ih)return uc;Ih=1;var e=Xb(),t=ip(),r="Expected a function";function n(o,a,i){var l=!0,s=!0;if(typeof o!="function")throw new TypeError(r);return t(i)&&(l="leading"in i?!!i.leading:l,s="trailing"in i?!!i.trailing:s),e(o,a,{leading:l,maxWait:a,trailing:s})}return uc=n,uc}var qD=KD();const VD=gl(qD),Th=e=>typeof e=="object"&&e!=null&&e.nodeType===1,Mh=(e,t)=>(!t||e!=="hidden")&&e!=="visible"&&e!=="clip",Rl=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return Mh(r.overflowY,t)||Mh(r.overflowX,t)||(n=>{const o=(a=>{if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!o&&(o.clientHeight<n.scrollHeight||o.clientWidth<n.scrollWidth)})(e)}return!1},Il=(e,t,r,n,o,a,i,l)=>a<e&&i>t||a>e&&i<t?0:a<=e&&l<=r||i>=t&&l>=r?a-e-n:i>t&&l<r||a<e&&l>r?i-t+o:0,UD=e=>e.parentElement??(e.getRootNode().host||null),zh=(e,t)=>{var r,n,o,a;if(typeof document>"u")return[];const{scrollMode:i,block:l,inline:s,boundary:u,skipOverflowHiddenElements:c}=t,f=typeof u=="function"?u:B=>B!==u;if(!Th(e))throw new TypeError("Invalid target");const p=document.scrollingElement||document.documentElement,h=[];let v=e;for(;Th(v)&&f(v);){if(v=UD(v),v===p){h.push(v);break}v!=null&&v===document.body&&Rl(v)&&!Rl(document.documentElement)||v!=null&&Rl(v,c)&&h.push(v)}const g=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,m=(a=(o=window.visualViewport)==null?void 0:o.height)!=null?a:innerHeight,{scrollX:b,scrollY:y}=window,{height:C,width:D,top:w,right:k,bottom:E,left:x}=e.getBoundingClientRect(),{top:F,right:j,bottom:$,left:P}=(B=>{const R=window.getComputedStyle(B);return{top:parseFloat(R.scrollMarginTop)||0,right:parseFloat(R.scrollMarginRight)||0,bottom:parseFloat(R.scrollMarginBottom)||0,left:parseFloat(R.scrollMarginLeft)||0}})(e);let A=l==="start"||l==="nearest"?w-F:l==="end"?E+$:w+C/2-F+$,O=s==="center"?x+D/2-P+j:s==="end"?k+j:x-P;const S=[];for(let B=0;B<h.length;B++){const R=h[B],{height:N,width:T,top:L,right:X,bottom:_,left:q}=R.getBoundingClientRect();if(i==="if-needed"&&w>=0&&x>=0&&E<=m&&k<=g&&(R===p&&!Rl(R)||w>=L&&E<=_&&x>=q&&k<=X))return S;const Q=getComputedStyle(R),te=parseInt(Q.borderLeftWidth,10),z=parseInt(Q.borderTopWidth,10),Y=parseInt(Q.borderRightWidth,10),V=parseInt(Q.borderBottomWidth,10);let G=0,K=0;const W="offsetWidth"in R?R.offsetWidth-R.clientWidth-te-Y:0,re="offsetHeight"in R?R.offsetHeight-R.clientHeight-z-V:0,U="offsetWidth"in R?R.offsetWidth===0?0:T/R.offsetWidth:0,J="offsetHeight"in R?R.offsetHeight===0?0:N/R.offsetHeight:0;if(p===R)G=l==="start"?A:l==="end"?A-m:l==="nearest"?Il(y,y+m,m,z,V,y+A,y+A+C,C):A-m/2,K=s==="start"?O:s==="center"?O-g/2:s==="end"?O-g:Il(b,b+g,g,te,Y,b+O,b+O+D,D),G=Math.max(0,G+y),K=Math.max(0,K+b);else{G=l==="start"?A-L-z:l==="end"?A-_+V+re:l==="nearest"?Il(L,_,N,z,V+re,A,A+C,C):A-(L+N/2)+re/2,K=s==="start"?O-q-te:s==="center"?O-(q+T/2)+W/2:s==="end"?O-X+Y+W:Il(q,X,T,te,Y+W,O,O+D,D);const{scrollLeft:ne,scrollTop:ue}=R;G=J===0?0:Math.max(0,Math.min(ue+G/J,R.scrollHeight-N/J+re)),K=U===0?0:Math.max(0,Math.min(ne+K/U,R.scrollWidth-T/U+W)),A+=ue-G,O+=ne-K}S.push({el:R,top:G,left:K})}return S},XD=e=>e===!1?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&Object.keys(t).length!==0)(e)?e:{block:"start",inline:"nearest"};function GD(e,t){if(!e.isConnected||!(o=>{let a=o;for(;a&&a.parentNode;){if(a.parentNode===document)return!0;a=a.parentNode instanceof ShadowRoot?a.parentNode.host:a.parentNode}return!1})(e))return;const r=(o=>{const a=window.getComputedStyle(o);return{top:parseFloat(a.scrollMarginTop)||0,right:parseFloat(a.scrollMarginRight)||0,bottom:parseFloat(a.scrollMarginBottom)||0,left:parseFloat(a.scrollMarginLeft)||0}})(e);if((o=>typeof o=="object"&&typeof o.behavior=="function")(t))return t.behavior(zh(e,t));const n=typeof t=="boolean"||t==null?void 0:t.behavior;for(const{el:o,top:a,left:i}of zh(e,XD(t))){const l=a-r.top+r.bottom,s=i-r.left+r.right;o.scroll({top:l,left:s,behavior:n})}}var Vo=[],YD=function(){return Vo.some(function(e){return e.activeTargets.length>0})},ZD=function(){return Vo.some(function(e){return e.skippedTargets.length>0})},Lh="ResizeObserver loop completed with undelivered notifications.",JD=function(){var e;typeof ErrorEvent=="function"?e=new ErrorEvent("error",{message:Lh}):(e=document.createEvent("Event"),e.initEvent("error",!1,!1),e.message=Lh),window.dispatchEvent(e)},Vi;(function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(Vi||(Vi={}));var Uo=function(e){return Object.freeze(e)},QD=(function(){function e(t,r){this.inlineSize=t,this.blockSize=r,Uo(this)}return e})(),Gb=(function(){function e(t,r,n,o){return this.x=t,this.y=r,this.width=n,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Uo(this)}return e.prototype.toJSON=function(){var t=this,r=t.x,n=t.y,o=t.top,a=t.right,i=t.bottom,l=t.left,s=t.width,u=t.height;return{x:r,y:n,top:o,right:a,bottom:i,left:l,width:s,height:u}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e})(),lp=function(e){return e instanceof SVGElement&&"getBBox"in e},Yb=function(e){if(lp(e)){var t=e.getBBox(),r=t.width,n=t.height;return!r&&!n}var o=e,a=o.offsetWidth,i=o.offsetHeight;return!(a||i||e.getClientRects().length)},_h=function(e){var t;if(e instanceof Element)return!0;var r=(t=e==null?void 0:e.ownerDocument)===null||t===void 0?void 0:t.defaultView;return!!(r&&e instanceof r.Element)},eS=function(e){switch(e.tagName){case"INPUT":if(e.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},Fi=typeof window<"u"?window:{},Tl=new WeakMap,Hh=/auto|scroll/,tS=/^tb|vertical/,rS=/msie|trident/i.test(Fi.navigator&&Fi.navigator.userAgent),Kn=function(e){return parseFloat(e||"0")},Aa=function(e,t,r){return e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=!1),new QD((r?t:e)||0,(r?e:t)||0)},Wh=Uo({devicePixelContentBoxSize:Aa(),borderBoxSize:Aa(),contentBoxSize:Aa(),contentRect:new Gb(0,0,0,0)}),Zb=function(e,t){if(t===void 0&&(t=!1),Tl.has(e)&&!t)return Tl.get(e);if(Yb(e))return Tl.set(e,Wh),Wh;var r=getComputedStyle(e),n=lp(e)&&e.ownerSVGElement&&e.getBBox(),o=!rS&&r.boxSizing==="border-box",a=tS.test(r.writingMode||""),i=!n&&Hh.test(r.overflowY||""),l=!n&&Hh.test(r.overflowX||""),s=n?0:Kn(r.paddingTop),u=n?0:Kn(r.paddingRight),c=n?0:Kn(r.paddingBottom),f=n?0:Kn(r.paddingLeft),p=n?0:Kn(r.borderTopWidth),h=n?0:Kn(r.borderRightWidth),v=n?0:Kn(r.borderBottomWidth),g=n?0:Kn(r.borderLeftWidth),m=f+u,b=s+c,y=g+h,C=p+v,D=l?e.offsetHeight-C-e.clientHeight:0,w=i?e.offsetWidth-y-e.clientWidth:0,k=o?m+y:0,E=o?b+C:0,x=n?n.width:Kn(r.width)-k-w,F=n?n.height:Kn(r.height)-E-D,j=x+m+w+y,$=F+b+D+C,P=Uo({devicePixelContentBoxSize:Aa(Math.round(x*devicePixelRatio),Math.round(F*devicePixelRatio),a),borderBoxSize:Aa(j,$,a),contentBoxSize:Aa(x,F,a),contentRect:new Gb(f,s,x,F)});return Tl.set(e,P),P},Jb=function(e,t,r){var n=Zb(e,r),o=n.borderBoxSize,a=n.contentBoxSize,i=n.devicePixelContentBoxSize;switch(t){case Vi.DEVICE_PIXEL_CONTENT_BOX:return i;case Vi.BORDER_BOX:return o;default:return a}},nS=(function(){function e(t){var r=Zb(t);this.target=t,this.contentRect=r.contentRect,this.borderBoxSize=Uo([r.borderBoxSize]),this.contentBoxSize=Uo([r.contentBoxSize]),this.devicePixelContentBoxSize=Uo([r.devicePixelContentBoxSize])}return e})(),Qb=function(e){if(Yb(e))return 1/0;for(var t=0,r=e.parentNode;r;)t+=1,r=r.parentNode;return t},oS=function(){var e=1/0,t=[];Vo.forEach(function(a){if(a.activeTargets.length!==0){var i=[];a.activeTargets.forEach(function(l){var s=new nS(l.target),u=Qb(l.target);i.push(s),l.lastReportedSize=Jb(l.target,l.observedBox),u<e&&(e=u)}),t.push(function(){a.callback.call(a.observer,i,a.observer)}),a.activeTargets.splice(0,a.activeTargets.length)}});for(var r=0,n=t;r<n.length;r++){var o=n[r];o()}return e},Kh=function(e){Vo.forEach(function(t){t.activeTargets.splice(0,t.activeTargets.length),t.skippedTargets.splice(0,t.skippedTargets.length),t.observationTargets.forEach(function(r){r.isActive()&&(Qb(r.target)>e?t.activeTargets.push(r):t.skippedTargets.push(r))})})},aS=function(){var e=0;for(Kh(e);YD();)e=oS(),Kh(e);return ZD()&&JD(),e>0},cc,ey=[],iS=function(){return ey.splice(0).forEach(function(e){return e()})},lS=function(e){if(!cc){var t=0,r=document.createTextNode(""),n={characterData:!0};new MutationObserver(function(){return iS()}).observe(r,n),cc=function(){r.textContent="".concat(t?t--:t++)}}ey.push(e),cc()},sS=function(e){lS(function(){requestAnimationFrame(e)})},es=0,uS=function(){return!!es},cS=250,dS={attributes:!0,characterData:!0,childList:!0,subtree:!0},qh=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Vh=function(e){return e===void 0&&(e=0),Date.now()+e},dc=!1,fS=(function(){function e(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return e.prototype.run=function(t){var r=this;if(t===void 0&&(t=cS),!dc){dc=!0;var n=Vh(t);sS(function(){var o=!1;try{o=aS()}finally{if(dc=!1,t=n-Vh(),!uS())return;o?r.run(1e3):t>0?r.run(t):r.start()}})}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var t=this,r=function(){return t.observer&&t.observer.observe(document.body,dS)};document.body?r():Fi.addEventListener("DOMContentLoaded",r)},e.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),qh.forEach(function(r){return Fi.addEventListener(r,t.listener,!0)}))},e.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),qh.forEach(function(r){return Fi.removeEventListener(r,t.listener,!0)}),this.stopped=!0)},e})(),gd=new fS,Uh=function(e){!es&&e>0&&gd.start(),es+=e,!es&&gd.stop()},pS=function(e){return!lp(e)&&!eS(e)&&getComputedStyle(e).display==="inline"},mS=(function(){function e(t,r){this.target=t,this.observedBox=r||Vi.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var t=Jb(this.target,this.observedBox,!0);return pS(this.target)&&(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e})(),hS=(function(){function e(t,r){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=r}return e})(),Ml=new WeakMap,Xh=function(e,t){for(var r=0;r<e.length;r+=1)if(e[r].target===t)return r;return-1},zl=(function(){function e(){}return e.connect=function(t,r){var n=new hS(t,r);Ml.set(t,n)},e.observe=function(t,r,n){var o=Ml.get(t),a=o.observationTargets.length===0;Xh(o.observationTargets,r)<0&&(a&&Vo.push(o),o.observationTargets.push(new mS(r,n&&n.box)),Uh(1),gd.schedule())},e.unobserve=function(t,r){var n=Ml.get(t),o=Xh(n.observationTargets,r),a=n.observationTargets.length===1;o>=0&&(a&&Vo.splice(Vo.indexOf(n),1),n.observationTargets.splice(o,1),Uh(-1))},e.disconnect=function(t){var r=this,n=Ml.get(t);n.observationTargets.slice().forEach(function(o){return r.unobserve(t,o.target)}),n.activeTargets.splice(0,n.activeTargets.length)},e})(),gS=(function(){function e(t){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof t!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");zl.connect(this,t)}return e.prototype.observe=function(t,r){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!_h(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");zl.observe(this,t,r)},e.prototype.unobserve=function(t){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!_h(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");zl.unobserve(this,t)},e.prototype.disconnect=function(){zl.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e})(),Pn={},Gh;function vS(){if(Gh)return Pn;Gh=1,Object.defineProperty(Pn,"__esModule",{value:!0});for(var e=typeof window<"u"&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},r={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:e?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},n={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=1;o<20;o++)n["f"+o]=111+o;function a(p,h,v){h&&!("byKey"in h)&&(v=h,h=null),Array.isArray(p)||(p=[p]);var g=p.map(function(y){return s(y,h)}),m=function(y){return g.some(function(C){return u(C,y)})},b=v==null?m:m(v);return b}function i(p,h){return a(p,h)}function l(p,h){return a(p,{byKey:!0},h)}function s(p,h){var v=h&&h.byKey,g={};p=p.replace("++","+add");var m=p.split("+"),b=m.length;for(var y in t)g[t[y]]=!1;var C=!0,D=!1,w=void 0;try{for(var k=m[Symbol.iterator](),E;!(C=(E=k.next()).done);C=!0){var x=E.value,F=x.endsWith("?")&&x.length>1;F&&(x=x.slice(0,-1));var j=f(x),$=t[j];if(x.length>1&&!$&&!r[x]&&!n[j])throw new TypeError('Unknown modifier: "'+x+'"');(b===1||!$)&&(v?g.key=j:g.which=c(x)),$&&(g[$]=F?null:!0)}}catch(P){D=!0,w=P}finally{try{!C&&k.return&&k.return()}finally{if(D)throw w}}return g}function u(p,h){for(var v in p){var g=p[v],m=void 0;if(g!=null&&(v==="key"&&h.key!=null?m=h.key.toLowerCase():v==="which"?m=g===91&&h.which===93?91:h.which:m=h[v],!(m==null&&g===!1)&&m!==g))return!1}return!0}function c(p){p=f(p);var h=n[p]||p.toUpperCase().charCodeAt(0);return h}function f(p){return p=p.toLowerCase(),p=r[p]||p,p}return Pn.default=a,Pn.isHotkey=a,Pn.isCodeHotkey=i,Pn.isKeyHotkey=l,Pn.parseHotkey=s,Pn.compareHotkey=u,Pn.toKeyCode=c,Pn.toKeyName=f,Pn}var fc=vS();function bS(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function Ta(e,t){if(e==null)return{};var r=bS(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ui(e){"@babel/helpers - typeof";return Ui=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ui(e)}function yS(e,t){if(Ui(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ui(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function CS(e){var t=yS(e,"string");return Ui(t)==="symbol"?t:String(t)}function Bn(e,t,r){return t=CS(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var sp=Fn(null),Ro=()=>{var e=Ir(sp);if(!e)throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");return e},pc,mc,ty=parseInt(ee.version.split(".")[0],10),ry=typeof navigator<"u"&&typeof window<"u"&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Yh=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),en=typeof navigator<"u"&&/Android/.test(navigator.userAgent),Da=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),_o=typeof navigator<"u"&&/AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent),xS=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),ny=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent),wS=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),ES=en&&typeof navigator<"u"&&/Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent),kS=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent),DS=typeof navigator<"u"&&/.*UCBrowser/.test(navigator.userAgent),SS=typeof navigator<"u"&&/.*Wechat/.test(navigator.userAgent)&&!/.*MacWechat/.test(navigator.userAgent),ts=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&/Version\/(\d+)/.test(navigator.userAgent)&&(pc=navigator.userAgent.match(/Version\/(\d+)/))!==null&&pc!==void 0&&pc[1]&&parseInt((mc=navigator.userAgent.match(/Version\/(\d+)/))===null||mc===void 0?void 0:mc[1],10)<17;var Co=(!wS||!ES)&&!xS&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",Fa=new WeakMap,up=new WeakMap,cp=new WeakMap,oy=new WeakMap,rs=new WeakMap,vd=new WeakMap,Xi=new WeakMap,Xo=new WeakMap,$s=new WeakMap,ou=new WeakMap,bd=new WeakMap,$o=new WeakMap,Wo=new WeakMap,Ni=new WeakMap,yd=new WeakMap,dp=new WeakMap,Tn=new WeakMap,po=new WeakMap,sn=new WeakMap,Do=new WeakMap,So=new WeakMap,ay=new WeakMap,Ma=Symbol("placeholder"),iy=Symbol("mark-placeholder"),ly=globalThis.Node,$S=globalThis.Text,fp=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView||null,BS=e=>Fo(e)&&e.nodeType===8,$n=e=>Fo(e)&&e.nodeType===1,Fo=e=>{var t=fp(e);return!!t&&e instanceof t.Node},Cd=e=>{var t=e&&e.anchorNode&&fp(e.anchorNode);return!!t&&e instanceof t.Selection},sy=e=>Fo(e)&&e.nodeType===3,OS=e=>e.clipboardData&&e.clipboardData.getData("text/plain")!==""&&e.clipboardData.types.length===1,AS=e=>{var[t,r]=e;if($n(t)&&t.childNodes.length){var n=r===t.childNodes.length,o=n?r-1:r;for([t,o]=uy(t,o,n?"backward":"forward"),n=o<r;$n(t)&&t.childNodes.length;){var a=n?t.childNodes.length-1:0;t=NS(t,a,n?"backward":"forward")}r=n&&t.textContent!=null?t.textContent.length:0}return[t,r]},FS=e=>{for(var t=e&&e.parentNode;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1},uy=(e,t,r)=>{for(var{childNodes:n}=e,o=n[t],a=t,i=!1,l=!1;(BS(o)||$n(o)&&o.childNodes.length===0||$n(o)&&o.getAttribute("contenteditable")==="false")&&!(i&&l);){if(a>=n.length){i=!0,a=t-1,r="backward";continue}if(a<0){l=!0,a=t+1,r="forward";continue}o=n[a],t=a,a+=r==="forward"?1:-1}return[o,t]},NS=(e,t,r)=>{var[n]=uy(e,t,r);return n},cy=e=>{var t="";if(sy(e)&&e.nodeValue)return e.nodeValue;if($n(e)){for(var r of Array.from(e.childNodes))t+=cy(r);var n=getComputedStyle(e).getPropertyValue("display");(n==="block"||n==="list"||e.tagName==="BR")&&(t+=`
|
|
15
|
+
`)}return t},PS=/data-slate-fragment="(.+?)"/m,jS=e=>{var t=e.getData("text/html"),[,r]=t.match(PS)||[];return r},Pi=e=>e.getSelection!=null?e.getSelection():document.getSelection(),pp=(e,t,r)=>{var{target:n}=t;if($n(n)&&n.matches('[contentEditable="false"]'))return!1;var{document:o}=$e.getWindow(e);if(o.contains(n))return $e.hasDOMNode(e,n,{editable:!0});var a=r.find(i=>{var{addedNodes:l,removedNodes:s}=i;for(var u of l)if(u===n||u.contains(n))return!0;for(var c of s)if(c===n||c.contains(n))return!0});return!a||a===t?!1:pp(e,a,r)},RS=()=>{for(var e=document.activeElement;(t=e)!==null&&t!==void 0&&t.shadowRoot&&(r=e.shadowRoot)!==null&&r!==void 0&&r.activeElement;){var t,r,n;e=(n=e)===null||n===void 0||(n=n.shadowRoot)===null||n===void 0?void 0:n.activeElement}return e},Zh=(e,t)=>!!(e.compareDocumentPosition(t)&ly.DOCUMENT_POSITION_PRECEDING),IS=(e,t)=>!!(e.compareDocumentPosition(t)&ly.DOCUMENT_POSITION_FOLLOWING),TS=0;class MS{constructor(){Bn(this,"id",void 0),this.id="".concat(TS++)}}var $e={androidPendingDiffs:e=>sn.get(e),androidScheduleFlush:e=>{var t;(t=dp.get(e))===null||t===void 0||t()},blur:e=>{var t=$e.toDOMNode(e,e),r=$e.findDocumentOrShadowRoot(e);$o.set(e,!1),r.activeElement===t&&t.blur()},deselect:e=>{var{selection:t}=e,r=$e.findDocumentOrShadowRoot(e),n=Pi(r);n&&n.rangeCount>0&&n.removeAllRanges(),t&&Ie.deselect(e)},findDocumentOrShadowRoot:e=>{var t=$e.toDOMNode(e,e),r=t.getRootNode();return r instanceof Document||r instanceof ShadowRoot?r:t.ownerDocument},findEventRange:(e,t)=>{"nativeEvent"in t&&(t=t.nativeEvent);var{clientX:r,clientY:n,target:o}=t;if(r==null||n==null)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var a=$e.toSlateNode(e,t.target),i=$e.findPath(e,a);if(ct.isElement(a)&&I.isVoid(e,a)){var l=o.getBoundingClientRect(),s=e.isInline(a)?r-l.left<l.left+l.width-r:n-l.top<l.top+l.height-n,u=I.point(e,i,{edge:s?"start":"end"}),c=s?I.before(e,u):I.after(e,u);if(c){var f=I.range(e,c);return f}}var p,{document:h}=$e.getWindow(e);if(h.caretRangeFromPoint)p=h.caretRangeFromPoint(r,n);else{var v=h.caretPositionFromPoint(r,n);v&&(p=h.createRange(),p.setStart(v.offsetNode,v.offset),p.setEnd(v.offsetNode,v.offset))}if(!p)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var g=$e.toSlateRange(e,p,{exactMatch:!1,suppressThrow:!1});return g},findKey:(e,t)=>{var r=$s.get(t);return r||(r=new MS,$s.set(t,r)),r},findPath:(e,t)=>{for(var r=[],n=t;;){var o=cp.get(n);if(o==null){if(I.isEditor(n))return r;break}var a=up.get(n);if(a==null)break;r.unshift(a),n=o}throw new Error("Unable to find the path for Slate node: ".concat(Rr.stringify(t)))},focus:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{retries:5};if(!$o.get(e)){if(t.retries<=0)throw new Error("Could not set focus, editor seems stuck with pending operations");if(e.operations.length>0){setTimeout(()=>{$e.focus(e,{retries:t.retries-1})},10);return}var r=$e.toDOMNode(e,e),n=$e.findDocumentOrShadowRoot(e);if(n.activeElement!==r){if(e.selection&&n instanceof Document){var o=Pi(n),a=$e.toDOMRange(e,e.selection);o==null||o.removeAllRanges(),o==null||o.addRange(a)}e.selection||Ie.select(e,I.start(e,[])),$o.set(e,!0),r.focus({preventScroll:!0})}}},getWindow:e=>{var t=oy.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},hasDOMNode:function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{editable:n=!1}=r,o=$e.toDOMNode(e,e),a;try{a=$n(t)?t:t.parentElement}catch(i){if(i instanceof Error&&!i.message.includes('Permission denied to access property "nodeType"'))throw i}return a?a.closest("[data-slate-editor]")===o&&(!n||a.isContentEditable?!0:typeof a.isContentEditable=="boolean"&&a.closest('[contenteditable="false"]')===o||!!a.getAttribute("data-slate-zero-width")):!1},hasEditableTarget:(e,t)=>Fo(t)&&$e.hasDOMNode(e,t,{editable:!0}),hasRange:(e,t)=>{var{anchor:r,focus:n}=t;return I.hasPath(e,r.path)&&I.hasPath(e,n.path)},hasSelectableTarget:(e,t)=>$e.hasEditableTarget(e,t)||$e.isTargetInsideNonReadonlyVoid(e,t),hasTarget:(e,t)=>Fo(t)&&$e.hasDOMNode(e,t),insertData:(e,t)=>{e.insertData(t)},insertFragmentData:(e,t)=>e.insertFragmentData(t),insertTextData:(e,t)=>e.insertTextData(t),isComposing:e=>!!Wo.get(e),isFocused:e=>!!$o.get(e),isReadOnly:e=>!!bd.get(e),isTargetInsideNonReadonlyVoid:(e,t)=>{if(bd.get(e))return!1;var r=$e.hasTarget(e,t)&&$e.toSlateNode(e,t);return ct.isElement(r)&&I.isVoid(e,r)},setFragmentData:(e,t,r)=>e.setFragmentData(t,r),toDOMNode:(e,t)=>{var r=ou.get(e),n=I.isEditor(t)?rs.get(e):r==null?void 0:r.get($e.findKey(e,t));if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(Rr.stringify(t)));return n},toDOMPoint:(e,t)=>{var[r]=I.node(e,t.path),n=$e.toDOMNode(e,r),o;I.void(e,{at:t})&&(t={path:t.path,offset:0});for(var a="[data-slate-string], [data-slate-zero-width]",i=Array.from(n.querySelectorAll(a)),l=0,s=0;s<i.length;s++){var u=i[s],c=u.childNodes[0];if(!(c==null||c.textContent==null)){var{length:f}=c.textContent,p=u.getAttribute("data-slate-length"),h=p==null?f:parseInt(p,10),v=l+h,g=i[s+1];if(t.offset===v&&g!==null&&g!==void 0&&g.hasAttribute("data-slate-mark-placeholder")){var m,b=g.childNodes[0];o=[b instanceof $S?b:g,(m=g.textContent)!==null&&m!==void 0&&m.startsWith("\uFEFF")?1:0];break}if(t.offset<=v){var y=Math.min(f,Math.max(0,t.offset-l));o=[c,y];break}l=v}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(Rr.stringify(t)));return o},toDOMRange:(e,t)=>{var{anchor:r,focus:n}=t,o=Ee.isBackward(t),a=$e.toDOMPoint(e,r),i=Ee.isCollapsed(t)?a:$e.toDOMPoint(e,n),l=$e.getWindow(e),s=l.document.createRange(),[u,c]=o?i:a,[f,p]=o?a:i,h=$n(u)?u:u.parentElement,v=!!h.getAttribute("data-slate-zero-width"),g=$n(f)?f:f.parentElement,m=!!g.getAttribute("data-slate-zero-width");return s.setStart(u,v?1:c),s.setEnd(f,m?1:p),s},toSlateNode:(e,t)=>{var r=$n(t)?t:t.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?Xi.get(r):null;if(!n)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(r));return n},toSlatePoint:(e,t,r)=>{var{exactMatch:n,suppressThrow:o,searchDirection:a="backward"}=r,[i,l]=n?t:AS(t),s=i.parentNode,u=null,c=0;if(s){var f,p,h=$e.toDOMNode(e,e),v=s.closest('[data-slate-void="true"]'),g=v&&h.contains(v)?v:null,m=s.closest('[contenteditable="false"]'),b=m&&h.contains(m)?m:null,y=s.closest("[data-slate-leaf]"),C=null;if(y){if(u=y.closest('[data-slate-node="text"]'),u){var D=$e.getWindow(e),w=D.document.createRange();w.setStart(u,0),w.setEnd(i,l);var k=w.cloneContents(),E=[...Array.prototype.slice.call(k.querySelectorAll("[data-slate-zero-width]")),...Array.prototype.slice.call(k.querySelectorAll("[contenteditable=false]"))];E.forEach(q=>{if(en&&!n&&q.hasAttribute("data-slate-zero-width")&&q.textContent.length>0&&q.textContext!=="\uFEFF"){q.textContent.startsWith("\uFEFF")&&(q.textContent=q.textContent.slice(1));return}q.parentNode.removeChild(q)}),c=k.textContent.length,C=u}}else if(g){for(var x=g.querySelectorAll("[data-slate-leaf]"),F=0;F<x.length;F++){var j=x[F];if($e.hasDOMNode(e,j)){y=j;break}}y?(u=y.closest('[data-slate-node="text"]'),C=y,c=C.textContent.length,C.querySelectorAll("[data-slate-zero-width]").forEach(q=>{c-=q.textContent.length})):c=1}else if(b){var $=q=>q?q.querySelectorAll("[data-slate-leaf]:not(:scope [data-slate-editor] [data-slate-leaf])"):[],P=b.closest('[data-slate-node="element"]');if(a==="forward"){var A,O=[...$(P),...$(P==null?void 0:P.nextElementSibling)];y=(A=O.find(q=>IS(b,q)))!==null&&A!==void 0?A:null}else{var S,B=[...$(P==null?void 0:P.previousElementSibling),...$(P)];y=(S=B.findLast(q=>Zh(b,q)))!==null&&S!==void 0?S:null}y&&(u=y.closest('[data-slate-node="text"]'),C=y,a==="forward"?c=0:(c=C.textContent.length,C.querySelectorAll("[data-slate-zero-width]").forEach(q=>{c-=q.textContent.length})))}C&&c===C.textContent.length&&en&&C.getAttribute("data-slate-zero-width")==="z"&&(f=C.textContent)!==null&&f!==void 0&&f.startsWith("\uFEFF")&&(s.hasAttribute("data-slate-zero-width")||Da&&(p=C.textContent)!==null&&p!==void 0&&p.endsWith(`
|
|
16
|
+
|
|
17
|
+
`))&&c--}if(en&&!u&&!n){var R=s.hasAttribute("data-slate-node")?s:s.closest("[data-slate-node]");if(R&&$e.hasDOMNode(e,R,{editable:!0})){var N=$e.toSlateNode(e,R),{path:T,offset:L}=I.start(e,$e.findPath(e,N));return R.querySelector("[data-slate-leaf]")||(L=l),{path:T,offset:L}}}if(!u){if(o)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var X=$e.toSlateNode(e,u),_=$e.findPath(e,X);return{path:_,offset:c}},toSlateRange:(e,t,r)=>{var n,{exactMatch:o,suppressThrow:a}=r,i=Cd(t)?t.anchorNode:t.startContainer,l,s,u,c,f;if(i)if(Cd(t)){if(Da&&t.rangeCount>1){u=t.focusNode;var p=t.getRangeAt(0),h=t.getRangeAt(t.rangeCount-1);if(u instanceof HTMLTableRowElement&&p.startContainer instanceof HTMLTableRowElement&&h.startContainer instanceof HTMLTableRowElement){let k=function(E){return E.childElementCount>0?k(E.children[0]):E};var v=p.startContainer,g=h.startContainer,m=k(v.children[p.startOffset]),b=k(g.children[h.startOffset]);c=0,b.childNodes.length>0?l=b.childNodes[0]:l=b,m.childNodes.length>0?u=m.childNodes[0]:u=m,b instanceof HTMLElement?s=b.innerHTML.length:s=0}else p.startContainer===u?(l=h.endContainer,s=h.endOffset,c=p.startOffset):(l=p.startContainer,s=p.endOffset,c=h.startOffset)}else l=t.anchorNode,s=t.anchorOffset,u=t.focusNode,c=t.focusOffset;ny&&FS(l)||Da?f=t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:f=t.isCollapsed}else l=t.startContainer,s=t.startOffset,u=t.endContainer,c=t.endOffset,f=t.collapsed;if(l==null||u==null||s==null||c==null)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));Da&&(n=u.textContent)!==null&&n!==void 0&&n.endsWith(`
|
|
18
|
+
|
|
19
|
+
`)&&c===u.textContent.length&&c--;var y=$e.toSlatePoint(e,[l,s],{exactMatch:o,suppressThrow:a});if(!y)return null;var C=Zh(l,u)||l===u&&c<s,D=f?y:$e.toSlatePoint(e,[u,c],{exactMatch:o,suppressThrow:a,searchDirection:C?"forward":"backward"});if(!D)return null;var w={anchor:y,focus:D};return Ee.isExpanded(w)&&Ee.isForward(w)&&$n(u)&&I.void(e,{at:w.focus,mode:"highest"})&&(w=I.unhangRange(e,w,{voids:!0})),w}};function zS(e,t){var{path:r,diff:n}=t;if(!I.hasPath(e,r))return!1;var o=Ue.get(e,r);if(!st.isText(o))return!1;if(n.start!==o.text.length||n.text.length===0)return o.text.slice(n.start,n.start+n.text.length)===n.text;var a=oe.next(r);if(!I.hasPath(e,a))return!1;var i=Ue.get(e,a);return st.isText(i)&&i.text.startsWith(n.text)}function dy(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.reduce((o,a)=>o.slice(0,a.start)+a.text+o.slice(a.end),e)}function LS(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++)if(e.charAt(n)!==t.charAt(n))return n;return r}function _S(e,t,r){for(var n=Math.min(e.length,t.length,r),o=0;o<n;o++)if(e.charAt(e.length-o-1)!==t.charAt(t.length-o-1))return o;return n}function fy(e,t){var{start:r,end:n,text:o}=t,a=e.slice(r,n),i=LS(a,o),l=Math.min(a.length-i,o.length-i),s=_S(a,o,l),u={start:r+i,end:n-s,text:o.slice(i,o.length-s)};return u.start===u.end&&u.text.length===0?null:u}function HS(e,t,r){var n=Math.min(t.start,r.start),o=Math.max(0,Math.min(t.start+t.text.length,r.end)-r.start),a=dy(e,t,r),i=Math.max(r.start+r.text.length,t.start+t.text.length+(t.start+t.text.length>r.start?r.text.length:0)-o),l=a.slice(n,i),s=Math.max(t.end,r.end-t.text.length+(t.end-t.start));return fy(e,{start:n,end:s,text:l})}function WS(e){var{path:t,diff:r}=e;return{anchor:{path:t,offset:r.start},focus:{path:t,offset:r.end}}}function xd(e,t){var{path:r,offset:n}=t;if(!I.hasPath(e,r))return null;var o=Ue.get(e,r);if(!st.isText(o))return null;var a=I.above(e,{match:l=>ct.isElement(l)&&I.isBlock(e,l),at:r});if(!a)return null;for(;n>o.text.length;){var i=I.next(e,{at:r,match:st.isText});if(!i||!oe.isDescendant(i[1],a[1]))return null;n-=o.text.length,o=i[0],r=i[1]}return{path:r,offset:n}}function Jh(e,t){var r=xd(e,t.anchor);if(!r)return null;if(Ee.isCollapsed(t))return{anchor:r,focus:r};var n=xd(e,t.focus);return n?{anchor:r,focus:n}:null}function wd(e,t,r){var n=sn.get(e),o=n==null?void 0:n.find(c=>{var{path:f}=c;return oe.equals(f,t.path)});if(!o||t.offset<=o.diff.start)return It.transform(t,r,{affinity:"backward"});var{diff:a}=o;if(t.offset<=a.start+a.text.length){var i={path:t.path,offset:a.start},l=It.transform(i,r,{affinity:"backward"});return l?{path:l.path,offset:l.offset+t.offset-a.start}:null}var s={path:t.path,offset:t.offset-a.text.length+a.end-a.start},u=It.transform(s,r,{affinity:"backward"});return u?r.type==="split_node"&&oe.equals(r.path,t.path)&&s.offset<r.position&&a.start<r.position?u:{path:u.path,offset:u.offset+a.text.length-a.end+a.start}:null}function Qh(e,t,r){var n=wd(e,t.anchor,r);if(!n)return null;if(Ee.isCollapsed(t))return{anchor:n,focus:n};var o=wd(e,t.focus,r);return o?{anchor:n,focus:o}:null}function KS(e,t){var{path:r,diff:n,id:o}=e;switch(t.type){case"insert_text":return!oe.equals(t.path,r)||t.offset>=n.end?e:t.offset<=n.start?{diff:{start:t.text.length+n.start,end:t.text.length+n.end,text:n.text},id:o,path:r}:{diff:{start:n.start,end:n.end+t.text.length,text:n.text},id:o,path:r};case"remove_text":return!oe.equals(t.path,r)||t.offset>=n.end?e:t.offset+t.text.length<=n.start?{diff:{start:n.start-t.text.length,end:n.end-t.text.length,text:n.text},id:o,path:r}:{diff:{start:n.start,end:n.end-t.text.length,text:n.text},id:o,path:r};case"split_node":return!oe.equals(t.path,r)||t.position>=n.end?{diff:n,id:o,path:oe.transform(r,t,{affinity:"backward"})}:t.position>n.start?{diff:{start:n.start,end:Math.min(t.position,n.end),text:n.text},id:o,path:r}:{diff:{start:n.start-t.position,end:n.end-t.position,text:n.text},id:o,path:oe.transform(r,t,{affinity:"forward"})};case"merge_node":return oe.equals(t.path,r)?{diff:{start:n.start+t.position,end:n.end+t.position,text:n.text},id:o,path:oe.transform(r,t)}:{diff:n,id:o,path:oe.transform(r,t)}}var a=oe.transform(r,t);return a?{diff:n,path:a,id:o}:null}function eg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ll(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eg(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var qS=25,VS=200,US=function(){},XS=e=>(e==null?void 0:e.constructor.name)==="DataTransfer";function GS(e){var{editor:t,scheduleOnDOMSelectionChange:r,onDOMSelectionChange:n}=e,o=!1,a=null,i=null,l=null,s=0,u=!1,c=()=>{var P=So.get(t);if(So.delete(t),P){var{selection:A}=t,O=Jh(t,P);O&&(!A||!Ee.equals(O,A))&&Ie.select(t,O)}},f=()=>{var P=Do.get(t);if(Do.delete(t),!!P){if(P.at){var A=It.isPoint(P.at)?xd(t,P.at):Jh(t,P.at);if(!A)return;var O=I.range(t,A);(!t.selection||!Ee.equals(t.selection,O))&&Ie.select(t,A)}P.run()}},p=()=>{if(i&&(clearTimeout(i),i=null),l&&(clearTimeout(l),l=null),!D()&&!C()){c();return}o||(o=!0,setTimeout(()=>o=!1)),C()&&(o="action");var P=t.selection&&I.rangeRef(t,t.selection,{affinity:"forward"});po.set(t,t.marks),US("flush",Do.get(t),sn.get(t));for(var A=D(),O;O=(S=sn.get(t))===null||S===void 0?void 0:S[0];){var S,B,R=Tn.get(t);R!==void 0&&(Tn.delete(t),t.marks=R),R&&u===!1&&(u=null);var N=WS(O);(!t.selection||!Ee.equals(t.selection,N))&&Ie.select(t,N),O.diff.text?I.insertText(t,O.diff.text):I.deleteFragment(t),sn.set(t,(B=sn.get(t))===null||B===void 0?void 0:B.filter(X=>{var{id:_}=X;return _!==O.id})),zS(t,O)||(A=!1,Do.delete(t),po.delete(t),o="action",So.delete(t),r.cancel(),n.cancel(),P==null||P.unref())}var T=P==null?void 0:P.unref();if(T&&!So.get(t)&&(!t.selection||!Ee.equals(T,t.selection))&&Ie.select(t,T),C()){f();return}A&&r(),r.flush(),n.flush(),c();var L=po.get(t);po.delete(t),L!==void 0&&(t.marks=L,t.onChange())},h=P=>{a&&clearTimeout(a),a=setTimeout(()=>{Wo.set(t,!1),p()},qS)},v=P=>{Wo.set(t,!0),a&&(clearTimeout(a),a=null)},g=function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,A=vd.get(t);if(A){if(D()||P){A.style.display="none";return}A.style.removeProperty("display")}},m=(P,A)=>{var O,S=(O=sn.get(t))!==null&&O!==void 0?O:[];sn.set(t,S);var B=Ue.leaf(t,P),R=S.findIndex(L=>oe.equals(L.path,P));if(R<0){var N=fy(B.text,A);N&&S.push({path:P,diff:A,id:s++}),g();return}var T=HS(B.text,S[R].diff,A);if(!T){S.splice(R,1),g();return}S[R]=Ll(Ll({},S[R]),{},{diff:T})},b=function(P){var{at:A}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};u=!1,So.delete(t),r.cancel(),n.cancel(),C()&&p(),Do.set(t,{at:A,run:P}),l=setTimeout(p)},y=P=>{var A;if(i&&(clearTimeout(i),i=null),!Fa.get(t)){var{inputType:O}=P,S=null,B=P.dataTransfer||P.data||void 0;u!==!1&&O!=="insertText"&&O!=="insertCompositionText"&&(u=!1);var[R]=P.getTargetRanges();R&&(S=$e.toSlateRange(t,R,{exactMatch:!1,suppressThrow:!0}));var N=$e.getWindow(t),T=N.getSelection();if(!S&&T&&(R=T,S=$e.toSlateRange(t,T,{exactMatch:!1,suppressThrow:!0})),S=(A=S)!==null&&A!==void 0?A:t.selection,!!S){var L=!0;if(O.startsWith("delete")){if(Ee.isExpanded(S)){var[X,_]=Ee.edges(S),q=Ue.leaf(t,X.path);if(q.text.length===X.offset&&_.offset===0){var Q=I.next(t,{at:X.path,match:st.isText});Q&&oe.equals(Q[1],_.path)&&(S={anchor:_,focus:_})}}var te=O.endsWith("Backward")?"backward":"forward",[z,Y]=Ee.edges(S),[V,G]=I.leaf(t,z.path),K={text:"",start:z.offset,end:Y.offset},W=sn.get(t),re=W==null?void 0:W.find(Me=>oe.equals(Me.path,G)),U=re?[re.diff,K]:[K],J=dy(V.text,...U);if(J.length===0&&(L=!1),Ee.isExpanded(S)){if(L&&oe.equals(S.anchor.path,S.focus.path)){var ne={path:S.anchor.path,offset:z.offset},ue=I.range(t,ne,ne);return E(ue),m(S.anchor.path,{text:"",end:Y.offset,start:z.offset})}return b(()=>I.deleteFragment(t,{direction:te}),{at:S})}}switch(O){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":return b(()=>I.deleteFragment(t),{at:S});case"deleteContent":case"deleteContentForward":{var{anchor:me}=S;if(L&&Ee.isCollapsed(S)){var Ce=Ue.leaf(t,me.path);if(me.offset<Ce.text.length)return m(me.path,{text:"",start:me.offset,end:me.offset+1})}return b(()=>I.deleteForward(t),{at:S})}case"deleteContentBackward":{var Ne,{anchor:pe}=S,he=Cd(R)?R.isCollapsed:!!((Ne=R)!==null&&Ne!==void 0&&Ne.collapsed);return L&&he&&Ee.isCollapsed(S)&&pe.offset>0?m(pe.path,{text:"",start:pe.offset-1,end:pe.offset}):b(()=>I.deleteBackward(t),{at:S})}case"deleteEntireSoftLine":return b(()=>{I.deleteBackward(t,{unit:"line"}),I.deleteForward(t,{unit:"line"})},{at:S});case"deleteHardLineBackward":return b(()=>I.deleteBackward(t,{unit:"block"}),{at:S});case"deleteSoftLineBackward":return b(()=>I.deleteBackward(t,{unit:"line"}),{at:S});case"deleteHardLineForward":return b(()=>I.deleteForward(t,{unit:"block"}),{at:S});case"deleteSoftLineForward":return b(()=>I.deleteForward(t,{unit:"line"}),{at:S});case"deleteWordBackward":return b(()=>I.deleteBackward(t,{unit:"word"}),{at:S});case"deleteWordForward":return b(()=>I.deleteForward(t,{unit:"word"}),{at:S});case"insertLineBreak":return b(()=>I.insertSoftBreak(t),{at:S});case"insertParagraph":return b(()=>I.insertBreak(t),{at:S});case"insertCompositionText":case"deleteCompositionText":case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{if(XS(B))return b(()=>$e.insertData(t,B),{at:S});var ve=B??"";if(Tn.get(t)&&(ve=ve.replace("\uFEFF","")),O==="insertText"&&/.*\n.*\n$/.test(ve)&&(ve=ve.slice(0,-1)),ve.includes(`
|
|
20
|
+
`))return b(()=>{var Me=ve.split(`
|
|
21
|
+
`);Me.forEach((Fe,ge)=>{Fe&&I.insertText(t,Fe),ge!==Me.length-1&&I.insertSoftBreak(t)})},{at:S});if(oe.equals(S.anchor.path,S.focus.path)){var[be,ye]=Ee.edges(S),Ae={start:be.offset,end:ye.offset,text:ve};if(ve&&u&&O==="insertCompositionText"){var we=u.start+u.text.search(/\S|$/),He=Ae.start+Ae.text.search(/\S|$/);He===we+1&&Ae.end===u.start+u.text.length?(Ae.start-=1,u=null,j()):u=!1}else O==="insertText"?u===null?u=Ae:u&&Ee.isCollapsed(S)&&u.end+u.text.length===be.offset?u=Ll(Ll({},u),{},{text:u.text+ve}):u=!1:u=!1;if(L){m(be.path,Ae);return}}return b(()=>I.insertText(t,ve),{at:S})}}}}},C=()=>!!Do.get(t),D=()=>{var P;return!!((P=sn.get(t))!==null&&P!==void 0&&P.length)},w=()=>C()||D(),k=()=>o,E=P=>{So.set(t,P),i&&(clearTimeout(i),i=null);var{selection:A}=t;if(P){var O=!A||!oe.equals(A.anchor.path,P.anchor.path),S=!A||!oe.equals(A.anchor.path.slice(0,-1),P.anchor.path.slice(0,-1));(O&&u||S)&&(u=!1),(O||D())&&(i=setTimeout(p,VS))}},x=()=>{(C()||!D())&&p()},F=P=>{D()||(g(!0),setTimeout(g))},j=()=>{C()||(l=setTimeout(p))},$=P=>{if(!(D()||C())&&P.some(O=>pp(t,O,P))){var A;(A=ay.get(t))===null||A===void 0||A()}};return{flush:p,scheduleFlush:j,hasPendingDiffs:D,hasPendingAction:C,hasPendingChanges:w,isFlushing:k,handleUserSelect:E,handleCompositionEnd:h,handleCompositionStart:v,handleDOMBeforeInput:y,handleKeyDown:F,handleDomMutations:$,handleInput:x}}function YS(){var e=Ve(!1);return Ot(()=>(e.current=!0,()=>{e.current=!1}),[]),e.current}var Gi=ts?Nb:Ot;function ZS(e,t,r){var[n]=wt(()=>new MutationObserver(t));Gi(()=>{n.takeRecords()}),Ot(()=>{if(!e.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");return n.observe(e.current,r),()=>n.disconnect()},[n,e,r])}var JS=["node"];function tg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function QS(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tg(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var e2={subtree:!0,childList:!0,characterData:!0},t2=en?e=>{var{node:t}=e,r=Ta(e,JS);if(!en)return null;var n=Ro(),o=YS(),[a]=wt(()=>GS(QS({editor:n},r)));return ZS(t,a.handleDomMutations,e2),dp.set(n,a.scheduleFlush),o&&a.flush(),a}:()=>null,r2=["anchor","focus"],n2=["anchor","focus"],o2=(e,t)=>Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(r=>t.hasOwnProperty(r)&&e[r]===t[r]),py=(e,t)=>{var r=Ta(e,r2),n=Ta(t,n2);return e[Ma]===t[Ma]&&o2(r,n)},a2=(e,t)=>{if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++){var n=e[r],o=t[r];if(!Ee.equals(n,o)||!py(n,o))return!1}return!0},i2=(e,t)=>{if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++){var n=e[r],o=t[r];if(n.anchor.offset!==o.anchor.offset||n.focus.offset!==o.focus.offset||!py(n,o))return!1}return!0};function rg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function l2(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rg(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var s2=e=>{var{isLast:t,leaf:r,parent:n,text:o}=e,a=Ro(),i=$e.findPath(a,o),l=oe.parent(i),s=!!r[iy];return a.isVoid(n)?ee.createElement(hc,{length:Ue.string(n).length}):r.text===""&&n.children[n.children.length-1]===o&&!a.isInline(n)&&I.string(a,l)===""?ee.createElement(hc,{isLineBreak:!0,isMarkPlaceholder:s}):r.text===""?ee.createElement(hc,{isMarkPlaceholder:s}):t&&r.text.slice(-1)===`
|
|
22
|
+
`?ee.createElement(ng,{isTrailing:!0,text:r.text}):ee.createElement(ng,{text:r.text})},ng=e=>{var{text:t,isTrailing:r=!1}=e,n=Ve(null),o=()=>"".concat(t??"").concat(r?`
|
|
23
|
+
`:""),[a]=wt(o);return Gi(()=>{var i=o();n.current&&n.current.textContent!==i&&(n.current.textContent=i)}),ee.createElement(u2,{ref:n},a)},u2=Uw(dn((e,t)=>ee.createElement("span",{"data-slate-string":!0,ref:t},e.children))),hc=e=>{var{length:t=0,isLineBreak:r=!1,isMarkPlaceholder:n=!1}=e,o={"data-slate-zero-width":r?"n":"z","data-slate-length":t};return n&&(o["data-slate-mark-placeholder"]=!0),ee.createElement("span",l2({},o),!(en||ry)||!r?"\uFEFF":null,r?ee.createElement("br",null):null)};function og(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function my(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?og(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):og(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var c2=en?300:0;function d2(e,t){e.current&&(e.current.disconnect(),t&&(e.current=null))}function ag(e){e.current&&(clearTimeout(e.current),e.current=null)}var f2=e=>{var{leaf:t,isLast:r,text:n,parent:o,renderPlaceholder:a,renderLeaf:i=y=>ee.createElement(m2,my({},y))}=e,l=Ro(),s=Ve(null),u=Ve(null),[c,f]=wt(!1),p=Ve(null),h=gt(y=>{if(d2(s,y==null),y==null){var C;vd.delete(l),(C=t.onPlaceholderResize)===null||C===void 0||C.call(t,null)}else{if(vd.set(l,y),!s.current){var D=window.ResizeObserver||gS;s.current=new D(()=>{var w;(w=t.onPlaceholderResize)===null||w===void 0||w.call(t,y)})}s.current.observe(y),u.current=y}},[u,t,l]),v=ee.createElement(s2,{isLast:r,leaf:t,parent:o,text:n}),g=!!t[Ma];if(Ot(()=>(g?p.current||(p.current=setTimeout(()=>{f(!0),p.current=null},c2)):(ag(p),f(!1)),()=>ag(p)),[g,f]),g&&c){var m={children:t.placeholder,attributes:{"data-slate-placeholder":!0,style:{position:"absolute",top:0,pointerEvents:"none",width:"100%",maxWidth:"100%",display:"block",opacity:"0.333",userSelect:"none",textDecoration:"none",WebkitUserModify:_o?"inherit":void 0},contentEditable:!1,ref:h}};v=ee.createElement(ee.Fragment,null,a(m),v)}var b={"data-slate-leaf":!0};return i({attributes:b,children:v,leaf:t,text:n})},p2=ee.memo(f2,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&st.equals(t.leaf,e.leaf)&&t.leaf[Ma]===e.leaf[Ma]),m2=e=>{var{attributes:t,children:r}=e;return ee.createElement("span",my({},t),r)},h2=e=>{for(var{decorations:t,isLast:r,parent:n,renderPlaceholder:o,renderLeaf:a,text:i}=e,l=Ro(),s=Ve(null),u=st.decorations(i,t),c=$e.findKey(l,i),f=[],p=0;p<u.length;p++){var h=u[p];f.push(ee.createElement(p2,{isLast:r&&p===u.length-1,key:"".concat(c.id,"-").concat(p),renderPlaceholder:o,leaf:h,text:i,parent:n,renderLeaf:a}))}var v=gt(g=>{var m=ou.get(l);g?(m==null||m.set(c,g),Xo.set(i,g),Xi.set(g,i)):(m==null||m.delete(c),Xo.delete(i),s.current&&Xi.delete(s.current)),s.current=g},[s,l,c,i]);return ee.createElement("span",{"data-slate-node":"text",ref:v},f)},hy=ee.memo(h2,(e,t)=>t.parent===e.parent&&t.isLast===e.isLast&&t.renderLeaf===e.renderLeaf&&t.renderPlaceholder===e.renderPlaceholder&&t.text===e.text&&i2(t.decorations,e.decorations));function ig(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ed(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ig(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ig(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var g2=e=>{var{decorations:t,element:r,renderElement:n=y=>ee.createElement(b2,Ed({},y)),renderPlaceholder:o,renderLeaf:a,selection:i}=e,l=Ro(),s=x2(),u=l.isInline(r),c=$e.findKey(l,r),f=gt(y=>{var C=ou.get(l);y?(C==null||C.set(c,y),Xo.set(r,y),Xi.set(y,r)):(C==null||C.delete(c),Xo.delete(r))},[l,c,r]),p=vy({decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:i}),h={"data-slate-node":"element",ref:f};if(u&&(h["data-slate-inline"]=!0),!u&&I.hasInlines(l,r)){var v=Ue.string(r),g=qb(v);g==="rtl"&&(h.dir=g)}if(I.isVoid(l,r)){h["data-slate-void"]=!0,!s&&u&&(h.contentEditable=!1);var m=u?"span":"div",[[b]]=Ue.texts(r);p=ee.createElement(m,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},ee.createElement(hy,{renderPlaceholder:o,decorations:[],isLast:!1,parent:r,text:b})),up.set(b,0),cp.set(b,r)}return n({attributes:h,children:p,element:r})},v2=ee.memo(g2,(e,t)=>e.element===t.element&&e.renderElement===t.renderElement&&e.renderLeaf===t.renderLeaf&&e.renderPlaceholder===t.renderPlaceholder&&a2(e.decorations,t.decorations)&&(e.selection===t.selection||!!e.selection&&!!t.selection&&Ee.equals(e.selection,t.selection))),b2=e=>{var{attributes:t,children:r,element:n}=e,o=Ro(),a=o.isInline(n)?"span":"div";return ee.createElement(a,Ed(Ed({},t),{},{style:{position:"relative"}}),r)},gy=Fn(()=>[]),y2=()=>Ir(gy),C2=Fn(!1),vy=e=>{var{decorations:t,node:r,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:i}=e,l=y2(),s=Ro();Fa.set(s,!1);for(var u=$e.findPath(s,r),c=[],f=ct.isElement(r)&&!s.isInline(r)&&I.hasInlines(s,r),p=0;p<r.children.length;p++){var h=u.concat(p),v=r.children[p],g=$e.findKey(s,v),m=I.range(s,h),b=i&&Ee.intersection(m,i),y=l([v,h]);for(var C of t){var D=Ee.intersection(C,m);D&&y.push(D)}ct.isElement(v)?c.push(ee.createElement(C2.Provider,{key:"provider-".concat(g.id),value:!!b},ee.createElement(v2,{decorations:y,element:v,key:g.id,renderElement:n,renderPlaceholder:o,renderLeaf:a,selection:b}))):c.push(ee.createElement(hy,{decorations:y,key:g.id,isLast:f&&p===r.children.length-1,parent:r,renderPlaceholder:o,renderLeaf:a,text:v})),up.set(v,p),cp.set(v,r)}return c},by=Fn(!1),x2=()=>Ir(by),yy=Fn(null),Cy=()=>{var e=Ir(yy);if(!e)throw new Error("The `useSlate` hook must be used inside the <Slate> component's context.");var{editor:t}=e;return t};function w2(){var e=Ro(),t=Ve(!1),r=Ve(0),n=gt(()=>{if(!t.current){t.current=!0;var o=$e.getWindow(e);o.cancelAnimationFrame(r.current),r.current=o.requestAnimationFrame(()=>{t.current=!1})}},[e]);return Ot(()=>()=>cancelAnimationFrame(r.current),[]),{receivedUserInput:t,onUserInput:n}}var E2=3,k2={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",insertSoftBreak:"shift+enter",splitBlock:"enter",undo:"mod+z"},D2={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},S2={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},ir=e=>{var t=k2[e],r=D2[e],n=S2[e],o=t&&fc.isHotkey(t),a=r&&fc.isHotkey(r),i=n&&fc.isHotkey(n);return l=>!!(o&&o(l)||Yh&&a&&a(l)||!Yh&&i&&i(l))},cr={isBold:ir("bold"),isCompose:ir("compose"),isMoveBackward:ir("moveBackward"),isMoveForward:ir("moveForward"),isDeleteBackward:ir("deleteBackward"),isDeleteForward:ir("deleteForward"),isDeleteLineBackward:ir("deleteLineBackward"),isDeleteLineForward:ir("deleteLineForward"),isDeleteWordBackward:ir("deleteWordBackward"),isDeleteWordForward:ir("deleteWordForward"),isExtendBackward:ir("extendBackward"),isExtendForward:ir("extendForward"),isExtendLineBackward:ir("extendLineBackward"),isExtendLineForward:ir("extendLineForward"),isItalic:ir("italic"),isMoveLineBackward:ir("moveLineBackward"),isMoveLineForward:ir("moveLineForward"),isMoveWordBackward:ir("moveWordBackward"),isMoveWordForward:ir("moveWordForward"),isRedo:ir("redo"),isSoftBreak:ir("insertSoftBreak"),isSplitBlock:ir("splitBlock"),isTransposeCharacter:ir("transposeCharacter"),isUndo:ir("undo")},$2=(e,t)=>{var r=[],n=()=>{r=[]},o=i=>{if(t.current){var l=i.filter(s=>pp(e,s,i));r.push(...l)}};function a(){r.length>0&&(r.reverse().forEach(i=>{i.type!=="characterData"&&(i.removedNodes.forEach(l=>{i.target.insertBefore(l,i.nextSibling)}),i.addedNodes.forEach(l=>{i.target.removeChild(l)}))}),n())}return{registerMutations:o,restoreDOM:a,clear:n}},B2={subtree:!0,childList:!0,characterData:!0,characterDataOldValue:!0};class xy extends Vw{constructor(){super(...arguments),Bn(this,"context",null),Bn(this,"manager",null),Bn(this,"mutationObserver",null)}observe(){var t,{node:r}=this.props;if(!r.current)throw new Error("Failed to attach MutationObserver, `node` is undefined");(t=this.mutationObserver)===null||t===void 0||t.observe(r.current,B2)}componentDidMount(){var{receivedUserInput:t}=this.props,r=this.context;this.manager=$2(r,t),this.mutationObserver=new MutationObserver(this.manager.registerMutations),this.observe()}getSnapshotBeforeUpdate(){var t,r,n,o=(t=this.mutationObserver)===null||t===void 0?void 0:t.takeRecords();if(o!=null&&o.length){var a;(a=this.manager)===null||a===void 0||a.registerMutations(o)}return(r=this.mutationObserver)===null||r===void 0||r.disconnect(),(n=this.manager)===null||n===void 0||n.restoreDOM(),null}componentDidUpdate(){var t;(t=this.manager)===null||t===void 0||t.clear(),this.observe()}componentWillUnmount(){var t;(t=this.mutationObserver)===null||t===void 0||t.disconnect()}render(){return this.props.children}}Bn(xy,"contextType",sp);var O2=en?xy:e=>{var{children:t}=e;return ee.createElement(ee.Fragment,null,t)},A2=Fn(!1),F2=["autoFocus","decorate","onDOMBeforeInput","placeholder","readOnly","renderElement","renderLeaf","renderPlaceholder","scrollSelectionIntoView","style","as","disableDefaultStyles"],N2=["text"];function lg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function qn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lg(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var P2=e=>ee.createElement(ee.Fragment,null,vy(e)),gc=dn((e,t)=>{var r=gt(z=>ee.createElement(j2,qn({},z)),[]),{autoFocus:n,decorate:o=R2,onDOMBeforeInput:a,placeholder:i,readOnly:l=!1,renderElement:s,renderLeaf:u,renderPlaceholder:c=r,scrollSelectionIntoView:f=I2,style:p={},as:h="div",disableDefaultStyles:v=!1}=e,g=Ta(e,F2),m=Cy(),[b,y]=wt(!1),C=Ve(null),D=Ve([]),[w,k]=wt(),E=Ve(!1),{onUserInput:x,receivedUserInput:F}=w2(),[,j]=qw(z=>z+1,0);ay.set(m,j),bd.set(m,l);var $=Et(()=>({isDraggingInternally:!1,isUpdatingSelection:!1,latestElement:null,hasMarkPlaceholder:!1}),[]);Ot(()=>{C.current&&n&&C.current.focus()},[n]);var P=Ve(),A=Et(()=>VD(()=>{if(Fa.get(m)){A();return}var z=$e.toDOMNode(m,m),Y=z.getRootNode();if(!E.current&&_o&&Y instanceof ShadowRoot){E.current=!0;var V=RS();V?document.execCommand("indent"):Ie.deselect(m),E.current=!1;return}var G=P.current;if((en||!$e.isComposing(m))&&(!$.isUpdatingSelection||G!=null&&G.isFlushing())&&!$.isDraggingInternally){var K=$e.findDocumentOrShadowRoot(m),{activeElement:W}=K,re=$e.toDOMNode(m,m),U=Pi(K);if(W===re?($.latestElement=W,$o.set(m,!0)):$o.delete(m),!U)return Ie.deselect(m);var{anchorNode:J,focusNode:ne}=U,ue=$e.hasEditableTarget(m,J)||$e.isTargetInsideNonReadonlyVoid(m,J),me=$e.hasTarget(m,ne);if(ue&&me){var Ce=$e.toSlateRange(m,U,{exactMatch:!1,suppressThrow:!0});Ce&&(!$e.isComposing(m)&&!(G!=null&&G.hasPendingChanges())&&!(G!=null&&G.isFlushing())?Ie.select(m,Ce):G==null||G.handleUserSelect(Ce))}l&&(!ue||!me)&&Ie.deselect(m)}},100),[m,l,$]),O=Et(()=>WD(A,0),[A]);P.current=t2({node:C,onDOMSelectionChange:A,scheduleOnDOMSelectionChange:O}),Gi(()=>{var z,Y,V;C.current&&(V=fp(C.current))?(oy.set(m,V),rs.set(m,C.current),Xo.set(m,C.current),Xi.set(C.current,m)):Xo.delete(m);var{selection:G}=m,K=$e.findDocumentOrShadowRoot(m),W=Pi(K);if(!(!W||!$e.isFocused(m)||(z=P.current)!==null&&z!==void 0&&z.hasPendingAction())){var re=ue=>{var me=W.type!=="None";if(!(!G&&!me)){var Ce=W.focusNode,Ne;if(Da&&W.rangeCount>1){var pe=W.getRangeAt(0),he=W.getRangeAt(W.rangeCount-1);pe.startContainer===Ce?Ne=he.endContainer:Ne=pe.startContainer}else Ne=W.anchorNode;var ve=rs.get(m),be=!1;if(ve.contains(Ne)&&ve.contains(Ce)&&(be=!0),me&&be&&G&&!ue){var ye=$e.toSlateRange(m,W,{exactMatch:!0,suppressThrow:!0});if(ye&&Ee.equals(ye,G)){var Ae;if(!$.hasMarkPlaceholder||(Ae=Ne)!==null&&Ae!==void 0&&(Ae=Ae.parentElement)!==null&&Ae!==void 0&&Ae.hasAttribute("data-slate-mark-placeholder"))return}}if(G&&!$e.hasRange(m,G)){m.selection=$e.toSlateRange(m,W,{exactMatch:!1,suppressThrow:!0});return}$.isUpdatingSelection=!0;var we=G&&$e.toDOMRange(m,G);return we?($e.isComposing(m)&&!en?W.collapseToEnd():Ee.isBackward(G)?W.setBaseAndExtent(we.endContainer,we.endOffset,we.startContainer,we.startOffset):W.setBaseAndExtent(we.startContainer,we.startOffset,we.endContainer,we.endOffset),f(m,we)):W.removeAllRanges(),we}};W.rangeCount<=1&&re();var U=((Y=P.current)===null||Y===void 0?void 0:Y.isFlushing())==="action";if(!en||!U){setTimeout(()=>{$.isUpdatingSelection=!1});return}var J=null,ne=requestAnimationFrame(()=>{if(U){var ue=me=>{try{var Ce=$e.toDOMNode(m,m);Ce.focus(),re(me)}catch{}};ue(),J=setTimeout(()=>{ue(!0),$.isUpdatingSelection=!1})}});return()=>{cancelAnimationFrame(ne),J&&clearTimeout(J)}}});var S=gt(z=>{var Y=$e.toDOMNode(m,m),V=Y.getRootNode();if(E!=null&&E.current&&_o&&V instanceof ShadowRoot){var G=z.getTargetRanges(),K=G[0],W=new window.Range;W.setStart(K.startContainer,K.startOffset),W.setEnd(K.endContainer,K.endOffset);var re=$e.toSlateRange(m,W,{exactMatch:!1,suppressThrow:!1});Ie.select(m,re),z.preventDefault(),z.stopImmediatePropagation();return}if(x(),!l&&$e.hasEditableTarget(m,z.target)&&!T2(z,a)){var U;if(P.current)return P.current.handleDOMBeforeInput(z);O.flush(),A.flush();var{selection:J}=m,{inputType:ne}=z,ue=z.dataTransfer||z.data||void 0,me=ne==="insertCompositionText"||ne==="deleteCompositionText";if(me&&$e.isComposing(m))return;var Ce=!1;if(ne==="insertText"&&J&&Ee.isCollapsed(J)&&z.data&&z.data.length===1&&/[a-z ]/i.test(z.data)&&J.anchor.offset!==0&&(Ce=!0,m.marks&&(Ce=!1),!Fa.get(m))){var Ne,pe,{anchor:he}=J,[ve,be]=$e.toDOMPoint(m,he),ye=(Ne=ve.parentElement)===null||Ne===void 0?void 0:Ne.closest("a"),Ae=$e.getWindow(m);if(Ce&&ye&&$e.hasDOMNode(m,ye)){var we,He=Ae==null?void 0:Ae.document.createTreeWalker(ye,NodeFilter.SHOW_TEXT).lastChild();He===ve&&((we=He.textContent)===null||we===void 0?void 0:we.length)===be&&(Ce=!1)}if(Ce&&ve.parentElement&&(Ae==null||(pe=Ae.getComputedStyle(ve.parentElement))===null||pe===void 0?void 0:pe.whiteSpace)==="pre"){var Me=I.above(m,{at:he.path,match:Xe=>ct.isElement(Xe)&&I.isBlock(m,Xe)});Me&&Ue.string(Me[0]).includes(" ")&&(Ce=!1)}}if((!ne.startsWith("delete")||ne.startsWith("deleteBy"))&&!Fa.get(m)){var[Fe]=z.getTargetRanges();if(Fe){var ge=$e.toSlateRange(m,Fe,{exactMatch:!1,suppressThrow:!1});if(!J||!Ee.equals(J,ge)){Ce=!1;var Se=!me&&m.selection&&I.rangeRef(m,m.selection);Ie.select(m,ge),Se&&Ni.set(m,Se)}}}if(me)return;if(Ce||z.preventDefault(),J&&Ee.isExpanded(J)&&ne.startsWith("delete")){var qe=ne.endsWith("Backward")?"backward":"forward";I.deleteFragment(m,{direction:qe});return}switch(ne){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":{I.deleteFragment(m);break}case"deleteContent":case"deleteContentForward":{I.deleteForward(m);break}case"deleteContentBackward":{I.deleteBackward(m);break}case"deleteEntireSoftLine":{I.deleteBackward(m,{unit:"line"}),I.deleteForward(m,{unit:"line"});break}case"deleteHardLineBackward":{I.deleteBackward(m,{unit:"block"});break}case"deleteSoftLineBackward":{I.deleteBackward(m,{unit:"line"});break}case"deleteHardLineForward":{I.deleteForward(m,{unit:"block"});break}case"deleteSoftLineForward":{I.deleteForward(m,{unit:"line"});break}case"deleteWordBackward":{I.deleteBackward(m,{unit:"word"});break}case"deleteWordForward":{I.deleteForward(m,{unit:"word"});break}case"insertLineBreak":I.insertSoftBreak(m);break;case"insertParagraph":{I.insertBreak(m);break}case"insertFromComposition":case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":{ne==="insertFromComposition"&&$e.isComposing(m)&&(y(!1),Wo.set(m,!1)),(ue==null?void 0:ue.constructor.name)==="DataTransfer"?$e.insertData(m,ue):typeof ue=="string"&&(Ce?D.current.push(()=>I.insertText(m,ue)):I.insertText(m,ue));break}}var Ye=(U=Ni.get(m))===null||U===void 0?void 0:U.unref();Ni.delete(m),Ye&&(!m.selection||!Ee.equals(m.selection,Ye))&&Ie.select(m,Ye)}},[m,A,x,a,l,O]),B=gt(z=>{z==null?(A.cancel(),O.cancel(),rs.delete(m),Xo.delete(m),C.current&&Co&&C.current.removeEventListener("beforeinput",S)):Co&&z.addEventListener("beforeinput",S),C.current=z,typeof t=="function"?t(z):t&&(t.current=z)},[A,O,m,S,t]);Gi(()=>{var z=$e.getWindow(m);z.document.addEventListener("selectionchange",O);var Y=()=>{$.isDraggingInternally=!1};return z.document.addEventListener("dragend",Y),z.document.addEventListener("drop",Y),()=>{z.document.removeEventListener("selectionchange",O),z.document.removeEventListener("dragend",Y),z.document.removeEventListener("drop",Y)}},[O,$]);var R=o([m,[]]),N=i&&m.children.length===1&&Array.from(Ue.texts(m)).length===1&&Ue.string(m)===""&&!b,T=gt(z=>{if(z&&N){var Y;k((Y=z.getBoundingClientRect())===null||Y===void 0?void 0:Y.height)}else k(void 0)},[N]);if(N){var L=I.start(m,[]);R.push({[Ma]:!0,placeholder:i,onPlaceholderResize:T,anchor:L,focus:L})}var{marks:X}=m;if($.hasMarkPlaceholder=!1,m.selection&&Ee.isCollapsed(m.selection)&&X){var{anchor:_}=m.selection,q=Ue.leaf(m,_.path),Q=Ta(q,N2);if(!st.equals(q,X,{loose:!0})){$.hasMarkPlaceholder=!0;var te=Object.fromEntries(Object.keys(Q).map(z=>[z,null]));R.push(qn(qn(qn({[iy]:!0},te),X),{},{anchor:_,focus:_}))}}return Ot(()=>{setTimeout(()=>{var{selection:z}=m;if(z){var{anchor:Y}=z,V=Ue.leaf(m,Y.path);if(X&&!st.equals(V,X,{loose:!0})){Tn.set(m,X);return}}Tn.delete(m)})}),ee.createElement(by.Provider,{value:l},ee.createElement(A2.Provider,{value:b},ee.createElement(gy.Provider,{value:o},ee.createElement(O2,{node:C,receivedUserInput:F},ee.createElement(h,qn(qn({role:l?void 0:"textbox","aria-multiline":l?void 0:!0},g),{},{spellCheck:Co||!ts?g.spellCheck:!1,autoCorrect:Co||!ts?g.autoCorrect:"false",autoCapitalize:Co||!ts?g.autoCapitalize:"false","data-slate-editor":!0,"data-slate-node":"value",contentEditable:!l,zindex:-1,suppressContentEditableWarning:!0,ref:B,style:qn(qn({},v?{}:qn({position:"relative",whiteSpace:"pre-wrap",wordWrap:"break-word"},w?{minHeight:w}:{})),p),onBeforeInput:gt(z=>{if(!Co&&!l&&!Qr(z,g.onBeforeInput)&&$e.hasSelectableTarget(m,z.target)&&(z.preventDefault(),!$e.isComposing(m))){var Y=z.data;I.insertText(m,Y)}},[g.onBeforeInput,m,l]),onInput:gt(z=>{if(!Qr(z,g.onInput)){if(P.current){P.current.handleInput();return}for(var Y of D.current)Y();if(D.current=[],!$e.isFocused(m)){var V=z.nativeEvent,G=m;if(V.inputType==="historyUndo"&&typeof G.undo=="function"){G.undo();return}if(V.inputType==="historyRedo"&&typeof G.redo=="function"){G.redo();return}}}},[g.onInput,m]),onBlur:gt(z=>{if(!(l||$.isUpdatingSelection||!$e.hasSelectableTarget(m,z.target)||Qr(z,g.onBlur))){var Y=$e.findDocumentOrShadowRoot(m);if($.latestElement!==Y.activeElement){var{relatedTarget:V}=z,G=$e.toDOMNode(m,m);if(V!==G&&!($n(V)&&V.hasAttribute("data-slate-spacer"))){if(V!=null&&Fo(V)&&$e.hasDOMNode(m,V)){var K=$e.toSlateNode(m,V);if(ct.isElement(K)&&!m.isVoid(K))return}if(_o){var W=Pi(Y);W==null||W.removeAllRanges()}$o.delete(m)}}}},[l,$.isUpdatingSelection,$.latestElement,m,g.onBlur]),onClick:gt(z=>{if($e.hasTarget(m,z.target)&&!Qr(z,g.onClick)&&Fo(z.target)){var Y=$e.toSlateNode(m,z.target),V=$e.findPath(m,Y);if(!I.hasPath(m,V)||Ue.get(m,V)!==Y)return;if(z.detail===E2&&V.length>=1){var G=V;if(!(ct.isElement(Y)&&I.isBlock(m,Y))){var K,W=I.above(m,{match:Ce=>ct.isElement(Ce)&&I.isBlock(m,Ce),at:V});G=(K=W==null?void 0:W[1])!==null&&K!==void 0?K:V.slice(0,1)}var re=I.range(m,G);Ie.select(m,re);return}if(l)return;var U=I.start(m,V),J=I.end(m,V),ne=I.void(m,{at:U}),ue=I.void(m,{at:J});if(ne&&ue&&oe.equals(ne[1],ue[1])){var me=I.range(m,U);Ie.select(m,me)}}},[m,g.onClick,l]),onCompositionEnd:gt(z=>{if($e.hasSelectableTarget(m,z.target)){var Y;if($e.isComposing(m)&&Promise.resolve().then(()=>{y(!1),Wo.set(m,!1)}),(Y=P.current)===null||Y===void 0||Y.handleCompositionEnd(z),Qr(z,g.onCompositionEnd)||en)return;if(!_o&&!kS&&!ry&&!SS&&!DS&&z.data){var V=Tn.get(m);Tn.delete(m),V!==void 0&&(po.set(m,m.marks),m.marks=V),I.insertText(m,z.data);var G=po.get(m);po.delete(m),G!==void 0&&(m.marks=G)}}},[g.onCompositionEnd,m]),onCompositionUpdate:gt(z=>{$e.hasSelectableTarget(m,z.target)&&!Qr(z,g.onCompositionUpdate)&&($e.isComposing(m)||(y(!0),Wo.set(m,!0)))},[g.onCompositionUpdate,m]),onCompositionStart:gt(z=>{if($e.hasSelectableTarget(m,z.target)){var Y;if((Y=P.current)===null||Y===void 0||Y.handleCompositionStart(z),Qr(z,g.onCompositionStart)||en)return;y(!0);var{selection:V}=m;if(V&&Ee.isExpanded(V)){I.deleteFragment(m);return}}},[g.onCompositionStart,m]),onCopy:gt(z=>{$e.hasSelectableTarget(m,z.target)&&!Qr(z,g.onCopy)&&!sg(z)&&(z.preventDefault(),$e.setFragmentData(m,z.clipboardData,"copy"))},[g.onCopy,m]),onCut:gt(z=>{if(!l&&$e.hasSelectableTarget(m,z.target)&&!Qr(z,g.onCut)&&!sg(z)){z.preventDefault(),$e.setFragmentData(m,z.clipboardData,"cut");var{selection:Y}=m;if(Y)if(Ee.isExpanded(Y))I.deleteFragment(m);else{var V=Ue.parent(m,Y.anchor.path);I.isVoid(m,V)&&Ie.delete(m)}}},[l,m,g.onCut]),onDragOver:gt(z=>{if($e.hasTarget(m,z.target)&&!Qr(z,g.onDragOver)){var Y=$e.toSlateNode(m,z.target);ct.isElement(Y)&&I.isVoid(m,Y)&&z.preventDefault()}},[g.onDragOver,m]),onDragStart:gt(z=>{if(!l&&$e.hasTarget(m,z.target)&&!Qr(z,g.onDragStart)){var Y=$e.toSlateNode(m,z.target),V=$e.findPath(m,Y),G=ct.isElement(Y)&&I.isVoid(m,Y)||I.void(m,{at:V,voids:!0});if(G){var K=I.range(m,V);Ie.select(m,K)}$.isDraggingInternally=!0,$e.setFragmentData(m,z.dataTransfer,"drag")}},[l,m,g.onDragStart,$]),onDrop:gt(z=>{if(!l&&$e.hasTarget(m,z.target)&&!Qr(z,g.onDrop)){z.preventDefault();var Y=m.selection,V=$e.findEventRange(m,z),G=z.dataTransfer;Ie.select(m,V),$.isDraggingInternally&&Y&&!Ee.equals(Y,V)&&!I.void(m,{at:V,voids:!0})&&Ie.delete(m,{at:Y}),$e.insertData(m,G),$e.isFocused(m)||$e.focus(m)}},[l,m,g.onDrop,$]),onDragEnd:gt(z=>{!l&&$.isDraggingInternally&&g.onDragEnd&&$e.hasTarget(m,z.target)&&g.onDragEnd(z)},[l,$,g,m]),onFocus:gt(z=>{if(!l&&!$.isUpdatingSelection&&$e.hasEditableTarget(m,z.target)&&!Qr(z,g.onFocus)){var Y=$e.toDOMNode(m,m),V=$e.findDocumentOrShadowRoot(m);if($.latestElement=V.activeElement,Da&&z.target!==Y){Y.focus();return}$o.set(m,!0)}},[l,$,m,g.onFocus]),onKeyDown:gt(z=>{if(!l&&$e.hasEditableTarget(m,z.target)){var Y;(Y=P.current)===null||Y===void 0||Y.handleKeyDown(z);var{nativeEvent:V}=z;if($e.isComposing(m)&&V.isComposing===!1&&(Wo.set(m,!1),y(!1)),Qr(z,g.onKeyDown)||$e.isComposing(m))return;var{selection:G}=m,K=m.children[G!==null?G.focus.path[0]:0],W=qb(Ue.string(K))==="rtl";if(cr.isRedo(V)){z.preventDefault();var re=m;typeof re.redo=="function"&&re.redo();return}if(cr.isUndo(V)){z.preventDefault();var U=m;typeof U.undo=="function"&&U.undo();return}if(cr.isMoveLineBackward(V)){z.preventDefault(),Ie.move(m,{unit:"line",reverse:!0});return}if(cr.isMoveLineForward(V)){z.preventDefault(),Ie.move(m,{unit:"line"});return}if(cr.isExtendLineBackward(V)){z.preventDefault(),Ie.move(m,{unit:"line",edge:"focus",reverse:!0});return}if(cr.isExtendLineForward(V)){z.preventDefault(),Ie.move(m,{unit:"line",edge:"focus"});return}if(cr.isMoveBackward(V)){z.preventDefault(),G&&Ee.isCollapsed(G)?Ie.move(m,{reverse:!W}):Ie.collapse(m,{edge:W?"end":"start"});return}if(cr.isMoveForward(V)){z.preventDefault(),G&&Ee.isCollapsed(G)?Ie.move(m,{reverse:W}):Ie.collapse(m,{edge:W?"start":"end"});return}if(cr.isMoveWordBackward(V)){z.preventDefault(),G&&Ee.isExpanded(G)&&Ie.collapse(m,{edge:"focus"}),Ie.move(m,{unit:"word",reverse:!W});return}if(cr.isMoveWordForward(V)){z.preventDefault(),G&&Ee.isExpanded(G)&&Ie.collapse(m,{edge:"focus"}),Ie.move(m,{unit:"word",reverse:W});return}if(Co){if((ny||_o)&&G&&(cr.isDeleteBackward(V)||cr.isDeleteForward(V))&&Ee.isCollapsed(G)){var J=Ue.parent(m,G.anchor.path);if(ct.isElement(J)&&I.isVoid(m,J)&&(I.isInline(m,J)||I.isBlock(m,J))){z.preventDefault(),I.deleteBackward(m,{unit:"block"});return}}}else{if(cr.isBold(V)||cr.isItalic(V)||cr.isTransposeCharacter(V)){z.preventDefault();return}if(cr.isSoftBreak(V)){z.preventDefault(),I.insertSoftBreak(m);return}if(cr.isSplitBlock(V)){z.preventDefault(),I.insertBreak(m);return}if(cr.isDeleteBackward(V)){z.preventDefault(),G&&Ee.isExpanded(G)?I.deleteFragment(m,{direction:"backward"}):I.deleteBackward(m);return}if(cr.isDeleteForward(V)){z.preventDefault(),G&&Ee.isExpanded(G)?I.deleteFragment(m,{direction:"forward"}):I.deleteForward(m);return}if(cr.isDeleteLineBackward(V)){z.preventDefault(),G&&Ee.isExpanded(G)?I.deleteFragment(m,{direction:"backward"}):I.deleteBackward(m,{unit:"line"});return}if(cr.isDeleteLineForward(V)){z.preventDefault(),G&&Ee.isExpanded(G)?I.deleteFragment(m,{direction:"forward"}):I.deleteForward(m,{unit:"line"});return}if(cr.isDeleteWordBackward(V)){z.preventDefault(),G&&Ee.isExpanded(G)?I.deleteFragment(m,{direction:"backward"}):I.deleteBackward(m,{unit:"word"});return}if(cr.isDeleteWordForward(V)){z.preventDefault(),G&&Ee.isExpanded(G)?I.deleteFragment(m,{direction:"forward"}):I.deleteForward(m,{unit:"word"});return}}}},[l,m,g.onKeyDown]),onPaste:gt(z=>{!l&&$e.hasEditableTarget(m,z.target)&&!Qr(z,g.onPaste)&&(!Co||OS(z.nativeEvent)||_o)&&(z.preventDefault(),$e.insertData(m,z.clipboardData))},[l,m,g.onPaste])}),ee.createElement(P2,{decorations:R,node:m,renderElement:s,renderPlaceholder:c,renderLeaf:u,selection:m.selection}))))))}),j2=e=>{var{attributes:t,children:r}=e;return ee.createElement("span",qn({},t),r,en&&ee.createElement("br",null))},R2=()=>[],I2=(e,t)=>{if(t.getBoundingClientRect&&(!e.selection||e.selection&&Ee.isCollapsed(e.selection))){var r=t.startContainer.parentElement;r.getBoundingClientRect=t.getBoundingClientRect.bind(t),GD(r,{scrollMode:"if-needed"}),delete r.getBoundingClientRect}},Qr=(e,t)=>{if(!t)return!1;var r=t(e);return r??(e.isDefaultPrevented()||e.isPropagationStopped())},sg=e=>Fo(e.target)&&(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement),T2=(e,t)=>{if(!t)return!1;var r=t(e);return r??e.defaultPrevented},M2=Fn(!1),z2=Fn({});function L2(e){var t=Ve([]).current,r=Ve({editor:e}).current,n=gt(a=>{r.editor=a,t.forEach(i=>i(a))},[t,r]),o=Et(()=>({getSlate:()=>r.editor,addEventListener:a=>(t.push(a),()=>{t.splice(t.indexOf(a),1)})}),[t,r]);return{selectorContext:o,onChange:n}}var _2=["editor","children","onChange","onSelectionChange","onValueChange","initialValue"],vc=e=>{var{editor:t,children:r,onChange:n,onSelectionChange:o,onValueChange:a,initialValue:i}=e,l=Ta(e,_2),[s,u]=ee.useState(()=>{if(!Ue.isNodeList(i))throw new Error("[Slate] initialValue is invalid! Expected a list of elements but got: ".concat(Rr.stringify(i)));if(!I.isEditor(t))throw new Error("[Slate] editor is invalid! You passed: ".concat(Rr.stringify(t)));return t.children=i,Object.assign(t,l),{v:0,editor:t}}),{selectorContext:c,onChange:f}=L2(t),p=gt(g=>{var m;switch(n&&n(t.children),g==null||(m=g.operation)===null||m===void 0?void 0:m.type){case"set_selection":o==null||o(t.selection);break;default:a==null||a(t.children)}u(b=>({v:b.v+1,editor:t})),f(t)},[t,f,n,o,a]);Ot(()=>(yd.set(t,p),()=>{yd.set(t,()=>{})}),[t,p]);var[h,v]=wt($e.isFocused(t));return Ot(()=>{v($e.isFocused(t))},[t]),Gi(()=>{var g=()=>v($e.isFocused(t));return ty>=17?(document.addEventListener("focusin",g),document.addEventListener("focusout",g),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",g)}):(document.addEventListener("focus",g,!0),document.addEventListener("blur",g,!0),()=>{document.removeEventListener("focus",g,!0),document.removeEventListener("blur",g,!0)})},[]),ee.createElement(z2.Provider,{value:c},ee.createElement(yy.Provider,{value:s},ee.createElement(sp.Provider,{value:s.editor},ee.createElement(M2.Provider,{value:h},r))))},ug=(e,t)=>{var r=(t.top+t.bottom)/2;return e.top<=r&&e.bottom>=r},cg=(e,t,r)=>{var n=$e.toDOMRange(e,t).getBoundingClientRect(),o=$e.toDOMRange(e,r).getBoundingClientRect();return ug(n,o)&&ug(o,n)},H2=(e,t)=>{var r=I.range(e,Ee.end(t)),n=Array.from(I.positions(e,{at:t})),o=0,a=n.length,i=Math.floor(a/2);if(cg(e,I.range(e,n[o]),r))return I.range(e,n[o],r);if(n.length<2)return I.range(e,n[n.length-1],r);for(;i!==n.length&&i!==o;)cg(e,I.range(e,n[i]),r)?a=i:o=i,i=Math.floor((o+a)/2);return I.range(e,n[a],r)};function dg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function fg(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dg(Object(r),!0).forEach(function(n){Bn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var W2=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x-slate-fragment",r=e,{apply:n,onChange:o,deleteBackward:a,addMark:i,removeMark:l}=r;return ou.set(r,new WeakMap),r.addMark=(s,u)=>{var c,f;(c=dp.get(r))===null||c===void 0||c(),!Tn.get(r)&&(f=sn.get(r))!==null&&f!==void 0&&f.length&&Tn.set(r,null),po.delete(r),i(s,u)},r.removeMark=s=>{var u;!Tn.get(r)&&(u=sn.get(r))!==null&&u!==void 0&&u.length&&Tn.set(r,null),po.delete(r),l(s)},r.deleteBackward=s=>{if(s!=="line")return a(s);if(r.selection&&Ee.isCollapsed(r.selection)){var u=I.above(r,{match:h=>ct.isElement(h)&&I.isBlock(r,h),at:r.selection});if(u){var[,c]=u,f=I.range(r,c,r.selection.anchor),p=H2(r,f);Ee.isCollapsed(p)||Ie.delete(r,{at:p})}}},r.apply=s=>{var u=[],c=[],f=sn.get(r);if(f!=null&&f.length){var p=f.map(A=>KS(A,s)).filter(Boolean);sn.set(r,p)}var h=So.get(r);h&&So.set(r,Qh(r,h,s));var v=Do.get(r);if(v!=null&&v.at){var g=It.isPoint(v==null?void 0:v.at)?wd(r,v.at,s):Qh(r,v.at,s);Do.set(r,g?fg(fg({},v),{},{at:g}):null)}switch(s.type){case"insert_text":case"remove_text":case"set_node":case"split_node":{u.push(...pa(r,s.path));break}case"set_selection":{var m;(m=Ni.get(r))===null||m===void 0||m.unref(),Ni.delete(r);break}case"insert_node":case"remove_node":{u.push(...pa(r,oe.parent(s.path)));break}case"merge_node":{var b=oe.previous(s.path);u.push(...pa(r,b));break}case"move_node":{var y=oe.common(oe.parent(s.path),oe.parent(s.newPath));u.push(...pa(r,y));var C;oe.isBefore(s.path,s.newPath)?(u.push(...pa(r,oe.parent(s.path))),C=s.newPath):(u.push(...pa(r,oe.parent(s.newPath))),C=s.path);var D=Ue.get(e,oe.parent(C)),w=$e.findKey(r,D),k=I.pathRef(r,oe.parent(C));c.push([k,w]);break}}switch(n(s),s.type){case"insert_node":case"remove_node":case"merge_node":case"move_node":case"split_node":Fa.set(r,!0)}for(var[E,x]of u){var[F]=I.node(r,E);$s.set(F,x)}for(var[j,$]of c){if(j.current){var[P]=I.node(r,j.current);$s.set(P,$)}j.unref()}},r.setFragmentData=s=>{var{selection:u}=r;if(u){var[c,f]=Ee.edges(u),p=I.void(r,{at:c.path}),h=I.void(r,{at:f.path});if(!(Ee.isCollapsed(u)&&!p)){var v=$e.toDOMRange(r,u),g=v.cloneContents(),m=g.childNodes[0];if(g.childNodes.forEach(F=>{F.textContent&&F.textContent.trim()!==""&&(m=F)}),h){var[b]=h,y=v.cloneRange(),C=$e.toDOMNode(r,b);y.setEndAfter(C),g=y.cloneContents()}if(p&&(m=g.querySelector("[data-slate-spacer]")),Array.from(g.querySelectorAll("[data-slate-zero-width]")).forEach(F=>{var j=F.getAttribute("data-slate-zero-width")==="n";F.textContent=j?`
|
|
24
|
+
`:""}),sy(m)){var D=m.ownerDocument.createElement("span");D.style.whiteSpace="pre",D.appendChild(m),g.appendChild(D),m=D}var w=r.getFragment(),k=JSON.stringify(w),E=window.btoa(encodeURIComponent(k));m.setAttribute("data-slate-fragment",E),s.setData("application/".concat(t),E);var x=g.ownerDocument.createElement("div");return x.appendChild(g),x.setAttribute("hidden","true"),g.ownerDocument.body.appendChild(x),s.setData("text/html",x.innerHTML),s.setData("text/plain",cy(x)),g.ownerDocument.body.removeChild(x),s}}},r.insertData=s=>{r.insertFragmentData(s)||r.insertTextData(s)},r.insertFragmentData=s=>{var u=s.getData("application/".concat(t))||jS(s);if(u){var c=decodeURIComponent(window.atob(u)),f=JSON.parse(c);return r.insertFragment(f),!0}return!1},r.insertTextData=s=>{var u=s.getData("text/plain");if(u){var c=u.split(/\r\n|\r|\n/),f=!1;for(var p of c)f&&Ie.splitNodes(r,{always:!0}),r.insertText(p),f=!0;return!0}return!1},r.onChange=s=>{var u=ty<18?Hi.unstable_batchedUpdates:c=>c();u(()=>{var c=yd.get(r);c&&c(s),o(s)})},r},pa=(e,t)=>{var r=[];for(var[n,o]of I.levels(e,{at:t})){var a=$e.findKey(e,n);r.push([o,a])}return r};function mp(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ia=mp();function wy(e){ia=e}var ji={exec:()=>null};function Yt(e,t=""){let r=typeof e=="string"?e:e.source;const n={replace:(o,a)=>{let i=typeof a=="string"?a:a.source;return i=i.replace(tn.caret,"$1"),r=r.replace(o,i),n},getRegex:()=>new RegExp(r,t)};return n}var tn={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},K2=/^(?:[ \t]*(?:\n|$))+/,q2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,V2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,vl=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,U2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hp=/(?:[*+-]|\d{1,9}[.)])/,Ey=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ky=Yt(Ey).replace(/bull/g,hp).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),X2=Yt(Ey).replace(/bull/g,hp).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),gp=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,G2=/^[^\n]+/,vp=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Y2=Yt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",vp).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Z2=Yt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,hp).getRegex(),au="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",bp=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,J2=Yt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",bp).replace("tag",au).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Dy=Yt(gp).replace("hr",vl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",au).getRegex(),Q2=Yt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Dy).getRegex(),yp={blockquote:Q2,code:q2,def:Y2,fences:V2,heading:U2,hr:vl,html:J2,lheading:ky,list:Z2,newline:K2,paragraph:Dy,table:ji,text:G2},pg=Yt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",vl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",au).getRegex(),e$={...yp,lheading:X2,table:pg,paragraph:Yt(gp).replace("hr",vl).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",pg).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",au).getRegex()},t$={...yp,html:Yt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",bp).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ji,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Yt(gp).replace("hr",vl).replace("heading",` *#{1,6} *[^
|
|
25
|
+
]`).replace("lheading",ky).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},r$=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,n$=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Sy=/^( {2,}|\\)\n(?!\s*$)/,o$=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,iu=/[\p{P}\p{S}]/u,Cp=/[\s\p{P}\p{S}]/u,$y=/[^\s\p{P}\p{S}]/u,a$=Yt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Cp).getRegex(),By=/(?!~)[\p{P}\p{S}]/u,i$=/(?!~)[\s\p{P}\p{S}]/u,l$=/(?:[^\s\p{P}\p{S}]|~)/u,s$=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Oy=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,u$=Yt(Oy,"u").replace(/punct/g,iu).getRegex(),c$=Yt(Oy,"u").replace(/punct/g,By).getRegex(),Ay="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",d$=Yt(Ay,"gu").replace(/notPunctSpace/g,$y).replace(/punctSpace/g,Cp).replace(/punct/g,iu).getRegex(),f$=Yt(Ay,"gu").replace(/notPunctSpace/g,l$).replace(/punctSpace/g,i$).replace(/punct/g,By).getRegex(),p$=Yt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,$y).replace(/punctSpace/g,Cp).replace(/punct/g,iu).getRegex(),m$=Yt(/\\(punct)/,"gu").replace(/punct/g,iu).getRegex(),h$=Yt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),g$=Yt(bp).replace("(?:-->|$)","-->").getRegex(),v$=Yt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",g$).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Bs=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,b$=Yt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Bs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Fy=Yt(/^!?\[(label)\]\[(ref)\]/).replace("label",Bs).replace("ref",vp).getRegex(),Ny=Yt(/^!?\[(ref)\](?:\[\])?/).replace("ref",vp).getRegex(),y$=Yt("reflink|nolink(?!\\()","g").replace("reflink",Fy).replace("nolink",Ny).getRegex(),xp={_backpedal:ji,anyPunctuation:m$,autolink:h$,blockSkip:s$,br:Sy,code:n$,del:ji,emStrongLDelim:u$,emStrongRDelimAst:d$,emStrongRDelimUnd:p$,escape:r$,link:b$,nolink:Ny,punctuation:a$,reflink:Fy,reflinkSearch:y$,tag:v$,text:o$,url:ji},C$={...xp,link:Yt(/^!?\[(label)\]\((.*?)\)/).replace("label",Bs).getRegex(),reflink:Yt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Bs).getRegex()},kd={...xp,emStrongRDelimAst:f$,emStrongLDelim:c$,url:Yt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},x$={...kd,br:Yt(Sy).replace("{2,}","*").getRegex(),text:Yt(kd.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},_l={normal:yp,gfm:e$,pedantic:t$},gi={normal:xp,gfm:kd,breaks:x$,pedantic:C$},w$={"&":"&","<":"<",">":">",'"':""","'":"'"},mg=e=>w$[e];function Vn(e,t){if(t){if(tn.escapeTest.test(e))return e.replace(tn.escapeReplace,mg)}else if(tn.escapeTestNoEncode.test(e))return e.replace(tn.escapeReplaceNoEncode,mg);return e}function hg(e){try{e=encodeURI(e).replace(tn.percentDecode,"%")}catch{return null}return e}function gg(e,t){var a;const r=e.replace(tn.findPipe,(i,l,s)=>{let u=!1,c=l;for(;--c>=0&&s[c]==="\\";)u=!u;return u?"|":" |"}),n=r.split(tn.splitPipe);let o=0;if(n[0].trim()||n.shift(),n.length>0&&!((a=n.at(-1))!=null&&a.trim())&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push("");for(;o<n.length;o++)n[o]=n[o].trim().replace(tn.slashPipe,"|");return n}function vi(e,t,r){const n=e.length;if(n===0)return"";let o=0;for(;o<n&&e.charAt(n-o-1)===t;)o++;return e.slice(0,n-o)}function E$(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let n=0;n<e.length;n++)if(e[n]==="\\")n++;else if(e[n]===t[0])r++;else if(e[n]===t[1]&&(r--,r<0))return n;return r>0?-2:-1}function vg(e,t,r,n,o){const a=t.href,i=t.title||null,l=e[1].replace(o.other.outputLinkReplace,"$1");n.state.inLink=!0;const s={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:i,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,s}function k$(e,t,r){const n=e.match(r.other.indentCodeCompensation);if(n===null)return t;const o=n[1];return t.split(`
|
|
26
|
+
`).map(a=>{const i=a.match(r.other.beginningSpace);if(i===null)return a;const[l]=i;return l.length>=o.length?a.slice(o.length):a}).join(`
|
|
27
|
+
`)}var Os=class{constructor(e){rr(this,"options"),rr(this,"rules"),rr(this,"lexer"),this.options=e||ia}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:vi(r,`
|
|
28
|
+
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const r=t[0],n=k$(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){const n=vi(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:vi(t[0],`
|
|
29
|
+
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let r=vi(t[0],`
|
|
30
|
+
`).split(`
|
|
31
|
+
`),n="",o="";const a=[];for(;r.length>0;){let i=!1;const l=[];let s;for(s=0;s<r.length;s++)if(this.rules.other.blockquoteStart.test(r[s]))l.push(r[s]),i=!0;else if(!i)l.push(r[s]);else break;r=r.slice(s);const u=l.join(`
|
|
32
|
+
`),c=u.replace(this.rules.other.blockquoteSetextReplace,`
|
|
33
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
34
|
+
${u}`:u,o=o?`${o}
|
|
35
|
+
${c}`:c;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,a,!0),this.lexer.state.top=f,r.length===0)break;const p=a.at(-1);if((p==null?void 0:p.type)==="code")break;if((p==null?void 0:p.type)==="blockquote"){const h=p,v=h.raw+`
|
|
36
|
+
`+r.join(`
|
|
37
|
+
`),g=this.blockquote(v);a[a.length-1]=g,n=n.substring(0,n.length-h.raw.length)+g.raw,o=o.substring(0,o.length-h.text.length)+g.text;break}else if((p==null?void 0:p.type)==="list"){const h=p,v=h.raw+`
|
|
38
|
+
`+r.join(`
|
|
39
|
+
`),g=this.list(v);a[a.length-1]=g,n=n.substring(0,n.length-p.raw.length)+g.raw,o=o.substring(0,o.length-h.raw.length)+g.raw,r=v.substring(a.at(-1).raw.length).split(`
|
|
40
|
+
`);continue}}return{type:"blockquote",raw:n,tokens:a,text:o}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim();const n=r.length>1,o={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");const a=this.rules.other.listItemRegex(r);let i=!1;for(;e;){let s=!1,u="",c="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;u=t[0],e=e.substring(u.length);let f=t[2].split(`
|
|
41
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),p=e.split(`
|
|
42
|
+
`,1)[0],h=!f.trim(),v=0;if(this.options.pedantic?(v=2,c=f.trimStart()):h?v=t[1].length+1:(v=t[2].search(this.rules.other.nonSpaceChar),v=v>4?1:v,c=f.slice(v),v+=t[1].length),h&&this.rules.other.blankLine.test(p)&&(u+=p+`
|
|
43
|
+
`,e=e.substring(p.length+1),s=!0),!s){const b=this.rules.other.nextBulletRegex(v),y=this.rules.other.hrRegex(v),C=this.rules.other.fencesBeginRegex(v),D=this.rules.other.headingBeginRegex(v),w=this.rules.other.htmlBeginRegex(v);for(;e;){const k=e.split(`
|
|
44
|
+
`,1)[0];let E;if(p=k,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),E=p):E=p.replace(this.rules.other.tabCharGlobal," "),C.test(p)||D.test(p)||w.test(p)||b.test(p)||y.test(p))break;if(E.search(this.rules.other.nonSpaceChar)>=v||!p.trim())c+=`
|
|
45
|
+
`+E.slice(v);else{if(h||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||C.test(f)||D.test(f)||y.test(f))break;c+=`
|
|
46
|
+
`+p}!h&&!p.trim()&&(h=!0),u+=k+`
|
|
47
|
+
`,e=e.substring(k.length+1),f=E.slice(v)}}o.loose||(i?o.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(i=!0));let g=null,m;this.options.gfm&&(g=this.rules.other.listIsTask.exec(c),g&&(m=g[0]!=="[ ] ",c=c.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:u,task:!!g,checked:m,loose:!1,text:c,tokens:[]}),o.raw+=u}const l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let s=0;s<o.items.length;s++)if(this.lexer.state.top=!1,o.items[s].tokens=this.lexer.blockTokens(o.items[s].text,[]),!o.loose){const u=o.items[s].tokens.filter(f=>f.type==="space"),c=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));o.loose=c}if(o.loose)for(let s=0;s<o.items.length;s++)o.items[s].loose=!0;return o}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:n,title:o}}}table(e){var i;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const r=gg(t[1]),n=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(i=t[3])!=null&&i.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
48
|
+
`):[],a={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===n.length){for(const l of n)this.rules.other.tableAlignRight.test(l)?a.align.push("right"):this.rules.other.tableAlignCenter.test(l)?a.align.push("center"):this.rules.other.tableAlignLeft.test(l)?a.align.push("left"):a.align.push(null);for(let l=0;l<r.length;l++)a.header.push({text:r[l],tokens:this.lexer.inline(r[l]),header:!0,align:a.align[l]});for(const l of o)a.rows.push(gg(l,a.header.length).map((s,u)=>({text:s,tokens:this.lexer.inline(s),header:!1,align:a.align[u]})));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const r=t[1].charAt(t[1].length-1)===`
|
|
49
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;const a=vi(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{const a=E$(t[2],"()");if(a===-2)return;if(a>-1){const i=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,i).trim(),t[3]=""}}let n=t[2],o="";if(this.options.pedantic){const a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],o=a[3])}else o=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),vg(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){const n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=t[n.toLowerCase()];if(!o){const a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return vg(r,o,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){const o=[...n[0]].length-1;let a,i,l=o,s=0;const u=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+o);(n=u.exec(t))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(i=[...a].length,n[3]||n[4]){l+=i;continue}else if((n[5]||n[6])&&o%3&&!((o+i)%3)){s+=i;continue}if(l-=i,l>0)continue;i=Math.min(i,i+l+s);const c=[...n[0]][0].length,f=e.slice(0,o+n.index+c+i);if(Math.min(o,i)%2){const h=f.slice(1,-1);return{type:"em",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}const p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(r),o=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&o&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let r,n;return t[2]==="@"?(r=t[1],n="mailto:"+r):(r=t[1],n=r),{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(e){var r;let t;if(t=this.rules.inline.url.exec(e)){let n,o;if(t[2]==="@")n=t[0],o="mailto:"+n;else{let a;do a=t[0],t[0]=((r=this.rules.inline._backpedal.exec(t[0]))==null?void 0:r[0])??"";while(a!==t[0]);n=t[0],t[1]==="www."?o="http://"+t[0]:o=t[0]}return{type:"link",raw:t[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},mo=class Dd{constructor(t){rr(this,"tokens"),rr(this,"options"),rr(this,"state"),rr(this,"tokenizer"),rr(this,"inlineQueue"),this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ia,this.options.tokenizer=this.options.tokenizer||new Os,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const r={other:tn,block:_l.normal,inline:gi.normal};this.options.pedantic?(r.block=_l.pedantic,r.inline=gi.pedantic):this.options.gfm&&(r.block=_l.gfm,this.options.breaks?r.inline=gi.breaks:r.inline=gi.gfm),this.tokenizer.rules=r}static get rules(){return{block:_l,inline:gi}}static lex(t,r){return new Dd(r).lex(t)}static lexInline(t,r){return new Dd(r).inlineTokens(t)}lex(t){t=t.replace(tn.carriageReturn,`
|
|
50
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){const n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],n=!1){var o,a,i;for(this.options.pedantic&&(t=t.replace(tn.tabCharGlobal," ").replace(tn.spaceLine,""));t;){let l;if((a=(o=this.options.extensions)==null?void 0:o.block)!=null&&a.some(u=>(l=u.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);const u=r.at(-1);l.raw.length===1&&u!==void 0?u.raw+=`
|
|
51
|
+
`:r.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);const u=r.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=`
|
|
52
|
+
`+l.raw,u.text+=`
|
|
53
|
+
`+l.text,this.inlineQueue.at(-1).src=u.text):r.push(l);continue}if(l=this.tokenizer.fences(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.heading(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.hr(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.blockquote(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.list(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.html(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.def(t)){t=t.substring(l.raw.length);const u=r.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=`
|
|
54
|
+
`+l.raw,u.text+=`
|
|
55
|
+
`+l.raw,this.inlineQueue.at(-1).src=u.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title});continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),r.push(l);continue}let s=t;if((i=this.options.extensions)!=null&&i.startBlock){let u=1/0;const c=t.slice(1);let f;this.options.extensions.startBlock.forEach(p=>{f=p.call({lexer:this},c),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(s=t.substring(0,u+1))}if(this.state.top&&(l=this.tokenizer.paragraph(s))){const u=r.at(-1);n&&(u==null?void 0:u.type)==="paragraph"?(u.raw+=`
|
|
56
|
+
`+l.raw,u.text+=`
|
|
57
|
+
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):r.push(l),n=s.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);const u=r.at(-1);(u==null?void 0:u.type)==="text"?(u.raw+=`
|
|
58
|
+
`+l.raw,u.text+=`
|
|
59
|
+
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):r.push(l);continue}if(t){const u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,s,u;let n=t,o=null;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)c.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,o.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(o=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let a=!1,i="";for(;t;){a||(i=""),a=!1;let c;if((s=(l=this.options.extensions)==null?void 0:l.inline)!=null&&s.some(p=>(c=p.call({lexer:this},t,r))?(t=t.substring(c.raw.length),r.push(c),!0):!1))continue;if(c=this.tokenizer.escape(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.tag(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.link(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(c.raw.length);const p=r.at(-1);c.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=c.raw,p.text+=c.text):r.push(c);continue}if(c=this.tokenizer.emStrong(t,n,i)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.codespan(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.br(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.del(t)){t=t.substring(c.raw.length),r.push(c);continue}if(c=this.tokenizer.autolink(t)){t=t.substring(c.raw.length),r.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(t))){t=t.substring(c.raw.length),r.push(c);continue}let f=t;if((u=this.options.extensions)!=null&&u.startInline){let p=1/0;const h=t.slice(1);let v;this.options.extensions.startInline.forEach(g=>{v=g.call({lexer:this},h),typeof v=="number"&&v>=0&&(p=Math.min(p,v))}),p<1/0&&p>=0&&(f=t.substring(0,p+1))}if(c=this.tokenizer.inlineText(f)){t=t.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(i=c.raw.slice(-1)),a=!0;const p=r.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=c.raw,p.text+=c.text):r.push(c);continue}if(t){const p="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return r}},As=class{constructor(e){rr(this,"options"),rr(this,"parser"),this.options=e||ia}space(e){return""}code({text:e,lang:t,escaped:r}){var a;const n=(a=(t||"").match(tn.notSpaceStart))==null?void 0:a[0],o=e.replace(tn.endingNewline,"")+`
|
|
60
|
+
`;return n?'<pre><code class="language-'+Vn(n)+'">'+(r?o:Vn(o,!0))+`</code></pre>
|
|
61
|
+
`:"<pre><code>"+(r?o:Vn(o,!0))+`</code></pre>
|
|
62
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
63
|
+
${this.parser.parse(e)}</blockquote>
|
|
64
|
+
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
65
|
+
`}hr(e){return`<hr>
|
|
66
|
+
`}list(e){const t=e.ordered,r=e.start;let n="";for(let i=0;i<e.items.length;i++){const l=e.items[i];n+=this.listitem(l)}const o=t?"ol":"ul",a=t&&r!==1?' start="'+r+'"':"";return"<"+o+a+`>
|
|
67
|
+
`+n+"</"+o+`>
|
|
68
|
+
`}listitem(e){var r;let t="";if(e.task){const n=this.checkbox({checked:!!e.checked});e.loose?((r=e.tokens[0])==null?void 0:r.type)==="paragraph"?(e.tokens[0].text=n+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=n+" "+Vn(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:n+" ",text:n+" ",escaped:!0}):t+=n+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
|
69
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
70
|
+
`}table(e){let t="",r="";for(let o=0;o<e.header.length;o++)r+=this.tablecell(e.header[o]);t+=this.tablerow({text:r});let n="";for(let o=0;o<e.rows.length;o++){const a=e.rows[o];r="";for(let i=0;i<a.length;i++)r+=this.tablecell(a[i]);n+=this.tablerow({text:r})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
71
|
+
<thead>
|
|
72
|
+
`+t+`</thead>
|
|
73
|
+
`+n+`</table>
|
|
74
|
+
`}tablerow({text:e}){return`<tr>
|
|
75
|
+
${e}</tr>
|
|
76
|
+
`}tablecell(e){const t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
|
|
77
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Vn(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){const n=this.parser.parseInline(r),o=hg(e);if(o===null)return n;e=o;let a='<a href="'+e+'"';return t&&(a+=' title="'+Vn(t)+'"'),a+=">"+n+"</a>",a}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));const o=hg(e);if(o===null)return Vn(r);e=o;let a=`<img src="${e}" alt="${r}"`;return t&&(a+=` title="${Vn(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Vn(e.text)}},wp=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},ho=class Sd{constructor(t){rr(this,"options"),rr(this,"renderer"),rr(this,"textRenderer"),this.options=t||ia,this.options.renderer=this.options.renderer||new As,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new wp}static parse(t,r){return new Sd(r).parse(t)}static parseInline(t,r){return new Sd(r).parseInline(t)}parse(t,r=!0){var o,a;let n="";for(let i=0;i<t.length;i++){const l=t[i];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[l.type]){const u=l,c=this.options.extensions.renderers[u.type].call({parser:this},u);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(u.type)){n+=c||"";continue}}const s=l;switch(s.type){case"space":{n+=this.renderer.space(s);continue}case"hr":{n+=this.renderer.hr(s);continue}case"heading":{n+=this.renderer.heading(s);continue}case"code":{n+=this.renderer.code(s);continue}case"table":{n+=this.renderer.table(s);continue}case"blockquote":{n+=this.renderer.blockquote(s);continue}case"list":{n+=this.renderer.list(s);continue}case"html":{n+=this.renderer.html(s);continue}case"paragraph":{n+=this.renderer.paragraph(s);continue}case"text":{let u=s,c=this.renderer.text(u);for(;i+1<t.length&&t[i+1].type==="text";)u=t[++i],c+=`
|
|
78
|
+
`+this.renderer.text(u);r?n+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):n+=c;continue}default:{const u='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}parseInline(t,r=this.renderer){var o,a;let n="";for(let i=0;i<t.length;i++){const l=t[i];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[l.type]){const u=this.options.extensions.renderers[l.type].call({parser:this},l);if(u!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){n+=u||"";continue}}const s=l;switch(s.type){case"escape":{n+=r.text(s);break}case"html":{n+=r.html(s);break}case"link":{n+=r.link(s);break}case"image":{n+=r.image(s);break}case"strong":{n+=r.strong(s);break}case"em":{n+=r.em(s);break}case"codespan":{n+=r.codespan(s);break}case"br":{n+=r.br(s);break}case"del":{n+=r.del(s);break}case"text":{n+=r.text(s);break}default:{const u='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}},bc,ns=(bc=class{constructor(e){rr(this,"options"),rr(this,"block"),this.options=e||ia}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?mo.lex:mo.lexInline}provideParser(){return this.block?ho.parse:ho.parseInline}},rr(bc,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),bc),D$=class{constructor(...e){rr(this,"defaults",mp()),rr(this,"options",this.setOptions),rr(this,"parse",this.parseMarkdown(!0)),rr(this,"parseInline",this.parseMarkdown(!1)),rr(this,"Parser",ho),rr(this,"Renderer",As),rr(this,"TextRenderer",wp),rr(this,"Lexer",mo),rr(this,"Tokenizer",Os),rr(this,"Hooks",ns),this.use(...e)}walkTokens(e,t){var n,o;let r=[];for(const a of e)switch(r=r.concat(t.call(this,a)),a.type){case"table":{const i=a;for(const l of i.header)r=r.concat(this.walkTokens(l.tokens,t));for(const l of i.rows)for(const s of l)r=r.concat(this.walkTokens(s.tokens,t));break}case"list":{const i=a;r=r.concat(this.walkTokens(i.items,t));break}default:{const i=a;(o=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&o[i.type]?this.defaults.extensions.childTokens[i.type].forEach(l=>{const s=i[l].flat(1/0);r=r.concat(this.walkTokens(s,t))}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,t)))}}return r}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{const n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){const a=t.renderers[o.name];a?t.renderers[o.name]=function(...i){let l=o.renderer.apply(this,i);return l===!1&&(l=a.apply(this,i)),l}:t.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const a=t[o.level];a?a.unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(t.childTokens[o.name]=o.childTokens)}),n.extensions=t),r.renderer){const o=this.defaults.renderer||new As(this.defaults);for(const a in r.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;const i=a,l=r.renderer[i],s=o[i];o[i]=(...u)=>{let c=l.apply(o,u);return c===!1&&(c=s.apply(o,u)),c||""}}n.renderer=o}if(r.tokenizer){const o=this.defaults.tokenizer||new Os(this.defaults);for(const a in r.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;const i=a,l=r.tokenizer[i],s=o[i];o[i]=(...u)=>{let c=l.apply(o,u);return c===!1&&(c=s.apply(o,u)),c}}n.tokenizer=o}if(r.hooks){const o=this.defaults.hooks||new ns;for(const a in r.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;const i=a,l=r.hooks[i],s=o[i];ns.passThroughHooks.has(a)?o[i]=u=>{if(this.defaults.async)return Promise.resolve(l.call(o,u)).then(f=>s.call(o,f));const c=l.call(o,u);return s.call(o,c)}:o[i]=(...u)=>{let c=l.apply(o,u);return c===!1&&(c=s.apply(o,u)),c}}n.hooks=o}if(r.walkTokens){const o=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(i){let l=[];return l.push(a.call(this,i)),o&&(l=l.concat(o.call(this,i))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return mo.lex(e,t??this.defaults)}parser(e,t){return ho.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{const n={...r},o={...this.defaults,...n},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&n.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const i=o.hooks?o.hooks.provideLexer():e?mo.lex:mo.lexInline,l=o.hooks?o.hooks.provideParser():e?ho.parse:ho.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(s=>i(s,o)).then(s=>o.hooks?o.hooks.processAllTokens(s):s).then(s=>o.walkTokens?Promise.all(this.walkTokens(s,o.walkTokens)).then(()=>s):s).then(s=>l(s,o)).then(s=>o.hooks?o.hooks.postprocess(s):s).catch(a);try{o.hooks&&(t=o.hooks.preprocess(t));let s=i(t,o);o.hooks&&(s=o.hooks.processAllTokens(s)),o.walkTokens&&this.walkTokens(s,o.walkTokens);let u=l(s,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(s){return a(s)}}}onError(e,t){return r=>{if(r.message+=`
|
|
79
|
+
Please report this to https://github.com/markedjs/marked.`,e){const n="<p>An error occurred:</p><pre>"+Vn(r.message+"",!0)+"</pre>";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},ta=new D$;function Kt(e,t){return ta.parse(e,t)}Kt.options=Kt.setOptions=function(e){return ta.setOptions(e),Kt.defaults=ta.defaults,wy(Kt.defaults),Kt};Kt.getDefaults=mp;Kt.defaults=ia;Kt.use=function(...e){return ta.use(...e),Kt.defaults=ta.defaults,wy(Kt.defaults),Kt};Kt.walkTokens=function(e,t){return ta.walkTokens(e,t)};Kt.parseInline=ta.parseInline;Kt.Parser=ho;Kt.parser=ho.parse;Kt.Renderer=As;Kt.TextRenderer=wp;Kt.Lexer=mo;Kt.lexer=mo.lex;Kt.Tokenizer=Os;Kt.Hooks=ns;Kt.parse=Kt;Kt.options;Kt.setOptions;Kt.use;Kt.walkTokens;Kt.parseInline;ho.parse;mo.lex;var cn=function(){return cn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},cn.apply(this,arguments)};function Fs(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var or="-ms-",Ri="-moz-",Gt="-webkit-",Py="comm",lu="rule",Ep="decl",S$="@import",jy="@keyframes",$$="@layer",Ry=Math.abs,kp=String.fromCharCode,$d=Object.assign;function B$(e,t){return jr(e,0)^45?(((t<<2^jr(e,0))<<2^jr(e,1))<<2^jr(e,2))<<2^jr(e,3):0}function Iy(e){return e.trim()}function uo(e,t){return(e=t.exec(e))?e[0]:e}function Nt(e,t,r){return e.replace(t,r)}function os(e,t,r){return e.indexOf(t,r)}function jr(e,t){return e.charCodeAt(t)|0}function za(e,t,r){return e.slice(t,r)}function Gn(e){return e.length}function Ty(e){return e.length}function Si(e,t){return t.push(e),e}function O$(e,t){return e.map(t).join("")}function bg(e,t){return e.filter(function(r){return!uo(r,t)})}var su=1,La=1,My=0,On=0,Er=0,ri="";function uu(e,t,r,n,o,a,i,l){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:su,column:La,length:i,return:"",siblings:l}}function wo(e,t){return $d(uu("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function ma(e){for(;e.root;)e=wo(e.root,{children:[e]});Si(e,e.siblings)}function A$(){return Er}function F$(){return Er=On>0?jr(ri,--On):0,La--,Er===10&&(La=1,su--),Er}function Mn(){return Er=On<My?jr(ri,On++):0,La++,Er===10&&(La=1,su++),Er}function Go(){return jr(ri,On)}function as(){return On}function cu(e,t){return za(ri,e,t)}function Bd(e){switch(e){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 N$(e){return su=La=1,My=Gn(ri=e),On=0,[]}function P$(e){return ri="",e}function yc(e){return Iy(cu(On-1,Od(e===91?e+2:e===40?e+1:e)))}function j$(e){for(;(Er=Go())&&Er<33;)Mn();return Bd(e)>2||Bd(Er)>3?"":" "}function R$(e,t){for(;--t&&Mn()&&!(Er<48||Er>102||Er>57&&Er<65||Er>70&&Er<97););return cu(e,as()+(t<6&&Go()==32&&Mn()==32))}function Od(e){for(;Mn();)switch(Er){case e:return On;case 34:case 39:e!==34&&e!==39&&Od(Er);break;case 40:e===41&&Od(e);break;case 92:Mn();break}return On}function I$(e,t){for(;Mn()&&e+Er!==57&&!(e+Er===84&&Go()===47););return"/*"+cu(t,On-1)+"*"+kp(e===47?e:Mn())}function T$(e){for(;!Bd(Go());)Mn();return cu(e,On)}function M$(e){return P$(is("",null,null,null,[""],e=N$(e),0,[0],e))}function is(e,t,r,n,o,a,i,l,s){for(var u=0,c=0,f=i,p=0,h=0,v=0,g=1,m=1,b=1,y=0,C="",D=o,w=a,k=n,E=C;m;)switch(v=y,y=Mn()){case 40:if(v!=108&&jr(E,f-1)==58){os(E+=Nt(yc(y),"&","&\f"),"&\f",Ry(u?l[u-1]:0))!=-1&&(b=-1);break}case 34:case 39:case 91:E+=yc(y);break;case 9:case 10:case 13:case 32:E+=j$(v);break;case 92:E+=R$(as()-1,7);continue;case 47:switch(Go()){case 42:case 47:Si(z$(I$(Mn(),as()),t,r,s),s);break;default:E+="/"}break;case 123*g:l[u++]=Gn(E)*b;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+c:b==-1&&(E=Nt(E,/\f/g,"")),h>0&&Gn(E)-f&&Si(h>32?Cg(E+";",n,r,f-1,s):Cg(Nt(E," ","")+";",n,r,f-2,s),s);break;case 59:E+=";";default:if(Si(k=yg(E,t,r,u,c,o,l,C,D=[],w=[],f,a),a),y===123)if(c===0)is(E,t,k,k,D,a,f,l,w);else switch(p===99&&jr(E,3)===110?100:p){case 100:case 108:case 109:case 115:is(e,k,k,n&&Si(yg(e,k,k,0,0,o,l,C,o,D=[],f,w),w),o,w,f,l,n?D:w);break;default:is(E,k,k,k,[""],w,0,l,w)}}u=c=h=0,g=b=1,C=E="",f=i;break;case 58:f=1+Gn(E),h=v;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&F$()==125)continue}switch(E+=kp(y),y*g){case 38:b=c>0?1:(E+="\f",-1);break;case 44:l[u++]=(Gn(E)-1)*b,b=1;break;case 64:Go()===45&&(E+=yc(Mn())),p=Go(),c=f=Gn(C=E+=T$(as())),y++;break;case 45:v===45&&Gn(E)==2&&(g=0)}}return a}function yg(e,t,r,n,o,a,i,l,s,u,c,f){for(var p=o-1,h=o===0?a:[""],v=Ty(h),g=0,m=0,b=0;g<n;++g)for(var y=0,C=za(e,p+1,p=Ry(m=i[g])),D=e;y<v;++y)(D=Iy(m>0?h[y]+" "+C:Nt(C,/&\f/g,h[y])))&&(s[b++]=D);return uu(e,t,r,o===0?lu:l,s,u,c,f)}function z$(e,t,r,n){return uu(e,t,r,Py,kp(A$()),za(e,2,-2),0,n)}function Cg(e,t,r,n,o){return uu(e,t,r,Ep,za(e,0,n),za(e,n+1,-1),n,o)}function zy(e,t,r){switch(B$(e,t)){case 5103:return Gt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Gt+e+e;case 4789:return Ri+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Gt+e+Ri+e+or+e+e;case 5936:switch(jr(e,t+11)){case 114:return Gt+e+or+Nt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Gt+e+or+Nt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Gt+e+or+Nt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Gt+e+or+e+e;case 6165:return Gt+e+or+"flex-"+e+e;case 5187:return Gt+e+Nt(e,/(\w+).+(:[^]+)/,Gt+"box-$1$2"+or+"flex-$1$2")+e;case 5443:return Gt+e+or+"flex-item-"+Nt(e,/flex-|-self/g,"")+(uo(e,/flex-|baseline/)?"":or+"grid-row-"+Nt(e,/flex-|-self/g,""))+e;case 4675:return Gt+e+or+"flex-line-pack"+Nt(e,/align-content|flex-|-self/g,"")+e;case 5548:return Gt+e+or+Nt(e,"shrink","negative")+e;case 5292:return Gt+e+or+Nt(e,"basis","preferred-size")+e;case 6060:return Gt+"box-"+Nt(e,"-grow","")+Gt+e+or+Nt(e,"grow","positive")+e;case 4554:return Gt+Nt(e,/([^-])(transform)/g,"$1"+Gt+"$2")+e;case 6187:return Nt(Nt(Nt(e,/(zoom-|grab)/,Gt+"$1"),/(image-set)/,Gt+"$1"),e,"")+e;case 5495:case 3959:return Nt(e,/(image-set\([^]*)/,Gt+"$1$`$1");case 4968:return Nt(Nt(e,/(.+:)(flex-)?(.*)/,Gt+"box-pack:$3"+or+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Gt+e+e;case 4200:if(!uo(e,/flex-|baseline/))return or+"grid-column-align"+za(e,t)+e;break;case 2592:case 3360:return or+Nt(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(n,o){return t=o,uo(n.props,/grid-\w+-end/)})?~os(e+(r=r[t].value),"span",0)?e:or+Nt(e,"-start","")+e+or+"grid-row-span:"+(~os(r,"span",0)?uo(r,/\d+/):+uo(r,/\d+/)-+uo(e,/\d+/))+";":or+Nt(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(n){return uo(n.props,/grid-\w+-start/)})?e:or+Nt(Nt(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Nt(e,/(.+)-inline(.+)/,Gt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Gn(e)-1-t>6)switch(jr(e,t+1)){case 109:if(jr(e,t+4)!==45)break;case 102:return Nt(e,/(.+:)(.+)-([^]+)/,"$1"+Gt+"$2-$3$1"+Ri+(jr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~os(e,"stretch",0)?zy(Nt(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Nt(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(n,o,a,i,l,s,u){return or+o+":"+a+u+(i?or+o+"-span:"+(l?s:+s-+a)+u:"")+e});case 4949:if(jr(e,t+6)===121)return Nt(e,":",":"+Gt)+e;break;case 6444:switch(jr(e,jr(e,14)===45?18:11)){case 120:return Nt(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Gt+(jr(e,14)===45?"inline-":"")+"box$3$1"+Gt+"$2$3$1"+or+"$2box$3")+e;case 100:return Nt(e,":",":"+or)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Nt(e,"scroll-","scroll-snap-")+e}return e}function Ns(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function L$(e,t,r,n){switch(e.type){case $$:if(e.children.length)break;case S$:case Ep:return e.return=e.return||e.value;case Py:return"";case jy:return e.return=e.value+"{"+Ns(e.children,n)+"}";case lu:if(!Gn(e.value=e.props.join(",")))return""}return Gn(r=Ns(e.children,n))?e.return=e.value+"{"+r+"}":""}function _$(e){var t=Ty(e);return function(r,n,o,a){for(var i="",l=0;l<t;l++)i+=e[l](r,n,o,a)||"";return i}}function H$(e){return function(t){t.root||(t=t.return)&&e(t)}}function W$(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case Ep:e.return=zy(e.value,e.length,r);return;case jy:return Ns([wo(e,{value:Nt(e.value,"@","@"+Gt)})],n);case lu:if(e.length)return O$(r=e.props,function(o){switch(uo(o,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":ma(wo(e,{props:[Nt(o,/:(read-\w+)/,":"+Ri+"$1")]})),ma(wo(e,{props:[o]})),$d(e,{props:bg(r,n)});break;case"::placeholder":ma(wo(e,{props:[Nt(o,/:(plac\w+)/,":"+Gt+"input-$1")]})),ma(wo(e,{props:[Nt(o,/:(plac\w+)/,":"+Ri+"$1")]})),ma(wo(e,{props:[Nt(o,/:(plac\w+)/,or+"input-$1")]})),ma(wo(e,{props:[o]})),$d(e,{props:bg(r,n)});break}return""})}}var K$={animationIterationCount:1,aspectRatio: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},_a=typeof process<"u"&&gn!==void 0&&(gn.REACT_APP_SC_ATTR||gn.SC_ATTR)||"data-styled",Ly="active",_y="data-styled-version",du="6.1.19",Dp=`/*!sc*/
|
|
80
|
+
`,Ps=typeof window<"u"&&typeof document<"u",q$=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&gn!==void 0&&gn.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&gn.REACT_APP_SC_DISABLE_SPEEDY!==""?gn.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&gn.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&gn!==void 0&&gn.SC_DISABLE_SPEEDY!==void 0&&gn.SC_DISABLE_SPEEDY!==""&&gn.SC_DISABLE_SPEEDY!=="false"&&gn.SC_DISABLE_SPEEDY),fu=Object.freeze([]),Ha=Object.freeze({});function V$(e,t,r){return r===void 0&&(r=Ha),e.theme!==r.theme&&e.theme||t||r.theme}var Hy=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),U$=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,X$=/(^-|-$)/g;function xg(e){return e.replace(U$,"-").replace(X$,"")}var G$=/(a)(d)/gi,Hl=52,wg=function(e){return String.fromCharCode(e+(e>25?39:97))};function Ad(e){var t,r="";for(t=Math.abs(e);t>Hl;t=t/Hl|0)r=wg(t%Hl)+r;return(wg(t%Hl)+r).replace(G$,"$1-$2")}var Cc,Wy=5381,Sa=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},Ky=function(e){return Sa(Wy,e)};function Y$(e){return Ad(Ky(e)>>>0)}function Z$(e){return e.displayName||e.name||"Component"}function xc(e){return typeof e=="string"&&!0}var qy=typeof Symbol=="function"&&Symbol.for,Vy=qy?Symbol.for("react.memo"):60115,J$=qy?Symbol.for("react.forward_ref"):60112,Q$={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},eB={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Uy={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},tB=((Cc={})[J$]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Cc[Vy]=Uy,Cc);function Eg(e){return("type"in(t=e)&&t.type.$$typeof)===Vy?Uy:"$$typeof"in e?tB[e.$$typeof]:Q$;var t}var rB=Object.defineProperty,nB=Object.getOwnPropertyNames,kg=Object.getOwnPropertySymbols,oB=Object.getOwnPropertyDescriptor,aB=Object.getPrototypeOf,Dg=Object.prototype;function Xy(e,t,r){if(typeof t!="string"){if(Dg){var n=aB(t);n&&n!==Dg&&Xy(e,n,r)}var o=nB(t);kg&&(o=o.concat(kg(t)));for(var a=Eg(e),i=Eg(t),l=0;l<o.length;++l){var s=o[l];if(!(s in eB||r&&r[s]||i&&s in i||a&&s in a)){var u=oB(t,s);try{rB(e,s,u)}catch{}}}}return e}function Wa(e){return typeof e=="function"}function Sp(e){return typeof e=="object"&&"styledComponentId"in e}function Ko(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function Sg(e,t){if(e.length===0)return"";for(var r=e[0],n=1;n<e.length;n++)r+=e[n];return r}function Yi(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function Fd(e,t,r){if(r===void 0&&(r=!1),!r&&!Yi(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var n=0;n<t.length;n++)e[n]=Fd(e[n],t[n]);else if(Yi(t))for(var n in t)e[n]=Fd(e[n],t[n]);return e}function $p(e,t){Object.defineProperty(e,"toString",{value:t})}function bl(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var iB=(function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var r=0,n=0;n<t;n++)r+=this.groupSizes[n];return r},e.prototype.insertRules=function(t,r){if(t>=this.groupSizes.length){for(var n=this.groupSizes,o=n.length,a=o;t>=a;)if((a<<=1)<0)throw bl(16,"".concat(t));this.groupSizes=new Uint32Array(a),this.groupSizes.set(n),this.length=a;for(var i=o;i<a;i++)this.groupSizes[i]=0}for(var l=this.indexOfGroup(t+1),s=(i=0,r.length);i<s;i++)this.tag.insertRule(l,r[i])&&(this.groupSizes[t]++,l++)},e.prototype.clearGroup=function(t){if(t<this.length){var r=this.groupSizes[t],n=this.indexOfGroup(t),o=n+r;this.groupSizes[t]=0;for(var a=n;a<o;a++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(t){var r="";if(t>=this.length||this.groupSizes[t]===0)return r;for(var n=this.groupSizes[t],o=this.indexOfGroup(t),a=o+n,i=o;i<a;i++)r+="".concat(this.tag.getRule(i)).concat(Dp);return r},e})(),ls=new Map,js=new Map,ss=1,Wl=function(e){if(ls.has(e))return ls.get(e);for(;js.has(ss);)ss++;var t=ss++;return ls.set(e,t),js.set(t,e),t},lB=function(e,t){ss=t+1,ls.set(e,t),js.set(t,e)},sB="style[".concat(_a,"][").concat(_y,'="').concat(du,'"]'),uB=new RegExp("^".concat(_a,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),cB=function(e,t,r){for(var n,o=r.split(","),a=0,i=o.length;a<i;a++)(n=o[a])&&e.registerName(t,n)},dB=function(e,t){for(var r,n=((r=t.textContent)!==null&&r!==void 0?r:"").split(Dp),o=[],a=0,i=n.length;a<i;a++){var l=n[a].trim();if(l){var s=l.match(uB);if(s){var u=0|parseInt(s[1],10),c=s[2];u!==0&&(lB(c,u),cB(e,c,s[3]),e.getTag().insertRules(u,o)),o.length=0}else o.push(l)}}},$g=function(e){for(var t=document.querySelectorAll(sB),r=0,n=t.length;r<n;r++){var o=t[r];o&&o.getAttribute(_a)!==Ly&&(dB(e,o),o.parentNode&&o.parentNode.removeChild(o))}};function fB(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var Gy=function(e){var t=document.head,r=e||t,n=document.createElement("style"),o=(function(l){var s=Array.from(l.querySelectorAll("style[".concat(_a,"]")));return s[s.length-1]})(r),a=o!==void 0?o.nextSibling:null;n.setAttribute(_a,Ly),n.setAttribute(_y,du);var i=fB();return i&&n.setAttribute("nonce",i),r.insertBefore(n,a),n},pB=(function(){function e(t){this.element=Gy(t),this.element.appendChild(document.createTextNode("")),this.sheet=(function(r){if(r.sheet)return r.sheet;for(var n=document.styleSheets,o=0,a=n.length;o<a;o++){var i=n[o];if(i.ownerNode===r)return i}throw bl(17)})(this.element),this.length=0}return e.prototype.insertRule=function(t,r){try{return this.sheet.insertRule(r,t),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.prototype.getRule=function(t){var r=this.sheet.cssRules[t];return r&&r.cssText?r.cssText:""},e})(),mB=(function(){function e(t){this.element=Gy(t),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(t,r){if(t<=this.length&&t>=0){var n=document.createTextNode(r);return this.element.insertBefore(n,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},e})(),hB=(function(){function e(t){this.rules=[],this.length=0}return e.prototype.insertRule=function(t,r){return t<=this.length&&(this.rules.splice(t,0,r),this.length++,!0)},e.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},e})(),Bg=Ps,gB={isServer:!Ps,useCSSOMInjection:!q$},Yy=(function(){function e(t,r,n){t===void 0&&(t=Ha),r===void 0&&(r={});var o=this;this.options=cn(cn({},gB),t),this.gs=r,this.names=new Map(n),this.server=!!t.isServer,!this.server&&Ps&&Bg&&(Bg=!1,$g(this)),$p(this,function(){return(function(a){for(var i=a.getTag(),l=i.length,s="",u=function(f){var p=(function(b){return js.get(b)})(f);if(p===void 0)return"continue";var h=a.names.get(p),v=i.getGroup(f);if(h===void 0||!h.size||v.length===0)return"continue";var g="".concat(_a,".g").concat(f,'[id="').concat(p,'"]'),m="";h!==void 0&&h.forEach(function(b){b.length>0&&(m+="".concat(b,","))}),s+="".concat(v).concat(g,'{content:"').concat(m,'"}').concat(Dp)},c=0;c<l;c++)u(c);return s})(o)})}return e.registerId=function(t){return Wl(t)},e.prototype.rehydrate=function(){!this.server&&Ps&&$g(this)},e.prototype.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new e(cn(cn({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(t=(function(r){var n=r.useCSSOMInjection,o=r.target;return r.isServer?new hB(o):n?new pB(o):new mB(o)})(this.options),new iB(t)));var t},e.prototype.hasNameForId=function(t,r){return this.names.has(t)&&this.names.get(t).has(r)},e.prototype.registerName=function(t,r){if(Wl(t),this.names.has(t))this.names.get(t).add(r);else{var n=new Set;n.add(r),this.names.set(t,n)}},e.prototype.insertRules=function(t,r,n){this.registerName(t,r),this.getTag().insertRules(Wl(t),n)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(Wl(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e})(),vB=/&/g,bB=/^\s*\/\/.*$/gm;function Zy(e,t){return e.map(function(r){return r.type==="rule"&&(r.value="".concat(t," ").concat(r.value),r.value=r.value.replaceAll(",",",".concat(t," ")),r.props=r.props.map(function(n){return"".concat(t," ").concat(n)})),Array.isArray(r.children)&&r.type!=="@keyframes"&&(r.children=Zy(r.children,t)),r})}function yB(e){var t,r,n,o=Ha,a=o.options,i=a===void 0?Ha:a,l=o.plugins,s=l===void 0?fu:l,u=function(p,h,v){return v.startsWith(r)&&v.endsWith(r)&&v.replaceAll(r,"").length>0?".".concat(t):p},c=s.slice();c.push(function(p){p.type===lu&&p.value.includes("&")&&(p.props[0]=p.props[0].replace(vB,r).replace(n,u))}),i.prefix&&c.push(W$),c.push(L$);var f=function(p,h,v,g){h===void 0&&(h=""),v===void 0&&(v=""),g===void 0&&(g="&"),t=g,r=h,n=new RegExp("\\".concat(r,"\\b"),"g");var m=p.replace(bB,""),b=M$(v||h?"".concat(v," ").concat(h," { ").concat(m," }"):m);i.namespace&&(b=Zy(b,i.namespace));var y=[];return Ns(b,_$(c.concat(H$(function(C){return y.push(C)})))),y};return f.hash=s.length?s.reduce(function(p,h){return h.name||bl(15),Sa(p,h.name)},Wy).toString():"",f}var CB=new Yy,Nd=yB(),Jy=ee.createContext({shouldForwardProp:void 0,styleSheet:CB,stylis:Nd});Jy.Consumer;ee.createContext(void 0);function Og(){return Ir(Jy)}var xB=(function(){function e(t,r){var n=this;this.inject=function(o,a){a===void 0&&(a=Nd);var i=n.name+a.hash;o.hasNameForId(n.id,i)||o.insertRules(n.id,i,a(n.rules,i,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=r,$p(this,function(){throw bl(12,String(n.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=Nd),this.name+t.hash},e})(),wB=function(e){return e>="A"&&e<="Z"};function Ag(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(r===1&&n==="-"&&e[0]==="-")return e;wB(n)?t+="-"+n.toLowerCase():t+=n}return t.startsWith("ms-")?"-"+t:t}var Qy=function(e){return e==null||e===!1||e===""},e1=function(e){var t,r,n=[];for(var o in e){var a=e[o];e.hasOwnProperty(o)&&!Qy(a)&&(Array.isArray(a)&&a.isCss||Wa(a)?n.push("".concat(Ag(o),":"),a,";"):Yi(a)?n.push.apply(n,Fs(Fs(["".concat(o," {")],e1(a),!1),["}"],!1)):n.push("".concat(Ag(o),": ").concat((t=o,(r=a)==null||typeof r=="boolean"||r===""?"":typeof r!="number"||r===0||t in K$||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return n};function Yo(e,t,r,n){if(Qy(e))return[];if(Sp(e))return[".".concat(e.styledComponentId)];if(Wa(e)){if(!Wa(a=e)||a.prototype&&a.prototype.isReactComponent||!t)return[e];var o=e(t);return Yo(o,t,r,n)}var a;return e instanceof xB?r?(e.inject(r,n),[e.getName(n)]):[e]:Yi(e)?e1(e):Array.isArray(e)?Array.prototype.concat.apply(fu,e.map(function(i){return Yo(i,t,r,n)})):[e.toString()]}function EB(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(Wa(r)&&!Sp(r))return!1}return!0}var kB=Ky(du),DB=(function(){function e(t,r,n){this.rules=t,this.staticRulesId="",this.isStatic=(n===void 0||n.isStatic)&&EB(t),this.componentId=r,this.baseHash=Sa(kB,r),this.baseStyle=n,Yy.registerId(r)}return e.prototype.generateAndInjectStyles=function(t,r,n){var o=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,r,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&r.hasNameForId(this.componentId,this.staticRulesId))o=Ko(o,this.staticRulesId);else{var a=Sg(Yo(this.rules,t,r,n)),i=Ad(Sa(this.baseHash,a)>>>0);if(!r.hasNameForId(this.componentId,i)){var l=n(a,".".concat(i),void 0,this.componentId);r.insertRules(this.componentId,i,l)}o=Ko(o,i),this.staticRulesId=i}else{for(var s=Sa(this.baseHash,n.hash),u="",c=0;c<this.rules.length;c++){var f=this.rules[c];if(typeof f=="string")u+=f;else if(f){var p=Sg(Yo(f,t,r,n));s=Sa(s,p+c),u+=p}}if(u){var h=Ad(s>>>0);r.hasNameForId(this.componentId,h)||r.insertRules(this.componentId,h,n(u,".".concat(h),void 0,this.componentId)),o=Ko(o,h)}}return o},e})(),t1=ee.createContext(void 0);t1.Consumer;var wc={};function SB(e,t,r){var n=Sp(e),o=e,a=!xc(e),i=t.attrs,l=i===void 0?fu:i,s=t.componentId,u=s===void 0?(function(D,w){var k=typeof D!="string"?"sc":xg(D);wc[k]=(wc[k]||0)+1;var E="".concat(k,"-").concat(Y$(du+k+wc[k]));return w?"".concat(w,"-").concat(E):E})(t.displayName,t.parentComponentId):s,c=t.displayName,f=c===void 0?(function(D){return xc(D)?"styled.".concat(D):"Styled(".concat(Z$(D),")")})(e):c,p=t.displayName&&t.componentId?"".concat(xg(t.displayName),"-").concat(t.componentId):t.componentId||u,h=n&&o.attrs?o.attrs.concat(l).filter(Boolean):l,v=t.shouldForwardProp;if(n&&o.shouldForwardProp){var g=o.shouldForwardProp;if(t.shouldForwardProp){var m=t.shouldForwardProp;v=function(D,w){return g(D,w)&&m(D,w)}}else v=g}var b=new DB(r,p,n?o.componentStyle:void 0);function y(D,w){return(function(k,E,x){var F=k.attrs,j=k.componentStyle,$=k.defaultProps,P=k.foldedComponentIds,A=k.styledComponentId,O=k.target,S=ee.useContext(t1),B=Og(),R=k.shouldForwardProp||B.shouldForwardProp,N=V$(E,S,$)||Ha,T=(function(te,z,Y){for(var V,G=cn(cn({},z),{className:void 0,theme:Y}),K=0;K<te.length;K+=1){var W=Wa(V=te[K])?V(G):V;for(var re in W)G[re]=re==="className"?Ko(G[re],W[re]):re==="style"?cn(cn({},G[re]),W[re]):W[re]}return z.className&&(G.className=Ko(G.className,z.className)),G})(F,E,N),L=T.as||O,X={};for(var _ in T)T[_]===void 0||_[0]==="$"||_==="as"||_==="theme"&&T.theme===N||(_==="forwardedAs"?X.as=T.forwardedAs:R&&!R(_,L)||(X[_]=T[_]));var q=(function(te,z){var Y=Og(),V=te.generateAndInjectStyles(z,Y.styleSheet,Y.stylis);return V})(j,T),Q=Ko(P,A);return q&&(Q+=" "+q),T.className&&(Q+=" "+T.className),X[xc(L)&&!Hy.has(L)?"class":"className"]=Q,x&&(X.ref=x),xs(L,X)})(C,D,w)}y.displayName=f;var C=ee.forwardRef(y);return C.attrs=h,C.componentStyle=b,C.displayName=f,C.shouldForwardProp=v,C.foldedComponentIds=n?Ko(o.foldedComponentIds,o.styledComponentId):"",C.styledComponentId=p,C.target=n?o.target:e,Object.defineProperty(C,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(D){this._foldedDefaultProps=n?(function(w){for(var k=[],E=1;E<arguments.length;E++)k[E-1]=arguments[E];for(var x=0,F=k;x<F.length;x++)Fd(w,F[x],!0);return w})({},o.defaultProps,D):D}}),$p(C,function(){return".".concat(C.styledComponentId)}),a&&Xy(C,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),C}function Fg(e,t){for(var r=[e[0]],n=0,o=t.length;n<o;n+=1)r.push(t[n],e[n+1]);return r}var Ng=function(e){return Object.assign(e,{isCss:!0})};function $B(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(Wa(e)||Yi(e))return Ng(Yo(Fg(fu,Fs([e],t,!0))));var n=e;return t.length===0&&n.length===1&&typeof n[0]=="string"?Yo(n):Ng(Yo(Fg(n,t)))}function Pd(e,t,r){if(r===void 0&&(r=Ha),!t)throw bl(1,t);var n=function(o){for(var a=[],i=1;i<arguments.length;i++)a[i-1]=arguments[i];return e(t,r,$B.apply(void 0,Fs([o],a,!1)))};return n.attrs=function(o){return Pd(e,t,cn(cn({},r),{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},n.withConfig=function(o){return Pd(e,t,cn(cn({},r),o))},n}var r1=function(e){return Pd(SB,e)},fr=r1;Hy.forEach(function(e){fr[e]=r1(e)});const BB=fr.span`
|
|
81
|
+
display: inline-block;
|
|
82
|
+
min-width: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.minWidth)||"80px"}};
|
|
83
|
+
padding: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.padding)||"2px 6px"}};
|
|
84
|
+
margin: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.margin)||"0 2px"}};
|
|
85
|
+
border-radius: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderRadius)||"4px"}};
|
|
86
|
+
border: none !important;
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
transition: all 0.2s;
|
|
89
|
+
font-weight: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontWeight)||"500"}};
|
|
90
|
+
user-select: none;
|
|
91
|
+
font-size: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontSize)||"14px"}};
|
|
92
|
+
line-height: 2;
|
|
93
|
+
width: auto; /* 让宽度根据内容自动调整 */
|
|
94
|
+
min-width: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.minWidth)||"80px"}};
|
|
95
|
+
min-height: ${e=>{var i,l,s,u;const t=((l=(i=e.$styles)==null?void 0:i.templateField)==null?void 0:l.padding)||"2px 6px",r=((u=(s=e.$styles)==null?void 0:s.templateField)==null?void 0:u.fontSize)||"14px",n=t.split(" ").map(c=>parseInt(c)),o=(n.length,n[0]),a=parseInt(r);return o*2+a*1.4+"px"}};
|
|
96
|
+
|
|
97
|
+
/* 高度自适应 */
|
|
98
|
+
height: auto; /* 允许高度根据内容自动调整 */
|
|
99
|
+
white-space: normal; /* 允许换行 */
|
|
100
|
+
box-sizing: border-box; /* 确保padding和border包含在宽度内 */
|
|
101
|
+
overflow: visible; /* 确保内容不被隐藏 */
|
|
102
|
+
word-wrap: break-word; /* 允许长单词换行 */
|
|
103
|
+
max-width: 100%; /* 限制在容器宽度内 */
|
|
104
|
+
|
|
105
|
+
/* 使用传入的样式配置 */
|
|
106
|
+
background-color: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.backgroundColor)||"#E5EEFF"}};
|
|
107
|
+
color: #055AFF;
|
|
108
|
+
border: 1px solid ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
|
|
109
|
+
|
|
110
|
+
${e=>{var t,r;return e.$isEditing&&`
|
|
111
|
+
background-color: white !important;
|
|
112
|
+
color: #055AFF !important;
|
|
113
|
+
border: 2px solid ${((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"} !important;
|
|
114
|
+
outline: none;
|
|
115
|
+
min-width: 30px;
|
|
116
|
+
`}}
|
|
117
|
+
|
|
118
|
+
&:hover {
|
|
119
|
+
opacity: 0.8;
|
|
120
|
+
}
|
|
121
|
+
`,OB=fr.input`
|
|
122
|
+
background: white;
|
|
123
|
+
border: 2px solid ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
|
|
124
|
+
border-radius: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderRadius)||"4px"}};
|
|
125
|
+
padding: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.padding)||"2px 6px"}};
|
|
126
|
+
margin: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.margin)||"0 2px"}};
|
|
127
|
+
min-width: ${"30px"};
|
|
128
|
+
width: ${e=>{var u,c,f,p;const t=e.$value.length;if(t===0)return((c=(u=e.$styles)==null?void 0:u.templateField)==null?void 0:c.minWidth)||"120px";const r=((p=(f=e.$styles)==null?void 0:f.templateField)==null?void 0:p.padding)||"2px 6.2px",n=r.split(" ").map(h=>parseInt(h)),o=n.length===2?n[1]:n[0],a=12.5,i=20,l=t*a+o*2+i,s=Math.min(Math.max(l,120),e.$maxWidth);return console.log("TemplateInput \u5BBD\u5EA6\u8BA1\u7B97\u8C03\u8BD5:",{contentLength:t,padding:r,paddingValues:n,leftRightPadding:o,charWidth:a,bufferSpace:i,calculatedWidth:l,maxWidth:e.$maxWidth,finalWidth:s,inputValue:e.$value}),s+"px"}} !important; /* 使用!important确保宽度不被覆盖 */
|
|
129
|
+
height: ${e=>{var i,l,s,u;const t=((l=(i=e.$styles)==null?void 0:i.templateField)==null?void 0:l.padding)||"2px 6px",r=((u=(s=e.$styles)==null?void 0:s.templateField)==null?void 0:u.fontSize)||"14px",n=t.split(" ").map(c=>parseInt(c)),o=(n.length,n[0]),a=parseInt(r);return o*2+a*1.4+"px"}};
|
|
130
|
+
font-size: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.fontSize)||"14px"}};
|
|
131
|
+
font-family: inherit;
|
|
132
|
+
outline: none;
|
|
133
|
+
color: #055AFF;
|
|
134
|
+
line-height: 2;
|
|
135
|
+
box-sizing: border-box;
|
|
136
|
+
white-space: nowrap; /* 防止内部换行 */
|
|
137
|
+
overflow: hidden; /* 隐藏超出部分 */
|
|
138
|
+
text-overflow: ellipsis; /* 超出部分显示省略号 */
|
|
139
|
+
|
|
140
|
+
&:focus {
|
|
141
|
+
border-color: ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}};
|
|
142
|
+
box-shadow: 0 0 0 3px ${e=>{var t,r;return((r=(t=e.$styles)==null?void 0:t.templateField)==null?void 0:r.borderColor)||"#84ADFF"}}20;
|
|
143
|
+
}
|
|
144
|
+
`,n1=dn(({element:e,attributes:t,children:r,styles:n,onTemplateChange:o},a)=>{var k,E,x,F,j,$,P,A,O,S,B,R;const i=Cy(),[l,s]=wt(!1),[u,c]=wt(e.value||""),[f,p]=wt(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9"),[h,v]=wt(600),g=Ve(null),m=gt(()=>{try{const N=document.querySelector('[data-slate-editor="true"]');if(N){const T=N.closest('.sc-jwTyAe, .bdQKlw, [role="textbox"]')||N.parentElement;if(T){const L=T.clientWidth,X=L-40;return console.log("TemplateField: \u7F16\u8F91\u5668\u5BB9\u5668\u5BBD\u5EA6:",L,"\u53EF\u7528\u5BBD\u5EA6:",X),Math.max(X,200)}}return 600}catch(N){return console.warn("TemplateField: \u65E0\u6CD5\u83B7\u53D6\u7F16\u8F91\u5668\u5BBD\u5EA6\uFF0C\u4F7F\u7528\u9ED8\u8BA4\u503C:",N),600}},[]);Ot(()=>{p(e.value&&e.value!==""?e.value:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9");const N=m();v(N)},[e.value,e.placeholder,m]);const b=gt(()=>{s(!0),c(e.value||""),setTimeout(()=>{g.current&&(g.current.focus(),g.current.select())},0)},[e.value]),y=gt(N=>{const T=N.target.value;c(T)},[]),C=gt(()=>{const N=$e.findPath(i,e);console.log("TemplateField: \u627E\u5230\u5143\u7D20\u8DEF\u5F84:",N),console.log("TemplateField: \u5F53\u524D\u5143\u7D20:",e),console.log("TemplateField: \u8981\u8BBE\u7F6E\u7684\u503C:",u),Ie.setNodes(i,{value:u},{at:N});const T=u.trim()!==""?u:e.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9";p(T);const L=i.children[N[0]];if(L&&"children"in L){const X=L.children[N[1]];console.log("TemplateField: \u66F4\u65B0\u540E\u7684\u5143\u7D20:",X)}s(!1)},[i,e,u]),D=gt(()=>{C()},[C]),w=gt(N=>{N.key==="Enter"?(N.preventDefault(),C()):N.key==="Escape"&&(N.preventDefault(),c(e.value||""),s(!1))},[C,e.value]);return l?ae.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[ae.jsx(OB,{ref:g,value:u,onChange:y,onBlur:D,onKeyDown:w,placeholder:"",$styles:n,$value:u,$maxWidth:h,style:{backgroundColor:"white",color:((k=n==null?void 0:n.templateField)==null?void 0:k.textColor)||"#055AFF",border:`2px solid ${((E=n==null?void 0:n.templateField)==null?void 0:E.borderColor)||"#84ADFF"}`,minWidth:((x=n==null?void 0:n.templateField)==null?void 0:x.minWidth)||"120px"}}),r]}):ae.jsxs("span",{...t,"data-slate-void":"true","data-slate-inline":"true","data-slate-length":"0",contentEditable:!1,children:[ae.jsxs(BB,{ref:a,$style:e.style||"blue",$isEditing:!1,$styles:n,$contentLength:f.length,onClick:b,style:{letterSpacing:n==null?void 0:n.letterSpacing,lineHeight:n==null?void 0:n.lineHeight,backgroundColor:(F=n==null?void 0:n.templateField)==null?void 0:F.backgroundColor,borderColor:(j=n==null?void 0:n.templateField)==null?void 0:j.borderColor,borderRadius:($=n==null?void 0:n.templateField)==null?void 0:$.borderRadius,padding:(P=n==null?void 0:n.templateField)==null?void 0:P.padding,margin:(A=n==null?void 0:n.templateField)==null?void 0:A.margin,fontSize:(O=n==null?void 0:n.templateField)==null?void 0:O.fontSize,fontWeight:(S=n==null?void 0:n.templateField)==null?void 0:S.fontWeight,minWidth:(B=n==null?void 0:n.templateField)==null?void 0:B.minWidth,color:(R=n==null?void 0:n.templateField)==null?void 0:R.textColor,width:"auto",maxWidth:"100%"},children:[(console.log("TemplateField \u6E32\u67D3\u8C03\u8BD5:",{elementValue:e.value,elementPlaceholder:e.placeholder,displayValue:f,displayValueLength:f.length,contentLength:f.length}),null),f]}),ae.jsx("span",{contentEditable:!1,style:{display:"none"},children:r})]})});n1.displayName="TemplateField";const AB=({children:e,attributes:t,styles:r,extraProps:n})=>{var a;const o=!!(n!=null&&n.isCollapsed);return ae.jsxs("div",{...t,className:"think-container",children:[ae.jsx("div",{className:"think-indicator"}),ae.jsx("div",{className:"think-content",children:ae.jsx("div",{className:"think-text text-[#86909C] pl-5 my-3 border border-[#ECECEE] border-solid border-l-3 border-t-0 border-b-0 border-r-0",style:{color:`${(a=r==null?void 0:r.text)==null?void 0:a.color} !important`,display:o?"none":"block"},children:e})})]})};var Pg={exports:{}};/*!
|
|
145
|
+
Copyright (c) 2018 Jed Watson.
|
|
146
|
+
Licensed under the MIT License (MIT), see
|
|
147
|
+
http://jedwatson.github.io/classnames
|
|
148
|
+
*/var jg;function FB(){return jg||(jg=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var a="",i=0;i<arguments.length;i++){var l=arguments[i];l&&(a=o(a,n(l)))}return a}function n(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return r.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var i="";for(var l in a)t.call(a,l)&&a[l]&&(i=o(i,l));return i}function o(a,i){return i?a?a+" "+i:a+i:a}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Pg)),Pg.exports}var NB=FB();const de=gl(NB);function Te(){return Te=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Te.apply(null,arguments)}function ut(e){"@babel/helpers - typeof";return ut=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ut(e)}var PB=Symbol.for("react.element"),jB=Symbol.for("react.transitional.element"),RB=Symbol.for("react.fragment");function o1(e){return e&&ut(e)==="object"&&(e.$$typeof===PB||e.$$typeof===jB)&&e.type===RB}function _n(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[];return ee.Children.forEach(e,function(n){n==null&&!t.keepEmpty||(Array.isArray(n)?r=r.concat(_n(n)):o1(n)&&n.props?r=r.concat(_n(n.props.children,t)):r.push(n))}),r}var jd={},IB=function(e){};function TB(e,t){}function MB(e,t){}function zB(){jd={}}function a1(e,t,r){!t&&!jd[r]&&(e(!1,r),jd[r]=!0)}function lr(e,t){a1(TB,e,t)}function LB(e,t){a1(MB,e,t)}lr.preMessage=IB;lr.resetWarned=zB;lr.noteOnce=LB;function _B(e,t){if(ut(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ut(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function i1(e){var t=_B(e,"string");return ut(t)=="symbol"?t:t+""}function M(e,t,r){return(t=i1(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function H(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rg(Object(r),!0).forEach(function(n){M(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zi(e){return e instanceof HTMLElement||e instanceof SVGElement}function pu(e){return e&&ut(e)==="object"&&Zi(e.nativeElement)?e.nativeElement:Zi(e)?e:null}function us(e){var t=pu(e);if(t)return t;if(e instanceof ee.Component){var r;return(r=Hi.findDOMNode)===null||r===void 0?void 0:r.call(Hi,e)}return null}var Ig={exports:{}},Xt={};/**
|
|
149
|
+
* @license React
|
|
150
|
+
* react-is.production.min.js
|
|
151
|
+
*
|
|
152
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the MIT license found in the
|
|
155
|
+
* LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/var Tg;function HB(){if(Tg)return Xt;Tg=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),i=Symbol.for("react.context"),l=Symbol.for("react.server_context"),s=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),v;v=Symbol.for("react.module.reference");function g(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case e:switch(m=m.type,m){case r:case o:case n:case u:case c:return m;default:switch(m=m&&m.$$typeof,m){case l:case i:case s:case p:case f:case a:return m;default:return b}}case t:return b}}}return Xt.ContextConsumer=i,Xt.ContextProvider=a,Xt.Element=e,Xt.ForwardRef=s,Xt.Fragment=r,Xt.Lazy=p,Xt.Memo=f,Xt.Portal=t,Xt.Profiler=o,Xt.StrictMode=n,Xt.Suspense=u,Xt.SuspenseList=c,Xt.isAsyncMode=function(){return!1},Xt.isConcurrentMode=function(){return!1},Xt.isContextConsumer=function(m){return g(m)===i},Xt.isContextProvider=function(m){return g(m)===a},Xt.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},Xt.isForwardRef=function(m){return g(m)===s},Xt.isFragment=function(m){return g(m)===r},Xt.isLazy=function(m){return g(m)===p},Xt.isMemo=function(m){return g(m)===f},Xt.isPortal=function(m){return g(m)===t},Xt.isProfiler=function(m){return g(m)===o},Xt.isStrictMode=function(m){return g(m)===n},Xt.isSuspense=function(m){return g(m)===u},Xt.isSuspenseList=function(m){return g(m)===c},Xt.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===r||m===o||m===n||m===u||m===c||m===h||typeof m=="object"&&m!==null&&(m.$$typeof===p||m.$$typeof===f||m.$$typeof===a||m.$$typeof===i||m.$$typeof===s||m.$$typeof===v||m.getModuleId!==void 0)},Xt.typeOf=g,Xt}var Mg;function WB(){return Mg||(Mg=1,Ig.exports=HB()),Ig.exports}var Ec=WB();function la(e,t,r){var n=d.useRef({});return(!("value"in n.current)||r(n.current.condition,t))&&(n.current.value=e(),n.current.condition=t),n.current.value}var KB=Number(_w.split(".")[0]),Ji=function(e,t){typeof e=="function"?e(t):ut(e)==="object"&&e&&"current"in e&&(e.current=t)},ro=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.filter(Boolean);return n.length<=1?n[0]:function(o){t.forEach(function(a){Ji(a,o)})}},sa=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return la(function(){return ro.apply(void 0,t)},t,function(n,o){return n.length!==o.length||n.every(function(a,i){return a!==o[i]})})},Zn=function(e){var t,r;if(!e)return!1;if(Bp(e)&&KB>=19)return!0;var n=Ec.isMemo(e)?e.type.type:e.type;return!(typeof n=="function"&&!((t=n.prototype)!==null&&t!==void 0&&t.render)&&n.$$typeof!==Ec.ForwardRef||typeof e=="function"&&!((r=e.prototype)!==null&&r!==void 0&&r.render)&&e.$$typeof!==Ec.ForwardRef)};function Bp(e){return Ww(e)&&!o1(e)}var qB=function(e){return Bp(e)&&Zn(e)},ua=function(e){if(e&&Bp(e)){var t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null},Rd=d.createContext(null);function VB(e){var t=e.children,r=e.onBatchResize,n=d.useRef(0),o=d.useRef([]),a=d.useContext(Rd),i=d.useCallback(function(l,s,u){n.current+=1;var c=n.current;o.current.push({size:l,element:s,data:u}),Promise.resolve().then(function(){c===n.current&&(r==null||r(o.current),o.current=[])}),a==null||a(l,s,u)},[r,a]);return d.createElement(Rd.Provider,{value:i},t)}var l1=(function(){if(typeof Map<"u")return Map;function e(t,r){var n=-1;return t.some(function(o,a){return o[0]===r?(n=a,!0):!1}),n}return(function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(r,n){var o=e(this.__entries__,r);~o?this.__entries__[o][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,o=e(n,r);~o&&n.splice(o,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var o=0,a=this.__entries__;o<a.length;o++){var i=a[o];r.call(n,i[1],i[0])}},t})()})(),Id=typeof window<"u"&&typeof document<"u"&&window.document===document,Rs=(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")()})(),UB=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Rs):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}})(),XB=2;function GB(e,t){var r=!1,n=!1,o=0;function a(){r&&(r=!1,e()),n&&l()}function i(){UB(a)}function l(){var s=Date.now();if(r){if(s-o<XB)return;n=!0}else r=!0,n=!1,setTimeout(i,t);o=s}return l}var YB=20,ZB=["top","right","bottom","left","width","height","size","weight"],JB=typeof MutationObserver<"u",QB=(function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=GB(this.refresh.bind(this),YB)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var r=this.observers_,n=r.indexOf(t);~n&&r.splice(n,1),!r.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return t.forEach(function(r){return r.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!Id||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),JB?(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)},e.prototype.disconnect_=function(){!Id||!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)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,o=ZB.some(function(a){return!!~n.indexOf(a)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e})(),s1=(function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e}),Ka=(function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||Rs}),u1=mu(0,0,0,0);function Is(e){return parseFloat(e)||0}function zg(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce(function(n,o){var a=e["border-"+o+"-width"];return n+Is(a)},0)}function eO(e){for(var t=["top","right","bottom","left"],r={},n=0,o=t;n<o.length;n++){var a=o[n],i=e["padding-"+a];r[a]=Is(i)}return r}function tO(e){var t=e.getBBox();return mu(0,0,t.width,t.height)}function rO(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return u1;var n=Ka(e).getComputedStyle(e),o=eO(n),a=o.left+o.right,i=o.top+o.bottom,l=Is(n.width),s=Is(n.height);if(n.boxSizing==="border-box"&&(Math.round(l+a)!==t&&(l-=zg(n,"left","right")+a),Math.round(s+i)!==r&&(s-=zg(n,"top","bottom")+i)),!oO(e)){var u=Math.round(l+a)-t,c=Math.round(s+i)-r;Math.abs(u)!==1&&(l-=u),Math.abs(c)!==1&&(s-=c)}return mu(o.left,o.top,l,s)}var nO=(function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Ka(e).SVGGraphicsElement}:function(e){return e instanceof Ka(e).SVGElement&&typeof e.getBBox=="function"}})();function oO(e){return e===Ka(e).document.documentElement}function aO(e){return Id?nO(e)?tO(e):rO(e):u1}function iO(e){var t=e.x,r=e.y,n=e.width,o=e.height,a=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,i=Object.create(a.prototype);return s1(i,{x:t,y:r,width:n,height:o,top:r,right:t+n,bottom:o+r,left:t}),i}function mu(e,t,r,n){return{x:e,y:t,width:r,height:n}}var lO=(function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=mu(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=aO(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e})(),sO=(function(){function e(t,r){var n=iO(r);s1(this,{target:t,contentRect:n})}return e})(),uO=(function(){function e(t,r,n){if(this.activeObservations_=[],this.observations_=new l1,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=r,this.callbackCtx_=n}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Ka(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new lO(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Ka(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)&&(r.delete(t),r.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&t.activeObservations_.push(r)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new sO(n.target,n.broadcastRect())});this.callback_.call(t,r,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e})(),c1=typeof WeakMap<"u"?new WeakMap:new l1,d1=(function(){function e(t){if(!(this instanceof e))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=QB.getInstance(),n=new uO(t,r,this);c1.set(this,n)}return e})();["observe","unobserve","disconnect"].forEach(function(e){d1.prototype[e]=function(){var t;return(t=c1.get(this))[e].apply(t,arguments)}});var cO=(function(){return typeof Rs.ResizeObserver<"u"?Rs.ResizeObserver:d1})(),Bo=new Map;function dO(e){e.forEach(function(t){var r,n=t.target;(r=Bo.get(n))===null||r===void 0||r.forEach(function(o){return o(n)})})}var f1=new cO(dO);function fO(e,t){Bo.has(e)||(Bo.set(e,new Set),f1.observe(e)),Bo.get(e).add(t)}function pO(e,t){Bo.has(e)&&(Bo.get(e).delete(t),Bo.get(e).size||(f1.unobserve(e),Bo.delete(e)))}function vr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lg(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i1(n.key),n)}}function br(e,t,r){return t&&Lg(e.prototype,t),r&&Lg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qi(e,t){return Qi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Qi(e,t)}function no(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qi(e,t)}function el(e){return el=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},el(e)}function Op(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Op=function(){return!!e})()}function tt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mO(e,t){if(t&&(ut(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tt(e)}function oo(e){var t=Op();return function(){var r,n=el(e);if(t){var o=el(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return mO(this,r)}}var hO=(function(e){no(r,e);var t=oo(r);function r(){return vr(this,r),t.apply(this,arguments)}return br(r,[{key:"render",value:function(){return this.props.children}}]),r})(d.Component);function gO(e,t){var r=e.children,n=e.disabled,o=d.useRef(null),a=d.useRef(null),i=d.useContext(Rd),l=typeof r=="function",s=l?r(o):r,u=d.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),c=!l&&d.isValidElement(s)&&Zn(s),f=c?ua(s):null,p=sa(f,o),h=function(){var m;return us(o.current)||(o.current&&ut(o.current)==="object"?us((m=o.current)===null||m===void 0?void 0:m.nativeElement):null)||us(a.current)};d.useImperativeHandle(t,function(){return h()});var v=d.useRef(e);v.current=e;var g=d.useCallback(function(m){var b=v.current,y=b.onResize,C=b.data,D=m.getBoundingClientRect(),w=D.width,k=D.height,E=m.offsetWidth,x=m.offsetHeight,F=Math.floor(w),j=Math.floor(k);if(u.current.width!==F||u.current.height!==j||u.current.offsetWidth!==E||u.current.offsetHeight!==x){var $={width:F,height:j,offsetWidth:E,offsetHeight:x};u.current=$;var P=E===Math.round(w)?w:E,A=x===Math.round(k)?k:x,O=H(H({},$),{},{offsetWidth:P,offsetHeight:A});i==null||i(O,m,C),y&&Promise.resolve().then(function(){y(O,m)})}},[]);return d.useEffect(function(){var m=h();return m&&!n&&fO(m,g),function(){return pO(m,g)}},[o.current,n]),d.createElement(hO,{ref:a},c?d.cloneElement(s,{ref:p}):s)}var vO=d.forwardRef(gO),bO="rc-observer-key";function yO(e,t){var r=e.children,n=typeof r=="function"?[r]:_n(r);return n.map(function(o,a){var i=(o==null?void 0:o.key)||"".concat(bO,"-").concat(a);return d.createElement(vO,Te({},e,{key:i,ref:a===0?t:void 0}),o)})}var ao=d.forwardRef(yO);ao.Collection=VB;function Td(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function CO(e){if(Array.isArray(e))return Td(e)}function p1(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ap(e,t){if(e){if(typeof e=="string")return Td(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Td(e,t):void 0}}function xO(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
157
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pe(e){return CO(e)||p1(e)||Ap(e)||xO()}var m1=function(e){return+setTimeout(e,16)},h1=function(e){return clearTimeout(e)};typeof window<"u"&&"requestAnimationFrame"in window&&(m1=function(e){return window.requestAnimationFrame(e)},h1=function(e){return window.cancelAnimationFrame(e)});var _g=0,Fp=new Map;function g1(e){Fp.delete(e)}var qt=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;_g+=1;var r=_g;function n(o){if(o===0)g1(r),e();else{var a=m1(function(){n(o-1)});Fp.set(r,a)}}return n(t),r};qt.cancel=function(e){var t=Fp.get(e);return g1(e),h1(t)};function v1(e){if(Array.isArray(e))return e}function wO(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,a,i,l=[],s=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(c){u=!0,o=c}finally{try{if(!s&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}function b1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
158
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ce(e,t){return v1(e)||wO(e,t)||Ap(e,t)||b1()}function tl(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function Xr(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function EO(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1}var Hg="data-rc-order",Wg="data-rc-priority",kO="rc-util-key",Md=new Map;function y1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):kO}function hu(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function DO(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function Np(e){return Array.from((Md.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function C1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Xr())return null;var r=t.csp,n=t.prepend,o=t.priority,a=o===void 0?0:o,i=DO(n),l=i==="prependQueue",s=document.createElement("style");s.setAttribute(Hg,i),l&&a&&s.setAttribute(Wg,"".concat(a)),r!=null&&r.nonce&&(s.nonce=r==null?void 0:r.nonce),s.innerHTML=e;var u=hu(t),c=u.firstChild;if(n){if(l){var f=(t.styles||Np(u)).filter(function(p){if(!["prepend","prependQueue"].includes(p.getAttribute(Hg)))return!1;var h=Number(p.getAttribute(Wg)||0);return a>=h});if(f.length)return u.insertBefore(s,f[f.length-1].nextSibling),s}u.insertBefore(s,c)}else u.appendChild(s);return s}function x1(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=hu(t);return(t.styles||Np(r)).find(function(n){return n.getAttribute(y1(t))===e})}function rl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=x1(e,t);if(r){var n=hu(t);n.removeChild(r)}}function SO(e,t){var r=Md.get(e);if(!r||!EO(document,r)){var n=C1("",t),o=n.parentNode;Md.set(e,o),e.removeChild(n)}}function go(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=hu(r),o=Np(n),a=H(H({},r),{},{styles:o});SO(n,a);var i=x1(t,a);if(i){var l,s;if((l=a.csp)!==null&&l!==void 0&&l.nonce&&i.nonce!==((s=a.csp)===null||s===void 0?void 0:s.nonce)){var u;i.nonce=(u=a.csp)===null||u===void 0?void 0:u.nonce}return i.innerHTML!==e&&(i.innerHTML=e),i}var c=C1(e,a);return c.setAttribute(y1(a),t),c}function $O(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Ct(e,t){if(e==null)return{};var r,n,o=$O(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Jn(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=new Set;function o(a,i){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,s=n.has(a);if(lr(!s,"Warning: There may be circular references"),s)return!1;if(a===i)return!0;if(r&&l>1)return!1;n.add(a);var u=l+1;if(Array.isArray(a)){if(!Array.isArray(i)||a.length!==i.length)return!1;for(var c=0;c<a.length;c++)if(!o(a[c],i[c],u))return!1;return!0}if(a&&i&&ut(a)==="object"&&ut(i)==="object"){var f=Object.keys(a);return f.length!==Object.keys(i).length?!1:f.every(function(p){return o(a[p],i[p],u)})}return!1}return o(e,t)}var BO="%";function zd(e){return e.join(BO)}var OO=(function(){function e(t){vr(this,e),M(this,"instanceId",void 0),M(this,"cache",new Map),M(this,"extracted",new Set),this.instanceId=t}return br(e,[{key:"get",value:function(t){return this.opGet(zd(t))}},{key:"opGet",value:function(t){return this.cache.get(t)||null}},{key:"update",value:function(t,r){return this.opUpdate(zd(t),r)}},{key:"opUpdate",value:function(t,r){var n=this.cache.get(t),o=r(n);o===null?this.cache.delete(t):this.cache.set(t,o)}}]),e})(),qa="data-token-hash",zn="data-css-hash",Oo="__cssinjs_instance__";function AO(){var e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(zn,"]"))||[],r=document.head.firstChild;Array.from(t).forEach(function(o){o[Oo]=o[Oo]||e,o[Oo]===e&&document.head.insertBefore(o,r)});var n={};Array.from(document.querySelectorAll("style[".concat(zn,"]"))).forEach(function(o){var a=o.getAttribute(zn);if(n[a]){if(o[Oo]===e){var i;(i=o.parentNode)===null||i===void 0||i.removeChild(o)}}else n[a]=!0})}return new OO(e)}var yl=d.createContext({hashPriority:"low",cache:AO(),defaultCache:!0});function FO(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}var Pp=(function(){function e(){vr(this,e),M(this,"cache",void 0),M(this,"keys",void 0),M(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return br(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(t){var r,n,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a={map:this.cache};return t.forEach(function(i){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(i)}}),(r=a)!==null&&r!==void 0&&r.value&&o&&(a.value[1]=this.cacheCallTimes++),(n=a)===null||n===void 0?void 0:n.value}},{key:"get",value:function(t){var r;return(r=this.internalGet(t,!0))===null||r===void 0?void 0:r[0]}},{key:"has",value:function(t){return!!this.internalGet(t)}},{key:"set",value:function(t,r){var n=this;if(!this.has(t)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var o=this.keys.reduce(function(s,u){var c=ce(s,2),f=c[1];return n.internalGet(u)[1]<f?[u,n.internalGet(u)[1]]:s},[this.keys[0],this.cacheCallTimes]),a=ce(o,1),i=a[0];this.delete(i)}this.keys.push(t)}var l=this.cache;t.forEach(function(s,u){if(u===t.length-1)l.set(s,{value:[r,n.cacheCallTimes++]});else{var c=l.get(s);c?c.map||(c.map=new Map):l.set(s,{map:new Map}),l=l.get(s).map}})}},{key:"deleteByPath",value:function(t,r){var n=t.get(r[0]);if(r.length===1){var o;return n.map?t.set(r[0],{map:n.map}):t.delete(r[0]),(o=n.value)===null||o===void 0?void 0:o[0]}var a=this.deleteByPath(n.map,r.slice(1));return(!n.map||n.map.size===0)&&!n.value&&t.delete(r[0]),a}},{key:"delete",value:function(t){if(this.has(t))return this.keys=this.keys.filter(function(r){return!FO(r,t)}),this.deleteByPath(this.cache,t)}}]),e})();M(Pp,"MAX_CACHE_SIZE",20);M(Pp,"MAX_CACHE_OFFSET",5);var Kg=0,w1=(function(){function e(t){vr(this,e),M(this,"derivatives",void 0),M(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=Kg,t.length===0&&(t.length>0,void 0),Kg+=1}return br(e,[{key:"getDerivativeToken",value:function(t){return this.derivatives.reduce(function(r,n){return n(t,r)},void 0)}}]),e})(),kc=new Pp;function Ld(e){var t=Array.isArray(e)?e:[e];return kc.has(t)||kc.set(t,new w1(t)),kc.get(t)}var NO=new WeakMap,Dc={};function PO(e,t){for(var r=NO,n=0;n<t.length;n+=1){var o=t[n];r.has(o)||r.set(o,new WeakMap),r=r.get(o)}return r.has(Dc)||r.set(Dc,e()),r.get(Dc)}var qg=new WeakMap;function Ii(e){var t=qg.get(e)||"";return t||(Object.keys(e).forEach(function(r){var n=e[r];t+=r,n instanceof w1?t+=n.id:n&&ut(n)==="object"?t+=Ii(n):t+=n}),t=tl(t),qg.set(e,t)),t}function Vg(e,t){return tl("".concat(t,"_").concat(Ii(e)))}var _d=Xr();function se(e){return typeof e=="number"?"".concat(e,"px"):e}function Ts(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(o)return e;var a=H(H({},n),{},M(M({},qa,t),zn,r)),i=Object.keys(a).map(function(l){var s=a[l];return s?"".concat(l,'="').concat(s,'"'):null}).filter(function(l){return l}).join(" ");return"<style ".concat(i,">").concat(e,"</style>")}var cs=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(t?"".concat(t,"-"):"").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()},jO=function(e,t,r){return Object.keys(e).length?".".concat(t).concat(r!=null&&r.scope?".".concat(r.scope):"","{").concat(Object.entries(e).map(function(n){var o=ce(n,2),a=o[0],i=o[1];return"".concat(a,":").concat(i,";")}).join(""),"}"):""},E1=function(e,t,r){var n={},o={};return Object.entries(e).forEach(function(a){var i,l,s=ce(a,2),u=s[0],c=s[1];if(r!=null&&(i=r.preserve)!==null&&i!==void 0&&i[u])o[u]=c;else if((typeof c=="string"||typeof c=="number")&&!(r!=null&&(l=r.ignore)!==null&&l!==void 0&&l[u])){var f,p=cs(u,r==null?void 0:r.prefix);n[p]=typeof c=="number"&&!(r!=null&&(f=r.unitless)!==null&&f!==void 0&&f[u])?"".concat(c,"px"):String(c),o[u]="var(".concat(p,")")}}),[o,jO(n,t,{scope:r==null?void 0:r.scope})]},Ug=Xr()?d.useLayoutEffect:d.useEffect,Wt=function(e,t){var r=d.useRef(!0);Ug(function(){return e(r.current)},t),Ug(function(){return r.current=!1,function(){r.current=!0}},[])},Xg=function(e,t){Wt(function(r){if(!r)return e()},t)},RO=H({},d),Gg=RO.useInsertionEffect,IO=function(e,t,r){d.useMemo(e,r),Wt(function(){return t(!0)},r)},TO=Gg?function(e,t,r){return Gg(function(){return e(),t()},r)}:IO,MO=H({},d),zO=MO.useInsertionEffect,LO=function(e){var t=[],r=!1;function n(o){r||t.push(o)}return d.useEffect(function(){return r=!1,function(){r=!0,t.length&&t.forEach(function(o){return o()})}},e),n},_O=function(){return function(e){e()}},HO=typeof zO<"u"?LO:_O;function jp(e,t,r,n,o){var a=d.useContext(yl),i=a.cache,l=[e].concat(Pe(t)),s=zd(l),u=HO([s]),c=function(h){i.opUpdate(s,function(v){var g=v||[void 0,void 0],m=ce(g,2),b=m[0],y=b===void 0?0:b,C=m[1],D=C,w=D||r(),k=[y,w];return h?h(k):k})};d.useMemo(function(){c()},[s]);var f=i.opGet(s),p=f[1];return TO(function(){o==null||o(p)},function(h){return c(function(v){var g=ce(v,2),m=g[0],b=g[1];return h&&m===0&&(o==null||o(p)),[m+1,b]}),function(){i.opUpdate(s,function(v){var g=v||[],m=ce(g,2),b=m[0],y=b===void 0?0:b,C=m[1],D=y-1;return D===0?(u(function(){(h||!i.opGet(s))&&(n==null||n(C,!1))}),null):[y-1,C]})}},[s]),p}var WO={},KO="css",Ho=new Map;function qO(e){Ho.set(e,(Ho.get(e)||0)+1)}function VO(e,t){if(typeof document<"u"){var r=document.querySelectorAll("style[".concat(qa,'="').concat(e,'"]'));r.forEach(function(n){if(n[Oo]===t){var o;(o=n.parentNode)===null||o===void 0||o.removeChild(n)}})}}var UO=0;function XO(e,t){Ho.set(e,(Ho.get(e)||0)-1);var r=new Set;Ho.forEach(function(n,o){n<=0&&r.add(o)}),Ho.size-r.size>UO&&r.forEach(function(n){VO(n,t),Ho.delete(n)})}var GO=function(e,t,r,n){var o=r.getDerivativeToken(e),a=H(H({},o),t);return n&&(a=n(a)),a},k1="token";function YO(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=Ir(yl),o=n.cache.instanceId,a=n.container,i=r.salt,l=i===void 0?"":i,s=r.override,u=s===void 0?WO:s,c=r.formatToken,f=r.getComputedToken,p=r.cssVar,h=PO(function(){return Object.assign.apply(Object,[{}].concat(Pe(t)))},t),v=Ii(h),g=Ii(u),m=p?Ii(p):"",b=jp(k1,[l,e.id,v,g,m],function(){var y,C=f?f(h,u,e):GO(h,u,e,c),D=H({},C),w="";if(p){var k=E1(C,p.key,{prefix:p.prefix,ignore:p.ignore,unitless:p.unitless,preserve:p.preserve}),E=ce(k,2);C=E[0],w=E[1]}var x=Vg(C,l);C._tokenKey=x,D._tokenKey=Vg(D,l);var F=(y=p==null?void 0:p.key)!==null&&y!==void 0?y:x;C._themeKey=F,qO(F);var j="".concat(KO,"-").concat(tl(x));return C._hashId=j,[C,j,D,w,(p==null?void 0:p.key)||""]},function(y){XO(y[0]._themeKey,o)},function(y){var C=ce(y,4),D=C[0],w=C[3];if(p&&w){var k=go(w,tl("css-variables-".concat(D._themeKey)),{mark:zn,prepend:"queue",attachTo:a,priority:-999});k[Oo]=o,k.setAttribute(qa,D._themeKey)}});return b}var ZO=function(e,t,r){var n=ce(e,5),o=n[2],a=n[3],i=n[4],l=r||{},s=l.plain;if(!a)return null;var u=o._tokenKey,c=-999,f={"data-rc-order":"prependQueue","data-rc-priority":"".concat(c)},p=Ts(a,i,u,f,s);return[c,u,p]},JO={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},D1="comm",S1="rule",$1="decl",QO="@import",eA="@namespace",tA="@keyframes",rA="@layer",B1=Math.abs,Rp=String.fromCharCode;function O1(e){return e.trim()}function ds(e,t,r){return e.replace(t,r)}function nA(e,t,r){return e.indexOf(t,r)}function Na(e,t){return e.charCodeAt(t)|0}function Va(e,t,r){return e.slice(t,r)}function Xn(e){return e.length}function oA(e){return e.length}function Kl(e,t){return t.push(e),e}var gu=1,Ua=1,A1=0,An=0,kr=0,ni="";function Ip(e,t,r,n,o,a,i,l){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:gu,column:Ua,length:i,return:"",siblings:l}}function aA(){return kr}function iA(){return kr=An>0?Na(ni,--An):0,Ua--,kr===10&&(Ua=1,gu--),kr}function Ln(){return kr=An<A1?Na(ni,An++):0,Ua++,kr===10&&(Ua=1,gu++),kr}function Ao(){return Na(ni,An)}function fs(){return An}function vu(e,t){return Va(ni,e,t)}function nl(e){switch(e){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 lA(e){return gu=Ua=1,A1=Xn(ni=e),An=0,[]}function sA(e){return ni="",e}function Sc(e){return O1(vu(An-1,Hd(e===91?e+2:e===40?e+1:e)))}function uA(e){for(;(kr=Ao())&&kr<33;)Ln();return nl(e)>2||nl(kr)>3?"":" "}function cA(e,t){for(;--t&&Ln()&&!(kr<48||kr>102||kr>57&&kr<65||kr>70&&kr<97););return vu(e,fs()+(t<6&&Ao()==32&&Ln()==32))}function Hd(e){for(;Ln();)switch(kr){case e:return An;case 34:case 39:e!==34&&e!==39&&Hd(kr);break;case 40:e===41&&Hd(e);break;case 92:Ln();break}return An}function dA(e,t){for(;Ln()&&e+kr!==57&&!(e+kr===84&&Ao()===47););return"/*"+vu(t,An-1)+"*"+Rp(e===47?e:Ln())}function fA(e){for(;!nl(Ao());)Ln();return vu(e,An)}function pA(e){return sA(ps("",null,null,null,[""],e=lA(e),0,[0],e))}function ps(e,t,r,n,o,a,i,l,s){for(var u=0,c=0,f=i,p=0,h=0,v=0,g=1,m=1,b=1,y=0,C="",D=o,w=a,k=n,E=C;m;)switch(v=y,y=Ln()){case 40:if(v!=108&&Na(E,f-1)==58){nA(E+=ds(Sc(y),"&","&\f"),"&\f",B1(u?l[u-1]:0))!=-1&&(b=-1);break}case 34:case 39:case 91:E+=Sc(y);break;case 9:case 10:case 13:case 32:E+=uA(v);break;case 92:E+=cA(fs()-1,7);continue;case 47:switch(Ao()){case 42:case 47:Kl(mA(dA(Ln(),fs()),t,r,s),s),(nl(v||1)==5||nl(Ao()||1)==5)&&Xn(E)&&Va(E,-1,void 0)!==" "&&(E+=" ");break;default:E+="/"}break;case 123*g:l[u++]=Xn(E)*b;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+c:b==-1&&(E=ds(E,/\f/g,"")),h>0&&(Xn(E)-f||g===0&&v===47)&&Kl(h>32?Zg(E+";",n,r,f-1,s):Zg(ds(E," ","")+";",n,r,f-2,s),s);break;case 59:E+=";";default:if(Kl(k=Yg(E,t,r,u,c,o,l,C,D=[],w=[],f,a),a),y===123)if(c===0)ps(E,t,k,k,D,a,f,l,w);else{switch(p){case 99:if(Na(E,3)===110)break;case 108:if(Na(E,2)===97)break;default:c=0;case 100:case 109:case 115:}c?ps(e,k,k,n&&Kl(Yg(e,k,k,0,0,o,l,C,o,D=[],f,w),w),o,w,f,l,n?D:w):ps(E,k,k,k,[""],w,0,l,w)}}u=c=h=0,g=b=1,C=E="",f=i;break;case 58:f=1+Xn(E),h=v;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&iA()==125)continue}switch(E+=Rp(y),y*g){case 38:b=c>0?1:(E+="\f",-1);break;case 44:l[u++]=(Xn(E)-1)*b,b=1;break;case 64:Ao()===45&&(E+=Sc(Ln())),p=Ao(),c=f=Xn(C=E+=fA(fs())),y++;break;case 45:v===45&&Xn(E)==2&&(g=0)}}return a}function Yg(e,t,r,n,o,a,i,l,s,u,c,f){for(var p=o-1,h=o===0?a:[""],v=oA(h),g=0,m=0,b=0;g<n;++g)for(var y=0,C=Va(e,p+1,p=B1(m=i[g])),D=e;y<v;++y)(D=O1(m>0?h[y]+" "+C:ds(C,/&\f/g,h[y])))&&(s[b++]=D);return Ip(e,t,r,o===0?S1:l,s,u,c,f)}function mA(e,t,r,n){return Ip(e,t,r,D1,Rp(aA()),Va(e,2,-2),0,n)}function Zg(e,t,r,n,o){return Ip(e,t,r,$1,Va(e,0,n),Va(e,n+1,-1),n,o)}function Wd(e,t){for(var r="",n=0;n<e.length;n++)r+=t(e[n],n,e,t)||"";return r}function hA(e,t,r,n){switch(e.type){case rA:if(e.children.length)break;case QO:case eA:case $1:return e.return=e.return||e.value;case D1:return"";case tA:return e.return=e.value+"{"+Wd(e.children,n)+"}";case S1:if(!Xn(e.value=e.props.join(",")))return""}return Xn(r=Wd(e.children,n))?e.return=e.value+"{"+r+"}":""}var Jg="data-ant-cssinjs-cache-path",F1="_FILE_STYLE__",Zo,N1=!0;function gA(){if(!Zo&&(Zo={},Xr())){var e=document.createElement("div");e.className=Jg,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(function(o){var a=o.split(":"),i=ce(a,2),l=i[0],s=i[1];Zo[l]=s});var r=document.querySelector("style[".concat(Jg,"]"));if(r){var n;N1=!1,(n=r.parentNode)===null||n===void 0||n.removeChild(r)}document.body.removeChild(e)}}function vA(e){return gA(),!!Zo[e]}function bA(e){var t=Zo[e],r=null;if(t&&Xr())if(N1)r=F1;else{var n=document.querySelector("style[".concat(zn,'="').concat(Zo[e],'"]'));n?r=n.innerHTML:delete Zo[e]}return[r,t]}var yA="_skip_check_",P1="_multi_value_";function ms(e){var t=Wd(pA(e),hA);return t.replace(/\{%%%\:[^;];}/g,";")}function CA(e){return ut(e)==="object"&&e&&(yA in e||P1 in e)}function Qg(e,t,r){if(!t)return e;var n=".".concat(t),o=r==="low"?":where(".concat(n,")"):n,a=e.split(",").map(function(i){var l,s=i.trim().split(/\s+/),u=s[0]||"",c=((l=u.match(/^\w+/))===null||l===void 0?void 0:l[0])||"";return u="".concat(c).concat(o).concat(u.slice(c.length)),[u].concat(Pe(s.slice(1))).join(" ")});return a.join(",")}var xA=function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},o=n.root,a=n.injectHash,i=n.parentSelectors,l=r.hashId,s=r.layer;r.path;var u=r.hashPriority,c=r.transformers,f=c===void 0?[]:c;r.linters;var p="",h={};function v(b){var y=b.getName(l);if(!h[y]){var C=e(b.style,r,{root:!1,parentSelectors:i}),D=ce(C,1),w=D[0];h[y]="@keyframes ".concat(b.getName(l)).concat(w)}}function g(b){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return b.forEach(function(C){Array.isArray(C)?g(C,y):C&&y.push(C)}),y}var m=g(Array.isArray(t)?t:[t]);return m.forEach(function(b){var y=typeof b=="string"&&!o?{}:b;if(typeof y=="string")p+="".concat(y,`
|
|
159
|
+
`);else if(y._keyframe)v(y);else{var C=f.reduce(function(D,w){var k;return(w==null||(k=w.visit)===null||k===void 0?void 0:k.call(w,D))||D},y);Object.keys(C).forEach(function(D){var w=C[D];if(ut(w)==="object"&&w&&(D!=="animationName"||!w._keyframe)&&!CA(w)){var k=!1,E=D.trim(),x=!1;(o||a)&&l?E.startsWith("@")?k=!0:E==="&"?E=Qg("",l,u):E=Qg(D,l,u):o&&!l&&(E==="&"||E==="")&&(E="",x=!0);var F=e(w,r,{root:x,injectHash:k,parentSelectors:[].concat(Pe(i),[E])}),j=ce(F,2),$=j[0],P=j[1];h=H(H({},h),P),p+="".concat(E).concat($)}else{let S=function(B,R){var N=B.replace(/[A-Z]/g,function(L){return"-".concat(L.toLowerCase())}),T=R;!JO[B]&&typeof T=="number"&&T!==0&&(T="".concat(T,"px")),B==="animationName"&&R!==null&&R!==void 0&&R._keyframe&&(v(R),T=R.getName(l)),p+="".concat(N,":").concat(T,";")};var A,O=(A=w==null?void 0:w.value)!==null&&A!==void 0?A:w;ut(w)==="object"&&w!==null&&w!==void 0&&w[P1]&&Array.isArray(O)?O.forEach(function(B){S(D,B)}):S(D,O)}})}}),o?s&&(p&&(p="@layer ".concat(s.name," {").concat(p,"}")),s.dependencies&&(h["@layer ".concat(s.name)]=s.dependencies.map(function(b){return"@layer ".concat(b,", ").concat(s.name,";")}).join(`
|
|
160
|
+
`))):p="{".concat(p,"}"),[p,h]};function j1(e,t){return tl("".concat(e.join("%")).concat(t))}function wA(){return null}var R1="style";function Kd(e,t){var r=e.token,n=e.path,o=e.hashId,a=e.layer,i=e.nonce,l=e.clientOnly,s=e.order,u=s===void 0?0:s,c=d.useContext(yl),f=c.autoClear;c.mock;var p=c.defaultCache,h=c.hashPriority,v=c.container,g=c.ssrInline,m=c.transformers,b=c.linters,y=c.cache,C=c.layer,D=r._tokenKey,w=[D];C&&w.push("layer"),w.push.apply(w,Pe(n));var k=_d,E=jp(R1,w,function(){var P=w.join("|");if(vA(P)){var A=bA(P),O=ce(A,2),S=O[0],B=O[1];if(S)return[S,D,B,{},l,u]}var R=t(),N=xA(R,{hashId:o,hashPriority:h,layer:C?a:void 0,path:n.join("-"),transformers:m,linters:b}),T=ce(N,2),L=T[0],X=T[1],_=ms(L),q=j1(w,_);return[_,D,q,X,l,u]},function(P,A){var O=ce(P,3),S=O[2];(A||f)&&_d&&rl(S,{mark:zn,attachTo:v})},function(P){var A=ce(P,4),O=A[0];A[1];var S=A[2],B=A[3];if(k&&O!==F1){var R={mark:zn,prepend:C?!1:"queue",attachTo:v,priority:u},N=typeof i=="function"?i():i;N&&(R.csp={nonce:N});var T=[],L=[];Object.keys(B).forEach(function(_){_.startsWith("@layer")?T.push(_):L.push(_)}),T.forEach(function(_){go(ms(B[_]),"_layer-".concat(_),H(H({},R),{},{prepend:!0}))});var X=go(O,S,R);X[Oo]=y.instanceId,X.setAttribute(qa,D),L.forEach(function(_){go(ms(B[_]),"_effect-".concat(_),R)})}}),x=ce(E,3),F=x[0],j=x[1],$=x[2];return function(P){var A;return!g||k||!p?A=d.createElement(wA,null):A=d.createElement("style",Te({},M(M({},qa,j),zn,$),{dangerouslySetInnerHTML:{__html:F}})),d.createElement(d.Fragment,null,A,P)}}var EA=function(e,t,r){var n=ce(e,6),o=n[0],a=n[1],i=n[2],l=n[3],s=n[4],u=n[5],c=r||{},f=c.plain;if(s)return null;var p=o,h={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return p=Ts(o,a,i,h,f),l&&Object.keys(l).forEach(function(v){if(!t[v]){t[v]=!0;var g=ms(l[v]),m=Ts(g,a,"_effect-".concat(v),h,f);v.startsWith("@layer")?p=m+p:p+=m}}),[u,i,p]},I1="cssVar",kA=function(e,t){var r=e.key,n=e.prefix,o=e.unitless,a=e.ignore,i=e.token,l=e.scope,s=l===void 0?"":l,u=Ir(yl),c=u.cache.instanceId,f=u.container,p=i._tokenKey,h=[].concat(Pe(e.path),[r,s,p]),v=jp(I1,h,function(){var g=t(),m=E1(g,r,{prefix:n,unitless:o,ignore:a,scope:s}),b=ce(m,2),y=b[0],C=b[1],D=j1(h,C);return[y,C,D,r]},function(g){var m=ce(g,3),b=m[2];_d&&rl(b,{mark:zn,attachTo:f})},function(g){var m=ce(g,3),b=m[1],y=m[2];if(b){var C=go(b,y,{mark:zn,prepend:"queue",attachTo:f,priority:-999});C[Oo]=c,C.setAttribute(qa,r)}});return v},DA=function(e,t,r){var n=ce(e,4),o=n[1],a=n[2],i=n[3],l=r||{},s=l.plain;if(!o)return null;var u=-999,c={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)},f=Ts(o,i,a,c,s);return[u,a,f]};M(M(M({},R1,EA),k1,ZO),I1,DA);var Vt=(function(){function e(t,r){vr(this,e),M(this,"name",void 0),M(this,"style",void 0),M(this,"_keyframe",!0),this.name=t,this.style=r}return br(e,[{key:"getName",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t?"".concat(t,"-").concat(this.name):this.name}}]),e})();function ha(e){return e.notSplit=!0,e}ha(["borderTop","borderBottom"]),ha(["borderTop"]),ha(["borderBottom"]),ha(["borderLeft","borderRight"]),ha(["borderLeft"]),ha(["borderRight"]);var Tp=Fn({});function T1(e){return v1(e)||p1(e)||Ap(e)||b1()}function vn(e,t){for(var r=e,n=0;n<t.length;n+=1){if(r==null)return;r=r[t[n]]}return r}function M1(e,t,r,n){if(!t.length)return r;var o=T1(t),a=o[0],i=o.slice(1),l;return!e&&typeof a=="number"?l=[]:Array.isArray(e)?l=Pe(e):l=H({},e),n&&r===void 0&&i.length===1?delete l[a][i[0]]:l[a]=M1(l[a],i,r,n),l}function jn(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&n&&r===void 0&&!vn(e,t.slice(0,-1))?e:M1(e,t,r,n)}function SA(e){return ut(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function ev(e){return Array.isArray(e)?[]:{}}var $A=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function $a(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=ev(t[0]);return t.forEach(function(o){function a(i,l){var s=new Set(l),u=vn(o,i),c=Array.isArray(u);if(c||SA(u)){if(!s.has(u)){s.add(u);var f=vn(n,i);c?n=jn(n,i,[]):(!f||ut(f)!=="object")&&(n=jn(n,i,ev(u))),$A(u).forEach(function(p){a([].concat(Pe(i),[p]),s)})}}else n=jn(n,i,u)}a([])}),n}function BA(){}const OA=d.createContext({}),oi=()=>{const e=()=>{};return e.deprecated=BA,e},AA=Fn(void 0);var z1={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"},FA={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},NA=H(H({},FA),{},{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 L1={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},tv={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"]},NA),timePickerLocale:Object.assign({},L1)},mn="${label} is not a valid ${type}",ra={locale:"en",Pagination:z1,DatePicker:tv,TimePicker:L1,Calendar:tv,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:mn,method:mn,array:mn,object:mn,number:mn,date:mn,boolean:mn,integer:mn,float:mn,regexp:mn,email:mn,url:mn,hex:mn},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({},ra.Modal);let hs=[];const rv=()=>hs.reduce((e,t)=>Object.assign(Object.assign({},e),t),ra.Modal);function PA(e){if(e){const t=Object.assign({},e);return hs.push(t),rv(),()=>{hs=hs.filter(r=>r!==t),rv()}}Object.assign({},ra.Modal)}const Mp=Fn(void 0),bu=(e,t)=>{const r=d.useContext(Mp),n=d.useMemo(()=>{var a;const i=t||ra[e],l=(a=r==null?void 0:r[e])!==null&&a!==void 0?a:{};return Object.assign(Object.assign({},typeof i=="function"?i():i),l||{})},[e,t,r]),o=d.useMemo(()=>{const a=r==null?void 0:r.locale;return r!=null&&r.exist&&!a?ra.locale:a},[r]);return[n,o]},jA="internalMark",RA=e=>{const{locale:t={},children:r,_ANT_MARK__:n}=e;d.useEffect(()=>PA(t==null?void 0:t.Modal),[t]);const o=d.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return d.createElement(Mp.Provider,{value:o},r)},_1={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"},ol=Object.assign(Object.assign({},_1),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
161
|
+
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
|
|
162
|
+
'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}),Nr=Math.round;function $c(e,t){const r=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=r.map(o=>parseFloat(o));for(let o=0;o<3;o+=1)n[o]=t(n[o]||0,r[o]||"",o);return r[3]?n[3]=r[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}const nv=(e,t,r)=>r===0?e:e/100;function bi(e,t){const r=t||255;return e>r?r:e<0?0:e}class Ht{constructor(t){M(this,"isValid",!0),M(this,"r",0),M(this,"g",0),M(this,"b",0),M(this,"a",1),M(this,"_h",void 0),M(this,"_s",void 0),M(this,"_l",void 0),M(this,"_v",void 0),M(this,"_max",void 0),M(this,"_min",void 0),M(this,"_brightness",void 0);function r(n){return n[0]in t&&n[1]in t&&n[2]in t}if(t)if(typeof t=="string"){let n=function(a){return o.startsWith(a)};const o=t.trim();/^#?[A-F\d]{3,8}$/i.test(o)?this.fromHexString(o):n("rgb")?this.fromRgbString(o):n("hsl")?this.fromHslString(o):(n("hsv")||n("hsb"))&&this.fromHsvString(o)}else if(t instanceof Ht)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(r("rgb"))this.r=bi(t.r),this.g=bi(t.g),this.b=bi(t.b),this.a=typeof t.a=="number"?bi(t.a,1):1;else if(r("hsl"))this.fromHsl(t);else if(r("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const r=this.toHsv();return r.h=t,this._c(r)}getLuminance(){function t(a){const i=a/255;return i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}const r=t(this.r),n=t(this.g),o=t(this.b);return .2126*r+.7152*n+.0722*o}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=Nr(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/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(t=10){const r=this.getHue(),n=this.getSaturation();let o=this.getLightness()-t/100;return o<0&&(o=0),this._c({h:r,s:n,l:o,a:this.a})}lighten(t=10){const r=this.getHue(),n=this.getSaturation();let o=this.getLightness()+t/100;return o>1&&(o=1),this._c({h:r,s:n,l:o,a:this.a})}mix(t,r=50){const n=this._c(t),o=r/100,a=l=>(n[l]-this[l])*o+this[l],i={r:Nr(a("r")),g:Nr(a("g")),b:Nr(a("b")),a:Nr(a("a")*100)/100};return this._c(i)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const r=this._c(t),n=this.a+r.a*(1-this.a),o=a=>Nr((this[a]*this.a+r[a]*r.a*(1-this.a))/n);return this._c({r:o("r"),g:o("g"),b:o("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const r=(this.r||0).toString(16);t+=r.length===2?r:"0"+r;const n=(this.g||0).toString(16);t+=n.length===2?n:"0"+n;const o=(this.b||0).toString(16);if(t+=o.length===2?o:"0"+o,typeof this.a=="number"&&this.a>=0&&this.a<1){const a=Nr(this.a*255).toString(16);t+=a.length===2?a:"0"+a}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),r=Nr(this.getSaturation()*100),n=Nr(this.getLightness()*100);return this.a!==1?`hsla(${t},${r}%,${n}%,${this.a})`:`hsl(${t},${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(t,r,n){const o=this.clone();return o[t]=bi(r,n),o}_c(t){return new this.constructor(t)}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(t){const r=t.replace("#","");function n(o,a){return parseInt(r[o]+r[a||o],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:t,s:r,l:n,a:o}){if(this._h=t%360,this._s=r,this._l=n,this.a=typeof o=="number"?o:1,r<=0){const p=Nr(n*255);this.r=p,this.g=p,this.b=p}let a=0,i=0,l=0;const s=t/60,u=(1-Math.abs(2*n-1))*r,c=u*(1-Math.abs(s%2-1));s>=0&&s<1?(a=u,i=c):s>=1&&s<2?(a=c,i=u):s>=2&&s<3?(i=u,l=c):s>=3&&s<4?(i=c,l=u):s>=4&&s<5?(a=c,l=u):s>=5&&s<6&&(a=u,l=c);const f=n-u/2;this.r=Nr((a+f)*255),this.g=Nr((i+f)*255),this.b=Nr((l+f)*255)}fromHsv({h:t,s:r,v:n,a:o}){this._h=t%360,this._s=r,this._v=n,this.a=typeof o=="number"?o:1;const a=Nr(n*255);if(this.r=a,this.g=a,this.b=a,r<=0)return;const i=t/60,l=Math.floor(i),s=i-l,u=Nr(n*(1-r)*255),c=Nr(n*(1-r*s)*255),f=Nr(n*(1-r*(1-s))*255);switch(l){case 0:this.g=f,this.b=u;break;case 1:this.r=c,this.b=u;break;case 2:this.r=u,this.b=f;break;case 3:this.r=u,this.g=c;break;case 4:this.r=f,this.g=u;break;case 5:default:this.g=u,this.b=c;break}}fromHsvString(t){const r=$c(t,nv);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){const r=$c(t,nv);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){const r=$c(t,(n,o)=>o.includes("%")?Nr(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}}var ql=2,ov=.16,IA=.05,TA=.05,MA=.15,H1=5,W1=4,zA=[{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 av(e,t,r){var n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-ql*t:Math.round(e.h)+ql*t:n=r?Math.round(e.h)+ql*t:Math.round(e.h)-ql*t,n<0?n+=360:n>=360&&(n-=360),n}function iv(e,t,r){if(e.h===0&&e.s===0)return e.s;var n;return r?n=e.s-ov*t:t===W1?n=e.s+ov:n=e.s+IA*t,n>1&&(n=1),r&&t===H1&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function lv(e,t,r){var n;return r?n=e.v+TA*t:n=e.v-MA*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function al(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=new Ht(e),o=n.toHsv(),a=H1;a>0;a-=1){var i=new Ht({h:av(o,a,!0),s:iv(o,a,!0),v:lv(o,a,!0)});r.push(i)}r.push(n);for(var l=1;l<=W1;l+=1){var s=new Ht({h:av(o,l),s:iv(o,l),v:lv(o,l)});r.push(s)}return t.theme==="dark"?zA.map(function(u){var c=u.index,f=u.amount;return new Ht(t.backgroundColor||"#141414").mix(r[c],f).toHexString()}):r.map(function(u){return u.toHexString()})}var Bc={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"},qd=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];qd.primary=qd[5];var Vd=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];Vd.primary=Vd[5];var Ud=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];Ud.primary=Ud[5];var Xd=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];Xd.primary=Xd[5];var Gd=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];Gd.primary=Gd[5];var Yd=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Yd.primary=Yd[5];var Zd=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];Zd.primary=Zd[5];var Jd=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Jd.primary=Jd[5];var Ms=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Ms.primary=Ms[5];var Qd=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Qd.primary=Qd[5];var ef=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];ef.primary=ef[5];var tf=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];tf.primary=tf[5];var rf=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];rf.primary=rf[5];var Oc={red:qd,volcano:Vd,orange:Ud,gold:Xd,yellow:Gd,lime:Yd,green:Zd,cyan:Jd,blue:Ms,geekblue:Qd,purple:ef,magenta:tf,grey:rf};function LA(e,{generateColorPalettes:t,generateNeutralColorPalettes:r}){const{colorSuccess:n,colorWarning:o,colorError:a,colorInfo:i,colorPrimary:l,colorBgBase:s,colorTextBase:u}=e,c=t(l),f=t(n),p=t(o),h=t(a),v=t(i),g=r(s,u),m=e.colorLink||e.colorInfo,b=t(m),y=new Ht(h[1]).mix(new Ht(h[3]),50).toHexString();return Object.assign(Object.assign({},g),{colorPrimaryBg:c[1],colorPrimaryBgHover:c[2],colorPrimaryBorder:c[3],colorPrimaryBorderHover:c[4],colorPrimaryHover:c[5],colorPrimary:c[6],colorPrimaryActive:c[7],colorPrimaryTextHover:c[8],colorPrimaryText:c[9],colorPrimaryTextActive:c[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:h[1],colorErrorBgHover:h[2],colorErrorBgFilledHover:y,colorErrorBgActive:h[3],colorErrorBorder:h[3],colorErrorBorderHover:h[4],colorErrorHover:h[5],colorError:h[6],colorErrorActive:h[7],colorErrorTextHover:h[8],colorErrorText:h[9],colorErrorTextActive:h[10],colorWarningBg:p[1],colorWarningBgHover:p[2],colorWarningBorder:p[3],colorWarningBorderHover:p[4],colorWarningHover:p[4],colorWarning:p[6],colorWarningActive:p[7],colorWarningTextHover:p[8],colorWarningText:p[9],colorWarningTextActive:p[10],colorInfoBg:v[1],colorInfoBgHover:v[2],colorInfoBorder:v[3],colorInfoBorderHover:v[4],colorInfoHover:v[4],colorInfo:v[6],colorInfoActive:v[7],colorInfoTextHover:v[8],colorInfoText:v[9],colorInfoTextActive:v[10],colorLinkHover:b[4],colorLink:b[6],colorLinkActive:b[7],colorBgMask:new Ht("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const _A=e=>{let t=e,r=e,n=e,o=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?r=4:e<8&&e>=7?r=5:e<14&&e>=8?r=6:e<16&&e>=14?r=7:e>=16&&(r=8),e<6&&e>=2?n=1:e>=6&&(n=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e,borderRadiusXS:n,borderRadiusSM:r,borderRadiusLG:t,borderRadiusOuter:o}};function HA(e){const{motionUnit:t,motionBase:r,borderRadius:n,lineWidth:o}=e;return Object.assign({motionDurationFast:`${(r+t).toFixed(1)}s`,motionDurationMid:`${(r+t*2).toFixed(1)}s`,motionDurationSlow:`${(r+t*3).toFixed(1)}s`,lineWidthBold:o+1},_A(n))}const WA=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}};function gs(e){return(e+8)/e}function KA(e){const t=Array.from({length:10}).map((r,n)=>{const o=n-1,a=e*Math.pow(Math.E,o/5),i=n>1?Math.floor(a):Math.ceil(a);return Math.floor(i/2)*2});return t[1]=e,t.map(r=>({size:r,lineHeight:gs(r)}))}const qA=e=>{const t=KA(e),r=t.map(c=>c.size),n=t.map(c=>c.lineHeight),o=r[1],a=r[0],i=r[2],l=n[1],s=n[0],u=n[2];return{fontSizeSM:a,fontSize:o,fontSizeLG:i,fontSizeXL:r[3],fontSizeHeading1:r[6],fontSizeHeading2:r[5],fontSizeHeading3:r[4],fontSizeHeading4:r[3],fontSizeHeading5:r[2],lineHeight:l,lineHeightLG:u,lineHeightSM:s,fontHeight:Math.round(l*o),fontHeightLG:Math.round(u*i),fontHeightSM:Math.round(s*a),lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}};function VA(e){const{sizeUnit:t,sizeStep:r}=e;return{sizeXXL:t*(r+8),sizeXL:t*(r+4),sizeLG:t*(r+2),sizeMD:t*(r+1),sizeMS:t*r,size:t*r,sizeSM:t*(r-1),sizeXS:t*(r-2),sizeXXS:t*(r-3)}}const kn=(e,t)=>new Ht(e).setA(t).toRgbString(),yi=(e,t)=>new Ht(e).darken(t).toHexString(),UA=e=>{const t=al(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},XA=(e,t)=>{const r=e||"#fff",n=t||"#000";return{colorBgBase:r,colorTextBase:n,colorText:kn(n,.88),colorTextSecondary:kn(n,.65),colorTextTertiary:kn(n,.45),colorTextQuaternary:kn(n,.25),colorFill:kn(n,.15),colorFillSecondary:kn(n,.06),colorFillTertiary:kn(n,.04),colorFillQuaternary:kn(n,.02),colorBgSolid:kn(n,1),colorBgSolidHover:kn(n,.75),colorBgSolidActive:kn(n,.95),colorBgLayout:yi(r,4),colorBgContainer:yi(r,0),colorBgElevated:yi(r,0),colorBgSpotlight:kn(n,.85),colorBgBlur:"transparent",colorBorder:yi(r,15),colorBorderSecondary:yi(r,6)}};function GA(e){Bc.pink=Bc.magenta,Oc.pink=Oc.magenta;const t=Object.keys(_1).map(r=>{const n=e[r]===Bc[r]?Oc[r]:al(e[r]);return Array.from({length:10},()=>1).reduce((o,a,i)=>(o[`${r}-${i+1}`]=n[i],o[`${r}${i+1}`]=n[i],o),{})}).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({},e),t),LA(e,{generateColorPalettes:UA,generateNeutralColorPalettes:XA})),qA(e.fontSize)),VA(e)),WA(e)),HA(e))}const K1=Ld(GA),nf={token:ol,override:{override:ol},hashed:!0},q1=ee.createContext(nf),il="ant",zp="anticon",YA=["outlined","borderless","filled","underlined"],ZA=(e,t)=>t||(e?`${il}-${e}`:il),Zt=d.createContext({getPrefixCls:ZA,iconPrefixCls:zp}),{Consumer:iz}=Zt,sv={};function Io(e){const t=d.useContext(Zt),{getPrefixCls:r,direction:n,getPopupContainer:o}=t,a=t[e];return Object.assign(Object.assign({classNames:sv,styles:sv},a),{getPrefixCls:r,direction:n,getPopupContainer:o})}const JA=`-ant-${Date.now()}-${Math.random()}`;function QA(e,t){const r={},n=(a,i)=>{let l=a.clone();return l=(i==null?void 0:i(l))||l,l.toRgbString()},o=(a,i)=>{const l=new Ht(a),s=al(l.toRgbString());r[`${i}-color`]=n(l),r[`${i}-color-disabled`]=s[1],r[`${i}-color-hover`]=s[4],r[`${i}-color-active`]=s[6],r[`${i}-color-outline`]=l.clone().setA(.2).toRgbString(),r[`${i}-color-deprecated-bg`]=s[0],r[`${i}-color-deprecated-border`]=s[2]};if(t.primaryColor){o(t.primaryColor,"primary");const a=new Ht(t.primaryColor),i=al(a.toRgbString());i.forEach((s,u)=>{r[`primary-${u+1}`]=s}),r["primary-color-deprecated-l-35"]=n(a,s=>s.lighten(35)),r["primary-color-deprecated-l-20"]=n(a,s=>s.lighten(20)),r["primary-color-deprecated-t-20"]=n(a,s=>s.tint(20)),r["primary-color-deprecated-t-50"]=n(a,s=>s.tint(50)),r["primary-color-deprecated-f-12"]=n(a,s=>s.setA(s.a*.12));const l=new Ht(i[0]);r["primary-color-active-deprecated-f-30"]=n(l,s=>s.setA(s.a*.3)),r["primary-color-active-deprecated-d-02"]=n(l,s=>s.darken(2))}return t.successColor&&o(t.successColor,"success"),t.warningColor&&o(t.warningColor,"warning"),t.errorColor&&o(t.errorColor,"error"),t.infoColor&&o(t.infoColor,"info"),`
|
|
163
|
+
:root {
|
|
164
|
+
${Object.keys(r).map(a=>`--${e}-${a}: ${r[a]};`).join(`
|
|
165
|
+
`)}
|
|
166
|
+
}
|
|
167
|
+
`.trim()}function eF(e,t){const r=QA(e,t);Xr()&&go(r,`${JA}-dynamic-theme`)}const No=d.createContext(!1),tF=({children:e,disabled:t})=>{const r=d.useContext(No);return d.createElement(No.Provider,{value:t??r},e)},Xa=d.createContext(void 0),rF=({children:e,size:t})=>{const r=d.useContext(Xa);return d.createElement(Xa.Provider,{value:t||r},e)};function nF(){const e=Ir(No),t=Ir(Xa);return{componentDisabled:e,componentSize:t}}var V1=br(function e(){vr(this,e)}),U1="CALC_UNIT",oF=new RegExp(U1,"g");function Ac(e){return typeof e=="number"?"".concat(e).concat(U1):e}var aF=(function(e){no(r,e);var t=oo(r);function r(n,o){var a;vr(this,r),a=t.call(this),M(tt(a),"result",""),M(tt(a),"unitlessCssVar",void 0),M(tt(a),"lowPriority",void 0);var i=ut(n);return a.unitlessCssVar=o,n instanceof r?a.result="(".concat(n.result,")"):i==="number"?a.result=Ac(n):i==="string"&&(a.result=n),a}return br(r,[{key:"add",value:function(n){return n instanceof r?this.result="".concat(this.result," + ").concat(n.getResult()):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," + ").concat(Ac(n))),this.lowPriority=!0,this}},{key:"sub",value:function(n){return n instanceof r?this.result="".concat(this.result," - ").concat(n.getResult()):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," - ").concat(Ac(n))),this.lowPriority=!0,this}},{key:"mul",value:function(n){return this.lowPriority&&(this.result="(".concat(this.result,")")),n instanceof r?this.result="".concat(this.result," * ").concat(n.getResult(!0)):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," * ").concat(n)),this.lowPriority=!1,this}},{key:"div",value:function(n){return this.lowPriority&&(this.result="(".concat(this.result,")")),n instanceof r?this.result="".concat(this.result," / ").concat(n.getResult(!0)):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," / ").concat(n)),this.lowPriority=!1,this}},{key:"getResult",value:function(n){return this.lowPriority||n?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(n){var o=this,a=n||{},i=a.unit,l=!0;return typeof i=="boolean"?l=i:Array.from(this.unitlessCssVar).some(function(s){return o.result.includes(s)})&&(l=!1),this.result=this.result.replace(oF,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),r})(V1),iF=(function(e){no(r,e);var t=oo(r);function r(n){var o;return vr(this,r),o=t.call(this),M(tt(o),"result",0),n instanceof r?o.result=n.result:typeof n=="number"&&(o.result=n),o}return br(r,[{key:"add",value:function(n){return n instanceof r?this.result+=n.result:typeof n=="number"&&(this.result+=n),this}},{key:"sub",value:function(n){return n instanceof r?this.result-=n.result:typeof n=="number"&&(this.result-=n),this}},{key:"mul",value:function(n){return n instanceof r?this.result*=n.result:typeof n=="number"&&(this.result*=n),this}},{key:"div",value:function(n){return n instanceof r?this.result/=n.result:typeof n=="number"&&(this.result/=n),this}},{key:"equal",value:function(){return this.result}}]),r})(V1),lF=function(e,t){var r=e==="css"?aF:iF;return function(n){return new r(n,t)}},uv=function(e,t){return"".concat([t,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function nr(e){var t=d.useRef();t.current=e;var r=d.useCallback(function(){for(var n,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(n=t.current)===null||n===void 0?void 0:n.call.apply(n,[t].concat(a))},[]);return r}function ll(e){var t=d.useRef(!1),r=d.useState(e),n=ce(r,2),o=n[0],a=n[1];d.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function i(l,s){s&&t.current||a(l)}return[o,i]}function Fc(e){return e!==void 0}function Ur(e,t){var r=t||{},n=r.defaultValue,o=r.value,a=r.onChange,i=r.postState,l=ll(function(){return Fc(o)?o:Fc(n)?typeof n=="function"?n():n:typeof e=="function"?e():e}),s=ce(l,2),u=s[0],c=s[1],f=o!==void 0?o:u,p=i?i(f):f,h=nr(a),v=ll([f]),g=ce(v,2),m=g[0],b=g[1];Xg(function(){var C=m[0];u!==C&&h(u,C)},[m]),Xg(function(){Fc(o)||c(o)},[o]);var y=nr(function(C,D){c(C,D),b([f],D)});return[p,y]}function cv(e,t,r,n){var o=H({},t[e]);if(n!=null&&n.deprecatedTokens){var a=n.deprecatedTokens;a.forEach(function(l){var s=ce(l,2),u=s[0],c=s[1];if(o!=null&&o[u]||o!=null&&o[c]){var f;(f=o[c])!==null&&f!==void 0||(o[c]=o==null?void 0:o[u])}})}var i=H(H({},r),o);return Object.keys(i).forEach(function(l){i[l]===t[l]&&delete i[l]}),i}var X1=typeof CSSINJS_STATISTIC<"u",of=!0;function er(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];if(!X1)return Object.assign.apply(Object,[{}].concat(t));of=!1;var n={};return t.forEach(function(o){if(ut(o)==="object"){var a=Object.keys(o);a.forEach(function(i){Object.defineProperty(n,i,{configurable:!0,enumerable:!0,get:function(){return o[i]}})})}}),of=!0,n}var dv={};function sF(){}var uF=function(e){var t,r=e,n=sF;return X1&&typeof Proxy<"u"&&(t=new Set,r=new Proxy(e,{get:function(o,a){if(of){var i;(i=t)===null||i===void 0||i.add(a)}return o[a]}}),n=function(o,a){var i;dv[o]={global:Array.from(t),component:H(H({},(i=dv[o])===null||i===void 0?void 0:i.component),a)}}),{token:r,keys:t,flush:n}};function fv(e,t,r){if(typeof r=="function"){var n;return r(er(t,(n=t[e])!==null&&n!==void 0?n:{}))}return r??{}}function cF(e){return e==="js"?{max:Math.max,min:Math.min}:{max:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return"max(".concat(r.map(function(o){return se(o)}).join(","),")")},min:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return"min(".concat(r.map(function(o){return se(o)}).join(","),")")}}}var dF=1e3*60*10,fF=(function(){function e(){vr(this,e),M(this,"map",new Map),M(this,"objectIDMap",new WeakMap),M(this,"nextID",0),M(this,"lastAccessBeat",new Map),M(this,"accessBeat",0)}return br(e,[{key:"set",value:function(t,r){this.clear();var n=this.getCompositeKey(t);this.map.set(n,r),this.lastAccessBeat.set(n,Date.now())}},{key:"get",value:function(t){var r=this.getCompositeKey(t),n=this.map.get(r);return this.lastAccessBeat.set(r,Date.now()),this.accessBeat+=1,n}},{key:"getCompositeKey",value:function(t){var r=this,n=t.map(function(o){return o&&ut(o)==="object"?"obj_".concat(r.getObjectID(o)):"".concat(ut(o),"_").concat(o)});return n.join("|")}},{key:"getObjectID",value:function(t){if(this.objectIDMap.has(t))return this.objectIDMap.get(t);var r=this.nextID;return this.objectIDMap.set(t,r),this.nextID+=1,r}},{key:"clear",value:function(){var t=this;if(this.accessBeat>1e4){var r=Date.now();this.lastAccessBeat.forEach(function(n,o){r-n>dF&&(t.map.delete(o),t.lastAccessBeat.delete(o))}),this.accessBeat=0}}}]),e})(),pv=new fF;function pF(e,t){return ee.useMemo(function(){var r=pv.get(t);if(r)return r;var n=e();return pv.set(t,n),n},t)}var mF=function(){return{}};function hF(e){var t=e.useCSP,r=t===void 0?mF:t,n=e.useToken,o=e.usePrefix,a=e.getResetStyles,i=e.getCommonStyle,l=e.getCompUnitless;function s(p,h,v,g){var m=Array.isArray(p)?p[0]:p;function b(x){return"".concat(String(m)).concat(x.slice(0,1).toUpperCase()).concat(x.slice(1))}var y=(g==null?void 0:g.unitless)||{},C=typeof l=="function"?l(p):{},D=H(H({},C),{},M({},b("zIndexPopup"),!0));Object.keys(y).forEach(function(x){D[b(x)]=y[x]});var w=H(H({},g),{},{unitless:D,prefixToken:b}),k=c(p,h,v,w),E=u(m,v,w);return function(x){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x,j=k(x,F),$=ce(j,2),P=$[1],A=E(F),O=ce(A,2),S=O[0],B=O[1];return[S,P,B]}}function u(p,h,v){var g=v.unitless,m=v.injectStyle,b=m===void 0?!0:m,y=v.prefixToken,C=v.ignore,D=function(k){var E=k.rootCls,x=k.cssVar,F=x===void 0?{}:x,j=n(),$=j.realToken;return kA({path:[p],prefix:F.prefix,key:F.key,unitless:g,ignore:C,token:$,scope:E},function(){var P=fv(p,$,h),A=cv(p,$,P,{deprecatedTokens:v==null?void 0:v.deprecatedTokens});return Object.keys(P).forEach(function(O){A[y(O)]=A[O],delete A[O]}),A}),null},w=function(k){var E=n(),x=E.cssVar;return[function(F){return b&&x?ee.createElement(ee.Fragment,null,ee.createElement(D,{rootCls:k,cssVar:x,component:p}),F):F},x==null?void 0:x.key]};return w}function c(p,h,v){var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},m=Array.isArray(p)?p:[p,p],b=ce(m,1),y=b[0],C=m.join("-"),D=e.layer||{name:"antd"};return function(w){var k=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w,E=n(),x=E.theme,F=E.realToken,j=E.hashId,$=E.token,P=E.cssVar,A=o(),O=A.rootPrefixCls,S=A.iconPrefixCls,B=r(),R=P?"css":"js",N=pF(function(){var Q=new Set;return P&&Object.keys(g.unitless||{}).forEach(function(te){Q.add(cs(te,P.prefix)),Q.add(cs(te,uv(y,P.prefix)))}),lF(R,Q)},[R,y,P==null?void 0:P.prefix]),T=cF(R),L=T.max,X=T.min,_={theme:x,token:$,hashId:j,nonce:function(){return B.nonce},clientOnly:g.clientOnly,layer:D,order:g.order||-999};typeof a=="function"&&Kd(H(H({},_),{},{clientOnly:!1,path:["Shared",O]}),function(){return a($,{prefix:{rootPrefixCls:O,iconPrefixCls:S},csp:B})});var q=Kd(H(H({},_),{},{path:[C,w,S]}),function(){if(g.injectStyle===!1)return[];var Q=uF($),te=Q.token,z=Q.flush,Y=fv(y,F,v),V=".".concat(w),G=cv(y,F,Y,{deprecatedTokens:g.deprecatedTokens});P&&Y&&ut(Y)==="object"&&Object.keys(Y).forEach(function(U){Y[U]="var(".concat(cs(U,uv(y,P.prefix)),")")});var K=er(te,{componentCls:V,prefixCls:w,iconCls:".".concat(S),antCls:".".concat(O),calc:N,max:L,min:X},P?Y:G),W=h(K,{hashId:j,prefixCls:w,rootPrefixCls:O,iconPrefixCls:S});z(y,G);var re=typeof i=="function"?i(K,w,k,g.resetFont):null;return[g.resetStyle===!1?null:re,W]});return[q,j]}}function f(p,h,v){var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},m=c(p,h,v,H({resetStyle:!1,order:-998},g)),b=function(y){var C=y.prefixCls,D=y.rootCls,w=D===void 0?C:D;return m(C,w),null};return b}return{genStyleHooks:s,genSubStyleComponent:f,genComponentStyleHook:c}}const na=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],gF="5.27.1";function Nc(e){return e>=0&&e<=255}function $i(e,t){const{r,g:n,b:o,a}=new Ht(e).toRgb();if(a<1)return e;const{r:i,g:l,b:s}=new Ht(t).toRgb();for(let u=.01;u<=1;u+=.01){const c=Math.round((r-i*(1-u))/u),f=Math.round((n-l*(1-u))/u),p=Math.round((o-s*(1-u))/u);if(Nc(c)&&Nc(f)&&Nc(p))return new Ht({r:c,g:f,b:p,a:Math.round(u*100)/100}).toRgbString()}return new Ht({r,g:n,b:o,a:1}).toRgbString()}var vF=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};function G1(e){const{override:t}=e,r=vF(e,["override"]),n=Object.assign({},t);Object.keys(ol).forEach(f=>{delete n[f]});const o=Object.assign(Object.assign({},r),n),a=480,i=576,l=768,s=992,u=1200,c=1600;return o.motion===!1&&(o.motionDurationFast="0s",o.motionDurationMid="0s",o.motionDurationSlow="0s"),Object.assign(Object.assign(Object.assign({},o),{colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:$i(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:$i(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:$i(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.lineWidth*3,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:$i(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:`
|
|
168
|
+
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
169
|
+
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
170
|
+
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
171
|
+
`,boxShadowSecondary:`
|
|
172
|
+
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
173
|
+
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
174
|
+
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
175
|
+
`,boxShadowTertiary:`
|
|
176
|
+
0 1px 2px 0 rgba(0, 0, 0, 0.03),
|
|
177
|
+
0 1px 6px -1px rgba(0, 0, 0, 0.02),
|
|
178
|
+
0 2px 4px 0 rgba(0, 0, 0, 0.02)
|
|
179
|
+
`,screenXS:a,screenXSMin:a,screenXSMax:i-1,screenSM:i,screenSMMin:i,screenSMMax:l-1,screenMD:l,screenMDMin:l,screenMDMax:s-1,screenLG:s,screenLGMin:s,screenLGMax:u-1,screenXL:u,screenXLMin:u,screenXLMax:c-1,screenXXL:c,screenXXLMin:c,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`
|
|
180
|
+
0 1px 2px -2px ${new Ht("rgba(0, 0, 0, 0.16)").toRgbString()},
|
|
181
|
+
0 3px 6px 0 ${new Ht("rgba(0, 0, 0, 0.12)").toRgbString()},
|
|
182
|
+
0 5px 12px 4px ${new Ht("rgba(0, 0, 0, 0.09)").toRgbString()}
|
|
183
|
+
`,boxShadowDrawerRight:`
|
|
184
|
+
-6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
185
|
+
-3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
186
|
+
-9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
|
187
|
+
`,boxShadowDrawerLeft:`
|
|
188
|
+
6px 0 16px 0 rgba(0, 0, 0, 0.08),
|
|
189
|
+
3px 0 6px -4px rgba(0, 0, 0, 0.12),
|
|
190
|
+
9px 0 28px 8px rgba(0, 0, 0, 0.05)
|
|
191
|
+
`,boxShadowDrawerUp:`
|
|
192
|
+
0 6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
193
|
+
0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
194
|
+
0 9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
195
|
+
`,boxShadowDrawerDown:`
|
|
196
|
+
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
|
|
197
|
+
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
198
|
+
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
|
|
199
|
+
`,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 mv=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const Y1={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},bF={motionBase:!0,motionUnit:!0},yF={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},Z1=(e,t,r)=>{const n=r.getDerivativeToken(e),{override:o}=t,a=mv(t,["override"]);let i=Object.assign(Object.assign({},n),{override:o});return i=G1(i),a&&Object.entries(a).forEach(([l,s])=>{const{theme:u}=s,c=mv(s,["theme"]);let f=c;u&&(f=Z1(Object.assign(Object.assign({},i),c),{override:c},u)),i[l]=f}),i};function Yr(){const{token:e,hashed:t,theme:r,override:n,cssVar:o}=ee.useContext(q1),a=`${gF}-${t||""}`,i=r||K1,[l,s,u]=YO(i,[ol,e],{salt:a,override:n,getComputedToken:Z1,formatToken:G1,cssVar:o&&{prefix:o.prefix,key:o.key,unitless:Y1,ignore:bF,preserve:yF}});return[i,u,t?s:"",l,o]}const sl={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Br=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),Cl=()=>({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"}}),zs=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),CF=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),xF=(e,t,r,n)=>{const o=`[class^="${t}"], [class*=" ${t}"]`,a=r?`.${r}`:o,i={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let l={};return n!==!1&&(l={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[a]:Object.assign(Object.assign(Object.assign({},l),i),{[o]:i})}},Po=(e,t)=>({outline:`${se(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),ul=(e,t)=>({"&:focus-visible":Po(e)}),J1=e=>({[`.${e}`]:Object.assign(Object.assign({},Cl()),{[`.${e} .${e}-icon`]:{display:"block"}})}),wF=e=>Object.assign(Object.assign({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none"},ul(e)),{"&:focus, &:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive}}),{genStyleHooks:Hr,genComponentStyleHook:EF,genSubStyleComponent:Q1}=hF({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=Ir(Zt);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,r,n,o]=Yr();return{theme:e,realToken:t,hashId:r,token:n,cssVar:o}},useCSP:()=>{const{csp:e}=Ir(Zt);return e??{}},getResetStyles:(e,t)=>{var r;const n=CF(e);return[n,{"&":n},J1((r=t==null?void 0:t.prefix.iconPrefixCls)!==null&&r!==void 0?r:zp)]},getCommonStyle:xF,getCompUnitless:()=>Y1});function kF(e,t){return na.reduce((r,n)=>{const o=e[`${n}1`],a=e[`${n}3`],i=e[`${n}6`],l=e[`${n}7`];return Object.assign(Object.assign({},r),t(n,{lightColor:o,lightBorderColor:a,darkColor:i,textColor:l}))},{})}const DF=(e,t)=>{const[r,n]=Yr();return Kd({token:n,hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce,layer:{name:"antd"}},()=>J1(e))},SF=Object.assign({},d),{useId:hv}=SF,$F=()=>"",BF=typeof hv>"u"?$F:hv;function OF(e,t,r){var n;oi();const o=e||{},a=o.inherit===!1||!t?Object.assign(Object.assign({},nf),{hashed:(n=t==null?void 0:t.hashed)!==null&&n!==void 0?n:nf.hashed,cssVar:t==null?void 0:t.cssVar}):t,i=BF();return la(()=>{var l,s;if(!e)return t;const u=Object.assign({},a.components);Object.keys(e.components||{}).forEach(p=>{u[p]=Object.assign(Object.assign({},u[p]),e.components[p])});const c=`css-var-${i.replace(/:/g,"")}`,f=((l=o.cssVar)!==null&&l!==void 0?l:a.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:r==null?void 0:r.prefixCls},typeof a.cssVar=="object"?a.cssVar:{}),typeof o.cssVar=="object"?o.cssVar:{}),{key:typeof o.cssVar=="object"&&((s=o.cssVar)===null||s===void 0?void 0:s.key)||c});return Object.assign(Object.assign(Object.assign({},a),o),{token:Object.assign(Object.assign({},a.token),o.token),components:u,cssVar:f})},[o,a],(l,s)=>l.some((u,c)=>{const f=s[c];return!Jn(u,f,!0)}))}var AF=["children"],eC=d.createContext({});function FF(e){var t=e.children,r=Ct(e,AF);return d.createElement(eC.Provider,{value:r},t)}var NF=(function(e){no(r,e);var t=oo(r);function r(){return vr(this,r),t.apply(this,arguments)}return br(r,[{key:"render",value:function(){return this.props.children}}]),r})(d.Component);function PF(e){var t=d.useReducer(function(l){return l+1},0),r=ce(t,2),n=r[1],o=d.useRef(e),a=nr(function(){return o.current}),i=nr(function(l){o.current=typeof l=="function"?l(o.current):l,n()});return[a,i]}var Eo="none",Vl="appear",Ul="enter",Xl="leave",gv="none",Rn="prepare",Ba="start",Oa="active",Lp="end",tC="prepared";function vv(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit".concat(e)]="webkit".concat(t),r["Moz".concat(e)]="moz".concat(t),r["ms".concat(e)]="MS".concat(t),r["O".concat(e)]="o".concat(t.toLowerCase()),r}function jF(e,t){var r={animationend:vv("Animation","AnimationEnd"),transitionend:vv("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete r.animationend.animation,"TransitionEvent"in t||delete r.transitionend.transition),r}var RF=jF(Xr(),typeof window<"u"?window:{}),rC={};if(Xr()){var IF=document.createElement("div");rC=IF.style}var Gl={};function nC(e){if(Gl[e])return Gl[e];var t=RF[e];if(t)for(var r=Object.keys(t),n=r.length,o=0;o<n;o+=1){var a=r[o];if(Object.prototype.hasOwnProperty.call(t,a)&&a in rC)return Gl[e]=t[a],Gl[e]}return""}var oC=nC("animationend"),aC=nC("transitionend"),iC=!!(oC&&aC),bv=oC||"animationend",yv=aC||"transitionend";function Cv(e,t){if(!e)return null;if(ut(e)==="object"){var r=t.replace(/-\w/g,function(n){return n[1].toUpperCase()});return e[r]}return"".concat(e,"-").concat(t)}const TF=(function(e){var t=Ve();function r(o){o&&(o.removeEventListener(yv,e),o.removeEventListener(bv,e))}function n(o){t.current&&t.current!==o&&r(t.current),o&&o!==t.current&&(o.addEventListener(yv,e),o.addEventListener(bv,e),t.current=o)}return d.useEffect(function(){return function(){r(t.current)}},[]),[n,r]});var lC=Xr()?Nb:Ot;const MF=(function(){var e=d.useRef(null);function t(){qt.cancel(e.current)}function r(n){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var a=qt(function(){o<=1?n({isCanceled:function(){return a!==e.current}}):r(n,o-1)});e.current=a}return d.useEffect(function(){return function(){t()}},[]),[r,t]});var zF=[Rn,Ba,Oa,Lp],LF=[Rn,tC],sC=!1,_F=!0;function uC(e){return e===Oa||e===Lp}const HF=(function(e,t,r){var n=ll(gv),o=ce(n,2),a=o[0],i=o[1],l=MF(),s=ce(l,2),u=s[0],c=s[1];function f(){i(Rn,!0)}var p=t?LF:zF;return lC(function(){if(a!==gv&&a!==Lp){var h=p.indexOf(a),v=p[h+1],g=r(a);g===sC?i(v,!0):v&&u(function(m){function b(){m.isCanceled()||i(v,!0)}g===!0?b():Promise.resolve(g).then(b)})}},[e,a]),d.useEffect(function(){return function(){c()}},[]),[f,a]});function WF(e,t,r,n){var o=n.motionEnter,a=o===void 0?!0:o,i=n.motionAppear,l=i===void 0?!0:i,s=n.motionLeave,u=s===void 0?!0:s,c=n.motionDeadline,f=n.motionLeaveImmediately,p=n.onAppearPrepare,h=n.onEnterPrepare,v=n.onLeavePrepare,g=n.onAppearStart,m=n.onEnterStart,b=n.onLeaveStart,y=n.onAppearActive,C=n.onEnterActive,D=n.onLeaveActive,w=n.onAppearEnd,k=n.onEnterEnd,E=n.onLeaveEnd,x=n.onVisibleChanged,F=ll(),j=ce(F,2),$=j[0],P=j[1],A=PF(Eo),O=ce(A,2),S=O[0],B=O[1],R=ll(null),N=ce(R,2),T=N[0],L=N[1],X=S(),_=Ve(!1),q=Ve(null);function Q(){return r()}var te=Ve(!1);function z(){B(Eo),L(null,!0)}var Y=nr(function(he){var ve=S();if(ve!==Eo){var be=Q();if(!(he&&!he.deadline&&he.target!==be)){var ye=te.current,Ae;ve===Vl&&ye?Ae=w==null?void 0:w(be,he):ve===Ul&&ye?Ae=k==null?void 0:k(be,he):ve===Xl&&ye&&(Ae=E==null?void 0:E(be,he)),ye&&Ae!==!1&&z()}}}),V=TF(Y),G=ce(V,1),K=G[0],W=function(he){switch(he){case Vl:return M(M(M({},Rn,p),Ba,g),Oa,y);case Ul:return M(M(M({},Rn,h),Ba,m),Oa,C);case Xl:return M(M(M({},Rn,v),Ba,b),Oa,D);default:return{}}},re=d.useMemo(function(){return W(X)},[X]),U=HF(X,!e,function(he){if(he===Rn){var ve=re[Rn];return ve?ve(Q()):sC}if(ue in re){var be;L(((be=re[ue])===null||be===void 0?void 0:be.call(re,Q(),null))||null)}return ue===Oa&&X!==Eo&&(K(Q()),c>0&&(clearTimeout(q.current),q.current=setTimeout(function(){Y({deadline:!0})},c))),ue===tC&&z(),_F}),J=ce(U,2),ne=J[0],ue=J[1],me=uC(ue);te.current=me;var Ce=Ve(null);lC(function(){if(!(_.current&&Ce.current===t)){P(t);var he=_.current;_.current=!0;var ve;!he&&t&&l&&(ve=Vl),he&&t&&a&&(ve=Ul),(he&&!t&&u||!he&&f&&!t&&u)&&(ve=Xl);var be=W(ve);ve&&(e||be[Rn])?(B(ve),ne()):B(Eo),Ce.current=t}},[t]),Ot(function(){(X===Vl&&!l||X===Ul&&!a||X===Xl&&!u)&&B(Eo)},[l,a,u]),Ot(function(){return function(){_.current=!1,clearTimeout(q.current)}},[]);var Ne=d.useRef(!1);Ot(function(){$&&(Ne.current=!0),$!==void 0&&X===Eo&&((Ne.current||$)&&(x==null||x($)),Ne.current=!0)},[$,X]);var pe=T;return re[Rn]&&ue===Ba&&(pe=H({transition:"none"},pe)),[X,ue,pe,$??t]}function KF(e){var t=e;ut(e)==="object"&&(t=e.transitionSupport);function r(o,a){return!!(o.motionName&&t&&a!==!1)}var n=d.forwardRef(function(o,a){var i=o.visible,l=i===void 0?!0:i,s=o.removeOnLeave,u=s===void 0?!0:s,c=o.forceRender,f=o.children,p=o.motionName,h=o.leavedClassName,v=o.eventProps,g=d.useContext(eC),m=g.motion,b=r(o,m),y=Ve(),C=Ve();function D(){try{return y.current instanceof HTMLElement?y.current:us(C.current)}catch{return null}}var w=WF(b,l,D,o),k=ce(w,4),E=k[0],x=k[1],F=k[2],j=k[3],$=d.useRef(j);j&&($.current=!0);var P=d.useCallback(function(N){y.current=N,Ji(a,N)},[a]),A,O=H(H({},v),{},{visible:l});if(!f)A=null;else if(E===Eo)j?A=f(H({},O),P):!u&&$.current&&h?A=f(H(H({},O),{},{className:h}),P):c||!u&&!h?A=f(H(H({},O),{},{style:{display:"none"}}),P):A=null;else{var S;x===Rn?S="prepare":uC(x)?S="active":x===Ba&&(S="start");var B=Cv(p,"".concat(E,"-").concat(S));A=f(H(H({},O),{},{className:de(Cv(p,E),M(M({},B,B&&S),p,typeof p=="string")),style:F}),P)}if(d.isValidElement(A)&&Zn(A)){var R=ua(A);R||(A=d.cloneElement(A,{ref:P}))}return d.createElement(NF,{ref:C},A)});return n.displayName="CSSMotion",n}const ca=KF(iC);var af="add",lf="keep",sf="remove",Pc="removed";function qF(e){var t;return e&&ut(e)==="object"&&"key"in e?t=e:t={key:e},H(H({},t),{},{key:String(t.key)})}function uf(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(qF)}function VF(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=[],n=0,o=t.length,a=uf(e),i=uf(t);a.forEach(function(u){for(var c=!1,f=n;f<o;f+=1){var p=i[f];if(p.key===u.key){n<f&&(r=r.concat(i.slice(n,f).map(function(h){return H(H({},h),{},{status:af})})),n=f),r.push(H(H({},p),{},{status:lf})),n+=1,c=!0;break}}c||r.push(H(H({},u),{},{status:sf}))}),n<o&&(r=r.concat(i.slice(n).map(function(u){return H(H({},u),{},{status:af})})));var l={};r.forEach(function(u){var c=u.key;l[c]=(l[c]||0)+1});var s=Object.keys(l).filter(function(u){return l[u]>1});return s.forEach(function(u){r=r.filter(function(c){var f=c.key,p=c.status;return f!==u||p!==sf}),r.forEach(function(c){c.key===u&&(c.status=lf)})}),r}var UF=["component","children","onVisibleChanged","onAllRemoved"],XF=["status"],GF=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function YF(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ca,r=(function(n){no(a,n);var o=oo(a);function a(){var i;vr(this,a);for(var l=arguments.length,s=new Array(l),u=0;u<l;u++)s[u]=arguments[u];return i=o.call.apply(o,[this].concat(s)),M(tt(i),"state",{keyEntities:[]}),M(tt(i),"removeKey",function(c){i.setState(function(f){var p=f.keyEntities.map(function(h){return h.key!==c?h:H(H({},h),{},{status:Pc})});return{keyEntities:p}},function(){var f=i.state.keyEntities,p=f.filter(function(h){var v=h.status;return v!==Pc}).length;p===0&&i.props.onAllRemoved&&i.props.onAllRemoved()})}),i}return br(a,[{key:"render",value:function(){var i=this,l=this.state.keyEntities,s=this.props,u=s.component,c=s.children,f=s.onVisibleChanged;s.onAllRemoved;var p=Ct(s,UF),h=u||d.Fragment,v={};return GF.forEach(function(g){v[g]=p[g],delete p[g]}),delete p.keys,d.createElement(h,p,l.map(function(g,m){var b=g.status,y=Ct(g,XF),C=b===af||b===lf;return d.createElement(t,Te({},v,{key:y.key,visible:C,eventProps:y,onVisibleChanged:function(D){f==null||f(D,{key:y.key}),D||i.removeKey(y.key)}}),function(D,w){return c(H(H({},D),{},{index:m}),w)})}))}}],[{key:"getDerivedStateFromProps",value:function(i,l){var s=i.keys,u=l.keyEntities,c=uf(s),f=VF(u,c);return{keyEntities:f.filter(function(p){var h=u.find(function(v){var g=v.key;return p.key===g});return!(h&&h.status===Pc&&p.status===sf)})}}}]),a})(d.Component);return M(r,"defaultProps",{component:"div"}),r}YF(iC);const xv=d.createContext(!0);function ZF(e){const t=d.useContext(xv),{children:r}=e,[,n]=Yr(),{motion:o}=n,a=d.useRef(!1);return a.current||(a.current=t!==o),a.current?d.createElement(xv.Provider,{value:o},d.createElement(FF,{motion:o},r)):r}const JF=()=>null;var QF=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const e3=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let cC;function t3(){return cC||il}function r3(e){return Object.keys(e).some(t=>t.endsWith("Color"))}const n3=e=>{const{prefixCls:t,iconPrefixCls:r,theme:n,holderRender:o}=e;t!==void 0&&(cC=t),n&&r3(n)&&eF(t3(),n)},o3=e=>{const{children:t,csp:r,autoInsertSpaceInButton:n,alert:o,anchor:a,form:i,locale:l,componentSize:s,direction:u,space:c,splitter:f,virtual:p,dropdownMatchSelectWidth:h,popupMatchSelectWidth:v,popupOverflow:g,legacyLocale:m,parentContext:b,iconPrefixCls:y,theme:C,componentDisabled:D,segmented:w,statistic:k,spin:E,calendar:x,carousel:F,cascader:j,collapse:$,typography:P,checkbox:A,descriptions:O,divider:S,drawer:B,skeleton:R,steps:N,image:T,layout:L,list:X,mentions:_,modal:q,progress:Q,result:te,slider:z,breadcrumb:Y,menu:V,pagination:G,input:K,textArea:W,empty:re,badge:U,radio:J,rate:ne,switch:ue,transfer:me,avatar:Ce,message:Ne,tag:pe,table:he,card:ve,tabs:be,timeline:ye,timePicker:Ae,upload:we,notification:He,tree:Me,colorPicker:Fe,datePicker:ge,rangePicker:Se,flex:qe,wave:Ye,dropdown:Xe,warning:Re,tour:lt,tooltip:je,popover:at,popconfirm:vt,floatButton:At,floatButtonGroup:fe,variant:Oe,inputNumber:rt,treeSelect:Ke}=e,ke=d.useCallback((pt,Ze)=>{const{prefixCls:Je}=e;if(Ze)return Ze;const it=Je||b.getPrefixCls("");return pt?`${it}-${pt}`:it},[b.getPrefixCls,e.prefixCls]),Be=y||b.iconPrefixCls||zp,ie=r||b.csp;DF(Be,ie);const De=OF(C,b.theme,{prefixCls:ke("")}),Z={csp:ie,autoInsertSpaceInButton:n,alert:o,anchor:a,locale:l||m,direction:u,space:c,splitter:f,virtual:p,popupMatchSelectWidth:v??h,popupOverflow:g,getPrefixCls:ke,iconPrefixCls:Be,theme:De,segmented:w,statistic:k,spin:E,calendar:x,carousel:F,cascader:j,collapse:$,typography:P,checkbox:A,descriptions:O,divider:S,drawer:B,skeleton:R,steps:N,image:T,input:K,textArea:W,layout:L,list:X,mentions:_,modal:q,progress:Q,result:te,slider:z,breadcrumb:Y,menu:V,pagination:G,empty:re,badge:U,radio:J,rate:ne,switch:ue,transfer:me,avatar:Ce,message:Ne,tag:pe,table:he,card:ve,tabs:be,timeline:ye,timePicker:Ae,upload:we,notification:He,tree:Me,colorPicker:Fe,datePicker:ge,rangePicker:Se,flex:qe,wave:Ye,dropdown:Xe,warning:Re,tour:lt,tooltip:je,popover:at,popconfirm:vt,floatButton:At,floatButtonGroup:fe,variant:Oe,inputNumber:rt,treeSelect:Ke},le=Object.assign({},b);Object.keys(Z).forEach(pt=>{Z[pt]!==void 0&&(le[pt]=Z[pt])}),e3.forEach(pt=>{const Ze=e[pt];Ze&&(le[pt]=Ze)}),typeof n<"u"&&(le.button=Object.assign({autoInsertSpace:n},le.button));const ze=la(()=>le,le,(pt,Ze)=>{const Je=Object.keys(pt),it=Object.keys(Ze);return Je.length!==it.length||Je.some(mt=>pt[mt]!==Ze[mt])}),{layer:xe}=d.useContext(yl),_e=d.useMemo(()=>({prefixCls:Be,csp:ie,layer:xe?"antd":void 0}),[Be,ie,xe]);let We=d.createElement(d.Fragment,null,d.createElement(JF,{dropdownMatchSelectWidth:h}),t);const Ge=d.useMemo(()=>{var pt,Ze,Je,it;return $a(((pt=ra.Form)===null||pt===void 0?void 0:pt.defaultValidateMessages)||{},((Je=(Ze=ze.locale)===null||Ze===void 0?void 0:Ze.Form)===null||Je===void 0?void 0:Je.defaultValidateMessages)||{},((it=ze.form)===null||it===void 0?void 0:it.validateMessages)||{},(i==null?void 0:i.validateMessages)||{})},[ze,i==null?void 0:i.validateMessages]);Object.keys(Ge).length>0&&(We=d.createElement(AA.Provider,{value:Ge},We)),l&&(We=d.createElement(RA,{locale:l,_ANT_MARK__:jA},We)),We=d.createElement(Tp.Provider,{value:_e},We),s&&(We=d.createElement(rF,{size:s},We)),We=d.createElement(ZF,null,We);const ft=d.useMemo(()=>{const pt=De||{},{algorithm:Ze,token:Je,components:it,cssVar:mt}=pt,Pt=QF(pt,["algorithm","token","components","cssVar"]),jt=Ze&&(!Array.isArray(Ze)||Ze.length>0)?Ld(Ze):K1,Rt={};Object.entries(it||{}).forEach(([Jt,pr])=>{const Le=Object.assign({},pr);"algorithm"in Le&&(Le.algorithm===!0?Le.theme=jt:(Array.isArray(Le.algorithm)||typeof Le.algorithm=="function")&&(Le.theme=Ld(Le.algorithm)),delete Le.algorithm),Rt[Jt]=Le});const kt=Object.assign(Object.assign({},ol),Je);return Object.assign(Object.assign({},Pt),{theme:jt,token:kt,components:Rt,override:Object.assign({override:kt},Rt),cssVar:mt})},[De]);return C&&(We=d.createElement(q1.Provider,{value:ft},We)),ze.warning&&(We=d.createElement(OA.Provider,{value:ze.warning},We)),D!==void 0&&(We=d.createElement(tF,{disabled:D},We)),d.createElement(Zt.Provider,{value:ze},We)},ai=e=>{const t=d.useContext(Zt),r=d.useContext(Mp);return d.createElement(o3,Object.assign({parentContext:t,legacyLocale:r},e))};ai.ConfigContext=Zt;ai.SizeContext=Xa;ai.config=n3;ai.useConfig=nF;Object.defineProperty(ai,"SizeContext",{get:()=>Xa});function dC(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function a3(e){return dC(e)instanceof ShadowRoot}function Ls(e){return a3(e)?dC(e):null}function i3(e){return e.replace(/-(.)/g,function(t,r){return r.toUpperCase()})}function l3(e,t){lr(e,"[@ant-design/icons] ".concat(t))}function wv(e){return ut(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(ut(e.icon)==="object"||typeof e.icon=="function")}function Ev(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,r){var n=e[r];switch(r){case"class":t.className=n,delete t.class;break;default:delete t[r],t[i3(r)]=n}return t},{})}function cf(e,t,r){return r?ee.createElement(e.tag,H(H({key:t},Ev(e.attrs)),r),(e.children||[]).map(function(n,o){return cf(n,"".concat(t,"-").concat(e.tag,"-").concat(o))})):ee.createElement(e.tag,H({key:t},Ev(e.attrs)),(e.children||[]).map(function(n,o){return cf(n,"".concat(t,"-").concat(e.tag,"-").concat(o))}))}function fC(e){return al(e)[0]}function pC(e){return e?Array.isArray(e)?e:[e]:[]}var s3=`
|
|
200
|
+
.anticon {
|
|
201
|
+
display: inline-flex;
|
|
202
|
+
align-items: center;
|
|
203
|
+
color: inherit;
|
|
204
|
+
font-style: normal;
|
|
205
|
+
line-height: 0;
|
|
206
|
+
text-align: center;
|
|
207
|
+
text-transform: none;
|
|
208
|
+
vertical-align: -0.125em;
|
|
209
|
+
text-rendering: optimizeLegibility;
|
|
210
|
+
-webkit-font-smoothing: antialiased;
|
|
211
|
+
-moz-osx-font-smoothing: grayscale;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.anticon > * {
|
|
215
|
+
line-height: 1;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.anticon svg {
|
|
219
|
+
display: inline-block;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.anticon::before {
|
|
223
|
+
display: none;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.anticon .anticon-icon {
|
|
227
|
+
display: block;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.anticon[tabindex] {
|
|
231
|
+
cursor: pointer;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.anticon-spin::before,
|
|
235
|
+
.anticon-spin {
|
|
236
|
+
display: inline-block;
|
|
237
|
+
-webkit-animation: loadingCircle 1s infinite linear;
|
|
238
|
+
animation: loadingCircle 1s infinite linear;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
@-webkit-keyframes loadingCircle {
|
|
242
|
+
100% {
|
|
243
|
+
-webkit-transform: rotate(360deg);
|
|
244
|
+
transform: rotate(360deg);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
@keyframes loadingCircle {
|
|
249
|
+
100% {
|
|
250
|
+
-webkit-transform: rotate(360deg);
|
|
251
|
+
transform: rotate(360deg);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
`,u3=function(e){var t=Ir(Tp),r=t.csp,n=t.prefixCls,o=t.layer,a=s3;n&&(a=a.replace(/anticon/g,n)),o&&(a="@layer ".concat(o,` {
|
|
255
|
+
`).concat(a,`
|
|
256
|
+
}`)),Ot(function(){var i=e.current,l=Ls(i);go(a,"@ant-design-icons",{prepend:!o,csp:r,attachTo:l})},[])},c3=["icon","className","onClick","style","primaryColor","secondaryColor"],Ti={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function d3(e){var t=e.primaryColor,r=e.secondaryColor;Ti.primaryColor=t,Ti.secondaryColor=r||fC(t),Ti.calculated=!!r}function f3(){return H({},Ti)}var ii=function(e){var t=e.icon,r=e.className,n=e.onClick,o=e.style,a=e.primaryColor,i=e.secondaryColor,l=Ct(e,c3),s=d.useRef(),u=Ti;if(a&&(u={primaryColor:a,secondaryColor:i||fC(a)}),u3(s),l3(wv(t),"icon should be icon definiton, but got ".concat(t)),!wv(t))return null;var c=t;return c&&typeof c.icon=="function"&&(c=H(H({},c),{},{icon:c.icon(u.primaryColor,u.secondaryColor)})),cf(c.icon,"svg-".concat(c.name),H(H({className:r,onClick:n,style:o,"data-icon":c.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l),{},{ref:s}))};ii.displayName="IconReact";ii.getTwoToneColors=f3;ii.setTwoToneColors=d3;function mC(e){var t=pC(e),r=ce(t,2),n=r[0],o=r[1];return ii.setTwoToneColors({primaryColor:n,secondaryColor:o})}function p3(){var e=ii.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var m3=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];mC(Ms.primary);var sr=d.forwardRef(function(e,t){var r=e.className,n=e.icon,o=e.spin,a=e.rotate,i=e.tabIndex,l=e.onClick,s=e.twoToneColor,u=Ct(e,m3),c=d.useContext(Tp),f=c.prefixCls,p=f===void 0?"anticon":f,h=c.rootClassName,v=de(h,p,M(M({},"".concat(p,"-").concat(n.name),!!n.name),"".concat(p,"-spin"),!!o||n.name==="loading"),r),g=i;g===void 0&&l&&(g=-1);var m=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,b=pC(s),y=ce(b,2),C=y[0],D=y[1];return d.createElement("span",Te({role:"img","aria-label":n.name},u,{ref:t,tabIndex:g,onClick:l,className:v}),d.createElement(ii,{icon:n,primaryColor:C,secondaryColor:D,style:m}))});sr.displayName="AntdIcon";sr.getTwoToneColor=p3;sr.setTwoToneColor=mC;var h3={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"},g3=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:h3}))},hC=d.forwardRef(g3),v3={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"},b3=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:v3}))},y3=d.forwardRef(b3),C3=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
257
|
+
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
258
|
+
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
259
|
+
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
260
|
+
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
261
|
+
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
262
|
+
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
263
|
+
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
264
|
+
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
265
|
+
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
266
|
+
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
267
|
+
summary tabIndex target title type useMap value width wmode wrap`,x3=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
268
|
+
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
269
|
+
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
270
|
+
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
271
|
+
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
272
|
+
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
273
|
+
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,w3="".concat(C3," ").concat(x3).split(/[\s\n]+/),E3="aria-",k3="data-";function kv(e,t){return e.indexOf(t)===0}function Qn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r;t===!1?r={aria:!0,data:!0,attr:!0}:t===!0?r={aria:!0}:r=H({},t);var n={};return Object.keys(e).forEach(function(o){(r.aria&&(o==="role"||kv(o,E3))||r.data&&kv(o,k3)||r.attr&&w3.includes(o))&&(n[o]=e[o])}),n}function gC(e){return e&&ee.isValidElement(e)&&e.type===ee.Fragment}const D3=(e,t,r)=>ee.isValidElement(e)?ee.cloneElement(e,typeof r=="function"?r(e.props||{}):r):t;function eo(e,t){return D3(e,e,t)}function df(e){return e!=null&&e===e.window}const S3=e=>{var t,r;if(typeof window>"u")return 0;let n=0;return df(e)?n=e.pageYOffset:e instanceof Document?n=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(n=e.scrollTop),e&&!df(e)&&typeof n!="number"&&(n=(r=((t=e.ownerDocument)!==null&&t!==void 0?t:e).documentElement)===null||r===void 0?void 0:r.scrollTop),n};function $3(e,t,r,n){const o=r-t;return e/=n/2,e<1?o/2*e*e*e+t:o/2*((e-=2)*e*e+2)+t}function B3(e,t={}){const{getContainer:r=()=>window,callback:n,duration:o=450}=t,a=r(),i=S3(a),l=Date.now(),s=()=>{const u=Date.now()-l,c=$3(u>o?o:u,i,e,o);df(a)?a.scrollTo(window.pageXOffset,c):a instanceof Document||a.constructor.name==="HTMLDocument"?a.documentElement.scrollTop=c:a.scrollTop=c,u<o?qt(s):typeof n=="function"&&n()};qt(s)}const bo=e=>{const[,,,,t]=Yr();return t?`${e}-css-var`:""};var ot={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},O3={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"},A3=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:O3}))},_p=d.forwardRef(A3);const Hp=ee.createContext(void 0),To=100,vC={Modal:To,Drawer:To,Popover:To,Popconfirm:To,Tooltip:To,Tour:To,FloatButton:To},F3={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function N3(e){return e in vC}const yu=(e,t)=>{const[,r]=Yr(),n=ee.useContext(Hp),o=N3(e);let a;if(t!==void 0)a=[t,t];else{let i=n??0;o?i+=(n?0:r.zIndexPopupBase)+vC[e]:i+=F3[e],a=[n===void 0?t:i,i]}return a};function bC(e,t){this.v=e,this.k=t}function Kr(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch{o=0}Kr=function(a,i,l,s){function u(c,f){Kr(a,c,function(p){return this._invoke(c,f,p)})}i?o?o(a,i,{value:l,enumerable:!s,configurable:!s,writable:!s}):a[i]=l:(u("next",0),u("throw",1),u("return",2))},Kr(e,t,r,n)}function Wp(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r=typeof Symbol=="function"?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function a(h,v,g,m){var b=v&&v.prototype instanceof l?v:l,y=Object.create(b.prototype);return Kr(y,"_invoke",(function(C,D,w){var k,E,x,F=0,j=w||[],$=!1,P={p:0,n:0,v:e,a:A,f:A.bind(e,4),d:function(O,S){return k=O,E=0,x=e,P.n=S,i}};function A(O,S){for(E=O,x=S,t=0;!$&&F&&!B&&t<j.length;t++){var B,R=j[t],N=P.p,T=R[2];O>3?(B=T===S)&&(x=R[(E=R[4])?5:(E=3,3)],R[4]=R[5]=e):R[0]<=N&&((B=O<2&&N<R[1])?(E=0,P.v=S,P.n=R[1]):N<T&&(B=O<3||R[0]>S||S>T)&&(R[4]=O,R[5]=S,P.n=T,E=0))}if(B||O>1)return i;throw $=!0,S}return function(O,S,B){if(F>1)throw TypeError("Generator is already running");for($&&S===1&&A(S,B),E=S,x=B;(t=E<2?e:x)||!$;){k||(E?E<3?(E>1&&(P.n=-1),A(E,x)):P.n=x:P.v=x);try{if(F=2,k){if(E||(O="next"),t=k[O]){if(!(t=t.call(k,x)))throw TypeError("iterator result is not an object");if(!t.done)return t;x=t.value,E<2&&(E=0)}else E===1&&(t=k.return)&&t.call(k),E<2&&(x=TypeError("The iterator does not provide a '"+O+"' method"),E=1);k=e}else if((t=($=P.n<0)?x:C.call(D,P))!==i)break}catch(R){k=e,E=1,x=R}finally{F=1}}return{value:t,done:$}}})(h,g,m),!0),y}var i={};function l(){}function s(){}function u(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(Kr(t={},n,function(){return this}),t),f=u.prototype=l.prototype=Object.create(c);function p(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,u):(h.__proto__=u,Kr(h,o,"GeneratorFunction")),h.prototype=Object.create(f),h}return s.prototype=u,Kr(f,"constructor",u),Kr(u,"constructor",s),s.displayName="GeneratorFunction",Kr(u,o,"GeneratorFunction"),Kr(f),Kr(f,o,"Generator"),Kr(f,n,function(){return this}),Kr(f,"toString",function(){return"[object Generator]"}),(Wp=function(){return{w:a,m:p}})()}function _s(e,t){function r(o,a,i,l){try{var s=e[o](a),u=s.value;return u instanceof bC?t.resolve(u.v).then(function(c){r("next",c,i,l)},function(c){r("throw",c,i,l)}):t.resolve(u).then(function(c){s.value=c,i(s)},function(c){return r("throw",c,i,l)})}catch(c){l(c)}}var n;this.next||(Kr(_s.prototype),Kr(_s.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),Kr(this,"_invoke",function(o,a,i){function l(){return new t(function(s,u){r(o,i,s,u)})}return n=n?n.then(l,l):l()},!0)}function yC(e,t,r,n,o){return new _s(Wp().w(e,t,r,n),o||Promise)}function P3(e,t,r,n,o){var a=yC(e,t,r,n,o);return a.next().then(function(i){return i.done?i.value:a.next()})}function j3(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function o(){for(;r.length;)if((n=r.pop())in t)return o.value=n,o.done=!1,o;return o.done=!0,o}}function Dv(e){if(e!=null){var t=e[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(ut(e)+" is not iterable")}function Gr(){var e=Wp(),t=e.m(Gr),r=(Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__).constructor;function n(i){var l=typeof i=="function"&&i.constructor;return!!l&&(l===r||(l.displayName||l.name)==="GeneratorFunction")}var o={throw:1,return:2,break:3,continue:3};function a(i){var l,s;return function(u){l||(l={stop:function(){return s(u.a,2)},catch:function(){return u.v},abrupt:function(c,f){return s(u.a,o[c],f)},delegateYield:function(c,f,p){return l.resultName=f,s(u.d,Dv(c),p)},finish:function(c){return s(u.f,c)}},s=function(c,f,p){u.p=l.prev,u.n=l.next;try{return c(f,p)}finally{l.next=u.n}}),l.resultName&&(l[l.resultName]=u.v,l.resultName=void 0),l.sent=u.v,l.next=u.n;try{return i.call(this,l)}finally{u.p=l.prev,u.n=l.next}}}return(Gr=function(){return{wrap:function(i,l,s,u){return e.w(a(i),l,s,u&&u.reverse())},isGeneratorFunction:n,mark:e.m,awrap:function(i,l){return new bC(i,l)},AsyncIterator:_s,async:function(i,l,s,u,c){return(n(l)?yC:P3)(a(i),l,s,u,c)},keys:j3,values:Dv}})()}function Sv(e,t,r,n,o,a,i){try{var l=e[a](i),s=l.value}catch(u){return void r(u)}l.done?t(s):Promise.resolve(s).then(n,o)}function da(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(s){Sv(a,n,o,i,l,"next",s)}function l(s){Sv(a,n,o,i,l,"throw",s)}i(void 0)})}}var xl=H({},Xw),R3=xl.version,jc=xl.render,I3=xl.unmountComponentAtNode,Cu;try{var T3=Number((R3||"").split(".")[0]);T3>=18&&(Cu=xl.createRoot)}catch{}function $v(e){var t=xl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&ut(t)==="object"&&(t.usingClientEntryPoint=e)}var Hs="__rc_react_root__";function M3(e,t){$v(!0);var r=t[Hs]||Cu(t);$v(!1),r.render(e),t[Hs]=r}function z3(e,t){jc==null||jc(e,t)}function L3(e,t){if(Cu){M3(e,t);return}z3(e,t)}function _3(e){return ff.apply(this,arguments)}function ff(){return ff=da(Gr().mark(function e(t){return Gr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.resolve().then(function(){var n;(n=t[Hs])===null||n===void 0||n.unmount(),delete t[Hs]}));case 1:case"end":return r.stop()}},e)})),ff.apply(this,arguments)}function H3(e){I3(e)}function W3(e){return pf.apply(this,arguments)}function pf(){return pf=da(Gr().mark(function e(t){return Gr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(Cu===void 0){r.next=2;break}return r.abrupt("return",_3(t));case 2:H3(t);case 3:case"end":return r.stop()}},e)})),pf.apply(this,arguments)}const K3=(e,t)=>(L3(e,t),()=>W3(t));let q3=K3;function V3(e){return q3}const Rc=()=>({height:0,opacity:0}),Bv=e=>{const{scrollHeight:t}=e;return{height:t,opacity:1}},U3=e=>({height:e?e.offsetHeight:0}),Ic=(e,t)=>(t==null?void 0:t.deadline)===!0||t.propertyName==="height",CC=(e=il)=>({motionName:`${e}-motion-collapse`,onAppearStart:Rc,onEnterStart:Rc,onAppearActive:Bv,onEnterActive:Bv,onLeaveStart:U3,onLeaveActive:Rc,onAppearEnd:Ic,onEnterEnd:Ic,onLeaveEnd:Ic,motionDeadline:500}),xC=(e,t,r)=>r!==void 0?r:`${e}-${t}`;function fn(e,t){var r=Object.assign({},e);return Array.isArray(t)&&t.forEach(function(n){delete r[n]}),r}const xu=(function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),r=t.width,n=t.height;if(r||n)return!0}if(e.getBoundingClientRect){var o=e.getBoundingClientRect(),a=o.width,i=o.height;if(a||i)return!0}}return!1}),X3=e=>{const{componentCls:t,colorPrimary:r}=e;return{[t]:{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 ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${e.motionDurationSlow} ${e.motionEaseInOut}`,`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`].join(",")}}}}},G3=EF("Wave",X3),wu=`${il}-wave-target`;function Y3(e){return e&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"&&e!=="canvastext"}function Z3(e){var t;const{borderTopColor:r,borderColor:n,backgroundColor:o}=getComputedStyle(e);return(t=[r,n,o].find(Y3))!==null&&t!==void 0?t:null}function Tc(e){return Number.isNaN(e)?0:e}const J3=e=>{const{className:t,target:r,component:n,registerUnmount:o}=e,a=d.useRef(null),i=d.useRef(null);d.useEffect(()=>{i.current=o()},[]);const[l,s]=d.useState(null),[u,c]=d.useState([]),[f,p]=d.useState(0),[h,v]=d.useState(0),[g,m]=d.useState(0),[b,y]=d.useState(0),[C,D]=d.useState(!1),w={left:f,top:h,width:g,height:b,borderRadius:u.map(x=>`${x}px`).join(" ")};l&&(w["--wave-color"]=l);function k(){const x=getComputedStyle(r);s(Z3(r));const F=x.position==="static",{borderLeftWidth:j,borderTopWidth:$}=x;p(F?r.offsetLeft:Tc(-parseFloat(j))),v(F?r.offsetTop:Tc(-parseFloat($))),m(r.offsetWidth),y(r.offsetHeight);const{borderTopLeftRadius:P,borderTopRightRadius:A,borderBottomLeftRadius:O,borderBottomRightRadius:S}=x;c([P,A,S,O].map(B=>Tc(parseFloat(B))))}if(d.useEffect(()=>{if(r){const x=qt(()=>{k(),D(!0)});let F;return typeof ResizeObserver<"u"&&(F=new ResizeObserver(k),F.observe(r)),()=>{qt.cancel(x),F==null||F.disconnect()}}},[]),!C)return null;const E=(n==="Checkbox"||n==="Radio")&&(r==null?void 0:r.classList.contains(wu));return d.createElement(ca,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(x,F)=>{var j,$;if(F.deadline||F.propertyName==="opacity"){const P=(j=a.current)===null||j===void 0?void 0:j.parentElement;($=i.current)===null||$===void 0||$.call(i).then(()=>{P==null||P.remove()})}return!1}},({className:x},F)=>d.createElement("div",{ref:ro(a,F),className:de(t,x,{"wave-quick":E}),style:w}))},Q3=(e,t)=>{var r;const{component:n}=t;if(n==="Checkbox"&&!(!((r=e.querySelector("input"))===null||r===void 0)&&r.checked))return;const o=document.createElement("div");o.style.position="absolute",o.style.left="0px",o.style.top="0px",e==null||e.insertBefore(o,e==null?void 0:e.firstChild);const a=V3();let i=null;function l(){return i}i=a(d.createElement(J3,Object.assign({},t,{target:e,registerUnmount:l})),o)},e5=(e,t,r)=>{const{wave:n}=d.useContext(Zt),[,o,a]=Yr(),i=nr(s=>{const u=e.current;if(n!=null&&n.disabled||!u)return;const c=u.querySelector(`.${wu}`)||u,{showEffect:f}=n||{};(f||Q3)(c,{className:t,token:o,component:r,event:s,hashId:a})}),l=d.useRef(null);return s=>{qt.cancel(l.current),l.current=qt(()=>{i(s)})}},Kp=e=>{const{children:t,disabled:r,component:n}=e,{getPrefixCls:o}=Ir(Zt),a=Ve(null),i=o("wave"),[,l]=G3(i),s=e5(a,de(i,l),n);if(ee.useEffect(()=>{const c=a.current;if(!c||c.nodeType!==1||r)return;const f=p=>{!xu(p.target)||!c.getAttribute||c.getAttribute("disabled")||c.disabled||c.className.includes("disabled")||c.className.includes("-leave")||s(p)};return c.addEventListener("click",f,!0),()=>{c.removeEventListener("click",f,!0)}},[r]),!ee.isValidElement(t))return t??null;const u=Zn(t)?ro(ua(t),a):a;return eo(t,{ref:u})},fa=e=>{const t=ee.useContext(Xa);return ee.useMemo(()=>e?typeof e=="string"?e??t:typeof e=="function"?e(t):t:t,[e,t])},t5=e=>{const{componentCls:t}=e;return{[t]:{"&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},r5=e=>{const{componentCls:t,antCls:r}=e;return{[t]:{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"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${r}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},n5=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},wC=Hr("Space",e=>{const t=er(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[r5(t),n5(t),t5(t)]},()=>({}),{resetStyle:!1});var EC=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const Eu=d.createContext(null),ku=(e,t)=>{const r=d.useContext(Eu),n=d.useMemo(()=>{if(!r)return"";const{compactDirection:o,isFirstItem:a,isLastItem:i}=r,l=o==="vertical"?"-vertical-":"-";return de(`${e}-compact${l}item`,{[`${e}-compact${l}first-item`]:a,[`${e}-compact${l}last-item`]:i,[`${e}-compact${l}item-rtl`]:t==="rtl"})},[e,t,r]);return{compactSize:r==null?void 0:r.compactSize,compactDirection:r==null?void 0:r.compactDirection,compactItemClassnames:n}},o5=e=>{const{children:t}=e;return d.createElement(Eu.Provider,{value:null},t)},a5=e=>{const{children:t}=e,r=EC(e,["children"]);return d.createElement(Eu.Provider,{value:d.useMemo(()=>r,[r])},t)},i5=e=>{const{getPrefixCls:t,direction:r}=d.useContext(Zt),{size:n,direction:o,block:a,prefixCls:i,className:l,rootClassName:s,children:u}=e,c=EC(e,["size","direction","block","prefixCls","className","rootClassName","children"]),f=fa(C=>n??C),p=t("space-compact",i),[h,v]=wC(p),g=de(p,v,{[`${p}-rtl`]:r==="rtl",[`${p}-block`]:a,[`${p}-vertical`]:o==="vertical"},l,s),m=d.useContext(Eu),b=_n(u),y=d.useMemo(()=>b.map((C,D)=>{const w=(C==null?void 0:C.key)||`${p}-item-${D}`;return d.createElement(a5,{key:w,compactSize:f,compactDirection:o,isFirstItem:D===0&&(!m||(m==null?void 0:m.isFirstItem)),isLastItem:D===b.length-1&&(!m||(m==null?void 0:m.isLastItem))},C)}),[n,b,m]);return b.length===0?null:h(d.createElement("div",Object.assign({className:g},c),y))};var l5=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const kC=d.createContext(void 0),s5=e=>{const{getPrefixCls:t,direction:r}=d.useContext(Zt),{prefixCls:n,size:o,className:a}=e,i=l5(e,["prefixCls","size","className"]),l=t("btn-group",n),[,,s]=Yr(),u=d.useMemo(()=>{switch(o){case"large":return"lg";case"small":return"sm";default:return""}},[o]),c=de(l,{[`${l}-${u}`]:u,[`${l}-rtl`]:r==="rtl"},a,s);return d.createElement(kC.Provider,{value:o},d.createElement("div",Object.assign({},i,{className:c})))},Ov=/^[\u4E00-\u9FA5]{2}$/,mf=Ov.test.bind(Ov);function Av(e){return typeof e=="string"}function Mc(e){return e==="text"||e==="link"}function u5(e,t){if(e==null)return;const r=t?" ":"";return typeof e!="string"&&typeof e!="number"&&Av(e.type)&&mf(e.props.children)?eo(e,{children:e.props.children.split("").join(r)}):Av(e)?mf(e)?ee.createElement("span",null,e.split("").join(r)):ee.createElement("span",null,e):gC(e)?ee.createElement("span",null,e):e}function c5(e,t){let r=!1;const n=[];return ee.Children.forEach(e,o=>{const a=typeof o,i=a==="string"||a==="number";if(r&&i){const l=n.length-1,s=n[l];n[l]=`${s}${o}`}else n.push(o);r=i}),ee.Children.map(n,o=>u5(o,t))}["default","primary","danger"].concat(Pe(na));const hf=dn((e,t)=>{const{className:r,style:n,children:o,prefixCls:a}=e,i=de(`${a}-icon`,r);return ee.createElement("span",{ref:t,className:i,style:n},o)}),Fv=dn((e,t)=>{const{prefixCls:r,className:n,style:o,iconClassName:a}=e,i=de(`${r}-loading-icon`,n);return ee.createElement(hf,{prefixCls:r,className:i,style:o,ref:t},ee.createElement(_p,{className:a}))}),zc=()=>({width:0,opacity:0,transform:"scale(0)"}),Lc=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),d5=e=>{const{prefixCls:t,loading:r,existIcon:n,className:o,style:a,mount:i}=e,l=!!r;return n?ee.createElement(Fv,{prefixCls:t,className:o,style:a}):ee.createElement(ca,{visible:l,motionName:`${t}-loading-icon-motion`,motionAppear:!i,motionEnter:!i,motionLeave:!i,removeOnLeave:!0,onAppearStart:zc,onAppearActive:Lc,onEnterStart:zc,onEnterActive:Lc,onLeaveStart:Lc,onLeaveActive:zc},({className:s,style:u},c)=>{const f=Object.assign(Object.assign({},a),u);return ee.createElement(Fv,{prefixCls:t,className:de(o,s),style:f,ref:c})})},Nv=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),f5=e=>{const{componentCls:t,fontSize:r,lineWidth:n,groupBorderColor:o,colorErrorHover:a}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(n).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:r}},Nv(`${t}-primary`,o),Nv(`${t}-danger`,a)]}};var p5=["b"],m5=["v"],_c=function(e){return Math.round(Number(e||0))},h5=function(e){if(e instanceof Ht)return e;if(e&&ut(e)==="object"&&"h"in e&&"b"in e){var t=e,r=t.b,n=Ct(t,p5);return H(H({},n),{},{v:r})}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e},cl=(function(e){no(r,e);var t=oo(r);function r(n){return vr(this,r),t.call(this,h5(n))}return br(r,[{key:"toHsbString",value:function(){var n=this.toHsb(),o=_c(n.s*100),a=_c(n.b*100),i=_c(n.h),l=n.a,s="hsb(".concat(i,", ").concat(o,"%, ").concat(a,"%)"),u="hsba(".concat(i,", ").concat(o,"%, ").concat(a,"%, ").concat(l.toFixed(l===0?0:2),")");return l===1?s:u}},{key:"toHsb",value:function(){var n=this.toHsv(),o=n.v,a=Ct(n,m5);return H(H({},a),{},{b:o,a:this.a})}}]),r})(Ht),g5=function(e){return e instanceof cl?e:new cl(e)};g5("#1677ff");const v5=(e,t)=>(e==null?void 0:e.replace(/[^\w/]/g,"").slice(0,t?8:6))||"",b5=(e,t)=>e?v5(e,t):"";let gf=(function(){function e(t){vr(this,e);var r;if(this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=(r=t.colors)===null||r===void 0?void 0:r.map(o=>({color:new e(o.color),percent:o.percent})),this.cleared=t.cleared;return}const n=Array.isArray(t);n&&t.length?(this.colors=t.map(({color:o,percent:a})=>({color:new e(o),percent:a})),this.metaColor=new cl(this.colors[0].color.metaColor)):this.metaColor=new cl(n?"":t),(!t||n&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return br(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return b5(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:t}=this;return t?`linear-gradient(90deg, ${t.map(r=>`${r.color.toRgbString()} ${r.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(t){return!t||this.isGradient()!==t.isGradient()?!1:this.isGradient()?this.colors.length===t.colors.length&&this.colors.every((r,n)=>{const o=t.colors[n];return r.percent===o.percent&&r.color.equals(o.color)}):this.toHexString()===t.toHexString()}}])})();var y5={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"},C5=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:y5}))},vf=d.forwardRef(C5);const DC=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
|
|
274
|
+
opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut},
|
|
275
|
+
opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),x5=e=>({animationDuration:e,animationFillMode:"both"}),w5=e=>({animationDuration:e,animationFillMode:"both"}),qp=(e,t,r,n,o=!1)=>{const a=o?"&":"";return{[`
|
|
276
|
+
${a}${e}-enter,
|
|
277
|
+
${a}${e}-appear
|
|
278
|
+
`]:Object.assign(Object.assign({},x5(n)),{animationPlayState:"paused"}),[`${a}${e}-leave`]:Object.assign(Object.assign({},w5(n)),{animationPlayState:"paused"}),[`
|
|
279
|
+
${a}${e}-enter${e}-enter-active,
|
|
280
|
+
${a}${e}-appear${e}-appear-active
|
|
281
|
+
`]:{animationName:t,animationPlayState:"running"},[`${a}${e}-leave${e}-leave-active`]:{animationName:r,animationPlayState:"running",pointerEvents:"none"}}},E5=new Vt("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),k5=new Vt("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),D5=new Vt("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),S5=new Vt("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),$5=new Vt("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),B5=new Vt("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),O5=new Vt("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),A5=new Vt("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),F5={"move-up":{inKeyframes:O5,outKeyframes:A5},"move-down":{inKeyframes:E5,outKeyframes:k5},"move-left":{inKeyframes:D5,outKeyframes:S5},"move-right":{inKeyframes:$5,outKeyframes:B5}},Ws=(e,t)=>{const{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:o,outKeyframes:a}=F5[t];return[qp(n,o,a,e.motionDurationMid),{[`
|
|
282
|
+
${n}-enter,
|
|
283
|
+
${n}-appear
|
|
284
|
+
`]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},Vp=new Vt("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Up=new Vt("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Xp=new Vt("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Gp=new Vt("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),N5=new Vt("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),P5=new Vt("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),j5=new Vt("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),R5=new Vt("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),I5={"slide-up":{inKeyframes:Vp,outKeyframes:Up},"slide-down":{inKeyframes:Xp,outKeyframes:Gp},"slide-left":{inKeyframes:N5,outKeyframes:P5},"slide-right":{inKeyframes:j5,outKeyframes:R5}},Ga=(e,t)=>{const{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:o,outKeyframes:a}=I5[t];return[qp(n,o,a,e.motionDurationMid),{[`
|
|
285
|
+
${n}-enter,
|
|
286
|
+
${n}-appear
|
|
287
|
+
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},T5=new Vt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),M5=new Vt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),Pv=new Vt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),jv=new Vt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),z5=new Vt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),L5=new Vt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),_5=new Vt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),H5=new Vt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),W5=new Vt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),K5=new Vt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),q5=new Vt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),V5=new Vt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),U5={zoom:{inKeyframes:T5,outKeyframes:M5},"zoom-big":{inKeyframes:Pv,outKeyframes:jv},"zoom-big-fast":{inKeyframes:Pv,outKeyframes:jv},"zoom-left":{inKeyframes:_5,outKeyframes:H5},"zoom-right":{inKeyframes:W5,outKeyframes:K5},"zoom-up":{inKeyframes:z5,outKeyframes:L5},"zoom-down":{inKeyframes:q5,outKeyframes:V5}},Yp=(e,t)=>{const{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:o,outKeyframes:a}=U5[t];return[qp(n,o,a,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[`
|
|
288
|
+
${n}-enter,
|
|
289
|
+
${n}-appear
|
|
290
|
+
`]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},X5=e=>e instanceof gf?e:new gf(e),G5=(e,t)=>{const{r,g:n,b:o,a}=e.toRgb(),i=new cl(e.toRgbString()).onBackground(t).toHsv();return a<=.5?i.v>.5:r*.299+n*.587+o*.114>192},SC=e=>{const{paddingInline:t,onlyIconSize:r}=e;return er(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:r})},$C=e=>{var t,r,n,o,a,i;const l=(t=e.contentFontSize)!==null&&t!==void 0?t:e.fontSize,s=(r=e.contentFontSizeSM)!==null&&r!==void 0?r:e.fontSize,u=(n=e.contentFontSizeLG)!==null&&n!==void 0?n:e.fontSizeLG,c=(o=e.contentLineHeight)!==null&&o!==void 0?o:gs(l),f=(a=e.contentLineHeightSM)!==null&&a!==void 0?a:gs(s),p=(i=e.contentLineHeightLG)!==null&&i!==void 0?i:gs(u),h=G5(new gf(e.colorBgSolid),"#fff")?"#000":"#fff",v=na.reduce((g,m)=>Object.assign(Object.assign({},g),{[`${m}ShadowColor`]:`0 ${se(e.controlOutlineWidth)} 0 ${$i(e[`${m}1`],e.colorBgContainer)}`}),{});return Object.assign(Object.assign({},v),{fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorder,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:h,contentFontSize:l,contentFontSizeSM:s,contentFontSizeLG:u,contentLineHeight:c,contentLineHeightSM:f,contentLineHeightLG:p,paddingBlock:Math.max((e.controlHeight-l*c)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-s*f)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-u*p)/2-e.lineWidth,0)})},Y5=e=>{const{componentCls:t,iconCls:r,fontWeight:n,opacityLoading:o,motionDurationSlow:a,motionEaseInOut:i,iconGap:l,calc:s}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:l,alignItems:"center",justifyContent:"center",fontWeight:n,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${se(e.lineWidth)} ${e.lineType} transparent`,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:e.colorText,"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:Cl(),"> a":{color:"currentColor"},"&:not(:disabled)":ul(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${r})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"},[`&${t}-round`]:{width:"auto"}},[`&${t}-loading`]:{opacity:o,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(u=>`${u} ${a} ${i}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:s(l).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:s(l).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:s(l).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:s(l).mul(-1).equal()}}}}}},BC=(e,t,r)=>({[`&:not(:disabled):not(${e}-disabled)`]:{"&:hover":t,"&:active":r}}),Z5=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),J5=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.calc(e.controlHeight).div(2).equal(),paddingInlineEnd:e.calc(e.controlHeight).div(2).equal()}),Q5=e=>({cursor:"not-allowed",borderColor:e.borderColorDisabled,color:e.colorTextDisabled,background:e.colorBgContainerDisabled,boxShadow:"none"}),Du=(e,t,r,n,o,a,i,l)=>({[`&${e}-background-ghost`]:Object.assign(Object.assign({color:r||void 0,background:t,borderColor:n||void 0,boxShadow:"none"},BC(e,Object.assign({background:t},i),Object.assign({background:t},l))),{"&:disabled":{cursor:"not-allowed",color:o||void 0,borderColor:a||void 0}})}),eN=e=>({[`&:disabled, &${e.componentCls}-disabled`]:Object.assign({},Q5(e))}),tN=e=>({[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",color:e.colorTextDisabled}}),Su=(e,t,r,n)=>{const o=n&&["link","text"].includes(n)?tN:eN;return Object.assign(Object.assign({},o(e)),BC(e.componentCls,t,r))},$u=(e,t,r,n,o)=>({[`&${e.componentCls}-variant-solid`]:Object.assign({color:t,background:r},Su(e,n,o))}),Bu=(e,t,r,n,o)=>({[`&${e.componentCls}-variant-outlined, &${e.componentCls}-variant-dashed`]:Object.assign({borderColor:t,background:r},Su(e,n,o))}),Ou=e=>({[`&${e.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),Au=(e,t,r,n)=>({[`&${e.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:t},Su(e,r,n))}),to=(e,t,r,n,o)=>({[`&${e.componentCls}-variant-${r}`]:Object.assign({color:t,boxShadow:"none"},Su(e,n,o,r))}),rN=e=>{const{componentCls:t}=e;return na.reduce((r,n)=>{const o=e[`${n}6`],a=e[`${n}1`],i=e[`${n}5`],l=e[`${n}2`],s=e[`${n}3`],u=e[`${n}7`];return Object.assign(Object.assign({},r),{[`&${t}-color-${n}`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:o,boxShadow:e[`${n}ShadowColor`]},$u(e,e.colorTextLightSolid,o,{background:i},{background:u})),Bu(e,o,e.colorBgContainer,{color:i,borderColor:i,background:e.colorBgContainer},{color:u,borderColor:u,background:e.colorBgContainer})),Ou(e)),Au(e,a,{color:o,background:l},{color:o,background:s})),to(e,o,"link",{color:i},{color:u})),to(e,o,"text",{color:i,background:a},{color:u,background:s}))})},{})},nN=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.defaultColor,boxShadow:e.defaultShadow},$u(e,e.solidTextColor,e.colorBgSolid,{color:e.solidTextColor,background:e.colorBgSolidHover},{color:e.solidTextColor,background:e.colorBgSolidActive})),Ou(e)),Au(e,e.colorFillTertiary,{color:e.defaultColor,background:e.colorFillSecondary},{color:e.defaultColor,background:e.colorFill})),Du(e.componentCls,e.ghostBg,e.defaultGhostColor,e.defaultGhostBorderColor,e.colorTextDisabled,e.colorBorder)),to(e,e.textTextColor,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),oN=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorPrimary,boxShadow:e.primaryShadow},Bu(e,e.colorPrimary,e.colorBgContainer,{color:e.colorPrimaryTextHover,borderColor:e.colorPrimaryHover,background:e.colorBgContainer},{color:e.colorPrimaryTextActive,borderColor:e.colorPrimaryActive,background:e.colorBgContainer})),Ou(e)),Au(e,e.colorPrimaryBg,{color:e.colorPrimary,background:e.colorPrimaryBgHover},{color:e.colorPrimary,background:e.colorPrimaryBorder})),to(e,e.colorPrimaryText,"text",{color:e.colorPrimaryTextHover,background:e.colorPrimaryBg},{color:e.colorPrimaryTextActive,background:e.colorPrimaryBorder})),to(e,e.colorPrimaryText,"link",{color:e.colorPrimaryTextHover,background:e.linkHoverBg},{color:e.colorPrimaryTextActive})),Du(e.componentCls,e.ghostBg,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),aN=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorError,boxShadow:e.dangerShadow},$u(e,e.dangerColor,e.colorError,{background:e.colorErrorHover},{background:e.colorErrorActive})),Bu(e,e.colorError,e.colorBgContainer,{color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),Ou(e)),Au(e,e.colorErrorBg,{color:e.colorError,background:e.colorErrorBgFilledHover},{color:e.colorError,background:e.colorErrorBgActive})),to(e,e.colorError,"text",{color:e.colorErrorHover,background:e.colorErrorBg},{color:e.colorErrorHover,background:e.colorErrorBgActive})),to(e,e.colorError,"link",{color:e.colorErrorHover},{color:e.colorErrorActive})),Du(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),iN=e=>Object.assign(Object.assign({},to(e,e.colorLink,"link",{color:e.colorLinkHover},{color:e.colorLinkActive})),Du(e.componentCls,e.ghostBg,e.colorInfo,e.colorInfo,e.colorTextDisabled,e.colorBorder,{color:e.colorInfoHover,borderColor:e.colorInfoHover},{color:e.colorInfoActive,borderColor:e.colorInfoActive})),lN=e=>{const{componentCls:t}=e;return Object.assign({[`${t}-color-default`]:nN(e),[`${t}-color-primary`]:oN(e),[`${t}-color-dangerous`]:aN(e),[`${t}-color-link`]:iN(e)},rN(e))},sN=e=>Object.assign(Object.assign(Object.assign(Object.assign({},Bu(e,e.defaultBorderColor,e.defaultBg,{color:e.defaultHoverColor,borderColor:e.defaultHoverBorderColor,background:e.defaultHoverBg},{color:e.defaultActiveColor,borderColor:e.defaultActiveBorderColor,background:e.defaultActiveBg})),to(e,e.textTextColor,"text",{color:e.textTextHoverColor,background:e.textHoverBg},{color:e.textTextActiveColor,background:e.colorBgTextActive})),$u(e,e.primaryColor,e.colorPrimary,{background:e.colorPrimaryHover,color:e.primaryColor},{background:e.colorPrimaryActive,color:e.primaryColor})),to(e,e.colorLink,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),Zp=(e,t="")=>{const{componentCls:r,controlHeight:n,fontSize:o,borderRadius:a,buttonPaddingHorizontal:i,iconCls:l,buttonPaddingVertical:s,buttonIconOnlyFontSize:u}=e;return[{[t]:{fontSize:o,height:n,padding:`${se(s)} ${se(i)}`,borderRadius:a,[`&${r}-icon-only`]:{width:n,[l]:{fontSize:u}}}},{[`${r}${r}-circle${t}`]:Z5(e)},{[`${r}${r}-round${t}`]:J5(e)}]},uN=e=>{const t=er(e,{fontSize:e.contentFontSize});return Zp(t,e.componentCls)},cN=e=>{const t=er(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return Zp(t,`${e.componentCls}-sm`)},dN=e=>{const t=er(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return Zp(t,`${e.componentCls}-lg`)},fN=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},pN=Hr("Button",e=>{const t=SC(e);return[Y5(t),uN(t),cN(t),dN(t),fN(t),lN(t),sN(t),f5(t)]},$C,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function mN(e,t,r,n){const{focusElCls:o,focus:a,borderElCls:i}=r,l=i?"> *":"",s=["hover",a?"focus":null,"active"].filter(Boolean).map(u=>`&:${u} ${l}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":Object.assign(Object.assign({[s]:{zIndex:3}},o?{[`&${o}`]:{zIndex:3}}:{}),{[`&[disabled] ${l}`]:{zIndex:0}})}}function hN(e,t,r){const{borderElCls:n}=r,o=n?`> ${n}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${o}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Jp(e,t={focus:!0}){const{componentCls:r}=e,n=`${r}-compact`;return{[n]:Object.assign(Object.assign({},mN(e,n,t,r)),hN(r,n,t))}}function gN(e,t,r){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{"&:hover,&:focus,&:active":{zIndex:3},"&[disabled]":{zIndex:0}}}}function vN(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function bN(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:Object.assign(Object.assign({},gN(e,t,e.componentCls)),vN(e.componentCls,t))}}const yN=e=>{const{componentCls:t,colorPrimaryHover:r,lineWidth:n,calc:o}=e,a=o(n).mul(-1).equal(),i=l=>{const s=`${t}-compact${l?"-vertical":""}-item${t}-primary:not([disabled])`;return{[`${s} + ${s}::before`]:{position:"absolute",top:l?a:0,insetInlineStart:l?0:a,backgroundColor:r,content:'""',width:l?"100%":n,height:l?n:"100%"}}};return Object.assign(Object.assign({},i()),i(!0))},CN=Q1(["Button","compact"],e=>{const t=SC(e);return[Jp(t),bN(t),yN(t)]},$C);var xN=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};function wN(e){if(typeof e=="object"&&e){let t=e==null?void 0:e.delay;return t=!Number.isNaN(t)&&typeof t=="number"?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}const EN={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},kN=ee.forwardRef((e,t)=>{var r,n;const{loading:o=!1,prefixCls:a,color:i,variant:l,type:s,danger:u=!1,shape:c,size:f,styles:p,disabled:h,className:v,rootClassName:g,children:m,icon:b,iconPosition:y="start",ghost:C=!1,block:D=!1,htmlType:w="button",classNames:k,style:E={},autoInsertSpace:x,autoFocus:F}=e,j=xN(e,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),$=s||"default",{button:P}=ee.useContext(Zt),A=c||(P==null?void 0:P.shape)||"default",[O,S]=Et(()=>{if(i&&l)return[i,l];if(s||u){const lt=EN[$]||[];return u?["danger",lt[1]]:lt}return P!=null&&P.color&&(P!=null&&P.variant)?[P.color,P.variant]:["default","outlined"]},[s,i,l,u,P==null?void 0:P.variant,P==null?void 0:P.color]),B=O==="danger"?"dangerous":O,{getPrefixCls:R,direction:N,autoInsertSpace:T,className:L,style:X,classNames:_,styles:q}=Io("button"),Q=(r=x??T)!==null&&r!==void 0?r:!0,te=R("btn",a),[z,Y,V]=pN(te),G=Ir(No),K=h??G,W=Ir(kC),re=Et(()=>wN(o),[o]),[U,J]=wt(re.loading),[ne,ue]=wt(!1),me=Ve(null),Ce=sa(t,me),Ne=Hw.count(m)===1&&!b&&!Mc(S),pe=Ve(!0);ee.useEffect(()=>(pe.current=!1,()=>{pe.current=!0}),[]),Wt(()=>{let lt=null;re.delay>0?lt=setTimeout(()=>{lt=null,J(!0)},re.delay):J(re.loading);function je(){lt&&(clearTimeout(lt),lt=null)}return je},[re.delay,re.loading]),Ot(()=>{if(!me.current||!Q)return;const lt=me.current.textContent||"";Ne&&mf(lt)?ne||ue(!0):ne&&ue(!1)}),Ot(()=>{F&&me.current&&me.current.focus()},[]);const he=ee.useCallback(lt=>{var je;if(U||K){lt.preventDefault();return}(je=e.onClick)===null||je===void 0||je.call(e,lt)},[e.onClick,U,K]),{compactSize:ve,compactItemClassnames:be}=ku(te,N),ye={large:"lg",small:"sm",middle:void 0},Ae=fa(lt=>{var je,at;return(at=(je=f??ve)!==null&&je!==void 0?je:W)!==null&&at!==void 0?at:lt}),we=Ae&&(n=ye[Ae])!==null&&n!==void 0?n:"",He=U?"loading":b,Me=fn(j,["navigate"]),Fe=de(te,Y,V,{[`${te}-${A}`]:A!=="default"&&A,[`${te}-${$}`]:$,[`${te}-dangerous`]:u,[`${te}-color-${B}`]:B,[`${te}-variant-${S}`]:S,[`${te}-${we}`]:we,[`${te}-icon-only`]:!m&&m!==0&&!!He,[`${te}-background-ghost`]:C&&!Mc(S),[`${te}-loading`]:U,[`${te}-two-chinese-chars`]:ne&&Q&&!U,[`${te}-block`]:D,[`${te}-rtl`]:N==="rtl",[`${te}-icon-end`]:y==="end"},be,v,g,L),ge=Object.assign(Object.assign({},X),E),Se=de(k==null?void 0:k.icon,_.icon),qe=Object.assign(Object.assign({},(p==null?void 0:p.icon)||{}),q.icon||{}),Ye=b&&!U?ee.createElement(hf,{prefixCls:te,className:Se,style:qe},b):o&&typeof o=="object"&&o.icon?ee.createElement(hf,{prefixCls:te,className:Se,style:qe},o.icon):ee.createElement(d5,{existIcon:!!b,prefixCls:te,loading:U,mount:pe.current}),Xe=m||m===0?c5(m,Ne&&Q):null;if(Me.href!==void 0)return z(ee.createElement("a",Object.assign({},Me,{className:de(Fe,{[`${te}-disabled`]:K}),href:K?void 0:Me.href,style:ge,onClick:he,ref:Ce,tabIndex:K?-1:0}),Ye,Xe));let Re=ee.createElement("button",Object.assign({},j,{type:w,className:Fe,style:ge,onClick:he,disabled:K,ref:Ce}),Ye,Xe,be&&ee.createElement(CN,{prefixCls:te}));return Mc(S)||(Re=ee.createElement(Kp,{component:"Button",disabled:U},Re)),z(Re)}),Ya=kN;Ya.Group=s5;Ya.__ANT_BUTTON=!0;var OC=d.createContext(null),Rv=[];function DN(e,t){var r=d.useState(function(){if(!Xr())return null;var v=document.createElement("div");return v}),n=ce(r,1),o=n[0],a=d.useRef(!1),i=d.useContext(OC),l=d.useState(Rv),s=ce(l,2),u=s[0],c=s[1],f=i||(a.current?void 0:function(v){c(function(g){var m=[v].concat(Pe(g));return m})});function p(){o.parentElement||document.body.appendChild(o),a.current=!0}function h(){var v;(v=o.parentElement)===null||v===void 0||v.removeChild(o),a.current=!1}return Wt(function(){return e?i?i(p):p():h(),h},[e]),Wt(function(){u.length&&(u.forEach(function(v){return v()}),c(Rv))},[u]),[o,f]}var Hc;function AC(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),r=document.createElement("div");r.id=t;var n=r.style;n.position="absolute",n.left="0",n.top="0",n.width="100px",n.height="100px",n.overflow="scroll";var o,a;if(e){var i=getComputedStyle(e);n.scrollbarColor=i.scrollbarColor,n.scrollbarWidth=i.scrollbarWidth;var l=getComputedStyle(e,"::-webkit-scrollbar"),s=parseInt(l.width,10),u=parseInt(l.height,10);try{var c=s?"width: ".concat(l.width,";"):"",f=u?"height: ".concat(l.height,";"):"";go(`
|
|
291
|
+
#`.concat(t,`::-webkit-scrollbar {
|
|
292
|
+
`).concat(c,`
|
|
293
|
+
`).concat(f,`
|
|
294
|
+
}`),t)}catch(v){console.error(v),o=s,a=u}}document.body.appendChild(r);var p=e&&o&&!isNaN(o)?o:r.offsetWidth-r.clientWidth,h=e&&a&&!isNaN(a)?a:r.offsetHeight-r.clientHeight;return document.body.removeChild(r),rl(t),{width:p,height:h}}function Iv(e){return typeof document>"u"?0:(Hc===void 0&&(Hc=AC()),Hc.width)}function bf(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:AC(e)}function SN(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var $N="rc-util-locker-".concat(Date.now()),Tv=0;function BN(e){var t=!!e,r=d.useState(function(){return Tv+=1,"".concat($N,"_").concat(Tv)}),n=ce(r,1),o=n[0];Wt(function(){if(t){var a=bf(document.body).width,i=SN();go(`
|
|
295
|
+
html body {
|
|
296
|
+
overflow-y: hidden;
|
|
297
|
+
`.concat(i?"width: calc(100% - ".concat(a,"px);"):"",`
|
|
298
|
+
}`),o)}else rl(o);return function(){rl(o)}},[t,o])}var ON=!1;function AN(e){return ON}var Mv=function(e){return e===!1?!1:!Xr()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e},FC=d.forwardRef(function(e,t){var r=e.open,n=e.autoLock,o=e.getContainer;e.debug;var a=e.autoDestroy,i=a===void 0?!0:a,l=e.children,s=d.useState(r),u=ce(s,2),c=u[0],f=u[1],p=c||r;d.useEffect(function(){(i||r)&&f(r)},[r,i]);var h=d.useState(function(){return Mv(o)}),v=ce(h,2),g=v[0],m=v[1];d.useEffect(function(){var $=Mv(o);m($??null)});var b=DN(p&&!g),y=ce(b,2),C=y[0],D=y[1],w=g??C;BN(n&&r&&Xr()&&(w===C||w===document.body));var k=null;if(l&&Zn(l)&&t){var E=l;k=E.ref}var x=sa(k,t);if(!p||!Xr()||g===void 0)return null;var F=w===!1||AN(),j=l;return t&&(j=d.cloneElement(l,{ref:x})),d.createElement(OC.Provider,{value:D},F?j:jb(j,w))});function FN(){var e=H({},d);return e.useId}var zv=0,Lv=FN();const Qp=Lv?(function(e){var t=Lv();return e||t}):(function(e){var t=d.useState("ssr-id"),r=ce(t,2),n=r[0],o=r[1];return d.useEffect(function(){var a=zv;zv+=1,o("rc_unique_".concat(a))},[]),e||n});var qo="RC_FORM_INTERNAL_HOOKS",Qt=function(){lr(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Za=d.createContext({getFieldValue:Qt,getFieldsValue:Qt,getFieldError:Qt,getFieldWarning:Qt,getFieldsError:Qt,isFieldsTouched:Qt,isFieldTouched:Qt,isFieldValidating:Qt,isFieldsValidating:Qt,resetFields:Qt,setFields:Qt,setFieldValue:Qt,setFieldsValue:Qt,validateFields:Qt,submit:Qt,getInternalHooks:function(){return Qt(),{dispatch:Qt,initEntityValue:Qt,registerField:Qt,useSubscribe:Qt,setInitialValues:Qt,destroyForm:Qt,setCallbacks:Qt,registerWatch:Qt,getFields:Qt,setValidateMessages:Qt,setPreserve:Qt,getInitialValue:Qt}}}),Ks=d.createContext(null);function yf(e){return e==null?[]:Array.isArray(e)?e:[e]}function NN(e){return e&&!!e._init}function Cf(){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 xf=Cf();function PN(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function jN(e,t,r){if(Op())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&Qi(o,r.prototype),o}function wf(e){var t=typeof Map=="function"?new Map:void 0;return wf=function(r){if(r===null||!PN(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(r))return t.get(r);t.set(r,n)}function n(){return jN(r,arguments,el(this).constructor)}return n.prototype=Object.create(r.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Qi(n,r)},wf(e)}var RN=/%[sdj%]/g,IN=function(){};function Ef(e){if(!e||!e.length)return null;var t={};return e.forEach(function(r){var n=r.field;t[n]=t[n]||[],t[n].push(r)}),t}function bn(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o=0,a=r.length;if(typeof e=="function")return e.apply(null,r);if(typeof e=="string"){var i=e.replace(RN,function(l){if(l==="%%")return"%";if(o>=a)return l;switch(l){case"%s":return String(r[o++]);case"%d":return Number(r[o++]);case"%j":try{return JSON.stringify(r[o++])}catch{return"[Circular]"}break;default:return l}});return i}return e}function TN(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Or(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||TN(t)&&typeof e=="string"&&!e)}function MN(e,t,r){var n=[],o=0,a=e.length;function i(l){n.push.apply(n,Pe(l||[])),o++,o===a&&r(n)}e.forEach(function(l){t(l,i)})}function _v(e,t,r){var n=0,o=e.length;function a(i){if(i&&i.length){r(i);return}var l=n;n=n+1,l<o?t(e[l],a):r([])}a([])}function zN(e){var t=[];return Object.keys(e).forEach(function(r){t.push.apply(t,Pe(e[r]||[]))}),t}var Hv=(function(e){no(r,e);var t=oo(r);function r(n,o){var a;return vr(this,r),a=t.call(this,"Async Validation Error"),M(tt(a),"errors",void 0),M(tt(a),"fields",void 0),a.errors=n,a.fields=o,a}return br(r)})(wf(Error));function LN(e,t,r,n,o){if(t.first){var a=new Promise(function(p,h){var v=function(m){return n(m),m.length?h(new Hv(m,Ef(m))):p(o)},g=zN(e);_v(g,r,v)});return a.catch(function(p){return p}),a}var i=t.firstFields===!0?Object.keys(e):t.firstFields||[],l=Object.keys(e),s=l.length,u=0,c=[],f=new Promise(function(p,h){var v=function(g){if(c.push.apply(c,g),u++,u===s)return n(c),c.length?h(new Hv(c,Ef(c))):p(o)};l.length||(n(c),p(o)),l.forEach(function(g){var m=e[g];i.indexOf(g)!==-1?_v(m,r,v):MN(m,r,v)})});return f.catch(function(p){return p}),f}function _N(e){return!!(e&&e.message!==void 0)}function HN(e,t){for(var r=e,n=0;n<t.length;n++){if(r==null)return r;r=r[t[n]]}return r}function Wv(e,t){return function(r){var n;return e.fullFields?n=HN(t,e.fullFields):n=t[r.field||e.fullField],_N(r)?(r.field=r.field||e.fullField,r.fieldValue=n,r):{message:typeof r=="function"?r():r,fieldValue:n,field:r.field||e.fullField}}}function Kv(e,t){if(t){for(var r in t)if(t.hasOwnProperty(r)){var n=t[r];ut(n)==="object"&&ut(e[r])==="object"?e[r]=H(H({},e[r]),n):e[r]=n}}return e}var ga="enum",WN=function(e,t,r,n,o){e[ga]=Array.isArray(e[ga])?e[ga]:[],e[ga].indexOf(t)===-1&&n.push(bn(o.messages[ga],e.fullField,e[ga].join(", ")))},KN=function(e,t,r,n,o){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||n.push(bn(o.messages.pattern.mismatch,e.fullField,t,e.pattern));else if(typeof e.pattern=="string"){var a=new RegExp(e.pattern);a.test(t)||n.push(bn(o.messages.pattern.mismatch,e.fullField,t,e.pattern))}}},qN=function(e,t,r,n,o){var a=typeof e.len=="number",i=typeof e.min=="number",l=typeof e.max=="number",s=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=t,c=null,f=typeof t=="number",p=typeof t=="string",h=Array.isArray(t);if(f?c="number":p?c="string":h&&(c="array"),!c)return!1;h&&(u=t.length),p&&(u=t.replace(s,"_").length),a?u!==e.len&&n.push(bn(o.messages[c].len,e.fullField,e.len)):i&&!l&&u<e.min?n.push(bn(o.messages[c].min,e.fullField,e.min)):l&&!i&&u>e.max?n.push(bn(o.messages[c].max,e.fullField,e.max)):i&&l&&(u<e.min||u>e.max)&&n.push(bn(o.messages[c].range,e.fullField,e.min,e.max))},NC=function(e,t,r,n,o,a){e.required&&(!r.hasOwnProperty(e.field)||Or(t,a||e.type))&&n.push(bn(o.messages.required,e.fullField))},Yl;const VN=(function(){if(Yl)return Yl;var e="[a-fA-F\\d:]",t=function(w){return w&&w.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(e,")|(?<=").concat(e,")(?=\\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}",o=["(?:".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}|:))")],a="(?:%[0-9a-zA-Z]{1,})?",i="(?:".concat(o.join("|"),")").concat(a),l=new RegExp("(?:^".concat(r,"$)|(?:^").concat(i,"$)")),s=new RegExp("^".concat(r,"$")),u=new RegExp("^".concat(i,"$")),c=function(w){return w&&w.exact?l:new RegExp("(?:".concat(t(w)).concat(r).concat(t(w),")|(?:").concat(t(w)).concat(i).concat(t(w),")"),"g")};c.v4=function(w){return w&&w.exact?s:new RegExp("".concat(t(w)).concat(r).concat(t(w)),"g")},c.v6=function(w){return w&&w.exact?u:new RegExp("".concat(t(w)).concat(i).concat(t(w)),"g")};var f="(?:(?:[a-z]+:)?//)",p="(?:\\S+(?::\\S*)?@)?",h=c.v4().source,v=c.v6().source,g="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",m="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",b="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",y="(?::\\d{2,5})?",C='(?:[/?#][^\\s"]*)?',D="(?:".concat(f,"|www\\.)").concat(p,"(?:localhost|").concat(h,"|").concat(v,"|").concat(g).concat(m).concat(b,")").concat(y).concat(C);return Yl=new RegExp("(?:^".concat(D,"$)"),"i"),Yl});var qv={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},Bi={integer:function(e){return Bi.number(e)&&parseInt(e,10)===e},float:function(e){return Bi.number(e)&&!Bi.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 ut(e)==="object"&&!Bi.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(qv.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(VN())},hex:function(e){return typeof e=="string"&&!!e.match(qv.hex)}},UN=function(e,t,r,n,o){if(e.required&&t===void 0){NC(e,t,r,n,o);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],i=e.type;a.indexOf(i)>-1?Bi[i](t)||n.push(bn(o.messages.types[i],e.fullField,e.type)):i&&ut(t)!==e.type&&n.push(bn(o.messages.types[i],e.fullField,e.type))},XN=function(e,t,r,n,o){(/^\s+$/.test(t)||t==="")&&n.push(bn(o.messages.whitespace,e.fullField))};const zt={required:NC,whitespace:XN,type:UN,range:qN,enum:WN,pattern:KN};var GN=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t)&&!e.required)return r();zt.required(e,t,n,a,o)}r(a)},YN=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(t==null&&!e.required)return r();zt.required(e,t,n,a,o,"array"),t!=null&&(zt.type(e,t,n,a,o),zt.range(e,t,n,a,o))}r(a)},ZN=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t)&&!e.required)return r();zt.required(e,t,n,a,o),t!==void 0&&zt.type(e,t,n,a,o)}r(a)},JN=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t,"date")&&!e.required)return r();if(zt.required(e,t,n,a,o),!Or(t,"date")){var l;t instanceof Date?l=t:l=new Date(t),zt.type(e,l,n,a,o),l&&zt.range(e,l.getTime(),n,a,o)}}r(a)},QN="enum",eP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t)&&!e.required)return r();zt.required(e,t,n,a,o),t!==void 0&&zt[QN](e,t,n,a,o)}r(a)},tP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t)&&!e.required)return r();zt.required(e,t,n,a,o),t!==void 0&&(zt.type(e,t,n,a,o),zt.range(e,t,n,a,o))}r(a)},rP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t)&&!e.required)return r();zt.required(e,t,n,a,o),t!==void 0&&(zt.type(e,t,n,a,o),zt.range(e,t,n,a,o))}r(a)},nP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t)&&!e.required)return r();zt.required(e,t,n,a,o),t!==void 0&&zt.type(e,t,n,a,o)}r(a)},oP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(t===""&&(t=void 0),Or(t)&&!e.required)return r();zt.required(e,t,n,a,o),t!==void 0&&(zt.type(e,t,n,a,o),zt.range(e,t,n,a,o))}r(a)},aP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t)&&!e.required)return r();zt.required(e,t,n,a,o),t!==void 0&&zt.type(e,t,n,a,o)}r(a)},iP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t,"string")&&!e.required)return r();zt.required(e,t,n,a,o),Or(t,"string")||zt.pattern(e,t,n,a,o)}r(a)},lP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t)&&!e.required)return r();zt.required(e,t,n,a,o),Or(t)||zt.type(e,t,n,a,o)}r(a)},sP=function(e,t,r,n,o){var a=[],i=Array.isArray(t)?"array":ut(t);zt.required(e,t,n,a,o,i),r(a)},uP=function(e,t,r,n,o){var a=[],i=e.required||!e.required&&n.hasOwnProperty(e.field);if(i){if(Or(t,"string")&&!e.required)return r();zt.required(e,t,n,a,o,"string"),Or(t,"string")||(zt.type(e,t,n,a,o),zt.range(e,t,n,a,o),zt.pattern(e,t,n,a,o),e.whitespace===!0&&zt.whitespace(e,t,n,a,o))}r(a)},Wc=function(e,t,r,n,o){var a=e.type,i=[],l=e.required||!e.required&&n.hasOwnProperty(e.field);if(l){if(Or(t,a)&&!e.required)return r();zt.required(e,t,n,i,o,a),Or(t,a)||zt.type(e,t,n,i,o)}r(i)};const Mi={string:uP,method:nP,number:oP,boolean:ZN,regexp:lP,integer:rP,float:tP,array:YN,object:aP,enum:eP,pattern:iP,date:JN,url:Wc,hex:Wc,email:Wc,required:sP,any:GN};var wl=(function(){function e(t){vr(this,e),M(this,"rules",null),M(this,"_messages",xf),this.define(t)}return br(e,[{key:"define",value:function(t){var r=this;if(!t)throw new Error("Cannot configure a schema with no rules");if(ut(t)!=="object"||Array.isArray(t))throw new Error("Rules must be an object");this.rules={},Object.keys(t).forEach(function(n){var o=t[n];r.rules[n]=Array.isArray(o)?o:[o]})}},{key:"messages",value:function(t){return t&&(this._messages=Kv(Cf(),t)),this._messages}},{key:"validate",value:function(t){var r=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=t,i=n,l=o;if(typeof i=="function"&&(l=i,i={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,a),Promise.resolve(a);function s(h){var v=[],g={};function m(y){if(Array.isArray(y)){var C;v=(C=v).concat.apply(C,Pe(y))}else v.push(y)}for(var b=0;b<h.length;b++)m(h[b]);v.length?(g=Ef(v),l(v,g)):l(null,a)}if(i.messages){var u=this.messages();u===xf&&(u=Cf()),Kv(u,i.messages),i.messages=u}else i.messages=this.messages();var c={},f=i.keys||Object.keys(this.rules);f.forEach(function(h){var v=r.rules[h],g=a[h];v.forEach(function(m){var b=m;typeof b.transform=="function"&&(a===t&&(a=H({},a)),g=a[h]=b.transform(g),g!=null&&(b.type=b.type||(Array.isArray(g)?"array":ut(g)))),typeof b=="function"?b={validator:b}:b=H({},b),b.validator=r.getValidationMethod(b),b.validator&&(b.field=h,b.fullField=b.fullField||h,b.type=r.getType(b),c[h]=c[h]||[],c[h].push({rule:b,value:g,source:a,field:h}))})});var p={};return LN(c,i,function(h,v){var g=h.rule,m=(g.type==="object"||g.type==="array")&&(ut(g.fields)==="object"||ut(g.defaultField)==="object");m=m&&(g.required||!g.required&&h.value),g.field=h.field;function b(k,E){return H(H({},E),{},{fullField:"".concat(g.fullField,".").concat(k),fullFields:g.fullFields?[].concat(Pe(g.fullFields),[k]):[k]})}function y(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],E=Array.isArray(k)?k:[k];!i.suppressWarning&&E.length&&e.warning("async-validator:",E),E.length&&g.message!==void 0&&(E=[].concat(g.message));var x=E.map(Wv(g,a));if(i.first&&x.length)return p[g.field]=1,v(x);if(!m)v(x);else{if(g.required&&!h.value)return g.message!==void 0?x=[].concat(g.message).map(Wv(g,a)):i.error&&(x=[i.error(g,bn(i.messages.required,g.field))]),v(x);var F={};g.defaultField&&Object.keys(h.value).map(function(P){F[P]=g.defaultField}),F=H(H({},F),h.rule.fields);var j={};Object.keys(F).forEach(function(P){var A=F[P],O=Array.isArray(A)?A:[A];j[P]=O.map(b.bind(null,P))});var $=new e(j);$.messages(i.messages),h.rule.options&&(h.rule.options.messages=i.messages,h.rule.options.error=i.error),$.validate(h.value,h.rule.options||i,function(P){var A=[];x&&x.length&&A.push.apply(A,Pe(x)),P&&P.length&&A.push.apply(A,Pe(P)),v(A.length?A:null)})}}var C;if(g.asyncValidator)C=g.asyncValidator(g,h.value,y,h.source,i);else if(g.validator){try{C=g.validator(g,h.value,y,h.source,i)}catch(k){var D,w;(D=(w=console).error)===null||D===void 0||D.call(w,k),i.suppressValidatorError||setTimeout(function(){throw k},0),y(k.message)}C===!0?y():C===!1?y(typeof g.message=="function"?g.message(g.fullField||g.field):g.message||"".concat(g.fullField||g.field," fails")):C instanceof Array?y(C):C instanceof Error&&y(C.message)}C&&C.then&&C.then(function(){return y()},function(k){return y(k)})},function(h){s(h)},a)}},{key:"getType",value:function(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!Mi.hasOwnProperty(t.type))throw new Error(bn("Unknown rule type %s",t.type));return t.type||"string"}},{key:"getValidationMethod",value:function(t){if(typeof t.validator=="function")return t.validator;var r=Object.keys(t),n=r.indexOf("message");return n!==-1&&r.splice(n,1),r.length===1&&r[0]==="required"?Mi.required:Mi[this.getType(t)]||void 0}}]),e})();M(wl,"register",function(e,t){if(typeof t!="function")throw new Error("Cannot register a validator by type, validator is not a function");Mi[e]=t});M(wl,"warning",IN);M(wl,"messages",xf);M(wl,"validators",Mi);var hn="'${name}' is not a valid ${type}",PC={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:hn,method:hn,array:hn,object:hn,number:hn,date:hn,boolean:hn,integer:hn,float:hn,regexp:hn,email:hn,url:hn,hex:hn},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}"}},Vv=wl;function cP(e,t){return e.replace(/\\?\$\{\w+\}/g,function(r){if(r.startsWith("\\"))return r.slice(1);var n=r.slice(2,-1);return t[n]})}var Uv="CODE_LOGIC_ERROR";function kf(e,t,r,n,o){return Df.apply(this,arguments)}function Df(){return Df=da(Gr().mark(function e(t,r,n,o,a){var i,l,s,u,c,f,p,h,v;return Gr().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return i=H({},n),delete i.ruleIndex,Vv.warning=function(){},i.validator&&(l=i.validator,i.validator=function(){try{return l.apply(void 0,arguments)}catch(m){return console.error(m),Promise.reject(Uv)}}),s=null,i&&i.type==="array"&&i.defaultField&&(s=i.defaultField,delete i.defaultField),u=new Vv(M({},t,[i])),c=$a(PC,o.validateMessages),u.messages(c),f=[],g.prev=10,g.next=13,Promise.resolve(u.validate(M({},t,r),H({},o)));case 13:g.next=18;break;case 15:g.prev=15,g.t0=g.catch(10),g.t0.errors&&(f=g.t0.errors.map(function(m,b){var y=m.message,C=y===Uv?c.default:y;return d.isValidElement(C)?d.cloneElement(C,{key:"error_".concat(b)}):C}));case 18:if(!(!f.length&&s)){g.next=23;break}return g.next=21,Promise.all(r.map(function(m,b){return kf("".concat(t,".").concat(b),m,s,o,a)}));case 21:return p=g.sent,g.abrupt("return",p.reduce(function(m,b){return[].concat(Pe(m),Pe(b))},[]));case 23:return h=H(H({},n),{},{name:t,enum:(n.enum||[]).join(", ")},a),v=f.map(function(m){return typeof m=="string"?cP(m,h):m}),g.abrupt("return",v);case 26:case"end":return g.stop()}},e,null,[[10,15]])})),Df.apply(this,arguments)}function dP(e,t,r,n,o,a){var i=e.join("."),l=r.map(function(c,f){var p=c.validator,h=H(H({},c),{},{ruleIndex:f});return p&&(h.validator=function(v,g,m){var b=!1,y=function(){for(var D=arguments.length,w=new Array(D),k=0;k<D;k++)w[k]=arguments[k];Promise.resolve().then(function(){lr(!b,"Your validator function has already return a promise. `callback` will be ignored."),b||m.apply(void 0,w)})},C=p(v,g,y);b=C&&typeof C.then=="function"&&typeof C.catch=="function",lr(b,"`callback` is deprecated. Please return a promise instead."),b&&C.then(function(){m()}).catch(function(D){m(D||" ")})}),h}).sort(function(c,f){var p=c.warningOnly,h=c.ruleIndex,v=f.warningOnly,g=f.ruleIndex;return!!p==!!v?h-g:p?1:-1}),s;if(o===!0)s=new Promise((function(){var c=da(Gr().mark(function f(p,h){var v,g,m;return Gr().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:v=0;case 1:if(!(v<l.length)){b.next=12;break}return g=l[v],b.next=5,kf(i,t,g,n,a);case 5:if(m=b.sent,!m.length){b.next=9;break}return h([{errors:m,rule:g}]),b.abrupt("return");case 9:v+=1,b.next=1;break;case 12:p([]);case 13:case"end":return b.stop()}},f)}));return function(f,p){return c.apply(this,arguments)}})());else{var u=l.map(function(c){return kf(i,t,c,n,a).then(function(f){return{errors:f,rule:c}})});s=(o?pP(u):fP(u)).then(function(c){return Promise.reject(c)})}return s.catch(function(c){return c}),s}function fP(e){return Sf.apply(this,arguments)}function Sf(){return Sf=da(Gr().mark(function e(t){return Gr().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Promise.all(t).then(function(n){var o,a=(o=[]).concat.apply(o,Pe(n));return a}));case 1:case"end":return r.stop()}},e)})),Sf.apply(this,arguments)}function pP(e){return $f.apply(this,arguments)}function $f(){return $f=da(Gr().mark(function e(t){var r;return Gr().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return r=0,n.abrupt("return",new Promise(function(o){t.forEach(function(a){a.then(function(i){i.errors.length&&o([i]),r+=1,r===t.length&&o([])})})}));case 2:case"end":return n.stop()}},e)})),$f.apply(this,arguments)}function gr(e){return yf(e)}function Xv(e,t){var r={};return t.forEach(function(n){var o=vn(e,n);r=jn(r,n,o)}),r}function Pa(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return e&&e.some(function(n){return jC(t,n,r)})}function jC(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!e||!t||!r&&e.length!==t.length?!1:t.every(function(n,o){return e[o]===n})}function mP(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||ut(e)!=="object"||ut(t)!=="object")return!1;var r=Object.keys(e),n=Object.keys(t),o=new Set([].concat(r,n));return Pe(o).every(function(a){var i=e[a],l=t[a];return typeof i=="function"&&typeof l=="function"?!0:i===l})}function hP(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&ut(t.target)==="object"&&e in t.target?t.target[e]:t}function Gv(e,t,r){var n=e.length;if(t<0||t>=n||r<0||r>=n)return e;var o=e[t],a=t-r;return a>0?[].concat(Pe(e.slice(0,r)),[o],Pe(e.slice(r,t)),Pe(e.slice(t+1,n))):a<0?[].concat(Pe(e.slice(0,t)),Pe(e.slice(t+1,r+1)),[o],Pe(e.slice(r+1,n))):e}var gP=["name"],Dn=[];function Kc(e,t,r,n,o,a){return typeof e=="function"?e(t,r,"source"in a?{source:a.source}:{}):n!==o}var em=(function(e){no(r,e);var t=oo(r);function r(n){var o;if(vr(this,r),o=t.call(this,n),M(tt(o),"state",{resetCount:0}),M(tt(o),"cancelRegisterFunc",null),M(tt(o),"mounted",!1),M(tt(o),"touched",!1),M(tt(o),"dirty",!1),M(tt(o),"validatePromise",void 0),M(tt(o),"prevValidating",void 0),M(tt(o),"errors",Dn),M(tt(o),"warnings",Dn),M(tt(o),"cancelRegister",function(){var s=o.props,u=s.preserve,c=s.isListField,f=s.name;o.cancelRegisterFunc&&o.cancelRegisterFunc(c,u,gr(f)),o.cancelRegisterFunc=null}),M(tt(o),"getNamePath",function(){var s=o.props,u=s.name,c=s.fieldContext,f=c.prefixName,p=f===void 0?[]:f;return u!==void 0?[].concat(Pe(p),Pe(u)):[]}),M(tt(o),"getRules",function(){var s=o.props,u=s.rules,c=u===void 0?[]:u,f=s.fieldContext;return c.map(function(p){return typeof p=="function"?p(f):p})}),M(tt(o),"refresh",function(){o.mounted&&o.setState(function(s){var u=s.resetCount;return{resetCount:u+1}})}),M(tt(o),"metaCache",null),M(tt(o),"triggerMetaEvent",function(s){var u=o.props.onMetaChange;if(u){var c=H(H({},o.getMeta()),{},{destroy:s});Jn(o.metaCache,c)||u(c),o.metaCache=c}else o.metaCache=null}),M(tt(o),"onStoreChange",function(s,u,c){var f=o.props,p=f.shouldUpdate,h=f.dependencies,v=h===void 0?[]:h,g=f.onReset,m=c.store,b=o.getNamePath(),y=o.getValue(s),C=o.getValue(m),D=u&&Pa(u,b);switch(c.type==="valueUpdate"&&c.source==="external"&&!Jn(y,C)&&(o.touched=!0,o.dirty=!0,o.validatePromise=null,o.errors=Dn,o.warnings=Dn,o.triggerMetaEvent()),c.type){case"reset":if(!u||D){o.touched=!1,o.dirty=!1,o.validatePromise=void 0,o.errors=Dn,o.warnings=Dn,o.triggerMetaEvent(),g==null||g(),o.refresh();return}break;case"remove":{if(p&&Kc(p,s,m,y,C,c)){o.reRender();return}break}case"setField":{var w=c.data;if(D){"touched"in w&&(o.touched=w.touched),"validating"in w&&!("originRCField"in w)&&(o.validatePromise=w.validating?Promise.resolve([]):null),"errors"in w&&(o.errors=w.errors||Dn),"warnings"in w&&(o.warnings=w.warnings||Dn),o.dirty=!0,o.triggerMetaEvent(),o.reRender();return}else if("value"in w&&Pa(u,b,!0)){o.reRender();return}if(p&&!b.length&&Kc(p,s,m,y,C,c)){o.reRender();return}break}case"dependenciesUpdate":{var k=v.map(gr);if(k.some(function(E){return Pa(c.relatedFields,E)})){o.reRender();return}break}default:if(D||(!v.length||b.length||p)&&Kc(p,s,m,y,C,c)){o.reRender();return}break}p===!0&&o.reRender()}),M(tt(o),"validateRules",function(s){var u=o.getNamePath(),c=o.getValue(),f=s||{},p=f.triggerName,h=f.validateOnly,v=h===void 0?!1:h,g=Promise.resolve().then(da(Gr().mark(function m(){var b,y,C,D,w,k,E;return Gr().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(o.mounted){x.next=2;break}return x.abrupt("return",[]);case 2:if(b=o.props,y=b.validateFirst,C=y===void 0?!1:y,D=b.messageVariables,w=b.validateDebounce,k=o.getRules(),p&&(k=k.filter(function(F){return F}).filter(function(F){var j=F.validateTrigger;if(!j)return!0;var $=yf(j);return $.includes(p)})),!(w&&p)){x.next=10;break}return x.next=8,new Promise(function(F){setTimeout(F,w)});case 8:if(o.validatePromise===g){x.next=10;break}return x.abrupt("return",[]);case 10:return E=dP(u,c,k,s,C,D),E.catch(function(F){return F}).then(function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Dn;if(o.validatePromise===g){var j;o.validatePromise=null;var $=[],P=[];(j=F.forEach)===null||j===void 0||j.call(F,function(A){var O=A.rule.warningOnly,S=A.errors,B=S===void 0?Dn:S;O?P.push.apply(P,Pe(B)):$.push.apply($,Pe(B))}),o.errors=$,o.warnings=P,o.triggerMetaEvent(),o.reRender()}}),x.abrupt("return",E);case 13:case"end":return x.stop()}},m)})));return v||(o.validatePromise=g,o.dirty=!0,o.errors=Dn,o.warnings=Dn,o.triggerMetaEvent(),o.reRender()),g}),M(tt(o),"isFieldValidating",function(){return!!o.validatePromise}),M(tt(o),"isFieldTouched",function(){return o.touched}),M(tt(o),"isFieldDirty",function(){if(o.dirty||o.props.initialValue!==void 0)return!0;var s=o.props.fieldContext,u=s.getInternalHooks(qo),c=u.getInitialValue;return c(o.getNamePath())!==void 0}),M(tt(o),"getErrors",function(){return o.errors}),M(tt(o),"getWarnings",function(){return o.warnings}),M(tt(o),"isListField",function(){return o.props.isListField}),M(tt(o),"isList",function(){return o.props.isList}),M(tt(o),"isPreserve",function(){return o.props.preserve}),M(tt(o),"getMeta",function(){o.prevValidating=o.isFieldValidating();var s={touched:o.isFieldTouched(),validating:o.prevValidating,errors:o.errors,warnings:o.warnings,name:o.getNamePath(),validated:o.validatePromise===null};return s}),M(tt(o),"getOnlyChild",function(s){if(typeof s=="function"){var u=o.getMeta();return H(H({},o.getOnlyChild(s(o.getControlled(),u,o.props.fieldContext))),{},{isFunction:!0})}var c=_n(s);return c.length!==1||!d.isValidElement(c[0])?{child:c,isFunction:!1}:{child:c[0],isFunction:!1}}),M(tt(o),"getValue",function(s){var u=o.props.fieldContext.getFieldsValue,c=o.getNamePath();return vn(s||u(!0),c)}),M(tt(o),"getControlled",function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=o.props,c=u.name,f=u.trigger,p=u.validateTrigger,h=u.getValueFromEvent,v=u.normalize,g=u.valuePropName,m=u.getValueProps,b=u.fieldContext,y=p!==void 0?p:b.validateTrigger,C=o.getNamePath(),D=b.getInternalHooks,w=b.getFieldsValue,k=D(qo),E=k.dispatch,x=o.getValue(),F=m||function(O){return M({},g,O)},j=s[f],$=c!==void 0?F(x):{},P=H(H({},s),$);P[f]=function(){o.touched=!0,o.dirty=!0,o.triggerMetaEvent();for(var O,S=arguments.length,B=new Array(S),R=0;R<S;R++)B[R]=arguments[R];h?O=h.apply(void 0,B):O=hP.apply(void 0,[g].concat(B)),v&&(O=v(O,x,w(!0))),O!==x&&E({type:"updateValue",namePath:C,value:O}),j&&j.apply(void 0,B)};var A=yf(y||[]);return A.forEach(function(O){var S=P[O];P[O]=function(){S&&S.apply(void 0,arguments);var B=o.props.rules;B&&B.length&&E({type:"validateField",namePath:C,triggerName:O})}}),P}),n.fieldContext){var a=n.fieldContext.getInternalHooks,i=a(qo),l=i.initEntityValue;l(tt(o))}return o}return br(r,[{key:"componentDidMount",value:function(){var n=this.props,o=n.shouldUpdate,a=n.fieldContext;if(this.mounted=!0,a){var i=a.getInternalHooks,l=i(qo),s=l.registerField;this.cancelRegisterFunc=s(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 n=this.state.resetCount,o=this.props.children,a=this.getOnlyChild(o),i=a.child,l=a.isFunction,s;return l?s=i:d.isValidElement(i)?s=d.cloneElement(i,this.getControlled(i.props)):(lr(!i,"`children` of Field is not validate ReactElement."),s=i),d.createElement(d.Fragment,{key:n},s)}}]),r})(d.Component);M(em,"contextType",Za);M(em,"defaultProps",{trigger:"onChange",valuePropName:"value"});function RC(e){var t,r=e.name,n=Ct(e,gP),o=d.useContext(Za),a=d.useContext(Ks),i=r!==void 0?gr(r):void 0,l=(t=n.isListField)!==null&&t!==void 0?t:!!a,s="keep";return l||(s="_".concat((i||[]).join("_"))),d.createElement(em,Te({key:s,name:i,isListField:l},n,{fieldContext:o}))}function vP(e){var t=e.name,r=e.initialValue,n=e.children,o=e.rules,a=e.validateTrigger,i=e.isListField,l=d.useContext(Za),s=d.useContext(Ks),u=d.useRef({keys:[],id:0}),c=u.current,f=d.useMemo(function(){var g=gr(l.prefixName)||[];return[].concat(Pe(g),Pe(gr(t)))},[l.prefixName,t]),p=d.useMemo(function(){return H(H({},l),{},{prefixName:f})},[l,f]),h=d.useMemo(function(){return{getKey:function(g){var m=f.length,b=g[m];return[c.keys[b],g.slice(m+1)]}}},[f]);if(typeof n!="function")return lr(!1,"Form.List only accepts function as children."),null;var v=function(g,m,b){var y=b.source;return y==="internal"?!1:g!==m};return d.createElement(Ks.Provider,{value:h},d.createElement(Za.Provider,{value:p},d.createElement(RC,{name:[],shouldUpdate:v,rules:o,validateTrigger:a,initialValue:r,isList:!0,isListField:i??!!s},function(g,m){var b=g.value,y=b===void 0?[]:b,C=g.onChange,D=l.getFieldValue,w=function(){var x=D(f||[]);return x||[]},k={add:function(x,F){var j=w();F>=0&&F<=j.length?(c.keys=[].concat(Pe(c.keys.slice(0,F)),[c.id],Pe(c.keys.slice(F))),C([].concat(Pe(j.slice(0,F)),[x],Pe(j.slice(F))))):(c.keys=[].concat(Pe(c.keys),[c.id]),C([].concat(Pe(j),[x]))),c.id+=1},remove:function(x){var F=w(),j=new Set(Array.isArray(x)?x:[x]);j.size<=0||(c.keys=c.keys.filter(function($,P){return!j.has(P)}),C(F.filter(function($,P){return!j.has(P)})))},move:function(x,F){if(x!==F){var j=w();x<0||x>=j.length||F<0||F>=j.length||(c.keys=Gv(c.keys,x,F),C(Gv(j,x,F)))}}},E=y||[];return Array.isArray(E)||(E=[]),n(E.map(function(x,F){var j=c.keys[F];return j===void 0&&(c.keys[F]=c.id,j=c.keys[F],c.id+=1),{name:F,key:j,isListField:!0}}),k,m)})))}function bP(e){var t=!1,r=e.length,n=[];return e.length?new Promise(function(o,a){e.forEach(function(i,l){i.catch(function(s){return t=!0,s}).then(function(s){r-=1,n[l]=s,!(r>0)&&(t&&a(n),o(n))})})}):Promise.resolve([])}var IC="__@field_split__";function qc(e){return e.map(function(t){return"".concat(ut(t),":").concat(t)}).join(IC)}var va=(function(){function e(){vr(this,e),M(this,"kvs",new Map)}return br(e,[{key:"set",value:function(t,r){this.kvs.set(qc(t),r)}},{key:"get",value:function(t){return this.kvs.get(qc(t))}},{key:"update",value:function(t,r){var n=this.get(t),o=r(n);o?this.set(t,o):this.delete(t)}},{key:"delete",value:function(t){this.kvs.delete(qc(t))}},{key:"map",value:function(t){return Pe(this.kvs.entries()).map(function(r){var n=ce(r,2),o=n[0],a=n[1],i=o.split(IC);return t({key:i.map(function(l){var s=l.match(/^([^:]*):(.*)$/),u=ce(s,3),c=u[1],f=u[2];return c==="number"?Number(f):f}),value:a})})}},{key:"toJSON",value:function(){var t={};return this.map(function(r){var n=r.key,o=r.value;return t[n.join(".")]=o,null}),t}}]),e})(),yP=["name"],CP=br(function e(t){var r=this;vr(this,e),M(this,"formHooked",!1),M(this,"forceRootUpdate",void 0),M(this,"subscribable",!0),M(this,"store",{}),M(this,"fieldEntities",[]),M(this,"initialValues",{}),M(this,"callbacks",{}),M(this,"validateMessages",null),M(this,"preserve",null),M(this,"lastValidatePromise",null),M(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}}),M(this,"getInternalHooks",function(n){return n===qo?(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}):(lr(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),M(this,"useSubscribe",function(n){r.subscribable=n}),M(this,"prevWithoutPreserves",null),M(this,"setInitialValues",function(n,o){if(r.initialValues=n||{},o){var a,i=$a(n,r.store);(a=r.prevWithoutPreserves)===null||a===void 0||a.map(function(l){var s=l.key;i=jn(i,s,vn(n,s))}),r.prevWithoutPreserves=null,r.updateStore(i)}}),M(this,"destroyForm",function(n){if(n)r.updateStore({});else{var o=new va;r.getFieldEntities(!0).forEach(function(a){r.isMergedPreserve(a.isPreserve())||o.set(a.getNamePath(),!0)}),r.prevWithoutPreserves=o}}),M(this,"getInitialValue",function(n){var o=vn(r.initialValues,n);return n.length?$a(o):o}),M(this,"setCallbacks",function(n){r.callbacks=n}),M(this,"setValidateMessages",function(n){r.validateMessages=n}),M(this,"setPreserve",function(n){r.preserve=n}),M(this,"watchList",[]),M(this,"registerWatch",function(n){return r.watchList.push(n),function(){r.watchList=r.watchList.filter(function(o){return o!==n})}}),M(this,"notifyWatch",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(r.watchList.length){var o=r.getFieldsValue(),a=r.getFieldsValue(!0);r.watchList.forEach(function(i){i(o,a,n)})}}),M(this,"timeoutId",null),M(this,"warningUnhooked",function(){}),M(this,"updateStore",function(n){r.store=n}),M(this,"getFieldEntities",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return n?r.fieldEntities.filter(function(o){return o.getNamePath().length}):r.fieldEntities}),M(this,"getFieldsMap",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,o=new va;return r.getFieldEntities(n).forEach(function(a){var i=a.getNamePath();o.set(i,a)}),o}),M(this,"getFieldEntitiesForNamePathList",function(n){if(!n)return r.getFieldEntities(!0);var o=r.getFieldsMap(!0);return n.map(function(a){var i=gr(a);return o.get(i)||{INVALIDATE_NAME_PATH:gr(a)}})}),M(this,"getFieldsValue",function(n,o){r.warningUnhooked();var a,i,l;if(n===!0||Array.isArray(n)?(a=n,i=o):n&&ut(n)==="object"&&(l=n.strict,i=n.filter),a===!0&&!i)return r.store;var s=r.getFieldEntitiesForNamePathList(Array.isArray(a)?a:null),u=[];return s.forEach(function(c){var f,p,h="INVALIDATE_NAME_PATH"in c?c.INVALIDATE_NAME_PATH:c.getNamePath();if(l){var v,g;if((v=(g=c).isList)!==null&&v!==void 0&&v.call(g))return}else if(!a&&(f=(p=c).isListField)!==null&&f!==void 0&&f.call(p))return;if(!i)u.push(h);else{var m="getMeta"in c?c.getMeta():null;i(m)&&u.push(h)}}),Xv(r.store,u.map(gr))}),M(this,"getFieldValue",function(n){r.warningUnhooked();var o=gr(n);return vn(r.store,o)}),M(this,"getFieldsError",function(n){r.warningUnhooked();var o=r.getFieldEntitiesForNamePathList(n);return o.map(function(a,i){return a&&!("INVALIDATE_NAME_PATH"in a)?{name:a.getNamePath(),errors:a.getErrors(),warnings:a.getWarnings()}:{name:gr(n[i]),errors:[],warnings:[]}})}),M(this,"getFieldError",function(n){r.warningUnhooked();var o=gr(n),a=r.getFieldsError([o])[0];return a.errors}),M(this,"getFieldWarning",function(n){r.warningUnhooked();var o=gr(n),a=r.getFieldsError([o])[0];return a.warnings}),M(this,"isFieldsTouched",function(){r.warningUnhooked();for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];var i=o[0],l=o[1],s,u=!1;o.length===0?s=null:o.length===1?Array.isArray(i)?(s=i.map(gr),u=!1):(s=null,u=i):(s=i.map(gr),u=l);var c=r.getFieldEntities(!0),f=function(g){return g.isFieldTouched()};if(!s)return u?c.every(function(g){return f(g)||g.isList()}):c.some(f);var p=new va;s.forEach(function(g){p.set(g,[])}),c.forEach(function(g){var m=g.getNamePath();s.forEach(function(b){b.every(function(y,C){return m[C]===y})&&p.update(b,function(y){return[].concat(Pe(y),[g])})})});var h=function(g){return g.some(f)},v=p.map(function(g){var m=g.value;return m});return u?v.every(h):v.some(h)}),M(this,"isFieldTouched",function(n){return r.warningUnhooked(),r.isFieldsTouched([n])}),M(this,"isFieldsValidating",function(n){r.warningUnhooked();var o=r.getFieldEntities();if(!n)return o.some(function(i){return i.isFieldValidating()});var a=n.map(gr);return o.some(function(i){var l=i.getNamePath();return Pa(a,l)&&i.isFieldValidating()})}),M(this,"isFieldValidating",function(n){return r.warningUnhooked(),r.isFieldsValidating([n])}),M(this,"resetWithFieldInitialValue",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=new va,a=r.getFieldEntities(!0);a.forEach(function(s){var u=s.props.initialValue,c=s.getNamePath();if(u!==void 0){var f=o.get(c)||new Set;f.add({entity:s,value:u}),o.set(c,f)}});var i=function(s){s.forEach(function(u){var c=u.props.initialValue;if(c!==void 0){var f=u.getNamePath(),p=r.getInitialValue(f);if(p!==void 0)lr(!1,"Form already set 'initialValues' with path '".concat(f.join("."),"'. Field can not overwrite it."));else{var h=o.get(f);if(h&&h.size>1)lr(!1,"Multiple Field with path '".concat(f.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(h){var v=r.getFieldValue(f),g=u.isListField();!g&&(!n.skipExist||v===void 0)&&r.updateStore(jn(r.store,f,Pe(h)[0].value))}}}})},l;n.entities?l=n.entities:n.namePathList?(l=[],n.namePathList.forEach(function(s){var u=o.get(s);if(u){var c;(c=l).push.apply(c,Pe(Pe(u).map(function(f){return f.entity})))}})):l=a,i(l)}),M(this,"resetFields",function(n){r.warningUnhooked();var o=r.store;if(!n){r.updateStore($a(r.initialValues)),r.resetWithFieldInitialValue(),r.notifyObservers(o,null,{type:"reset"}),r.notifyWatch();return}var a=n.map(gr);a.forEach(function(i){var l=r.getInitialValue(i);r.updateStore(jn(r.store,i,l))}),r.resetWithFieldInitialValue({namePathList:a}),r.notifyObservers(o,a,{type:"reset"}),r.notifyWatch(a)}),M(this,"setFields",function(n){r.warningUnhooked();var o=r.store,a=[];n.forEach(function(i){var l=i.name,s=Ct(i,yP),u=gr(l);a.push(u),"value"in s&&r.updateStore(jn(r.store,u,s.value)),r.notifyObservers(o,[u],{type:"setField",data:i})}),r.notifyWatch(a)}),M(this,"getFields",function(){var n=r.getFieldEntities(!0),o=n.map(function(a){var i=a.getNamePath(),l=a.getMeta(),s=H(H({},l),{},{name:i,value:r.getFieldValue(i)});return Object.defineProperty(s,"originRCField",{value:!0}),s});return o}),M(this,"initEntityValue",function(n){var o=n.props.initialValue;if(o!==void 0){var a=n.getNamePath(),i=vn(r.store,a);i===void 0&&r.updateStore(jn(r.store,a,o))}}),M(this,"isMergedPreserve",function(n){var o=n!==void 0?n:r.preserve;return o??!0}),M(this,"registerField",function(n){r.fieldEntities.push(n);var o=n.getNamePath();if(r.notifyWatch([o]),n.props.initialValue!==void 0){var a=r.store;r.resetWithFieldInitialValue({entities:[n],skipExist:!0}),r.notifyObservers(a,[n.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(i,l){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r.fieldEntities=r.fieldEntities.filter(function(f){return f!==n}),!r.isMergedPreserve(l)&&(!i||s.length>1)){var u=i?void 0:r.getInitialValue(o);if(o.length&&r.getFieldValue(o)!==u&&r.fieldEntities.every(function(f){return!jC(f.getNamePath(),o)})){var c=r.store;r.updateStore(jn(c,o,u,!0)),r.notifyObservers(c,[o],{type:"remove"}),r.triggerDependenciesUpdate(c,o)}}r.notifyWatch([o])}}),M(this,"dispatch",function(n){switch(n.type){case"updateValue":{var o=n.namePath,a=n.value;r.updateValue(o,a);break}case"validateField":{var i=n.namePath,l=n.triggerName;r.validateFields([i],{triggerName:l});break}}}),M(this,"notifyObservers",function(n,o,a){if(r.subscribable){var i=H(H({},a),{},{store:r.getFieldsValue(!0)});r.getFieldEntities().forEach(function(l){var s=l.onStoreChange;s(n,o,i)})}else r.forceRootUpdate()}),M(this,"triggerDependenciesUpdate",function(n,o){var a=r.getDependencyChildrenFields(o);return a.length&&r.validateFields(a),r.notifyObservers(n,a,{type:"dependenciesUpdate",relatedFields:[o].concat(Pe(a))}),a}),M(this,"updateValue",function(n,o){var a=gr(n),i=r.store;r.updateStore(jn(r.store,a,o)),r.notifyObservers(i,[a],{type:"valueUpdate",source:"internal"}),r.notifyWatch([a]);var l=r.triggerDependenciesUpdate(i,a),s=r.callbacks.onValuesChange;if(s){var u=Xv(r.store,[a]);s(u,r.getFieldsValue())}r.triggerOnFieldsChange([a].concat(Pe(l)))}),M(this,"setFieldsValue",function(n){r.warningUnhooked();var o=r.store;if(n){var a=$a(r.store,n);r.updateStore(a)}r.notifyObservers(o,null,{type:"valueUpdate",source:"external"}),r.notifyWatch()}),M(this,"setFieldValue",function(n,o){r.setFields([{name:n,value:o,errors:[],warnings:[]}])}),M(this,"getDependencyChildrenFields",function(n){var o=new Set,a=[],i=new va;r.getFieldEntities().forEach(function(s){var u=s.props.dependencies;(u||[]).forEach(function(c){var f=gr(c);i.update(f,function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return p.add(s),p})})});var l=function s(u){var c=i.get(u)||new Set;c.forEach(function(f){if(!o.has(f)){o.add(f);var p=f.getNamePath();f.isFieldDirty()&&p.length&&(a.push(p),s(p))}})};return l(n),a}),M(this,"triggerOnFieldsChange",function(n,o){var a=r.callbacks.onFieldsChange;if(a){var i=r.getFields();if(o){var l=new va;o.forEach(function(u){var c=u.name,f=u.errors;l.set(c,f)}),i.forEach(function(u){u.errors=l.get(u.name)||u.errors})}var s=i.filter(function(u){var c=u.name;return Pa(n,c)});s.length&&a(s,i)}}),M(this,"validateFields",function(n,o){r.warningUnhooked();var a,i;Array.isArray(n)||typeof n=="string"||typeof o=="string"?(a=n,i=o):i=n;var l=!!a,s=l?a.map(gr):[],u=[],c=String(Date.now()),f=new Set,p=i||{},h=p.recursive,v=p.dirty;r.getFieldEntities(!0).forEach(function(y){if(l||s.push(y.getNamePath()),!(!y.props.rules||!y.props.rules.length)&&!(v&&!y.isFieldDirty())){var C=y.getNamePath();if(f.add(C.join(c)),!l||Pa(s,C,h)){var D=y.validateRules(H({validateMessages:H(H({},PC),r.validateMessages)},i));u.push(D.then(function(){return{name:C,errors:[],warnings:[]}}).catch(function(w){var k,E=[],x=[];return(k=w.forEach)===null||k===void 0||k.call(w,function(F){var j=F.rule.warningOnly,$=F.errors;j?x.push.apply(x,Pe($)):E.push.apply(E,Pe($))}),E.length?Promise.reject({name:C,errors:E,warnings:x}):{name:C,errors:E,warnings:x}}))}}});var g=bP(u);r.lastValidatePromise=g,g.catch(function(y){return y}).then(function(y){var C=y.map(function(D){var w=D.name;return w});r.notifyObservers(r.store,C,{type:"validateFinish"}),r.triggerOnFieldsChange(C,y)});var m=g.then(function(){return r.lastValidatePromise===g?Promise.resolve(r.getFieldsValue(s)):Promise.reject([])}).catch(function(y){var C=y.filter(function(D){return D&&D.errors.length});return Promise.reject({values:r.getFieldsValue(s),errorFields:C,outOfDate:r.lastValidatePromise!==g})});m.catch(function(y){return y});var b=s.filter(function(y){return f.has(y.join(c))});return r.triggerOnFieldsChange(b),m}),M(this,"submit",function(){r.warningUnhooked(),r.validateFields().then(function(n){var o=r.callbacks.onFinish;if(o)try{o(n)}catch(a){console.error(a)}}).catch(function(n){var o=r.callbacks.onFinishFailed;o&&o(n)})}),this.forceRootUpdate=t});function TC(e){var t=d.useRef(),r=d.useState({}),n=ce(r,2),o=n[1];if(!t.current)if(e)t.current=e;else{var a=function(){o({})},i=new CP(a);t.current=i.getForm()}return[t.current]}var Bf=d.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),xP=function(e){var t=e.validateMessages,r=e.onFormChange,n=e.onFormFinish,o=e.children,a=d.useContext(Bf),i=d.useRef({});return d.createElement(Bf.Provider,{value:H(H({},a),{},{validateMessages:H(H({},a.validateMessages),t),triggerFormChange:function(l,s){r&&r(l,{changedFields:s,forms:i.current}),a.triggerFormChange(l,s)},triggerFormFinish:function(l,s){n&&n(l,{values:s,forms:i.current}),a.triggerFormFinish(l,s)},registerForm:function(l,s){l&&(i.current=H(H({},i.current),{},M({},l,s))),a.registerForm(l,s)},unregisterForm:function(l){var s=H({},i.current);delete s[l],i.current=s,a.unregisterForm(l)}})},o)},wP=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],EP=function(e,t){var r=e.name,n=e.initialValues,o=e.fields,a=e.form,i=e.preserve,l=e.children,s=e.component,u=s===void 0?"form":s,c=e.validateMessages,f=e.validateTrigger,p=f===void 0?"onChange":f,h=e.onValuesChange,v=e.onFieldsChange,g=e.onFinish,m=e.onFinishFailed,b=e.clearOnDestroy,y=Ct(e,wP),C=d.useRef(null),D=d.useContext(Bf),w=TC(a),k=ce(w,1),E=k[0],x=E.getInternalHooks(qo),F=x.useSubscribe,j=x.setInitialValues,$=x.setCallbacks,P=x.setValidateMessages,A=x.setPreserve,O=x.destroyForm;d.useImperativeHandle(t,function(){return H(H({},E),{},{nativeElement:C.current})}),d.useEffect(function(){return D.registerForm(r,E),function(){D.unregisterForm(r)}},[D,E,r]),P(H(H({},D.validateMessages),c)),$({onValuesChange:h,onFieldsChange:function(_){if(D.triggerFormChange(r,_),v){for(var q=arguments.length,Q=new Array(q>1?q-1:0),te=1;te<q;te++)Q[te-1]=arguments[te];v.apply(void 0,[_].concat(Q))}},onFinish:function(_){D.triggerFormFinish(r,_),g&&g(_)},onFinishFailed:m}),A(i);var S=d.useRef(null);j(n,!S.current),S.current||(S.current=!0),d.useEffect(function(){return function(){return O(b)}},[]);var B,R=typeof l=="function";if(R){var N=E.getFieldsValue(!0);B=l(N,E)}else B=l;F(!R);var T=d.useRef();d.useEffect(function(){mP(T.current||[],o||[])||E.setFields(o||[]),T.current=o},[o,E]);var L=d.useMemo(function(){return H(H({},E),{},{validateTrigger:p})},[E,p]),X=d.createElement(Ks.Provider,{value:null},d.createElement(Za.Provider,{value:L},B));return u===!1?X:d.createElement(u,Te({},y,{ref:C,onSubmit:function(_){_.preventDefault(),_.stopPropagation(),E.submit()},onReset:function(_){var q;_.preventDefault(),E.resetFields(),(q=y.onReset)===null||q===void 0||q.call(y,_)}}),X)};function Yv(e){try{return JSON.stringify(e)}catch{return Math.random()}}function kP(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t[0],o=t[1],a=o===void 0?{}:o,i=NN(a)?{form:a}:a,l=i.form,s=wt(),u=ce(s,2),c=u[0],f=u[1],p=Et(function(){return Yv(c)},[c]),h=Ve(p);h.current=p;var v=Ir(Za),g=l||v,m=g&&g._init,b=gr(n),y=Ve(b);return y.current=b,Ot(function(){if(m){var C=g.getFieldsValue,D=g.getInternalHooks,w=D(qo),k=w.registerWatch,E=function(j,$){var P=i.preserve?$:j;return typeof n=="function"?n(P):vn(P,y.current)},x=k(function(j,$){var P=E(j,$),A=Yv(P);h.current!==A&&(h.current=A,f(P))}),F=E(C(),C(!0));return c!==F&&f(F),x}},[m]),c}var DP=d.forwardRef(EP),El=DP;El.FormProvider=xP;El.Field=RC;El.List=vP;El.useForm=TC;El.useWatch=kP;const oa=d.createContext({}),SP=({children:e,status:t,override:r})=>{const n=d.useContext(oa),o=d.useMemo(()=>{const a=Object.assign({},n);return r&&delete a.isFormItemInput,t&&(delete a.status,delete a.hasFeedback,delete a.feedbackIcon),a},[t,r,n]);return d.createElement(oa.Provider,{value:o},e)},$P=d.createContext(void 0),dl=e=>{const{space:t,form:r,children:n}=e;if(n==null)return null;let o=n;return r&&(o=ee.createElement(SP,{override:!0,status:!0},o)),t&&(o=ee.createElement(o5,null,o)),o};function MC(...e){const t={};return e.forEach(r=>{r&&Object.keys(r).forEach(n=>{r[n]!==void 0&&(t[n]=r[n])})}),t}var zC=function(e){if(Xr()&&window.document.documentElement){var t=Array.isArray(e)?e:[e],r=window.document.documentElement;return t.some(function(n){return n in r.style})}return!1},BP=function(e,t){if(!zC(e))return!1;var r=document.createElement("div"),n=r.style[e];return r.style[e]=t,r.style[e]!==n};function OP(e,t){return!Array.isArray(e)&&t!==void 0?BP(e,t):zC(e)}function AP(e){return t=>d.createElement(ai,{theme:{token:{motion:!1,zIndexPopupBase:0}}},d.createElement(e,Object.assign({},t)))}const LC=(e,t,r,n,o)=>AP(a=>{const{prefixCls:i,style:l}=a,s=d.useRef(null),[u,c]=d.useState(0),[f,p]=d.useState(0),[h,v]=Ur(!1,{value:a.open}),{getPrefixCls:g}=d.useContext(Zt),m=g(n||"select",i);d.useEffect(()=>{if(v(!0),typeof ResizeObserver<"u"){const C=new ResizeObserver(w=>{const k=w[0].target;c(k.offsetHeight+8),p(k.offsetWidth)}),D=setInterval(()=>{var w;const k=o?`.${o(m)}`:`.${m}-dropdown`,E=(w=s.current)===null||w===void 0?void 0:w.querySelector(k);E&&(clearInterval(D),C.observe(E))},10);return()=>{clearInterval(D),C.disconnect()}}},[]);let b=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},l),{margin:0}),open:h,visible:h,getPopupContainer:()=>s.current});t&&Object.assign(b,{[t]:{overflow:{adjustX:!1,adjustY:!1}}});const y={paddingBottom:u,position:"relative",minWidth:f};return d.createElement("div",{ref:s,style:y},d.createElement(e,Object.assign({},b)))}),_C=(function(){if(typeof navigator>"u"||typeof window>"u")return!1;var e=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(e)||/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(e==null?void 0:e.substr(0,4))});var Fu=function(e){var t=e.className,r=e.customizeIcon,n=e.customizeIconProps,o=e.children,a=e.onMouseDown,i=e.onClick,l=typeof r=="function"?r(n):r;return d.createElement("span",{className:t,onMouseDown:function(s){s.preventDefault(),a==null||a(s)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:i,"aria-hidden":!0},l!==void 0?l:d.createElement("span",{className:de(t.split(/\s+/).map(function(s){return"".concat(s,"-icon")}))},o))},FP=function(e,t,r,n,o){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,i=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,s=ee.useMemo(function(){if(ut(n)==="object")return n.clearIcon;if(o)return o},[n,o]),u=ee.useMemo(function(){return!!(!a&&n&&(r.length||i)&&!(l==="combobox"&&i===""))},[n,a,r.length,i,l]);return{allowClear:u,clearIcon:ee.createElement(Fu,{className:"".concat(e,"-clear"),onMouseDown:t,customizeIcon:s},"\xD7")}},HC=d.createContext(null);function NP(){return d.useContext(HC)}function PP(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=d.useState(!1),r=ce(t,2),n=r[0],o=r[1],a=d.useRef(null),i=function(){window.clearTimeout(a.current)};d.useEffect(function(){return i},[]);var l=function(s,u){i(),a.current=window.setTimeout(function(){o(s),u&&u()},e)};return[n,l,i]}function WC(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=d.useRef(null),r=d.useRef(null);d.useEffect(function(){return function(){window.clearTimeout(r.current)}},[]);function n(o){(o||t.current===null)&&(t.current=o),window.clearTimeout(r.current),r.current=window.setTimeout(function(){t.current=null},e)}return[function(){return t.current},n]}function jP(e,t,r,n){var o=d.useRef(null);o.current={open:t,triggerOpen:r,customizedTrigger:n},d.useEffect(function(){function a(i){var l;if(!((l=o.current)!==null&&l!==void 0&&l.customizedTrigger)){var s=i.target;s.shadowRoot&&i.composed&&(s=i.composedPath()[0]||s),o.current.open&&e().filter(function(u){return u}).every(function(u){return!u.contains(s)&&u!==s})&&o.current.triggerOpen(!1)}}return window.addEventListener("mousedown",a),function(){return window.removeEventListener("mousedown",a)}},[])}function RP(e){return e&&![ot.ESC,ot.SHIFT,ot.BACKSPACE,ot.TAB,ot.WIN_KEY,ot.ALT,ot.META,ot.WIN_KEY_RIGHT,ot.CTRL,ot.SEMICOLON,ot.EQUALS,ot.CAPS_LOCK,ot.CONTEXT_MENU,ot.F1,ot.F2,ot.F3,ot.F4,ot.F5,ot.F6,ot.F7,ot.F8,ot.F9,ot.F10,ot.F11,ot.F12].includes(e)}var IP=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],ba=void 0;function TP(e,t){var r=e.prefixCls,n=e.invalidate,o=e.item,a=e.renderItem,i=e.responsive,l=e.responsiveDisabled,s=e.registerSize,u=e.itemKey,c=e.className,f=e.style,p=e.children,h=e.display,v=e.order,g=e.component,m=g===void 0?"div":g,b=Ct(e,IP),y=i&&!h;function C(x){s(u,x)}d.useEffect(function(){return function(){C(null)}},[]);var D=a&&o!==ba?a(o,{index:v}):p,w;n||(w={opacity:y?0:1,height:y?0:ba,overflowY:y?"hidden":ba,order:i?v:ba,pointerEvents:y?"none":ba,position:y?"absolute":ba});var k={};y&&(k["aria-hidden"]=!0);var E=d.createElement(m,Te({className:de(!n&&r,c),style:H(H({},w),f)},k,b,{ref:t}),D);return i&&(E=d.createElement(ao,{onResize:function(x){var F=x.offsetWidth;C(F)},disabled:l},E)),E}var zi=d.forwardRef(TP);zi.displayName="Item";function MP(e){if(typeof MessageChannel>"u")qt(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}function zP(){var e=d.useRef(null),t=function(r){e.current||(e.current=[],MP(function(){Pb(function(){e.current.forEach(function(n){n()}),e.current=null})})),e.current.push(r)};return t}function Ci(e,t){var r=d.useState(t),n=ce(r,2),o=n[0],a=n[1],i=nr(function(l){e(function(){a(l)})});return[o,i]}var qs=ee.createContext(null),LP=["component"],_P=["className"],HP=["className"],WP=function(e,t){var r=d.useContext(qs);if(!r){var n=e.component,o=n===void 0?"div":n,a=Ct(e,LP);return d.createElement(o,Te({},a,{ref:t}))}var i=r.className,l=Ct(r,_P),s=e.className,u=Ct(e,HP);return d.createElement(qs.Provider,{value:null},d.createElement(zi,Te({ref:t,className:de(i,s)},l,u)))},KC=d.forwardRef(WP);KC.displayName="RawItem";var KP=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],qC="responsive",VC="invalidate";function qP(e){return"+ ".concat(e.length," ...")}function VP(e,t){var r=e.prefixCls,n=r===void 0?"rc-overflow":r,o=e.data,a=o===void 0?[]:o,i=e.renderItem,l=e.renderRawItem,s=e.itemKey,u=e.itemWidth,c=u===void 0?10:u,f=e.ssr,p=e.style,h=e.className,v=e.maxCount,g=e.renderRest,m=e.renderRawRest,b=e.suffix,y=e.component,C=y===void 0?"div":y,D=e.itemComponent,w=e.onVisibleChange,k=Ct(e,KP),E=f==="full",x=zP(),F=Ci(x,null),j=ce(F,2),$=j[0],P=j[1],A=$||0,O=Ci(x,new Map),S=ce(O,2),B=S[0],R=S[1],N=Ci(x,0),T=ce(N,2),L=T[0],X=T[1],_=Ci(x,0),q=ce(_,2),Q=q[0],te=q[1],z=Ci(x,0),Y=ce(z,2),V=Y[0],G=Y[1],K=wt(null),W=ce(K,2),re=W[0],U=W[1],J=wt(null),ne=ce(J,2),ue=ne[0],me=ne[1],Ce=d.useMemo(function(){return ue===null&&E?Number.MAX_SAFE_INTEGER:ue||0},[ue,$]),Ne=wt(!1),pe=ce(Ne,2),he=pe[0],ve=pe[1],be="".concat(n,"-item"),ye=Math.max(L,Q),Ae=v===qC,we=a.length&&Ae,He=v===VC,Me=we||typeof v=="number"&&a.length>v,Fe=Et(function(){var ie=a;return we?$===null&&E?ie=a:ie=a.slice(0,Math.min(a.length,A/c)):typeof v=="number"&&(ie=a.slice(0,v)),ie},[a,c,$,v,we]),ge=Et(function(){return we?a.slice(Ce+1):a.slice(Fe.length)},[a,Fe,we,Ce]),Se=gt(function(ie,De){var Z;return typeof s=="function"?s(ie):(Z=s&&(ie==null?void 0:ie[s]))!==null&&Z!==void 0?Z:De},[s]),qe=gt(i||function(ie){return ie},[i]);function Ye(ie,De,Z){ue===ie&&(De===void 0||De===re)||(me(ie),Z||(ve(ie<a.length-1),w==null||w(ie)),De!==void 0&&U(De))}function Xe(ie,De){P(De.clientWidth)}function Re(ie,De){R(function(Z){var le=new Map(Z);return De===null?le.delete(ie):le.set(ie,De),le})}function lt(ie,De){te(De),X(Q)}function je(ie,De){G(De)}function at(ie){return B.get(Se(Fe[ie],ie))}Wt(function(){if(A&&typeof ye=="number"&&Fe){var ie=V,De=Fe.length,Z=De-1;if(!De){Ye(0,null);return}for(var le=0;le<De;le+=1){var ze=at(le);if(E&&(ze=ze||0),ze===void 0){Ye(le-1,void 0,!0);break}if(ie+=ze,Z===0&&ie<=A||le===Z-1&&ie+at(Z)<=A){Ye(Z,null);break}else if(ie+ye>A){Ye(le-1,ie-ze-V+Q);break}}b&&at(0)+V>A&&U(null)}},[A,B,Q,V,Se,Fe]);var vt=he&&!!ge.length,At={};re!==null&&we&&(At={position:"absolute",left:re,top:0});var fe={prefixCls:be,responsive:we,component:D,invalidate:He},Oe=l?function(ie,De){var Z=Se(ie,De);return d.createElement(qs.Provider,{key:Z,value:H(H({},fe),{},{order:De,item:ie,itemKey:Z,registerSize:Re,display:De<=Ce})},l(ie,De))}:function(ie,De){var Z=Se(ie,De);return d.createElement(zi,Te({},fe,{order:De,key:Z,item:ie,renderItem:qe,itemKey:Z,registerSize:Re,display:De<=Ce}))},rt={order:vt?Ce:Number.MAX_SAFE_INTEGER,className:"".concat(be,"-rest"),registerSize:lt,display:vt},Ke=g||qP,ke=m?d.createElement(qs.Provider,{value:H(H({},fe),rt)},m(ge)):d.createElement(zi,Te({},fe,rt),typeof Ke=="function"?Ke(ge):Ke),Be=d.createElement(C,Te({className:de(!He&&n,h),style:p,ref:t},k),Fe.map(Oe),Me?ke:null,b&&d.createElement(zi,Te({},fe,{responsive:Ae,responsiveDisabled:!we,order:Ce,className:"".concat(be,"-suffix"),registerSize:je,display:!0,style:At}),b));return Ae?d.createElement(ao,{onResize:Xe,disabled:!we},Be):Be}var Yn=d.forwardRef(VP);Yn.displayName="Overflow";Yn.Item=KC;Yn.RESPONSIVE=qC;Yn.INVALIDATE=VC;function UP(e,t,r){var n=H(H({},e),t);return Object.keys(t).forEach(function(o){var a=t[o];typeof a=="function"&&(n[o]=function(){for(var i,l=arguments.length,s=new Array(l),u=0;u<l;u++)s[u]=arguments[u];return a.apply(void 0,s),(i=e[o])===null||i===void 0?void 0:i.call.apply(i,[e].concat(s))})}),n}var XP=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],GP=function(e,t){var r=e.prefixCls,n=e.id,o=e.inputElement,a=e.autoFocus,i=e.autoComplete,l=e.editable,s=e.activeDescendantId,u=e.value,c=e.open,f=e.attrs,p=Ct(e,XP),h=o||d.createElement("input",null),v=h,g=v.ref,m=v.props;return"maxLength"in h.props,h=d.cloneElement(h,H(H(H({type:"search"},UP(p,m)),{},{id:n,ref:ro(t,g),autoComplete:i||"off",autoFocus:a,className:de("".concat(r,"-selection-search-input"),m==null?void 0:m.className),role:"combobox","aria-expanded":c||!1,"aria-haspopup":"listbox","aria-owns":"".concat(n,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(n,"_list"),"aria-activedescendant":c?s:void 0},f),{},{value:l?u:"",readOnly:!l,unselectable:l?null:"on",style:H(H({},m.style),{},{opacity:l?null:0})})),h},UC=d.forwardRef(GP);function XC(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}var YP=typeof window<"u"&&window.document&&window.document.documentElement,ZP=YP;function JP(e){return e!=null}function QP(e){return!e&&e!==0}function Zv(e){return["string","number"].includes(ut(e))}function GC(e){var t=void 0;return e&&(Zv(e.title)?t=e.title.toString():Zv(e.label)&&(t=e.label.toString())),t}function e6(e,t){ZP?d.useLayoutEffect(e,t):d.useEffect(e,t)}function t6(e){var t;return(t=e.key)!==null&&t!==void 0?t:e.value}var Jv=function(e){e.preventDefault(),e.stopPropagation()},r6=function(e){var t=e.id,r=e.prefixCls,n=e.values,o=e.open,a=e.searchValue,i=e.autoClearSearchValue,l=e.inputRef,s=e.placeholder,u=e.disabled,c=e.mode,f=e.showSearch,p=e.autoFocus,h=e.autoComplete,v=e.activeDescendantId,g=e.tabIndex,m=e.removeIcon,b=e.maxTagCount,y=e.maxTagTextLength,C=e.maxTagPlaceholder,D=C===void 0?function(U){return"+ ".concat(U.length," ...")}:C,w=e.tagRender,k=e.onToggleOpen,E=e.onRemove,x=e.onInputChange,F=e.onInputPaste,j=e.onInputKeyDown,$=e.onInputMouseDown,P=e.onInputCompositionStart,A=e.onInputCompositionEnd,O=e.onInputBlur,S=d.useRef(null),B=wt(0),R=ce(B,2),N=R[0],T=R[1],L=wt(!1),X=ce(L,2),_=X[0],q=X[1],Q="".concat(r,"-selection"),te=o||c==="multiple"&&i===!1||c==="tags"?a:"",z=c==="tags"||c==="multiple"&&i===!1||f&&(o||_);e6(function(){T(S.current.scrollWidth)},[te]);var Y=function(U,J,ne,ue,me){return d.createElement("span",{title:GC(U),className:de("".concat(Q,"-item"),M({},"".concat(Q,"-item-disabled"),ne))},d.createElement("span",{className:"".concat(Q,"-item-content")},J),ue&&d.createElement(Fu,{className:"".concat(Q,"-item-remove"),onMouseDown:Jv,onClick:me,customizeIcon:m},"\xD7"))},V=function(U,J,ne,ue,me,Ce){var Ne=function(pe){Jv(pe),k(!o)};return d.createElement("span",{onMouseDown:Ne},w({label:J,value:U,disabled:ne,closable:ue,onClose:me,isMaxTag:!!Ce}))},G=function(U){var J=U.disabled,ne=U.label,ue=U.value,me=!u&&!J,Ce=ne;if(typeof y=="number"&&(typeof ne=="string"||typeof ne=="number")){var Ne=String(Ce);Ne.length>y&&(Ce="".concat(Ne.slice(0,y),"..."))}var pe=function(he){he&&he.stopPropagation(),E(U)};return typeof w=="function"?V(ue,Ce,J,me,pe):Y(U,Ce,J,me,pe)},K=function(U){if(!n.length)return null;var J=typeof D=="function"?D(U):D;return typeof w=="function"?V(void 0,J,!1,!1,void 0,!0):Y({title:J},J,!1)},W=d.createElement("div",{className:"".concat(Q,"-search"),style:{width:N},onFocus:function(){q(!0)},onBlur:function(){q(!1)}},d.createElement(UC,{ref:l,open:o,prefixCls:r,id:t,inputElement:null,disabled:u,autoFocus:p,autoComplete:h,editable:z,activeDescendantId:v,value:te,onKeyDown:j,onMouseDown:$,onChange:x,onPaste:F,onCompositionStart:P,onCompositionEnd:A,onBlur:O,tabIndex:g,attrs:Qn(e,!0)}),d.createElement("span",{ref:S,className:"".concat(Q,"-search-mirror"),"aria-hidden":!0},te,"\xA0")),re=d.createElement(Yn,{prefixCls:"".concat(Q,"-overflow"),data:n,renderItem:G,renderRest:K,suffix:W,itemKey:t6,maxCount:b});return d.createElement("span",{className:"".concat(Q,"-wrap")},re,!n.length&&!te&&d.createElement("span",{className:"".concat(Q,"-placeholder")},s))},n6=function(e){var t=e.inputElement,r=e.prefixCls,n=e.id,o=e.inputRef,a=e.disabled,i=e.autoFocus,l=e.autoComplete,s=e.activeDescendantId,u=e.mode,c=e.open,f=e.values,p=e.placeholder,h=e.tabIndex,v=e.showSearch,g=e.searchValue,m=e.activeValue,b=e.maxLength,y=e.onInputKeyDown,C=e.onInputMouseDown,D=e.onInputChange,w=e.onInputPaste,k=e.onInputCompositionStart,E=e.onInputCompositionEnd,x=e.onInputBlur,F=e.title,j=d.useState(!1),$=ce(j,2),P=$[0],A=$[1],O=u==="combobox",S=O||v,B=f[0],R=g||"";O&&m&&!P&&(R=m),d.useEffect(function(){O&&A(!1)},[O,m]);var N=u!=="combobox"&&!c&&!v?!1:!!R,T=F===void 0?GC(B):F,L=d.useMemo(function(){return B?null:d.createElement("span",{className:"".concat(r,"-selection-placeholder"),style:N?{visibility:"hidden"}:void 0},p)},[B,N,p,r]);return d.createElement("span",{className:"".concat(r,"-selection-wrap")},d.createElement("span",{className:"".concat(r,"-selection-search")},d.createElement(UC,{ref:o,prefixCls:r,id:n,open:c,inputElement:t,disabled:a,autoFocus:i,autoComplete:l,editable:S,activeDescendantId:s,value:R,onKeyDown:y,onMouseDown:C,onChange:function(X){A(!0),D(X)},onPaste:w,onCompositionStart:k,onCompositionEnd:E,onBlur:x,tabIndex:h,attrs:Qn(e,!0),maxLength:O?b:void 0})),!O&&B?d.createElement("span",{className:"".concat(r,"-selection-item"),title:T,style:N?{visibility:"hidden"}:void 0},B.label):null,L)},o6=function(e,t){var r=Ve(null),n=Ve(!1),o=e.prefixCls,a=e.open,i=e.mode,l=e.showSearch,s=e.tokenWithEnter,u=e.disabled,c=e.prefix,f=e.autoClearSearchValue,p=e.onSearch,h=e.onSearchSubmit,v=e.onToggleOpen,g=e.onInputKeyDown,m=e.onInputBlur,b=e.domRef;d.useImperativeHandle(t,function(){return{focus:function(N){r.current.focus(N)},blur:function(){r.current.blur()}}});var y=WC(0),C=ce(y,2),D=C[0],w=C[1],k=function(N){var T=N.which,L=r.current instanceof HTMLTextAreaElement;!L&&a&&(T===ot.UP||T===ot.DOWN)&&N.preventDefault(),g&&g(N),T===ot.ENTER&&i==="tags"&&!n.current&&!a&&(h==null||h(N.target.value)),!(L&&!a&&~[ot.UP,ot.DOWN,ot.LEFT,ot.RIGHT].indexOf(T))&&RP(T)&&v(!0)},E=function(){w(!0)},x=Ve(null),F=function(N){p(N,!0,n.current)!==!1&&v(!0)},j=function(){n.current=!0},$=function(N){n.current=!1,i!=="combobox"&&F(N.target.value)},P=function(N){var T=N.target.value;if(s&&x.current&&/[\r\n]/.test(x.current)){var L=x.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");T=T.replace(L,x.current)}x.current=null,F(T)},A=function(N){var T=N.clipboardData,L=T==null?void 0:T.getData("text");x.current=L||""},O=function(N){var T=N.target;if(T!==r.current){var L=document.body.style.msTouchAction!==void 0;L?setTimeout(function(){r.current.focus()}):r.current.focus()}},S=function(N){var T=D();N.target!==r.current&&!T&&!(i==="combobox"&&u)&&N.preventDefault(),(i!=="combobox"&&(!l||!T)||!a)&&(a&&f!==!1&&p("",!0,!1),v())},B={inputRef:r,onInputKeyDown:k,onInputMouseDown:E,onInputChange:P,onInputPaste:A,onInputCompositionStart:j,onInputCompositionEnd:$,onInputBlur:m},R=i==="multiple"||i==="tags"?d.createElement(r6,Te({},e,B)):d.createElement(n6,Te({},e,B));return d.createElement("div",{ref:b,className:"".concat(o,"-selector"),onClick:O,onMouseDown:S},c&&d.createElement("div",{className:"".concat(o,"-prefix")},c),R)},a6=d.forwardRef(o6);function i6(e){var t=e.prefixCls,r=e.align,n=e.arrow,o=e.arrowPos,a=n||{},i=a.className,l=a.content,s=o.x,u=s===void 0?0:s,c=o.y,f=c===void 0?0:c,p=d.useRef();if(!r||!r.points)return null;var h={position:"absolute"};if(r.autoArrow!==!1){var v=r.points[0],g=r.points[1],m=v[0],b=v[1],y=g[0],C=g[1];m===y||!["t","b"].includes(m)?h.top=f:m==="t"?h.top=0:h.bottom=0,b===C||!["l","r"].includes(b)?h.left=u:b==="l"?h.left=0:h.right=0}return d.createElement("div",{ref:p,className:de("".concat(t,"-arrow"),i),style:h},l)}function l6(e){var t=e.prefixCls,r=e.open,n=e.zIndex,o=e.mask,a=e.motion;return o?d.createElement(ca,Te({},a,{motionAppear:!0,visible:r,removeOnLeave:!0}),function(i){var l=i.className;return d.createElement("div",{style:{zIndex:n},className:de("".concat(t,"-mask"),l)})}):null}var s6=d.memo(function(e){var t=e.children;return t},function(e,t){return t.cache}),u6=d.forwardRef(function(e,t){var r=e.popup,n=e.className,o=e.prefixCls,a=e.style,i=e.target,l=e.onVisibleChanged,s=e.open,u=e.keepDom,c=e.fresh,f=e.onClick,p=e.mask,h=e.arrow,v=e.arrowPos,g=e.align,m=e.motion,b=e.maskMotion,y=e.forceRender,C=e.getPopupContainer,D=e.autoDestroy,w=e.portal,k=e.zIndex,E=e.onMouseEnter,x=e.onMouseLeave,F=e.onPointerEnter,j=e.onPointerDownCapture,$=e.ready,P=e.offsetX,A=e.offsetY,O=e.offsetR,S=e.offsetB,B=e.onAlign,R=e.onPrepare,N=e.stretch,T=e.targetWidth,L=e.targetHeight,X=typeof r=="function"?r():r,_=s||u,q=(C==null?void 0:C.length)>0,Q=d.useState(!C||!q),te=ce(Q,2),z=te[0],Y=te[1];if(Wt(function(){!z&&q&&i&&Y(!0)},[z,q,i]),!z)return null;var V="auto",G={left:"-1000vw",top:"-1000vh",right:V,bottom:V};if($||!s){var K,W=g.points,re=g.dynamicInset||((K=g._experimental)===null||K===void 0?void 0:K.dynamicInset),U=re&&W[0][1]==="r",J=re&&W[0][0]==="b";U?(G.right=O,G.left=V):(G.left=P,G.right=V),J?(G.bottom=S,G.top=V):(G.top=A,G.bottom=V)}var ne={};return N&&(N.includes("height")&&L?ne.height=L:N.includes("minHeight")&&L&&(ne.minHeight=L),N.includes("width")&&T?ne.width=T:N.includes("minWidth")&&T&&(ne.minWidth=T)),s||(ne.pointerEvents="none"),d.createElement(w,{open:y||_,getContainer:C&&function(){return C(i)},autoDestroy:D},d.createElement(l6,{prefixCls:o,open:s,zIndex:k,mask:p,motion:b}),d.createElement(ao,{onResize:B,disabled:!s},function(ue){return d.createElement(ca,Te({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:y,leavedClassName:"".concat(o,"-hidden")},m,{onAppearPrepare:R,onEnterPrepare:R,visible:s,onVisibleChanged:function(me){var Ce;m==null||(Ce=m.onVisibleChanged)===null||Ce===void 0||Ce.call(m,me),l(me)}}),function(me,Ce){var Ne=me.className,pe=me.style,he=de(o,Ne,n);return d.createElement("div",{ref:ro(ue,t,Ce),className:he,style:H(H(H(H({"--arrow-x":"".concat(v.x||0,"px"),"--arrow-y":"".concat(v.y||0,"px")},G),ne),pe),{},{boxSizing:"border-box",zIndex:k},a),onMouseEnter:E,onMouseLeave:x,onPointerEnter:F,onClick:f,onPointerDownCapture:j},h&&d.createElement(i6,{prefixCls:o,arrow:h,arrowPos:v,align:g}),d.createElement(s6,{cache:!s&&!c},X))})}))}),c6=d.forwardRef(function(e,t){var r=e.children,n=e.getTriggerDOMNode,o=Zn(r),a=d.useCallback(function(l){Ji(t,n?n(l):l)},[n]),i=sa(a,ua(r));return o?d.cloneElement(r,{ref:i}):r}),Qv=d.createContext(null);function e0(e){return e?Array.isArray(e)?e:[e]:[]}function d6(e,t,r,n){return d.useMemo(function(){var o=e0(r??t),a=e0(n??t),i=new Set(o),l=new Set(a);return e&&(i.has("hover")&&(i.delete("hover"),i.add("click")),l.has("hover")&&(l.delete("hover"),l.add("click"))),[i,l]},[e,t,r,n])}function f6(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;return r?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function p6(e,t,r,n){for(var o=r.points,a=Object.keys(e),i=0;i<a.length;i+=1){var l,s=a[i];if(f6((l=e[s])===null||l===void 0?void 0:l.points,o,n))return"".concat(t,"-placement-").concat(s)}return""}function t0(e,t,r,n){return t||(r?{motionName:"".concat(e,"-").concat(r)}:n?{motionName:n}:null)}function kl(e){return e.ownerDocument.defaultView}function Of(e){for(var t=[],r=e==null?void 0:e.parentElement,n=["hidden","scroll","clip","auto"];r;){var o=kl(r).getComputedStyle(r),a=o.overflowX,i=o.overflowY,l=o.overflow;[a,i,l].some(function(s){return n.includes(s)})&&t.push(r),r=r.parentElement}return t}function fl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(e)?t:e}function xi(e){return fl(parseFloat(e),0)}function r0(e,t){var r=H({},e);return(t||[]).forEach(function(n){if(!(n instanceof HTMLBodyElement||n instanceof HTMLHtmlElement)){var o=kl(n).getComputedStyle(n),a=o.overflow,i=o.overflowClipMargin,l=o.borderTopWidth,s=o.borderBottomWidth,u=o.borderLeftWidth,c=o.borderRightWidth,f=n.getBoundingClientRect(),p=n.offsetHeight,h=n.clientHeight,v=n.offsetWidth,g=n.clientWidth,m=xi(l),b=xi(s),y=xi(u),C=xi(c),D=fl(Math.round(f.width/v*1e3)/1e3),w=fl(Math.round(f.height/p*1e3)/1e3),k=(v-g-y-C)*D,E=(p-h-m-b)*w,x=m*w,F=b*w,j=y*D,$=C*D,P=0,A=0;if(a==="clip"){var O=xi(i);P=O*D,A=O*w}var S=f.x+j-P,B=f.y+x-A,R=S+f.width+2*P-j-$-k,N=B+f.height+2*A-x-F-E;r.left=Math.max(r.left,S),r.top=Math.max(r.top,B),r.right=Math.min(r.right,R),r.bottom=Math.min(r.bottom,N)}}),r}function n0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r="".concat(t),n=r.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(r)}function o0(e,t){var r=t||[],n=ce(r,2),o=n[0],a=n[1];return[n0(e.width,o),n0(e.height,a)]}function a0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function ya(e,t){var r=t[0],n=t[1],o,a;return r==="t"?a=e.y:r==="b"?a=e.y+e.height:a=e.y+e.height/2,n==="l"?o=e.x:n==="r"?o=e.x+e.width:o=e.x+e.width/2,{x:o,y:a}}function xo(e,t){var r={t:"b",b:"t",l:"r",r:"l"};return e.map(function(n,o){return o===t?r[n]||"c":n}).join("")}function m6(e,t,r,n,o,a,i){var l=d.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:o[n]||{}}),s=ce(l,2),u=s[0],c=s[1],f=d.useRef(0),p=d.useMemo(function(){return t?Of(t):[]},[t]),h=d.useRef({}),v=function(){h.current={}};e||v();var g=nr(function(){if(t&&r&&e){let ur=function(Wr,Nn){var En=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ae,io=_.x+Wr,Ol=_.y+Nn,Hu=io+J,Wu=Ol+U,Ku=Math.max(io,En.left),nt=Math.max(Ol,En.top),Mt=Math.min(Hu,En.right),Fr=Math.min(Wu,En.bottom);return Math.max(0,(Mt-Ku)*(Fr-nt))},pn=function(){jt=_.y+le,Rt=jt+U,kt=_.x+Z,Jt=kt+J};var y,C,D,w,k=t,E=k.ownerDocument,x=kl(k),F=x.getComputedStyle(k),j=F.position,$=k.style.left,P=k.style.top,A=k.style.right,O=k.style.bottom,S=k.style.overflow,B=H(H({},o[n]),a),R=E.createElement("div");(y=k.parentElement)===null||y===void 0||y.appendChild(R),R.style.left="".concat(k.offsetLeft,"px"),R.style.top="".concat(k.offsetTop,"px"),R.style.position=j,R.style.height="".concat(k.offsetHeight,"px"),R.style.width="".concat(k.offsetWidth,"px"),k.style.left="0",k.style.top="0",k.style.right="auto",k.style.bottom="auto",k.style.overflow="hidden";var N;if(Array.isArray(r))N={x:r[0],y:r[1],width:0,height:0};else{var T,L,X=r.getBoundingClientRect();X.x=(T=X.x)!==null&&T!==void 0?T:X.left,X.y=(L=X.y)!==null&&L!==void 0?L:X.top,N={x:X.x,y:X.y,width:X.width,height:X.height}}var _=k.getBoundingClientRect(),q=x.getComputedStyle(k),Q=q.height,te=q.width;_.x=(C=_.x)!==null&&C!==void 0?C:_.left,_.y=(D=_.y)!==null&&D!==void 0?D:_.top;var z=E.documentElement,Y=z.clientWidth,V=z.clientHeight,G=z.scrollWidth,K=z.scrollHeight,W=z.scrollTop,re=z.scrollLeft,U=_.height,J=_.width,ne=N.height,ue=N.width,me={left:0,top:0,right:Y,bottom:V},Ce={left:-re,top:-W,right:G-re,bottom:K-W},Ne=B.htmlRegion,pe="visible",he="visibleFirst";Ne!=="scroll"&&Ne!==he&&(Ne=pe);var ve=Ne===he,be=r0(Ce,p),ye=r0(me,p),Ae=Ne===pe?ye:be,we=ve?ye:Ae;k.style.left="auto",k.style.top="auto",k.style.right="0",k.style.bottom="0";var He=k.getBoundingClientRect();k.style.left=$,k.style.top=P,k.style.right=A,k.style.bottom=O,k.style.overflow=S,(w=k.parentElement)===null||w===void 0||w.removeChild(R);var Me=fl(Math.round(J/parseFloat(te)*1e3)/1e3),Fe=fl(Math.round(U/parseFloat(Q)*1e3)/1e3);if(Me===0||Fe===0||Zi(r)&&!xu(r))return;var ge=B.offset,Se=B.targetOffset,qe=o0(_,ge),Ye=ce(qe,2),Xe=Ye[0],Re=Ye[1],lt=o0(N,Se),je=ce(lt,2),at=je[0],vt=je[1];N.x-=at,N.y-=vt;var At=B.points||[],fe=ce(At,2),Oe=fe[0],rt=fe[1],Ke=a0(rt),ke=a0(Oe),Be=ya(N,Ke),ie=ya(_,ke),De=H({},B),Z=Be.x-ie.x+Xe,le=Be.y-ie.y+Re,ze=ur(Z,le),xe=ur(Z,le,ye),_e=ya(N,["t","l"]),We=ya(_,["t","l"]),Ge=ya(N,["b","r"]),ft=ya(_,["b","r"]),pt=B.overflow||{},Ze=pt.adjustX,Je=pt.adjustY,it=pt.shiftX,mt=pt.shiftY,Pt=function(Wr){return typeof Wr=="boolean"?Wr:Wr>=0},jt,Rt,kt,Jt;pn();var pr=Pt(Je),Le=ke[0]===Ke[0];if(pr&&ke[0]==="t"&&(Rt>we.bottom||h.current.bt)){var et=le;Le?et-=U-ne:et=_e.y-ft.y-Re;var bt=ur(Z,et),Tt=ur(Z,et,ye);bt>ze||bt===ze&&(!ve||Tt>=xe)?(h.current.bt=!0,le=et,Re=-Re,De.points=[xo(ke,0),xo(Ke,0)]):h.current.bt=!1}if(pr&&ke[0]==="b"&&(jt<we.top||h.current.tb)){var Ft=le;Le?Ft+=U-ne:Ft=Ge.y-We.y-Re;var yr=ur(Z,Ft),Cr=ur(Z,Ft,ye);yr>ze||yr===ze&&(!ve||Cr>=xe)?(h.current.tb=!0,le=Ft,Re=-Re,De.points=[xo(ke,0),xo(Ke,0)]):h.current.tb=!1}var dt=Pt(Ze),$t=ke[1]===Ke[1];if(dt&&ke[1]==="l"&&(Jt>we.right||h.current.rl)){var Bt=Z;$t?Bt-=J-ue:Bt=_e.x-ft.x-Xe;var Ut=ur(Bt,le),Tr=ur(Bt,le,ye);Ut>ze||Ut===ze&&(!ve||Tr>=xe)?(h.current.rl=!0,Z=Bt,Xe=-Xe,De.points=[xo(ke,1),xo(Ke,1)]):h.current.rl=!1}if(dt&&ke[1]==="r"&&(kt<we.left||h.current.lr)){var Zr=Z;$t?Zr+=J-ue:Zr=Ge.x-We.x-Xe;var xn=ur(Zr,le),on=ur(Zr,le,ye);xn>ze||xn===ze&&(!ve||on>=xe)?(h.current.lr=!0,Z=Zr,Xe=-Xe,De.points=[xo(ke,1),xo(Ke,1)]):h.current.lr=!1}pn();var Mr=it===!0?0:it;typeof Mr=="number"&&(kt<ye.left&&(Z-=kt-ye.left-Xe,N.x+ue<ye.left+Mr&&(Z+=N.x-ye.left+ue-Mr)),Jt>ye.right&&(Z-=Jt-ye.right-Xe,N.x>ye.right-Mr&&(Z+=N.x-ye.right+Mr)));var an=mt===!0?0:mt;typeof an=="number"&&(jt<ye.top&&(le-=jt-ye.top-Re,N.y+ne<ye.top+an&&(le+=N.y-ye.top+ne-an)),Rt>ye.bottom&&(le-=Rt-ye.bottom-Re,N.y>ye.bottom-an&&(le+=N.y-ye.bottom+an)));var Jr=_.x+Z,zr=Jr+J,ln=_.y+le,xt=ln+U,Qe=N.x,yt=Qe+ue,_t=N.y,Lt=_t+ne,tr=Math.max(Jr,Qe),Dr=Math.min(zr,yt),mr=(tr+Dr)/2,Lr=mr-Jr,xr=Math.max(ln,_t),Ar=Math.min(xt,Lt),wn=(xr+Ar)/2,ht=wn-ln;i==null||i(t,De);var Dt=He.right-_.x-(Z+_.width),Sr=He.bottom-_.y-(le+_.height);Me===1&&(Z=Math.round(Z),Dt=Math.round(Dt)),Fe===1&&(le=Math.round(le),Sr=Math.round(Sr));var hr={ready:!0,offsetX:Z/Me,offsetY:le/Fe,offsetR:Dt/Me,offsetB:Sr/Fe,arrowX:Lr/Me,arrowY:ht/Fe,scaleX:Me,scaleY:Fe,align:De};c(hr)}}),m=function(){f.current+=1;var y=f.current;Promise.resolve().then(function(){f.current===y&&g()})},b=function(){c(function(y){return H(H({},y),{},{ready:!1})})};return Wt(b,[n]),Wt(function(){e||b()},[e]),[u.ready,u.offsetX,u.offsetY,u.offsetR,u.offsetB,u.arrowX,u.arrowY,u.scaleX,u.scaleY,u.align,m]}function h6(e,t,r,n,o){Wt(function(){if(e&&t&&r){let f=function(){n(),o()};var a=t,i=r,l=Of(a),s=Of(i),u=kl(i),c=new Set([u].concat(Pe(l),Pe(s)));return c.forEach(function(p){p.addEventListener("scroll",f,{passive:!0})}),u.addEventListener("resize",f,{passive:!0}),n(),function(){c.forEach(function(p){p.removeEventListener("scroll",f),u.removeEventListener("resize",f)})}}},[e,t,r])}function g6(e,t,r,n,o,a,i,l){var s=d.useRef(e);s.current=e;var u=d.useRef(!1);d.useEffect(function(){if(t&&n&&(!o||a)){var f=function(){u.current=!1},p=function(g){var m;s.current&&!i(((m=g.composedPath)===null||m===void 0||(m=m.call(g))===null||m===void 0?void 0:m[0])||g.target)&&!u.current&&l(!1)},h=kl(n);h.addEventListener("pointerdown",f,!0),h.addEventListener("mousedown",p,!0),h.addEventListener("contextmenu",p,!0);var v=Ls(r);return v&&(v.addEventListener("mousedown",p,!0),v.addEventListener("contextmenu",p,!0)),function(){h.removeEventListener("pointerdown",f,!0),h.removeEventListener("mousedown",p,!0),h.removeEventListener("contextmenu",p,!0),v&&(v.removeEventListener("mousedown",p,!0),v.removeEventListener("contextmenu",p,!0))}}},[t,r,n,o,a]);function c(){u.current=!0}return c}var v6=["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 b6(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:FC,t=d.forwardRef(function(r,n){var o=r.prefixCls,a=o===void 0?"rc-trigger-popup":o,i=r.children,l=r.action,s=l===void 0?"hover":l,u=r.showAction,c=r.hideAction,f=r.popupVisible,p=r.defaultPopupVisible,h=r.onPopupVisibleChange,v=r.afterPopupVisibleChange,g=r.mouseEnterDelay,m=r.mouseLeaveDelay,b=m===void 0?.1:m,y=r.focusDelay,C=r.blurDelay,D=r.mask,w=r.maskClosable,k=w===void 0?!0:w,E=r.getPopupContainer,x=r.forceRender,F=r.autoDestroy,j=r.destroyPopupOnHide,$=r.popup,P=r.popupClassName,A=r.popupStyle,O=r.popupPlacement,S=r.builtinPlacements,B=S===void 0?{}:S,R=r.popupAlign,N=r.zIndex,T=r.stretch,L=r.getPopupClassNameFromAlign,X=r.fresh,_=r.alignPoint,q=r.onPopupClick,Q=r.onPopupAlign,te=r.arrow,z=r.popupMotion,Y=r.maskMotion,V=r.popupTransitionName,G=r.popupAnimation,K=r.maskTransitionName,W=r.maskAnimation,re=r.className,U=r.getTriggerDOMNode,J=Ct(r,v6),ne=F||j||!1,ue=d.useState(!1),me=ce(ue,2),Ce=me[0],Ne=me[1];Wt(function(){Ne(_C())},[]);var pe=d.useRef({}),he=d.useContext(Qv),ve=d.useMemo(function(){return{registerSubPopup:function(nt,Mt){pe.current[nt]=Mt,he==null||he.registerSubPopup(nt,Mt)}}},[he]),be=Qp(),ye=d.useState(null),Ae=ce(ye,2),we=Ae[0],He=Ae[1],Me=d.useRef(null),Fe=nr(function(nt){Me.current=nt,Zi(nt)&&we!==nt&&He(nt),he==null||he.registerSubPopup(be,nt)}),ge=d.useState(null),Se=ce(ge,2),qe=Se[0],Ye=Se[1],Xe=d.useRef(null),Re=nr(function(nt){Zi(nt)&&qe!==nt&&(Ye(nt),Xe.current=nt)}),lt=d.Children.only(i),je=(lt==null?void 0:lt.props)||{},at={},vt=nr(function(nt){var Mt,Fr,$r=qe;return($r==null?void 0:$r.contains(nt))||((Mt=Ls($r))===null||Mt===void 0?void 0:Mt.host)===nt||nt===$r||(we==null?void 0:we.contains(nt))||((Fr=Ls(we))===null||Fr===void 0?void 0:Fr.host)===nt||nt===we||Object.values(pe.current).some(function(dr){return(dr==null?void 0:dr.contains(nt))||nt===dr})}),At=t0(a,z,G,V),fe=t0(a,Y,W,K),Oe=d.useState(p||!1),rt=ce(Oe,2),Ke=rt[0],ke=rt[1],Be=f??Ke,ie=nr(function(nt){f===void 0&&ke(nt)});Wt(function(){ke(f||!1)},[f]);var De=d.useRef(Be);De.current=Be;var Z=d.useRef([]);Z.current=[];var le=nr(function(nt){var Mt;ie(nt),((Mt=Z.current[Z.current.length-1])!==null&&Mt!==void 0?Mt:Be)!==nt&&(Z.current.push(nt),h==null||h(nt))}),ze=d.useRef(),xe=function(){clearTimeout(ze.current)},_e=function(nt){var Mt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;xe(),Mt===0?le(nt):ze.current=setTimeout(function(){le(nt)},Mt*1e3)};d.useEffect(function(){return xe},[]);var We=d.useState(!1),Ge=ce(We,2),ft=Ge[0],pt=Ge[1];Wt(function(nt){(!nt||Be)&&pt(!0)},[Be]);var Ze=d.useState(null),Je=ce(Ze,2),it=Je[0],mt=Je[1],Pt=d.useState(null),jt=ce(Pt,2),Rt=jt[0],kt=jt[1],Jt=function(nt){kt([nt.clientX,nt.clientY])},pr=m6(Be,we,_&&Rt!==null?Rt:qe,O,B,R,Q),Le=ce(pr,11),et=Le[0],bt=Le[1],Tt=Le[2],Ft=Le[3],yr=Le[4],Cr=Le[5],dt=Le[6],$t=Le[7],Bt=Le[8],Ut=Le[9],Tr=Le[10],Zr=d6(Ce,s,u,c),xn=ce(Zr,2),on=xn[0],Mr=xn[1],an=on.has("click"),Jr=Mr.has("click")||Mr.has("contextMenu"),zr=nr(function(){ft||Tr()}),ln=function(){De.current&&_&&Jr&&_e(!1)};h6(Be,qe,we,zr,ln),Wt(function(){zr()},[Rt,O]),Wt(function(){Be&&!(B!=null&&B[O])&&zr()},[JSON.stringify(R)]);var xt=d.useMemo(function(){var nt=p6(B,a,Ut,_);return de(nt,L==null?void 0:L(Ut))},[Ut,L,B,a,_]);d.useImperativeHandle(n,function(){return{nativeElement:Xe.current,popupElement:Me.current,forceAlign:zr}});var Qe=d.useState(0),yt=ce(Qe,2),_t=yt[0],Lt=yt[1],tr=d.useState(0),Dr=ce(tr,2),mr=Dr[0],Lr=Dr[1],xr=function(){if(T&&qe){var nt=qe.getBoundingClientRect();Lt(nt.width),Lr(nt.height)}},Ar=function(){xr(),zr()},wn=function(nt){pt(!1),Tr(),v==null||v(nt)},ht=function(){return new Promise(function(nt){xr(),mt(function(){return nt})})};Wt(function(){it&&(Tr(),it(),mt(null))},[it]);function Dt(nt,Mt,Fr,$r){at[nt]=function(dr){var Al;$r==null||$r(dr),_e(Mt,Fr);for(var qu=arguments.length,Nm=new Array(qu>1?qu-1:0),Fl=1;Fl<qu;Fl++)Nm[Fl-1]=arguments[Fl];(Al=je[nt])===null||Al===void 0||Al.call.apply(Al,[je,dr].concat(Nm))}}(an||Jr)&&(at.onClick=function(nt){var Mt;De.current&&Jr?_e(!1):!De.current&&an&&(Jt(nt),_e(!0));for(var Fr=arguments.length,$r=new Array(Fr>1?Fr-1:0),dr=1;dr<Fr;dr++)$r[dr-1]=arguments[dr];(Mt=je.onClick)===null||Mt===void 0||Mt.call.apply(Mt,[je,nt].concat($r))});var Sr=g6(Be,Jr,qe,we,D,k,vt,_e),hr=on.has("hover"),ur=Mr.has("hover"),pn,Wr;hr&&(Dt("onMouseEnter",!0,g,function(nt){Jt(nt)}),Dt("onPointerEnter",!0,g,function(nt){Jt(nt)}),pn=function(nt){(Be||ft)&&we!==null&&we!==void 0&&we.contains(nt.target)&&_e(!0,g)},_&&(at.onMouseMove=function(nt){var Mt;(Mt=je.onMouseMove)===null||Mt===void 0||Mt.call(je,nt)})),ur&&(Dt("onMouseLeave",!1,b),Dt("onPointerLeave",!1,b),Wr=function(){_e(!1,b)}),on.has("focus")&&Dt("onFocus",!0,y),Mr.has("focus")&&Dt("onBlur",!1,C),on.has("contextMenu")&&(at.onContextMenu=function(nt){var Mt;De.current&&Mr.has("contextMenu")?_e(!1):(Jt(nt),_e(!0)),nt.preventDefault();for(var Fr=arguments.length,$r=new Array(Fr>1?Fr-1:0),dr=1;dr<Fr;dr++)$r[dr-1]=arguments[dr];(Mt=je.onContextMenu)===null||Mt===void 0||Mt.call.apply(Mt,[je,nt].concat($r))}),re&&(at.className=de(je.className,re));var Nn=d.useRef(!1);Nn.current||(Nn.current=x||Be||ft);var En=H(H({},je),at),io={},Ol=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Ol.forEach(function(nt){J[nt]&&(io[nt]=function(){for(var Mt,Fr=arguments.length,$r=new Array(Fr),dr=0;dr<Fr;dr++)$r[dr]=arguments[dr];(Mt=En[nt])===null||Mt===void 0||Mt.call.apply(Mt,[En].concat($r)),J[nt].apply(J,$r)})});var Hu=d.cloneElement(lt,H(H({},En),io)),Wu={x:Cr,y:dt},Ku=te?H({},te!==!0?te:{}):null;return d.createElement(d.Fragment,null,d.createElement(ao,{disabled:!Be,ref:Re,onResize:Ar},d.createElement(c6,{getTriggerDOMNode:U},Hu)),Nn.current&&d.createElement(Qv.Provider,{value:ve},d.createElement(u6,{portal:e,ref:Fe,prefixCls:a,popup:$,className:de(P,xt),style:A,target:qe,onMouseEnter:pn,onMouseLeave:Wr,onPointerEnter:pn,zIndex:N,open:Be,keepDom:ft,fresh:X,onClick:q,onPointerDownCapture:Sr,mask:D,motion:At,maskMotion:fe,onVisibleChanged:wn,onPrepare:ht,forceRender:x,autoDestroy:ne,getPopupContainer:E,align:Ut,arrow:Ku,arrowPos:Wu,ready:et,offsetX:bt,offsetY:Tt,offsetR:Ft,offsetB:yr,onAlign:zr,stretch:T,targetWidth:_t/$t,targetHeight:mr/Bt})))});return t}const Nu=b6(FC);var y6=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],C6=function(e){var t=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"}}},x6=function(e,t){var r=e.prefixCls;e.disabled;var n=e.visible,o=e.children,a=e.popupElement,i=e.animation,l=e.transitionName,s=e.dropdownStyle,u=e.dropdownClassName,c=e.direction,f=c===void 0?"ltr":c,p=e.placement,h=e.builtinPlacements,v=e.dropdownMatchSelectWidth,g=e.dropdownRender,m=e.dropdownAlign,b=e.getPopupContainer,y=e.empty,C=e.getTriggerDOMNode,D=e.onPopupVisibleChange,w=e.onPopupMouseEnter,k=Ct(e,y6),E="".concat(r,"-dropdown"),x=a;g&&(x=g(a));var F=d.useMemo(function(){return h||C6(v)},[h,v]),j=i?"".concat(E,"-").concat(i):l,$=typeof v=="number",P=d.useMemo(function(){return $?null:v===!1?"minWidth":"width"},[v,$]),A=s;$&&(A=H(H({},A),{},{width:v}));var O=d.useRef(null);return d.useImperativeHandle(t,function(){return{getPopupElement:function(){var S;return(S=O.current)===null||S===void 0?void 0:S.popupElement}}}),d.createElement(Nu,Te({},k,{showAction:D?["click"]:[],hideAction:D?["click"]:[],popupPlacement:p||(f==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:F,prefixCls:E,popupTransitionName:j,popup:d.createElement("div",{onMouseEnter:w},x),ref:O,stretch:P,popupAlign:m,popupVisible:n,getPopupContainer:b,popupClassName:de(u,M({},"".concat(E,"-empty"),y)),popupStyle:A,getTriggerDOMNode:C,onPopupVisibleChange:D}),o)},w6=d.forwardRef(x6);function i0(e,t){var r=e.key,n;return"value"in e&&(n=e.value),r??(n!==void 0?n:"rc-index-key-".concat(t))}function Af(e){return typeof e<"u"&&!Number.isNaN(e)}function YC(e,t){var r=e||{},n=r.label,o=r.value,a=r.options,i=r.groupLabel,l=n||(t?"children":"label");return{label:l,value:o||"value",options:a||"options",groupLabel:i||l}}function E6(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.fieldNames,n=t.childrenAsData,o=[],a=YC(r,!1),i=a.label,l=a.value,s=a.options,u=a.groupLabel;function c(f,p){Array.isArray(f)&&f.forEach(function(h){if(p||!(s in h)){var v=h[l];o.push({key:i0(h,o.length),groupOption:p,data:h,label:h[i],value:v})}else{var g=h[u];g===void 0&&n&&(g=h.label),o.push({key:i0(h,o.length),group:!0,data:h,label:g}),c(h[s],!0)}})}return c(e,!1),o}function Ff(e){var t=H({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return lr(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var k6=function(e,t,r){if(!t||!t.length)return null;var n=!1,o=function i(l,s){var u=T1(s),c=u[0],f=u.slice(1);if(!c)return[l];var p=l.split(c);return n=n||p.length>1,p.reduce(function(h,v){return[].concat(Pe(h),Pe(i(v,f)))},[]).filter(Boolean)},a=o(e,t);return n?typeof r<"u"?a.slice(0,r):a:null},tm=d.createContext(null);function D6(e){var t=e.visible,r=e.values;if(!t)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(o){var a=o.label,i=o.value;return["number","string"].includes(ut(a))?a:i}).join(", ")),r.length>n?", ...":null)}var S6=["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"],$6=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Nf=function(e){return e==="tags"||e==="multiple"},B6=d.forwardRef(function(e,t){var r,n=e.id,o=e.prefixCls,a=e.className,i=e.showSearch,l=e.tagRender,s=e.direction,u=e.omitDomProps,c=e.displayValues,f=e.onDisplayValuesChange,p=e.emptyOptions,h=e.notFoundContent,v=h===void 0?"Not Found":h,g=e.onClear,m=e.mode,b=e.disabled,y=e.loading,C=e.getInputElement,D=e.getRawInputElement,w=e.open,k=e.defaultOpen,E=e.onDropdownVisibleChange,x=e.activeValue,F=e.onActiveValueChange,j=e.activeDescendantId,$=e.searchValue,P=e.autoClearSearchValue,A=e.onSearch,O=e.onSearchSplit,S=e.tokenSeparators,B=e.allowClear,R=e.prefix,N=e.suffixIcon,T=e.clearIcon,L=e.OptionList,X=e.animation,_=e.transitionName,q=e.dropdownStyle,Q=e.dropdownClassName,te=e.dropdownMatchSelectWidth,z=e.dropdownRender,Y=e.dropdownAlign,V=e.placement,G=e.builtinPlacements,K=e.getPopupContainer,W=e.showAction,re=W===void 0?[]:W,U=e.onFocus,J=e.onBlur,ne=e.onKeyUp,ue=e.onKeyDown,me=e.onMouseDown,Ce=Ct(e,S6),Ne=Nf(m),pe=(i!==void 0?i:Ne)||m==="combobox",he=H({},Ce);$6.forEach(function(Qe){delete he[Qe]}),u==null||u.forEach(function(Qe){delete he[Qe]});var ve=d.useState(!1),be=ce(ve,2),ye=be[0],Ae=be[1];d.useEffect(function(){Ae(_C())},[]);var we=d.useRef(null),He=d.useRef(null),Me=d.useRef(null),Fe=d.useRef(null),ge=d.useRef(null),Se=d.useRef(!1),qe=PP(),Ye=ce(qe,3),Xe=Ye[0],Re=Ye[1],lt=Ye[2];d.useImperativeHandle(t,function(){var Qe,yt;return{focus:(Qe=Fe.current)===null||Qe===void 0?void 0:Qe.focus,blur:(yt=Fe.current)===null||yt===void 0?void 0:yt.blur,scrollTo:function(_t){var Lt;return(Lt=ge.current)===null||Lt===void 0?void 0:Lt.scrollTo(_t)},nativeElement:we.current||He.current}});var je=d.useMemo(function(){var Qe;if(m!=="combobox")return $;var yt=(Qe=c[0])===null||Qe===void 0?void 0:Qe.value;return typeof yt=="string"||typeof yt=="number"?String(yt):""},[$,m,c]),at=m==="combobox"&&typeof C=="function"&&C()||null,vt=typeof D=="function"&&D(),At=sa(He,vt==null||(r=vt.props)===null||r===void 0?void 0:r.ref),fe=d.useState(!1),Oe=ce(fe,2),rt=Oe[0],Ke=Oe[1];Wt(function(){Ke(!0)},[]);var ke=Ur(!1,{defaultValue:k,value:w}),Be=ce(ke,2),ie=Be[0],De=Be[1],Z=rt?ie:!1,le=!v&&p;(b||le&&Z&&m==="combobox")&&(Z=!1);var ze=le?!1:Z,xe=d.useCallback(function(Qe){var yt=Qe!==void 0?Qe:!Z;b||(De(yt),Z!==yt&&(E==null||E(yt)))},[b,Z,De,E]),_e=d.useMemo(function(){return(S||[]).some(function(Qe){return[`
|
|
299
|
+
`,`\r
|
|
300
|
+
`].includes(Qe)})},[S]),We=d.useContext(tm)||{},Ge=We.maxCount,ft=We.rawValues,pt=function(Qe,yt,_t){if(!(Ne&&Af(Ge)&&(ft==null?void 0:ft.size)>=Ge)){var Lt=!0,tr=Qe;F==null||F(null);var Dr=k6(Qe,S,Af(Ge)?Ge-ft.size:void 0),mr=_t?null:Dr;return m!=="combobox"&&mr&&(tr="",O==null||O(mr),xe(!1),Lt=!1),A&&je!==tr&&A(tr,{source:yt?"typing":"effect"}),Lt}},Ze=function(Qe){!Qe||!Qe.trim()||A(Qe,{source:"submit"})};d.useEffect(function(){!Z&&!Ne&&m!=="combobox"&&pt("",!1,!1)},[Z]),d.useEffect(function(){ie&&b&&De(!1),b&&!Se.current&&Re(!1)},[b]);var Je=WC(),it=ce(Je,2),mt=it[0],Pt=it[1],jt=d.useRef(!1),Rt=function(Qe){var yt=mt(),_t=Qe.key,Lt=_t==="Enter";if(Lt&&(m!=="combobox"&&Qe.preventDefault(),Z||xe(!0)),Pt(!!je),_t==="Backspace"&&!yt&&Ne&&!je&&c.length){for(var tr=Pe(c),Dr=null,mr=tr.length-1;mr>=0;mr-=1){var Lr=tr[mr];if(!Lr.disabled){tr.splice(mr,1),Dr=Lr;break}}Dr&&f(tr,{type:"remove",values:[Dr]})}for(var xr=arguments.length,Ar=new Array(xr>1?xr-1:0),wn=1;wn<xr;wn++)Ar[wn-1]=arguments[wn];if(Z&&(!Lt||!jt.current)){var ht;Lt&&(jt.current=!0),(ht=ge.current)===null||ht===void 0||ht.onKeyDown.apply(ht,[Qe].concat(Ar))}ue==null||ue.apply(void 0,[Qe].concat(Ar))},kt=function(Qe){for(var yt=arguments.length,_t=new Array(yt>1?yt-1:0),Lt=1;Lt<yt;Lt++)_t[Lt-1]=arguments[Lt];if(Z){var tr;(tr=ge.current)===null||tr===void 0||tr.onKeyUp.apply(tr,[Qe].concat(_t))}Qe.key==="Enter"&&(jt.current=!1),ne==null||ne.apply(void 0,[Qe].concat(_t))},Jt=function(Qe){var yt=c.filter(function(_t){return _t!==Qe});f(yt,{type:"remove",values:[Qe]})},pr=function(){jt.current=!1},Le=d.useRef(!1),et=function(){Re(!0),b||(U&&!Le.current&&U.apply(void 0,arguments),re.includes("focus")&&xe(!0)),Le.current=!0},bt=function(){Se.current=!0,Re(!1,function(){Le.current=!1,Se.current=!1,xe(!1)}),!b&&(je&&(m==="tags"?A(je,{source:"submit"}):m==="multiple"&&A("",{source:"blur"})),J&&J.apply(void 0,arguments))},Tt=[];d.useEffect(function(){return function(){Tt.forEach(function(Qe){return clearTimeout(Qe)}),Tt.splice(0,Tt.length)}},[]);var Ft=function(Qe){var yt,_t=Qe.target,Lt=(yt=Me.current)===null||yt===void 0?void 0:yt.getPopupElement();if(Lt&&Lt.contains(_t)){var tr=setTimeout(function(){var xr=Tt.indexOf(tr);if(xr!==-1&&Tt.splice(xr,1),lt(),!ye&&!Lt.contains(document.activeElement)){var Ar;(Ar=Fe.current)===null||Ar===void 0||Ar.focus()}});Tt.push(tr)}for(var Dr=arguments.length,mr=new Array(Dr>1?Dr-1:0),Lr=1;Lr<Dr;Lr++)mr[Lr-1]=arguments[Lr];me==null||me.apply(void 0,[Qe].concat(mr))},yr=d.useState({}),Cr=ce(yr,2),dt=Cr[1];function $t(){dt({})}var Bt;vt&&(Bt=function(Qe){xe(Qe)}),jP(function(){var Qe;return[we.current,(Qe=Me.current)===null||Qe===void 0?void 0:Qe.getPopupElement()]},ze,xe,!!vt);var Ut=d.useMemo(function(){return H(H({},e),{},{notFoundContent:v,open:Z,triggerOpen:ze,id:n,showSearch:pe,multiple:Ne,toggleOpen:xe})},[e,v,ze,Z,n,pe,Ne,xe]),Tr=!!N||y,Zr;Tr&&(Zr=d.createElement(Fu,{className:de("".concat(o,"-arrow"),M({},"".concat(o,"-arrow-loading"),y)),customizeIcon:N,customizeIconProps:{loading:y,searchValue:je,open:Z,focused:Xe,showSearch:pe}}));var xn=function(){var Qe;g==null||g(),(Qe=Fe.current)===null||Qe===void 0||Qe.focus(),f([],{type:"clear",values:c}),pt("",!1,!1)},on=FP(o,xn,c,B,T,b,je,m),Mr=on.allowClear,an=on.clearIcon,Jr=d.createElement(L,{ref:ge}),zr=de(o,a,M(M(M(M(M(M(M(M(M(M({},"".concat(o,"-focused"),Xe),"".concat(o,"-multiple"),Ne),"".concat(o,"-single"),!Ne),"".concat(o,"-allow-clear"),B),"".concat(o,"-show-arrow"),Tr),"".concat(o,"-disabled"),b),"".concat(o,"-loading"),y),"".concat(o,"-open"),Z),"".concat(o,"-customize-input"),at),"".concat(o,"-show-search"),pe)),ln=d.createElement(w6,{ref:Me,disabled:b,prefixCls:o,visible:ze,popupElement:Jr,animation:X,transitionName:_,dropdownStyle:q,dropdownClassName:Q,direction:s,dropdownMatchSelectWidth:te,dropdownRender:z,dropdownAlign:Y,placement:V,builtinPlacements:G,getPopupContainer:K,empty:p,getTriggerDOMNode:function(Qe){return He.current||Qe},onPopupVisibleChange:Bt,onPopupMouseEnter:$t},vt?d.cloneElement(vt,{ref:At}):d.createElement(a6,Te({},e,{domRef:He,prefixCls:o,inputElement:at,ref:Fe,id:n,prefix:R,showSearch:pe,autoClearSearchValue:P,mode:m,activeDescendantId:j,tagRender:l,values:c,open:Z,onToggleOpen:xe,activeValue:x,searchValue:je,onSearch:pt,onSearchSubmit:Ze,onRemove:Jt,tokenWithEnter:_e,onInputBlur:pr}))),xt;return vt?xt=ln:xt=d.createElement("div",Te({className:zr},he,{ref:we,onMouseDown:Ft,onKeyDown:Rt,onKeyUp:kt,onFocus:et,onBlur:bt}),d.createElement(D6,{visible:Xe&&!Z,values:c}),ln,Zr,Mr&&an),d.createElement(HC.Provider,{value:Ut},xt)}),rm=function(){return null};rm.isSelectOptGroup=!0;var nm=function(){return null};nm.isSelectOption=!0;var ZC=d.forwardRef(function(e,t){var r=e.height,n=e.offsetY,o=e.offsetX,a=e.children,i=e.prefixCls,l=e.onInnerResize,s=e.innerProps,u=e.rtl,c=e.extra,f={},p={display:"flex",flexDirection:"column"};return n!==void 0&&(f={height:r,position:"relative",overflow:"hidden"},p=H(H({},p),{},M(M(M(M(M({transform:"translateY(".concat(n,"px)")},u?"marginRight":"marginLeft",-o),"position","absolute"),"left",0),"right",0),"top",0))),d.createElement("div",{style:f},d.createElement(ao,{onResize:function(h){var v=h.offsetHeight;v&&l&&l()}},d.createElement("div",Te({style:p,className:de(M({},"".concat(i,"-holder-inner"),i)),ref:t},s),a,c)))});ZC.displayName="Filler";function O6(e){var t=e.children,r=e.setRef,n=d.useCallback(function(o){r(o)},[]);return d.cloneElement(t,{ref:n})}function A6(e,t,r,n,o,a,i,l){var s=l.getKey;return e.slice(t,r+1).map(function(u,c){var f=t+c,p=i(u,f,{style:{width:n},offsetX:o}),h=s(u);return d.createElement(O6,{key:h,setRef:function(v){return a(u,v)}},p)})}function F6(e,t,r){var n=e.length,o=t.length,a,i;if(n===0&&o===0)return null;n<o?(a=e,i=t):(a=t,i=e);var l={__EMPTY_ITEM__:!0};function s(v){return v!==void 0?r(v):l}for(var u=null,c=Math.abs(n-o)!==1,f=0;f<i.length;f+=1){var p=s(a[f]),h=s(i[f]);if(p!==h){u=f,c=c||p!==s(i[f+1]);break}}return u===null?null:{index:u,multiple:c}}function N6(e,t,r){var n=d.useState(e),o=ce(n,2),a=o[0],i=o[1],l=d.useState(null),s=ce(l,2),u=s[0],c=s[1];return d.useEffect(function(){var f=F6(a||[],e||[],t);(f==null?void 0:f.index)!==void 0&&c(e[f.index]),i(e)},[e]),[u]}var l0=(typeof navigator>"u"?"undefined":ut(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const JC=(function(e,t,r,n){var o=Ve(!1),a=Ve(null);function i(){clearTimeout(a.current),o.current=!0,a.current=setTimeout(function(){o.current=!1},50)}var l=Ve({top:e,bottom:t,left:r,right:n});return l.current.top=e,l.current.bottom=t,l.current.left=r,l.current.right=n,function(s,u){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,f=s?u<0&&l.current.left||u>0&&l.current.right:u<0&&l.current.top||u>0&&l.current.bottom;return c&&f?(clearTimeout(a.current),o.current=!1):(!f||o.current)&&i(),!o.current&&f}});function P6(e,t,r,n,o,a,i){var l=Ve(0),s=Ve(null),u=Ve(null),c=Ve(!1),f=JC(t,r,n,o);function p(y,C){if(qt.cancel(s.current),!f(!1,C)){var D=y;if(!D._virtualHandled)D._virtualHandled=!0;else return;l.current+=C,u.current=C,l0||D.preventDefault(),s.current=qt(function(){var w=c.current?10:1;i(l.current*w,!1),l.current=0})}}function h(y,C){i(C,!0),l0||y.preventDefault()}var v=Ve(null),g=Ve(null);function m(y){if(e){qt.cancel(g.current),g.current=qt(function(){v.current=null},2);var C=y.deltaX,D=y.deltaY,w=y.shiftKey,k=C,E=D;(v.current==="sx"||!v.current&&w&&D&&!C)&&(k=D,E=0,v.current="sx");var x=Math.abs(k),F=Math.abs(E);v.current===null&&(v.current=a&&x>F?"x":"y"),v.current==="y"?p(y,E):h(y,k)}}function b(y){e&&(c.current=y.detail===u.current)}return[m,b]}function j6(e,t,r,n){var o=d.useMemo(function(){return[new Map,[]]},[e,r.id,n]),a=ce(o,2),i=a[0],l=a[1],s=function(u){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,f=i.get(u),p=i.get(c);if(f===void 0||p===void 0)for(var h=e.length,v=l.length;v<h;v+=1){var g,m=e[v],b=t(m);i.set(b,v);var y=(g=r.get(b))!==null&&g!==void 0?g:n;if(l[v]=(l[v-1]||0)+y,b===u&&(f=v),b===c&&(p=v),f!==void 0&&p!==void 0)break}return{top:l[f-1]||0,bottom:l[p]}};return s}var R6=(function(){function e(){vr(this,e),M(this,"maps",void 0),M(this,"id",0),M(this,"diffRecords",new Map),this.maps=Object.create(null)}return br(e,[{key:"set",value:function(t,r){this.diffRecords.set(t,this.maps[t]),this.maps[t]=r,this.id+=1}},{key:"get",value:function(t){return this.maps[t]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),e})();function s0(e){var t=parseFloat(e);return isNaN(t)?0:t}function I6(e,t,r){var n=d.useState(0),o=ce(n,2),a=o[0],i=o[1],l=Ve(new Map),s=Ve(new R6),u=Ve(0);function c(){u.current+=1}function f(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;c();var v=function(){var m=!1;l.current.forEach(function(b,y){if(b&&b.offsetParent){var C=b.offsetHeight,D=getComputedStyle(b),w=D.marginTop,k=D.marginBottom,E=s0(w),x=s0(k),F=C+E+x;s.current.get(y)!==F&&(s.current.set(y,F),m=!0)}}),m&&i(function(b){return b+1})};if(h)v();else{u.current+=1;var g=u.current;Promise.resolve().then(function(){g===u.current&&v()})}}function p(h,v){var g=e(h);l.current.get(g),v?(l.current.set(g,v),f()):l.current.delete(g)}return Ot(function(){return c},[]),[p,f,s.current,a]}var u0=14/15;function T6(e,t,r){var n=Ve(!1),o=Ve(0),a=Ve(0),i=Ve(null),l=Ve(null),s,u=function(p){if(n.current){var h=Math.ceil(p.touches[0].pageX),v=Math.ceil(p.touches[0].pageY),g=o.current-h,m=a.current-v,b=Math.abs(g)>Math.abs(m);b?o.current=h:a.current=v;var y=r(b,b?g:m,!1,p);y&&p.preventDefault(),clearInterval(l.current),y&&(l.current=setInterval(function(){b?g*=u0:m*=u0;var C=Math.floor(b?g:m);(!r(b,C,!0)||Math.abs(C)<=.1)&&clearInterval(l.current)},16))}},c=function(){n.current=!1,s()},f=function(p){s(),p.touches.length===1&&!n.current&&(n.current=!0,o.current=Math.ceil(p.touches[0].pageX),a.current=Math.ceil(p.touches[0].pageY),i.current=p.target,i.current.addEventListener("touchmove",u,{passive:!1}),i.current.addEventListener("touchend",c,{passive:!0}))};s=function(){i.current&&(i.current.removeEventListener("touchmove",u),i.current.removeEventListener("touchend",c))},Wt(function(){return e&&t.current.addEventListener("touchstart",f,{passive:!0}),function(){var p;(p=t.current)===null||p===void 0||p.removeEventListener("touchstart",f),s(),clearInterval(l.current)}},[e])}function c0(e){return Math.floor(Math.pow(e,.5))}function Pf(e,t){var r="touches"in e?e.touches[0]:e;return r[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function M6(e,t,r){d.useEffect(function(){var n=t.current;if(e&&n){var o=!1,a,i,l=function(){qt.cancel(a)},s=function p(){l(),a=qt(function(){r(i),p()})},u=function(p){if(!(p.target.draggable||p.button!==0)){var h=p;h._virtualHandled||(h._virtualHandled=!0,o=!0)}},c=function(){o=!1,l()},f=function(p){if(o){var h=Pf(p,!1),v=n.getBoundingClientRect(),g=v.top,m=v.bottom;if(h<=g){var b=g-h;i=-c0(b),s()}else if(h>=m){var y=h-m;i=c0(y),s()}else l()}};return n.addEventListener("mousedown",u),n.ownerDocument.addEventListener("mouseup",c),n.ownerDocument.addEventListener("mousemove",f),function(){n.removeEventListener("mousedown",u),n.ownerDocument.removeEventListener("mouseup",c),n.ownerDocument.removeEventListener("mousemove",f),l()}}},[e])}var z6=10;function L6(e,t,r,n,o,a,i,l){var s=d.useRef(),u=d.useState(null),c=ce(u,2),f=c[0],p=c[1];return Wt(function(){if(f&&f.times<z6){if(!e.current){p(function(T){return H({},T)});return}a();var h=f.targetAlign,v=f.originAlign,g=f.index,m=f.offset,b=e.current.clientHeight,y=!1,C=h,D=null;if(b){for(var w=h||v,k=0,E=0,x=0,F=Math.min(t.length-1,g),j=0;j<=F;j+=1){var $=o(t[j]);E=k;var P=r.get($);x=E+(P===void 0?n:P),k=x}for(var A=w==="top"?m:b-m,O=F;O>=0;O-=1){var S=o(t[O]),B=r.get(S);if(B===void 0){y=!0;break}if(A-=B,A<=0)break}switch(w){case"top":D=E-m;break;case"bottom":D=x-b+m;break;default:{var R=e.current.scrollTop,N=R+b;E<R?C="top":x>N&&(C="bottom")}}D!==null&&i(D),D!==f.lastTop&&(y=!0)}y&&p(H(H({},f),{},{times:f.times+1,targetAlign:C,lastTop:D}))}},[f,e.current]),function(h){if(h==null){l();return}if(qt.cancel(s.current),typeof h=="number")i(h);else if(h&&ut(h)==="object"){var v,g=h.align;"index"in h?v=h.index:v=t.findIndex(function(y){return o(y)===h.key});var m=h.offset,b=m===void 0?0:m;p({times:0,index:v,offset:b,originAlign:g})}}}var d0=d.forwardRef(function(e,t){var r=e.prefixCls,n=e.rtl,o=e.scrollOffset,a=e.scrollRange,i=e.onStartMove,l=e.onStopMove,s=e.onScroll,u=e.horizontal,c=e.spinSize,f=e.containerSize,p=e.style,h=e.thumbStyle,v=e.showScrollBar,g=d.useState(!1),m=ce(g,2),b=m[0],y=m[1],C=d.useState(null),D=ce(C,2),w=D[0],k=D[1],E=d.useState(null),x=ce(E,2),F=x[0],j=x[1],$=!n,P=d.useRef(),A=d.useRef(),O=d.useState(v),S=ce(O,2),B=S[0],R=S[1],N=d.useRef(),T=function(){v===!0||v===!1||(clearTimeout(N.current),R(!0),N.current=setTimeout(function(){R(!1)},3e3))},L=a-f||0,X=f-c||0,_=d.useMemo(function(){if(o===0||L===0)return 0;var W=o/L;return W*X},[o,L,X]),q=function(W){W.stopPropagation(),W.preventDefault()},Q=d.useRef({top:_,dragging:b,pageY:w,startTop:F});Q.current={top:_,dragging:b,pageY:w,startTop:F};var te=function(W){y(!0),k(Pf(W,u)),j(Q.current.top),i(),W.stopPropagation(),W.preventDefault()};d.useEffect(function(){var W=function(J){J.preventDefault()},re=P.current,U=A.current;return re.addEventListener("touchstart",W,{passive:!1}),U.addEventListener("touchstart",te,{passive:!1}),function(){re.removeEventListener("touchstart",W),U.removeEventListener("touchstart",te)}},[]);var z=d.useRef();z.current=L;var Y=d.useRef();Y.current=X,d.useEffect(function(){if(b){var W,re=function(J){var ne=Q.current,ue=ne.dragging,me=ne.pageY,Ce=ne.startTop;qt.cancel(W);var Ne=P.current.getBoundingClientRect(),pe=f/(u?Ne.width:Ne.height);if(ue){var he=(Pf(J,u)-me)*pe,ve=Ce;!$&&u?ve-=he:ve+=he;var be=z.current,ye=Y.current,Ae=ye?ve/ye:0,we=Math.ceil(Ae*be);we=Math.max(we,0),we=Math.min(we,be),W=qt(function(){s(we,u)})}},U=function(){y(!1),l()};return window.addEventListener("mousemove",re,{passive:!0}),window.addEventListener("touchmove",re,{passive:!0}),window.addEventListener("mouseup",U,{passive:!0}),window.addEventListener("touchend",U,{passive:!0}),function(){window.removeEventListener("mousemove",re),window.removeEventListener("touchmove",re),window.removeEventListener("mouseup",U),window.removeEventListener("touchend",U),qt.cancel(W)}}},[b]),d.useEffect(function(){return T(),function(){clearTimeout(N.current)}},[o]),d.useImperativeHandle(t,function(){return{delayHidden:T}});var V="".concat(r,"-scrollbar"),G={position:"absolute",visibility:B?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 u?(Object.assign(G,{height:8,left:0,right:0,bottom:0}),Object.assign(K,M({height:"100%",width:c},$?"left":"right",_))):(Object.assign(G,M({width:8,top:0,bottom:0},$?"right":"left",0)),Object.assign(K,{width:"100%",height:c,top:_})),d.createElement("div",{ref:P,className:de(V,M(M(M({},"".concat(V,"-horizontal"),u),"".concat(V,"-vertical"),!u),"".concat(V,"-visible"),B)),style:H(H({},G),p),onMouseDown:q,onMouseMove:T},d.createElement("div",{ref:A,className:de("".concat(V,"-thumb"),M({},"".concat(V,"-thumb-moving"),b)),style:H(H({},K),h),onMouseDown:te}))}),_6=20;function f0(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=e/t*e;return isNaN(r)&&(r=0),r=Math.max(r,_6),Math.floor(r)}var H6=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],W6=[],K6={overflowY:"auto",overflowAnchor:"none"};function q6(e,t){var r=e.prefixCls,n=r===void 0?"rc-virtual-list":r,o=e.className,a=e.height,i=e.itemHeight,l=e.fullHeight,s=l===void 0?!0:l,u=e.style,c=e.data,f=e.children,p=e.itemKey,h=e.virtual,v=e.direction,g=e.scrollWidth,m=e.component,b=m===void 0?"div":m,y=e.onScroll,C=e.onVirtualScroll,D=e.onVisibleChange,w=e.innerProps,k=e.extraRender,E=e.styles,x=e.showScrollBar,F=x===void 0?"optional":x,j=Ct(e,H6),$=d.useCallback(function(Le){return typeof p=="function"?p(Le):Le==null?void 0:Le[p]},[p]),P=I6($),A=ce(P,4),O=A[0],S=A[1],B=A[2],R=A[3],N=!!(h!==!1&&a&&i),T=d.useMemo(function(){return Object.values(B.maps).reduce(function(Le,et){return Le+et},0)},[B.id,B.maps]),L=N&&c&&(Math.max(i*c.length,T)>a||!!g),X=v==="rtl",_=de(n,M({},"".concat(n,"-rtl"),X),o),q=c||W6,Q=Ve(),te=Ve(),z=Ve(),Y=wt(0),V=ce(Y,2),G=V[0],K=V[1],W=wt(0),re=ce(W,2),U=re[0],J=re[1],ne=wt(!1),ue=ce(ne,2),me=ue[0],Ce=ue[1],Ne=function(){Ce(!0)},pe=function(){Ce(!1)},he={getKey:$};function ve(Le){K(function(et){var bt;typeof Le=="function"?bt=Le(et):bt=Le;var Tt=Ke(bt);return Q.current.scrollTop=Tt,Tt})}var be=Ve({start:0,end:q.length}),ye=Ve(),Ae=N6(q,$),we=ce(Ae,1),He=we[0];ye.current=He;var Me=d.useMemo(function(){if(!N)return{scrollHeight:void 0,start:0,end:q.length-1,offset:void 0};if(!L){var Le;return{scrollHeight:((Le=te.current)===null||Le===void 0?void 0:Le.offsetHeight)||0,start:0,end:q.length-1,offset:void 0}}for(var et=0,bt,Tt,Ft,yr=q.length,Cr=0;Cr<yr;Cr+=1){var dt=q[Cr],$t=$(dt),Bt=B.get($t),Ut=et+(Bt===void 0?i:Bt);Ut>=G&&bt===void 0&&(bt=Cr,Tt=et),Ut>G+a&&Ft===void 0&&(Ft=Cr),et=Ut}return bt===void 0&&(bt=0,Tt=0,Ft=Math.ceil(a/i)),Ft===void 0&&(Ft=q.length-1),Ft=Math.min(Ft+1,q.length-1),{scrollHeight:et,start:bt,end:Ft,offset:Tt}},[L,N,G,q,R,a]),Fe=Me.scrollHeight,ge=Me.start,Se=Me.end,qe=Me.offset;be.current.start=ge,be.current.end=Se,d.useLayoutEffect(function(){var Le=B.getRecord();if(Le.size===1){var et=Array.from(Le.keys())[0],bt=Le.get(et),Tt=q[ge];if(Tt&&bt===void 0){var Ft=$(Tt);if(Ft===et){var yr=B.get(et),Cr=yr-i;ve(function(dt){return dt+Cr})}}}B.resetRecord()},[Fe]);var Ye=d.useState({width:0,height:a}),Xe=ce(Ye,2),Re=Xe[0],lt=Xe[1],je=function(Le){lt({width:Le.offsetWidth,height:Le.offsetHeight})},at=Ve(),vt=Ve(),At=d.useMemo(function(){return f0(Re.width,g)},[Re.width,g]),fe=d.useMemo(function(){return f0(Re.height,Fe)},[Re.height,Fe]),Oe=Fe-a,rt=Ve(Oe);rt.current=Oe;function Ke(Le){var et=Le;return Number.isNaN(rt.current)||(et=Math.min(et,rt.current)),et=Math.max(et,0),et}var ke=G<=0,Be=G>=Oe,ie=U<=0,De=U>=g,Z=JC(ke,Be,ie,De),le=function(){return{x:X?-U:U,y:G}},ze=Ve(le()),xe=nr(function(Le){if(C){var et=H(H({},le()),Le);(ze.current.x!==et.x||ze.current.y!==et.y)&&(C(et),ze.current=et)}});function _e(Le,et){var bt=Le;et?(ud(function(){J(bt)}),xe()):ve(bt)}function We(Le){var et=Le.currentTarget.scrollTop;et!==G&&ve(et),y==null||y(Le),xe()}var Ge=function(Le){var et=Le,bt=g?g-Re.width:0;return et=Math.max(et,0),et=Math.min(et,bt),et},ft=nr(function(Le,et){et?(ud(function(){J(function(bt){var Tt=bt+(X?-Le:Le);return Ge(Tt)})}),xe()):ve(function(bt){var Tt=bt+Le;return Tt})}),pt=P6(N,ke,Be,ie,De,!!g,ft),Ze=ce(pt,2),Je=Ze[0],it=Ze[1];T6(N,Q,function(Le,et,bt,Tt){var Ft=Tt;return Z(Le,et,bt)?!1:!Ft||!Ft._virtualHandled?(Ft&&(Ft._virtualHandled=!0),Je({preventDefault:function(){},deltaX:Le?et:0,deltaY:Le?0:et}),!0):!1}),M6(L,Q,function(Le){ve(function(et){return et+Le})}),Wt(function(){function Le(bt){var Tt=ke&&bt.detail<0,Ft=Be&&bt.detail>0;N&&!Tt&&!Ft&&bt.preventDefault()}var et=Q.current;return et.addEventListener("wheel",Je,{passive:!1}),et.addEventListener("DOMMouseScroll",it,{passive:!0}),et.addEventListener("MozMousePixelScroll",Le,{passive:!1}),function(){et.removeEventListener("wheel",Je),et.removeEventListener("DOMMouseScroll",it),et.removeEventListener("MozMousePixelScroll",Le)}},[N,ke,Be]),Wt(function(){if(g){var Le=Ge(U);J(Le),xe({x:Le})}},[Re.width,g]);var mt=function(){var Le,et;(Le=at.current)===null||Le===void 0||Le.delayHidden(),(et=vt.current)===null||et===void 0||et.delayHidden()},Pt=L6(Q,q,B,i,$,function(){return S(!0)},ve,mt);d.useImperativeHandle(t,function(){return{nativeElement:z.current,getScrollInfo:le,scrollTo:function(Le){function et(bt){return bt&&ut(bt)==="object"&&("left"in bt||"top"in bt)}et(Le)?(Le.left!==void 0&&J(Ge(Le.left)),Pt(Le.top)):Pt(Le)}}}),Wt(function(){if(D){var Le=q.slice(ge,Se+1);D(Le,q)}},[ge,Se,q]);var jt=j6(q,$,B,i),Rt=k==null?void 0:k({start:ge,end:Se,virtual:L,offsetX:U,offsetY:qe,rtl:X,getSize:jt}),kt=A6(q,ge,Se,g,U,O,f,he),Jt=null;a&&(Jt=H(M({},s?"height":"maxHeight",a),K6),N&&(Jt.overflowY="hidden",g&&(Jt.overflowX="hidden"),me&&(Jt.pointerEvents="none")));var pr={};return X&&(pr.dir="rtl"),d.createElement("div",Te({ref:z,style:H(H({},u),{},{position:"relative"}),className:_},pr,j),d.createElement(ao,{onResize:je},d.createElement(b,{className:"".concat(n,"-holder"),style:Jt,ref:Q,onScroll:We,onMouseEnter:mt},d.createElement(ZC,{prefixCls:n,height:Fe,offsetX:U,offsetY:qe,scrollWidth:g,onInnerResize:S,ref:te,innerProps:w,rtl:X,extra:Rt},kt))),L&&Fe>a&&d.createElement(d0,{ref:at,prefixCls:n,scrollOffset:G,scrollRange:Fe,rtl:X,onScroll:_e,onStartMove:Ne,onStopMove:pe,spinSize:fe,containerSize:Re.height,style:E==null?void 0:E.verticalScrollBar,thumbStyle:E==null?void 0:E.verticalScrollBarThumb,showScrollBar:F}),L&&g>Re.width&&d.createElement(d0,{ref:vt,prefixCls:n,scrollOffset:U,scrollRange:g,rtl:X,onScroll:_e,onStartMove:Ne,onStopMove:pe,spinSize:At,containerSize:Re.width,horizontal:!0,style:E==null?void 0:E.horizontalScrollBar,thumbStyle:E==null?void 0:E.horizontalScrollBarThumb,showScrollBar:F}))}var Pu=d.forwardRef(q6);Pu.displayName="List";function V6(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var U6=["disabled","title","children","style","className"];function p0(e){return typeof e=="string"||typeof e=="number"}var X6=function(e,t){var r=NP(),n=r.prefixCls,o=r.id,a=r.open,i=r.multiple,l=r.mode,s=r.searchValue,u=r.toggleOpen,c=r.notFoundContent,f=r.onPopupScroll,p=d.useContext(tm),h=p.maxCount,v=p.flattenOptions,g=p.onActiveValue,m=p.defaultActiveFirstOption,b=p.onSelect,y=p.menuItemSelectedIcon,C=p.rawValues,D=p.fieldNames,w=p.virtual,k=p.direction,E=p.listHeight,x=p.listItemHeight,F=p.optionRender,j="".concat(n,"-item"),$=la(function(){return v},[a,v],function(K,W){return W[0]&&K[1]!==W[1]}),P=d.useRef(null),A=d.useMemo(function(){return i&&Af(h)&&(C==null?void 0:C.size)>=h},[i,h,C==null?void 0:C.size]),O=function(K){K.preventDefault()},S=function(K){var W;(W=P.current)===null||W===void 0||W.scrollTo(typeof K=="number"?{index:K}:K)},B=d.useCallback(function(K){return l==="combobox"?!1:C.has(K)},[l,Pe(C).toString(),C.size]),R=function(K){for(var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,re=$.length,U=0;U<re;U+=1){var J=(K+U*W+re)%re,ne=$[J]||{},ue=ne.group,me=ne.data;if(!ue&&!(me!=null&&me.disabled)&&(B(me.value)||!A))return J}return-1},N=d.useState(function(){return R(0)}),T=ce(N,2),L=T[0],X=T[1],_=function(K){var W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;X(K);var re={source:W?"keyboard":"mouse"},U=$[K];if(!U){g(null,-1,re);return}g(U.value,K,re)};Ot(function(){_(m!==!1?R(0):-1)},[$.length,s]);var q=d.useCallback(function(K){return l==="combobox"?String(K).toLowerCase()===s.toLowerCase():C.has(K)},[l,s,Pe(C).toString(),C.size]);Ot(function(){var K=setTimeout(function(){if(!i&&a&&C.size===1){var re=Array.from(C)[0],U=$.findIndex(function(J){var ne=J.data;return s?String(ne.value).startsWith(s):ne.value===re});U!==-1&&(_(U),S(U))}});if(a){var W;(W=P.current)===null||W===void 0||W.scrollTo(void 0)}return function(){return clearTimeout(K)}},[a,s]);var Q=function(K){K!==void 0&&b(K,{selected:!C.has(K)}),i||u(!1)};if(d.useImperativeHandle(t,function(){return{onKeyDown:function(K){var W=K.which,re=K.ctrlKey;switch(W){case ot.N:case ot.P:case ot.UP:case ot.DOWN:{var U=0;if(W===ot.UP?U=-1:W===ot.DOWN?U=1:V6()&&re&&(W===ot.N?U=1:W===ot.P&&(U=-1)),U!==0){var J=R(L+U,U);S(J),_(J,!0)}break}case ot.TAB:case ot.ENTER:{var ne,ue=$[L];ue&&!(ue!=null&&(ne=ue.data)!==null&&ne!==void 0&&ne.disabled)&&!A?Q(ue.value):Q(void 0),a&&K.preventDefault();break}case ot.ESC:u(!1),a&&K.stopPropagation()}},onKeyUp:function(){},scrollTo:function(K){S(K)}}}),$.length===0)return d.createElement("div",{role:"listbox",id:"".concat(o,"_list"),className:"".concat(j,"-empty"),onMouseDown:O},c);var te=Object.keys(D).map(function(K){return D[K]}),z=function(K){return K.label};function Y(K,W){var re=K.group;return{role:re?"presentation":"option",id:"".concat(o,"_list_").concat(W)}}var V=function(K){var W=$[K];if(!W)return null;var re=W.data||{},U=re.value,J=W.group,ne=Qn(re,!0),ue=z(W);return W?d.createElement("div",Te({"aria-label":typeof ue=="string"&&!J?ue:null},ne,{key:K},Y(W,K),{"aria-selected":q(U)}),U):null},G={role:"listbox",id:"".concat(o,"_list")};return d.createElement(d.Fragment,null,w&&d.createElement("div",Te({},G,{style:{height:0,width:0,overflow:"hidden"}}),V(L-1),V(L),V(L+1)),d.createElement(Pu,{itemKey:"key",ref:P,data:$,height:E,itemHeight:x,fullHeight:!1,onMouseDown:O,onScroll:f,virtual:w,direction:k,innerProps:w?null:G},function(K,W){var re=K.group,U=K.groupOption,J=K.data,ne=K.label,ue=K.value,me=J.key;if(re){var Ce,Ne=(Ce=J.title)!==null&&Ce!==void 0?Ce:p0(ne)?ne.toString():void 0;return d.createElement("div",{className:de(j,"".concat(j,"-group"),J.className),title:Ne},ne!==void 0?ne:me)}var pe=J.disabled,he=J.title;J.children;var ve=J.style,be=J.className,ye=Ct(J,U6),Ae=fn(ye,te),we=B(ue),He=pe||!we&&A,Me="".concat(j,"-option"),Fe=de(j,Me,be,M(M(M(M({},"".concat(Me,"-grouped"),U),"".concat(Me,"-active"),L===W&&!He),"".concat(Me,"-disabled"),He),"".concat(Me,"-selected"),we)),ge=z(K),Se=!y||typeof y=="function"||we,qe=typeof ge=="number"?ge:ge||ue,Ye=p0(qe)?qe.toString():void 0;return he!==void 0&&(Ye=he),d.createElement("div",Te({},Qn(Ae),w?{}:Y(K,W),{"aria-selected":q(ue),className:Fe,title:Ye,onMouseMove:function(){L===W||He||_(W)},onClick:function(){He||Q(ue)},style:ve}),d.createElement("div",{className:"".concat(Me,"-content")},typeof F=="function"?F(K,{index:W}):qe),d.isValidElement(y)||we,Se&&d.createElement(Fu,{className:"".concat(j,"-option-state"),customizeIcon:y,customizeIconProps:{value:ue,disabled:He,isSelected:we}},we?"\u2713":null))}))},G6=d.forwardRef(X6);const Y6=(function(e,t){var r=d.useRef({values:new Map,options:new Map}),n=d.useMemo(function(){var a=r.current,i=a.values,l=a.options,s=e.map(function(f){if(f.label===void 0){var p;return H(H({},f),{},{label:(p=i.get(f.value))===null||p===void 0?void 0:p.label})}return f}),u=new Map,c=new Map;return s.forEach(function(f){u.set(f.value,f),c.set(f.value,t.get(f.value)||l.get(f.value))}),r.current.values=u,r.current.options=c,s},[e,t]),o=d.useCallback(function(a){return t.get(a)||r.current.options.get(a)},[t]);return[n,o]});function Vc(e,t){return XC(e).join("").toUpperCase().includes(t)}const Z6=(function(e,t,r,n,o){return d.useMemo(function(){if(!r||n===!1)return e;var a=t.options,i=t.label,l=t.value,s=[],u=typeof n=="function",c=r.toUpperCase(),f=u?n:function(h,v){return o?Vc(v[o],c):v[a]?Vc(v[i!=="children"?i:"label"],c):Vc(v[l],c)},p=u?function(h){return Ff(h)}:function(h){return h};return e.forEach(function(h){if(h[a]){var v=f(r,p(h));if(v)s.push(h);else{var g=h[a].filter(function(m){return f(r,p(m))});g.length&&s.push(H(H({},h),{},M({},a,g)))}return}f(r,p(h))&&s.push(h)}),s},[e,n,o,r,t])});var m0=0,J6=Xr();function Q6(){var e;return J6?(e=m0,m0+=1):e="TEST_OR_SSR",e}function ej(e){var t=d.useState(),r=ce(t,2),n=r[0],o=r[1];return d.useEffect(function(){o("rc_select_".concat(Q6()))},[]),e||n}var tj=["children","value"],rj=["children"];function nj(e){var t=e,r=t.key,n=t.props,o=n.children,a=n.value,i=Ct(n,tj);return H({key:r,value:a!==void 0?a:r,children:o},i)}function QC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return _n(e).map(function(r,n){if(!d.isValidElement(r)||!r.type)return null;var o=r,a=o.type.isSelectOptGroup,i=o.key,l=o.props,s=l.children,u=Ct(l,rj);return t||!a?nj(r):H(H({key:"__RC_SELECT_GRP__".concat(i===null?n:i,"__"),label:i},u),{},{options:QC(s)})}).filter(function(r){return r})}var oj=function(e,t,r,n,o){return d.useMemo(function(){var a=e,i=!e;i&&(a=QC(t));var l=new Map,s=new Map,u=function(f,p,h){h&&typeof h=="string"&&f.set(p[h],p)},c=function f(p){for(var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,v=0;v<p.length;v+=1){var g=p[v];!g[r.options]||h?(l.set(g[r.value],g),u(s,g,r.label),u(s,g,n),u(s,g,o)):f(g[r.options],!0)}};return c(a),{options:a,valueOptions:l,labelOptions:s}},[e,t,r,n,o])};function h0(e){var t=d.useRef();t.current=e;var r=d.useCallback(function(){return t.current.apply(t,arguments)},[]);return r}var aj=["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"],ij=["inputValue"];function lj(e){return!e||ut(e)!=="object"}var sj=d.forwardRef(function(e,t){var r=e.id,n=e.mode,o=e.prefixCls,a=o===void 0?"rc-select":o,i=e.backfill,l=e.fieldNames,s=e.inputValue,u=e.searchValue,c=e.onSearch,f=e.autoClearSearchValue,p=f===void 0?!0:f,h=e.onSelect,v=e.onDeselect,g=e.dropdownMatchSelectWidth,m=g===void 0?!0:g,b=e.filterOption,y=e.filterSort,C=e.optionFilterProp,D=e.optionLabelProp,w=e.options,k=e.optionRender,E=e.children,x=e.defaultActiveFirstOption,F=e.menuItemSelectedIcon,j=e.virtual,$=e.direction,P=e.listHeight,A=P===void 0?200:P,O=e.listItemHeight,S=O===void 0?20:O,B=e.labelRender,R=e.value,N=e.defaultValue,T=e.labelInValue,L=e.onChange,X=e.maxCount,_=Ct(e,aj),q=ej(r),Q=Nf(n),te=!!(!w&&E),z=d.useMemo(function(){return b===void 0&&n==="combobox"?!1:b},[b,n]),Y=d.useMemo(function(){return YC(l,te)},[JSON.stringify(l),te]),V=Ur("",{value:u!==void 0?u:s,postState:function(xe){return xe||""}}),G=ce(V,2),K=G[0],W=G[1],re=oj(w,E,Y,C,D),U=re.valueOptions,J=re.labelOptions,ne=re.options,ue=d.useCallback(function(xe){var _e=XC(xe);return _e.map(function(We){var Ge,ft,pt,Ze,Je;if(lj(We))Ge=We;else{var it;pt=We.key,ft=We.label,Ge=(it=We.value)!==null&&it!==void 0?it:pt}var mt=U.get(Ge);if(mt){var Pt;ft===void 0&&(ft=mt==null?void 0:mt[D||Y.label]),pt===void 0&&(pt=(Pt=mt==null?void 0:mt.key)!==null&&Pt!==void 0?Pt:Ge),Ze=mt==null?void 0:mt.disabled,Je=mt==null?void 0:mt.title}return{label:ft,value:Ge,key:pt,disabled:Ze,title:Je}})},[Y,D,U]),me=Ur(N,{value:R}),Ce=ce(me,2),Ne=Ce[0],pe=Ce[1],he=d.useMemo(function(){var xe,_e=Q&&Ne===null?[]:Ne,We=ue(_e);return n==="combobox"&&QP((xe=We[0])===null||xe===void 0?void 0:xe.value)?[]:We},[Ne,ue,n,Q]),ve=Y6(he,U),be=ce(ve,2),ye=be[0],Ae=be[1],we=d.useMemo(function(){if(!n&&ye.length===1){var xe=ye[0];if(xe.value===null&&(xe.label===null||xe.label===void 0))return[]}return ye.map(function(_e){var We;return H(H({},_e),{},{label:(We=typeof B=="function"?B(_e):_e.label)!==null&&We!==void 0?We:_e.value})})},[n,ye,B]),He=d.useMemo(function(){return new Set(ye.map(function(xe){return xe.value}))},[ye]);d.useEffect(function(){if(n==="combobox"){var xe,_e=(xe=ye[0])===null||xe===void 0?void 0:xe.value;W(JP(_e)?String(_e):"")}},[ye]);var Me=h0(function(xe,_e){var We=_e??xe;return M(M({},Y.value,xe),Y.label,We)}),Fe=d.useMemo(function(){if(n!=="tags")return ne;var xe=Pe(ne),_e=function(We){return U.has(We)};return Pe(ye).sort(function(We,Ge){return We.value<Ge.value?-1:1}).forEach(function(We){var Ge=We.value;_e(Ge)||xe.push(Me(Ge,We.label))}),xe},[Me,ne,U,ye,n]),ge=Z6(Fe,Y,K,z,C),Se=d.useMemo(function(){return n!=="tags"||!K||ge.some(function(xe){return xe[C||"value"]===K})||ge.some(function(xe){return xe[Y.value]===K})?ge:[Me(K)].concat(Pe(ge))},[Me,C,n,ge,K,Y]),qe=function xe(_e){var We=Pe(_e).sort(function(Ge,ft){return y(Ge,ft,{searchValue:K})});return We.map(function(Ge){return Array.isArray(Ge.options)?H(H({},Ge),{},{options:Ge.options.length>0?xe(Ge.options):Ge.options}):Ge})},Ye=d.useMemo(function(){return y?qe(Se):Se},[Se,y,K]),Xe=d.useMemo(function(){return E6(Ye,{fieldNames:Y,childrenAsData:te})},[Ye,Y,te]),Re=function(xe){var _e=ue(xe);if(pe(_e),L&&(_e.length!==ye.length||_e.some(function(ft,pt){var Ze;return((Ze=ye[pt])===null||Ze===void 0?void 0:Ze.value)!==(ft==null?void 0:ft.value)}))){var We=T?_e:_e.map(function(ft){return ft.value}),Ge=_e.map(function(ft){return Ff(Ae(ft.value))});L(Q?We:We[0],Q?Ge:Ge[0])}},lt=d.useState(null),je=ce(lt,2),at=je[0],vt=je[1],At=d.useState(0),fe=ce(At,2),Oe=fe[0],rt=fe[1],Ke=x!==void 0?x:n!=="combobox",ke=d.useCallback(function(xe,_e){var We=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ge=We.source,ft=Ge===void 0?"keyboard":Ge;rt(_e),i&&n==="combobox"&&xe!==null&&ft==="keyboard"&&vt(String(xe))},[i,n]),Be=function(xe,_e,We){var Ge=function(){var Rt,kt=Ae(xe);return[T?{label:kt==null?void 0:kt[Y.label],value:xe,key:(Rt=kt==null?void 0:kt.key)!==null&&Rt!==void 0?Rt:xe}:xe,Ff(kt)]};if(_e&&h){var ft=Ge(),pt=ce(ft,2),Ze=pt[0],Je=pt[1];h(Ze,Je)}else if(!_e&&v&&We!=="clear"){var it=Ge(),mt=ce(it,2),Pt=mt[0],jt=mt[1];v(Pt,jt)}},ie=h0(function(xe,_e){var We,Ge=Q?_e.selected:!0;Ge?We=Q?[].concat(Pe(ye),[xe]):[xe]:We=ye.filter(function(ft){return ft.value!==xe}),Re(We),Be(xe,Ge),n==="combobox"?vt(""):(!Nf||p)&&(W(""),vt(""))}),De=function(xe,_e){Re(xe);var We=_e.type,Ge=_e.values;(We==="remove"||We==="clear")&&Ge.forEach(function(ft){Be(ft.value,!1,We)})},Z=function(xe,_e){if(W(xe),vt(null),_e.source==="submit"){var We=(xe||"").trim();if(We){var Ge=Array.from(new Set([].concat(Pe(He),[We])));Re(Ge),Be(We,!0),W("")}return}_e.source!=="blur"&&(n==="combobox"&&Re(xe),c==null||c(xe))},le=function(xe){var _e=xe;n!=="tags"&&(_e=xe.map(function(Ge){var ft=J.get(Ge);return ft==null?void 0:ft.value}).filter(function(Ge){return Ge!==void 0}));var We=Array.from(new Set([].concat(Pe(He),Pe(_e))));Re(We),We.forEach(function(Ge){Be(Ge,!0)})},ze=d.useMemo(function(){var xe=j!==!1&&m!==!1;return H(H({},re),{},{flattenOptions:Xe,onActiveValue:ke,defaultActiveFirstOption:Ke,onSelect:ie,menuItemSelectedIcon:F,rawValues:He,fieldNames:Y,virtual:xe,direction:$,listHeight:A,listItemHeight:S,childrenAsData:te,maxCount:X,optionRender:k})},[X,re,Xe,ke,Ke,ie,F,He,Y,j,m,$,A,S,te,k]);return d.createElement(tm.Provider,{value:ze},d.createElement(B6,Te({},_,{id:q,prefixCls:a,ref:t,omitDomProps:ij,mode:n,displayValues:we,onDisplayValuesChange:De,direction:$,searchValue:K,onSearch:Z,autoClearSearchValue:p,onSearchSplit:le,dropdownMatchSelectWidth:m,OptionList:G6,emptyOptions:!Xe.length,activeValue:at,activeDescendantId:"".concat(q,"_list_").concat(Oe)})))}),om=sj;om.Option=nm;om.OptGroup=rm;function jf(e,t,r){return de({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:r})}const ex=(e,t)=>t||e,uj=()=>{const[,e]=Yr(),[t]=bu("Empty"),r=new Ht(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return d.createElement("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},d.createElement("title",null,(t==null?void 0:t.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"}))))},cj=()=>{const[,e]=Yr(),[t]=bu("Empty"),{colorFill:r,colorFillTertiary:n,colorFillQuaternary:o,colorBgContainer:a}=e,{borderColor:i,shadowColor:l,contentColor:s}=Et(()=>({borderColor:new Ht(r).onBackground(a).toHexString(),shadowColor:new Ht(n).onBackground(a).toHexString(),contentColor:new Ht(o).onBackground(a).toHexString()}),[r,n,o,a]);return d.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},d.createElement("title",null,(t==null?void 0:t.description)||"Empty"),d.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},d.createElement("ellipse",{fill:l,cx:"32",cy:"33",rx:"32",ry:"7"}),d.createElement("g",{fillRule:"nonzero",stroke:i},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:s}))))},dj=e=>{const{componentCls:t,margin:r,marginXS:n,marginXL:o,fontSize:a,lineHeight:i}=e;return{[t]:{marginInline:n,fontSize:a,lineHeight:i,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:n,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:r},"&-normal":{marginBlock:o,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:n,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},fj=Hr("Empty",e=>{const{componentCls:t,controlHeightLG:r,calc:n}=e,o=er(e,{emptyImgCls:`${t}-img`,emptyImgHeight:n(r).mul(2.5).equal(),emptyImgHeightMD:r,emptyImgHeightSM:n(r).mul(.875).equal()});return dj(o)});var pj=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const tx=d.createElement(uj,null),rx=d.createElement(cj,null),fo=e=>{var t;const{className:r,rootClassName:n,prefixCls:o,image:a,description:i,children:l,imageStyle:s,style:u,classNames:c,styles:f}=e,p=pj(e,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:h,direction:v,className:g,style:m,classNames:b,styles:y,image:C}=Io("empty"),D=h("empty",o),[w,k,E]=fj(D),[x]=bu("Empty"),F=typeof i<"u"?i:x==null?void 0:x.description,j=typeof F=="string"?F:"empty",$=(t=a??C)!==null&&t!==void 0?t:tx;let P=null;return typeof $=="string"?P=d.createElement("img",{alt:j,src:$}):P=$,w(d.createElement("div",Object.assign({className:de(k,E,D,g,{[`${D}-normal`]:$===rx,[`${D}-rtl`]:v==="rtl"},r,n,b.root,c==null?void 0:c.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},y.root),m),f==null?void 0:f.root),u)},p),d.createElement("div",{className:de(`${D}-image`,b.image,c==null?void 0:c.image),style:Object.assign(Object.assign(Object.assign({},s),y.image),f==null?void 0:f.image)},P),F&&d.createElement("div",{className:de(`${D}-description`,b.description,c==null?void 0:c.description),style:Object.assign(Object.assign({},y.description),f==null?void 0:f.description)},F),l&&d.createElement("div",{className:de(`${D}-footer`,b.footer,c==null?void 0:c.footer),style:Object.assign(Object.assign({},y.footer),f==null?void 0:f.footer)},l)))};fo.PRESENTED_IMAGE_DEFAULT=tx;fo.PRESENTED_IMAGE_SIMPLE=rx;const nx=e=>{const{componentName:t}=e,{getPrefixCls:r}=Ir(Zt),n=r("empty");switch(t){case"Table":case"List":return ee.createElement(fo,{image:fo.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return ee.createElement(fo,{image:fo.PRESENTED_IMAGE_SIMPLE,className:`${n}-small`});case"Table.filter":return null;default:return ee.createElement(fo,null)}},ox=(e,t,r=void 0)=>{var n,o;const{variant:a,[e]:i}=d.useContext(Zt),l=d.useContext($P),s=i==null?void 0:i.variant;let u;typeof t<"u"?u=t:r===!1?u="borderless":u=(o=(n=l??s)!==null&&n!==void 0?n:a)!==null&&o!==void 0?o:"outlined";const c=YA.includes(u);return[u,c]},mj=e=>{const t={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},t),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},t),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},t),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},t),{points:["br","tr"],offset:[0,-4]})}};function hj(e,t){return e||mj(t)}const g0=e=>{const{optionHeight:t,optionFontSize:r,optionLineHeight:n,optionPadding:o}=e;return{position:"relative",display:"block",minHeight:t,padding:o,color:e.colorText,fontWeight:"normal",fontSize:r,lineHeight:n,boxSizing:"border-box"}},gj=e=>{const{antCls:t,componentCls:r}=e,n=`${r}-item`,o=`&${t}-slide-up-enter${t}-slide-up-enter-active`,a=`&${t}-slide-up-appear${t}-slide-up-appear-active`,i=`&${t}-slide-up-leave${t}-slide-up-leave-active`,l=`${r}-dropdown-placement-`,s=`${n}-option-selected`;return[{[`${r}-dropdown`]:Object.assign(Object.assign({},Br(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[`
|
|
301
|
+
${o}${l}bottomLeft,
|
|
302
|
+
${a}${l}bottomLeft
|
|
303
|
+
`]:{animationName:Vp},[`
|
|
304
|
+
${o}${l}topLeft,
|
|
305
|
+
${a}${l}topLeft,
|
|
306
|
+
${o}${l}topRight,
|
|
307
|
+
${a}${l}topRight
|
|
308
|
+
`]:{animationName:Xp},[`${i}${l}bottomLeft`]:{animationName:Up},[`
|
|
309
|
+
${i}${l}topLeft,
|
|
310
|
+
${i}${l}topRight
|
|
311
|
+
`]:{animationName:Gp},"&-hidden":{display:"none"},[n]:Object.assign(Object.assign({},g0(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},sl),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${n}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${n}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${n}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${n}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},g0(e)),{color:e.colorTextDisabled})}),[`${s}:has(+ ${s})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${s}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},Ga(e,"slide-up"),Ga(e,"slide-down"),Ws(e,"move-up"),Ws(e,"move-down")]},vj=e=>{const{multipleSelectItemHeight:t,paddingXXS:r,lineWidth:n,INTERNAL_FIXED_ITEM_MARGIN:o}=e,a=e.max(e.calc(r).sub(n).equal(),0),i=e.max(e.calc(a).sub(o).equal(),0);return{basePadding:a,containerPadding:i,itemHeight:se(t),itemLineHeight:se(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},bj=e=>{const{multipleSelectItemHeight:t,selectHeight:r,lineWidth:n}=e;return e.calc(r).sub(t).div(2).sub(n).equal()},yj=e=>{const{componentCls:t,iconCls:r,borderRadiusSM:n,motionDurationSlow:o,paddingXS:a,multipleItemColorDisabled:i,multipleItemBorderColorDisabled:l,colorIcon:s,colorIconHover:u,INTERNAL_FIXED_ITEM_MARGIN:c}=e;return{[`${t}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"calc(100% - 4px)",display:"inline-flex"},[`${t}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:c,borderRadius:n,cursor:"default",transition:`font-size ${o}, line-height ${o}, height ${o}`,marginInlineEnd:e.calc(c).mul(2).equal(),paddingInlineStart:a,paddingInlineEnd:e.calc(a).div(2).equal(),[`${t}-disabled&`]:{color:i,borderColor:l,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.calc(a).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},Cl()),{display:"inline-flex",alignItems:"center",color:s,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${r}`]:{verticalAlign:"-0.2em"},"&:hover":{color:u}})}}}},Cj=(e,t)=>{const{componentCls:r,INTERNAL_FIXED_ITEM_MARGIN:n}=e,o=`${r}-selection-overflow`,a=e.multipleSelectItemHeight,i=bj(e),l=t?`${r}-${t}`:"",s=vj(e);return{[`${r}-multiple${l}`]:Object.assign(Object.assign({},yj(e)),{[`${r}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:s.basePadding,paddingBlock:s.containerPadding,borderRadius:e.borderRadius,[`${r}-disabled&`]:{background:e.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${se(n)} 0`,lineHeight:se(a),visibility:"hidden",content:'"\\a0"'}},[`${r}-selection-item`]:{height:s.itemHeight,lineHeight:se(s.itemLineHeight)},[`${r}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:se(a),marginBlock:n}},[`${r}-prefix`]:{marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(s.basePadding).equal()},[`${o}-item + ${o}-item,
|
|
312
|
+
${r}-prefix + ${r}-selection-wrap
|
|
313
|
+
`]:{[`${r}-selection-search`]:{marginInlineStart:0},[`${r}-selection-placeholder`]:{insetInlineStart:0}},[`${o}-item-suffix`]:{minHeight:s.itemHeight,marginBlock:n},[`${r}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(i).equal(),"\n &-input,\n &-mirror\n ":{height:a,fontFamily:e.fontFamily,lineHeight:se(a),transition:`all ${e.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:e.calc(e.inputPaddingHorizontalBase).sub(s.basePadding).equal(),insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`}})}};function Uc(e,t){const{componentCls:r}=e,n=t?`${r}-${t}`:"",o={[`${r}-multiple${n}`]:{fontSize:e.fontSize,[`${r}-selector`]:{[`${r}-show-search&`]:{cursor:"text"}},[`
|
|
314
|
+
&${r}-show-arrow ${r}-selector,
|
|
315
|
+
&${r}-allow-clear ${r}-selector
|
|
316
|
+
`]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()}}};return[Cj(e,t),o]}const xj=e=>{const{componentCls:t}=e,r=er(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),n=er(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[Uc(e),Uc(r,"sm"),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},[`${t}-selection-search`]:{marginInlineStart:2}}},Uc(n,"lg")]};function Xc(e,t){const{componentCls:r,inputPaddingHorizontalBase:n,borderRadius:o}=e,a=e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),i=t?`${r}-${t}`:"";return{[`${r}-single${i}`]:{fontSize:e.fontSize,height:e.controlHeight,[`${r}-selector`]:Object.assign(Object.assign({},Br(e,!0)),{display:"flex",borderRadius:o,flex:"1 1 auto",[`${r}-selection-wrap:after`]:{lineHeight:se(a)},[`${r}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[`
|
|
317
|
+
${r}-selection-item,
|
|
318
|
+
${r}-selection-placeholder
|
|
319
|
+
`]:{display:"block",padding:0,lineHeight:se(a),transition:`all ${e.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"'}}),[`
|
|
320
|
+
&${r}-show-arrow ${r}-selection-item,
|
|
321
|
+
&${r}-show-arrow ${r}-selection-search,
|
|
322
|
+
&${r}-show-arrow ${r}-selection-placeholder
|
|
323
|
+
`]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},[`&${r}-open ${r}-selection-item`]:{color:e.colorTextPlaceholder},[`&:not(${r}-customize-input)`]:{[`${r}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${se(n)}`,[`${r}-selection-search-input`]:{height:a,fontSize:e.fontSize},"&:after":{lineHeight:se(a)}}},[`&${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 wj(e){const{componentCls:t}=e,r=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[Xc(e),Xc(er(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selector`]:{padding:`0 ${se(r)}`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:e.calc(r).add(e.calc(e.fontSize).mul(1.5)).equal()},[`
|
|
324
|
+
&${t}-show-arrow ${t}-selection-item,
|
|
325
|
+
&${t}-show-arrow ${t}-selection-placeholder
|
|
326
|
+
`]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},Xc(er(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}const Ej=e=>{const{fontSize:t,lineHeight:r,lineWidth:n,controlHeight:o,controlHeightSM:a,controlHeightLG:i,paddingXXS:l,controlPaddingHorizontal:s,zIndexPopupBase:u,colorText:c,fontWeightStrong:f,controlItemBgActive:p,controlItemBgHover:h,colorBgContainer:v,colorFillSecondary:g,colorBgContainerDisabled:m,colorTextDisabled:b,colorPrimaryHover:y,colorPrimary:C,controlOutline:D}=e,w=l*2,k=n*2,E=Math.min(o-w,o-k),x=Math.min(a-w,a-k),F=Math.min(i-w,i-k);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(l/2),zIndexPopup:u+50,optionSelectedColor:c,optionSelectedFontWeight:f,optionSelectedBg:p,optionActiveBg:h,optionPadding:`${(o-t*r)/2}px ${s}px`,optionFontSize:t,optionLineHeight:r,optionHeight:o,selectorBg:v,clearBg:v,singleItemHeightLG:i,multipleItemBg:g,multipleItemBorderColor:"transparent",multipleItemHeight:E,multipleItemHeightSM:x,multipleItemHeightLG:F,multipleSelectorBgDisabled:m,multipleItemColorDisabled:b,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:y,activeBorderColor:C,activeOutlineColor:D,selectAffixPadding:l}},ax=(e,t)=>{const{componentCls:r,antCls:n,controlOutlineWidth:o}=e;return{[`&:not(${r}-customize-input) ${r}-selector`]:{border:`${se(e.lineWidth)} ${e.lineType} ${t.borderColor}`,background:e.selectorBg},[`&:not(${r}-disabled):not(${r}-customize-input):not(${n}-pagination-size-changer)`]:{[`&:hover ${r}-selector`]:{borderColor:t.hoverBorderHover},[`${r}-focused& ${r}-selector`]:{borderColor:t.activeBorderColor,boxShadow:`0 0 0 ${se(o)} ${t.activeOutlineColor}`,outline:0},[`${r}-prefix`]:{color:t.color}}}},v0=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},ax(e,t))}),kj=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},ax(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),v0(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),v0(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${se(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),ix=(e,t)=>{const{componentCls:r,antCls:n}=e;return{[`&:not(${r}-customize-input) ${r}-selector`]:{background:t.bg,border:`${se(e.lineWidth)} ${e.lineType} transparent`,color:t.color},[`&:not(${r}-disabled):not(${r}-customize-input):not(${n}-pagination-size-changer)`]:{[`&:hover ${r}-selector`]:{background:t.hoverBg},[`${r}-focused& ${r}-selector`]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},b0=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},ix(e,t))}),Dj=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},ix(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),b0(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),b0(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.colorBgContainer,border:`${se(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}})}),Sj=e=>({"&-borderless":{[`${e.componentCls}-selector`]:{background:"transparent",border:`${se(e.lineWidth)} ${e.lineType} transparent`},[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${se(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`},[`&${e.componentCls}-status-error`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorError}},[`&${e.componentCls}-status-warning`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorWarning}}}}),lx=(e,t)=>{const{componentCls:r,antCls:n}=e;return{[`&:not(${r}-customize-input) ${r}-selector`]:{borderWidth:`0 0 ${se(e.lineWidth)} 0`,borderStyle:`none none ${e.lineType} none`,borderColor:t.borderColor,background:e.selectorBg,borderRadius:0},[`&:not(${r}-disabled):not(${r}-customize-input):not(${n}-pagination-size-changer)`]:{[`&:hover ${r}-selector`]:{borderColor:t.hoverBorderHover},[`${r}-focused& ${r}-selector`]:{borderColor:t.activeBorderColor,outline:0},[`${r}-prefix`]:{color:t.color}}}},y0=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},lx(e,t))}),$j=e=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},lx(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),y0(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),y0(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${se(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),Bj=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},kj(e)),Dj(e)),Sj(e)),$j(e))}),Oj=e=>{const{componentCls:t}=e;return{position:"relative",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,input:{cursor:"pointer"},[`${t}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${t}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},Aj=e=>{const{componentCls:t}=e;return{[`${t}-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"}}}},Fj=e=>{const{antCls:t,componentCls:r,inputPaddingHorizontalBase:n,iconCls:o}=e,a={[`${r}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return{[r]:Object.assign(Object.assign({},Br(e)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${r}-customize-input) ${r}-selector`]:Object.assign(Object.assign({},Oj(e)),Aj(e)),[`${r}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},sl),{[`> ${t}-typography`]:{display:"inline"}}),[`${r}-selection-placeholder`]:Object.assign(Object.assign({},sl),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${r}-arrow`]:Object.assign(Object.assign({},Cl()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${e.motionDurationSlow} ease`,[o]:{verticalAlign:"top",transition:`transform ${e.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:e.selectAffixPadding},[`${r}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto",transform:"translateZ(0)","&:before":{display:"block"},"&:hover":{color:e.colorIcon}},"@media(hover:none)":a,"&:hover":a}),[`${r}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${r}-has-feedback`]:{[`${r}-clear`]:{insetInlineEnd:e.calc(n).add(e.fontSize).add(e.paddingXS).equal()}}}}}},Nj=e=>{const{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},Fj(e),wj(e),xj(e),gj(e),{[`${t}-rtl`]:{direction:"rtl"}},Jp(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},Pj=Hr("Select",(e,{rootPrefixCls:t})=>{const r=er(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[Nj(r),Bj(r)]},Ej,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var jj={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"},Rj=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:jj}))},Ij=d.forwardRef(Rj),Tj={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"},Mj=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:Tj}))},sx=d.forwardRef(Mj),zj={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"},Lj=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:zj}))},ux=d.forwardRef(Lj);function _j({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:r,removeIcon:n,loading:o,multiple:a,hasFeedback:i,prefixCls:l,showSuffixIcon:s,feedbackIcon:u,showArrow:c,componentName:f}){const p=t??d.createElement(hC,null),h=b=>e===null&&!i&&!c?null:d.createElement(d.Fragment,null,s!==!1&&b,i&&u);let v=null;if(e!==void 0)v=h(e);else if(o)v=h(d.createElement(_p,{spin:!0}));else{const b=`${l}-suffix`;v=({open:y,showSearch:C})=>h(y&&C?d.createElement(ux,{className:b}):d.createElement(sx,{className:b}))}let g=null;r!==void 0?g=r:a?g=d.createElement(Ij,null):g=null;let m=null;return n!==void 0?m=n:m=d.createElement(y3,null),{clearIcon:p,suffixIcon:v,itemIcon:g,removeIcon:m}}function Hj(e){return ee.useMemo(()=>{if(e)return(...t)=>ee.createElement(dl,{space:!0},e.apply(void 0,t))},[e])}function Wj(e,t){return t!==void 0?t:e!==null}var Kj=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const cx="SECRET_COMBOBOX_MODE_DO_NOT_USE",qj=(e,t)=>{var r,n,o,a,i;const{prefixCls:l,bordered:s,className:u,rootClassName:c,getPopupContainer:f,popupClassName:p,dropdownClassName:h,listHeight:v=256,placement:g,listItemHeight:m,size:b,disabled:y,notFoundContent:C,status:D,builtinPlacements:w,dropdownMatchSelectWidth:k,popupMatchSelectWidth:E,direction:x,style:F,allowClear:j,variant:$,dropdownStyle:P,transitionName:A,tagRender:O,maxCount:S,prefix:B,dropdownRender:R,popupRender:N,onDropdownVisibleChange:T,onOpenChange:L,styles:X,classNames:_}=e,q=Kj(e,["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:te,renderEmpty:z,direction:Y,virtual:V,popupMatchSelectWidth:G,popupOverflow:K}=d.useContext(Zt),{showSearch:W,style:re,styles:U,className:J,classNames:ne}=Io("select"),[,ue]=Yr(),me=m??(ue==null?void 0:ue.controlHeight),Ce=te("select",l),Ne=te(),pe=x??Y,{compactSize:he,compactItemClassnames:ve}=ku(Ce,pe),[be,ye]=ox("select",$,s),Ae=bo(Ce),[we,He,Me]=Pj(Ce,Ae),Fe=d.useMemo(()=>{const{mode:Ge}=e;if(Ge!=="combobox")return Ge===cx?"combobox":Ge},[e.mode]),ge=Fe==="multiple"||Fe==="tags",Se=Wj(e.suffixIcon,e.showArrow),qe=(r=E??k)!==null&&r!==void 0?r:G,Ye=((n=X==null?void 0:X.popup)===null||n===void 0?void 0:n.root)||((o=U.popup)===null||o===void 0?void 0:o.root)||P,Xe=Hj(N||R),Re=L||T,{status:lt,hasFeedback:je,isFormItemInput:at,feedbackIcon:vt}=d.useContext(oa),At=ex(lt,D);let fe;C!==void 0?fe=C:Fe==="combobox"?fe=null:fe=(z==null?void 0:z("Select"))||d.createElement(nx,{componentName:"Select"});const{suffixIcon:Oe,itemIcon:rt,removeIcon:Ke,clearIcon:ke}=_j(Object.assign(Object.assign({},q),{multiple:ge,hasFeedback:je,feedbackIcon:vt,showSuffixIcon:Se,prefixCls:Ce,componentName:"Select"})),Be=j===!0?{clearIcon:ke}:j,ie=fn(q,["suffixIcon","itemIcon"]),De=de(((a=_==null?void 0:_.popup)===null||a===void 0?void 0:a.root)||((i=ne==null?void 0:ne.popup)===null||i===void 0?void 0:i.root)||p||h,{[`${Ce}-dropdown-${pe}`]:pe==="rtl"},c,ne.root,_==null?void 0:_.root,Me,Ae,He),Z=fa(Ge=>{var ft;return(ft=b??he)!==null&&ft!==void 0?ft:Ge}),le=d.useContext(No),ze=y??le,xe=de({[`${Ce}-lg`]:Z==="large",[`${Ce}-sm`]:Z==="small",[`${Ce}-rtl`]:pe==="rtl",[`${Ce}-${be}`]:ye,[`${Ce}-in-form-item`]:at},jf(Ce,At,je),ve,J,u,ne.root,_==null?void 0:_.root,c,Me,Ae,He),_e=d.useMemo(()=>g!==void 0?g:pe==="rtl"?"bottomRight":"bottomLeft",[g,pe]),[We]=yu("SelectLike",Ye==null?void 0:Ye.zIndex);return we(d.createElement(om,Object.assign({ref:t,virtual:V,showSearch:W},ie,{style:Object.assign(Object.assign(Object.assign(Object.assign({},U.root),X==null?void 0:X.root),re),F),dropdownMatchSelectWidth:qe,transitionName:xC(Ne,"slide-up",A),builtinPlacements:hj(w,K),listHeight:v,listItemHeight:me,mode:Fe,prefixCls:Ce,placement:_e,direction:pe,prefix:B,suffixIcon:Oe,menuItemSelectedIcon:rt,removeIcon:Ke,allowClear:Be,notFoundContent:fe,className:xe,getPopupContainer:f||Q,dropdownClassName:De,disabled:ze,dropdownStyle:Object.assign(Object.assign({},Ye),{zIndex:We}),maxCount:ge?S:void 0,tagRender:ge?O:void 0,dropdownRender:Xe,onDropdownVisibleChange:Re})))},li=d.forwardRef(qj),Vj=LC(li,"dropdownAlign");li.SECRET_COMBOBOX_MODE_DO_NOT_USE=cx;li.Option=nm;li.OptGroup=rm;li._InternalPanelDoNotUseOrYouWillBeFired=Vj;const Uj=(e,t)=>{typeof(e==null?void 0:e.addEventListener)<"u"?e.addEventListener("change",t):typeof(e==null?void 0:e.addListener)<"u"&&e.addListener(t)},Xj=(e,t)=>{typeof(e==null?void 0:e.removeEventListener)<"u"?e.removeEventListener("change",t):typeof(e==null?void 0:e.removeListener)<"u"&&e.removeListener(t)},Gj=["xxl","xl","lg","md","sm","xs"],Yj=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`}),Zj=e=>{const t=e,r=[].concat(Gj).reverse();return r.forEach((n,o)=>{const a=n.toUpperCase(),i=`screen${a}Min`,l=`screen${a}`;if(!(t[i]<=t[l]))throw new Error(`${i}<=${l} fails : !(${t[i]}<=${t[l]})`);if(o<r.length-1){const s=`screen${a}Max`;if(!(t[l]<=t[s]))throw new Error(`${l}<=${s} fails : !(${t[l]}<=${t[s]})`);const u=`screen${r[o+1].toUpperCase()}Min`;if(!(t[s]<=t[u]))throw new Error(`${s}<=${u} fails : !(${t[s]}<=${t[u]})`)}}),e},Jj=()=>{const[,e]=Yr(),t=Yj(Zj(e));return ee.useMemo(()=>{const r=new Map;let n=-1,o={};return{responsiveMap:t,matchHandlers:{},dispatch(a){return o=a,r.forEach(i=>i(o)),r.size>=1},subscribe(a){return r.size||this.register(),n+=1,r.set(n,a),a(o),n},unsubscribe(a){r.delete(a),r.size||this.unregister()},register(){Object.entries(t).forEach(([a,i])=>{const l=({matches:u})=>{this.dispatch(Object.assign(Object.assign({},o),{[a]:u}))},s=window.matchMedia(i);Uj(s,l),this.matchHandlers[i]={mql:s,listener:l},l(s)})},unregister(){Object.values(t).forEach(a=>{const i=this.matchHandlers[a];Xj(i==null?void 0:i.mql,i==null?void 0:i.listener)}),r.clear()}}},[e])};function dx(){const[,e]=d.useReducer(t=>t+1,0);return e}function fx(e=!0,t={}){const r=Ve(t),n=dx(),o=Jj();return Wt(()=>{const a=o.subscribe(i=>{r.current=i,e&&n()});return()=>o.unsubscribe(a)},[]),r.current}function px(e){var t=e.children,r=e.prefixCls,n=e.id,o=e.overlayInnerStyle,a=e.bodyClassName,i=e.className,l=e.style;return d.createElement("div",{className:de("".concat(r,"-content"),i),style:l},d.createElement("div",{className:de("".concat(r,"-inner"),a),id:n,role:"tooltip",style:o},typeof t=="function"?t():t))}var Ca={shiftX:64,adjustY:1},xa={adjustX:1,shiftY:!0},Sn=[0,0],Qj={left:{points:["cr","cl"],overflow:xa,offset:[-4,0],targetOffset:Sn},right:{points:["cl","cr"],overflow:xa,offset:[4,0],targetOffset:Sn},top:{points:["bc","tc"],overflow:Ca,offset:[0,-4],targetOffset:Sn},bottom:{points:["tc","bc"],overflow:Ca,offset:[0,4],targetOffset:Sn},topLeft:{points:["bl","tl"],overflow:Ca,offset:[0,-4],targetOffset:Sn},leftTop:{points:["tr","tl"],overflow:xa,offset:[-4,0],targetOffset:Sn},topRight:{points:["br","tr"],overflow:Ca,offset:[0,-4],targetOffset:Sn},rightTop:{points:["tl","tr"],overflow:xa,offset:[4,0],targetOffset:Sn},bottomRight:{points:["tr","br"],overflow:Ca,offset:[0,4],targetOffset:Sn},rightBottom:{points:["bl","br"],overflow:xa,offset:[4,0],targetOffset:Sn},bottomLeft:{points:["tl","bl"],overflow:Ca,offset:[0,4],targetOffset:Sn},leftBottom:{points:["br","bl"],overflow:xa,offset:[-4,0],targetOffset:Sn}},e4=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],t4=function(e,t){var r=e.overlayClassName,n=e.trigger,o=n===void 0?["hover"]:n,a=e.mouseEnterDelay,i=a===void 0?0:a,l=e.mouseLeaveDelay,s=l===void 0?.1:l,u=e.overlayStyle,c=e.prefixCls,f=c===void 0?"rc-tooltip":c,p=e.children,h=e.onVisibleChange,v=e.afterVisibleChange,g=e.transitionName,m=e.animation,b=e.motion,y=e.placement,C=y===void 0?"right":y,D=e.align,w=D===void 0?{}:D,k=e.destroyTooltipOnHide,E=k===void 0?!1:k,x=e.defaultVisible,F=e.getTooltipContainer,j=e.overlayInnerStyle;e.arrowContent;var $=e.overlay,P=e.id,A=e.showArrow,O=A===void 0?!0:A,S=e.classNames,B=e.styles,R=Ct(e,e4),N=Qp(P),T=Ve(null);ei(t,function(){return T.current});var L=H({},R);"visible"in e&&(L.popupVisible=e.visible);var X=function(){return d.createElement(px,{key:"content",prefixCls:f,id:N,bodyClassName:S==null?void 0:S.body,overlayInnerStyle:H(H({},j),B==null?void 0:B.body)},$)},_=function(){var q=d.Children.only(p),Q=(q==null?void 0:q.props)||{},te=H(H({},Q),{},{"aria-describedby":$?N:null});return d.cloneElement(p,te)};return d.createElement(Nu,Te({popupClassName:de(r,S==null?void 0:S.root),prefixCls:f,popup:X,action:o,builtinPlacements:Qj,popupPlacement:C,ref:T,popupAlign:w,getPopupContainer:F,onPopupVisibleChange:h,afterPopupVisibleChange:v,popupTransitionName:g,popupAnimation:m,popupMotion:b,defaultPopupVisible:x,autoDestroy:E,mouseLeaveDelay:s,popupStyle:H(H({},u),B==null?void 0:B.root),mouseEnterDelay:i,arrow:O},L),_())};const r4=dn(t4);function mx(e){const{sizePopupArrow:t,borderRadiusXS:r,borderRadiusOuter:n}=e,o=t/2,a=0,i=o,l=n*1/Math.sqrt(2),s=o-n*(1-1/Math.sqrt(2)),u=o-r*(1/Math.sqrt(2)),c=n*(Math.sqrt(2)-1)+r*(1/Math.sqrt(2)),f=2*o-u,p=c,h=2*o-l,v=s,g=2*o-a,m=i,b=o*Math.sqrt(2)+n*(Math.sqrt(2)-2),y=n*(Math.sqrt(2)-1),C=`polygon(${y}px 100%, 50% ${y}px, ${2*o-y}px 100%, ${y}px 100%)`,D=`path('M ${a} ${i} A ${n} ${n} 0 0 0 ${l} ${s} L ${u} ${c} A ${r} ${r} 0 0 1 ${f} ${p} L ${h} ${v} A ${n} ${n} 0 0 0 ${g} ${m} Z')`;return{arrowShadowWidth:b,arrowPath:D,arrowPolygon:C}}const n4=(e,t,r)=>{const{sizePopupArrow:n,arrowPolygon:o,arrowPath:a,arrowShadowWidth:i,borderRadiusXS:l,calc:s}=e;return{pointerEvents:"none",width:n,height:n,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:n,height:s(n).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[o,a]},content:'""'},"&::after":{content:'""',position:"absolute",width:i,height:i,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${se(l)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:r,zIndex:0,background:"transparent"}}},hx=8;function am(e){const{contentRadius:t,limitVerticalRadius:r}=e,n=t>12?t+2:12;return{arrowOffsetHorizontal:n,arrowOffsetVertical:r?hx:n}}function Zl(e,t){return e?t:{}}function gx(e,t,r){const{componentCls:n,boxShadowPopoverArrow:o,arrowOffsetVertical:a,arrowOffsetHorizontal:i}=e,{arrowDistance:l=0,arrowPlacement:s={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"},n4(e,t,o)),{"&:before":{background:t}})]},Zl(!!s.top,{[[`&-placement-top > ${n}-arrow`,`&-placement-topLeft > ${n}-arrow`,`&-placement-topRight > ${n}-arrow`].join(",")]:{bottom:l,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":i,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:i}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${se(i)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:i}}}})),Zl(!!s.bottom,{[[`&-placement-bottom > ${n}-arrow`,`&-placement-bottomLeft > ${n}-arrow`,`&-placement-bottomRight > ${n}-arrow`].join(",")]:{top:l,transform:"translateY(-100%)"},[`&-placement-bottom > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":i,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:i}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${se(i)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:i}}}})),Zl(!!s.left,{[[`&-placement-left > ${n}-arrow`,`&-placement-leftTop > ${n}-arrow`,`&-placement-leftBottom > ${n}-arrow`].join(",")]:{right:{_skip_check_:!0,value:l},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:a},[`&-placement-leftBottom > ${n}-arrow`]:{bottom:a}})),Zl(!!s.right,{[[`&-placement-right > ${n}-arrow`,`&-placement-rightTop > ${n}-arrow`,`&-placement-rightBottom > ${n}-arrow`].join(",")]:{left:{_skip_check_:!0,value:l},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:a},[`&-placement-rightBottom > ${n}-arrow`]:{bottom:a}}))}}function o4(e,t,r,n){if(n===!1)return{adjustX:!1,adjustY:!1};const o=n&&typeof n=="object"?n:{},a={};switch(e){case"top":case"bottom":a.shiftX=t.arrowOffsetHorizontal*2+r,a.shiftY=!0,a.adjustY=!0;break;case"left":case"right":a.shiftY=t.arrowOffsetVertical*2+r,a.shiftX=!0,a.adjustX=!0;break}const i=Object.assign(Object.assign({},a),o);return i.shiftX||(i.adjustX=!0),i.shiftY||(i.adjustY=!0),i}const C0={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"]}},a4={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"]}},i4=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function vx(e){const{arrowWidth:t,autoAdjustOverflow:r,arrowPointAtCenter:n,offset:o,borderRadius:a,visibleFirst:i}=e,l=t/2,s={},u=am({contentRadius:a,limitVerticalRadius:!0});return Object.keys(C0).forEach(c=>{const f=n&&a4[c]||C0[c],p=Object.assign(Object.assign({},f),{offset:[0,0],dynamicInset:!0});switch(s[c]=p,i4.has(c)&&(p.autoArrow=!1),c){case"top":case"topLeft":case"topRight":p.offset[1]=-l-o;break;case"bottom":case"bottomLeft":case"bottomRight":p.offset[1]=l+o;break;case"left":case"leftTop":case"leftBottom":p.offset[0]=-l-o;break;case"right":case"rightTop":case"rightBottom":p.offset[0]=l+o;break}if(n)switch(c){case"topLeft":case"bottomLeft":p.offset[0]=-u.arrowOffsetHorizontal-l;break;case"topRight":case"bottomRight":p.offset[0]=u.arrowOffsetHorizontal+l;break;case"leftTop":case"rightTop":p.offset[1]=-u.arrowOffsetHorizontal*2+l;break;case"leftBottom":case"rightBottom":p.offset[1]=u.arrowOffsetHorizontal*2-l;break}p.overflow=o4(c,u,t,r),i&&(p.htmlRegion="visibleFirst")}),s}const l4=e=>{const{calc:t,componentCls:r,tooltipMaxWidth:n,tooltipColor:o,tooltipBg:a,tooltipBorderRadius:i,zIndexPopup:l,controlHeight:s,boxShadowSecondary:u,paddingSM:c,paddingXS:f,arrowOffsetHorizontal:p,sizePopupArrow:h}=e,v=t(i).add(h).add(p).equal(),g=t(i).mul(2).add(h).equal();return[{[r]:Object.assign(Object.assign(Object.assign(Object.assign({},Br(e)),{position:"absolute",zIndex:l,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":a,[`${r}-inner`]:{minWidth:g,minHeight:s,padding:`${se(e.calc(c).div(2).equal())} ${se(f)}`,color:`var(--ant-tooltip-color, ${o})`,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:a,borderRadius:i,boxShadow:u,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:v},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${r}-inner`]:{borderRadius:e.min(i,hx)}},[`${r}-content`]:{position:"relative"}}),kF(e,(m,{darkColor:b})=>({[`&${r}-${m}`]:{[`${r}-inner`]:{backgroundColor:b},[`${r}-arrow`]:{"--antd-arrow-background-color":b}}}))),{"&-rtl":{direction:"rtl"}})},gx(e,"var(--antd-arrow-background-color)"),{[`${r}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},s4=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},am({contentRadius:e.borderRadius,limitVerticalRadius:!0})),mx(er(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),bx=(e,t=!0)=>Hr("Tooltip",r=>{const{borderRadius:n,colorTextLightSolid:o,colorBgSpotlight:a}=r,i=er(r,{tooltipMaxWidth:250,tooltipColor:o,tooltipBorderRadius:n,tooltipBg:a});return[l4(i),Yp(r,"zoom-big-fast")]},s4,{resetStyle:!1,injectStyle:t})(e),u4=na.map(e=>`${e}-inverse`);function c4(e,t=!0){return t?[].concat(Pe(u4),Pe(na)).includes(e):na.includes(e)}function yx(e,t){const r=c4(t),n=de({[`${e}-${t}`]:t&&r}),o={},a={},i=X5(t).toRgb(),l=(.299*i.r+.587*i.g+.114*i.b)/255<.5?"#FFF":"#000";return t&&!r&&(o.background=t,o["--ant-tooltip-color"]=l,a["--antd-arrow-background-color"]=t),{className:n,overlayStyle:o,arrowStyle:a}}const d4=e=>{const{prefixCls:t,className:r,placement:n="top",title:o,color:a,overlayInnerStyle:i}=e,{getPrefixCls:l}=d.useContext(Zt),s=l("tooltip",t),[u,c,f]=bx(s),p=yx(s,a),h=p.arrowStyle,v=Object.assign(Object.assign({},i),p.overlayStyle),g=de(c,f,s,`${s}-pure`,`${s}-placement-${n}`,r,p.className);return u(d.createElement("div",{className:g,style:h},d.createElement("div",{className:`${s}-arrow`}),d.createElement(px,Object.assign({},e,{className:c,prefixCls:s,overlayInnerStyle:v}),o)))};var f4=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const p4=d.forwardRef((e,t)=>{var r,n;const{prefixCls:o,openClassName:a,getTooltipContainer:i,color:l,overlayInnerStyle:s,children:u,afterOpenChange:c,afterVisibleChange:f,destroyTooltipOnHide:p,destroyOnHidden:h,arrow:v=!0,title:g,overlay:m,builtinPlacements:b,arrowPointAtCenter:y=!1,autoAdjustOverflow:C=!0,motion:D,getPopupContainer:w,placement:k="top",mouseEnterDelay:E=.1,mouseLeaveDelay:x=.1,overlayStyle:F,rootClassName:j,overlayClassName:$,styles:P,classNames:A}=e,O=f4(e,["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"]),S=!!v,[,B]=Yr(),{getPopupContainer:R,getPrefixCls:N,direction:T,className:L,style:X,classNames:_,styles:q}=Io("tooltip"),Q=oi(),te=d.useRef(null),z=()=>{var Se;(Se=te.current)===null||Se===void 0||Se.forceAlign()};d.useImperativeHandle(t,()=>{var Se,qe;return{forceAlign:z,forcePopupAlign:()=>{Q.deprecated(!1,"forcePopupAlign","forceAlign"),z()},nativeElement:(Se=te.current)===null||Se===void 0?void 0:Se.nativeElement,popupElement:(qe=te.current)===null||qe===void 0?void 0:qe.popupElement}});const[Y,V]=Ur(!1,{value:(r=e.open)!==null&&r!==void 0?r:e.visible,defaultValue:(n=e.defaultOpen)!==null&&n!==void 0?n:e.defaultVisible}),G=!g&&!m&&g!==0,K=Se=>{var qe,Ye;V(G?!1:Se),G||((qe=e.onOpenChange)===null||qe===void 0||qe.call(e,Se),(Ye=e.onVisibleChange)===null||Ye===void 0||Ye.call(e,Se))},W=d.useMemo(()=>{var Se,qe;let Ye=y;return typeof v=="object"&&(Ye=(qe=(Se=v.pointAtCenter)!==null&&Se!==void 0?Se:v.arrowPointAtCenter)!==null&&qe!==void 0?qe:y),b||vx({arrowPointAtCenter:Ye,autoAdjustOverflow:C,arrowWidth:S?B.sizePopupArrow:0,borderRadius:B.borderRadius,offset:B.marginXXS,visibleFirst:!0})},[y,v,b,B]),re=d.useMemo(()=>g===0?g:m||g||"",[m,g]),U=d.createElement(dl,{space:!0},typeof re=="function"?re():re),J=N("tooltip",o),ne=N(),ue=e["data-popover-inject"];let me=Y;!("open"in e)&&!("visible"in e)&&G&&(me=!1);const Ce=d.isValidElement(u)&&!gC(u)?u:d.createElement("span",null,u),Ne=Ce.props,pe=!Ne.className||typeof Ne.className=="string"?de(Ne.className,a||`${J}-open`):Ne.className,[he,ve,be]=bx(J,!ue),ye=yx(J,l),Ae=ye.arrowStyle,we=de($,{[`${J}-rtl`]:T==="rtl"},ye.className,j,ve,be,L,_.root,A==null?void 0:A.root),He=de(_.body,A==null?void 0:A.body),[Me,Fe]=yu("Tooltip",O.zIndex),ge=d.createElement(r4,Object.assign({},O,{zIndex:Me,showArrow:S,placement:k,mouseEnterDelay:E,mouseLeaveDelay:x,prefixCls:J,classNames:{root:we,body:He},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ae),q.root),X),F),P==null?void 0:P.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},q.body),s),P==null?void 0:P.body),ye.overlayStyle)},getTooltipContainer:w||i||R,ref:te,builtinPlacements:W,overlay:U,visible:me,onVisibleChange:K,afterVisibleChange:c??f,arrowContent:d.createElement("span",{className:`${J}-arrow-content`}),motion:{motionName:xC(ne,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:h??!!p}),me?eo(Ce,{className:pe}):Ce);return he(d.createElement(Hp.Provider,{value:Fe},ge))}),pl=p4;pl._InternalPanelDoNotUseOrYouWillBeFired=d4;var m4={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"},h4=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:m4}))},Rf=d.forwardRef(h4),g4=ot.ESC,v4=ot.TAB;function b4(e){var t=e.visible,r=e.triggerRef,n=e.onVisibleChange,o=e.autoFocus,a=e.overlayRef,i=d.useRef(!1),l=function(){if(t){var c,f;(c=r.current)===null||c===void 0||(f=c.focus)===null||f===void 0||f.call(c),n==null||n(!1)}},s=function(){var c;return(c=a.current)!==null&&c!==void 0&&c.focus?(a.current.focus(),i.current=!0,!0):!1},u=function(c){switch(c.keyCode){case g4:l();break;case v4:{var f=!1;i.current||(f=s()),f?c.preventDefault():l();break}}};d.useEffect(function(){return t?(window.addEventListener("keydown",u),o&&qt(s,3),function(){window.removeEventListener("keydown",u),i.current=!1}):function(){i.current=!1}},[t])}var y4=dn(function(e,t){var r=e.overlay,n=e.arrow,o=e.prefixCls,a=Et(function(){var l;return typeof r=="function"?l=r():l=r,l},[r]),i=ro(t,ua(a));return ee.createElement(ee.Fragment,null,n&&ee.createElement("div",{className:"".concat(o,"-arrow")}),ee.cloneElement(a,{ref:Zn(a)?i:void 0}))}),wa={adjustX:1,adjustY:1},Ea=[0,0],C4={topLeft:{points:["bl","tl"],overflow:wa,offset:[0,-4],targetOffset:Ea},top:{points:["bc","tc"],overflow:wa,offset:[0,-4],targetOffset:Ea},topRight:{points:["br","tr"],overflow:wa,offset:[0,-4],targetOffset:Ea},bottomLeft:{points:["tl","bl"],overflow:wa,offset:[0,4],targetOffset:Ea},bottom:{points:["tc","bc"],overflow:wa,offset:[0,4],targetOffset:Ea},bottomRight:{points:["tr","br"],overflow:wa,offset:[0,4],targetOffset:Ea}},x4=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function w4(e,t){var r,n=e.arrow,o=n===void 0?!1:n,a=e.prefixCls,i=a===void 0?"rc-dropdown":a,l=e.transitionName,s=e.animation,u=e.align,c=e.placement,f=c===void 0?"bottomLeft":c,p=e.placements,h=p===void 0?C4:p,v=e.getPopupContainer,g=e.showAction,m=e.hideAction,b=e.overlayClassName,y=e.overlayStyle,C=e.visible,D=e.trigger,w=D===void 0?["hover"]:D,k=e.autoFocus,E=e.overlay,x=e.children,F=e.onVisibleChange,j=Ct(e,x4),$=ee.useState(),P=ce($,2),A=P[0],O=P[1],S="visible"in e?C:A,B=ee.useRef(null),R=ee.useRef(null),N=ee.useRef(null);ee.useImperativeHandle(t,function(){return B.current});var T=function(Y){O(Y),F==null||F(Y)};b4({visible:S,triggerRef:N,onVisibleChange:T,autoFocus:k,overlayRef:R});var L=function(Y){var V=e.onOverlayClick;O(!1),V&&V(Y)},X=function(){return ee.createElement(y4,{ref:R,overlay:E,prefixCls:i,arrow:o})},_=function(){return typeof E=="function"?X:X()},q=function(){var Y=e.minOverlayWidthMatchTrigger,V=e.alignPoint;return"minOverlayWidthMatchTrigger"in e?Y:!V},Q=function(){var Y=e.openClassName;return Y!==void 0?Y:"".concat(i,"-open")},te=ee.cloneElement(x,{className:de((r=x.props)===null||r===void 0?void 0:r.className,S&&Q()),ref:Zn(x)?ro(N,ua(x)):void 0}),z=m;return!z&&w.indexOf("contextMenu")!==-1&&(z=["click"]),ee.createElement(Nu,Te({builtinPlacements:h},j,{prefixCls:i,ref:B,popupClassName:de(b,M({},"".concat(i,"-show-arrow"),o)),popupStyle:y,action:w,showAction:g,hideAction:z,popupPlacement:f,popupAlign:u,popupTransitionName:l,popupAnimation:s,popupVisible:S,stretch:q()?"minWidth":"",popup:_(),onPopupVisibleChange:T,onPopupClick:L,getPopupContainer:v}),te)}const E4=ee.forwardRef(w4),k4=e=>typeof e!="object"&&typeof e!="function"||e===null;var Cx=d.createContext(null);function xx(e,t){return e===void 0?null:"".concat(e,"-").concat(t)}function wx(e){var t=d.useContext(Cx);return xx(t,e)}var D4=["children","locked"],Hn=d.createContext(null);function S4(e,t){var r=H({},e);return Object.keys(t).forEach(function(n){var o=t[n];o!==void 0&&(r[n]=o)}),r}function ml(e){var t=e.children,r=e.locked,n=Ct(e,D4),o=d.useContext(Hn),a=la(function(){return S4(o,n)},[o,n],function(i,l){return!r&&(i[0]!==l[0]||!Jn(i[1],l[1],!0))});return d.createElement(Hn.Provider,{value:a},t)}var $4=[],Ex=d.createContext(null);function ju(){return d.useContext(Ex)}var kx=d.createContext($4);function si(e){var t=d.useContext(kx);return d.useMemo(function(){return e!==void 0?[].concat(Pe(t),[e]):t},[t,e])}var Dx=d.createContext(null),im=d.createContext({});function x0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(xu(e)){var r=e.nodeName.toLowerCase(),n=["input","select","textarea","button"].includes(r)||e.isContentEditable||r==="a"&&!!e.getAttribute("href"),o=e.getAttribute("tabindex"),a=Number(o),i=null;return o&&!Number.isNaN(a)?i=a:n&&i===null&&(i=0),n&&e.disabled&&(i=null),i!==null&&(i>=0||t&&i<0)}return!1}function B4(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=Pe(e.querySelectorAll("*")).filter(function(n){return x0(n,t)});return x0(e,t)&&r.unshift(e),r}var If=ot.LEFT,Tf=ot.RIGHT,Mf=ot.UP,vs=ot.DOWN,bs=ot.ENTER,Sx=ot.ESC,wi=ot.HOME,Ei=ot.END,w0=[Mf,vs,If,Tf];function O4(e,t,r,n){var o,a="prev",i="next",l="children",s="parent";if(e==="inline"&&n===bs)return{inlineTrigger:!0};var u=M(M({},Mf,a),vs,i),c=M(M(M(M({},If,r?i:a),Tf,r?a:i),vs,l),bs,l),f=M(M(M(M(M(M({},Mf,a),vs,i),bs,l),Sx,s),If,r?l:s),Tf,r?s:l),p={inline:u,horizontal:c,vertical:f,inlineSub:u,horizontalSub:f,verticalSub:f},h=(o=p["".concat(e).concat(t?"":"Sub")])===null||o===void 0?void 0:o[n];switch(h){case a:return{offset:-1,sibling:!0};case i:return{offset:1,sibling:!0};case s:return{offset:-1,sibling:!1};case l:return{offset:1,sibling:!1};default:return null}}function A4(e){for(var t=e;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function F4(e,t){for(var r=e||document.activeElement;r;){if(t.has(r))return r;r=r.parentElement}return null}function lm(e,t){var r=B4(e,!0);return r.filter(function(n){return t.has(n)})}function E0(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!e)return null;var o=lm(e,t),a=o.length,i=o.findIndex(function(l){return r===l});return n<0?i===-1?i=a-1:i-=1:n>0&&(i+=1),i=(i+a)%a,o[i]}var zf=function(e,t){var r=new Set,n=new Map,o=new Map;return e.forEach(function(a){var i=document.querySelector("[data-menu-id='".concat(xx(t,a),"']"));i&&(r.add(i),o.set(i,a),n.set(a,i))}),{elements:r,key2element:n,element2key:o}};function N4(e,t,r,n,o,a,i,l,s,u){var c=d.useRef(),f=d.useRef();f.current=t;var p=function(){qt.cancel(c.current)};return d.useEffect(function(){return function(){p()}},[]),function(h){var v=h.which;if([].concat(w0,[bs,Sx,wi,Ei]).includes(v)){var g=a(),m=zf(g,n),b=m,y=b.elements,C=b.key2element,D=b.element2key,w=C.get(t),k=F4(w,y),E=D.get(k),x=O4(e,i(E,!0).length===1,r,v);if(!x&&v!==wi&&v!==Ei)return;(w0.includes(v)||[wi,Ei].includes(v))&&h.preventDefault();var F=function(B){if(B){var R=B,N=B.querySelector("a");N!=null&&N.getAttribute("href")&&(R=N);var T=D.get(B);l(T),p(),c.current=qt(function(){f.current===T&&R.focus()})}};if([wi,Ei].includes(v)||x.sibling||!k){var j;!k||e==="inline"?j=o.current:j=A4(k);var $,P=lm(j,y);v===wi?$=P[0]:v===Ei?$=P[P.length-1]:$=E0(j,y,k,x.offset),F($)}else if(x.inlineTrigger)s(E);else if(x.offset>0)s(E,!0),p(),c.current=qt(function(){m=zf(g,n);var B=k.getAttribute("aria-controls"),R=document.getElementById(B),N=E0(R,m.elements);F(N)},5);else if(x.offset<0){var A=i(E,!0),O=A[A.length-2],S=C.get(O);s(O,!1),F(S)}}u==null||u(h)}}function P4(e){Promise.resolve().then(e)}var sm="__RC_UTIL_PATH_SPLIT__",k0=function(e){return e.join(sm)},j4=function(e){return e.split(sm)},Lf="rc-menu-more";function R4(){var e=d.useState({}),t=ce(e,2),r=t[1],n=Ve(new Map),o=Ve(new Map),a=d.useState([]),i=ce(a,2),l=i[0],s=i[1],u=Ve(0),c=Ve(!1),f=function(){c.current||r({})},p=gt(function(C,D){var w=k0(D);o.current.set(w,C),n.current.set(C,w),u.current+=1;var k=u.current;P4(function(){k===u.current&&f()})},[]),h=gt(function(C,D){var w=k0(D);o.current.delete(w),n.current.delete(C)},[]),v=gt(function(C){s(C)},[]),g=gt(function(C,D){var w=n.current.get(C)||"",k=j4(w);return D&&l.includes(k[0])&&k.unshift(Lf),k},[l]),m=gt(function(C,D){return C.filter(function(w){return w!==void 0}).some(function(w){var k=g(w,!0);return k.includes(D)})},[g]),b=function(){var C=Pe(n.current.keys());return l.length&&C.push(Lf),C},y=gt(function(C){var D="".concat(n.current.get(C)).concat(sm),w=new Set;return Pe(o.current.keys()).forEach(function(k){k.startsWith(D)&&w.add(o.current.get(k))}),w},[]);return d.useEffect(function(){return function(){c.current=!0}},[]),{registerPath:p,unregisterPath:h,refreshOverflowKeys:v,isSubPathKey:m,getKeyPath:g,getKeys:b,getSubPathKeys:y}}function Oi(e){var t=d.useRef(e);t.current=e;var r=d.useCallback(function(){for(var n,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(n=t.current)===null||n===void 0?void 0:n.call.apply(n,[t].concat(a))},[]);return e?r:void 0}var I4=Math.random().toFixed(5).toString().slice(2),D0=0;function T4(e){var t=Ur(e,{value:e}),r=ce(t,2),n=r[0],o=r[1];return d.useEffect(function(){D0+=1;var a="".concat(I4,"-").concat(D0);o("rc-menu-uuid-".concat(a))},[]),n}function $x(e,t,r,n){var o=d.useContext(Hn),a=o.activeKey,i=o.onActive,l=o.onInactive,s={active:a===e};return t||(s.onMouseEnter=function(u){r==null||r({key:e,domEvent:u}),i(e)},s.onMouseLeave=function(u){n==null||n({key:e,domEvent:u}),l(e)}),s}function Bx(e){var t=d.useContext(Hn),r=t.mode,n=t.rtl,o=t.inlineIndent;if(r!=="inline")return null;var a=e;return n?{paddingRight:a*o}:{paddingLeft:a*o}}function Ox(e){var t=e.icon,r=e.props,n=e.children,o;return t===null||t===!1?null:(typeof t=="function"?o=d.createElement(t,H({},r)):typeof t!="boolean"&&(o=t),o||n||null)}var M4=["item"];function Vs(e){var t=e.item,r=Ct(e,M4);return Object.defineProperty(r,"item",{get:function(){return lr(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),t}}),r}var z4=["title","attribute","elementRef"],L4=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],_4=["active"],H4=(function(e){no(r,e);var t=oo(r);function r(){return vr(this,r),t.apply(this,arguments)}return br(r,[{key:"render",value:function(){var n=this.props,o=n.title,a=n.attribute,i=n.elementRef,l=Ct(n,z4),s=fn(l,["eventKey","popupClassName","popupOffset","onTitleClick"]);return lr(!a,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),d.createElement(Yn.Item,Te({},a,{title:typeof o=="string"?o:void 0},s,{ref:i}))}}]),r})(d.Component),W4=d.forwardRef(function(e,t){var r=e.style,n=e.className,o=e.eventKey;e.warnKey;var a=e.disabled,i=e.itemIcon,l=e.children,s=e.role,u=e.onMouseEnter,c=e.onMouseLeave,f=e.onClick,p=e.onKeyDown,h=e.onFocus,v=Ct(e,L4),g=wx(o),m=d.useContext(Hn),b=m.prefixCls,y=m.onItemClick,C=m.disabled,D=m.overflowDisabled,w=m.itemIcon,k=m.selectedKeys,E=m.onActive,x=d.useContext(im),F=x._internalRenderMenuItem,j="".concat(b,"-item"),$=d.useRef(),P=d.useRef(),A=C||a,O=sa(t,P),S=si(o),B=function(V){return{key:o,keyPath:Pe(S).reverse(),item:$.current,domEvent:V}},R=i||w,N=$x(o,A,u,c),T=N.active,L=Ct(N,_4),X=k.includes(o),_=Bx(S.length),q=function(V){if(!A){var G=B(V);f==null||f(Vs(G)),y(G)}},Q=function(V){if(p==null||p(V),V.which===ot.ENTER){var G=B(V);f==null||f(Vs(G)),y(G)}},te=function(V){E(o),h==null||h(V)},z={};e.role==="option"&&(z["aria-selected"]=X);var Y=d.createElement(H4,Te({ref:$,elementRef:O,role:s===null?"none":s||"menuitem",tabIndex:a?null:-1,"data-menu-id":D&&g?null:g},fn(v,["extra"]),L,z,{component:"li","aria-disabled":a,style:H(H({},_),r),className:de(j,M(M(M({},"".concat(j,"-active"),T),"".concat(j,"-selected"),X),"".concat(j,"-disabled"),A),n),onClick:q,onKeyDown:Q,onFocus:te}),l,d.createElement(Ox,{props:H(H({},e),{},{isSelected:X}),icon:R}));return F&&(Y=F(Y,e,{selected:X})),Y});function K4(e,t){var r=e.eventKey,n=ju(),o=si(r);return d.useEffect(function(){if(n)return n.registerPath(r,o),function(){n.unregisterPath(r,o)}},[o]),n?null:d.createElement(W4,Te({},e,{ref:t}))}const Ru=d.forwardRef(K4);var q4=["className","children"],V4=function(e,t){var r=e.className,n=e.children,o=Ct(e,q4),a=d.useContext(Hn),i=a.prefixCls,l=a.mode,s=a.rtl;return d.createElement("ul",Te({className:de(i,s&&"".concat(i,"-rtl"),"".concat(i,"-sub"),"".concat(i,"-").concat(l==="inline"?"inline":"vertical"),r),role:"menu"},o,{"data-menu-list":!0,ref:t}),n)},um=d.forwardRef(V4);um.displayName="SubMenuList";function cm(e,t){return _n(e).map(function(r,n){if(d.isValidElement(r)){var o,a,i=r.key,l=(o=(a=r.props)===null||a===void 0?void 0:a.eventKey)!==null&&o!==void 0?o:i,s=l==null;s&&(l="tmp_key-".concat([].concat(Pe(t),[n]).join("-")));var u={key:l,eventKey:l};return d.cloneElement(r,u)}return r})}var qr={adjustX:1,adjustY:1},U4={topLeft:{points:["bl","tl"],overflow:qr},topRight:{points:["br","tr"],overflow:qr},bottomLeft:{points:["tl","bl"],overflow:qr},bottomRight:{points:["tr","br"],overflow:qr},leftTop:{points:["tr","tl"],overflow:qr},leftBottom:{points:["br","bl"],overflow:qr},rightTop:{points:["tl","tr"],overflow:qr},rightBottom:{points:["bl","br"],overflow:qr}},X4={topLeft:{points:["bl","tl"],overflow:qr},topRight:{points:["br","tr"],overflow:qr},bottomLeft:{points:["tl","bl"],overflow:qr},bottomRight:{points:["tr","br"],overflow:qr},rightTop:{points:["tr","tl"],overflow:qr},rightBottom:{points:["br","bl"],overflow:qr},leftTop:{points:["tl","tr"],overflow:qr},leftBottom:{points:["bl","br"],overflow:qr}};function Ax(e,t,r){if(t)return t;if(r)return r[e]||r.other}var G4={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function Y4(e){var t=e.prefixCls,r=e.visible,n=e.children,o=e.popup,a=e.popupStyle,i=e.popupClassName,l=e.popupOffset,s=e.disabled,u=e.mode,c=e.onVisibleChange,f=d.useContext(Hn),p=f.getPopupContainer,h=f.rtl,v=f.subMenuOpenDelay,g=f.subMenuCloseDelay,m=f.builtinPlacements,b=f.triggerSubMenuAction,y=f.forceSubMenuRender,C=f.rootClassName,D=f.motion,w=f.defaultMotions,k=d.useState(!1),E=ce(k,2),x=E[0],F=E[1],j=H(h?H({},X4):H({},U4),m),$=G4[u],P=Ax(u,D,w),A=d.useRef(P);u!=="inline"&&(A.current=P);var O=H(H({},A.current),{},{leavedClassName:"".concat(t,"-hidden"),removeOnLeave:!1,motionAppear:!0}),S=d.useRef();return d.useEffect(function(){return S.current=qt(function(){F(r)}),function(){qt.cancel(S.current)}},[r]),d.createElement(Nu,{prefixCls:t,popupClassName:de("".concat(t,"-popup"),M({},"".concat(t,"-rtl"),h),i,C),stretch:u==="horizontal"?"minWidth":null,getPopupContainer:p,builtinPlacements:j,popupPlacement:$,popupVisible:x,popup:o,popupStyle:a,popupAlign:l&&{offset:l},action:s?[]:[b],mouseEnterDelay:v,mouseLeaveDelay:g,onPopupVisibleChange:c,forceRender:y,popupMotion:O,fresh:!0},n)}function Z4(e){var t=e.id,r=e.open,n=e.keyPath,o=e.children,a="inline",i=d.useContext(Hn),l=i.prefixCls,s=i.forceSubMenuRender,u=i.motion,c=i.defaultMotions,f=i.mode,p=d.useRef(!1);p.current=f===a;var h=d.useState(!p.current),v=ce(h,2),g=v[0],m=v[1],b=p.current?r:!1;d.useEffect(function(){p.current&&m(!1)},[f]);var y=H({},Ax(a,u,c));n.length>1&&(y.motionAppear=!1);var C=y.onVisibleChanged;return y.onVisibleChanged=function(D){return!p.current&&!D&&m(!0),C==null?void 0:C(D)},g?null:d.createElement(ml,{mode:a,locked:!p.current},d.createElement(ca,Te({visible:b},y,{forceRender:s,removeOnLeave:!1,leavedClassName:"".concat(l,"-hidden")}),function(D){var w=D.className,k=D.style;return d.createElement(um,{id:t,className:w,style:k},o)}))}var J4=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Q4=["active"],eR=d.forwardRef(function(e,t){var r=e.style,n=e.className,o=e.title,a=e.eventKey;e.warnKey;var i=e.disabled,l=e.internalPopupClose,s=e.children,u=e.itemIcon,c=e.expandIcon,f=e.popupClassName,p=e.popupOffset,h=e.popupStyle,v=e.onClick,g=e.onMouseEnter,m=e.onMouseLeave,b=e.onTitleClick,y=e.onTitleMouseEnter,C=e.onTitleMouseLeave,D=Ct(e,J4),w=wx(a),k=d.useContext(Hn),E=k.prefixCls,x=k.mode,F=k.openKeys,j=k.disabled,$=k.overflowDisabled,P=k.activeKey,A=k.selectedKeys,O=k.itemIcon,S=k.expandIcon,B=k.onItemClick,R=k.onOpenChange,N=k.onActive,T=d.useContext(im),L=T._internalRenderSubMenuItem,X=d.useContext(Dx),_=X.isSubPathKey,q=si(),Q="".concat(E,"-submenu"),te=j||i,z=d.useRef(),Y=d.useRef(),V=u??O,G=c??S,K=F.includes(a),W=!$&&K,re=_(A,a),U=$x(a,te,y,C),J=U.active,ne=Ct(U,Q4),ue=d.useState(!1),me=ce(ue,2),Ce=me[0],Ne=me[1],pe=function(Re){te||Ne(Re)},he=function(Re){pe(!0),g==null||g({key:a,domEvent:Re})},ve=function(Re){pe(!1),m==null||m({key:a,domEvent:Re})},be=d.useMemo(function(){return J||(x!=="inline"?Ce||_([P],a):!1)},[x,J,P,Ce,a,_]),ye=Bx(q.length),Ae=function(Re){te||(b==null||b({key:a,domEvent:Re}),x==="inline"&&R(a,!K))},we=Oi(function(Re){v==null||v(Vs(Re)),B(Re)}),He=function(Re){x!=="inline"&&R(a,Re)},Me=function(){N(a)},Fe=w&&"".concat(w,"-popup"),ge=d.useMemo(function(){return d.createElement(Ox,{icon:x!=="horizontal"?G:void 0,props:H(H({},e),{},{isOpen:W,isSubMenu:!0})},d.createElement("i",{className:"".concat(Q,"-arrow")}))},[x,G,e,W,Q]),Se=d.createElement("div",Te({role:"menuitem",style:ye,className:"".concat(Q,"-title"),tabIndex:te?null:-1,ref:z,title:typeof o=="string"?o:null,"data-menu-id":$&&w?null:w,"aria-expanded":W,"aria-haspopup":!0,"aria-controls":Fe,"aria-disabled":te,onClick:Ae,onFocus:Me},ne),o,ge),qe=d.useRef(x);if(x!=="inline"&&q.length>1?qe.current="vertical":qe.current=x,!$){var Ye=qe.current;Se=d.createElement(Y4,{mode:Ye,prefixCls:Q,visible:!l&&W&&x!=="inline",popupClassName:f,popupOffset:p,popupStyle:h,popup:d.createElement(ml,{mode:Ye==="horizontal"?"vertical":Ye},d.createElement(um,{id:Fe,ref:Y},s)),disabled:te,onVisibleChange:He},Se)}var Xe=d.createElement(Yn.Item,Te({ref:t,role:"none"},D,{component:"li",style:r,className:de(Q,"".concat(Q,"-").concat(x),n,M(M(M(M({},"".concat(Q,"-open"),W),"".concat(Q,"-active"),be),"".concat(Q,"-selected"),re),"".concat(Q,"-disabled"),te)),onMouseEnter:he,onMouseLeave:ve}),Se,!$&&d.createElement(Z4,{id:Fe,open:W,keyPath:q},s));return L&&(Xe=L(Xe,e,{selected:re,active:be,open:W,disabled:te})),d.createElement(ml,{onItemClick:we,mode:x==="horizontal"?"vertical":x,itemIcon:V,expandIcon:G},Xe)}),Iu=d.forwardRef(function(e,t){var r=e.eventKey,n=e.children,o=si(r),a=cm(n,o),i=ju();d.useEffect(function(){if(i)return i.registerPath(r,o),function(){i.unregisterPath(r,o)}},[o]);var l;return i?l=a:l=d.createElement(eR,Te({ref:t},e),a),d.createElement(kx.Provider,{value:o},l)});function dm(e){var t=e.className,r=e.style,n=d.useContext(Hn),o=n.prefixCls,a=ju();return a?null:d.createElement("li",{role:"separator",className:de("".concat(o,"-item-divider"),t),style:r})}var tR=["className","title","eventKey","children"],rR=d.forwardRef(function(e,t){var r=e.className,n=e.title;e.eventKey;var o=e.children,a=Ct(e,tR),i=d.useContext(Hn),l=i.prefixCls,s="".concat(l,"-item-group");return d.createElement("li",Te({ref:t,role:"presentation"},a,{onClick:function(u){return u.stopPropagation()},className:de(s,r)}),d.createElement("div",{role:"presentation",className:"".concat(s,"-title"),title:typeof n=="string"?n:void 0},n),d.createElement("ul",{role:"group",className:"".concat(s,"-list")},o))}),fm=d.forwardRef(function(e,t){var r=e.eventKey,n=e.children,o=si(r),a=cm(n,o),i=ju();return i?a:d.createElement(rR,Te({ref:t},fn(e,["warnKey"])),a)}),nR=["label","children","key","type","extra"];function _f(e,t,r){var n=t.item,o=t.group,a=t.submenu,i=t.divider;return(e||[]).map(function(l,s){if(l&&ut(l)==="object"){var u=l,c=u.label,f=u.children,p=u.key,h=u.type,v=u.extra,g=Ct(u,nR),m=p??"tmp-".concat(s);return f||h==="group"?h==="group"?d.createElement(o,Te({key:m},g,{title:c}),_f(f,t,r)):d.createElement(a,Te({key:m},g,{title:c}),_f(f,t,r)):h==="divider"?d.createElement(i,Te({key:m},g)):d.createElement(n,Te({key:m},g,{extra:v}),c,(!!v||v===0)&&d.createElement("span",{className:"".concat(r,"-item-extra")},v))}return null}).filter(function(l){return l})}function S0(e,t,r,n,o){var a=e,i=H({divider:dm,item:Ru,group:fm,submenu:Iu},n);return t&&(a=_f(t,i,o)),cm(a,r)}var oR=["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"],Mo=[],aR=d.forwardRef(function(e,t){var r,n=e,o=n.prefixCls,a=o===void 0?"rc-menu":o,i=n.rootClassName,l=n.style,s=n.className,u=n.tabIndex,c=u===void 0?0:u,f=n.items,p=n.children,h=n.direction,v=n.id,g=n.mode,m=g===void 0?"vertical":g,b=n.inlineCollapsed,y=n.disabled,C=n.disabledOverflow,D=n.subMenuOpenDelay,w=D===void 0?.1:D,k=n.subMenuCloseDelay,E=k===void 0?.1:k,x=n.forceSubMenuRender,F=n.defaultOpenKeys,j=n.openKeys,$=n.activeKey,P=n.defaultActiveFirst,A=n.selectable,O=A===void 0?!0:A,S=n.multiple,B=S===void 0?!1:S,R=n.defaultSelectedKeys,N=n.selectedKeys,T=n.onSelect,L=n.onDeselect,X=n.inlineIndent,_=X===void 0?24:X,q=n.motion,Q=n.defaultMotions,te=n.triggerSubMenuAction,z=te===void 0?"hover":te,Y=n.builtinPlacements,V=n.itemIcon,G=n.expandIcon,K=n.overflowedIndicator,W=K===void 0?"...":K,re=n.overflowedIndicatorPopupClassName,U=n.getPopupContainer,J=n.onClick,ne=n.onOpenChange,ue=n.onKeyDown;n.openAnimation,n.openTransitionName;var me=n._internalRenderMenuItem,Ce=n._internalRenderSubMenuItem,Ne=n._internalComponents,pe=Ct(n,oR),he=d.useMemo(function(){return[S0(p,f,Mo,Ne,a),S0(p,f,Mo,{},a)]},[p,f,Ne]),ve=ce(he,2),be=ve[0],ye=ve[1],Ae=d.useState(!1),we=ce(Ae,2),He=we[0],Me=we[1],Fe=d.useRef(),ge=T4(v),Se=h==="rtl",qe=Ur(F,{value:j,postState:function(xt){return xt||Mo}}),Ye=ce(qe,2),Xe=Ye[0],Re=Ye[1],lt=function(xt){var Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function yt(){Re(xt),ne==null||ne(xt)}Qe?ud(yt):yt()},je=d.useState(Xe),at=ce(je,2),vt=at[0],At=at[1],fe=d.useRef(!1),Oe=d.useMemo(function(){return(m==="inline"||m==="vertical")&&b?["vertical",b]:[m,!1]},[m,b]),rt=ce(Oe,2),Ke=rt[0],ke=rt[1],Be=Ke==="inline",ie=d.useState(Ke),De=ce(ie,2),Z=De[0],le=De[1],ze=d.useState(ke),xe=ce(ze,2),_e=xe[0],We=xe[1];d.useEffect(function(){le(Ke),We(ke),fe.current&&(Be?Re(vt):lt(Mo))},[Ke,ke]);var Ge=d.useState(0),ft=ce(Ge,2),pt=ft[0],Ze=ft[1],Je=pt>=be.length-1||Z!=="horizontal"||C;d.useEffect(function(){Be&&At(Xe)},[Xe]),d.useEffect(function(){return fe.current=!0,function(){fe.current=!1}},[]);var it=R4(),mt=it.registerPath,Pt=it.unregisterPath,jt=it.refreshOverflowKeys,Rt=it.isSubPathKey,kt=it.getKeyPath,Jt=it.getKeys,pr=it.getSubPathKeys,Le=d.useMemo(function(){return{registerPath:mt,unregisterPath:Pt}},[mt,Pt]),et=d.useMemo(function(){return{isSubPathKey:Rt}},[Rt]);d.useEffect(function(){jt(Je?Mo:be.slice(pt+1).map(function(xt){return xt.key}))},[pt,Je]);var bt=Ur($||P&&((r=be[0])===null||r===void 0?void 0:r.key),{value:$}),Tt=ce(bt,2),Ft=Tt[0],yr=Tt[1],Cr=Oi(function(xt){yr(xt)}),dt=Oi(function(){yr(void 0)});ei(t,function(){return{list:Fe.current,focus:function(xt){var Qe,yt=Jt(),_t=zf(yt,ge),Lt=_t.elements,tr=_t.key2element,Dr=_t.element2key,mr=lm(Fe.current,Lt),Lr=Ft??(mr[0]?Dr.get(mr[0]):(Qe=be.find(function(wn){return!wn.props.disabled}))===null||Qe===void 0?void 0:Qe.key),xr=tr.get(Lr);if(Lr&&xr){var Ar;xr==null||(Ar=xr.focus)===null||Ar===void 0||Ar.call(xr,xt)}}}});var $t=Ur(R||[],{value:N,postState:function(xt){return Array.isArray(xt)?xt:xt==null?Mo:[xt]}}),Bt=ce($t,2),Ut=Bt[0],Tr=Bt[1],Zr=function(xt){if(O){var Qe=xt.key,yt=Ut.includes(Qe),_t;B?yt?_t=Ut.filter(function(tr){return tr!==Qe}):_t=[].concat(Pe(Ut),[Qe]):_t=[Qe],Tr(_t);var Lt=H(H({},xt),{},{selectedKeys:_t});yt?L==null||L(Lt):T==null||T(Lt)}!B&&Xe.length&&Z!=="inline"&<(Mo)},xn=Oi(function(xt){J==null||J(Vs(xt)),Zr(xt)}),on=Oi(function(xt,Qe){var yt=Xe.filter(function(Lt){return Lt!==xt});if(Qe)yt.push(xt);else if(Z!=="inline"){var _t=pr(xt);yt=yt.filter(function(Lt){return!_t.has(Lt)})}Jn(Xe,yt,!0)||lt(yt,!0)}),Mr=function(xt,Qe){var yt=Qe??!Xe.includes(xt);on(xt,yt)},an=N4(Z,Ft,Se,ge,Fe,Jt,kt,yr,Mr,ue);d.useEffect(function(){Me(!0)},[]);var Jr=d.useMemo(function(){return{_internalRenderMenuItem:me,_internalRenderSubMenuItem:Ce}},[me,Ce]),zr=Z!=="horizontal"||C?be:be.map(function(xt,Qe){return d.createElement(ml,{key:xt.key,overflowDisabled:Qe>pt},xt)}),ln=d.createElement(Yn,Te({id:v,ref:Fe,prefixCls:"".concat(a,"-overflow"),component:"ul",itemComponent:Ru,className:de(a,"".concat(a,"-root"),"".concat(a,"-").concat(Z),s,M(M({},"".concat(a,"-inline-collapsed"),_e),"".concat(a,"-rtl"),Se),i),dir:h,style:l,role:"menu",tabIndex:c,data:zr,renderRawItem:function(xt){return xt},renderRawRest:function(xt){var Qe=xt.length,yt=Qe?be.slice(-Qe):null;return d.createElement(Iu,{eventKey:Lf,title:W,disabled:Je,internalPopupClose:Qe===0,popupClassName:re},yt)},maxCount:Z!=="horizontal"||C?Yn.INVALIDATE:Yn.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(xt){Ze(xt)},onKeyDown:an},pe));return d.createElement(im.Provider,{value:Jr},d.createElement(Cx.Provider,{value:ge},d.createElement(ml,{prefixCls:a,rootClassName:i,mode:Z,openKeys:Xe,rtl:Se,disabled:y,motion:He?q:null,defaultMotions:He?Q:null,activeKey:Ft,onActive:Cr,onInactive:dt,selectedKeys:Ut,inlineIndent:_,subMenuOpenDelay:w,subMenuCloseDelay:E,forceSubMenuRender:x,builtinPlacements:Y,triggerSubMenuAction:z,getPopupContainer:U,itemIcon:V,expandIcon:G,onItemClick:xn,onOpenChange:on},d.createElement(Dx.Provider,{value:et},ln),d.createElement("div",{style:{display:"none"},"aria-hidden":!0},d.createElement(Ex.Provider,{value:Le},ye)))))}),Dl=aR;Dl.Item=Ru;Dl.SubMenu=Iu;Dl.ItemGroup=fm;Dl.Divider=dm;const iR=e=>{const{antCls:t,componentCls:r,colorText:n,footerBg:o,headerHeight:a,headerPadding:i,headerColor:l,footerPadding:s,fontSize:u,bodyBg:c,headerBg:f}=e;return{[r]:{display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:c,"&, *":{boxSizing:"border-box"},[`&${r}-has-sider`]:{flexDirection:"row",[`> ${r}, > ${r}-content`]:{width:0}},[`${r}-header, &${r}-footer`]:{flex:"0 0 auto"},"&-rtl":{direction:"rtl"}},[`${r}-header`]:{height:a,padding:i,color:l,lineHeight:se(a),background:f,[`${t}-menu`]:{lineHeight:"inherit"}},[`${r}-footer`]:{padding:s,color:n,fontSize:u,background:o},[`${r}-content`]:{flex:"auto",color:n,minHeight:0}}},Fx=e=>{const{colorBgLayout:t,controlHeight:r,controlHeightLG:n,colorText:o,controlHeightSM:a,marginXXS:i,colorTextLightSolid:l,colorBgContainer:s}=e,u=n*1.25;return{colorBgHeader:"#001529",colorBgBody:t,colorBgTrigger:"#002140",bodyBg:t,headerBg:"#001529",headerHeight:r*2,headerPadding:`0 ${u}px`,headerColor:o,footerPadding:`${a}px ${u}px`,footerBg:t,siderBg:"#001529",triggerHeight:n+i*2,triggerBg:"#002140",triggerColor:l,zeroTriggerWidth:n,zeroTriggerHeight:n,lightSiderBg:s,lightTriggerBg:s,lightTriggerColor:o}},Nx=[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]];Hr("Layout",iR,Fx,{deprecatedTokens:Nx});const lR=e=>{const{componentCls:t,siderBg:r,motionDurationMid:n,motionDurationSlow:o,antCls:a,triggerHeight:i,triggerColor:l,triggerBg:s,headerHeight:u,zeroTriggerWidth:c,zeroTriggerHeight:f,borderRadiusLG:p,lightSiderBg:h,lightTriggerColor:v,lightTriggerBg:g,bodyBg:m}=e;return{[t]:{position:"relative",minWidth:0,background:r,transition:`all ${n}, background 0s`,"&-has-trigger":{paddingBottom:i},"&-right":{order:1},[`${t}-children`]:{height:"100%",marginTop:-.1,paddingTop:.1,[`${a}-menu${a}-menu-inline-collapsed`]:{width:"auto"}},[`&-zero-width ${t}-children`]:{overflow:"hidden"},[`${t}-trigger`]:{position:"fixed",bottom:0,zIndex:1,height:i,color:l,lineHeight:se(i),textAlign:"center",background:s,cursor:"pointer",transition:`all ${n}`},[`${t}-zero-width-trigger`]:{position:"absolute",top:u,insetInlineEnd:e.calc(c).mul(-1).equal(),zIndex:1,width:c,height:f,color:l,fontSize:e.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:r,borderRadius:`0 ${se(p)} ${se(p)} 0`,cursor:"pointer",transition:`background ${o} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${o}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:e.calc(c).mul(-1).equal(),borderRadius:`${se(p)} 0 0 ${se(p)}`}},"&-light":{background:h,[`${t}-trigger`]:{color:v,background:g},[`${t}-zero-width-trigger`]:{color:v,background:g,border:`1px solid ${m}`,borderInlineStart:0}}}}};Hr(["Layout","Sider"],lR,Fx,{deprecatedTokens:Nx});const Px=d.createContext({});var sR={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"},uR=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:sR}))},jx=d.forwardRef(uR);const Us=Fn({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var cR=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const Rx=e=>{const{prefixCls:t,className:r,dashed:n}=e,o=cR(e,["prefixCls","className","dashed"]),{getPrefixCls:a}=d.useContext(Zt),i=a("menu",t),l=de({[`${i}-item-divider-dashed`]:!!n},r);return d.createElement(dm,Object.assign({className:l},o))},Ix=e=>{var t;const{className:r,children:n,icon:o,title:a,danger:i,extra:l}=e,{prefixCls:s,firstLevel:u,direction:c,disableMenuItemTitleTooltip:f,inlineCollapsed:p}=d.useContext(Us),h=C=>{const D=n==null?void 0:n[0],w=d.createElement("span",{className:de(`${s}-title-content`,{[`${s}-title-content-with-extra`]:!!l||l===0})},n);return(!o||d.isValidElement(n)&&n.type==="span")&&n&&C&&u&&typeof D=="string"?d.createElement("div",{className:`${s}-inline-collapsed-noicon`},D.charAt(0)):w},{siderCollapsed:v}=d.useContext(Px);let g=a;typeof a>"u"?g=u?n:"":a===!1&&(g="");const m={title:g};!v&&!p&&(m.title=null,m.open=!1);const b=_n(n).length;let y=d.createElement(Ru,Object.assign({},fn(e,["title","icon","danger"]),{className:de({[`${s}-item-danger`]:i,[`${s}-item-only-child`]:(o?b+1:b)===1},r),title:typeof a=="string"?a:void 0}),eo(o,{className:de(d.isValidElement(o)?(t=o.props)===null||t===void 0?void 0:t.className:void 0,`${s}-item-icon`)}),h(p));return f||(y=d.createElement(pl,Object.assign({},m,{placement:c==="rtl"?"left":"right",classNames:{root:`${s}-inline-collapsed-tooltip`}}),y)),y};var dR=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const Xs=d.createContext(null),Tx=d.forwardRef((e,t)=>{const{children:r}=e,n=dR(e,["children"]),o=d.useContext(Xs),a=d.useMemo(()=>Object.assign(Object.assign({},o),n),[o,n.prefixCls,n.mode,n.selectable,n.rootClassName]),i=qB(r),l=sa(t,i?ua(r):null);return d.createElement(Xs.Provider,{value:a},d.createElement(dl,{space:!0},i?d.cloneElement(r,{ref:l}):r))}),fR=e=>{const{componentCls:t,motionDurationSlow:r,horizontalLineHeight:n,colorSplit:o,lineWidth:a,lineType:i,itemPaddingInline:l}=e;return{[`${t}-horizontal`]:{lineHeight:n,border:0,borderBottom:`${se(a)} ${i} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:l},[`> ${t}-item:hover,
|
|
327
|
+
> ${t}-item-active,
|
|
328
|
+
> ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:[`border-color ${r}`,`background ${r}`].join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},pR=({componentCls:e,menuArrowOffset:t,calc:r})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical,
|
|
329
|
+
${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${se(r(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${se(t)})`}}}}),$0=e=>Po(e),B0=(e,t)=>{const{componentCls:r,itemColor:n,itemSelectedColor:o,subMenuItemSelectedColor:a,groupTitleColor:i,itemBg:l,subMenuItemBg:s,itemSelectedBg:u,activeBarHeight:c,activeBarWidth:f,activeBarBorderWidth:p,motionDurationSlow:h,motionEaseInOut:v,motionEaseOut:g,itemPaddingInline:m,motionDurationMid:b,itemHoverColor:y,lineType:C,colorSplit:D,itemDisabledColor:w,dangerItemColor:k,dangerItemHoverColor:E,dangerItemSelectedColor:x,dangerItemActiveBg:F,dangerItemSelectedBg:j,popupBg:$,itemHoverBg:P,itemActiveBg:A,menuSubMenuBg:O,horizontalItemSelectedColor:S,horizontalItemSelectedBg:B,horizontalItemBorderRadius:R,horizontalItemHoverBg:N}=e;return{[`${r}-${t}, ${r}-${t} > ${r}`]:{color:n,background:l,[`&${r}-root:focus-visible`]:Object.assign({},$0(e)),[`${r}-item`]:{"&-group-title, &-extra":{color:i}},[`${r}-submenu-selected > ${r}-submenu-title`]:{color:a},[`${r}-item, ${r}-submenu-title`]:{color:n,[`&:not(${r}-item-disabled):focus-visible`]:Object.assign({},$0(e))},[`${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:y}},[`&:not(${r}-horizontal)`]:{[`${r}-item:not(${r}-item-selected)`]:{"&:hover":{backgroundColor:P},"&:active":{backgroundColor:A}},[`${r}-submenu-title`]:{"&:hover":{backgroundColor:P},"&:active":{backgroundColor:A}}},[`${r}-item-danger`]:{color:k,[`&${r}-item:hover`]:{[`&:not(${r}-item-selected):not(${r}-submenu-selected)`]:{color:E}},[`&${r}-item:active`]:{background:F}},[`${r}-item a`]:{"&, &:hover":{color:"inherit"}},[`${r}-item-selected`]:{color:o,[`&${r}-item-danger`]:{color:x},"a, a:hover":{color:"inherit"}},[`& ${r}-item-selected`]:{backgroundColor:u,[`&${r}-item-danger`]:{backgroundColor:j}},[`&${r}-submenu > ${r}`]:{backgroundColor:O},[`&${r}-popup > ${r}`]:{backgroundColor:$},[`&${r}-submenu-popup > ${r}`]:{backgroundColor:$},[`&${r}-horizontal`]:Object.assign(Object.assign({},t==="dark"?{borderBottom:0}:{}),{[`> ${r}-item, > ${r}-submenu`]:{top:p,marginTop:e.calc(p).mul(-1).equal(),marginBottom:0,borderRadius:R,"&::after":{position:"absolute",insetInline:m,bottom:0,borderBottom:`${se(c)} solid transparent`,transition:`border-color ${h} ${v}`,content:'""'},"&:hover, &-active, &-open":{background:N,"&::after":{borderBottomWidth:c,borderBottomColor:S}},"&-selected":{color:S,backgroundColor:B,"&:hover":{backgroundColor:B},"&::after":{borderBottomWidth:c,borderBottomColor:S}}}}),[`&${r}-root`]:{[`&${r}-inline, &${r}-vertical`]:{borderInlineEnd:`${se(p)} ${C} ${D}`}},[`&${r}-inline`]:{[`${r}-sub${r}-inline`]:{background:s},[`${r}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${se(f)} solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${b} ${g}`,`opacity ${b} ${g}`].join(","),content:'""'},[`&${r}-item-danger`]:{"&::after":{borderInlineEndColor:x}}},[`${r}-selected, ${r}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${b} ${v}`,`opacity ${b} ${v}`].join(",")}}}}}},O0=e=>{const{componentCls:t,itemHeight:r,itemMarginInline:n,padding:o,menuArrowSize:a,marginXS:i,itemMarginBlock:l,itemWidth:s,itemPaddingInline:u}=e,c=e.calc(a).add(o).add(i).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:r,lineHeight:se(r),paddingInline:u,overflow:"hidden",textOverflow:"ellipsis",marginInline:n,marginBlock:l,width:s},[`> ${t}-item,
|
|
330
|
+
> ${t}-submenu > ${t}-submenu-title`]:{height:r,lineHeight:se(r)},[`${t}-item-group-list ${t}-submenu-title,
|
|
331
|
+
${t}-submenu-title`]:{paddingInlineEnd:c}}},mR=e=>{const{componentCls:t,iconCls:r,itemHeight:n,colorTextLightSolid:o,dropdownWidth:a,controlHeightLG:i,motionEaseOut:l,paddingXL:s,itemMarginInline:u,fontSizeLG:c,motionDurationFast:f,motionDurationSlow:p,paddingXS:h,boxShadowSecondary:v,collapsedWidth:g,collapsedIconSize:m}=e,b={height:n,lineHeight:se(n),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":Object.assign({[`&${t}-root`]:{boxShadow:"none"}},O0(e))},[`${t}-submenu-popup`]:{[`${t}-vertical`]:Object.assign(Object.assign({},O0(e)),{boxShadow:v})}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:a,maxHeight:`calc(100vh - ${se(e.calc(i).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${p}`,`background ${p}`,`padding ${f} ${l}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:b,[`& ${t}-item-group-title`]:{paddingInlineStart:s}},[`${t}-item`]:b}},{[`${t}-inline-collapsed`]:{width:g,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:c,textAlign:"center"}}},[`> ${t}-item,
|
|
332
|
+
> ${t}-item-group > ${t}-item-group-list > ${t}-item,
|
|
333
|
+
> ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title,
|
|
334
|
+
> ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${se(e.calc(m).div(2).equal())} - ${se(u)})`,textOverflow:"clip",[`
|
|
335
|
+
${t}-submenu-arrow,
|
|
336
|
+
${t}-submenu-expand-icon
|
|
337
|
+
`]:{opacity:0},[`${t}-item-icon, ${r}`]:{margin:0,fontSize:m,lineHeight:se(n),"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${r}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${r}`]:{display:"none"},"a, a:hover":{color:o}},[`${t}-item-group-title`]:Object.assign(Object.assign({},sl),{paddingInline:h})}}]},A0=e=>{const{componentCls:t,motionDurationSlow:r,motionDurationMid:n,motionEaseInOut:o,motionEaseOut:a,iconCls:i,iconSize:l,iconMarginInlineEnd:s}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${r}`,`background ${r}`,`padding calc(${r} + 0.1s) ${o}`].join(","),[`${t}-item-icon, ${i}`]:{minWidth:l,fontSize:l,transition:[`font-size ${n} ${a}`,`margin ${r} ${o}`,`color ${r}`].join(","),"+ span":{marginInlineStart:s,opacity:1,transition:[`opacity ${r} ${o}`,`margin ${r}`,`color ${r}`].join(",")}},[`${t}-item-icon`]:Object.assign({},Cl()),[`&${t}-item-only-child`]:{[`> ${i}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},F0=e=>{const{componentCls:t,motionDurationSlow:r,motionEaseInOut:n,borderRadius:o,menuArrowSize:a,menuArrowOffset:i}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:a,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${r} ${n}, opacity ${r}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(a).mul(.6).equal(),height:e.calc(a).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:o,transition:[`background ${r} ${n}`,`transform ${r} ${n}`,`top ${r} ${n}`,`color ${r} ${n}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${se(e.calc(i).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${se(i)})`}}}}},hR=e=>{const{antCls:t,componentCls:r,fontSize:n,motionDurationSlow:o,motionDurationMid:a,motionEaseInOut:i,paddingXS:l,padding:s,colorSplit:u,lineWidth:c,zIndexPopup:f,borderRadiusLG:p,subMenuItemBorderRadius:h,menuArrowSize:v,menuArrowOffset:g,lineType:m,groupTitleLineHeight:b,groupTitleFontSize:y}=e;return[{"":{[r]:Object.assign(Object.assign({},zs()),{"&-hidden":{display:"none"}})},[`${r}-submenu-hidden`]:{display:"none"}},{[r]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Br(e)),zs()),{marginBottom:0,paddingInlineStart:0,fontSize:n,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${o} 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:e.itemBorderRadius},[`${r}-item-group-title`]:{padding:`${se(l)} ${se(s)}`,fontSize:y,lineHeight:b,transition:`all ${o}`},[`&-horizontal ${r}-submenu`]:{transition:[`border-color ${o} ${i}`,`background ${o} ${i}`].join(",")},[`${r}-submenu, ${r}-submenu-inline`]:{transition:[`border-color ${o} ${i}`,`background ${o} ${i}`,`padding ${a} ${i}`].join(",")},[`${r}-submenu ${r}-sub`]:{cursor:"initial",transition:[`background ${o} ${i}`,`padding ${o} ${i}`].join(",")},[`${r}-title-content`]:{transition:`color ${o}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${t}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${r}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${r}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${r}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:u,borderStyle:m,borderWidth:0,borderTopWidth:c,marginBlock:c,padding:0,"&-dashed":{borderStyle:"dashed"}}}),A0(e)),{[`${r}-item-group`]:{[`${r}-item-group-list`]:{margin:0,padding:0,[`${r}-item, ${r}-submenu-title`]:{paddingInline:`${se(e.calc(n).mul(2).equal())} ${se(s)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:f,borderRadius:p,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:p},A0(e)),F0(e)),{[`${r}-item, ${r}-submenu > ${r}-submenu-title`]:{borderRadius:h},[`${r}-submenu-title::after`]:{transition:`transform ${o} ${i}`}})},"\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:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS}}}),F0(e)),{[`&-inline-collapsed ${r}-submenu-arrow,
|
|
338
|
+
&-inline ${r}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${se(g)})`},"&::after":{transform:`rotate(45deg) translateX(${se(e.calc(g).mul(-1).equal())})`}},[`${r}-submenu-open${r}-submenu-inline > ${r}-submenu-title > ${r}-submenu-arrow`]:{transform:`translateY(${se(e.calc(v).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${se(e.calc(g).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${se(g)})`}}})},{[`${t}-layout-header`]:{[r]:{lineHeight:"inherit"}}}]},gR=e=>{var t,r,n;const{colorPrimary:o,colorError:a,colorTextDisabled:i,colorErrorBg:l,colorText:s,colorTextDescription:u,colorBgContainer:c,colorFillAlter:f,colorFillContent:p,lineWidth:h,lineWidthBold:v,controlItemBgActive:g,colorBgTextHover:m,controlHeightLG:b,lineHeight:y,colorBgElevated:C,marginXXS:D,padding:w,fontSize:k,controlHeightSM:E,fontSizeLG:x,colorTextLightSolid:F,colorErrorHover:j}=e,$=(t=e.activeBarWidth)!==null&&t!==void 0?t:0,P=(r=e.activeBarBorderWidth)!==null&&r!==void 0?r:h,A=(n=e.itemMarginInline)!==null&&n!==void 0?n:e.marginXXS,O=new Ht(F).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:s,itemColor:s,colorItemTextHover:s,itemHoverColor:s,colorItemTextHoverHorizontal:o,horizontalItemHoverColor:o,colorGroupTitle:u,groupTitleColor:u,colorItemTextSelected:o,itemSelectedColor:o,subMenuItemSelectedColor:o,colorItemTextSelectedHorizontal:o,horizontalItemSelectedColor:o,colorItemBg:c,itemBg:c,colorItemBgHover:m,itemHoverBg:m,colorItemBgActive:p,itemActiveBg:g,colorSubItemBg:f,subMenuItemBg:f,colorItemBgSelected:g,itemSelectedBg:g,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:$,colorActiveBarHeight:v,activeBarHeight:v,colorActiveBarBorderSize:h,activeBarBorderWidth:P,colorItemTextDisabled:i,itemDisabledColor:i,colorDangerItemText:a,dangerItemColor:a,colorDangerItemTextHover:a,dangerItemHoverColor:a,colorDangerItemTextSelected:a,dangerItemSelectedColor:a,colorDangerItemBgActive:l,dangerItemActiveBg:l,colorDangerItemBgSelected:l,dangerItemSelectedBg:l,itemMarginInline:A,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:b,groupTitleLineHeight:y,collapsedWidth:b*2,popupBg:C,itemMarginBlock:D,itemPaddingInline:w,horizontalLineHeight:`${b*1.15}px`,iconSize:k,iconMarginInlineEnd:E-k,collapsedIconSize:x,groupTitleFontSize:k,darkItemDisabledColor:new Ht(F).setA(.25).toRgbString(),darkItemColor:O,darkDangerItemColor:a,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:F,darkItemSelectedBg:o,darkDangerItemSelectedBg:a,darkItemHoverBg:"transparent",darkGroupTitleColor:O,darkItemHoverColor:F,darkDangerItemHoverColor:j,darkDangerItemSelectedColor:F,darkDangerItemActiveBg:a,itemWidth:$?`calc(100% + ${P}px)`:`calc(100% - ${A*2}px)`}},vR=(e,t=e,r=!0)=>Hr("Menu",n=>{const{colorBgElevated:o,controlHeightLG:a,fontSize:i,darkItemColor:l,darkDangerItemColor:s,darkItemBg:u,darkSubMenuItemBg:c,darkItemSelectedColor:f,darkItemSelectedBg:p,darkDangerItemSelectedBg:h,darkItemHoverBg:v,darkGroupTitleColor:g,darkItemHoverColor:m,darkItemDisabledColor:b,darkDangerItemHoverColor:y,darkDangerItemSelectedColor:C,darkDangerItemActiveBg:D,popupBg:w,darkPopupBg:k}=n,E=n.calc(i).div(7).mul(5).equal(),x=er(n,{menuArrowSize:E,menuHorizontalHeight:n.calc(a).mul(1.15).equal(),menuArrowOffset:n.calc(E).mul(.25).equal(),menuSubMenuBg:o,calc:n.calc,popupBg:w}),F=er(x,{itemColor:l,itemHoverColor:m,groupTitleColor:g,itemSelectedColor:f,subMenuItemSelectedColor:f,itemBg:u,popupBg:k,subMenuItemBg:c,itemActiveBg:"transparent",itemSelectedBg:p,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:v,itemDisabledColor:b,dangerItemColor:s,dangerItemHoverColor:y,dangerItemSelectedColor:C,dangerItemActiveBg:D,dangerItemSelectedBg:h,menuSubMenuBg:c,horizontalItemSelectedColor:f,horizontalItemSelectedBg:p});return[hR(x),fR(x),mR(x),B0(x,"light"),B0(F,"dark"),pR(x),DC(x),Ga(x,"slide-up"),Ga(x,"slide-down"),Yp(x,"zoom-big")]},gR,{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}})(e,t),Mx=e=>{var t;const{popupClassName:r,icon:n,title:o,theme:a}=e,i=d.useContext(Us),{prefixCls:l,inlineCollapsed:s,theme:u}=i,c=si();let f;if(!n)f=s&&!c.length&&o&&typeof o=="string"?d.createElement("div",{className:`${l}-inline-collapsed-noicon`},o.charAt(0)):d.createElement("span",{className:`${l}-title-content`},o);else{const v=d.isValidElement(o)&&o.type==="span";f=d.createElement(d.Fragment,null,eo(n,{className:de(d.isValidElement(n)?(t=n.props)===null||t===void 0?void 0:t.className:void 0,`${l}-item-icon`)}),v?o:d.createElement("span",{className:`${l}-title-content`},o))}const p=d.useMemo(()=>Object.assign(Object.assign({},i),{firstLevel:!1}),[i]),[h]=yu("Menu");return d.createElement(Us.Provider,{value:p},d.createElement(Iu,Object.assign({},fn(e,["icon"]),{title:f,popupClassName:de(l,r,`${l}-${a||u}`),popupStyle:Object.assign({zIndex:h},e.popupStyle)})))};var bR=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};function Gc(e){return e===null||e===!1}const yR={item:Ix,submenu:Mx,divider:Rx},CR=dn((e,t)=>{var r;const n=d.useContext(Xs),o=n||{},{getPrefixCls:a,getPopupContainer:i,direction:l,menu:s}=d.useContext(Zt),u=a(),{prefixCls:c,className:f,style:p,theme:h="light",expandIcon:v,_internalDisableMenuItemTitleTooltip:g,inlineCollapsed:m,siderCollapsed:b,rootClassName:y,mode:C,selectable:D,onClick:w,overflowedIndicatorPopupClassName:k}=e,E=bR(e,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),x=fn(E,["collapsedWidth"]);(r=o.validator)===null||r===void 0||r.call(o,{mode:C});const F=nr((..._)=>{var q;w==null||w.apply(void 0,_),(q=o.onClick)===null||q===void 0||q.call(o)}),j=o.mode||C,$=D??o.selectable,P=m??b,A={horizontal:{motionName:`${u}-slide-up`},inline:CC(u),other:{motionName:`${u}-zoom-big`}},O=a("menu",c||o.prefixCls),S=bo(O),[B,R,N]=vR(O,S,!n),T=de(`${O}-${h}`,s==null?void 0:s.className,f),L=d.useMemo(()=>{var _,q;if(typeof v=="function"||Gc(v))return v||null;if(typeof o.expandIcon=="function"||Gc(o.expandIcon))return o.expandIcon||null;if(typeof(s==null?void 0:s.expandIcon)=="function"||Gc(s==null?void 0:s.expandIcon))return(s==null?void 0:s.expandIcon)||null;const Q=(_=v??(o==null?void 0:o.expandIcon))!==null&&_!==void 0?_:s==null?void 0:s.expandIcon;return eo(Q,{className:de(`${O}-submenu-expand-icon`,d.isValidElement(Q)?(q=Q.props)===null||q===void 0?void 0:q.className:void 0)})},[v,o==null?void 0:o.expandIcon,s==null?void 0:s.expandIcon,O]),X=d.useMemo(()=>({prefixCls:O,inlineCollapsed:P||!1,direction:l,firstLevel:!0,theme:h,mode:j,disableMenuItemTitleTooltip:g}),[O,P,l,g,h]);return B(d.createElement(Xs.Provider,{value:null},d.createElement(Us.Provider,{value:X},d.createElement(Dl,Object.assign({getPopupContainer:i,overflowedIndicator:d.createElement(jx,null),overflowedIndicatorPopupClassName:de(O,`${O}-${h}`,k),mode:j,selectable:$,onClick:F},x,{inlineCollapsed:P,style:Object.assign(Object.assign({},s==null?void 0:s.style),p),className:T,prefixCls:O,direction:l,defaultMotions:A,expandIcon:L,ref:t,rootClassName:de(y,R,o.rootClassName,N,S),_internalComponents:yR})))))}),ui=dn((e,t)=>{const r=Ve(null),n=d.useContext(Px);return ei(t,()=>({menu:r.current,focus:o=>{var a;(a=r.current)===null||a===void 0||a.focus(o)}})),d.createElement(CR,Object.assign({ref:r},e,n))});ui.Item=Ix;ui.SubMenu=Mx;ui.Divider=Rx;ui.ItemGroup=fm;const xR=e=>{const{componentCls:t,menuCls:r,colorError:n,colorTextLightSolid:o}=e,a=`${r}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${r} ${a}`]:{[`&${a}-danger:not(${a}-disabled)`]:{color:n,"&:hover":{color:o,backgroundColor:n}}}}}},wR=e=>{const{componentCls:t,menuCls:r,zIndexPopup:n,dropdownArrowDistance:o,sizePopupArrow:a,antCls:i,iconCls:l,motionDurationMid:s,paddingBlock:u,fontSize:c,dropdownEdgeChildPadding:f,colorTextDisabled:p,fontSizeIcon:h,controlPaddingHorizontal:v,colorBgElevated:g}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:n,display:"block","&::before":{position:"absolute",insetBlock:e.calc(a).div(2).sub(o).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${i}-btn`]:{[`& > ${l}-down, & > ${i}-btn-icon > ${l}-down`]:{fontSize:h}},[`${t}-wrap`]:{position:"relative",[`${i}-btn > ${l}-down`]:{fontSize:h},[`${l}-down::before`]:{transition:`transform ${s}`}},[`${t}-wrap-open`]:{[`${l}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottomLeft,
|
|
339
|
+
&${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottomLeft,
|
|
340
|
+
&${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottom,
|
|
341
|
+
&${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottom,
|
|
342
|
+
&${i}-slide-down-enter${i}-slide-down-enter-active${t}-placement-bottomRight,
|
|
343
|
+
&${i}-slide-down-appear${i}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:Vp},[`&${i}-slide-up-enter${i}-slide-up-enter-active${t}-placement-topLeft,
|
|
344
|
+
&${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-topLeft,
|
|
345
|
+
&${i}-slide-up-enter${i}-slide-up-enter-active${t}-placement-top,
|
|
346
|
+
&${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-top,
|
|
347
|
+
&${i}-slide-up-enter${i}-slide-up-enter-active${t}-placement-topRight,
|
|
348
|
+
&${i}-slide-up-appear${i}-slide-up-appear-active${t}-placement-topRight`]:{animationName:Xp},[`&${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottomLeft,
|
|
349
|
+
&${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottom,
|
|
350
|
+
&${i}-slide-down-leave${i}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:Up},[`&${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-topLeft,
|
|
351
|
+
&${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-top,
|
|
352
|
+
&${i}-slide-up-leave${i}-slide-up-leave-active${t}-placement-topRight`]:{animationName:Gp}}},gx(e,g,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${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}},[`${t}, ${t}-menu-submenu`]:Object.assign(Object.assign({},Br(e)),{[r]:Object.assign(Object.assign({padding:f,listStyleType:"none",backgroundColor:g,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary},ul(e)),{"&:empty":{padding:0,boxShadow:"none"},[`${r}-item-group-title`]:{padding:`${se(u)} ${se(v)}`,color:e.colorTextDescription,transition:`all ${s}`},[`${r}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${r}-item-icon`]:{minWidth:c,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${r}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${s}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${r}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${r}-item, ${r}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${se(u)} ${se(v)}`,color:e.colorText,fontWeight:"normal",fontSize:c,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${s}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover}},ul(e)),{"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:p,cursor:"not-allowed","&:hover":{color:p,backgroundColor:g,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${se(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:h,fontStyle:"normal"}}}),[`${r}-item-group-list`]:{margin:`0 ${se(e.marginXS)}`,padding:0,listStyle:"none"},[`${r}-submenu-title`]:{paddingInlineEnd:e.calc(v).add(e.fontSizeSM).equal()},[`${r}-submenu-vertical`]:{position:"relative"},[`${r}-submenu${r}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:p,backgroundColor:g,cursor:"not-allowed"}},[`${r}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}})})},[Ga(e,"slide-up"),Ga(e,"slide-down"),Ws(e,"move-up"),Ws(e,"move-down"),Yp(e,"zoom-big")]]},ER=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2},am({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0})),mx(e)),kR=Hr("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:r,paddingXXS:n,componentCls:o}=e,a=er(e,{menuCls:`${o}-menu`,dropdownArrowDistance:e.calc(r).div(2).add(t).equal(),dropdownEdgeChildPadding:n});return[wR(a),xR(a)]},ER,{resetStyle:!1}),Tu=e=>{var t;const{menu:r,arrow:n,prefixCls:o,children:a,trigger:i,disabled:l,dropdownRender:s,popupRender:u,getPopupContainer:c,overlayClassName:f,rootClassName:p,overlayStyle:h,open:v,onOpenChange:g,visible:m,onVisibleChange:b,mouseEnterDelay:y=.15,mouseLeaveDelay:C=.1,autoAdjustOverflow:D=!0,placement:w="",overlay:k,transitionName:E,destroyOnHidden:x,destroyPopupOnHide:F}=e,{getPopupContainer:j,getPrefixCls:$,direction:P,dropdown:A}=d.useContext(Zt),O=u||s;oi();const S=d.useMemo(()=>{const me=$();return E!==void 0?E:w.includes("top")?`${me}-slide-down`:`${me}-slide-up`},[$,w,E]),B=d.useMemo(()=>w?w.includes("Center")?w.slice(0,w.indexOf("Center")):w:P==="rtl"?"bottomRight":"bottomLeft",[w,P]),R=$("dropdown",o),N=bo(R),[T,L,X]=kR(R,N),[,_]=Yr(),q=d.Children.only(k4(a)?d.createElement("span",null,a):a),Q=eo(q,{className:de(`${R}-trigger`,{[`${R}-rtl`]:P==="rtl"},q.props.className),disabled:(t=q.props.disabled)!==null&&t!==void 0?t:l}),te=l?[]:i,z=!!(te!=null&&te.includes("contextMenu")),[Y,V]=Ur(!1,{value:v??m}),G=nr(me=>{g==null||g(me,{source:"trigger"}),b==null||b(me),V(me)}),K=de(f,p,L,X,N,A==null?void 0:A.className,{[`${R}-rtl`]:P==="rtl"}),W=vx({arrowPointAtCenter:typeof n=="object"&&n.pointAtCenter,autoAdjustOverflow:D,offset:_.marginXXS,arrowWidth:n?_.sizePopupArrow:0,borderRadius:_.borderRadius}),re=d.useCallback(()=>{r!=null&&r.selectable&&(r!=null&&r.multiple)||(g==null||g(!1,{source:"menu"}),V(!1))},[r==null?void 0:r.selectable,r==null?void 0:r.multiple]),U=()=>{let me;return r!=null&&r.items?me=d.createElement(ui,Object.assign({},r)):typeof k=="function"?me=k():me=k,O&&(me=O(me)),me=d.Children.only(typeof me=="string"?d.createElement("span",null,me):me),d.createElement(Tx,{prefixCls:`${R}-menu`,rootClassName:de(X,N),expandIcon:d.createElement("span",{className:`${R}-menu-submenu-arrow`},P==="rtl"?d.createElement(Rf,{className:`${R}-menu-submenu-arrow-icon`}):d.createElement(vf,{className:`${R}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:re,validator:({mode:Ce})=>{}},me)},[J,ne]=yu("Dropdown",h==null?void 0:h.zIndex);let ue=d.createElement(E4,Object.assign({alignPoint:z},fn(e,["rootClassName"]),{mouseEnterDelay:y,mouseLeaveDelay:C,visible:Y,builtinPlacements:W,arrow:!!n,overlayClassName:K,prefixCls:R,getPopupContainer:c||j,transitionName:S,trigger:te,overlay:U,placement:B,onVisibleChange:G,overlayStyle:Object.assign(Object.assign(Object.assign({},A==null?void 0:A.style),h),{zIndex:J}),autoDestroy:x??F}),Q);return J&&(ue=d.createElement(Hp.Provider,{value:ne},ue)),T(ue)},DR=LC(Tu,"align",void 0,"dropdown",e=>e),SR=e=>d.createElement(DR,Object.assign({},e),d.createElement("span",null));Tu._InternalPanelDoNotUseOrYouWillBeFired=SR;var Hf={exports:{}},$R=Hf.exports,N0;function BR(){return N0||(N0=1,(function(e,t){(function(r,n){e.exports=n()})($R,(function(){var r=1e3,n=6e4,o=36e5,a="millisecond",i="second",l="minute",s="hour",u="day",c="week",f="month",p="quarter",h="year",v="date",g="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(O){var S=["th","st","nd","rd"],B=O%100;return"["+O+(S[(B-20)%10]||S[B]||S[0])+"]"}},C=function(O,S,B){var R=String(O);return!R||R.length>=S?O:""+Array(S+1-R.length).join(B)+O},D={s:C,z:function(O){var S=-O.utcOffset(),B=Math.abs(S),R=Math.floor(B/60),N=B%60;return(S<=0?"+":"-")+C(R,2,"0")+":"+C(N,2,"0")},m:function O(S,B){if(S.date()<B.date())return-O(B,S);var R=12*(B.year()-S.year())+(B.month()-S.month()),N=S.clone().add(R,f),T=B-N<0,L=S.clone().add(R+(T?-1:1),f);return+(-(R+(B-N)/(T?N-L:L-N))||0)},a:function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},p:function(O){return{M:f,y:h,w:c,d:u,D:v,h:s,m:l,s:i,ms:a,Q:p}[O]||String(O||"").toLowerCase().replace(/s$/,"")},u:function(O){return O===void 0}},w="en",k={};k[w]=y;var E="$isDayjsObject",x=function(O){return O instanceof P||!(!O||!O[E])},F=function O(S,B,R){var N;if(!S)return w;if(typeof S=="string"){var T=S.toLowerCase();k[T]&&(N=T),B&&(k[T]=B,N=T);var L=S.split("-");if(!N&&L.length>1)return O(L[0])}else{var X=S.name;k[X]=S,N=X}return!R&&N&&(w=N),N||!R&&w},j=function(O,S){if(x(O))return O.clone();var B=typeof S=="object"?S:{};return B.date=O,B.args=arguments,new P(B)},$=D;$.l=F,$.i=x,$.w=function(O,S){return j(O,{locale:S.$L,utc:S.$u,x:S.$x,$offset:S.$offset})};var P=(function(){function O(B){this.$L=F(B.locale,null,!0),this.parse(B),this.$x=this.$x||B.x||{},this[E]=!0}var S=O.prototype;return S.parse=function(B){this.$d=(function(R){var N=R.date,T=R.utc;if(N===null)return new Date(NaN);if($.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var L=N.match(m);if(L){var X=L[2]-1||0,_=(L[7]||"0").substring(0,3);return T?new Date(Date.UTC(L[1],X,L[3]||1,L[4]||0,L[5]||0,L[6]||0,_)):new Date(L[1],X,L[3]||1,L[4]||0,L[5]||0,L[6]||0,_)}}return new Date(N)})(B),this.init()},S.init=function(){var B=this.$d;this.$y=B.getFullYear(),this.$M=B.getMonth(),this.$D=B.getDate(),this.$W=B.getDay(),this.$H=B.getHours(),this.$m=B.getMinutes(),this.$s=B.getSeconds(),this.$ms=B.getMilliseconds()},S.$utils=function(){return $},S.isValid=function(){return this.$d.toString()!==g},S.isSame=function(B,R){var N=j(B);return this.startOf(R)<=N&&N<=this.endOf(R)},S.isAfter=function(B,R){return j(B)<this.startOf(R)},S.isBefore=function(B,R){return this.endOf(R)<j(B)},S.$g=function(B,R,N){return $.u(B)?this[R]:this.set(N,B)},S.unix=function(){return Math.floor(this.valueOf()/1e3)},S.valueOf=function(){return this.$d.getTime()},S.startOf=function(B,R){var N=this,T=!!$.u(R)||R,L=$.p(B),X=function(G,K){var W=$.w(N.$u?Date.UTC(N.$y,K,G):new Date(N.$y,K,G),N);return T?W:W.endOf(u)},_=function(G,K){return $.w(N.toDate()[G].apply(N.toDate("s"),(T?[0,0,0,0]:[23,59,59,999]).slice(K)),N)},q=this.$W,Q=this.$M,te=this.$D,z="set"+(this.$u?"UTC":"");switch(L){case h:return T?X(1,0):X(31,11);case f:return T?X(1,Q):X(0,Q+1);case c:var Y=this.$locale().weekStart||0,V=(q<Y?q+7:q)-Y;return X(T?te-V:te+(6-V),Q);case u:case v:return _(z+"Hours",0);case s:return _(z+"Minutes",1);case l:return _(z+"Seconds",2);case i:return _(z+"Milliseconds",3);default:return this.clone()}},S.endOf=function(B){return this.startOf(B,!1)},S.$set=function(B,R){var N,T=$.p(B),L="set"+(this.$u?"UTC":""),X=(N={},N[u]=L+"Date",N[v]=L+"Date",N[f]=L+"Month",N[h]=L+"FullYear",N[s]=L+"Hours",N[l]=L+"Minutes",N[i]=L+"Seconds",N[a]=L+"Milliseconds",N)[T],_=T===u?this.$D+(R-this.$W):R;if(T===f||T===h){var q=this.clone().set(v,1);q.$d[X](_),q.init(),this.$d=q.set(v,Math.min(this.$D,q.daysInMonth())).$d}else X&&this.$d[X](_);return this.init(),this},S.set=function(B,R){return this.clone().$set(B,R)},S.get=function(B){return this[$.p(B)]()},S.add=function(B,R){var N,T=this;B=Number(B);var L=$.p(R),X=function(Q){var te=j(T);return $.w(te.date(te.date()+Math.round(Q*B)),T)};if(L===f)return this.set(f,this.$M+B);if(L===h)return this.set(h,this.$y+B);if(L===u)return X(1);if(L===c)return X(7);var _=(N={},N[l]=n,N[s]=o,N[i]=r,N)[L]||1,q=this.$d.getTime()+B*_;return $.w(q,this)},S.subtract=function(B,R){return this.add(-1*B,R)},S.format=function(B){var R=this,N=this.$locale();if(!this.isValid())return N.invalidDate||g;var T=B||"YYYY-MM-DDTHH:mm:ssZ",L=$.z(this),X=this.$H,_=this.$m,q=this.$M,Q=N.weekdays,te=N.months,z=N.meridiem,Y=function(K,W,re,U){return K&&(K[W]||K(R,T))||re[W].slice(0,U)},V=function(K){return $.s(X%12||12,K,"0")},G=z||function(K,W,re){var U=K<12?"AM":"PM";return re?U.toLowerCase():U};return T.replace(b,(function(K,W){return W||(function(re){switch(re){case"YY":return String(R.$y).slice(-2);case"YYYY":return $.s(R.$y,4,"0");case"M":return q+1;case"MM":return $.s(q+1,2,"0");case"MMM":return Y(N.monthsShort,q,te,3);case"MMMM":return Y(te,q);case"D":return R.$D;case"DD":return $.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return Y(N.weekdaysMin,R.$W,Q,2);case"ddd":return Y(N.weekdaysShort,R.$W,Q,3);case"dddd":return Q[R.$W];case"H":return String(X);case"HH":return $.s(X,2,"0");case"h":return V(1);case"hh":return V(2);case"a":return G(X,_,!0);case"A":return G(X,_,!1);case"m":return String(_);case"mm":return $.s(_,2,"0");case"s":return String(R.$s);case"ss":return $.s(R.$s,2,"0");case"SSS":return $.s(R.$ms,3,"0");case"Z":return L}return null})(K)||L.replace(":","")}))},S.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},S.diff=function(B,R,N){var T,L=this,X=$.p(R),_=j(B),q=(_.utcOffset()-this.utcOffset())*n,Q=this-_,te=function(){return $.m(L,_)};switch(X){case h:T=te()/12;break;case f:T=te();break;case p:T=te()/3;break;case c:T=(Q-q)/6048e5;break;case u:T=(Q-q)/864e5;break;case s:T=Q/o;break;case l:T=Q/n;break;case i:T=Q/r;break;default:T=Q}return N?T:$.a(T)},S.daysInMonth=function(){return this.endOf(f).$D},S.$locale=function(){return k[this.$L]},S.locale=function(B,R){if(!B)return this.$L;var N=this.clone(),T=F(B,R,!0);return T&&(N.$L=T),N},S.clone=function(){return $.w(this.$d,this)},S.toDate=function(){return new Date(this.valueOf())},S.toJSON=function(){return this.isValid()?this.toISOString():null},S.toISOString=function(){return this.$d.toISOString()},S.toString=function(){return this.$d.toUTCString()},O})(),A=P.prototype;return j.prototype=A,[["$ms",a],["$s",i],["$m",l],["$H",s],["$W",u],["$M",f],["$y",h],["$D",v]].forEach((function(O){A[O[1]]=function(S){return this.$g(S,O[0],O[1])}})),j.extend=function(O,S){return O.$i||(O(S,P,j),O.$i=!0),j},j.locale=F,j.isDayjs=x,j.unix=function(O){return j(1e3*O)},j.en=k[w],j.Ls=k,j.p={},j}))})(Hf)),Hf.exports}var OR=BR();const AR=gl(OR),zx=d.createContext(null),FR=zx.Provider,Lx=d.createContext(null),NR=Lx.Provider;var PR=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],_x=dn(function(e,t){var r=e.prefixCls,n=r===void 0?"rc-checkbox":r,o=e.className,a=e.style,i=e.checked,l=e.disabled,s=e.defaultChecked,u=s===void 0?!1:s,c=e.type,f=c===void 0?"checkbox":c,p=e.title,h=e.onChange,v=Ct(e,PR),g=Ve(null),m=Ve(null),b=Ur(u,{value:i}),y=ce(b,2),C=y[0],D=y[1];ei(t,function(){return{focus:function(E){var x;(x=g.current)===null||x===void 0||x.focus(E)},blur:function(){var E;(E=g.current)===null||E===void 0||E.blur()},input:g.current,nativeElement:m.current}});var w=de(n,o,M(M({},"".concat(n,"-checked"),C),"".concat(n,"-disabled"),l)),k=function(E){l||("checked"in e||D(E.target.checked),h==null||h({target:H(H({},e),{},{type:f,checked:E.target.checked}),stopPropagation:function(){E.stopPropagation()},preventDefault:function(){E.preventDefault()},nativeEvent:E.nativeEvent}))};return d.createElement("span",{className:w,title:p,style:a,ref:m},d.createElement("input",Te({},v,{className:"".concat(n,"-input"),ref:g,onChange:k,disabled:l,checked:!!C,type:f})),d.createElement("span",{className:"".concat(n,"-inner")}))});function Hx(e){const t=ee.useRef(null),r=()=>{qt.cancel(t.current),t.current=null};return[()=>{r(),t.current=qt(()=>{t.current=null})},n=>{t.current&&(n.stopPropagation(),r()),e==null||e(n)}]}const jR=e=>{const{componentCls:t,antCls:r}=e,n=`${t}-group`;return{[n]:Object.assign(Object.assign({},Br(e)),{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"}})}},RR=e=>{const{componentCls:t,wrapperMarginInlineEnd:r,colorPrimary:n,radioSize:o,motionDurationSlow:a,motionDurationMid:i,motionEaseInOutCirc:l,colorBgContainer:s,colorBorder:u,lineWidth:c,colorBgContainerDisabled:f,colorTextDisabled:p,paddingXS:h,dotColorDisabled:v,lineType:g,radioColor:m,radioBgColor:b,calc:y}=e,C=`${t}-inner`,D=y(o).sub(y(4).mul(2)),w=y(1).mul(o).equal({unit:!0});return{[`${t}-wrapper`]:Object.assign(Object.assign({},Br(e)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:r,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${t}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${se(c)} ${g} ${n}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[t]:Object.assign(Object.assign({},Br(e)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${t}-wrapper:hover &,
|
|
353
|
+
&:hover ${C}`]:{borderColor:n},[`${t}-input:focus-visible + ${C}`]:Po(e),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:"visible"},[`${t}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:w,height:w,marginBlockStart:y(1).mul(o).div(-2).equal({unit:!0}),marginInlineStart:y(1).mul(o).div(-2).equal({unit:!0}),backgroundColor:m,borderBlockStart:0,borderInlineStart:0,borderRadius:w,transform:"scale(0)",opacity:0,transition:`all ${a} ${l}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:w,height:w,backgroundColor:s,borderColor:u,borderStyle:"solid",borderWidth:c,borderRadius:"50%",transition:`all ${i}`},[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${t}-checked`]:{[C]:{borderColor:n,backgroundColor:b,"&::after":{transform:`scale(${e.calc(e.dotSize).div(o).equal()})`,opacity:1,transition:`all ${a} ${l}`}}},[`${t}-disabled`]:{cursor:"not-allowed",[C]:{backgroundColor:f,borderColor:u,cursor:"not-allowed","&::after":{backgroundColor:v}},[`${t}-input`]:{cursor:"not-allowed"},[`${t}-disabled + span`]:{color:p,cursor:"not-allowed"},[`&${t}-checked`]:{[C]:{"&::after":{transform:`scale(${y(D).div(o).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:h,paddingInlineEnd:h}})}},IR=e=>{const{buttonColor:t,controlHeight:r,componentCls:n,lineWidth:o,lineType:a,colorBorder:i,motionDurationSlow:l,motionDurationMid:s,buttonPaddingInline:u,fontSize:c,buttonBg:f,fontSizeLG:p,controlHeightLG:h,controlHeightSM:v,paddingXS:g,borderRadius:m,borderRadiusSM:b,borderRadiusLG:y,buttonCheckedBg:C,buttonSolidCheckedColor:D,colorTextDisabled:w,colorBgContainerDisabled:k,buttonCheckedBgDisabled:E,buttonCheckedColorDisabled:x,colorPrimary:F,colorPrimaryHover:j,colorPrimaryActive:$,buttonSolidCheckedBg:P,buttonSolidCheckedHoverBg:A,buttonSolidCheckedActiveBg:O,calc:S}=e;return{[`${n}-button-wrapper`]:{position:"relative",display:"inline-block",height:r,margin:0,paddingInline:u,paddingBlock:0,color:t,fontSize:c,lineHeight:se(S(r).sub(S(o).mul(2)).equal()),background:f,border:`${se(o)} ${a} ${i}`,borderBlockStartWidth:S(o).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:o,cursor:"pointer",transition:[`color ${s}`,`background ${s}`,`box-shadow ${s}`].join(","),a:{color:t},[`> ${n}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:S(o).mul(-1).equal(),insetInlineStart:S(o).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:o,paddingInline:0,backgroundColor:i,transition:`background-color ${l}`,content:'""'}},"&:first-child":{borderInlineStart:`${se(o)} ${a} ${i}`,borderStartStartRadius:m,borderEndStartRadius:m},"&:last-child":{borderStartEndRadius:m,borderEndEndRadius:m},"&:first-child:last-child":{borderRadius:m},[`${n}-group-large &`]:{height:h,fontSize:p,lineHeight:se(S(h).sub(S(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:y,borderEndStartRadius:y},"&:last-child":{borderStartEndRadius:y,borderEndEndRadius:y}},[`${n}-group-small &`]:{height:v,paddingInline:S(g).sub(o).equal(),paddingBlock:0,lineHeight:se(S(v).sub(S(o).mul(2)).equal()),"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},"&:hover":{position:"relative",color:F},"&:has(:focus-visible)":Po(e),[`${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:F,background:C,borderColor:F,"&::before":{backgroundColor:F},"&:first-child":{borderColor:F},"&:hover":{color:j,borderColor:j,"&::before":{backgroundColor:j}},"&:active":{color:$,borderColor:$,"&::before":{backgroundColor:$}}},[`${n}-group-solid &-checked:not(${n}-button-wrapper-disabled)`]:{color:D,background:P,borderColor:P,"&:hover":{color:D,background:A,borderColor:A},"&:active":{color:D,background:O,borderColor:O}},"&-disabled":{color:w,backgroundColor:k,borderColor:i,cursor:"not-allowed","&:first-child, &:hover":{color:w,backgroundColor:k,borderColor:i}},[`&-disabled${n}-button-wrapper-checked`]:{color:x,backgroundColor:E,borderColor:i,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},TR=e=>{const{wireframe:t,padding:r,marginXS:n,lineWidth:o,fontSizeLG:a,colorText:i,colorBgContainer:l,colorTextDisabled:s,controlItemBgActiveDisabled:u,colorTextLightSolid:c,colorPrimary:f,colorPrimaryHover:p,colorPrimaryActive:h,colorWhite:v}=e,g=4,m=a,b=t?m-g*2:m-(g+o)*2;return{radioSize:m,dotSize:b,dotColorDisabled:s,buttonSolidCheckedColor:c,buttonSolidCheckedBg:f,buttonSolidCheckedHoverBg:p,buttonSolidCheckedActiveBg:h,buttonBg:l,buttonCheckedBg:l,buttonColor:i,buttonCheckedBgDisabled:u,buttonCheckedColorDisabled:s,buttonPaddingInline:r-o,wrapperMarginInlineEnd:n,radioColor:t?f:v,radioBgColor:t?l:f}},Wx=Hr("Radio",e=>{const{controlOutline:t,controlOutlineWidth:r}=e,n=`0 0 0 ${se(r)} ${t}`,o=er(e,{radioFocusShadow:n,radioButtonFocusShadow:n});return[jR(o),RR(o),IR(o)]},TR,{unitless:{radioSize:!0,dotSize:!0}});var MR=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const zR=(e,t)=>{var r,n;const o=d.useContext(zx),a=d.useContext(Lx),{getPrefixCls:i,direction:l,radio:s}=d.useContext(Zt),u=d.useRef(null),c=ro(t,u),{isFormItemInput:f}=d.useContext(oa),p=B=>{var R,N;(R=e.onChange)===null||R===void 0||R.call(e,B),(N=o==null?void 0:o.onChange)===null||N===void 0||N.call(o,B)},{prefixCls:h,className:v,rootClassName:g,children:m,style:b,title:y}=e,C=MR(e,["prefixCls","className","rootClassName","children","style","title"]),D=i("radio",h),w=((o==null?void 0:o.optionType)||a)==="button",k=w?`${D}-button`:D,E=bo(D),[x,F,j]=Wx(D,E),$=Object.assign({},C),P=d.useContext(No);o&&($.name=o.name,$.onChange=p,$.checked=e.value===o.value,$.disabled=(r=$.disabled)!==null&&r!==void 0?r:o.disabled),$.disabled=(n=$.disabled)!==null&&n!==void 0?n:P;const A=de(`${k}-wrapper`,{[`${k}-wrapper-checked`]:$.checked,[`${k}-wrapper-disabled`]:$.disabled,[`${k}-wrapper-rtl`]:l==="rtl",[`${k}-wrapper-in-form-item`]:f,[`${k}-wrapper-block`]:!!(o!=null&&o.block)},s==null?void 0:s.className,v,g,F,j,E),[O,S]=Hx($.onClick);return x(d.createElement(Kp,{component:"Radio",disabled:$.disabled},d.createElement("label",{className:A,style:Object.assign(Object.assign({},s==null?void 0:s.style),b),onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:y,onClick:O},d.createElement(_x,Object.assign({},$,{className:de($.className,{[wu]:!w}),type:"radio",prefixCls:k,ref:c,onClick:S})),m!==void 0?d.createElement("span",{className:`${k}-label`},m):null)))},Gs=d.forwardRef(zR);function LR(e){return e===void 0||e===!1?[]:Array.isArray(e)?e:[e]}function _R(e){return LR(e).join("_")}const HR=d.forwardRef((e,t)=>{const{getPrefixCls:r,direction:n}=d.useContext(Zt),{name:o}=d.useContext(oa),a=Qp(_R(o)),{prefixCls:i,className:l,rootClassName:s,options:u,buttonStyle:c="outline",disabled:f,children:p,size:h,style:v,id:g,optionType:m,name:b=a,defaultValue:y,value:C,block:D=!1,onChange:w,onMouseEnter:k,onMouseLeave:E,onFocus:x,onBlur:F}=e,[j,$]=Ur(y,{value:C}),P=d.useCallback(q=>{const Q=j,te=q.target.value;"value"in e||$(te),te!==Q&&(w==null||w(q))},[j,$,w]),A=r("radio",i),O=`${A}-group`,S=bo(A),[B,R,N]=Wx(A,S);let T=p;u&&u.length>0&&(T=u.map(q=>typeof q=="string"||typeof q=="number"?d.createElement(Gs,{key:q.toString(),prefixCls:A,disabled:f,value:q,checked:j===q},q):d.createElement(Gs,{key:`radio-group-value-options-${q.value}`,prefixCls:A,disabled:q.disabled||f,value:q.value,checked:j===q.value,title:q.title,style:q.style,className:q.className,id:q.id,required:q.required},q.label)));const L=fa(h),X=de(O,`${O}-${c}`,{[`${O}-${L}`]:L,[`${O}-rtl`]:n==="rtl",[`${O}-block`]:D},l,s,R,N,S),_=d.useMemo(()=>({onChange:P,value:j,disabled:f,name:b,optionType:m,block:D}),[P,j,f,b,m,D]);return B(d.createElement("div",Object.assign({},Qn(e,{aria:!0,data:!0}),{className:X,style:v,onMouseEnter:k,onMouseLeave:E,onFocus:x,onBlur:F,id:g,ref:t}),d.createElement(FR,{value:_},T)))}),WR=d.memo(HR);var KR=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const qR=(e,t)=>{const{getPrefixCls:r}=d.useContext(Zt),{prefixCls:n}=e,o=KR(e,["prefixCls"]),a=r("radio",n);return d.createElement(NR,{value:"button"},d.createElement(Gs,Object.assign({prefixCls:a},o,{type:"radio",ref:t})))},VR=d.forwardRef(qR),Sl=Gs;Sl.Button=VR;Sl.Group=WR;Sl.__ANT_RADIO=!0;function pm(e){return er(e,{inputAffixPadding:e.paddingXXS})}const mm=e=>{const{controlHeight:t,fontSize:r,lineHeight:n,lineWidth:o,controlHeightSM:a,controlHeightLG:i,fontSizeLG:l,lineHeightLG:s,paddingSM:u,controlPaddingHorizontalSM:c,controlPaddingHorizontal:f,colorFillAlter:p,colorPrimaryHover:h,colorPrimary:v,controlOutlineWidth:g,controlOutline:m,colorErrorOutline:b,colorWarningOutline:y,colorBgContainer:C,inputFontSize:D,inputFontSizeLG:w,inputFontSizeSM:k}=e,E=D||r,x=k||E,F=w||l,j=Math.round((t-E*n)/2*10)/10-o,$=Math.round((a-x*n)/2*10)/10-o,P=Math.ceil((i-F*s)/2*10)/10-o;return{paddingBlock:Math.max(j,0),paddingBlockSM:Math.max($,0),paddingBlockLG:Math.max(P,0),paddingInline:u-o,paddingInlineSM:c-o,paddingInlineLG:f-o,addonBg:p,activeBorderColor:v,hoverBorderColor:h,activeShadow:`0 0 0 ${g}px ${m}`,errorActiveShadow:`0 0 0 ${g}px ${b}`,warningActiveShadow:`0 0 0 ${g}px ${y}`,hoverBg:C,activeBg:C,inputFontSize:E,inputFontSizeLG:F,inputFontSizeSM:x}},UR=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),Mu=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},UR(er(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),hm=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),P0=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},hm(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),XR=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},hm(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},Mu(e))}),P0(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),P0(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),j0=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),GR=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${se(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},j0(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),j0(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},Mu(e))}})}),YR=(e,t)=>{const{componentCls:r}=e;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${r}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${r}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${r}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}}},t)}},Kx=(e,t)=>{var r;return{background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(r=t==null?void 0:t.inputColor)!==null&&r!==void 0?r:"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}},R0=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},Kx(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),ZR=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Kx(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},Mu(e))}),R0(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),R0(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),I0=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),JR=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}}},I0(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),I0(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${se(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${se(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${se(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${se(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${se(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${se(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),qx=(e,t)=>({background:e.colorBgContainer,borderWidth:`${se(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.borderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.activeBorderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),T0=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},qx(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),QR=(e,t)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},qx(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),T0(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),T0(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),eI=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Vx=e=>{const{paddingBlockLG:t,lineHeightLG:r,borderRadiusLG:n,paddingInlineLG:o}=e;return{padding:`${se(t)} ${se(o)}`,fontSize:e.inputFontSizeLG,lineHeight:r,borderRadius:n}},gm=e=>({padding:`${se(e.paddingBlockSM)} ${se(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),vm=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${se(e.paddingBlock)} ${se(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},eI(e.colorTextPlaceholder)),{"&-lg":Object.assign({},Vx(e)),"&-sm":Object.assign({},gm(e)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),tI=e=>{const{componentCls:t,antCls:r}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},Vx(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},gm(e)),[`&-lg ${r}-select-single ${r}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${r}-select-single ${r}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-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(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${r}-select`]:{margin:`${se(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${se(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${r}-select-single:not(${r}-select-customize-input):not(${r}-pagination-size-changer)`]:{[`${r}-select-selector`]:{backgroundColor:"inherit",border:`${se(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}}},[`${r}-cascader-picker`]:{margin:`-9px ${se(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${r}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:"block"},zs()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
354
|
+
& > ${t}-affix-wrapper,
|
|
355
|
+
& > ${t}-number-affix-wrapper,
|
|
356
|
+
& > ${r}-picker-range
|
|
357
|
+
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderInlineEndWidth:e.lineWidth},[t]:{float:"none"},[`& > ${r}-select > ${r}-select-selector,
|
|
358
|
+
& > ${r}-select-auto-complete ${t},
|
|
359
|
+
& > ${r}-cascader-picker ${t},
|
|
360
|
+
& > ${t}-group-wrapper ${t}`]:{borderInlineEndWidth:e.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${r}-select-focused`]:{zIndex:1},[`& > ${r}-select > ${r}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
361
|
+
& > ${r}-select:first-child > ${r}-select-selector,
|
|
362
|
+
& > ${r}-select-auto-complete:first-child ${t},
|
|
363
|
+
& > ${r}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child,
|
|
364
|
+
& > ${r}-select:last-child > ${r}-select-selector,
|
|
365
|
+
& > ${r}-cascader-picker:last-child ${t},
|
|
366
|
+
& > ${r}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${r}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},rI=e=>{const{componentCls:t,controlHeightSM:r,lineWidth:n,calc:o}=e,a=o(r).sub(o(n).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Br(e)),vm(e)),XR(e)),ZR(e)),YR(e)),QR(e)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:r,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},nI=e=>{const{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorIcon},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${se(e.inputAffixPadding)}`}}}},oI=e=>{const{componentCls:t,inputAffixPadding:r,colorTextDescription:n,motionDurationSlow:o,colorIcon:a,colorIconHover:i,iconCls:l}=e,s=`${t}-affix-wrapper`,u=`${t}-affix-wrapper-disabled`;return{[s]:Object.assign(Object.assign(Object.assign(Object.assign({},vm(e)),{display:"inline-flex",[`&:not(${t}-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{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"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:n,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:r},"&-suffix":{marginInlineStart:r}}}),nI(e)),{[`${l}${t}-password-icon`]:{color:a,cursor:"pointer",transition:`all ${o}`,"&:hover":{color:i}}}),[`${t}-underlined`]:{borderRadius:0},[u]:{[`${l}${t}-password-icon`]:{color:a,cursor:"not-allowed","&:hover":{color:a}}}}},aI=e=>{const{componentCls:t,borderRadiusLG:r,borderRadiusSM:n}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},Br(e)),tI(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:r,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:n}}},GR(e)),JR(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},iI=e=>{const{componentCls:t,antCls:r}=e,n=`${t}-search`;return{[n]:{[t]:{"&:hover, &:focus":{[`+ ${t}-group-addon ${n}-button:not(${r}-btn-color-primary):not(${r}-btn-variant-text)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{height:e.controlHeight,borderRadius:0},[`${t}-lg`]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal()},[`> ${t}-group`]:{[`> ${t}-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:e.colorTextDescription,"&:hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${r}-btn-loading::before`]:{inset:0}}}},[`${n}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${t}-affix-wrapper, ${n}-button`]:{height:e.controlHeightLG}},"&-small":{[`${t}-affix-wrapper, ${n}-button`]:{height:e.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${t}-compact-item`]:{[`&:not(${t}-compact-last-item)`]:{[`${t}-group-addon`]:{[`${t}-search-button`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${t}-compact-first-item)`]:{[`${t},${t}-affix-wrapper`]:{borderRadius:0}},[`> ${t}-group-addon ${t}-search-button,
|
|
367
|
+
> ${t},
|
|
368
|
+
${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},lI=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},sI=Hr(["Input","Shared"],e=>{const t=er(e,pm(e));return[rI(t),oI(t)]},mm,{resetFont:!1}),uI=Hr(["Input","Component"],e=>{const t=er(e,pm(e));return[aI(t),iI(t),lI(t),Jp(t)]},mm,{resetFont:!1});function cI(e,t,r){var n=r||{},o=n.noTrailing,a=o===void 0?!1:o,i=n.noLeading,l=i===void 0?!1:i,s=n.debounceMode,u=s===void 0?void 0:s,c,f=!1,p=0;function h(){c&&clearTimeout(c)}function v(m){var b=m||{},y=b.upcomingOnly,C=y===void 0?!1:y;h(),f=!C}function g(){for(var m=arguments.length,b=new Array(m),y=0;y<m;y++)b[y]=arguments[y];var C=this,D=Date.now()-p;if(f)return;function w(){p=Date.now(),t.apply(C,b)}function k(){c=void 0}!l&&u&&!c&&w(),h(),u===void 0&&D>e?l?(p=Date.now(),a||(c=setTimeout(u?k:w,e))):w():a!==!0&&(c=setTimeout(u?k:w,u===void 0?e-D:e))}return g.cancel=v,g}function dI(e,t,r){var n={},o=n.atBegin,a=o===void 0?!1:o;return cI(e,t,{debounceMode:a!==!1})}function un(e,t){return e[t]}var fI=["children"];function Ux(e,t){return"".concat(e,"-").concat(t)}function pI(e){return e&&e.type&&e.type.isTreeNode}function $l(e,t){return e??t}function Ja(e){var t=e||{},r=t.title,n=t._title,o=t.key,a=t.children,i=r||"title";return{title:i,_title:n||[i],key:o||"key",children:a||"children"}}function Xx(e){function t(r){var n=_n(r);return n.map(function(o){if(!pI(o))return lr(!o,"Tree/TreeNode can only accept TreeNode as children."),null;var a=o.key,i=o.props,l=i.children,s=Ct(i,fI),u=H({key:a},s),c=t(l);return c.length&&(u.children=c),u}).filter(function(o){return o})}return t(e)}function Yc(e,t,r){var n=Ja(r),o=n._title,a=n.key,i=n.children,l=new Set(t===!0?[]:t),s=[];function u(c){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return c.map(function(p,h){for(var v=Ux(f?f.pos:"0",h),g=$l(p[a],v),m,b=0;b<o.length;b+=1){var y=o[b];if(p[y]!==void 0){m=p[y];break}}var C=Object.assign(fn(p,[].concat(Pe(o),[a,i])),{title:m,key:g,parent:f,pos:v,children:null,data:p,isStart:[].concat(Pe(f?f.isStart:[]),[h===0]),isEnd:[].concat(Pe(f?f.isEnd:[]),[h===c.length-1])});return s.push(C),t===!0||l.has(g)?C.children=u(p[i]||[],C):C.children=[],C})}return u(e),s}function mI(e,t,r){var n={};ut(r)==="object"?n=r:n={externalGetKey:r},n=n||{};var o=n,a=o.childrenPropName,i=o.externalGetKey,l=o.fieldNames,s=Ja(l),u=s.key,c=s.children,f=a||c,p;i?typeof i=="string"?p=function(v){return v[i]}:typeof i=="function"&&(p=function(v){return i(v)}):p=function(v,g){return $l(v[u],g)};function h(v,g,m,b){var y=v?v[f]:e,C=v?Ux(m.pos,g):"0",D=v?[].concat(Pe(b),[v]):[];if(v){var w=p(v,C),k={node:v,index:g,pos:C,key:w,parentPos:m.node?m.pos:null,level:m.level+1,nodes:D};t(k)}y&&y.forEach(function(E,x){h(E,x,{node:v,pos:C,level:m?m.level+1:-1},D)})}h(null)}function bm(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.initWrapper,n=t.processEntity,o=t.onProcessFinished,a=t.externalGetKey,i=t.childrenPropName,l=t.fieldNames,s=arguments.length>2?arguments[2]:void 0,u=a||s,c={},f={},p={posEntities:c,keyEntities:f};return r&&(p=r(p)||p),mI(e,function(h){var v=h.node,g=h.index,m=h.pos,b=h.key,y=h.parentPos,C=h.level,D=h.nodes,w={node:v,nodes:D,index:g,key:b,pos:m,level:C},k=$l(b,m);c[m]=w,f[k]=w,w.parent=c[y],w.parent&&(w.parent.children=w.parent.children||[],w.parent.children.push(w)),n&&n(w,p)},{externalGetKey:u,childrenPropName:i,fieldNames:l}),o&&o(p),p}function Li(e,t){var r=t.expandedKeys,n=t.selectedKeys,o=t.loadedKeys,a=t.loadingKeys,i=t.checkedKeys,l=t.halfCheckedKeys,s=t.dragOverNodeKey,u=t.dropPosition,c=t.keyEntities,f=un(c,e),p={eventKey:e,expanded:r.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:o.indexOf(e)!==-1,loading:a.indexOf(e)!==-1,checked:i.indexOf(e)!==-1,halfChecked:l.indexOf(e)!==-1,pos:String(f?f.pos:""),dragOver:s===e&&u===0,dragOverGapTop:s===e&&u===-1,dragOverGapBottom:s===e&&u===1};return p}function wr(e){var t=e.data,r=e.expanded,n=e.selected,o=e.checked,a=e.loaded,i=e.loading,l=e.halfChecked,s=e.dragOver,u=e.dragOverGapTop,c=e.dragOverGapBottom,f=e.pos,p=e.active,h=e.eventKey,v=H(H({},t),{},{expanded:r,selected:n,checked:o,loaded:a,loading:i,halfChecked:l,dragOver:s,dragOverGapTop:u,dragOverGapBottom:c,pos:f,active:p,key:h});return"props"in v||Object.defineProperty(v,"props",{get:function(){return lr(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),v}function Gx(e,t){var r=new Set;return e.forEach(function(n){t.has(n)||r.add(n)}),r}function hI(e){var t=e||{},r=t.disabled,n=t.disableCheckbox,o=t.checkable;return!!(r||n)||o===!1}function gI(e,t,r,n){for(var o=new Set(e),a=new Set,i=0;i<=r;i+=1){var l=t.get(i)||new Set;l.forEach(function(f){var p=f.key,h=f.node,v=f.children,g=v===void 0?[]:v;o.has(p)&&!n(h)&&g.filter(function(m){return!n(m.node)}).forEach(function(m){o.add(m.key)})})}for(var s=new Set,u=r;u>=0;u-=1){var c=t.get(u)||new Set;c.forEach(function(f){var p=f.parent,h=f.node;if(!(n(h)||!f.parent||s.has(f.parent.key))){if(n(f.parent.node)){s.add(p.key);return}var v=!0,g=!1;(p.children||[]).filter(function(m){return!n(m.node)}).forEach(function(m){var b=m.key,y=o.has(b);v&&!y&&(v=!1),!g&&(y||a.has(b))&&(g=!0)}),v&&o.add(p.key),g&&a.add(p.key),s.add(p.key)}})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(Gx(a,o))}}function vI(e,t,r,n,o){for(var a=new Set(e),i=new Set(t),l=0;l<=n;l+=1){var s=r.get(l)||new Set;s.forEach(function(p){var h=p.key,v=p.node,g=p.children,m=g===void 0?[]:g;!a.has(h)&&!i.has(h)&&!o(v)&&m.filter(function(b){return!o(b.node)}).forEach(function(b){a.delete(b.key)})})}i=new Set;for(var u=new Set,c=n;c>=0;c-=1){var f=r.get(c)||new Set;f.forEach(function(p){var h=p.parent,v=p.node;if(!(o(v)||!p.parent||u.has(p.parent.key))){if(o(p.parent.node)){u.add(h.key);return}var g=!0,m=!1;(h.children||[]).filter(function(b){return!o(b.node)}).forEach(function(b){var y=b.key,C=a.has(y);g&&!C&&(g=!1),!m&&(C||i.has(y))&&(m=!0)}),g||a.delete(h.key),m&&i.add(h.key),u.add(h.key)}})}return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(Gx(i,a))}}function ja(e,t,r,n){var o=[],a;n?a=n:a=hI;var i=new Set(e.filter(function(c){var f=!!un(r,c);return f||o.push(c),f})),l=new Map,s=0;Object.keys(r).forEach(function(c){var f=r[c],p=f.level,h=l.get(p);h||(h=new Set,l.set(p,h)),h.add(f),s=Math.max(s,p)}),lr(!o.length,"Tree missing follow keys: ".concat(o.slice(0,100).map(function(c){return"'".concat(c,"'")}).join(", ")));var u;return t===!0?u=gI(i,l,s,a):u=vI(i,t.halfCheckedKeys,l,s,a),u}const bI=e=>{const{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},Br(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},Br(e)),{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}}}),[t]:Object.assign(Object.assign({},Br(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:Po(e)},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${se(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${se(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[`
|
|
369
|
+
${r}:not(${r}-disabled),
|
|
370
|
+
${t}:not(${t}-disabled)
|
|
371
|
+
`]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${r}:not(${r}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`
|
|
372
|
+
${r}-checked:not(${r}-disabled),
|
|
373
|
+
${t}-checked:not(${t}-disabled)
|
|
374
|
+
`]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${r}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function Yx(e,t){const r=er(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return bI(r)}const Zx=Hr("Checkbox",(e,{prefixCls:t})=>[Yx(t,e)]),Jx=ee.createContext(null);var yI=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const CI=(e,t)=>{var r;const{prefixCls:n,className:o,rootClassName:a,children:i,indeterminate:l=!1,style:s,onMouseEnter:u,onMouseLeave:c,skipGroup:f=!1,disabled:p}=e,h=yI(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:v,direction:g,checkbox:m}=d.useContext(Zt),b=d.useContext(Jx),{isFormItemInput:y}=d.useContext(oa),C=d.useContext(No),D=(r=(b==null?void 0:b.disabled)||p)!==null&&r!==void 0?r:C,w=d.useRef(h.value),k=d.useRef(null),E=ro(t,k);d.useEffect(()=>{b==null||b.registerValue(h.value)},[]),d.useEffect(()=>{if(!f)return h.value!==w.current&&(b==null||b.cancelValue(w.current),b==null||b.registerValue(h.value),w.current=h.value),()=>b==null?void 0:b.cancelValue(h.value)},[h.value]),d.useEffect(()=>{var N;!((N=k.current)===null||N===void 0)&&N.input&&(k.current.input.indeterminate=l)},[l]);const x=v("checkbox",n),F=bo(x),[j,$,P]=Zx(x,F),A=Object.assign({},h);b&&!f&&(A.onChange=(...N)=>{h.onChange&&h.onChange.apply(h,N),b.toggleOption&&b.toggleOption({label:i,value:h.value})},A.name=b.name,A.checked=b.value.includes(h.value));const O=de(`${x}-wrapper`,{[`${x}-rtl`]:g==="rtl",[`${x}-wrapper-checked`]:A.checked,[`${x}-wrapper-disabled`]:D,[`${x}-wrapper-in-form-item`]:y},m==null?void 0:m.className,o,a,P,F,$),S=de({[`${x}-indeterminate`]:l},wu,$),[B,R]=Hx(A.onClick);return j(d.createElement(Kp,{component:"Checkbox",disabled:D},d.createElement("label",{className:O,style:Object.assign(Object.assign({},m==null?void 0:m.style),s),onMouseEnter:u,onMouseLeave:c,onClick:B},d.createElement(_x,Object.assign({},A,{onClick:R,prefixCls:x,className:S,disabled:D,ref:E})),i!=null&&d.createElement("span",{className:`${x}-label`},i))))},Qx=d.forwardRef(CI);var xI=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const wI=d.forwardRef((e,t)=>{const{defaultValue:r,children:n,options:o=[],prefixCls:a,className:i,rootClassName:l,style:s,onChange:u}=e,c=xI(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:f,direction:p}=d.useContext(Zt),[h,v]=d.useState(c.value||r||[]),[g,m]=d.useState([]);d.useEffect(()=>{"value"in c&&v(c.value||[])},[c.value]);const b=d.useMemo(()=>o.map(S=>typeof S=="string"||typeof S=="number"?{label:S,value:S}:S),[o]),y=S=>{m(B=>B.filter(R=>R!==S))},C=S=>{m(B=>[].concat(Pe(B),[S]))},D=S=>{const B=h.indexOf(S.value),R=Pe(h);B===-1?R.push(S.value):R.splice(B,1),"value"in c||v(R),u==null||u(R.filter(N=>g.includes(N)).sort((N,T)=>{const L=b.findIndex(_=>_.value===N),X=b.findIndex(_=>_.value===T);return L-X}))},w=f("checkbox",a),k=`${w}-group`,E=bo(w),[x,F,j]=Zx(w,E),$=fn(c,["value","disabled"]),P=o.length?b.map(S=>d.createElement(Qx,{prefixCls:w,key:S.value.toString(),disabled:"disabled"in S?S.disabled:c.disabled,value:S.value,checked:h.includes(S.value),onChange:S.onChange,className:de(`${k}-item`,S.className),style:S.style,title:S.title,id:S.id,required:S.required},S.label)):n,A=d.useMemo(()=>({toggleOption:D,value:h,disabled:c.disabled,name:c.name,registerValue:C,cancelValue:y}),[D,h,c.disabled,c.name,C,y]),O=de(k,{[`${k}-rtl`]:p==="rtl"},i,l,j,E,F);return x(d.createElement("div",Object.assign({className:O,style:s},$,{ref:t}),d.createElement(Jx.Provider,{value:A},P)))}),Qa=Qx;Qa.Group=wI;Qa.__ANT_CHECKBOX=!0;function EI(e){return!!(e.addonBefore||e.addonAfter)}function kI(e){return!!(e.prefix||e.suffix||e.allowClear)}function M0(e,t,r){var n=t.cloneNode(!0),o=Object.create(e,{target:{value:n},currentTarget:{value:n}});return n.value=r,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(n.selectionStart=t.selectionStart,n.selectionEnd=t.selectionEnd),n.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},o}function z0(e,t,r,n){if(r){var o=t;if(t.type==="click"){o=M0(t,e,""),r(o);return}if(e.type!=="file"&&n!==void 0){o=M0(t,e,n),r(o);return}r(o)}}function DI(e,t){if(e){e.focus(t);var r=t||{},n=r.cursor;if(n){var o=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(o,o);break;default:e.setSelectionRange(0,o)}}}}var SI=ee.forwardRef(function(e,t){var r,n,o,a=e.inputElement,i=e.children,l=e.prefixCls,s=e.prefix,u=e.suffix,c=e.addonBefore,f=e.addonAfter,p=e.className,h=e.style,v=e.disabled,g=e.readOnly,m=e.focused,b=e.triggerFocus,y=e.allowClear,C=e.value,D=e.handleReset,w=e.hidden,k=e.classes,E=e.classNames,x=e.dataAttrs,F=e.styles,j=e.components,$=e.onClear,P=i??a,A=(j==null?void 0:j.affixWrapper)||"span",O=(j==null?void 0:j.groupWrapper)||"span",S=(j==null?void 0:j.wrapper)||"span",B=(j==null?void 0:j.groupAddon)||"span",R=Ve(null),N=function(J){var ne;(ne=R.current)!==null&&ne!==void 0&&ne.contains(J.target)&&(b==null||b())},T=kI(e),L=Kw(P,{value:C,className:de((r=P.props)===null||r===void 0?void 0:r.className,!T&&(E==null?void 0:E.variant))||null}),X=Ve(null);if(ee.useImperativeHandle(t,function(){return{nativeElement:X.current||R.current}}),T){var _=null;if(y){var q=!v&&!g&&C,Q="".concat(l,"-clear-icon"),te=ut(y)==="object"&&y!==null&&y!==void 0&&y.clearIcon?y.clearIcon:"\u2716";_=ee.createElement("button",{type:"button",tabIndex:-1,onClick:function(J){D==null||D(J),$==null||$()},onMouseDown:function(J){return J.preventDefault()},className:de(Q,M(M({},"".concat(Q,"-hidden"),!q),"".concat(Q,"-has-suffix"),!!u))},te)}var z="".concat(l,"-affix-wrapper"),Y=de(z,M(M(M(M(M({},"".concat(l,"-disabled"),v),"".concat(z,"-disabled"),v),"".concat(z,"-focused"),m),"".concat(z,"-readonly"),g),"".concat(z,"-input-with-clear-btn"),u&&y&&C),k==null?void 0:k.affixWrapper,E==null?void 0:E.affixWrapper,E==null?void 0:E.variant),V=(u||y)&&ee.createElement("span",{className:de("".concat(l,"-suffix"),E==null?void 0:E.suffix),style:F==null?void 0:F.suffix},_,u);L=ee.createElement(A,Te({className:Y,style:F==null?void 0:F.affixWrapper,onClick:N},x==null?void 0:x.affixWrapper,{ref:R}),s&&ee.createElement("span",{className:de("".concat(l,"-prefix"),E==null?void 0:E.prefix),style:F==null?void 0:F.prefix},s),L,V)}if(EI(e)){var G="".concat(l,"-group"),K="".concat(G,"-addon"),W="".concat(G,"-wrapper"),re=de("".concat(l,"-wrapper"),G,k==null?void 0:k.wrapper,E==null?void 0:E.wrapper),U=de(W,M({},"".concat(W,"-disabled"),v),k==null?void 0:k.group,E==null?void 0:E.groupWrapper);L=ee.createElement(O,{className:U,ref:X},ee.createElement(S,{className:re},c&&ee.createElement(B,{className:K},c),L,f&&ee.createElement(B,{className:K},f)))}return ee.cloneElement(L,{className:de((n=L.props)===null||n===void 0?void 0:n.className,p)||null,style:H(H({},(o=L.props)===null||o===void 0?void 0:o.style),h),hidden:w})}),$I=["show"];function BI(e,t){return d.useMemo(function(){var r={};t&&(r.show=ut(t)==="object"&&t.formatter?t.formatter:!!t),r=H(H({},r),e);var n=r,o=n.show,a=Ct(n,$I);return H(H({},a),{},{show:!!o,showFormatter:typeof o=="function"?o:void 0,strategy:a.strategy||function(i){return i.length}})},[e,t])}var OI=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],AI=dn(function(e,t){var r=e.autoComplete,n=e.onChange,o=e.onFocus,a=e.onBlur,i=e.onPressEnter,l=e.onKeyDown,s=e.onKeyUp,u=e.prefixCls,c=u===void 0?"rc-input":u,f=e.disabled,p=e.htmlSize,h=e.className,v=e.maxLength,g=e.suffix,m=e.showCount,b=e.count,y=e.type,C=y===void 0?"text":y,D=e.classes,w=e.classNames,k=e.styles,E=e.onCompositionStart,x=e.onCompositionEnd,F=Ct(e,OI),j=wt(!1),$=ce(j,2),P=$[0],A=$[1],O=Ve(!1),S=Ve(!1),B=Ve(null),R=Ve(null),N=function(be){B.current&&DI(B.current,be)},T=Ur(e.defaultValue,{value:e.value}),L=ce(T,2),X=L[0],_=L[1],q=X==null?"":String(X),Q=wt(null),te=ce(Q,2),z=te[0],Y=te[1],V=BI(b,m),G=V.max||v,K=V.strategy(q),W=!!G&&K>G;ei(t,function(){var be;return{focus:N,blur:function(){var ye;(ye=B.current)===null||ye===void 0||ye.blur()},setSelectionRange:function(ye,Ae,we){var He;(He=B.current)===null||He===void 0||He.setSelectionRange(ye,Ae,we)},select:function(){var ye;(ye=B.current)===null||ye===void 0||ye.select()},input:B.current,nativeElement:((be=R.current)===null||be===void 0?void 0:be.nativeElement)||B.current}}),Ot(function(){S.current&&(S.current=!1),A(function(be){return be&&f?!1:be})},[f]);var re=function(be,ye,Ae){var we=ye;if(!O.current&&V.exceedFormatter&&V.max&&V.strategy(ye)>V.max){if(we=V.exceedFormatter(ye,{max:V.max}),ye!==we){var He,Me;Y([((He=B.current)===null||He===void 0?void 0:He.selectionStart)||0,((Me=B.current)===null||Me===void 0?void 0:Me.selectionEnd)||0])}}else if(Ae.source==="compositionEnd")return;_(we),B.current&&z0(B.current,be,n,we)};Ot(function(){if(z){var be;(be=B.current)===null||be===void 0||be.setSelectionRange.apply(be,Pe(z))}},[z]);var U=function(be){re(be,be.target.value,{source:"change"})},J=function(be){O.current=!1,re(be,be.currentTarget.value,{source:"compositionEnd"}),x==null||x(be)},ne=function(be){i&&be.key==="Enter"&&!S.current&&(S.current=!0,i(be)),l==null||l(be)},ue=function(be){be.key==="Enter"&&(S.current=!1),s==null||s(be)},me=function(be){A(!0),o==null||o(be)},Ce=function(be){S.current&&(S.current=!1),A(!1),a==null||a(be)},Ne=function(be){_(""),N(),B.current&&z0(B.current,be,n)},pe=W&&"".concat(c,"-out-of-range"),he=function(){var be=fn(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return ee.createElement("input",Te({autoComplete:r},be,{onChange:U,onFocus:me,onBlur:Ce,onKeyDown:ne,onKeyUp:ue,className:de(c,M({},"".concat(c,"-disabled"),f),w==null?void 0:w.input),style:k==null?void 0:k.input,ref:B,size:p,type:C,onCompositionStart:function(ye){O.current=!0,E==null||E(ye)},onCompositionEnd:J}))},ve=function(){var be=Number(G)>0;if(g||V.show){var ye=V.showFormatter?V.showFormatter({value:q,count:K,maxLength:G}):"".concat(K).concat(be?" / ".concat(G):"");return ee.createElement(ee.Fragment,null,V.show&&ee.createElement("span",{className:de("".concat(c,"-show-count-suffix"),M({},"".concat(c,"-show-count-has-suffix"),!!g),w==null?void 0:w.count),style:H({},k==null?void 0:k.count)},ye),g)}return null};return ee.createElement(SI,Te({},F,{prefixCls:c,className:de(h,pe),handleReset:Ne,value:q,focused:P,triggerFocus:N,suffix:ve(),disabled:f,classes:D,classNames:w,styles:k,ref:R}),he())});const FI=e=>{let t;return typeof e=="object"&&(e!=null&&e.clearIcon)?t=e:e&&(t={clearIcon:ee.createElement(hC,null)}),t};function NI(e,t){const r=Ve([]),n=()=>{r.current.push(setTimeout(()=>{var o,a,i,l;!((o=e.current)===null||o===void 0)&&o.input&&((a=e.current)===null||a===void 0?void 0:a.input.getAttribute("type"))==="password"&&!((i=e.current)===null||i===void 0)&&i.input.hasAttribute("value")&&((l=e.current)===null||l===void 0||l.input.removeAttribute("value"))}))};return Ot(()=>(n(),()=>r.current.forEach(o=>{o&&clearTimeout(o)})),[]),n}function PI(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var jI=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const RI=dn((e,t)=>{const{prefixCls:r,bordered:n=!0,status:o,size:a,disabled:i,onBlur:l,onFocus:s,suffix:u,allowClear:c,addonAfter:f,addonBefore:p,className:h,style:v,styles:g,rootClassName:m,onChange:b,classNames:y,variant:C}=e,D=jI(e,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:w,direction:k,allowClear:E,autoComplete:x,className:F,style:j,classNames:$,styles:P}=Io("input"),A=w("input",r),O=Ve(null),S=bo(A),[B,R,N]=sI(A,m),[T]=uI(A,S),{compactSize:L,compactItemClassnames:X}=ku(A,k),_=fa(Ce=>{var Ne;return(Ne=a??L)!==null&&Ne!==void 0?Ne:Ce}),q=ee.useContext(No),Q=i??q,{status:te,hasFeedback:z,feedbackIcon:Y}=Ir(oa),V=ex(te,o),G=PI(e)||!!z;Ve(G);const K=NI(O),W=Ce=>{K(),l==null||l(Ce)},re=Ce=>{K(),s==null||s(Ce)},U=Ce=>{K(),b==null||b(Ce)},J=(z||u)&&ee.createElement(ee.Fragment,null,u,z&&Y),ne=FI(c??E),[ue,me]=ox("input",C,n);return B(T(ee.createElement(AI,Object.assign({ref:ro(t,O),prefixCls:A,autoComplete:x},D,{disabled:Q,onBlur:W,onFocus:re,style:Object.assign(Object.assign({},j),v),styles:Object.assign(Object.assign({},P),g),suffix:J,allowClear:ne,className:de(h,m,N,S,X,F),onChange:U,addonBefore:p&&ee.createElement(dl,{form:!0,space:!0},p),addonAfter:f&&ee.createElement(dl,{form:!0,space:!0},f),classNames:Object.assign(Object.assign(Object.assign({},y),$),{input:de({[`${A}-sm`]:_==="small",[`${A}-lg`]:_==="large",[`${A}-rtl`]:k==="rtl"},y==null?void 0:y.input,$.input,R),variant:de({[`${A}-${ue}`]:me},jf(A,V)),affixWrapper:de({[`${A}-affix-wrapper-sm`]:_==="small",[`${A}-affix-wrapper-lg`]:_==="large",[`${A}-affix-wrapper-rtl`]:k==="rtl"},R),wrapper:de({[`${A}-group-rtl`]:k==="rtl"},R),groupWrapper:de({[`${A}-group-wrapper-sm`]:_==="small",[`${A}-group-wrapper-lg`]:_==="large",[`${A}-group-wrapper-rtl`]:k==="rtl",[`${A}-group-wrapper-${ue}`]:me},jf(`${A}-group-wrapper`,V,z),R)})}))))});function L0(e){return["small","middle","large"].includes(e)}function _0(e){return e?typeof e=="number"&&!Number.isNaN(e):!1}const ew=ee.createContext({latestIndex:0}),II=ew.Provider,TI=({className:e,index:t,children:r,split:n,style:o})=>{const{latestIndex:a}=d.useContext(ew);return r==null?null:d.createElement(d.Fragment,null,d.createElement("div",{className:e,style:o},r),t<a&&n&&d.createElement("span",{className:`${e}-split`},n))};var MI=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const zI=d.forwardRef((e,t)=>{var r;const{getPrefixCls:n,direction:o,size:a,className:i,style:l,classNames:s,styles:u}=Io("space"),{size:c=a??"small",align:f,className:p,rootClassName:h,children:v,direction:g="horizontal",prefixCls:m,split:b,style:y,wrap:C=!1,classNames:D,styles:w}=e,k=MI(e,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[E,x]=Array.isArray(c)?c:[c,c],F=L0(x),j=L0(E),$=_0(x),P=_0(E),A=_n(v,{keepEmpty:!0}),O=f===void 0&&g==="horizontal"?"center":f,S=n("space",m),[B,R,N]=wC(S),T=de(S,i,R,`${S}-${g}`,{[`${S}-rtl`]:o==="rtl",[`${S}-align-${O}`]:O,[`${S}-gap-row-${x}`]:F,[`${S}-gap-col-${E}`]:j},p,h,N),L=de(`${S}-item`,(r=D==null?void 0:D.item)!==null&&r!==void 0?r:s.item);let X=0;const _=A.map((te,z)=>{var Y;te!=null&&(X=z);const V=(te==null?void 0:te.key)||`${L}-${z}`;return d.createElement(TI,{className:L,key:V,index:z,split:b,style:(Y=w==null?void 0:w.item)!==null&&Y!==void 0?Y:u.item},te)}),q=d.useMemo(()=>({latestIndex:X}),[X]);if(A.length===0)return null;const Q={};return C&&(Q.flexWrap="wrap"),!j&&P&&(Q.columnGap=E),!F&&$&&(Q.rowGap=x),B(d.createElement("div",Object.assign({ref:t,className:T,style:Object.assign(Object.assign(Object.assign({},Q),l),y)},k),d.createElement(II,{value:q},_)))}),tw=zI;tw.Compact=i5;var LI=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const rw=e=>{const{getPopupContainer:t,getPrefixCls:r,direction:n}=d.useContext(Zt),{prefixCls:o,type:a="default",danger:i,disabled:l,loading:s,onClick:u,htmlType:c,children:f,className:p,menu:h,arrow:v,autoFocus:g,overlay:m,trigger:b,align:y,open:C,onOpenChange:D,placement:w,getPopupContainer:k,href:E,icon:x=d.createElement(jx,null),title:F,buttonsRender:j=K=>K,mouseEnterDelay:$,mouseLeaveDelay:P,overlayClassName:A,overlayStyle:O,destroyOnHidden:S,destroyPopupOnHide:B,dropdownRender:R,popupRender:N}=e,T=LI(e,["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"]),L=r("dropdown",o),X=`${L}-button`,_={menu:h,arrow:v,autoFocus:g,align:y,disabled:l,trigger:l?[]:b,onOpenChange:D,getPopupContainer:k||t,mouseEnterDelay:$,mouseLeaveDelay:P,overlayClassName:A,overlayStyle:O,destroyOnHidden:S,popupRender:N||R},{compactSize:q,compactItemClassnames:Q}=ku(L,n),te=de(X,Q,p);"destroyPopupOnHide"in e&&(_.destroyPopupOnHide=B),"overlay"in e&&(_.overlay=m),"open"in e&&(_.open=C),"placement"in e?_.placement=w:_.placement=n==="rtl"?"bottomLeft":"bottomRight";const z=d.createElement(Ya,{type:a,danger:i,disabled:l,loading:s,onClick:u,htmlType:c,href:E,title:F},f),Y=d.createElement(Ya,{type:a,danger:i,icon:x}),[V,G]=j([z,Y]);return d.createElement(tw.Compact,Object.assign({className:te,size:q,block:!0},T),V,d.createElement(Tu,Object.assign({},_),G))};rw.__ANT_BUTTON=!0;const ym=Tu;ym.Button=rw;function H0(e,t,r,n){var o=Hi.unstable_batchedUpdates?function(a){Hi.unstable_batchedUpdates(r,a)}:r;return e!=null&&e.addEventListener&&e.addEventListener(t,o,n),{remove:function(){e!=null&&e.removeEventListener&&e.removeEventListener(t,o,n)}}}var _I={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"},HI=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:_I}))},W0=d.forwardRef(HI),WI={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"},KI=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:WI}))},K0=d.forwardRef(KI),qI={items_per_page:"\u6761/\u9875",jump_to:"\u8DF3\u81F3",jump_to_confirm:"\u786E\u5B9A",page:"\u9875",prev_page:"\u4E0A\u4E00\u9875",next_page:"\u4E0B\u4E00\u9875",prev_5:"\u5411\u524D 5 \u9875",next_5:"\u5411\u540E 5 \u9875",prev_3:"\u5411\u524D 3 \u9875",next_3:"\u5411\u540E 3 \u9875",page_size:"\u9875\u7801"},VI=[10,20,50,100],UI=function(e){var t=e.pageSizeOptions,r=t===void 0?VI:t,n=e.locale,o=e.changeSize,a=e.pageSize,i=e.goButton,l=e.quickGo,s=e.rootPrefixCls,u=e.disabled,c=e.buildOptionText,f=e.showSizeChanger,p=e.sizeChangerRender,h=ee.useState(""),v=ce(h,2),g=v[0],m=v[1],b=function(){return!g||Number.isNaN(g)?void 0:Number(g)},y=typeof c=="function"?c:function($){return"".concat($," ").concat(n.items_per_page)},C=function($){m($.target.value)},D=function($){i||g===""||(m(""),!($.relatedTarget&&($.relatedTarget.className.indexOf("".concat(s,"-item-link"))>=0||$.relatedTarget.className.indexOf("".concat(s,"-item"))>=0))&&(l==null||l(b())))},w=function($){g!==""&&($.keyCode===ot.ENTER||$.type==="click")&&(m(""),l==null||l(b()))},k=function(){return r.some(function($){return $.toString()===a.toString()})?r:r.concat([a]).sort(function($,P){var A=Number.isNaN(Number($))?0:Number($),O=Number.isNaN(Number(P))?0:Number(P);return A-O})},E="".concat(s,"-options");if(!f&&!l)return null;var x=null,F=null,j=null;return f&&p&&(x=p({disabled:u,size:a,onSizeChange:function($){o==null||o(Number($))},"aria-label":n.page_size,className:"".concat(E,"-size-changer"),options:k().map(function($){return{label:y($),value:$}})})),l&&(i&&(j=typeof i=="boolean"?ee.createElement("button",{type:"button",onClick:w,onKeyUp:w,disabled:u,className:"".concat(E,"-quick-jumper-button")},n.jump_to_confirm):ee.createElement("span",{onClick:w,onKeyUp:w},i)),F=ee.createElement("div",{className:"".concat(E,"-quick-jumper")},n.jump_to,ee.createElement("input",{disabled:u,type:"text",value:g,onChange:C,onKeyUp:w,onBlur:D,"aria-label":n.page}),n.page,j)),ee.createElement("li",{className:E},x,F)},ki=function(e){var t=e.rootPrefixCls,r=e.page,n=e.active,o=e.className,a=e.showTitle,i=e.onClick,l=e.onKeyPress,s=e.itemRender,u="".concat(t,"-item"),c=de(u,"".concat(u,"-").concat(r),M(M({},"".concat(u,"-active"),n),"".concat(u,"-disabled"),!r),o),f=function(){i(r)},p=function(v){l(v,i,r)},h=s(r,"page",ee.createElement("a",{rel:"nofollow"},r));return h?ee.createElement("li",{title:a?String(r):null,className:c,onClick:f,onKeyDown:p,tabIndex:0},h):null},XI=function(e,t,r){return r};function q0(){}function V0(e){var t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function zo(e,t,r){var n=typeof e>"u"?t:e;return Math.floor((r-1)/n)+1}var GI=function(e){var t=e.prefixCls,r=t===void 0?"rc-pagination":t,n=e.selectPrefixCls,o=n===void 0?"rc-select":n,a=e.className,i=e.current,l=e.defaultCurrent,s=l===void 0?1:l,u=e.total,c=u===void 0?0:u,f=e.pageSize,p=e.defaultPageSize,h=p===void 0?10:p,v=e.onChange,g=v===void 0?q0:v,m=e.hideOnSinglePage,b=e.align,y=e.showPrevNextJumpers,C=y===void 0?!0:y,D=e.showQuickJumper,w=e.showLessItems,k=e.showTitle,E=k===void 0?!0:k,x=e.onShowSizeChange,F=x===void 0?q0:x,j=e.locale,$=j===void 0?qI:j,P=e.style,A=e.totalBoundaryShowSizeChanger,O=A===void 0?50:A,S=e.disabled,B=e.simple,R=e.showTotal,N=e.showSizeChanger,T=N===void 0?c>O:N,L=e.sizeChangerRender,X=e.pageSizeOptions,_=e.itemRender,q=_===void 0?XI:_,Q=e.jumpPrevIcon,te=e.jumpNextIcon,z=e.prevIcon,Y=e.nextIcon,V=ee.useRef(null),G=Ur(10,{value:f,defaultValue:h}),K=ce(G,2),W=K[0],re=K[1],U=Ur(1,{value:i,defaultValue:s,postState:function(dt){return Math.max(1,Math.min(dt,zo(void 0,W,c)))}}),J=ce(U,2),ne=J[0],ue=J[1],me=ee.useState(ne),Ce=ce(me,2),Ne=Ce[0],pe=Ce[1];Ot(function(){pe(ne)},[ne]);var he=Math.max(1,ne-(w?3:5)),ve=Math.min(zo(void 0,W,c),ne+(w?3:5));function be(dt,$t){var Bt=dt||ee.createElement("button",{type:"button","aria-label":$t,className:"".concat(r,"-item-link")});return typeof dt=="function"&&(Bt=ee.createElement(dt,H({},e))),Bt}function ye(dt){var $t=dt.target.value,Bt=zo(void 0,W,c),Ut;return $t===""?Ut=$t:Number.isNaN(Number($t))?Ut=Ne:$t>=Bt?Ut=Bt:Ut=Number($t),Ut}function Ae(dt){return V0(dt)&&dt!==ne&&V0(c)&&c>0}var we=c>W?D:!1;function He(dt){(dt.keyCode===ot.UP||dt.keyCode===ot.DOWN)&&dt.preventDefault()}function Me(dt){var $t=ye(dt);switch($t!==Ne&&pe($t),dt.keyCode){case ot.ENTER:Se($t);break;case ot.UP:Se($t-1);break;case ot.DOWN:Se($t+1);break}}function Fe(dt){Se(ye(dt))}function ge(dt){var $t=zo(dt,W,c),Bt=ne>$t&&$t!==0?$t:ne;re(dt),pe(Bt),F==null||F(ne,dt),ue(Bt),g==null||g(Bt,dt)}function Se(dt){if(Ae(dt)&&!S){var $t=zo(void 0,W,c),Bt=dt;return dt>$t?Bt=$t:dt<1&&(Bt=1),Bt!==Ne&&pe(Bt),ue(Bt),g==null||g(Bt,W),Bt}return ne}var qe=ne>1,Ye=ne<zo(void 0,W,c);function Xe(){qe&&Se(ne-1)}function Re(){Ye&&Se(ne+1)}function lt(){Se(he)}function je(){Se(ve)}function at(dt,$t){if(dt.key==="Enter"||dt.charCode===ot.ENTER||dt.keyCode===ot.ENTER){for(var Bt=arguments.length,Ut=new Array(Bt>2?Bt-2:0),Tr=2;Tr<Bt;Tr++)Ut[Tr-2]=arguments[Tr];$t.apply(void 0,Ut)}}function vt(dt){at(dt,Xe)}function At(dt){at(dt,Re)}function fe(dt){at(dt,lt)}function Oe(dt){at(dt,je)}function rt(dt){var $t=q(dt,"prev",be(z,"prev page"));return ee.isValidElement($t)?ee.cloneElement($t,{disabled:!qe}):$t}function Ke(dt){var $t=q(dt,"next",be(Y,"next page"));return ee.isValidElement($t)?ee.cloneElement($t,{disabled:!Ye}):$t}function ke(dt){(dt.type==="click"||dt.keyCode===ot.ENTER)&&Se(Ne)}var Be=null,ie=Qn(e,{aria:!0,data:!0}),De=R&&ee.createElement("li",{className:"".concat(r,"-total-text")},R(c,[c===0?0:(ne-1)*W+1,ne*W>c?c:ne*W])),Z=null,le=zo(void 0,W,c);if(m&&c<=W)return null;var ze=[],xe={rootPrefixCls:r,onClick:Se,onKeyPress:at,showTitle:E,itemRender:q,page:-1},_e=ne-1>0?ne-1:0,We=ne+1<le?ne+1:le,Ge=D&&D.goButton,ft=ut(B)==="object"?B.readOnly:!B,pt=Ge,Ze=null;B&&(Ge&&(typeof Ge=="boolean"?pt=ee.createElement("button",{type:"button",onClick:ke,onKeyUp:ke},$.jump_to_confirm):pt=ee.createElement("span",{onClick:ke,onKeyUp:ke},Ge),pt=ee.createElement("li",{title:E?"".concat($.jump_to).concat(ne,"/").concat(le):null,className:"".concat(r,"-simple-pager")},pt)),Ze=ee.createElement("li",{title:E?"".concat(ne,"/").concat(le):null,className:"".concat(r,"-simple-pager")},ft?Ne:ee.createElement("input",{type:"text","aria-label":$.jump_to,value:Ne,disabled:S,onKeyDown:He,onKeyUp:Me,onChange:Me,onBlur:Fe,size:3}),ee.createElement("span",{className:"".concat(r,"-slash")},"/"),le));var Je=w?1:2;if(le<=3+Je*2){le||ze.push(ee.createElement(ki,Te({},xe,{key:"noPager",page:1,className:"".concat(r,"-item-disabled")})));for(var it=1;it<=le;it+=1)ze.push(ee.createElement(ki,Te({},xe,{key:it,page:it,active:ne===it})))}else{var mt=w?$.prev_3:$.prev_5,Pt=w?$.next_3:$.next_5,jt=q(he,"jump-prev",be(Q,"prev page")),Rt=q(ve,"jump-next",be(te,"next page"));C&&(Be=jt?ee.createElement("li",{title:E?mt:null,key:"prev",onClick:lt,tabIndex:0,onKeyDown:fe,className:de("".concat(r,"-jump-prev"),M({},"".concat(r,"-jump-prev-custom-icon"),!!Q))},jt):null,Z=Rt?ee.createElement("li",{title:E?Pt:null,key:"next",onClick:je,tabIndex:0,onKeyDown:Oe,className:de("".concat(r,"-jump-next"),M({},"".concat(r,"-jump-next-custom-icon"),!!te))},Rt):null);var kt=Math.max(1,ne-Je),Jt=Math.min(ne+Je,le);ne-1<=Je&&(Jt=1+Je*2),le-ne<=Je&&(kt=le-Je*2);for(var pr=kt;pr<=Jt;pr+=1)ze.push(ee.createElement(ki,Te({},xe,{key:pr,page:pr,active:ne===pr})));if(ne-1>=Je*2&&ne!==3&&(ze[0]=ee.cloneElement(ze[0],{className:de("".concat(r,"-item-after-jump-prev"),ze[0].props.className)}),ze.unshift(Be)),le-ne>=Je*2&&ne!==le-2){var Le=ze[ze.length-1];ze[ze.length-1]=ee.cloneElement(Le,{className:de("".concat(r,"-item-before-jump-next"),Le.props.className)}),ze.push(Z)}kt!==1&&ze.unshift(ee.createElement(ki,Te({},xe,{key:1,page:1}))),Jt!==le&&ze.push(ee.createElement(ki,Te({},xe,{key:le,page:le})))}var et=rt(_e);if(et){var bt=!qe||!le;et=ee.createElement("li",{title:E?$.prev_page:null,onClick:Xe,tabIndex:bt?null:0,onKeyDown:vt,className:de("".concat(r,"-prev"),M({},"".concat(r,"-disabled"),bt)),"aria-disabled":bt},et)}var Tt=Ke(We);if(Tt){var Ft,yr;B?(Ft=!Ye,yr=qe?0:null):(Ft=!Ye||!le,yr=Ft?null:0),Tt=ee.createElement("li",{title:E?$.next_page:null,onClick:Re,tabIndex:yr,onKeyDown:At,className:de("".concat(r,"-next"),M({},"".concat(r,"-disabled"),Ft)),"aria-disabled":Ft},Tt)}var Cr=de(r,a,M(M(M(M(M({},"".concat(r,"-start"),b==="start"),"".concat(r,"-center"),b==="center"),"".concat(r,"-end"),b==="end"),"".concat(r,"-simple"),B),"".concat(r,"-disabled"),S));return ee.createElement("ul",Te({className:Cr,style:P,ref:V},ie),De,et,B?Ze:ze,Tt,ee.createElement(UI,{locale:$,rootPrefixCls:r,disabled:S,selectPrefixCls:o,changeSize:ge,pageSize:W,pageSizeOptions:X,quickGo:we?Se:null,goButton:pt,showSizeChanger:T,sizeChangerRender:L}))};const YI=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},ZI=e=>{const{componentCls:t}=e;return{[`&${t}-mini ${t}-total-text, &${t}-mini ${t}-simple-pager`]:{height:e.itemSizeSM,lineHeight:se(e.itemSizeSM)},[`&${t}-mini ${t}-item`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:se(e.calc(e.itemSizeSM).sub(2).equal())},[`&${t}-mini ${t}-prev, &${t}-mini ${t}-next`]:{minWidth:e.itemSizeSM,height:e.itemSizeSM,margin:0,lineHeight:se(e.itemSizeSM)},[`&${t}-mini:not(${t}-disabled)`]:{[`${t}-prev, ${t}-next`]:{[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover ${t}-item-link`]:{backgroundColor:"transparent"}}},[`
|
|
375
|
+
&${t}-mini ${t}-prev ${t}-item-link,
|
|
376
|
+
&${t}-mini ${t}-next ${t}-item-link
|
|
377
|
+
`]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:e.itemSizeSM,lineHeight:se(e.itemSizeSM)}},[`&${t}-mini ${t}-jump-prev, &${t}-mini ${t}-jump-next`]:{height:e.itemSizeSM,marginInlineEnd:0,lineHeight:se(e.itemSizeSM)},[`&${t}-mini ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:e.miniOptionsSizeChangerTop},"&-quick-jumper":{height:e.itemSizeSM,lineHeight:se(e.itemSizeSM),input:Object.assign(Object.assign({},gm(e)),{width:e.paginationMiniQuickJumperInputWidth,height:e.controlHeightSM})}}}},JI=e=>{const{componentCls:t}=e;return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSize,lineHeight:se(e.itemSize),verticalAlign:"top",[`${t}-item-link`]:{height:e.itemSize,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:e.itemSize,lineHeight:se(e.itemSize)}}},[`${t}-simple-pager`]:{display:"inline-flex",alignItems:"center",height:e.itemSize,marginInlineEnd:e.marginXS,input:{boxSizing:"border-box",height:"100%",width:e.quickJumperInputWidth,padding:`0 ${se(e.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:e.itemInputBg,border:`${se(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:"none",transition:`border-color ${e.motionDurationMid}`,color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${se(e.inputOutlineOffset)} 0 ${se(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}},[`&${t}-mini`]:{[`${t}-prev, ${t}-next`]:{height:e.itemSizeSM,lineHeight:se(e.itemSizeSM),[`${t}-item-link`]:{height:e.itemSizeSM,"&::after":{height:e.itemSizeSM,lineHeight:se(e.itemSizeSM)}}},[`${t}-simple-pager`]:{height:e.itemSizeSM,width:e.paginationMiniQuickJumperInputWidth}}}}},QI=e=>{const{componentCls:t}=e;return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:"relative",[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${t}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[`
|
|
378
|
+
${t}-prev,
|
|
379
|
+
${t}-jump-prev,
|
|
380
|
+
${t}-jump-next
|
|
381
|
+
`]:{marginInlineEnd:e.marginXS},[`
|
|
382
|
+
${t}-prev,
|
|
383
|
+
${t}-next,
|
|
384
|
+
${t}-jump-prev,
|
|
385
|
+
${t}-jump-next
|
|
386
|
+
`]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,color:e.colorText,fontFamily:e.fontFamily,lineHeight:se(e.itemSize),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${se(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:"none",transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:"transparent"}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:e.controlHeight,marginInlineStart:e.marginXS,lineHeight:se(e.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},vm(e)),hm(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow})),{"&[disabled]":Object.assign({},Mu(e)),width:e.quickJumperInputWidth,height:e.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:e.marginXS,marginInlineEnd:e.marginXS})}}}},eT=e=>{const{componentCls:t}=e;return{[`${t}-item`]:{display:"inline-block",minWidth:e.itemSize,height:e.itemSize,marginInlineEnd:e.marginXS,fontFamily:e.fontFamily,lineHeight:se(e.calc(e.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:e.itemBg,border:`${se(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${se(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.colorPrimary},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.colorPrimaryHover}}}}},tT=e=>{const{componentCls:t}=e;return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Br(e)),{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:'""'},[`${t}-total-text`]:{display:"inline-block",height:e.itemSize,marginInlineEnd:e.marginXS,lineHeight:se(e.calc(e.itemSize).sub(2).equal()),verticalAlign:"middle"}}),eT(e)),QI(e)),JI(e)),ZI(e)),YI(e)),{[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:"none"}}}),[`&${e.componentCls}-rtl`]:{direction:"rtl"}}},rT=e=>{const{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:Object.assign({},ul(e)),[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":Object.assign({[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}},Po(e))},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:Po(e)}}}},nw=e=>Object.assign({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemActiveBg:e.colorBgContainer,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0},mm(e)),ow=e=>er(e,{inputOutlineOffset:0,quickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.25).equal(),paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},pm(e)),nT=Hr("Pagination",e=>{const t=ow(e);return[tT(t),rT(t)]},nw),oT=e=>{const{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled:not(${t}-mini)`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered:not(${t}-mini)`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${se(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},aT=Q1(["Pagination","bordered"],e=>{const t=ow(e);return oT(t)},nw);function U0(e){return Et(()=>typeof e=="boolean"?[e,{}]:e&&typeof e=="object"?[!0,e]:[void 0,void 0],[e])}var iT=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const aw=e=>{const{align:t,prefixCls:r,selectPrefixCls:n,className:o,rootClassName:a,style:i,size:l,locale:s,responsive:u,showSizeChanger:c,selectComponentClass:f,pageSizeOptions:p}=e,h=iT(e,["align","prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","responsive","showSizeChanger","selectComponentClass","pageSizeOptions"]),{xs:v}=fx(u),[,g]=Yr(),{getPrefixCls:m,direction:b,showSizeChanger:y,className:C,style:D}=Io("pagination"),w=m("pagination",r),[k,E,x]=nT(w),F=fa(l),j=F==="small"||!!(v&&!F&&u),[$]=bu("Pagination",z1),P=Object.assign(Object.assign({},$),s),[A,O]=U0(c),[S,B]=U0(y),R=A??S,N=O??B,T=f||li,L=d.useMemo(()=>p?p.map(z=>Number(z)):void 0,[p]),X=z=>{var Y;const{disabled:V,size:G,onSizeChange:K,"aria-label":W,className:re,options:U}=z,{className:J,onChange:ne}=N||{},ue=(Y=U.find(me=>String(me.value)===String(G)))===null||Y===void 0?void 0:Y.value;return d.createElement(T,Object.assign({disabled:V,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:me=>me.parentNode,"aria-label":W,options:U},N,{value:ue,onChange:(me,Ce)=>{K==null||K(me),ne==null||ne(me,Ce)},size:j?"small":"middle",className:de(re,J)}))},_=d.useMemo(()=>{const z=d.createElement("span",{className:`${w}-item-ellipsis`},"\u2022\u2022\u2022"),Y=d.createElement("button",{className:`${w}-item-link`,type:"button",tabIndex:-1},b==="rtl"?d.createElement(vf,null):d.createElement(Rf,null)),V=d.createElement("button",{className:`${w}-item-link`,type:"button",tabIndex:-1},b==="rtl"?d.createElement(Rf,null):d.createElement(vf,null)),G=d.createElement("a",{className:`${w}-item-link`},d.createElement("div",{className:`${w}-item-container`},b==="rtl"?d.createElement(K0,{className:`${w}-item-link-icon`}):d.createElement(W0,{className:`${w}-item-link-icon`}),z)),K=d.createElement("a",{className:`${w}-item-link`},d.createElement("div",{className:`${w}-item-container`},b==="rtl"?d.createElement(W0,{className:`${w}-item-link-icon`}):d.createElement(K0,{className:`${w}-item-link-icon`}),z));return{prevIcon:Y,nextIcon:V,jumpPrevIcon:G,jumpNextIcon:K}},[b,w]),q=m("select",n),Q=de({[`${w}-${t}`]:!!t,[`${w}-mini`]:j,[`${w}-rtl`]:b==="rtl",[`${w}-bordered`]:g.wireframe},C,o,a,E,x),te=Object.assign(Object.assign({},D),i);return k(d.createElement(d.Fragment,null,g.wireframe&&d.createElement(aT,{prefixCls:w}),d.createElement(GI,Object.assign({},_,h,{style:te,prefixCls:w,selectPrefixCls:q,className:Q,locale:P,pageSizeOptions:L,showSizeChanger:R,sizeChangerRender:X}))))},Ys=100,iw=Ys/5,lw=Ys/2-iw/2,Zc=lw*2*Math.PI,X0=50,G0=e=>{const{dotClassName:t,style:r,hasCircleCls:n}=e;return d.createElement("circle",{className:de(`${t}-circle`,{[`${t}-circle-bg`]:n}),r:lw,cx:X0,cy:X0,strokeWidth:iw,style:r})},lT=({percent:e,prefixCls:t})=>{const r=`${t}-dot`,n=`${r}-holder`,o=`${n}-hidden`,[a,i]=d.useState(!1);Wt(()=>{e!==0&&i(!0)},[e!==0]);const l=Math.max(Math.min(e,100),0);if(!a)return null;const s={strokeDashoffset:`${Zc/4}`,strokeDasharray:`${Zc*l/100} ${Zc*(100-l)/100}`};return d.createElement("span",{className:de(n,`${r}-progress`,l<=0&&o)},d.createElement("svg",{viewBox:`0 0 ${Ys} ${Ys}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":l},d.createElement(G0,{dotClassName:r,hasCircleCls:!0}),d.createElement(G0,{dotClassName:r,style:s})))};function sT(e){const{prefixCls:t,percent:r=0}=e,n=`${t}-dot`,o=`${n}-holder`,a=`${o}-hidden`;return d.createElement(d.Fragment,null,d.createElement("span",{className:de(o,r>0&&a)},d.createElement("span",{className:de(n,`${t}-dot-spin`)},[1,2,3,4].map(i=>d.createElement("i",{className:`${t}-dot-item`,key:i})))),d.createElement(lT,{prefixCls:t,percent:r}))}function uT(e){var t;const{prefixCls:r,indicator:n,percent:o}=e,a=`${r}-dot`;return n&&d.isValidElement(n)?eo(n,{className:de((t=n.props)===null||t===void 0?void 0:t.className,a),percent:o}):d.createElement(sT,{prefixCls:r,percent:o})}const cT=new Vt("antSpinMove",{to:{opacity:1}}),dT=new Vt("antRotate",{to:{transform:"rotate(405deg)"}}),fT=e=>{const{componentCls:t,calc:r}=e;return{[t]:Object.assign(Object.assign({},Br(e)),{position:"absolute",display:"none",color:e.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${t}-text`]:{fontSize:e.fontSize,paddingTop:r(r(e.dotSize).sub(e.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${e.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[t]:{[`${t}-dot-holder`]:{color:e.colorWhite},[`${t}-text`]:{color:e.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${t}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:e.contentHeight,[`${t}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:r(e.dotSize).mul(-1).div(2).equal()},[`${t}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${e.colorBgContainer}`},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${t}-dot`]:{margin:r(e.dotSizeSM).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:r(r(e.dotSizeSM).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${t}-dot`]:{margin:r(e.dotSizeLG).mul(-1).div(2).equal()},[`${t}-text`]:{paddingTop:r(r(e.dotSizeLG).sub(e.fontSize)).div(2).add(2).equal()},[`&${t}-show-text ${t}-dot`]:{marginTop:r(e.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:e.spinDotDefault},[`${t}-dot-holder`]:{width:"1em",height:"1em",fontSize:e.dotSize,display:"inline-block",transition:`transform ${e.motionDurationSlow} ease, opacity ${e.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:e.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${t}-dot-progress`]:{position:"absolute",inset:0},[`${t}-dot`]:{position:"relative",display:"inline-block",fontSize:e.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:r(e.dotSize).sub(r(e.marginXXS).div(2)).div(2).equal(),height:r(e.dotSize).sub(r(e.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:cT,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:dT,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(n=>`${n} ${e.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}},[`&-sm ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeSM}},[`&-sm ${t}-dot-holder`]:{i:{width:r(r(e.dotSizeSM).sub(r(e.marginXXS).div(2))).div(2).equal(),height:r(r(e.dotSizeSM).sub(r(e.marginXXS).div(2))).div(2).equal()}},[`&-lg ${t}-dot`]:{"&, &-holder":{fontSize:e.dotSizeLG}},[`&-lg ${t}-dot-holder`]:{i:{width:r(r(e.dotSizeLG).sub(e.marginXXS)).div(2).equal(),height:r(r(e.dotSizeLG).sub(e.marginXXS)).div(2).equal()}},[`&${t}-show-text ${t}-text`]:{display:"block"}})}},pT=e=>{const{controlHeightLG:t,controlHeight:r}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:r}},mT=Hr("Spin",e=>{const t=er(e,{spinDotDefault:e.colorTextDescription});return fT(t)},pT),hT=200,Y0=[[30,.05],[70,.03],[96,.01]];function gT(e,t){const[r,n]=d.useState(0),o=d.useRef(null),a=t==="auto";return d.useEffect(()=>(a&&e&&(n(0),o.current=setInterval(()=>{n(i=>{const l=100-i;for(let s=0;s<Y0.length;s+=1){const[u,c]=Y0[s];if(i<=u)return i+l*c}return i})},hT)),()=>{clearInterval(o.current)}),[a,e]),a?r:t}var vT=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};let sw;function bT(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}const Cm=e=>{var t;const{prefixCls:r,spinning:n=!0,delay:o=0,className:a,rootClassName:i,size:l="default",tip:s,wrapperClassName:u,style:c,children:f,fullscreen:p=!1,indicator:h,percent:v}=e,g=vT(e,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:m,direction:b,className:y,style:C,indicator:D}=Io("spin"),w=m("spin",r),[k,E,x]=mT(w),[F,j]=d.useState(()=>n&&!bT(n,o)),$=gT(F,v);d.useEffect(()=>{if(n){const N=dI(o,()=>{j(!0)});return N(),()=>{var T;(T=N==null?void 0:N.cancel)===null||T===void 0||T.call(N)}}j(!1)},[o,n]);const P=d.useMemo(()=>typeof f<"u"&&!p,[f,p]),A=de(w,y,{[`${w}-sm`]:l==="small",[`${w}-lg`]:l==="large",[`${w}-spinning`]:F,[`${w}-show-text`]:!!s,[`${w}-rtl`]:b==="rtl"},a,!p&&i,E,x),O=de(`${w}-container`,{[`${w}-blur`]:F}),S=(t=h??D)!==null&&t!==void 0?t:sw,B=Object.assign(Object.assign({},C),c),R=d.createElement("div",Object.assign({},g,{style:B,className:A,"aria-live":"polite","aria-busy":F}),d.createElement(uT,{prefixCls:w,indicator:S,percent:$}),s&&(P||p)?d.createElement("div",{className:`${w}-text`},s):null);return k(P?d.createElement("div",Object.assign({},g,{className:de(`${w}-nested-loading`,u,E,x)}),F&&d.createElement("div",{key:"loading"},R),d.createElement("div",{className:O,key:"container"},f)):p?d.createElement("div",{className:de(`${w}-fullscreen`,{[`${w}-fullscreen-show`]:F},i,E,x)},R):R)};Cm.setDefaultIndicator=e=>{sw=e};var yT={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"},CT=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:yT}))},xT=d.forwardRef(CT),wT={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"},ET=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:wT}))},kT=d.forwardRef(ET),DT={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"},ST=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:DT}))},$T=d.forwardRef(ST),BT={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"},OT=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:BT}))},uw=d.forwardRef(OT),AT={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"},FT=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:AT}))},NT=d.forwardRef(FT),PT={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"},jT=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:PT}))},RT=d.forwardRef(jT),IT={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"},TT=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:IT}))},MT=d.forwardRef(TT),zT={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"},LT=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:zT}))},_T=d.forwardRef(LT),HT={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"},WT=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:HT}))},KT=d.forwardRef(WT),qT={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"},VT=function(e,t){return d.createElement(sr,Te({},e,{ref:t,icon:qT}))},UT=d.forwardRef(VT),co={},Bl="rc-table-internal-hook";function xm(e){var t=d.createContext(void 0),r=function(n){var o=n.value,a=n.children,i=d.useRef(o);i.current=o;var l=d.useState(function(){return{getValue:function(){return i.current},listeners:new Set}}),s=ce(l,1),u=s[0];return Wt(function(){Pb(function(){u.listeners.forEach(function(c){c(o)})})},[o]),d.createElement(t.Provider,{value:u},a)};return{Context:t,Provider:r,defaultValue:e}}function _r(e,t){var r=nr(typeof t=="function"?t:function(f){if(t===void 0)return f;if(!Array.isArray(t))return f[t];var p={};return t.forEach(function(h){p[h]=f[h]}),p}),n=d.useContext(e==null?void 0:e.Context),o=n||{},a=o.listeners,i=o.getValue,l=d.useRef();l.current=r(n?i():e==null?void 0:e.defaultValue);var s=d.useState({}),u=ce(s,2),c=u[1];return Wt(function(){if(!n)return;function f(p){var h=r(p);Jn(l.current,h,!0)||c({})}return a.add(f),function(){a.delete(f)}},[n]),l.current}function XT(){var e=d.createContext(null);function t(){return d.useContext(e)}function r(o,a){var i=Zn(o),l=function(s,u){var c=i?{ref:u}:{},f=d.useRef(0),p=d.useRef(s),h=t();return h!==null?d.createElement(o,Te({},s,c)):((!a||a(p.current,s))&&(f.current+=1),p.current=s,d.createElement(e.Provider,{value:f.current},d.createElement(o,Te({},s,c))))};return i?d.forwardRef(l):l}function n(o,a){var i=Zn(o),l=function(s,u){var c=i?{ref:u}:{};return t(),d.createElement(o,Te({},s,c))};return i?d.memo(d.forwardRef(l),a):d.memo(l,a)}return{makeImmutable:r,responseImmutable:n,useImmutableMark:t}}var wm=XT(),cw=wm.makeImmutable,ci=wm.responseImmutable,GT=wm.useImmutableMark,nn=xm(),dw=d.createContext({renderWithProps:!1}),YT="RC_TABLE_KEY";function ZT(e){return e==null?[]:Array.isArray(e)?e:[e]}function zu(e){var t=[],r={};return e.forEach(function(n){for(var o=n||{},a=o.key,i=o.dataIndex,l=a||ZT(i).join("-")||YT;r[l];)l="".concat(l,"_next");r[l]=!0,t.push(l)}),t}function Wf(e){return e!=null}function JT(e){return typeof e=="number"&&!Number.isNaN(e)}function QT(e){return e&&ut(e)==="object"&&!Array.isArray(e)&&!d.isValidElement(e)}function e8(e,t,r,n,o,a){var i=d.useContext(dw),l=GT(),s=la(function(){if(Wf(n))return[n];var u=t==null||t===""?[]:Array.isArray(t)?t:[t],c=vn(e,u),f=c,p=void 0;if(o){var h=o(c,e,r);QT(h)?(f=h.children,p=h.props,i.renderWithProps=!0):f=h}return[f,p]},[l,e,n,t,o,r],function(u,c){if(a){var f=ce(u,2),p=f[1],h=ce(c,2),v=h[1];return a(v,p)}return i.renderWithProps?!0:!Jn(u,c,!0)});return s}function t8(e,t,r,n){var o=e+t-1;return e<=n&&o>=r}function r8(e,t){return _r(nn,function(r){var n=t8(e,t||1,r.hoverStartRow,r.hoverEndRow);return[n,r.onHover]})}var n8=function(e){var t=e.ellipsis,r=e.rowType,n=e.children,o,a=t===!0?{showTitle:!0}:t;return a&&(a.showTitle||r==="header")&&(typeof n=="string"||typeof n=="number"?o=n.toString():d.isValidElement(n)&&typeof n.props.children=="string"&&(o=n.props.children)),o};function o8(e){var t,r,n,o,a,i,l,s,u=e.component,c=e.children,f=e.ellipsis,p=e.scope,h=e.prefixCls,v=e.className,g=e.align,m=e.record,b=e.render,y=e.dataIndex,C=e.renderIndex,D=e.shouldCellUpdate,w=e.index,k=e.rowType,E=e.colSpan,x=e.rowSpan,F=e.fixLeft,j=e.fixRight,$=e.firstFixLeft,P=e.lastFixLeft,A=e.firstFixRight,O=e.lastFixRight,S=e.appendNode,B=e.additionalProps,R=B===void 0?{}:B,N=e.isSticky,T="".concat(h,"-cell"),L=_r(nn,["supportSticky","allColumnsFixedLeft","rowHoverable"]),X=L.supportSticky,_=L.allColumnsFixedLeft,q=L.rowHoverable,Q=e8(m,y,C,c,b,D),te=ce(Q,2),z=te[0],Y=te[1],V={},G=typeof F=="number"&&X,K=typeof j=="number"&&X;G&&(V.position="sticky",V.left=F),K&&(V.position="sticky",V.right=j);var W=(t=(r=(n=Y==null?void 0:Y.colSpan)!==null&&n!==void 0?n:R.colSpan)!==null&&r!==void 0?r:E)!==null&&t!==void 0?t:1,re=(o=(a=(i=Y==null?void 0:Y.rowSpan)!==null&&i!==void 0?i:R.rowSpan)!==null&&a!==void 0?a:x)!==null&&o!==void 0?o:1,U=r8(w,re),J=ce(U,2),ne=J[0],ue=J[1],me=nr(function(ye){var Ae;m&&ue(w,w+re-1),R==null||(Ae=R.onMouseEnter)===null||Ae===void 0||Ae.call(R,ye)}),Ce=nr(function(ye){var Ae;m&&ue(-1,-1),R==null||(Ae=R.onMouseLeave)===null||Ae===void 0||Ae.call(R,ye)});if(W===0||re===0)return null;var Ne=(l=R.title)!==null&&l!==void 0?l:n8({rowType:k,ellipsis:f,children:z}),pe=de(T,v,(s={},M(M(M(M(M(M(M(M(M(M(s,"".concat(T,"-fix-left"),G&&X),"".concat(T,"-fix-left-first"),$&&X),"".concat(T,"-fix-left-last"),P&&X),"".concat(T,"-fix-left-all"),P&&_&&X),"".concat(T,"-fix-right"),K&&X),"".concat(T,"-fix-right-first"),A&&X),"".concat(T,"-fix-right-last"),O&&X),"".concat(T,"-ellipsis"),f),"".concat(T,"-with-append"),S),"".concat(T,"-fix-sticky"),(G||K)&&N&&X),M(s,"".concat(T,"-row-hover"),!Y&&ne)),R.className,Y==null?void 0:Y.className),he={};g&&(he.textAlign=g);var ve=H(H(H(H({},Y==null?void 0:Y.style),V),he),R.style),be=z;return ut(be)==="object"&&!Array.isArray(be)&&!d.isValidElement(be)&&(be=null),f&&(P||A)&&(be=d.createElement("span",{className:"".concat(T,"-content")},be)),d.createElement(u,Te({},Y,R,{className:pe,style:ve,title:Ne,scope:p,onMouseEnter:q?me:void 0,onMouseLeave:q?Ce:void 0,colSpan:W!==1?W:null,rowSpan:re!==1?re:null}),S,be)}const di=d.memo(o8);function Em(e,t,r,n,o){var a=r[e]||{},i=r[t]||{},l,s;a.fixed==="left"?l=n.left[o==="rtl"?t:e]:i.fixed==="right"&&(s=n.right[o==="rtl"?e:t]);var u=!1,c=!1,f=!1,p=!1,h=r[t+1],v=r[e-1],g=h&&!h.fixed||v&&!v.fixed||r.every(function(D){return D.fixed==="left"});if(o==="rtl"){if(l!==void 0){var m=v&&v.fixed==="left";p=!m&&g}else if(s!==void 0){var b=h&&h.fixed==="right";f=!b&&g}}else if(l!==void 0){var y=h&&h.fixed==="left";u=!y&&g}else if(s!==void 0){var C=v&&v.fixed==="right";c=!C&&g}return{fixLeft:l,fixRight:s,lastFixLeft:u,firstFixRight:c,lastFixRight:f,firstFixLeft:p,isSticky:n.isSticky}}var fw=d.createContext({});function a8(e){var t=e.className,r=e.index,n=e.children,o=e.colSpan,a=o===void 0?1:o,i=e.rowSpan,l=e.align,s=_r(nn,["prefixCls","direction"]),u=s.prefixCls,c=s.direction,f=d.useContext(fw),p=f.scrollColumnIndex,h=f.stickyOffsets,v=f.flattenColumns,g=r+a-1,m=g+1===p?a+1:a,b=Em(r,r+m-1,v,h,c);return d.createElement(di,Te({className:t,index:r,component:"td",prefixCls:u,record:null,dataIndex:null,align:l,colSpan:m,rowSpan:i,render:function(){return n}},b))}var i8=["children"];function l8(e){var t=e.children,r=Ct(e,i8);return d.createElement("tr",r,t)}function Lu(e){var t=e.children;return t}Lu.Row=l8;Lu.Cell=a8;function s8(e){var t=e.children,r=e.stickyOffsets,n=e.flattenColumns,o=_r(nn,"prefixCls"),a=n.length-1,i=n[a],l=d.useMemo(function(){return{stickyOffsets:r,flattenColumns:n,scrollColumnIndex:i!=null&&i.scrollbar?a:null}},[i,n,a,r]);return d.createElement(fw.Provider,{value:l},d.createElement("tfoot",{className:"".concat(o,"-summary")},t))}const Jl=ci(s8);var pw=Lu;function u8(e){return null}function c8(e){return null}function mw(e,t,r,n,o,a,i){var l=a(t,i);e.push({record:t,indent:r,index:i,rowKey:l});var s=o==null?void 0:o.has(l);if(t&&Array.isArray(t[n])&&s)for(var u=0;u<t[n].length;u+=1)mw(e,t[n][u],r+1,n,o,a,u)}function hw(e,t,r,n){var o=d.useMemo(function(){if(r!=null&&r.size){for(var a=[],i=0;i<(e==null?void 0:e.length);i+=1){var l=e[i];mw(a,l,0,t,r,n,i)}return a}return e==null?void 0:e.map(function(s,u){return{record:s,indent:0,index:u,rowKey:n(s,u)}})},[e,t,r,n]);return o}function gw(e,t,r,n){var o=_r(nn,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),a=o.flattenColumns,i=o.expandableType,l=o.expandedKeys,s=o.childrenColumnName,u=o.onTriggerExpand,c=o.rowExpandable,f=o.onRow,p=o.expandRowByClick,h=o.rowClassName,v=i==="nest",g=i==="row"&&(!c||c(e)),m=g||v,b=l&&l.has(t),y=s&&e&&e[s],C=nr(u),D=f==null?void 0:f(e,r),w=D==null?void 0:D.onClick,k=function(F){p&&m&&u(e,F);for(var j=arguments.length,$=new Array(j>1?j-1:0),P=1;P<j;P++)$[P-1]=arguments[P];w==null||w.apply(void 0,[F].concat($))},E;typeof h=="string"?E=h:typeof h=="function"&&(E=h(e,r,n));var x=zu(a);return H(H({},o),{},{columnsKey:x,nestExpandable:v,expanded:b,hasNestChildren:y,record:e,onTriggerExpand:C,rowSupportExpand:g,expandable:m,rowProps:H(H({},D),{},{className:de(E,D==null?void 0:D.className),onClick:k})})}function vw(e){var t=e.prefixCls,r=e.children,n=e.component,o=e.cellComponent,a=e.className,i=e.expanded,l=e.colSpan,s=e.isEmpty,u=e.stickyOffset,c=u===void 0?0:u,f=_r(nn,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),p=f.scrollbarSize,h=f.fixHeader,v=f.fixColumn,g=f.componentWidth,m=f.horizonScroll,b=r;return(s?m&&g:v)&&(b=d.createElement("div",{style:{width:g-c-(h&&!s?p:0),position:"sticky",left:c,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},b)),d.createElement(n,{className:a,style:{display:i?null:"none"}},d.createElement(di,{component:o,prefixCls:t,colSpan:l},b))}function d8(e){var t=e.prefixCls,r=e.record,n=e.onExpand,o=e.expanded,a=e.expandable,i="".concat(t,"-row-expand-icon");if(!a)return d.createElement("span",{className:de(i,"".concat(t,"-row-spaced"))});var l=function(s){n(r,s),s.stopPropagation()};return d.createElement("span",{className:de(i,M(M({},"".concat(t,"-row-expanded"),o),"".concat(t,"-row-collapsed"),!o)),onClick:l})}function f8(e,t,r){var n=[];function o(a){(a||[]).forEach(function(i,l){n.push(t(i,l)),o(i[r])})}return o(e),n}function bw(e,t,r,n){return typeof e=="string"?e:typeof e=="function"?e(t,r,n):""}function yw(e,t,r,n,o){var a,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,s=e.record,u=e.prefixCls,c=e.columnsKey,f=e.fixedInfoList,p=e.expandIconColumnIndex,h=e.nestExpandable,v=e.indentSize,g=e.expandIcon,m=e.expanded,b=e.hasNestChildren,y=e.onTriggerExpand,C=e.expandable,D=e.expandedKeys,w=c[r],k=f[r],E;r===(p||0)&&h&&(E=d.createElement(d.Fragment,null,d.createElement("span",{style:{paddingLeft:"".concat(v*n,"px")},className:"".concat(u,"-row-indent indent-level-").concat(n)}),g({prefixCls:u,expanded:m,expandable:b,record:s,onExpand:y})));var x=((a=t.onCell)===null||a===void 0?void 0:a.call(t,s,o))||{};if(l){var F=x.rowSpan,j=F===void 0?1:F;if(C&&j&&r<l){for(var $=j,P=o;P<o+j;P+=1){var A=i[P];D.has(A)&&($+=1)}x.rowSpan=$}}return{key:w,fixedInfo:k,appendCellNode:E,additionalCellProps:x}}function p8(e){var t=e.className,r=e.style,n=e.record,o=e.index,a=e.renderIndex,i=e.rowKey,l=e.rowKeys,s=e.indent,u=s===void 0?0:s,c=e.rowComponent,f=e.cellComponent,p=e.scopeCellComponent,h=e.expandedRowInfo,v=gw(n,i,o,u),g=v.prefixCls,m=v.flattenColumns,b=v.expandedRowClassName,y=v.expandedRowRender,C=v.rowProps,D=v.expanded,w=v.rowSupportExpand,k=d.useRef(!1);k.current||(k.current=D);var E=bw(b,n,o,u),x=d.createElement(c,Te({},C,{"data-row-key":i,className:de(t,"".concat(g,"-row"),"".concat(g,"-row-level-").concat(u),C==null?void 0:C.className,M({},E,u>=1)),style:H(H({},r),C==null?void 0:C.style)}),m.map(function($,P){var A=$.render,O=$.dataIndex,S=$.className,B=yw(v,$,P,u,o,l,h==null?void 0:h.offset),R=B.key,N=B.fixedInfo,T=B.appendCellNode,L=B.additionalCellProps;return d.createElement(di,Te({className:S,ellipsis:$.ellipsis,align:$.align,scope:$.rowScope,component:$.rowScope?p:f,prefixCls:g,key:R,record:n,index:o,renderIndex:a,dataIndex:O,render:A,shouldCellUpdate:$.shouldCellUpdate},N,{appendNode:T,additionalProps:L}))})),F;if(w&&(k.current||D)){var j=y(n,o,u+1,D);F=d.createElement(vw,{expanded:D,className:de("".concat(g,"-expanded-row"),"".concat(g,"-expanded-row-level-").concat(u+1),E),prefixCls:g,component:c,cellComponent:f,colSpan:h?h.colSpan:m.length,stickyOffset:h==null?void 0:h.sticky,isEmpty:!1},j)}return d.createElement(d.Fragment,null,x,F)}const m8=ci(p8);function h8(e){var t=e.columnKey,r=e.onColumnResize,n=d.useRef();return Wt(function(){n.current&&r(t,n.current.offsetWidth)},[]),d.createElement(ao,{data:t},d.createElement("td",{ref:n,style:{padding:0,border:0,height:0}},d.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function g8(e){var t=e.prefixCls,r=e.columnsKey,n=e.onColumnResize,o=d.useRef(null);return d.createElement("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),style:{height:0,fontSize:0},ref:o},d.createElement(ao.Collection,{onBatchResize:function(a){xu(o.current)&&a.forEach(function(i){var l=i.data,s=i.size;n(l,s.offsetWidth)})}},r.map(function(a){return d.createElement(h8,{key:a,columnKey:a,onColumnResize:n})})))}function v8(e){var t=e.data,r=e.measureColumnWidth,n=_r(nn,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","expandedRowOffset","fixedInfoList","colWidths"]),o=n.prefixCls,a=n.getComponent,i=n.onColumnResize,l=n.flattenColumns,s=n.getRowKey,u=n.expandedKeys,c=n.childrenColumnName,f=n.emptyNode,p=n.expandedRowOffset,h=p===void 0?0:p,v=n.colWidths,g=hw(t,c,u,s),m=d.useMemo(function(){return g.map(function(F){return F.rowKey})},[g]),b=d.useRef({renderWithProps:!1}),y=d.useMemo(function(){for(var F=l.length-h,j=0,$=0;$<h;$+=1)j+=v[$]||0;return{offset:h,colSpan:F,sticky:j}},[l.length,h,v]),C=a(["body","wrapper"],"tbody"),D=a(["body","row"],"tr"),w=a(["body","cell"],"td"),k=a(["body","cell"],"th"),E;t.length?E=g.map(function(F,j){var $=F.record,P=F.indent,A=F.index,O=F.rowKey;return d.createElement(m8,{key:O,rowKey:O,rowKeys:m,record:$,index:j,renderIndex:A,rowComponent:D,cellComponent:w,scopeCellComponent:k,indent:P,expandedRowInfo:y})}):E=d.createElement(vw,{expanded:!0,className:"".concat(o,"-placeholder"),prefixCls:o,component:D,cellComponent:w,colSpan:l.length,isEmpty:!0},f);var x=zu(l);return d.createElement(dw.Provider,{value:b.current},d.createElement(C,{className:"".concat(o,"-tbody")},r&&d.createElement(g8,{prefixCls:o,columnsKey:x,onColumnResize:i}),E))}const b8=ci(v8);var y8=["expandable"],_i="RC_TABLE_INTERNAL_COL_DEFINE";function C8(e){var t=e.expandable,r=Ct(e,y8),n;return"expandable"in e?n=H(H({},r),t):n=r,n.showExpandColumn===!1&&(n.expandIconColumnIndex=-1),n}var x8=["columnType"];function Cw(e){for(var t=e.colWidths,r=e.columns,n=e.columCount,o=_r(nn,["tableLayout"]),a=o.tableLayout,i=[],l=n||r.length,s=!1,u=l-1;u>=0;u-=1){var c=t[u],f=r&&r[u],p=void 0,h=void 0;if(f&&(p=f[_i],a==="auto"&&(h=f.minWidth)),c||h||p||s){var v=p||{};v.columnType;var g=Ct(v,x8);i.unshift(d.createElement("col",Te({key:u,style:{width:c,minWidth:h}},g))),s=!0}}return d.createElement("colgroup",null,i)}var w8=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function E8(e,t){return Et(function(){for(var r=[],n=0;n<t;n+=1){var o=e[n];if(o!==void 0)r[n]=o;else return null}return r},[e.join("_"),t])}var k8=d.forwardRef(function(e,t){var r=e.className,n=e.noData,o=e.columns,a=e.flattenColumns,i=e.colWidths,l=e.columCount,s=e.stickyOffsets,u=e.direction,c=e.fixHeader,f=e.stickyTopOffset,p=e.stickyBottomOffset,h=e.stickyClassName,v=e.onScroll,g=e.maxContentScroll,m=e.children,b=Ct(e,w8),y=_r(nn,["prefixCls","scrollbarSize","isSticky","getComponent"]),C=y.prefixCls,D=y.scrollbarSize,w=y.isSticky,k=y.getComponent,E=k(["header","table"],"table"),x=w&&!c?0:D,F=d.useRef(null),j=d.useCallback(function(N){Ji(t,N),Ji(F,N)},[]);d.useEffect(function(){function N(L){var X=L,_=X.currentTarget,q=X.deltaX;q&&(v({currentTarget:_,scrollLeft:_.scrollLeft+q}),L.preventDefault())}var T=F.current;return T==null||T.addEventListener("wheel",N,{passive:!1}),function(){T==null||T.removeEventListener("wheel",N)}},[]);var $=d.useMemo(function(){return a.every(function(N){return N.width})},[a]),P=a[a.length-1],A={fixed:P?P.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(C,"-cell-scrollbar")}}},O=Et(function(){return x?[].concat(Pe(o),[A]):o},[x,o]),S=Et(function(){return x?[].concat(Pe(a),[A]):a},[x,a]),B=Et(function(){var N=s.right,T=s.left;return H(H({},s),{},{left:u==="rtl"?[].concat(Pe(T.map(function(L){return L+x})),[0]):T,right:u==="rtl"?N:[].concat(Pe(N.map(function(L){return L+x})),[0]),isSticky:w})},[x,s,w]),R=E8(i,l);return d.createElement("div",{style:H({overflow:"hidden"},w?{top:f,bottom:p}:{}),ref:j,className:de(r,M({},h,!!h))},d.createElement(E,{style:{tableLayout:"fixed",visibility:n||R?null:"hidden"}},(!n||!g||$)&&d.createElement(Cw,{colWidths:R?[].concat(Pe(R),[x]):[],columCount:l+1,columns:S}),m(H(H({},b),{},{stickyOffsets:B,columns:O,flattenColumns:S}))))});const Z0=d.memo(k8);var D8=function(e){var t=e.cells,r=e.stickyOffsets,n=e.flattenColumns,o=e.rowComponent,a=e.cellComponent,i=e.onHeaderRow,l=e.index,s=_r(nn,["prefixCls","direction"]),u=s.prefixCls,c=s.direction,f;i&&(f=i(t.map(function(h){return h.column}),l));var p=zu(t.map(function(h){return h.column}));return d.createElement(o,f,t.map(function(h,v){var g=h.column,m=Em(h.colStart,h.colEnd,n,r,c),b;return g&&g.onHeaderCell&&(b=h.column.onHeaderCell(g)),d.createElement(di,Te({},h,{scope:g.title?h.colSpan>1?"colgroup":"col":null,ellipsis:g.ellipsis,align:g.align,component:a,prefixCls:u,key:p[v]},m,{additionalProps:b,rowType:"header"}))}))};function S8(e){var t=[];function r(i,l){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;t[s]=t[s]||[];var u=l,c=i.filter(Boolean).map(function(f){var p={key:f.key,className:f.className||"",children:f.title,column:f,colStart:u},h=1,v=f.children;return v&&v.length>0&&(h=r(v,u,s+1).reduce(function(g,m){return g+m},0),p.hasSubColumns=!0),"colSpan"in f&&(h=f.colSpan),"rowSpan"in f&&(p.rowSpan=f.rowSpan),p.colSpan=h,p.colEnd=p.colStart+h-1,t[s].push(p),u+=h,h});return c}r(e,0);for(var n=t.length,o=function(i){t[i].forEach(function(l){!("rowSpan"in l)&&!l.hasSubColumns&&(l.rowSpan=n-i)})},a=0;a<n;a+=1)o(a);return t}var $8=function(e){var t=e.stickyOffsets,r=e.columns,n=e.flattenColumns,o=e.onHeaderRow,a=_r(nn,["prefixCls","getComponent"]),i=a.prefixCls,l=a.getComponent,s=d.useMemo(function(){return S8(r)},[r]),u=l(["header","wrapper"],"thead"),c=l(["header","row"],"tr"),f=l(["header","cell"],"th");return d.createElement(u,{className:"".concat(i,"-thead")},s.map(function(p,h){var v=d.createElement(D8,{key:h,flattenColumns:n,cells:p,stickyOffsets:t,rowComponent:c,cellComponent:f,onHeaderRow:o,index:h});return v}))};const J0=ci($8);function Q0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof t=="number"?t:t.endsWith("%")?e*parseFloat(t)/100:null}function B8(e,t,r){return d.useMemo(function(){if(t&&t>0){var n=0,o=0;e.forEach(function(p){var h=Q0(t,p.width);h?n+=h:o+=1});var a=Math.max(t,r),i=Math.max(a-n,o),l=o,s=i/o,u=0,c=e.map(function(p){var h=H({},p),v=Q0(t,h.width);if(v)h.width=v;else{var g=Math.floor(s);h.width=l===1?i:g,i-=g,l-=1}return u+=h.width,h});if(u<a){var f=a/u;i=a,c.forEach(function(p,h){var v=Math.floor(p.width*f);p.width=h===c.length-1?i:v,i-=v})}return[c,Math.max(u,a)]}return[e,t]},[e,t,r])}var O8=["children"],A8=["fixed"];function km(e){return _n(e).filter(function(t){return d.isValidElement(t)}).map(function(t){var r=t.key,n=t.props,o=n.children,a=Ct(n,O8),i=H({key:r},a);return o&&(i.children=km(o)),i})}function xw(e){return e.filter(function(t){return t&&ut(t)==="object"&&!t.hidden}).map(function(t){var r=t.children;return r&&r.length>0?H(H({},t),{},{children:xw(r)}):t})}function Kf(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return e.filter(function(r){return r&&ut(r)==="object"}).reduce(function(r,n,o){var a=n.fixed,i=a===!0?"left":a,l="".concat(t,"-").concat(o),s=n.children;return s&&s.length>0?[].concat(Pe(r),Pe(Kf(s,l).map(function(u){return H({fixed:i},u)}))):[].concat(Pe(r),[H(H({key:l},n),{},{fixed:i})])},[])}function F8(e){return e.map(function(t){var r=t.fixed,n=Ct(t,A8),o=r;return r==="left"?o="right":r==="right"&&(o="left"),H({fixed:o},n)})}function N8(e,t){var r=e.prefixCls,n=e.columns,o=e.children,a=e.expandable,i=e.expandedKeys,l=e.columnTitle,s=e.getRowKey,u=e.onTriggerExpand,c=e.expandIcon,f=e.rowExpandable,p=e.expandIconColumnIndex,h=e.expandedRowOffset,v=h===void 0?0:h,g=e.direction,m=e.expandRowByClick,b=e.columnWidth,y=e.fixed,C=e.scrollWidth,D=e.clientWidth,w=d.useMemo(function(){var O=n||km(o)||[];return xw(O.slice())},[n,o]),k=d.useMemo(function(){if(a){var O=w.slice();if(!O.includes(co)){var S=p||0;S>=0&&(S||y==="left"||!y)&&O.splice(S,0,co),y==="right"&&O.splice(w.length,0,co)}var B=O.indexOf(co);O=O.filter(function(L,X){return L!==co||X===B});var R=w[B],N;y?N=y:N=R?R.fixed:null;var T=M(M(M(M(M(M({},_i,{className:"".concat(r,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",l),"fixed",N),"className","".concat(r,"-row-expand-icon-cell")),"width",b),"render",function(L,X,_){var q=s(X,_),Q=i.has(q),te=f?f(X):!0,z=c({prefixCls:r,expanded:Q,expandable:te,record:X,onExpand:u});return m?d.createElement("span",{onClick:function(Y){return Y.stopPropagation()}},z):z});return O.map(function(L,X){var _=L===co?T:L;return X<v?H(H({},_),{},{fixed:_.fixed||"left"}):_})}return w.filter(function(L){return L!==co})},[a,w,s,i,c,g,v]),E=d.useMemo(function(){var O=k;return t&&(O=t(O)),O.length||(O=[{render:function(){return null}}]),O},[t,k,g]),x=d.useMemo(function(){return g==="rtl"?F8(Kf(E)):Kf(E)},[E,g,C]),F=d.useMemo(function(){for(var O=-1,S=x.length-1;S>=0;S-=1){var B=x[S].fixed;if(B==="left"||B===!0){O=S;break}}if(O>=0)for(var R=0;R<=O;R+=1){var N=x[R].fixed;if(N!=="left"&&N!==!0)return!0}var T=x.findIndex(function(_){var q=_.fixed;return q==="right"});if(T>=0)for(var L=T;L<x.length;L+=1){var X=x[L].fixed;if(X!=="right")return!0}return!1},[x]),j=B8(x,C,D),$=ce(j,2),P=$[0],A=$[1];return[E,P,A,F]}function P8(e,t,r){var n=C8(e),o=n.expandIcon,a=n.expandedRowKeys,i=n.defaultExpandedRowKeys,l=n.defaultExpandAllRows,s=n.expandedRowRender,u=n.onExpand,c=n.onExpandedRowsChange,f=n.childrenColumnName,p=o||d8,h=f||"children",v=d.useMemo(function(){return s?"row":e.expandable&&e.internalHooks===Bl&&e.expandable.__PARENT_RENDER_ICON__||t.some(function(w){return w&&ut(w)==="object"&&w[h]})?"nest":!1},[!!s,t]),g=d.useState(function(){return i||(l?f8(t,r,h):[])}),m=ce(g,2),b=m[0],y=m[1],C=d.useMemo(function(){return new Set(a||b||[])},[a,b]),D=d.useCallback(function(w){var k=r(w,t.indexOf(w)),E,x=C.has(k);x?(C.delete(k),E=Pe(C)):E=[].concat(Pe(C),[k]),y(E),u&&u(!x,w),c&&c(E)},[r,C,t,u,c]);return[n,v,C,p,h,D]}function j8(e,t,r){var n=e.map(function(o,a){return Em(a,a,e,t,r)});return la(function(){return n},[n],function(o,a){return!Jn(o,a)})}function R8(e){var t=Ve(e),r=wt({}),n=ce(r,2),o=n[1],a=Ve(null),i=Ve([]);function l(s){i.current.push(s);var u=Promise.resolve();a.current=u,u.then(function(){if(a.current===u){var c=i.current,f=t.current;i.current=[],c.forEach(function(p){t.current=p(t.current)}),a.current=null,f!==t.current&&o({})}})}return Ot(function(){return function(){a.current=null}},[]),[t.current,l]}function I8(e){var t=Ve(null),r=Ve();function n(){window.clearTimeout(r.current)}function o(i){t.current=i,n(),r.current=window.setTimeout(function(){t.current=null,r.current=void 0},100)}function a(){return t.current}return Ot(function(){return n},[]),[o,a]}function T8(){var e=d.useState(-1),t=ce(e,2),r=t[0],n=t[1],o=d.useState(-1),a=ce(o,2),i=a[0],l=a[1],s=d.useCallback(function(u,c){n(u),l(c)},[]);return[r,i,s]}var eb=Xr()?window:null;function M8(e,t){var r=ut(e)==="object"?e:{},n=r.offsetHeader,o=n===void 0?0:n,a=r.offsetSummary,i=a===void 0?0:a,l=r.offsetScroll,s=l===void 0?0:l,u=r.getContainer,c=u===void 0?function(){return eb}:u,f=c()||eb,p=!!e;return d.useMemo(function(){return{isSticky:p,stickyClassName:p?"".concat(t,"-sticky-holder"):"",offsetHeader:o,offsetSummary:i,offsetScroll:s,container:f}},[p,s,o,i,t,f])}function z8(e,t,r){var n=Et(function(){var o=t.length,a=function(s,u,c){for(var f=[],p=0,h=s;h!==u;h+=c)f.push(p),t[h].fixed&&(p+=e[h]||0);return f},i=a(0,o,1),l=a(o-1,-1,-1).reverse();return r==="rtl"?{left:l,right:i}:{left:i,right:l}},[e,t,r]);return n}function tb(e){var t=e.className,r=e.children;return d.createElement("div",{className:t},r)}function rb(e){var t=pu(e),r=t.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 L8=function(e,t){var r,n,o=e.scrollBodyRef,a=e.onScroll,i=e.offsetScroll,l=e.container,s=e.direction,u=_r(nn,"prefixCls"),c=((r=o.current)===null||r===void 0?void 0:r.scrollWidth)||0,f=((n=o.current)===null||n===void 0?void 0:n.clientWidth)||0,p=c&&f*(f/c),h=d.useRef(),v=R8({scrollLeft:0,isHiddenScrollBar:!0}),g=ce(v,2),m=g[0],b=g[1],y=d.useRef({delta:0,x:0}),C=d.useState(!1),D=ce(C,2),w=D[0],k=D[1],E=d.useRef(null);d.useEffect(function(){return function(){qt.cancel(E.current)}},[]);var x=function(){k(!1)},F=function(A){A.persist(),y.current.delta=A.pageX-m.scrollLeft,y.current.x=0,k(!0),A.preventDefault()},j=function(A){var O,S=A||((O=window)===null||O===void 0?void 0:O.event),B=S.buttons;if(!w||B===0){w&&k(!1);return}var R=y.current.x+A.pageX-y.current.x-y.current.delta,N=s==="rtl";R=Math.max(N?p-f:0,Math.min(N?0:f-p,R));var T=!N||Math.abs(R)+Math.abs(p)<f;T&&(a({scrollLeft:R/f*(c+2)}),y.current.x=A.pageX)},$=function(){qt.cancel(E.current),E.current=qt(function(){if(o.current){var A=rb(o.current).top,O=A+o.current.offsetHeight,S=l===window?document.documentElement.scrollTop+window.innerHeight:rb(l).top+l.clientHeight;O-Iv()<=S||A>=S-i?b(function(B){return H(H({},B),{},{isHiddenScrollBar:!0})}):b(function(B){return H(H({},B),{},{isHiddenScrollBar:!1})})}})},P=function(A){b(function(O){return H(H({},O),{},{scrollLeft:A/c*f||0})})};return d.useImperativeHandle(t,function(){return{setScrollLeft:P,checkScrollBarVisible:$}}),d.useEffect(function(){var A=H0(document.body,"mouseup",x,!1),O=H0(document.body,"mousemove",j,!1);return $(),function(){A.remove(),O.remove()}},[p,w]),d.useEffect(function(){if(o.current){for(var A=[],O=pu(o.current);O;)A.push(O),O=O.parentElement;return A.forEach(function(S){return S.addEventListener("scroll",$,!1)}),window.addEventListener("resize",$,!1),window.addEventListener("scroll",$,!1),l.addEventListener("scroll",$,!1),function(){A.forEach(function(S){return S.removeEventListener("scroll",$)}),window.removeEventListener("resize",$),window.removeEventListener("scroll",$),l.removeEventListener("scroll",$)}}},[l]),d.useEffect(function(){m.isHiddenScrollBar||b(function(A){var O=o.current;return O?H(H({},A),{},{scrollLeft:O.scrollLeft/O.scrollWidth*O.clientWidth}):A})},[m.isHiddenScrollBar]),c<=f||!p||m.isHiddenScrollBar?null:d.createElement("div",{style:{height:Iv(),width:f,bottom:i},className:"".concat(u,"-sticky-scroll")},d.createElement("div",{onMouseDown:F,ref:h,className:de("".concat(u,"-sticky-scroll-bar"),M({},"".concat(u,"-sticky-scroll-bar-active"),w)),style:{width:"".concat(p,"px"),transform:"translate3d(".concat(m.scrollLeft,"px, 0, 0)")}}))};const _8=d.forwardRef(L8);var ww="rc-table",H8=[],W8={};function K8(){return"No Data"}function q8(e,t){var r=H({rowKey:"key",prefixCls:ww,emptyText:K8},e),n=r.prefixCls,o=r.className,a=r.rowClassName,i=r.style,l=r.data,s=r.rowKey,u=r.scroll,c=r.tableLayout,f=r.direction,p=r.title,h=r.footer,v=r.summary,g=r.caption,m=r.id,b=r.showHeader,y=r.components,C=r.emptyText,D=r.onRow,w=r.onHeaderRow,k=r.onScroll,E=r.internalHooks,x=r.transformColumns,F=r.internalRefs,j=r.tailor,$=r.getContainerWidth,P=r.sticky,A=r.rowHoverable,O=A===void 0?!0:A,S=l||H8,B=!!S.length,R=E===Bl,N=d.useCallback(function(ht,Dt){return vn(y,ht)||Dt},[y]),T=d.useMemo(function(){return typeof s=="function"?s:function(ht){var Dt=ht&&ht[s];return Dt}},[s]),L=N(["body"]),X=T8(),_=ce(X,3),q=_[0],Q=_[1],te=_[2],z=P8(r,S,T),Y=ce(z,6),V=Y[0],G=Y[1],K=Y[2],W=Y[3],re=Y[4],U=Y[5],J=u==null?void 0:u.x,ne=d.useState(0),ue=ce(ne,2),me=ue[0],Ce=ue[1],Ne=N8(H(H(H({},r),V),{},{expandable:!!V.expandedRowRender,columnTitle:V.columnTitle,expandedKeys:K,getRowKey:T,onTriggerExpand:U,expandIcon:W,expandIconColumnIndex:V.expandIconColumnIndex,direction:f,scrollWidth:R&&j&&typeof J=="number"?J:null,clientWidth:me}),R?x:null),pe=ce(Ne,4),he=pe[0],ve=pe[1],be=pe[2],ye=pe[3],Ae=be??J,we=d.useMemo(function(){return{columns:he,flattenColumns:ve}},[he,ve]),He=d.useRef(),Me=d.useRef(),Fe=d.useRef(),ge=d.useRef();d.useImperativeHandle(t,function(){return{nativeElement:He.current,scrollTo:function(ht){var Dt;if(Fe.current instanceof HTMLElement){var Sr=ht.index,hr=ht.top,ur=ht.key;if(JT(hr)){var pn;(pn=Fe.current)===null||pn===void 0||pn.scrollTo({top:hr})}else{var Wr,Nn=ur??T(S[Sr]);(Wr=Fe.current.querySelector('[data-row-key="'.concat(Nn,'"]')))===null||Wr===void 0||Wr.scrollIntoView()}}else(Dt=Fe.current)!==null&&Dt!==void 0&&Dt.scrollTo&&Fe.current.scrollTo(ht)}}});var Se=d.useRef(),qe=d.useState(!1),Ye=ce(qe,2),Xe=Ye[0],Re=Ye[1],lt=d.useState(!1),je=ce(lt,2),at=je[0],vt=je[1],At=d.useState(new Map),fe=ce(At,2),Oe=fe[0],rt=fe[1],Ke=zu(ve),ke=Ke.map(function(ht){return Oe.get(ht)}),Be=d.useMemo(function(){return ke},[ke.join("_")]),ie=z8(Be,ve,f),De=u&&Wf(u.y),Z=u&&Wf(Ae)||!!V.fixed,le=Z&&ve.some(function(ht){var Dt=ht.fixed;return Dt}),ze=d.useRef(),xe=M8(P,n),_e=xe.isSticky,We=xe.offsetHeader,Ge=xe.offsetSummary,ft=xe.offsetScroll,pt=xe.stickyClassName,Ze=xe.container,Je=d.useMemo(function(){return v==null?void 0:v(S)},[v,S]),it=(De||_e)&&d.isValidElement(Je)&&Je.type===Lu&&Je.props.fixed,mt,Pt,jt;De&&(Pt={overflowY:B?"scroll":"auto",maxHeight:u.y}),Z&&(mt={overflowX:"auto"},De||(Pt={overflowY:"hidden"}),jt={width:Ae===!0?"auto":Ae,minWidth:"100%"});var Rt=d.useCallback(function(ht,Dt){rt(function(Sr){if(Sr.get(ht)!==Dt){var hr=new Map(Sr);return hr.set(ht,Dt),hr}return Sr})},[]),kt=I8(),Jt=ce(kt,2),pr=Jt[0],Le=Jt[1];function et(ht,Dt){Dt&&(typeof Dt=="function"?Dt(ht):Dt.scrollLeft!==ht&&(Dt.scrollLeft=ht,Dt.scrollLeft!==ht&&setTimeout(function(){Dt.scrollLeft=ht},0)))}var bt=nr(function(ht){var Dt=ht.currentTarget,Sr=ht.scrollLeft,hr=f==="rtl",ur=typeof Sr=="number"?Sr:Dt.scrollLeft,pn=Dt||W8;if(!Le()||Le()===pn){var Wr;pr(pn),et(ur,Me.current),et(ur,Fe.current),et(ur,Se.current),et(ur,(Wr=ze.current)===null||Wr===void 0?void 0:Wr.setScrollLeft)}var Nn=Dt||Me.current;if(Nn){var En=R&&j&&typeof Ae=="number"?Ae:Nn.scrollWidth,io=Nn.clientWidth;if(En===io){Re(!1),vt(!1);return}hr?(Re(-ur<En-io),vt(-ur>0)):(Re(ur>0),vt(ur<En-io))}}),Tt=nr(function(ht){bt(ht),k==null||k(ht)}),Ft=function(){if(Z&&Fe.current){var ht;bt({currentTarget:pu(Fe.current),scrollLeft:(ht=Fe.current)===null||ht===void 0?void 0:ht.scrollLeft})}else Re(!1),vt(!1)},yr=function(ht){var Dt,Sr=ht.width;(Dt=ze.current)===null||Dt===void 0||Dt.checkScrollBarVisible();var hr=He.current?He.current.offsetWidth:Sr;R&&$&&He.current&&(hr=$(He.current,hr)||hr),hr!==me&&(Ft(),Ce(hr))},Cr=d.useRef(!1);d.useEffect(function(){Cr.current&&Ft()},[Z,l,he.length]),d.useEffect(function(){Cr.current=!0},[]);var dt=d.useState(0),$t=ce(dt,2),Bt=$t[0],Ut=$t[1],Tr=d.useState(!0),Zr=ce(Tr,2),xn=Zr[0],on=Zr[1];Wt(function(){(!j||!R)&&(Fe.current instanceof Element?Ut(bf(Fe.current).width):Ut(bf(ge.current).width)),on(OP("position","sticky"))},[]),d.useEffect(function(){R&&F&&(F.body.current=Fe.current)});var Mr=d.useCallback(function(ht){return d.createElement(d.Fragment,null,d.createElement(J0,ht),it==="top"&&d.createElement(Jl,ht,Je))},[it,Je]),an=d.useCallback(function(ht){return d.createElement(Jl,ht,Je)},[Je]),Jr=N(["table"],"table"),zr=d.useMemo(function(){return c||(le?Ae==="max-content"?"auto":"fixed":De||_e||ve.some(function(ht){var Dt=ht.ellipsis;return Dt})?"fixed":"auto")},[De,le,ve,c,_e]),ln,xt={colWidths:Be,columCount:ve.length,stickyOffsets:ie,onHeaderRow:w,fixHeader:De,scroll:u},Qe=d.useMemo(function(){return B?null:typeof C=="function"?C():C},[B,C]),yt=d.createElement(b8,{data:S,measureColumnWidth:De||Z||_e}),_t=d.createElement(Cw,{colWidths:ve.map(function(ht){var Dt=ht.width;return Dt}),columns:ve}),Lt=g!=null?d.createElement("caption",{className:"".concat(n,"-caption")},g):void 0,tr=Qn(r,{data:!0}),Dr=Qn(r,{aria:!0});if(De||_e){var mr;typeof L=="function"?(mr=L(S,{scrollbarSize:Bt,ref:Fe,onScroll:bt}),xt.colWidths=ve.map(function(ht,Dt){var Sr=ht.width,hr=Dt===ve.length-1?Sr-Bt:Sr;return typeof hr=="number"&&!Number.isNaN(hr)?hr:0})):mr=d.createElement("div",{style:H(H({},mt),Pt),onScroll:Tt,ref:Fe,className:de("".concat(n,"-body"))},d.createElement(Jr,Te({style:H(H({},jt),{},{tableLayout:zr})},Dr),Lt,_t,yt,!it&&Je&&d.createElement(Jl,{stickyOffsets:ie,flattenColumns:ve},Je)));var Lr=H(H(H({noData:!S.length,maxContentScroll:Z&&Ae==="max-content"},xt),we),{},{direction:f,stickyClassName:pt,onScroll:bt});ln=d.createElement(d.Fragment,null,b!==!1&&d.createElement(Z0,Te({},Lr,{stickyTopOffset:We,className:"".concat(n,"-header"),ref:Me}),Mr),mr,it&&it!=="top"&&d.createElement(Z0,Te({},Lr,{stickyBottomOffset:Ge,className:"".concat(n,"-summary"),ref:Se}),an),_e&&Fe.current&&Fe.current instanceof Element&&d.createElement(_8,{ref:ze,offsetScroll:ft,scrollBodyRef:Fe,onScroll:bt,container:Ze,direction:f}))}else ln=d.createElement("div",{style:H(H({},mt),Pt),className:de("".concat(n,"-content")),onScroll:bt,ref:Fe},d.createElement(Jr,Te({style:H(H({},jt),{},{tableLayout:zr})},Dr),Lt,_t,b!==!1&&d.createElement(J0,Te({},xt,we)),yt,Je&&d.createElement(Jl,{stickyOffsets:ie,flattenColumns:ve},Je)));var xr=d.createElement("div",Te({className:de(n,o,M(M(M(M(M(M(M(M(M(M({},"".concat(n,"-rtl"),f==="rtl"),"".concat(n,"-ping-left"),Xe),"".concat(n,"-ping-right"),at),"".concat(n,"-layout-fixed"),c==="fixed"),"".concat(n,"-fixed-header"),De),"".concat(n,"-fixed-column"),le),"".concat(n,"-fixed-column-gapped"),le&&ye),"".concat(n,"-scroll-horizontal"),Z),"".concat(n,"-has-fix-left"),ve[0]&&ve[0].fixed),"".concat(n,"-has-fix-right"),ve[ve.length-1]&&ve[ve.length-1].fixed==="right")),style:i,id:m,ref:He},tr),p&&d.createElement(tb,{className:"".concat(n,"-title")},p(S)),d.createElement("div",{ref:ge,className:"".concat(n,"-container")},ln),h&&d.createElement(tb,{className:"".concat(n,"-footer")},h(S)));Z&&(xr=d.createElement(ao,{onResize:yr},xr));var Ar=j8(ve,ie,f),wn=d.useMemo(function(){return{scrollX:Ae,prefixCls:n,getComponent:N,scrollbarSize:Bt,direction:f,fixedInfoList:Ar,isSticky:_e,supportSticky:xn,componentWidth:me,fixHeader:De,fixColumn:le,horizonScroll:Z,tableLayout:zr,rowClassName:a,expandedRowClassName:V.expandedRowClassName,expandIcon:W,expandableType:G,expandRowByClick:V.expandRowByClick,expandedRowRender:V.expandedRowRender,expandedRowOffset:V.expandedRowOffset,onTriggerExpand:U,expandIconColumnIndex:V.expandIconColumnIndex,indentSize:V.indentSize,allColumnsFixedLeft:ve.every(function(ht){return ht.fixed==="left"}),emptyNode:Qe,columns:he,flattenColumns:ve,onColumnResize:Rt,colWidths:Be,hoverStartRow:q,hoverEndRow:Q,onHover:te,rowExpandable:V.rowExpandable,onRow:D,getRowKey:T,expandedKeys:K,childrenColumnName:re,rowHoverable:O}},[Ae,n,N,Bt,f,Ar,_e,xn,me,De,le,Z,zr,a,V.expandedRowClassName,W,G,V.expandRowByClick,V.expandedRowRender,V.expandedRowOffset,U,V.expandIconColumnIndex,V.indentSize,Qe,he,ve,Rt,Be,q,Q,te,V.rowExpandable,D,T,K,re,O]);return d.createElement(nn.Provider,{value:wn},xr)}var V8=d.forwardRef(q8);function Ew(e){return cw(V8,e)}var fi=Ew();fi.EXPAND_COLUMN=co;fi.INTERNAL_HOOKS=Bl;fi.Column=u8;fi.ColumnGroup=c8;fi.Summary=pw;var Dm=xm(null),kw=xm(null);function U8(e,t,r){var n=t||1;return r[e+n]-(r[e]||0)}function X8(e){var t=e.rowInfo,r=e.column,n=e.colIndex,o=e.indent,a=e.index,i=e.component,l=e.renderIndex,s=e.record,u=e.style,c=e.className,f=e.inverse,p=e.getHeight,h=r.render,v=r.dataIndex,g=r.className,m=r.width,b=_r(kw,["columnsOffset"]),y=b.columnsOffset,C=yw(t,r,n,o,a),D=C.key,w=C.fixedInfo,k=C.appendCellNode,E=C.additionalCellProps,x=E.style,F=E.colSpan,j=F===void 0?1:F,$=E.rowSpan,P=$===void 0?1:$,A=n-1,O=U8(A,j,y),S=j>1?m-O:0,B=H(H(H({},x),u),{},{flex:"0 0 ".concat(O,"px"),width:"".concat(O,"px"),marginRight:S,pointerEvents:"auto"}),R=d.useMemo(function(){return f?P<=1:j===0||P===0||P>1},[P,j,f]);R?B.visibility="hidden":f&&(B.height=p==null?void 0:p(P));var N=R?function(){return null}:h,T={};return(P===0||j===0)&&(T.rowSpan=1,T.colSpan=1),d.createElement(di,Te({className:de(g,c),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:i,prefixCls:t.prefixCls,key:D,record:s,index:a,renderIndex:l,dataIndex:v,render:N,shouldCellUpdate:r.shouldCellUpdate},w,{appendNode:k,additionalProps:H(H({},E),{},{style:B},T)}))}var G8=["data","index","className","rowKey","style","extra","getHeight"],Y8=d.forwardRef(function(e,t){var r=e.data,n=e.index,o=e.className,a=e.rowKey,i=e.style,l=e.extra,s=e.getHeight,u=Ct(e,G8),c=r.record,f=r.indent,p=r.index,h=_r(nn,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),v=h.scrollX,g=h.flattenColumns,m=h.prefixCls,b=h.fixColumn,y=h.componentWidth,C=_r(Dm,["getComponent"]),D=C.getComponent,w=gw(c,a,n,f),k=D(["body","row"],"div"),E=D(["body","cell"],"div"),x=w.rowSupportExpand,F=w.expanded,j=w.rowProps,$=w.expandedRowRender,P=w.expandedRowClassName,A;if(x&&F){var O=$(c,n,f+1,F),S=bw(P,c,n,f),B={};b&&(B={style:M({},"--virtual-width","".concat(y,"px"))});var R="".concat(m,"-expanded-row-cell");A=d.createElement(k,{className:de("".concat(m,"-expanded-row"),"".concat(m,"-expanded-row-level-").concat(f+1),S)},d.createElement(di,{component:E,prefixCls:m,className:de(R,M({},"".concat(R,"-fixed"),b)),additionalProps:B},O))}var N=H(H({},i),{},{width:v});l&&(N.position="absolute",N.pointerEvents="none");var T=d.createElement(k,Te({},j,u,{"data-row-key":a,ref:x?null:t,className:de(o,"".concat(m,"-row"),j==null?void 0:j.className,M({},"".concat(m,"-row-extra"),l)),style:H(H({},N),j==null?void 0:j.style)}),g.map(function(L,X){return d.createElement(X8,{key:X,component:E,rowInfo:w,column:L,colIndex:X,indent:f,index:n,renderIndex:p,record:c,inverse:l,getHeight:s})}));return x?d.createElement("div",{ref:t},T,A):T}),nb=ci(Y8),Z8=d.forwardRef(function(e,t){var r=e.data,n=e.onScroll,o=_r(nn,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),a=o.flattenColumns,i=o.onColumnResize,l=o.getRowKey,s=o.expandedKeys,u=o.prefixCls,c=o.childrenColumnName,f=o.scrollX,p=o.direction,h=_r(Dm),v=h.sticky,g=h.scrollY,m=h.listItemHeight,b=h.getComponent,y=h.onScroll,C=d.useRef(),D=hw(r,c,s,l),w=d.useMemo(function(){var A=0;return a.map(function(O){var S=O.width,B=O.key;return A+=S,[B,S,A]})},[a]),k=d.useMemo(function(){return w.map(function(A){return A[2]})},[w]);d.useEffect(function(){w.forEach(function(A){var O=ce(A,2),S=O[0],B=O[1];i(S,B)})},[w]),d.useImperativeHandle(t,function(){var A,O={scrollTo:function(S){var B;(B=C.current)===null||B===void 0||B.scrollTo(S)},nativeElement:(A=C.current)===null||A===void 0?void 0:A.nativeElement};return Object.defineProperty(O,"scrollLeft",{get:function(){var S;return((S=C.current)===null||S===void 0?void 0:S.getScrollInfo().x)||0},set:function(S){var B;(B=C.current)===null||B===void 0||B.scrollTo({left:S})}}),O});var E=function(A,O){var S,B=(S=D[O])===null||S===void 0?void 0:S.record,R=A.onCell;if(R){var N,T=R(B,O);return(N=T==null?void 0:T.rowSpan)!==null&&N!==void 0?N:1}return 1},x=function(A){var O=A.start,S=A.end,B=A.getSize,R=A.offsetY;if(S<0)return null;for(var N=a.filter(function(K){return E(K,O)===0}),T=O,L=function(K){if(N=N.filter(function(W){return E(W,K)===0}),!N.length)return T=K,1},X=O;X>=0&&!L(X);X-=1);for(var _=a.filter(function(K){return E(K,S)!==1}),q=S,Q=function(K){if(_=_.filter(function(W){return E(W,K)!==1}),!_.length)return q=Math.max(K-1,S),1},te=S;te<D.length&&!Q(te);te+=1);for(var z=[],Y=function(K){var W=D[K];if(!W)return 1;a.some(function(re){return E(re,K)>1})&&z.push(K)},V=T;V<=q;V+=1)Y(V);var G=z.map(function(K){var W=D[K],re=l(W.record,K),U=function(ne){var ue=K+ne-1,me=l(D[ue].record,ue),Ce=B(re,me);return Ce.bottom-Ce.top},J=B(re);return d.createElement(nb,{key:K,data:W,rowKey:re,index:K,style:{top:-R+J.top},extra:!0,getHeight:U})});return G},F=d.useMemo(function(){return{columnsOffset:k}},[k]),j="".concat(u,"-tbody"),$=b(["body","wrapper"]),P={};return v&&(P.position="sticky",P.bottom=0,ut(v)==="object"&&v.offsetScroll&&(P.bottom=v.offsetScroll)),d.createElement(kw.Provider,{value:F},d.createElement(Pu,{fullHeight:!1,ref:C,prefixCls:"".concat(j,"-virtual"),styles:{horizontalScrollBar:P},className:j,height:g,itemHeight:m||24,data:D,itemKey:function(A){return l(A.record)},component:$,scrollWidth:f,direction:p,onVirtualScroll:function(A){var O,S=A.x;n({currentTarget:(O=C.current)===null||O===void 0?void 0:O.nativeElement,scrollLeft:S})},onScroll:y,extraRender:x},function(A,O,S){var B=l(A.record,O);return d.createElement(nb,{data:A,rowKey:B,index:O,style:S.style})}))}),J8=ci(Z8),Q8=function(e,t){var r=t.ref,n=t.onScroll;return d.createElement(J8,{ref:r,data:e,onScroll:n})};function eM(e,t){var r=e.data,n=e.columns,o=e.scroll,a=e.sticky,i=e.prefixCls,l=i===void 0?ww:i,s=e.className,u=e.listItemHeight,c=e.components,f=e.onScroll,p=o||{},h=p.x,v=p.y;typeof h!="number"&&(h=1),typeof v!="number"&&(v=500);var g=nr(function(y,C){return vn(c,y)||C}),m=nr(f),b=d.useMemo(function(){return{sticky:a,scrollY:v,listItemHeight:u,getComponent:g,onScroll:m}},[a,v,u,g,m]);return d.createElement(Dm.Provider,{value:b},d.createElement(fi,Te({},e,{className:de(s,"".concat(l,"-virtual")),scroll:H(H({},o),{},{x:h}),components:H(H({},c),{},{body:r!=null&&r.length?Q8:void 0}),columns:n,internalHooks:Bl,tailor:!0,ref:t})))}var tM=d.forwardRef(eM);function Dw(e){return cw(tM,e)}Dw();const rM=e=>null,nM=e=>null;var Sm=d.createContext(null),oM=d.createContext({}),aM=function(e){for(var t=e.prefixCls,r=e.level,n=e.isStart,o=e.isEnd,a="".concat(t,"-indent-unit"),i=[],l=0;l<r;l+=1)i.push(d.createElement("span",{key:l,className:de(a,M(M({},"".concat(a,"-start"),n[l]),"".concat(a,"-end"),o[l]))}));return d.createElement("span",{"aria-hidden":"true",className:"".concat(t,"-indent")},i)};const iM=d.memo(aM);var lM=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],ob="open",ab="close",sM="---",hl=function(e){var t,r,n,o=e.eventKey,a=e.className,i=e.style,l=e.dragOver,s=e.dragOverGapTop,u=e.dragOverGapBottom,c=e.isLeaf,f=e.isStart,p=e.isEnd,h=e.expanded,v=e.selected,g=e.checked,m=e.halfChecked,b=e.loading,y=e.domRef,C=e.active,D=e.data,w=e.onMouseMove,k=e.selectable,E=Ct(e,lM),x=ee.useContext(Sm),F=ee.useContext(oM),j=ee.useRef(null),$=ee.useState(!1),P=ce($,2),A=P[0],O=P[1],S=!!(x.disabled||e.disabled||(t=F.nodeDisabled)!==null&&t!==void 0&&t.call(F,D)),B=ee.useMemo(function(){return!x.checkable||e.checkable===!1?!1:x.checkable},[x.checkable,e.checkable]),R=function(ge){S||x.onNodeSelect(ge,wr(e))},N=function(ge){S||!B||e.disableCheckbox||x.onNodeCheck(ge,wr(e),!g)},T=ee.useMemo(function(){return typeof k=="boolean"?k:x.selectable},[k,x.selectable]),L=function(ge){x.onNodeClick(ge,wr(e)),T?R(ge):N(ge)},X=function(ge){x.onNodeDoubleClick(ge,wr(e))},_=function(ge){x.onNodeMouseEnter(ge,wr(e))},q=function(ge){x.onNodeMouseLeave(ge,wr(e))},Q=function(ge){x.onNodeContextMenu(ge,wr(e))},te=ee.useMemo(function(){return!!(x.draggable&&(!x.draggable.nodeDraggable||x.draggable.nodeDraggable(D)))},[x.draggable,D]),z=function(ge){ge.stopPropagation(),O(!0),x.onNodeDragStart(ge,e);try{ge.dataTransfer.setData("text/plain","")}catch{}},Y=function(ge){ge.preventDefault(),ge.stopPropagation(),x.onNodeDragEnter(ge,e)},V=function(ge){ge.preventDefault(),ge.stopPropagation(),x.onNodeDragOver(ge,e)},G=function(ge){ge.stopPropagation(),x.onNodeDragLeave(ge,e)},K=function(ge){ge.stopPropagation(),O(!1),x.onNodeDragEnd(ge,e)},W=function(ge){ge.preventDefault(),ge.stopPropagation(),O(!1),x.onNodeDrop(ge,e)},re=function(ge){b||x.onNodeExpand(ge,wr(e))},U=ee.useMemo(function(){var ge=un(x.keyEntities,o)||{},Se=ge.children;return!!(Se||[]).length},[x.keyEntities,o]),J=ee.useMemo(function(){return c===!1?!1:c||!x.loadData&&!U||x.loadData&&e.loaded&&!U},[c,x.loadData,U,e.loaded]);ee.useEffect(function(){b||typeof x.loadData=="function"&&h&&!J&&!e.loaded&&x.onNodeLoad(wr(e))},[b,x.loadData,x.onNodeLoad,h,J,e]);var ne=ee.useMemo(function(){var ge;return(ge=x.draggable)!==null&&ge!==void 0&&ge.icon?ee.createElement("span",{className:"".concat(x.prefixCls,"-draggable-icon")},x.draggable.icon):null},[x.draggable]),ue=function(ge){var Se=e.switcherIcon||x.switcherIcon;return typeof Se=="function"?Se(H(H({},e),{},{isLeaf:ge})):Se},me=function(){if(J){var ge=ue(!0);return ge!==!1?ee.createElement("span",{className:de("".concat(x.prefixCls,"-switcher"),"".concat(x.prefixCls,"-switcher-noop"))},ge):null}var Se=ue(!1);return Se!==!1?ee.createElement("span",{onClick:re,className:de("".concat(x.prefixCls,"-switcher"),"".concat(x.prefixCls,"-switcher_").concat(h?ob:ab))},Se):null},Ce=ee.useMemo(function(){if(!B)return null;var ge=typeof B!="boolean"?B:null;return ee.createElement("span",{className:de("".concat(x.prefixCls,"-checkbox"),M(M(M({},"".concat(x.prefixCls,"-checkbox-checked"),g),"".concat(x.prefixCls,"-checkbox-indeterminate"),!g&&m),"".concat(x.prefixCls,"-checkbox-disabled"),S||e.disableCheckbox)),onClick:N,role:"checkbox","aria-checked":m?"mixed":g,"aria-disabled":S||e.disableCheckbox,"aria-label":"Select ".concat(typeof e.title=="string"?e.title:"tree node")},ge)},[B,g,m,S,e.disableCheckbox,e.title]),Ne=ee.useMemo(function(){return J?null:h?ob:ab},[J,h]),pe=ee.useMemo(function(){return ee.createElement("span",{className:de("".concat(x.prefixCls,"-iconEle"),"".concat(x.prefixCls,"-icon__").concat(Ne||"docu"),M({},"".concat(x.prefixCls,"-icon_loading"),b))})},[x.prefixCls,Ne,b]),he=ee.useMemo(function(){var ge=!!x.draggable,Se=!e.disabled&&ge&&x.dragOverNodeKey===o;return Se?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]),ve=ee.useMemo(function(){var ge=e.title,Se=ge===void 0?sM:ge,qe="".concat(x.prefixCls,"-node-content-wrapper"),Ye;if(x.showIcon){var Xe=e.icon||x.icon;Ye=Xe?ee.createElement("span",{className:de("".concat(x.prefixCls,"-iconEle"),"".concat(x.prefixCls,"-icon__customize"))},typeof Xe=="function"?Xe(e):Xe):pe}else x.loadData&&b&&(Ye=pe);var Re;return typeof Se=="function"?Re=Se(D):x.titleRender?Re=x.titleRender(D):Re=Se,ee.createElement("span",{ref:j,title:typeof Se=="string"?Se:"",className:de(qe,"".concat(qe,"-").concat(Ne||"normal"),M({},"".concat(x.prefixCls,"-node-selected"),!S&&(v||A))),onMouseEnter:_,onMouseLeave:q,onContextMenu:Q,onClick:L,onDoubleClick:X},Ye,ee.createElement("span",{className:"".concat(x.prefixCls,"-title")},Re),he)},[x.prefixCls,x.showIcon,e,x.icon,pe,x.titleRender,D,Ne,_,q,Q,L,X]),be=Qn(E,{aria:!0,data:!0}),ye=un(x.keyEntities,o)||{},Ae=ye.level,we=p[p.length-1],He=!S&&te,Me=x.draggingNodeKey===o,Fe=k!==void 0?{"aria-selected":!!k}:void 0;return ee.createElement("div",Te({ref:y,role:"treeitem","aria-expanded":c?void 0:h,className:de(a,"".concat(x.prefixCls,"-treenode"),(n={},M(M(M(M(M(M(M(M(M(M(n,"".concat(x.prefixCls,"-treenode-disabled"),S),"".concat(x.prefixCls,"-treenode-switcher-").concat(h?"open":"close"),!c),"".concat(x.prefixCls,"-treenode-checkbox-checked"),g),"".concat(x.prefixCls,"-treenode-checkbox-indeterminate"),m),"".concat(x.prefixCls,"-treenode-selected"),v),"".concat(x.prefixCls,"-treenode-loading"),b),"".concat(x.prefixCls,"-treenode-active"),C),"".concat(x.prefixCls,"-treenode-leaf-last"),we),"".concat(x.prefixCls,"-treenode-draggable"),te),"dragging",Me),M(M(M(M(M(M(M(n,"drop-target",x.dropTargetKey===o),"drop-container",x.dropContainerKey===o),"drag-over",!S&&l),"drag-over-gap-top",!S&&s),"drag-over-gap-bottom",!S&&u),"filter-node",(r=x.filterTreeNode)===null||r===void 0?void 0:r.call(x,wr(e))),"".concat(x.prefixCls,"-treenode-leaf"),J))),style:i,draggable:He,onDragStart:He?z:void 0,onDragEnter:te?Y:void 0,onDragOver:te?V:void 0,onDragLeave:te?G:void 0,onDrop:te?W:void 0,onDragEnd:te?K:void 0,onMouseMove:w},Fe,be),ee.createElement(iM,{prefixCls:x.prefixCls,level:Ae,isStart:f,isEnd:p}),ne,me(),Ce,ve)};hl.isTreeNode=1;function Un(e,t){if(!e)return[];var r=e.slice(),n=r.indexOf(t);return n>=0&&r.splice(n,1),r}function so(e,t){var r=(e||[]).slice();return r.indexOf(t)===-1&&r.push(t),r}function $m(e){return e.split("-")}function uM(e,t){var r=[],n=un(t,e);function o(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];a.forEach(function(i){var l=i.key,s=i.children;r.push(l),o(s)})}return o(n.children),r}function cM(e){if(e.parent){var t=$m(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function dM(e){var t=$m(e.pos);return Number(t[t.length-1])===0}function ib(e,t,r,n,o,a,i,l,s,u){var c,f=e.clientX,p=e.clientY,h=e.target.getBoundingClientRect(),v=h.top,g=h.height,m=(u==="rtl"?-1:1)*(((o==null?void 0:o.x)||0)-f),b=(m-12)/n,y=s.filter(function(B){var R;return(R=l[B])===null||R===void 0||(R=R.children)===null||R===void 0?void 0:R.length}),C=un(l,r.eventKey);if(p<v+g/2){var D=i.findIndex(function(B){return B.key===C.key}),w=D<=0?0:D-1,k=i[w].key;C=un(l,k)}var E=C.key,x=C,F=C.key,j=0,$=0;if(!y.includes(E))for(var P=0;P<b&&cM(C);P+=1)C=C.parent,$+=1;var A=t.data,O=C.node,S=!0;return dM(C)&&C.level===0&&p<v+g/2&&a({dragNode:A,dropNode:O,dropPosition:-1})&&C.key===r.eventKey?j=-1:(x.children||[]).length&&y.includes(F)?a({dragNode:A,dropNode:O,dropPosition:0})?j=0:S=!1:$===0?b>-1.5?a({dragNode:A,dropNode:O,dropPosition:1})?j=1:S=!1:a({dragNode:A,dropNode:O,dropPosition:0})?j=0:a({dragNode:A,dropNode:O,dropPosition:1})?j=1:S=!1:a({dragNode:A,dropNode:O,dropPosition:1})?j=1:S=!1,{dropPosition:j,dropLevelOffset:$,dropTargetKey:C.key,dropTargetPos:C.pos,dragOverNodeKey:F,dropContainerKey:j===0?null:((c=C.parent)===null||c===void 0?void 0:c.key)||null,dropAllowed:S}}function lb(e,t){if(e){var r=t.multiple;return r?e.slice():e.length?[e[0]]:e}}function Jc(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(ut(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return lr(!1,"`checkedKeys` is not an array or an object"),null;return t}function qf(e,t){var r=new Set;function n(o){if(!r.has(o)){var a=un(t,o);if(a){r.add(o);var i=a.parent,l=a.node;l.disabled||i&&n(i.key)}}}return(e||[]).forEach(function(o){n(o)}),Pe(r)}function fM(e){const[t,r]=wt(null);return[gt((n,o,a)=>{const i=t??n,l=Math.min(i||0,n),s=Math.max(i||0,n),u=o.slice(l,s+1).map(p=>e(p)),c=u.some(p=>!a.has(p)),f=[];return u.forEach(p=>{c?(a.has(p)||f.push(p),a.add(p)):(a.delete(p),f.push(p))}),r(c?s:null),f},[t]),n=>{r(n)}]}const ko={},Vf="SELECT_ALL",Uf="SELECT_INVERT",Xf="SELECT_NONE",sb=[],Sw=(e,t,r=[])=>((t||[]).forEach(n=>{r.push(n),n&&typeof n=="object"&&e in n&&Sw(e,n[e],r)}),r),pM=(e,t)=>{const{preserveSelectedRowKeys:r,selectedRowKeys:n,defaultSelectedRowKeys:o,getCheckboxProps:a,getTitleCheckboxProps:i,onChange:l,onSelect:s,onSelectAll:u,onSelectInvert:c,onSelectNone:f,onSelectMultiple:p,columnWidth:h,type:v,selections:g,fixed:m,renderCell:b,hideSelectAll:y,checkStrictly:C=!0}=t||{},{prefixCls:D,data:w,pageData:k,getRecordByKey:E,getRowKey:x,expandType:F,childrenColumnName:j,locale:$,getPopupContainer:P}=e,A=oi(),[O,S]=fM(W=>W),[B,R]=Ur(n||o||sb,{value:n}),N=d.useRef(new Map),T=gt(W=>{if(r){const re=new Map;W.forEach(U=>{let J=E(U);!J&&N.current.has(U)&&(J=N.current.get(U)),re.set(U,J)}),N.current=re}},[E,r]);d.useEffect(()=>{T(B)},[B]);const L=Et(()=>Sw(j,k),[j,k]),{keyEntities:X}=Et(()=>{if(C)return{keyEntities:null};let W=w;if(r){const re=new Set(L.map((J,ne)=>x(J,ne))),U=Array.from(N.current).reduce((J,[ne,ue])=>re.has(ne)?J:J.concat(ue),[]);W=[].concat(Pe(W),Pe(U))}return bm(W,{externalGetKey:x,childrenPropName:j})},[w,x,C,j,r,L]),_=Et(()=>{const W=new Map;return L.forEach((re,U)=>{const J=x(re,U),ne=(a?a(re):null)||{};W.set(J,ne)}),W},[L,x,a]),q=gt(W=>{const re=x(W);let U;return _.has(re)?U=_.get(x(W)):U=a?a(W):void 0,!!(U!=null&&U.disabled)},[_,x]),[Q,te]=Et(()=>{if(C)return[B||[],[]];const{checkedKeys:W,halfCheckedKeys:re}=ja(B,!0,X,q);return[W||[],re]},[B,C,X,q]),z=Et(()=>{const W=v==="radio"?Q.slice(0,1):Q;return new Set(W)},[Q,v]),Y=Et(()=>v==="radio"?new Set:new Set(te),[te,v]);d.useEffect(()=>{t||R(sb)},[!!t]);const V=gt((W,re)=>{let U,J;T(W),r?(U=W,J=W.map(ne=>N.current.get(ne))):(U=[],J=[],W.forEach(ne=>{const ue=E(ne);ue!==void 0&&(U.push(ne),J.push(ue))})),R(U),l==null||l(U,J,{type:re})},[R,E,l,r]),G=gt((W,re,U,J)=>{if(s){const ne=U.map(ue=>E(ue));s(E(W),re,ne,J)}V(U,"single")},[s,E,V]),K=Et(()=>!g||y?null:(g===!0?[Vf,Uf,Xf]:g).map(W=>W===Vf?{key:"all",text:$.selectionAll,onSelect(){V(w.map((re,U)=>x(re,U)).filter(re=>{const U=_.get(re);return!(U!=null&&U.disabled)||z.has(re)}),"all")}}:W===Uf?{key:"invert",text:$.selectInvert,onSelect(){const re=new Set(z);k.forEach((J,ne)=>{const ue=x(J,ne),me=_.get(ue);me!=null&&me.disabled||(re.has(ue)?re.delete(ue):re.add(ue))});const U=Array.from(re);c&&(A.deprecated(!1,"onSelectInvert","onChange"),c(U)),V(U,"invert")}}:W===Xf?{key:"none",text:$.selectNone,onSelect(){f==null||f(),V(Array.from(z).filter(re=>{const U=_.get(re);return U==null?void 0:U.disabled}),"none")}}:W).map(W=>Object.assign(Object.assign({},W),{onSelect:(...re)=>{var U,J;(J=W.onSelect)===null||J===void 0||(U=J).call.apply(U,[W].concat(re)),S(null)}})),[g,z,k,x,c,V]);return[gt(W=>{var re;if(!t)return W.filter(ge=>ge!==ko);let U=Pe(W);const J=new Set(z),ne=L.map(x).filter(ge=>!_.get(ge).disabled),ue=ne.every(ge=>J.has(ge)),me=ne.some(ge=>J.has(ge)),Ce=()=>{const ge=[];ue?ne.forEach(qe=>{J.delete(qe),ge.push(qe)}):ne.forEach(qe=>{J.has(qe)||(J.add(qe),ge.push(qe))});const Se=Array.from(J);u==null||u(!ue,Se.map(qe=>E(qe)),ge.map(qe=>E(qe))),V(Se,"all"),S(null)};let Ne,pe;if(v!=="radio"){let ge;if(K){const at={getPopupContainer:P,items:K.map((vt,At)=>{const{key:fe,text:Oe,onSelect:rt}=vt;return{key:fe??At,onClick:()=>{rt==null||rt(ne)},label:Oe}})};ge=d.createElement("div",{className:`${D}-selection-extra`},d.createElement(ym,{menu:at,getPopupContainer:P},d.createElement("span",null,d.createElement(sx,null))))}const Se=L.map((at,vt)=>{const At=x(at,vt),fe=_.get(At)||{};return Object.assign({checked:J.has(At)},fe)}).filter(({disabled:at})=>at),qe=!!Se.length&&Se.length===L.length,Ye=qe&&Se.every(({checked:at})=>at),Xe=qe&&Se.some(({checked:at})=>at),Re=(i==null?void 0:i())||{},{onChange:lt,disabled:je}=Re;pe=d.createElement(Qa,Object.assign({"aria-label":ge?"Custom selection":"Select all"},Re,{checked:qe?Ye:!!L.length&&ue,indeterminate:qe?!Ye&&Xe:!ue&&me,onChange:at=>{Ce(),lt==null||lt(at)},disabled:je??(L.length===0||qe),skipGroup:!0})),Ne=!y&&d.createElement("div",{className:`${D}-selection`},pe,ge)}let he;v==="radio"?he=(ge,Se,qe)=>{const Ye=x(Se,qe),Xe=J.has(Ye),Re=_.get(Ye);return{node:d.createElement(Sl,Object.assign({},Re,{checked:Xe,onClick:lt=>{var je;lt.stopPropagation(),(je=Re==null?void 0:Re.onClick)===null||je===void 0||je.call(Re,lt)},onChange:lt=>{var je;J.has(Ye)||G(Ye,!0,[Ye],lt.nativeEvent),(je=Re==null?void 0:Re.onChange)===null||je===void 0||je.call(Re,lt)}})),checked:Xe}}:he=(ge,Se,qe)=>{var Ye;const Xe=x(Se,qe),Re=J.has(Xe),lt=Y.has(Xe),je=_.get(Xe);let at;return F==="nest"?at=lt:at=(Ye=je==null?void 0:je.indeterminate)!==null&&Ye!==void 0?Ye:lt,{node:d.createElement(Qa,Object.assign({},je,{indeterminate:at,checked:Re,skipGroup:!0,onClick:vt=>{var At;vt.stopPropagation(),(At=je==null?void 0:je.onClick)===null||At===void 0||At.call(je,vt)},onChange:vt=>{var At;const{nativeEvent:fe}=vt,{shiftKey:Oe}=fe,rt=ne.findIndex(ke=>ke===Xe),Ke=Q.some(ke=>ne.includes(ke));if(Oe&&C&&Ke){const ke=O(rt,ne,J),Be=Array.from(J);p==null||p(!Re,Be.map(ie=>E(ie)),ke.map(ie=>E(ie))),V(Be,"multiple")}else{const ke=Q;if(C){const Be=Re?Un(ke,Xe):so(ke,Xe);G(Xe,!Re,Be,fe)}else{const Be=ja([].concat(Pe(ke),[Xe]),!0,X,q),{checkedKeys:ie,halfCheckedKeys:De}=Be;let Z=ie;if(Re){const le=new Set(ie);le.delete(Xe),Z=ja(Array.from(le),{halfCheckedKeys:De},X,q).checkedKeys}G(Xe,!Re,Z,fe)}}S(Re?null:rt),(At=je==null?void 0:je.onChange)===null||At===void 0||At.call(je,vt)}})),checked:Re}};const ve=(ge,Se,qe)=>{const{node:Ye,checked:Xe}=he(ge,Se,qe);return b?b(Xe,Se,qe,Ye):Ye};if(!U.includes(ko))if(U.findIndex(ge=>{var Se;return((Se=ge[_i])===null||Se===void 0?void 0:Se.columnType)==="EXPAND_COLUMN"})===0){const[ge,...Se]=U;U=[ge,ko].concat(Pe(Se))}else U=[ko].concat(Pe(U));const be=U.indexOf(ko);U=U.filter((ge,Se)=>ge!==ko||Se===be);const ye=U[be-1],Ae=U[be+1];let we=m;we===void 0&&((Ae==null?void 0:Ae.fixed)!==void 0?we=Ae.fixed:(ye==null?void 0:ye.fixed)!==void 0&&(we=ye.fixed)),we&&ye&&((re=ye[_i])===null||re===void 0?void 0:re.columnType)==="EXPAND_COLUMN"&&ye.fixed===void 0&&(ye.fixed=we);const He=de(`${D}-selection-col`,{[`${D}-selection-col-with-dropdown`]:g&&v==="checkbox"}),Me=()=>t!=null&&t.columnTitle?typeof t.columnTitle=="function"?t.columnTitle(pe):t.columnTitle:Ne,Fe={fixed:we,width:h,className:`${D}-selection-column`,title:Me(),render:ve,onCell:t.onCell,align:t.align,[_i]:{className:He}};return U.map(ge=>ge===ko?Fe:ge)},[x,L,t,Q,z,Y,h,K,F,_,p,G,q]),z]};function mM(e,t){return e._antProxy=e._antProxy||{},Object.keys(t).forEach(r=>{if(!(r in e._antProxy)){const n=e[r];e._antProxy[r]=n,e[r]=t[r]}}),e}function hM(e,t){return ei(e,()=>{const r=t(),{nativeElement:n}=r;return typeof Proxy<"u"?new Proxy(n,{get(o,a){return r[a]?r[a]:Reflect.get(o,a)}}):mM(n,r)})}function gM(e){return t=>{const{prefixCls:r,onExpand:n,record:o,expanded:a,expandable:i}=t,l=`${r}-row-expand-icon`;return d.createElement("button",{type:"button",onClick:s=>{n(o,s),s.stopPropagation()},className:de(l,{[`${l}-spaced`]:!i,[`${l}-expanded`]:i&&a,[`${l}-collapsed`]:i&&!a}),"aria-label":a?e.collapse:e.expand,"aria-expanded":a})}}function vM(e){return(t,r)=>{const n=t.querySelector(`.${e}-container`);let o=r;if(n){const a=getComputedStyle(n),i=parseInt(a.borderLeftWidth,10),l=parseInt(a.borderRightWidth,10);o=r-i-l}return o}}const jo=(e,t)=>"key"in e&&e.key!==void 0&&e.key!==null?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex:t;function pi(e,t){return t?`${t}-${e}`:`${e}`}const _u=(e,t)=>typeof e=="function"?e(t):e,bM=(e,t)=>{const r=_u(e,t);return Object.prototype.toString.call(r)==="[object Object]"?"":r};function yM(e){const t=d.useRef(e),r=dx();return[()=>t.current,n=>{t.current=n,r()}]}var CM=function(e){var t=e.dropPosition,r=e.dropLevelOffset,n=e.indent,o={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case-1:o.top=0,o.left=-r*n;break;case 1:o.bottom=0,o.left=-r*n;break;case 0:o.bottom=0,o.left=n;break}return ee.createElement("div",{style:o})};function $w(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function xM(e,t){var r=d.useState(!1),n=ce(r,2),o=n[0],a=n[1];Wt(function(){if(o)return e(),function(){t()}},[o]),Wt(function(){return a(!0),function(){a(!1)}},[])}var wM=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],EM=d.forwardRef(function(e,t){var r=e.className,n=e.style,o=e.motion,a=e.motionNodes,i=e.motionType,l=e.onMotionStart,s=e.onMotionEnd,u=e.active,c=e.treeNodeRequiredProps,f=Ct(e,wM),p=d.useState(!0),h=ce(p,2),v=h[0],g=h[1],m=d.useContext(Sm),b=m.prefixCls,y=a&&i!=="hide";Wt(function(){a&&y!==v&&g(y)},[a]);var C=function(){a&&l()},D=d.useRef(!1),w=function(){a&&!D.current&&(D.current=!0,s())};xM(C,w);var k=function(E){y===E&&w()};return a?d.createElement(ca,Te({ref:t,visible:v},o,{motionAppear:i==="show",onVisibleChanged:k}),function(E,x){var F=E.className,j=E.style;return d.createElement("div",{ref:x,className:de("".concat(b,"-treenode-motion"),F),style:j},a.map(function($){var P=Object.assign({},($w($.data),$.data)),A=$.title,O=$.key,S=$.isStart,B=$.isEnd;delete P.children;var R=Li(O,c);return d.createElement(hl,Te({},P,R,{title:A,active:u,data:$.data,key:O,isStart:S,isEnd:B}))}))}):d.createElement(hl,Te({domRef:t,className:r,style:n},f,{active:u}))});function kM(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=e.length,n=t.length;if(Math.abs(r-n)!==1)return{add:!1,key:null};function o(a,i){var l=new Map;a.forEach(function(u){l.set(u,!0)});var s=i.filter(function(u){return!l.has(u)});return s.length===1?s[0]:null}return r<n?{add:!0,key:o(e,t)}:{add:!1,key:o(t,e)}}function ub(e,t,r){var n=e.findIndex(function(l){return l.key===r}),o=e[n+1],a=t.findIndex(function(l){return l.key===r});if(o){var i=t.findIndex(function(l){return l.key===o.key});return t.slice(a+1,i)}return t.slice(a+1)}var DM=["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"],cb={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},SM=function(){},aa="RC_TREE_MOTION_".concat(Math.random()),Gf={key:aa},Bw={key:aa,level:0,index:0,pos:"0",node:Gf,nodes:[Gf]},db={parent:null,children:[],pos:Bw.pos,data:Gf,title:null,key:aa,isStart:[],isEnd:[]};function fb(e,t,r,n){return t===!1||!r?e:e.slice(0,Math.ceil(r/n)+1)}function pb(e){var t=e.key,r=e.pos;return $l(t,r)}function $M(e){for(var t=String(e.data.key),r=e;r.parent;)r=r.parent,t="".concat(r.data.key," > ").concat(t);return t}var BM=d.forwardRef(function(e,t){var r=e.prefixCls,n=e.data;e.selectable,e.checkable;var o=e.expandedKeys,a=e.selectedKeys,i=e.checkedKeys,l=e.loadedKeys,s=e.loadingKeys,u=e.halfCheckedKeys,c=e.keyEntities,f=e.disabled,p=e.dragging,h=e.dragOverNodeKey,v=e.dropPosition,g=e.motion,m=e.height,b=e.itemHeight,y=e.virtual,C=e.scrollWidth,D=e.focusable,w=e.activeItem,k=e.focused,E=e.tabIndex,x=e.onKeyDown,F=e.onFocus,j=e.onBlur,$=e.onActiveChange,P=e.onListChangeStart,A=e.onListChangeEnd,O=Ct(e,DM),S=d.useRef(null),B=d.useRef(null);d.useImperativeHandle(t,function(){return{scrollTo:function(he){S.current.scrollTo(he)},getIndentWidth:function(){return B.current.offsetWidth}}});var R=d.useState(o),N=ce(R,2),T=N[0],L=N[1],X=d.useState(n),_=ce(X,2),q=_[0],Q=_[1],te=d.useState(n),z=ce(te,2),Y=z[0],V=z[1],G=d.useState([]),K=ce(G,2),W=K[0],re=K[1],U=d.useState(null),J=ce(U,2),ne=J[0],ue=J[1],me=d.useRef(n);me.current=n;function Ce(){var he=me.current;Q(he),V(he),re([]),ue(null),A()}Wt(function(){L(o);var he=kM(T,o);if(he.key!==null)if(he.add){var ve=q.findIndex(function(Me){var Fe=Me.key;return Fe===he.key}),be=fb(ub(q,n,he.key),y,m,b),ye=q.slice();ye.splice(ve+1,0,db),V(ye),re(be),ue("show")}else{var Ae=n.findIndex(function(Me){var Fe=Me.key;return Fe===he.key}),we=fb(ub(n,q,he.key),y,m,b),He=n.slice();He.splice(Ae+1,0,db),V(He),re(we),ue("hide")}else q!==n&&(Q(n),V(n))},[o,n]),d.useEffect(function(){p||Ce()},[p]);var Ne=g?Y:n,pe={expandedKeys:o,selectedKeys:a,loadedKeys:l,loadingKeys:s,checkedKeys:i,halfCheckedKeys:u,dragOverNodeKey:h,dropPosition:v,keyEntities:c};return d.createElement(d.Fragment,null,k&&w&&d.createElement("span",{style:cb,"aria-live":"assertive"},$M(w)),d.createElement("div",null,d.createElement("input",{style:cb,disabled:D===!1||f,tabIndex:D!==!1?E:null,onKeyDown:x,onFocus:F,onBlur:j,value:"",onChange:SM,"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:B,className:"".concat(r,"-indent-unit")}))),d.createElement(Pu,Te({},O,{data:Ne,itemKey:pb,height:m,fullHeight:!1,virtual:y,itemHeight:b,scrollWidth:C,prefixCls:"".concat(r,"-list"),ref:S,role:"tree",onVisibleChange:function(he){he.every(function(ve){return pb(ve)!==aa})&&Ce()}}),function(he){var ve=he.pos,be=Object.assign({},($w(he.data),he.data)),ye=he.title,Ae=he.key,we=he.isStart,He=he.isEnd,Me=$l(Ae,ve);delete be.key,delete be.children;var Fe=Li(Me,pe);return d.createElement(EM,Te({},be,Fe,{title:ye,active:!!w&&Ae===w.key,pos:ve,data:he.data,isStart:we,isEnd:He,motion:g,motionNodes:Ae===aa?W:null,motionType:ne,onMotionStart:P,onMotionEnd:Ce,treeNodeRequiredProps:pe,onMouseMove:function(){$(null)}}))}))}),OM=10,Bm=(function(e){no(r,e);var t=oo(r);function r(){var n;vr(this,r);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=t.call.apply(t,[this].concat(a)),M(tt(n),"destroyed",!1),M(tt(n),"delayedDragEnterLogic",void 0),M(tt(n),"loadingRetryTimes",{}),M(tt(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:Ja()}),M(tt(n),"dragStartMousePosition",null),M(tt(n),"dragNodeProps",null),M(tt(n),"currentMouseOverDroppableNodeKey",null),M(tt(n),"listRef",d.createRef()),M(tt(n),"onNodeDragStart",function(l,s){var u=n.state,c=u.expandedKeys,f=u.keyEntities,p=n.props.onDragStart,h=s.eventKey;n.dragNodeProps=s,n.dragStartMousePosition={x:l.clientX,y:l.clientY};var v=Un(c,h);n.setState({draggingNodeKey:h,dragChildrenKeys:uM(h,f),indent:n.listRef.current.getIndentWidth()}),n.setExpandedKeys(v),window.addEventListener("dragend",n.onWindowDragEnd),p==null||p({event:l,node:wr(s)})}),M(tt(n),"onNodeDragEnter",function(l,s){var u=n.state,c=u.expandedKeys,f=u.keyEntities,p=u.dragChildrenKeys,h=u.flattenNodes,v=u.indent,g=n.props,m=g.onDragEnter,b=g.onExpand,y=g.allowDrop,C=g.direction,D=s.pos,w=s.eventKey;if(n.currentMouseOverDroppableNodeKey!==w&&(n.currentMouseOverDroppableNodeKey=w),!n.dragNodeProps){n.resetDragState();return}var k=ib(l,n.dragNodeProps,s,v,n.dragStartMousePosition,y,h,f,c,C),E=k.dropPosition,x=k.dropLevelOffset,F=k.dropTargetKey,j=k.dropContainerKey,$=k.dropTargetPos,P=k.dropAllowed,A=k.dragOverNodeKey;if(p.includes(F)||!P){n.resetDragState();return}if(n.delayedDragEnterLogic||(n.delayedDragEnterLogic={}),Object.keys(n.delayedDragEnterLogic).forEach(function(O){clearTimeout(n.delayedDragEnterLogic[O])}),n.dragNodeProps.eventKey!==s.eventKey&&(l.persist(),n.delayedDragEnterLogic[D]=window.setTimeout(function(){if(n.state.draggingNodeKey!==null){var O=Pe(c),S=un(f,s.eventKey);S&&(S.children||[]).length&&(O=so(c,s.eventKey)),n.props.hasOwnProperty("expandedKeys")||n.setExpandedKeys(O),b==null||b(O,{node:wr(s),expanded:!0,nativeEvent:l.nativeEvent})}},800)),n.dragNodeProps.eventKey===F&&x===0){n.resetDragState();return}n.setState({dragOverNodeKey:A,dropPosition:E,dropLevelOffset:x,dropTargetKey:F,dropContainerKey:j,dropTargetPos:$,dropAllowed:P}),m==null||m({event:l,node:wr(s),expandedKeys:c})}),M(tt(n),"onNodeDragOver",function(l,s){var u=n.state,c=u.dragChildrenKeys,f=u.flattenNodes,p=u.keyEntities,h=u.expandedKeys,v=u.indent,g=n.props,m=g.onDragOver,b=g.allowDrop,y=g.direction;if(n.dragNodeProps){var C=ib(l,n.dragNodeProps,s,v,n.dragStartMousePosition,b,f,p,h,y),D=C.dropPosition,w=C.dropLevelOffset,k=C.dropTargetKey,E=C.dropContainerKey,x=C.dropTargetPos,F=C.dropAllowed,j=C.dragOverNodeKey;c.includes(k)||!F||(n.dragNodeProps.eventKey===k&&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():D===n.state.dropPosition&&w===n.state.dropLevelOffset&&k===n.state.dropTargetKey&&E===n.state.dropContainerKey&&x===n.state.dropTargetPos&&F===n.state.dropAllowed&&j===n.state.dragOverNodeKey||n.setState({dropPosition:D,dropLevelOffset:w,dropTargetKey:k,dropContainerKey:E,dropTargetPos:x,dropAllowed:F,dragOverNodeKey:j}),m==null||m({event:l,node:wr(s)}))}}),M(tt(n),"onNodeDragLeave",function(l,s){n.currentMouseOverDroppableNodeKey===s.eventKey&&!l.currentTarget.contains(l.relatedTarget)&&(n.resetDragState(),n.currentMouseOverDroppableNodeKey=null);var u=n.props.onDragLeave;u==null||u({event:l,node:wr(s)})}),M(tt(n),"onWindowDragEnd",function(l){n.onNodeDragEnd(l,null,!0),window.removeEventListener("dragend",n.onWindowDragEnd)}),M(tt(n),"onNodeDragEnd",function(l,s){var u=n.props.onDragEnd;n.setState({dragOverNodeKey:null}),n.cleanDragState(),u==null||u({event:l,node:wr(s)}),n.dragNodeProps=null,window.removeEventListener("dragend",n.onWindowDragEnd)}),M(tt(n),"onNodeDrop",function(l,s){var u,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,f=n.state,p=f.dragChildrenKeys,h=f.dropPosition,v=f.dropTargetKey,g=f.dropTargetPos,m=f.dropAllowed;if(m){var b=n.props.onDrop;if(n.setState({dragOverNodeKey:null}),n.cleanDragState(),v!==null){var y=H(H({},Li(v,n.getTreeNodeRequiredProps())),{},{active:((u=n.getActiveItem())===null||u===void 0?void 0:u.key)===v,data:un(n.state.keyEntities,v).node}),C=p.includes(v);lr(!C,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var D=$m(g),w={event:l,node:wr(y),dragNode:n.dragNodeProps?wr(n.dragNodeProps):null,dragNodesKeys:[n.dragNodeProps.eventKey].concat(p),dropToGap:h!==0,dropPosition:h+Number(D[D.length-1])};c||(b==null||b(w)),n.dragNodeProps=null}}}),M(tt(n),"cleanDragState",function(){var l=n.state.draggingNodeKey;l!==null&&n.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),n.dragStartMousePosition=null,n.currentMouseOverDroppableNodeKey=null}),M(tt(n),"triggerExpandActionExpand",function(l,s){var u=n.state,c=u.expandedKeys,f=u.flattenNodes,p=s.expanded,h=s.key,v=s.isLeaf;if(!(v||l.shiftKey||l.metaKey||l.ctrlKey)){var g=f.filter(function(b){return b.key===h})[0],m=wr(H(H({},Li(h,n.getTreeNodeRequiredProps())),{},{data:g.data}));n.setExpandedKeys(p?Un(c,h):so(c,h)),n.onNodeExpand(l,m)}}),M(tt(n),"onNodeClick",function(l,s){var u=n.props,c=u.onClick,f=u.expandAction;f==="click"&&n.triggerExpandActionExpand(l,s),c==null||c(l,s)}),M(tt(n),"onNodeDoubleClick",function(l,s){var u=n.props,c=u.onDoubleClick,f=u.expandAction;f==="doubleClick"&&n.triggerExpandActionExpand(l,s),c==null||c(l,s)}),M(tt(n),"onNodeSelect",function(l,s){var u=n.state.selectedKeys,c=n.state,f=c.keyEntities,p=c.fieldNames,h=n.props,v=h.onSelect,g=h.multiple,m=s.selected,b=s[p.key],y=!m;y?g?u=so(u,b):u=[b]:u=Un(u,b);var C=u.map(function(D){var w=un(f,D);return w?w.node:null}).filter(Boolean);n.setUncontrolledState({selectedKeys:u}),v==null||v(u,{event:"select",selected:y,node:s,selectedNodes:C,nativeEvent:l.nativeEvent})}),M(tt(n),"onNodeCheck",function(l,s,u){var c=n.state,f=c.keyEntities,p=c.checkedKeys,h=c.halfCheckedKeys,v=n.props,g=v.checkStrictly,m=v.onCheck,b=s.key,y,C={event:"check",node:s,checked:u,nativeEvent:l.nativeEvent};if(g){var D=u?so(p,b):Un(p,b),w=Un(h,b);y={checked:D,halfChecked:w},C.checkedNodes=D.map(function($){return un(f,$)}).filter(Boolean).map(function($){return $.node}),n.setUncontrolledState({checkedKeys:D})}else{var k=ja([].concat(Pe(p),[b]),!0,f),E=k.checkedKeys,x=k.halfCheckedKeys;if(!u){var F=new Set(E);F.delete(b);var j=ja(Array.from(F),{halfCheckedKeys:x},f);E=j.checkedKeys,x=j.halfCheckedKeys}y=E,C.checkedNodes=[],C.checkedNodesPositions=[],C.halfCheckedKeys=x,E.forEach(function($){var P=un(f,$);if(P){var A=P.node,O=P.pos;C.checkedNodes.push(A),C.checkedNodesPositions.push({node:A,pos:O})}}),n.setUncontrolledState({checkedKeys:E},!1,{halfCheckedKeys:x})}m==null||m(y,C)}),M(tt(n),"onNodeLoad",function(l){var s,u=l.key,c=n.state.keyEntities,f=un(c,u);if(!(f!=null&&(s=f.children)!==null&&s!==void 0&&s.length)){var p=new Promise(function(h,v){n.setState(function(g){var m=g.loadedKeys,b=m===void 0?[]:m,y=g.loadingKeys,C=y===void 0?[]:y,D=n.props,w=D.loadData,k=D.onLoad;if(!w||b.includes(u)||C.includes(u))return null;var E=w(l);return E.then(function(){var x=n.state.loadedKeys,F=so(x,u);k==null||k(F,{event:"load",node:l}),n.setUncontrolledState({loadedKeys:F}),n.setState(function(j){return{loadingKeys:Un(j.loadingKeys,u)}}),h()}).catch(function(x){if(n.setState(function(j){return{loadingKeys:Un(j.loadingKeys,u)}}),n.loadingRetryTimes[u]=(n.loadingRetryTimes[u]||0)+1,n.loadingRetryTimes[u]>=OM){var F=n.state.loadedKeys;lr(!1,"Retry for `loadData` many times but still failed. No more retry."),n.setUncontrolledState({loadedKeys:so(F,u)}),h()}v(x)}),{loadingKeys:so(C,u)}})});return p.catch(function(){}),p}}),M(tt(n),"onNodeMouseEnter",function(l,s){var u=n.props.onMouseEnter;u==null||u({event:l,node:s})}),M(tt(n),"onNodeMouseLeave",function(l,s){var u=n.props.onMouseLeave;u==null||u({event:l,node:s})}),M(tt(n),"onNodeContextMenu",function(l,s){var u=n.props.onRightClick;u&&(l.preventDefault(),u({event:l,node:s}))}),M(tt(n),"onFocus",function(){var l=n.props.onFocus;n.setState({focused:!0});for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];l==null||l.apply(void 0,u)}),M(tt(n),"onBlur",function(){var l=n.props.onBlur;n.setState({focused:!1}),n.onActiveChange(null);for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];l==null||l.apply(void 0,u)}),M(tt(n),"getTreeNodeRequiredProps",function(){var l=n.state,s=l.expandedKeys,u=l.selectedKeys,c=l.loadedKeys,f=l.loadingKeys,p=l.checkedKeys,h=l.halfCheckedKeys,v=l.dragOverNodeKey,g=l.dropPosition,m=l.keyEntities;return{expandedKeys:s||[],selectedKeys:u||[],loadedKeys:c||[],loadingKeys:f||[],checkedKeys:p||[],halfCheckedKeys:h||[],dragOverNodeKey:v,dropPosition:g,keyEntities:m}}),M(tt(n),"setExpandedKeys",function(l){var s=n.state,u=s.treeData,c=s.fieldNames,f=Yc(u,l,c);n.setUncontrolledState({expandedKeys:l,flattenNodes:f},!0)}),M(tt(n),"onNodeExpand",function(l,s){var u=n.state.expandedKeys,c=n.state,f=c.listChanging,p=c.fieldNames,h=n.props,v=h.onExpand,g=h.loadData,m=s.expanded,b=s[p.key];if(!f){var y=u.includes(b),C=!m;if(lr(m&&y||!m&&!y,"Expand state not sync with index check"),u=C?so(u,b):Un(u,b),n.setExpandedKeys(u),v==null||v(u,{node:s,expanded:C,nativeEvent:l.nativeEvent}),C&&g){var D=n.onNodeLoad(s);D&&D.then(function(){var w=Yc(n.state.treeData,u,p);n.setUncontrolledState({flattenNodes:w})}).catch(function(){var w=n.state.expandedKeys,k=Un(w,b);n.setExpandedKeys(k)})}}}),M(tt(n),"onListChangeStart",function(){n.setUncontrolledState({listChanging:!0})}),M(tt(n),"onListChangeEnd",function(){setTimeout(function(){n.setUncontrolledState({listChanging:!1})})}),M(tt(n),"onActiveChange",function(l){var s=n.state.activeKey,u=n.props,c=u.onActiveChange,f=u.itemScrollOffset,p=f===void 0?0:f;s!==l&&(n.setState({activeKey:l}),l!==null&&n.scrollTo({key:l,offset:p}),c==null||c(l))}),M(tt(n),"getActiveItem",function(){var l=n.state,s=l.activeKey,u=l.flattenNodes;return s===null?null:u.find(function(c){var f=c.key;return f===s})||null}),M(tt(n),"offsetActiveKey",function(l){var s=n.state,u=s.flattenNodes,c=s.activeKey,f=u.findIndex(function(v){var g=v.key;return g===c});f===-1&&l<0&&(f=u.length),f=(f+l+u.length)%u.length;var p=u[f];if(p){var h=p.key;n.onActiveChange(h)}else n.onActiveChange(null)}),M(tt(n),"onKeyDown",function(l){var s=n.state,u=s.activeKey,c=s.expandedKeys,f=s.checkedKeys,p=s.fieldNames,h=n.props,v=h.onKeyDown,g=h.checkable,m=h.selectable;switch(l.which){case ot.UP:{n.offsetActiveKey(-1),l.preventDefault();break}case ot.DOWN:{n.offsetActiveKey(1),l.preventDefault();break}}var b=n.getActiveItem();if(b&&b.data){var y=n.getTreeNodeRequiredProps(),C=b.data.isLeaf===!1||!!(b.data[p.children]||[]).length,D=wr(H(H({},Li(u,y)),{},{data:b.data,active:!0}));switch(l.which){case ot.LEFT:{C&&c.includes(u)?n.onNodeExpand({},D):b.parent&&n.onActiveChange(b.parent.key),l.preventDefault();break}case ot.RIGHT:{C&&!c.includes(u)?n.onNodeExpand({},D):b.children&&b.children.length&&n.onActiveChange(b.children[0].key),l.preventDefault();break}case ot.ENTER:case ot.SPACE:{g&&!D.disabled&&D.checkable!==!1&&!D.disableCheckbox?n.onNodeCheck({},D,!f.includes(u)):!g&&m&&!D.disabled&&D.selectable!==!1&&n.onNodeSelect({},D);break}}}v==null||v(l)}),M(tt(n),"setUncontrolledState",function(l){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!n.destroyed){var c=!1,f=!0,p={};Object.keys(l).forEach(function(h){if(n.props.hasOwnProperty(h)){f=!1;return}c=!0,p[h]=l[h]}),c&&(!s||f)&&n.setState(H(H({},p),u))}}),M(tt(n),"scrollTo",function(l){n.listRef.current.scrollTo(l)}),n}return br(r,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var n=this.props,o=n.activeKey,a=n.itemScrollOffset,i=a===void 0?0:a;o!==void 0&&o!==this.state.activeKey&&(this.setState({activeKey:o}),o!==null&&this.scrollTo({key:o,offset:i}))}},{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 n=this.state,o=n.focused,a=n.flattenNodes,i=n.keyEntities,l=n.draggingNodeKey,s=n.activeKey,u=n.dropLevelOffset,c=n.dropContainerKey,f=n.dropTargetKey,p=n.dropPosition,h=n.dragOverNodeKey,v=n.indent,g=this.props,m=g.prefixCls,b=g.className,y=g.style,C=g.showLine,D=g.focusable,w=g.tabIndex,k=w===void 0?0:w,E=g.selectable,x=g.showIcon,F=g.icon,j=g.switcherIcon,$=g.draggable,P=g.checkable,A=g.checkStrictly,O=g.disabled,S=g.motion,B=g.loadData,R=g.filterTreeNode,N=g.height,T=g.itemHeight,L=g.scrollWidth,X=g.virtual,_=g.titleRender,q=g.dropIndicatorRender,Q=g.onContextMenu,te=g.onScroll,z=g.direction,Y=g.rootClassName,V=g.rootStyle,G=Qn(this.props,{aria:!0,data:!0}),K;$&&(ut($)==="object"?K=$:typeof $=="function"?K={nodeDraggable:$}:K={});var W={prefixCls:m,selectable:E,showIcon:x,icon:F,switcherIcon:j,draggable:K,draggingNodeKey:l,checkable:P,checkStrictly:A,disabled:O,keyEntities:i,dropLevelOffset:u,dropContainerKey:c,dropTargetKey:f,dropPosition:p,dragOverNodeKey:h,indent:v,direction:z,dropIndicatorRender:q,loadData:B,filterTreeNode:R,titleRender:_,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(Sm.Provider,{value:W},d.createElement("div",{className:de(m,b,Y,M(M(M({},"".concat(m,"-show-line"),C),"".concat(m,"-focused"),o),"".concat(m,"-active-focused"),s!==null)),style:V},d.createElement(BM,Te({ref:this.listRef,prefixCls:m,style:y,data:a,disabled:O,selectable:E,checkable:!!P,motion:S,dragging:l!==null,height:N,itemHeight:T,virtual:X,focusable:D,focused:o,tabIndex:k,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Q,onScroll:te,scrollWidth:L},this.getTreeNodeRequiredProps(),G))))}}],[{key:"getDerivedStateFromProps",value:function(n,o){var a=o.prevProps,i={prevProps:n};function l(k){return!a&&n.hasOwnProperty(k)||a&&a[k]!==n[k]}var s,u=o.fieldNames;if(l("fieldNames")&&(u=Ja(n.fieldNames),i.fieldNames=u),l("treeData")?s=n.treeData:l("children")&&(lr(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),s=Xx(n.children)),s){i.treeData=s;var c=bm(s,{fieldNames:u});i.keyEntities=H(M({},aa,Bw),c.keyEntities)}var f=i.keyEntities||o.keyEntities;if(l("expandedKeys")||a&&l("autoExpandParent"))i.expandedKeys=n.autoExpandParent||!a&&n.defaultExpandParent?qf(n.expandedKeys,f):n.expandedKeys;else if(!a&&n.defaultExpandAll){var p=H({},f);delete p[aa];var h=[];Object.keys(p).forEach(function(k){var E=p[k];E.children&&E.children.length&&h.push(E.key)}),i.expandedKeys=h}else!a&&n.defaultExpandedKeys&&(i.expandedKeys=n.autoExpandParent||n.defaultExpandParent?qf(n.defaultExpandedKeys,f):n.defaultExpandedKeys);if(i.expandedKeys||delete i.expandedKeys,s||i.expandedKeys){var v=Yc(s||o.treeData,i.expandedKeys||o.expandedKeys,u);i.flattenNodes=v}if(n.selectable&&(l("selectedKeys")?i.selectedKeys=lb(n.selectedKeys,n):!a&&n.defaultSelectedKeys&&(i.selectedKeys=lb(n.defaultSelectedKeys,n))),n.checkable){var g;if(l("checkedKeys")?g=Jc(n.checkedKeys)||{}:!a&&n.defaultCheckedKeys?g=Jc(n.defaultCheckedKeys)||{}:s&&(g=Jc(n.checkedKeys)||{checkedKeys:o.checkedKeys,halfCheckedKeys:o.halfCheckedKeys}),g){var m=g,b=m.checkedKeys,y=b===void 0?[]:b,C=m.halfCheckedKeys,D=C===void 0?[]:C;if(!n.checkStrictly){var w=ja(y,!0,f);y=w.checkedKeys,D=w.halfCheckedKeys}i.checkedKeys=y,i.halfCheckedKeys=D}}return l("loadedKeys")&&(i.loadedKeys=n.loadedKeys),i}}]),r})(d.Component);M(Bm,"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:CM,allowDrop:function(){return!0},expandAction:!1});M(Bm,"TreeNode",hl);const AM=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:r,directoryNodeSelectedColor:n,motionDurationMid:o,borderRadius:a,controlItemBgHover:i})=>({[`${e}${e}-directory ${t}`]:{[`${e}-node-content-wrapper`]:{position:"static",[`&:has(${e}-drop-indicator)`]:{position:"relative"},[`> *:not(${e}-drop-indicator)`]:{position:"relative"},"&:hover":{background:"transparent"},"&:before":{position:"absolute",inset:0,transition:`background-color ${o}`,content:'""',borderRadius:a},"&:hover:before":{background:i}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{background:r,borderRadius:a,[`${e}-switcher, ${e}-draggable-icon`]:{color:n},[`${e}-node-content-wrapper`]:{color:n,background:"transparent","&:before, &:hover:before":{background:r}}}}}),FM=new Vt("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),NM=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),PM=(e,t)=>({[`.${e}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${se(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),jM=(e,t)=>{const{treeCls:r,treeNodeCls:n,treeNodePadding:o,titleHeight:a,indentSize:i,nodeSelectedBg:l,nodeHoverBg:s,colorTextQuaternary:u,controlItemBgActiveDisabled:c}=t;return{[r]:Object.assign(Object.assign({},Br(t)),{"--rc-virtual-list-scrollbar-bg":t.colorSplit,background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,"&-rtl":{direction:"rtl"},[`&${r}-rtl ${r}-switcher_close ${r}-switcher-icon svg`]:{transform:"rotate(90deg)"},[`&-focused:not(:hover):not(${r}-active-focused)`]:Po(t),[`${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 ${t.colorPrimary}`,opacity:0,animationName:FM,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[n]:{display:"flex",alignItems:"flex-start",marginBottom:o,lineHeight:se(a),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:o},[`&-disabled ${r}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},[`${r}-checkbox-disabled + ${r}-node-selected,&${n}-disabled${n}-selected ${r}-node-content-wrapper`]:{backgroundColor:c},[`${r}-checkbox-disabled`]:{pointerEvents:"unset"},[`&:not(${n}-disabled)`]:{[`${r}-node-content-wrapper`]:{"&:hover":{color:t.nodeHoverColor}}},[`&-active ${r}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${n}-disabled).filter-node ${r}-title`]:{color:t.colorPrimary,fontWeight:t.fontWeightStrong},"&-draggable":{cursor:"grab",[`${r}-draggable-icon`]:{flexShrink:0,width:a,textAlign:"center",visibility:"visible",color:u},[`&${n}-disabled ${r}-draggable-icon`]:{visibility:"hidden"}}},[`${r}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:i}},[`${r}-draggable-icon`]:{visibility:"hidden"},[`${r}-switcher, ${r}-checkbox`]:{marginInlineEnd:t.calc(t.calc(a).sub(t.controlInteractiveSize)).div(2).equal()},[`${r}-switcher`]:Object.assign(Object.assign({},NM(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:a,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:a,height:a,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`},[`&:not(${r}-switcher-noop):hover:before`]:{backgroundColor:t.colorBgTextHover},[`&_close ${r}-switcher-icon svg`]:{transform:"rotate(-90deg)"},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(a).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(a).div(2).equal()).mul(.8).equal(),height:t.calc(a).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}}),[`${r}-node-content-wrapper`]:Object.assign(Object.assign({position:"relative",minHeight:a,paddingBlock:0,paddingInline:t.paddingXS,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`},PM(e,t)),{"&:hover":{backgroundColor:s},[`&${r}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:l},[`${r}-iconEle`]:{display:"inline-block",width:a,height:a,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 ${t.colorPrimary}`},"&-show-line":{[`${r}-indent-unit`]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(a).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),borderInlineEnd:`1px solid ${t.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(t.calc(a).div(2).equal())} !important`}})}},RM=(e,t,r=!0)=>{const n=`.${e}`,o=`${n}-treenode`,a=t.calc(t.paddingXS).div(2).equal(),i=er(t,{treeCls:n,treeNodeCls:o,treeNodePadding:a});return[jM(e,i),r&&AM(i)].filter(Boolean)},IM=e=>{const{controlHeightSM:t,controlItemBgHover:r,controlItemBgActive:n}=e,o=t;return{titleHeight:o,indentSize:o,nodeHoverBg:r,nodeHoverColor:e.colorText,nodeSelectedBg:n,nodeSelectedColor:e.colorText}},TM=e=>{const{colorTextLightSolid:t,colorPrimary:r}=e;return Object.assign(Object.assign({},IM(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:r})},MM=Hr("Tree",(e,{prefixCls:t})=>[{[e.componentCls]:Yx(`${t}-checkbox`,e)},RM(t,e),DC(e)],TM),mb=4;function zM(e){const{dropPosition:t,dropLevelOffset:r,prefixCls:n,indent:o,direction:a="ltr"}=e,i=a==="ltr"?"left":"right",l=a==="ltr"?"right":"left",s={[i]:-r*o+mb,[l]:0};switch(t){case-1:s.top=-3;break;case 1:s.bottom=-3;break;default:s.bottom=-3,s[i]=o+mb;break}return ee.createElement("div",{style:s,className:`${n}-drop-indicator`})}const LM=e=>{var t,r;const{prefixCls:n,switcherIcon:o,treeNodeProps:a,showLine:i,switcherLoadingIcon:l}=e,{isLeaf:s,expanded:u,loading:c}=a;if(c)return d.isValidElement(l)?l:d.createElement(_p,{className:`${n}-switcher-loading-icon`});let f;if(i&&typeof i=="object"&&(f=i.showLeafIcon),s){if(!i)return null;if(typeof f!="boolean"&&f){const v=typeof f=="function"?f(a):f,g=`${n}-switcher-line-custom-icon`;return d.isValidElement(v)?eo(v,{className:de((t=v.props)===null||t===void 0?void 0:t.className,g)}):v}return f?d.createElement(uw,{className:`${n}-switcher-line-icon`}):d.createElement("span",{className:`${n}-switcher-leaf-line`})}const p=`${n}-switcher-icon`,h=typeof o=="function"?o(a):o;return d.isValidElement(h)?eo(h,{className:de((r=h.props)===null||r===void 0?void 0:r.className,p)}):h!==void 0?h:i?u?d.createElement(KT,{className:`${n}-switcher-line-icon`}):d.createElement(UT,{className:`${n}-switcher-line-icon`}):d.createElement(xT,{className:p})},Ow=ee.forwardRef((e,t)=>{var r;const{getPrefixCls:n,direction:o,virtual:a,tree:i}=ee.useContext(Zt),{prefixCls:l,className:s,showIcon:u=!1,showLine:c,switcherIcon:f,switcherLoadingIcon:p,blockNode:h=!1,children:v,checkable:g=!1,selectable:m=!0,draggable:b,motion:y,style:C}=e,D=n("tree",l),w=n(),k=y??Object.assign(Object.assign({},CC(w)),{motionAppear:!1}),E=Object.assign(Object.assign({},e),{checkable:g,selectable:m,showIcon:u,motion:k,blockNode:h,showLine:!!c,dropIndicatorRender:zM}),[x,F,j]=MM(D),[,$]=Yr(),P=$.paddingXS/2+(((r=$.Tree)===null||r===void 0?void 0:r.titleHeight)||$.controlHeightSM),A=ee.useMemo(()=>{if(!b)return!1;let S={};switch(typeof b){case"function":S.nodeDraggable=b;break;case"object":S=Object.assign({},b);break}return S.icon!==!1&&(S.icon=S.icon||ee.createElement(_T,null)),S},[b]),O=S=>ee.createElement(LM,{prefixCls:D,switcherIcon:f,switcherLoadingIcon:p,treeNodeProps:S,showLine:c});return x(ee.createElement(Bm,Object.assign({itemHeight:P,ref:t,virtual:a},E,{style:Object.assign(Object.assign({},i==null?void 0:i.style),C),prefixCls:D,className:de({[`${D}-icon-hide`]:!u,[`${D}-block-node`]:h,[`${D}-unselectable`]:!m,[`${D}-rtl`]:o==="rtl"},i==null?void 0:i.className,s,F,j),direction:o,checkable:g&&ee.createElement("span",{className:`${D}-checkbox-inner`}),selectable:m,switcherIcon:O,draggable:A}),v))}),hb=0,Qc=1,gb=2;function Om(e,t,r){const{key:n,children:o}=r;function a(i){const l=i[n],s=i[o];t(l,i)!==!1&&Om(s||[],t,r)}e.forEach(a)}function _M({treeData:e,expandedKeys:t,startKey:r,endKey:n,fieldNames:o}){const a=[];let i=hb;if(r&&r===n)return[r];if(!r||!n)return[];function l(s){return s===r||s===n}return Om(e,s=>{if(i===gb)return!1;if(l(s)){if(a.push(s),i===hb)i=Qc;else if(i===Qc)return i=gb,!1}else i===Qc&&a.push(s);return t.includes(s)},Ja(o)),a}function ed(e,t,r){const n=Pe(t),o=[];return Om(e,(a,i)=>{const l=n.indexOf(a);return l!==-1&&(o.push(i),n.splice(l,1)),!!n.length},Ja(r)),o}var vb=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};function HM(e){const{isLeaf:t,expanded:r}=e;return t?d.createElement(uw,null):r?d.createElement(RT,null):d.createElement(MT,null)}function bb({treeData:e,children:t}){return e||Xx(t)}const WM=(e,t)=>{var{defaultExpandAll:r,defaultExpandParent:n,defaultExpandedKeys:o}=e,a=vb(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const i=d.useRef(null),l=d.useRef(null),s=()=>{const{keyEntities:x}=bm(bb(a));let F;return r?F=Object.keys(x):n?F=qf(a.expandedKeys||o||[],x):F=a.expandedKeys||o||[],F},[u,c]=d.useState(a.selectedKeys||a.defaultSelectedKeys||[]),[f,p]=d.useState(()=>s());d.useEffect(()=>{"selectedKeys"in a&&c(a.selectedKeys)},[a.selectedKeys]),d.useEffect(()=>{"expandedKeys"in a&&p(a.expandedKeys)},[a.expandedKeys]);const h=(x,F)=>{var j;return"expandedKeys"in a||p(x),(j=a.onExpand)===null||j===void 0?void 0:j.call(a,x,F)},v=(x,F)=>{var j;const{multiple:$,fieldNames:P}=a,{node:A,nativeEvent:O}=F,{key:S=""}=A,B=bb(a),R=Object.assign(Object.assign({},F),{selected:!0}),N=(O==null?void 0:O.ctrlKey)||(O==null?void 0:O.metaKey),T=O==null?void 0:O.shiftKey;let L;$&&N?(L=x,i.current=S,l.current=L,R.selectedNodes=ed(B,L,P)):$&&T?(L=Array.from(new Set([].concat(Pe(l.current||[]),Pe(_M({treeData:B,expandedKeys:f,startKey:S,endKey:i.current,fieldNames:P}))))),R.selectedNodes=ed(B,L,P)):(L=[S],i.current=S,l.current=L,R.selectedNodes=ed(B,L,P)),(j=a.onSelect)===null||j===void 0||j.call(a,L,R),"selectedKeys"in a||c(L)},{getPrefixCls:g,direction:m}=d.useContext(Zt),{prefixCls:b,className:y,showIcon:C=!0,expandAction:D="click"}=a,w=vb(a,["prefixCls","className","showIcon","expandAction"]),k=g("tree",b),E=de(`${k}-directory`,{[`${k}-directory-rtl`]:m==="rtl"},y);return d.createElement(Ow,Object.assign({icon:HM,ref:t,blockNode:!0},w,{showIcon:C,expandAction:D,prefixCls:k,className:E,expandedKeys:f,selectedKeys:u,onSelect:v,onExpand:h}))},KM=d.forwardRef(WM),Am=Ow;Am.DirectoryTree=KM;Am.TreeNode=hl;const yb=e=>{const{value:t,filterSearch:r,tablePrefixCls:n,locale:o,onChange:a}=e;return r?d.createElement("div",{className:`${n}-filter-dropdown-search`},d.createElement(RI,{prefix:d.createElement(ux,null),placeholder:o.filterSearchPlaceholder,onChange:a,value:t,htmlSize:1,className:`${n}-filter-dropdown-search-input`})):null},qM=e=>{const{keyCode:t}=e;t===ot.ENTER&&e.stopPropagation()},VM=d.forwardRef((e,t)=>d.createElement("div",{className:e.className,onClick:r=>r.stopPropagation(),onKeyDown:qM,ref:t},e.children));function Ra(e){let t=[];return(e||[]).forEach(({value:r,children:n})=>{t.push(r),n&&(t=[].concat(Pe(t),Pe(Ra(n))))}),t}function UM(e){return e.some(({children:t})=>t)}function Aw(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function Fw({filters:e,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:a}){return e.map((i,l)=>{const s=String(i.value);if(i.children)return{key:s||l,label:i.text,popupClassName:`${t}-dropdown-submenu`,children:Fw({filters:i.children,prefixCls:t,filteredKeys:r,filterMultiple:n,searchValue:o,filterSearch:a})};const u=n?Qa:Sl,c={key:i.value!==void 0?s:l,label:d.createElement(d.Fragment,null,d.createElement(u,{checked:r.includes(s)}),d.createElement("span",null,i.text))};return o.trim()?typeof a=="function"?a(o,i)?c:null:Aw(o,i.text)?c:null:c})}function td(e){return e||[]}const XM=e=>{var t,r,n,o;const{tablePrefixCls:a,prefixCls:i,column:l,dropdownPrefixCls:s,columnKey:u,filterOnClose:c,filterMultiple:f,filterMode:p="menu",filterSearch:h=!1,filterState:v,triggerFilter:g,locale:m,children:b,getPopupContainer:y,rootClassName:C}=e,{filterResetToDefaultFilteredValue:D,defaultFilteredValue:w,filterDropdownProps:k={},filterDropdownOpen:E,filterDropdownVisible:x,onFilterDropdownVisibleChange:F,onFilterDropdownOpenChange:j}=l,[$,P]=d.useState(!1),A=!!(v&&(!((t=v.filteredKeys)===null||t===void 0)&&t.length||v.forceFiltered)),O=pe=>{var he;P(pe),(he=k.onOpenChange)===null||he===void 0||he.call(k,pe),j==null||j(pe),F==null||F(pe)},S=(o=(n=(r=k.open)!==null&&r!==void 0?r:E)!==null&&n!==void 0?n:x)!==null&&o!==void 0?o:$,B=v==null?void 0:v.filteredKeys,[R,N]=yM(td(B)),T=({selectedKeys:pe})=>{N(pe)},L=(pe,{node:he,checked:ve})=>{T(f?{selectedKeys:pe}:{selectedKeys:ve&&he.key?[he.key]:[]})};d.useEffect(()=>{$&&T({selectedKeys:td(B)})},[B]);const[X,_]=d.useState([]),q=pe=>{_(pe)},[Q,te]=d.useState(""),z=pe=>{const{value:he}=pe.target;te(he)};d.useEffect(()=>{$||te("")},[$]);const Y=pe=>{const he=pe!=null&&pe.length?pe:null;if(he===null&&(!v||!v.filteredKeys)||Jn(he,v==null?void 0:v.filteredKeys,!0))return null;g({column:l,key:u,filteredKeys:he})},V=()=>{O(!1),Y(R())},G=({confirm:pe,closeDropdown:he}={confirm:!1,closeDropdown:!1})=>{pe&&Y([]),he&&O(!1),te(""),N(D?(w||[]).map(ve=>String(ve)):[])},K=({closeDropdown:pe}={closeDropdown:!0})=>{pe&&O(!1),Y(R())},W=(pe,he)=>{he.source==="trigger"&&(pe&&B!==void 0&&N(td(B)),O(pe),!pe&&!l.filterDropdown&&c&&V())},re=de({[`${s}-menu-without-submenu`]:!UM(l.filters||[])}),U=pe=>{if(pe.target.checked){const he=Ra(l==null?void 0:l.filters).map(ve=>String(ve));N(he)}else N([])},J=({filters:pe})=>(pe||[]).map((he,ve)=>{const be=String(he.value),ye={title:he.text,key:he.value!==void 0?be:String(ve)};return he.children&&(ye.children=J({filters:he.children})),ye}),ne=pe=>{var he;return Object.assign(Object.assign({},pe),{text:pe.title,value:pe.key,children:((he=pe.children)===null||he===void 0?void 0:he.map(ve=>ne(ve)))||[]})};let ue;const{direction:me,renderEmpty:Ce}=d.useContext(Zt);if(typeof l.filterDropdown=="function")ue=l.filterDropdown({prefixCls:`${s}-custom`,setSelectedKeys:pe=>T({selectedKeys:pe}),selectedKeys:R(),confirm:K,clearFilters:G,filters:l.filters,visible:S,close:()=>{O(!1)}});else if(l.filterDropdown)ue=l.filterDropdown;else{const pe=R()||[],he=()=>{var be,ye;const Ae=(be=Ce==null?void 0:Ce("Table.filter"))!==null&&be!==void 0?be:d.createElement(fo,{image:fo.PRESENTED_IMAGE_SIMPLE,description:m.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if((l.filters||[]).length===0)return Ae;if(p==="tree")return d.createElement(d.Fragment,null,d.createElement(yb,{filterSearch:h,value:Q,onChange:z,tablePrefixCls:a,locale:m}),d.createElement("div",{className:`${a}-filter-dropdown-tree`},f?d.createElement(Qa,{checked:pe.length===Ra(l.filters).length,indeterminate:pe.length>0&&pe.length<Ra(l.filters).length,className:`${a}-filter-dropdown-checkall`,onChange:U},(ye=m==null?void 0:m.filterCheckall)!==null&&ye!==void 0?ye:m==null?void 0:m.filterCheckAll):null,d.createElement(Am,{checkable:!0,selectable:!1,blockNode:!0,multiple:f,checkStrictly:!f,className:`${s}-menu`,onCheck:L,checkedKeys:pe,selectedKeys:pe,showIcon:!1,treeData:J({filters:l.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:Q.trim()?Me=>typeof h=="function"?h(Q,ne(Me)):Aw(Q,Me.title):void 0})));const we=Fw({filters:l.filters||[],filterSearch:h,prefixCls:i,filteredKeys:R(),filterMultiple:f,searchValue:Q}),He=we.every(Me=>Me===null);return d.createElement(d.Fragment,null,d.createElement(yb,{filterSearch:h,value:Q,onChange:z,tablePrefixCls:a,locale:m}),He?Ae:d.createElement(ui,{selectable:!0,multiple:f,prefixCls:`${s}-menu`,className:re,onSelect:T,onDeselect:T,selectedKeys:pe,getPopupContainer:y,openKeys:X,onOpenChange:q,items:we}))},ve=()=>D?Jn((w||[]).map(be=>String(be)),pe,!0):pe.length===0;ue=d.createElement(d.Fragment,null,he(),d.createElement("div",{className:`${i}-dropdown-btns`},d.createElement(Ya,{type:"link",size:"small",disabled:ve(),onClick:()=>G()},m.filterReset),d.createElement(Ya,{type:"primary",size:"small",onClick:V},m.filterConfirm)))}l.filterDropdown&&(ue=d.createElement(Tx,{selectable:void 0},ue)),ue=d.createElement(VM,{className:`${i}-dropdown`},ue);const Ne=MC({trigger:["click"],placement:me==="rtl"?"bottomLeft":"bottomRight",children:(()=>{let pe;return typeof l.filterIcon=="function"?pe=l.filterIcon(A):l.filterIcon?pe=l.filterIcon:pe=d.createElement(NT,null),d.createElement("span",{role:"button",tabIndex:-1,className:de(`${i}-trigger`,{active:A}),onClick:he=>{he.stopPropagation()}},pe)})(),getPopupContainer:y},Object.assign(Object.assign({},k),{rootClassName:de(C,k.rootClassName),open:S,onOpenChange:W,popupRender:()=>typeof(k==null?void 0:k.dropdownRender)=="function"?k.dropdownRender(ue):ue}));return d.createElement("div",{className:`${i}-column`},d.createElement("span",{className:`${a}-column-title`},b),d.createElement(ym,Object.assign({},Ne)))},Yf=(e,t,r)=>{let n=[];return(e||[]).forEach((o,a)=>{var i;const l=pi(a,r),s=o.filterDropdown!==void 0;if(o.filters||s||"onFilter"in o)if("filteredValue"in o){let u=o.filteredValue;s||(u=(i=u==null?void 0:u.map(String))!==null&&i!==void 0?i:u),n.push({column:o,key:jo(o,l),filteredKeys:u,forceFiltered:o.filtered})}else n.push({column:o,key:jo(o,l),filteredKeys:t&&o.defaultFilteredValue?o.defaultFilteredValue:void 0,forceFiltered:o.filtered});"children"in o&&(n=[].concat(Pe(n),Pe(Yf(o.children,t,l))))}),n};function Nw(e,t,r,n,o,a,i,l,s){return r.map((u,c)=>{const f=pi(c,l),{filterOnClose:p=!0,filterMultiple:h=!0,filterMode:v,filterSearch:g}=u;let m=u;if(m.filters||m.filterDropdown){const b=jo(m,f),y=n.find(({key:C})=>b===C);m=Object.assign(Object.assign({},m),{title:C=>d.createElement(XM,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:m,columnKey:b,filterState:y,filterOnClose:p,filterMultiple:h,filterMode:v,filterSearch:g,triggerFilter:a,locale:o,getPopupContainer:i,rootClassName:s},_u(u.title,C))})}return"children"in m&&(m=Object.assign(Object.assign({},m),{children:Nw(e,t,m.children,n,o,a,i,f,s)})),m})}const Cb=e=>{const t={};return e.forEach(({key:r,filteredKeys:n,column:o})=>{const a=r,{filters:i,filterDropdown:l}=o;if(l)t[a]=n||null;else if(Array.isArray(n)){const s=Ra(i);t[a]=s.filter(u=>n.includes(String(u)))}else t[a]=null}),t},Zf=(e,t,r)=>t.reduce((n,o)=>{const{column:{onFilter:a,filters:i},filteredKeys:l}=o;return a&&l&&l.length?n.map(s=>Object.assign({},s)).filter(s=>l.some(u=>{const c=Ra(i),f=c.findIndex(h=>String(h)===String(u)),p=f!==-1?c[f]:u;return s[r]&&(s[r]=Zf(s[r],t,r)),a(p,s)})):n},e),Pw=e=>e.flatMap(t=>"children"in t?[t].concat(Pe(Pw(t.children||[]))):[t]),GM=e=>{const{prefixCls:t,dropdownPrefixCls:r,mergedColumns:n,onFilterChange:o,getPopupContainer:a,locale:i,rootClassName:l}=e;oi();const s=d.useMemo(()=>Pw(n||[]),[n]),[u,c]=d.useState(()=>Yf(s,!0)),f=d.useMemo(()=>{const v=Yf(s,!1);if(v.length===0)return v;let g=!0;if(v.forEach(({filteredKeys:m})=>{m!==void 0&&(g=!1)}),g){const m=(s||[]).map((b,y)=>jo(b,pi(y)));return u.filter(({key:b})=>m.includes(b)).map(b=>{const y=s[m.findIndex(C=>C===b.key)];return Object.assign(Object.assign({},b),{column:Object.assign(Object.assign({},b.column),y),forceFiltered:y.filtered})})}return v},[s,u]),p=d.useMemo(()=>Cb(f),[f]),h=v=>{const g=f.filter(({key:m})=>m!==v.key);g.push(v),c(g),o(Cb(g),g)};return[v=>Nw(t,r,v,f,i,h,a,void 0,l),f,p]},YM=(e,t,r)=>{const n=d.useRef({});function o(a){var i;if(!n.current||n.current.data!==e||n.current.childrenColumnName!==t||n.current.getRowKey!==r){let l=function(u){u.forEach((c,f)=>{const p=r(c,f);s.set(p,c),c&&typeof c=="object"&&t in c&&l(c[t]||[])})};const s=new Map;l(e),n.current={data:e,childrenColumnName:t,kvMap:s,getRowKey:r}}return(i=n.current.kvMap)===null||i===void 0?void 0:i.get(a)}return[o]};var ZM=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r};const jw=10;function JM(e,t){const r={current:e.current,pageSize:e.pageSize};return Object.keys(t&&typeof t=="object"?t:{}).forEach(n=>{const o=e[n];typeof o!="function"&&(r[n]=o)}),r}function QM(e,t,r){const n=r&&typeof r=="object"?r:{},{total:o=0}=n,a=ZM(n,["total"]),[i,l]=wt(()=>({current:"defaultCurrent"in a?a.defaultCurrent:1,pageSize:"defaultPageSize"in a?a.defaultPageSize:jw})),s=MC(i,a,{total:o>0?o:e}),u=Math.ceil((o||e)/s.pageSize);s.current>u&&(s.current=u||1);const c=(p,h)=>{l({current:p??1,pageSize:h||s.pageSize})},f=(p,h)=>{var v;r&&((v=r.onChange)===null||v===void 0||v.call(r,p,h)),c(p,h),t(p,h||(s==null?void 0:s.pageSize))};return r===!1?[{},()=>{}]:[Object.assign(Object.assign({},s),{onChange:f}),c]}const ys="ascend",rd="descend",Zs=e=>typeof e.sorter=="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1,xb=e=>typeof e=="function"?e:e&&typeof e=="object"&&e.compare?e.compare:!1,e9=(e,t)=>t?e[e.indexOf(t)+1]:e[0],Jf=(e,t,r)=>{let n=[];const o=(a,i)=>{n.push({column:a,key:jo(a,i),multiplePriority:Zs(a),sortOrder:a.sortOrder})};return(e||[]).forEach((a,i)=>{const l=pi(i,r);a.children?("sortOrder"in a&&o(a,l),n=[].concat(Pe(n),Pe(Jf(a.children,t,l)))):a.sorter&&("sortOrder"in a?o(a,l):t&&a.defaultSortOrder&&n.push({column:a,key:jo(a,l),multiplePriority:Zs(a),sortOrder:a.defaultSortOrder}))}),n},Rw=(e,t,r,n,o,a,i,l)=>(t||[]).map((s,u)=>{const c=pi(u,l);let f=s;if(f.sorter){const p=f.sortDirections||o,h=f.showSorterTooltip===void 0?i:f.showSorterTooltip,v=jo(f,c),g=r.find(({key:x})=>x===v),m=g?g.sortOrder:null,b=e9(p,m);let y;if(s.sortIcon)y=s.sortIcon({sortOrder:m});else{const x=p.includes(ys)&&d.createElement($T,{className:de(`${e}-column-sorter-up`,{active:m===ys})}),F=p.includes(rd)&&d.createElement(kT,{className:de(`${e}-column-sorter-down`,{active:m===rd})});y=d.createElement("span",{className:de(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(x&&F)})},d.createElement("span",{className:`${e}-column-sorter-inner`,"aria-hidden":"true"},x,F))}const{cancelSort:C,triggerAsc:D,triggerDesc:w}=a||{};let k=C;b===rd?k=w:b===ys&&(k=D);const E=typeof h=="object"?Object.assign({title:k},h):{title:k};f=Object.assign(Object.assign({},f),{className:de(f.className,{[`${e}-column-sort`]:m}),title:x=>{const F=`${e}-column-sorters`,j=d.createElement("span",{className:`${e}-column-title`},_u(s.title,x)),$=d.createElement("div",{className:F},j,y);return h?typeof h!="boolean"&&(h==null?void 0:h.target)==="sorter-icon"?d.createElement("div",{className:`${F} ${e}-column-sorters-tooltip-target-sorter`},j,d.createElement(pl,Object.assign({},E),y)):d.createElement(pl,Object.assign({},E),$):$},onHeaderCell:x=>{var F;const j=((F=s.onHeaderCell)===null||F===void 0?void 0:F.call(s,x))||{},$=j.onClick,P=j.onKeyDown;j.onClick=S=>{n({column:s,key:v,sortOrder:b,multiplePriority:Zs(s)}),$==null||$(S)},j.onKeyDown=S=>{S.keyCode===ot.ENTER&&(n({column:s,key:v,sortOrder:b,multiplePriority:Zs(s)}),P==null||P(S))};const A=bM(s.title,{}),O=A==null?void 0:A.toString();return m&&(j["aria-sort"]=m==="ascend"?"ascending":"descending"),j["aria-label"]=O||"",j.className=de(j.className,`${e}-column-has-sorters`),j.tabIndex=0,s.ellipsis&&(j.title=(A??"").toString()),j}})}return"children"in f&&(f=Object.assign(Object.assign({},f),{children:Rw(e,f.children,r,n,o,a,i,c)})),f}),wb=e=>{const{column:t,sortOrder:r}=e;return{column:t,order:r,field:t.dataIndex,columnKey:t.key}},Eb=e=>{const t=e.filter(({sortOrder:r})=>r).map(wb);if(t.length===0&&e.length){const r=e.length-1;return Object.assign(Object.assign({},wb(e[r])),{column:void 0,order:void 0,field:void 0,columnKey:void 0})}return t.length<=1?t[0]||{}:t},Qf=(e,t,r)=>{const n=t.slice().sort((i,l)=>l.multiplePriority-i.multiplePriority),o=e.slice(),a=n.filter(({column:{sorter:i},sortOrder:l})=>xb(i)&&l);return a.length?o.sort((i,l)=>{for(let s=0;s<a.length;s+=1){const u=a[s],{column:{sorter:c},sortOrder:f}=u,p=xb(c);if(p&&f){const h=p(i,l,f);if(h!==0)return f===ys?h:-h}}return 0}).map(i=>{const l=i[r];return l?Object.assign(Object.assign({},i),{[r]:Qf(l,t,r)}):i}):o},t9=e=>{const{prefixCls:t,mergedColumns:r,sortDirections:n,tableLocale:o,showSorterTooltip:a,onSorterChange:i}=e,[l,s]=d.useState(()=>Jf(r,!0)),u=(h,v)=>{const g=[];return h.forEach((m,b)=>{const y=pi(b,v);if(g.push(jo(m,y)),Array.isArray(m.children)){const C=u(m.children,y);g.push.apply(g,Pe(C))}}),g},c=d.useMemo(()=>{let h=!0;const v=Jf(r,!1);if(!v.length){const y=u(r);return l.filter(({key:C})=>y.includes(C))}const g=[];function m(y){h?g.push(y):g.push(Object.assign(Object.assign({},y),{sortOrder:null}))}let b=null;return v.forEach(y=>{b===null?(m(y),y.sortOrder&&(y.multiplePriority===!1?h=!1:b=!0)):(b&&y.multiplePriority!==!1||(h=!1),m(y))}),g},[r,l]),f=d.useMemo(()=>{var h,v;const g=c.map(({column:m,sortOrder:b})=>({column:m,order:b}));return{sortColumns:g,sortColumn:(h=g[0])===null||h===void 0?void 0:h.column,sortOrder:(v=g[0])===null||v===void 0?void 0:v.order}},[c]),p=h=>{let v;h.multiplePriority===!1||!c.length||c[0].multiplePriority===!1?v=[h]:v=[].concat(Pe(c.filter(({key:g})=>g!==h.key)),[h]),s(v),i(Eb(v),v)};return[h=>Rw(t,h,c,p,n,o,a),c,f,()=>Eb(c)]},Iw=(e,t)=>e.map(r=>{const n=Object.assign({},r);return n.title=_u(r.title,t),"children"in n&&(n.children=Iw(n.children,t)),n}),r9=e=>[d.useCallback(t=>Iw(t,e),[e])],n9=Ew((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),o9=Dw((e,t)=>{const{_renderTimes:r}=e,{_renderTimes:n}=t;return r!==n}),a9=e=>{const{componentCls:t,lineWidth:r,lineType:n,tableBorderColor:o,tableHeaderBg:a,tablePaddingVertical:i,tablePaddingHorizontal:l,calc:s}=e,u=`${se(r)} ${n} ${o}`,c=(f,p,h)=>({[`&${t}-${f}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${se(s(p).mul(-1).equal())}
|
|
387
|
+
${se(s(s(h).add(r)).mul(-1).equal())}`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${t}-title`]:{border:u,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:u,borderTop:u,[`
|
|
388
|
+
> ${t}-content,
|
|
389
|
+
> ${t}-header,
|
|
390
|
+
> ${t}-body,
|
|
391
|
+
> ${t}-summary
|
|
392
|
+
`]:{"> 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:u},"> thead":{"> tr:not(:last-child) > th":{borderBottom:u},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${t}-cell-fix-right-first::after`]:{borderInlineEnd:u}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${se(s(i).mul(-1).equal())} ${se(s(s(l).add(r)).mul(-1).equal())}`,"&::after":{position:"absolute",top:0,insetInlineEnd:r,bottom:0,borderInlineEnd:u,content:'""'}}}}}},[`&${t}-scroll-horizontal`]:{[`> ${t}-container > ${t}-body`]:{"> table > tbody":{[`
|
|
393
|
+
> tr${t}-expanded-row,
|
|
394
|
+
> tr${t}-placeholder
|
|
395
|
+
`]:{"> th, > td":{borderInlineEnd:0}}}}}},c("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle)),c("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall)),{[`> ${t}-footer`]:{border:u,borderTop:0}}),[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${se(r)} 0 ${se(r)} ${a}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:u}}}},i9=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:Object.assign(Object.assign({},sl),{wordBreak:"keep-all",[`
|
|
396
|
+
&${t}-cell-fix-left-last,
|
|
397
|
+
&${t}-cell-fix-right-first
|
|
398
|
+
`]:{overflow:"visible",[`${t}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${t}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},l9=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:"center",color:e.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:e.colorBgContainer}}}}},s9=e=>{const{componentCls:t,antCls:r,motionDurationSlow:n,lineWidth:o,paddingXS:a,lineType:i,tableBorderColor:l,tableExpandIconBg:s,tableExpandColumnWidth:u,borderRadius:c,tablePaddingVertical:f,tablePaddingHorizontal:p,tableExpandedRowBg:h,paddingXXS:v,expandIconMarginTop:g,expandIconSize:m,expandIconHalfInner:b,expandIconScale:y,calc:C}=e,D=`${se(o)} ${i} ${l}`,w=C(v).sub(o).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:u},[`${t}-row-expand-icon-cell`]:{textAlign:"center",[`${t}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${t}-row-indent`]:{height:1,float:"left"},[`${t}-row-expand-icon`]:Object.assign(Object.assign({},wF(e)),{position:"relative",float:"left",width:m,height:m,color:"inherit",lineHeight:se(m),background:s,border:D,borderRadius:c,transform:`scale(${y})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${n} ease-out`,content:'""'},"&::before":{top:b,insetInlineEnd:w,insetInlineStart:w,height:o},"&::after":{top:w,bottom:w,insetInlineStart:b,width:o,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"}}),[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:g,marginInlineEnd:a},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:h}},[`${r}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`${se(C(f).mul(-1).equal())} ${se(C(p).mul(-1).equal())}`,padding:`${se(f)} ${se(p)}`}}}},u9=e=>{const{componentCls:t,antCls:r,iconCls:n,tableFilterDropdownWidth:o,tableFilterDropdownSearchWidth:a,paddingXXS:i,paddingXS:l,colorText:s,lineWidth:u,lineType:c,tableBorderColor:f,headerIconColor:p,fontSizeSM:h,tablePaddingHorizontal:v,borderRadius:g,motionDurationSlow:m,colorIcon:b,colorPrimary:y,tableHeaderFilterActiveBg:C,colorTextDisabled:D,tableFilterDropdownBg:w,tableFilterDropdownHeight:k,controlItemBgHover:E,controlItemBgActive:x,boxShadowSecondary:F,filterDropdownMenuBg:j,calc:$}=e,P=`${r}-dropdown`,A=`${t}-filter-dropdown`,O=`${r}-tree`,S=`${se(u)} ${c} ${f}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:$(i).mul(-1).equal(),marginInline:`${se(i)} ${se($(v).div(2).mul(-1).equal())}`,padding:`0 ${se(i)}`,color:p,fontSize:h,borderRadius:g,cursor:"pointer",transition:`all ${m}`,"&:hover":{color:b,background:C},"&.active":{color:y}}}},{[`${r}-dropdown`]:{[A]:Object.assign(Object.assign({},Br(e)),{minWidth:o,backgroundColor:w,borderRadius:g,boxShadow:F,overflow:"hidden",[`${P}-menu`]:{maxHeight:k,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:j,"&:empty::after":{display:"block",padding:`${se(l)} 0`,color:D,fontSize:h,textAlign:"center",content:'"Not Found"'}},[`${A}-tree`]:{paddingBlock:`${se(l)} 0`,paddingInline:l,[O]:{padding:0},[`${O}-treenode ${O}-node-content-wrapper:hover`]:{backgroundColor:E},[`${O}-treenode-checkbox-checked ${O}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:x}}},[`${A}-search`]:{padding:l,borderBottom:S,"&-input":{input:{minWidth:a},[n]:{color:D}}},[`${A}-checkall`]:{width:"100%",marginBottom:i,marginInlineStart:i},[`${A}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${se($(l).sub(u).equal())} ${se(l)}`,overflow:"hidden",borderTop:S}})}},{[`${r}-dropdown ${A}, ${A}-submenu`]:{[`${r}-checkbox-wrapper + span`]:{paddingInlineStart:l,color:s},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},c9=e=>{const{componentCls:t,lineWidth:r,colorSplit:n,motionDurationSlow:o,zIndexTableFixed:a,tableBg:i,zIndexTableSticky:l,calc:s}=e,u=n;return{[`${t}-wrapper`]:{[`
|
|
399
|
+
${t}-cell-fix-left,
|
|
400
|
+
${t}-cell-fix-right
|
|
401
|
+
`]:{position:"sticky !important",zIndex:a,background:i},[`
|
|
402
|
+
${t}-cell-fix-left-first::after,
|
|
403
|
+
${t}-cell-fix-left-last::after
|
|
404
|
+
`]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:s(r).mul(-1).equal(),width:30,transform:"translateX(100%)",transition:`box-shadow ${o}`,content:'""',pointerEvents:"none",willChange:"transform"},[`${t}-cell-fix-left-all::after`]:{display:"none"},[`
|
|
405
|
+
${t}-cell-fix-right-first::after,
|
|
406
|
+
${t}-cell-fix-right-last::after
|
|
407
|
+
`]:{position:"absolute",top:0,bottom:s(r).mul(-1).equal(),left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${o}`,content:'""',pointerEvents:"none"},[`${t}-container`]:{position:"relative","&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:s(l).add(1).equal({unit:!1}),width:30,transition:`box-shadow ${o}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${t}-ping-left`]:{[`&:not(${t}-has-fix-left) ${t}-container::before`]:{boxShadow:`inset 10px 0 8px -8px ${u}`},[`
|
|
408
|
+
${t}-cell-fix-left-first::after,
|
|
409
|
+
${t}-cell-fix-left-last::after
|
|
410
|
+
`]:{boxShadow:`inset 10px 0 8px -8px ${u}`},[`${t}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${t}-ping-right`]:{[`&:not(${t}-has-fix-right) ${t}-container::after`]:{boxShadow:`inset -10px 0 8px -8px ${u}`},[`
|
|
411
|
+
${t}-cell-fix-right-first::after,
|
|
412
|
+
${t}-cell-fix-right-last::after
|
|
413
|
+
`]:{boxShadow:`inset -10px 0 8px -8px ${u}`}},[`${t}-fixed-column-gapped`]:{[`
|
|
414
|
+
${t}-cell-fix-left-first::after,
|
|
415
|
+
${t}-cell-fix-left-last::after,
|
|
416
|
+
${t}-cell-fix-right-first::after,
|
|
417
|
+
${t}-cell-fix-right-last::after
|
|
418
|
+
`]:{boxShadow:"none"}}}}},d9=e=>{const{componentCls:t,antCls:r,margin:n}=e;return{[`${t}-wrapper`]:{[`${t}-pagination${r}-pagination`]:{margin:`${se(n)} 0`},[`${t}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:e.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},f9=e=>{const{componentCls:t,tableRadius:r}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${se(r)} ${se(r)} 0 0`},[`${t}-title + ${t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${t}-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)}`}}}}},p9=e=>{const{componentCls:t}=e;return{[`${t}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${t}-pagination-left`]:{justifyContent:"flex-end"},[`${t}-pagination-right`]:{justifyContent:"flex-start"},[`${t}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${t}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${t}-row-indent`]:{float:"right"}}}}},m9=e=>{const{componentCls:t,antCls:r,iconCls:n,fontSizeIcon:o,padding:a,paddingXS:i,headerIconColor:l,headerIconHoverColor:s,tableSelectionColumnWidth:u,tableSelectedRowBg:c,tableSelectedRowHoverBg:f,tableRowHoverBg:p,tablePaddingHorizontal:h,calc:v}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:u,[`&${t}-selection-col-with-dropdown`]:{width:v(u).add(o).add(v(a).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:v(u).add(v(i).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:v(u).add(o).add(v(a).div(4)).add(v(i).mul(2)).equal()}},[`
|
|
419
|
+
table tr th${t}-selection-column,
|
|
420
|
+
table tr td${t}-selection-column,
|
|
421
|
+
${t}-selection-column
|
|
422
|
+
`]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",[`${r}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:v(e.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${t}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${t}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${t}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:se(v(h).div(4).equal()),[n]:{color:l,fontSize:o,verticalAlign:"baseline","&:hover":{color:s}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:c,"&-row-hover":{background:f}}},[`> ${t}-cell-row-hover`]:{background:p}}}}}},h9=e=>{const{componentCls:t,tableExpandColumnWidth:r,calc:n}=e,o=(a,i,l,s)=>({[`${t}${t}-${a}`]:{fontSize:s,[`
|
|
423
|
+
${t}-title,
|
|
424
|
+
${t}-footer,
|
|
425
|
+
${t}-cell,
|
|
426
|
+
${t}-thead > tr > th,
|
|
427
|
+
${t}-tbody > tr > th,
|
|
428
|
+
${t}-tbody > tr > td,
|
|
429
|
+
tfoot > tr > th,
|
|
430
|
+
tfoot > tr > td
|
|
431
|
+
`]:{padding:`${se(i)} ${se(l)}`},[`${t}-filter-trigger`]:{marginInlineEnd:se(n(l).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${se(n(i).mul(-1).equal())} ${se(n(l).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:se(n(i).mul(-1).equal()),marginInline:`${se(n(r).sub(l).equal())} ${se(n(l).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:se(n(l).div(4).equal())}}});return{[`${t}-wrapper`]:Object.assign(Object.assign({},o("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle)),o("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall))}},g9=e=>{const{componentCls:t,marginXXS:r,fontSizeIcon:n,headerIconColor:o,headerIconHoverColor:a}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}, left 0s`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:e.colorPrimary},[`
|
|
432
|
+
&${t}-cell-fix-left:hover,
|
|
433
|
+
&${t}-cell-fix-right:hover
|
|
434
|
+
`]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:"relative",zIndex:1,flex:1,minWidth:0},[`${t}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${t}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:"none"}},[`${t}-column-sorter`]:{marginInlineStart:r,color:o,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:n,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:a}}}},v9=e=>{const{componentCls:t,opacityLoading:r,tableScrollThumbBg:n,tableScrollThumbBgHover:o,tableScrollThumbSize:a,tableScrollBg:i,zIndexTableSticky:l,stickyScrollBarBorderRadius:s,lineWidth:u,lineType:c,tableBorderColor:f}=e,p=`${se(u)} ${c} ${f}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:l,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${se(a)} !important`,zIndex:l,display:"flex",alignItems:"center",background:i,borderTop:p,opacity:r,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:a,backgroundColor:n,borderRadius:s,transition:`all ${e.motionDurationSlow}, transform 0s`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:o}}}}}}},kb=e=>{const{componentCls:t,lineWidth:r,tableBorderColor:n,calc:o}=e,a=`${se(r)} ${e.lineType} ${n}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:a}}},[`div${t}-summary`]:{boxShadow:`0 ${se(o(r).mul(-1).equal())} 0 ${n}`}}}},b9=e=>{const{componentCls:t,motionDurationMid:r,lineWidth:n,lineType:o,tableBorderColor:a,calc:i}=e,l=`${se(n)} ${o} ${a}`,s=`${t}-expanded-row-cell`;return{[`${t}-wrapper`]:{[`${t}-tbody-virtual`]:{[`${t}-tbody-virtual-holder-inner`]:{[`
|
|
435
|
+
& > ${t}-row,
|
|
436
|
+
& > div:not(${t}-row) > ${t}-row
|
|
437
|
+
`]:{display:"flex",boxSizing:"border-box",width:"100%"}},[`${t}-cell`]:{borderBottom:l,transition:`background ${r}`},[`${t}-expanded-row`]:{[`${s}${s}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${se(n)})`,borderInlineEnd:"none"}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:l,position:"absolute"},[`${t}-cell`]:{borderInlineEnd:l,[`&${t}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:i(n).mul(-1).equal(),borderInlineStart:l}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:l,borderBottom:l}}}}}},y9=e=>{const{componentCls:t,fontWeightStrong:r,tablePaddingVertical:n,tablePaddingHorizontal:o,tableExpandColumnWidth:a,lineWidth:i,lineType:l,tableBorderColor:s,tableFontSize:u,tableBg:c,tableRadius:f,tableHeaderTextColor:p,motionDurationMid:h,tableHeaderBg:v,tableHeaderCellSplitColor:g,tableFooterTextColor:m,tableFooterBg:b,calc:y}=e,C=`${se(i)} ${l} ${s}`;return{[`${t}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%","--rc-virtual-list-scrollbar-bg":e.tableScrollBg},zs()),{[t]:Object.assign(Object.assign({},Br(e)),{fontSize:u,background:c,borderRadius:`${se(f)} ${se(f)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`}),table:{width:"100%",textAlign:"start",borderRadius:`${se(f)} ${se(f)} 0 0`,borderCollapse:"separate",borderSpacing:0},[`
|
|
438
|
+
${t}-cell,
|
|
439
|
+
${t}-thead > tr > th,
|
|
440
|
+
${t}-tbody > tr > th,
|
|
441
|
+
${t}-tbody > tr > td,
|
|
442
|
+
tfoot > tr > th,
|
|
443
|
+
tfoot > tr > td
|
|
444
|
+
`]:{position:"relative",padding:`${se(n)} ${se(o)}`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${se(n)} ${se(o)}`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:p,fontWeight:r,textAlign:"start",background:v,borderBottom:C,transition:`background ${h} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${t}-selection-column):not(${t}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:g,transform:"translateY(-50%)",transition:`background-color ${h}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${t}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${h}, border-color ${h}`,borderBottom:C,[`
|
|
445
|
+
> ${t}-wrapper:only-child,
|
|
446
|
+
> ${t}-expanded-row-fixed > ${t}-wrapper:only-child
|
|
447
|
+
`]:{[t]:{marginBlock:se(y(n).mul(-1).equal()),marginInline:`${se(y(a).sub(o).equal())}
|
|
448
|
+
${se(y(o).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:p,fontWeight:r,textAlign:"start",background:v,borderBottom:C,transition:`background ${h} ease`}}},[`${t}-footer`]:{padding:`${se(n)} ${se(o)}`,color:m,background:b}})}},C9=e=>{const{colorFillAlter:t,colorBgContainer:r,colorTextHeading:n,colorFillSecondary:o,colorFillContent:a,controlItemBgActive:i,controlItemBgActiveHover:l,padding:s,paddingSM:u,paddingXS:c,colorBorderSecondary:f,borderRadiusLG:p,controlHeight:h,colorTextPlaceholder:v,fontSize:g,fontSizeSM:m,lineHeight:b,lineWidth:y,colorIcon:C,colorIconHover:D,opacityLoading:w,controlInteractiveSize:k}=e,E=new Ht(o).onBackground(r).toHexString(),x=new Ht(a).onBackground(r).toHexString(),F=new Ht(t).onBackground(r).toHexString(),j=new Ht(C),$=new Ht(D),P=k/2-y,A=P*2+y*3;return{headerBg:F,headerColor:n,headerSortActiveBg:E,headerSortHoverBg:x,bodySortBg:F,rowHoverBg:F,rowSelectedBg:i,rowSelectedHoverBg:l,rowExpandedBg:t,cellPaddingBlock:s,cellPaddingInline:s,cellPaddingBlockMD:u,cellPaddingInlineMD:c,cellPaddingBlockSM:c,cellPaddingInlineSM:c,borderColor:f,headerBorderRadius:p,footerBg:F,footerColor:n,cellFontSize:g,cellFontSizeMD:g,cellFontSizeSM:g,headerSplitColor:f,fixedHeaderSortActiveBg:E,headerFilterHoverBg:a,filterDropdownMenuBg:r,filterDropdownBg:r,expandIconBg:r,selectionColumnWidth:h,stickyScrollBarBg:v,stickyScrollBarBorderRadius:100,expandIconMarginTop:(g*b-y*3)/2-Math.ceil((m*1.4-y*3)/2),headerIconColor:j.clone().setA(j.a*w).toRgbString(),headerIconHoverColor:$.clone().setA($.a*w).toRgbString(),expandIconHalfInner:P,expandIconSize:A,expandIconScale:k/A}},Db=2,x9=Hr("Table",e=>{const{colorTextHeading:t,colorSplit:r,colorBgContainer:n,controlInteractiveSize:o,headerBg:a,headerColor:i,headerSortActiveBg:l,headerSortHoverBg:s,bodySortBg:u,rowHoverBg:c,rowSelectedBg:f,rowSelectedHoverBg:p,rowExpandedBg:h,cellPaddingBlock:v,cellPaddingInline:g,cellPaddingBlockMD:m,cellPaddingInlineMD:b,cellPaddingBlockSM:y,cellPaddingInlineSM:C,borderColor:D,footerBg:w,footerColor:k,headerBorderRadius:E,cellFontSize:x,cellFontSizeMD:F,cellFontSizeSM:j,headerSplitColor:$,fixedHeaderSortActiveBg:P,headerFilterHoverBg:A,filterDropdownBg:O,expandIconBg:S,selectionColumnWidth:B,stickyScrollBarBg:R,calc:N}=e,T=er(e,{tableFontSize:x,tableBg:n,tableRadius:E,tablePaddingVertical:v,tablePaddingHorizontal:g,tablePaddingVerticalMiddle:m,tablePaddingHorizontalMiddle:b,tablePaddingVerticalSmall:y,tablePaddingHorizontalSmall:C,tableBorderColor:D,tableHeaderTextColor:i,tableHeaderBg:a,tableFooterTextColor:k,tableFooterBg:w,tableHeaderCellSplitColor:$,tableHeaderSortBg:l,tableHeaderSortHoverBg:s,tableBodySortBg:u,tableFixedHeaderSortActiveBg:P,tableHeaderFilterActiveBg:A,tableFilterDropdownBg:O,tableRowHoverBg:c,tableSelectedRowBg:f,tableSelectedRowHoverBg:p,zIndexTableFixed:Db,zIndexTableSticky:N(Db).add(1).equal({unit:!1}),tableFontSizeMiddle:F,tableFontSizeSmall:j,tableSelectionColumnWidth:B,tableExpandIconBg:S,tableExpandColumnWidth:N(o).add(N(e.padding).mul(2)).equal(),tableExpandedRowBg:h,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:R,tableScrollThumbBgHover:t,tableScrollBg:r});return[y9(T),d9(T),kb(T),g9(T),u9(T),a9(T),f9(T),s9(T),kb(T),l9(T),m9(T),c9(T),v9(T),i9(T),h9(T),p9(T),b9(T)]},C9,{unitless:{expandIconScale:!0}}),w9=[],E9=(e,t)=>{var r,n;const{prefixCls:o,className:a,rootClassName:i,style:l,size:s,bordered:u,dropdownPrefixCls:c,dataSource:f,pagination:p,rowSelection:h,rowKey:v="key",rowClassName:g,columns:m,children:b,childrenColumnName:y,onChange:C,getPopupContainer:D,loading:w,expandIcon:k,expandable:E,expandedRowRender:x,expandIconColumnIndex:F,indentSize:j,scroll:$,sortDirections:P,locale:A,showSorterTooltip:O={target:"full-header"},virtual:S}=e;oi();const B=d.useMemo(()=>m||km(b),[m,b]),R=d.useMemo(()=>B.some(Ze=>Ze.responsive),[B]),N=fx(R),T=d.useMemo(()=>{const Ze=new Set(Object.keys(N).filter(Je=>N[Je]));return B.filter(Je=>!Je.responsive||Je.responsive.some(it=>Ze.has(it)))},[B,N]),L=fn(e,["className","style","columns"]),{locale:X=ra,direction:_,table:q,renderEmpty:Q,getPrefixCls:te,getPopupContainer:z}=d.useContext(Zt),Y=fa(s),V=Object.assign(Object.assign({},X.Table),A),G=f||w9,K=te("table",o),W=te("dropdown",c),[,re]=Yr(),U=bo(K),[J,ne,ue]=x9(K,U),me=Object.assign(Object.assign({childrenColumnName:y,expandIconColumnIndex:F},E),{expandIcon:(r=E==null?void 0:E.expandIcon)!==null&&r!==void 0?r:(n=q==null?void 0:q.expandable)===null||n===void 0?void 0:n.expandIcon}),{childrenColumnName:Ce="children"}=me,Ne=d.useMemo(()=>G.some(Ze=>Ze==null?void 0:Ze[Ce])?"nest":x||E!=null&&E.expandedRowRender?"row":null,[G]),pe={body:d.useRef(null)},he=vM(K),ve=d.useRef(null),be=d.useRef(null);hM(t,()=>Object.assign(Object.assign({},be.current),{nativeElement:ve.current}));const ye=d.useMemo(()=>typeof v=="function"?v:Ze=>Ze==null?void 0:Ze[v],[v]),[Ae]=YM(G,Ce,ye),we={},He=(Ze,Je,it=!1)=>{var mt,Pt,jt,Rt;const kt=Object.assign(Object.assign({},we),Ze);it&&((mt=we.resetPagination)===null||mt===void 0||mt.call(we),!((Pt=kt.pagination)===null||Pt===void 0)&&Pt.current&&(kt.pagination.current=1),p&&((jt=p.onChange)===null||jt===void 0||jt.call(p,1,(Rt=kt.pagination)===null||Rt===void 0?void 0:Rt.pageSize))),$&&$.scrollToFirstRowOnChange!==!1&&pe.body.current&&B3(0,{getContainer:()=>pe.body.current}),C==null||C(kt.pagination,kt.filters,kt.sorter,{currentDataSource:Zf(Qf(G,kt.sorterStates,Ce),kt.filterStates,Ce),action:Je})},Me=(Ze,Je)=>{He({sorter:Ze,sorterStates:Je},"sort",!1)},[Fe,ge,Se,qe]=t9({prefixCls:K,mergedColumns:T,onSorterChange:Me,sortDirections:P||["ascend","descend"],tableLocale:V,showSorterTooltip:O}),Ye=d.useMemo(()=>Qf(G,ge,Ce),[G,ge]);we.sorter=qe(),we.sorterStates=ge;const Xe=(Ze,Je)=>{He({filters:Ze,filterStates:Je},"filter",!0)},[Re,lt,je]=GM({prefixCls:K,locale:V,dropdownPrefixCls:W,mergedColumns:T,onFilterChange:Xe,getPopupContainer:D||z,rootClassName:de(i,U)}),at=Zf(Ye,lt,Ce);we.filters=je,we.filterStates=lt;const vt=d.useMemo(()=>{const Ze={};return Object.keys(je).forEach(Je=>{je[Je]!==null&&(Ze[Je]=je[Je])}),Object.assign(Object.assign({},Se),{filters:Ze})},[Se,je]),[At]=r9(vt),fe=(Ze,Je)=>{He({pagination:Object.assign(Object.assign({},we.pagination),{current:Ze,pageSize:Je})},"paginate")},[Oe,rt]=QM(at.length,fe,p);we.pagination=p===!1?{}:JM(Oe,p),we.resetPagination=rt;const Ke=d.useMemo(()=>{if(p===!1||!Oe.pageSize)return at;const{current:Ze=1,total:Je,pageSize:it=jw}=Oe;return at.length<Je?at.length>it?at.slice((Ze-1)*it,Ze*it):at:at.slice((Ze-1)*it,Ze*it)},[!!p,at,Oe==null?void 0:Oe.current,Oe==null?void 0:Oe.pageSize,Oe==null?void 0:Oe.total]),[ke,Be]=pM({prefixCls:K,data:at,pageData:Ke,getRowKey:ye,getRecordByKey:Ae,expandType:Ne,childrenColumnName:Ce,locale:V,getPopupContainer:D||z},h),ie=(Ze,Je,it)=>{let mt;return typeof g=="function"?mt=de(g(Ze,Je,it)):mt=de(g),de({[`${K}-row-selected`]:Be.has(ye(Ze,Je))},mt)};me.__PARENT_RENDER_ICON__=me.expandIcon,me.expandIcon=me.expandIcon||k||gM(V),Ne==="nest"&&me.expandIconColumnIndex===void 0?me.expandIconColumnIndex=h?1:0:me.expandIconColumnIndex>0&&h&&(me.expandIconColumnIndex-=1),typeof me.indentSize!="number"&&(me.indentSize=typeof j=="number"?j:15);const De=d.useCallback(Ze=>At(ke(Re(Fe(Ze)))),[Fe,Re,ke]);let Z,le;if(p!==!1&&(Oe!=null&&Oe.total)){let Ze;Oe.size?Ze=Oe.size:Ze=Y==="small"||Y==="middle"?"small":void 0;const Je=Pt=>d.createElement(aw,Object.assign({},Oe,{className:de(`${K}-pagination ${K}-pagination-${Pt}`,Oe.className),size:Ze})),it=_==="rtl"?"left":"right",{position:mt}=Oe;if(mt!==null&&Array.isArray(mt)){const Pt=mt.find(kt=>kt.includes("top")),jt=mt.find(kt=>kt.includes("bottom")),Rt=mt.every(kt=>`${kt}`=="none");!Pt&&!jt&&!Rt&&(le=Je(it)),Pt&&(Z=Je(Pt.toLowerCase().replace("top",""))),jt&&(le=Je(jt.toLowerCase().replace("bottom","")))}else le=Je(it)}let ze;typeof w=="boolean"?ze={spinning:w}:typeof w=="object"&&(ze=Object.assign({spinning:!0},w));const xe=de(ue,U,`${K}-wrapper`,q==null?void 0:q.className,{[`${K}-wrapper-rtl`]:_==="rtl"},a,i,ne),_e=Object.assign(Object.assign({},q==null?void 0:q.style),l),We=typeof(A==null?void 0:A.emptyText)<"u"?A.emptyText:(Q==null?void 0:Q("Table"))||d.createElement(nx,{componentName:"Table"}),Ge=S?o9:n9,ft={},pt=d.useMemo(()=>{const{fontSize:Ze,lineHeight:Je,lineWidth:it,padding:mt,paddingXS:Pt,paddingSM:jt}=re,Rt=Math.floor(Ze*Je);switch(Y){case"middle":return jt*2+Rt+it;case"small":return Pt*2+Rt+it;default:return mt*2+Rt+it}},[re,Y]);return S&&(ft.listItemHeight=pt),J(d.createElement("div",{ref:ve,className:xe,style:_e},d.createElement(Cm,Object.assign({spinning:!1},ze),Z,d.createElement(Ge,Object.assign({},ft,L,{ref:be,columns:T,direction:_,expandable:me,prefixCls:K,className:de({[`${K}-middle`]:Y==="middle",[`${K}-small`]:Y==="small",[`${K}-bordered`]:u,[`${K}-empty`]:G.length===0},ue,U,ne),data:Ke,rowKey:ye,rowClassName:ie,emptyText:We,internalHooks:Bl,internalRefs:pe,transformColumns:De,getContainerWidth:he})),le)))},k9=d.forwardRef(E9),D9=(e,t)=>{const r=d.useRef(0);return r.current+=1,d.createElement(k9,Object.assign({},e,{ref:t,_renderTimes:r.current}))},yo=d.forwardRef(D9);yo.SELECTION_COLUMN=ko;yo.EXPAND_COLUMN=co;yo.SELECTION_ALL=Vf;yo.SELECTION_INVERT=Uf;yo.SELECTION_NONE=Xf;yo.Column=rM;yo.ColumnGroup=nM;yo.Summary=pw;const Tw=ee.forwardRef(({attributes:e,element:t,eventsEmit:r,onDataUpdate:n,dataSource:o,tagIndex:a},i)=>{var w;const[l,s]=wt(null),[u,c]=wt(!0),[f,p]=wt(1),[h,v]=wt(10);Ot(()=>{if(!l){if(!o){c(!0);try{const k=new CustomEvent("retrieve-sql-data:request-data",{detail:{id:t.id}});window.dispatchEvent(k)}catch{console.warn("Failed to dispatch retrieve-sql-data:request-data")}return}try{const k=(o==null?void 0:o.queryReplyPairList)||[];console.log("RetrieveSqlDataElement pairList:",k);let E=null,x=null,F;for(const P of k){const A=P==null?void 0:P.reply;if(!(A!=null&&A.databaseReference))continue;const O=A.databaseReference;console.log(O,"123123123jk123lk12j3l12jl3"),O!=null&&O.retrieveSqlData&&(console.log("Found source in raw12eku1h2lkjeh12ljkhelk12hejk:",O.retrieveSqlData.filePath),F=O.retrieveSqlData.filePath);let S=O;if(typeof O=="string")try{S=JSON.parse(O)}catch{}if(!S)continue;const B=Array.isArray(S)?S:[S],R=B.findIndex(L=>(L==null?void 0:L.id)===t.id),N=R>=0?B[R]:null;if(console.log("~~~~~~~~~~~~~~~",N),N){E=N,x=N.retrieveSqlData||N.retrieve_table_data||N.retrieveTableData;break}const T=B.find(L=>{var X,_;return(((_=(X=L==null?void 0:L.retrieveSqlData)==null?void 0:X.preData)==null?void 0:_.length)||0)>0});!E&&T&&(E=T,x=T.retrieveSqlData||T.retrieve_table_data||T.retrieveTableData)}if(!E||!x){console.warn("No databaseReference with preData found for id:",t.id),c(!1);return}const j=Array.isArray(x==null?void 0:x.preData)?x.preData[0]:null;if(!j){console.warn("Matched item has no preData"),c(!1);return}const $={columns:(j.columns||[]).map(P=>({key:P.key,title:P.title})),rows:j.data||j.rows||[],total:(x==null?void 0:x.total)||0,fetchUrl:(x==null?void 0:x.fetchUrl)||"/index/knowledgeBase/file/stream",source:F||(x==null?void 0:x.source)||(E==null?void 0:E.source)};s($),c(!1)}catch(k){console.error("Init preData parsing failed:",k),c(!1)}}},[t.id,l,o]),Ot(()=>{const k=E=>{try{const x=((E==null?void 0:E.detail)||{}).databaseReference;if(!x)return;let F=x;if(typeof x=="string")try{F=JSON.parse(x)}catch{}if(!F)return;const j=Array.isArray(F)?F:[F],$=j.findIndex(B=>(B==null?void 0:B.id)===t.id);let P=$>=0?j[$]:null;P||(P=j.find(B=>{var R,N;return(((N=(R=B==null?void 0:B.retrieveSqlData)==null?void 0:R.preData)==null?void 0:N.length)||0)>0})||null);const A=(P==null?void 0:P.retrieveSqlData)||(P==null?void 0:P.retrieve_table_data)||(P==null?void 0:P.retrieveTableData),O=Array.isArray(A==null?void 0:A.preData)?A.preData[0]:null;if(!O)return;const S={columns:(O.columns||[]).map(B=>({key:B.key,title:B.title})),rows:O.data||O.rows||[],total:(A==null?void 0:A.total)||0,fetchUrl:(A==null?void 0:A.fetchUrl)||"/index/knowledgeBase/file/stream",source:(P==null?void 0:P.source)||(A==null?void 0:A.source)};s(S),c(!1)}catch{console.warn("Failed to handle retrieve-sql-data:data-response")}};return window.addEventListener("retrieve-sql-data:data-response",k),()=>{window.removeEventListener("retrieve-sql-data:data-response",k)}},[t.id]),Ot(()=>{n&&l&&n(l)},[l,n]);const g=k=>{if(!k||k.length===0)return[];const E=k.find(x=>x&&typeof x=="object")||{};return Object.keys(E).map(x=>({key:x,title:x}))},m=(k,E)=>{p(k),E&&v(E);const x=F=>{let j=null;if(F&&Array.isArray(F.columns)&&Array.isArray(F.rows))j={columns:F.columns,rows:F.rows,total:Number(F.total)||0,fetchUrl:F.fetchUrl||(l==null?void 0:l.fetchUrl)||"",source:F.source||(l==null?void 0:l.source)};else if(F&&Array.isArray(F.data)){const $=F.data;j={columns:l!=null&&l.columns&&l.columns.length>0?l.columns:g($),rows:$,total:Number(F.totalCount??F.total??(l==null?void 0:l.total)??$.length)||0,fetchUrl:(l==null?void 0:l.fetchUrl)||"",source:l==null?void 0:l.source},typeof F.currentPage=="number"&&p(F.currentPage),typeof F.pageSize=="number"&&v(F.pageSize)}else if(Array.isArray(F)){const $=F;j={columns:l!=null&&l.columns&&l.columns.length>0?l.columns:g($),rows:$,total:Number((l==null?void 0:l.total)??$.length)||0,fetchUrl:(l==null?void 0:l.fetchUrl)||"",source:l==null?void 0:l.source}}if(!j){console.warn("replacePredataFunction received unsupported data format:",F);return}console.log("Replacing table data with:",j),s(j)};r==null||r("retrieve-sql-data:pagingation_click",{id:t.id,page:k,pageSize:E||h,fetchUrl:l==null?void 0:l.fetchUrl,total:l==null?void 0:l.total,source:l==null?void 0:l.source,replacePredataFunction:x})},b=k=>l!=null&&l.rows?Math.max(...l.rows.map(E=>{const x=E[k];return x?String(x).length:0})):0,y=(((w=l==null?void 0:l.columns)==null?void 0:w.length)||0)===1,C=(l==null?void 0:l.columns.map((k,E)=>({title:k.title||k.key,dataIndex:k.key,key:k.key,render:x=>{const F=x==null||x===""?"-":x;return y?ae.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5},children:String(F)}):F},...y?{width:void 0}:{}})))||[],D=(l==null?void 0:l.rows.map((k,E)=>({key:E,...k})))||[];return ae.jsx("div",{...e,ref:i,className:"retrieve-sql-data-container my-4",children:u?ae.jsxs("div",{className:"flex items-center justify-center py-8",children:[ae.jsx(Cm,{size:"large"}),ae.jsx("span",{className:"ml-2 text-gray-500",children:"\u52A0\u8F7D\u6570\u636E\u4E2D..."})]}):l?ae.jsxs("div",{className:"retrieve-sql-data-content",children:[a!==null&&ae.jsxs("div",{className:"mb-2 flex items-center",children:[ae.jsx("span",{className:"w-6 h-6 bg-orange-100 text-orange-600 rounded text-xs font-medium flex items-center justify-center",children:a}),ae.jsx("span",{children:" \u6570\u636E\u8868\u67E5\u8BE2\u7ED3\u679C\uFF1A"})]}),ae.jsx("div",{className:"table-container",style:{border:"1px solid #d9d9d9",borderRadius:"6px",position:"relative"},children:ae.jsx(yo,{columns:C.map((k,E)=>({...k,...y?{width:void 0,minWidth:void 0,maxWidth:void 0,fixed:void 0,ellipsis:!1}:{width:E===0?160:void 0,minWidth:120,maxWidth:E===0?180:300,fixed:E===0?"left":void 0,ellipsis:{showTitle:!0}},render:x=>{if(x==null)return"-";const F=String(x);if(y)return ae.jsx("div",{style:{whiteSpace:"normal",wordBreak:"break-word",overflowWrap:"anywhere",lineHeight:1.5,cursor:"default"},title:F,children:F});const j=b(k.key);let $="200px";return E===0?$="80px":j<=8?$="100px":j<=15?$="150px":j<=25?$="200px":j<=40?$="250px":$="300px",ae.jsx("div",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:$,display:"inline-block",cursor:"default"},title:F,children:F})}})),dataSource:D,pagination:!1,size:"small",bordered:!1,className:"database-table",style:{minWidth:y?"100%":"1000px"},scroll:{x:y?void 0:"max-content",y:400}})}),l.total>h&&ae.jsx("div",{className:"flex justify-center mt-3",children:ae.jsx(aw,{current:f,pageSize:h,total:l.total,onChange:m,onShowSizeChange:m,showSizeChanger:!1,showQuickJumper:!1,size:"small"})})]}):ae.jsx("div",{className:"text-center py-4 text-gray-500",children:"\u6682\u65E0\u6570\u636E"})})});Tw.displayName="RetrieveSqlDataElement";const S9=e=>{var a,i,l,s,u,c,f,p;const{styles:t}=e,{element:r,children:n,attributes:o}=e;switch(r.type){case"paragraph":return ae.jsx("div",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(a=t==null?void 0:t.text)==null?void 0:a.color} !important`,margin:"0 0 0.75rem 0"},children:n});case"heading-one":return ae.jsx("h1",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(i=t==null?void 0:t.text)==null?void 0:i.color} !important`},children:n});case"heading-two":return ae.jsx("h2",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(l=t==null?void 0:t.text)==null?void 0:l.color} !important`},children:n});case"heading-three":return ae.jsx("h3",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(s=t==null?void 0:t.text)==null?void 0:s.color} !important`},children:n});case"bulleted-list":return ae.jsx("ul",{...o,children:n});case"numbered-list":return ae.jsx("ol",{...o,children:n});case"list-item":return ae.jsx("li",{...o,children:n});case"table":return ae.jsx("div",{className:"table-container",children:ae.jsx("table",{...o,children:ae.jsx("tbody",{children:n})})});case"table-row":return ae.jsx("tr",{...o,children:n});case"table-cell":return r.header?ae.jsx("th",{...o,children:n}):ae.jsx("td",{...o,children:n});case"block-quote":return ae.jsx("blockquote",{...o,style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(u=t==null?void 0:t.text)==null?void 0:u.color} !important`},children:n});case"code-block":return ae.jsx("pre",{...o,children:ae.jsx("code",{style:{color:`${(c=t==null?void 0:t.text)==null?void 0:c.color} !important`},children:n})});case"think":const h=e.extraProps||{},v=h.isCollapsed!==void 0?h.isCollapsed:Object.values(h)[1]===!0,g={...h,isCollapsed:v};return console.log("renderElement think case - fixed extraProps:",g),ae.jsx(AB,{attributes:o,styles:t,extraProps:g,children:n});case"template":return ae.jsx(n1,{...o,element:r,children:n,styles:t});case"retrieve-sql-data":const m=(b=>{if(!b)return null;try{const y=typeof b=="string"?JSON.parse(b):b;return{queryReplyPairList:[{reply:{databaseReference:Array.isArray(y)?y[0]:y}}]}}catch(y){return console.error("Failed to parse databaseReference:",y),null}})(((f=e.extraProps)==null?void 0:f.databaseReference)||e.databaseReference);return ae.jsx(Tw,{...o,element:r,children:n,styles:t,eventsEmit:e.eventsEmit,dataSource:m||void 0,tagIndex:1,onDataUpdate:b=>{var y;(y=e.eventsEmit)==null||y.call(e,"rtext_table_data_updated",{id:r.id,data:b})}});default:return ae.jsx("div",{...o,className:"mb-4",style:{letterSpacing:t==null?void 0:t.letterSpacing,lineHeight:t==null?void 0:t.lineHeight,color:`${(p=t==null?void 0:t.text)==null?void 0:p.color} !important`},children:n})}},$9=e=>{var i,l,s,u,c,f;const{attributes:t,children:r,leaf:n,styles:o}=e;(i=o==null?void 0:o.text)!=null&&i.color&&console.log("renderLeaf - \u63A5\u6536\u5230\u7684\u6587\u672C\u989C\u8272:",o.text.color);let a=r;if(n.retrive){const p=n.fromtype==="0",h=n.fromtype==="1",v=n.text||"";let g=v,m="#e6f7ff",b="#1890ff",y="#bae7ff";return p?(g=`${v}`,m="#e6f7ff",b="#1890ff",y="#bae7ff"):h&&(g=`${v}`,m="#f6ffed",b="#52c41a",y="#d9f7be"),a=ae.jsx("span",{...t,style:{display:"inline-block",background:m,color:b,height:24,width:24,borderRadius:3,padding:"1px 9px",margin:"0 2px",fontWeight:600,fontSize:10,lineHeight:"22px",cursor:"pointer",verticalAlign:"middle"},onClick:()=>{e.onRetriveTagClick&&e.onRetriveTagClick(n,t)},onMouseEnter:C=>C.currentTarget.style.background=y,onMouseLeave:C=>C.currentTarget.style.background=m,children:g}),a}if(n.code)a=ae.jsx("code",{...t,style:{color:`${(l=o==null?void 0:o.text)==null?void 0:l.color} !important`},children:a});else{const p=[n.bold&&"bold",n.italic&&"italic",n.underline&&"underline",n.strikethrough&&"strikethrough"].filter(Boolean).join(" "),h={color:`${(s=o==null?void 0:o.text)==null?void 0:s.color} !important`,fontSize:(u=o==null?void 0:o.text)==null?void 0:u.fontSize,lineHeight:(c=o==null?void 0:o.text)==null?void 0:c.lineHeight,letterSpacing:o==null?void 0:o.letterSpacing};a=ae.jsx("span",{...t,className:p,style:h,children:a})}return n.link&&(a=ae.jsx("a",{href:n.link,target:"_blank",rel:"noopener noreferrer",className:"link",style:{color:`${(f=o==null?void 0:o.text)==null?void 0:f.color} !important`},children:a})),a},nd=fr.div`
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
& > * + * {
|
|
452
|
+
margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/* 标题样式 */
|
|
456
|
+
& h1 {
|
|
457
|
+
font-size: ${e=>e.$size==="sm"?"20px":"32px"};
|
|
458
|
+
font-weight: 600;
|
|
459
|
+
margin: 24px 0 16px 0;
|
|
460
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
461
|
+
border-bottom: 1px solid #d0d7de;
|
|
462
|
+
padding-bottom: 8px;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
& h2 {
|
|
466
|
+
font-size: ${e=>e.$size==="sm"?"18px":"24px"};
|
|
467
|
+
font-weight: 600;
|
|
468
|
+
margin: 24px 0 16px 0;
|
|
469
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
470
|
+
border-bottom: 1px solid #d0d7de;
|
|
471
|
+
padding-bottom: 6px;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
& h3 {
|
|
475
|
+
font-size: ${e=>e.$size==="sm"?"16px":"20px"};
|
|
476
|
+
font-weight: 600;
|
|
477
|
+
margin: 24px 0 16px 0;
|
|
478
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
/* 段落样式 */
|
|
482
|
+
& p {
|
|
483
|
+
font-size: ${e=>e.$size==="sm"?"14px":"16px"};
|
|
484
|
+
margin: 16px 0;
|
|
485
|
+
line-height: 1.6;
|
|
486
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/* 列表样式 - GitHub 风格简约设计 */
|
|
490
|
+
& ul, & ol {
|
|
491
|
+
margin: 16px 0;
|
|
492
|
+
padding-left: 24px;
|
|
493
|
+
line-height: 1.6;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
& ul {
|
|
497
|
+
list-style-type: disc;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
& ol {
|
|
501
|
+
list-style-type: decimal;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
& li {
|
|
505
|
+
margin: 4px 0;
|
|
506
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#24292f"}};
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
/* 嵌套列表 */
|
|
510
|
+
& ul ul, & ol ol, & ul ol, & ol ul {
|
|
511
|
+
margin: 8px 0;
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/* 引用块样式 */
|
|
515
|
+
& blockquote {
|
|
516
|
+
font-size: ${e=>e.$size==="sm"?"14px":"16px"};
|
|
517
|
+
border-left: 4px solid #d0d7de;
|
|
518
|
+
padding: 0 16px;
|
|
519
|
+
margin: 16px 0;
|
|
520
|
+
color: #656d76;
|
|
521
|
+
background-color: #f6f8fa;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
/* 行内代码样式 */
|
|
525
|
+
& code {
|
|
526
|
+
font-size: 0.875em;
|
|
527
|
+
background-color: #f6f8fa;
|
|
528
|
+
padding: 0.125em 0.25em;
|
|
529
|
+
border-radius: 6px;
|
|
530
|
+
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
|
|
531
|
+
color: #d73a49;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
/* 代码块样式 */
|
|
535
|
+
& pre {
|
|
536
|
+
background-color: #f6f8fa;
|
|
537
|
+
padding: 16px;
|
|
538
|
+
border-radius: 6px;
|
|
539
|
+
overflow-x: auto;
|
|
540
|
+
margin: 16px 0;
|
|
541
|
+
border: 1px solid #d0d7de;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
& pre code {
|
|
545
|
+
background-color: transparent;
|
|
546
|
+
padding: 0;
|
|
547
|
+
color: #24292f;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/* 表格样式 */
|
|
551
|
+
& table {
|
|
552
|
+
width: 100%;
|
|
553
|
+
border-collapse: collapse;
|
|
554
|
+
border: 1px solid #d0d7de;
|
|
555
|
+
margin: 16px 0;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
& th, & td {
|
|
559
|
+
border: 1px solid #d0d7de;
|
|
560
|
+
padding: 8px 12px;
|
|
561
|
+
text-align: left;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
& th {
|
|
565
|
+
background-color: #f6f8fa;
|
|
566
|
+
font-weight: 600;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
& tr:nth-child(even) {
|
|
570
|
+
background-color: #f6f8fa;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
/* 图片样式 */
|
|
574
|
+
& img {
|
|
575
|
+
max-width: 100%;
|
|
576
|
+
height: auto;
|
|
577
|
+
border-radius: 6px;
|
|
578
|
+
margin: 16px 0;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
/* 链接样式 */
|
|
582
|
+
& a {
|
|
583
|
+
color: #0969da;
|
|
584
|
+
text-decoration: none;
|
|
585
|
+
|
|
586
|
+
&:hover {
|
|
587
|
+
text-decoration: underline;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
/* 文本样式 */
|
|
592
|
+
& strong {
|
|
593
|
+
font-weight: 600;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
& em {
|
|
597
|
+
font-style: italic;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
& u {
|
|
601
|
+
text-decoration: underline;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
& s {
|
|
605
|
+
text-decoration: line-through;
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
/* 分割线样式 */
|
|
609
|
+
& hr {
|
|
610
|
+
border: none;
|
|
611
|
+
border-top: 1px solid #d0d7de;
|
|
612
|
+
margin: 24px 0;
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
/* 思考容器样式 */
|
|
616
|
+
& .think-container {
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
& .think-header {
|
|
622
|
+
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
& .think-icon {
|
|
626
|
+
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
& .think-title {
|
|
630
|
+
font-weight: 600;
|
|
631
|
+
color: #24292f;
|
|
632
|
+
font-size: 14px;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
& .think-text {
|
|
636
|
+
color: #86909C;
|
|
637
|
+
font-size: 14px;
|
|
638
|
+
line-height: 1.6;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
/* 召回标签样式 */
|
|
642
|
+
& .retrive-tag {
|
|
643
|
+
display: inline-block;
|
|
644
|
+
background: #e6f7ff;
|
|
645
|
+
color: #1890ff;
|
|
646
|
+
border: 1px solid rgba(114, 187, 255, 0.3);
|
|
647
|
+
border-radius: 6px;
|
|
648
|
+
padding: 2px 6px;
|
|
649
|
+
margin: 0 2px;
|
|
650
|
+
font-weight: 500;
|
|
651
|
+
font-size: 12px;
|
|
652
|
+
line-height: 1.4;
|
|
653
|
+
cursor: pointer;
|
|
654
|
+
vertical-align: middle;
|
|
655
|
+
transition: background-color 0.2s ease;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
& .retrive-tag:hover {
|
|
659
|
+
background: #bae7ff;
|
|
660
|
+
}
|
|
661
|
+
`;function Mw(e){return e.map(t=>!t.children||t.children.length===0?{...t,children:[{text:""}]}:{...t,children:t.children.map(r=>typeof r=="object"&&"type"in r?Mw([r])[0]:r)})}function zw(e,t){const r=[];function n(u){var c;if(u.indexOf("<think>")>-1)if(u.indexOf("</think>")>-1){const f=/<think>([\s\S]*?)<\/think>([\s\S]*)/s,p=u.match(f);return p?{thinkContent:p[1],content:p[2],finish:!0}:{thinkContent:"",content:u,finish:!0}}else{const f=/<think>(.*?)(?=<|\s*$)/s;return{thinkContent:((c=u.match(f))==null?void 0:c[1])||"",content:""}}else return{thinkContent:"",content:u}}const{thinkContent:o,content:a,finish:i}=n(e||"");let l=[],s=0;if(!r.includes("think")&&o){const u=o.split(/\n+/).map(c=>c.trim()).filter(Boolean).flatMap(c=>{if(/<retrive-tag/i.test(c)){const f=document.createElement("div");return f.innerHTML=c,Sb(f)}else return[{type:"paragraph",children:[{text:c}]}]});l.push({type:"think",id:`think-${s++}`,thinkContent:o,finish:i,children:u})}if(a){let u=a;r.includes("retrive")||(u=u.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(f,p,h)=>`<retrive-tag${p?" "+p.trim():""}>${h}</retrive-tag>`)),r.includes("retrieve-sql-data")||(u=u.replace(/<retrieve-sql-data\s+id="([^"]+)"\s*\/?>/g,(f,p)=>`<retrieve-sql-data id="${p}"></retrieve-sql-data>`)),Kt.setOptions({gfm:!0,breaks:!0,pedantic:!1});const c=Kt(u);if(typeof c=="string"){const f=document.createElement("div");f.innerHTML=c;const p=Sb(f);p&&p.length>0&&(l=l.concat(p))}}return!l||l.length===0?[{type:"paragraph",children:[{text:""}]}]:Mw(l)}function Sb(e){const t=[];return((r,n)=>(n.forEach(o=>{var a;if(o.nodeType===Node.ELEMENT_NODE){const i=o;switch(i.tagName.toLowerCase()){case"p":r.push({type:"paragraph",children:Pr(i)});break;case"h1":r.push({type:"heading-one",children:Pr(i)});break;case"h2":r.push({type:"heading-two",children:Pr(i)});break;case"h3":r.push({type:"heading-three",children:Pr(i)});break;case"ul":r.push({type:"bulleted-list",children:Array.from(i.children).map(s=>({type:"list-item",children:Pr(s)}))});break;case"ol":const l={type:"numbered-list",children:Array.from(i.children).map(s=>({type:"list-item",children:Pr(s)}))};r.push(l);break;case"li":r.push({type:"list-item",children:Pr(i)});break;case"pre":{const s=i.querySelector("code");s?r.push({type:"code-block",children:Pr(s)}):r.push({type:"code-block",children:Pr(i)});break}case"code":{i.closest("pre")||r.push({type:"paragraph",children:Pr(i)});break}case"retrive-tag":{const s=Pr(i);s.length>0&&r.push({type:"paragraph",children:s});break}case"retrieve-sql-data":{const s=i.getAttribute("id")||"";r.push({type:"retrieve-sql-data",id:s,children:[{text:""}]});break}case"blockquote":r.push({type:"block-quote",children:Pr(i)});break;case"table":r.push(B9(i));break;case"think-block":r.push({type:"think",children:Pr(i)});break;default:r.push({type:"paragraph",children:Pr(i)});break}}else o.nodeType===Node.TEXT_NODE&&((a=o.textContent)!=null&&a.trim())&&r.push({type:"paragraph",children:[{text:o.textContent}]})}),r))(t,e.childNodes),t}function Pr(e){const t=[];function r(o){const a=[];let i="",l=!1,s=!1,u=0;for(;u<o.length;)o.startsWith("**",u)?(i&&(a.push({text:i,code:!0,bold:l,italic:s}),i=""),l=!l,u+=2):o.startsWith("*",u)?(i&&(a.push({text:i,code:!0,bold:l,italic:s}),i=""),s=!s,u+=1):(i+=o[u],u+=1);return i&&a.push({text:i,code:!0,bold:l,italic:s}),a}function n(o,a={}){var i,l;if(o.nodeType===Node.TEXT_NODE){const s=(i=o.textContent)==null?void 0:i.trim();return s?a.code?r(s):[{text:s,...a}]:[]}if(o.nodeType===Node.ELEMENT_NODE){const s=o,u={...a};switch(s.tagName.toLowerCase()){case"em":case"i":u.italic=!0;break;case"strong":case"b":u.bold=!0;break;case"code":s.closest("pre")||(u.code=!0);break;case"del":case"s":u.strikethrough=!0;break;case"u":u.underline=!0;break;case"a":u.link=s.getAttribute("href")||void 0;break;case"retrive-tag":{const f={};for(const{name:p,value:h}of Array.from(s.attributes))f[p]=h;return[{text:s.textContent||""||"[0]",retrive:!0,...f}]}case"retrieve-sql-data":return[{type:"retrieve-sql-data",id:s.getAttribute("id")||"",children:[{text:""}]}]}if(s.childNodes.length===0&&((l=s.textContent)!=null&&l.trim()))return u.code?r(s.textContent):[{text:s.textContent,...u}];let c=[];for(const f of Array.from(s.childNodes))c=c.concat(n(f,u));return c}return[]}for(const o of Array.from(e.childNodes))t.push(...n(o));return t}function B9(e){const t=[],r=e.querySelector("thead"),n=e.querySelector("tbody");if(!r&&!n){const o=Array.from(e.querySelectorAll("tr"));o.length>0&&(t.push({type:"table-row",children:Array.from(o[0].children).map(a=>({type:"table-cell",header:!0,children:Pr(a)}))}),o.slice(1).forEach(a=>{t.push({type:"table-row",children:Array.from(a.children).map(i=>({type:"table-cell",header:!1,children:Pr(i)}))})}))}else{if(r){const o=r.querySelector("tr");o&&t.push({type:"table-row",children:Array.from(o.querySelectorAll("th")).map(a=>({type:"table-cell",header:!0,children:Pr(a)}))})}n&&Array.from(n.querySelectorAll("tr")).forEach(o=>{t.push({type:"table-row",children:Array.from(o.querySelectorAll("td")).map(a=>({type:"table-cell",header:!1,children:Pr(a)}))})})}return{type:"table",children:t}}const O9=fr.div`
|
|
662
|
+
border: ${e=>e.$isEditing?"1px solid #dee2e6":"none"};
|
|
663
|
+
border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"4px"}};
|
|
664
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"transparent"}};
|
|
665
|
+
min-height: ${e=>{var t;return((t=e.theme)==null?void 0:t.minHeight)||"200px"}};
|
|
666
|
+
overflow: hidden;
|
|
667
|
+
transition: all 0.2s ease-in-out;
|
|
668
|
+
|
|
669
|
+
${e=>{var t,r;return e.$isEditing&&`
|
|
670
|
+
&:focus-within {
|
|
671
|
+
border-color: ${((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"};
|
|
672
|
+
box-shadow: 0 0 0 2px ${((r=e.theme)==null?void 0:r.primaryColor)||"#007bff"}20;
|
|
673
|
+
}
|
|
674
|
+
`}}
|
|
675
|
+
`,od=fr.div`
|
|
676
|
+
padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"0rem 1rem"}};
|
|
677
|
+
min-height: inherit;
|
|
678
|
+
outline: none;
|
|
679
|
+
|
|
680
|
+
& > * + * {
|
|
681
|
+
margin-top: ${e=>{var t;return((t=e.theme)==null?void 0:t.margin)||"0.5rem"}};
|
|
682
|
+
}
|
|
683
|
+
`;var Js=(e=>(e.SLATE="slate",e.MARKDOWN="markdown",e.HTML="html",e.TEXT="text",e))(Js||{});const Fm=({dataSource:e,isEditing:t=!1,placeholder:r="\u5F00\u59CB\u8F93\u5165...",size:n="sm",theme:o={},onChange:a,onFocus:i,onBlur:l,renderElement:s,renderLeaf:u,onRetriveTagClick:c,eventsEmit:f,extraProps:p={},className:h,style:v,styles:g,enableTemplateInput:m=!1,disabledTags:b=[]})=>{const y=Qs(),C=Et(()=>{var N,T,L,X,_,q,Q,te,z;return{primaryColor:((N=y==null?void 0:y.colors)==null?void 0:N.primary)||(o==null?void 0:o.primaryColor)||"#007bff",secondaryColor:((T=y==null?void 0:y.colors)==null?void 0:T.secondary)||(o==null?void 0:o.secondaryColor)||"#6c757d",backgroundColor:((L=y==null?void 0:y.colors)==null?void 0:L.background)||(o==null?void 0:o.backgroundColor)||"transparent",textColor:((X=y==null?void 0:y.colors)==null?void 0:X.text)||(o==null?void 0:o.textColor)||"#24292f",borderColor:((_=y==null?void 0:y.colors)==null?void 0:_.border)||(o==null?void 0:o.borderColor)||"#dee2e6",disabledBackground:((q=y==null?void 0:y.colors)==null?void 0:q.disabledBackground)||(o==null?void 0:o.disabledBackground)||"#f8f9fa",borderRadius:((Q=y==null?void 0:y.space)==null?void 0:Q.radius)||(o==null?void 0:o.borderRadius)||"4px",padding:((te=y==null?void 0:y.space)==null?void 0:te.padding)||(o==null?void 0:o.padding)||"0rem 1rem",margin:((z=y==null?void 0:y.space)==null?void 0:z.margin)||(o==null?void 0:o.margin)||"0.5rem",minHeight:(o==null?void 0:o.minHeight)||"200px",baseFontSize:(o==null?void 0:o.baseFontSize)||(n==="md"?14:12),...o}},[y,o,n]),D=Ve();if(!D.current){const N=OD(),T=W2(N),{isInline:L}=T;T.isInline=q=>!b.includes("template")&&q.type==="template"?!0:L(q);const{isVoid:X}=T;T.isVoid=q=>!b.includes("template")&&q.type==="template"?!0:X(q);const _=q=>{if(!(m&&!b.includes("template")))return q;const{insertText:Q,insertData:te}=q,z=()=>{const Y=/<template>([^<]*)<\/template>/g,V=Array.from(I.nodes(q,{match:G=>st.isText(G)&&Y.test(G.text)}));if(V.length!==0)for(const G of V){const[K,W]=G,re=K.text||"",U=[];let J=0,ne;for(Y.lastIndex=0;(ne=Y.exec(re))!==null;){if(ne.index>J){const ue=re.slice(J,ne.index);ue&&U.push({text:ue})}U.push({type:"template",placeholder:(ne[1]||"").trim(),value:"",style:"blue",fieldId:`template-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,children:[{text:""}],inline:!0}),J=ne.index+ne[0].length}if(J<re.length){const ue=re.slice(J);ue&&U.push({text:ue})}Ie.removeNodes(q,{at:W}),Ie.insertNodes(q,U,{at:W})}};return q.insertText=Y=>{Q(Y),z()},q.insertData=Y=>{const V=Y.getData("text/plain");if(V&&/<template>[\s\S]*?<\/template>/.test(V)){Q(V),z();return}return te(Y)},q};D.current=_(T)}const w=D.current,[k,E]=wt(()=>e.type==="slate"?e.content||[{type:"paragraph",children:[{text:""}]}]:[{type:"paragraph",children:[{text:""}]}]),[x,F]=wt(0);Ot(()=>{if(e.type==="slate"){console.log("UnifiedRichText: dataSource.content \u53D8\u5316:",e.content);const N=e.content||[{type:"paragraph",children:[{text:""}]}];console.log("UnifiedRichText: \u8BBE\u7F6E\u65B0\u7684 value:",N),E(N),F(T=>T+1)}},[e.type,e.content]),Ot(()=>{e.type==="markdown"&&F(N=>N+1)},[e.type,e.content]),Ot(()=>{e.type==="markdown"&&F(N=>N+1)},[p]);const j=gt(N=>{console.log("UnifiedRichText: \u5185\u5BB9\u53D8\u5316:",N),N&&Array.isArray(N)?(E(N),a==null||a(N,"slate")):console.log("UnifiedRichText: \u5FFD\u7565\u65E0\u6548\u7684\u5185\u5BB9\u53D8\u5316:",N)},[a]),$=Et(()=>{const N=C==null?void 0:C.baseFontSize;return typeof N=="number"&&!Number.isNaN(N)?N:n==="md"?14:12},[C,n]),P=gt(N=>{const T={...N,size:n,styles:g,eventsEmit:f,extraProps:p};return s?s(T):S9(T)},[s,n,g,f,p]),A=gt(N=>{const T={...N,styles:g,onRetriveTagClick:c};return u?u(T):$9(T)},[u,g,c]);Ot(()=>(window.copyCodeFromData=N=>{const T=N.getAttribute("data-code");if(!T){console.error("No code content found");return}const L=T.replace(/\\n/g,`
|
|
684
|
+
`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\'/g,"'").replace(/\\\\/g,"\\").replace(/"/g,'"');navigator.clipboard.writeText(L).then(()=>{const X=N.innerHTML;N.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#2da44e" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20,6 9,17 4,12"></polyline></svg>',N.classList.add("copied"),setTimeout(()=>{N.innerHTML=X,N.classList.remove("copied")},2e3)}).catch(X=>{console.error("\u590D\u5236\u5931\u8D25:",X);const _=N.innerHTML;N.innerHTML='<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',N.style.background="#d73a49",N.style.borderColor="#d73a49",N.style.color="white",setTimeout(()=>{N.innerHTML=_,N.style.background="",N.style.borderColor="",N.style.color=""},2e3)})},()=>{delete window.copyCodeFromData}),[]);const O=Et(()=>{if(e.type!=="markdown")return null;try{const N=zw(e.content||"");if(N&&N.length>0)return ae.jsx(nd,{theme:C,$size:n,children:ae.jsx(vc,{editor:w,initialValue:N,onChange:()=>{},children:ae.jsx(od,{theme:C,children:ae.jsx(gc,{renderElement:P,renderLeaf:A,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${$}px`}})})},x)});const T={breaks:!0,gfm:!0,headerIds:!0,mangle:!1,sanitize:!1,pedantic:!1,smartLists:!0,smartypants:!0};let L=Kt(e.content||"",T);return L=L.replace(/<table([^>]*)>/g,'<div class="table-container"><table$1>'),L=L.replace(/<\/table>/g,"</table></div>"),L=L.replace(/<pre><code([^>]*)>([\s\S]*?)<\/code><\/pre>/g,(X,_,q)=>{const Q=q.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/"/g,""");return`<pre><code${_}>${q}</code><button class="code-copy-btn" data-code="${Q}" onclick="copyCodeFromData(this)" title="\u590D\u5236\u4EE3\u7801"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg></button></pre>`}),ae.jsx("div",{style:{padding:(C==null?void 0:C.padding)||"1rem",fontSize:`${$}px`,lineHeight:1.6,color:(C==null?void 0:C.textColor)||"#24292f"},dangerouslySetInnerHTML:{__html:L}})}catch(N){return console.error("Markdown parsing error:",N),ae.jsx("div",{children:e.content})}},[e,C,w,x,P,A,$]),S=Et(()=>e.type!=="html"?null:ae.jsx("div",{style:{padding:(C==null?void 0:C.padding)||"1rem",fontSize:`${$}px`,lineHeight:1.6,color:(C==null?void 0:C.textColor)||"#24292f"},dangerouslySetInnerHTML:{__html:e.content||""}}),[e,C,$]),B=Et(()=>e.type!=="text"?null:ae.jsx("div",{style:{padding:(C==null?void 0:C.padding)||"1rem",fontSize:`${$}px`,lineHeight:1.6,color:(C==null?void 0:C.textColor)||"#24292f"},children:ae.jsx("span",{children:e.content||""})}),[e,C,$]),R=()=>{switch(e.type){case"markdown":return O;case"html":return S;case"text":return B;case"slate":default:return t?ae.jsx(nd,{theme:C,$size:n,children:ae.jsx(vc,{editor:w,initialValue:k,onChange:j,children:ae.jsx(od,{theme:C,children:ae.jsx(gc,{renderElement:P,renderLeaf:A,placeholder:r,readOnly:!1,onFocus:i,onBlur:l,style:{minHeight:"inherit",outline:"none",fontSize:`${$}px`}})})},x)}):ae.jsx(nd,{theme:C,$size:n,children:ae.jsx(vc,{editor:w,initialValue:k,onChange:()=>{},children:ae.jsx(od,{theme:C,children:ae.jsx(gc,{renderElement:P,renderLeaf:A,readOnly:!0,style:{minHeight:"inherit",outline:"none",border:"none",background:"transparent",fontSize:`${$}px`}})})},x)})}};return ae.jsx(O9,{theme:C,$isEditing:t,className:h,style:v,children:R()})};/**
|
|
685
|
+
* @license lucide-react v0.456.0 - ISC
|
|
686
|
+
*
|
|
687
|
+
* This source code is licensed under the ISC license.
|
|
688
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
689
|
+
*/const A9=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Lw=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
|
|
690
|
+
* @license lucide-react v0.456.0 - ISC
|
|
691
|
+
*
|
|
692
|
+
* This source code is licensed under the ISC license.
|
|
693
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
694
|
+
*/var F9={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"};/**
|
|
695
|
+
* @license lucide-react v0.456.0 - ISC
|
|
696
|
+
*
|
|
697
|
+
* This source code is licensed under the ISC license.
|
|
698
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
699
|
+
*/const N9=dn(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:i,...l},s)=>xs("svg",{ref:s,...F9,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:Lw("lucide",o),...l},[...i.map(([u,c])=>xs(u,c)),...Array.isArray(a)?a:[a]]));/**
|
|
700
|
+
* @license lucide-react v0.456.0 - ISC
|
|
701
|
+
*
|
|
702
|
+
* This source code is licensed under the ISC license.
|
|
703
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
704
|
+
*/const Wn=(e,t)=>{const r=dn(({className:n,...o},a)=>xs(N9,{ref:a,iconNode:t,className:Lw(`lucide-${A9(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
|
|
705
|
+
* @license lucide-react v0.456.0 - ISC
|
|
706
|
+
*
|
|
707
|
+
* This source code is licensed under the ISC license.
|
|
708
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
709
|
+
*/const ad=Wn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
710
|
+
* @license lucide-react v0.456.0 - ISC
|
|
711
|
+
*
|
|
712
|
+
* This source code is licensed under the ISC license.
|
|
713
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
714
|
+
*/const id=Wn("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
715
|
+
* @license lucide-react v0.456.0 - ISC
|
|
716
|
+
*
|
|
717
|
+
* This source code is licensed under the ISC license.
|
|
718
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
719
|
+
*/const $b=Wn("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
720
|
+
* @license lucide-react v0.456.0 - ISC
|
|
721
|
+
*
|
|
722
|
+
* This source code is licensed under the ISC license.
|
|
723
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
724
|
+
*/const P9=Wn("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
725
|
+
* @license lucide-react v0.456.0 - ISC
|
|
726
|
+
*
|
|
727
|
+
* This source code is licensed under the ISC license.
|
|
728
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
729
|
+
*/const j9=Wn("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
730
|
+
* @license lucide-react v0.456.0 - ISC
|
|
731
|
+
*
|
|
732
|
+
* This source code is licensed under the ISC license.
|
|
733
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
734
|
+
*/const R9=Wn("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
|
|
735
|
+
* @license lucide-react v0.456.0 - ISC
|
|
736
|
+
*
|
|
737
|
+
* This source code is licensed under the ISC license.
|
|
738
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
739
|
+
*/const I9=Wn("RotateCcw",[["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"}]]);/**
|
|
740
|
+
* @license lucide-react v0.456.0 - ISC
|
|
741
|
+
*
|
|
742
|
+
* This source code is licensed under the ISC license.
|
|
743
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
744
|
+
*/const T9=Wn("Share",[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]]);/**
|
|
745
|
+
* @license lucide-react v0.456.0 - ISC
|
|
746
|
+
*
|
|
747
|
+
* This source code is licensed under the ISC license.
|
|
748
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
749
|
+
*/const M9=Wn("ThumbsDown",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/**
|
|
750
|
+
* @license lucide-react v0.456.0 - ISC
|
|
751
|
+
*
|
|
752
|
+
* This source code is licensed under the ISC license.
|
|
753
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
754
|
+
*/const z9=Wn("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
|
|
755
|
+
* @license lucide-react v0.456.0 - ISC
|
|
756
|
+
*
|
|
757
|
+
* This source code is licensed under the ISC license.
|
|
758
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
759
|
+
*/const L9=Wn("Trash2",[["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"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);function Bb(e){const t=(e||"").toLowerCase();return["png","jpg","jpeg","gif","bmp","webp","svg"].includes(t)?"rag/pic":t==="pdf"?"rag/pdf":["doc","docx"].includes(t)?"rag/word":["xls","xlsx"].includes(t)?"rag/excel":["ppt","pptx"].includes(t)?"rag/ppt":t==="txt"||t==="md"?"rag/txt":t==="csv"?"rag/csv":t==="json"?"rag/json":["zip","rar","7z"].includes(t)?"rag/zip":["odt","ods","odp","odf"].includes(t)?"rag/odf":t==="wps"?"rag/wps":["html","htm","url"].includes(t)?"rag/url":"rag/file"}function Cs(e){let t=[];for(const r of e)r.retrive===!0&&t.push(r),Array.isArray(r.children)&&(t=t.concat(Cs(r.children)));return t}function _9(e){const t=/<retrive-tag[^>]*image_urls=['"]([^'"]+)['"][^>]*>/g,r=[];let n;for(;n=t.exec(e);){const o=n[1].split(";").map(a=>a.trim()).filter(Boolean);r.push(...o)}return Array.from(new Set(r))}const H9=fr.div`
|
|
760
|
+
display: flex;
|
|
761
|
+
flex-direction: column;
|
|
762
|
+
margin-bottom: 0.5rem;
|
|
763
|
+
animation: fadeIn 0.3s ease-in-out;
|
|
764
|
+
width: 100%;
|
|
765
|
+
text-wrap: wrap;
|
|
766
|
+
|
|
767
|
+
${e=>e.$align==="right"&&`
|
|
768
|
+
align-items: flex-end;
|
|
769
|
+
`}
|
|
770
|
+
|
|
771
|
+
${e=>e.$align==="center"&&`
|
|
772
|
+
align-items: center;
|
|
773
|
+
`}
|
|
774
|
+
|
|
775
|
+
@keyframes fadeIn {
|
|
776
|
+
from { opacity: 0; transform: translateY(10px); }
|
|
777
|
+
to { opacity: 1; transform: translateY(0); }
|
|
778
|
+
}
|
|
779
|
+
`,W9=fr.div`
|
|
780
|
+
display: flex;
|
|
781
|
+
align-items: center;
|
|
782
|
+
gap: 0.5rem;
|
|
783
|
+
margin-bottom: 0.5rem;
|
|
784
|
+
width: 100%;
|
|
785
|
+
|
|
786
|
+
${e=>e.$isUser&&`
|
|
787
|
+
flex-direction: row-reverse;
|
|
788
|
+
justify-content: end;
|
|
789
|
+
`}
|
|
790
|
+
`,K9=fr.div`
|
|
791
|
+
background: ${e=>e.$src?`url('${e.$src}') center/cover no-repeat`:"var(--avatar-bg, #e5e7eb)"};
|
|
792
|
+
border-radius: 50%;
|
|
793
|
+
width: 2rem;
|
|
794
|
+
height: 2rem;
|
|
795
|
+
|
|
796
|
+
flex-shrink: 0;
|
|
797
|
+
display: flex;
|
|
798
|
+
align-items: center;
|
|
799
|
+
justify-content: center;
|
|
800
|
+
font-size: 1rem;
|
|
801
|
+
`,q9=fr.div`
|
|
802
|
+
width: 100%;
|
|
803
|
+
margin-top: 0.5rem;
|
|
804
|
+
.message-time {
|
|
805
|
+
font-size: 0.75rem;
|
|
806
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
.message-card {
|
|
810
|
+
background: ${e=>e.$isUser?"#E3ECFF":"#ffffff"};
|
|
811
|
+
border: 1px solid ${e=>(e.$isUser,"transparent")};
|
|
812
|
+
border-radius: 0.5rem;
|
|
813
|
+
|
|
814
|
+
overflow: hidden;
|
|
815
|
+
max-width: ${e=>e.$isUser?"fit-content":"100%"};
|
|
816
|
+
margin-left: ${e=>e.$isUser?"auto":"0"};
|
|
817
|
+
|
|
818
|
+
.message-text {
|
|
819
|
+
width: 100%;
|
|
820
|
+
line-height: 1.6;
|
|
821
|
+
padding: 0.75rem 1rem;
|
|
822
|
+
border-radius: 0.5rem;
|
|
823
|
+
min-height: ${e=>e.$isUser?"auto":"40px"};
|
|
824
|
+
font-size: 0.875rem;
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
`,V9=fr.div`
|
|
828
|
+
margin-top: 0.5rem;
|
|
829
|
+
display: flex;
|
|
830
|
+
padding: 0.5rem;
|
|
831
|
+
align-items: center;
|
|
832
|
+
|
|
833
|
+
gap: 0.75rem;
|
|
834
|
+
|
|
835
|
+
button {
|
|
836
|
+
display: flex;
|
|
837
|
+
align-items: center;
|
|
838
|
+
gap: 0.25rem;
|
|
839
|
+
font-size: 0.875rem;
|
|
840
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.disabled)||"#6b7280"}};
|
|
841
|
+
background: none;
|
|
842
|
+
border: none;
|
|
843
|
+
cursor: pointer;
|
|
844
|
+
transition: color 0.2s;
|
|
845
|
+
|
|
846
|
+
&:hover {
|
|
847
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
&.active {
|
|
851
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}} !important;
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
`,U9=fr.div`
|
|
855
|
+
margin-top: 1rem;
|
|
856
|
+
padding: 1rem;
|
|
857
|
+
|
|
858
|
+
border-radius: 0.5rem;
|
|
859
|
+
|
|
860
|
+
@keyframes followUpIn {
|
|
861
|
+
from {
|
|
862
|
+
opacity: 0;
|
|
863
|
+
transform: translateY(6px);
|
|
864
|
+
}
|
|
865
|
+
to {
|
|
866
|
+
opacity: 1;
|
|
867
|
+
transform: translateY(0);
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
.follow-up-title {
|
|
872
|
+
font-size: 0.875rem;
|
|
873
|
+
font-weight: 600;
|
|
874
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
875
|
+
margin-bottom: 0.75rem;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
.follow-up-list {
|
|
879
|
+
display: flex;
|
|
880
|
+
flex-direction: column;
|
|
881
|
+
gap: 0.5rem;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
.follow-up-item {
|
|
885
|
+
width: fit-content;
|
|
886
|
+
background: #ffffff;
|
|
887
|
+
border: 1px solid #e5e7eb;
|
|
888
|
+
border-radius: 0.375rem;
|
|
889
|
+
padding: 0.75rem 1rem;
|
|
890
|
+
cursor: pointer;
|
|
891
|
+
transition: all 0.2s ease;
|
|
892
|
+
text-align: left;
|
|
893
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
894
|
+
font-size: 0.875rem;
|
|
895
|
+
line-height: 1.4;
|
|
896
|
+
opacity: 0;
|
|
897
|
+
transform: translateY(6px);
|
|
898
|
+
animation: followUpIn 280ms ease forwards;
|
|
899
|
+
animation-play-state: running;
|
|
900
|
+
|
|
901
|
+
&:hover {
|
|
902
|
+
background: #e5e7eb;
|
|
903
|
+
border-color: #d1d5db;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
&:active {
|
|
907
|
+
transform: translateY(1px);
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
`,ld=fr.div`
|
|
911
|
+
|
|
912
|
+
padding: 1rem;
|
|
913
|
+
background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
|
|
914
|
+
|
|
915
|
+
border-radius: 0.5rem;
|
|
916
|
+
|
|
917
|
+
|
|
918
|
+
.reference-title {
|
|
919
|
+
font-size: 0.875rem;
|
|
920
|
+
font-weight: 600;
|
|
921
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
922
|
+
margin-bottom: 0.75rem;
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
.reference-list {
|
|
926
|
+
display: flex;
|
|
927
|
+
flex-direction: column;
|
|
928
|
+
gap: 0.5rem;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
.reference-item {
|
|
932
|
+
background: #ffffff;
|
|
933
|
+
|
|
934
|
+
border-radius: 0.375rem;
|
|
935
|
+
padding: 0.75rem 0;
|
|
936
|
+
display: flex;
|
|
937
|
+
align-items: center;
|
|
938
|
+
gap: 0.5rem;
|
|
939
|
+
|
|
940
|
+
.file-icon {
|
|
941
|
+
width: 2rem;
|
|
942
|
+
height: 2rem;
|
|
943
|
+
background: #e2e8f0;
|
|
944
|
+
border-radius: 0.25rem;
|
|
945
|
+
display: flex;
|
|
946
|
+
align-items: center;
|
|
947
|
+
justify-content: center;
|
|
948
|
+
font-size: 0.75rem;
|
|
949
|
+
color: #64748b;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
.file-info {
|
|
953
|
+
flex: 1;
|
|
954
|
+
|
|
955
|
+
.file-name {
|
|
956
|
+
font-size: 0.875rem;
|
|
957
|
+
font-weight: 500;
|
|
958
|
+
color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.text)||"#374151"}};
|
|
959
|
+
margin-bottom: 0.25rem;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
.file-meta {
|
|
963
|
+
font-size: 0.75rem;
|
|
964
|
+
color: #64748b;
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
.file-score {
|
|
969
|
+
font-size: 0.75rem;
|
|
970
|
+
color: #059669;
|
|
971
|
+
font-weight: 500;
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
`,X9=fr.div`
|
|
975
|
+
position: fixed;
|
|
976
|
+
top: 0;
|
|
977
|
+
left: 0;
|
|
978
|
+
right: 0;
|
|
979
|
+
bottom: 0;
|
|
980
|
+
background: rgba(0, 0, 0, 0.8);
|
|
981
|
+
display: ${e=>e.$show?"flex":"none"};
|
|
982
|
+
align-items: center;
|
|
983
|
+
justify-content: center;
|
|
984
|
+
z-index: 1000;
|
|
985
|
+
cursor: pointer;
|
|
986
|
+
|
|
987
|
+
.modal-content {
|
|
988
|
+
max-width: 90vw;
|
|
989
|
+
max-height: 90vh;
|
|
990
|
+
position: relative;
|
|
991
|
+
cursor: default;
|
|
992
|
+
display: flex;
|
|
993
|
+
flex-direction: column;
|
|
994
|
+
align-items: center;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
.modal-image {
|
|
998
|
+
max-width: 100%;
|
|
999
|
+
max-height: calc(90vh - 60px);
|
|
1000
|
+
object-fit: contain;
|
|
1001
|
+
border-radius: 8px;
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
.modal-close {
|
|
1005
|
+
margin-top: 16px;
|
|
1006
|
+
background: rgba(255, 255, 255, 0.3);
|
|
1007
|
+
border: none;
|
|
1008
|
+
border-radius: 20px;
|
|
1009
|
+
padding: 8px 20px;
|
|
1010
|
+
display: flex;
|
|
1011
|
+
align-items: center;
|
|
1012
|
+
justify-content: center;
|
|
1013
|
+
cursor: pointer;
|
|
1014
|
+
font-size: 14px;
|
|
1015
|
+
color: #333;
|
|
1016
|
+
font-weight: 500;
|
|
1017
|
+
transition: all 0.2s ease;
|
|
1018
|
+
|
|
1019
|
+
&:hover {
|
|
1020
|
+
background: rgba(255, 255, 255, 1);
|
|
1021
|
+
transform: translateY(-1px);
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
`,Ob=fr.div`
|
|
1025
|
+
|
|
1026
|
+
padding:0rem 1rem;
|
|
1027
|
+
background: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.background)||"#ffffff"}};
|
|
1028
|
+
|
|
1029
|
+
.gallery-grid {
|
|
1030
|
+
display: grid;
|
|
1031
|
+
grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
|
|
1032
|
+
gap: 0.75rem;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
.gallery-item {
|
|
1036
|
+
position: relative;
|
|
1037
|
+
aspect-ratio: 1;
|
|
1038
|
+
border-radius: 0.375rem;
|
|
1039
|
+
overflow: hidden;
|
|
1040
|
+
cursor: pointer;
|
|
1041
|
+
transition: transform 0.2s ease, box-shadow 0.2s ease;
|
|
1042
|
+
border: 2px solid transparent;
|
|
1043
|
+
|
|
1044
|
+
&:hover {
|
|
1045
|
+
transform: translateY(-2px);
|
|
1046
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
1047
|
+
border-color: ${e=>{var t,r;return((r=(t=e.$theme)==null?void 0:t.colors)==null?void 0:r.primary)||"#3b82f6"}};
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
.gallery-image {
|
|
1051
|
+
width: 100%;
|
|
1052
|
+
height: 100%;
|
|
1053
|
+
object-fit: cover;
|
|
1054
|
+
background: #f3f4f6;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
.gallery-overlay {
|
|
1058
|
+
position: absolute;
|
|
1059
|
+
bottom: 0;
|
|
1060
|
+
left: 0;
|
|
1061
|
+
right: 0;
|
|
1062
|
+
background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
|
|
1063
|
+
color: white;
|
|
1064
|
+
padding: 0.5rem;
|
|
1065
|
+
font-size: 0.75rem;
|
|
1066
|
+
text-align: center;
|
|
1067
|
+
opacity: 0;
|
|
1068
|
+
transition: opacity 0.2s ease;
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
&:hover .gallery-overlay {
|
|
1072
|
+
opacity: 1;
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
`,lz=({is_download:e,content:t,contentType:r="plainText",align:n="left",displayStatus:o="ready",avatar:a,isUser:i=!1,userAvatar:l,aiAvatar:s,date:u,time:c,timestamp:f,showTime:p=!0,errorMessage:h,styles:v,reference:g,webReference:m,databaseReference:b,filePaths:y,currentFiles:C,fileManagerData:D,audioUrl:w,feedbackResult:k,queryId:E,defaultAnswer:x,isWelcome:F=!1,isLast:j=!1,respTime:$,tokens:P,resultType:A,followUpQuestions:O=[],tools:S={},eventsEmit:B})=>{Ot(()=>{console.log("isUser",i),console.log("isLast",j)},[j,i]);const R=Qs(),N=Et(()=>{var fe,Oe,rt,Ke,ke,Be,ie,De,Z,le,ze;return{colors:{primary:((fe=R==null?void 0:R.colors)==null?void 0:fe.primary)||"#3b82f6",background:((Oe=R==null?void 0:R.colors)==null?void 0:Oe.background)||"#ffffff",userBackground:((rt=R==null?void 0:R.colors)==null?void 0:rt.primary)||"#3b82f6",border:((Ke=R==null?void 0:R.colors)==null?void 0:Ke.border)||"#e5e7eb",text:((ke=R==null?void 0:R.colors)==null?void 0:ke.text)||"#374151",disabled:((Be=R==null?void 0:R.colors)==null?void 0:Be.disabled)||"#6b7280",info:((ie=R==null?void 0:R.colors)==null?void 0:ie.info)||"#3b82f6",warning:((De=R==null?void 0:R.colors)==null?void 0:De.warning)||"#f59e0b",error:((Z=R==null?void 0:R.colors)==null?void 0:Z.error)||"#ef4444",...(le=v==null?void 0:v.theme)==null?void 0:le.colors},icons:{aiAvatar:s||"/vite.svg",userAvatar:l||"/default-user-avatar.png",...(ze=v==null?void 0:v.theme)==null?void 0:ze.icons}}},[R,v,s,l]),T=Et(()=>{const fe=c||u||f;return!fe||!p?null:AR(fe).format("YY-MM-DD HH:mm:ss")},[c,u,f,p]),[L,X]=wt([]),[_,q]=wt(null),[Q,te]=wt(!1),[z,Y]=wt(!1),[V,G]=wt(!1),[K,W]=wt(!1),re=()=>{const fe={processing:{text:"AI \u6B63\u5728\u601D\u8003...",icon:"\u{1F4AD}"},thinking:{text:"\u6DF1\u5EA6\u601D\u8003\u4E2D",icon:"\u{1F4AD}"},uploading:{text:"\u6587\u4EF6\u4E0A\u4F20\u4E2D...",icon:"\u{1F4E4}"},analyzing:{text:"\u77E5\u8BC6\u89E3\u6790\u4E2D...",icon:"\u{1F50D}"},error:{text:h||"\u62B1\u6B49\uFF0C\u672C\u6B21\u8BF7\u6C42\u51FA\u9519\u4E86\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5",icon:"\u274C"},initializing:{text:"\u6B63\u5728\u521D\u59CB\u5316...",icon:"\u2699\uFE0F"},ready:{text:"\u601D\u8003\u5B8C\u6210",icon:ae.jsx(Nl,{type:"rag/think",size:16})}}[o]||{text:"\u5904\u7406\u4E2D...",icon:"\u{1F4AD}"},Oe=$?`(\u7528\u65F6 ${Math.round($/1e3)} \u79D2)`:"";return ae.jsx("div",{className:"think-header",children:ae.jsx("div",{className:"think-header-left ml-[16px]",children:ae.jsxs("div",{className:"flex items-center gap-x-1 bg-[#F5F7FA] p-2 rounded w-fit",children:[ae.jsx("div",{className:"think-icon",children:fe.icon}),ae.jsx("div",{className:"think-title",children:fe.text}),Oe&&ae.jsx("div",{className:"think-time",children:Oe}),Me&&ae.jsx("button",{className:"think-collapse-btn ml-2 cursor-pointer",title:"\u6536\u8D77/\u5C55\u5F00",onClick:()=>{W(!K)},children:ae.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",style:{transform:K?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease"},children:ae.jsx("path",{d:"m18 15-6-6-6 6"})})})]})})})},[U,J]=wt([]),[ne,ue]=wt(null),me=Et(()=>{try{if(!g)return[];const fe=JSON.parse(g);return Array.isArray(fe)?fe:[]}catch{return[]}},[g]),Ce=(fe,Oe)=>{var ie,De,Z;const rt=((ie=fe==null?void 0:fe.metadata)==null?void 0:ie.source)||(fe==null?void 0:fe.file_path)||(fe==null?void 0:fe.path)||(fe==null?void 0:fe.convertedFilePath)||(fe==null?void 0:fe.parsedFilePath)||"",Ke=((De=fe==null?void 0:fe.metadata)==null?void 0:De.title)||(fe==null?void 0:fe.file_name)||"",ke=((Z=fe==null?void 0:fe.metadata)==null?void 0:Z.id)||(fe==null?void 0:fe.id)||(fe==null?void 0:fe.file_id)||"",Be=me.find(le=>{var We,Ge,ft;const ze=((We=le==null?void 0:le.metadata)==null?void 0:We.source)||(le==null?void 0:le.file_path)||(le==null?void 0:le.path)||(le==null?void 0:le.convertedFilePath)||(le==null?void 0:le.parsedFilePath)||"",xe=((Ge=le==null?void 0:le.metadata)==null?void 0:Ge.title)||(le==null?void 0:le.file_name)||"",_e=((ft=le==null?void 0:le.metadata)==null?void 0:ft.id)||(le==null?void 0:le.id)||"";return ke&&_e&&String(ke)===String(_e)||rt&&ze&&ze===rt||Ke&&xe&&xe===Ke});if(Be){const le=(Be!=null&&Be.references&&Array.isArray(Be.references)?Be.references:[Be]).find(ze=>String(ze.order_num)===String(Oe)||String(ze.id)===String(Oe));if(le)return le}for(const le of me){if(le!=null&&le.references&&Array.isArray(le.references)){const ze=le.references.find(xe=>String(xe.order_num)===String(Oe)||String(xe.id)===String(Oe));if(ze)return ze}if(String(le.order_num)===String(Oe)||String(le.id)===String(Oe))return le}return null},Ne=(fe,Oe)=>{function rt(Be,ie){for(const De of Be){if(De.references&&Array.isArray(De.references)){const Z=De.references.find(le=>String(le.order_num)===String(ie)||String(le.id)===String(ie));if(Z)return Z}if(String(De.order_num)===String(ie)||String(De.id)===String(ie))return De}return null}let Ke=[];try{g&&(Ke=JSON.parse(g))}catch(Be){console.error("Failed to parse reference:",Be)}const ke=rt(Ke,fe.id);B==null||B("action_retrive_tag",{tagInfo:ke,fromtype:fe.fromtype,leaf:fe,attributes:Oe})},pe=fe=>{if(console.log("ChatMessageAdapter received retrieve-sql-data:request-data:",fe),console.log("databaseReference available:",!!b),fe.id&&b){console.log("Sending retrieve-sql-data:data-response with databaseReference"),console.log("databaseReference data:",b);const Oe=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:fe.id,databaseReference:b}});console.log("Dispatching event:",Oe),window.dispatchEvent(Oe)}else console.log("Cannot send response - missing id or databaseReference")};ee.useEffect(()=>{const fe=Oe=>{pe(Oe.detail)};return window.addEventListener("retrieve-sql-data:request-data",fe),()=>{window.removeEventListener("retrieve-sql-data:request-data",fe)}},[b]),ee.useEffect(()=>{const fe=Oe=>{he(Oe.detail)};return window.addEventListener("rtext_pagination_click",fe),()=>{window.removeEventListener("rtext_pagination_click",fe)}},[ne]);const he=fe=>{if(console.log("ChatMessageAdapter received rtext_pagination_click:",fe),fe.replacePredataFunction&&ne){const Oe={...ne,rows:ne.rows};fe.replacePredataFunction(Oe)}B==null||B("rtext_pagination_click",fe)},ve=Ve(new Map),be=Ve(1),ye=Ve(""),Ae=Ve({0:1,1:1}),we=Et(()=>{if(r==="stream"&&typeof t=="string"){let fe=t;const Oe=[];return E&&E!==ye.current&&(ve.current.clear(),be.current=1,Ae.current={0:1,1:1},ye.current=E),fe=fe.replace(/\[retrive-tag([^\]]*)\]\[([^\]]+)\]\[\/retrive-tag\]/g,(rt,Ke)=>{const ke=Ke.match(/id=['"]([^'"]+)['"]/),Be=Ke.match(/fromType=['"]([^'"]+)['"]/);if(ke){const ie=ke[1],De=Be?Be[1]:"0";if(!ve.current.has(ie)){const le=Ae.current,ze=De==="1"?"1":"0",xe=le[ze]??1;ve.current.set(ie,xe),le[ze]=xe+1,Ae.current=le}const Z=ve.current.get(ie);return`[retrive-tag${Ke}][${Z}][/retrive-tag]`}return rt}),fe=fe.replace(/\[retrive-tag[^\]]*fromType=['"]0['"][^\]]*\]\[([^\]]+)\]\[\/retrive-tag\]/g,rt=>{const Ke=rt.match(/image_urls=['"]([^'"]+)['"]/);if(Ke){const ke=Ke[1].split(";").map(Be=>Be.trim()).filter(Boolean);Oe.push(...ke)}return rt}),X(Oe),fe}return t},[t,r,E]),He=Et(()=>{if(r==="stream"&&typeof we=="string")try{return zw(we)}catch(fe){return console.error("Failed to deserialize markdown:",fe),[]}return[]},[we,r]);Ot(()=>{try{if(r==="stream"&&b){const fe=new CustomEvent("retrieve-sql-data:data-response",{detail:{id:void 0,databaseReference:b}});window.dispatchEvent(fe)}}catch{}},[r,b]);const Me=Et(()=>{if(!Array.isArray(He))return!1;const fe=rt=>{for(const Ke of rt)if(Ke.type==="think"||Array.isArray(Ke.children)&&fe(Ke.children))return!0;return!1},Oe=fe(He);return console.log("Think detection:",{slateContent:He,hasThinkElement:Oe,displayStatus:o,isUser:i}),Oe},[He,o,i]),Fe=Et(()=>({databaseReference:b,...Me&&{isThinkCollapsed:K}}),[b,Me,K]),ge=Et(()=>a||(i?N.icons.userAvatar:N.icons.aiAvatar),[a,i,N.icons]),Se=Et(()=>typeof t=="string"?t:Array.isArray(t)?t.map(fe=>typeof fe=="string"?fe:fe.text||"").join(""):x||"",[t,x]),qe=()=>{if(F)return null;const fe=[{key:"copy",show:S.copy!==!1,icon:$b,label:"\u590D\u5236",onClick:()=>B==null?void 0:B("chatbox:copy",{content:Se})},{key:"like",show:S.like!==!1,icon:z9,label:"\u8D5E",onClick:()=>B==null?void 0:B("chatbox:like",{result:k,queryId:E}),active:k===1},{key:"dislike",show:S.dislike!==!1,icon:M9,label:"\u8E29",onClick:()=>B==null?void 0:B("chatbox:dislike",{result:k,queryId:E}),active:k===0},{key:"repeat",show:!i&&j,icon:I9,label:"\u91CD\u590D",onClick:()=>B==null?void 0:B("chatbox:repeat",{content:t,queryId:E,filePaths:y,audioUrl:w})},{key:"forward",show:S.forward,icon:T9,label:"\u8F6C\u53D1",onClick:()=>B==null?void 0:B("chatbox:forward",{content:Se,queryId:E})},{key:"delete",show:S.delete,icon:L9,label:"\u5220\u9664",onClick:()=>B==null?void 0:B("chatbox:delete",{queryId:E})},{key:"edit",show:S.edit,icon:R9,label:"\u7F16\u8F91",onClick:()=>B==null?void 0:B("chatbox:edit",{content:Se,queryId:E})}];return ae.jsxs("div",{className:"flex justify-between items-center px-6",children:[ae.jsx(V9,{$theme:N,children:fe.filter(Oe=>Oe.show).map(Oe=>{const rt=Oe.icon;return ae.jsx(pl,{title:Oe.label,placement:"top",children:ae.jsx("button",{className:Oe.active?"active":"",onClick:Oe.onClick,children:ae.jsx(rt,{size:18})})},Oe.key)})}),!i&&o=="ready"&&!F&&ae.jsxs("div",{className:"text-[10px] text-[#888888]",children:["\u672C\u6B21\u56DE\u7B54\u603B\u8BA1\u6D88\u8017"," ",ae.jsx("span",{style:{color:N.colors.primary},children:P||0})," ","tokens, \u7B49\u5F85\u603B\u8BA1\u8017\u65F6"," ",ae.jsx("span",{style:{color:N.colors.primary},children:Math.round(($||0)/1e3)}),"\u79D2"]})]})},Ye=Et(()=>{if(!g)return[];let fe=[];try{const ke=JSON.parse(g);fe=Array.isArray(ke)?ke:[]}catch{return[]}let Oe=fe.map(ke=>{try{const Be=ke.metadata||{};let ie="";ke.name&&typeof ke.name=="string"?ie=ke.name:ke.file_name&&typeof ke.file_name=="string"?ie=ke.file_name:Be.source&&typeof Be.source=="string"?ie=Be.source.split("/").pop()||"":ke.order_num?ie=String(ke.order_num):ie="\u672A\u77E5\u6587\u6863";let De="pdf";if(ke.name&&typeof ke.name=="string"){const le=ke.name.split(".").pop();le&&(De=le.toLowerCase())}else if(Be.source&&typeof Be.source=="string"){const le=Be.source.split(".").pop();le&&(De=le.toLowerCase())}else if(ke.file_path&&typeof ke.file_path=="string"){const le=ke.file_path.split(".").pop();le&&(De=le.toLowerCase())}const Z=ke.parsedFilePath||Be.file_path||ke.file_path||ke.convertedFilePath||"";return{file_id:Be.id||ke.uid||"",file_name:ie,file_type:De,path:Z,score:Number(ke.score)||0,tags:[],parsedFilePath:ke.parsedFilePath,...ke}}catch(Be){return console.warn("\u89E3\u6790\u5F15\u7528\u6587\u6863\u65F6\u51FA\u9519:",Be,ke),{file_id:ke.uid||"",file_name:ke.name||"\u672A\u77E5\u6587\u6863",file_type:"unknown",path:ke.convertedFilePath||ke.file_path||"",score:0,tags:[],parsedFilePath:ke.parsedFilePath,...ke}}});const rt=Cs(He||[]);if(rt&&rt.length){const ke=rt.filter(Be=>Be.fromtype==="0");Oe=Oe.map(Be=>{const ie=ke.filter(De=>{var le,ze;const Z=fe.find(xe=>String(xe.order_num)===String(De.id));return((le=Z==null?void 0:Z.metadata)==null?void 0:le.source)&&((ze=Be==null?void 0:Be.metadata)==null?void 0:ze.source)&&Z.metadata.source===Be.metadata.source}).map(De=>({id:De.id||"",index:De.indexId||"",image_urls:De.imageUrls?Array.isArray(De.imageUrls)?De.imageUrls:[De.imageUrls]:De.image_urls?De.image_urls.split(";").map(Z=>Z.trim()).filter(Boolean):[]}));return{...Be,tags:ie}})}const Ke=new Map;return Oe.filter(ke=>{var ie;const Be=((ie=ke==null?void 0:ke.metadata)==null?void 0:ie.source)||ke.file_name;return Be?Ke.has(Be)?!1:(Ke.set(Be,!0),!0):!0}).sort((ke,Be)=>((Be==null?void 0:Be.score)||0)-((ke==null?void 0:ke.score)||0))},[g,He]),Xe=Et(()=>{if(!m)return[];let fe=[];try{const Ke=JSON.parse(m);fe=Array.isArray(Ke)?Ke:[]}catch{return[]}if(!(fe!=null&&fe.length))return[];let Oe=fe.map(Ke=>{var ke,Be,ie;return{link:(ke=Ke==null?void 0:Ke.metadata)==null?void 0:ke.link,file_name:(Be=Ke==null?void 0:Ke.metadata)==null?void 0:Be.title,score:(ie=Ke==null?void 0:Ke.metadata)==null?void 0:ie.score,tags:[]}});const rt=Cs(He||[]);if(rt&&rt.length){const Ke=rt.filter(ke=>ke.fromtype==="1");Oe=Oe.map(ke=>{const Be=Ke.filter(ie=>{var Z;const De=fe.find(le=>String(le.order_num)===String(ie.id));return((Z=De==null?void 0:De.metadata)==null?void 0:Z.title)&&De.metadata.title===ke.file_name}).map(ie=>({id:ie.id||"",index:ie.indexId||"",image_urls:ie.imageUrls?Array.isArray(ie.imageUrls)?ie.imageUrls:[ie.imageUrls]:ie.image_urls?ie.image_urls.split(";").map(De=>De.trim()).filter(Boolean):[]}));return{...ke,tags:Be}})}return Oe.sort((Ke,ke)=>((ke==null?void 0:ke.score)||0)-((Ke==null?void 0:Ke.score)||0))},[m,He]),Re=Et(()=>{const fe=[...Cs(He||[]).filter(Oe=>Oe.imageUrls&&Array.isArray(Oe.imageUrls)).flatMap(Oe=>Oe.imageUrls),...L];return Array.from(new Set(fe))},[He,L]),lt=Et(()=>typeof t!="string"?[]:_9(t),[t]),je=Et(()=>{var fe,Oe,rt,Ke,ke,Be,ie,De;if(!b)return null;try{const Z=typeof b=="string"?JSON.parse(b):b;if(Array.isArray(Z)&&Z.length>0){const le=Z[0];if(le.retrieveSqlData)return{dataFetchUrl:le.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:le.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:le.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:le.retrieveSqlData.total||0,type:le.retrieveSqlData.type||"COLLECTION",preData:{columns:((Oe=(fe=le.retrieveSqlData.preData)==null?void 0:fe[0])==null?void 0:Oe.columns)||[],rows:((Ke=(rt=le.retrieveSqlData.preData)==null?void 0:rt[0])==null?void 0:Ke.data)||[]}}}return Z.retrieveSqlData?{dataFetchUrl:Z.retrieveSqlData.fetchUrl||"/index/knowledgeBase/file/stream",databaseName:Z.retrieveSqlData.databaseName||"\u6570\u636E\u5E93",tableName:Z.retrieveSqlData.tableName||"\u6570\u636E\u8868",total:Z.retrieveSqlData.total||0,type:Z.retrieveSqlData.type||"COLLECTION",preData:{columns:((Be=(ke=Z.retrieveSqlData.preData)==null?void 0:ke[0])==null?void 0:Be.columns)||[],rows:((De=(ie=Z.retrieveSqlData.preData)==null?void 0:ie[0])==null?void 0:De.data)||[]}}:{dataFetchUrl:Z.dataFetchUrl||"/index/knowledgeBase/file/stream",databaseName:Z.databaseName||"\u6570\u636E\u5E93",tableName:Z.tableName||"\u6570\u636E\u8868",total:Z.total||0,type:Z.type||"COLLECTION",preData:Z.preData||{columns:[],rows:[]}}}catch(Z){return console.error("Failed to parse databaseReference:",Z),null}},[b]);ee.useEffect(()=>{var fe,Oe,rt,Ke,ke,Be,ie,De;if(b)try{const Z=typeof b=="string"?JSON.parse(b):b;if(Array.isArray(Z)&&Z.length>0){const le=Z[0];if(le.retrieveTableDataList&&Array.isArray(le.retrieveTableDataList)){J(le.retrieveTableDataList);return}if((rt=(Oe=(fe=le.retrieveSqlData)==null?void 0:fe.preData)==null?void 0:Oe[0])!=null&&rt.data&&Array.isArray(le.retrieveSqlData.preData[0].data)){J(le.retrieveSqlData.preData[0].data);return}}if(Z.retrieveTableDataList&&Array.isArray(Z.retrieveTableDataList)){J(Z.retrieveTableDataList);return}if((Be=(ke=(Ke=Z.retrieveSqlData)==null?void 0:Ke.preData)==null?void 0:ke[0])!=null&&Be.data&&Array.isArray(Z.retrieveSqlData.preData[0].data)){J(Z.retrieveSqlData.preData[0].data);return}(ie=je==null?void 0:je.preData)!=null&&ie.rows&&J(je.preData.rows)}catch(Z){console.error("Failed to parse databaseReference for retrieveTableDataList:",Z),(De=je==null?void 0:je.preData)!=null&&De.rows&&J(je.preData.rows)}},[b,je]);const at=()=>{if(!i)return null;const fe=Et(()=>{if(Array.isArray(C))return C;if(typeof C=="string"&&C)try{return JSON.parse(C)}catch{return[]}return[]},[C]);if(fe.length===0)return null;const Oe=Z=>Z!=null&&Z.status&&(String(Z.status).toLowerCase()==="uploading"||String(Z.status).toLowerCase()==="parsing")?!1:!!(Z!=null&&Z.url||Z!=null&&Z.filePath||Z!=null&&Z.convertedFilePath),rt=fe.filter(Z=>{const le=(Z.name||"").split(".").pop()||"";return["image","jpg","jpeg","png","gif","bmp","webp"].includes(le.toLowerCase())}),Ke=fe.filter(Z=>{const le=(Z.name||"").split(".").pop()||"";return!["image","jpg","jpeg","png","gif","bmp","webp"].includes(le.toLowerCase())}),ke=rt.filter(Oe),Be=rt.filter(Z=>!Oe(Z)),ie=Ke.filter(Oe),De=Ke.filter(Z=>!Oe(Z));return ae.jsxs("div",{className:"w-full mt-4",children:[(ke.length>0||Be.length>0)&&ae.jsx(Ob,{$theme:N,children:ae.jsxs("div",{className:"gallery-grid",style:{direction:"rtl"},children:[Be.map((Z,le)=>{var ze;return ae.jsx("div",{className:"gallery-item",style:{background:"#f5f6fa",display:"flex",alignItems:"center",justifyContent:"center"},children:ae.jsx("div",{className:"animate-spin",style:{width:24,height:24,border:"2px solid #d1d5db",borderTopColor:((ze=N.colors)==null?void 0:ze.primary)||"#3b82f6",borderRadius:"9999px"}})},`pending-img-${le}`)}),ke.map(Z=>ae.jsxs("div",{className:"gallery-item",onClick:()=>{q(Z.url||Z.filePath||null),B==null||B("reference_file:click",{file:Z.name,file_type:"image",url:Z.url||Z.filePath,parse_url:Z.parseUrl||Z.convertedFilePath,retrieve_tags:Z.retrieveTags||[],file_id:Z.uid,parsed_file_type:"image",references:Z,type:"image",isUploadFile:!0,pdfPages:Z.pdfPages||0})},children:[ae.jsx("img",{src:Z.url||Z.filePath,alt:Z.name,className:"gallery-image",onError:le=>{const ze=le.target;ze.style.display="none"}}),ae.jsx("div",{className:"gallery-overlay",children:Z.name})]},Z.uid||Z.name))]})}),(ie.length>0||De.length>0)&&ae.jsxs("div",{className:"w-full",children:[ae.jsxs("div",{className:"text-sm font-semibold text-gray-700 mb-3 px-4",children:["\u4E0A\u4F20\u6587\u6863 (",ie.length,")"]}),ae.jsxs("div",{className:"flex flex-col gap-2 px-4",style:{direction:"ltr"},children:[De.map((Z,le)=>{var ze;return ae.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-gray-200 bg-gray-50/40",children:[ae.jsx("div",{className:"flex-shrink-0 w-6 h-6 rounded bg-gray-200"}),ae.jsx("div",{className:"flex-1 min-w-0",children:ae.jsx("div",{className:"h-3 rounded bg-gray-200 w-[60%]"})}),ae.jsx("div",{className:"w-6 h-6",children:ae.jsx("div",{className:"animate-spin",style:{width:18,height:18,border:"2px solid #d1d5db",borderTopColor:((ze=N.colors)==null?void 0:ze.primary)||"#3b82f6",borderRadius:"9999px"}})})]},`pending-doc-${le}`)}),ie.map(Z=>{const le=(Z.name||"").split(".").pop()||"";return ae.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-gray-200 hover:border-blue-300 hover:bg-gray-50 transition-colors cursor-pointer",onClick:()=>{B==null||B("reference_file:click",{file:Z.name,file_type:le,url:Z.url||Z.filePath,parse_url:Z.parseUrl||Z.convertedFilePath,retrieve_tags:Z.retrieveTags||[],file_id:Z.uid,parsed_file_type:le,references:Z,type:"file",isUploadFile:!0,pdfPages:Z.pdfPages||0})},children:[ae.jsx("div",{className:"flex-shrink-0",children:ae.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center ",children:ae.jsx(Nl,{type:Bb(le),size:16})})}),ae.jsx("div",{className:"flex-1 min-w-0",children:ae.jsx("div",{className:"text-sm font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:ze=>{ze.stopPropagation(),B==null||B("referenceFile_question",{data:{...Z,file_type:le,file_name:Z.name,metadata:Z,parsedFilePath:Z.url||Z.filePath}})},children:Z.name})}),Z.size&&ae.jsx("div",{className:"text-sm text-gray-600",children:Z.size})]},Z.uid||Z.name)})]})]})]})},vt=()=>{if(i)return null;const fe=Array.isArray(Ye)?Ye:[],Oe=Array.isArray(Xe)?Xe:[],rt=fe.length>0&&A!==5,Ke=Oe.length>0,ke=((Re==null?void 0:Re.length)||0)>0||((lt==null?void 0:lt.length)||0)>0,Be=U&&U.length>0;return!rt&&!Ke&&!ke&&!Be?null:ae.jsxs(ae.Fragment,{children:[ke&&ae.jsx(Ob,{$theme:N,children:ae.jsx("div",{className:"gallery-grid",children:[...Re,...lt].map((ie,De)=>ae.jsxs("div",{className:"gallery-item",onClick:()=>{q(ie),B==null||B("reference_file:click",{file:`\u56FE${De+1}`,file_type:"image",url:ie,parse_url:ie,retrieve_tags:[],references:{url:ie},type:"image",isUploadFile:!1})},children:[ae.jsx("img",{src:ie,alt:`\u56FE${De+1}`,className:"gallery-image",onError:Z=>{const le=Z.target;le.style.display="none"}}),ae.jsxs("div",{className:"gallery-overlay",children:["\u56FE",De+1]})]},ie+De))})}),rt&&ae.jsxs(ld,{$theme:N,children:[ae.jsx("div",{className:"reference-title justify-between items-center flex",children:ae.jsxs("div",{className:"flex items-center gap-2",children:[ae.jsx("span",{className:"text-[#374151]",children:"\u77E5\u8BC6\u5E93\u6587\u6863\u5F15\u7528"}),ae.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${fe.length})`}),fe.length>2&&ae.jsx("div",{onClick:()=>te(!Q),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:Q?ae.jsx(id,{size:16,className:"text-[#b4b4b4]"}):ae.jsx(ad,{size:16,className:"text-[#b4b4b4]"})})]})}),ae.jsx("div",{className:"reference-list",children:(Q?fe:fe.slice(0,2)).map((ie,De)=>ie&&ae.jsx("div",{className:"reference-item",onClick:()=>{var We;const Z=ie.file_name,le=(Z||"").split(".").pop()||"pdf",ze=ie.path||ie.file_path||((We=ie.metadata)==null?void 0:We.source)||"",xe=ie.parsedFilePath||"",_e=(ie.tags||[]).map(Ge=>({id:Ge.id,index:Ge.index,image_urls:Ge.image_urls||(Array.isArray(Ge.imageUrls)?Ge.imageUrls:[])}));B==null||B("reference_file:click",{file:Z,file_type:le,url:ze,parse_url:xe,retrieve_tags:_e,file_id:ie.file_id,parsed_file_type:le,references:ie,type:"file",isUploadFile:!1,pdfPages:ie.pdfPages||0})},children:ae.jsxs("div",{className:"file-info flex items-end gap-2",children:[ae.jsx("div",{className:"flex-shrink-0",children:(()=>{(ie.file_name||"").split(".").pop();const Z=(ie.file_name||"").split(".").pop()||"file";return ae.jsx("div",{className:"w-6 h-6 rounded flex items-end-safe justify-center",children:ae.jsx(Nl,{type:Bb(Z),size:32})})})()}),ae.jsx("div",{className:"flex-1 min-w-0",children:ae.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:Z=>{Z.stopPropagation(),B==null||B("knowledge_referenceFile_title:click",{data:{...ie,file_type:ie.file_type,file_name:ie.file_name,metadata:ie.metadata,parsedFilePath:ie.parsedFilePath}})},children:ie.file_name})}),ae.jsx("div",{className:"flex items-center gap-1",children:(()=>{const Z=new Set,le=(ie.tags||[]).filter(xe=>Z.has(xe.id)?!1:(Z.add(xe.id),!0)).sort((xe,_e)=>Number(xe.index)-Number(_e.index)),ze=xe=>{if(typeof we!="string")return xe;const _e=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${xe}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(we);return _e?_e[1]:xe};return le.slice(0,10).map(xe=>ae.jsx("span",{className:"w-6 h-6 bg-[#e6f7ff] text-[#1890ff] rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",onClick:_e=>{_e.stopPropagation();const We=Ce(ie,xe.id);B==null||B("retrive_tag:click",{tagInfo:We||ie,fromtype:"0",leaf:{id:xe.id,fromtype:"0"},attributes:{}})},children:ze(xe.id)},xe.id))})()}),ae.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",(ie.score*100).toFixed(0)]}),ae.jsxs("div",{className:"flex items-center gap-2",children:[ae.jsx($b,{size:16,className:"text-gray-400 hover:text-blue-600 cursor-pointer transition-colors",onClick:Z=>{Z.stopPropagation(),B==null||B("referenceFile_question",{data:{...ie,file_type:ie.file_type,file_name:ie.file_name,metadata:ie.metadata,parsedFilePath:ie.parsedFilePath}})}}),ae.jsx(j9,{size:16,className:"text-gray-400 hover:text-blue-600 transition-colors",style:{cursor:e?"pointer":"not-allowed"},onClick:Z=>{e&&(Z.stopPropagation(),B==null||B("referenceFile_download",{data:{...ie,file_type:ie.file_type,file_name:ie.file_name,metadata:ie.metadata,parsedFilePath:ie.parsedFilePath}}))}})]})]})},ie.file_id||De))})]}),Be&&ae.jsxs(ld,{$theme:N,children:[ae.jsx("div",{className:"reference-title justify-between items-center flex",children:ae.jsxs("div",{className:"flex items-center gap-2",children:[ae.jsx("span",{className:"text-[#374151]",children:"\u6570\u636E\u5E93\u5F15\u7528"}),ae.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${U.length||0})`}),U.length>2&&ae.jsx("div",{onClick:()=>G(!V),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:V?ae.jsx(id,{size:16,className:"text-[#b4b4b4]"}):ae.jsx(ad,{size:16,className:"text-[#b4b4b4]"})})]})}),ae.jsx("div",{className:"reference-list",children:(V?U:U.slice(0,2)).map((ie,De)=>ae.jsx("div",{className:"reference-item",onClick:()=>{B==null||B("reference_file:click",{file:ie.databaseName||"database",file_type:"database",url:ie.fetchUrl||(je==null?void 0:je.dataFetchUrl)||"",parse_url:ie.fetchUrl||(je==null?void 0:je.dataFetchUrl)||"",retrieve_tags:[],references:ie,type:"database",isUploadFile:!1})},children:ae.jsxs("div",{className:"file-info flex items-end gap-2",children:[ae.jsx("div",{className:"flex-shrink-0",children:ae.jsx("div",{className:"w-6 h-6 rounded flex items-center justify-center",children:ae.jsx(P9,{size:20,className:"text-blue-600"})})}),ae.jsx("div",{className:"flex-1 min-w-0",children:ae.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:Z=>{Z.stopPropagation(),B==null||B("database_referenceFile_title:click",{data:{...ie,file_type:"database",file_name:ie.databaseName||"database",metadata:ie,parsedFilePath:ie.fetchUrl||(je==null?void 0:je.dataFetchUrl)||""}})},children:ie.databaseName||(je==null?void 0:je.databaseName)||"\u6570\u636E\u5E93"})}),ae.jsx("div",{className:"flex items-center gap-1",children:ae.jsx("span",{className:"w-6 h-6 bg-orange-100 text-orange-600 rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",children:De+1})}),ae.jsx("div",{className:"text-sm text-gray-600",children:"\u5206\u6570: 92"})]})},ie.tableName||De))})]}),Ke&&ae.jsxs(ld,{$theme:N,children:[ae.jsx("div",{className:"reference-title justify-between items-center flex",children:ae.jsxs("div",{className:"flex items-center gap-2",children:[ae.jsx("span",{className:"text-[#374151]",children:"\u4E92\u8054\u7F51\u641C\u7D22\u5F15\u7528"}),ae.jsx("span",{className:"text-[#b4b4b4] text-xs",children:` (${Oe.length})`}),Oe.length>2&&ae.jsx("div",{onClick:()=>Y(!z),className:"cursor-pointer hover:text-[#86909C] transition-colors",children:z?ae.jsx(id,{size:16,className:"text-[#b4b4b4]"}):ae.jsx(ad,{size:16,className:"text-[#b4b4b4]"})})]})}),ae.jsx("div",{className:"reference-list",children:(z?Oe:Oe.slice(0,2)).map((ie,De)=>ae.jsx("div",{className:"reference-item",onClick:()=>{B==null||B("reference_file:click",{file:ie.file_name,file_type:(ie.file_name||"").split(".").pop()||"html",url:ie.link,parse_url:ie.link,retrieve_tags:ie.tags||[],references:ie,type:"file",isUploadFile:!1})},children:ae.jsxs("div",{className:"file-info flex items-end gap-2",children:[ae.jsx("div",{className:"flex-shrink-0",children:ae.jsx("div",{className:"w-6 h-6 rounded-full flex items-center justify-center",children:ae.jsx(Nl,{type:"rag/netretrive",size:32,className:"text-green-600"})})}),ae.jsx("div",{className:"flex-1 min-w-0",children:ae.jsx("div",{className:"text-sm w-[250px] font-medium text-gray-900 truncate hover:text-blue-600 cursor-pointer",onClick:Z=>{Z.stopPropagation(),B==null||B("web_referenceFile_title:click",{data:{...ie,file_type:ie.file_type,file_name:ie.file_name,metadata:ie.metadata,parsedFilePath:ie.parsedFilePath}})},children:ie.file_name})}),ae.jsx("div",{className:"flex items-center gap-1",children:(()=>{const Z=new Set,le=(ie.tags||[]).filter(xe=>Z.has(xe.id)?!1:(Z.add(xe.id),!0)).sort((xe,_e)=>Number(xe.index)-Number(_e.index)),ze=xe=>{if(typeof we!="string")return xe;const _e=new RegExp(`\\[retrive-tag[^\\]]*id=['"]${xe}['"][^\\]]*\\]\\[([^\\]]+)\\]\\[\\/retrive-tag\\]`,"g").exec(we);return _e?_e[1]:xe};return le.slice(0,1).map(xe=>ae.jsx("span",{className:"w-6 h-6 bg-[#f6ffed] text-[#52c41a] rounded text-xs font-medium flex items-center justify-center cursor-pointer hover:bg-orange-200 transition-colors",onClick:_e=>{_e.stopPropagation();const We=Ce(ie,xe.id);B==null||B("retrive_tag:click",{tagInfo:We||ie,fromtype:"1",leaf:{id:xe.id,fromtype:"1"},attributes:{}})},children:ze(xe.id)},xe.id))})()}),ae.jsxs("div",{className:"text-sm text-gray-600",children:["\u5206\u6570: ",ie.score?(ie.score*100).toFixed(0):"N/A"]})]})},(ie.link||"")+De))})]})]})},At=()=>i||!j||!O||O.length===0?null:ae.jsx(U9,{$theme:N,children:ae.jsx("div",{className:"follow-up-list",children:O.map((fe,Oe)=>ae.jsx("div",{className:"follow-up-item",style:{animationDelay:`${Oe*260}ms`},onClick:()=>{B==null||B("chatbox:follow_up_question_click",{question:fe,queryId:E})},children:fe},`${String(fe)}-${Oe}`))})});return ae.jsxs(H9,{$align:n,$isUser:i,children:[ae.jsxs(W9,{$isUser:i,children:[ae.jsx(K9,{$src:ge,$isUser:i}),T&&ae.jsx("div",{className:"message-time px-2 text-sm text-[#888888]",children:T})]}),ae.jsx(q9,{$isUser:i,$theme:N,children:ae.jsx("div",{className:"message-card",children:ae.jsx("div",{className:"message-text",children:r==="stream"?ae.jsxs(ae.Fragment,{children:[!i&&re(),ae.jsx(Fm,{dataSource:{type:Js.MARKDOWN,content:we},styles:{letterSpacing:v==null?void 0:v.letterSpacing,lineHeight:v==null?void 0:v.lineHeight,templateField:v==null?void 0:v.templateField,text:v==null?void 0:v.text},theme:{...v==null?void 0:v.theme,baseFontSize:16,minHeight:"60px"},onRetriveTagClick:Ne,eventsEmit:B,extraProps:Fe},`md-${(we||"").length}-think-${K}`)]}):ae.jsx("div",{children:Se})})})}),at(),vt(),!i&&qe(),At(),typeof document<"u"&&jb(ae.jsx(X9,{$show:_!==null,onClick:()=>q(null),children:_&&ae.jsxs("div",{className:"modal-content",onClick:fe=>fe.stopPropagation(),children:[ae.jsx("img",{src:_,alt:"\u9884\u89C8\u56FE\u7247",className:"modal-image"}),ae.jsx("button",{className:"modal-close",onClick:()=>q(null),children:"\u5173\u95ED"})]})}),document.body)]})},G9=fr.div`
|
|
1076
|
+
position: relative;
|
|
1077
|
+
width: 100%;
|
|
1078
|
+
height: 100%;
|
|
1079
|
+
overflow: ${e=>e.$isVirtualized?"hidden":"auto"};
|
|
1080
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
|
|
1081
|
+
border-radius: ${e=>{var t;return((t=e.theme)==null?void 0:t.borderRadius)||"8px"}};
|
|
1082
|
+
|
|
1083
|
+
/* 自定义滚动条 */
|
|
1084
|
+
&::-webkit-scrollbar {
|
|
1085
|
+
width: 8px;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
&::-webkit-scrollbar-track {
|
|
1089
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
|
|
1090
|
+
border-radius: 4px;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
&::-webkit-scrollbar-thumb {
|
|
1094
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
|
|
1095
|
+
border-radius: 4px;
|
|
1096
|
+
|
|
1097
|
+
&:hover {
|
|
1098
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
`,Y9=fr.div`
|
|
1102
|
+
position: relative;
|
|
1103
|
+
width: 100%;
|
|
1104
|
+
height: 100%;
|
|
1105
|
+
overflow: auto;
|
|
1106
|
+
background-color: ${e=>{var t;return((t=e.theme)==null?void 0:t.backgroundColor)||"#ffffff"}};
|
|
1107
|
+
|
|
1108
|
+
/* 自定义滚动条 */
|
|
1109
|
+
&::-webkit-scrollbar {
|
|
1110
|
+
width: 8px;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
&::-webkit-scrollbar-track {
|
|
1114
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarTrack)||"#f1f1f1"}};
|
|
1115
|
+
border-radius: 4px;
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
&::-webkit-scrollbar-thumb {
|
|
1119
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumb)||"#c1c1c1"}};
|
|
1120
|
+
border-radius: 4px;
|
|
1121
|
+
|
|
1122
|
+
&:hover {
|
|
1123
|
+
background: ${e=>{var t;return((t=e.theme)==null?void 0:t.scrollbarThumbHover)||"#a8a8a8"}};
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
`,Ab=fr.div`
|
|
1127
|
+
padding: ${e=>{var t;return((t=e.theme)==null?void 0:t.padding)||"1rem"}};
|
|
1128
|
+
min-height: ${e=>e.height||"auto"};
|
|
1129
|
+
|
|
1130
|
+
/* 富文本内容样式增强 */
|
|
1131
|
+
& h1, & h2, & h3, & h4, & h5, & h6 {
|
|
1132
|
+
scroll-margin-top: 2rem;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
& img {
|
|
1136
|
+
max-width: 100%;
|
|
1137
|
+
height: auto;
|
|
1138
|
+
border-radius: 0.5rem;
|
|
1139
|
+
margin: 1rem 0;
|
|
1140
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
1141
|
+
transition: transform 0.2s ease-in-out;
|
|
1142
|
+
|
|
1143
|
+
&:hover {
|
|
1144
|
+
transform: scale(1.02);
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
& pre {
|
|
1149
|
+
position: relative;
|
|
1150
|
+
|
|
1151
|
+
&::before {
|
|
1152
|
+
content: '';
|
|
1153
|
+
position: absolute;
|
|
1154
|
+
top: 0;
|
|
1155
|
+
left: 0;
|
|
1156
|
+
right: 0;
|
|
1157
|
+
height: 2px;
|
|
1158
|
+
background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
|
|
1159
|
+
border-radius: 2px 2px 0 0;
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
& blockquote {
|
|
1164
|
+
position: relative;
|
|
1165
|
+
|
|
1166
|
+
&::before {
|
|
1167
|
+
content: '"';
|
|
1168
|
+
position: absolute;
|
|
1169
|
+
top: -0.5rem;
|
|
1170
|
+
left: -1rem;
|
|
1171
|
+
font-size: 3rem;
|
|
1172
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
|
|
1173
|
+
opacity: 0.3;
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
|
|
1178
|
+
`,Z9=fr.div`
|
|
1179
|
+
display: flex;
|
|
1180
|
+
align-items: center;
|
|
1181
|
+
justify-content: center;
|
|
1182
|
+
padding: 2rem;
|
|
1183
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
|
|
1184
|
+
font-size: 0.875rem;
|
|
1185
|
+
|
|
1186
|
+
&::before {
|
|
1187
|
+
content: '';
|
|
1188
|
+
width: 20px;
|
|
1189
|
+
height: 20px;
|
|
1190
|
+
border: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.borderColor)||"#dee2e6"}};
|
|
1191
|
+
border-top: 2px solid ${e=>{var t;return((t=e.theme)==null?void 0:t.primaryColor)||"#007bff"}};
|
|
1192
|
+
border-radius: 50%;
|
|
1193
|
+
animation: spin 1s linear infinite;
|
|
1194
|
+
margin-right: 0.5rem;
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
@keyframes spin {
|
|
1198
|
+
0% { transform: rotate(0deg); }
|
|
1199
|
+
100% { transform: rotate(360deg); }
|
|
1200
|
+
}
|
|
1201
|
+
`,J9=fr.div`
|
|
1202
|
+
display: flex;
|
|
1203
|
+
flex-direction: column;
|
|
1204
|
+
align-items: center;
|
|
1205
|
+
justify-content: center;
|
|
1206
|
+
padding: 3rem;
|
|
1207
|
+
color: ${e=>{var t;return((t=e.theme)==null?void 0:t.textColor)||"#6c757d"}};
|
|
1208
|
+
text-align: center;
|
|
1209
|
+
|
|
1210
|
+
&::before {
|
|
1211
|
+
content: '📄';
|
|
1212
|
+
font-size: 3rem;
|
|
1213
|
+
margin-bottom: 1rem;
|
|
1214
|
+
}
|
|
1215
|
+
`,Q9=({dataSource:e,enableVirtualScroll:t=!1,itemHeight:r=200,preloadCount:n=5,enableSegmentedLoading:o=!1,onLoadMore:a,isLoadingMore:i=!1,size:l="sm",theme:s={},onChange:u,onScroll:c,onScrollToTop:f,onScrollToBottom:p,onSegmentClick:h,className:v,style:g,height:m="100%"})=>{const b=Qs(),y=Et(()=>{var G,K,W,re,U,J,ne,ue,me;return{primaryColor:((G=b==null?void 0:b.colors)==null?void 0:G.primary)||(s==null?void 0:s.primaryColor)||"#007bff",secondaryColor:((K=b==null?void 0:b.colors)==null?void 0:K.secondary)||(s==null?void 0:s.secondaryColor)||"#6c757d",backgroundColor:((W=b==null?void 0:b.colors)==null?void 0:W.background)||(s==null?void 0:s.backgroundColor)||"#ffffff",textColor:((re=b==null?void 0:b.colors)==null?void 0:re.text)||(s==null?void 0:s.textColor)||"#24292f",borderColor:((U=b==null?void 0:b.colors)==null?void 0:U.border)||(s==null?void 0:s.borderColor)||"#dee2e6",disabledBackground:((J=b==null?void 0:b.colors)==null?void 0:J.disabledBackground)||(s==null?void 0:s.disabledBackground)||"#f8f9fa",hoverBackground:((ne=b==null?void 0:b.colors)==null?void 0:ne.hoverBackground)||(s==null?void 0:s.hoverBackground)||"#e9ecef",borderRadius:((ue=b==null?void 0:b.space)==null?void 0:ue.radius)||(s==null?void 0:s.borderRadius)||"8px",padding:((me=b==null?void 0:b.space)==null?void 0:me.padding)||(s==null?void 0:s.padding)||"1rem",scrollbarTrack:(s==null?void 0:s.scrollbarTrack)||"#f1f1f1",scrollbarThumb:(s==null?void 0:s.scrollbarThumb)||"#c1c1c1",scrollbarThumbHover:(s==null?void 0:s.scrollbarThumbHover)||"#a8a8a8",...s}},[b,s]),C=Ve(0);C.current+=1,console.log("[Markdownit] render count:",C.current);const[D,w]=wt([]),[k,E]=wt({start:0,end:10}),[x,F]=wt(0),[j,$]=wt(0),[P,A]=wt(!1),[O,S]=wt(!1),[B,R]=wt(!1),N=Ve(null),T=Ve(null),L=Ve(null),X=Et(()=>Array.isArray(e)?e:[{id:"single",content:e.content,type:e.type,timestamp:Date.now()}],[e]);Ot(()=>{console.log("[Markdownit] setSegments by processedData, len:",Array.isArray(X)?X.length:"n/a"),w(X)},[X]);const _=Et(()=>t?`${D.length*r}px`:"auto",[D.length,r,t]),q=Et(()=>{if(!t)return D;const G=Math.max(0,k.start-n),K=Math.min(D.length,k.end+n);return D.slice(G,K).map((W,re)=>({...W,virtualIndex:G+re}))},[D,k,t,n]),Q=gt(G=>{const{scrollTop:K,scrollHeight:W,clientHeight:re}=G.currentTarget;console.log("[Markdownit] onScroll fired",{newScrollTop:K,scrollHeight:W,clientHeight:re});const U=!t&&!c&&!f&&!p&&!o;if(console.log("[Markdownit] passiveOnly:",U),U||F(J=>J!==K?(console.log("[Markdownit] setScrollTop:",K),K):J),t&&!U){const J=Math.floor(K/r),ne=Math.min(D.length,J+Math.ceil(j/r)+1);E(ue=>ue.start!==J||ue.end!==ne?(console.log("[Markdownit] setVisibleRange:",{start:J,end:ne}),{start:J,end:ne}):ue)}if(!U){const J=K<=10;J!==O&&(console.log("[Markdownit] isAtTop ->",J),S(J),J&&f&&(console.log("[Markdownit] onScrollToTop callback"),f()))}if(!U){const J=K+re>=W-10;J!==B&&(console.log("[Markdownit] isAtBottom ->",J),R(J),J&&p&&(console.log("[Markdownit] onScrollToBottom callback"),p()))}c&&(console.log("[Markdownit] onScroll callback ->",{newScrollTop:K,scrollHeight:W}),c(K,W)),o&&a&&!P&&!i&&W-K-j<100&&te()},[t,r,D.length,j,o,a,P,i,O,B,f,p,c]),te=gt(async()=>{if(!(!a||P||i)){A(!0);try{const G=D[D.length-1],K=await a(G.id);w(W=>[...W,...K])}catch(G){console.error("Failed to load more segments:",G)}finally{A(!1)}}},[a,D,P,i]);Ot(()=>{const G=()=>{N.current&&$(N.current.clientHeight)};return G(),window.addEventListener("resize",G),()=>window.removeEventListener("resize",G)},[]);const z=gt((G,K)=>{const W={type:G.type,content:G.content},re=t?{position:"absolute",top:`${(G.virtualIndex||K)*r}px`,left:0,right:0,height:`${r}px`}:{};return ae.jsx("div",{style:re,onClick:()=>h==null?void 0:h(G.id,G),className:h?"cursor-pointer hover:bg-gray-50":"",children:ae.jsx(Fm,{dataSource:W,isEditing:!1,size:l,theme:y,onChange:u,style:{border:"none",background:"transparent",minHeight:t?`${r}px`:"auto",padding:"0.5rem"}})},G.id)},[t,r,y,u,h]),Y=()=>(console.log("[Markdownit] renderContent segments.len:",D.length,"enableVirtualScroll:",t),D.length===0?ae.jsxs(J9,{theme:y,children:[ae.jsx("h3",{children:"\u6682\u65E0\u5185\u5BB9"}),ae.jsx("p",{children:"\u8BF7\u6DFB\u52A0\u4E00\u4E9B\u5185\u5BB9\u6765\u5F00\u59CB"})]}):t?ae.jsx("div",{ref:L,style:{height:_,position:"relative"},children:q.map(z)}):ae.jsx("div",{ref:L,children:D.map(z)})),V=()=>!P&&!i?null:ae.jsx(Z9,{theme:y,children:i?"\u52A0\u8F7D\u66F4\u591A\u5185\u5BB9...":"\u52A0\u8F7D\u4E2D..."});return ae.jsx(G9,{ref:N,theme:y,$isVirtualized:t,className:v,style:{height:m,...g},children:t?ae.jsx(Y9,{ref:T,theme:y,onScroll:Q,children:ae.jsx(Ab,{theme:y,height:_,children:Y()})}):ae.jsxs(Ab,{theme:y,onScroll:Q,children:[Y(),V()]})})},sz=e=>{const{onRendered:t}=e;return Ot(()=>{if(!t)return;const r=requestAnimationFrame(()=>{const n=document.querySelector('[data-markdownit-root="1"]');n&&(console.log("[Markdownit _onRendered] fired"),t(n))});return()=>cancelAnimationFrame(r)},[e.dataSource,e.enableVirtualScroll,t]),ae.jsx("div",{"data-markdownit-root":"1",children:ae.jsx(Q9,{...e})})};fr.div`
|
|
1216
|
+
background: #f6f8fa;
|
|
1217
|
+
border: 1px solid #d0d7de;
|
|
1218
|
+
border-radius: 6px;
|
|
1219
|
+
padding: 16px;
|
|
1220
|
+
margin-bottom: 20px;
|
|
1221
|
+
`;fr.p`
|
|
1222
|
+
margin: 0 0 16px 0;
|
|
1223
|
+
color: #656d76;
|
|
1224
|
+
font-size: 14px;
|
|
1225
|
+
line-height: 1.5;
|
|
1226
|
+
`;const Fb=e=>{if(!e||e.trim()==="")return[{type:"paragraph",children:[{text:""}]}];const t=/<template\b([^>]*)>([\s\S]*?)<\/template>/g,r=[];let n=0,o,a=0;for(console.log("\u5F00\u59CB\u89E3\u6790\u6A21\u677F\u5B57\u7B26\u4E32:",e);(o=t.exec(e))!==null;){const i=o[0],l=o[1]||"",s=(o[2]||"").trim(),u=o.index,c=u+i.length;if(u>n){const b=e.slice(n,u);b.trim()!==""&&(r.push({text:b}),console.log("\u6DFB\u52A0\u6587\u672C\u5143\u7D20:",{text:b}))}const f=b=>{const y=new RegExp(`${b}\\s*=\\s*(["'])((?:\\\\.|[^\\
|
|
1227
|
+
])*?)\\1`,"i"),C=l.match(y);return C?C[2]:void 0},p=/\S/.test(l),h=f("key"),v=f("placeholder"),g=h||`template-${Date.now()}-${a++}`,m={type:"template",key:g,placeholder:p?v||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9":s||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",value:p?s:"",style:"blue",fieldId:g,children:[{text:""}],inline:!0};r.push(m),console.log("\u6DFB\u52A0template\u5143\u7D20:",m),n=c}if(n<e.length){const i=e.slice(n);i.trim()!==""&&(r.push({text:i}),console.log("\u6DFB\u52A0\u6700\u540E\u6587\u672C\u5143\u7D20:",{text:i}))}return r.length===0&&(e.trim()===""?r.push({text:""}):r.push({text:e}),console.log("\u6CA1\u6709\u627E\u5230template\u6807\u7B7E\uFF0C\u8FD4\u56DE\u539F\u59CB\u6587\u672C")),r.length>0&&r[0].type!=="paragraph"?[{type:"paragraph",children:r}]:(console.log("\u89E3\u6790\u5B8C\u6210\uFF0C\u7ED3\u679C:",r),r)},sd=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="",n="";return console.log("\u8F6C\u6362Slate\u6570\u636E:",JSON.stringify(e,null,2)),t.children.forEach(o=>{if(console.log("\u5904\u7406\u5B50\u5143\u7D20:",o),o.type==="template"){const a=o.key||o.fieldId||"",i=o.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",l=o.value||"",s=` key="${String(a)}" placeholder="${String(i)}"`;r+=`<template${s}>${l}</template>`,n=l||i}else if(o.text!==void 0){const a=o.text||"";a.trim()!==""?a!==n?(console.log(`\u627E\u5230\u6587\u672C\u5143\u7D20: ${a}`),r+=a,n=a):console.log("\u8DF3\u8FC7\u91CD\u590D\u6587\u672C\u5143\u7D20"):console.log("\u8DF3\u8FC7\u7A7A\u6587\u672C\u5143\u7D20")}else{console.log("\u672A\u77E5\u5143\u7D20\u7C7B\u578B:",o);const a=o.text||"";a.trim()!==""&&a!==n&&(r+=a,n=a)}}),console.log("\u8F6C\u6362\u7ED3\u679C:",r),r},ez=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{n.text!==void 0?r+=n.text:n.type==="template"&&(r+=n.value||n.placeholder||"")}),r},tz=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{n.text!==void 0?r+=n.text:n.type==="template"&&(r+=`\`\`\`template\`\`\`
|
|
1228
|
+
${n.value||n.placeholder}\`\`\`
|
|
1229
|
+
\`\`\`
|
|
1230
|
+
`)}),r},rz=e=>{if(!e||e.length===0)return"";const t=e[0];if(!t.children)return t.text||"";let r="";return t.children.forEach(n=>{if(n.text!==void 0)r+=n.text;else if(n.type==="template"){const o=n.key||n.fieldId||"",a=n.placeholder||"\u6A21\u7248\u5B57\u7B26\u5185\u5BB9",i=n.value||"",l=` key="${String(o)}" placeholder="${String(a)}"`;r+=`<template${l}>${i}</template>`}}),r},uz=({data:e,onChange:t,size:r="sm",styles:n={},onGetData:o})=>{var h,v,g,m,b,y,C,D,w,k,E,x,F,j,$,P,A,O,S,B,R,N,T,L,X,_,q,Q,te,z,Y,V,G,K,W,re,U,J,ne,ue,me,Ce,Ne,pe,he,ve,be,ye,Ae,we,He,Me;const a=Qs(),i={theme:{colors:{primary:((h=a==null?void 0:a.colors)==null?void 0:h.primary)||"#055AFF",secondary:((v=a==null?void 0:a.colors)==null?void 0:v.secondary)||"#84ADFF",background:((g=a==null?void 0:a.colors)==null?void 0:g.background)||"#E5EEFF",text:((m=a==null?void 0:a.colors)==null?void 0:m.text)||"#055AFF",border:((b=a==null?void 0:a.colors)==null?void 0:b.border)||"#84ADFF",success:((y=a==null?void 0:a.colors)==null?void 0:y.success)||"#008000",warning:((C=a==null?void 0:a.colors)==null?void 0:C.warning)||"#FFA500",error:((D=a==null?void 0:a.colors)==null?void 0:D.error)||"#FF0000",info:((w=a==null?void 0:a.colors)==null?void 0:w.info)||"#0000FF",disabled:((k=a==null?void 0:a.colors)==null?void 0:k.disabled)||"#808080",disabledBackground:((E=a==null?void 0:a.colors)==null?void 0:E.disabledBackground)||"#F5F5F5",disabledText:((x=a==null?void 0:a.colors)==null?void 0:x.disabledText)||"#808080",shadow:((F=a==null?void 0:a.colors)==null?void 0:F.shadow)||"0 1px 3px rgba(0, 0, 0, 0.12)",appBackground:((j=a==null?void 0:a.colors)==null?void 0:j.appBackground)||"transparent",listBackground:(($=a==null?void 0:a.colors)==null?void 0:$.listBackground)||"#f9f9f9",dashboardBackground:((P=a==null?void 0:a.colors)==null?void 0:P.dashboardBackground)||"#ffffff",textSecondary:((A=a==null?void 0:a.colors)==null?void 0:A.textSecondary)||"#6b7280"},space:{sidebar:((O=a==null?void 0:a.space)==null?void 0:O.sidebar)||"260px",size:((S=a==null?void 0:a.space)==null?void 0:S.size)||"12px",radius:((B=a==null?void 0:a.space)==null?void 0:B.radius)||"6px",padding:((R=a==null?void 0:a.space)==null?void 0:R.padding)||"16px",margin:((N=a==null?void 0:a.space)==null?void 0:N.margin)||"20px",shadow:((T=a==null?void 0:a.space)==null?void 0:T.shadow)||"0 2px 8px rgba(0,0,0,0.1)",lineHeight:((L=a==null?void 0:a.space)==null?void 0:L.lineHeight)||"1.6"},icons:(a==null?void 0:a.icons)||{},fonts:{body:{size:((_=(X=a==null?void 0:a.fonts)==null?void 0:X.body)==null?void 0:_.size)||"14px",weight:((Q=(q=a==null?void 0:a.fonts)==null?void 0:q.body)==null?void 0:Q.weight)||"normal",family:((z=(te=a==null?void 0:a.fonts)==null?void 0:te.body)==null?void 0:z.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"},heading:{size:((V=(Y=a==null?void 0:a.fonts)==null?void 0:Y.heading)==null?void 0:V.size)||"16px",weight:((K=(G=a==null?void 0:a.fonts)==null?void 0:G.heading)==null?void 0:K.weight)||"600",family:((re=(W=a==null?void 0:a.fonts)==null?void 0:W.heading)==null?void 0:re.family)||"PingFang SC, Microsoft YaHei, Arial, sans-serif"}},others:{baseFontWeight:((U=a==null?void 0:a.others)==null?void 0:U.baseFontWeight)||"normal"}},mode:(a==null?void 0:a.mode)||"light"},l={backgroundColor:((J=a==null?void 0:a.colors)==null?void 0:J.background)||"#E5EEFF",borderColor:((ne=a==null?void 0:a.colors)==null?void 0:ne.border)||"#84ADFF",borderRadius:((ue=a==null?void 0:a.space)==null?void 0:ue.radius)||"6px",padding:((me=a==null?void 0:a.space)==null?void 0:me.padding)||"8px 12px",margin:"2px",fontSize:((Ne=(Ce=a==null?void 0:a.fonts)==null?void 0:Ce.body)==null?void 0:Ne.size)||"14px",fontWeight:((he=(pe=a==null?void 0:a.fonts)==null?void 0:pe.body)==null?void 0:he.weight)||"500",minWidth:"30px",textColor:((ve=a==null?void 0:a.colors)==null?void 0:ve.text)||"#84ADFF"},s={...i,...n,theme:{...i.theme,...n==null?void 0:n.theme,colors:{...(be=i.theme)==null?void 0:be.colors,...(ye=n==null?void 0:n.theme)==null?void 0:ye.colors},space:{...(Ae=i.theme)==null?void 0:Ae.space,...(we=n==null?void 0:n.theme)==null?void 0:we.space},fonts:{...(He=i.theme)==null?void 0:He.fonts,...(Me=n==null?void 0:n.theme)==null?void 0:Me.fonts}},templateField:{...l,...n==null?void 0:n.templateField}},[u,c]=wt(()=>Fb(e));Ot(()=>{console.log("\u6570\u636E\u53D8\u5316\uFF0C\u540C\u6B65\u5230\u5185\u90E8\u72B6\u6001:",e);const Fe=Fb(e);console.log("\u65B0\u7684Slate\u6570\u636E:",Fe),c(Fe)},[e]),Ot(()=>{console.log("slateData \u72B6\u6001\u53D8\u5316:",u)},[u]);const f=gt((Fe,ge)=>{if(ge===Js.SLATE&&Fe){console.log("\u7F16\u8F91\u5668\u5185\u5BB9\u53D8\u5316:",Fe),c(Fe);const Se=sd(Fe);console.log("\u8F6C\u6362\u540E\u7684\u6A21\u677F\u5B57\u7B26\u4E32:",Se),t==null||t(Se)}},[t]),p=gt(Fe=>{if(!u||u.length===0)return"";switch(Fe){case"pure_string":return ez(u);case"string":return sd(u);case"markdown":return tz(u);case"html":return rz(u);default:return sd(u)}},[u]);return Ot(()=>{o==null||o(p)},[p,o]),ae.jsx(Fm,{dataSource:{type:Js.SLATE,content:u},isEditing:!0,placeholder:"\u5F00\u59CB\u7F16\u8F91\u6A21\u7248...",onChange:f,size:"md",styles:s,enableTemplateInput:!0})};export{lz as A,sz as I,uz as T,Js as b};
|