File Manager
Viewing File: 224.js
(window.webpackJsonp=window.webpackJsonp||[]).push([[224],{"20PO":function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M9.7 9l4.65-4.65-.7-.7L9 8.29 4.35 3.65l-.7.7L8.29 9l-4.64 4.65.7.7L9 9.71l4.65 4.64.7-.7L9.71 9z"/></svg>'},"38fQ":function(e,t,n){e.exports={separator:"separator-LcIsiH9i"}},Gpmm:function(e,t,n){e.exports={row:"row-3B5H2q5m",line:"line-3B5H2q5m",hint:"hint-3B5H2q5m"}},IAAr:function(e,t,n){"use strict";var o=n("mrSG"),r=n("q1tI"),a=n("zRdu"),i=n("Gpmm");function s(e){return r.createElement("tr",{className:i.row},r.createElement("td",null,r.createElement("div",{className:i.line})),r.createElement("td",null,r.createElement("div",{className:i.line}),e.hint?r.createElement("div",{className:i.hint},e.hint):null))}var c=n("ycgn"),l=n("TSYQ"),u=n("euMy"),p=n("hn2c"),d=n("aSRw"),m=n("L/Ed"),h=n("i/MG"),f=n("qFKp"),v=n("w+Rv"),b=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._handleMouseOver=function(e){Object(d.a)(e.nativeEvent)||t.props.onMouseOver&&t.props.onMouseOver()},t._handleClickToolbox=function(e){e.stopPropagation(),t.props.onClickToolbox&&t.props.onClickToolbox()},t}return Object(o.c)(t,e),t.prototype.render=function(){var e=this.props,t=e.hasSubItems,n=e.shortcutHint,o=e.hint;return r.createElement(r.Fragment,null,r.createElement("tr",{className:l(c.item,!this.props.noInteractive&&c.interactive,this.props.hovered&&c.hovered,this.props.disabled&&c.disabled,this.props.active&&c.active),onClick:this.props.onClick,onMouseOver:this._handleMouseOver,ref:this.props.reference,"data-action-name":this.props.actionName},r.createElement("td",{className:l(c.iconCell),"data-icon-cell":!0},this._icon()),r.createElement("td",null,r.createElement("div",{className:c.content},r.createElement("span",{className:l(c.label,this.props.checked&&c.checked),"data-label":!0},this.props.label),this._toolbox(),t&&r.createElement("span",{className:c.arrowIcon,dangerouslySetInnerHTML:{__html:p},"data-submenu-arrow":!0}),!t&&n&&!f.CheckMobile.any()&&r.createElement(v.a,{text:n}),!t&&!n&&o&&r.createElement(v.a,{text:o})))),r.createElement("tr",{className:c.subMenu},r.createElement("td",null,this.props.children)))},t.prototype._icon=function(){if(this.props.checkable){if(this.props.checked){var e=!this.props.icon&&!this.props.iconChecked,t=this.props.iconChecked||this.props.icon||u;return r.createElement("span",{className:l(c.icon,e&&c.checkmark),dangerouslySetInnerHTML:{__html:t},"data-icon-checkmark":e})}return this.props.icon?r.createElement("span",{className:c.icon,dangerouslySetInnerHTML:{__html:this.props.icon}}):r.createElement("span",{className:c.icon})}return this.props.icon?r.createElement("span",{className:c.icon,dangerouslySetInnerHTML:{__html:this.props.icon}}):null},t.prototype._toolbox=function(){return this.props.toolbox?r.createElement("span",{className:l(c.toolbox,this.props.showToolboxOnHover&&c.showToolboxOnHover),
onClick:this._handleClickToolbox,"data-toolbox":!0},this._renderToolboxContent()):null},t.prototype._renderToolboxContent=function(){if(this.props.toolbox)switch(this.props.toolbox.type){case m.ToolboxType.Delete:return r.createElement(h.a,{onClick:this.props.toolbox.action})}return null},t}(r.PureComponent),S=n("xRqE"),E=n("tWVy"),_=n("JWMC"),y=n("Ialn");var O=n("dxYz"),w=n("Eyy1"),k=function(e){function t(t){var n=e.call(this,t)||this;return n._itemRef=null,n._menuElementRef=r.createRef(),n._menuRef=null,n._handleClick=function(e){e.isDefaultPrevented()||n.state.disabled||(n._hasSubItems()?n._showSubMenu():(n.state.doNotCloseOnClick||Object(E.b)(),n.props.action.execute(),n._trackEvent()))},n._handleClickToolbox=function(){Object(E.b)()},n._handleItemMouseOver=function(){n._showSubMenu(),n._setCurrentContextValue()},n._handleMenuMouseOver=function(){n._setCurrentContextValue()},n._showSubMenu=function(){n.props.onShowSubMenu(n.props.action)},n._calcSubMenuPos=function(e){return function(e,t,n){if(void 0===n&&(n={x:0,y:10}),t){var o=t.getBoundingClientRect(),r=o.left,a=o.right,i=o.top,s=document.documentElement.clientWidth,c={x:r-e,y:i},l={x:a,y:i};return Object(y.isRtl)()?r<=e?l:c:s-a>=e?l:c}return n}(e,n._itemRef)},n._updateState=function(e){n.setState(e.getState())},n._setItemRef=function(e){n._itemRef=e},n._handleMenuRef=function(e){n._menuRef=e},n.state=Object(o.a)({},n.props.action.getState()),n}return Object(o.c)(t,e),t.prototype.componentDidMount=function(){var e,t=this;this.props.action.onUpdate().subscribe(this,this._updateState),this.state.subItems.length&&(this._unsubscribe=null===(e=this.context)||void 0===e?void 0:e.registerSubmenu(this.props.action.id,(function(e){return Object(w.ensureNotNull)(t._itemRef).contains(e)||null!==t._menuElementRef.current&&t._menuElementRef.current.contains(e)})))},t.prototype.componentDidUpdate=function(e,t){t.subItems!==this.state.subItems&&null!==this._menuRef&&this._menuRef.update()},t.prototype.componentWillUnmount=function(){this.props.action.onUpdate().unsubscribe(this,this._updateState),this._unsubscribe&&this._unsubscribe()},t.prototype.render=function(){var e,t=(null===(e=this.context)||void 0===e?void 0:e.current)?this.context.current===this.props.action.id:this.props.isSubMenuOpened;return r.createElement(b,Object(o.a)({reference:this._setItemRef,onClick:this._handleClick,onClickToolbox:this._handleClickToolbox,onMouseOver:this._handleItemMouseOver,hovered:t,hasSubItems:this._hasSubItems(),actionName:this.state.name},this.state),r.createElement(S.a,{isOpened:t,items:this.state.subItems,position:this._calcSubMenuPos,menuStatName:this.props.menuStatName,parentStatName:this._getStatName(),menuElementReference:this._menuElementRef,onMouseOver:this.state.subItems.length?this._handleMenuMouseOver:void 0,ref:this._handleMenuRef}))},t.prototype._setCurrentContextValue=function(){var e;this.state.subItems.length&&(null===(e=this.context)||void 0===e||e.setCurrent(this.props.action.id))},t.prototype._hasSubItems=function(){return this.state.subItems.length>0},
t.prototype._trackEvent=function(){var e=this._getStatName();Object(_.trackEvent)("ContextMenuClick",this.props.menuStatName||"",e)},t.prototype._getStatName=function(){return[this.props.parentStatName,this.state.statName].filter((function(e){return Boolean(e)})).join(".")},t.contextType=O.a,t}(r.PureComponent),C=n("6KyJ"),x=n("X64X");function g(e){return r.createElement(b,{label:r.createElement("div",{className:x.loaderWrap},r.createElement(C.Loader,{className:x.loader,color:"gray"})),noInteractive:!0,onMouseOver:e.onMouseOver})}function M(e){return r.createElement(b,{label:e.label,noInteractive:!0,disabled:!0,onMouseOver:e.onMouseOver})}var N=n("4O8T"),I=n.n(N),R=function(e){function t(t){var n=e.call(this,t)||this;return n._loadEmitter=new I.a,n._onDone=function(){n.setState({loaded:!0,failed:!1},n._updateMenu)},n._onFail=function(e){n.setState({failed:!0,error:e},n._updateMenu)},n._updateMenu=function(){n.props.menu&&n.props.menu.update()},n._handleMouseOver=function(){n.props.onShowSubMenu(n.props.action)},n.state={loaded:n.props.action.isLoaded(),failed:!1,error:""},n}return Object(o.c)(t,e),t.prototype.componentDidMount=function(){this._loadEmitter.on("done",this._onDone),this._loadEmitter.on("fail",this._onFail),this._load()},t.prototype.componentWillUnmount=function(){this._loadEmitter.removeEvent("done"),this._loadEmitter.removeEvent("fail")},t.prototype.render=function(){return this.state.failed?r.createElement(M,{label:this.state.error,onMouseOver:this._handleMouseOver}):this.state.loaded?r.createElement(k,Object(o.a)({},this.props)):r.createElement(g,{onMouseOver:this._handleMouseOver})},t.prototype._load=function(){var e=this;this.props.action.loadOptions().then((function(){e._loadEmitter.emit("done")})).catch((function(t){e._loadEmitter.emit("fail",t)}))},t}(r.PureComponent),K=n("PN6A");n.d(t,"a",(function(){return B}));var B=function(e){function t(t){var n=e.call(this,t)||this;return n._handleShowSubMenu=function(e){var t=e.getState();n.setState({showSubMenuOf:t.subItems.length?e:void 0})},n.state={},n}return Object(o.c)(t,e),t.prototype.render=function(){var e=this;return r.createElement("table",null,r.createElement("tbody",null,this.props.items.map((function(t){return e._item(t)}))))},t.getDerivedStateFromProps=function(e,t){return!e.parentIsOpened&&t.showSubMenuOf?{showSubMenuOf:void 0}:null},t.prototype._item=function(e){var t=this;switch(e.type){case a.a.Separator:return r.createElement(s,{key:e.id,hint:e.getHint()});case a.a.Action:return r.createElement(k,{key:e.id,action:e,onShowSubMenu:this._handleShowSubMenu,isSubMenuOpened:this.state.showSubMenuOf===e,menuStatName:this.props.menuStatName,parentStatName:this.props.parentStatName});case a.a.ActionAsync:return r.createElement(K.a.Consumer,{key:e.id},(function(n){return r.createElement(R,{action:e,onShowSubMenu:t._handleShowSubMenu,isSubMenuOpened:t.state.showSubMenuOf===e,menuStatName:t.props.menuStatName,parentStatName:t.props.parentStatName,menu:n})}));default:return null}},t}(r.PureComponent)},"J+f8":function(e,t,n){"use strict"
;n.d(t,"a",(function(){return r}));var o=n("q1tI"),r=o.createContext(!1)},"PR+g":function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var o=n("q1tI");const r=()=>{const e=Object(o.useRef)(!1);return Object(o.useEffect)(()=>(e.current=!0,()=>{e.current=!1}),[]),e}},X64X:function(e,t,n){e.exports={loaderWrap:"loaderWrap-2SapxxDI",loader:"loader-2SapxxDI"}},XXQ5:function(e,t,n){e.exports={item:"item-1-SF84yU",emptyIcons:"emptyIcons-1-SF84yU",loading:"loading-1-SF84yU",disabled:"disabled-1-SF84yU",interactive:"interactive-1-SF84yU",hovered:"hovered-1-SF84yU",icon:"icon-1-SF84yU",label:"label-1-SF84yU",fullWidth:"fullWidth-1-SF84yU",title:"title-1-SF84yU",nested:"nested-1-SF84yU",shortcut:"shortcut-1-SF84yU",remove:"remove-1-SF84yU"}},Xy1d:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M7 15l5 5L23 9"/></svg>'},aSRw:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n("EsMY");function o(e){var t=e.sourceCapabilities,n=t&&t.firesTouchEvents;return void 0===n&&(n=Modernizr.touch),n}},euMy:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 14" width="18" height="14"><path fill="currentColor" d="M6 11.17l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z"/></svg>'},fwrW:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16.5 20L11 14.5 16.5 9"/></svg>'},hn2c:function(e,t){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 16" width="10" height="16"><path d="M.6 1.4l1.4-1.4 8 8-8 8-1.4-1.4 6.389-6.532-6.389-6.668z"/></svg>'},"i/MG":function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var o=n("mrSG"),r=(n("YFKU"),n("q1tI")),a=n("TSYQ"),i=n("Iivm"),s=n("To8B"),c=n("kXJy"),l={remove:window.t("Remove")};function u(e){var t=e.className,n=e.isActive,u=e.onClick,p=e.title,d=e.hidden,m=e["data-name"],h=void 0===m?"remove-button":m,f=Object(o.e)(e,["className","isActive","onClick","title","hidden","data-name"]);return r.createElement(i.a,Object(o.a)({},f,{"data-name":h,className:a(c.button,"apply-common-tooltip",n&&c.active,d&&c.hidden,t),icon:s,onClick:u,title:p||l.remove}))}},kXJy:function(e,t,n){e.exports={button:"button-3B9fDLtm",disabled:"disabled-3B9fDLtm",active:"active-3B9fDLtm",hidden:"hidden-3B9fDLtm"}},l1Yu:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var o=n("q1tI"),r=o.createContext(!1)},l4ku:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var o=n("q1tI"),r=n.n(o),a=n("TSYQ"),i=n("Iivm"),s=n("6KyJ"),c=n("J+f8"),l=n("w+Rv"),u=n("Xy1d"),p=n("Xzy5"),d=n("20PO"),m=n("XXQ5");function h(e){
var t=e.isTitle,n=e.isLoading,h=e.isHovered,f=e.active,v=e.checkable,b=e.disabled,S=e.checked,E=e.icon,_=e.iconChecked,y=e.hint,O=e.subItems,w=e.label,k=e.onClick,C=e.children,x=e.toolbox,g=e.fullWidthLabel,M=Object(o.useContext)(c.a),N=!!O.length;return n?r.a.createElement("li",{className:a(m.item,m.loading)},r.a.createElement(s.Loader,{color:"gray"})):r.a.createElement("li",{className:a(m.item,m.interactive,t&&m.title,b&&m.disabled,h&&m.hovered,f&&m.active,M&&m.emptyIcons),onClick:k},r.a.createElement(i.a,{className:a(m.icon),icon:function(){if(v&&S)return _||E||u;return E}()}),r.a.createElement("span",{className:a(m.label,g&&m.fullWidth)},w),!!x&&r.a.createElement(i.a,{onClick:function(){x&&x.action()},className:m.remove,icon:d}),!N&&y&&r.a.createElement(l.a,{className:m.shortcut,text:y}),N&&r.a.createElement(i.a,{className:m.nested,icon:p}),C)}},t3rk:function(e,t,n){e.exports={menu:"menu-1Jmy26Oy"}},"w+Rv":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var o=n("q1tI"),r=n("TSYQ"),a=n.n(r),i=n("ycgn");function s(e){var t=e.text,n=void 0===t?"":t,r=e.className;return o.createElement("span",{className:a()(i.shortcut,r)},n)}},xRqE:function(e,t,n){"use strict";var o=n("mrSG"),r=n("q1tI"),a=n.n(r),i=n("DTHj"),s=n("RgaO"),c=n("ycI/"),l=n("TSYQ"),u=n("IAAr"),p=n("mkWe"),d=n("/KDZ"),m=n("zRdu"),h=n("38fQ");function f(e){return a.a.createElement("li",{className:h.separator})}var v=n("l4ku"),b=n("Sn4D"),S=n("tWVy");function E(e){var t=e.action,n=e.isLoading,i=Object(r.useState)(t.getState()),s=i[0],c=i[1],l=Object(r.useState)(!1),u=l[0],p=l[1],d=function(){return c(t.getState())},m=!!s.subItems.length,h=m&&u;return Object(r.useEffect)((function(){n||c(t.getState())}),[n]),Object(r.useEffect)((function(){return t.onUpdate().subscribe(null,d),function(){t.onUpdate().unsubscribe(null,d)}}),[]),a.a.createElement(v.a,Object(o.a)({},s,{onClick:function(e){if(s.disabled||e.defaultPrevented)return;if(m)return void p(!0);s.doNotCloseOnClick||Object(S.b)();t.execute()},isLoading:n,isHovered:h}),h&&a.a.createElement(b.a,{onClose:f,position:"Bottom"},a.a.createElement(k,{items:s.subItems,parentAction:t,closeNested:f})));function f(e){e&&e.preventDefault(),p(!1)}}var _=n("PR+g");function y(e){var t=e.action,n=Object(r.useState)(t.isLoaded()),o=n[0],i=n[1],s=Object(r.useState)(!1),c=s[0],l=s[1],u=Object(_.a)();return Object(r.useEffect)((function(){t.loadOptions().then((function(){u.current&&(i(!0),l(!1))})).catch((function(){u.current&&l(!0)}))}),[]),a.a.createElement(E,{isLoading:!o||c,action:t})}var O=n("J+f8"),w=n("fwrW");function k(e){var t=e.items,n=e.parentAction,o=e.closeNested,r=!Boolean(n)&&t.every((function(e){return!Boolean(e.type!==m.a.Separator&&(e.getState().icon||e.getState().checkable))}));return a.a.createElement(O.a.Provider,{value:r},a.a.createElement("ul",null,n&&a.a.createElement(a.a.Fragment,null,a.a.createElement(v.a,{label:n.getState().label,isTitle:!0,active:!1,disabled:!1,subItems:[],checkable:!1,checked:!1,doNotCloseOnClick:!1,icon:w,onClick:o}),a.a.createElement(f,null)),t.map((function(e){
switch(e.type){case m.a.Action:return a.a.createElement(E,{key:e.id,action:e});case m.a.Separator:return a.a.createElement(f,{key:e.id});case m.a.ActionAsync:return a.a.createElement(y,{key:e.id,action:e});default:return null}}))))}var C=n("l1Yu"),x=n("t3rk");n.d(t,"a",(function(){return g}));var g=function(e){function t(t){var n=e.call(this,t)||this;return n._menuRef=r.createRef(),n._handleClose=function(){n.props.onClose&&n.props.onClose()},n._handleOutsideClickClose=function(e){var t=n.props,o=t.doNotCloseOn,r=t.onClose;!r||void 0!==o&&o.contains(e.target)||r()},n._handleFocusOnOpen=function(){var e,t;(null===(e=n.props.menuElementReference)||void 0===e?void 0:e.current)&&n.props.takeFocus&&(null===(t=n.props.menuElementReference)||void 0===t||t.current.focus({preventScroll:!0}))},n.state={},n}return Object(o.c)(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.isOpened,a=(t.onClose,t.items),m=(t.doNotCloseOn,t.menuStatName),h=t.parentStatName,f=t.takeFocus,v=Object(o.e)(t,["isOpened","onClose","items","doNotCloseOn","menuStatName","parentStatName","takeFocus"]);return n?r.createElement(r.Fragment,null,r.createElement(c.a,{keyCode:27,eventType:"keyup",handler:this._handleClose}),r.createElement(p.b,null,r.createElement(d.a,{rule:"screen and (max-width: 428px)"},(function(t){return e._isDrawer(t)?r.createElement(b.a,{onClose:e._handleClose,position:"Bottom","data-name":v["data-name"]},r.createElement(C.a.Provider,{value:t},r.createElement(k,{items:a}))):r.createElement(s.a,{handler:e._handleOutsideClickClose,mouseDown:!0,touchStart:!0,reference:e.props.menuElementReference},(function(t){return r.createElement(i.b,Object(o.a)({},v,{reference:t,isOpened:e.props.isOpened,className:l(x.menu,"context-menu"),onClose:e._handleClose,noMomentumBasedScroll:!0,ref:e._menuRef,tabIndex:f?-1:void 0,onOpen:e._handleFocusOnOpen}),r.createElement(u.a,{items:a,menuStatName:m,parentStatName:h,parentIsOpened:n}))}))})))):null},t.prototype.update=function(){this._menuRef.current&&this._menuRef.current.update()},t.prototype._isDrawer=function(e){return void 0===this.props.mode?e:"drawer"===this.props.mode},t}(r.PureComponent)},"ycI/":function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var o=n("mrSG"),r=n("q1tI"),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._handleKeyDown=function(e){e.keyCode===t.props.keyCode&&t.props.handler(e)},t}return Object(o.c)(t,e),t.prototype.componentDidMount=function(){document.addEventListener(this.props.eventType||"keydown",this._handleKeyDown,!1)},t.prototype.componentWillUnmount=function(){document.removeEventListener(this.props.eventType||"keydown",this._handleKeyDown,!1)},t.prototype.render=function(){return null},t}(r.PureComponent)},ycgn:function(e,t,n){e.exports={item:"item-f5BaKrKq",interactive:"interactive-f5BaKrKq",hovered:"hovered-f5BaKrKq",disabled:"disabled-f5BaKrKq",active:"active-f5BaKrKq",shortcut:"shortcut-f5BaKrKq",iconCell:"iconCell-f5BaKrKq",icon:"icon-f5BaKrKq",checkmark:"checkmark-f5BaKrKq",content:"content-f5BaKrKq",
label:"label-f5BaKrKq",checked:"checked-f5BaKrKq",toolbox:"toolbox-f5BaKrKq",showToolboxOnHover:"showToolboxOnHover-f5BaKrKq",arrowIcon:"arrowIcon-f5BaKrKq",subMenu:"subMenu-f5BaKrKq"}}}]);