Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);Element.prototype.closest||(Element.prototype.closest=function(n){var t=this;do{if(t.matches(n))return t;t=t.parentElement||t.parentNode}while(t!==null&&t.nodeType===1);return null});document.fonts&&document.body&&(document.body.classList.add("rz-icons-loading"),document.fonts.load("16px Material Symbols").then(()=>{document.body.classList.remove("rz-icons-loading")}));var resolveCallbacks=[],rejectCallbacks=[],radzenRecognition;window.Radzen={isRTL:function(n){return n&&getComputedStyle(n).direction=="rtl"},throttle:function(n,t){var i=null;return function(){var r=arguments,u=this;i||(i=setTimeout(function(){n.apply(u,r);i=null},t))}},mask:function(n,t,i,r){var u=document.getElementById(n),o,f,e;u&&(o=function(n,t,i,r){for(var u=r?n.match(new RegExp(r,"g")):n.replace(new RegExp(i,"g"),"").split(""),f=0,e="",o=0;on.value).join("").trim();f.value=o;t.invokeMethodAsync("RadzenSecurityCode.OnValueChange",o);Radzen[n].inputs[Radzen[n].inputs.length-1].focus()}i.preventDefault()}},Radzen[n].keyPress=function(i){var u=i.data?i.data.charCodeAt(0):i.which,s=i.data||String.fromCharCode(i.which),e,o;if(!i.metaKey&&!i.ctrlKey&&u!=9&&u!=8&&u!=13){if(r&&(u<48||u>57)){i.preventDefault();return}i.currentTarget.value!=s&&(i.currentTarget.value=s,e=Radzen[n].inputs.map(n=>n.value).join("").trim(),f.value=e,t.invokeMethodAsync("RadzenSecurityCode.OnValueChange",e),o=Radzen[n].inputs.indexOf(i.currentTarget),on.value).join("").trim(),f.value=r,t.invokeMethodAsync("RadzenSecurityCode.OnValueChange",r),u=Radzen[n].inputs.indexOf(i.currentTarget),u>0&&Radzen[n].inputs[u-1].focus())},u=0;u1?s=1:s<0&&(s=0);h=s*(o-e)+e;t.canChange&&h>=e&&h<=o&&t.invokeMethodAsync("RadzenSlider.OnValueChange",h,!!t.isMin)}};Radzen[n].mouseDownHandler=function(h){if(!i.classList.contains("rz-state-disabled"))if(document.addEventListener("mousemove",Radzen[n].mouseMoveHandler),document.addEventListener("touchmove",Radzen[n].mouseMoveHandler,{passive:!1,capture:!0}),document.addEventListener("mouseup",Radzen[n].mouseUpHandler),document.addEventListener("touchend",Radzen[n].mouseUpHandler,{passive:!0}),u==h.target||f==h.target)t.canChange=!0,t.isMin=u==h.target;else{var l=h.targetTouches&&h.targetTouches[0]?h.targetTouches[0].pageX-h.target.getBoundingClientRect().left:h.offsetX,a=l/i.offsetWidth,c=a*(o-e)+e,v=r?s[t.isMin?0:1]:s;c>=e&&c<=o&&c!=v&&t.invokeMethodAsync("RadzenSlider.OnValueChange",c,!!t.isMin)}};Radzen[n].mouseUpHandler=function(){t.canChange=!1;document.removeEventListener("mousemove",Radzen[n].mouseMoveHandler);document.removeEventListener("touchmove",Radzen[n].mouseMoveHandler,{passive:!1,capture:!0});document.removeEventListener("mouseup",Radzen[n].mouseUpHandler);document.removeEventListener("touchend",Radzen[n].mouseUpHandler,{passive:!0})};i.addEventListener("mousedown",Radzen[n].mouseDownHandler);i.addEventListener("touchstart",Radzen[n].mouseDownHandler,{passive:!0})},destroySlider:function(n,t){Radzen[n]&&(Radzen[n].mouseMoveHandler&&(document.removeEventListener("mousemove",Radzen[n].mouseMoveHandler),document.removeEventListener("touchmove",Radzen[n].mouseMoveHandler),delete Radzen[n].mouseMoveHandler),Radzen[n].mouseUpHandler&&(document.removeEventListener("mouseup",Radzen[n].mouseUpHandler),document.removeEventListener("touchend",Radzen[n].mouseUpHandler),delete Radzen[n].mouseUpHandler),Radzen[n].mouseDownHandler&&(t.removeEventListener("mousedown",Radzen[n].mouseDownHandler),t.removeEventListener("touchstart",Radzen[n].mouseDownHandler),delete Radzen[n].mouseDownHandler),Radzen[n]=null)},prepareDrag:function(n){n&&(n.ondragover=function(n){n.preventDefault()},n.ondragstart=function(n){n.dataTransfer.setData("",n.target.id)})},focusElement:function(n){var t=document.getElementById(n);t&&t.focus()},scrollCarouselItem:function(n){n.parentElement.scroll(n.offsetLeft,0)},scrollIntoViewIfNeeded:function(n,t){var i=t?n.getElementsByClassName(t)[0]:n;i&&i.scrollIntoViewIfNeeded?i.scrollIntoViewIfNeeded():i&&i.scrollIntoView&&i.scrollIntoView()},selectListItem:function(n,t,i){var r,u,f;if(n&&t){if(r=t.getElementsByTagName("LI"),u=t.querySelectorAll(".rz-state-highlight"),u.length)for(f=0;f=0&&t.nextSelectedIndex<=r.length-1&&(r[t.nextSelectedIndex].classList.add("rz-state-highlight"),r[t.nextSelectedIndex].scrollIntoView({block:"nearest"}))}},focusListItem:function(n,t,i,r){var u,f,e;if(n&&t&&(u=t.getElementsByTagName("LI"),u&&u.length!=0)){if((r==undefined||r==null)&&(r=-1),t.nextSelectedIndex=r,i){while(t.nextSelectedIndex=0)if(t.nextSelectedIndex--,!u[t.nextSelectedIndex]||!u[t.nextSelectedIndex].classList.contains("rz-state-disabled"))break;if(f=t.querySelectorAll(".rz-state-highlight"),f.length)for(e=0;e=0&&t.nextSelectedIndex<=u.length-1&&(u[t.nextSelectedIndex].classList.add("rz-state-highlight"),Radzen.scrollIntoViewIfNeeded(u[t.nextSelectedIndex])),t.nextSelectedIndex}},clearFocusedHeaderCell:function(n){var r=document.getElementById(n),t;if(r){var u=r.querySelector(".rz-grid-table"),f=u.getElementsByTagName("thead")[0],i=f.querySelectorAll(".rz-state-focused");if(i.length)for(t=0;t0)if(f.nextSelectedIndex--,!e[f.nextSelectedIndex]||!e[f.nextSelectedIndex].classList.contains("rz-state-disabled"))break}else if(t=="ArrowRight"){while(f.nextSelectedCellIndex0)if(f.nextSelectedCellIndex--,!e[f.nextSelectedIndex]||!e[f.nextSelectedIndex].cells[f.nextSelectedCellIndex]||!e[f.nextSelectedIndex].cells[f.nextSelectedCellIndex].classList.contains("rz-state-disabled"))break}else u&&(t=="PageDown"||t=="End")?f.nextSelectedIndex=e.length-1:u&&(t=="PageUp"||t=="Home")&&(f.nextSelectedIndex=1);if(t=="ArrowLeft"||t=="ArrowRight"||t=="ArrowUp"&&r!=null&&f.nextSelectedIndex==0&&f.parentNode.scrollTop==0){if(s=e[f.nextSelectedIndex].querySelectorAll(".rz-state-focused"),s.length)for(o=0;o=0&&f.nextSelectedCellIndex<=e[f.nextSelectedIndex].cells.length-1&&(l=e[f.nextSelectedIndex].cells[f.nextSelectedCellIndex],l.classList.contains("rz-state-focused")||(l.classList.add("rz-state-focused"),!u&&f.parentElement.scrollWidth>f.parentElement.clientWidth&&Radzen.scrollIntoViewIfNeeded(l)))}else if(t=="ArrowDown"||t=="ArrowUp"){if(a=f.querySelectorAll(".rz-state-focused"),a.length)for(o=0;o=0&&f.nextSelectedIndex<=e.length-1&&(v=e[f.nextSelectedIndex],v.classList.contains("rz-state-focused")||(v.classList.add("rz-state-focused"),!u&&f.parentElement.scrollHeight>f.parentElement.clientHeight&&Radzen.scrollIntoViewIfNeeded(v)))}return[f.nextSelectedIndex,f.nextSelectedCellIndex]}},uploadInputChange:function(n,t,i,r,u,f){i?(Radzen.upload(n.target,t,r,u,f),n.target.value=""):Radzen.uploadChange(n.target)},uploads:function(n,t){Radzen.uploadComponents||(Radzen.uploadComponents={});Radzen.uploadComponents[t]=n},uploadChange:function(n){for(var r,i,u=[],t=0;t=200&&t<400?i.invokeMethodAsync("RadzenUpload.OnComplete",f.responseText,h):i.invokeMethodAsync("RadzenUpload.OnError",f.responseText))}};e.invokeMethodAsync("GetHeaders").then(function(n){f.open("POST",t,!0);for(var i in n)f.setRequestHeader(i,n[i]);f.send(c)})}},getCookie:function(n){var i="; "+decodeURIComponent(document.cookie),t=i.split("; "+n+"=");if(t.length==2)return t.pop().split(";").shift()},getCulture:function(){var n=Radzen.getCookie(".AspNetCore.Culture"),t=n?n.split("|").pop().split("=").pop():null;return t||"en-US"},numericOnPaste:function(n,t,i){var r,u;if(n.clipboardData){if(r=n.clipboardData.getData("text"),r&&!isNaN(+r)){if(u=+r,t!=null&&u>=t)return;if(i!=null&&u<=i)return}n.preventDefault()}},numericOnInput:function(n,t,i,r){var u=n.target.value,f;r||u!=""||t==null||(n.target.value=t);u&&!isNaN(+u)&&(f=+u,t!=null&&!isNaN(+t)&&fi&&(n.target.value=i))},numericKeyPress:function(n,t,i){var r,u;if(!n.metaKey&&!n.ctrlKey&&n.keyCode!=9&&n.keyCode!=8&&n.keyCode!=13){if(n.code==="NumpadDecimal"&&!t){r=n.target.selectionEnd;n.target.value=[n.target.value.slice(0,n.target.selectionStart),i,n.target.value.slice(n.target.selectionEnd)].join("");n.target.selectionStart=++r;n.target.selectionEnd=r;n.preventDefault();return}(u=String.fromCharCode(n.charCode),(t?/^[-\d]$/:/^[-\d,.]$/).test(u))||n.preventDefault()}},openContextMenu:function(n,t,i,r,u){Radzen.closePopup(i);Radzen.openPopup(null,i,!1,null,n,t,r,u);setTimeout(function(){var t=document.getElementById(i),n;t&&(n=t.querySelector(".rz-menu"),n&&n.focus())},500)},openTooltip:function(n,t,i,r,u,f,e,o){Radzen.closeTooltip(t);i?Radzen[t+"delay"]=setTimeout(Radzen.openPopup,i,n,t,!1,u,null,null,e,o,f):Radzen.openPopup(n,t,!1,u,null,null,e,o,f);r&&(Radzen[t+"duration"]=setTimeout(Radzen.closePopup,r,t,e,o))},closeTooltip(n){Radzen.activeElement=null;Radzen.closePopup(n);Radzen[n+"delay"]&&clearTimeout(Radzen[n+"delay"]);Radzen[n+"duration"]&&clearTimeout(Radzen[n+"duration"])},destroyDatePicker(n){var t=document.getElementById(n),i,r;t&&(i=t.querySelector(".rz-datepicker-trigger"),i&&(i.onclick=null),r=t.querySelector(".rz-inputtext"),r&&(r.onclick=null))},createDatePicker(n,t){if(n){var r=function(n,i){i&&Radzen.togglePopup(n.currentTarget.parentNode,t,!1,null,null,!0,!1)},i=n.querySelector(".rz-inputtext"),u=n.querySelector(".rz-datepicker-trigger");u&&(u.onclick=function(n){r(n,!n.currentTarget.classList.contains("rz-state-disabled")&&(i?!i.classList.contains("rz-readonly"):!0))});i&&(i.onclick=function(n){r(n,n.currentTarget.classList.contains("rz-input-trigger")&&!n.currentTarget.classList.contains("rz-readonly"))})}},findPopup:function(n){for(var i=[],t=0;twindow.innerHeight+u&&r.top>i.height&&(f=r.top-i.height+u),e.style.top=f+"px")},openPopup:function(n,t,i,r,u,f,e,o,s=true,h=false,c=false){var l=document.getElementById(t),v,nt,tt,y,b,d,a,g,w,k,p;if(l){if(Radzen.activeElement=document.activeElement,v=n?n.getBoundingClientRect():{top:f||0,bottom:0,left:u||0,right:0,width:0,height:0},/Edge/.test(navigator.userAgent)?(nt=document.body.scrollLeft,tt=document.body.scrollTop):(nt=document.documentElement.scrollLeft,tt=document.documentElement.scrollTop),y=f?f:v.bottom,b=u?u:v.left,i&&(l.style.width=v.width+"px",l.style.minWidth||(l.minWidth=!0,l.style.minWidth=v.width+"px")),window.chrome&&(d=l.closest(".rz-frozen-cell"),d&&(Radzen[t+"FZL"]={cell:d,left:d.style.left},d.style.left="")),l.style.display="block",l.onanimationend=null,l.classList.add("rz-open"),l.classList.remove("rz-close"),a=l.getBoundingClientRect(),a.width=u?a.width+20:a.width,a.height=f?a.height+20:a.height,g=!r||r=="bottom",g&&y+a.height>window.innerHeight&&v.top>a.height&&(c!==!0&&(y=v.top-a.height),r&&(y=y-40,w=l.children[0],k="rz-"+r+"-tooltip-content",w.classList.contains(k)&&(w.classList.remove(k),w.classList.add("rz-top-tooltip-content"),r="top",e&&o))))try{e.invokeMethodAsync(o,r)}catch{}if(g&&b+a.width>window.innerWidth&&window.innerWidth>a.width&&(b=r?a.left:window.innerWidth-a.width,r&&(y=f||v.top,w=l.children[0],k="rz-"+r+"-tooltip-content",w.classList.contains(k)&&(w.classList.remove(k),w.classList.add("rz-left-tooltip-content"),r="left",e&&o))))try{e.invokeMethodAsync(o,r)}catch{}for(g&&r&&(y=y+20),r=="left"&&(b=v.left-a.width-5,y=v.top),r=="right"&&(b=v.right+10,y=v.top),r=="top"&&(y=v.top-a.height+5,b=v.left),l.style.zIndex=2e3,l.style.left=b+nt+"px",l.style.top=y+tt+"px",l.classList.contains("rz-overlaypanel")||l.classList.add("rz-popup"),Radzen[t]=function(n){var i=Radzen.popups&&Radzen.popups[Radzen.popups.length-1],t=i!=null&&document.getElementById(i.id)||l,r;if(i&&(t.instance=i.instance,t.callback=i.callback,t.parent=i.parent),n.type!="contextmenu"&&n.target&&s){if(!/Android/i.test(navigator.userAgent)&&!["input","textarea"].includes(document.activeElement?document.activeElement.tagName.toLowerCase():"")&&n.type=="resize"){Radzen.closePopup(t.id,t.instance,t.callback,n);return}r=n.target.closest&&(n.target.closest(".rz-link")||n.target.closest(".rz-navigation-item-link"));n.type!="resize"||/Android/i.test(navigator.userAgent)||(r&&r.closest&&r.closest("a")&&n.button==0?(r.closest("a").click(),Radzen.closeAllPopups()):Radzen.closeAllPopups());t.parent?n.type!="mousedown"||t.parent.contains(n.target)||t.contains(n.target)||Radzen.closePopup(t.id,t.instance,t.callback,n):n.target.nodeType&&!t.contains(n.target)&&Radzen.closePopup(t.id,t.instance,t.callback,n)}},Radzen.popups||(Radzen.popups=[]),Radzen.popups.push({id:t,instance:e,callback:o,parent:n}),document.body.appendChild(l),document.removeEventListener("mousedown",Radzen[t]),document.addEventListener("mousedown",Radzen[t]),window.removeEventListener("resize",Radzen[t]),window.addEventListener("resize",Radzen[t]),p=n;p&&p!=document.body;)(p.scrollWidth>p.clientWidth||p.scrollHeight>p.clientHeight)&&(p.removeEventListener("scroll",Radzen.closeAllPopups),p.addEventListener("scroll",Radzen.closeAllPopups)),p=p.parentElement;n||(document.removeEventListener("contextmenu",Radzen[t]),document.addEventListener("contextmenu",Radzen[t]));h&&setTimeout(function(){l.removeEventListener("keydown",Radzen.focusTrap);l.addEventListener("keydown",Radzen.focusTrap);var t=Radzen.getFocusableElements(l),n=t[0];n&&n.focus()},200)}},closeAllPopups:function(n,t){var i,f,u,r,e;if(Radzen.popups){for(i=n&&n.target||t&&documentElement.getElementById(t),f=Radzen.popups,u=0;u1)for(e=0;edocument.documentElement.clientHeight&&document.body.classList.add("no-scroll");setTimeout(function(){var u=document.querySelectorAll(".rz-dialog-content"),t,f,r;u.length!=0&&(t=u[u.length-1],t&&(t.options=n,t.removeEventListener("keydown",Radzen.focusTrap),t.addEventListener("keydown",Radzen.focusTrap),n.resizable&&(i.offsetWidth=t.parentElement.offsetWidth,i.offsetHeight=t.parentElement.offsetHeight,f=function(n){i&&(i.offsetWidth!=n[0].target.offsetWidth||i.offsetHeight!=n[0].target.offsetHeight)&&(i.offsetWidth=n[0].target.offsetWidth,i.offsetHeight=n[0].target.offsetHeight,i.invokeMethodAsync("RadzenDialog.OnResize",n[0].target.offsetWidth,n[0].target.offsetHeight))},Radzen.dialogResizer=new ResizeObserver(f).observe(t.parentElement)),n.draggable&&(r=t.parentElement.querySelector(".rz-dialog-titlebar"),r&&(Radzen[r]=function(n){var r=t.parentElement.getBoundingClientRect(),e=n.clientX-r.left,o=n.clientY-r.top,u=function(n){var r=n.clientX-e,u=n.clientY-o;t.parentElement.style.left=r+"px";t.parentElement.style.top=u+"px";i.invokeMethodAsync("RadzenDialog.OnDrag",u,r)},f=function(){document.removeEventListener("mousemove",u);document.removeEventListener("mouseup",f)};document.addEventListener("mousemove",u);document.addEventListener("mouseup",f)},r.addEventListener("mousedown",Radzen[r]))),n.autoFocusFirstElement&&Radzen.focusFirstFocusableElement(t)))},500);document.removeEventListener("keydown",Radzen.closePopupOrDialog);n.closeDialogOnEsc&&document.addEventListener("keydown",Radzen.closePopupOrDialog)},closeDialog:function(){var t,i,n;Radzen.dialogResizer=null;document.body.classList.remove("no-scroll");t=document.querySelectorAll(".rz-dialog-content");i=t.length&&t[t.length-1];i&&(n=i.parentElement.querySelector(".rz-dialog-titlebar"),n&&(n.removeEventListener("mousedown",Radzen[n]),Radzen[n]=null,delete Radzen[n]));t.length<=1&&(document.removeEventListener("keydown",Radzen.closePopupOrDialog),delete Radzen.dialogService)},disableKeydown:function(n){n=n||window.event;n.preventDefault()},getFocusableElements:function(n){return[...n.querySelectorAll("a, button, input, textarea, select, details, iframe, embed, object, summary dialog, audio[controls], video[controls], [contenteditable], [tabindex]")].filter(n=>n&&n.tabIndex>-1&&!n.hasAttribute("disabled")&&n.offsetParent!==null)},focusTrap:function(n){var r;if(n=n||window.event,r=!1,r="key"in n?n.key==="Tab":n.keyCode===9,r){var u=Radzen.getFocusableElements(n.currentTarget),t=u[0],i=u[u.length-1];t&&i&&n.shiftKey&&document.activeElement===t?(n.preventDefault(),i.focus()):t&&i&&!n.shiftKey&&document.activeElement===i&&(n.preventDefault(),t.focus())}},closePopupOrDialog:function(n){var u,f,i,t,r,e;if(n=n||window.event,u=!1,u="key"in n?n.key==="Escape"||n.key==="Esc":n.keyCode===27,u&&Radzen.dialogService){for(f=document.querySelectorAll(".rz-popup,.rz-overlaypanel"),i=0;iu?t>i&&(u=u*(i/t),t=i):u>r&&(t=t*(r/u),u=r),{width:t,height:u}},f=function(n){return new Promise(function(f,e){var o=new FileReader,s;(o.onerror=function(){o.abort();e("Error reading file.")},o.addEventListener("load",function(){if(n.files[0]&&n.files[0].type.includes("image")&&i>0&&r>0){var t=document.createElement("img");t.onload=function(){var i=document.createElement("canvas"),r=u(t),e;i.width=r.width;i.height=r.height;e=i.getContext("2d");e.drawImage(t,0,0,r.width,r.height);f(i.toDataURL(n.type))};t.src=o.result}else f(o.result)},!1),s=n.files[0],s)&&(s.size<=t?o.readAsDataURL(s):e("File too large."))})};return f(n)},toggleMenuItem:function(n,t,i,r){function f(t){var i,r;u.classList.toggle("rz-navigation-item-active",t);n.classList.toggle("rz-navigation-item-wrapper-active",t);i=u.querySelector(".rz-navigation-menu");i&&(t?(i.onanimationend=null,i.style.display="",i.classList.add("rz-open"),i.classList.remove("rz-close")):(i.onanimationend=function(){i.style.display="none";i.onanimationend=null},i.classList.remove("rz-open"),i.classList.add("rz-close")));r=u.querySelector(".rz-navigation-item-icon-children");r&&(r.classList.toggle("rz-state-expanded",t),r.classList.toggle("rz-state-collapsed",!t))}var u=n.closest(".rz-navigation-item"),e=i!=undefined?i:!u.classList.contains("rz-navigation-item-active");r===!1&&u.parentElement&&u.parentElement.closest(".rz-navigation-item")&&!i||(f(e),document.removeEventListener("click",n.clickHandler),n.clickHandler=function(n){if(u.contains(n.target)){var t=n.target.closest(".rz-navigation-item");if(t&&t.querySelector(".rz-navigation-menu"))return}f(!1)},document.addEventListener("click",n.clickHandler))},destroyChart:function(n){n&&(n.removeEventListener("mouseleave",n.mouseLeaveHandler),delete n.mouseLeaveHandler,n.removeEventListener("mouseenter",n.mouseEnterHandler),delete n.mouseEnterHandler,n.removeEventListener("mousemove",n.mouseMoveHandler),delete n.mouseMoveHandler,n.removeEventListener("click",n.clickHandler),delete n.clickHandler,this.destroyResizable(n))},destroyGauge:function(n){this.destroyResizable(n)},destroyResizable:function(n){n.resizeObserver&&(n.resizeObserver.disconnect(),delete n.resizeObserver);n.resizeHandler&&(window.removeEventListener("resize",n.resizeHandler),delete n.resizeHandler)},createResizable:function(n,t){n.resizeHandler=function(){var i=n.getBoundingClientRect();t.invokeMethodAsync("Resize",i.width,i.height)};window.ResizeObserver?(n.resizeObserver=new ResizeObserver(n.resizeHandler),n.resizeObserver.observe(n)):window.addEventListener("resize",n.resizeHandler);var i=n.getBoundingClientRect();return{width:i.width,height:i.height}},createChart:function(n,t){var i=!1;return n.mouseMoveHandler=this.throttle(function(r){if(i){var u=n.getBoundingClientRect(),f=r.clientX-u.left,e=r.clientY-u.top;t.invokeMethodAsync("MouseMove",f,e)}},100),n.mouseEnterHandler=function(){i=!0},n.mouseLeaveHandler=function(n){n.relatedTarget&&(n.relatedTarget.matches(".rz-chart-tooltip")||n.relatedTarget.closest(".rz-chart-tooltip"))||(i=!1,t.invokeMethodAsync("MouseMove",-1,-1))},n.clickHandler=function(i){var r=n.getBoundingClientRect(),u=i.clientX-r.left,f=i.clientY-r.top;i.target.closest(".rz-marker")||t.invokeMethodAsync("Click",u,f)},n.addEventListener("mouseenter",n.mouseEnterHandler),n.addEventListener("mouseleave",n.mouseLeaveHandler),n.addEventListener("mousemove",n.mouseMoveHandler),n.addEventListener("click",n.clickHandler),this.createResizable(n,t)},createGauge:function(n,t){return this.createResizable(n,t)},destroyScheduler:function(n){n&&n.resizeHandler&&(window.removeEventListener("resize",n.resizeHandler),delete n.resizeHandler)},createScheduler:function(n,t){n.resizeHandler=function(){var i=n.getBoundingClientRect();t.invokeMethodAsync("Resize",i.width,i.height)};window.addEventListener("resize",n.resizeHandler);var i=n.getBoundingClientRect();return{width:i.width,height:i.height}},innerHTML:function(n,t){if(t!=undefined)n!=null&&(n.innerHTML=t);else return n.innerHTML},execCommand:function(n,t,i){return document.activeElement!=n&&n&&n.focus(),document.execCommand(t,!1,i),this.queryCommands(n)},queryCommands:function(n){return{html:n!=null?n.innerHTML:null,fontName:document.queryCommandValue("fontName"),fontSize:document.queryCommandValue("fontSize"),formatBlock:document.queryCommandValue("formatBlock"),bold:document.queryCommandState("bold"),underline:document.queryCommandState("underline"),justifyRight:document.queryCommandState("justifyRight"),justifyLeft:document.queryCommandState("justifyLeft"),justifyCenter:document.queryCommandState("justifyCenter"),justifyFull:document.queryCommandState("justifyFull"),italic:document.queryCommandState("italic"),strikeThrough:document.queryCommandState("strikeThrough"),superscript:document.queryCommandState("superscript"),subscript:document.queryCommandState("subscript"),unlink:document.queryCommandEnabled("unlink"),undo:document.queryCommandEnabled("undo"),redo:document.queryCommandEnabled("redo")}},mediaQueries:{},mediaQuery:function(n,t){if(t){function i(n){t.invokeMethodAsync("OnChange",n.matches)}var n=matchMedia(n);return this.mediaQueries[t._id]=function(){n.removeListener(i)},n.addListener(i),n.matches}t=n;this.mediaQueries[t._id]&&(this.mediaQueries[t._id](),delete this.mediaQueries[t._id])},createEditor:function(n,t,i,r,u){n.inputListener=function(){r.invokeMethodAsync("OnChange",n.innerHTML)};n.keydownListener=function(n){var t="";(n.ctrlKey||n.metaKey)&&(t+="Ctrl+");n.altKey&&(t+="Alt+");n.shiftKey&&(t+="Shift+");t+=n.code.replace("Key","").replace("Digit","").replace("Numpad","");u.includes(t)&&(n.preventDefault(),r.invokeMethodAsync("ExecuteShortcutAsync",t))};n.clickListener=function(t){var r,i;if(t.target){t.target.matches("a,button")&&t.preventDefault();for(r of n.querySelectorAll("img.rz-state-selected"))r.classList.remove("rz-state-selected");t.target.matches("img")&&(t.target.classList.add("rz-state-selected"),i=document.createRange(),i.selectNode(t.target),getSelection().removeAllRanges(),getSelection().addRange(i))}};n.selectionChangeListener=function(){document.activeElement==n&&r.invokeMethodAsync("OnSelectionChange")};n.pasteListener=function(n){var s=n.clipboardData.items[0],e,u,o,f;s.kind=="file"?(n.preventDefault(),e=s.getAsFile(),t?(u=new XMLHttpRequest,f=new FormData,f.append("file",e),u.onreadystatechange=function(){var n,t,f;u.readyState===XMLHttpRequest.DONE&&(n=u.status,n===0||n>=200&&n<400?(t=JSON.parse(u.responseText),f='',i?r.invokeMethodAsync("OnPaste",f).then(function(n){document.execCommand("insertHTML",!1,n)}):document.execCommand("insertHTML",!1,''),r.invokeMethodAsync("OnUploadComplete",u.responseText)):r.invokeMethodAsync("OnError",u.responseText))},r.invokeMethodAsync("GetHeaders").then(function(n){u.open("POST",t,!0);for(var i in n)u.setRequestHeader(i,n[i]);u.send(f)})):(o=new FileReader,o.onload=function(n){var t='';i?r.invokeMethodAsync("OnPaste",t).then(function(n){document.execCommand("insertHTML",!1,n)}):document.execCommand("insertHTML",!1,t)},o.readAsDataURL(e))):i&&(n.preventDefault(),f=n.clipboardData.getData("text/html")||n.clipboardData.getData("text/plain"),r.invokeMethodAsync("OnPaste",f).then(function(n){document.execCommand("insertHTML",!1,n)}))};n.addEventListener("input",n.inputListener);n.addEventListener("paste",n.pasteListener);n.addEventListener("keydown",n.keydownListener);n.addEventListener("click",n.clickListener);document.addEventListener("selectionchange",n.selectionChangeListener);document.execCommand("styleWithCSS",!1,!0)},saveSelection:function(n){if(document.activeElement==n){var t=getSelection();t.rangeCount>0&&(n.range=t.getRangeAt(0))}},restoreSelection:function(n){var i=n.range,t;i&&(delete n.range,n&&n.focus(),t=getSelection(),t.removeAllRanges(),t.addRange(i))},selectionAttributes:function(n,t,i){for(var u=getSelection(),o=u.rangeCount>0&&u.getRangeAt(0),f=o&&o.commonAncestorContainer,e=i.querySelector("img.rz-state-selected"),s=e&&n=="img",r,h;f;){if(f==i){s=!0;break}f=f.parentNode}return s?(r=u.focusNode,e&&n=="img"?r=e:r&&(r.nodeType==3?r=r.parentElement:(r=r.childNodes[u.focusOffset],r&&(h=r.outerHTML)),r&&r.matches&&!r.matches(n)&&(r=r.closest(n))),t.reduce(function(n,t){return r&&(n[t]=t=="innerText"?r[t]:r.getAttribute(t)),n},{innerText:u.toString(),innerHTML:h})):{}},destroyEditor:function(n){n&&(n.removeEventListener("input",n.inputListener),n.removeEventListener("paste",n.pasteListener),n.removeEventListener("keydown",n.keydownListener),n.removeEventListener("click",n.clickListener),document.removeEventListener("selectionchange",n.selectionChangeListener))},startDrag:function(n,t,i){return n?(n.mouseMoveHandler=function(n){t.invokeMethodAsync(i,{clientX:n.clientX,clientY:n.clientY})},n.touchMoveHandler=function(r){r.targetTouches[0]&&n.contains(r.targetTouches[0].target)&&t.invokeMethodAsync(i,{clientX:r.targetTouches[0].clientX,clientY:r.targetTouches[0].clientY})},n.mouseUpHandler=function(){Radzen.endDrag(n)},document.addEventListener("mousemove",n.mouseMoveHandler),document.addEventListener("mouseup",n.mouseUpHandler),document.addEventListener("touchmove",n.touchMoveHandler,{passive:!0,capture:!0}),document.addEventListener("touchend",n.mouseUpHandler,{passive:!0}),Radzen.clientRect(n)):{left:0,top:0,width:0,height:0}},submit:function(n){n.submit()},clientRect:function(n){var i=n instanceof Element||n instanceof HTMLDocument?n:document.getElementById(n),t=i.getBoundingClientRect();return{left:t.left,top:t.top,width:t.width,height:t.height}},endDrag:function(n){document.removeEventListener("mousemove",n.mouseMoveHandler);document.removeEventListener("mouseup",n.mouseUpHandler);document.removeEventListener("touchmove",n.touchMoveHandler);document.removeEventListener("touchend",n.mouseUpHandler)},startColumnReorder:function(n){var u=document.getElementById(n+"-drag"),i=u.parentNode.parentNode,t=document.createElement("th"),r;t.className=i.className+" rz-column-draggable";t.style=i.style;t.style.display="none";t.style.position="absolute";t.style.height=i.offsetHeight+"px";t.style.width=i.offsetWidth+"px";t.style.zIndex=2e3;t.innerHTML=i.firstChild.outerHTML;t.id=n+"visual";document.body.appendChild(t);r=i.parentNode.querySelectorAll(".rz-column-resizer");for(let n=0;nh&&(t=h);i=t+"px";f&&(f.style.width=i);e&&(e.style.width=i);o&&(o.style.width=i);s&&(s.style.width=i)}},touchMoveHandler:function(n){n.targetTouches[0]&&Radzen[u].mouseMoveHandler(n.targetTouches[0])}};u.style.width="100%";document.addEventListener("mousemove",Radzen[u].mouseMoveHandler);document.addEventListener("mouseup",Radzen[u].mouseUpHandler);document.addEventListener("touchmove",Radzen[u].touchMoveHandler,{passive:!0});document.addEventListener("touchend",Radzen[u].mouseUpHandler,{passive:!0})},startSplitterResize:function(n,t,i,r,u,f,e,o,s,h){function w(n){if(!n)return null;if(n=n.trim().toLowerCase(),n.endsWith("%"))return p*parseFloat(n)/100;if(n.endsWith("px"))return parseFloat(n);throw"Invalid value";}var c=document.getElementById(n),a=document.getElementById(i),l=document.getElementById(r),b,y,d,k,v=u=="Horizontal",p=0;Array.from(c.children).forEach(n=>{p+=v?n.getBoundingClientRect().width:n.getBoundingClientRect().height});a&&(b=v?a.getBoundingClientRect().width:a.getBoundingClientRect().height,d=b/p*100+"%");l&&(y=v?l.getBoundingClientRect().width:l.getBoundingClientRect().height,k=y/p*100+"%");e=w(e);o=w(o);s=w(s);h=w(h);Radzen[c]={clientPos:f,panePerc:parseFloat(d),paneNextPerc:isFinite(parseFloat(k))?parseFloat(k):0,paneLength:b,paneNextLength:isFinite(y)?y:0,mouseUpHandler:function(){Radzen[c]&&(t.invokeMethodAsync("RadzenSplitter.OnPaneResized",parseInt(a.getAttribute("data-index")),parseFloat(a.style.flexBasis),l?parseInt(l.getAttribute("data-index")):null,l?parseFloat(l.style.flexBasis):null),document.removeEventListener("pointerup",Radzen[c].mouseUpHandler),document.removeEventListener("pointermove",Radzen[c].mouseMoveHandler),c.removeEventListener("touchmove",g),Radzen[c]=null)},mouseMoveHandler:function(n){var y,f,r;if(Radzen[c]){t.invokeMethodAsync("RadzenSplitter.OnPaneResizing");var p=Radzen[c].panePerc+Radzen[c].paneNextPerc,u=Radzen[c].paneLength+Radzen[c].paneNextLength,i=Radzen[c].paneLength-(v&&Radzen.isRTL(n.target)?-1:1)*(Radzen[c].clientPos-(v?n.clientX:n.clientY));i>u&&(i=u);e&&io&&(i=o);l&&(y=u-i,s&&yh&&(i=u+h));f=i/Radzen[c].paneLength;isFinite(f)||(f=1,Radzen[c].panePerc=.1,Radzen[c].paneLength=v?a.getBoundingClientRect().width:a.getBoundingClientRect().height);r=Radzen[c].panePerc*f;r<0&&(r=0);r>100&&(r=100);a.style.flexBasis=r+"%";l&&(l.style.flexBasis=p-r+"%")}},touchMoveHandler:function(n){n.targetTouches[0]&&Radzen[c].mouseMoveHandler(n.targetTouches[0])}};const g=n=>{n.preventDefault(),n.stopPropagation()};document.addEventListener("pointerup",Radzen[c].mouseUpHandler);document.addEventListener("pointermove",Radzen[c].mouseMoveHandler);c.addEventListener("touchmove",g,{passive:!1})},resizeSplitter(n,t){var i=document.getElementById(n);i&&Radzen[i]&&(Radzen[i].mouseMoveHandler(t),Radzen[i].mouseUpHandler(t))},openWaiting:function(){document.documentElement.scrollHeight>document.documentElement.clientHeight&&document.body.classList.add("no-scroll");Radzen.WaitingIntervalId!=null&&clearInterval(Radzen.WaitingIntervalId);setTimeout(function(){var n=document.getElementsByClassName("rz-waiting-timer"),t;n.length!=0&&(t=(new Date).getTime(),Radzen.WaitingIntervalId=setInterval(function(){if(n==null||n[0]==null)clearInterval(Radzen.WaitingIntervalId);else{var i=new Date((new Date).getTime()-t);n[0].innerHTML=Math.floor(i/1e3)+"."+Math.floor(i%1e3/100)}},100))},100)},closeWaiting:function(){document.body.classList.remove("no-scroll");Radzen.WaitingIntervalId!=null&&(clearInterval(Radzen.WaitingIntervalId),Radzen.WaitingIntervalId=null)},toggleDictation:function(n,t){function i(){const i=window.SpeechRecognition||window.webkitSpeechRecognition;i&&(radzenRecognition=new i,radzenRecognition.componentRef=n,radzenRecognition.continuous=!0,t&&(radzenRecognition.lang=t),radzenRecognition.onresult=function(t){if(!(t.results.length<1)){let i=t.results[t.results.length-1][0],r=i.transcript;n.invokeMethodAsync("OnResult",r)}},radzenRecognition.onend=function(){n.invokeMethodAsync("StopRecording");radzenRecognition=null},radzenRecognition.start())}radzenRecognition?(radzenRecognition.componentRef._id!=n._id&&radzenRecognition.addEventListener("end",i),radzenRecognition.stop()):i()},openChartTooltip:function(n,t,i,r,u,f){var o,s;if(Radzen.closeTooltip(r),o=n.getBoundingClientRect(),t=Math.max(2,o.left+t),i=Math.max(2,o.top+i),Radzen.openPopup(n,r,!1,null,t,i,u,f,!0,!1,!1),s=document.getElementById(r),s){var e=s.children[0],c=e.getBoundingClientRect(),h="rz-top-chart-tooltip";i-c.height<0&&(h="rz-bottom-chart-tooltip");e.classList.remove("rz-top-chart-tooltip");e.classList.remove("rz-bottom-chart-tooltip");e.classList.add(h)}},navigateTo:function(n,t){if(n.startsWith("#")&&history.replaceState(null,"",location.pathname+location.search+n),t){const t=document.querySelector(n);t&&t.scrollIntoView({behavior:"smooth",block:"center",inline:"start"})}},registerScrollListener:function(n,t,i,r){let u;const f=r?document.querySelector(r):document.documentElement,e=i.map(document.querySelector,document);this.unregisterScrollListener(n);n.scrollHandler=()=>{const r=(f.tagName==="HTML"?0:f.getBoundingClientRect().top)+f.clientHeight/2;let o=Number.MAX_SAFE_INTEGER,n;for(let t=0;t=r||f