(self.webpackChunkStreamingAppCoreWebApp=self.webpackChunkStreamingAppCoreWebApp||[]).push([[277],{28:function(){var _this=this;function SubmitAction(event,target,theaction){var areYouSureQuestion=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if((void 0!==event&&event.stopPropagation(),void 0!==areYouSureQuestion&&""!=areYouSureQuestion)&&!window.confirm(areYouSureQuestion))return;var theform=$(target).closest("form");$(theform).attr("action",theaction),$("#MVCloadingAnimation").show(),theform.submit()}function hideSidebar(){var bodyWrapper=document.querySelector("#bodyWrapper"),vmWrapper=document.querySelector("#viewmodelSection"),sbToggler=document.querySelector("#LeftMenuButton");null!=vmWrapper&&vmWrapper.classList.contains("sidebar-hidden")?bodyWrapper.classList.add("sb-hidden"):(bodyWrapper.classList.remove("sb-hidden"),sbToggler.classList.add("active"))}$(document).ready((function(){$(".wecpofaction").addClass("nav"),$("#LeftMenuButton").addClass("active"),$("#LeftMenuButton").click((function(object){$("#sidebar").hasClass("onscreen")?($("#sidebar").removeClass("onscreen"),$("#sidebar").addClass("offscreen")):($("#sidebar").removeClass("offscreen"),$("#sidebar").addClass("onscreen"))})),$("#closeSidebar").click((function(evt){$("#sidebar").hasClass("onscreen")&&($("#sidebar").removeClass("onscreen"),$("#sidebar").addClass("offscreen"))})),hideSidebar(),$(".glaction").click((function(event){event.preventDefault(),SubmitAction(event,_this,$(_this).attr("href"))})),null!==Cookies.get("scroll")&&($(document).scrollTop(parseInt(Cookies.get("scroll"))),Cookies.remove("scroll")),$(".btn-save").text("Refresh / Update"),$(".btn-cancel").prop("disabled",!0),$(":input").not(".selector").change((function(){$(".btn-save").text("Save"),$(".btn-cancel").prop("disabled",!1)})),$(".btn-save").on("click",(function(event){$(".btn-cancel").prop("disabled",!0),$("#MVCloadingAnimation").show(),Cookies.set("scroll",$(document).scrollTop(),1)})),$(".btn-cancel").on("click",(function(){window.confirm("You have unsaved changes. Are you sure you want to cancel?")&&($(".btn-cancel").prop("disabled",!0),$("#MVCloadingAnimation").show(),location.reload())})),window.onbeforeunload=function(){if(!1===$(".btn-cancel").prop("disabled")){if(!window.confirm("You have unsaved changes. Are you sure you want to cancel?"))return!1;$("#MVCloadingAnimation").show()}},$("#MVCloadingAnimation").hide(),window.innerWidth<=767&&($("#sidebar").removeClass("onscreen"),$("#sidebar").addClass("offscreen"))})),window.SubmitAction=SubmitAction,window.NavigateTo=function(event,target,url){var areYouSureQuestion=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(void 0!==event&&event.stopPropagation(),void 0!==areYouSureQuestion&&""!=areYouSureQuestion&&!window.confirm(areYouSureQuestion))return;$(target).closest("form"),$("#MVCloadingAnimation").show(),window.location.href=url},window.ToggleRow=function(event,target){void 0!==event&&event.stopPropagation(),$(".selector",target).click()},window.SetCurrentRow=function(event,target){void 0!==event&&event.stopPropagation(),$(".selector",target.parentElement).removeAttr("checked"),$(".vmTableRow",target.parentElement).removeClass("vmCurrentRow"),$(".selector",target).click();var theform=$(target).closest("form");$("#MVCloadingAnimation").show(),theform.submit()},window.hideSidebar=hideSidebar}},__webpack_require__=>{var moduleId;moduleId=28,__webpack_require__(__webpack_require__.s=moduleId)}]);