(self.webpackChunkopencelium=self.webpackChunkopencelium||[]).push([[292],{55292:(e,n,o)=>{!function(e){function n(n,o,t){var i,u=n.getWrapperElement();return(i=u.appendChild(document.createElement("div"))).className=t?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof o?i.innerHTML=o:i.appendChild(o),e.addClass(u,"dialog-opened"),i}function o(e,n){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=n}e.defineExtension("openDialog",(function(t,i,u){u||(u={}),o(this,null);var l=n(this,t,u.bottom),r=!1,a=this;function c(n){if("string"==typeof n)f.value=n;else{if(r)return;r=!0,e.rmClass(l.parentNode,"dialog-opened"),l.parentNode.removeChild(l),a.focus(),u.onClose&&u.onClose(l)}}var s,f=l.getElementsByTagName("input")[0];return f?(f.focus(),u.value&&(f.value=u.value,!1!==u.selectValueOnOpen&&f.select()),u.onInput&&e.on(f,"input",(function(e){u.onInput(e,f.value,c)})),u.onKeyUp&&e.on(f,"keyup",(function(e){u.onKeyUp(e,f.value,c)})),e.on(f,"keydown",(function(n){u&&u.onKeyDown&&u.onKeyDown(n,f.value,c)||((27==n.keyCode||!1!==u.closeOnEnter&&13==n.keyCode)&&(f.blur(),e.e_stop(n),c()),13==n.keyCode&&i(f.value,n))})),!1!==u.closeOnBlur&&e.on(l,"focusout",(function(e){null!==e.relatedTarget&&c()}))):(s=l.getElementsByTagName("button")[0])&&(e.on(s,"click",(function(){c(),a.focus()})),!1!==u.closeOnBlur&&e.on(s,"blur",c),s.focus()),c})),e.defineExtension("openConfirm",(function(t,i,u){o(this,null);var l=n(this,t,u&&u.bottom),r=l.getElementsByTagName("button"),a=!1,c=this,s=1;function f(){a||(a=!0,e.rmClass(l.parentNode,"dialog-opened"),l.parentNode.removeChild(l),c.focus())}r[0].focus();for(var d=0;d<r.length;++d){var p=r[d];!function(n){e.on(p,"click",(function(o){e.e_preventDefault(o),f(),n&&n(c)}))}(i[d]),e.on(p,"blur",(function(){--s,setTimeout((function(){s<=0&&f()}),200)})),e.on(p,"focus",(function(){++s}))}})),e.defineExtension("openNotification",(function(t,i){o(this,c);var u,l=n(this,t,i&&i.bottom),r=!1,a=i&&void 0!==i.duration?i.duration:5e3;function c(){r||(r=!0,clearTimeout(u),e.rmClass(l.parentNode,"dialog-opened"),l.parentNode.removeChild(l))}return e.on(l,"click",(function(n){e.e_preventDefault(n),c()})),a&&(u=setTimeout(c,a)),c}))}(o(4631))}}]);