/*! For license information please see 16.2ad77b34.chunk.js.LICENSE.txt */ (this["webpackJsonpbeancount-web"]=this["webpackJsonpbeancount-web"]||[]).push([[16],{208:function(e,t,n){"use strict";var r=n(2),o=n(7),a=n(0);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:1,n=h+=1;function r(t){if(0===t)b(n),e();else{var o=m((function(){r(t-1)}));y.set(n,o)}}return r(t),n}g.cancel=function(e){var t=y.get(e);return b(t),v(t)};var E=n(25),O=n.n(E);function C(){return!("undefined"===typeof window||!window.document||!window.document.createElement)}var w,N=Object(a.forwardRef)((function(e,t){var n=e.didUpdate,r=e.getContainer,o=e.children,c=Object(a.useRef)(),i=Object(a.useRef)();Object(a.useImperativeHandle)(t,(function(){return{}}));var u=Object(a.useRef)(!1);return!u.current&&C()&&(i.current=r(),c.current=i.current.parentNode,u.current=!0),Object(a.useEffect)((function(){null===n||void 0===n||n(e)})),Object(a.useEffect)((function(){return null===i.current.parentNode&&null!==c.current&&c.current.appendChild(i.current),function(){var e,t;null===(e=i.current)||void 0===e||null===(t=e.parentNode)||void 0===t||t.removeChild(i.current)}}),[]),i.current?O.a.createPortal(o,i.current):null}));function j(e){if("undefined"===typeof document)return 0;if(e||void 0===w){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var n=document.createElement("div"),r=n.style;r.position="absolute",r.top="0",r.left="0",r.pointerEvents="none",r.visibility="hidden",r.width="200px",r.height="150px",r.overflow="hidden",n.appendChild(t),document.body.appendChild(n);var o=t.offsetWidth;n.style.overflow="scroll";var a=t.offsetWidth;o===a&&(a=n.clientWidth),document.body.removeChild(n),w=o-a}return w}var T=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return{};var n=t.element,r=void 0===n?document.body:n,o={},a=Object.keys(e);return a.forEach((function(e){o[e]=r.style[e]})),a.forEach((function(t){r.style[t]=e[t]})),o};var k={},x=function(e){if(document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth||e){var t="ant-scrolling-effect",n=new RegExp("".concat(t),"g"),r=document.body.className;if(e){if(!n.test(r))return;return T(k),k={},void(document.body.className=r.replace(n,"").trim())}var o=j();if(o&&(k=T({position:"relative",width:"calc(100% - ".concat(o,"px)")}),!n.test(r))){var a="".concat(r," ").concat(t);document.body.className=a.trim()}}};function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0||r.scrollHeight>r.clientHeight)&&(t=j());var o=r.className;if(0===L.filter((function(e){var t,r=e.options;return(null===r||void 0===r?void 0:r.container)===(null===(t=n.options)||void 0===t?void 0:t.container)})).length&&M.set(r,T({width:0!==t?"calc(100% - ".concat(t,"px)"):void 0,overflow:"hidden",overflowX:"hidden",overflowY:"hidden"},{element:r})),!I.test(o)){var a="".concat(o," ").concat(R);r.className=a.trim()}L=[].concat(_(L),[{target:n.lockTarget,options:n.options}])}},this.unLock=function(){var e,t=L.find((function(e){return e.target===n.lockTarget}));if(L=L.filter((function(e){return e.target!==n.lockTarget})),t&&!L.some((function(e){var n,r=e.options;return(null===r||void 0===r?void 0:r.container)===(null===(n=t.options)||void 0===n?void 0:n.container)}))){var r=(null===(e=n.options)||void 0===e?void 0:e.container)||document.body,o=r.className;I.test(o)&&(T(M.get(r),{element:r}),M.delete(r),r.className=r.className.replace(I,"").trim())}},this.lockTarget=A++,this.options=t})),F=0,D=C();var H={},K=function(e){if(!D)return null;if(e){if("string"===typeof e)return document.querySelectorAll(e)[0];if("function"===typeof e)return e();if("object"===f(e)&&e instanceof window.HTMLElement)return e}return document.body},W=function(e){!function(e,t){if("function"!==typeof t&&null!==t)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&&l(e,t)}(n,e);var t=p(n);function n(e){var r;return c(this,n),(r=t.call(this,e)).container=void 0,r.componentRef=a.createRef(),r.rafId=void 0,r.scrollLocker=void 0,r.renderComponent=void 0,r.updateScrollLocker=function(e){var t=(e||{}).visible,n=r.props,o=n.getContainer,a=n.visible;a&&a!==t&&D&&K(o)!==r.scrollLocker.getContainer()&&r.scrollLocker.reLock({container:K(o)})},r.updateOpenCount=function(e){var t=e||{},n=t.visible,o=t.getContainer,a=r.props,c=a.visible,i=a.getContainer;c!==n&&D&&K(i)===document.body&&(c&&!n?F+=1:e&&(F-=1)),("function"===typeof i&&"function"===typeof o?i.toString()!==o.toString():i!==o)&&r.removeCurrentContainer()},r.attachToParent=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e||r.container&&!r.container.parentNode){var t=K(r.props.getContainer);return!!t&&(t.appendChild(r.container),!0)}return!0},r.getContainer=function(){return D?(r.container||(r.container=document.createElement("div"),r.attachToParent(!0)),r.setWrapperClassName(),r.container):null},r.setWrapperClassName=function(){var e=r.props.wrapperClassName;r.container&&e&&e!==r.container.className&&(r.container.className=e)},r.removeCurrentContainer=function(){var e,t;null===(e=r.container)||void 0===e||null===(t=e.parentNode)||void 0===t||t.removeChild(r.container)},r.switchScrollingEffect=function(){1!==F||Object.keys(H).length?F||(T(H),H={},x(!0)):(x(),H=T({overflow:"hidden",overflowX:"hidden",overflowY:"hidden"}))},r.scrollLocker=new U({container:K(e.getContainer)}),r}return u(n,[{key:"componentDidMount",value:function(){var e=this;this.updateOpenCount(),this.attachToParent()||(this.rafId=g((function(){e.forceUpdate()})))}},{key:"componentDidUpdate",value:function(e){this.updateOpenCount(e),this.updateScrollLocker(e),this.setWrapperClassName(),this.attachToParent()}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.visible,n=e.getContainer;D&&K(n)===document.body&&(F=t&&F?F-1:F),this.removeCurrentContainer(),g.cancel(this.rafId)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.forceRender,r=e.visible,o=null,c={getOpenCount:function(){return F},getContainer:this.getContainer,switchScrollingEffect:this.switchScrollingEffect,scrollLocker:this.scrollLocker};return(n||r||this.componentRef.current)&&(o=a.createElement(N,{getContainer:this.getContainer,ref:this.componentRef},t(c))),o}}]),n}(a.Component),G=n(1),B=n(10),V=n.n(B),Y={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=Y.F1&&t<=Y.F12)return!1;switch(t){case Y.ALT:case Y.CAPS_LOCK:case Y.CONTEXT_MENU:case Y.CTRL:case Y.DOWN:case Y.END:case Y.ESC:case Y.HOME:case Y.INSERT:case Y.LEFT:case Y.MAC_FF_META:case Y.META:case Y.NUMLOCK:case Y.NUM_CENTER:case Y.PAGE_DOWN:case Y.PAGE_UP:case Y.PAUSE:case Y.PRINT_SCREEN:case Y.RIGHT:case Y.SHIFT:case Y.UP:case Y.WIN_KEY:case Y.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=Y.ZERO&&e<=Y.NINE)return!0;if(e>=Y.NUM_ZERO&&e<=Y.NUM_MULTIPLY)return!0;if(e>=Y.A&&e<=Y.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case Y.SPACE:case Y.QUESTION_MARK:case Y.NUM_PLUS:case Y.NUM_MINUS:case Y.NUM_PERIOD:case Y.NUM_DIVISION:case Y.SEMICOLON:case Y.DASH:case Y.EQUALS:case Y.COMMA:case Y.PERIOD:case Y.SLASH:case Y.APOSTROPHE:case Y.SINGLE_QUOTE:case Y.OPEN_SQUARE_BRACKET:case Y.BACKSLASH:case Y.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Q=Y;function z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],c=!0,i=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);c=!0);}catch(u){i=!0,o=u}finally{try{c||null==n.return||n.return()}finally{if(i)throw o}}return a}}(e,t)||P(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function X(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t