mirror of
https://gitee.com/dcren/cloud-native-app-initializer.git
synced 2025-07-16 16:50:41 +08:00
2 lines
25 KiB
JavaScript
2 lines
25 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{104:function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var o=arguments[t];for(var r in o)n.call(o,r)&&(e[r]=o[r])}return e};var n=Object.prototype.hasOwnProperty},106:function(e,t,n){"use strict";var o=n(111).CopyToClipboard;o.CopyToClipboard=o,e.exports=o},111:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var o=i(n(0)),r=i(n(112));function i(e){return e&&e.__esModule?e:{default:e}}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function s(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?f(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=function(e){function t(){var e,n;l(this,t);for(var i=arguments.length,a=new Array(i),c=0;c<i;c++)a[c]=arguments[c];return v(f(n=p(this,(e=d(t)).call.apply(e,[this].concat(a)))),"onClick",(function(e){var t=n.props,i=t.text,a=t.onCopy,c=t.children,s=t.options,l=o.default.Children.only(c),u=(0,r.default)(i,s);a&&a(i,u),l&&l.props&&"function"==typeof l.props.onClick&&l.props.onClick(e)})),n}var n,i,a;return 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}}),t&&y(e,t)}(t,e),n=t,(i=[{key:"render",value:function(){var e=this.props,t=(e.text,e.onCopy,e.options,e.children),n=s(e,["text","onCopy","options","children"]),r=o.default.Children.only(t);return o.default.cloneElement(r,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(n,!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n,{onClick:this.onClick}))}}])&&u(n.prototype,i),a&&u(n,a),t}(o.default.PureComponent);t.CopyToClipboard=b,v(b,"defaultProps",{onCopy:void 0,options:void 0})},112:function(e,t,n){"use strict";var o=n(113),r={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,i,a,c,s,l,u=!1;t||(t={}),n=t.debug||!1;try{if(a=o(),c=document.createRange(),s=document.getSelection(),(l=document.createElement("span")).textContent=e,l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(o){if(o.stopPropagation(),t.format)if(o.preventDefault(),void 0===o.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=r[t.format]||r.default;window.clipboardData.setData(i,e)}else o.clipboardData.clearData(),o.clipboardData.setData(t.format,e);t.onCopy&&(o.preventDefault(),t.onCopy(o.clipboardData))})),document.body.appendChild(l),c.selectNodeContents(l),s.addRange(c),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(o){n&&console.error("unable to copy using execCommand: ",o),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(o){n&&console.error("unable to copy using clipboardData: ",o),n&&console.error("falling back to prompt"),i=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(i,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(c):s.removeAllRanges()),l&&document.body.removeChild(l),a()}return u}},113:function(e,t){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],o=0;o<e.rangeCount;o++)n.push(e.getRangeAt(o));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}}},119:function(e,t,n){(function(n){var o,r,i;r=[],void 0===(i="function"==typeof(o=function(){"use strict";function t(e,t,n){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){a(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function o(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function r(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var i="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,a=i.saveAs||("object"!=typeof window||window!==i?function(){}:"download"in HTMLAnchorElement.prototype?function(e,n,a){var c=i.URL||i.webkitURL,s=document.createElement("a");n=n||e.name||"download",s.download=n,s.rel="noopener","string"==typeof e?(s.href=e,s.origin===location.origin?r(s):o(s.href)?t(e,n,a):r(s,s.target="_blank")):(s.href=c.createObjectURL(e),setTimeout((function(){c.revokeObjectURL(s.href)}),4e4),setTimeout((function(){r(s)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,i){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,i),n);else if(o(e))t(e,n,i);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){r(a)}))}}:function(e,n,o,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,o);var a="application/octet-stream"===e.type,c=/constructor/i.test(i.HTMLElement)||i.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||a&&c)&&"object"==typeof FileReader){var l=new FileReader;l.onloadend=function(){var e=l.result;e=s?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=e:location=e,r=null},l.readAsDataURL(e)}else{var u=i.URL||i.webkitURL,p=u.createObjectURL(e);r?r.location=p:location.href=p,r=null,setTimeout((function(){u.revokeObjectURL(p)}),4e4)}});i.saveAs=a.saveAs=a,e.exports=a})?o.apply(t,r):o)||(e.exports=i)}).call(this,n(28))},120:function(e,t,n){"use strict";var o=n(0),r=n.n(o),i=n(13),a=n.n(i),c=n(1),s=n.n(c),l=n(102),u=n(20),p=n.n(u),d=n(137),f=n.n(d),y=n(138),v=n.n(y);function b(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e,t,n){return t&&b(e.prototype,t),n&&b(e,n),e}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){m(e,t,n[t])}))}return e}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var C=function(e){var t=e.classes,n=e.classNames,o=e.styles,i=e.closeIconSize,a=e.closeIconSvgPath,c=e.onClickCloseIcon,s=e.id;return r.a.createElement("button",{className:p()(t.closeButton,n.closeButton),style:o.closeButton,onClick:c,id:s},r.a.createElement("svg",{className:p()(t.closeIcon,n.closeIcon),style:o.closeIcon,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 36 36"},a))};C.propTypes={classNames:s.a.object.isRequired,styles:s.a.object.isRequired,classes:s.a.object.isRequired,closeIconSize:s.a.number.isRequired,closeIconSvgPath:s.a.node.isRequired,onClickCloseIcon:s.a.func.isRequired,id:s.a.string},C.defaultProps={id:null};var x=[],_=function(){return x},k=function(e){-1===x.indexOf(e)&&x.push(e)},D=function(e){var t=x.indexOf(e);-1!==t&&x.splice(t,1)},T=function(e){return!!x.length&&x[x.length-1]===e};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&o.firstChild?o.insertBefore(r,o.firstChild):o.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}(".styles_overlay__CLSq- {\n background: rgba(0, 0, 0, 0.75);\n display: flex;\n align-items: flex-start;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow-y: auto;\n overflow-x: hidden;\n z-index: 1000;\n padding: 1.2rem;\n}\n.styles_modal__gNwvD {\n max-width: 800px;\n position: relative;\n padding: 1.2rem;\n background: #ffffff;\n background-clip: padding-box;\n box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.25);\n margin: 0 auto;\n}\n.styles_modalCenter__L9F2w {\n margin: auto;\n}\n.styles_closeButton__20ID4 {\n position: absolute;\n top: 14px;\n right: 14px;\n border: none;\n padding: 0;\n background-color: transparent;\n display: flex;\n}\n.styles_closeIcon__1QwbI {\n}\n.styles_transitionEnter__3j_-a {\n opacity: 0.01;\n}\n.styles_transitionEnterActive___eQs7 {\n opacity: 1;\n transition: opacity 500ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n.styles_transitionExit__1KmEf {\n opacity: 1;\n}\n.styles_transitionExitActive__1nQXw {\n opacity: 0.01;\n transition: opacity 500ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n",{insertAt:"top"});var j="undefined"!=typeof window,S=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=function(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?O(e):t}(this,g(t).call(this,e)),m(O(n),"shouldClose",null),m(O(n),"handleOpen",(function(){k(O(n)),j&&!n.props.container&&document.body.appendChild(n.container),n.props.blockScroll&&t.blockScroll(),document.addEventListener("keydown",n.handleKeydown)})),m(O(n),"handleClose",(function(){D(O(n)),n.props.blockScroll&&t.unblockScroll(),j&&!n.props.container&&document.body.removeChild(n.container),document.removeEventListener("keydown",n.handleKeydown)})),m(O(n),"handleClickOverlay",(function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose?(n.props.onOverlayClick&&n.props.onOverlayClick(e),n.props.closeOnOverlayClick&&n.props.onClose(e),n.shouldClose=null):n.shouldClose=null})),m(O(n),"handleClickCloseIcon",(function(e){n.props.onClose(e)})),m(O(n),"handleKeydown",(function(e){27===e.keyCode&&T(O(n))&&(n.props.onEscKeyDown&&n.props.onEscKeyDown(e),n.props.closeOnEsc&&n.props.onClose(e))})),m(O(n),"handleModalEvent",(function(){n.shouldClose=!1})),m(O(n),"handleEntered",(function(){n.props.onEntered&&n.props.onEntered()})),m(O(n),"handleExited",(function(){n.props.onExited&&n.props.onExited(),n.setState({showPortal:!1}),n.props.blockScroll&&t.unblockScroll()})),n.container=j&&document.createElement("div"),n.state={showPortal:n.props.open},n}return 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}}),t&&E(e,t)}(t,e),h(t,null,[{key:"blockScroll",value:function(){f.a.on()}}]),h(t,[{key:"componentDidMount",value:function(){this.props.open&&this.handleOpen()}},{key:"componentDidUpdate",value:function(e,t){t.showPortal&&!this.state.showPortal?this.handleClose():!e.open&&this.props.open&&this.handleOpen()}},{key:"componentWillUnmount",value:function(){this.state.showPortal&&this.handleClose()}},{key:"render",value:function(){var e=this.props,t=e.open,n=e.center,o=e.classes,i=e.classNames,c=e.styles,s=e.showCloseIcon,u=e.closeIconSize,d=e.closeIconSvgPath,f=e.animationDuration,y=e.focusTrapped,b=e.focusTrapOptions,h=e.overlayId,m=e.modalId,g=e.closeIconId,E=e.role,O=e.ariaLabelledby,x=e.ariaDescribedby;if(!this.state.showPortal)return null;var _=r.a.createElement(r.a.Fragment,null,this.props.children,s&&r.a.createElement(C,{classes:o,classNames:i,styles:c,closeIconSize:u,closeIconSvgPath:d,onClickCloseIcon:this.handleClickCloseIcon,id:g}));return a.a.createPortal(r.a.createElement(l.a,{in:t,appear:!0,classNames:{appear:i.transitionEnter||o.transitionEnter,appearActive:i.transitionEnterActive||o.transitionEnterActive,enter:i.transitionEnter||o.transitionEnter,enterActive:i.transitionEnterActive||o.transitionEnterActive,exit:i.transitionExit||o.transitionExit,exitActive:i.transitionExitActive||o.transitionExitActive},timeout:f,onEntered:this.handleEntered,onExited:this.handleExited},r.a.createElement("div",{className:p()(o.overlay,i.overlay),onClick:this.handleClickOverlay,style:c.overlay,id:h},r.a.createElement("div",{className:p()(o.modal,n&&o.modalCenter,i.modal),style:c.modal,onMouseDown:this.handleModalEvent,onMouseUp:this.handleModalEvent,onClick:this.handleModalEvent,id:m,role:E,"aria-modal":"true","aria-labelledby":O,"aria-describedby":x},y?r.a.createElement(v.a,{focusTrapOptions:w({},{clickOutsideDeactivates:!0},b)},_):_))),this.props.container||this.container)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return!t.showPortal&&e.open?{showPortal:!0}:null}}]),t}(o.Component);m(S,"unblockScroll",(function(){0===_().length&&f.a.off()})),S.propTypes={closeOnEsc:s.a.bool,closeOnOverlayClick:s.a.bool,onEntered:s.a.func,onExited:s.a.func,onClose:s.a.func.isRequired,onEscKeyDown:s.a.func,onOverlayClick:s.a.func,open:s.a.bool.isRequired,classNames:s.a.object,styles:s.a.object,children:s.a.node,classes:s.a.object,center:s.a.bool,showCloseIcon:s.a.bool,closeIconSize:s.a.number,closeIconSvgPath:s.a.node,animationDuration:s.a.number,container:s.a.object,blockScroll:s.a.bool,focusTrapped:s.a.bool,focusTrapOptions:s.a.object,overlayId:s.a.string,modalId:s.a.string,closeIconId:s.a.string,role:s.a.string,ariaLabelledby:s.a.string,ariaDescribedby:s.a.string},S.defaultProps={classes:{overlay:"styles_overlay__CLSq-",modal:"styles_modal__gNwvD",modalCenter:"styles_modalCenter__L9F2w",closeButton:"styles_closeButton__20ID4",closeIcon:"styles_closeIcon__1QwbI",transitionEnter:"styles_transitionEnter__3j_-a",transitionEnterActive:"styles_transitionEnterActive___eQs7",transitionExit:"styles_transitionExit__1KmEf",transitionExitActive:"styles_transitionExitActive__1nQXw"},closeOnEsc:!0,closeOnOverlayClick:!0,onEntered:void 0,onExited:void 0,onEscKeyDown:void 0,onOverlayClick:void 0,showCloseIcon:!0,closeIconSize:28,closeIconSvgPath:r.a.createElement("path",{d:"M28.5 9.62L26.38 7.5 18 15.88 9.62 7.5 7.5 9.62 15.88 18 7.5 26.38l2.12 2.12L18 20.12l8.38 8.38 2.12-2.12L20.12 18z"}),classNames:{},styles:{},children:null,center:!1,animationDuration:500,blockScroll:!0,focusTrapped:!0,focusTrapOptions:{},overlayId:void 0,modalId:void 0,closeIconId:void 0,role:"dialog",ariaLabelledby:void 0,ariaDescribedby:void 0},t.a=S},137:function(e,t,n){!function(t){var n,o,r=!1;function i(e){if("undefined"!=typeof document&&!r){var t=document.documentElement;o=window.pageYOffset,document.documentElement.scrollHeight>window.innerHeight?t.style.width="calc(100% - "+function(){if(void 0!==n)return n;var e=document.documentElement,t=document.createElement("div");return t.setAttribute("style","width:99px;height:99px;position:absolute;top:-9999px;overflow:scroll;"),e.appendChild(t),n=t.offsetWidth-t.clientWidth,e.removeChild(t),n}()+"px)":t.style.width="100%",t.style.position="fixed",t.style.top=-o+"px",t.style.overflow="hidden",r=!0}}function a(){if("undefined"!=typeof document&&r){var e=document.documentElement;e.style.width="",e.style.position="",e.style.top="",e.style.overflow="",window.scroll(0,o),r=!1}}var c={on:i,off:a,toggle:function(){r?a():i()}};void 0!==e.exports?e.exports=c:t.noScroll=c}(this)},138:function(e,t,n){"use strict";var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();var r=n(0),i=n(139),a=["active","paused","tag","focusTrapOptions","_createFocusTrap"],c=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setNode=function(e){n.node=e},"undefined"!=typeof document&&(n.previouslyFocusedElement=document.activeElement),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){var e=this.props.focusTrapOptions,t={returnFocusOnDeactivate:!1};for(var n in e)e.hasOwnProperty(n)&&"returnFocusOnDeactivate"!==n&&(t[n]=e[n]);this.focusTrap=this.props._createFocusTrap(this.node,t),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause()}},{key:"componentDidUpdate",value:function(e){if(e.active&&!this.props.active){var t={returnFocus:this.props.focusTrapOptions.returnFocusOnDeactivate||!1};this.focusTrap.deactivate(t)}else!e.active&&this.props.active&&this.focusTrap.activate();e.paused&&!this.props.paused?this.focusTrap.unpause():!e.paused&&this.props.paused&&this.focusTrap.pause()}},{key:"componentWillUnmount",value:function(){this.focusTrap.deactivate(),!1!==this.props.focusTrapOptions.returnFocusOnDeactivate&&this.previouslyFocusedElement&&this.previouslyFocusedElement.focus&&this.previouslyFocusedElement.focus()}},{key:"render",value:function(){var e={ref:this.setNode};for(var t in this.props)this.props.hasOwnProperty(t)&&-1===a.indexOf(t)&&(e[t]=this.props[t]);return r.createElement(this.props.tag,e,this.props.children)}}]),t}(r.Component);c.defaultProps={active:!0,tag:"div",paused:!1,focusTrapOptions:{},_createFocusTrap:i},e.exports=c},139:function(e,t,n){var o=n(140),r=n(104),i=null;function a(e){return setTimeout(e,0)}e.exports=function(e,t){var n=document,c="string"==typeof e?n.querySelector(e):e,s=r({returnFocusOnDeactivate:!0,escapeDeactivates:!0},t),l={firstTabbableNode:null,lastTabbableNode:null,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1},u={activate:function(e){if(l.active)return;g(),l.active=!0,l.paused=!1,l.nodeFocusedBeforeActivation=n.activeElement;var t=e&&e.onActivate?e.onActivate:s.onActivate;t&&t();return d(),u},deactivate:p,pause:function(){if(l.paused||!l.active)return;l.paused=!0,f()},unpause:function(){if(!l.paused||!l.active)return;l.paused=!1,d()}};return u;function p(e){if(l.active){f(),l.active=!1,l.paused=!1;var t=e&&void 0!==e.onDeactivate?e.onDeactivate:s.onDeactivate;return t&&t(),(e&&void 0!==e.returnFocus?e.returnFocus:s.returnFocusOnDeactivate)&&a((function(){E(l.nodeFocusedBeforeActivation)})),u}}function d(){if(l.active)return i&&i.pause(),i=u,g(),a((function(){E(v())})),n.addEventListener("focusin",h,!0),n.addEventListener("mousedown",b,!0),n.addEventListener("touchstart",b,!0),n.addEventListener("click",w,!0),n.addEventListener("keydown",m,!0),u}function f(){if(l.active&&i===u)return n.removeEventListener("focusin",h,!0),n.removeEventListener("mousedown",b,!0),n.removeEventListener("touchstart",b,!0),n.removeEventListener("click",w,!0),n.removeEventListener("keydown",m,!0),i=null,u}function y(e){var t=s[e],o=t;if(!t)return null;if("string"==typeof t&&!(o=n.querySelector(t)))throw new Error("`"+e+"` refers to no known node");if("function"==typeof t&&!(o=t()))throw new Error("`"+e+"` did not return a node");return o}function v(){var e;if(!(e=null!==y("initialFocus")?y("initialFocus"):c.contains(n.activeElement)?n.activeElement:l.firstTabbableNode||y("fallbackFocus")))throw new Error("You can't have a focus-trap without at least one focusable element");return e}function b(e){c.contains(e.target)||(s.clickOutsideDeactivates?p({returnFocus:!o.isFocusable(e.target)}):e.preventDefault())}function h(e){c.contains(e.target)||e.target instanceof Document||(e.stopImmediatePropagation(),E(l.mostRecentlyFocusedNode||v()))}function m(e){if(!1!==s.escapeDeactivates&&function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e))return e.preventDefault(),void p();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){if(g(),e.shiftKey&&e.target===l.firstTabbableNode)return e.preventDefault(),void E(l.lastTabbableNode);if(!e.shiftKey&&e.target===l.lastTabbableNode)e.preventDefault(),E(l.firstTabbableNode)}(e)}function w(e){s.clickOutsideDeactivates||c.contains(e.target)||(e.preventDefault(),e.stopImmediatePropagation())}function g(){var e=o(c);l.firstTabbableNode=e[0]||v(),l.lastTabbableNode=e[e.length-1]||v()}function E(e){e!==n.activeElement&&(e&&e.focus?(e.focus(),l.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):E(v()))}}},140:function(e,t){var n=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'],o=n.join(","),r="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector;function i(e,t){t=t||{};var n,i,c,s=[],p=[],f=new d(e.ownerDocument||e),y=e.querySelectorAll(o);for(t.includeContainer&&r.call(e,o)&&(y=Array.prototype.slice.apply(y)).unshift(e),n=0;n<y.length;n++)a(i=y[n],f)&&(0===(c=l(i))?s.push(i):p.push({documentOrder:n,tabIndex:c,node:i}));return p.sort(u).map((function(e){return e.node})).concat(s)}function a(e,t){return!(!c(e,t)||function(e){return function(e){return p(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t=function(e){for(var t=0;t<e.length;t++)if(e[t].checked)return e[t]}(e.ownerDocument.querySelectorAll('input[type="radio"][name="'+e.name+'"]'));return!t||t===e}(e)}(e)||l(e)<0)}function c(e,t){return t=t||new d(e.ownerDocument||e),!(e.disabled||function(e){return p(e)&&"hidden"===e.type}(e)||t.isUntouchable(e))}i.isTabbable=function(e,t){if(!e)throw new Error("No node provided");return!1!==r.call(e,o)&&a(e,t)},i.isFocusable=function(e,t){if(!e)throw new Error("No node provided");return!1!==r.call(e,s)&&c(e,t)};var s=n.concat("iframe").join(",");function l(e){var t=parseInt(e.getAttribute("tabindex"),10);return isNaN(t)?function(e){return"true"===e.contentEditable}(e)?0:e.tabIndex:t}function u(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex}function p(e){return"INPUT"===e.tagName}function d(e){this.doc=e,this.cache=[]}d.prototype.hasDisplayNone=function(e,t){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var n=function(e,t){for(var n=0,o=e.length;n<o;n++)if(t(e[n]))return e[n]}(this.cache,(function(t){return t===e}));if(n)return n[1];var o=!1;return"none"===(t=t||this.doc.defaultView.getComputedStyle(e)).display?o=!0:e.parentNode&&(o=this.hasDisplayNone(e.parentNode)),this.cache.push([e,o]),o},d.prototype.isUntouchable=function(e){if(e===this.doc.documentElement)return!1;var t=this.doc.defaultView.getComputedStyle(e);return!!this.hasDisplayNone(e,t)||"hidden"===t.visibility},e.exports=i}}]);
|
|
//# sourceMappingURL=chunk-1796b09a042cad55c924.js.map
|