text: (window.webpackJsonp=window.webpackJsonp||[]).push([[74],{"./bundles/sf-drop-down-button.js":function(t,e,n){"use strict";n.r(e);n("./modules/sf-drop-down-button.js")},"./modules/sf-drop-down-button.js":function(t,e){window.sfBlazor=window.sfBlazor||{},window.sfBlazor.DropDownButton=function(){"use strict";var t=function(){function t(t,e,n){this.element=t,this.dotNetRef=n,this.popup=e,this.element.blazor__instance=this}return t.prototype.calculatePosition=function(){var t=getComputedStyle(this.element);this.popup.style.visibility="hidden",this.popup.classList.remove("e-transparent");var e=this.popup.getBoundingClientRect(),n=0-(t.borderLeftWidth?parseInt(t.borderLeftWidth,10):0),o=t.borderBottomWidth?parseInt(t.borderBottomWidth,10):0,s=-e.height-o,i=sf.popups.getZindexPartial(this.popup),r=this.element.getBoundingClientRect();return e.height+r.bottom>document.documentElement.clientHeight&&r.top-e.height>document.documentElement.clientTop&&(s=r.height-o),e.width+r.right>document.documentElement.clientWidth&&r.left-e.width>document.documentElement.clientLeft&&(n=r.width-e.width),n=Math.ceil(n),s=Math.ceil(s),this.popup.classList.add("e-transparent"),this.popup.style.visibility="",this.popup.firstElementChild&&this.popup.firstElementChild.focus(),this.addEventListener(),{Left:n,Bottom:s,ZIndex:i}},t.prototype.mouseDownHandler=function(t){sf.base.closest(t.target,"#"+this.getDropDownButton().id)||(this.dotNetRef.invokeMethodAsync("BtnClick",null),this.removeEventListener())},t.prototype.keydownHandler=function(t){var e=this.getElement();if(t.altKey)38===t.keyCode&&(t.stopPropagation(),t.preventDefault(),this.dotNetRef.invokeMethodAsync("BtnClick",null),e.focus(),this.removeEventListener());else{var n=this.popup.firstElementChild;if(27!==t.keyCode&&9!==t.keyCode||(t.stopPropagation(),this.dotNetRef.invokeMethodAsync("BtnClick",null),27===t.keyCode?(t.preventDefault(),e.focus()):t.shiftKey&&(sf.base.EventHandler.add(e,"focus",this.preventFocus,this),e.tabIndex=-1,e.focus()),this.removeEventListener()),!n||!n.classList.contains("e-dropdown-menu"))return;if(13===t.keyCode)return t.preventDefault(),void(t.target.classList.contains("e-item")&&t.target.classList.contains("e-focused")?(e.focus(),this.removeEventListener()):t.stopPropagation());38!==t.keyCode&&40!==t.keyCode||(t.target.classList.contains("e-dropdown-menu")&&t.stopPropagation(),t.preventDefault(),sf.splitbuttons.upDownKeyHandler(n,t.keyCode))}},t.prototype.preventFocus=function(t){var e=this.getElement();t.preventDefault(),sf.base.EventHandler.remove(e,"focus",this.preventFocus),e.removeAttribute("tabindex")},t.prototype.getElement=function(){return this.element.classList.contains("e-split-btn-wrapper")?this.element.firstElementChild:this.element},t.prototype.getDropDownButton=function(){return this.element.classList.contains("e-split-btn-wrapper")?this.element.getElementsByClassName("e-dropdown-btn")[0]:this.element},t.prototype.btnClickHandler=function(t){sf.base.closest(t.target,"#"+this.popup.id)?sf.base.closest(t.target,".e-item")&&(this.removeEventListener(),this.getElement().focus()):this.removeEventListener()},t.prototype.addEventListener=function(t){if(sf.base.EventHandler.add(document,"mousedown touchstart",this.mouseDownHandler,this),sf.base.EventHandler.add(this.getDropDownButton(),"click",this.btnClickHandler,this),sf.base.EventHandler.add(this.popup,"keydown",this.keydownHandler,this),t&&this.popup.firstElementChild){var e=this.popup.querySelector(".e-focused");e?e.focus():this.popup.firstElementChild.focus()}},t.prototype.removeEventListener=function(){sf.base.EventHandler.remove(document,"mousedown touchstart",this.mouseDownHandler),sf.base.EventHandler.remove(this.getDropDownButton(),"click",this.btnClickHandler),this.popup.parentElement&&sf.base.EventHandler.remove(this.popup,"keydown",this.keydownHandler)},t}();return{calculatePosition:function(e,n,o){return sf.base.isNullOrUndefined(e.blazor__instance)?(new t(e,n,o),e.blazor__instance.calculatePosition()):(e.blazor__instance.popup=n,e.blazor__instance.calculatePosition())},addEventListener:function(t){t.blazor__instance.addEventListener(!0)},removeEventListener:function(t){t.blazor__instance.removeEventListener()}}}()}}]);