@topwrite/reader 1.0.33-alpha.2 → 1.0.33-alpha.3
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/dist/363-58daf3.js +2 -0
- package/dist/363-58daf3.js.map +1 -0
- package/dist/{index.css → 363.css} +0 -0
- package/dist/378-c5be1d.js +9 -0
- package/dist/378-c5be1d.js.map +1 -0
- package/dist/index.js +10 -17
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/types/components/html/heading.d.ts +6 -6
- package/dist/107-aac715.js +0 -2
- package/dist/107-aac715.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_topwrite_reader=self.webpackChunk_topwrite_reader||[]).push([[363],{4363:(e,t,n)=>{n.r(t),n.d(t,{default:()=>m});var o=n(4246),l=n(131),r=n(7363);const c="undefined"==typeof window?null:window,s=()=>void 0!==c.scrollY?c.scrollY:void 0===c.pageYOffset?0:c.pageYOffset,i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:30;const[t,n]=(0,r.useState)((()=>s())),o=(0,l.fB)((()=>{n(s())}),e);return(0,l.zX)(c,"scroll",o),t};var a;function u(){return u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},u.apply(this,arguments)}var p=function(e){return r.createElement("svg",u({className:"gotop_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:200,height:200},e),a||(a=r.createElement("path",{d:"M484.539 297.401 78.509 703.407c-11.785 11.813-11.785 30.912 0 42.724 11.816 11.815 30.94 11.815 42.757 0L507.477 359.95l379.83 379.806c11.455 11.483 30.04 11.483 41.493 0 11.51-11.454 11.51-30.039 0-41.516L534.373 303.777c-1.544-1.54-3.418-2.297-5.2-3.413-.693-.935-1.056-2.086-1.934-2.963-11.784-11.784-30.912-11.784-42.695 0h-.005zm0 0"})))};var d=n(4378),f=n(9958);const h=function(e){let{tooltip:t,children:n,onClick:l}=e;const r=(0,o.jsx)("a",{onClick:l,children:n});if(t){const e={placement:"left",getTooltipContainer:e=>e.parentElement||document.body};let n;return n="object"==typeof t&&t.hasOwnProperty("overlay")?t:{overlay:t},(0,o.jsx)(d.Z,{...e,...n,children:r})}return r};function m(e){let{className:t}=e;return"mobile"===(0,f.Z)()?null:(0,o.jsxs)("menu",{className:t,children:[(0,o.jsx)(w,{}),(0,o.jsx)(l.IA,{role:"page:article:menu",component:h})]})}const w=function(){const e=(0,r.useCallback)((()=>{const t=document.documentElement;let n=t.scrollTop-(t.clientTop||0);n>0&&(window.scrollTo(0,n-30),setTimeout(e,2))}),[]);return i()>500?(0,o.jsx)(h,{tooltip:"回到顶部",onClick:e,children:(0,o.jsx)(p,{})}):null}}}]);
|
|
2
|
+
//# sourceMappingURL=363-58daf3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"363-58daf3.js","mappings":"kLAGA,MAAMA,EAAwB,oBAAXC,OAAyB,KAAOA,OAC7CC,EAAa,SACa,IAA3BF,EAAeG,QACTH,EAAeG,aACgB,IAA/BH,EAAeI,YACZ,EACCJ,EAAeI,YAa9B,EAX+B,WAAqB,IAApBC,EAAoB,uDAAd,GAElC,MAAOC,EAAWC,IAAgB,IAAAC,WAAS,IAAMN,MAE3CO,GAAkB,SAAY,KAChCF,EAAaL,OACdG,GAEH,OADA,QAASL,EAAK,SAAUS,GACjBH,GCnBX,IAAII,EAEJ,SAASC,IAA2Q,OAA9PA,EAAWC,OAAOC,QAAU,SAAUC,GAAU,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAIG,EAASF,UAAUD,GAAI,IAAK,IAAII,KAAOD,EAAcN,OAAOQ,UAAUC,eAAeC,KAAKJ,EAAQC,KAAQL,EAAOK,GAAOD,EAAOC,IAAY,OAAOL,GAAkBH,EAASY,MAAMC,KAAMR,WAIhT,IAAIS,EAAW,SAAkBC,GAC/B,OAAoB,gBAAoB,MAAOf,EAAS,CACtDgB,UAAW,kBACXC,QAAS,gBACTC,MAAO,6BACPC,MAAO,IACPC,OAAQ,KACPL,GAAQhB,IAAUA,EAAqB,gBAAoB,OAAQ,CACpEsB,EAAG,0V,wBCEP,MAAMC,EAAW,YAAsD,IAA7C,QAAEC,EAAF,SAAWC,EAAX,QAAqBC,GAAwB,EACnE,MAAMC,GAAO,cAAGD,QAASA,EAAO,SAAGD,IAEnC,GAAID,EAAS,CACT,MAAMI,EAAe,CACjBC,UAAW,OACXC,oBAAsBC,GACXA,EAAIC,eAAiBC,SAASC,MAI7C,IAAIlB,EASJ,OAPIA,EADmB,iBAAZQ,GAAwBA,EAAQb,eAAe,WAC9Ca,EAEA,CACJW,QAASX,IAIV,SAAC,IAAO,IACPI,KACAZ,EAAK,SAERW,IAIT,OAAOA,GAQG,SAAUS,EAAV,GAAuC,IAAxB,UAAEnB,GAAsB,EAIjD,MAAa,YAFA,SAGF,MAGJ,kBAAMA,UAAWA,EAAS,WAC7B,SAACoB,EAAS,KACV,SAAC,KAAoB,CAACC,KAAM,oBAAqBC,UAAWhB,OAIpE,MAAMc,EAAY,WAEd,MAAMG,GAAW,IAAAC,cAAY,KACzB,MAAMC,EAAQT,SAASU,gBACvB,IAAIC,EAAUF,EAAM9C,WAAa8C,EAAMG,WAAa,GAEhDD,EAAU,IACVrD,OAAOuD,SAAS,EAAGF,EAAU,IAC7BG,WAAWP,EAAU,MAE1B,IAIH,OAFkB,IAEF,KACL,SAACjB,EAAQ,CAACC,QAAS,OAAQE,QAASc,EAAQ,UAAE,SAAC,EAAS,MAE5D","sources":["webpack://@topwrite/reader/./src/lib/use-window-scroll.ts","webpack://@topwrite/reader/./src/images/gotop.svg","webpack://@topwrite/reader/./src/components/menu.tsx"],"sourcesContent":["import { useThrottle, useEvent } from '@topwrite/common';\r\nimport { useState } from 'react';\r\n\r\nconst win = typeof window === 'undefined' ? null : window;\r\nconst getScrollY = (): number =>\r\n (win as Window).scrollY !== void 0\r\n ? (win as Window).scrollY\r\n : (win as Window).pageYOffset === void 0\r\n ? 0\r\n : (win as Window).pageYOffset;\r\n\r\nexport const useWindowScroll = (fps = 30): number => {\r\n\r\n const [scrollTop, setScrollTop] = useState(() => getScrollY());\r\n\r\n const updateScrollTop = useThrottle(() => {\r\n setScrollTop(getScrollY());\r\n }, fps);\r\n useEvent(win, 'scroll', updateScrollTop);\r\n return scrollTop;\r\n};\r\n\r\nexport default useWindowScroll;\r\n","var _path;\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport * as React from \"react\";\n\nvar SvgGotop = function SvgGotop(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n className: \"gotop_svg__icon\",\n viewBox: \"0 0 1024 1024\",\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 200,\n height: 200\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M484.539 297.401 78.509 703.407c-11.785 11.813-11.785 30.912 0 42.724 11.816 11.815 30.94 11.815 42.757 0L507.477 359.95l379.83 379.806c11.455 11.483 30.04 11.483 41.493 0 11.51-11.454 11.51-30.039 0-41.516L534.373 303.777c-1.544-1.54-3.418-2.297-5.2-3.413-.693-.935-1.056-2.086-1.934-2.963-11.784-11.784-30.912-11.784-42.695 0h-.005zm0 0\"\n })));\n};\n\nexport { SvgGotop as ReactComponent };\nexport default \"data:image/svg+xml;base64,PHN2ZyB0PSIxNjU2NTc2OTMwMTg2IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjIzOTMiIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIj48cGF0aCBkPSJNNDg0LjUzODU1NSAyOTcuNDAxNDM0IDc4LjUwODA1MiA3MDMuNDA3Mzc4Yy0xMS43ODQzOTQgMTEuODEzMDQ3LTExLjc4NDM5NCAzMC45MTIwMzQgMCA0Mi43MjQwNTcgMTEuODE3MTQgMTEuODE0MDcgMzAuOTQxNzEgMTEuODE0MDcgNDIuNzU3ODI2IDBsMzg2LjIxMTEwOS0zODYuMTgxNDMzIDM3OS44MzA3OTUgMzc5LjgwNjIzNWMxMS40NTM4NjYgMTEuNDgyNTE5IDMwLjAzOTE1MyAxMS40ODI1MTkgNDEuNDkxOTk2IDAgMTEuNTExMTcxLTExLjQ1Mzg2NiAxMS41MTExNzEtMzAuMDM5MTUzIDAtNDEuNTE2NTU2TDUzNC4zNzI1NDMgMzAzLjc3NjYzMWMtMS41NDMxNDYtMS41MzkwNTMtMy40MTc4NDMtMi4yOTYyOTktNS4yMDA0NDItMy40MTI3MjYtMC42OTE3NTUtMC45MzUzMDItMS4wNTUwMjktMi4wODU0OTgtMS45MzMwMjUtMi45NjI0NzEtMTEuNzg0Mzk0LTExLjc4NDM5NC0zMC45MTIwMzQtMTEuNzg0Mzk0LTQyLjY5NTQwNSAwTDQ4NC41Mzg1NTUgMjk3LjQwMTQzNHpNNDg0LjUzODU1NSAyOTcuNDAxNDM0IiBwLWlkPSIyMzk0Ij48L3BhdGg+PC9zdmc+DQo=\";","import { InjectedComponentSet } from '@topwrite/common';\r\nimport { ComponentProps, ReactNode, useCallback } from 'react';\r\nimport useWindowScroll from '@/lib/use-window-scroll';\r\nimport { ReactComponent as GotopIcon } from '@/images/gotop.svg';\r\nimport Tooltip from 'rc-tooltip';\r\nimport 'rc-tooltip/assets/bootstrap.css';\r\nimport useWindowSize from '@/lib/use-window-size';\r\n\r\ntype TooltipProps = ComponentProps<typeof Tooltip>;\r\n\r\nexport interface MenuItemProps {\r\n tooltip?: TooltipProps['overlay'] | TooltipProps;\r\n children: ReactNode;\r\n onClick?: () => void;\r\n}\r\n\r\nconst MenuItem = function({ tooltip, children, onClick }: MenuItemProps) {\r\n const item = <a onClick={onClick}>{children}</a>;\r\n\r\n if (tooltip) {\r\n const defaultProps = {\r\n placement: 'left',\r\n getTooltipContainer: (dom) => {\r\n return dom.parentElement || document.body;\r\n }\r\n };\r\n\r\n let props: TooltipProps;\r\n if (typeof tooltip === 'object' && tooltip.hasOwnProperty('overlay')) {\r\n props = tooltip as TooltipProps;\r\n } else {\r\n props = {\r\n overlay: tooltip\r\n };\r\n }\r\n\r\n return <Tooltip\r\n {...defaultProps}\r\n {...props}\r\n >\r\n {item}\r\n </Tooltip>;\r\n }\r\n\r\n return item;\r\n};\r\n\r\n\r\ninterface MenuProps {\r\n className?: string;\r\n}\r\n\r\nexport default function Menu({ className }: MenuProps) {\r\n\r\n const size = useWindowSize();\r\n\r\n if (size === 'mobile') {\r\n return null;\r\n }\r\n\r\n return <menu className={className}>\r\n <GotopItem />\r\n <InjectedComponentSet role={'page:article:menu'} component={MenuItem} />\r\n </menu>;\r\n}\r\n\r\nconst GotopItem = function() {\r\n\r\n const scrollUp = useCallback(() => {\r\n const frame = document.documentElement;\r\n let pageTop = frame.scrollTop - (frame.clientTop || 0);\r\n\r\n if (pageTop > 0) {\r\n window.scrollTo(0, pageTop - 30);\r\n setTimeout(scrollUp, 2);\r\n }\r\n }, []);\r\n\r\n const scrollTop = useWindowScroll();\r\n\r\n if (scrollTop > 500) {\r\n return <MenuItem tooltip={'回到顶部'} onClick={scrollUp}><GotopIcon /></MenuItem>;\r\n }\r\n return null;\r\n};\r\n"],"names":["win","window","getScrollY","scrollY","pageYOffset","fps","scrollTop","setScrollTop","useState","updateScrollTop","_path","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","SvgGotop","props","className","viewBox","xmlns","width","height","d","MenuItem","tooltip","children","onClick","item","defaultProps","placement","getTooltipContainer","dom","parentElement","document","body","overlay","Menu","GotopItem","role","component","scrollUp","useCallback","frame","documentElement","pageTop","clientTop","scrollTo","setTimeout"],"sourceRoot":""}
|
|
File without changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
(self.webpackChunk_topwrite_reader=self.webpackChunk_topwrite_reader||[]).push([[378],{42:(t,e)=>{var n;
|
|
2
|
+
/*!
|
|
3
|
+
Copyright (c) 2018 Jed Watson.
|
|
4
|
+
Licensed under the MIT License (MIT), see
|
|
5
|
+
http://jedwatson.github.io/classnames
|
|
6
|
+
*/!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var t=[],e=0;e<arguments.length;e++){var n=arguments[e];if(n){var i=typeof n;if("string"===i||"number"===i)t.push(n);else if(Array.isArray(n)){if(n.length){var u=o.apply(null,n);u&&t.push(u)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var a in n)r.call(n,a)&&n[a]&&t.push(a);else t.push(n.toString())}}return t.join(" ")}t.exports?(o.default=o,t.exports=o):void 0===(n=function(){return o}.apply(e,[]))||(t.exports=n)}()},4378:(t,e,n)=>{"use strict";function r(){return r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},r.apply(this,arguments)}function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}n.d(e,{Z:()=>ir});var c=n(7363),s=n.n(c);function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function d(){return d=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},d.apply(this,arguments)}function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function v(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function b(t,e){if(e&&("object"===g(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return v(t)}function w(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=y(t);if(e){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}var O=n(1533),E=n.n(O),x=function(t){return+setTimeout(t,16)},P=function(t){return clearTimeout(t)};"undefined"!=typeof window&&"requestAnimationFrame"in window&&(x=function(t){return window.requestAnimationFrame(t)},P=function(t){return window.cancelAnimationFrame(t)});var k=0,C=new Map;function T(t){C.delete(t)}function S(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=k+=1;function r(e){if(0===e)T(n),t();else{var o=x((function(){r(e-1)}));C.set(n,o)}}return r(e),n}function M(t,e){return!!t&&t.contains(e)}function j(t){return t instanceof HTMLElement?t:E().findDOMNode(t)}function _(t){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_(t)}S.cancel=function(t){var e=C.get(t);return T(e),P(e)};var D=n(9185);function A(t,e){"function"==typeof t?t(e):"object"===_(t)&&t&&"current"in t&&(t.current=e)}function R(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e.filter((function(t){return t}));return r.length<=1?r[0]:function(t){e.forEach((function(e){A(e,t)}))}}function L(t){var e,n,r=(0,D.isMemo)(t)?t.type.type:t.type;return!("function"==typeof r&&!(null===(e=r.prototype)||void 0===e?void 0:e.render))&&!("function"==typeof t&&!(null===(n=t.prototype)||void 0===n?void 0:n.render))}function N(t,e,n,r){var o=E().unstable_batchedUpdates?function(t){E().unstable_batchedUpdates(n,t)}:n;return t.addEventListener&&t.addEventListener(e,o,r),{remove:function(){t.removeEventListener&&t.removeEventListener(e,o,r)}}}function V(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}const H=(0,c.forwardRef)((function(t,e){var n=t.didUpdate,r=t.getContainer,o=t.children,i=(0,c.useRef)(),u=(0,c.useRef)();(0,c.useImperativeHandle)(e,(function(){return{}}));var a=(0,c.useRef)(!1);return!a.current&&V()&&(u.current=r(),i.current=u.current.parentNode,a.current=!0),(0,c.useEffect)((function(){null==n||n(t)})),(0,c.useEffect)((function(){return null===u.current.parentNode&&null!==i.current&&i.current.appendChild(u.current),function(){var t,e;null===(t=u.current)||void 0===t||null===(e=t.parentNode)||void 0===e||e.removeChild(u.current)}}),[]),u.current?E().createPortal(o,u.current):null}));var I=n(42),W=n.n(I);function F(t,e,n){return n?t[0]===e[0]:t[0]===e[0]&&t[1]===e[1]}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function z(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return B(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(t,e):void 0}}(t,e)||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 Y(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function X(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function U(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function G(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?U(Object(n),!0).forEach((function(e){X(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function q(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function $(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return q(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?q(t,e):void 0}}(t,e)||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 K(t){return K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},K(t)}function Z(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit".concat(t)]="webkit".concat(e),n["Moz".concat(t)]="moz".concat(e),n["ms".concat(t)]="MS".concat(e),n["O".concat(t)]="o".concat(e.toLowerCase()),n}var J,Q,tt,et=(J=V(),Q="undefined"!=typeof window?window:{},tt={animationend:Z("Animation","AnimationEnd"),transitionend:Z("Transition","TransitionEnd")},J&&("AnimationEvent"in Q||delete tt.animationend.animation,"TransitionEvent"in Q||delete tt.transitionend.transition),tt),nt={};if(V()){var rt=document.createElement("div");nt=rt.style}var ot={};function it(t){if(ot[t])return ot[t];var e=et[t];if(e)for(var n=Object.keys(e),r=n.length,o=0;o<r;o+=1){var i=n[o];if(Object.prototype.hasOwnProperty.call(e,i)&&i in nt)return ot[t]=e[i],ot[t]}return""}var ut=it("animationend"),at=it("transitionend"),ct=!(!ut||!at),st=ut||"animationend",lt=at||"transitionend";function ft(t,e){return t?"object"===K(t)?t[e.replace(/-\w/g,(function(t){return t[1].toUpperCase()}))]:"".concat(t,"-").concat(e):null}var pt="none",dt="appear",ht="enter",vt="leave",mt="none",yt="prepare",gt="start",bt="active",wt="end";function Ot(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Et(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ot(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ot(t,e):void 0}}(t,e)||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 xt(t){var e=c.useRef(!1),n=Et(c.useState(t),2),r=n[0],o=n[1];return c.useEffect((function(){return e.current=!1,function(){e.current=!0}}),[]),[r,function(t,n){n&&e.current||o(t)}]}const Pt=V()?c.useLayoutEffect:c.useEffect;var kt=[yt,gt,bt,wt];function Ct(t){return t===bt||t===wt}const Tt=function(t,e){var n=$(xt(mt),2),r=n[0],o=n[1],i=function(){var t=c.useRef(null);function e(){S.cancel(t.current)}return c.useEffect((function(){return function(){e()}}),[]),[function n(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;e();var i=S((function(){o<=1?r({isCanceled:function(){return i!==t.current}}):n(r,o-1)}));t.current=i},e]}(),u=$(i,2),a=u[0],s=u[1];return Pt((function(){if(r!==mt&&r!==wt){var t=kt.indexOf(r),n=kt[t+1],i=e(r);false===i?o(n,!0):a((function(t){function e(){t.isCanceled()||o(n,!0)}!0===i?e():Promise.resolve(i).then(e)}))}}),[t,r]),c.useEffect((function(){return function(){s()}}),[]),[function(){o(yt,!0)},r]};function St(t,e,n,r){var o=r.motionEnter,i=void 0===o||o,u=r.motionAppear,a=void 0===u||u,s=r.motionLeave,l=void 0===s||s,f=r.motionDeadline,p=r.motionLeaveImmediately,d=r.onAppearPrepare,h=r.onEnterPrepare,v=r.onLeavePrepare,m=r.onAppearStart,y=r.onEnterStart,g=r.onLeaveStart,b=r.onAppearActive,w=r.onEnterActive,O=r.onLeaveActive,E=r.onAppearEnd,x=r.onEnterEnd,P=r.onLeaveEnd,k=r.onVisibleChanged,C=$(xt(),2),T=C[0],S=C[1],M=$(xt(pt),2),j=M[0],_=M[1],D=$(xt(null),2),A=D[0],R=D[1],L=(0,c.useRef)(!1),N=(0,c.useRef)(null);function V(){return n()}var H=(0,c.useRef)(!1);function I(t){var e=V();if(!t||t.deadline||t.target===e){var n,r=H.current;j===dt&&r?n=null==E?void 0:E(e,t):j===ht&&r?n=null==x?void 0:x(e,t):j===vt&&r&&(n=null==P?void 0:P(e,t)),j!==pt&&r&&!1!==n&&(_(pt,!0),R(null,!0))}}var W=function(t){var e=(0,c.useRef)(),n=(0,c.useRef)(t);n.current=t;var r=c.useCallback((function(t){n.current(t)}),[]);function o(t){t&&(t.removeEventListener(lt,r),t.removeEventListener(st,r))}return c.useEffect((function(){return function(){o(e.current)}}),[]),[function(t){e.current&&e.current!==t&&o(e.current),t&&t!==e.current&&(t.addEventListener(lt,r),t.addEventListener(st,r),e.current=t)},o]}(I),F=$(W,1)[0],B=c.useMemo((function(){var t,e,n;switch(j){case dt:return X(t={},yt,d),X(t,gt,m),X(t,bt,b),t;case ht:return X(e={},yt,h),X(e,gt,y),X(e,bt,w),e;case vt:return X(n={},yt,v),X(n,gt,g),X(n,bt,O),n;default:return{}}}),[j]),z=$(Tt(j,(function(t){if(t===yt){var e=B.prepare;return!!e&&e(V())}var n;U in B&&R((null===(n=B[U])||void 0===n?void 0:n.call(B,V(),null))||null);return U===bt&&(F(V()),f>0&&(clearTimeout(N.current),N.current=setTimeout((function(){I({deadline:!0})}),f))),true})),2),Y=z[0],U=z[1],q=Ct(U);H.current=q,Pt((function(){S(e);var n,r=L.current;(L.current=!0,t)&&(!r&&e&&a&&(n=dt),r&&e&&i&&(n=ht),(r&&!e&&l||!r&&p&&!e&&l)&&(n=vt),n&&(_(n),Y()))}),[e]),(0,c.useEffect)((function(){(j===dt&&!a||j===ht&&!i||j===vt&&!l)&&_(pt)}),[a,i,l]),(0,c.useEffect)((function(){return function(){L.current=!1,clearTimeout(N.current)}}),[]),(0,c.useEffect)((function(){void 0!==T&&j===pt&&(null==k||k(T))}),[T,j]);var K=A;return B.prepare&&U===gt&&(K=G({transition:"none"},K)),[j,U,K,null!=T?T:e]}function Mt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _t(t,e,n){return e&&jt(t.prototype,e),n&&jt(t,n),t}function Dt(t,e){return Dt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Dt(t,e)}function At(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Dt(t,e)}function Rt(t){return Rt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Rt(t)}function Lt(t,e){if(e&&("object"===K(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Nt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Rt(t);if(e){var o=Rt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Lt(this,n)}}const Vt=function(t){At(n,t);var e=Nt(n);function n(){return Mt(this,n),e.apply(this,arguments)}return _t(n,[{key:"render",value:function(){return this.props.children}}]),n}(c.Component);const Ht=function(t){var e=t;function n(t){return!(!t.motionName||!e)}"object"===K(t)&&(e=t.transitionSupport);var r=c.forwardRef((function(t,e){var r=t.visible,o=void 0===r||r,i=t.removeOnLeave,u=void 0===i||i,a=t.forceRender,s=t.children,l=t.motionName,f=t.leavedClassName,p=t.eventProps,d=n(t),h=(0,c.useRef)(),v=(0,c.useRef)();var m=$(St(d,o,(function(){try{return h.current instanceof HTMLElement?h.current:j(v.current)}catch(t){return null}}),t),4),y=m[0],g=m[1],b=m[2],w=m[3],O=c.useRef(w);w&&(O.current=!0);var E,x=c.useCallback((function(t){h.current=t,A(e,t)}),[e]),P=G(G({},p),{},{visible:o});if(s)if(y!==pt&&n(t)){var k,C;g===yt?C="prepare":Ct(g)?C="active":g===gt&&(C="start"),E=s(G(G({},P),{},{className:W()(ft(l,y),(k={},X(k,ft(l,"".concat(y,"-").concat(C)),C),X(k,l,"string"==typeof l),k)),style:b}),x)}else E=w?s(G({},P),x):!u&&O.current?s(G(G({},P),{},{className:f}),x):a?s(G(G({},P),{},{style:{display:"none"}}),x):null;else E=null;c.isValidElement(E)&&L(E)&&(E.ref||(E=c.cloneElement(E,{ref:x})));return c.createElement(Vt,{ref:v},E)}));return r.displayName="CSSMotion",r}(ct);function It(){return It=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},It.apply(this,arguments)}function Wt(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var Ft="add",Bt="keep",zt="remove",Yt="removed";function Xt(t){var e;return G(G({},e=t&&"object"===K(t)&&"key"in t?t:{key:t}),{},{key:String(e.key)})}function Ut(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.map(Xt)}function Gt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,o=e.length,i=Ut(t),u=Ut(e);i.forEach((function(t){for(var e=!1,i=r;i<o;i+=1){var a=u[i];if(a.key===t.key){r<i&&(n=n.concat(u.slice(r,i).map((function(t){return G(G({},t),{},{status:Ft})}))),r=i),n.push(G(G({},a),{},{status:Bt})),r+=1,e=!0;break}}e||n.push(G(G({},t),{},{status:zt}))})),r<o&&(n=n.concat(u.slice(r).map((function(t){return G(G({},t),{},{status:Ft})}))));var a={};n.forEach((function(t){var e=t.key;a[e]=(a[e]||0)+1}));var c=Object.keys(a).filter((function(t){return a[t]>1}));return c.forEach((function(t){(n=n.filter((function(e){var n=e.key,r=e.status;return n!==t||r!==zt}))).forEach((function(e){e.key===t&&(e.status=Bt)}))})),n}var qt=["component","children","onVisibleChanged","onAllRemoved"],$t=["status"],Kt=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];!function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ht,n=function(t){At(r,t);var n=Nt(r);function r(){var t;Mt(this,r);for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return(t=n.call.apply(n,[this].concat(o))).state={keyEntities:[]},t.removeKey=function(e){var n=t.state.keyEntities.map((function(t){return t.key!==e?t:G(G({},t),{},{status:Yt})}));return t.setState({keyEntities:n}),n.filter((function(t){return t.status!==Yt})).length},t}return _t(r,[{key:"render",value:function(){var t=this,n=this.state.keyEntities,r=this.props,o=r.component,i=r.children,u=r.onVisibleChanged,a=r.onAllRemoved,s=Wt(r,qt),l=o||c.Fragment,f={};return Kt.forEach((function(t){f[t]=s[t],delete s[t]})),delete s.keys,c.createElement(l,s,n.map((function(n){var r=n.status,o=Wt(n,$t),s=r===Ft||r===Bt;return c.createElement(e,It({},f,{key:o.key,visible:s,eventProps:o,onVisibleChanged:function(e){(null==u||u(e,{key:o.key}),e)||0===t.removeKey(o.key)&&a&&a()}}),i)})))}}],[{key:"getDerivedStateFromProps",value:function(t,e){var n=t.keys,r=e.keyEntities,o=Ut(n);return{keyEntities:Gt(r,o).filter((function(t){var e=r.find((function(e){var n=e.key;return t.key===n}));return!e||e.status!==Yt||t.status!==zt}))}}}]),r}(c.Component);n.defaultProps={component:"div"}}(ct);const Zt=Ht;function Jt(t){var e=t.prefixCls,n=t.motion,r=t.animation,o=t.transitionName;return n||(r?{motionName:"".concat(e,"-").concat(r)}:o?{motionName:o}:null)}function Qt(t){var e=t.prefixCls,n=t.visible,r=t.zIndex,o=t.mask,i=t.maskMotion,u=t.maskAnimation,a=t.maskTransitionName;if(!o)return null;var s={};return(i||a||u)&&(s=p({motionAppear:!0},Jt({motion:i,prefixCls:e,transitionName:a,animation:u}))),c.createElement(Zt,d({},s,{visible:n,removeOnLeave:!0}),(function(t){var n=t.className;return c.createElement("div",{style:{zIndex:r},className:W()("".concat(e,"-mask"),n)})}))}function te(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ee(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return te(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?te(t,e):void 0}}(t,e)||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 ne(t){return ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ne(t)}function re(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function oe(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?re(Object(n),!0).forEach((function(e){ue(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ie(t){return ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ie(t)}function ue(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ae,ce={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-",O:"-o-"};function se(){if(void 0!==ae)return ae;ae="";var t=document.createElement("p").style;for(var e in ce)e+"Transform"in t&&(ae=e);return ae}function le(){return se()?"".concat(se(),"TransitionProperty"):"transitionProperty"}function fe(){return se()?"".concat(se(),"Transform"):"transform"}function pe(t,e){var n=le();n&&(t.style[n]=e,"transitionProperty"!==n&&(t.style.transitionProperty=e))}function de(t,e){var n=fe();n&&(t.style[n]=e,"transform"!==n&&(t.style.transform=e))}var he,ve=/matrix\((.*)\)/,me=/matrix3d\((.*)\)/;function ye(t){var e=t.style.display;t.style.display="none",t.offsetHeight,t.style.display=e}function ge(t,e,n){var r=n;if("object"!==ie(e))return void 0!==r?("number"==typeof r&&(r="".concat(r,"px")),void(t.style[e]=r)):he(t,e);for(var o in e)e.hasOwnProperty(o)&&ge(t,o,e[o])}function be(t,e){var n=t["page".concat(e?"Y":"X","Offset")],r="scroll".concat(e?"Top":"Left");if("number"!=typeof n){var o=t.document;"number"!=typeof(n=o.documentElement[r])&&(n=o.body[r])}return n}function we(t){return be(t)}function Oe(t){return be(t,!0)}function Ee(t){var e=function(t){var e,n,r,o=t.ownerDocument,i=o.body,u=o&&o.documentElement;return e=t.getBoundingClientRect(),n=Math.floor(e.left),r=Math.floor(e.top),{left:n-=u.clientLeft||i.clientLeft||0,top:r-=u.clientTop||i.clientTop||0}}(t),n=t.ownerDocument,r=n.defaultView||n.parentWindow;return e.left+=we(r),e.top+=Oe(r),e}function xe(t){return null!=t&&t==t.window}function Pe(t){return xe(t)?t.document:9===t.nodeType?t:t.ownerDocument}var ke=new RegExp("^(".concat(/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,")(?!px)[a-z%]+$"),"i"),Ce=/^(top|right|bottom|left)$/;function Te(t,e){return"left"===t?e.useCssRight?"right":t:e.useCssBottom?"bottom":t}function Se(t){return"left"===t?"right":"right"===t?"left":"top"===t?"bottom":"bottom"===t?"top":void 0}function Me(t,e,n){"static"===ge(t,"position")&&(t.style.position="relative");var r=-999,o=-999,i=Te("left",n),u=Te("top",n),a=Se(i),c=Se(u);"left"!==i&&(r=999),"top"!==u&&(o=999);var s,l="",f=Ee(t);("left"in e||"top"in e)&&(l=(s=t).style.transitionProperty||s.style[le()]||"",pe(t,"none")),"left"in e&&(t.style[a]="",t.style[i]="".concat(r,"px")),"top"in e&&(t.style[c]="",t.style[u]="".concat(o,"px")),ye(t);var p=Ee(t),d={};for(var h in e)if(e.hasOwnProperty(h)){var v=Te(h,n),m="left"===h?r:o,y=f[h]-p[h];d[v]=v===h?m+y:m-y}ge(t,d),ye(t),("left"in e||"top"in e)&&pe(t,l);var g={};for(var b in e)if(e.hasOwnProperty(b)){var w=Te(b,n),O=e[b]-f[b];g[w]=b===w?d[w]+O:d[w]-O}ge(t,g)}function je(t,e){var n=Ee(t),r=function(t){var e=window.getComputedStyle(t,null),n=e.getPropertyValue("transform")||e.getPropertyValue(fe());if(n&&"none"!==n){var r=n.replace(/[^0-9\-.,]/g,"").split(",");return{x:parseFloat(r[12]||r[4],0),y:parseFloat(r[13]||r[5],0)}}return{x:0,y:0}}(t),o={x:r.x,y:r.y};"left"in e&&(o.x=r.x+e.left-n.left),"top"in e&&(o.y=r.y+e.top-n.top),function(t,e){var n=window.getComputedStyle(t,null),r=n.getPropertyValue("transform")||n.getPropertyValue(fe());if(r&&"none"!==r){var o,i=r.match(ve);i?((o=(i=i[1]).split(",").map((function(t){return parseFloat(t,10)})))[4]=e.x,o[5]=e.y,de(t,"matrix(".concat(o.join(","),")"))):((o=r.match(me)[1].split(",").map((function(t){return parseFloat(t,10)})))[12]=e.x,o[13]=e.y,de(t,"matrix3d(".concat(o.join(","),")")))}else de(t,"translateX(".concat(e.x,"px) translateY(").concat(e.y,"px) translateZ(0)"))}(t,o)}function _e(t,e){for(var n=0;n<t.length;n++)e(t[n])}function De(t){return"border-box"===he(t,"boxSizing")}"undefined"!=typeof window&&(he=window.getComputedStyle?function(t,e,n){var r=n,o="",i=Pe(t);return(r=r||i.defaultView.getComputedStyle(t,null))&&(o=r.getPropertyValue(e)||r[e]),o}:function(t,e){var n=t.currentStyle&&t.currentStyle[e];if(ke.test(n)&&!Ce.test(e)){var r=t.style,o=r.left,i=t.runtimeStyle.left;t.runtimeStyle.left=t.currentStyle.left,r.left="fontSize"===e?"1em":n||0,n=r.pixelLeft+"px",r.left=o,t.runtimeStyle.left=i}return""===n?"auto":n});var Ae=["margin","border","padding"];function Re(t,e,n){var r,o={},i=t.style;for(r in e)e.hasOwnProperty(r)&&(o[r]=i[r],i[r]=e[r]);for(r in n.call(t),e)e.hasOwnProperty(r)&&(i[r]=o[r])}function Le(t,e,n){var r,o,i,u=0;for(o=0;o<e.length;o++)if(r=e[o])for(i=0;i<n.length;i++){var a=void 0;a="border"===r?"".concat(r).concat(n[i],"Width"):r+n[i],u+=parseFloat(he(t,a))||0}return u}var Ne={getParent:function(t){var e=t;do{e=11===e.nodeType&&e.host?e.host:e.parentNode}while(e&&1!==e.nodeType&&9!==e.nodeType);return e}};function Ve(t,e,n){var r=n;if(xe(t))return"width"===e?Ne.viewportWidth(t):Ne.viewportHeight(t);if(9===t.nodeType)return"width"===e?Ne.docWidth(t):Ne.docHeight(t);var o="width"===e?["Left","Right"]:["Top","Bottom"],i="width"===e?Math.floor(t.getBoundingClientRect().width):Math.floor(t.getBoundingClientRect().height),u=De(t),a=0;(null==i||i<=0)&&(i=void 0,(null==(a=he(t,e))||Number(a)<0)&&(a=t.style[e]||0),a=parseFloat(a)||0),void 0===r&&(r=u?1:-1);var c=void 0!==i||u,s=i||a;return-1===r?c?s-Le(t,["border","padding"],o):a:c?1===r?s:s+(2===r?-Le(t,["border"],o):Le(t,["margin"],o)):a+Le(t,Ae.slice(r),o)}_e(["Width","Height"],(function(t){Ne["doc".concat(t)]=function(e){var n=e.document;return Math.max(n.documentElement["scroll".concat(t)],n.body["scroll".concat(t)],Ne["viewport".concat(t)](n))},Ne["viewport".concat(t)]=function(e){var n="client".concat(t),r=e.document,o=r.body,i=r.documentElement[n];return"CSS1Compat"===r.compatMode&&i||o&&o[n]||i}}));var He={position:"absolute",visibility:"hidden",display:"block"};function Ie(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,o=e[0];return 0!==o.offsetWidth?r=Ve.apply(void 0,e):Re(o,He,(function(){r=Ve.apply(void 0,e)})),r}function We(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}_e(["width","height"],(function(t){var e=t.charAt(0).toUpperCase()+t.slice(1);Ne["outer".concat(e)]=function(e,n){return e&&Ie(e,t,n?0:1)};var n="width"===t?["Left","Right"]:["Top","Bottom"];Ne[t]=function(e,r){var o=r;return void 0!==o?e?(De(e)&&(o+=Le(e,["padding","border"],n)),ge(e,t,o)):void 0:e&&Ie(e,t,-1)}}));var Fe={getWindow:function(t){if(t&&t.document&&t.setTimeout)return t;var e=t.ownerDocument||t;return e.defaultView||e.parentWindow},getDocument:Pe,offset:function(t,e,n){if(void 0===e)return Ee(t);!function(t,e,n){if(n.ignoreShake){var r=Ee(t),o=r.left.toFixed(0),i=r.top.toFixed(0),u=e.left.toFixed(0),a=e.top.toFixed(0);if(o===u&&i===a)return}n.useCssRight||n.useCssBottom?Me(t,e,n):n.useCssTransform&&fe()in document.body.style?je(t,e):Me(t,e,n)}(t,e,n||{})},isWindow:xe,each:_e,css:ge,clone:function(t){var e,n={};for(e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);if(t.overflow)for(e in t)t.hasOwnProperty(e)&&(n.overflow[e]=t.overflow[e]);return n},mix:We,getWindowScrollLeft:function(t){return we(t)},getWindowScrollTop:function(t){return Oe(t)},merge:function(){for(var t={},e=0;e<arguments.length;e++)Fe.mix(t,e<0||arguments.length<=e?void 0:arguments[e]);return t},viewportWidth:0,viewportHeight:0};We(Fe,Ne);var Be=Fe.getParent;function ze(t){if(Fe.isWindow(t)||9===t.nodeType)return null;var e,n=Fe.getDocument(t).body,r=Fe.css(t,"position");if(!("fixed"===r||"absolute"===r))return"html"===t.nodeName.toLowerCase()?null:Be(t);for(e=Be(t);e&&e!==n&&9!==e.nodeType;e=Be(e))if("static"!==(r=Fe.css(e,"position")))return e;return null}var Ye=Fe.getParent;function Xe(t,e){for(var n={left:0,right:1/0,top:0,bottom:1/0},r=ze(t),o=Fe.getDocument(t),i=o.defaultView||o.parentWindow,u=o.body,a=o.documentElement;r;){if(-1!==navigator.userAgent.indexOf("MSIE")&&0===r.clientWidth||r===u||r===a||"visible"===Fe.css(r,"overflow")){if(r===u||r===a)break}else{var c=Fe.offset(r);c.left+=r.clientLeft,c.top+=r.clientTop,n.top=Math.max(n.top,c.top),n.right=Math.min(n.right,c.left+r.clientWidth),n.bottom=Math.min(n.bottom,c.top+r.clientHeight),n.left=Math.max(n.left,c.left)}r=ze(r)}var s=null;Fe.isWindow(t)||9===t.nodeType||(s=t.style.position,"absolute"===Fe.css(t,"position")&&(t.style.position="fixed"));var l=Fe.getWindowScrollLeft(i),f=Fe.getWindowScrollTop(i),p=Fe.viewportWidth(i),d=Fe.viewportHeight(i),h=a.scrollWidth,v=a.scrollHeight,m=window.getComputedStyle(u);if("hidden"===m.overflowX&&(h=i.innerWidth),"hidden"===m.overflowY&&(v=i.innerHeight),t.style&&(t.style.position=s),e||function(t){if(Fe.isWindow(t)||9===t.nodeType)return!1;var e=Fe.getDocument(t),n=e.body,r=null;for(r=Ye(t);r&&r!==n&&r!==e;r=Ye(r))if("fixed"===Fe.css(r,"position"))return!0;return!1}(t))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 y=Math.max(h,l+p);n.right=Math.min(n.right,y);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 Ue(t){var e,n,r;if(Fe.isWindow(t)||9===t.nodeType){var o=Fe.getWindow(t);e={left:Fe.getWindowScrollLeft(o),top:Fe.getWindowScrollTop(o)},n=Fe.viewportWidth(o),r=Fe.viewportHeight(o)}else e=Fe.offset(t),n=Fe.outerWidth(t),r=Fe.outerHeight(t);return e.width=n,e.height=r,e}function Ge(t,e){var n=e.charAt(0),r=e.charAt(1),o=t.width,i=t.height,u=t.left,a=t.top;return"c"===n?a+=i/2:"b"===n&&(a+=i),"c"===r?u+=o/2:"r"===r&&(u+=o),{left:u,top:a}}function qe(t,e,n,r,o){var i=Ge(e,n[1]),u=Ge(t,n[0]),a=[u.left-i.left,u.top-i.top];return{left:Math.round(t.left-a[0]+r[0]-o[0]),top:Math.round(t.top-a[1]+r[1]-o[1])}}function $e(t,e,n){return t.left<n.left||t.left+e.width>n.right}function Ke(t,e,n){return t.top<n.top||t.top+e.height>n.bottom}function Ze(t,e,n){var r=[];return Fe.each(t,(function(t){r.push(t.replace(e,(function(t){return n[t]})))})),r}function Je(t,e){return t[e]=-t[e],t}function Qe(t,e){return(/%$/.test(t)?parseInt(t.substring(0,t.length-1),10)/100*e:parseInt(t,10))||0}function tn(t,e){t[0]=Qe(t[0],e.width),t[1]=Qe(t[1],e.height)}function en(t,e,n,r){var o=n.points,i=n.offset||[0,0],u=n.targetOffset||[0,0],a=n.overflow,c=n.source||t;i=[].concat(i),u=[].concat(u);var s={},l=0,f=Xe(c,!(!(a=a||{})||!a.alwaysByViewport)),p=Ue(c);tn(i,p),tn(u,e);var d=qe(p,e,o,i,u),h=Fe.merge(p,d);if(f&&(a.adjustX||a.adjustY)&&r){if(a.adjustX&&$e(d,p,f)){var v=Ze(o,/[lr]/gi,{l:"r",r:"l"}),m=Je(i,0),y=Je(u,0);(function(t,e,n){return t.left>n.right||t.left+e.width<n.left})(qe(p,e,v,m,y),p,f)||(l=1,o=v,i=m,u=y)}if(a.adjustY&&Ke(d,p,f)){var g=Ze(o,/[tb]/gi,{t:"b",b:"t"}),b=Je(i,1),w=Je(u,1);(function(t,e,n){return t.top>n.bottom||t.top+e.height<n.top})(qe(p,e,g,b,w),p,f)||(l=1,o=g,i=b,u=w)}l&&(d=qe(p,e,o,i,u),Fe.mix(h,d));var O=$e(d,p,f),E=Ke(d,p,f);if(O||E){var x=o;O&&(x=Ze(o,/[lr]/gi,{l:"r",r:"l"})),E&&(x=Ze(o,/[tb]/gi,{t:"b",b:"t"})),o=x,i=n.offset||[0,0],u=n.targetOffset||[0,0]}s.adjustX=a.adjustX&&O,s.adjustY=a.adjustY&&E,(s.adjustX||s.adjustY)&&(h=function(t,e,n,r){var o=Fe.clone(t),i={width:e.width,height:e.height};return r.adjustX&&o.left<n.left&&(o.left=n.left),r.resizeWidth&&o.left>=n.left&&o.left+i.width>n.right&&(i.width-=o.left+i.width-n.right),r.adjustX&&o.left+i.width>n.right&&(o.left=Math.max(n.right-i.width,n.left)),r.adjustY&&o.top<n.top&&(o.top=n.top),r.resizeHeight&&o.top>=n.top&&o.top+i.height>n.bottom&&(i.height-=o.top+i.height-n.bottom),r.adjustY&&o.top+i.height>n.bottom&&(o.top=Math.max(n.bottom-i.height,n.top)),Fe.mix(o,i)}(d,p,f,s))}return h.width!==p.width&&Fe.css(c,"width",Fe.width(c)+h.width-p.width),h.height!==p.height&&Fe.css(c,"height",Fe.height(c)+h.height-p.height),Fe.offset(c,{left:h.left,top:h.top},{useCssRight:n.useCssRight,useCssBottom:n.useCssBottom,useCssTransform:n.useCssTransform,ignoreShake:n.ignoreShake}),{points:o,offset:i,targetOffset:u,overflow:s}}function nn(t,e,n){var r=n.target||e,o=Ue(r),i=!function(t,e){var n=Xe(t,e),r=Ue(t);return!n||r.left+r.width<=n.left||r.top+r.height<=n.top||r.left>=n.right||r.top>=n.bottom}(r,n.overflow&&n.overflow.alwaysByViewport);return en(t,o,n,i)}nn.__getOffsetParent=ze,nn.__getVisibleRectForElement=Xe;var rn=n(134),on=n.n(rn),un=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];t.call(e,o[1],o[0])}},e}()}(),an="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,cn=void 0!==n.g&&n.g.Math===Math?n.g:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),sn="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(cn):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var ln=["top","right","bottom","left","width","height","size","weight"],fn="undefined"!=typeof MutationObserver,pn=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,o=0;function i(){n&&(n=!1,t()),r&&a()}function u(){sn(i)}function a(){var t=Date.now();if(n){if(t-o<2)return;r=!0}else n=!0,r=!1,setTimeout(u,e);o=t}return a}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){an&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),fn?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){an&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;ln.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),dn=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];Object.defineProperty(t,o,{value:e[o],enumerable:!1,writable:!1,configurable:!0})}return t},hn=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||cn},vn=On(0,0,0,0);function mn(t){return parseFloat(t)||0}function yn(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+mn(t["border-"+n+"-width"])}),0)}function gn(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return vn;var r=hn(t).getComputedStyle(t),o=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],i=t["padding-"+o];e[o]=mn(i)}return e}(r),i=o.left+o.right,u=o.top+o.bottom,a=mn(r.width),c=mn(r.height);if("border-box"===r.boxSizing&&(Math.round(a+i)!==e&&(a-=yn(r,"left","right")+i),Math.round(c+u)!==n&&(c-=yn(r,"top","bottom")+u)),!function(t){return t===hn(t).document.documentElement}(t)){var s=Math.round(a+i)-e,l=Math.round(c+u)-n;1!==Math.abs(s)&&(a-=s),1!==Math.abs(l)&&(c-=l)}return On(o.left,o.top,a,c)}var bn="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof hn(t).SVGGraphicsElement}:function(t){return t instanceof hn(t).SVGElement&&"function"==typeof t.getBBox};function wn(t){return an?bn(t)?function(t){var e=t.getBBox();return On(0,0,e.width,e.height)}(t):gn(t):vn}function On(t,e,n,r){return{x:t,y:e,width:n,height:r}}var En=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=On(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=wn(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),xn=function(t,e){var n,r,o,i,u,a,c,s=(r=(n=e).x,o=n.y,i=n.width,u=n.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,c=Object.create(a.prototype),dn(c,{x:r,y:o,width:i,height:u,top:o,right:r+i,bottom:u+o,left:r}),c);dn(this,{target:t,contentRect:s})},Pn=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new un,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof hn(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new En(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof hn(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new xn(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),kn="undefined"!=typeof WeakMap?new WeakMap:new un,Cn=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=pn.getInstance(),r=new Pn(e,n,this);kn.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){Cn.prototype[t]=function(){var e;return(e=kn.get(this))[t].apply(e,arguments)}}));const Tn=void 0!==cn.ResizeObserver?cn.ResizeObserver:Cn;function Sn(t,e){var n=null,r=null;var o=new Tn((function(t){var o=ee(t,1)[0].target;if(document.documentElement.contains(o)){var i=o.getBoundingClientRect(),u=i.width,a=i.height,c=Math.floor(u),s=Math.floor(a);n===c&&r===s||Promise.resolve().then((function(){e({width:c,height:s})})),n=c,r=s}}));return t&&o.observe(t),function(){o.disconnect()}}function Mn(t){return"function"!=typeof t?null:t()}function jn(t){return"object"===ne(t)&&t?t:null}var _n=function(t,e){var n=t.children,r=t.disabled,o=t.target,i=t.align,u=t.onAlign,a=t.monitorWindowResize,c=t.monitorBufferTime,l=void 0===c?0:c,f=s().useRef({}),p=s().useRef(),d=s().Children.only(n),h=s().useRef({});h.current.disabled=r,h.current.target=o,h.current.align=i,h.current.onAlign=u;var v=function(t,e){var n=s().useRef(!1),r=s().useRef(null);function o(){window.clearTimeout(r.current)}return[function i(u){if(o(),n.current&&!0!==u)r.current=window.setTimeout((function(){n.current=!1,i()}),e);else{if(!1===t())return;n.current=!0,r.current=window.setTimeout((function(){n.current=!1}),e)}},function(){n.current=!1,o()}]}((function(){var t=h.current,e=t.disabled,n=t.target,r=t.align,o=t.onAlign;if(!e&&n){var i,u=p.current,a=Mn(n),c=jn(n);f.current.element=a,f.current.point=c,f.current.align=r;var s=document.activeElement;return a&&function(t){if(!t)return!1;if(t.offsetParent)return!0;if(t.getBBox){var e=t.getBBox();if(e.width||e.height)return!0}if(t.getBoundingClientRect){var n=t.getBoundingClientRect();if(n.width||n.height)return!0}return!1}(a)?i=nn(u,a,r):c&&(i=function(t,e,n){var r,o,i=Fe.getDocument(t),u=i.defaultView||i.parentWindow,a=Fe.getWindowScrollLeft(u),c=Fe.getWindowScrollTop(u),s=Fe.viewportWidth(u),l=Fe.viewportHeight(u),f={left:r="pageX"in e?e.pageX:a+e.clientX,top:o="pageY"in e?e.pageY:c+e.clientY,width:0,height:0},p=r>=0&&r<=a+s&&o>=0&&o<=c+l,d=[n.points[0],"cc"];return en(t,f,oe(oe({},n),{},{points:d}),p)}(u,c,r)),function(t,e){t!==document.activeElement&&M(e,t)&&"function"==typeof t.focus&&t.focus()}(s,u),o&&i&&o(u,i),!0}return!1}),l),m=ee(v,2),y=m[0],g=m[1],b=s().useRef({cancel:function(){}}),w=s().useRef({cancel:function(){}});s().useEffect((function(){var t,e,n=Mn(o),r=jn(o);p.current!==w.current.element&&(w.current.cancel(),w.current.element=p.current,w.current.cancel=Sn(p.current,y)),f.current.element===n&&((t=f.current.point)===(e=r)||t&&e&&("pageX"in e&&"pageY"in e?t.pageX===e.pageX&&t.pageY===e.pageY:"clientX"in e&&"clientY"in e&&t.clientX===e.clientX&&t.clientY===e.clientY))&&on()(f.current.align,i)||(y(),b.current.element!==n&&(b.current.cancel(),b.current.element=n,b.current.cancel=Sn(n,y)))})),s().useEffect((function(){r?g():y()}),[r]);var O=s().useRef(null);return s().useEffect((function(){a?O.current||(O.current=N(window,"resize",y)):O.current&&(O.current.remove(),O.current=null)}),[a]),s().useEffect((function(){return function(){b.current.cancel(),w.current.cancel(),O.current&&O.current.remove(),g()}}),[]),s().useImperativeHandle(e,(function(){return{forceAlign:function(){return y(!0)}}})),s().isValidElement(d)&&(d=s().cloneElement(d,{ref:R(d.ref,p)})),d},Dn=s().forwardRef(_n);Dn.displayName="Align";const An=Dn;const Rn=V()?c.useLayoutEffect:c.useEffect;function Ln(){
|
|
7
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
8
|
+
Ln=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",u=r.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),u=new P(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return C()}for(n.method=o,n.arg=i;;){var u=n.delegate;if(u){var a=O(u,n);if(a){if(a===l)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=s(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,u),i}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var l={};function f(){}function p(){}function d(){}var h={};a(h,o,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(k([])));m&&m!==e&&n.call(m,o)&&(h=m);var y=d.prototype=f.prototype=Object.create(h);function b(t){["next","throw","return"].forEach((function(e){a(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(o,i,u,a){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==g(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,u,a)}),(function(t){r("throw",t,u,a)})):e.resolve(f).then((function(t){l.value=t,u(l)}),(function(t){return r("throw",t,u,a)}))}a(c.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function O(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method))return l;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=s(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,l;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,l):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,l)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function k(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return p.prototype=d,a(y,"constructor",d),a(d,"constructor",p),p.displayName=a(d,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},b(w.prototype),a(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var u=new w(c(e,n,r,o),i);return t.isGeneratorFunction(n)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},b(y),a(y,u,"Generator"),a(y,o,(function(){return this})),a(y,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=k,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return u.type="throw",u.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var a=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=t,u.arg=e,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(u)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}function Nn(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)}function Vn(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){Nn(i,r,o,u,a,"next",t)}function a(t){Nn(i,r,o,u,a,"throw",t)}u(void 0)}))}}var Hn=["measure","alignPre","align",null,"motion"];var In=c.forwardRef((function(t,e){var n=t.visible,r=t.prefixCls,o=t.className,i=t.style,u=t.children,a=t.zIndex,s=t.stretch,l=t.destroyPopupOnHide,f=t.forceRender,h=t.align,v=t.point,m=t.getRootDomNode,y=t.getClassNameFromAlign,g=t.onAlign,b=t.onMouseEnter,w=t.onMouseLeave,O=t.onMouseDown,E=t.onTouchStart,x=t.onClick,P=(0,c.useRef)(),k=(0,c.useRef)(),C=z((0,c.useState)(),2),T=C[0],M=C[1],j=function(t){var e=z(c.useState({width:0,height:0}),2),n=e[0],r=e[1];return[c.useMemo((function(){var e={};if(t){var r=n.width,o=n.height;-1!==t.indexOf("height")&&o?e.height=o:-1!==t.indexOf("minHeight")&&o&&(e.minHeight=o),-1!==t.indexOf("width")&&r?e.width=r:-1!==t.indexOf("minWidth")&&r&&(e.minWidth=r)}return e}),[t,n]),function(t){r({width:t.offsetWidth,height:t.offsetHeight})}]}(s),_=z(j,2),D=_[0],A=_[1];var R=function(t,e){var n=z(xt(null),2),r=n[0],o=n[1],i=(0,c.useRef)();function u(t){o(t,!0)}function a(){S.cancel(i.current)}return(0,c.useEffect)((function(){u("measure")}),[t]),(0,c.useEffect)((function(){"measure"===r&&e(),r&&(i.current=S(Vn(Ln().mark((function t(){var e,n;return Ln().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=Hn.indexOf(r),(n=Hn[e+1])&&-1!==e&&u(n);case 3:case"end":return t.stop()}}),t)})))))}),[r]),(0,c.useEffect)((function(){return function(){a()}}),[]),[r,function(t){a(),i.current=S((function(){u((function(t){switch(r){case"align":return"motion";case"motion":return"stable"}return t})),null==t||t()}))}]}(n,(function(){s&&A(m())})),L=z(R,2),N=L[0],V=L[1],H=z((0,c.useState)(0),2),I=H[0],F=H[1],B=(0,c.useRef)();function Y(){var t;null===(t=P.current)||void 0===t||t.forceAlign()}function X(t,e){var n=y(e);T!==n&&M(n),F((function(t){return t+1})),"align"===N&&(null==g||g(t,e))}Rn((function(){"alignPre"===N&&F(0)}),[N]),Rn((function(){"align"===N&&(I<2?Y():V((function(){var t;null===(t=B.current)||void 0===t||t.call(B)})))}),[I]);var U=p({},Jt(t));function G(){return new Promise((function(t){B.current=t}))}["onAppearEnd","onEnterEnd","onLeaveEnd"].forEach((function(t){var e=U[t];U[t]=function(t,n){return V(),null==e?void 0:e(t,n)}})),c.useEffect((function(){U.motionName||"motion"!==N||V()}),[U.motionName,N]),c.useImperativeHandle(e,(function(){return{forceAlign:Y,getElement:function(){return k.current}}}));var q=p(p({},D),{},{zIndex:a,opacity:"motion"!==N&&"stable"!==N&&n?0:void 0,pointerEvents:n||"stable"===N?void 0:"none"},i),$=!0;!(null==h?void 0:h.points)||"align"!==N&&"stable"!==N||($=!1);var K=u;return c.Children.count(u)>1&&(K=c.createElement("div",{className:"".concat(r,"-content")},u)),c.createElement(Zt,d({visible:n,ref:k,leavedClassName:"".concat(r,"-hidden")},U,{onAppearPrepare:G,onEnterPrepare:G,removeOnLeave:l,forceRender:f}),(function(t,e){var n=t.className,i=t.style,u=W()(r,o,T,n);return c.createElement(An,{target:v||m,key:"popup",ref:P,monitorWindowResize:!0,disabled:$,align:h,onAlign:X},c.createElement("div",{ref:e,className:u,onMouseEnter:b,onMouseLeave:w,onMouseDownCapture:O,onTouchStartCapture:E,onClick:x,style:p(p({},i),q)},K))}))}));In.displayName="PopupInner";const Wn=In;var Fn=c.forwardRef((function(t,e){var n=t.prefixCls,r=t.visible,o=t.zIndex,i=t.children,u=t.mobile,a=(u=void 0===u?{}:u).popupClassName,s=u.popupStyle,l=u.popupMotion,f=void 0===l?{}:l,h=u.popupRender,v=t.onClick,m=c.useRef();c.useImperativeHandle(e,(function(){return{forceAlign:function(){},getElement:function(){return m.current}}}));var y=p({zIndex:o},s),g=i;return c.Children.count(i)>1&&(g=c.createElement("div",{className:"".concat(n,"-content")},i)),h&&(g=h(g)),c.createElement(Zt,d({visible:r,ref:m,removeOnLeave:!0},f),(function(t,e){var r=t.className,o=t.style,i=W()(n,a,r);return c.createElement("div",{ref:e,className:i,onClick:v,style:p(p({},o),y)},g)}))}));Fn.displayName="MobilePopupInner";const Bn=Fn;var zn=["visible","mobile"],Yn=c.forwardRef((function(t,e){var n=t.visible,r=t.mobile,o=Y(t,zn),i=z((0,c.useState)(n),2),u=i[0],a=i[1],s=z((0,c.useState)(!1),2),l=s[0],f=s[1],h=p(p({},o),{},{visible:u});(0,c.useEffect)((function(){a(n),n&&r&&f(function(){if("undefined"==typeof navigator||"undefined"==typeof window)return!1;var t=navigator.userAgent||navigator.vendor||window.opera;return!(!/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)&&!/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(null==t?void 0:t.substr(0,4)))}())}),[n,r]);var v=l?c.createElement(Bn,d({},h,{mobile:r,ref:e})):c.createElement(Wn,d({},h,{ref:e}));return c.createElement("div",null,c.createElement(Qt,h),v)}));Yn.displayName="Popup";const Xn=Yn;const Un=c.createContext(null);function Gn(){}function qn(){return""}function $n(t){return t?t.ownerDocument:window.document}var Kn=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"];const Zn=(Jn=H,Qn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&m(t,e)}(i,t);var e,n,r,o=w(i);function i(t){var e,n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t)).popupRef=c.createRef(),e.triggerRef=c.createRef(),e.portalContainer=void 0,e.attachId=void 0,e.clickOutsideHandler=void 0,e.touchOutsideHandler=void 0,e.contextMenuOutsideHandler1=void 0,e.contextMenuOutsideHandler2=void 0,e.mouseDownTimeout=void 0,e.focusTime=void 0,e.preClickTime=void 0,e.preTouchTime=void 0,e.delayTimer=void 0,e.hasPopupMouseDown=void 0,e.onMouseEnter=function(t){var n=e.props.mouseEnterDelay;e.fireEvents("onMouseEnter",t),e.delaySetPopupVisible(!0,n,n?null:t)},e.onMouseMove=function(t){e.fireEvents("onMouseMove",t),e.setPoint(t)},e.onMouseLeave=function(t){e.fireEvents("onMouseLeave",t),e.delaySetPopupVisible(!1,e.props.mouseLeaveDelay)},e.onPopupMouseEnter=function(){e.clearDelayTimer()},e.onPopupMouseLeave=function(t){var n;t.relatedTarget&&!t.relatedTarget.setTimeout&&M(null===(n=e.popupRef.current)||void 0===n?void 0:n.getElement(),t.relatedTarget)||e.delaySetPopupVisible(!1,e.props.mouseLeaveDelay)},e.onFocus=function(t){e.fireEvents("onFocus",t),e.clearDelayTimer(),e.isFocusToShow()&&(e.focusTime=Date.now(),e.delaySetPopupVisible(!0,e.props.focusDelay))},e.onMouseDown=function(t){e.fireEvents("onMouseDown",t),e.preClickTime=Date.now()},e.onTouchStart=function(t){e.fireEvents("onTouchStart",t),e.preTouchTime=Date.now()},e.onBlur=function(t){e.fireEvents("onBlur",t),e.clearDelayTimer(),e.isBlurToHide()&&e.delaySetPopupVisible(!1,e.props.blurDelay)},e.onContextMenu=function(t){t.preventDefault(),e.fireEvents("onContextMenu",t),e.setPopupVisible(!0,t)},e.onContextMenuClose=function(){e.isContextMenuToShow()&&e.close()},e.onClick=function(t){if(e.fireEvents("onClick",t),e.focusTime){var n;if(e.preClickTime&&e.preTouchTime?n=Math.min(e.preClickTime,e.preTouchTime):e.preClickTime?n=e.preClickTime:e.preTouchTime&&(n=e.preTouchTime),Math.abs(n-e.focusTime)<20)return;e.focusTime=0}e.preClickTime=0,e.preTouchTime=0,e.isClickToShow()&&(e.isClickToHide()||e.isBlurToHide())&&t&&t.preventDefault&&t.preventDefault();var r=!e.state.popupVisible;(e.isClickToHide()&&!r||r&&e.isClickToShow())&&e.setPopupVisible(!e.state.popupVisible,t)},e.onPopupMouseDown=function(){var t;e.hasPopupMouseDown=!0,clearTimeout(e.mouseDownTimeout),e.mouseDownTimeout=window.setTimeout((function(){e.hasPopupMouseDown=!1}),0),e.context&&(t=e.context).onPopupMouseDown.apply(t,arguments)},e.onDocumentClick=function(t){if(!e.props.mask||e.props.maskClosable){var n=t.target,r=e.getRootDomNode(),o=e.getPopupDomNode();M(r,n)&&!e.isContextMenuOnly()||M(o,n)||e.hasPopupMouseDown||e.close()}},e.getRootDomNode=function(){var t=e.props.getTriggerDOMNode;if(t)return t(e.triggerRef.current);try{var n=j(e.triggerRef.current);if(n)return n}catch(t){}return E().findDOMNode(v(e))},e.getPopupClassNameFromAlign=function(t){var n=[],r=e.props,o=r.popupPlacement,i=r.builtinPlacements,u=r.prefixCls,a=r.alignPoint,c=r.getPopupClassNameFromAlign;return o&&i&&n.push(function(t,e,n,r){for(var o=n.points,i=Object.keys(t),u=0;u<i.length;u+=1){var a=i[u];if(F(t[a].points,o,r))return"".concat(e,"-placement-").concat(a)}return""}(i,u,t,a)),c&&n.push(c(t)),n.join(" ")},e.getComponent=function(){var t=e.props,n=t.prefixCls,r=t.destroyPopupOnHide,o=t.popupClassName,i=t.onPopupAlign,u=t.popupMotion,a=t.popupAnimation,s=t.popupTransitionName,l=t.popupStyle,f=t.mask,p=t.maskAnimation,h=t.maskTransitionName,v=t.maskMotion,m=t.zIndex,y=t.popup,g=t.stretch,b=t.alignPoint,w=t.mobile,O=t.forceRender,E=t.onPopupClick,x=e.state,P=x.popupVisible,k=x.point,C=e.getPopupAlign(),T={};return e.isMouseEnterToShow()&&(T.onMouseEnter=e.onPopupMouseEnter),e.isMouseLeaveToHide()&&(T.onMouseLeave=e.onPopupMouseLeave),T.onMouseDown=e.onPopupMouseDown,T.onTouchStart=e.onPopupMouseDown,c.createElement(Xn,d({prefixCls:n,destroyPopupOnHide:r,visible:P,point:b&&k,className:o,align:C,onAlign:i,animation:a,getClassNameFromAlign:e.getPopupClassNameFromAlign},T,{stretch:g,getRootDomNode:e.getRootDomNode,style:l,mask:f,zIndex:m,transitionName:s,maskAnimation:p,maskTransitionName:h,maskMotion:v,ref:e.popupRef,motion:u,mobile:w,forceRender:O,onClick:E}),"function"==typeof y?y():y)},e.attachParent=function(t){S.cancel(e.attachId);var n,r=e.props,o=r.getPopupContainer,i=r.getDocument,u=e.getRootDomNode();o?(u||0===o.length)&&(n=o(u)):n=i(e.getRootDomNode()).body,n?n.appendChild(t):e.attachId=S((function(){e.attachParent(t)}))},e.getContainer=function(){if(!e.portalContainer){var t=(0,e.props.getDocument)(e.getRootDomNode()).createElement("div");t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",e.portalContainer=t}return e.attachParent(e.portalContainer),e.portalContainer},e.setPoint=function(t){e.props.alignPoint&&t&&e.setState({point:{pageX:t.pageX,pageY:t.pageY}})},e.handlePortalUpdate=function(){e.state.prevPopupVisible!==e.state.popupVisible&&e.props.afterPopupVisibleChange(e.state.popupVisible)},e.triggerContextValue={onPopupMouseDown:e.onPopupMouseDown},n="popupVisible"in t?!!t.popupVisible:!!t.defaultPopupVisible,e.state={prevPopupVisible:n,popupVisible:n},Kn.forEach((function(t){e["fire".concat(t)]=function(n){e.fireEvents(t,n)}})),e}return e=i,n=[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var t,e=this.props;if(this.state.popupVisible)return this.clickOutsideHandler||!this.isClickToHide()&&!this.isContextMenuToShow()||(t=e.getDocument(this.getRootDomNode()),this.clickOutsideHandler=N(t,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(t=t||e.getDocument(this.getRootDomNode()),this.touchOutsideHandler=N(t,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(t=t||e.getDocument(this.getRootDomNode()),this.contextMenuOutsideHandler1=N(t,"scroll",this.onContextMenuClose)),void(!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=N(window,"blur",this.onContextMenuClose)));this.clearOutsideHandler()}},{key:"componentWillUnmount",value:function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),S.cancel(this.attachId)}},{key:"getPopupDomNode",value:function(){var t;return(null===(t=this.popupRef.current)||void 0===t?void 0:t.getElement())||null}},{key:"getPopupAlign",value:function(){var t=this.props,e=t.popupPlacement,n=t.popupAlign,r=t.builtinPlacements;return e&&r?function(t,e,n){return p(p({},t[e]||{}),n)}(r,e,n):n}},{key:"setPopupVisible",value:function(t,e){var n=this.props.alignPoint,r=this.state.popupVisible;this.clearDelayTimer(),r!==t&&("popupVisible"in this.props||this.setState({popupVisible:t,prevPopupVisible:r}),this.props.onPopupVisibleChange(t)),n&&e&&t&&this.setPoint(e)}},{key:"delaySetPopupVisible",value:function(t,e,n){var r=this,o=1e3*e;if(this.clearDelayTimer(),o){var i=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=window.setTimeout((function(){r.setPopupVisible(t,i),r.clearDelayTimer()}),o)}else this.setPopupVisible(t,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(t){var e=this.props.children.props,n=this.props;return e[t]&&n[t]?this["fire".concat(t)]:e[t]||n[t]}},{key:"isClickToShow",value:function(){var t=this.props,e=t.action,n=t.showAction;return-1!==e.indexOf("click")||-1!==n.indexOf("click")}},{key:"isContextMenuOnly",value:function(){var t=this.props.action;return"contextMenu"===t||1===t.length&&"contextMenu"===t[0]}},{key:"isContextMenuToShow",value:function(){var t=this.props,e=t.action,n=t.showAction;return-1!==e.indexOf("contextMenu")||-1!==n.indexOf("contextMenu")}},{key:"isClickToHide",value:function(){var t=this.props,e=t.action,n=t.hideAction;return-1!==e.indexOf("click")||-1!==n.indexOf("click")}},{key:"isMouseEnterToShow",value:function(){var t=this.props,e=t.action,n=t.showAction;return-1!==e.indexOf("hover")||-1!==n.indexOf("mouseEnter")}},{key:"isMouseLeaveToHide",value:function(){var t=this.props,e=t.action,n=t.hideAction;return-1!==e.indexOf("hover")||-1!==n.indexOf("mouseLeave")}},{key:"isFocusToShow",value:function(){var t=this.props,e=t.action,n=t.showAction;return-1!==e.indexOf("focus")||-1!==n.indexOf("focus")}},{key:"isBlurToHide",value:function(){var t=this.props,e=t.action,n=t.hideAction;return-1!==e.indexOf("focus")||-1!==n.indexOf("blur")}},{key:"forcePopupAlign",value:function(){var t;this.state.popupVisible&&(null===(t=this.popupRef.current)||void 0===t||t.forceAlign())}},{key:"fireEvents",value:function(t,e){var n=this.props.children.props[t];n&&n(e);var r=this.props[t];r&&r(e)}},{key:"close",value:function(){this.setPopupVisible(!1)}},{key:"render",value:function(){var t=this.state.popupVisible,e=this.props,n=e.children,r=e.forceRender,o=e.alignPoint,i=e.className,u=e.autoDestroy,a=c.Children.only(n),s={key:"trigger"};this.isContextMenuToShow()?s.onContextMenu=this.onContextMenu:s.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(s.onClick=this.onClick,s.onMouseDown=this.onMouseDown,s.onTouchStart=this.onTouchStart):(s.onClick=this.createTwoChains("onClick"),s.onMouseDown=this.createTwoChains("onMouseDown"),s.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(s.onMouseEnter=this.onMouseEnter,o&&(s.onMouseMove=this.onMouseMove)):s.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?s.onMouseLeave=this.onMouseLeave:s.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(s.onFocus=this.onFocus,s.onBlur=this.onBlur):(s.onFocus=this.createTwoChains("onFocus"),s.onBlur=this.createTwoChains("onBlur"));var l=W()(a&&a.props&&a.props.className,i);l&&(s.className=l);var f=p({},s);L(a)&&(f.ref=R(this.triggerRef,a.ref));var d,h=c.cloneElement(a,f);return(t||this.popupRef.current||r)&&(d=c.createElement(Jn,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),!t&&u&&(d=null),c.createElement(Un.Provider,{value:this.triggerContextValue},h,d)}}],r=[{key:"getDerivedStateFromProps",value:function(t,e){var n=t.popupVisible,r={};return void 0!==n&&e.popupVisible!==n&&(r.popupVisible=n,r.prevPopupVisible=e.popupVisible),r}}],n&&h(e.prototype,n),r&&h(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(c.Component),Qn.contextType=Un,Qn.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:qn,getDocument:$n,onPopupVisibleChange:Gn,afterPopupVisibleChange:Gn,onPopupAlign:Gn,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[],autoDestroy:!1},Qn);var Jn,Qn,tr={adjustX:1,adjustY:1},er=[0,0],nr={left:{points:["cr","cl"],overflow:tr,offset:[-4,0],targetOffset:er},right:{points:["cl","cr"],overflow:tr,offset:[4,0],targetOffset:er},top:{points:["bc","tc"],overflow:tr,offset:[0,-4],targetOffset:er},bottom:{points:["tc","bc"],overflow:tr,offset:[0,4],targetOffset:er},topLeft:{points:["bl","tl"],overflow:tr,offset:[0,-4],targetOffset:er},leftTop:{points:["tr","tl"],overflow:tr,offset:[-4,0],targetOffset:er},topRight:{points:["br","tr"],overflow:tr,offset:[0,-4],targetOffset:er},rightTop:{points:["tl","tr"],overflow:tr,offset:[4,0],targetOffset:er},bottomRight:{points:["tr","br"],overflow:tr,offset:[0,4],targetOffset:er},rightBottom:{points:["bl","br"],overflow:tr,offset:[4,0],targetOffset:er},bottomLeft:{points:["tl","bl"],overflow:tr,offset:[0,4],targetOffset:er},leftBottom:{points:["br","bl"],overflow:tr,offset:[-4,0],targetOffset:er}};const rr=function(t){var e=t.overlay,n=t.prefixCls,r=t.id,o=t.overlayInnerStyle;return c.createElement("div",{className:"".concat(n,"-inner"),id:r,role:"tooltip",style:o},"function"==typeof e?e():e)};var or=function(t,e){var n=t.overlayClassName,s=t.trigger,l=void 0===s?["hover"]:s,f=t.mouseEnterDelay,p=void 0===f?0:f,d=t.mouseLeaveDelay,h=void 0===d?.1:d,v=t.overlayStyle,m=t.prefixCls,y=void 0===m?"rc-tooltip":m,g=t.children,b=t.onVisibleChange,w=t.afterVisibleChange,O=t.transitionName,E=t.animation,x=t.motion,P=t.placement,k=void 0===P?"right":P,C=t.align,T=void 0===C?{}:C,S=t.destroyTooltipOnHide,M=void 0!==S&&S,j=t.defaultVisible,_=t.getTooltipContainer,D=t.overlayInnerStyle,A=a(t,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle"]),R=(0,c.useRef)(null);(0,c.useImperativeHandle)(e,(function(){return R.current}));var L=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},A);"visible"in t&&(L.popupVisible=t.visible);var N=!1,V=!1;if("boolean"==typeof M)N=M;else if(M&&"object"===o(M)){var H=M.keepParent;N=!0===H,V=!1===H}return c.createElement(Zn,r({popupClassName:n,prefixCls:y,popup:function(){var e=t.arrowContent,n=void 0===e?null:e,r=t.overlay,o=t.id;return[c.createElement("div",{className:"".concat(y,"-arrow"),key:"arrow"},n),c.createElement(rr,{key:"content",prefixCls:y,id:o,overlay:r,overlayInnerStyle:D})]},action:l,builtinPlacements:nr,popupPlacement:k,ref:R,popupAlign:T,getPopupContainer:_,onPopupVisibleChange:b,afterPopupVisibleChange:w,popupTransitionName:O,popupAnimation:E,popupMotion:x,defaultPopupVisible:j,destroyPopupOnHide:N,autoDestroy:V,mouseLeaveDelay:h,popupStyle:v,mouseEnterDelay:p},L),g)};const ir=(0,c.forwardRef)(or)}}]);
|
|
9
|
+
//# sourceMappingURL=378-c5be1d.js.map
|