1 line
48 KiB
JavaScript
1 line
48 KiB
JavaScript
(this["webpackJsonpbeancount-web"]=this["webpackJsonpbeancount-web"]||[]).push([[0],{202:function(e,t,n){"use strict";var o=n(3),i=n(0),r=n(69),a=(n(13),n(2)),c=n(7),u=n(111),s=n(23),l=i.createContext(null);var f=n(278),p=new Map;var d=new f.a((function(e){e.forEach((function(e){var t,n=e.target;null===(t=p.get(n))||void 0===t||t.forEach((function(e){return e(n)}))}))}));var h=n(18),v=n(19),m=n(26),b=n(33),g=function(e){Object(m.a)(n,e);var t=Object(b.a)(n);function n(){return Object(h.a)(this,n),t.apply(this,arguments)}return Object(v.a)(n,[{key:"render",value:function(){return this.props.children}}]),n}(i.Component);function w(e,t){var n=e.children,o=e.disabled,r=i.useRef(null),f=i.useRef(null),h=i.useContext(l),v="function"===typeof n,m=v?n(r):n,b=i.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),w=!v&&i.isValidElement(m)&&Object(s.c)(m),O=w?m.ref:null,y=Object(s.d)(O,r),j=function(){var e;return Object(u.a)(r.current)||(r.current&&"object"===Object(c.a)(r.current)?Object(u.a)(null===(e=r.current)||void 0===e?void 0:e.nativeElement):null)||Object(u.a)(f.current)};i.useImperativeHandle(t,(function(){return j()}));var M=i.useRef(e);M.current=e;var C=i.useCallback((function(e){var t=M.current,n=t.onResize,o=t.data,i=e.getBoundingClientRect(),r=i.width,c=i.height,u=e.offsetWidth,s=e.offsetHeight,l=Math.floor(r),f=Math.floor(c);if(b.current.width!==l||b.current.height!==f||b.current.offsetWidth!==u||b.current.offsetHeight!==s){var p={width:l,height:f,offsetWidth:u,offsetHeight:s};b.current=p;var d=u===Math.round(r)?r:u,v=s===Math.round(c)?c:s,m=Object(a.a)(Object(a.a)({},p),{},{offsetWidth:d,offsetHeight:v});null===h||void 0===h||h(m,e,o),n&&Promise.resolve().then((function(){n(m,e)}))}}),[]);return i.useEffect((function(){var e,t,n=j();return n&&!o&&(e=n,t=C,p.has(e)||(p.set(e,new Set),d.observe(e)),p.get(e).add(t)),function(){return function(e,t){p.has(e)&&(p.get(e).delete(t),p.get(e).size||(d.unobserve(e),p.delete(e)))}(n,C)}}),[r.current,o]),i.createElement(g,{ref:f},w?i.cloneElement(m,{ref:y}):m)}var O=i.forwardRef(w);function y(e,t){var n=e.children;return("function"===typeof n?[n]:Object(r.a)(n)).map((function(n,r){var a=(null===n||void 0===n?void 0:n.key)||"".concat("rc-observer-key","-").concat(r);return i.createElement(O,Object(o.a)({},e,{key:a,ref:0===r?t:void 0}),n)}))}var j=i.forwardRef(y);j.Collection=function(e){var t=e.children,n=e.onBatchResize,o=i.useRef(0),r=i.useRef([]),a=i.useContext(l),c=i.useCallback((function(e,t,i){o.current+=1;var c=o.current;r.current.push({size:e,element:t,data:i}),Promise.resolve().then((function(){c===o.current&&(null===n||void 0===n||n(r.current),r.current=[])})),null===a||void 0===a||a(e,t,i)}),[n,a]);return i.createElement(l.Provider,{value:c},t)};t.a=j},227:function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return u}));var o=n(1),i=n(10),r=n.n(i),a=n(47);Object(a.a)("warning","error","");function c(e,t,n){return r()(Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)(Object(o.a)({},"".concat(e,"-status-success"),"success"===t),"".concat(e,"-status-warning"),"warning"===t),"".concat(e,"-status-error"),"error"===t),"".concat(e,"-status-validating"),"validating"===t),"".concat(e,"-has-feedback"),n))}var u=function(e,t){return t||e}},237:function(e,t,n){"use strict";var o=n(2),i=n(3),r=n(18),a=n(19),c=n(9),u=n(26),s=n(33),l=n(1),f=n(0),p=n.n(f),d=n(28),h=n.n(d),v=n(41),m=n(62),b=n(111),g=n(23),w=n(279),O=n(14),y=Object(f.forwardRef)((function(e,t){var n=e.didUpdate,o=e.getContainer,i=e.children,r=Object(f.useRef)(),a=Object(f.useRef)();Object(f.useImperativeHandle)(t,(function(){return{}}));var c=Object(f.useRef)(!1);return!c.current&&Object(O.a)()&&(a.current=o(),r.current=a.current.parentNode,c.current=!0),Object(f.useEffect)((function(){null===n||void 0===n||n(e)})),Object(f.useEffect)((function(){return null===a.current.parentNode&&null!==r.current&&r.current.appendChild(a.current),function(){var e;null===(e=a.current)||void 0===e||null===(e=e.parentNode)||void 0===e||e.removeChild(a.current)}}),[]),a.current?h.a.createPortal(i,a.current):null})),j=n(10),M=n.n(j);function C(e,t,n){return n?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}var x=n(4),T=n(17),E=n(256),k=n(39);function P(e){var t=e.prefixCls,n=e.motion,o=e.animation,i=e.transitionName;return n||(o?{motionName:"".concat(t,"-").concat(o)}:i?{motionName:i}:null)}function _(e){var t=e.prefixCls,n=e.visible,r=e.zIndex,a=e.mask,c=e.maskMotion,u=e.maskAnimation,s=e.maskTransitionName;if(!a)return null;var l={};return(c||s||u)&&(l=Object(o.a)({motionAppear:!0},P({motion:c,prefixCls:t,transitionName:s,animation:u}))),f.createElement(k.b,Object(i.a)({},l,{visible:n,removeOnLeave:!0}),(function(e){var n=e.className;return f.createElement("div",{style:{zIndex:r},className:M()("".concat(t,"-mask"),n)})}))}var D,R=n(7);function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){V(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function V(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var N={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function W(){if(void 0!==D)return D;D="";var e=document.createElement("p").style;for(var t in N)t+"Transform"in e&&(D=t);return D}function L(){return W()?"".concat(W(),"TransitionProperty"):"transitionProperty"}function z(){return W()?"".concat(W(),"Transform"):"transform"}function B(e,t){var n=L();n&&(e.style[n]=t,"transitionProperty"!==n&&(e.style.transitionProperty=t))}function F(e,t){var n=z();n&&(e.style[n]=t,"transform"!==n&&(e.style.transform=t))}var I,X=/matrix\((.*)\)/,Y=/matrix3d\((.*)\)/;function q(e){var t=e.style.display;e.style.display="none",e.offsetHeight,e.style.display=t}function U(e,t,n){var o=n;if("object"!==A(t))return"undefined"!==typeof o?("number"===typeof o&&(o="".concat(o,"px")),void(e.style[t]=o)):I(e,t);for(var i in t)t.hasOwnProperty(i)&&U(e,i,t[i])}function G(e,t){var n=e["page".concat(t?"Y":"X","Offset")],o="scroll".concat(t?"Top":"Left");if("number"!==typeof n){var i=e.document;"number"!==typeof(n=i.documentElement[o])&&(n=i.body[o])}return n}function $(e){return G(e)}function J(e){return G(e,!0)}function Z(e){var t=function(e){var t,n,o,i=e.ownerDocument,r=i.body,a=i&&i.documentElement;return t=e.getBoundingClientRect(),n=Math.floor(t.left),o=Math.floor(t.top),{left:n-=a.clientLeft||r.clientLeft||0,top:o-=a.clientTop||r.clientTop||0}}(e),n=e.ownerDocument,o=n.defaultView||n.parentWindow;return t.left+=$(o),t.top+=J(o),t}function K(e){return null!==e&&void 0!==e&&e==e.window}function Q(e){return K(e)?e.document:9===e.nodeType?e:e.ownerDocument}var ee=new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,")(?!px)[a-z%]+$"),"i"),te=/^(top|right|bottom|left)$/,ne="currentStyle",oe="runtimeStyle",ie="left";function re(e,t){return"left"===e?t.useCssRight?"right":e:t.useCssBottom?"bottom":e}function ae(e){return"left"===e?"right":"right"===e?"left":"top"===e?"bottom":"bottom"===e?"top":void 0}function ce(e,t,n){"static"===U(e,"position")&&(e.style.position="relative");var o=-999,i=-999,r=re("left",n),a=re("top",n),c=ae(r),u=ae(a);"left"!==r&&(o=999),"top"!==a&&(i=999);var s,l="",f=Z(e);("left"in t||"top"in t)&&(l=(s=e).style.transitionProperty||s.style[L()]||"",B(e,"none")),"left"in t&&(e.style[c]="",e.style[r]="".concat(o,"px")),"top"in t&&(e.style[u]="",e.style[a]="".concat(i,"px")),q(e);var p=Z(e),d={};for(var h in t)if(t.hasOwnProperty(h)){var v=re(h,n),m="left"===h?o:i,b=f[h]-p[h];d[v]=v===h?m+b:m-b}U(e,d),q(e),("left"in t||"top"in t)&&B(e,l);var g={};for(var w in t)if(t.hasOwnProperty(w)){var O=re(w,n),y=t[w]-f[w];g[O]=w===O?d[O]+y:d[O]-y}U(e,g)}function ue(e,t){var n=Z(e),o=function(e){var t=window.getComputedStyle(e,null),n=t.getPropertyValue("transform")||t.getPropertyValue(z());if(n&&"none"!==n){var o=n.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(o[12]||o[4],0),y:parseFloat(o[13]||o[5],0)}}return{x:0,y:0}}(e),i={x:o.x,y:o.y};"left"in t&&(i.x=o.x+t.left-n.left),"top"in t&&(i.y=o.y+t.top-n.top),function(e,t){var n=window.getComputedStyle(e,null),o=n.getPropertyValue("transform")||n.getPropertyValue(z());if(o&&"none"!==o){var i,r=o.match(X);r?((i=(r=r[1]).split(",").map((function(e){return parseFloat(e,10)})))[4]=t.x,i[5]=t.y,F(e,"matrix(".concat(i.join(","),")"))):((i=o.match(Y)[1].split(",").map((function(e){return parseFloat(e,10)})))[12]=t.x,i[13]=t.y,F(e,"matrix3d(".concat(i.join(","),")")))}else F(e,"translateX(".concat(t.x,"px) translateY(").concat(t.y,"px) translateZ(0)"))}(e,i)}function se(e,t){for(var n=0;n<e.length;n++)t(e[n])}function le(e){return"border-box"===I(e,"boxSizing")}"undefined"!==typeof window&&(I=window.getComputedStyle?function(e,t,n){var o=n,i="",r=Q(e);return(o=o||r.defaultView.getComputedStyle(e,null))&&(i=o.getPropertyValue(t)||o[t]),i}:function(e,t){var n=e[ne]&&e[ne][t];if(ee.test(n)&&!te.test(t)){var o=e.style,i=o[ie],r=e[oe][ie];e[oe][ie]=e[ne][ie],o[ie]="fontSize"===t?"1em":n||0,n=o.pixelLeft+"px",o[ie]=i,e[oe][ie]=r}return""===n?"auto":n});var fe=["margin","border","padding"],pe=-1,de=2,he=1;function ve(e,t,n){var o,i,r,a=0;for(i=0;i<t.length;i++)if(o=t[i])for(r=0;r<n.length;r++){var c=void 0;c="border"===o?"".concat(o).concat(n[r],"Width"):o+n[r],a+=parseFloat(I(e,c))||0}return a}var me={getParent:function(e){var t=e;do{t=11===t.nodeType&&t.host?t.host:t.parentNode}while(t&&1!==t.nodeType&&9!==t.nodeType);return t}};function be(e,t,n){var o=n;if(K(e))return"width"===t?me.viewportWidth(e):me.viewportHeight(e);if(9===e.nodeType)return"width"===t?me.docWidth(e):me.docHeight(e);var i="width"===t?["Left","Right"]:["Top","Bottom"],r="width"===t?Math.floor(e.getBoundingClientRect().width):Math.floor(e.getBoundingClientRect().height),a=le(e),c=0;(null===r||void 0===r||r<=0)&&(r=void 0,(null===(c=I(e,t))||void 0===c||Number(c)<0)&&(c=e.style[t]||0),c=Math.floor(parseFloat(c))||0),void 0===o&&(o=a?he:pe);var u=void 0!==r||a,s=r||c;return o===pe?u?s-ve(e,["border","padding"],i):c:u?o===he?s:s+(o===de?-ve(e,["border"],i):ve(e,["margin"],i)):c+ve(e,fe.slice(o),i)}se(["Width","Height"],(function(e){me["doc".concat(e)]=function(t){var n=t.document;return Math.max(n.documentElement["scroll".concat(e)],n.body["scroll".concat(e)],me["viewport".concat(e)](n))},me["viewport".concat(e)]=function(t){var n="client".concat(e),o=t.document,i=o.body,r=o.documentElement[n];return"CSS1Compat"===o.compatMode&&r||i&&i[n]||r}}));var ge={position:"absolute",visibility:"hidden",display:"block"};function we(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var o,i=t[0];return 0!==i.offsetWidth?o=be.apply(void 0,t):function(e,t,n){var o,i={},r=e.style;for(o in t)t.hasOwnProperty(o)&&(i[o]=r[o],r[o]=t[o]);for(o in n.call(e),t)t.hasOwnProperty(o)&&(r[o]=i[o])}(i,ge,(function(){o=be.apply(void 0,t)})),o}function Oe(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}se(["width","height"],(function(e){var t=e.charAt(0).toUpperCase()+e.slice(1);me["outer".concat(t)]=function(t,n){return t&&we(t,e,n?0:he)};var n="width"===e?["Left","Right"]:["Top","Bottom"];me[e]=function(t,o){var i=o;return void 0!==i?t?(le(t)&&(i+=ve(t,["padding","border"],n)),U(t,e,i)):void 0:t&&we(t,e,pe)}}));var ye={getWindow:function(e){if(e&&e.document&&e.setTimeout)return e;var t=e.ownerDocument||e;return t.defaultView||t.parentWindow},getDocument:Q,offset:function(e,t,n){if("undefined"===typeof t)return Z(e);!function(e,t,n){if(n.ignoreShake){var o=Z(e),i=o.left.toFixed(0),r=o.top.toFixed(0),a=t.left.toFixed(0),c=t.top.toFixed(0);if(i===a&&r===c)return}n.useCssRight||n.useCssBottom?ce(e,t,n):n.useCssTransform&&z()in document.body.style?ue(e,t):ce(e,t,n)}(e,t,n||{})},isWindow:K,each:se,css:U,clone:function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=e[t]);if(e.overflow)for(t in e)e.hasOwnProperty(t)&&(n.overflow[t]=e.overflow[t]);return n},mix:Oe,getWindowScrollLeft:function(e){return $(e)},getWindowScrollTop:function(e){return J(e)},merge:function(){for(var e={},t=0;t<arguments.length;t++)ye.mix(e,t<0||arguments.length<=t?void 0:arguments[t]);return e},viewportWidth:0,viewportHeight:0};Oe(ye,me);var je=ye.getParent;function Me(e){if(ye.isWindow(e)||9===e.nodeType)return null;var t,n=ye.getDocument(e).body,o=ye.css(e,"position");if(!("fixed"===o||"absolute"===o))return"html"===e.nodeName.toLowerCase()?null:je(e);for(t=je(e);t&&t!==n&&9!==t.nodeType;t=je(t))if("static"!==(o=ye.css(t,"position")))return t;return null}var Ce=ye.getParent;function xe(e,t){for(var n={left:0,right:1/0,top:0,bottom:1/0},o=Me(e),i=ye.getDocument(e),r=i.defaultView||i.parentWindow,a=i.body,c=i.documentElement;o;){if(-1!==navigator.userAgent.indexOf("MSIE")&&0===o.clientWidth||o===a||o===c||"visible"===ye.css(o,"overflow")){if(o===a||o===c)break}else{var u=ye.offset(o);u.left+=o.clientLeft,u.top+=o.clientTop,n.top=Math.max(n.top,u.top),n.right=Math.min(n.right,u.left+o.clientWidth),n.bottom=Math.min(n.bottom,u.top+o.clientHeight),n.left=Math.max(n.left,u.left)}o=Me(o)}var s=null;ye.isWindow(e)||9===e.nodeType||(s=e.style.position,"absolute"===ye.css(e,"position")&&(e.style.position="fixed"));var l=ye.getWindowScrollLeft(r),f=ye.getWindowScrollTop(r),p=ye.viewportWidth(r),d=ye.viewportHeight(r),h=c.scrollWidth,v=c.scrollHeight,m=window.getComputedStyle(a);if("hidden"===m.overflowX&&(h=r.innerWidth),"hidden"===m.overflowY&&(v=r.innerHeight),e.style&&(e.style.position=s),t||function(e){if(ye.isWindow(e)||9===e.nodeType)return!1;var t=ye.getDocument(e),n=t.body,o=null;for(o=Ce(e);o&&o!==n&&o!==t;o=Ce(o))if("fixed"===ye.css(o,"position"))return!0;return!1}(e))n.left=Math.max(n.left,l),n.top=Math.max(n.top,f),n.right=Math.min(n.right,l+p),n.bottom=Math.min(n.bottom,f+d);else{var b=Math.max(h,l+p);n.right=Math.min(n.right,b);var g=Math.max(v,f+d);n.bottom=Math.min(n.bottom,g)}return n.top>=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function Te(e){var t,n,o;if(ye.isWindow(e)||9===e.nodeType){var i=ye.getWindow(e);t={left:ye.getWindowScrollLeft(i),top:ye.getWindowScrollTop(i)},n=ye.viewportWidth(i),o=ye.viewportHeight(i)}else t=ye.offset(e),n=ye.outerWidth(e),o=ye.outerHeight(e);return t.width=n,t.height=o,t}function Ee(e,t){var n=t.charAt(0),o=t.charAt(1),i=e.width,r=e.height,a=e.left,c=e.top;return"c"===n?c+=r/2:"b"===n&&(c+=r),"c"===o?a+=i/2:"r"===o&&(a+=i),{left:a,top:c}}function ke(e,t,n,o,i){var r=Ee(t,n[1]),a=Ee(e,n[0]),c=[a.left-r.left,a.top-r.top];return{left:Math.round(e.left-c[0]+o[0]-i[0]),top:Math.round(e.top-c[1]+o[1]-i[1])}}function Pe(e,t,n){return e.left<n.left||e.left+t.width>n.right}function _e(e,t,n){return e.top<n.top||e.top+t.height>n.bottom}function De(e,t,n){var o=[];return ye.each(e,(function(e){o.push(e.replace(t,(function(e){return n[e]})))})),o}function Re(e,t){return e[t]=-e[t],e}function Se(e,t){return(/%$/.test(e)?parseInt(e.substring(0,e.length-1),10)/100*t:parseInt(e,10))||0}function He(e,t){e[0]=Se(e[0],t.width),e[1]=Se(e[1],t.height)}function Ae(e,t,n,o){var i=n.points,r=n.offset||[0,0],a=n.targetOffset||[0,0],c=n.overflow,u=n.source||e;r=[].concat(r),a=[].concat(a);var s={},l=0,f=xe(u,!(!(c=c||{})||!c.alwaysByViewport)),p=Te(u);He(r,p),He(a,t);var d=ke(p,t,i,r,a),h=ye.merge(p,d);if(f&&(c.adjustX||c.adjustY)&&o){if(c.adjustX&&Pe(d,p,f)){var v=De(i,/[lr]/gi,{l:"r",r:"l"}),m=Re(r,0),b=Re(a,0);(function(e,t,n){return e.left>n.right||e.left+t.width<n.left})(ke(p,t,v,m,b),p,f)||(l=1,i=v,r=m,a=b)}if(c.adjustY&&_e(d,p,f)){var g=De(i,/[tb]/gi,{t:"b",b:"t"}),w=Re(r,1),O=Re(a,1);(function(e,t,n){return e.top>n.bottom||e.top+t.height<n.top})(ke(p,t,g,w,O),p,f)||(l=1,i=g,r=w,a=O)}l&&(d=ke(p,t,i,r,a),ye.mix(h,d));var y=Pe(d,p,f),j=_e(d,p,f);if(y||j){var M=i;y&&(M=De(i,/[lr]/gi,{l:"r",r:"l"})),j&&(M=De(i,/[tb]/gi,{t:"b",b:"t"})),i=M,r=n.offset||[0,0],a=n.targetOffset||[0,0]}s.adjustX=c.adjustX&&y,s.adjustY=c.adjustY&&j,(s.adjustX||s.adjustY)&&(h=function(e,t,n,o){var i=ye.clone(e),r={width:t.width,height:t.height};return o.adjustX&&i.left<n.left&&(i.left=n.left),o.resizeWidth&&i.left>=n.left&&i.left+r.width>n.right&&(r.width-=i.left+r.width-n.right),o.adjustX&&i.left+r.width>n.right&&(i.left=Math.max(n.right-r.width,n.left)),o.adjustY&&i.top<n.top&&(i.top=n.top),o.resizeHeight&&i.top>=n.top&&i.top+r.height>n.bottom&&(r.height-=i.top+r.height-n.bottom),o.adjustY&&i.top+r.height>n.bottom&&(i.top=Math.max(n.bottom-r.height,n.top)),ye.mix(i,r)}(d,p,f,s))}return h.width!==p.width&&ye.css(u,"width",ye.width(u)+h.width-p.width),h.height!==p.height&&ye.css(u,"height",ye.height(u)+h.height-p.height),ye.offset(u,{left:h.left,top:h.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:i,offset:r,targetOffset:a,overflow:s}}function Ve(e,t,n){var o=n.target||t,i=Te(o),r=!function(e,t){var n=xe(e,t),o=Te(e);return!n||o.left+o.width<=n.left||o.top+o.height<=n.top||o.left>=n.right||o.top>=n.bottom}(o,n.overflow&&n.overflow.alwaysByViewport);return Ae(e,i,n,r)}Ve.__getOffsetParent=Me,Ve.__getVisibleRectForElement=xe;var Ne=n(109),We=n(257),Le=n(40),ze=n(278);function Be(e,t){var n=null,o=null;var i=new ze.a((function(e){var i=Object(x.a)(e,1)[0].target;if(document.documentElement.contains(i)){var r=i.getBoundingClientRect(),a=r.width,c=r.height,u=Math.floor(a),s=Math.floor(c);n===u&&o===s||Promise.resolve().then((function(){t({width:u,height:s})})),n=u,o=s}}));return e&&i.observe(e),function(){i.disconnect()}}function Fe(e){return"function"!==typeof e?null:e()}function Ie(e){return"object"===Object(R.a)(e)&&e?e:null}var Xe=function(e,t){var n=e.children,o=e.disabled,i=e.target,r=e.align,a=e.onAlign,c=e.monitorWindowResize,u=e.monitorBufferTime,s=void 0===u?0:u,l=p.a.useRef({}),f=p.a.useRef(),d=p.a.Children.only(n),h=p.a.useRef({});h.current.disabled=o,h.current.target=i,h.current.align=r,h.current.onAlign=a;var v=function(e,t){var n=p.a.useRef(!1),o=p.a.useRef(null);function i(){window.clearTimeout(o.current)}return[function r(a){if(i(),n.current&&!0!==a)o.current=window.setTimeout((function(){n.current=!1,r()}),t);else{if(!1===e(a))return;n.current=!0,o.current=window.setTimeout((function(){n.current=!1}),t)}},function(){n.current=!1,i()}]}((function(){var e=h.current,t=e.disabled,n=e.target,o=e.align,i=e.onAlign,r=f.current;if(!t&&n&&r){var a,c=Fe(n),u=Ie(n);l.current.element=c,l.current.point=u,l.current.align=o;var s=document.activeElement;return c&&Object(We.a)(c)?a=Ve(r,c,o):u&&(a=function(e,t,n){var o,i,r=ye.getDocument(e),a=r.defaultView||r.parentWindow,c=ye.getWindowScrollLeft(a),u=ye.getWindowScrollTop(a),s=ye.viewportWidth(a),l=ye.viewportHeight(a),f={left:o="pageX"in t?t.pageX:c+t.clientX,top:i="pageY"in t?t.pageY:u+t.clientY,width:0,height:0},p=o>=0&&o<=c+s&&i>=0&&i<=u+l,d=[n.points[0],"cc"];return Ae(e,f,H(H({},n),{},{points:d}),p)}(r,u,o)),function(e,t){e!==document.activeElement&&Object(m.a)(t,e)&&"function"===typeof e.focus&&e.focus()}(s,r),i&&a&&i(r,a),!0}return!1}),s),b=Object(x.a)(v,2),O=b[0],y=b[1],j=p.a.useState(),M=Object(x.a)(j,2),C=M[0],T=M[1],E=p.a.useState(),k=Object(x.a)(E,2),P=k[0],_=k[1];return Object(Le.a)((function(){T(Fe(i)),_(Ie(i))})),p.a.useEffect((function(){var e,t;l.current.element===C&&((e=l.current.point)===(t=P)||e&&t&&("pageX"in t&&"pageY"in t?e.pageX===t.pageX&&e.pageY===t.pageY:"clientX"in t&&"clientY"in t&&e.clientX===t.clientX&&e.clientY===t.clientY))&&Object(Ne.a)(l.current.align,r)||O()})),p.a.useEffect((function(){return Be(f.current,O)}),[f.current]),p.a.useEffect((function(){return Be(C,O)}),[C]),p.a.useEffect((function(){o?y():O()}),[o]),p.a.useEffect((function(){if(c)return Object(w.a)(window,"resize",O).remove}),[c]),p.a.useEffect((function(){return function(){y()}}),[]),p.a.useImperativeHandle(t,(function(){return{forceAlign:function(){return O(!0)}}})),p.a.isValidElement(d)&&(d=p.a.cloneElement(d,{ref:Object(g.a)(d.ref,f)})),d},Ye=p.a.forwardRef(Xe);Ye.displayName="Align";var qe=Ye,Ue=n(16),Ge=n(34),$e=n(29),Je=["measure","alignPre","align",null,"motion"],Ze=f.forwardRef((function(e,t){var n=e.visible,r=e.prefixCls,a=e.className,c=e.style,u=e.children,s=e.zIndex,l=e.stretch,p=e.destroyPopupOnHide,d=e.forceRender,h=e.align,m=e.point,b=e.getRootDomNode,g=e.getClassNameFromAlign,w=e.onAlign,O=e.onMouseEnter,y=e.onMouseLeave,j=e.onMouseDown,C=e.onTouchStart,T=e.onClick,E=Object(f.useRef)(),_=Object(f.useRef)(),D=Object(f.useState)(),R=Object(x.a)(D,2),S=R[0],H=R[1],A=function(e){var t=f.useState({width:0,height:0}),n=Object(x.a)(t,2),o=n[0],i=n[1];return[f.useMemo((function(){var t={};if(e){var n=o.width,i=o.height;-1!==e.indexOf("height")&&i?t.height=i:-1!==e.indexOf("minHeight")&&i&&(t.minHeight=i),-1!==e.indexOf("width")&&n?t.width=n:-1!==e.indexOf("minWidth")&&n&&(t.minWidth=n)}return t}),[e,o]),function(e){var t=e.offsetWidth,n=e.offsetHeight,o=e.getBoundingClientRect(),r=o.width,a=o.height;Math.abs(t-r)<1&&Math.abs(n-a)<1&&(t=r,n=a),i({width:t,height:n})}]}(l),V=Object(x.a)(A,2),N=V[0],W=V[1];var L=function(e,t){var n=Object($e.a)(null),o=Object(x.a)(n,2),i=o[0],r=o[1],a=Object(f.useRef)();function c(e){r(e,!0)}function u(){v.a.cancel(a.current)}return Object(f.useEffect)((function(){c("measure")}),[e]),Object(f.useEffect)((function(){"measure"===i&&t(),i&&(a.current=Object(v.a)(Object(Ge.a)(Object(Ue.a)().mark((function e(){var t,n;return Object(Ue.a)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=Je.indexOf(i),(n=Je[t+1])&&-1!==t&&c(n);case 3:case"end":return e.stop()}}),e)})))))}),[i]),Object(f.useEffect)((function(){return function(){u()}}),[]),[i,function(e){u(),a.current=Object(v.a)((function(){c((function(e){switch(i){case"align":return"motion";case"motion":return"stable"}return e})),null===e||void 0===e||e()}))}]}(n,(function(){l&&W(b())})),z=Object(x.a)(L,2),B=z[0],F=z[1],I=Object(f.useState)(0),X=Object(x.a)(I,2),Y=X[0],q=X[1],U=Object(f.useRef)();function G(){var e;null===(e=E.current)||void 0===e||e.forceAlign()}function $(e,t){var n=g(t);S!==n&&H(n),q((function(e){return e+1})),"align"===B&&(null===w||void 0===w||w(e,t))}Object(Le.a)((function(){"alignPre"===B&&q(0)}),[B]),Object(Le.a)((function(){"align"===B&&(Y<3?G():F((function(){var e;null===(e=U.current)||void 0===e||e.call(U)})))}),[Y]);var J=Object(o.a)({},P(e));function Z(){return new Promise((function(e){U.current=e}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(e){var t=J[e];J[e]=function(e,n){return F(),null===t||void 0===t?void 0:t(e,n)}})),f.useEffect((function(){J.motionName||"motion"!==B||F()}),[J.motionName,B]),f.useImperativeHandle(t,(function(){return{forceAlign:G,getElement:function(){return _.current}}}));var K=Object(o.a)(Object(o.a)({},N),{},{zIndex:s,opacity:"motion"!==B&&"stable"!==B&&n?0:void 0,pointerEvents:n||"stable"===B?void 0:"none"},c),Q=!0;null===h||void 0===h||!h.points||"align"!==B&&"stable"!==B||(Q=!1);var ee=u;return f.Children.count(u)>1&&(ee=f.createElement("div",{className:"".concat(r,"-content")},u)),f.createElement(k.b,Object(i.a)({visible:n,ref:_,leavedClassName:"".concat(r,"-hidden")},J,{onAppearPrepare:Z,onEnterPrepare:Z,removeOnLeave:p,forceRender:d}),(function(e,t){var n=e.className,i=e.style,c=M()(r,a,S,n);return f.createElement(qe,{target:m||b,key:"popup",ref:E,monitorWindowResize:!0,disabled:Q,align:h,onAlign:$},f.createElement("div",{ref:t,className:c,onMouseEnter:O,onMouseLeave:y,onMouseDownCapture:j,onTouchStartCapture:C,onClick:T,style:Object(o.a)(Object(o.a)({},i),K)},ee))}))}));Ze.displayName="PopupInner";var Ke=Ze,Qe=f.forwardRef((function(e,t){var n=e.prefixCls,r=e.visible,a=e.zIndex,c=e.children,u=e.mobile,s=(u=void 0===u?{}:u).popupClassName,l=u.popupStyle,p=u.popupMotion,d=void 0===p?{}:p,h=u.popupRender,v=e.onClick,m=f.useRef();f.useImperativeHandle(t,(function(){return{forceAlign:function(){},getElement:function(){return m.current}}}));var b=Object(o.a)({zIndex:a},l),g=c;return f.Children.count(c)>1&&(g=f.createElement("div",{className:"".concat(n,"-content")},c)),h&&(g=h(g)),f.createElement(k.b,Object(i.a)({visible:r,ref:m,removeOnLeave:!0},d),(function(e,t){var i=e.className,r=e.style,a=M()(n,s,i);return f.createElement("div",{ref:t,className:a,onClick:v,style:Object(o.a)(Object(o.a)({},r),b)},g)}))}));Qe.displayName="MobilePopupInner";var et=Qe,tt=["visible","mobile"],nt=f.forwardRef((function(e,t){var n=e.visible,r=e.mobile,a=Object(T.a)(e,tt),c=Object(f.useState)(n),u=Object(x.a)(c,2),s=u[0],l=u[1],p=Object(f.useState)(!1),d=Object(x.a)(p,2),h=d[0],v=d[1],m=Object(o.a)(Object(o.a)({},a),{},{visible:s});Object(f.useEffect)((function(){l(n),n&&r&&v(Object(E.a)())}),[n,r]);var b=h?f.createElement(et,Object(i.a)({},m,{mobile:r,ref:t})):f.createElement(Ke,Object(i.a)({},m,{ref:t}));return f.createElement("div",null,f.createElement(_,m),b)}));nt.displayName="Popup";var ot=nt,it=f.createContext(null);function rt(){}function at(){return""}function ct(e){return e?e.ownerDocument:window.document}var ut=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];t.a=function(e){var t=function(t){Object(u.a)(p,t);var n=Object(s.a)(p);function p(e){var t,o;return Object(r.a)(this,p),t=n.call(this,e),Object(l.a)(Object(c.a)(t),"popupRef",f.createRef()),Object(l.a)(Object(c.a)(t),"triggerRef",f.createRef()),Object(l.a)(Object(c.a)(t),"portalContainer",void 0),Object(l.a)(Object(c.a)(t),"attachId",void 0),Object(l.a)(Object(c.a)(t),"clickOutsideHandler",void 0),Object(l.a)(Object(c.a)(t),"touchOutsideHandler",void 0),Object(l.a)(Object(c.a)(t),"contextMenuOutsideHandler1",void 0),Object(l.a)(Object(c.a)(t),"contextMenuOutsideHandler2",void 0),Object(l.a)(Object(c.a)(t),"mouseDownTimeout",void 0),Object(l.a)(Object(c.a)(t),"focusTime",void 0),Object(l.a)(Object(c.a)(t),"preClickTime",void 0),Object(l.a)(Object(c.a)(t),"preTouchTime",void 0),Object(l.a)(Object(c.a)(t),"delayTimer",void 0),Object(l.a)(Object(c.a)(t),"hasPopupMouseDown",void 0),Object(l.a)(Object(c.a)(t),"onMouseEnter",(function(e){var n=t.props.mouseEnterDelay;t.fireEvents("onMouseEnter",e),t.delaySetPopupVisible(!0,n,n?null:e)})),Object(l.a)(Object(c.a)(t),"onMouseMove",(function(e){t.fireEvents("onMouseMove",e),t.setPoint(e)})),Object(l.a)(Object(c.a)(t),"onMouseLeave",(function(e){t.fireEvents("onMouseLeave",e),t.delaySetPopupVisible(!1,t.props.mouseLeaveDelay)})),Object(l.a)(Object(c.a)(t),"onPopupMouseEnter",(function(){t.clearDelayTimer()})),Object(l.a)(Object(c.a)(t),"onPopupMouseLeave",(function(e){var n;e.relatedTarget&&!e.relatedTarget.setTimeout&&Object(m.a)(null===(n=t.popupRef.current)||void 0===n?void 0:n.getElement(),e.relatedTarget)||t.delaySetPopupVisible(!1,t.props.mouseLeaveDelay)})),Object(l.a)(Object(c.a)(t),"onFocus",(function(e){t.fireEvents("onFocus",e),t.clearDelayTimer(),t.isFocusToShow()&&(t.focusTime=Date.now(),t.delaySetPopupVisible(!0,t.props.focusDelay))})),Object(l.a)(Object(c.a)(t),"onMouseDown",(function(e){t.fireEvents("onMouseDown",e),t.preClickTime=Date.now()})),Object(l.a)(Object(c.a)(t),"onTouchStart",(function(e){t.fireEvents("onTouchStart",e),t.preTouchTime=Date.now()})),Object(l.a)(Object(c.a)(t),"onBlur",(function(e){t.fireEvents("onBlur",e),t.clearDelayTimer(),t.isBlurToHide()&&t.delaySetPopupVisible(!1,t.props.blurDelay)})),Object(l.a)(Object(c.a)(t),"onContextMenu",(function(e){e.preventDefault(),t.fireEvents("onContextMenu",e),t.setPopupVisible(!0,e)})),Object(l.a)(Object(c.a)(t),"onContextMenuClose",(function(){t.isContextMenuToShow()&&t.close()})),Object(l.a)(Object(c.a)(t),"onClick",(function(e){if(t.fireEvents("onClick",e),t.focusTime){var n;if(t.preClickTime&&t.preTouchTime?n=Math.min(t.preClickTime,t.preTouchTime):t.preClickTime?n=t.preClickTime:t.preTouchTime&&(n=t.preTouchTime),Math.abs(n-t.focusTime)<20)return;t.focusTime=0}t.preClickTime=0,t.preTouchTime=0,t.isClickToShow()&&(t.isClickToHide()||t.isBlurToHide())&&e&&e.preventDefault&&e.preventDefault();var o=!t.state.popupVisible;(t.isClickToHide()&&!o||o&&t.isClickToShow())&&t.setPopupVisible(!t.state.popupVisible,e)})),Object(l.a)(Object(c.a)(t),"onPopupMouseDown",(function(){var e;(t.hasPopupMouseDown=!0,clearTimeout(t.mouseDownTimeout),t.mouseDownTimeout=window.setTimeout((function(){t.hasPopupMouseDown=!1}),0),t.context)&&(e=t.context).onPopupMouseDown.apply(e,arguments)})),Object(l.a)(Object(c.a)(t),"onDocumentClick",(function(e){if(!t.props.mask||t.props.maskClosable){var n=e.target,o=t.getRootDomNode(),i=t.getPopupDomNode();Object(m.a)(o,n)&&!t.isContextMenuOnly()||Object(m.a)(i,n)||t.hasPopupMouseDown||t.close()}})),Object(l.a)(Object(c.a)(t),"getRootDomNode",(function(){var e=t.props.getTriggerDOMNode;if(e)return e(t.triggerRef.current);try{var n=Object(b.a)(t.triggerRef.current);if(n)return n}catch(o){}return h.a.findDOMNode(Object(c.a)(t))})),Object(l.a)(Object(c.a)(t),"getPopupClassNameFromAlign",(function(e){var n=[],o=t.props,i=o.popupPlacement,r=o.builtinPlacements,a=o.prefixCls,c=o.alignPoint,u=o.getPopupClassNameFromAlign;return i&&r&&n.push(function(e,t,n,o){for(var i=n.points,r=Object.keys(e),a=0;a<r.length;a+=1){var c=r[a];if(C(e[c].points,i,o))return"".concat(t,"-placement-").concat(c)}return""}(r,a,e,c)),u&&n.push(u(e)),n.join(" ")})),Object(l.a)(Object(c.a)(t),"getComponent",(function(){var e=t.props,n=e.prefixCls,o=e.destroyPopupOnHide,r=e.popupClassName,a=e.onPopupAlign,c=e.popupMotion,u=e.popupAnimation,s=e.popupTransitionName,l=e.popupStyle,p=e.mask,d=e.maskAnimation,h=e.maskTransitionName,v=e.maskMotion,m=e.zIndex,b=e.popup,g=e.stretch,w=e.alignPoint,O=e.mobile,y=e.forceRender,j=e.onPopupClick,M=t.state,C=M.popupVisible,x=M.point,T=t.getPopupAlign(),E={};return t.isMouseEnterToShow()&&(E.onMouseEnter=t.onPopupMouseEnter),t.isMouseLeaveToHide()&&(E.onMouseLeave=t.onPopupMouseLeave),E.onMouseDown=t.onPopupMouseDown,E.onTouchStart=t.onPopupMouseDown,f.createElement(ot,Object(i.a)({prefixCls:n,destroyPopupOnHide:o,visible:C,point:w&&x,className:r,align:T,onAlign:a,animation:u,getClassNameFromAlign:t.getPopupClassNameFromAlign},E,{stretch:g,getRootDomNode:t.getRootDomNode,style:l,mask:p,zIndex:m,transitionName:s,maskAnimation:d,maskTransitionName:h,maskMotion:v,ref:t.popupRef,motion:c,mobile:O,forceRender:y,onClick:j}),"function"===typeof b?b():b)})),Object(l.a)(Object(c.a)(t),"attachParent",(function(e){v.a.cancel(t.attachId);var n,o=t.props,i=o.getPopupContainer,r=o.getDocument,a=t.getRootDomNode();i?(a||0===i.length)&&(n=i(a)):n=r(t.getRootDomNode()).body,n?n.appendChild(e):t.attachId=Object(v.a)((function(){t.attachParent(e)}))})),Object(l.a)(Object(c.a)(t),"getContainer",(function(){if(!t.portalContainer){var e=(0,t.props.getDocument)(t.getRootDomNode()).createElement("div");e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.width="100%",t.portalContainer=e}return t.attachParent(t.portalContainer),t.portalContainer})),Object(l.a)(Object(c.a)(t),"setPoint",(function(e){t.props.alignPoint&&e&&t.setState({point:{pageX:e.pageX,pageY:e.pageY}})})),Object(l.a)(Object(c.a)(t),"handlePortalUpdate",(function(){t.state.prevPopupVisible!==t.state.popupVisible&&t.props.afterPopupVisibleChange(t.state.popupVisible)})),Object(l.a)(Object(c.a)(t),"triggerContextValue",{onPopupMouseDown:t.onPopupMouseDown}),o="popupVisible"in e?!!e.popupVisible:!!e.defaultPopupVisible,t.state={prevPopupVisible:o,popupVisible:o},ut.forEach((function(e){t["fire".concat(e)]=function(n){t.fireEvents(e,n)}})),t}return Object(a.a)(p,[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e,t=this.props;if(this.state.popupVisible)return this.clickOutsideHandler||!this.isClickToHide()&&!this.isContextMenuToShow()||(e=t.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Object(w.a)(e,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(e=e||t.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Object(w.a)(e,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(e=e||t.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=Object(w.a)(e,"scroll",this.onContextMenuClose)),void(!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(w.a)(window,"blur",this.onContextMenuClose)));this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),v.a.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var e;return(null===(e=this.popupRef.current)||void 0===e?void 0:e.getElement())||null}},{key:"getPopupAlign",value:function(){var e=this.props,t=e.popupPlacement,n=e.popupAlign,i=e.builtinPlacements;return t&&i?function(e,t,n){var i=e[t]||{};return Object(o.a)(Object(o.a)({},i),n)}(i,t,n):n}},{key:"setPopupVisible",value:function(e,t){var n=this.props.alignPoint,o=this.state.popupVisible;this.clearDelayTimer(),o!==e&&("popupVisible"in this.props||this.setState({popupVisible:e,prevPopupVisible:o}),this.props.onPopupVisibleChange(e)),n&&t&&e&&this.setPoint(t)}},{key:"delaySetPopupVisible",value:function(e,t,n){var o=this,i=1e3*t;if(this.clearDelayTimer(),i){var r=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=window.setTimeout((function(){o.setPopupVisible(e,r),o.clearDelayTimer()}),i)}else this.setPopupVisible(e,n)}},{key:"clearDelayTimer",value:function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}},{key:"clearOutsideHandler",value:function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)}},{key:"createTwoChains",value:function(e){var t=this.props.children.props,n=this.props;return t[e]&&n[e]?this["fire".concat(e)]:t[e]||n[e]}},{key:"isClickToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isContextMenuOnly",value:function(){var e=this.props.action;return"contextMenu"===e||1===e.length&&"contextMenu"===e[0]}},{key:"isContextMenuToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("contextMenu")||-1!==n.indexOf("contextMenu")}},{key:"isClickToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")}},{key:"isMouseEnterToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseEnter")}},{key:"isMouseLeaveToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseLeave")}},{key:"isFocusToShow",value:function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("focus")}},{key:"isBlurToHide",value:function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("blur")}},{key:"forcePopupAlign",value:function(){var e;this.state.popupVisible&&(null===(e=this.popupRef.current)||void 0===e||e.forceAlign())}},{key:"fireEvents",value:function(e,t){var n=this.props.children.props[e];n&&n(t);var o=this.props[e];o&&o(t)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var t=this.state.popupVisible,n=this.props,i=n.children,r=n.forceRender,a=n.alignPoint,c=n.className,u=n.autoDestroy,s=f.Children.only(i),l={key:"trigger"};this.isContextMenuToShow()?l.onContextMenu=this.onContextMenu:l.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(l.onClick=this.onClick,l.onMouseDown=this.onMouseDown,l.onTouchStart=this.onTouchStart):(l.onClick=this.createTwoChains("onClick"),l.onMouseDown=this.createTwoChains("onMouseDown"),l.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(l.onMouseEnter=this.onMouseEnter,a&&(l.onMouseMove=this.onMouseMove)):l.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?l.onMouseLeave=this.onMouseLeave:l.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(l.onFocus=this.onFocus,l.onBlur=this.onBlur):(l.onFocus=this.createTwoChains("onFocus"),l.onBlur=this.createTwoChains("onBlur"));var p=M()(s&&s.props&&s.props.className,c);p&&(l.className=p);var d=Object(o.a)({},l);Object(g.c)(s)&&(d.ref=Object(g.a)(this.triggerRef,s.ref));var h,v=f.cloneElement(s,d);return(t||this.popupRef.current||r)&&(h=f.createElement(e,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!t&&u&&(h=null),f.createElement(it.Provider,{value:this.triggerContextValue},v,h)}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.popupVisible,o={};return void 0!==n&&t.popupVisible!==n&&(o.popupVisible=n,o.prevPopupVisible=t.popupVisible),o}}]),p}(f.Component);return Object(l.a)(t,"contextType",it),Object(l.a)(t,"defaultProps",{prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:at,getDocument:ct,onPopupVisibleChange:rt,afterPopupVisibleChange:rt,onPopupAlign:rt,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1}),t}(y)},256:function(e,t,n){"use strict";t.a=function(){if("undefined"===typeof navigator||"undefined"===typeof window)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(null===e||void 0===e?void 0:e.substr(0,4))}},257:function(e,t,n){"use strict";t.a=function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),n=t.width,o=t.height;if(n||o)return!0}if(e.getBoundingClientRect){var i=e.getBoundingClientRect(),r=i.width,a=i.height;if(r||a)return!0}}return!1}},278:function(e,t,n){"use strict";(function(e){var n=function(){if("undefined"!==typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,o){return e[0]===t&&(n=o,!0)})),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(t){var n=e(this.__entries__,t),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(t,n){var o=e(this.__entries__,t);~o?this.__entries__[o][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,o=e(n,t);~o&&n.splice(o,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,o=this.__entries__;n<o.length;n++){var i=o[n];e.call(t,i[1],i[0])}},t}()}(),o="undefined"!==typeof window&&"undefined"!==typeof document&&window.document===document,i="undefined"!==typeof e&&e.Math===Math?e:"undefined"!==typeof self&&self.Math===Math?self:"undefined"!==typeof window&&window.Math===Math?window:Function("return this")(),r="function"===typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],c="undefined"!==typeof MutationObserver,u=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,o=!1,i=0;function a(){n&&(n=!1,e()),o&&u()}function c(){r(a)}function u(){var e=Date.now();if(n){if(e-i<2)return;o=!0}else n=!0,o=!1,setTimeout(c,t);i=e}return u}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){o&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),c?(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(){o&&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(e){var t=e.propertyName,n=void 0===t?"":t;a.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),s=function(e,t){for(var n=0,o=Object.keys(t);n<o.length;n++){var i=o[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},l=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||i},f=b(0,0,0,0);function p(e){return parseFloat(e)||0}function d(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+p(e["border-"+n+"-width"])}),0)}function h(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return f;var o=l(e).getComputedStyle(e),i=function(e){for(var t={},n=0,o=["top","right","bottom","left"];n<o.length;n++){var i=o[n],r=e["padding-"+i];t[i]=p(r)}return t}(o),r=i.left+i.right,a=i.top+i.bottom,c=p(o.width),u=p(o.height);if("border-box"===o.boxSizing&&(Math.round(c+r)!==t&&(c-=d(o,"left","right")+r),Math.round(u+a)!==n&&(u-=d(o,"top","bottom")+a)),!function(e){return e===l(e).document.documentElement}(e)){var s=Math.round(c+r)-t,h=Math.round(u+a)-n;1!==Math.abs(s)&&(c-=s),1!==Math.abs(h)&&(u-=h)}return b(i.left,i.top,c,u)}var v="undefined"!==typeof SVGGraphicsElement?function(e){return e instanceof l(e).SVGGraphicsElement}:function(e){return e instanceof l(e).SVGElement&&"function"===typeof e.getBBox};function m(e){return o?v(e)?function(e){var t=e.getBBox();return b(0,0,t.width,t.height)}(e):h(e):f}function b(e,t,n,o){return{x:e,y:t,width:n,height:o}}var g=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=b(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=m(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),w=function(e,t){var n=function(e){var t=e.x,n=e.y,o=e.width,i=e.height,r="undefined"!==typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(r.prototype);return s(a,{x:t,y:n,width:o,height:i,top:n,right:t+o,bottom:i+n,left:t}),a}(t);s(this,{target:e,contentRect:n})},O=function(){function e(e,t,o){if(this.activeObservations_=[],this.observations_=new n,"function"!==typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=o}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof l(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new g(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof l(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new w(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),y="undefined"!==typeof WeakMap?new WeakMap:new n,j=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 n=u.getInstance(),o=new O(t,n,this);y.set(this,o)};["observe","unobserve","disconnect"].forEach((function(e){j.prototype[e]=function(){var t;return(t=y.get(this))[e].apply(t,arguments)}}));var M="undefined"!==typeof i.ResizeObserver?i.ResizeObserver:j;t.a=M}).call(this,n(94))},279:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var o=n(28),i=n.n(o);function r(e,t,n,o){var r=i.a.unstable_batchedUpdates?function(e){i.a.unstable_batchedUpdates(n,e)}:n;return null!==e&&void 0!==e&&e.addEventListener&&e.addEventListener(t,r,o),{remove:function(){null!==e&&void 0!==e&&e.removeEventListener&&e.removeEventListener(t,r,o)}}}},328:function(e,t,n){"use strict";var o=n(2),i=n(0),r={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"},a=n(12),c=function(e,t){return i.createElement(a.a,Object(o.a)(Object(o.a)({},e),{},{ref:t,icon:r}))},u=i.forwardRef(c);t.a=u}}]); |