diff --git a/src/Component/BlazorComponent.Web/package.json b/src/Component/BlazorComponent.Web/package.json index 883707f11..85907cef8 100644 --- a/src/Component/BlazorComponent.Web/package.json +++ b/src/Component/BlazorComponent.Web/package.json @@ -27,8 +27,7 @@ "build:drawflow": "rollup --config rollup.config.drawflow.ts", "build:swiper": "rollup --config rollup.config.swiper.ts", "build:intersect": "rollup --config rollup.config.intersect.ts", - "build:resize": "rollup --config rollup.config.resize.ts", - "build:ssr": "rollup --config rollup.config.ssr.ts" + "build:resize": "rollup --config rollup.config.resize.ts" }, "author": "", "license": "MIT", diff --git a/src/Component/BlazorComponent.Web/rollup.config.ssr.ts b/src/Component/BlazorComponent.Web/rollup.config.ssr.ts deleted file mode 100644 index 31bfe856f..000000000 --- a/src/Component/BlazorComponent.Web/rollup.config.ssr.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { defineConfig } from "rollup"; -import { terser } from "rollup-plugin-terser"; - -import typescript from "@rollup/plugin-typescript"; - -export default defineConfig([ - { - input: "./src/ssr/ssr-state-restore.ts", - output: { - file: "../../../../MASA.Blazor/wwwroot/js/ssr-state-restore.js", - format: "iife", - sourcemap: true, - }, - plugins: [typescript(), terser()], - }, - { - input: "./src/ssr/page-script.ts", - output: { - file: "../../../../MASA.Blazor/wwwroot/js/ssr-page-script.js", - format: "esm", - sourcemap: true, - }, - plugins: [typescript(), terser()], - }, -]); diff --git a/src/Component/BlazorComponent.Web/src/main.ts b/src/Component/BlazorComponent.Web/src/main.ts index 7d325a423..729d9a465 100644 --- a/src/Component/BlazorComponent.Web/src/main.ts +++ b/src/Component/BlazorComponent.Web/src/main.ts @@ -1,7 +1,6 @@ import * as slider from "./components/slider"; import * as interop from "./interop"; import * as overlayable from "./mixins/overlayable"; -import * as ssr from "./ssr"; declare global { interface Window { @@ -14,8 +13,7 @@ window.BlazorComponent = { interop: { ...interop, ...overlayable, - ...slider, - ssr + ...slider }, }; diff --git a/src/Component/BlazorComponent.Web/src/ssr/index.ts b/src/Component/BlazorComponent.Web/src/ssr/index.ts deleted file mode 100644 index 09267a994..000000000 --- a/src/Component/BlazorComponent.Web/src/ssr/index.ts +++ /dev/null @@ -1,130 +0,0 @@ -export type MasaBlazorApplication = { - bar?: number; - top: number; - right: number; - bottom: number; - left: number; - footer?: number; - insetFooter?: number; -}; - -export type MasaBlazorSsrPassiveState = { - application: MasaBlazorApplication; -}; - -export type MasaBlazorSsrState = { - culture?: string; - rtl?: boolean; - dark?: boolean; - passive?: MasaBlazorSsrPassiveState; -}; - -export const MASA_BLAZOR_SSR_STATE = "masablazor@ssr-state"; - -export function setTheme(dark: boolean) { - const selector = `.${getThemeCss(!dark)}:not(.theme--independent)`; - const elements = document.querySelectorAll(selector); - for (let i = 0; i < elements.length; i++) { - elements[i].classList.remove(getThemeCss(!dark)); - elements[i].classList.add(getThemeCss(dark)); - } - - updateStorage({ dark }); -} - -export function toggleTheme() { - const state = getState(); - if (state) { - setTheme(!state.dark); - } -} - -export function setCulture(culture: string) { - const app = getApp(); - if (!app) return; - - updateStorage({ culture }); -} - -export function setRtl(rtl: boolean, updateCache: boolean = true) { - const app = getApp(); - if (!app) return; - - const rtlCss = "m-application--is-rtl"; - if (!rtl) { - app.classList.remove(rtlCss); - } else if (!app.classList.contains(rtlCss)) { - app.classList.add(rtlCss); - } - - if (updateCache) { - updateStorage({ rtl }); - } -} - -export function updateMain(application: MasaBlazorApplication) { - const main: HTMLElement = document.querySelector(".m-main"); - - const newApplication: MasaBlazorApplication = { - top: application.top ?? getPadding("Top"), - right: application.right ?? getPadding("Right"), - bottom: application.bottom ?? getPadding("Bottom"), - left: application.left ?? getPadding("Left"), - }; - - restoreMain(newApplication); - - function getPadding(prop: "Top" | "Right" | "Bottom" | "Left") { - return Number(main.style[`padding${prop}`].match(/\d+/)[0]); - } -} - -export function updatePassiveState(passive: MasaBlazorSsrPassiveState) { - const oldState = getState() ?? {}; - const state: MasaBlazorSsrState = { - ...oldState, - passive, - }; - localStorage.setItem(MASA_BLAZOR_SSR_STATE, JSON.stringify(state)); -} - -export function getThemeCss(dark: boolean) { - return dark ? "theme--dark" : "theme--light"; -} - -export function getApp() { - return document.querySelector(".m-application"); -} - -function updateStorage(obj: Partial) { - const stateStr = localStorage.getItem(MASA_BLAZOR_SSR_STATE); - if (stateStr) { - const state = JSON.parse(stateStr); - localStorage.setItem( - MASA_BLAZOR_SSR_STATE, - JSON.stringify({ - ...state, - ...obj, - }) - ); - } -} - -export function restoreMain(application: MasaBlazorApplication) { - const main = document.querySelector(".m-main") as HTMLElement; - if (main && application) { - main.style.paddingTop = application.top + application.bar + "px"; - main.style.paddingRight = application.right + "px"; - main.style.paddingBottom = - application.bottom + application.insetFooter + application.bottom + "px"; - main.style.paddingLeft = application.left + "px"; - } -} - -export function getState(): MasaBlazorSsrState { - const stateStr = localStorage.getItem(MASA_BLAZOR_SSR_STATE); - if (stateStr) { - return JSON.parse(stateStr); - } - return null; -} diff --git a/src/Component/BlazorComponent.Web/src/ssr/page-script.ts b/src/Component/BlazorComponent.Web/src/ssr/page-script.ts deleted file mode 100644 index 480b975c1..000000000 --- a/src/Component/BlazorComponent.Web/src/ssr/page-script.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { getThemeCss, MASA_BLAZOR_SSR_STATE, MasaBlazorSsrState, restoreMain, setRtl } from "./"; - -// Called when the script first gets loaded on the page. -export function onLoad() {} - -// Called when an enhanced page update occurs, plus once immediately after -// the initial load. -export function onUpdate() { - const stateStr = localStorage.getItem(MASA_BLAZOR_SSR_STATE); - if (!stateStr) return; - - const state: MasaBlazorSsrState = JSON.parse(stateStr); - if (!state) return; - - // restoreMain(state.passive.application); - restoreTheme(state); - restoreRtl(state); -} - -// Called when an enhanced page update removes the script from the page. -export function onDispose() {} - -export function restoreTheme(state: MasaBlazorSsrState) { - console.log('restoreTheme', state.dark) - if (typeof state.dark === "boolean") { - const selector = `.${getThemeCss(!state.dark)}:not(.theme--independent)`; - const elements = document.querySelectorAll(selector); - for (let i = 0; i < elements.length; i++) { - elements[i].classList.remove(getThemeCss(!state.dark)); - elements[i].classList.add(getThemeCss(state.dark)); - } - } -} - -export function restoreRtl(state: MasaBlazorSsrState) { - if (typeof state.rtl === "boolean") { - setRtl(state.rtl, false); - } -} diff --git a/src/Component/BlazorComponent.Web/src/ssr/ssr-state-restore.ts b/src/Component/BlazorComponent.Web/src/ssr/ssr-state-restore.ts deleted file mode 100644 index 1ce506544..000000000 --- a/src/Component/BlazorComponent.Web/src/ssr/ssr-state-restore.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { getApp, MASA_BLAZOR_SSR_STATE, MasaBlazorSsrState } from "./"; -import { restoreRtl, restoreTheme } from "./page-script"; - -const stateStr = localStorage.getItem(MASA_BLAZOR_SSR_STATE); -if (stateStr) { - const state = JSON.parse(stateStr); - - restoreTheme(state); - restoreRtl(state); -} else { - var application = getApp(); - const isAppDark = application.classList.contains("theme--dark"); - const isAppRtl = application.classList.contains("m-application--is-rtl"); - const stateStr: MasaBlazorSsrState = { - dark: isAppDark, - rtl: isAppRtl, - }; - - localStorage.setItem(MASA_BLAZOR_SSR_STATE, JSON.stringify(stateStr)); -} diff --git a/src/Component/BlazorComponent/Extensions/NavigationManagerExtensions.cs b/src/Component/BlazorComponent/Extensions/NavigationManagerExtensions.cs index bc45d3f9a..d35fc2ee7 100644 --- a/src/Component/BlazorComponent/Extensions/NavigationManagerExtensions.cs +++ b/src/Component/BlazorComponent/Extensions/NavigationManagerExtensions.cs @@ -46,4 +46,9 @@ public static void NavigateWithQueryParameter(this NavigationManager navigationM { navigationManager.NavigateTo(navigationManager.GetUriWithQueryParameter(name, value)); } + + public static void NavigateWithQueryParameter(this NavigationManager navigationManager, string name, int? value) + { + navigationManager.NavigateTo(navigationManager.GetUriWithQueryParameter(name, value)); + } } diff --git a/src/Component/BlazorComponent/wwwroot/js/blazor-component.js b/src/Component/BlazorComponent/wwwroot/js/blazor-component.js index f48595209..ef64626c9 100644 --- a/src/Component/BlazorComponent/wwwroot/js/blazor-component.js +++ b/src/Component/BlazorComponent/wwwroot/js/blazor-component.js @@ -1,2 +1,2 @@ -!function(){"use strict";function e(e,t,n,o){return new(n||(n=Promise))((function(i,r){function l(e){try{a(o.next(e))}catch(e){r(e)}}function s(e){try{a(o.throw(e))}catch(e){r(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,s)}a((o=o.apply(e,t||[])).next())}))}let t=!1;try{if("undefined"!=typeof window){const e=Object.defineProperty({},"passive",{get:()=>{t=!0}});window.addEventListener("testListener",e,e),window.removeEventListener("testListener",e,e)}}catch(e){console.warn(e)}const n=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34,shift:16});function o(e){if(!e)return null;let t=e.getAttributeNames().find((e=>e.startsWith("_bl_")));return t&&(t=t.substring(4)),t}function i(e){if(e instanceof Element){for(var t=[];e.nodeType===Node.ELEMENT_NODE;){var n=e.nodeName.toLowerCase();if(e.id){n="#"+e.id,t.unshift(n);break}for(var o=e,i=1;o=o.previousElementSibling;)o.nodeName.toLowerCase()==n&&i++;1!=i&&(n+=":nth-of-type("+i+")"),t.unshift(n),e=e.parentNode}return t.join(" > ")}}function r(e){let t;try{if(e)if("string"==typeof e)if("document"===e)t=document.documentElement;else if(e.indexOf("__.__")>0){let n=e.split("__.__"),o=0,i=document.querySelector(n[o++]);if(i)for(;n[o];)i=i[n[o]],o++;i instanceof HTMLElement&&(t=i)}else t=document.querySelector(e);else t=e;else t=document.body}catch(e){console.error(e)}return t}const l=!("undefined"==typeof window||"undefined"==typeof document||!window.document||!window.document.createElement),s=["touchcancel","touchend","touchmove","touchenter","touchleave","touchstart"];function a(e){return{detail:e.detail,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,pageX:e.pageX,pageY:e.pageY,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,type:e.type}}function c(e){return{detail:e.detail,touches:u(e.touches),targetTouches:u(e.targetTouches),changedTouches:u(e.changedTouches),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,type:e.type}}function u(e){const t=[];for(let n=0;np("mouse",e)})}function f(e,t){Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t,createEventArgs:e=>{const t=(n=e,Object.assign(Object.assign({},a(n)),{dataTransfer:n.dataTransfer?{dropEffect:n.dataTransfer.dropEffect,effectAllowed:n.dataTransfer.effectAllowed,files:Array.from(n.dataTransfer.files).map((e=>e.name)),items:Array.from(n.dataTransfer.items).map((e=>({kind:e.kind,type:e.type}))),types:n.dataTransfer.types}:null}));var n;const o=e.dataTransfer.getData("data-value"),i=e.dataTransfer.getData("offsetX"),r=e.dataTransfer.getData("offsetY");return t.dataTransfer.data={value:o,offsetX:Number(i),offsetY:Number(r)},t}})}function p(e,t){let n={target:{}};return"mouse"===e?n=Object.assign(Object.assign({},n),a(t)):"touch"===e&&(n=Object.assign(Object.assign({},n),c(t))),n.target=function(e){const t=e,n={},o=t.getAttributeNames().find((e=>e.startsWith("_bl_")));return o?(n.elementReferenceId=o,n.selector=`[${o}]`):n.selector=i(t),n.class=t.getAttribute("class"),n}(t.target),n}let m=0;const h={};var g=Object.freeze({__proto__:null,registerSliderEvents:function(n,o){h[m]=s;const i=document.querySelector("[data-app]"),r=!t||{passive:!0,capture:!0},l=!!t&&{passive:!0};return n.addEventListener("mousedown",s),n.addEventListener("touchstart",s),m++;function s(t){return e(this,void 0,void 0,(function*(){const e="touches"in t;c(t),i.addEventListener(e?"touchmove":"mousemove",c,l),function(e,t,n,o=!1){const i=r=>{n(r),e.removeEventListener(t,i,o)};e.addEventListener(t,i,o)}(i,e?"touchend":"mouseup",a,r),e?yield o.invokeMethodAsync("OnTouchStartInternal",p("touch",t)):yield o.invokeMethodAsync("OnMouseDownInternal",p("mouse",t))}))}function a(t){return e(this,void 0,void 0,(function*(){t.stopPropagation(),i.removeEventListener("touchmove",c,l),i.removeEventListener("mousemove",c,l),yield o.invokeMethodAsync("OnMouseUpInternal")}))}function c(t){return e(this,void 0,void 0,(function*(){const e="touches"in t,n={type:t.type,clientX:e?t.touches[0].clientX:t.clientX,clientY:e?t.touches[0].clientY:t.clientY};yield o.invokeMethodAsync("OnMouseMoveInternal",n)}))}},unregisterSliderEvents:function(e,t){const n=h[t];e.removeEventListener("mousedown",n),e.removeEventListener("touchstart",n),delete h[t]}}),v=function(e,t,n){var o=null,i=null,r=function(){o&&(clearTimeout(o),i=null,o=null)},l=function(){if(!t)return e.apply(this,arguments);var l=this,s=arguments,a=n&&!o;return r(),i=function(){e.apply(l,s)},o=setTimeout((function(){if(o=null,!a){var e=i;return i=null,e()}}),t),a?i():void 0};return l.cancel=r,l.flush=function(){var e=i;r(),e&&e()},l};var y=function(e,t,n){var o=null,i=null,r=n&&n.leading,l=n&&n.trailing;null==r&&(r=!0);null==l&&(l=!r);1==r&&(l=!1);var s=function(){o&&(clearTimeout(o),o=null)},a=function(){var n=r&&!o,s=this,a=arguments;if(i=function(){return e.apply(s,a)},o||(o=setTimeout((function(){if(o=null,l)return i()}),t)),n)return n=!1,i()};return a.cancel=s,a.flush=function(){var e=i;s(),e&&e()},a};function w(){var e,t;d("exmousedown","mousedown"),d("exmouseup","mouseup"),d("exclick","click"),d("exmouseleave","mouseleave"),d("exmouseenter","mouseenter"),d("exmousemove","mousemove"),e="extouchstart",t="touchstart",Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t,createEventArgs:e=>p("touch",e)}),function(e,t){Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t})}("transitionend","transitionend"),f("exdrop","drop")}const b=80;function E(e,t){e.style.transform=t,e.style.webkitTransform=t}function T(e){return"TouchEvent"===e.constructor.name}function L(e){return"KeyboardEvent"===e.constructor.name}const _={show(e,t,n={}){if(!t._ripple||!t._ripple.enabled)return;const o=document.createElement("span"),i=document.createElement("span");o.appendChild(i),o.className="m-ripple__container",n.class&&(o.className+=` ${n.class}`);const{radius:r,scale:l,x:s,y:a,centerX:c,centerY:u}=((e,t,n={})=>{let o=0,i=0;if(!L(e)){const n=t.getBoundingClientRect(),r=T(e)?e.touches[e.touches.length-1]:e;o=r.clientX-n.left,i=r.clientY-n.top}let r=0,l=.3;t._ripple&&t._ripple.circle?(l=.15,r=t.clientWidth/2,r=n.center?r:r+Math.sqrt((o-r)**2+(i-r)**2)/4):r=Math.sqrt(t.clientWidth**2+t.clientHeight**2)/2;const s=(t.clientWidth-2*r)/2+"px",a=(t.clientHeight-2*r)/2+"px";return{radius:r,scale:l,x:n.center?s:o-r+"px",y:n.center?a:i-r+"px",centerX:s,centerY:a}})(e,t,n),d=2*r+"px";i.className="m-ripple__animation",i.style.width=d,i.style.height=d,t.appendChild(o);const f=window.getComputedStyle(t);f&&"static"===f.position&&(t.style.position="relative",t.dataset.previousPosition="static"),i.classList.add("m-ripple__animation--enter"),i.classList.add("m-ripple__animation--visible"),E(i,`translate(${s}, ${a}) scale3d(${l},${l},${l})`),i.dataset.activated=String(performance.now()),setTimeout((()=>{i.classList.remove("m-ripple__animation--enter"),i.classList.add("m-ripple__animation--in"),E(i,`translate(${c}, ${u}) scale3d(1,1,1)`)}),0)},hide(e){if(!e||!e._ripple||!e._ripple.enabled)return;const t=e.getElementsByClassName("m-ripple__animation");if(0===t.length)return;const n=t[t.length-1];if(n.dataset.isHiding)return;n.dataset.isHiding="true";const o=performance.now()-Number(n.dataset.activated),i=Math.max(250-o,0);setTimeout((()=>{n.classList.remove("m-ripple__animation--in"),n.classList.add("m-ripple__animation--out"),setTimeout((()=>{var t;1===e.getElementsByClassName("m-ripple__animation").length&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),(null===(t=n.parentNode)||void 0===t?void 0:t.parentNode)===e&&e.removeChild(n.parentNode)}),300)}),i)}};function C(e){const t={},n=e.currentTarget;if(n&&n._ripple&&!n._ripple.touched&&!e.rippleStop){if(e.rippleStop=!0,T(e))n._ripple.touched=!0,n._ripple.isTouch=!0;else if(n._ripple.isTouch)return;if(t.center=n._ripple.centered||L(e),n._ripple.class&&(t.class=n._ripple.class),T(e)){if(n._ripple.showTimerCommit)return;n._ripple.showTimerCommit=()=>{_.show(e,n,t)},n._ripple.showTimer=window.setTimeout((()=>{n&&n._ripple&&n._ripple.showTimerCommit&&(n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null)}),b)}else _.show(e,n,t)}}function S(e){const t=e.currentTarget;if(t&&t._ripple)if(window.clearTimeout(t._ripple.showTimer),"touchend"===e.type&&t._ripple.showTimerCommit){t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null;t._ripple.showTimer=setTimeout((()=>S(e)))}else window.setTimeout((()=>{t._ripple&&(t._ripple.touched=!1)})),_.hide(t)}function x(e){const t=e.currentTarget;t&&t._ripple&&(t._ripple.showTimerCommit&&(t._ripple.showTimerCommit=null),window.clearTimeout(t._ripple.showTimer))}function O(e){const t=e.currentTarget;t.keyboardRipple||e.keyCode!==n.enter&&e.keyCode!==n.space||(t.keyboardRipple=!0,C(e))}function N(e){e.currentTarget.keyboardRipple=!1,S(e)}function k(e){const t=e.currentTarget;!0===t.keyboardRipple&&(t.keyboardRipple=!1,S(e))}function A(e,t,n){let o=!1;t?o=!0:_.hide(e);const i=t||{};e._ripple=e._ripple||{},e._ripple.enabled=o,e._ripple=Object.assign(Object.assign({},e._ripple),{centered:i.center,class:i.class,circle:i.circle}),o&&!n?(e.addEventListener("touchstart",C,{passive:!0}),e.addEventListener("touchend",S,{passive:!0}),e.addEventListener("touchmove",x,{passive:!0}),e.addEventListener("touchcancel",S),e.addEventListener("mousedown",C),e.addEventListener("mouseup",S),e.addEventListener("mouseleave",S),e.addEventListener("keydown",O),e.addEventListener("keyup",N),e.addEventListener("blur",k),e.addEventListener("dragstart",S,{passive:!0})):!o&&n&&M(e)}function M(e){e.removeEventListener("mousedown",C),e.removeEventListener("touchstart",C),e.removeEventListener("touchend",S),e.removeEventListener("touchmove",x),e.removeEventListener("touchcancel",S),e.removeEventListener("mouseup",S),e.removeEventListener("mouseleave",S),e.removeEventListener("keydown",O),e.removeEventListener("keyup",N),e.removeEventListener("dragstart",S),e.removeEventListener("blur",k),e._ripple.enabled=!1}function H(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return 0;const t=+window.getComputedStyle(e).getPropertyValue("z-index");return t||H(e.parentNode)}function B(e){var t={};t.offsetTop=e.offsetTop||0,t.offsetLeft=e.offsetLeft||0,t.scrollHeight=e.scrollHeight||0,t.scrollWidth=e.scrollWidth||0,t.scrollLeft=e.scrollLeft||0,t.scrollTop=e.scrollTop||0,t.clientTop=e.clientTop||0,t.clientLeft=e.clientLeft||0,t.clientHeight=e.clientHeight||0,t.clientWidth=e.clientWidth||0;var n=function(e){var t=new Object;if(t.x=0,t.y=0,null!==e&&e.getBoundingClientRect){var n=document.documentElement,o=e.getBoundingClientRect(),i=n.scrollLeft,r=n.scrollTop;t.offsetWidth=o.width,t.offsetHeight=o.height,t.relativeTop=o.top,t.relativeBottom=o.bottom,t.relativeLeft=o.left,t.relativeRight=o.right,t.absoluteLeft=o.left+i,t.absoluteTop=o.top+r}return t}(e);return t.offsetWidth=Math.round(n.offsetWidth)||0,t.offsetHeight=Math.round(n.offsetHeight)||0,t.relativeTop=Math.round(n.relativeTop)||0,t.relativeBottom=Math.round(n.relativeBottom)||0,t.relativeLeft=Math.round(n.relativeLeft)||0,t.relativeRight=Math.round(n.relativeRight)||0,t.absoluteLeft=Math.round(n.absoluteLeft)||0,t.absoluteTop=Math.round(n.absoluteTop)||0,t}window.onload=function(){var e;w(),e="pastewithdata",Blazor&&Blazor.registerCustomEventType(e,{browserEventName:"paste",createEventArgs:e=>({type:e.type,pastedData:e.clipboardData.getData("text")})}),function(){const e=new MutationObserver(((e,n)=>{for(const n of e){if("childList"===n.type&&n.addedNodes.length>0)for(const e of n.addedNodes)e instanceof HTMLElement&&e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute("ripple")&&!e._ripple&&A(e,t(e),!1);if("attributes"===n.type){const e=n.target;e.hasAttribute("ripple")&&!e._ripple&&("ripple"===n.attributeName?A(e,t(e),!1):!e.hasAttribute("ripple")&&e._ripple&&(M(e),delete e._ripple))}if("attributes"===n.type&&"ripple"===n.attributeName){const e=n.target;e._ripple&&A(e,t(e),e._ripple.enabled)}if("childList"===n.type&&n.removedNodes.length>0)for(const e of n.removedNodes)e instanceof HTMLElement&&e.nodeType===Node.ELEMENT_NODE&&e._ripple&&(M(e),delete e._ripple)}}));function t(e){const t=e.getAttribute("ripple");if("string"!=typeof t&&!t||"false"===t)return null;const n={circle:!0,center:!1},[o,i]=t.split(":");return o&&("center"===o?(n.circle=!1,n.center=!0):"circle"!==o&&(n.class=o)),i&&(n.class=i),n}const n=document.querySelectorAll("[ripple]");for(const e of n)A(e,t(e),!1);e.observe(document,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["ripple"],attributeOldValue:!1})}()};var I={};function Y(){return document.activeElement.getAttribute("id")||""}function D(e=[],t=[]){const n={};return e&&e.forEach((e=>n[e]=window[e])),t&&t.forEach((e=>n[e]=document.documentElement[e])),n}function P(e){return"HTML"!==e.tagName&&"BODY"!==e.tagName&&1==e.nodeType}function X(e=[],t){const n=[H(r(t))],o=[...document.getElementsByClassName("m-menu__content--active"),...document.getElementsByClassName("m-dialog__content--active")];for(let t=0;t{if(o){if(o.offsetParent){const t=z(o.offsetParent);s.relativeYOffset=window.pageYOffset+t.top,e?(s.activator.top-=s.relativeYOffset,s.activator.left-=window.pageXOffset+t.left):s.offsetParentLeft=t.left}s.content=q(o,n)}}),o),s}function q(e,t){if(!e)return{};const n=z(e);if(!t){const t=window.getComputedStyle(e);n.left=parseInt(t.marginLeft),n.top=parseInt(t.marginTop)}return n}function z(e){if(!e||!e.nodeType)return null;const t=e.getBoundingClientRect();return{top:Math.round(t.top),left:Math.round(t.left),bottom:Math.round(t.bottom),right:Math.round(t.right),width:Math.round(t.width),height:Math.round(t.height)}}function R(e,t,n,o){e.preventDefault();const i=e.key;if("ArrowLeft"===i||"Backspace"===i){if("Backspace"===i){const e={type:i,index:t,value:""};o&&o.invokeMethodAsync("Invoke",JSON.stringify(e))}j(t-1,n)}else"ArrowRight"===i&&j(t+1,n)}function j(e,t){if(e<0)j(0,t);else if(e>=t.length)j(t.length-1,t);else if(document.activeElement!==t[e]){r(t[e]).focus()}}function $(e,t,n){const o=r(n[t]);o&&document.activeElement===o&&o.select()}function F(e,t,n,o){const i=e.target.value;if(i&&""!==i&&(j(t+1,n),o)){const e={type:"Input",index:t,value:i};o.invokeMethodAsync("Invoke",JSON.stringify(e))}}function K(){var e,t,n="weird_get_top_level_domain=cookie",o=document.location.hostname.split(".");for(e=o.length-1;e>=0;e--)if(t=o.slice(e).join("."),document.cookie=n+";domain=."+t+";",document.cookie.indexOf(n)>-1)return document.cookie=n.split("=")[0]+"=;domain=."+t+";expires=Thu, 01 Jan 1970 00:00:01 GMT;",t}var V=Object.freeze({__proto__:null,getZIndex:H,getDomInfo:function(e,t="body"){var n={},o=r(e);if(o)if(o.style&&"none"===o.style.display){var i=o.cloneNode(!0);i.style.display="inline-block",i.style["z-index"]=-1e3,o.parentElement.appendChild(i),n=B(i),o.parentElement.removeChild(i)}else n=B(o);return n},triggerEvent:function(e,t,n,o){var i=r(e),l=document.createEvent(t);return l.initEvent(n),o&&l.stopPropagation(),i.dispatchEvent(l)},setProperty:function(e,t,n){r(e)[t]=n},getBoundingClientRect:function(e,t="body"){var n,o;let i=r(e);var l={};if(i&&i.getBoundingClientRect)if(i.style&&"none"===i.style.display){var s=i.cloneNode(!0);s.style.display="inline-block",s.style["z-index"]=-1e3,null===(n=document.querySelector(t))||void 0===n||n.appendChild(s),l=s.getBoundingClientRect(),null===(o=document.querySelector(t))||void 0===o||o.removeChild(s)}else l=i.getBoundingClientRect();return l},addHtmlElementEventListener:function(e,t,n,o,r){let l;l="window"==e?window:"document"==e?document.documentElement:document.querySelector(e);var a=(null==r?void 0:r.key)||`${e}:${t}`;const u={};var d=e=>{var t;if((null==r?void 0:r.stopPropagation)&&e.stopPropagation(),("boolean"!=typeof e.cancelable||e.cancelable)&&(null==r?void 0:r.preventDefault)&&e.preventDefault(),(null==r?void 0:r.relatedTarget)&&(null===(t=document.querySelector(r.relatedTarget))||void 0===t?void 0:t.contains(e.relatedTarget)))return;let o={};if(s.includes(e.type))o=c(e);else for(var l in e)"string"!=typeof e[l]&&"number"!=typeof e[l]||(o[l]=e[l]);if(e.target&&e.target!==window&&e.target!==document){o.target={};const t=e.target,n=t.getAttributeNames().find((e=>e.startsWith("_bl_")));n?(o.target.elementReferenceId=n,o.target.selector=`[${n}]`):o.target.selector=i(t),o.target.class=t.getAttribute("class")}n.invokeMethodAsync("Invoke",o)};(null==r?void 0:r.debounce)&&r.debounce>0?u.listener=v(d,r.debounce):(null==r?void 0:r.throttle)&&r.throttle>0?u.listener=y(d,r.throttle,{trailing:!0}):u.listener=d,u.options=o,u.handle=n,I[a]?I[a].push(u):I[a]=[u],l&&l.addEventListener(t,u.listener,u.options)},removeHtmlElementEventListener:function(e,t,n){let o;o="window"==e?window:"document"==e?document.documentElement:document.querySelector(e);var i=I[n=n||`${e}:${t}`];i&&(i.forEach((e=>{e.handle.dispose(),null==o||o.removeEventListener(t,e.listener,e.options)})),I[n]=[])},addMouseleaveEventListener:function(e){var t=document.querySelector(e);t&&t.addEventListener()},contains:function(e,t){const n=r(e);return!(!n||!n.contains)&&n.contains(r(t))},equalsOrContains:function(e,t){const n=r(e),o=r(t);return!!n&&n.contains&&!!o&&(n==o||n.contains(o))},copy:function(e){navigator.clipboard?navigator.clipboard.writeText(e).then((function(){console.log("Async: Copying to clipboard was successful!")}),(function(e){console.error("Async: Could not copy text: ",e)})):function(e){var t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Fallback: Copying text command was "+n)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)}(e)},focus:function(e,t=!1){let n=r(e);if(!(n instanceof HTMLElement))throw new Error("Unable to focus an invalid element.");n.focus({preventScroll:t})},select:function(e){let t=r(e);if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement))throw new Error("Unable to select an invalid element");t.select()},hasFocus:function(e){let t=r(e);return document.activeElement===t},blur:function(e){r(e).blur()},log:function(e){console.log(e)},scrollIntoView:function(e,t){let n=r(e);n instanceof HTMLElement&&(null===t||null==t?n.scrollIntoView():"boolean"==typeof t?n.scrollIntoView(t):n.scrollIntoView({block:null==t.block?void 0:t.block,inline:null==t.inline?void 0:t.inline,behavior:t.behavior}))},scrollIntoParentView:function(e,t=!1,n=!1,o=1,i="smooth"){const l=r(e);if(l instanceof HTMLElement){let e=l;for(;o>0;)if(e=e.parentElement,o--,!e)return;const r={behavior:i};if(t)if(n)r.left=l.offsetLeft;else{const t=l.offsetLeft-e.offsetLeft;t-e.scrollLeft<0?r.left=t:t+l.offsetWidth-e.scrollLeft>e.offsetWidth&&(r.left=t+l.offsetWidth-e.offsetWidth)}else if(n)r.top=l.offsetTop;else{const t=l.offsetTop-e.offsetTop;t-e.scrollTop<0?r.top=t:t+l.offsetHeight-e.scrollTop>e.offsetHeight&&(r.top=t+l.offsetHeight-e.offsetHeight)}(r.left||r.top)&&e.scrollTo(r)}},scrollTo:function(e,t){let n=r(e);if(n instanceof HTMLElement){const e={left:null===t.left?void 0:t.left,top:null===t.top?void 0:t.top,behavior:t.behavior};n.scrollTo(e)}},scrollToElement:function(e,t,n){const o=r(e);if(!o)return;const i=o.getBoundingClientRect().top+window.pageYOffset-t;window.scrollTo({top:i,behavior:n})},scrollToActiveElement:function(e,t=".active",n="center"){let o,i=r(e);"string"==typeof t&&(o=e.querySelector(t)),i&&o&&(i.scrollTop="center"===n?o.offsetTop-i.offsetHeight/2+o.offsetHeight/2:o.offsetTop-n)},addClsToFirstChild:function(e,t){var n=r(e);n.firstElementChild&&n.firstElementChild.classList.add(t)},removeClsFromFirstChild:function(e,t){var n=r(e);n.firstElementChild&&n.firstElementChild.classList.remove(t)},getAbsoluteTop:function e(t){var n=t.offsetTop;return null!=t.offsetParent&&(n+=e(t.offsetParent)),n},getAbsoluteLeft:function e(t){var n=t.offsetLeft;return null!=t.offsetParent&&(n+=e(t.offsetParent)),n},addElementToBody:function(e){document.body.appendChild(e)},delElementFromBody:function(e){document.body.removeChild(e)},addElementTo:function(e,t){let n=r(t);n&&e&&n.appendChild(e)},delElementFrom:function(e,t){let n=r(t);n&&e&&n.removeChild(e)},getActiveElement:Y,focusDialog:function e(t,n=0){let o=document.querySelector(t);o&&!o.hasAttribute("disabled")&&setTimeout((()=>{o.focus(),"#"+Y()!==t&&n<10&&e(t,n+1)}),10)},getWindow:function(){return{innerWidth:window.innerWidth,innerHeight:window.innerHeight,pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset,isTop:0==window.scrollY,isBottom:window.scrollY+window.innerHeight==document.body.clientHeight}},getWindowAndDocumentProps:D,css:function(e,t,n=null){var o=r(e);if("string"==typeof t)o.style[t]=n;else for(let e in t)t.hasOwnProperty(e)&&(o.style[e]=t[e])},addCls:function(e,t){let n=r(e);"string"==typeof t?n.classList.add(t):n.classList.add(...t)},removeCls:function(e,t){let n=r(e);"string"==typeof t?n.classList.remove(t):n.classList.remove(...t)},elementScrollIntoView:function(e){let t=r(e);t&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})},getScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},getScrollParent:function(e,t=undefined){null!=t||(t=l?window:void 0);let n=e;for(;n&&n!==t&&P(n);){const{overflowY:e}=window.getComputedStyle(n);if(/scroll|auto|overlay/i.test(e))return n;n=n.parentNode}return t},getScrollTop:function(e){const t="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)},getInnerText:function(e){return r(e).innerText},getMenuOrDialogMaxZIndex:X,getMaxZIndex:function(){return[...document.all].reduce(((e,t)=>Math.max(e,+window.getComputedStyle(t).zIndex||0)),0)},getStyle:function(e,t){return(e=r(e)).currentStyle?e.currentStyle[t]:window.getComputedStyle?document.defaultView.getComputedStyle(e,null).getPropertyValue(t):void 0},getTextAreaInfo:function(e){var t={},n=r(e);return t.scrollHeight=n.scrollHeight||0,e.currentStyle?(t.lineHeight=parseFloat(e.currentStyle["line-height"]),t.paddingTop=parseFloat(e.currentStyle["padding-top"]),t.paddingBottom=parseFloat(e.currentStyle["padding-bottom"]),t.borderBottom=parseFloat(e.currentStyle["border-bottom"]),t.borderTop=parseFloat(e.currentStyle["border-top"])):window.getComputedStyle&&(t.lineHeight=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("line-height")),t.paddingTop=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("padding-top")),t.paddingBottom=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("padding-bottom")),t.borderBottom=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("border-bottom")),t.borderTop=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("border-top"))),Object.is(NaN,t.borderTop)&&(t.borderTop=1),Object.is(NaN,t.borderBottom)&&(t.borderBottom=1),t},disposeObj:function(e){},upsertThemeStyle:function(e,t){const n=document.getElementById(e);n&&document.head.removeChild(n);const o=document.createElement("style");o.id=e,o.type="text/css",o.innerHTML=t,document.head.insertAdjacentElement("beforeend",o)},getImageDimensions:function(e){return new Promise((function(t,n){var o=new Image;o.src=e,o.onload=function(){t({width:o.width,height:o.height,hasError:!1})},o.onerror=function(){t({width:0,height:0,hasError:!0})}}))},enablePreventDefaultForEvent:function(e,t,n){const o=r(e);o&&("keydown"===t?o.addEventListener(t,(e=>{Array.isArray(n)?n.includes(e.code)&&e.preventDefault():e.preventDefault()})):o.addEventListener(t,(e=>{e.preventDefault&&e.preventDefault()})))},getBoundingClientRects:function(e){for(var t=document.querySelectorAll(e),n=[],o=0;o{if(e.target!==r(t)&&(e.preventDefault(),e.stopPropagation()),n){const t={Detail:e.detail,ScreenX:e.screenX,ScreenY:e.screenY,ClientX:e.clientX,ClientY:e.clientY,OffsetX:e.offsetX,OffsetY:e.offsetY,PageX:e.pageX,PageY:e.pageY,Button:e.button,Buttons:e.buttons,CtrlKey:e.ctrlKey,ShiftKey:e.shiftKey,AltKey:e.altKey,MetaKey:e.metaKey,Type:e.type};n.invokeMethodAsync("Invoke",t)}};e.addEventListener("mousedown",i);const l={listener:i,handle:n},s=`registerTextFieldOnMouseDown_${o(e)}`;I[s]=[l]},unregisterTextFieldOnMouseDown:function(e){const t=`registerTextFieldOnMouseDown_${o(e)}`,n=I[t];n&&n.length&&n.forEach((t=>{t.handle.dispose(),e&&e.removeEventListener("mousedown",t.listener)}))},containsActiveElement:function(e){var t=r(e);return t&&t.contains?t.contains(document.activeElement):null},copyChild:function(e){"string"==typeof e&&(e=document.querySelector(e)),e&&(e.setAttribute("contenteditable","true"),e.focus(),document.execCommand("selectAll",!1,null),document.execCommand("copy"),document.execCommand("unselect"),e.removeAttribute("contenteditable"))},copyText:function(e){if(navigator.clipboard)navigator.clipboard.writeText(e).then((function(){console.log("Async: Copying to clipboard was successful!")}),(function(e){console.error("Async: Could not copy text: ",e)}));else{var t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Fallback: Copying text command was "+n)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)}},getMenuableDimensions:W,invokeMultipleMethod:function(e,t,n,o,i,r,l,s,a){var c={windowAndDocument:null,dimensions:null,zIndex:0};return c.windowAndDocument=D(e,t),c.dimensions=W(n,o,i,r,l,s),c.zIndex=X([r],a),c},registerOTPInputOnInputEvent:function(e,t){for(let n=0;nF(o,n,e,t),i=t=>$(t,n,e),r=o=>R(o,n,e,t);e[n].addEventListener("input",o),e[n].addEventListener("focus",i),e[n].addEventListener("keyup",r),e[n]._optInput={inputListener:o,focusListener:i,keyupListener:r}}},unregisterOTPInputOnInputEvent:function(e){for(let t=0;tr.offsetTop-8?l.scrollTo({top:r.offsetTop-r.clientHeight,behavior:"smooth"}):s+a=i-n},get_top_domain:K,setCookie:function(e,t){var n=K();n?isNaN(n[0])&&(n=`.${n}`):n="";var o=new Date;o.setTime(o.getTime()+2592e6),document.cookie=`${e}=${escape(t.toString())};path=/;expires=${o.toUTCString()};domain=${n}`},getCookie:function(e){const t=new RegExp(`(^| )${e}=([^;]*)(;|$)`),n=document.cookie.match(t);return n?unescape(n[2]):null},registerDragEvent:function(e,t){if(e){const n=o(e),i=e=>{if(t){const n=e.target.getAttribute(t);e.dataTransfer.setData(t,n),e.dataTransfer.setData("offsetX",e.offsetX.toString()),e.dataTransfer.setData("offsetY",e.offsetY.toString())}};I[`${n}:dragstart`]=[{listener:i}],e.addEventListener("dragstart",i)}},unregisterDragEvent:function(e){const t=o(e);if(t){const n=`${t}:dragstart`;I[n]&&I[n].forEach((t=>{e.removeEventListener("dragstart",t.listener)}))}},resizableDataTable:function(e){const t=e.querySelector("table"),n=t.querySelector(".m-data-table-header").getElementsByTagName("tr")[0],o=n?n.children:[];if(!o)return;t.style.overflow="hidden";const i=t.offsetHeight;for(var r=0;re.stopPropagation())),n.addEventListener("mousedown",(function(e){r=e.target.parentElement,l=r.nextElementSibling,i=e.pageX,u=t.offsetWidth;var n=function(e){if("border-box"==s(e,"box-sizing"))return 0;var t=s(e,"padding-left"),n=s(e,"padding-right");return parseInt(t)+parseInt(n)}(r);a=r.offsetWidth-n,l&&(c=l.offsetWidth-n)})),document.addEventListener("mousemove",(function(n){if(r){let o=n.pageX-i;e.classList.contains("m-data-table--rtl")&&(o=0-o);let s=a+o;r.style.width=s+"px";if(e.classList.contains("m-data-table--resizable-overflow"))return void(t.style.width=u+o+"px");if(e.classList.contains("m-data-table--resizable-independent")){let e=c-o;const t=a+c;o>0?l&&e0))||!(!i&&!r)&&U(e.parentNode,t))}function Z(e,t){return e===t||null!==e&&e!==document.body&&Z(e.parentNode,t)}function G(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return(["auto","scroll"].includes(t.overflowY)||"SELECT"===e.tagName)&&e.scrollHeight>e.clientHeight||["auto","scroll"].includes(t.overflowX)&&e.scrollWidth>e.clientWidth}var Q=Object.freeze({__proto__:null,hideScroll:function(e,o,i,l){if(e)document.documentElement.classList.add("overflow-y-hidden");else{if(!o)return;const e=r(o),d=t=>{!function(e,t,o,i){if("keydown"===e.type){if(["INPUT","TEXTAREA","SELECT"].includes(e.target.tagName)||e.target.isContentEditable)return;const t=[n.up,n.pageup],o=[n.down,n.pagedown];if(t.includes(e.keyCode))e.deltaY=-1;else{if(!o.includes(e.keyCode))return;e.deltaY=1}}(e.target===t||"keydown"!==e.type&&e.target===document.body||function(e,t,n){const o=function(e){if(e.composedPath)return e.composedPath();const t=[];let n=e.target;for(;n;){if(t.push(n),"HTML"===n.tagName)return t.push(document),t.push(window),t;n=n.parentElement}return t}(e);if("keydown"===e.type&&o[0]===document.body){const t=window.getSelection().anchorNode;return!(n&&G(n)&&Z(t,n))||!U(n,e)}for(let n=0;n{t=!0}});window.addEventListener("testListener",e,e),window.removeEventListener("testListener",e,e)}}catch(e){console.warn(e)}const n=Object.freeze({enter:13,tab:9,delete:46,esc:27,space:32,up:38,down:40,left:37,right:39,end:35,home:36,del:46,backspace:8,insert:45,pageup:33,pagedown:34,shift:16});function o(e){if(!e)return null;let t=e.getAttributeNames().find((e=>e.startsWith("_bl_")));return t&&(t=t.substring(4)),t}function i(e){if(e instanceof Element){for(var t=[];e.nodeType===Node.ELEMENT_NODE;){var n=e.nodeName.toLowerCase();if(e.id){n="#"+e.id,t.unshift(n);break}for(var o=e,i=1;o=o.previousElementSibling;)o.nodeName.toLowerCase()==n&&i++;1!=i&&(n+=":nth-of-type("+i+")"),t.unshift(n),e=e.parentNode}return t.join(" > ")}}function r(e){let t;try{if(e)if("string"==typeof e)if("document"===e)t=document.documentElement;else if(e.indexOf("__.__")>0){let n=e.split("__.__"),o=0,i=document.querySelector(n[o++]);if(i)for(;n[o];)i=i[n[o]],o++;i instanceof HTMLElement&&(t=i)}else t=document.querySelector(e);else t=e;else t=document.body}catch(e){console.error(e)}return t}const l=!("undefined"==typeof window||"undefined"==typeof document||!window.document||!window.document.createElement),s=["touchcancel","touchend","touchmove","touchenter","touchleave","touchstart"];function a(e){return{detail:e.detail,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,pageX:e.pageX,pageY:e.pageY,button:e.button,buttons:e.buttons,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,type:e.type}}function c(e){return{detail:e.detail,touches:u(e.touches),targetTouches:u(e.targetTouches),changedTouches:u(e.changedTouches),ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,type:e.type}}function u(e){const t=[];for(let n=0;np("mouse",e)})}function f(e,t){Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t,createEventArgs:e=>{const t=(n=e,Object.assign(Object.assign({},a(n)),{dataTransfer:n.dataTransfer?{dropEffect:n.dataTransfer.dropEffect,effectAllowed:n.dataTransfer.effectAllowed,files:Array.from(n.dataTransfer.files).map((e=>e.name)),items:Array.from(n.dataTransfer.items).map((e=>({kind:e.kind,type:e.type}))),types:n.dataTransfer.types}:null}));var n;const o=e.dataTransfer.getData("data-value"),i=e.dataTransfer.getData("offsetX"),r=e.dataTransfer.getData("offsetY");return t.dataTransfer.data={value:o,offsetX:Number(i),offsetY:Number(r)},t}})}function p(e,t){let n={target:{}};return"mouse"===e?n=Object.assign(Object.assign({},n),a(t)):"touch"===e&&(n=Object.assign(Object.assign({},n),c(t))),n.target=function(e){const t=e,n={},o=t.getAttributeNames().find((e=>e.startsWith("_bl_")));return o?(n.elementReferenceId=o,n.selector=`[${o}]`):n.selector=i(t),n.class=t.getAttribute("class"),n}(t.target),n}let m=0;const h={};var v=Object.freeze({__proto__:null,registerSliderEvents:function(n,o){h[m]=s;const i=document.querySelector("[data-app]"),r=!t||{passive:!0,capture:!0},l=!!t&&{passive:!0};return n.addEventListener("mousedown",s),n.addEventListener("touchstart",s),m++;function s(t){return e(this,void 0,void 0,(function*(){const e="touches"in t;c(t),i.addEventListener(e?"touchmove":"mousemove",c,l),function(e,t,n,o=!1){const i=r=>{n(r),e.removeEventListener(t,i,o)};e.addEventListener(t,i,o)}(i,e?"touchend":"mouseup",a,r),e?yield o.invokeMethodAsync("OnTouchStartInternal",p("touch",t)):yield o.invokeMethodAsync("OnMouseDownInternal",p("mouse",t))}))}function a(t){return e(this,void 0,void 0,(function*(){t.stopPropagation(),i.removeEventListener("touchmove",c,l),i.removeEventListener("mousemove",c,l),yield o.invokeMethodAsync("OnMouseUpInternal")}))}function c(t){return e(this,void 0,void 0,(function*(){const e="touches"in t,n={type:t.type,clientX:e?t.touches[0].clientX:t.clientX,clientY:e?t.touches[0].clientY:t.clientY};yield o.invokeMethodAsync("OnMouseMoveInternal",n)}))}},unregisterSliderEvents:function(e,t){const n=h[t];e.removeEventListener("mousedown",n),e.removeEventListener("touchstart",n),delete h[t]}}),g=function(e,t,n){var o=null,i=null,r=function(){o&&(clearTimeout(o),i=null,o=null)},l=function(){if(!t)return e.apply(this,arguments);var l=this,s=arguments,a=n&&!o;return r(),i=function(){e.apply(l,s)},o=setTimeout((function(){if(o=null,!a){var e=i;return i=null,e()}}),t),a?i():void 0};return l.cancel=r,l.flush=function(){var e=i;r(),e&&e()},l};var y=function(e,t,n){var o=null,i=null,r=n&&n.leading,l=n&&n.trailing;null==r&&(r=!0);null==l&&(l=!r);1==r&&(l=!1);var s=function(){o&&(clearTimeout(o),o=null)},a=function(){var n=r&&!o,s=this,a=arguments;if(i=function(){return e.apply(s,a)},o||(o=setTimeout((function(){if(o=null,l)return i()}),t)),n)return n=!1,i()};return a.cancel=s,a.flush=function(){var e=i;s(),e&&e()},a};function w(){var e,t;d("exmousedown","mousedown"),d("exmouseup","mouseup"),d("exclick","click"),d("exmouseleave","mouseleave"),d("exmouseenter","mouseenter"),d("exmousemove","mousemove"),e="extouchstart",t="touchstart",Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t,createEventArgs:e=>p("touch",e)}),function(e,t){Blazor&&Blazor.registerCustomEventType(e,{browserEventName:t})}("transitionend","transitionend"),f("exdrop","drop")}const b=80;function E(e,t){e.style.transform=t,e.style.webkitTransform=t}function T(e){return"TouchEvent"===e.constructor.name}function L(e){return"KeyboardEvent"===e.constructor.name}const _={show(e,t,n={}){if(!t._ripple||!t._ripple.enabled)return;const o=document.createElement("span"),i=document.createElement("span");o.appendChild(i),o.className="m-ripple__container",n.class&&(o.className+=` ${n.class}`);const{radius:r,scale:l,x:s,y:a,centerX:c,centerY:u}=((e,t,n={})=>{let o=0,i=0;if(!L(e)){const n=t.getBoundingClientRect(),r=T(e)?e.touches[e.touches.length-1]:e;o=r.clientX-n.left,i=r.clientY-n.top}let r=0,l=.3;t._ripple&&t._ripple.circle?(l=.15,r=t.clientWidth/2,r=n.center?r:r+Math.sqrt((o-r)**2+(i-r)**2)/4):r=Math.sqrt(t.clientWidth**2+t.clientHeight**2)/2;const s=(t.clientWidth-2*r)/2+"px",a=(t.clientHeight-2*r)/2+"px";return{radius:r,scale:l,x:n.center?s:o-r+"px",y:n.center?a:i-r+"px",centerX:s,centerY:a}})(e,t,n),d=2*r+"px";i.className="m-ripple__animation",i.style.width=d,i.style.height=d,t.appendChild(o);const f=window.getComputedStyle(t);f&&"static"===f.position&&(t.style.position="relative",t.dataset.previousPosition="static"),i.classList.add("m-ripple__animation--enter"),i.classList.add("m-ripple__animation--visible"),E(i,`translate(${s}, ${a}) scale3d(${l},${l},${l})`),i.dataset.activated=String(performance.now()),setTimeout((()=>{i.classList.remove("m-ripple__animation--enter"),i.classList.add("m-ripple__animation--in"),E(i,`translate(${c}, ${u}) scale3d(1,1,1)`)}),0)},hide(e){if(!e||!e._ripple||!e._ripple.enabled)return;const t=e.getElementsByClassName("m-ripple__animation");if(0===t.length)return;const n=t[t.length-1];if(n.dataset.isHiding)return;n.dataset.isHiding="true";const o=performance.now()-Number(n.dataset.activated),i=Math.max(250-o,0);setTimeout((()=>{n.classList.remove("m-ripple__animation--in"),n.classList.add("m-ripple__animation--out"),setTimeout((()=>{var t;1===e.getElementsByClassName("m-ripple__animation").length&&e.dataset.previousPosition&&(e.style.position=e.dataset.previousPosition,delete e.dataset.previousPosition),(null===(t=n.parentNode)||void 0===t?void 0:t.parentNode)===e&&e.removeChild(n.parentNode)}),300)}),i)}};function C(e){const t={},n=e.currentTarget;if(n&&n._ripple&&!n._ripple.touched&&!e.rippleStop){if(e.rippleStop=!0,T(e))n._ripple.touched=!0,n._ripple.isTouch=!0;else if(n._ripple.isTouch)return;if(t.center=n._ripple.centered||L(e),n._ripple.class&&(t.class=n._ripple.class),T(e)){if(n._ripple.showTimerCommit)return;n._ripple.showTimerCommit=()=>{_.show(e,n,t)},n._ripple.showTimer=window.setTimeout((()=>{n&&n._ripple&&n._ripple.showTimerCommit&&(n._ripple.showTimerCommit(),n._ripple.showTimerCommit=null)}),b)}else _.show(e,n,t)}}function x(e){const t=e.currentTarget;if(t&&t._ripple)if(window.clearTimeout(t._ripple.showTimer),"touchend"===e.type&&t._ripple.showTimerCommit){t._ripple.showTimerCommit(),t._ripple.showTimerCommit=null;t._ripple.showTimer=setTimeout((()=>x(e)))}else window.setTimeout((()=>{t._ripple&&(t._ripple.touched=!1)})),_.hide(t)}function S(e){const t=e.currentTarget;t&&t._ripple&&(t._ripple.showTimerCommit&&(t._ripple.showTimerCommit=null),window.clearTimeout(t._ripple.showTimer))}function k(e){const t=e.currentTarget;t.keyboardRipple||e.keyCode!==n.enter&&e.keyCode!==n.space||(t.keyboardRipple=!0,C(e))}function N(e){e.currentTarget.keyboardRipple=!1,x(e)}function M(e){const t=e.currentTarget;!0===t.keyboardRipple&&(t.keyboardRipple=!1,x(e))}function O(e,t,n){let o=!1;t?o=!0:_.hide(e);const i=t||{};e._ripple=e._ripple||{},e._ripple.enabled=o,e._ripple=Object.assign(Object.assign({},e._ripple),{centered:i.center,class:i.class,circle:i.circle}),o&&!n?(e.addEventListener("touchstart",C,{passive:!0}),e.addEventListener("touchend",x,{passive:!0}),e.addEventListener("touchmove",S,{passive:!0}),e.addEventListener("touchcancel",x),e.addEventListener("mousedown",C),e.addEventListener("mouseup",x),e.addEventListener("mouseleave",x),e.addEventListener("keydown",k),e.addEventListener("keyup",N),e.addEventListener("blur",M),e.addEventListener("dragstart",x,{passive:!0})):!o&&n&&A(e)}function A(e){e.removeEventListener("mousedown",C),e.removeEventListener("touchstart",C),e.removeEventListener("touchend",x),e.removeEventListener("touchmove",S),e.removeEventListener("touchcancel",x),e.removeEventListener("mouseup",x),e.removeEventListener("mouseleave",x),e.removeEventListener("keydown",k),e.removeEventListener("keyup",N),e.removeEventListener("dragstart",x),e.removeEventListener("blur",M),e._ripple.enabled=!1}function H(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return 0;const t=+window.getComputedStyle(e).getPropertyValue("z-index");return t||H(e.parentNode)}function Y(e){var t={};t.offsetTop=e.offsetTop||0,t.offsetLeft=e.offsetLeft||0,t.scrollHeight=e.scrollHeight||0,t.scrollWidth=e.scrollWidth||0,t.scrollLeft=e.scrollLeft||0,t.scrollTop=e.scrollTop||0,t.clientTop=e.clientTop||0,t.clientLeft=e.clientLeft||0,t.clientHeight=e.clientHeight||0,t.clientWidth=e.clientWidth||0;var n=function(e){var t=new Object;if(t.x=0,t.y=0,null!==e&&e.getBoundingClientRect){var n=document.documentElement,o=e.getBoundingClientRect(),i=n.scrollLeft,r=n.scrollTop;t.offsetWidth=o.width,t.offsetHeight=o.height,t.relativeTop=o.top,t.relativeBottom=o.bottom,t.relativeLeft=o.left,t.relativeRight=o.right,t.absoluteLeft=o.left+i,t.absoluteTop=o.top+r}return t}(e);return t.offsetWidth=Math.round(n.offsetWidth)||0,t.offsetHeight=Math.round(n.offsetHeight)||0,t.relativeTop=Math.round(n.relativeTop)||0,t.relativeBottom=Math.round(n.relativeBottom)||0,t.relativeLeft=Math.round(n.relativeLeft)||0,t.relativeRight=Math.round(n.relativeRight)||0,t.absoluteLeft=Math.round(n.absoluteLeft)||0,t.absoluteTop=Math.round(n.absoluteTop)||0,t}window.onload=function(){var e;w(),e="pastewithdata",Blazor&&Blazor.registerCustomEventType(e,{browserEventName:"paste",createEventArgs:e=>({type:e.type,pastedData:e.clipboardData.getData("text")})}),function(){const e=new MutationObserver(((e,n)=>{for(const n of e){if("childList"===n.type&&n.addedNodes.length>0)for(const e of n.addedNodes)e instanceof HTMLElement&&e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute("ripple")&&!e._ripple&&O(e,t(e),!1);if("attributes"===n.type){const e=n.target;e.hasAttribute("ripple")&&!e._ripple&&("ripple"===n.attributeName?O(e,t(e),!1):!e.hasAttribute("ripple")&&e._ripple&&(A(e),delete e._ripple))}if("attributes"===n.type&&"ripple"===n.attributeName){const e=n.target;e._ripple&&O(e,t(e),e._ripple.enabled)}if("childList"===n.type&&n.removedNodes.length>0)for(const e of n.removedNodes)e instanceof HTMLElement&&e.nodeType===Node.ELEMENT_NODE&&e._ripple&&(A(e),delete e._ripple)}}));function t(e){const t=e.getAttribute("ripple");if("string"!=typeof t&&!t||"false"===t)return null;const n={circle:!0,center:!1},[o,i]=t.split(":");return o&&("center"===o?(n.circle=!1,n.center=!0):"circle"!==o&&(n.class=o)),i&&(n.class=i),n}const n=document.querySelectorAll("[ripple]");for(const e of n)O(e,t(e),!1);e.observe(document,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["ripple"],attributeOldValue:!1})}()};var B={};function I(){return document.activeElement.getAttribute("id")||""}function D(e=[],t=[]){const n={};return e&&e.forEach((e=>n[e]=window[e])),t&&t.forEach((e=>n[e]=document.documentElement[e])),n}function P(e){return"HTML"!==e.tagName&&"BODY"!==e.tagName&&1==e.nodeType}function X(e=[],t){const n=[H(r(t))],o=[...document.getElementsByClassName("m-menu__content--active"),...document.getElementsByClassName("m-dialog__content--active")];for(let t=0;t{if(o){if(o.offsetParent){const t=z(o.offsetParent);s.relativeYOffset=window.pageYOffset+t.top,e?(s.activator.top-=s.relativeYOffset,s.activator.left-=window.pageXOffset+t.left):s.offsetParentLeft=t.left}s.content=q(o,n)}}),o),s}function q(e,t){if(!e)return{};const n=z(e);if(!t){const t=window.getComputedStyle(e);n.left=parseInt(t.marginLeft),n.top=parseInt(t.marginTop)}return n}function z(e){if(!e||!e.nodeType)return null;const t=e.getBoundingClientRect();return{top:Math.round(t.top),left:Math.round(t.left),bottom:Math.round(t.bottom),right:Math.round(t.right),width:Math.round(t.width),height:Math.round(t.height)}}function R(e,t,n,o){e.preventDefault();const i=e.key;if("ArrowLeft"===i||"Backspace"===i){if("Backspace"===i){const e={type:i,index:t,value:""};o&&o.invokeMethodAsync("Invoke",JSON.stringify(e))}$(t-1,n)}else"ArrowRight"===i&&$(t+1,n)}function $(e,t){if(e<0)$(0,t);else if(e>=t.length)$(t.length-1,t);else if(document.activeElement!==t[e]){r(t[e]).focus()}}function F(e,t,n){const o=r(n[t]);o&&document.activeElement===o&&o.select()}function K(e,t,n,o){const i=e.target.value;if(i&&""!==i&&($(t+1,n),o)){const e={type:"Input",index:t,value:i};o.invokeMethodAsync("Invoke",JSON.stringify(e))}}function j(){var e,t,n="weird_get_top_level_domain=cookie",o=document.location.hostname.split(".");for(e=o.length-1;e>=0;e--)if(t=o.slice(e).join("."),document.cookie=n+";domain=."+t+";",document.cookie.indexOf(n)>-1)return document.cookie=n.split("=")[0]+"=;domain=."+t+";expires=Thu, 01 Jan 1970 00:00:01 GMT;",t}var V=Object.freeze({__proto__:null,getZIndex:H,getDomInfo:function(e,t="body"){var n={},o=r(e);if(o)if(o.style&&"none"===o.style.display){var i=o.cloneNode(!0);i.style.display="inline-block",i.style["z-index"]=-1e3,o.parentElement.appendChild(i),n=Y(i),o.parentElement.removeChild(i)}else n=Y(o);return n},triggerEvent:function(e,t,n,o){var i=r(e),l=document.createEvent(t);return l.initEvent(n),o&&l.stopPropagation(),i.dispatchEvent(l)},setProperty:function(e,t,n){r(e)[t]=n},getBoundingClientRect:function(e,t="body"){var n,o;let i=r(e);var l={};if(i&&i.getBoundingClientRect)if(i.style&&"none"===i.style.display){var s=i.cloneNode(!0);s.style.display="inline-block",s.style["z-index"]=-1e3,null===(n=document.querySelector(t))||void 0===n||n.appendChild(s),l=s.getBoundingClientRect(),null===(o=document.querySelector(t))||void 0===o||o.removeChild(s)}else l=i.getBoundingClientRect();return l},addHtmlElementEventListener:function(e,t,n,o,r){let l;l="window"==e?window:"document"==e?document.documentElement:document.querySelector(e);var a=(null==r?void 0:r.key)||`${e}:${t}`;const u={};var d=e=>{var t;if((null==r?void 0:r.stopPropagation)&&e.stopPropagation(),("boolean"!=typeof e.cancelable||e.cancelable)&&(null==r?void 0:r.preventDefault)&&e.preventDefault(),(null==r?void 0:r.relatedTarget)&&(null===(t=document.querySelector(r.relatedTarget))||void 0===t?void 0:t.contains(e.relatedTarget)))return;let o={};if(s.includes(e.type))o=c(e);else for(var l in e)"string"!=typeof e[l]&&"number"!=typeof e[l]||(o[l]=e[l]);if(e.target&&e.target!==window&&e.target!==document){o.target={};const t=e.target,n=t.getAttributeNames().find((e=>e.startsWith("_bl_")));n?(o.target.elementReferenceId=n,o.target.selector=`[${n}]`):o.target.selector=i(t),o.target.class=t.getAttribute("class")}n.invokeMethodAsync("Invoke",o)};(null==r?void 0:r.debounce)&&r.debounce>0?u.listener=g(d,r.debounce):(null==r?void 0:r.throttle)&&r.throttle>0?u.listener=y(d,r.throttle,{trailing:!0}):u.listener=d,u.options=o,u.handle=n,B[a]?B[a].push(u):B[a]=[u],l&&l.addEventListener(t,u.listener,u.options)},removeHtmlElementEventListener:function(e,t,n){let o;o="window"==e?window:"document"==e?document.documentElement:document.querySelector(e);var i=B[n=n||`${e}:${t}`];i&&(i.forEach((e=>{e.handle.dispose(),null==o||o.removeEventListener(t,e.listener,e.options)})),B[n]=[])},addMouseleaveEventListener:function(e){var t=document.querySelector(e);t&&t.addEventListener()},contains:function(e,t){const n=r(e);return!(!n||!n.contains)&&n.contains(r(t))},equalsOrContains:function(e,t){const n=r(e),o=r(t);return!!n&&n.contains&&!!o&&(n==o||n.contains(o))},copy:function(e){navigator.clipboard?navigator.clipboard.writeText(e).then((function(){console.log("Async: Copying to clipboard was successful!")}),(function(e){console.error("Async: Could not copy text: ",e)})):function(e){var t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Fallback: Copying text command was "+n)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)}(e)},focus:function(e,t=!1){let n=r(e);if(!(n instanceof HTMLElement))throw new Error("Unable to focus an invalid element.");n.focus({preventScroll:t})},select:function(e){let t=r(e);if(!(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement))throw new Error("Unable to select an invalid element");t.select()},hasFocus:function(e){let t=r(e);return document.activeElement===t},blur:function(e){r(e).blur()},log:function(e){console.log(e)},scrollIntoView:function(e,t){let n=r(e);n instanceof HTMLElement&&(null===t||null==t?n.scrollIntoView():"boolean"==typeof t?n.scrollIntoView(t):n.scrollIntoView({block:null==t.block?void 0:t.block,inline:null==t.inline?void 0:t.inline,behavior:t.behavior}))},scrollIntoParentView:function(e,t=!1,n=!1,o=1,i="smooth"){const l=r(e);if(l instanceof HTMLElement){let e=l;for(;o>0;)if(e=e.parentElement,o--,!e)return;const r={behavior:i};if(t)if(n)r.left=l.offsetLeft;else{const t=l.offsetLeft-e.offsetLeft;t-e.scrollLeft<0?r.left=t:t+l.offsetWidth-e.scrollLeft>e.offsetWidth&&(r.left=t+l.offsetWidth-e.offsetWidth)}else if(n)r.top=l.offsetTop;else{const t=l.offsetTop-e.offsetTop;t-e.scrollTop<0?r.top=t:t+l.offsetHeight-e.scrollTop>e.offsetHeight&&(r.top=t+l.offsetHeight-e.offsetHeight)}(r.left||r.top)&&e.scrollTo(r)}},scrollTo:function(e,t){let n=r(e);if(n instanceof HTMLElement){const e={left:null===t.left?void 0:t.left,top:null===t.top?void 0:t.top,behavior:t.behavior};n.scrollTo(e)}},scrollToElement:function(e,t,n){const o=r(e);if(!o)return;const i=o.getBoundingClientRect().top+window.pageYOffset-t;window.scrollTo({top:i,behavior:n})},scrollToActiveElement:function(e,t=".active",n="center"){let o,i=r(e);"string"==typeof t&&(o=e.querySelector(t)),i&&o&&(i.scrollTop="center"===n?o.offsetTop-i.offsetHeight/2+o.offsetHeight/2:o.offsetTop-n)},addClsToFirstChild:function(e,t){var n=r(e);n.firstElementChild&&n.firstElementChild.classList.add(t)},removeClsFromFirstChild:function(e,t){var n=r(e);n.firstElementChild&&n.firstElementChild.classList.remove(t)},getAbsoluteTop:function e(t){var n=t.offsetTop;return null!=t.offsetParent&&(n+=e(t.offsetParent)),n},getAbsoluteLeft:function e(t){var n=t.offsetLeft;return null!=t.offsetParent&&(n+=e(t.offsetParent)),n},addElementToBody:function(e){document.body.appendChild(e)},delElementFromBody:function(e){document.body.removeChild(e)},addElementTo:function(e,t){let n=r(t);n&&e&&n.appendChild(e)},delElementFrom:function(e,t){let n=r(t);n&&e&&n.removeChild(e)},getActiveElement:I,focusDialog:function e(t,n=0){let o=document.querySelector(t);o&&!o.hasAttribute("disabled")&&setTimeout((()=>{o.focus(),"#"+I()!==t&&n<10&&e(t,n+1)}),10)},getWindow:function(){return{innerWidth:window.innerWidth,innerHeight:window.innerHeight,pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset,isTop:0==window.scrollY,isBottom:window.scrollY+window.innerHeight==document.body.clientHeight}},getWindowAndDocumentProps:D,css:function(e,t,n=null){var o=r(e);if("string"==typeof t)o.style[t]=n;else for(let e in t)t.hasOwnProperty(e)&&(o.style[e]=t[e])},addCls:function(e,t){let n=r(e);"string"==typeof t?n.classList.add(t):n.classList.add(...t)},removeCls:function(e,t){let n=r(e);"string"==typeof t?n.classList.remove(t):n.classList.remove(...t)},elementScrollIntoView:function(e){let t=r(e);t&&t.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"})},getScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},getScrollParent:function(e,t=undefined){null!=t||(t=l?window:void 0);let n=e;for(;n&&n!==t&&P(n);){const{overflowY:e}=window.getComputedStyle(n);if(/scroll|auto|overlay/i.test(e))return n;n=n.parentNode}return t},getScrollTop:function(e){const t="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)},getInnerText:function(e){return r(e).innerText},getMenuOrDialogMaxZIndex:X,getMaxZIndex:function(){return[...document.all].reduce(((e,t)=>Math.max(e,+window.getComputedStyle(t).zIndex||0)),0)},getStyle:function(e,t){return(e=r(e)).currentStyle?e.currentStyle[t]:window.getComputedStyle?document.defaultView.getComputedStyle(e,null).getPropertyValue(t):void 0},getTextAreaInfo:function(e){var t={},n=r(e);return t.scrollHeight=n.scrollHeight||0,e.currentStyle?(t.lineHeight=parseFloat(e.currentStyle["line-height"]),t.paddingTop=parseFloat(e.currentStyle["padding-top"]),t.paddingBottom=parseFloat(e.currentStyle["padding-bottom"]),t.borderBottom=parseFloat(e.currentStyle["border-bottom"]),t.borderTop=parseFloat(e.currentStyle["border-top"])):window.getComputedStyle&&(t.lineHeight=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("line-height")),t.paddingTop=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("padding-top")),t.paddingBottom=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("padding-bottom")),t.borderBottom=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("border-bottom")),t.borderTop=parseFloat(document.defaultView.getComputedStyle(e,null).getPropertyValue("border-top"))),Object.is(NaN,t.borderTop)&&(t.borderTop=1),Object.is(NaN,t.borderBottom)&&(t.borderBottom=1),t},disposeObj:function(e){},upsertThemeStyle:function(e,t){const n=document.getElementById(e);n&&document.head.removeChild(n);const o=document.createElement("style");o.id=e,o.type="text/css",o.innerHTML=t,document.head.insertAdjacentElement("beforeend",o)},getImageDimensions:function(e){return new Promise((function(t,n){var o=new Image;o.src=e,o.onload=function(){t({width:o.width,height:o.height,hasError:!1})},o.onerror=function(){t({width:0,height:0,hasError:!0})}}))},enablePreventDefaultForEvent:function(e,t,n){const o=r(e);o&&("keydown"===t?o.addEventListener(t,(e=>{Array.isArray(n)?n.includes(e.code)&&e.preventDefault():e.preventDefault()})):o.addEventListener(t,(e=>{e.preventDefault&&e.preventDefault()})))},getBoundingClientRects:function(e){for(var t=document.querySelectorAll(e),n=[],o=0;o{if(e.target!==r(t)&&(e.preventDefault(),e.stopPropagation()),n){const t={Detail:e.detail,ScreenX:e.screenX,ScreenY:e.screenY,ClientX:e.clientX,ClientY:e.clientY,OffsetX:e.offsetX,OffsetY:e.offsetY,PageX:e.pageX,PageY:e.pageY,Button:e.button,Buttons:e.buttons,CtrlKey:e.ctrlKey,ShiftKey:e.shiftKey,AltKey:e.altKey,MetaKey:e.metaKey,Type:e.type};n.invokeMethodAsync("Invoke",t)}};e.addEventListener("mousedown",i);const l={listener:i,handle:n},s=`registerTextFieldOnMouseDown_${o(e)}`;B[s]=[l]},unregisterTextFieldOnMouseDown:function(e){const t=`registerTextFieldOnMouseDown_${o(e)}`,n=B[t];n&&n.length&&n.forEach((t=>{t.handle.dispose(),e&&e.removeEventListener("mousedown",t.listener)}))},containsActiveElement:function(e){var t=r(e);return t&&t.contains?t.contains(document.activeElement):null},copyChild:function(e){"string"==typeof e&&(e=document.querySelector(e)),e&&(e.setAttribute("contenteditable","true"),e.focus(),document.execCommand("selectAll",!1,null),document.execCommand("copy"),document.execCommand("unselect"),e.removeAttribute("contenteditable"))},copyText:function(e){if(navigator.clipboard)navigator.clipboard.writeText(e).then((function(){console.log("Async: Copying to clipboard was successful!")}),(function(e){console.error("Async: Could not copy text: ",e)}));else{var t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Fallback: Copying text command was "+n)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)}},getMenuableDimensions:W,invokeMultipleMethod:function(e,t,n,o,i,r,l,s,a){var c={windowAndDocument:null,dimensions:null,zIndex:0};return c.windowAndDocument=D(e,t),c.dimensions=W(n,o,i,r,l,s),c.zIndex=X([r],a),c},registerOTPInputOnInputEvent:function(e,t){for(let n=0;nK(o,n,e,t),i=t=>F(t,n,e),r=o=>R(o,n,e,t);e[n].addEventListener("input",o),e[n].addEventListener("focus",i),e[n].addEventListener("keyup",r),e[n]._optInput={inputListener:o,focusListener:i,keyupListener:r}}},unregisterOTPInputOnInputEvent:function(e){for(let t=0;tr.offsetTop-8?l.scrollTo({top:r.offsetTop-r.clientHeight,behavior:"smooth"}):s+a=i-n},get_top_domain:j,setCookie:function(e,t){var n=j();n?isNaN(n[0])&&(n=`.${n}`):n="";var o=new Date;o.setTime(o.getTime()+2592e6),document.cookie=`${e}=${escape(t.toString())};path=/;expires=${o.toUTCString()};domain=${n}`},getCookie:function(e){const t=new RegExp(`(^| )${e}=([^;]*)(;|$)`),n=document.cookie.match(t);return n?unescape(n[2]):null},registerDragEvent:function(e,t){if(e){const n=o(e),i=e=>{if(t){const n=e.target.getAttribute(t);e.dataTransfer.setData(t,n),e.dataTransfer.setData("offsetX",e.offsetX.toString()),e.dataTransfer.setData("offsetY",e.offsetY.toString())}};B[`${n}:dragstart`]=[{listener:i}],e.addEventListener("dragstart",i)}},unregisterDragEvent:function(e){const t=o(e);if(t){const n=`${t}:dragstart`;B[n]&&B[n].forEach((t=>{e.removeEventListener("dragstart",t.listener)}))}},resizableDataTable:function(e){const t=e.querySelector("table"),n=t.querySelector(".m-data-table-header").getElementsByTagName("tr")[0],o=n?n.children:[];if(!o)return;t.style.overflow="hidden";const i=t.offsetHeight;for(var r=0;re.stopPropagation())),n.addEventListener("mousedown",(function(e){r=e.target.parentElement,l=r.nextElementSibling,i=e.pageX,u=t.offsetWidth;var n=function(e){if("border-box"==s(e,"box-sizing"))return 0;var t=s(e,"padding-left"),n=s(e,"padding-right");return parseInt(t)+parseInt(n)}(r);a=r.offsetWidth-n,l&&(c=l.offsetWidth-n)})),document.addEventListener("mousemove",(function(n){if(r){let o=n.pageX-i;e.classList.contains("m-data-table--rtl")&&(o=0-o);let s=a+o;r.style.width=s+"px";if(e.classList.contains("m-data-table--resizable-overflow"))return void(t.style.width=u+o+"px");if(e.classList.contains("m-data-table--resizable-independent")){let e=c-o;const t=a+c;o>0?l&&e0))||!(!i&&!r)&&J(e.parentNode,t))}function Z(e,t){return e===t||null!==e&&e!==document.body&&Z(e.parentNode,t)}function G(e){if(!e||e.nodeType!==Node.ELEMENT_NODE)return!1;const t=window.getComputedStyle(e);return(["auto","scroll"].includes(t.overflowY)||"SELECT"===e.tagName)&&e.scrollHeight>e.clientHeight||["auto","scroll"].includes(t.overflowX)&&e.scrollWidth>e.clientWidth}var Q=Object.freeze({__proto__:null,hideScroll:function(e,o,i,l){if(e)document.documentElement.classList.add("overflow-y-hidden");else{if(!o)return;const e=r(o),d=t=>{!function(e,t,o,i){if("keydown"===e.type){if(["INPUT","TEXTAREA","SELECT"].includes(e.target.tagName)||e.target.isContentEditable)return;const t=[n.up,n.pageup],o=[n.down,n.pagedown];if(t.includes(e.keyCode))e.deltaY=-1;else{if(!o.includes(e.keyCode))return;e.deltaY=1}}(e.target===t||"keydown"!==e.type&&e.target===document.body||function(e,t,n){const o=function(e){if(e.composedPath)return e.composedPath();const t=[];let n=e.target;for(;n;){if(t.push(n),"HTML"===n.tagName)return t.push(document),t.push(window),t;n=n.parentElement}return t}(e);if("keydown"===e.type&&o[0]===document.body){const t=window.getSelection().anchorNode;return!(n&&G(n)&&Z(t,n))||!J(n,e)}for(let n=0;n= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.push(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.push(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","export function addOnceEventListener (\r\n el: EventTarget,\r\n eventName: string,\r\n cb: (event: Event) => void,\r\n options: boolean | AddEventListenerOptions = false\r\n): void {\r\n const once = (event: Event) => {\r\n cb(event)\r\n el.removeEventListener(eventName, once, options)\r\n }\r\n\r\n el.addEventListener(eventName, once, options)\r\n}\r\n\r\nlet passiveSupported = false\r\ntry {\r\n if (typeof window !== 'undefined') {\r\n const testListenerOpts = Object.defineProperty({}, 'passive', {\r\n get: () => {\r\n passiveSupported = true\r\n },\r\n })\r\n\r\n window.addEventListener('testListener' as any, testListenerOpts as any, testListenerOpts)\r\n window.removeEventListener('testListener' as any, testListenerOpts as any, testListenerOpts)\r\n }\r\n} catch (e) { console.warn(e) } /* eslint-disable-line no-console */\r\nexport { passiveSupported }\r\n\r\nexport function addPassiveEventListener (\r\n el: EventTarget,\r\n event: string,\r\n cb: ((e: any) => void),\r\n options: {}\r\n): void {\r\n el.addEventListener(event, cb, passiveSupported ? options : false)\r\n}\r\n\r\nexport function getZIndex (el?: Element | null): number {\r\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return 0\r\n\r\n const index = +window.getComputedStyle(el).getPropertyValue('z-index')\r\n\r\n if (!index) return getZIndex(el.parentNode as Element)\r\n return index\r\n}\r\n\r\n// KeyboardEvent.keyCode aliases\r\nexport const keyCodes = Object.freeze({\r\n enter: 13,\r\n tab: 9,\r\n delete: 46,\r\n esc: 27,\r\n space: 32,\r\n up: 38,\r\n down: 40,\r\n left: 37,\r\n right: 39,\r\n end: 35,\r\n home: 36,\r\n del: 46,\r\n backspace: 8,\r\n insert: 45,\r\n pageup: 33,\r\n pagedown: 34,\r\n shift: 16,\r\n})\r\n\r\n/** Polyfill for Event.prototype.composedPath */\r\nexport function composedPath (e: Event): EventTarget[] {\r\n if (e.composedPath) return e.composedPath()\r\n\r\n const path = []\r\n let el = e.target as Element\r\n\r\n while (el) {\r\n path.push(el)\r\n\r\n if (el.tagName === 'HTML') {\r\n path.push(document)\r\n path.push(window)\r\n\r\n return path\r\n }\r\n\r\n el = el.parentElement!\r\n }\r\n return path\r\n}\r\n\r\nexport function getBlazorId(el) {\r\n if (!el) {\r\n return null;\r\n }\r\n let _bl_ = el.getAttributeNames().find(a => a.startsWith('_bl_'))\r\n if (_bl_) {\r\n _bl_ = _bl_.substring(4);\r\n }\r\n\r\n return _bl_;\r\n}\r\n\r\nexport function getElementSelector(el) {\r\n if (!(el instanceof Element))\r\n return;\r\n var path = [];\r\n while (el.nodeType === Node.ELEMENT_NODE) {\r\n var selector = el.nodeName.toLowerCase();\r\n if (el.id) {\r\n selector = '#' + el.id;\r\n path.unshift(selector);\r\n break;\r\n } else {\r\n var sib = el, nth = 1;\r\n while (sib = sib.previousElementSibling) {\r\n if (sib.nodeName.toLowerCase() == selector)\r\n nth++;\r\n }\r\n if (nth != 1)\r\n selector += \":nth-of-type(\" + nth + \")\";\r\n }\r\n path.unshift(selector);\r\n el = el.parentNode;\r\n }\r\n return path.join(\" > \");\r\n}\r\n\r\nexport function getEventTarget(target: HTMLElement | EventTarget) {\r\n const el = target as HTMLElement;\r\n const eventTarget: MbEventTarget = {};\r\n const elementReferenceId = el\r\n .getAttributeNames()\r\n .find((a) => a.startsWith(\"_bl_\"));\r\n if (elementReferenceId) {\r\n eventTarget.elementReferenceId = elementReferenceId;\r\n eventTarget.selector = `[${elementReferenceId}]`;\r\n } else {\r\n eventTarget.selector = getElementSelector(el);\r\n }\r\n\r\n eventTarget.class = el.getAttribute(\"class\");\r\n\r\n return eventTarget;\r\n}\r\n\r\nexport function getDom(elOrString: Element | string | undefined) {\r\n let element: HTMLElement;\r\n\r\n try {\r\n if (!elOrString) {\r\n element = document.body;\r\n } else if (typeof elOrString === \"string\") {\r\n if (elOrString === \"document\") {\r\n element = document.documentElement;\r\n } else if (elOrString.indexOf(\"__.__\") > 0) {\r\n // for example: el__.__parentElement\r\n let array = elOrString.split(\"__.__\");\r\n let i = 0;\r\n let el = document.querySelector(array[i++]);\r\n\r\n if (el) {\r\n while (array[i]) {\r\n el = el[array[i]];\r\n i++;\r\n }\r\n }\r\n\r\n if (el instanceof HTMLElement) {\r\n element = el;\r\n }\r\n } else {\r\n element = document.querySelector(elOrString);\r\n }\r\n } else {\r\n element = elOrString as HTMLElement;\r\n }\r\n\r\n } catch (error) {\r\n console.error(error)\r\n }\r\n\r\n return element;\r\n}\r\n\r\nexport const canUseDom = !!(\r\n typeof window !== 'undefined' &&\r\n typeof document !== 'undefined' &&\r\n window.document &&\r\n window.document.createElement\r\n)\r\n\r\nexport function convertToUnit (str: number, unit?: string): string\r\nexport function convertToUnit (str: string | number | null | undefined, unit?: string): string | undefined\r\nexport function convertToUnit (str: string | number | null | undefined, unit = 'px'): string | undefined {\r\n if (str == null || str === '') {\r\n return undefined\r\n } else if (isNaN(+str!)) {\r\n return String(str)\r\n } else if (!isFinite(+str!)) {\r\n return undefined\r\n } else {\r\n return `${Number(str)}${unit}`\r\n }\r\n}","// see https://github.com/dotnet/aspnetcore/blob/main/src/Components/Web.JS/src/Rendering/Events/EventTypes.ts\r\n// updated at 2022/08/31\r\n\r\nexport const touchEvents = [\r\n \"touchcancel\",\r\n \"touchend\",\r\n \"touchmove\",\r\n \"touchenter\",\r\n \"touchleave\",\r\n \"touchstart\",\r\n];\r\n\r\nexport function parseMouseEvent(event: MouseEvent): Blazor.MouseEventArgs {\r\n return {\r\n detail: event.detail,\r\n screenX: event.screenX,\r\n screenY: event.screenY,\r\n clientX: event.clientX,\r\n clientY: event.clientY,\r\n offsetX: event.offsetX,\r\n offsetY: event.offsetY,\r\n pageX: event.pageX,\r\n pageY: event.pageY,\r\n button: event.button,\r\n buttons: event.buttons,\r\n ctrlKey: event.ctrlKey,\r\n shiftKey: event.shiftKey,\r\n altKey: event.altKey,\r\n metaKey: event.metaKey,\r\n type: event.type,\r\n } as Blazor.MouseEventArgs;\r\n}\r\n\r\nexport function parseTouchEvent(event: TouchEvent): Blazor.TouchEventArgs {\r\n return {\r\n detail: event.detail,\r\n touches: parseTouch(event.touches),\r\n targetTouches: parseTouch(event.targetTouches),\r\n changedTouches: parseTouch(event.changedTouches),\r\n ctrlKey: event.ctrlKey,\r\n shiftKey: event.shiftKey,\r\n altKey: event.altKey,\r\n metaKey: event.metaKey,\r\n type: event.type,\r\n };\r\n}\r\n\r\nfunction parseTouch(touchList: TouchList): Blazor.TouchPoint[] {\r\n const touches: Blazor.TouchPoint[] = [];\r\n\r\n for (let i = 0; i < touchList.length; i++) {\r\n const touch = touchList[i];\r\n touches.push({\r\n identifier: touch.identifier,\r\n clientX: touch.clientX,\r\n clientY: touch.clientY,\r\n screenX: touch.screenX,\r\n screenY: touch.screenY,\r\n pageX: touch.pageX,\r\n pageY: touch.pageY,\r\n });\r\n }\r\n return touches;\r\n}\r\n\r\nexport function parseChangeEvent(event: Event): Blazor.ChangeEventArgs {\r\n const element = event.target as Element;\r\n if (isTimeBasedInput(element)) {\r\n const normalizedValue = normalizeTimeBasedValue(element);\r\n return { value: normalizedValue };\r\n } else if (isMultipleSelectInput(element)) {\r\n const selectElement = element as HTMLSelectElement;\r\n const selectedValues = Array.from(selectElement.options)\r\n .filter((option) => option.selected)\r\n .map((option) => option.value);\r\n return { value: selectedValues };\r\n } else {\r\n const targetIsCheckbox = isCheckbox(element);\r\n const newValue = targetIsCheckbox ? !!element[\"checked\"] : element[\"value\"];\r\n return { value: newValue };\r\n }\r\n}\r\n\r\nexport function parseDragEvent(event: DragEvent): Blazor.DragEventArgs {\r\n return {\r\n ...parseMouseEvent(event),\r\n dataTransfer: event.dataTransfer ? {\r\n dropEffect: event.dataTransfer.dropEffect,\r\n effectAllowed: event.dataTransfer.effectAllowed,\r\n files: Array.from(event.dataTransfer.files).map(f => f.name),\r\n items: Array.from(event.dataTransfer.items).map(i => ({ kind: i.kind, type: i.type })),\r\n types: event.dataTransfer.types\r\n } : null,\r\n };\r\n}\r\n\r\nfunction isTimeBasedInput(element: Element): element is HTMLInputElement {\r\n return timeBasedInputs.indexOf(element.getAttribute(\"type\")!) !== -1;\r\n}\r\n\r\nconst timeBasedInputs = [\"date\", \"datetime-local\", \"month\", \"time\", \"week\"];\r\n\r\nfunction normalizeTimeBasedValue(element: HTMLInputElement): string {\r\n const value = element.value;\r\n const type = element.type;\r\n switch (type) {\r\n case \"date\":\r\n case \"month\":\r\n return value;\r\n case \"datetime-local\":\r\n return value.length === 16 ? value + \":00\" : value; // Convert yyyy-MM-ddTHH:mm to yyyy-MM-ddTHH:mm:00\r\n case \"time\":\r\n return value.length === 5 ? value + \":00\" : value; // Convert hh:mm to hh:mm:00\r\n case \"week\":\r\n // For now we are not going to normalize input type week as it is not trivial\r\n return value;\r\n }\r\n\r\n throw new Error(`Invalid element type '${type}'.`);\r\n}\r\n\r\nfunction isMultipleSelectInput(element: Element): element is HTMLSelectElement {\r\n return (\r\n element instanceof HTMLSelectElement && element.type === \"select-multiple\"\r\n );\r\n}\r\n\r\nfunction isCheckbox(element: Element | null): boolean {\r\n return (\r\n !!element &&\r\n element.tagName === \"INPUT\" &&\r\n element.getAttribute(\"type\") === \"checkbox\"\r\n );\r\n}\r\n","import { getEventTarget } from \"../utils/helper\";\r\nimport { parseDragEvent, parseMouseEvent, parseTouchEvent } from \"./EventType\";\r\n\r\nexport function registerExtraMouseEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: e => createSharedEventArgs(\"mouse\", e)\r\n })\r\n }\r\n}\r\n\r\nexport function registerExtraTouchEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: e => createSharedEventArgs(\"touch\", e)\r\n })\r\n }\r\n}\r\n\r\nexport function registerExtraDropEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: (e: DragEvent) => {\r\n const eventArgs = parseDragEvent(e);\r\n const value = e.dataTransfer.getData('data-value');\r\n const offsetX = e.dataTransfer.getData('offsetX');\r\n const offsetY = e.dataTransfer.getData('offsetY');\r\n\r\n eventArgs.dataTransfer['data'] = {\r\n value,\r\n offsetX: Number(offsetX),\r\n offsetY: Number(offsetY)\r\n }\r\n\r\n return eventArgs;\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function createSharedEventArgs(type: \"mouse\" | \"touch\", e: Event,) {\r\n let args = { target: {} }\r\n if (type === 'mouse') {\r\n args = {\r\n ...args,\r\n ...parseMouseEvent(e as MouseEvent)\r\n }\r\n } else if (type === 'touch') {\r\n args = {\r\n ...args,\r\n ...parseTouchEvent(e as TouchEvent)\r\n }\r\n }\r\n\r\n args.target = getEventTarget(e.target);\r\n\r\n return args;\r\n}","import { createSharedEventArgs } from \"events/extra\";\r\nimport { addOnceEventListener, passiveSupported } from \"utils/helper\";\r\n\r\nlet sliderHandleId = 0;\r\nconst sliderHandlesById = {};\r\n\r\nexport function registerSliderEvents(\r\n el: HTMLElement,\r\n dotnetHelper: DotNet.DotNetObject\r\n) {\r\n sliderHandlesById[sliderHandleId] = onSliderMouseDown;\r\n\r\n const app = document.querySelector(\"[data-app]\");\r\n\r\n const mouseUpOptions = passiveSupported\r\n ? { passive: true, capture: true }\r\n : true;\r\n\r\n const mouseMoveOptions = passiveSupported ? { passive: true } : false;\r\n\r\n el.addEventListener(\"mousedown\", onSliderMouseDown);\r\n el.addEventListener(\"touchstart\", onSliderMouseDown);\r\n\r\n return sliderHandleId++;\r\n\r\n async function onSliderMouseDown(e: MouseEvent | TouchEvent) {\r\n const isTouchEvent = \"touches\" in e;\r\n\r\n onMouseMove(e);\r\n\r\n app.addEventListener(\r\n isTouchEvent ? \"touchmove\" : \"mousemove\",\r\n onMouseMove,\r\n mouseMoveOptions\r\n );\r\n addOnceEventListener(\r\n app,\r\n isTouchEvent ? \"touchend\" : \"mouseup\",\r\n onSliderMouseUp,\r\n mouseUpOptions\r\n );\r\n\r\n if (isTouchEvent) {\r\n await dotnetHelper.invokeMethodAsync(\r\n \"OnTouchStartInternal\",\r\n createSharedEventArgs(\"touch\", e)\r\n );\r\n } else {\r\n await dotnetHelper.invokeMethodAsync(\r\n \"OnMouseDownInternal\",\r\n createSharedEventArgs(\"mouse\", e)\r\n );\r\n }\r\n }\r\n\r\n async function onSliderMouseUp(e: Event) {\r\n e.stopPropagation();\r\n\r\n app.removeEventListener(\"touchmove\", onMouseMove, mouseMoveOptions as any);\r\n app.removeEventListener(\"mousemove\", onMouseMove, mouseMoveOptions as any);\r\n\r\n await dotnetHelper.invokeMethodAsync(\"OnMouseUpInternal\");\r\n }\r\n\r\n async function onMouseMove(e: MouseEvent | TouchEvent) {\r\n const isTouchEvent = \"touches\" in e;\r\n const payload = {\r\n type: e.type,\r\n clientX: isTouchEvent ? e.touches[0].clientX : e.clientX,\r\n clientY: isTouchEvent ? e.touches[0].clientY : e.clientY,\r\n };\r\n\r\n await dotnetHelper.invokeMethodAsync(\"OnMouseMoveInternal\", payload);\r\n }\r\n}\r\n\r\nexport function unregisterSliderEvents(el: HTMLElement, id: number) {\r\n const onSliderMouseDown = sliderHandlesById[id];\r\n el.removeEventListener(\"mousedown\", onSliderMouseDown);\r\n el.removeEventListener(\"touchstart\", onSliderMouseDown);\r\n\r\n delete sliderHandlesById[id];\r\n}\r\n","var functionDebounce = debounce;\n\nfunction debounce(fn, wait, callFirst) {\n var timeout = null;\n var debouncedFn = null;\n\n var clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n\n debouncedFn = null;\n timeout = null;\n }\n };\n\n var flush = function() {\n var call = debouncedFn;\n clear();\n\n if (call) {\n call();\n }\n };\n\n var debounceWrapper = function() {\n if (!wait) {\n return fn.apply(this, arguments);\n }\n\n var context = this;\n var args = arguments;\n var callNow = callFirst && !timeout;\n clear();\n\n debouncedFn = function() {\n fn.apply(context, args);\n };\n\n timeout = setTimeout(function() {\n timeout = null;\n\n if (!callNow) {\n var call = debouncedFn;\n debouncedFn = null;\n\n return call();\n }\n }, wait);\n\n if (callNow) {\n return debouncedFn();\n }\n };\n\n debounceWrapper.cancel = clear;\n debounceWrapper.flush = flush;\n\n return debounceWrapper;\n}\n\nexport {functionDebounce as default};\n","var functionThrottle = throttle;\n\nfunction throttle(fn, interval, options) {\n var timeoutId = null;\n var throttledFn = null;\n var leading = (options && options.leading);\n var trailing = (options && options.trailing);\n\n if (leading == null) {\n leading = true; // default\n }\n\n if (trailing == null) {\n trailing = !leading; //default\n }\n\n if (leading == true) {\n trailing = false; // forced because there should be invocation per call\n }\n\n var cancel = function() {\n if (timeoutId) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n };\n\n var flush = function() {\n var call = throttledFn;\n cancel();\n\n if (call) {\n call();\n }\n };\n\n var throttleWrapper = function() {\n var callNow = leading && !timeoutId;\n var context = this;\n var args = arguments;\n\n throttledFn = function() {\n return fn.apply(context, args);\n };\n\n if (!timeoutId) {\n timeoutId = setTimeout(function() {\n timeoutId = null;\n\n if (trailing) {\n return throttledFn();\n }\n }, interval);\n }\n\n if (callNow) {\n callNow = false;\n return throttledFn();\n }\n };\n\n throttleWrapper.cancel = cancel;\n throttleWrapper.flush = flush;\n\n return throttleWrapper;\n}\n\nexport {functionThrottle as default};\n","import { registerExtraDropEvent, registerExtraMouseEvent, registerExtraTouchEvent } from \"./extra\";\r\n\r\nexport function registerExtraEvents() {\r\n registerExtraMouseEvent(\"exmousedown\", \"mousedown\");\r\n registerExtraMouseEvent(\"exmouseup\", \"mouseup\");\r\n registerExtraMouseEvent(\"exclick\", \"click\");\r\n registerExtraMouseEvent(\"exmouseleave\", \"mouseleave\");\r\n registerExtraMouseEvent(\"exmouseenter\", \"mouseenter\");\r\n registerExtraMouseEvent(\"exmousemove\", \"mousemove\");\r\n registerExtraTouchEvent(\"extouchstart\", \"touchstart\");\r\n registerEvent(\"transitionend\", \"transitionend\")\r\n registerExtraDropEvent(\"exdrop\", \"drop\");\r\n}\r\n\r\nfunction registerEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n })\r\n }\r\n}","import { keyCodes } from \"utils/helper\";\r\n\r\ntype RippleEvent = (MouseEvent | TouchEvent | KeyboardEvent) & {\r\n rippleStop?: boolean;\r\n};\r\n\r\nconst DELAY_RIPPLE = 80;\r\n\r\nfunction transform(el: HTMLElement, value: string) {\r\n el.style.transform = value;\r\n el.style.webkitTransform = value;\r\n}\r\n\r\nexport interface RippleOptions {\r\n class?: string;\r\n center?: boolean;\r\n circle?: boolean;\r\n}\r\n\r\nfunction isTouchEvent(e: RippleEvent): e is TouchEvent {\r\n return e.constructor.name === \"TouchEvent\";\r\n}\r\n\r\nfunction isKeyboardEvent(e: RippleEvent): e is KeyboardEvent {\r\n return e.constructor.name === \"KeyboardEvent\";\r\n}\r\n\r\nconst calculate = (\r\n e: RippleEvent,\r\n el: HTMLElement,\r\n value: RippleOptions = {}\r\n) => {\r\n let localX = 0;\r\n let localY = 0;\r\n\r\n if (!isKeyboardEvent(e)) {\r\n const offset = el.getBoundingClientRect();\r\n const target = isTouchEvent(e) ? e.touches[e.touches.length - 1] : e;\r\n\r\n localX = target.clientX - offset.left;\r\n localY = target.clientY - offset.top;\r\n }\r\n\r\n let radius = 0;\r\n let scale = 0.3;\r\n if (el._ripple && el._ripple.circle) {\r\n scale = 0.15;\r\n radius = el.clientWidth / 2;\r\n radius = value.center\r\n ? radius\r\n : radius + Math.sqrt((localX - radius) ** 2 + (localY - radius) ** 2) / 4;\r\n } else {\r\n radius = Math.sqrt(el.clientWidth ** 2 + el.clientHeight ** 2) / 2;\r\n }\r\n\r\n const centerX = `${(el.clientWidth - radius * 2) / 2}px`;\r\n const centerY = `${(el.clientHeight - radius * 2) / 2}px`;\r\n\r\n const x = value.center ? centerX : `${localX - radius}px`;\r\n const y = value.center ? centerY : `${localY - radius}px`;\r\n\r\n return { radius, scale, x, y, centerX, centerY };\r\n};\r\n\r\nconst ripples = {\r\n /* eslint-disable max-statements */\r\n show(e: RippleEvent, el: HTMLElement, value: RippleOptions = {}) {\r\n if (!el._ripple || !el._ripple.enabled) {\r\n return;\r\n }\r\n\r\n const container = document.createElement(\"span\");\r\n const animation = document.createElement(\"span\");\r\n\r\n container.appendChild(animation);\r\n container.className = \"m-ripple__container\";\r\n\r\n if (value.class) {\r\n container.className += ` ${value.class}`;\r\n }\r\n\r\n const { radius, scale, x, y, centerX, centerY } = calculate(e, el, value);\r\n\r\n const size = `${radius * 2}px`;\r\n animation.className = \"m-ripple__animation\";\r\n animation.style.width = size;\r\n animation.style.height = size;\r\n\r\n el.appendChild(container);\r\n\r\n const computed = window.getComputedStyle(el);\r\n if (computed && computed.position === \"static\") {\r\n el.style.position = \"relative\";\r\n el.dataset.previousPosition = \"static\";\r\n }\r\n\r\n animation.classList.add(\"m-ripple__animation--enter\");\r\n animation.classList.add(\"m-ripple__animation--visible\");\r\n transform(\r\n animation,\r\n `translate(${x}, ${y}) scale3d(${scale},${scale},${scale})`\r\n );\r\n animation.dataset.activated = String(performance.now());\r\n\r\n setTimeout(() => {\r\n animation.classList.remove(\"m-ripple__animation--enter\");\r\n animation.classList.add(\"m-ripple__animation--in\");\r\n transform(animation, `translate(${centerX}, ${centerY}) scale3d(1,1,1)`);\r\n }, 0);\r\n },\r\n\r\n hide(el: HTMLElement | null) {\r\n if (!el || !el._ripple || !el._ripple.enabled) return;\r\n\r\n const ripples = el.getElementsByClassName(\"m-ripple__animation\");\r\n\r\n if (ripples.length === 0) return;\r\n const animation = ripples[ripples.length - 1];\r\n\r\n if (animation.dataset.isHiding) return;\r\n else animation.dataset.isHiding = \"true\";\r\n\r\n const diff = performance.now() - Number(animation.dataset.activated);\r\n const delay = Math.max(250 - diff, 0);\r\n\r\n setTimeout(() => {\r\n animation.classList.remove(\"m-ripple__animation--in\");\r\n animation.classList.add(\"m-ripple__animation--out\");\r\n\r\n setTimeout(() => {\r\n const ripples = el.getElementsByClassName(\"m-ripple__animation\");\r\n if (ripples.length === 1 && el.dataset.previousPosition) {\r\n el.style.position = el.dataset.previousPosition;\r\n delete el.dataset.previousPosition;\r\n }\r\n\r\n if (animation.parentNode?.parentNode === el)\r\n el.removeChild(animation.parentNode);\r\n }, 300);\r\n }, delay);\r\n },\r\n};\r\n\r\nfunction rippleShow(e: RippleEvent) {\r\n const value: RippleOptions = {};\r\n const element = e.currentTarget as HTMLElement;\r\n\r\n if (!element || !element._ripple || element._ripple.touched || e.rippleStop)\r\n return;\r\n\r\n // Don't allow the event to trigger ripples on any other elements\r\n e.rippleStop = true;\r\n\r\n if (isTouchEvent(e)) {\r\n element._ripple.touched = true;\r\n element._ripple.isTouch = true;\r\n } else {\r\n // It's possible for touch events to fire\r\n // as mouse events on Android/iOS, this\r\n // will skip the event call if it has\r\n // already been registered as touch\r\n if (element._ripple.isTouch) return;\r\n }\r\n value.center = element._ripple.centered || isKeyboardEvent(e);\r\n if (element._ripple.class) {\r\n value.class = element._ripple.class;\r\n }\r\n\r\n if (isTouchEvent(e)) {\r\n // already queued that shows or hides the ripple\r\n if (element._ripple.showTimerCommit) return;\r\n\r\n element._ripple.showTimerCommit = () => {\r\n ripples.show(e, element, value);\r\n };\r\n element._ripple.showTimer = window.setTimeout(() => {\r\n if (element && element._ripple && element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit();\r\n element._ripple.showTimerCommit = null;\r\n }\r\n }, DELAY_RIPPLE);\r\n } else {\r\n ripples.show(e, element, value);\r\n }\r\n}\r\n\r\nfunction rippleHide(e: Event) {\r\n const element = e.currentTarget as HTMLElement | null;\r\n if (!element || !element._ripple) return;\r\n\r\n window.clearTimeout(element._ripple.showTimer);\r\n\r\n // The touch interaction occurs before the show timer is triggered.\r\n // We still want to show ripple effect.\r\n if (e.type === \"touchend\" && element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit();\r\n element._ripple.showTimerCommit = null;\r\n\r\n // re-queue ripple hiding\r\n var timerHandler: TimerHandler = () => rippleHide(e);\r\n element._ripple.showTimer = setTimeout(timerHandler);\r\n return;\r\n }\r\n\r\n window.setTimeout(() => {\r\n if (element._ripple) {\r\n element._ripple.touched = false;\r\n }\r\n });\r\n ripples.hide(element);\r\n}\r\n\r\nfunction rippleCancelShow(e: MouseEvent | TouchEvent) {\r\n const element = e.currentTarget as HTMLElement | undefined;\r\n\r\n if (!element || !element._ripple) return;\r\n\r\n if (element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit = null;\r\n }\r\n\r\n window.clearTimeout(element._ripple.showTimer);\r\n}\r\n\r\nfunction keyboardRippleShow(e: KeyboardEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n if (\r\n !target[\"keyboardRipple\"] &&\r\n (e.keyCode === keyCodes.enter || e.keyCode === keyCodes.space)\r\n ) {\r\n target[\"keyboardRipple\"] = true;\r\n rippleShow(e);\r\n }\r\n}\r\n\r\nfunction keyboardRippleHide(e: KeyboardEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n target[\"keyboardRipple\"] = false;\r\n rippleHide(e);\r\n}\r\n\r\nfunction focusRippleHide(e: FocusEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n if (target[\"keyboardRipple\"] === true) {\r\n target[\"keyboardRipple\"] = false;\r\n rippleHide(e);\r\n }\r\n}\r\nexport function updateRipple(\r\n el: HTMLElement,\r\n options: RippleOptions | null,\r\n wasEnabled: boolean\r\n) {\r\n let enabled = false;\r\n if (options) {\r\n enabled = true;\r\n } else {\r\n ripples.hide(el);\r\n }\r\n\r\n const value = options || {};\r\n el._ripple = el._ripple || {};\r\n el._ripple.enabled = enabled;\r\n el._ripple = {\r\n ...el._ripple,\r\n centered: value.center,\r\n class: value.class,\r\n circle: value.circle,\r\n };\r\n\r\n if (enabled && !wasEnabled) {\r\n el.addEventListener(\"touchstart\", rippleShow, { passive: true });\r\n el.addEventListener(\"touchend\", rippleHide, { passive: true });\r\n el.addEventListener(\"touchmove\", rippleCancelShow, { passive: true });\r\n el.addEventListener(\"touchcancel\", rippleHide);\r\n\r\n el.addEventListener(\"mousedown\", rippleShow);\r\n el.addEventListener(\"mouseup\", rippleHide);\r\n el.addEventListener(\"mouseleave\", rippleHide);\r\n\r\n el.addEventListener(\"keydown\", keyboardRippleShow);\r\n el.addEventListener(\"keyup\", keyboardRippleHide);\r\n\r\n el.addEventListener(\"blur\", focusRippleHide);\r\n\r\n // Anchor tags can be dragged, causes other hides to fail - #1537\r\n el.addEventListener(\"dragstart\", rippleHide, { passive: true });\r\n } else if (!enabled && wasEnabled) {\r\n removeListeners(el);\r\n }\r\n}\r\n\r\nexport function removeListeners(el: HTMLElement) {\r\n el.removeEventListener(\"mousedown\", rippleShow);\r\n el.removeEventListener(\"touchstart\", rippleShow);\r\n el.removeEventListener(\"touchend\", rippleHide);\r\n el.removeEventListener(\"touchmove\", rippleCancelShow);\r\n el.removeEventListener(\"touchcancel\", rippleHide);\r\n el.removeEventListener(\"mouseup\", rippleHide);\r\n el.removeEventListener(\"mouseleave\", rippleHide);\r\n el.removeEventListener(\"keydown\", keyboardRippleShow);\r\n el.removeEventListener(\"keyup\", keyboardRippleHide);\r\n el.removeEventListener(\"dragstart\", rippleHide);\r\n el.removeEventListener(\"blur\", focusRippleHide);\r\n el._ripple.enabled = false;\r\n}\r\n","import debounceIt from \"just-debounce-it\";\r\nimport throttle from \"just-throttle\";\r\n\r\nimport { parseDragEvent, parseTouchEvent, touchEvents } from \"./events/EventType\";\r\nimport { registerExtraEvents } from \"./events/index\";\r\nimport registerRippleObserver from \"./ripple\";\r\nimport { canUseDom, getBlazorId, getDom, getElementSelector } from \"./utils/helper\";\r\n\r\nwindow.onload = function () {\r\n registerExtraEvents();\r\n registerPasteWithData(\"pastewithdata\")\r\n registerRippleObserver();\r\n}\r\n\r\nexport function getZIndex(el?: Element | null): number {\r\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return 0\r\n\r\n const index = +window.getComputedStyle(el).getPropertyValue('z-index')\r\n\r\n if (!index) return getZIndex(el.parentNode as Element)\r\n return index\r\n}\r\n\r\nexport function getDomInfo(element, selector = \"body\") {\r\n var result = {};\r\n\r\n var dom = getDom(element);\r\n\r\n if (dom) {\r\n if (dom.style && dom.style[\"display\"] === \"none\") {\r\n // clone and set display not none because\r\n // element with display:none can not get the dom info\r\n var cloned = dom.cloneNode(true) as HTMLElement;\r\n cloned.style[\"display\"] = \"inline-block\";\r\n cloned.style[\"z-index\"] = -1000;\r\n dom.parentElement.appendChild(cloned);\r\n\r\n result = getDomInfoObj(cloned);\r\n\r\n dom.parentElement.removeChild(cloned);\r\n } else {\r\n result = getDomInfoObj(dom);\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\nfunction getDomInfoObj(dom) {\r\n var result = {};\r\n result[\"offsetTop\"] = dom.offsetTop || 0;\r\n result[\"offsetLeft\"] = dom.offsetLeft || 0;\r\n result[\"scrollHeight\"] = dom.scrollHeight || 0;\r\n result[\"scrollWidth\"] = dom.scrollWidth || 0;\r\n result[\"scrollLeft\"] = dom.scrollLeft || 0;\r\n result[\"scrollTop\"] = dom.scrollTop || 0;\r\n result[\"clientTop\"] = dom.clientTop || 0;\r\n result[\"clientLeft\"] = dom.clientLeft || 0;\r\n result[\"clientHeight\"] = dom.clientHeight || 0;\r\n result[\"clientWidth\"] = dom.clientWidth || 0;\r\n var position = getElementPos(dom);\r\n result[\"offsetWidth\"] = Math.round(position.offsetWidth) || 0;\r\n result[\"offsetHeight\"] = Math.round(position.offsetHeight) || 0;\r\n result[\"relativeTop\"] = Math.round(position.relativeTop) || 0;\r\n result[\"relativeBottom\"] = Math.round(position.relativeBottom) || 0;\r\n result[\"relativeLeft\"] = Math.round(position.relativeLeft) || 0;\r\n result[\"relativeRight\"] = Math.round(position.relativeRight) || 0;\r\n result[\"absoluteLeft\"] = Math.round(position.absoluteLeft) || 0;\r\n result[\"absoluteTop\"] = Math.round(position.absoluteTop) || 0;\r\n return result;\r\n}\r\n\r\nfunction getElementPos(element) {\r\n var res: any = new Object();\r\n res.x = 0;\r\n res.y = 0;\r\n if (element !== null) {\r\n if (element.getBoundingClientRect) {\r\n var viewportElement = document.documentElement;\r\n var box = element.getBoundingClientRect();\r\n var scrollLeft = viewportElement.scrollLeft;\r\n var scrollTop = viewportElement.scrollTop;\r\n\r\n res.offsetWidth = box.width;\r\n res.offsetHeight = box.height;\r\n res.relativeTop = box.top;\r\n res.relativeBottom = box.bottom;\r\n res.relativeLeft = box.left;\r\n res.relativeRight = box.right;\r\n res.absoluteLeft = box.left + scrollLeft;\r\n res.absoluteTop = box.top + scrollTop;\r\n }\r\n }\r\n return res;\r\n}\r\n\r\nexport function triggerEvent(element, eventType, eventName, stopPropagation) {\r\n var dom = getDom(element);\r\n var evt = document.createEvent(eventType);\r\n evt.initEvent(eventName);\r\n\r\n if (stopPropagation) {\r\n evt.stopPropagation();\r\n }\r\n\r\n return dom.dispatchEvent(evt);\r\n}\r\n\r\nexport function setProperty(element, name, value) {\r\n var dom = getDom(element);\r\n dom[name] = value;\r\n}\r\n\r\nexport function getBoundingClientRect(element, attach = \"body\") {\r\n let dom = getDom(element);\r\n\r\n var result = {};\r\n\r\n if (dom && dom.getBoundingClientRect) {\r\n if (dom.style && dom.style[\"display\"] === \"none\") {\r\n var cloned = dom.cloneNode(true) as HTMLElement;\r\n cloned.style[\"display\"] = \"inline-block\";\r\n cloned.style[\"z-index\"] = -1000;\r\n document.querySelector(attach)?.appendChild(cloned);\r\n\r\n result = cloned.getBoundingClientRect();\r\n\r\n document.querySelector(attach)?.removeChild(cloned);\r\n } else {\r\n result = dom.getBoundingClientRect();\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\nvar htmlElementEventListenerConfigs: { [prop: string]: HtmlElementEventListenerConfig[] } = {}\r\n\r\ntype HtmlElementEventListenerConfig = {\r\n listener?: (args: any) => void;\r\n options?: any;\r\n handle?: DotNet.DotNetObject;\r\n}\r\n\r\nexport function addHtmlElementEventListener(\r\n selector: \"window\" | \"document\" | K,\r\n type: string,\r\n invoker: DotNet.DotNetObject,\r\n options?: boolean | AddEventListenerOptions,\r\n extras?: Partial> & { relatedTarget?: string, throttle?: number, debounce?: number, key?: string }) {\r\n let htmlElement: HTMLElement | Window\r\n\r\n if (selector == \"window\") {\r\n htmlElement = window;\r\n } else if (selector == \"document\") {\r\n htmlElement = document.documentElement;\r\n } else {\r\n htmlElement = document.querySelector(selector);\r\n }\r\n\r\n var key = extras?.key || `${selector}:${type}`;\r\n\r\n //save for remove\r\n const config: HtmlElementEventListenerConfig = {};\r\n\r\n var listener = (e: any): void => {\r\n if (extras?.stopPropagation) {\r\n e.stopPropagation();\r\n }\r\n\r\n if ((typeof e.cancelable !== \"boolean\" || e.cancelable) && extras?.preventDefault) {\r\n e.preventDefault();\r\n }\r\n\r\n // mouseleave relatedTarget\r\n if (extras?.relatedTarget && document.querySelector(extras.relatedTarget)?.contains(e.relatedTarget)) {\r\n return;\r\n }\r\n\r\n let obj: any = {}\r\n\r\n if (touchEvents.includes(e.type)) {\r\n obj = parseTouchEvent(e)\r\n } else {\r\n for (var k in e) {\r\n if (typeof e[k] == 'string' || typeof e[k] == 'number') {\r\n obj[k] = e[k];\r\n }\r\n }\r\n }\r\n\r\n if (e.target && e.target !== window && e.target !== document) {\r\n obj.target = {}\r\n const target = e.target as HTMLElement;\r\n const elementReferenceId = target.getAttributeNames().find(a => a.startsWith('_bl_'));\r\n if (elementReferenceId) {\r\n obj.target['elementReferenceId'] = elementReferenceId\r\n obj.target['selector'] = `[${elementReferenceId}]`\r\n } else {\r\n obj.target['selector'] = getElementSelector(target)\r\n }\r\n\r\n obj.target['class'] = target.getAttribute('class')\r\n }\r\n\r\n invoker.invokeMethodAsync('Invoke', obj);\r\n };\r\n\r\n if (extras?.debounce && extras.debounce > 0) {\r\n config.listener = debounceIt(listener, extras.debounce)\r\n } else if (extras?.throttle && extras.throttle > 0) {\r\n config.listener = throttle(listener, extras.throttle, { trailing: true })\r\n } else {\r\n config.listener = listener;\r\n }\r\n\r\n config.options = options;\r\n config.handle = invoker\r\n\r\n if (htmlElementEventListenerConfigs[key]) {\r\n htmlElementEventListenerConfigs[key].push(config);\r\n } else {\r\n htmlElementEventListenerConfigs[key] = [config]\r\n }\r\n\r\n if (htmlElement) {\r\n htmlElement.addEventListener(type, config.listener, config.options);\r\n }\r\n}\r\n\r\nexport function removeHtmlElementEventListener(selector, type, k?: string) {\r\n let htmlElement: any\r\n\r\n if (selector == \"window\") {\r\n htmlElement = window;\r\n } else if (selector == \"document\") {\r\n htmlElement = document.documentElement;\r\n } else {\r\n htmlElement = document.querySelector(selector);\r\n }\r\n\r\n var k = k || `${selector}:${type}`;\r\n\r\n var configs = htmlElementEventListenerConfigs[k];\r\n\r\n if (configs) {\r\n configs.forEach(item => {\r\n item.handle.dispose();\r\n htmlElement?.removeEventListener(type, item.listener, item.options);\r\n });\r\n\r\n htmlElementEventListenerConfigs[k] = []\r\n }\r\n}\r\n\r\nexport function addMouseleaveEventListener(selector) {\r\n var htmlElement = document.querySelector(selector);\r\n if (htmlElement) {\r\n htmlElement.addEventListener()\r\n }\r\n}\r\n\r\nexport function contains(e1, e2) {\r\n const dom1 = getDom(e1);\r\n if (dom1 && dom1.contains) {\r\n return dom1.contains(getDom(e2));\r\n }\r\n return false;\r\n}\r\n\r\nexport function equalsOrContains(e1: any, e2: any) {\r\n const dom1 = getDom(e1);\r\n const dom2 = getDom(e2);\r\n return !!dom1 && dom1.contains && !!dom2 && (dom1 == dom2 || dom1.contains(dom2));\r\n}\r\n\r\nfunction fallbackCopyTextToClipboard(text) {\r\n var textArea = document.createElement(\"textarea\");\r\n textArea.value = text;\r\n\r\n // Avoid scrolling to bottom\r\n textArea.style.top = \"0\";\r\n textArea.style.left = \"0\";\r\n textArea.style.position = \"fixed\";\r\n\r\n document.body.appendChild(textArea);\r\n textArea.focus();\r\n textArea.select();\r\n\r\n try {\r\n var successful = document.execCommand('copy');\r\n var msg = successful ? 'successful' : 'unsuccessful';\r\n console.log('Fallback: Copying text command was ' + msg);\r\n } catch (err) {\r\n console.error('Fallback: Oops, unable to copy', err);\r\n }\r\n\r\n document.body.removeChild(textArea);\r\n}\r\n\r\nexport function copy(text) {\r\n if (!navigator.clipboard) {\r\n fallbackCopyTextToClipboard(text);\r\n return;\r\n }\r\n navigator.clipboard.writeText(text).then(function () {\r\n console.log('Async: Copying to clipboard was successful!');\r\n }, function (err) {\r\n console.error('Async: Could not copy text: ', err);\r\n });\r\n}\r\n\r\nexport function focus(selector, noScroll: boolean = false) {\r\n let dom = getDom(selector);\r\n if (!(dom instanceof HTMLElement))\r\n throw new Error(\"Unable to focus an invalid element.\");\r\n dom.focus({\r\n preventScroll: noScroll\r\n })\r\n}\r\n\r\nexport function select(selector) {\r\n let dom = getDom(selector);\r\n if (!(dom instanceof HTMLInputElement || dom instanceof HTMLTextAreaElement))\r\n throw new Error(\"Unable to select an invalid element\")\r\n dom.select()\r\n}\r\n\r\nexport function hasFocus(selector) {\r\n let dom = getDom(selector);\r\n return (document.activeElement === dom);\r\n}\r\n\r\nexport function blur(selector) {\r\n let dom = getDom(selector);\r\n dom.blur();\r\n}\r\n\r\nexport function log(text) {\r\n console.log(text);\r\n}\r\n\r\nexport function scrollIntoView(target, arg?: boolean | ScrollIntoViewOptions) {\r\n let dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n if (arg === null || arg == undefined) {\r\n dom.scrollIntoView();\r\n } else if (typeof arg === 'boolean') {\r\n dom.scrollIntoView(arg);\r\n } else {\r\n dom.scrollIntoView({\r\n block: arg.block == null ? undefined : arg.block,\r\n inline: arg.inline == null ? undefined : arg.inline,\r\n behavior: arg.behavior\r\n })\r\n }\r\n }\r\n}\r\n\r\nexport function scrollIntoParentView(\r\n target,\r\n inline = false,\r\n start = false,\r\n level = 1,\r\n behavior: ScrollBehavior = \"smooth\",\r\n) {\r\n const dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n let parent: HTMLElement = dom;\r\n while (level > 0) {\r\n parent = parent.parentElement;\r\n level--;\r\n if (!parent) {\r\n return;\r\n }\r\n }\r\n\r\n const options: ScrollToOptions = {\r\n behavior,\r\n };\r\n\r\n if (inline) {\r\n if (start) {\r\n options.left = dom.offsetLeft\r\n } else {\r\n const to = dom.offsetLeft - parent.offsetLeft;\r\n if (to - parent.scrollLeft < 0) {\r\n options.left = to;\r\n } else if (\r\n to + dom.offsetWidth - parent.scrollLeft >\r\n parent.offsetWidth\r\n ) {\r\n options.left = to + dom.offsetWidth - parent.offsetWidth;\r\n }\r\n }\r\n } else {\r\n if (start) {\r\n options.top = dom.offsetTop;\r\n } else {\r\n const to = dom.offsetTop - parent.offsetTop;\r\n if (to - parent.scrollTop < 0) {\r\n options.top = to;\r\n } else if (\r\n to + dom.offsetHeight - parent.scrollTop >\r\n parent.offsetHeight\r\n ) {\r\n options.top = to + dom.offsetHeight - parent.offsetHeight;\r\n }\r\n }\r\n }\r\n\r\n if (options.left || options.top) {\r\n parent.scrollTo(options);\r\n }\r\n }\r\n}\r\n\r\nexport function scrollTo(target, options: ScrollToOptions) {\r\n let dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n const o = {\r\n left: options.left === null ? undefined : options.left,\r\n top: options.top === null ? undefined : options.top,\r\n behavior: options.behavior\r\n }\r\n dom.scrollTo(o)\r\n }\r\n}\r\n\r\nexport function scrollToElement(target, offset: number, behavior?: ScrollBehavior) {\r\n const dom = getDom(target)\r\n if (!dom) return;\r\n const domPosition = dom.getBoundingClientRect().top;\r\n const offsetPosition = domPosition + window.pageYOffset - offset;\r\n window.scrollTo({\r\n top: offsetPosition,\r\n behavior: behavior\r\n })\r\n}\r\n\r\nexport function scrollToActiveElement(\r\n container,\r\n element = \".active\",\r\n position: \"center\" | number = \"center\"\r\n) {\r\n let containerEl: HTMLElement = getDom(container);\r\n\r\n let activeEl: HTMLElement\r\n if (typeof element === 'string') {\r\n activeEl = container.querySelector(element)\r\n }\r\n\r\n if (!containerEl || !activeEl) {\r\n return;\r\n }\r\n\r\n if (position === 'center') {\r\n containerEl.scrollTop = activeEl.offsetTop - containerEl.offsetHeight / 2 + activeEl.offsetHeight / 2;\r\n }\r\n else {\r\n containerEl.scrollTop = activeEl.offsetTop - position\r\n }\r\n}\r\n\r\nexport function addClsToFirstChild(element, className) {\r\n var dom = getDom(element);\r\n if (dom.firstElementChild) {\r\n dom.firstElementChild.classList.add(className);\r\n }\r\n}\r\n\r\nexport function removeClsFromFirstChild(element, className) {\r\n var dom = getDom(element);\r\n if (dom.firstElementChild) {\r\n dom.firstElementChild.classList.remove(className);\r\n }\r\n}\r\n\r\nexport function getAbsoluteTop(e) {\r\n var offset = e.offsetTop;\r\n if (e.offsetParent != null) {\r\n offset += getAbsoluteTop(e.offsetParent);\r\n }\r\n return offset;\r\n}\r\n\r\nexport function getAbsoluteLeft(e) {\r\n var offset = e.offsetLeft;\r\n if (e.offsetParent != null) {\r\n offset += getAbsoluteLeft(e.offsetParent);\r\n }\r\n return offset;\r\n}\r\n\r\nexport function addElementToBody(element) {\r\n document.body.appendChild(element);\r\n}\r\n\r\nexport function delElementFromBody(element) {\r\n document.body.removeChild(element);\r\n}\r\n\r\nexport function addElementTo(addElement, elementSelector) {\r\n let parent = getDom(elementSelector);\r\n if (parent && addElement) {\r\n parent.appendChild(addElement);\r\n }\r\n}\r\n\r\nexport function delElementFrom(delElement, elementSelector) {\r\n let parent = getDom(elementSelector);\r\n if (parent && delElement) {\r\n parent.removeChild(delElement);\r\n }\r\n}\r\n\r\nexport function getActiveElement() {\r\n let element = document.activeElement;\r\n let id = element.getAttribute(\"id\") || \"\";\r\n return id;\r\n}\r\n\r\nexport function focusDialog(selector: string, count: number = 0) {\r\n let ele = document.querySelector(selector);\r\n if (ele && !ele.hasAttribute(\"disabled\")) {\r\n setTimeout(() => {\r\n ele.focus();\r\n let curId = \"#\" + getActiveElement();\r\n if (curId !== selector) {\r\n if (count < 10) {\r\n focusDialog(selector, count + 1);\r\n }\r\n }\r\n }, 10);\r\n }\r\n}\r\n\r\nexport function getWindow() {\r\n return {\r\n innerWidth: window.innerWidth,\r\n innerHeight: window.innerHeight,\r\n pageXOffset: window.pageXOffset,\r\n pageYOffset: window.pageYOffset,\r\n isTop: window.scrollY == 0,\r\n isBottom: (window.scrollY + window.innerHeight) == document.body.clientHeight\r\n };\r\n}\r\n\r\nexport function getWindowAndDocumentProps(windowProps: string[] = [], documentProps: string[] = []) {\r\n const obj = {}\r\n\r\n if (windowProps) {\r\n windowProps.forEach(prop => obj[prop] = window[prop]);\r\n }\r\n\r\n if (documentProps) {\r\n documentProps.forEach(prop => obj[prop] = document.documentElement[prop]);\r\n }\r\n\r\n return obj\r\n}\r\n\r\nfunction debounce(func, wait, immediate) {\r\n var timeout;\r\n return () => {\r\n const context = this, args = arguments;\r\n const later = () => {\r\n timeout = null;\r\n if (!immediate) func.apply(this, args);\r\n };\r\n const callNow = immediate && !timeout;\r\n clearTimeout(timeout);\r\n timeout = setTimeout(later, wait);\r\n if (callNow) func.apply(context, args);\r\n };\r\n};\r\n\r\nexport function css(element: any, name: string | object, value: string | null = null) {\r\n var dom = getDom(element);\r\n if (typeof name === 'string') {\r\n dom.style[name] = value;\r\n } else {\r\n for (let key in name) {\r\n if (name.hasOwnProperty(key)) {\r\n dom.style[key] = name[key];\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport function addCls(selector: Element | string, clsName: string | Array) {\r\n let element = getDom(selector);\r\n\r\n if (typeof clsName === \"string\") {\r\n element.classList.add(clsName);\r\n } else {\r\n element.classList.add(...clsName);\r\n }\r\n}\r\n\r\nexport function removeCls(selector: Element | string, clsName: string | Array) {\r\n let element = getDom(selector);\r\n\r\n if (typeof clsName === \"string\") {\r\n element.classList.remove(clsName);\r\n } else {\r\n element.classList.remove(...clsName);\r\n }\r\n}\r\n\r\nexport function elementScrollIntoView(selector: Element | string) {\r\n let element = getDom(selector);\r\n\r\n if (!element)\r\n return;\r\n\r\n element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });\r\n}\r\n\r\nconst hasScrollbar = () => {\r\n let overflow = document.body.style.overflow;\r\n if (overflow && overflow === \"hidden\") return false;\r\n return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight);\r\n}\r\n\r\nexport function getScroll() {\r\n return { x: window.pageXOffset, y: window.pageYOffset };\r\n}\r\n\r\nfunction isElement(node: Element) {\r\n const ELEMENT_NODE_TYPE = 1;\r\n return (\r\n node.tagName !== \"HTML\" &&\r\n node.tagName !== \"BODY\" &&\r\n node.nodeType == ELEMENT_NODE_TYPE\r\n )\r\n}\r\n\r\nexport function getScrollParent(el: Element | undefined, root: HTMLElement | Window | undefined = undefined) {\r\n root ??= canUseDom ? window : undefined;\r\n\r\n let node = el;\r\n while (node && node !== root && isElement(node)) {\r\n const { overflowY } = window.getComputedStyle(node);\r\n if (/scroll|auto|overlay/i.test(overflowY)) {\r\n return node;\r\n }\r\n\r\n node = node.parentNode as Element;\r\n }\r\n\r\n return root;\r\n}\r\n\r\nexport function getScrollTop(el: HTMLElement | Window): number {\r\n const top = 'scrollTop' in el ? el.scrollTop : el.pageYOffset;\r\n\r\n // iOS scroll bounce cause minus scrollTop\r\n return Math.max(top, 0);\r\n}\r\n\r\nexport function getInnerText(element) {\r\n let dom = getDom(element);\r\n return dom.innerText;\r\n}\r\n\r\nexport function getMenuOrDialogMaxZIndex(exclude: Element[] = [], element: Element) {\r\n const base = getDom(element);\r\n // Start with lowest allowed z-index or z-index of\r\n // base component's element, whichever is greater\r\n const zis = [getZIndex(base)]\r\n\r\n const activeElements = [\r\n ...document.getElementsByClassName('m-menu__content--active'),\r\n ...document.getElementsByClassName('m-dialog__content--active'),\r\n ]\r\n\r\n // Get z-index for all active dialogs\r\n for (let index = 0; index < activeElements.length; index++) {\r\n if (!exclude.includes(activeElements[index])) {\r\n zis.push(getZIndex(activeElements[index]))\r\n }\r\n }\r\n\r\n return Math.max(...zis)\r\n}\r\n\r\nexport function getMaxZIndex() {\r\n return [...document.all].reduce((r, e) => Math.max(r, +window.getComputedStyle(e).zIndex || 0), 0)\r\n}\r\n\r\nexport function getStyle(element, styleProp) {\r\n element = getDom(element);\r\n\r\n if (element.currentStyle) {\r\n return element.currentStyle[styleProp];\r\n } else if (window.getComputedStyle) {\r\n return document.defaultView.getComputedStyle(element, null).getPropertyValue(styleProp);\r\n }\r\n}\r\n\r\nexport function getTextAreaInfo(element) {\r\n var result = {};\r\n var dom = getDom(element);\r\n result[\"scrollHeight\"] = dom.scrollHeight || 0;\r\n\r\n if (element.currentStyle) {\r\n result[\"lineHeight\"] = parseFloat(element.currentStyle[\"line-height\"]);\r\n result[\"paddingTop\"] = parseFloat(element.currentStyle[\"padding-top\"]);\r\n result[\"paddingBottom\"] = parseFloat(element.currentStyle[\"padding-bottom\"]);\r\n result[\"borderBottom\"] = parseFloat(element.currentStyle[\"border-bottom\"]);\r\n result[\"borderTop\"] = parseFloat(element.currentStyle[\"border-top\"]);\r\n } else if (window.getComputedStyle) {\r\n result[\"lineHeight\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"line-height\"));\r\n result[\"paddingTop\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"padding-top\"));\r\n result[\"paddingBottom\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"padding-bottom\"));\r\n result[\"borderBottom\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"border-bottom\"));\r\n result[\"borderTop\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"border-top\"));\r\n }\r\n //Firefox can return this as NaN, so it has to be handled here like that.\r\n if (Object.is(NaN, result[\"borderTop\"]))\r\n result[\"borderTop\"] = 1;\r\n if (Object.is(NaN, result[\"borderBottom\"]))\r\n result[\"borderBottom\"] = 1;\r\n return result;\r\n}\r\n\r\nconst objReferenceDict = {};\r\n\r\nexport function disposeObj(objReferenceName) {\r\n delete objReferenceDict[objReferenceName];\r\n}\r\n\r\nexport function upsertThemeStyle(id: string, style: string) {\r\n const d = document.getElementById(id);\r\n if (d) {\r\n document.head.removeChild(d);\r\n }\r\n\r\n const d_style = document.createElement('style')\r\n d_style.id = id;\r\n d_style.type = \"text/css\";\r\n d_style.innerHTML = style;\r\n\r\n document.head.insertAdjacentElement('beforeend', d_style)\r\n}\r\n\r\nexport function getImageDimensions(src: string) {\r\n return new Promise(function (resolve, reject) {\r\n var img = new Image()\r\n img.src = src\r\n img.onload = function () {\r\n resolve({\r\n width: img.width,\r\n height: img.height,\r\n hasError: false\r\n })\r\n }\r\n img.onerror = function () {\r\n resolve({\r\n width: 0,\r\n height: 0,\r\n hasError: true\r\n })\r\n }\r\n })\r\n}\r\n\r\nexport function enablePreventDefaultForEvent(element: any, event: string, condition?: any) {\r\n const dom = getDom(element);\r\n if (!dom) return;\r\n if (event === 'keydown') {\r\n dom.addEventListener(event, (e: KeyboardEvent) => {\r\n if (Array.isArray(condition)) {\r\n var codes = condition as string[];\r\n if (codes.includes(e.code)) {\r\n e.preventDefault();\r\n }\r\n } else {\r\n e.preventDefault();\r\n }\r\n })\r\n } else {\r\n dom.addEventListener(event, e => {\r\n if (e.preventDefault) {\r\n e.preventDefault();\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function getBoundingClientRects(selector) {\r\n var elements = document.querySelectorAll(selector);\r\n\r\n var result = [];\r\n\r\n for (var i = 0; i < elements.length; i++) {\r\n var e: Element = elements[i];\r\n var dom = {\r\n id: e.id,\r\n rect: e.getBoundingClientRect()\r\n };\r\n result.push(dom);\r\n }\r\n\r\n return result;\r\n}\r\n\r\nexport function getSize(selectors, sizeProp) {\r\n var el = getDom(selectors);\r\n\r\n var display = el.style.display;\r\n var overflow = el.style.overflow;\r\n\r\n el.style.display = \"\";\r\n el.style.overflow = \"hidden\";\r\n\r\n var size = el[\"offset\" + sizeProp.charAt(0).toUpperCase() + sizeProp.slice(1)] || 0;\r\n\r\n el.style.display = display;\r\n el.style.overflow = overflow;\r\n\r\n return size;\r\n}\r\n\r\nexport function getProp(elOrString, name) {\r\n if (elOrString === 'window') {\r\n return window[name];\r\n }\r\n\r\n var el = getDom(elOrString);\r\n if (!el) {\r\n return null;\r\n }\r\n\r\n return el[name];\r\n}\r\n\r\nexport function updateWindowTransition(selectors, isActive, item) {\r\n var el: HTMLElement = getDom(selectors);\r\n var container: HTMLElement = el.querySelector('.m-window__container');\r\n\r\n if (item) {\r\n var itemEl: HTMLElement = getDom(item);\r\n container.style.height = itemEl.clientHeight + 'px';\r\n return;\r\n }\r\n\r\n if (isActive) {\r\n container.classList.add('m-window__container--is-active');\r\n container.style.height = el.clientHeight + 'px';\r\n } else {\r\n container.style.height = '';\r\n container.classList.remove('m-window__container--is-active');\r\n }\r\n}\r\n\r\nexport function getScrollHeightWithoutHeight(selectors) {\r\n var el: HTMLElement = getDom(selectors);\r\n if (!el) {\r\n return 0;\r\n }\r\n\r\n var height = el.style.height;\r\n el.style.height = '0'\r\n var scrollHeight = el.scrollHeight;\r\n el.style.height = height;\r\n\r\n return scrollHeight;\r\n}\r\n\r\nfunction registerPasteWithData(customEventName) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(customEventName, {\r\n browserEventName: 'paste',\r\n createEventArgs: (event: ClipboardEvent) => {\r\n return {\r\n type: event.type,\r\n pastedData: event.clipboardData.getData('text')\r\n };\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport function registerTextFieldOnMouseDown(element, inputElement, callback) {\r\n if (!element || !inputElement) return\r\n\r\n const listener = (e: MouseEvent) => {\r\n const target = e.target;\r\n const inputDom = getDom(inputElement);\r\n if (target !== inputDom) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n\r\n if (callback) {\r\n const mouseEventArgs = {\r\n Detail: e.detail,\r\n ScreenX: e.screenX,\r\n ScreenY: e.screenY,\r\n ClientX: e.clientX,\r\n ClientY: e.clientY,\r\n OffsetX: e.offsetX,\r\n OffsetY: e.offsetY,\r\n PageX: e.pageX,\r\n PageY: e.pageY,\r\n Button: e.button,\r\n Buttons: e.buttons,\r\n CtrlKey: e.ctrlKey,\r\n ShiftKey: e.shiftKey,\r\n AltKey: e.altKey,\r\n MetaKey: e.metaKey,\r\n Type: e.type\r\n }\r\n\r\n callback.invokeMethodAsync('Invoke', mouseEventArgs);\r\n }\r\n };\r\n\r\n element.addEventListener('mousedown', listener)\r\n\r\n const config: HtmlElementEventListenerConfig = {\r\n listener,\r\n handle: callback\r\n };\r\n\r\n const key =`registerTextFieldOnMouseDown_${getBlazorId(element)}`;\r\n htmlElementEventListenerConfigs[key] = [config]\r\n}\r\n\r\nexport function unregisterTextFieldOnMouseDown(element: HTMLElement) {\r\n const key =`registerTextFieldOnMouseDown_${getBlazorId(element)}`;\r\n const configs = htmlElementEventListenerConfigs[key]\r\n if (configs && configs.length) {\r\n configs.forEach(item => {\r\n item.handle.dispose();\r\n if (element) {\r\n element.removeEventListener(\"mousedown\", item.listener);\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function containsActiveElement(selector) {\r\n var el = getDom(selector);\r\n if (el && el.contains) {\r\n return el.contains(document.activeElement);\r\n }\r\n\r\n return null;\r\n}\r\n\r\nexport function copyChild(el) {\r\n if (typeof el === 'string') {\r\n el = document.querySelector(el);\r\n }\r\n\r\n if (!el) return;\r\n\r\n el.setAttribute('contenteditable', 'true');\r\n el.focus();\r\n document.execCommand('selectAll', false, null);\r\n document.execCommand('copy');\r\n document.execCommand('unselect');\r\n el.removeAttribute('contenteditable');\r\n}\r\n\r\nexport function copyText(text) {\r\n if (!navigator.clipboard) {\r\n var textArea = document.createElement(\"textarea\");\r\n textArea.value = text;\r\n\r\n // Avoid scrolling to bottom\r\n textArea.style.top = \"0\";\r\n textArea.style.left = \"0\";\r\n textArea.style.position = \"fixed\";\r\n\r\n document.body.appendChild(textArea);\r\n textArea.focus();\r\n textArea.select();\r\n\r\n try {\r\n var successful = document.execCommand('copy');\r\n var msg = successful ? 'successful' : 'unsuccessful';\r\n console.log('Fallback: Copying text command was ' + msg);\r\n } catch (err) {\r\n console.error('Fallback: Oops, unable to copy', err);\r\n }\r\n\r\n document.body.removeChild(textArea);\r\n return;\r\n }\r\n\r\n navigator.clipboard.writeText(text).then(function () {\r\n console.log('Async: Copying to clipboard was successful!');\r\n }, function (err) {\r\n console.error('Async: Could not copy text: ', err);\r\n });\r\n}\r\n\r\nexport function getMenuableDimensions(hasActivator, activatorSelector, isDefaultAttach, contentElement, attached, attachSelector) {\r\n if (!attached) {\r\n var container = document.querySelector(attachSelector);\r\n if (contentElement.nodeType) {\r\n container.appendChild(contentElement);\r\n }\r\n }\r\n\r\n var dimensions = {\r\n activator: {} as any,\r\n content: {},\r\n relativeYOffset: 0,\r\n offsetParentLeft: 0\r\n };\r\n\r\n if (hasActivator) {\r\n var activator = document.querySelector(activatorSelector);\r\n dimensions.activator = measure(activator, isDefaultAttach)\r\n dimensions.activator.offsetLeft = activator.offsetLeft\r\n if (!isDefaultAttach) {\r\n // account for css padding causing things to not line up\r\n // this is mostly for v-autocomplete, hopefully it won't break anything\r\n dimensions.activator.offsetTop = activator.offsetTop\r\n } else {\r\n dimensions.activator.offsetTop = 0\r\n }\r\n }\r\n\r\n sneakPeek(() => {\r\n if (contentElement) {\r\n if (contentElement.offsetParent) {\r\n const offsetRect = getRoundedBoundedClientRect(contentElement.offsetParent)\r\n dimensions.relativeYOffset = window.pageYOffset + offsetRect.top\r\n\r\n if (hasActivator) {\r\n dimensions.activator.top -= dimensions.relativeYOffset\r\n dimensions.activator.left -= window.pageXOffset + offsetRect.left\r\n } else {\r\n dimensions.offsetParentLeft = offsetRect.left\r\n }\r\n }\r\n\r\n dimensions.content = measure(contentElement, isDefaultAttach)\r\n }\r\n }, contentElement);\r\n\r\n return dimensions;\r\n}\r\n\r\nfunction measure(el: HTMLElement, isDefaultAttach) {\r\n if (!el) return {}\r\n\r\n const rect = getRoundedBoundedClientRect(el)\r\n\r\n // Account for activator margin\r\n if (!isDefaultAttach) {\r\n const style = window.getComputedStyle(el)\r\n\r\n rect.left = parseInt(style.marginLeft!)\r\n rect.top = parseInt(style.marginTop!)\r\n }\r\n\r\n return rect\r\n}\r\n\r\nfunction getRoundedBoundedClientRect(el: Element) {\r\n if (!el || !el.nodeType) {\r\n return null\r\n }\r\n\r\n const rect = el.getBoundingClientRect()\r\n return {\r\n top: Math.round(rect.top),\r\n left: Math.round(rect.left),\r\n bottom: Math.round(rect.bottom),\r\n right: Math.round(rect.right),\r\n width: Math.round(rect.width),\r\n height: Math.round(rect.height),\r\n }\r\n}\r\n\r\nfunction sneakPeek(cb: () => void, el) {\r\n if (!el || !el.style || el.style.display !== 'none') {\r\n cb()\r\n return\r\n }\r\n\r\n el.style.display = 'inline-block'\r\n cb()\r\n el.style.display = 'none'\r\n}\r\n\r\nexport function invokeMultipleMethod(windowProps, documentProps, hasActivator, activatorSelector, attach, contentElement, attached, attachSelector, element) {\r\n var multipleResult = {\r\n windowAndDocument: null,\r\n dimensions: null,\r\n zIndex: 0\r\n };\r\n\r\n multipleResult.windowAndDocument = getWindowAndDocumentProps(windowProps, documentProps);\r\n multipleResult.dimensions = getMenuableDimensions(hasActivator, activatorSelector, attach, contentElement, attached, attachSelector);\r\n multipleResult.zIndex = getMenuOrDialogMaxZIndex([contentElement], element);\r\n\r\n return multipleResult;\r\n}\r\n\r\nexport function registerOTPInputOnInputEvent(elementList, callback) {\r\n for (let i = 0; i < elementList.length; i++) {\r\n const inputListener = (e: Event) => otpInputOnInputEvent(e, i, elementList, callback);\r\n const focusListener = (e: Event) => otpInputFocusEvent(e, i, elementList);\r\n const keyupListener =(e: KeyboardEvent) => otpInputKeyupEvent(e, i, elementList, callback);\r\n\r\n elementList[i].addEventListener('input', inputListener);\r\n elementList[i].addEventListener('focus', focusListener);\r\n elementList[i].addEventListener('keyup', keyupListener);\r\n\r\n elementList[i]._optInput = {\r\n inputListener,\r\n focusListener,\r\n keyupListener\r\n }\r\n }\r\n}\r\n\r\nfunction otpInputKeyupEvent(e: KeyboardEvent, otpIdx: number, elementList, callback) {\r\n e.preventDefault();\r\n const eventKey = e.key;\r\n if (eventKey === 'ArrowLeft' || eventKey === 'Backspace') {\r\n if (eventKey === 'Backspace') {\r\n const obj = {\r\n type: eventKey,\r\n index: otpIdx,\r\n value: ''\r\n }\r\n if (callback) {\r\n callback.invokeMethodAsync('Invoke', JSON.stringify(obj));\r\n }\r\n }\r\n otpInputFocus(otpIdx - 1, elementList);\r\n }\r\n else if (eventKey === 'ArrowRight') {\r\n otpInputFocus(otpIdx + 1, elementList);\r\n }\r\n}\r\n\r\nfunction otpInputFocus(focusIndex: number, elementList) {\r\n if (focusIndex < 0) {\r\n otpInputFocus(0, elementList);\r\n }\r\n else if (focusIndex >= elementList.length) {\r\n otpInputFocus(elementList.length - 1, elementList);\r\n }\r\n else {\r\n if (document.activeElement !== elementList[focusIndex]) {\r\n const element = getDom(elementList[focusIndex])\r\n element.focus();\r\n }\r\n }\r\n}\r\n\r\nfunction otpInputFocusEvent(e: Event, otpIdx: number, elementList) {\r\n const element = getDom(elementList[otpIdx]) as HTMLInputElement;\r\n if (element && document.activeElement === element) {\r\n element.select();\r\n }\r\n}\r\n\r\nfunction otpInputOnInputEvent(e: Event, otpIdx: number, elementList, callback) {\r\n const target = e.target as HTMLInputElement;\r\n const value = target.value;\r\n\r\n if (value && value !== '') {\r\n otpInputFocus(otpIdx + 1, elementList);\r\n\r\n if (callback) {\r\n const obj = {\r\n type: 'Input',\r\n index: otpIdx,\r\n value: value\r\n }\r\n callback.invokeMethodAsync('Invoke', JSON.stringify(obj));\r\n }\r\n }\r\n}\r\n\r\nexport function unregisterOTPInputOnInputEvent(elementList) {\r\n for (let i = 0; i < elementList.length; i++) {\r\n const el = elementList[i]\r\n if(el && el._optInput) {\r\n el.removeEventListener('input', el._optInput.inputListener)\r\n el.removeEventListener('focus', el._optInput.focusListener)\r\n el.removeEventListener('keyup', el._optInput.keyupListener)\r\n }\r\n }\r\n}\r\n\r\nexport function getListIndexWhereAttributeExists(selector: string, attribute:string, value: string) {\r\n const tiles = document.querySelectorAll(selector);\r\n if (!tiles) {\r\n return -1;\r\n }\r\n\r\n let index = -1;\r\n for (let i = 0; i < tiles.length; i++) {\r\n if (tiles[i].getAttribute(attribute) === value) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n\r\n return index;\r\n}\r\n\r\nexport function scrollToTile(contentSelector: string, tilesSelector: string, index: number, keyCode: string) {\r\n var tiles = document.querySelectorAll(tilesSelector)\r\n if (!tiles) return;\r\n\r\n let tile = tiles[index] as HTMLElement;\r\n\r\n if (!tile) return;\r\n\r\n const content = document.querySelector(contentSelector);\r\n if (!content) return;\r\n\r\n const scrollTop = content.scrollTop;\r\n const contentHeight = content.clientHeight;\r\n\r\n if (scrollTop > tile.offsetTop - 8) {\r\n content.scrollTo({ top: tile.offsetTop - tile.clientHeight, behavior: \"smooth\" })\r\n } else if (scrollTop + contentHeight < tile.offsetTop + tile.clientHeight + 8) {\r\n content.scrollTo({ top: tile.offsetTop - contentHeight + tile.clientHeight * 2, behavior: \"smooth\" })\r\n }\r\n}\r\n\r\nexport function getElementTranslateY(element) {\r\n const style = window.getComputedStyle(element);\r\n const transform = style.transform || style.webkitTransform;\r\n const translateY = transform.slice(7, transform.length - 1).split(', ')[5];\r\n\r\n return Number(translateY);\r\n}\r\n\r\nfunction isWindow(element: any | Window): element is Window {\r\n return element === window\r\n}\r\n\r\nexport function checkIfThresholdIsExceededWhenScrolling(el: Element, parent: any, threshold: number) {\r\n if (!el || !parent) return\r\n\r\n let parentElement: HTMLElement | Window\r\n\r\n if (parent == \"window\") {\r\n parentElement = window;\r\n } else if (parent == \"document\") {\r\n parentElement = document.documentElement;\r\n } else {\r\n parentElement = document.querySelector(parent);\r\n }\r\n\r\n const rect = el.getBoundingClientRect();\r\n const elementTop = rect.top;\r\n const current = isWindow(parentElement)\r\n ? window.innerHeight\r\n : parentElement.getBoundingClientRect().bottom\r\n\r\n return (current >= elementTop - threshold)\r\n}\r\n\r\nexport function get_top_domain() {\r\n var i, h,\r\n weird_cookie = 'weird_get_top_level_domain=cookie',\r\n hostname = document.location.hostname.split('.');\r\n for (i = hostname.length - 1; i >= 0; i--) {\r\n h = hostname.slice(i).join('.');\r\n document.cookie = weird_cookie + ';domain=.' + h + ';';\r\n if (document.cookie.indexOf(weird_cookie) > -1) {\r\n // We were able to store a cookie! This must be it\r\n document.cookie = weird_cookie.split('=')[0] + '=;domain=.' + h + ';expires=Thu, 01 Jan 1970 00:00:01 GMT;';\r\n return h;\r\n }\r\n }\r\n}\r\n\r\nexport function setCookie(name, value) {\r\n var domain = get_top_domain();\r\n if (!domain) {\r\n domain = '';\r\n }else if (isNaN(domain[0])) {\r\n domain = `.${domain}`;\r\n }\r\n var Days = 30;\r\n var exp = new Date();\r\n exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);\r\n document.cookie = `${name}=${escape(value.toString())};path=/;expires=${exp.toUTCString()};domain=${domain}`;\r\n}\r\n\r\nexport function getCookie(name) {\r\n const reg = new RegExp(`(^| )${name}=([^;]*)(;|$)`);\r\n const arr = document.cookie.match(reg);\r\n if (arr) {\r\n return unescape(arr[2]);\r\n }\r\n return null;\r\n}\r\n\r\nexport function registerDragEvent(el: HTMLElement, dataKey?: string) {\r\n if (el) {\r\n const blazorId = getBlazorId(el);\r\n const listener = (e: DragEvent) => {\r\n if (dataKey) {\r\n const dataValue = (e.target as HTMLElement).getAttribute(dataKey);\r\n e.dataTransfer.setData(dataKey, dataValue);\r\n e.dataTransfer.setData('offsetX', e.offsetX.toString())\r\n e.dataTransfer.setData('offsetY', e.offsetY.toString())\r\n }\r\n };\r\n const key = `${blazorId}:dragstart`;\r\n htmlElementEventListenerConfigs[key] = [{\r\n listener\r\n }];\r\n el.addEventListener(\"dragstart\", listener);\r\n }\r\n}\r\n\r\nexport function unregisterDragEvent(el: HTMLElement) {\r\n const blazorId = getBlazorId(el);\r\n if (blazorId) {\r\n const key = `${blazorId}:dragstart`;\r\n if (htmlElementEventListenerConfigs[key]) {\r\n htmlElementEventListenerConfigs[key].forEach((config) => {\r\n el.removeEventListener(\"dragstart\", config.listener);\r\n });\r\n }\r\n }\r\n}\r\n\r\nexport function resizableDataTable(dataTable: HTMLElement) {\r\n const table = dataTable.querySelector('table')\r\n const row = table.querySelector('.m-data-table-header').getElementsByTagName('tr')[0];\r\n const cols = row ? row.children : [];\r\n if (!cols) return;\r\n\r\n table.style.overflow = 'hidden';\r\n\r\n const tableHeight = table.offsetHeight;\r\n\r\n for (var i = 0; i < cols.length; i++) {\r\n const col: any = cols[i];\r\n const colResizeDiv: HTMLDivElement = col.querySelector(\".m-data-table-header__col-resize\");\r\n if (!colResizeDiv) continue\r\n colResizeDiv.style.height = tableHeight + \"px\"\r\n\r\n let minWidth = (col.firstElementChild as HTMLElement).offsetWidth; // width of span\r\n minWidth = minWidth + 32 + 18 + 1 + 1; // 32:padding 18:sort\r\n if(!col.style.minWidth){\r\n col.minWidth = minWidth;\r\n col.style.minWidth = minWidth + \"px\";\r\n }\r\n\r\n setListeners(colResizeDiv);\r\n }\r\n\r\n function setListeners(div: HTMLDivElement) {\r\n let pageX:number\r\n let curCol: HTMLElement;\r\n let nxtCol: HTMLElement;\r\n let curColWidth: number;\r\n let nxtColWidth: number;\r\n let tableWidth: number;\r\n\r\n div.addEventListener('click', e => e.stopPropagation());\r\n\r\n div.addEventListener('mousedown', function (e) {\r\n curCol = (e.target as HTMLElement).parentElement;\r\n nxtCol = curCol.nextElementSibling as HTMLElement;\r\n pageX = e.pageX;\r\n\r\n tableWidth = table.offsetWidth;\r\n\r\n var padding = paddingDiff(curCol);\r\n\r\n curColWidth = curCol.offsetWidth - padding;\r\n if (nxtCol)\r\n nxtColWidth = nxtCol.offsetWidth - padding;\r\n });\r\n\r\n document.addEventListener(\"mousemove\", function (e) {\r\n if (curCol) {\r\n let diffX = e.pageX - pageX;\r\n\r\n const isRtl = dataTable.classList.contains(\"m-data-table--rtl\")\r\n if (isRtl) {\r\n diffX = 0 - diffX;\r\n }\r\n\r\n let newCurColWidth = curColWidth + diffX;\r\n\r\n curCol.style.width = newCurColWidth + \"px\";\r\n\r\n const isOverflow = dataTable.classList.contains(\r\n \"m-data-table--resizable-overflow\"\r\n );\r\n if (isOverflow) {\r\n table.style.width = tableWidth + diffX + \"px\";\r\n return;\r\n }\r\n\r\n const isIndependent = dataTable.classList.contains(\r\n \"m-data-table--resizable-independent\"\r\n );\r\n if (isIndependent) {\r\n let newNextColWidth = nxtColWidth - diffX;\r\n const twoColWidth = curColWidth + nxtColWidth;\r\n\r\n if (diffX > 0) {\r\n if (nxtCol) {\r\n if (newNextColWidth < nxtCol[\"minWidth\"]) {\r\n newNextColWidth = nxtCol[\"minWidth\"];\r\n newCurColWidth = twoColWidth - newNextColWidth;\r\n }\r\n }\r\n } else {\r\n if (newCurColWidth < curCol[\"minWidth\"]) {\r\n newCurColWidth = curCol[\"minWidth\"];\r\n newNextColWidth = twoColWidth - newCurColWidth;\r\n }\r\n }\r\n\r\n curCol.style.width = newCurColWidth + \"px\";\r\n\r\n if (nxtCol) {\r\n nxtCol.style.width = newNextColWidth + \"px\";\r\n }\r\n }\r\n }\r\n });\r\n\r\n document.addEventListener('mouseup', function (e) {\r\n if (curCol) {\r\n for (let i = 0; i < cols.length; i++) {\r\n const col:any = cols[i];\r\n col.style.width = col['offsetWidth'] + \"px\"\r\n }\r\n }\r\n curCol = undefined;\r\n nxtCol = undefined;\r\n pageX = undefined;\r\n nxtColWidth = undefined;\r\n curColWidth = undefined;\r\n tableWidth = undefined;\r\n });\r\n }\r\n\r\n function paddingDiff(col) {\r\n if (getStyleVal(col, 'box-sizing') == 'border-box') {\r\n return 0;\r\n }\r\n\r\n var padLeft = getStyleVal(col, 'padding-left');\r\n var padRight = getStyleVal(col, 'padding-right');\r\n return (parseInt(padLeft) + parseInt(padRight));\r\n }\r\n\r\n function getStyleVal(elm, css) {\r\n return (window.getComputedStyle(elm, null).getPropertyValue(css))\r\n }\r\n}\r\n\r\nexport function updateDataTableResizeHeight(dataTable: HTMLElement) {\r\n const table = dataTable.querySelector('table')\r\n const row = table.querySelector('.m-data-table-header').getElementsByTagName('tr')[0];\r\n const cols = row ? row.children : [];\r\n if (!cols) return;\r\n\r\n const tableHeight = table.offsetHeight;\r\n\r\n for (var i = 0; i < cols.length; i++) {\r\n const col: any = cols[i];\r\n const colResizeDiv: HTMLDivElement = col.querySelector(\".m-data-table-header__col-resize\");\r\n colResizeDiv.style.height = tableHeight + \"px\"\r\n }\r\n}","import { removeListeners, RippleOptions, updateRipple } from \"./ripple\";\r\n\r\nexport default function registerRippleObserver() {\r\n const observer = new MutationObserver((mutationsList, observer) => {\r\n for (const mutation of mutationsList) {\r\n if (mutation.type === \"childList\" && mutation.addedNodes.length > 0) {\r\n for (const node of mutation.addedNodes) {\r\n if (node instanceof HTMLElement) {\r\n if (\r\n node.nodeType === Node.ELEMENT_NODE &&\r\n node.hasAttribute(\"ripple\") &&\r\n !node._ripple\r\n ) {\r\n updateRipple(node, convertRippleAttributeToOptions(node), false);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // 处理属性变动\r\n if (mutation.type === \"attributes\") {\r\n const target = mutation.target as HTMLElement;\r\n if (target.hasAttribute(\"ripple\") && !target._ripple) {\r\n if (mutation.attributeName === \"ripple\") {\r\n updateRipple(\r\n target,\r\n convertRippleAttributeToOptions(target),\r\n false\r\n );\r\n } else if (!target.hasAttribute(\"ripple\") && target._ripple) {\r\n removeListeners(target);\r\n delete target._ripple;\r\n }\r\n }\r\n }\r\n\r\n if (\r\n mutation.type === \"attributes\" &&\r\n mutation.attributeName === \"ripple\"\r\n ) {\r\n const target = mutation.target as HTMLElement;\r\n if (target._ripple) {\r\n updateRipple(\r\n target,\r\n convertRippleAttributeToOptions(target),\r\n target._ripple.enabled\r\n );\r\n }\r\n }\r\n\r\n if (mutation.type === \"childList\" && mutation.removedNodes.length > 0) {\r\n for (const node of mutation.removedNodes) {\r\n if (node instanceof HTMLElement) {\r\n if (node.nodeType === Node.ELEMENT_NODE && node._ripple) {\r\n removeListeners(node);\r\n delete node._ripple;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n });\r\n\r\n // ripple=\"false\",\r\n // ripple=\"\",\r\n // ripple=\"true\",\r\n // ripple=\"center\",\r\n // ripple=\"circle\",\r\n // ripple=\"center:custom-css\",\r\n // ripple=\"circle:custom-css\",\r\n // ripple=\"custom-css\"\r\n function convertRippleAttributeToOptions(\r\n target: HTMLElement\r\n ): RippleOptions | null {\r\n const value = target.getAttribute(\"ripple\");\r\n if ((typeof value !== \"string\" && !value) || value === \"false\") {\r\n return null;\r\n }\r\n\r\n const options: RippleOptions = {\r\n circle: true,\r\n center: false,\r\n };\r\n\r\n const [behavior, css] = value.split(\":\");\r\n\r\n if (behavior) {\r\n if (behavior === \"center\") {\r\n options.circle = false;\r\n options.center = true;\r\n } else if (behavior !== \"circle\") {\r\n options.class = behavior;\r\n }\r\n }\r\n\r\n if (css) {\r\n options.class = css;\r\n }\r\n\r\n return options;\r\n }\r\n\r\n const initialElements = document.querySelectorAll(\"[ripple]\");\r\n\r\n for (const element of initialElements) {\r\n updateRipple(element, convertRippleAttributeToOptions(element), false);\r\n }\r\n\r\n observer.observe(document, {\r\n childList: true,\r\n subtree: true,\r\n attributes: true,\r\n attributeFilter: [\"ripple\"],\r\n attributeOldValue: false,\r\n });\r\n}\r\n","// Utilities\r\nimport { addPassiveEventListener, composedPath, getDom, keyCodes } from \"../../utils/helper\";\r\n\r\nvar wheelListenerCaches: { [key: string]: any } = {}\r\n\r\nexport function hideScroll(fullscreen: boolean, overlaySelector: string, content, dialog) {\r\n if (fullscreen) {\r\n document.documentElement!.classList.add('overflow-y-hidden')\r\n } else {\r\n if (!overlaySelector) return\r\n const overlay = getDom(overlaySelector);\r\n const listener = (e) => {\r\n scrollListener(e, overlay, content, dialog)\r\n }\r\n\r\n wheelListenerCaches[`window_${overlaySelector}`] = listener;\r\n\r\n addPassiveEventListener(window, 'wheel', listener, { passive: false })\r\n window.addEventListener('keydown', listener)\r\n }\r\n}\r\n\r\nexport function showScroll (overlaySelector) {\r\n document.documentElement!.classList.remove('overflow-y-hidden')\r\n\r\n var listener = wheelListenerCaches[`window_${overlaySelector}`]\r\n if (listener) {\r\n window.removeEventListener('wheel', listener)\r\n window.removeEventListener('keydown', listener)\r\n }\r\n}\r\n\r\nfunction scrollListener (e: WheelEvent & KeyboardEvent, overlay, content, dialog) {\r\n if (e.type === 'keydown') {\r\n if (\r\n ['INPUT', 'TEXTAREA', 'SELECT'].includes((e.target as Element).tagName) ||\r\n // https://github.com/vuetifyjs/vuetify/issues/4715\r\n (e.target as HTMLElement).isContentEditable\r\n ) return\r\n\r\n const up:number[] = [keyCodes.up, keyCodes.pageup]\r\n const down:number[] = [keyCodes.down, keyCodes.pagedown]\r\n\r\n if (up.includes(e.keyCode)) {\r\n (e as any).deltaY = -1\r\n } else if (down.includes(e.keyCode)) {\r\n (e as any).deltaY = 1\r\n } else {\r\n return\r\n }\r\n }\r\n\r\n if (e.target === overlay ||\r\n (e.type !== 'keydown' && e.target === document.body) ||\r\n checkPath(e, content, dialog)) e.preventDefault()\r\n}\r\n\r\nfunction checkPath(e: WheelEvent, content, dialog) {\r\n const path = composedPath(e)\r\n\r\n if (e.type === 'keydown' && path[0] === document.body) {\r\n // getSelection returns null in firefox in some edge cases, can be ignored\r\n const selected = window.getSelection()!.anchorNode as Element\r\n if (dialog && hasScrollbar(dialog) && isInside(selected, dialog)) {\r\n return !shouldScroll(dialog, e)\r\n }\r\n return true\r\n }\r\n\r\n for (let index = 0; index < path.length; index++) {\r\n const el = path[index]\r\n\r\n if (el === document) return true\r\n if (el === document.documentElement) return true\r\n if (el === content) return true\r\n\r\n if (hasScrollbar(el as Element)) return !shouldScroll(el as Element, e)\r\n }\r\n\r\n return true\r\n}\r\n\r\nfunction shouldScroll(el: Element, e: WheelEvent): boolean {\r\n if (el.hasAttribute('data-app')) return false\r\n\r\n const dir = e.shiftKey || e.deltaX ? 'x' : 'y'\r\n const delta = dir === 'y' ? e.deltaY : e.deltaX || e.deltaY\r\n\r\n let alreadyAtStart: boolean\r\n let alreadyAtEnd: boolean\r\n if (dir === 'y') {\r\n alreadyAtStart = el.scrollTop === 0\r\n alreadyAtEnd = el.scrollTop + el.clientHeight === el.scrollHeight\r\n } else {\r\n alreadyAtStart = el.scrollLeft === 0\r\n alreadyAtEnd = el.scrollLeft + el.clientWidth === el.scrollWidth\r\n }\r\n\r\n const scrollingUp = delta < 0\r\n const scrollingDown = delta > 0\r\n\r\n if (!alreadyAtStart && scrollingUp) return true\r\n if (!alreadyAtEnd && scrollingDown) return true\r\n if ((alreadyAtStart || alreadyAtEnd)) {\r\n return shouldScroll(el.parentNode as Element, e)\r\n }\r\n\r\n return false\r\n}\r\n\r\nfunction isInside(el: Element, parent: Element): boolean {\r\n if (el === parent) {\r\n return true\r\n } else if (el === null || el === document.body) {\r\n return false\r\n } else {\r\n return isInside(el.parentNode as Element, parent)\r\n }\r\n}\r\n\r\nfunction hasScrollbar(el?: Element) {\r\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return false\r\n\r\n const style = window.getComputedStyle(el)\r\n return ((['auto', 'scroll'].includes(style.overflowY!) || el.tagName === 'SELECT') && el.scrollHeight > el.clientHeight) ||\r\n ((['auto', 'scroll'].includes(style.overflowX!)) && el.scrollWidth > el.clientWidth)\r\n}\r\n","export type MasaBlazorApplication = {\r\n bar?: number;\r\n top: number;\r\n right: number;\r\n bottom: number;\r\n left: number;\r\n footer?: number;\r\n insetFooter?: number;\r\n};\r\n\r\nexport type MasaBlazorSsrPassiveState = {\r\n application: MasaBlazorApplication;\r\n};\r\n\r\nexport type MasaBlazorSsrState = {\r\n culture?: string;\r\n rtl?: boolean;\r\n dark?: boolean;\r\n passive?: MasaBlazorSsrPassiveState;\r\n};\r\n\r\nexport const MASA_BLAZOR_SSR_STATE = \"masablazor@ssr-state\";\r\n\r\nexport function setTheme(dark: boolean) {\r\n const selector = `.${getThemeCss(!dark)}:not(.theme--independent)`;\r\n const elements = document.querySelectorAll(selector);\r\n for (let i = 0; i < elements.length; i++) {\r\n elements[i].classList.remove(getThemeCss(!dark));\r\n elements[i].classList.add(getThemeCss(dark));\r\n }\r\n\r\n updateStorage({ dark });\r\n}\r\n\r\nexport function toggleTheme() {\r\n const state = getState();\r\n if (state) {\r\n setTheme(!state.dark);\r\n }\r\n}\r\n\r\nexport function setCulture(culture: string) {\r\n const app = getApp();\r\n if (!app) return;\r\n\r\n updateStorage({ culture });\r\n}\r\n\r\nexport function setRtl(rtl: boolean, updateCache: boolean = true) {\r\n const app = getApp();\r\n if (!app) return;\r\n\r\n const rtlCss = \"m-application--is-rtl\";\r\n if (!rtl) {\r\n app.classList.remove(rtlCss);\r\n } else if (!app.classList.contains(rtlCss)) {\r\n app.classList.add(rtlCss);\r\n }\r\n\r\n if (updateCache) {\r\n updateStorage({ rtl });\r\n }\r\n}\r\n\r\nexport function updateMain(application: MasaBlazorApplication) {\r\n const main: HTMLElement = document.querySelector(\".m-main\");\r\n\r\n const newApplication: MasaBlazorApplication = {\r\n top: application.top ?? getPadding(\"Top\"),\r\n right: application.right ?? getPadding(\"Right\"),\r\n bottom: application.bottom ?? getPadding(\"Bottom\"),\r\n left: application.left ?? getPadding(\"Left\"),\r\n };\r\n\r\n restoreMain(newApplication);\r\n\r\n function getPadding(prop: \"Top\" | \"Right\" | \"Bottom\" | \"Left\") {\r\n return Number(main.style[`padding${prop}`].match(/\\d+/)[0]);\r\n }\r\n}\r\n\r\nexport function updatePassiveState(passive: MasaBlazorSsrPassiveState) {\r\n const oldState = getState() ?? {};\r\n const state: MasaBlazorSsrState = {\r\n ...oldState,\r\n passive,\r\n };\r\n localStorage.setItem(MASA_BLAZOR_SSR_STATE, JSON.stringify(state));\r\n}\r\n\r\nexport function getThemeCss(dark: boolean) {\r\n return dark ? \"theme--dark\" : \"theme--light\";\r\n}\r\n\r\nexport function getApp() {\r\n return document.querySelector(\".m-application\");\r\n}\r\n\r\nfunction updateStorage(obj: Partial) {\r\n const stateStr = localStorage.getItem(MASA_BLAZOR_SSR_STATE);\r\n if (stateStr) {\r\n const state = JSON.parse(stateStr);\r\n localStorage.setItem(\r\n MASA_BLAZOR_SSR_STATE,\r\n JSON.stringify({\r\n ...state,\r\n ...obj,\r\n })\r\n );\r\n }\r\n}\r\n\r\nexport function restoreMain(application: MasaBlazorApplication) {\r\n const main = document.querySelector(\".m-main\") as HTMLElement;\r\n if (main && application) {\r\n main.style.paddingTop = application.top + application.bar + \"px\";\r\n main.style.paddingRight = application.right + \"px\";\r\n main.style.paddingBottom =\r\n application.bottom + application.insetFooter + application.bottom + \"px\";\r\n main.style.paddingLeft = application.left + \"px\";\r\n }\r\n}\r\n\r\nexport function getState(): MasaBlazorSsrState {\r\n const stateStr = localStorage.getItem(MASA_BLAZOR_SSR_STATE);\r\n if (stateStr) {\r\n return JSON.parse(stateStr);\r\n }\r\n return null;\r\n}\r\n","import * as slider from \"./components/slider\";\r\nimport * as interop from \"./interop\";\r\nimport * as overlayable from \"./mixins/overlayable\";\r\nimport * as ssr from \"./ssr\";\r\n\r\ndeclare global {\r\n interface Window {\r\n BlazorComponent: any;\r\n MasaBlazor: any;\r\n }\r\n}\r\n\r\nwindow.BlazorComponent = {\r\n interop: {\r\n ...interop,\r\n ...overlayable,\r\n ...slider,\r\n ssr\r\n },\r\n};\r\n\r\nwindow.MasaBlazor = {};\r\n"],"names":["__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","passiveSupported","window","testListenerOpts","Object","defineProperty","get","addEventListener","removeEventListener","console","warn","keyCodes","freeze","enter","tab","delete","esc","space","up","down","left","right","end","home","del","backspace","insert","pageup","pagedown","shift","getBlazorId","el","_bl_","getAttributeNames","find","a","startsWith","substring","getElementSelector","Element","path","nodeType","Node","ELEMENT_NODE","selector","nodeName","toLowerCase","id","unshift","sib","nth","previousElementSibling","parentNode","join","getDom","elOrString","element","document","documentElement","indexOf","array","split","i","querySelector","HTMLElement","body","error","canUseDom","createElement","touchEvents","parseMouseEvent","event","detail","screenX","screenY","clientX","clientY","offsetX","offsetY","pageX","pageY","button","buttons","ctrlKey","shiftKey","altKey","metaKey","type","parseTouchEvent","touches","parseTouch","targetTouches","changedTouches","touchList","length","touch","push","identifier","registerExtraMouseEvent","eventType","eventName","Blazor","registerCustomEventType","browserEventName","createEventArgs","createSharedEventArgs","registerExtraDropEvent","eventArgs","assign","dataTransfer","dropEffect","effectAllowed","files","Array","from","map","f","name","items","kind","types","getData","Number","args","target","eventTarget","elementReferenceId","class","getAttribute","getEventTarget","sliderHandleId","sliderHandlesById","dotnetHelper","onSliderMouseDown","app","mouseUpOptions","passive","capture","mouseMoveOptions","isTouchEvent","onMouseMove","cb","options","once","addOnceEventListener","onSliderMouseUp","invokeMethodAsync","stopPropagation","payload","functionDebounce","fn","wait","callFirst","timeout","debouncedFn","clear","clearTimeout","debounceWrapper","this","arguments","context","callNow","setTimeout","call","cancel","flush","functionThrottle","interval","timeoutId","throttledFn","leading","trailing","throttleWrapper","registerExtraEvents","registerEvent","DELAY_RIPPLE","transform","style","webkitTransform","constructor","isKeyboardEvent","ripples","show","_ripple","enabled","container","animation","appendChild","className","radius","scale","x","y","centerX","centerY","localX","localY","offset","getBoundingClientRect","top","circle","clientWidth","center","Math","sqrt","clientHeight","calculate","size","width","height","computed","getComputedStyle","position","dataset","previousPosition","classList","add","activated","String","performance","now","remove","hide","getElementsByClassName","isHiding","diff","delay","max","_a","removeChild","rippleShow","currentTarget","touched","rippleStop","isTouch","centered","showTimerCommit","showTimer","rippleHide","rippleCancelShow","keyboardRippleShow","keyCode","keyboardRippleHide","focusRippleHide","updateRipple","wasEnabled","removeListeners","getZIndex","index","getPropertyValue","getDomInfoObj","dom","offsetTop","offsetLeft","scrollHeight","scrollWidth","scrollLeft","scrollTop","clientTop","clientLeft","res","viewportElement","box","offsetWidth","offsetHeight","relativeTop","relativeBottom","bottom","relativeLeft","relativeRight","absoluteLeft","absoluteTop","getElementPos","round","onload","customEventName","pastedData","clipboardData","observer","MutationObserver","mutationsList","mutation","addedNodes","node","hasAttribute","convertRippleAttributeToOptions","attributeName","removedNodes","behavior","css","initialElements","querySelectorAll","observe","childList","subtree","attributes","attributeFilter","attributeOldValue","registerRippleObserver","htmlElementEventListenerConfigs","getActiveElement","activeElement","getWindowAndDocumentProps","windowProps","documentProps","obj","forEach","prop","isElement","tagName","getMenuOrDialogMaxZIndex","exclude","zis","activeElements","includes","getMenuableDimensions","hasActivator","activatorSelector","isDefaultAttach","contentElement","attached","attachSelector","dimensions","activator","content","relativeYOffset","offsetParentLeft","measure","display","sneakPeek","offsetParent","offsetRect","getRoundedBoundedClientRect","pageYOffset","pageXOffset","rect","parseInt","marginLeft","marginTop","otpInputKeyupEvent","otpIdx","elementList","callback","preventDefault","eventKey","key","JSON","stringify","otpInputFocus","focusIndex","focus","otpInputFocusEvent","select","otpInputOnInputEvent","get_top_domain","h","weird_cookie","hostname","location","slice","cookie","cloned","cloneNode","parentElement","evt","createEvent","initEvent","dispatchEvent","attach","_b","invoker","extras","htmlElement","config","listener","cancelable","relatedTarget","contains","k","debounce","debounceIt","throttle","handle","configs","item","dispose","e1","e2","dom1","dom2","text","navigator","clipboard","writeText","log","err","textArea","msg","execCommand","fallbackCopyTextToClipboard","noScroll","Error","preventScroll","HTMLInputElement","HTMLTextAreaElement","blur","arg","undefined","scrollIntoView","block","inline","start","level","parent","to","scrollTo","o","offsetPosition","activeEl","containerEl","firstElementChild","getAbsoluteTop","getAbsoluteLeft","addElement","elementSelector","delElement","focusDialog","count","ele","innerWidth","innerHeight","isTop","scrollY","isBottom","hasOwnProperty","clsName","root","overflowY","test","innerText","all","reduce","r","zIndex","styleProp","currentStyle","defaultView","parseFloat","is","NaN","objReferenceName","d","getElementById","head","d_style","innerHTML","insertAdjacentElement","src","img","Image","hasError","onerror","condition","isArray","code","elements","selectors","sizeProp","overflow","charAt","toUpperCase","isActive","itemEl","inputElement","mouseEventArgs","Detail","ScreenX","ScreenY","ClientX","ClientY","OffsetX","OffsetY","PageX","PageY","Button","Buttons","CtrlKey","ShiftKey","AltKey","MetaKey","Type","setAttribute","removeAttribute","multipleResult","windowAndDocument","inputListener","focusListener","keyupListener","_optInput","attribute","tiles","contentSelector","tilesSelector","tile","contentHeight","translateY","threshold","elementTop","domain","isNaN","exp","Date","setTime","getTime","Days","escape","toString","toUTCString","reg","RegExp","arr","match","unescape","dataKey","blazorId","dataValue","setData","dataTable","table","row","getElementsByTagName","cols","children","tableHeight","col","colResizeDiv","minWidth","setListeners","div","curCol","nxtCol","curColWidth","nxtColWidth","tableWidth","nextElementSibling","padding","getStyleVal","padLeft","padRight","paddingDiff","diffX","newCurColWidth","newNextColWidth","twoColWidth","elm","wheelListenerCaches","shouldScroll","dir","deltaX","delta","deltaY","alreadyAtStart","alreadyAtEnd","isInside","hasScrollbar","overflowX","fullscreen","overlaySelector","dialog","overlay","isContentEditable","composedPath","selected","getSelection","anchorNode","checkPath","scrollListener","MASA_BLAZOR_SSR_STATE","setTheme","dark","getThemeCss","updateStorage","getApp","stateStr","localStorage","getItem","state","parse","setItem","restoreMain","application","main","paddingTop","bar","paddingRight","paddingBottom","insetFooter","paddingLeft","getState","culture","rtl","updateCache","rtlCss","getPadding","_c","_d","oldState","BlazorComponent","interop","overlayable","slider","ssr","MasaBlazor"],"mappings":"yBAkHO,SAASA,EAAUC,EAASC,EAAYC,EAAGC,GAE9C,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,GAAQ,CAAG,MAAOG,GAAKL,EAAOK,GAAO,CAC3F,SAASC,EAASJ,GAAS,IAAMC,EAAKN,EAAiB,MAAEK,GAAU,CAAC,MAAOG,GAAKL,EAAOK,GAAO,CAC9F,SAASF,EAAKI,GAJlB,IAAeL,EAIaK,EAAOC,KAAOT,EAAQQ,EAAOL,QAJ1CA,EAIyDK,EAAOL,MAJhDA,aAAiBN,EAAIM,EAAQ,IAAIN,GAAE,SAAUG,GAAWA,EAAQG,EAAO,KAIhBO,KAAKR,EAAWK,EAAY,CAC9GH,GAAMN,EAAYA,EAAUa,MAAMhB,EAASC,GAAc,KAAKS,OACtE,GACA,CC5GA,IAAIO,GAAmB,EACvB,IACE,GAAsB,oBAAXC,OAAwB,CACjC,MAAMC,EAAmBC,OAAOC,eAAe,CAAA,EAAI,UAAW,CAC5DC,IAAK,KACHL,GAAmB,CAAI,IAI3BC,OAAOK,iBAAiB,eAAuBJ,EAAyBA,GACxED,OAAOM,oBAAoB,eAAuBL,EAAyBA,EAC5E,CACF,CAAC,MAAOR,GAAKc,QAAQC,KAAKf,EAAI,CAsBxB,MAAMgB,EAAWP,OAAOQ,OAAO,CACpCC,MAAO,GACPC,IAAK,EACLC,OAAQ,GACRC,IAAK,GACLC,MAAO,GACPC,GAAI,GACJC,KAAM,GACNC,KAAM,GACNC,MAAO,GACPC,IAAK,GACLC,KAAM,GACNC,IAAK,GACLC,UAAW,EACXC,OAAQ,GACRC,OAAQ,GACRC,SAAU,GACVC,MAAO,KAyBH,SAAUC,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ld,EAAIiF,UAAUkK,SAASiO,IACjCpd,EAAIiF,UAAUC,IAAIkY,GAFlBpd,EAAIiF,UAAUM,OAAO6X,GAKnBD,GACFpB,GAAc,CAAEmB,OAEpB,aAEM,SAAqBV,eACzB,MAAMC,EAAoBthB,SAASM,cAAc,WAWjD,SAAS4hB,EAAWxS,GAClB,OAAOzL,OAAOqd,EAAK9Z,MAAM,UAAUkI,KAAQsN,MAAM,OAAO,GACzD,CAJDoE,GAP8C,CAC5CtY,IAAwB,UAAnBuY,EAAYvY,WAAO,IAAA6B,EAAAA,EAAAuX,EAAW,OACnCtkB,MAA4B,UAArByjB,EAAYzjB,aAAS,IAAA4V,EAAAA,EAAA0O,EAAW,SACvChV,OAA8B,UAAtBmU,EAAYnU,cAAU,IAAAiV,EAAAA,EAAAD,EAAW,UACzCvkB,KAA0B,UAApB0jB,EAAY1jB,YAAQ,IAAAykB,EAAAA,EAAAF,EAAW,SAQzC,qBAEM,SAA6Bnd,SACjC,MAAMsd,EAAqB,QAAV1X,EAAAkX,YAAU,IAAAlX,EAAAA,EAAI,GACzBsW,EACDtkB,OAAAwG,OAAAxG,OAAAwG,OAAA,CAAA,EAAAkf,GACH,CAAAtd,YAEFgc,aAAaI,QAAQX,GAAuBvO,KAAKC,UAAU+O,GAC7D,wDC5EAxkB,OAAO6lB,gBAAkB,CACvBC,QAAO5lB,OAAAwG,OAAAxG,OAAAwG,OAAAxG,OAAAwG,OAAAxG,OAAAwG,OAAA,CAAA,EACFof,GACAC,GACAC,GAAM,CACTC,UAIJjmB,OAAOkmB,WAAa,CAAE"} \ No newline at end of file +{"version":3,"file":"blazor-component.js","sources":["../../../BlazorComponent.Web/node_modules/tslib/tslib.es6.js","../../../BlazorComponent.Web/src/utils/helper.ts","../../../BlazorComponent.Web/src/events/EventType.ts","../../../BlazorComponent.Web/src/events/extra.ts","../../../BlazorComponent.Web/src/components/slider/index.ts","../../../BlazorComponent.Web/node_modules/just-debounce-it/index.mjs","../../../BlazorComponent.Web/node_modules/just-throttle/index.mjs","../../../BlazorComponent.Web/src/events/index.ts","../../../BlazorComponent.Web/src/ripple/ripple.ts","../../../BlazorComponent.Web/src/interop.ts","../../../BlazorComponent.Web/src/ripple/index.ts","../../../BlazorComponent.Web/src/mixins/overlayable/index.ts","../../../BlazorComponent.Web/src/main.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.push(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.push(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","export function addOnceEventListener (\r\n el: EventTarget,\r\n eventName: string,\r\n cb: (event: Event) => void,\r\n options: boolean | AddEventListenerOptions = false\r\n): void {\r\n const once = (event: Event) => {\r\n cb(event)\r\n el.removeEventListener(eventName, once, options)\r\n }\r\n\r\n el.addEventListener(eventName, once, options)\r\n}\r\n\r\nlet passiveSupported = false\r\ntry {\r\n if (typeof window !== 'undefined') {\r\n const testListenerOpts = Object.defineProperty({}, 'passive', {\r\n get: () => {\r\n passiveSupported = true\r\n },\r\n })\r\n\r\n window.addEventListener('testListener' as any, testListenerOpts as any, testListenerOpts)\r\n window.removeEventListener('testListener' as any, testListenerOpts as any, testListenerOpts)\r\n }\r\n} catch (e) { console.warn(e) } /* eslint-disable-line no-console */\r\nexport { passiveSupported }\r\n\r\nexport function addPassiveEventListener (\r\n el: EventTarget,\r\n event: string,\r\n cb: ((e: any) => void),\r\n options: {}\r\n): void {\r\n el.addEventListener(event, cb, passiveSupported ? options : false)\r\n}\r\n\r\nexport function getZIndex (el?: Element | null): number {\r\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return 0\r\n\r\n const index = +window.getComputedStyle(el).getPropertyValue('z-index')\r\n\r\n if (!index) return getZIndex(el.parentNode as Element)\r\n return index\r\n}\r\n\r\n// KeyboardEvent.keyCode aliases\r\nexport const keyCodes = Object.freeze({\r\n enter: 13,\r\n tab: 9,\r\n delete: 46,\r\n esc: 27,\r\n space: 32,\r\n up: 38,\r\n down: 40,\r\n left: 37,\r\n right: 39,\r\n end: 35,\r\n home: 36,\r\n del: 46,\r\n backspace: 8,\r\n insert: 45,\r\n pageup: 33,\r\n pagedown: 34,\r\n shift: 16,\r\n})\r\n\r\n/** Polyfill for Event.prototype.composedPath */\r\nexport function composedPath (e: Event): EventTarget[] {\r\n if (e.composedPath) return e.composedPath()\r\n\r\n const path = []\r\n let el = e.target as Element\r\n\r\n while (el) {\r\n path.push(el)\r\n\r\n if (el.tagName === 'HTML') {\r\n path.push(document)\r\n path.push(window)\r\n\r\n return path\r\n }\r\n\r\n el = el.parentElement!\r\n }\r\n return path\r\n}\r\n\r\nexport function getBlazorId(el) {\r\n if (!el) {\r\n return null;\r\n }\r\n let _bl_ = el.getAttributeNames().find(a => a.startsWith('_bl_'))\r\n if (_bl_) {\r\n _bl_ = _bl_.substring(4);\r\n }\r\n\r\n return _bl_;\r\n}\r\n\r\nexport function getElementSelector(el) {\r\n if (!(el instanceof Element))\r\n return;\r\n var path = [];\r\n while (el.nodeType === Node.ELEMENT_NODE) {\r\n var selector = el.nodeName.toLowerCase();\r\n if (el.id) {\r\n selector = '#' + el.id;\r\n path.unshift(selector);\r\n break;\r\n } else {\r\n var sib = el, nth = 1;\r\n while (sib = sib.previousElementSibling) {\r\n if (sib.nodeName.toLowerCase() == selector)\r\n nth++;\r\n }\r\n if (nth != 1)\r\n selector += \":nth-of-type(\" + nth + \")\";\r\n }\r\n path.unshift(selector);\r\n el = el.parentNode;\r\n }\r\n return path.join(\" > \");\r\n}\r\n\r\nexport function getEventTarget(target: HTMLElement | EventTarget) {\r\n const el = target as HTMLElement;\r\n const eventTarget: MbEventTarget = {};\r\n const elementReferenceId = el\r\n .getAttributeNames()\r\n .find((a) => a.startsWith(\"_bl_\"));\r\n if (elementReferenceId) {\r\n eventTarget.elementReferenceId = elementReferenceId;\r\n eventTarget.selector = `[${elementReferenceId}]`;\r\n } else {\r\n eventTarget.selector = getElementSelector(el);\r\n }\r\n\r\n eventTarget.class = el.getAttribute(\"class\");\r\n\r\n return eventTarget;\r\n}\r\n\r\nexport function getDom(elOrString: Element | string | undefined) {\r\n let element: HTMLElement;\r\n\r\n try {\r\n if (!elOrString) {\r\n element = document.body;\r\n } else if (typeof elOrString === \"string\") {\r\n if (elOrString === \"document\") {\r\n element = document.documentElement;\r\n } else if (elOrString.indexOf(\"__.__\") > 0) {\r\n // for example: el__.__parentElement\r\n let array = elOrString.split(\"__.__\");\r\n let i = 0;\r\n let el = document.querySelector(array[i++]);\r\n\r\n if (el) {\r\n while (array[i]) {\r\n el = el[array[i]];\r\n i++;\r\n }\r\n }\r\n\r\n if (el instanceof HTMLElement) {\r\n element = el;\r\n }\r\n } else {\r\n element = document.querySelector(elOrString);\r\n }\r\n } else {\r\n element = elOrString as HTMLElement;\r\n }\r\n\r\n } catch (error) {\r\n console.error(error)\r\n }\r\n\r\n return element;\r\n}\r\n\r\nexport const canUseDom = !!(\r\n typeof window !== 'undefined' &&\r\n typeof document !== 'undefined' &&\r\n window.document &&\r\n window.document.createElement\r\n)\r\n\r\nexport function convertToUnit (str: number, unit?: string): string\r\nexport function convertToUnit (str: string | number | null | undefined, unit?: string): string | undefined\r\nexport function convertToUnit (str: string | number | null | undefined, unit = 'px'): string | undefined {\r\n if (str == null || str === '') {\r\n return undefined\r\n } else if (isNaN(+str!)) {\r\n return String(str)\r\n } else if (!isFinite(+str!)) {\r\n return undefined\r\n } else {\r\n return `${Number(str)}${unit}`\r\n }\r\n}","// see https://github.com/dotnet/aspnetcore/blob/main/src/Components/Web.JS/src/Rendering/Events/EventTypes.ts\r\n// updated at 2022/08/31\r\n\r\nexport const touchEvents = [\r\n \"touchcancel\",\r\n \"touchend\",\r\n \"touchmove\",\r\n \"touchenter\",\r\n \"touchleave\",\r\n \"touchstart\",\r\n];\r\n\r\nexport function parseMouseEvent(event: MouseEvent): Blazor.MouseEventArgs {\r\n return {\r\n detail: event.detail,\r\n screenX: event.screenX,\r\n screenY: event.screenY,\r\n clientX: event.clientX,\r\n clientY: event.clientY,\r\n offsetX: event.offsetX,\r\n offsetY: event.offsetY,\r\n pageX: event.pageX,\r\n pageY: event.pageY,\r\n button: event.button,\r\n buttons: event.buttons,\r\n ctrlKey: event.ctrlKey,\r\n shiftKey: event.shiftKey,\r\n altKey: event.altKey,\r\n metaKey: event.metaKey,\r\n type: event.type,\r\n } as Blazor.MouseEventArgs;\r\n}\r\n\r\nexport function parseTouchEvent(event: TouchEvent): Blazor.TouchEventArgs {\r\n return {\r\n detail: event.detail,\r\n touches: parseTouch(event.touches),\r\n targetTouches: parseTouch(event.targetTouches),\r\n changedTouches: parseTouch(event.changedTouches),\r\n ctrlKey: event.ctrlKey,\r\n shiftKey: event.shiftKey,\r\n altKey: event.altKey,\r\n metaKey: event.metaKey,\r\n type: event.type,\r\n };\r\n}\r\n\r\nfunction parseTouch(touchList: TouchList): Blazor.TouchPoint[] {\r\n const touches: Blazor.TouchPoint[] = [];\r\n\r\n for (let i = 0; i < touchList.length; i++) {\r\n const touch = touchList[i];\r\n touches.push({\r\n identifier: touch.identifier,\r\n clientX: touch.clientX,\r\n clientY: touch.clientY,\r\n screenX: touch.screenX,\r\n screenY: touch.screenY,\r\n pageX: touch.pageX,\r\n pageY: touch.pageY,\r\n });\r\n }\r\n return touches;\r\n}\r\n\r\nexport function parseChangeEvent(event: Event): Blazor.ChangeEventArgs {\r\n const element = event.target as Element;\r\n if (isTimeBasedInput(element)) {\r\n const normalizedValue = normalizeTimeBasedValue(element);\r\n return { value: normalizedValue };\r\n } else if (isMultipleSelectInput(element)) {\r\n const selectElement = element as HTMLSelectElement;\r\n const selectedValues = Array.from(selectElement.options)\r\n .filter((option) => option.selected)\r\n .map((option) => option.value);\r\n return { value: selectedValues };\r\n } else {\r\n const targetIsCheckbox = isCheckbox(element);\r\n const newValue = targetIsCheckbox ? !!element[\"checked\"] : element[\"value\"];\r\n return { value: newValue };\r\n }\r\n}\r\n\r\nexport function parseDragEvent(event: DragEvent): Blazor.DragEventArgs {\r\n return {\r\n ...parseMouseEvent(event),\r\n dataTransfer: event.dataTransfer ? {\r\n dropEffect: event.dataTransfer.dropEffect,\r\n effectAllowed: event.dataTransfer.effectAllowed,\r\n files: Array.from(event.dataTransfer.files).map(f => f.name),\r\n items: Array.from(event.dataTransfer.items).map(i => ({ kind: i.kind, type: i.type })),\r\n types: event.dataTransfer.types\r\n } : null,\r\n };\r\n}\r\n\r\nfunction isTimeBasedInput(element: Element): element is HTMLInputElement {\r\n return timeBasedInputs.indexOf(element.getAttribute(\"type\")!) !== -1;\r\n}\r\n\r\nconst timeBasedInputs = [\"date\", \"datetime-local\", \"month\", \"time\", \"week\"];\r\n\r\nfunction normalizeTimeBasedValue(element: HTMLInputElement): string {\r\n const value = element.value;\r\n const type = element.type;\r\n switch (type) {\r\n case \"date\":\r\n case \"month\":\r\n return value;\r\n case \"datetime-local\":\r\n return value.length === 16 ? value + \":00\" : value; // Convert yyyy-MM-ddTHH:mm to yyyy-MM-ddTHH:mm:00\r\n case \"time\":\r\n return value.length === 5 ? value + \":00\" : value; // Convert hh:mm to hh:mm:00\r\n case \"week\":\r\n // For now we are not going to normalize input type week as it is not trivial\r\n return value;\r\n }\r\n\r\n throw new Error(`Invalid element type '${type}'.`);\r\n}\r\n\r\nfunction isMultipleSelectInput(element: Element): element is HTMLSelectElement {\r\n return (\r\n element instanceof HTMLSelectElement && element.type === \"select-multiple\"\r\n );\r\n}\r\n\r\nfunction isCheckbox(element: Element | null): boolean {\r\n return (\r\n !!element &&\r\n element.tagName === \"INPUT\" &&\r\n element.getAttribute(\"type\") === \"checkbox\"\r\n );\r\n}\r\n","import { getEventTarget } from \"../utils/helper\";\r\nimport { parseDragEvent, parseMouseEvent, parseTouchEvent } from \"./EventType\";\r\n\r\nexport function registerExtraMouseEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: e => createSharedEventArgs(\"mouse\", e)\r\n })\r\n }\r\n}\r\n\r\nexport function registerExtraTouchEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: e => createSharedEventArgs(\"touch\", e)\r\n })\r\n }\r\n}\r\n\r\nexport function registerExtraDropEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n createEventArgs: (e: DragEvent) => {\r\n const eventArgs = parseDragEvent(e);\r\n const value = e.dataTransfer.getData('data-value');\r\n const offsetX = e.dataTransfer.getData('offsetX');\r\n const offsetY = e.dataTransfer.getData('offsetY');\r\n\r\n eventArgs.dataTransfer['data'] = {\r\n value,\r\n offsetX: Number(offsetX),\r\n offsetY: Number(offsetY)\r\n }\r\n\r\n return eventArgs;\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function createSharedEventArgs(type: \"mouse\" | \"touch\", e: Event,) {\r\n let args = { target: {} }\r\n if (type === 'mouse') {\r\n args = {\r\n ...args,\r\n ...parseMouseEvent(e as MouseEvent)\r\n }\r\n } else if (type === 'touch') {\r\n args = {\r\n ...args,\r\n ...parseTouchEvent(e as TouchEvent)\r\n }\r\n }\r\n\r\n args.target = getEventTarget(e.target);\r\n\r\n return args;\r\n}","import { createSharedEventArgs } from \"events/extra\";\r\nimport { addOnceEventListener, passiveSupported } from \"utils/helper\";\r\n\r\nlet sliderHandleId = 0;\r\nconst sliderHandlesById = {};\r\n\r\nexport function registerSliderEvents(\r\n el: HTMLElement,\r\n dotnetHelper: DotNet.DotNetObject\r\n) {\r\n sliderHandlesById[sliderHandleId] = onSliderMouseDown;\r\n\r\n const app = document.querySelector(\"[data-app]\");\r\n\r\n const mouseUpOptions = passiveSupported\r\n ? { passive: true, capture: true }\r\n : true;\r\n\r\n const mouseMoveOptions = passiveSupported ? { passive: true } : false;\r\n\r\n el.addEventListener(\"mousedown\", onSliderMouseDown);\r\n el.addEventListener(\"touchstart\", onSliderMouseDown);\r\n\r\n return sliderHandleId++;\r\n\r\n async function onSliderMouseDown(e: MouseEvent | TouchEvent) {\r\n const isTouchEvent = \"touches\" in e;\r\n\r\n onMouseMove(e);\r\n\r\n app.addEventListener(\r\n isTouchEvent ? \"touchmove\" : \"mousemove\",\r\n onMouseMove,\r\n mouseMoveOptions\r\n );\r\n addOnceEventListener(\r\n app,\r\n isTouchEvent ? \"touchend\" : \"mouseup\",\r\n onSliderMouseUp,\r\n mouseUpOptions\r\n );\r\n\r\n if (isTouchEvent) {\r\n await dotnetHelper.invokeMethodAsync(\r\n \"OnTouchStartInternal\",\r\n createSharedEventArgs(\"touch\", e)\r\n );\r\n } else {\r\n await dotnetHelper.invokeMethodAsync(\r\n \"OnMouseDownInternal\",\r\n createSharedEventArgs(\"mouse\", e)\r\n );\r\n }\r\n }\r\n\r\n async function onSliderMouseUp(e: Event) {\r\n e.stopPropagation();\r\n\r\n app.removeEventListener(\"touchmove\", onMouseMove, mouseMoveOptions as any);\r\n app.removeEventListener(\"mousemove\", onMouseMove, mouseMoveOptions as any);\r\n\r\n await dotnetHelper.invokeMethodAsync(\"OnMouseUpInternal\");\r\n }\r\n\r\n async function onMouseMove(e: MouseEvent | TouchEvent) {\r\n const isTouchEvent = \"touches\" in e;\r\n const payload = {\r\n type: e.type,\r\n clientX: isTouchEvent ? e.touches[0].clientX : e.clientX,\r\n clientY: isTouchEvent ? e.touches[0].clientY : e.clientY,\r\n };\r\n\r\n await dotnetHelper.invokeMethodAsync(\"OnMouseMoveInternal\", payload);\r\n }\r\n}\r\n\r\nexport function unregisterSliderEvents(el: HTMLElement, id: number) {\r\n const onSliderMouseDown = sliderHandlesById[id];\r\n el.removeEventListener(\"mousedown\", onSliderMouseDown);\r\n el.removeEventListener(\"touchstart\", onSliderMouseDown);\r\n\r\n delete sliderHandlesById[id];\r\n}\r\n","var functionDebounce = debounce;\n\nfunction debounce(fn, wait, callFirst) {\n var timeout = null;\n var debouncedFn = null;\n\n var clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n\n debouncedFn = null;\n timeout = null;\n }\n };\n\n var flush = function() {\n var call = debouncedFn;\n clear();\n\n if (call) {\n call();\n }\n };\n\n var debounceWrapper = function() {\n if (!wait) {\n return fn.apply(this, arguments);\n }\n\n var context = this;\n var args = arguments;\n var callNow = callFirst && !timeout;\n clear();\n\n debouncedFn = function() {\n fn.apply(context, args);\n };\n\n timeout = setTimeout(function() {\n timeout = null;\n\n if (!callNow) {\n var call = debouncedFn;\n debouncedFn = null;\n\n return call();\n }\n }, wait);\n\n if (callNow) {\n return debouncedFn();\n }\n };\n\n debounceWrapper.cancel = clear;\n debounceWrapper.flush = flush;\n\n return debounceWrapper;\n}\n\nexport {functionDebounce as default};\n","var functionThrottle = throttle;\n\nfunction throttle(fn, interval, options) {\n var timeoutId = null;\n var throttledFn = null;\n var leading = (options && options.leading);\n var trailing = (options && options.trailing);\n\n if (leading == null) {\n leading = true; // default\n }\n\n if (trailing == null) {\n trailing = !leading; //default\n }\n\n if (leading == true) {\n trailing = false; // forced because there should be invocation per call\n }\n\n var cancel = function() {\n if (timeoutId) {\n clearTimeout(timeoutId);\n timeoutId = null;\n }\n };\n\n var flush = function() {\n var call = throttledFn;\n cancel();\n\n if (call) {\n call();\n }\n };\n\n var throttleWrapper = function() {\n var callNow = leading && !timeoutId;\n var context = this;\n var args = arguments;\n\n throttledFn = function() {\n return fn.apply(context, args);\n };\n\n if (!timeoutId) {\n timeoutId = setTimeout(function() {\n timeoutId = null;\n\n if (trailing) {\n return throttledFn();\n }\n }, interval);\n }\n\n if (callNow) {\n callNow = false;\n return throttledFn();\n }\n };\n\n throttleWrapper.cancel = cancel;\n throttleWrapper.flush = flush;\n\n return throttleWrapper;\n}\n\nexport {functionThrottle as default};\n","import { registerExtraDropEvent, registerExtraMouseEvent, registerExtraTouchEvent } from \"./extra\";\r\n\r\nexport function registerExtraEvents() {\r\n registerExtraMouseEvent(\"exmousedown\", \"mousedown\");\r\n registerExtraMouseEvent(\"exmouseup\", \"mouseup\");\r\n registerExtraMouseEvent(\"exclick\", \"click\");\r\n registerExtraMouseEvent(\"exmouseleave\", \"mouseleave\");\r\n registerExtraMouseEvent(\"exmouseenter\", \"mouseenter\");\r\n registerExtraMouseEvent(\"exmousemove\", \"mousemove\");\r\n registerExtraTouchEvent(\"extouchstart\", \"touchstart\");\r\n registerEvent(\"transitionend\", \"transitionend\")\r\n registerExtraDropEvent(\"exdrop\", \"drop\");\r\n}\r\n\r\nfunction registerEvent(eventType: string, eventName: string) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(eventType, {\r\n browserEventName: eventName,\r\n })\r\n }\r\n}","import { keyCodes } from \"utils/helper\";\r\n\r\ntype RippleEvent = (MouseEvent | TouchEvent | KeyboardEvent) & {\r\n rippleStop?: boolean;\r\n};\r\n\r\nconst DELAY_RIPPLE = 80;\r\n\r\nfunction transform(el: HTMLElement, value: string) {\r\n el.style.transform = value;\r\n el.style.webkitTransform = value;\r\n}\r\n\r\nexport interface RippleOptions {\r\n class?: string;\r\n center?: boolean;\r\n circle?: boolean;\r\n}\r\n\r\nfunction isTouchEvent(e: RippleEvent): e is TouchEvent {\r\n return e.constructor.name === \"TouchEvent\";\r\n}\r\n\r\nfunction isKeyboardEvent(e: RippleEvent): e is KeyboardEvent {\r\n return e.constructor.name === \"KeyboardEvent\";\r\n}\r\n\r\nconst calculate = (\r\n e: RippleEvent,\r\n el: HTMLElement,\r\n value: RippleOptions = {}\r\n) => {\r\n let localX = 0;\r\n let localY = 0;\r\n\r\n if (!isKeyboardEvent(e)) {\r\n const offset = el.getBoundingClientRect();\r\n const target = isTouchEvent(e) ? e.touches[e.touches.length - 1] : e;\r\n\r\n localX = target.clientX - offset.left;\r\n localY = target.clientY - offset.top;\r\n }\r\n\r\n let radius = 0;\r\n let scale = 0.3;\r\n if (el._ripple && el._ripple.circle) {\r\n scale = 0.15;\r\n radius = el.clientWidth / 2;\r\n radius = value.center\r\n ? radius\r\n : radius + Math.sqrt((localX - radius) ** 2 + (localY - radius) ** 2) / 4;\r\n } else {\r\n radius = Math.sqrt(el.clientWidth ** 2 + el.clientHeight ** 2) / 2;\r\n }\r\n\r\n const centerX = `${(el.clientWidth - radius * 2) / 2}px`;\r\n const centerY = `${(el.clientHeight - radius * 2) / 2}px`;\r\n\r\n const x = value.center ? centerX : `${localX - radius}px`;\r\n const y = value.center ? centerY : `${localY - radius}px`;\r\n\r\n return { radius, scale, x, y, centerX, centerY };\r\n};\r\n\r\nconst ripples = {\r\n /* eslint-disable max-statements */\r\n show(e: RippleEvent, el: HTMLElement, value: RippleOptions = {}) {\r\n if (!el._ripple || !el._ripple.enabled) {\r\n return;\r\n }\r\n\r\n const container = document.createElement(\"span\");\r\n const animation = document.createElement(\"span\");\r\n\r\n container.appendChild(animation);\r\n container.className = \"m-ripple__container\";\r\n\r\n if (value.class) {\r\n container.className += ` ${value.class}`;\r\n }\r\n\r\n const { radius, scale, x, y, centerX, centerY } = calculate(e, el, value);\r\n\r\n const size = `${radius * 2}px`;\r\n animation.className = \"m-ripple__animation\";\r\n animation.style.width = size;\r\n animation.style.height = size;\r\n\r\n el.appendChild(container);\r\n\r\n const computed = window.getComputedStyle(el);\r\n if (computed && computed.position === \"static\") {\r\n el.style.position = \"relative\";\r\n el.dataset.previousPosition = \"static\";\r\n }\r\n\r\n animation.classList.add(\"m-ripple__animation--enter\");\r\n animation.classList.add(\"m-ripple__animation--visible\");\r\n transform(\r\n animation,\r\n `translate(${x}, ${y}) scale3d(${scale},${scale},${scale})`\r\n );\r\n animation.dataset.activated = String(performance.now());\r\n\r\n setTimeout(() => {\r\n animation.classList.remove(\"m-ripple__animation--enter\");\r\n animation.classList.add(\"m-ripple__animation--in\");\r\n transform(animation, `translate(${centerX}, ${centerY}) scale3d(1,1,1)`);\r\n }, 0);\r\n },\r\n\r\n hide(el: HTMLElement | null) {\r\n if (!el || !el._ripple || !el._ripple.enabled) return;\r\n\r\n const ripples = el.getElementsByClassName(\"m-ripple__animation\");\r\n\r\n if (ripples.length === 0) return;\r\n const animation = ripples[ripples.length - 1];\r\n\r\n if (animation.dataset.isHiding) return;\r\n else animation.dataset.isHiding = \"true\";\r\n\r\n const diff = performance.now() - Number(animation.dataset.activated);\r\n const delay = Math.max(250 - diff, 0);\r\n\r\n setTimeout(() => {\r\n animation.classList.remove(\"m-ripple__animation--in\");\r\n animation.classList.add(\"m-ripple__animation--out\");\r\n\r\n setTimeout(() => {\r\n const ripples = el.getElementsByClassName(\"m-ripple__animation\");\r\n if (ripples.length === 1 && el.dataset.previousPosition) {\r\n el.style.position = el.dataset.previousPosition;\r\n delete el.dataset.previousPosition;\r\n }\r\n\r\n if (animation.parentNode?.parentNode === el)\r\n el.removeChild(animation.parentNode);\r\n }, 300);\r\n }, delay);\r\n },\r\n};\r\n\r\nfunction rippleShow(e: RippleEvent) {\r\n const value: RippleOptions = {};\r\n const element = e.currentTarget as HTMLElement;\r\n\r\n if (!element || !element._ripple || element._ripple.touched || e.rippleStop)\r\n return;\r\n\r\n // Don't allow the event to trigger ripples on any other elements\r\n e.rippleStop = true;\r\n\r\n if (isTouchEvent(e)) {\r\n element._ripple.touched = true;\r\n element._ripple.isTouch = true;\r\n } else {\r\n // It's possible for touch events to fire\r\n // as mouse events on Android/iOS, this\r\n // will skip the event call if it has\r\n // already been registered as touch\r\n if (element._ripple.isTouch) return;\r\n }\r\n value.center = element._ripple.centered || isKeyboardEvent(e);\r\n if (element._ripple.class) {\r\n value.class = element._ripple.class;\r\n }\r\n\r\n if (isTouchEvent(e)) {\r\n // already queued that shows or hides the ripple\r\n if (element._ripple.showTimerCommit) return;\r\n\r\n element._ripple.showTimerCommit = () => {\r\n ripples.show(e, element, value);\r\n };\r\n element._ripple.showTimer = window.setTimeout(() => {\r\n if (element && element._ripple && element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit();\r\n element._ripple.showTimerCommit = null;\r\n }\r\n }, DELAY_RIPPLE);\r\n } else {\r\n ripples.show(e, element, value);\r\n }\r\n}\r\n\r\nfunction rippleHide(e: Event) {\r\n const element = e.currentTarget as HTMLElement | null;\r\n if (!element || !element._ripple) return;\r\n\r\n window.clearTimeout(element._ripple.showTimer);\r\n\r\n // The touch interaction occurs before the show timer is triggered.\r\n // We still want to show ripple effect.\r\n if (e.type === \"touchend\" && element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit();\r\n element._ripple.showTimerCommit = null;\r\n\r\n // re-queue ripple hiding\r\n var timerHandler: TimerHandler = () => rippleHide(e);\r\n element._ripple.showTimer = setTimeout(timerHandler);\r\n return;\r\n }\r\n\r\n window.setTimeout(() => {\r\n if (element._ripple) {\r\n element._ripple.touched = false;\r\n }\r\n });\r\n ripples.hide(element);\r\n}\r\n\r\nfunction rippleCancelShow(e: MouseEvent | TouchEvent) {\r\n const element = e.currentTarget as HTMLElement | undefined;\r\n\r\n if (!element || !element._ripple) return;\r\n\r\n if (element._ripple.showTimerCommit) {\r\n element._ripple.showTimerCommit = null;\r\n }\r\n\r\n window.clearTimeout(element._ripple.showTimer);\r\n}\r\n\r\nfunction keyboardRippleShow(e: KeyboardEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n if (\r\n !target[\"keyboardRipple\"] &&\r\n (e.keyCode === keyCodes.enter || e.keyCode === keyCodes.space)\r\n ) {\r\n target[\"keyboardRipple\"] = true;\r\n rippleShow(e);\r\n }\r\n}\r\n\r\nfunction keyboardRippleHide(e: KeyboardEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n target[\"keyboardRipple\"] = false;\r\n rippleHide(e);\r\n}\r\n\r\nfunction focusRippleHide(e: FocusEvent) {\r\n const target = e.currentTarget as HTMLElement;\r\n if (target[\"keyboardRipple\"] === true) {\r\n target[\"keyboardRipple\"] = false;\r\n rippleHide(e);\r\n }\r\n}\r\nexport function updateRipple(\r\n el: HTMLElement,\r\n options: RippleOptions | null,\r\n wasEnabled: boolean\r\n) {\r\n let enabled = false;\r\n if (options) {\r\n enabled = true;\r\n } else {\r\n ripples.hide(el);\r\n }\r\n\r\n const value = options || {};\r\n el._ripple = el._ripple || {};\r\n el._ripple.enabled = enabled;\r\n el._ripple = {\r\n ...el._ripple,\r\n centered: value.center,\r\n class: value.class,\r\n circle: value.circle,\r\n };\r\n\r\n if (enabled && !wasEnabled) {\r\n el.addEventListener(\"touchstart\", rippleShow, { passive: true });\r\n el.addEventListener(\"touchend\", rippleHide, { passive: true });\r\n el.addEventListener(\"touchmove\", rippleCancelShow, { passive: true });\r\n el.addEventListener(\"touchcancel\", rippleHide);\r\n\r\n el.addEventListener(\"mousedown\", rippleShow);\r\n el.addEventListener(\"mouseup\", rippleHide);\r\n el.addEventListener(\"mouseleave\", rippleHide);\r\n\r\n el.addEventListener(\"keydown\", keyboardRippleShow);\r\n el.addEventListener(\"keyup\", keyboardRippleHide);\r\n\r\n el.addEventListener(\"blur\", focusRippleHide);\r\n\r\n // Anchor tags can be dragged, causes other hides to fail - #1537\r\n el.addEventListener(\"dragstart\", rippleHide, { passive: true });\r\n } else if (!enabled && wasEnabled) {\r\n removeListeners(el);\r\n }\r\n}\r\n\r\nexport function removeListeners(el: HTMLElement) {\r\n el.removeEventListener(\"mousedown\", rippleShow);\r\n el.removeEventListener(\"touchstart\", rippleShow);\r\n el.removeEventListener(\"touchend\", rippleHide);\r\n el.removeEventListener(\"touchmove\", rippleCancelShow);\r\n el.removeEventListener(\"touchcancel\", rippleHide);\r\n el.removeEventListener(\"mouseup\", rippleHide);\r\n el.removeEventListener(\"mouseleave\", rippleHide);\r\n el.removeEventListener(\"keydown\", keyboardRippleShow);\r\n el.removeEventListener(\"keyup\", keyboardRippleHide);\r\n el.removeEventListener(\"dragstart\", rippleHide);\r\n el.removeEventListener(\"blur\", focusRippleHide);\r\n el._ripple.enabled = false;\r\n}\r\n","import debounceIt from \"just-debounce-it\";\r\nimport throttle from \"just-throttle\";\r\n\r\nimport { parseDragEvent, parseTouchEvent, touchEvents } from \"./events/EventType\";\r\nimport { registerExtraEvents } from \"./events/index\";\r\nimport registerRippleObserver from \"./ripple\";\r\nimport { canUseDom, getBlazorId, getDom, getElementSelector } from \"./utils/helper\";\r\n\r\nwindow.onload = function () {\r\n registerExtraEvents();\r\n registerPasteWithData(\"pastewithdata\")\r\n registerRippleObserver();\r\n}\r\n\r\nexport function getZIndex(el?: Element | null): number {\r\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return 0\r\n\r\n const index = +window.getComputedStyle(el).getPropertyValue('z-index')\r\n\r\n if (!index) return getZIndex(el.parentNode as Element)\r\n return index\r\n}\r\n\r\nexport function getDomInfo(element, selector = \"body\") {\r\n var result = {};\r\n\r\n var dom = getDom(element);\r\n\r\n if (dom) {\r\n if (dom.style && dom.style[\"display\"] === \"none\") {\r\n // clone and set display not none because\r\n // element with display:none can not get the dom info\r\n var cloned = dom.cloneNode(true) as HTMLElement;\r\n cloned.style[\"display\"] = \"inline-block\";\r\n cloned.style[\"z-index\"] = -1000;\r\n dom.parentElement.appendChild(cloned);\r\n\r\n result = getDomInfoObj(cloned);\r\n\r\n dom.parentElement.removeChild(cloned);\r\n } else {\r\n result = getDomInfoObj(dom);\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\nfunction getDomInfoObj(dom) {\r\n var result = {};\r\n result[\"offsetTop\"] = dom.offsetTop || 0;\r\n result[\"offsetLeft\"] = dom.offsetLeft || 0;\r\n result[\"scrollHeight\"] = dom.scrollHeight || 0;\r\n result[\"scrollWidth\"] = dom.scrollWidth || 0;\r\n result[\"scrollLeft\"] = dom.scrollLeft || 0;\r\n result[\"scrollTop\"] = dom.scrollTop || 0;\r\n result[\"clientTop\"] = dom.clientTop || 0;\r\n result[\"clientLeft\"] = dom.clientLeft || 0;\r\n result[\"clientHeight\"] = dom.clientHeight || 0;\r\n result[\"clientWidth\"] = dom.clientWidth || 0;\r\n var position = getElementPos(dom);\r\n result[\"offsetWidth\"] = Math.round(position.offsetWidth) || 0;\r\n result[\"offsetHeight\"] = Math.round(position.offsetHeight) || 0;\r\n result[\"relativeTop\"] = Math.round(position.relativeTop) || 0;\r\n result[\"relativeBottom\"] = Math.round(position.relativeBottom) || 0;\r\n result[\"relativeLeft\"] = Math.round(position.relativeLeft) || 0;\r\n result[\"relativeRight\"] = Math.round(position.relativeRight) || 0;\r\n result[\"absoluteLeft\"] = Math.round(position.absoluteLeft) || 0;\r\n result[\"absoluteTop\"] = Math.round(position.absoluteTop) || 0;\r\n return result;\r\n}\r\n\r\nfunction getElementPos(element) {\r\n var res: any = new Object();\r\n res.x = 0;\r\n res.y = 0;\r\n if (element !== null) {\r\n if (element.getBoundingClientRect) {\r\n var viewportElement = document.documentElement;\r\n var box = element.getBoundingClientRect();\r\n var scrollLeft = viewportElement.scrollLeft;\r\n var scrollTop = viewportElement.scrollTop;\r\n\r\n res.offsetWidth = box.width;\r\n res.offsetHeight = box.height;\r\n res.relativeTop = box.top;\r\n res.relativeBottom = box.bottom;\r\n res.relativeLeft = box.left;\r\n res.relativeRight = box.right;\r\n res.absoluteLeft = box.left + scrollLeft;\r\n res.absoluteTop = box.top + scrollTop;\r\n }\r\n }\r\n return res;\r\n}\r\n\r\nexport function triggerEvent(element, eventType, eventName, stopPropagation) {\r\n var dom = getDom(element);\r\n var evt = document.createEvent(eventType);\r\n evt.initEvent(eventName);\r\n\r\n if (stopPropagation) {\r\n evt.stopPropagation();\r\n }\r\n\r\n return dom.dispatchEvent(evt);\r\n}\r\n\r\nexport function setProperty(element, name, value) {\r\n var dom = getDom(element);\r\n dom[name] = value;\r\n}\r\n\r\nexport function getBoundingClientRect(element, attach = \"body\") {\r\n let dom = getDom(element);\r\n\r\n var result = {};\r\n\r\n if (dom && dom.getBoundingClientRect) {\r\n if (dom.style && dom.style[\"display\"] === \"none\") {\r\n var cloned = dom.cloneNode(true) as HTMLElement;\r\n cloned.style[\"display\"] = \"inline-block\";\r\n cloned.style[\"z-index\"] = -1000;\r\n document.querySelector(attach)?.appendChild(cloned);\r\n\r\n result = cloned.getBoundingClientRect();\r\n\r\n document.querySelector(attach)?.removeChild(cloned);\r\n } else {\r\n result = dom.getBoundingClientRect();\r\n }\r\n }\r\n\r\n return result;\r\n}\r\n\r\nvar htmlElementEventListenerConfigs: { [prop: string]: HtmlElementEventListenerConfig[] } = {}\r\n\r\ntype HtmlElementEventListenerConfig = {\r\n listener?: (args: any) => void;\r\n options?: any;\r\n handle?: DotNet.DotNetObject;\r\n}\r\n\r\nexport function addHtmlElementEventListener(\r\n selector: \"window\" | \"document\" | K,\r\n type: string,\r\n invoker: DotNet.DotNetObject,\r\n options?: boolean | AddEventListenerOptions,\r\n extras?: Partial> & { relatedTarget?: string, throttle?: number, debounce?: number, key?: string }) {\r\n let htmlElement: HTMLElement | Window\r\n\r\n if (selector == \"window\") {\r\n htmlElement = window;\r\n } else if (selector == \"document\") {\r\n htmlElement = document.documentElement;\r\n } else {\r\n htmlElement = document.querySelector(selector);\r\n }\r\n\r\n var key = extras?.key || `${selector}:${type}`;\r\n\r\n //save for remove\r\n const config: HtmlElementEventListenerConfig = {};\r\n\r\n var listener = (e: any): void => {\r\n if (extras?.stopPropagation) {\r\n e.stopPropagation();\r\n }\r\n\r\n if ((typeof e.cancelable !== \"boolean\" || e.cancelable) && extras?.preventDefault) {\r\n e.preventDefault();\r\n }\r\n\r\n // mouseleave relatedTarget\r\n if (extras?.relatedTarget && document.querySelector(extras.relatedTarget)?.contains(e.relatedTarget)) {\r\n return;\r\n }\r\n\r\n let obj: any = {}\r\n\r\n if (touchEvents.includes(e.type)) {\r\n obj = parseTouchEvent(e)\r\n } else {\r\n for (var k in e) {\r\n if (typeof e[k] == 'string' || typeof e[k] == 'number') {\r\n obj[k] = e[k];\r\n }\r\n }\r\n }\r\n\r\n if (e.target && e.target !== window && e.target !== document) {\r\n obj.target = {}\r\n const target = e.target as HTMLElement;\r\n const elementReferenceId = target.getAttributeNames().find(a => a.startsWith('_bl_'));\r\n if (elementReferenceId) {\r\n obj.target['elementReferenceId'] = elementReferenceId\r\n obj.target['selector'] = `[${elementReferenceId}]`\r\n } else {\r\n obj.target['selector'] = getElementSelector(target)\r\n }\r\n\r\n obj.target['class'] = target.getAttribute('class')\r\n }\r\n\r\n invoker.invokeMethodAsync('Invoke', obj);\r\n };\r\n\r\n if (extras?.debounce && extras.debounce > 0) {\r\n config.listener = debounceIt(listener, extras.debounce)\r\n } else if (extras?.throttle && extras.throttle > 0) {\r\n config.listener = throttle(listener, extras.throttle, { trailing: true })\r\n } else {\r\n config.listener = listener;\r\n }\r\n\r\n config.options = options;\r\n config.handle = invoker\r\n\r\n if (htmlElementEventListenerConfigs[key]) {\r\n htmlElementEventListenerConfigs[key].push(config);\r\n } else {\r\n htmlElementEventListenerConfigs[key] = [config]\r\n }\r\n\r\n if (htmlElement) {\r\n htmlElement.addEventListener(type, config.listener, config.options);\r\n }\r\n}\r\n\r\nexport function removeHtmlElementEventListener(selector, type, k?: string) {\r\n let htmlElement: any\r\n\r\n if (selector == \"window\") {\r\n htmlElement = window;\r\n } else if (selector == \"document\") {\r\n htmlElement = document.documentElement;\r\n } else {\r\n htmlElement = document.querySelector(selector);\r\n }\r\n\r\n var k = k || `${selector}:${type}`;\r\n\r\n var configs = htmlElementEventListenerConfigs[k];\r\n\r\n if (configs) {\r\n configs.forEach(item => {\r\n item.handle.dispose();\r\n htmlElement?.removeEventListener(type, item.listener, item.options);\r\n });\r\n\r\n htmlElementEventListenerConfigs[k] = []\r\n }\r\n}\r\n\r\nexport function addMouseleaveEventListener(selector) {\r\n var htmlElement = document.querySelector(selector);\r\n if (htmlElement) {\r\n htmlElement.addEventListener()\r\n }\r\n}\r\n\r\nexport function contains(e1, e2) {\r\n const dom1 = getDom(e1);\r\n if (dom1 && dom1.contains) {\r\n return dom1.contains(getDom(e2));\r\n }\r\n return false;\r\n}\r\n\r\nexport function equalsOrContains(e1: any, e2: any) {\r\n const dom1 = getDom(e1);\r\n const dom2 = getDom(e2);\r\n return !!dom1 && dom1.contains && !!dom2 && (dom1 == dom2 || dom1.contains(dom2));\r\n}\r\n\r\nfunction fallbackCopyTextToClipboard(text) {\r\n var textArea = document.createElement(\"textarea\");\r\n textArea.value = text;\r\n\r\n // Avoid scrolling to bottom\r\n textArea.style.top = \"0\";\r\n textArea.style.left = \"0\";\r\n textArea.style.position = \"fixed\";\r\n\r\n document.body.appendChild(textArea);\r\n textArea.focus();\r\n textArea.select();\r\n\r\n try {\r\n var successful = document.execCommand('copy');\r\n var msg = successful ? 'successful' : 'unsuccessful';\r\n console.log('Fallback: Copying text command was ' + msg);\r\n } catch (err) {\r\n console.error('Fallback: Oops, unable to copy', err);\r\n }\r\n\r\n document.body.removeChild(textArea);\r\n}\r\n\r\nexport function copy(text) {\r\n if (!navigator.clipboard) {\r\n fallbackCopyTextToClipboard(text);\r\n return;\r\n }\r\n navigator.clipboard.writeText(text).then(function () {\r\n console.log('Async: Copying to clipboard was successful!');\r\n }, function (err) {\r\n console.error('Async: Could not copy text: ', err);\r\n });\r\n}\r\n\r\nexport function focus(selector, noScroll: boolean = false) {\r\n let dom = getDom(selector);\r\n if (!(dom instanceof HTMLElement))\r\n throw new Error(\"Unable to focus an invalid element.\");\r\n dom.focus({\r\n preventScroll: noScroll\r\n })\r\n}\r\n\r\nexport function select(selector) {\r\n let dom = getDom(selector);\r\n if (!(dom instanceof HTMLInputElement || dom instanceof HTMLTextAreaElement))\r\n throw new Error(\"Unable to select an invalid element\")\r\n dom.select()\r\n}\r\n\r\nexport function hasFocus(selector) {\r\n let dom = getDom(selector);\r\n return (document.activeElement === dom);\r\n}\r\n\r\nexport function blur(selector) {\r\n let dom = getDom(selector);\r\n dom.blur();\r\n}\r\n\r\nexport function log(text) {\r\n console.log(text);\r\n}\r\n\r\nexport function scrollIntoView(target, arg?: boolean | ScrollIntoViewOptions) {\r\n let dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n if (arg === null || arg == undefined) {\r\n dom.scrollIntoView();\r\n } else if (typeof arg === 'boolean') {\r\n dom.scrollIntoView(arg);\r\n } else {\r\n dom.scrollIntoView({\r\n block: arg.block == null ? undefined : arg.block,\r\n inline: arg.inline == null ? undefined : arg.inline,\r\n behavior: arg.behavior\r\n })\r\n }\r\n }\r\n}\r\n\r\nexport function scrollIntoParentView(\r\n target,\r\n inline = false,\r\n start = false,\r\n level = 1,\r\n behavior: ScrollBehavior = \"smooth\",\r\n) {\r\n const dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n let parent: HTMLElement = dom;\r\n while (level > 0) {\r\n parent = parent.parentElement;\r\n level--;\r\n if (!parent) {\r\n return;\r\n }\r\n }\r\n\r\n const options: ScrollToOptions = {\r\n behavior,\r\n };\r\n\r\n if (inline) {\r\n if (start) {\r\n options.left = dom.offsetLeft\r\n } else {\r\n const to = dom.offsetLeft - parent.offsetLeft;\r\n if (to - parent.scrollLeft < 0) {\r\n options.left = to;\r\n } else if (\r\n to + dom.offsetWidth - parent.scrollLeft >\r\n parent.offsetWidth\r\n ) {\r\n options.left = to + dom.offsetWidth - parent.offsetWidth;\r\n }\r\n }\r\n } else {\r\n if (start) {\r\n options.top = dom.offsetTop;\r\n } else {\r\n const to = dom.offsetTop - parent.offsetTop;\r\n if (to - parent.scrollTop < 0) {\r\n options.top = to;\r\n } else if (\r\n to + dom.offsetHeight - parent.scrollTop >\r\n parent.offsetHeight\r\n ) {\r\n options.top = to + dom.offsetHeight - parent.offsetHeight;\r\n }\r\n }\r\n }\r\n\r\n if (options.left || options.top) {\r\n parent.scrollTo(options);\r\n }\r\n }\r\n}\r\n\r\nexport function scrollTo(target, options: ScrollToOptions) {\r\n let dom = getDom(target);\r\n if (dom instanceof HTMLElement) {\r\n const o = {\r\n left: options.left === null ? undefined : options.left,\r\n top: options.top === null ? undefined : options.top,\r\n behavior: options.behavior\r\n }\r\n dom.scrollTo(o)\r\n }\r\n}\r\n\r\nexport function scrollToElement(target, offset: number, behavior?: ScrollBehavior) {\r\n const dom = getDom(target)\r\n if (!dom) return;\r\n const domPosition = dom.getBoundingClientRect().top;\r\n const offsetPosition = domPosition + window.pageYOffset - offset;\r\n window.scrollTo({\r\n top: offsetPosition,\r\n behavior: behavior\r\n })\r\n}\r\n\r\nexport function scrollToActiveElement(\r\n container,\r\n element = \".active\",\r\n position: \"center\" | number = \"center\"\r\n) {\r\n let containerEl: HTMLElement = getDom(container);\r\n\r\n let activeEl: HTMLElement\r\n if (typeof element === 'string') {\r\n activeEl = container.querySelector(element)\r\n }\r\n\r\n if (!containerEl || !activeEl) {\r\n return;\r\n }\r\n\r\n if (position === 'center') {\r\n containerEl.scrollTop = activeEl.offsetTop - containerEl.offsetHeight / 2 + activeEl.offsetHeight / 2;\r\n }\r\n else {\r\n containerEl.scrollTop = activeEl.offsetTop - position\r\n }\r\n}\r\n\r\nexport function addClsToFirstChild(element, className) {\r\n var dom = getDom(element);\r\n if (dom.firstElementChild) {\r\n dom.firstElementChild.classList.add(className);\r\n }\r\n}\r\n\r\nexport function removeClsFromFirstChild(element, className) {\r\n var dom = getDom(element);\r\n if (dom.firstElementChild) {\r\n dom.firstElementChild.classList.remove(className);\r\n }\r\n}\r\n\r\nexport function getAbsoluteTop(e) {\r\n var offset = e.offsetTop;\r\n if (e.offsetParent != null) {\r\n offset += getAbsoluteTop(e.offsetParent);\r\n }\r\n return offset;\r\n}\r\n\r\nexport function getAbsoluteLeft(e) {\r\n var offset = e.offsetLeft;\r\n if (e.offsetParent != null) {\r\n offset += getAbsoluteLeft(e.offsetParent);\r\n }\r\n return offset;\r\n}\r\n\r\nexport function addElementToBody(element) {\r\n document.body.appendChild(element);\r\n}\r\n\r\nexport function delElementFromBody(element) {\r\n document.body.removeChild(element);\r\n}\r\n\r\nexport function addElementTo(addElement, elementSelector) {\r\n let parent = getDom(elementSelector);\r\n if (parent && addElement) {\r\n parent.appendChild(addElement);\r\n }\r\n}\r\n\r\nexport function delElementFrom(delElement, elementSelector) {\r\n let parent = getDom(elementSelector);\r\n if (parent && delElement) {\r\n parent.removeChild(delElement);\r\n }\r\n}\r\n\r\nexport function getActiveElement() {\r\n let element = document.activeElement;\r\n let id = element.getAttribute(\"id\") || \"\";\r\n return id;\r\n}\r\n\r\nexport function focusDialog(selector: string, count: number = 0) {\r\n let ele = document.querySelector(selector);\r\n if (ele && !ele.hasAttribute(\"disabled\")) {\r\n setTimeout(() => {\r\n ele.focus();\r\n let curId = \"#\" + getActiveElement();\r\n if (curId !== selector) {\r\n if (count < 10) {\r\n focusDialog(selector, count + 1);\r\n }\r\n }\r\n }, 10);\r\n }\r\n}\r\n\r\nexport function getWindow() {\r\n return {\r\n innerWidth: window.innerWidth,\r\n innerHeight: window.innerHeight,\r\n pageXOffset: window.pageXOffset,\r\n pageYOffset: window.pageYOffset,\r\n isTop: window.scrollY == 0,\r\n isBottom: (window.scrollY + window.innerHeight) == document.body.clientHeight\r\n };\r\n}\r\n\r\nexport function getWindowAndDocumentProps(windowProps: string[] = [], documentProps: string[] = []) {\r\n const obj = {}\r\n\r\n if (windowProps) {\r\n windowProps.forEach(prop => obj[prop] = window[prop]);\r\n }\r\n\r\n if (documentProps) {\r\n documentProps.forEach(prop => obj[prop] = document.documentElement[prop]);\r\n }\r\n\r\n return obj\r\n}\r\n\r\nfunction debounce(func, wait, immediate) {\r\n var timeout;\r\n return () => {\r\n const context = this, args = arguments;\r\n const later = () => {\r\n timeout = null;\r\n if (!immediate) func.apply(this, args);\r\n };\r\n const callNow = immediate && !timeout;\r\n clearTimeout(timeout);\r\n timeout = setTimeout(later, wait);\r\n if (callNow) func.apply(context, args);\r\n };\r\n};\r\n\r\nexport function css(element: any, name: string | object, value: string | null = null) {\r\n var dom = getDom(element);\r\n if (typeof name === 'string') {\r\n dom.style[name] = value;\r\n } else {\r\n for (let key in name) {\r\n if (name.hasOwnProperty(key)) {\r\n dom.style[key] = name[key];\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport function addCls(selector: Element | string, clsName: string | Array) {\r\n let element = getDom(selector);\r\n\r\n if (typeof clsName === \"string\") {\r\n element.classList.add(clsName);\r\n } else {\r\n element.classList.add(...clsName);\r\n }\r\n}\r\n\r\nexport function removeCls(selector: Element | string, clsName: string | Array) {\r\n let element = getDom(selector);\r\n\r\n if (typeof clsName === \"string\") {\r\n element.classList.remove(clsName);\r\n } else {\r\n element.classList.remove(...clsName);\r\n }\r\n}\r\n\r\nexport function elementScrollIntoView(selector: Element | string) {\r\n let element = getDom(selector);\r\n\r\n if (!element)\r\n return;\r\n\r\n element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' });\r\n}\r\n\r\nconst hasScrollbar = () => {\r\n let overflow = document.body.style.overflow;\r\n if (overflow && overflow === \"hidden\") return false;\r\n return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight);\r\n}\r\n\r\nexport function getScroll() {\r\n return { x: window.pageXOffset, y: window.pageYOffset };\r\n}\r\n\r\nfunction isElement(node: Element) {\r\n const ELEMENT_NODE_TYPE = 1;\r\n return (\r\n node.tagName !== \"HTML\" &&\r\n node.tagName !== \"BODY\" &&\r\n node.nodeType == ELEMENT_NODE_TYPE\r\n )\r\n}\r\n\r\nexport function getScrollParent(el: Element | undefined, root: HTMLElement | Window | undefined = undefined) {\r\n root ??= canUseDom ? window : undefined;\r\n\r\n let node = el;\r\n while (node && node !== root && isElement(node)) {\r\n const { overflowY } = window.getComputedStyle(node);\r\n if (/scroll|auto|overlay/i.test(overflowY)) {\r\n return node;\r\n }\r\n\r\n node = node.parentNode as Element;\r\n }\r\n\r\n return root;\r\n}\r\n\r\nexport function getScrollTop(el: HTMLElement | Window): number {\r\n const top = 'scrollTop' in el ? el.scrollTop : el.pageYOffset;\r\n\r\n // iOS scroll bounce cause minus scrollTop\r\n return Math.max(top, 0);\r\n}\r\n\r\nexport function getInnerText(element) {\r\n let dom = getDom(element);\r\n return dom.innerText;\r\n}\r\n\r\nexport function getMenuOrDialogMaxZIndex(exclude: Element[] = [], element: Element) {\r\n const base = getDom(element);\r\n // Start with lowest allowed z-index or z-index of\r\n // base component's element, whichever is greater\r\n const zis = [getZIndex(base)]\r\n\r\n const activeElements = [\r\n ...document.getElementsByClassName('m-menu__content--active'),\r\n ...document.getElementsByClassName('m-dialog__content--active'),\r\n ]\r\n\r\n // Get z-index for all active dialogs\r\n for (let index = 0; index < activeElements.length; index++) {\r\n if (!exclude.includes(activeElements[index])) {\r\n zis.push(getZIndex(activeElements[index]))\r\n }\r\n }\r\n\r\n return Math.max(...zis)\r\n}\r\n\r\nexport function getMaxZIndex() {\r\n return [...document.all].reduce((r, e) => Math.max(r, +window.getComputedStyle(e).zIndex || 0), 0)\r\n}\r\n\r\nexport function getStyle(element, styleProp) {\r\n element = getDom(element);\r\n\r\n if (element.currentStyle) {\r\n return element.currentStyle[styleProp];\r\n } else if (window.getComputedStyle) {\r\n return document.defaultView.getComputedStyle(element, null).getPropertyValue(styleProp);\r\n }\r\n}\r\n\r\nexport function getTextAreaInfo(element) {\r\n var result = {};\r\n var dom = getDom(element);\r\n result[\"scrollHeight\"] = dom.scrollHeight || 0;\r\n\r\n if (element.currentStyle) {\r\n result[\"lineHeight\"] = parseFloat(element.currentStyle[\"line-height\"]);\r\n result[\"paddingTop\"] = parseFloat(element.currentStyle[\"padding-top\"]);\r\n result[\"paddingBottom\"] = parseFloat(element.currentStyle[\"padding-bottom\"]);\r\n result[\"borderBottom\"] = parseFloat(element.currentStyle[\"border-bottom\"]);\r\n result[\"borderTop\"] = parseFloat(element.currentStyle[\"border-top\"]);\r\n } else if (window.getComputedStyle) {\r\n result[\"lineHeight\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"line-height\"));\r\n result[\"paddingTop\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"padding-top\"));\r\n result[\"paddingBottom\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"padding-bottom\"));\r\n result[\"borderBottom\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"border-bottom\"));\r\n result[\"borderTop\"] = parseFloat(document.defaultView.getComputedStyle(element, null).getPropertyValue(\"border-top\"));\r\n }\r\n //Firefox can return this as NaN, so it has to be handled here like that.\r\n if (Object.is(NaN, result[\"borderTop\"]))\r\n result[\"borderTop\"] = 1;\r\n if (Object.is(NaN, result[\"borderBottom\"]))\r\n result[\"borderBottom\"] = 1;\r\n return result;\r\n}\r\n\r\nconst objReferenceDict = {};\r\n\r\nexport function disposeObj(objReferenceName) {\r\n delete objReferenceDict[objReferenceName];\r\n}\r\n\r\nexport function upsertThemeStyle(id: string, style: string) {\r\n const d = document.getElementById(id);\r\n if (d) {\r\n document.head.removeChild(d);\r\n }\r\n\r\n const d_style = document.createElement('style')\r\n d_style.id = id;\r\n d_style.type = \"text/css\";\r\n d_style.innerHTML = style;\r\n\r\n document.head.insertAdjacentElement('beforeend', d_style)\r\n}\r\n\r\nexport function getImageDimensions(src: string) {\r\n return new Promise(function (resolve, reject) {\r\n var img = new Image()\r\n img.src = src\r\n img.onload = function () {\r\n resolve({\r\n width: img.width,\r\n height: img.height,\r\n hasError: false\r\n })\r\n }\r\n img.onerror = function () {\r\n resolve({\r\n width: 0,\r\n height: 0,\r\n hasError: true\r\n })\r\n }\r\n })\r\n}\r\n\r\nexport function enablePreventDefaultForEvent(element: any, event: string, condition?: any) {\r\n const dom = getDom(element);\r\n if (!dom) return;\r\n if (event === 'keydown') {\r\n dom.addEventListener(event, (e: KeyboardEvent) => {\r\n if (Array.isArray(condition)) {\r\n var codes = condition as string[];\r\n if (codes.includes(e.code)) {\r\n e.preventDefault();\r\n }\r\n } else {\r\n e.preventDefault();\r\n }\r\n })\r\n } else {\r\n dom.addEventListener(event, e => {\r\n if (e.preventDefault) {\r\n e.preventDefault();\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function getBoundingClientRects(selector) {\r\n var elements = document.querySelectorAll(selector);\r\n\r\n var result = [];\r\n\r\n for (var i = 0; i < elements.length; i++) {\r\n var e: Element = elements[i];\r\n var dom = {\r\n id: e.id,\r\n rect: e.getBoundingClientRect()\r\n };\r\n result.push(dom);\r\n }\r\n\r\n return result;\r\n}\r\n\r\nexport function getSize(selectors, sizeProp) {\r\n var el = getDom(selectors);\r\n\r\n var display = el.style.display;\r\n var overflow = el.style.overflow;\r\n\r\n el.style.display = \"\";\r\n el.style.overflow = \"hidden\";\r\n\r\n var size = el[\"offset\" + sizeProp.charAt(0).toUpperCase() + sizeProp.slice(1)] || 0;\r\n\r\n el.style.display = display;\r\n el.style.overflow = overflow;\r\n\r\n return size;\r\n}\r\n\r\nexport function getProp(elOrString, name) {\r\n if (elOrString === 'window') {\r\n return window[name];\r\n }\r\n\r\n var el = getDom(elOrString);\r\n if (!el) {\r\n return null;\r\n }\r\n\r\n return el[name];\r\n}\r\n\r\nexport function updateWindowTransition(selectors, isActive, item) {\r\n var el: HTMLElement = getDom(selectors);\r\n var container: HTMLElement = el.querySelector('.m-window__container');\r\n\r\n if (item) {\r\n var itemEl: HTMLElement = getDom(item);\r\n container.style.height = itemEl.clientHeight + 'px';\r\n return;\r\n }\r\n\r\n if (isActive) {\r\n container.classList.add('m-window__container--is-active');\r\n container.style.height = el.clientHeight + 'px';\r\n } else {\r\n container.style.height = '';\r\n container.classList.remove('m-window__container--is-active');\r\n }\r\n}\r\n\r\nexport function getScrollHeightWithoutHeight(selectors) {\r\n var el: HTMLElement = getDom(selectors);\r\n if (!el) {\r\n return 0;\r\n }\r\n\r\n var height = el.style.height;\r\n el.style.height = '0'\r\n var scrollHeight = el.scrollHeight;\r\n el.style.height = height;\r\n\r\n return scrollHeight;\r\n}\r\n\r\nfunction registerPasteWithData(customEventName) {\r\n if (Blazor) {\r\n Blazor.registerCustomEventType(customEventName, {\r\n browserEventName: 'paste',\r\n createEventArgs: (event: ClipboardEvent) => {\r\n return {\r\n type: event.type,\r\n pastedData: event.clipboardData.getData('text')\r\n };\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport function registerTextFieldOnMouseDown(element, inputElement, callback) {\r\n if (!element || !inputElement) return\r\n\r\n const listener = (e: MouseEvent) => {\r\n const target = e.target;\r\n const inputDom = getDom(inputElement);\r\n if (target !== inputDom) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n }\r\n\r\n if (callback) {\r\n const mouseEventArgs = {\r\n Detail: e.detail,\r\n ScreenX: e.screenX,\r\n ScreenY: e.screenY,\r\n ClientX: e.clientX,\r\n ClientY: e.clientY,\r\n OffsetX: e.offsetX,\r\n OffsetY: e.offsetY,\r\n PageX: e.pageX,\r\n PageY: e.pageY,\r\n Button: e.button,\r\n Buttons: e.buttons,\r\n CtrlKey: e.ctrlKey,\r\n ShiftKey: e.shiftKey,\r\n AltKey: e.altKey,\r\n MetaKey: e.metaKey,\r\n Type: e.type\r\n }\r\n\r\n callback.invokeMethodAsync('Invoke', mouseEventArgs);\r\n }\r\n };\r\n\r\n element.addEventListener('mousedown', listener)\r\n\r\n const config: HtmlElementEventListenerConfig = {\r\n listener,\r\n handle: callback\r\n };\r\n\r\n const key =`registerTextFieldOnMouseDown_${getBlazorId(element)}`;\r\n htmlElementEventListenerConfigs[key] = [config]\r\n}\r\n\r\nexport function unregisterTextFieldOnMouseDown(element: HTMLElement) {\r\n const key =`registerTextFieldOnMouseDown_${getBlazorId(element)}`;\r\n const configs = htmlElementEventListenerConfigs[key]\r\n if (configs && configs.length) {\r\n configs.forEach(item => {\r\n item.handle.dispose();\r\n if (element) {\r\n element.removeEventListener(\"mousedown\", item.listener);\r\n }\r\n })\r\n }\r\n}\r\n\r\nexport function containsActiveElement(selector) {\r\n var el = getDom(selector);\r\n if (el && el.contains) {\r\n return el.contains(document.activeElement);\r\n }\r\n\r\n return null;\r\n}\r\n\r\nexport function copyChild(el) {\r\n if (typeof el === 'string') {\r\n el = document.querySelector(el);\r\n }\r\n\r\n if (!el) return;\r\n\r\n el.setAttribute('contenteditable', 'true');\r\n el.focus();\r\n document.execCommand('selectAll', false, null);\r\n document.execCommand('copy');\r\n document.execCommand('unselect');\r\n el.removeAttribute('contenteditable');\r\n}\r\n\r\nexport function copyText(text) {\r\n if (!navigator.clipboard) {\r\n var textArea = document.createElement(\"textarea\");\r\n textArea.value = text;\r\n\r\n // Avoid scrolling to bottom\r\n textArea.style.top = \"0\";\r\n textArea.style.left = \"0\";\r\n textArea.style.position = \"fixed\";\r\n\r\n document.body.appendChild(textArea);\r\n textArea.focus();\r\n textArea.select();\r\n\r\n try {\r\n var successful = document.execCommand('copy');\r\n var msg = successful ? 'successful' : 'unsuccessful';\r\n console.log('Fallback: Copying text command was ' + msg);\r\n } catch (err) {\r\n console.error('Fallback: Oops, unable to copy', err);\r\n }\r\n\r\n document.body.removeChild(textArea);\r\n return;\r\n }\r\n\r\n navigator.clipboard.writeText(text).then(function () {\r\n console.log('Async: Copying to clipboard was successful!');\r\n }, function (err) {\r\n console.error('Async: Could not copy text: ', err);\r\n });\r\n}\r\n\r\nexport function getMenuableDimensions(hasActivator, activatorSelector, isDefaultAttach, contentElement, attached, attachSelector) {\r\n if (!attached) {\r\n var container = document.querySelector(attachSelector);\r\n if (contentElement.nodeType) {\r\n container.appendChild(contentElement);\r\n }\r\n }\r\n\r\n var dimensions = {\r\n activator: {} as any,\r\n content: {},\r\n relativeYOffset: 0,\r\n offsetParentLeft: 0\r\n };\r\n\r\n if (hasActivator) {\r\n var activator = document.querySelector(activatorSelector);\r\n dimensions.activator = measure(activator, isDefaultAttach)\r\n dimensions.activator.offsetLeft = activator.offsetLeft\r\n if (!isDefaultAttach) {\r\n // account for css padding causing things to not line up\r\n // this is mostly for v-autocomplete, hopefully it won't break anything\r\n dimensions.activator.offsetTop = activator.offsetTop\r\n } else {\r\n dimensions.activator.offsetTop = 0\r\n }\r\n }\r\n\r\n sneakPeek(() => {\r\n if (contentElement) {\r\n if (contentElement.offsetParent) {\r\n const offsetRect = getRoundedBoundedClientRect(contentElement.offsetParent)\r\n dimensions.relativeYOffset = window.pageYOffset + offsetRect.top\r\n\r\n if (hasActivator) {\r\n dimensions.activator.top -= dimensions.relativeYOffset\r\n dimensions.activator.left -= window.pageXOffset + offsetRect.left\r\n } else {\r\n dimensions.offsetParentLeft = offsetRect.left\r\n }\r\n }\r\n\r\n dimensions.content = measure(contentElement, isDefaultAttach)\r\n }\r\n }, contentElement);\r\n\r\n return dimensions;\r\n}\r\n\r\nfunction measure(el: HTMLElement, isDefaultAttach) {\r\n if (!el) return {}\r\n\r\n const rect = getRoundedBoundedClientRect(el)\r\n\r\n // Account for activator margin\r\n if (!isDefaultAttach) {\r\n const style = window.getComputedStyle(el)\r\n\r\n rect.left = parseInt(style.marginLeft!)\r\n rect.top = parseInt(style.marginTop!)\r\n }\r\n\r\n return rect\r\n}\r\n\r\nfunction getRoundedBoundedClientRect(el: Element) {\r\n if (!el || !el.nodeType) {\r\n return null\r\n }\r\n\r\n const rect = el.getBoundingClientRect()\r\n return {\r\n top: Math.round(rect.top),\r\n left: Math.round(rect.left),\r\n bottom: Math.round(rect.bottom),\r\n right: Math.round(rect.right),\r\n width: Math.round(rect.width),\r\n height: Math.round(rect.height),\r\n }\r\n}\r\n\r\nfunction sneakPeek(cb: () => void, el) {\r\n if (!el || !el.style || el.style.display !== 'none') {\r\n cb()\r\n return\r\n }\r\n\r\n el.style.display = 'inline-block'\r\n cb()\r\n el.style.display = 'none'\r\n}\r\n\r\nexport function invokeMultipleMethod(windowProps, documentProps, hasActivator, activatorSelector, attach, contentElement, attached, attachSelector, element) {\r\n var multipleResult = {\r\n windowAndDocument: null,\r\n dimensions: null,\r\n zIndex: 0\r\n };\r\n\r\n multipleResult.windowAndDocument = getWindowAndDocumentProps(windowProps, documentProps);\r\n multipleResult.dimensions = getMenuableDimensions(hasActivator, activatorSelector, attach, contentElement, attached, attachSelector);\r\n multipleResult.zIndex = getMenuOrDialogMaxZIndex([contentElement], element);\r\n\r\n return multipleResult;\r\n}\r\n\r\nexport function registerOTPInputOnInputEvent(elementList, callback) {\r\n for (let i = 0; i < elementList.length; i++) {\r\n const inputListener = (e: Event) => otpInputOnInputEvent(e, i, elementList, callback);\r\n const focusListener = (e: Event) => otpInputFocusEvent(e, i, elementList);\r\n const keyupListener =(e: KeyboardEvent) => otpInputKeyupEvent(e, i, elementList, callback);\r\n\r\n elementList[i].addEventListener('input', inputListener);\r\n elementList[i].addEventListener('focus', focusListener);\r\n elementList[i].addEventListener('keyup', keyupListener);\r\n\r\n elementList[i]._optInput = {\r\n inputListener,\r\n focusListener,\r\n keyupListener\r\n }\r\n }\r\n}\r\n\r\nfunction otpInputKeyupEvent(e: KeyboardEvent, otpIdx: number, elementList, callback) {\r\n e.preventDefault();\r\n const eventKey = e.key;\r\n if (eventKey === 'ArrowLeft' || eventKey === 'Backspace') {\r\n if (eventKey === 'Backspace') {\r\n const obj = {\r\n type: eventKey,\r\n index: otpIdx,\r\n value: ''\r\n }\r\n if (callback) {\r\n callback.invokeMethodAsync('Invoke', JSON.stringify(obj));\r\n }\r\n }\r\n otpInputFocus(otpIdx - 1, elementList);\r\n }\r\n else if (eventKey === 'ArrowRight') {\r\n otpInputFocus(otpIdx + 1, elementList);\r\n }\r\n}\r\n\r\nfunction otpInputFocus(focusIndex: number, elementList) {\r\n if (focusIndex < 0) {\r\n otpInputFocus(0, elementList);\r\n }\r\n else if (focusIndex >= elementList.length) {\r\n otpInputFocus(elementList.length - 1, elementList);\r\n }\r\n else {\r\n if (document.activeElement !== elementList[focusIndex]) {\r\n const element = getDom(elementList[focusIndex])\r\n element.focus();\r\n }\r\n }\r\n}\r\n\r\nfunction otpInputFocusEvent(e: Event, otpIdx: number, elementList) {\r\n const element = getDom(elementList[otpIdx]) as HTMLInputElement;\r\n if (element && document.activeElement === element) {\r\n element.select();\r\n }\r\n}\r\n\r\nfunction otpInputOnInputEvent(e: Event, otpIdx: number, elementList, callback) {\r\n const target = e.target as HTMLInputElement;\r\n const value = target.value;\r\n\r\n if (value && value !== '') {\r\n otpInputFocus(otpIdx + 1, elementList);\r\n\r\n if (callback) {\r\n const obj = {\r\n type: 'Input',\r\n index: otpIdx,\r\n value: value\r\n }\r\n callback.invokeMethodAsync('Invoke', JSON.stringify(obj));\r\n }\r\n }\r\n}\r\n\r\nexport function unregisterOTPInputOnInputEvent(elementList) {\r\n for (let i = 0; i < elementList.length; i++) {\r\n const el = elementList[i]\r\n if(el && el._optInput) {\r\n el.removeEventListener('input', el._optInput.inputListener)\r\n el.removeEventListener('focus', el._optInput.focusListener)\r\n el.removeEventListener('keyup', el._optInput.keyupListener)\r\n }\r\n }\r\n}\r\n\r\nexport function getListIndexWhereAttributeExists(selector: string, attribute:string, value: string) {\r\n const tiles = document.querySelectorAll(selector);\r\n if (!tiles) {\r\n return -1;\r\n }\r\n\r\n let index = -1;\r\n for (let i = 0; i < tiles.length; i++) {\r\n if (tiles[i].getAttribute(attribute) === value) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n\r\n return index;\r\n}\r\n\r\nexport function scrollToTile(contentSelector: string, tilesSelector: string, index: number, keyCode: string) {\r\n var tiles = document.querySelectorAll(tilesSelector)\r\n if (!tiles) return;\r\n\r\n let tile = tiles[index] as HTMLElement;\r\n\r\n if (!tile) return;\r\n\r\n const content = document.querySelector(contentSelector);\r\n if (!content) return;\r\n\r\n const scrollTop = content.scrollTop;\r\n const contentHeight = content.clientHeight;\r\n\r\n if (scrollTop > tile.offsetTop - 8) {\r\n content.scrollTo({ top: tile.offsetTop - tile.clientHeight, behavior: \"smooth\" })\r\n } else if (scrollTop + contentHeight < tile.offsetTop + tile.clientHeight + 8) {\r\n content.scrollTo({ top: tile.offsetTop - contentHeight + tile.clientHeight * 2, behavior: \"smooth\" })\r\n }\r\n}\r\n\r\nexport function getElementTranslateY(element) {\r\n const style = window.getComputedStyle(element);\r\n const transform = style.transform || style.webkitTransform;\r\n const translateY = transform.slice(7, transform.length - 1).split(', ')[5];\r\n\r\n return Number(translateY);\r\n}\r\n\r\nfunction isWindow(element: any | Window): element is Window {\r\n return element === window\r\n}\r\n\r\nexport function checkIfThresholdIsExceededWhenScrolling(el: Element, parent: any, threshold: number) {\r\n if (!el || !parent) return\r\n\r\n let parentElement: HTMLElement | Window\r\n\r\n if (parent == \"window\") {\r\n parentElement = window;\r\n } else if (parent == \"document\") {\r\n parentElement = document.documentElement;\r\n } else {\r\n parentElement = document.querySelector(parent);\r\n }\r\n\r\n const rect = el.getBoundingClientRect();\r\n const elementTop = rect.top;\r\n const current = isWindow(parentElement)\r\n ? window.innerHeight\r\n : parentElement.getBoundingClientRect().bottom\r\n\r\n return (current >= elementTop - threshold)\r\n}\r\n\r\nexport function get_top_domain() {\r\n var i, h,\r\n weird_cookie = 'weird_get_top_level_domain=cookie',\r\n hostname = document.location.hostname.split('.');\r\n for (i = hostname.length - 1; i >= 0; i--) {\r\n h = hostname.slice(i).join('.');\r\n document.cookie = weird_cookie + ';domain=.' + h + ';';\r\n if (document.cookie.indexOf(weird_cookie) > -1) {\r\n // We were able to store a cookie! This must be it\r\n document.cookie = weird_cookie.split('=')[0] + '=;domain=.' + h + ';expires=Thu, 01 Jan 1970 00:00:01 GMT;';\r\n return h;\r\n }\r\n }\r\n}\r\n\r\nexport function setCookie(name, value) {\r\n var domain = get_top_domain();\r\n if (!domain) {\r\n domain = '';\r\n }else if (isNaN(domain[0])) {\r\n domain = `.${domain}`;\r\n }\r\n var Days = 30;\r\n var exp = new Date();\r\n exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);\r\n document.cookie = `${name}=${escape(value.toString())};path=/;expires=${exp.toUTCString()};domain=${domain}`;\r\n}\r\n\r\nexport function getCookie(name) {\r\n const reg = new RegExp(`(^| )${name}=([^;]*)(;|$)`);\r\n const arr = document.cookie.match(reg);\r\n if (arr) {\r\n return unescape(arr[2]);\r\n }\r\n return null;\r\n}\r\n\r\nexport function registerDragEvent(el: HTMLElement, dataKey?: string) {\r\n if (el) {\r\n const blazorId = getBlazorId(el);\r\n const listener = (e: DragEvent) => {\r\n if (dataKey) {\r\n const dataValue = (e.target as HTMLElement).getAttribute(dataKey);\r\n e.dataTransfer.setData(dataKey, dataValue);\r\n e.dataTransfer.setData('offsetX', e.offsetX.toString())\r\n e.dataTransfer.setData('offsetY', e.offsetY.toString())\r\n }\r\n };\r\n const key = `${blazorId}:dragstart`;\r\n htmlElementEventListenerConfigs[key] = [{\r\n listener\r\n }];\r\n el.addEventListener(\"dragstart\", listener);\r\n }\r\n}\r\n\r\nexport function unregisterDragEvent(el: HTMLElement) {\r\n const blazorId = getBlazorId(el);\r\n if (blazorId) {\r\n const key = `${blazorId}:dragstart`;\r\n if (htmlElementEventListenerConfigs[key]) {\r\n htmlElementEventListenerConfigs[key].forEach((config) => {\r\n el.removeEventListener(\"dragstart\", config.listener);\r\n });\r\n }\r\n }\r\n}\r\n\r\nexport function resizableDataTable(dataTable: HTMLElement) {\r\n const table = dataTable.querySelector('table')\r\n const row = table.querySelector('.m-data-table-header').getElementsByTagName('tr')[0];\r\n const cols = row ? row.children : [];\r\n if (!cols) return;\r\n\r\n table.style.overflow = 'hidden';\r\n\r\n const tableHeight = table.offsetHeight;\r\n\r\n for (var i = 0; i < cols.length; i++) {\r\n const col: any = cols[i];\r\n const colResizeDiv: HTMLDivElement = col.querySelector(\".m-data-table-header__col-resize\");\r\n if (!colResizeDiv) continue\r\n colResizeDiv.style.height = tableHeight + \"px\"\r\n\r\n let minWidth = (col.firstElementChild as HTMLElement).offsetWidth; // width of span\r\n minWidth = minWidth + 32 + 18 + 1 + 1; // 32:padding 18:sort\r\n if(!col.style.minWidth){\r\n col.minWidth = minWidth;\r\n col.style.minWidth = minWidth + \"px\";\r\n }\r\n\r\n setListeners(colResizeDiv);\r\n }\r\n\r\n function setListeners(div: HTMLDivElement) {\r\n let pageX:number\r\n let curCol: HTMLElement;\r\n let nxtCol: HTMLElement;\r\n let curColWidth: number;\r\n let nxtColWidth: number;\r\n let tableWidth: number;\r\n\r\n div.addEventListener('click', e => e.stopPropagation());\r\n\r\n div.addEventListener('mousedown', function (e) {\r\n curCol = (e.target as HTMLElement).parentElement;\r\n nxtCol = curCol.nextElementSibling as HTMLElement;\r\n pageX = e.pageX;\r\n\r\n tableWidth = table.offsetWidth;\r\n\r\n var padding = paddingDiff(curCol);\r\n\r\n curColWidth = curCol.offsetWidth - padding;\r\n if (nxtCol)\r\n nxtColWidth = nxtCol.offsetWidth - padding;\r\n });\r\n\r\n document.addEventListener(\"mousemove\", function (e) {\r\n if (curCol) {\r\n let diffX = e.pageX - pageX;\r\n\r\n const isRtl = dataTable.classList.contains(\"m-data-table--rtl\")\r\n if (isRtl) {\r\n diffX = 0 - diffX;\r\n }\r\n\r\n let newCurColWidth = curColWidth + diffX;\r\n\r\n curCol.style.width = newCurColWidth + \"px\";\r\n\r\n const isOverflow = dataTable.classList.contains(\r\n \"m-data-table--resizable-overflow\"\r\n );\r\n if (isOverflow) {\r\n table.style.width = tableWidth + diffX + \"px\";\r\n return;\r\n }\r\n\r\n const isIndependent = dataTable.classList.contains(\r\n \"m-data-table--resizable-independent\"\r\n );\r\n if (isIndependent) {\r\n let newNextColWidth = nxtColWidth - diffX;\r\n const twoColWidth = curColWidth + nxtColWidth;\r\n\r\n if (diffX > 0) {\r\n if (nxtCol) {\r\n if (newNextColWidth < nxtCol[\"minWidth\"]) {\r\n newNextColWidth = nxtCol[\"minWidth\"];\r\n newCurColWidth = twoColWidth - newNextColWidth;\r\n }\r\n }\r\n } else {\r\n if (newCurColWidth < curCol[\"minWidth\"]) {\r\n newCurColWidth = curCol[\"minWidth\"];\r\n newNextColWidth = twoColWidth - newCurColWidth;\r\n }\r\n }\r\n\r\n curCol.style.width = newCurColWidth + \"px\";\r\n\r\n if (nxtCol) {\r\n nxtCol.style.width = newNextColWidth + \"px\";\r\n }\r\n }\r\n }\r\n });\r\n\r\n document.addEventListener('mouseup', function (e) {\r\n if (curCol) {\r\n for (let i = 0; i < cols.length; i++) {\r\n const col:any = cols[i];\r\n col.style.width = col['offsetWidth'] + \"px\"\r\n }\r\n }\r\n curCol = undefined;\r\n nxtCol = undefined;\r\n pageX = undefined;\r\n nxtColWidth = undefined;\r\n curColWidth = undefined;\r\n tableWidth = undefined;\r\n });\r\n }\r\n\r\n function paddingDiff(col) {\r\n if (getStyleVal(col, 'box-sizing') == 'border-box') {\r\n return 0;\r\n }\r\n\r\n var padLeft = getStyleVal(col, 'padding-left');\r\n var padRight = getStyleVal(col, 'padding-right');\r\n return (parseInt(padLeft) + parseInt(padRight));\r\n }\r\n\r\n function getStyleVal(elm, css) {\r\n return (window.getComputedStyle(elm, null).getPropertyValue(css))\r\n }\r\n}\r\n\r\nexport function updateDataTableResizeHeight(dataTable: HTMLElement) {\r\n const table = dataTable.querySelector('table')\r\n const row = table.querySelector('.m-data-table-header').getElementsByTagName('tr')[0];\r\n const cols = row ? row.children : [];\r\n if (!cols) return;\r\n\r\n const tableHeight = table.offsetHeight;\r\n\r\n for (var i = 0; i < cols.length; i++) {\r\n const col: any = cols[i];\r\n const colResizeDiv: HTMLDivElement = col.querySelector(\".m-data-table-header__col-resize\");\r\n colResizeDiv.style.height = tableHeight + \"px\"\r\n }\r\n}","import { removeListeners, RippleOptions, updateRipple } from \"./ripple\";\r\n\r\nexport default function registerRippleObserver() {\r\n const observer = new MutationObserver((mutationsList, observer) => {\r\n for (const mutation of mutationsList) {\r\n if (mutation.type === \"childList\" && mutation.addedNodes.length > 0) {\r\n for (const node of mutation.addedNodes) {\r\n if (node instanceof HTMLElement) {\r\n if (\r\n node.nodeType === Node.ELEMENT_NODE &&\r\n node.hasAttribute(\"ripple\") &&\r\n !node._ripple\r\n ) {\r\n updateRipple(node, convertRippleAttributeToOptions(node), false);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // 处理属性变动\r\n if (mutation.type === \"attributes\") {\r\n const target = mutation.target as HTMLElement;\r\n if (target.hasAttribute(\"ripple\") && !target._ripple) {\r\n if (mutation.attributeName === \"ripple\") {\r\n updateRipple(\r\n target,\r\n convertRippleAttributeToOptions(target),\r\n false\r\n );\r\n } else if (!target.hasAttribute(\"ripple\") && target._ripple) {\r\n removeListeners(target);\r\n delete target._ripple;\r\n }\r\n }\r\n }\r\n\r\n if (\r\n mutation.type === \"attributes\" &&\r\n mutation.attributeName === \"ripple\"\r\n ) {\r\n const target = mutation.target as HTMLElement;\r\n if (target._ripple) {\r\n updateRipple(\r\n target,\r\n convertRippleAttributeToOptions(target),\r\n target._ripple.enabled\r\n );\r\n }\r\n }\r\n\r\n if (mutation.type === \"childList\" && mutation.removedNodes.length > 0) {\r\n for (const node of mutation.removedNodes) {\r\n if (node instanceof HTMLElement) {\r\n if (node.nodeType === Node.ELEMENT_NODE && node._ripple) {\r\n removeListeners(node);\r\n delete node._ripple;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n });\r\n\r\n // ripple=\"false\",\r\n // ripple=\"\",\r\n // ripple=\"true\",\r\n // ripple=\"center\",\r\n // ripple=\"circle\",\r\n // ripple=\"center:custom-css\",\r\n // ripple=\"circle:custom-css\",\r\n // ripple=\"custom-css\"\r\n function convertRippleAttributeToOptions(\r\n target: HTMLElement\r\n ): RippleOptions | null {\r\n const value = target.getAttribute(\"ripple\");\r\n if ((typeof value !== \"string\" && !value) || value === \"false\") {\r\n return null;\r\n }\r\n\r\n const options: RippleOptions = {\r\n circle: true,\r\n center: false,\r\n };\r\n\r\n const [behavior, css] = value.split(\":\");\r\n\r\n if (behavior) {\r\n if (behavior === \"center\") {\r\n options.circle = false;\r\n options.center = true;\r\n } else if (behavior !== \"circle\") {\r\n options.class = behavior;\r\n }\r\n }\r\n\r\n if (css) {\r\n options.class = css;\r\n }\r\n\r\n return options;\r\n }\r\n\r\n const initialElements = document.querySelectorAll(\"[ripple]\");\r\n\r\n for (const element of initialElements) {\r\n updateRipple(element, convertRippleAttributeToOptions(element), false);\r\n }\r\n\r\n observer.observe(document, {\r\n childList: true,\r\n subtree: true,\r\n attributes: true,\r\n attributeFilter: [\"ripple\"],\r\n attributeOldValue: false,\r\n });\r\n}\r\n","// Utilities\r\nimport { addPassiveEventListener, composedPath, getDom, keyCodes } from \"../../utils/helper\";\r\n\r\nvar wheelListenerCaches: { [key: string]: any } = {}\r\n\r\nexport function hideScroll(fullscreen: boolean, overlaySelector: string, content, dialog) {\r\n if (fullscreen) {\r\n document.documentElement!.classList.add('overflow-y-hidden')\r\n } else {\r\n if (!overlaySelector) return\r\n const overlay = getDom(overlaySelector);\r\n const listener = (e) => {\r\n scrollListener(e, overlay, content, dialog)\r\n }\r\n\r\n wheelListenerCaches[`window_${overlaySelector}`] = listener;\r\n\r\n addPassiveEventListener(window, 'wheel', listener, { passive: false })\r\n window.addEventListener('keydown', listener)\r\n }\r\n}\r\n\r\nexport function showScroll (overlaySelector) {\r\n document.documentElement!.classList.remove('overflow-y-hidden')\r\n\r\n var listener = wheelListenerCaches[`window_${overlaySelector}`]\r\n if (listener) {\r\n window.removeEventListener('wheel', listener)\r\n window.removeEventListener('keydown', listener)\r\n }\r\n}\r\n\r\nfunction scrollListener (e: WheelEvent & KeyboardEvent, overlay, content, dialog) {\r\n if (e.type === 'keydown') {\r\n if (\r\n ['INPUT', 'TEXTAREA', 'SELECT'].includes((e.target as Element).tagName) ||\r\n // https://github.com/vuetifyjs/vuetify/issues/4715\r\n (e.target as HTMLElement).isContentEditable\r\n ) return\r\n\r\n const up:number[] = [keyCodes.up, keyCodes.pageup]\r\n const down:number[] = [keyCodes.down, keyCodes.pagedown]\r\n\r\n if (up.includes(e.keyCode)) {\r\n (e as any).deltaY = -1\r\n } else if (down.includes(e.keyCode)) {\r\n (e as any).deltaY = 1\r\n } else {\r\n return\r\n }\r\n }\r\n\r\n if (e.target === overlay ||\r\n (e.type !== 'keydown' && e.target === document.body) ||\r\n checkPath(e, content, dialog)) e.preventDefault()\r\n}\r\n\r\nfunction checkPath(e: WheelEvent, content, dialog) {\r\n const path = composedPath(e)\r\n\r\n if (e.type === 'keydown' && path[0] === document.body) {\r\n // getSelection returns null in firefox in some edge cases, can be ignored\r\n const selected = window.getSelection()!.anchorNode as Element\r\n if (dialog && hasScrollbar(dialog) && isInside(selected, dialog)) {\r\n return !shouldScroll(dialog, e)\r\n }\r\n return true\r\n }\r\n\r\n for (let index = 0; index < path.length; index++) {\r\n const el = path[index]\r\n\r\n if (el === document) return true\r\n if (el === document.documentElement) return true\r\n if (el === content) return true\r\n\r\n if (hasScrollbar(el as Element)) return !shouldScroll(el as Element, e)\r\n }\r\n\r\n return true\r\n}\r\n\r\nfunction shouldScroll(el: Element, e: WheelEvent): boolean {\r\n if (el.hasAttribute('data-app')) return false\r\n\r\n const dir = e.shiftKey || e.deltaX ? 'x' : 'y'\r\n const delta = dir === 'y' ? e.deltaY : e.deltaX || e.deltaY\r\n\r\n let alreadyAtStart: boolean\r\n let alreadyAtEnd: boolean\r\n if (dir === 'y') {\r\n alreadyAtStart = el.scrollTop === 0\r\n alreadyAtEnd = el.scrollTop + el.clientHeight === el.scrollHeight\r\n } else {\r\n alreadyAtStart = el.scrollLeft === 0\r\n alreadyAtEnd = el.scrollLeft + el.clientWidth === el.scrollWidth\r\n }\r\n\r\n const scrollingUp = delta < 0\r\n const scrollingDown = delta > 0\r\n\r\n if (!alreadyAtStart && scrollingUp) return true\r\n if (!alreadyAtEnd && scrollingDown) return true\r\n if ((alreadyAtStart || alreadyAtEnd)) {\r\n return shouldScroll(el.parentNode as Element, e)\r\n }\r\n\r\n return false\r\n}\r\n\r\nfunction isInside(el: Element, parent: Element): boolean {\r\n if (el === parent) {\r\n return true\r\n } else if (el === null || el === document.body) {\r\n return false\r\n } else {\r\n return isInside(el.parentNode as Element, parent)\r\n }\r\n}\r\n\r\nfunction hasScrollbar(el?: Element) {\r\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return false\r\n\r\n const style = window.getComputedStyle(el)\r\n return ((['auto', 'scroll'].includes(style.overflowY!) || el.tagName === 'SELECT') && el.scrollHeight > el.clientHeight) ||\r\n ((['auto', 'scroll'].includes(style.overflowX!)) && el.scrollWidth > el.clientWidth)\r\n}\r\n","import * as slider from \"./components/slider\";\r\nimport * as interop from \"./interop\";\r\nimport * as overlayable from \"./mixins/overlayable\";\r\n\r\ndeclare global {\r\n interface Window {\r\n BlazorComponent: any;\r\n MasaBlazor: any;\r\n }\r\n}\r\n\r\nwindow.BlazorComponent = {\r\n interop: {\r\n ...interop,\r\n ...overlayable,\r\n ...slider\r\n },\r\n};\r\n\r\nwindow.MasaBlazor = {};\r\n"],"names":["__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","passiveSupported","window","testListenerOpts","Object","defineProperty","get","addEventListener","removeEventListener","console","warn","keyCodes","freeze","enter","tab","delete","esc","space","up","down","left","right","end","home","del","backspace","insert","pageup","pagedown","shift","getBlazorId","el","_bl_","getAttributeNames","find","a","startsWith","substring","getElementSelector","Element","path","nodeType","Node","ELEMENT_NODE","selector","nodeName","toLowerCase","id","unshift","sib","nth","previousElementSibling","parentNode","join","getDom","elOrString","element","document","documentElement","indexOf","array","split","i","querySelector","HTMLElement","body","error","canUseDom","createElement","touchEvents","parseMouseEvent","event","detail","screenX","screenY","clientX","clientY","offsetX","offsetY","pageX","pageY","button","buttons","ctrlKey","shiftKey","altKey","metaKey","type","parseTouchEvent","touches","parseTouch","targetTouches","changedTouches","touchList","length","touch","push","identifier","registerExtraMouseEvent","eventType","eventName","Blazor","registerCustomEventType","browserEventName","createEventArgs","createSharedEventArgs","registerExtraDropEvent","eventArgs","assign","dataTransfer","dropEffect","effectAllowed","files","Array","from","map","f","name","items","kind","types","getData","Number","args","target","eventTarget","elementReferenceId","class","getAttribute","getEventTarget","sliderHandleId","sliderHandlesById","dotnetHelper","onSliderMouseDown","app","mouseUpOptions","passive","capture","mouseMoveOptions","isTouchEvent","onMouseMove","cb","options","once","addOnceEventListener","onSliderMouseUp","invokeMethodAsync","stopPropagation","payload","functionDebounce","fn","wait","callFirst","timeout","debouncedFn","clear","clearTimeout","debounceWrapper","this","arguments","context","callNow","setTimeout","call","cancel","flush","functionThrottle","interval","timeoutId","throttledFn","leading","trailing","throttleWrapper","registerExtraEvents","registerEvent","DELAY_RIPPLE","transform","style","webkitTransform","constructor","isKeyboardEvent","ripples","show","_ripple","enabled","container","animation","appendChild","className","radius","scale","x","y","centerX","centerY","localX","localY","offset","getBoundingClientRect","top","circle","clientWidth","center","Math","sqrt","clientHeight","calculate","size","width","height","computed","getComputedStyle","position","dataset","previousPosition","classList","add","activated","String","performance","now","remove","hide","getElementsByClassName","isHiding","diff","delay","max","_a","removeChild","rippleShow","currentTarget","touched","rippleStop","isTouch","centered","showTimerCommit","showTimer","rippleHide","rippleCancelShow","keyboardRippleShow","keyCode","keyboardRippleHide","focusRippleHide","updateRipple","wasEnabled","removeListeners","getZIndex","index","getPropertyValue","getDomInfoObj","dom","offsetTop","offsetLeft","scrollHeight","scrollWidth","scrollLeft","scrollTop","clientTop","clientLeft","res","viewportElement","box","offsetWidth","offsetHeight","relativeTop","relativeBottom","bottom","relativeLeft","relativeRight","absoluteLeft","absoluteTop","getElementPos","round","onload","customEventName","pastedData","clipboardData","observer","MutationObserver","mutationsList","mutation","addedNodes","node","hasAttribute","convertRippleAttributeToOptions","attributeName","removedNodes","behavior","css","initialElements","querySelectorAll","observe","childList","subtree","attributes","attributeFilter","attributeOldValue","registerRippleObserver","htmlElementEventListenerConfigs","getActiveElement","activeElement","getWindowAndDocumentProps","windowProps","documentProps","obj","forEach","prop","isElement","tagName","getMenuOrDialogMaxZIndex","exclude","zis","activeElements","includes","getMenuableDimensions","hasActivator","activatorSelector","isDefaultAttach","contentElement","attached","attachSelector","dimensions","activator","content","relativeYOffset","offsetParentLeft","measure","display","sneakPeek","offsetParent","offsetRect","getRoundedBoundedClientRect","pageYOffset","pageXOffset","rect","parseInt","marginLeft","marginTop","otpInputKeyupEvent","otpIdx","elementList","callback","preventDefault","eventKey","key","JSON","stringify","otpInputFocus","focusIndex","focus","otpInputFocusEvent","select","otpInputOnInputEvent","get_top_domain","h","weird_cookie","hostname","location","slice","cookie","cloned","cloneNode","parentElement","evt","createEvent","initEvent","dispatchEvent","attach","_b","invoker","extras","htmlElement","config","listener","cancelable","relatedTarget","contains","k","debounce","debounceIt","throttle","handle","configs","item","dispose","e1","e2","dom1","dom2","text","navigator","clipboard","writeText","log","err","textArea","msg","execCommand","fallbackCopyTextToClipboard","noScroll","Error","preventScroll","HTMLInputElement","HTMLTextAreaElement","blur","arg","undefined","scrollIntoView","block","inline","start","level","parent","to","scrollTo","o","offsetPosition","activeEl","containerEl","firstElementChild","getAbsoluteTop","getAbsoluteLeft","addElement","elementSelector","delElement","focusDialog","count","ele","innerWidth","innerHeight","isTop","scrollY","isBottom","hasOwnProperty","clsName","root","overflowY","test","innerText","all","reduce","r","zIndex","styleProp","currentStyle","defaultView","parseFloat","is","NaN","objReferenceName","d","getElementById","head","d_style","innerHTML","insertAdjacentElement","src","img","Image","hasError","onerror","condition","isArray","code","elements","selectors","sizeProp","overflow","charAt","toUpperCase","isActive","itemEl","inputElement","mouseEventArgs","Detail","ScreenX","ScreenY","ClientX","ClientY","OffsetX","OffsetY","PageX","PageY","Button","Buttons","CtrlKey","ShiftKey","AltKey","MetaKey","Type","setAttribute","removeAttribute","multipleResult","windowAndDocument","inputListener","focusListener","keyupListener","_optInput","attribute","tiles","contentSelector","tilesSelector","tile","contentHeight","translateY","threshold","elementTop","domain","isNaN","exp","Date","setTime","getTime","Days","escape","toString","toUTCString","reg","RegExp","arr","match","unescape","dataKey","blazorId","dataValue","setData","dataTable","table","row","getElementsByTagName","cols","children","tableHeight","col","colResizeDiv","minWidth","setListeners","div","curCol","nxtCol","curColWidth","nxtColWidth","tableWidth","nextElementSibling","padding","getStyleVal","padLeft","padRight","paddingDiff","diffX","newCurColWidth","newNextColWidth","twoColWidth","elm","wheelListenerCaches","shouldScroll","dir","deltaX","delta","deltaY","alreadyAtStart","alreadyAtEnd","isInside","hasScrollbar","overflowX","fullscreen","overlaySelector","dialog","overlay","isContentEditable","composedPath","selected","getSelection","anchorNode","checkPath","scrollListener","BlazorComponent","interop","overlayable","slider","MasaBlazor"],"mappings":"yBAkHO,SAASA,EAAUC,EAASC,EAAYC,EAAGC,GAE9C,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,GAAQ,CAAG,MAAOG,GAAKL,EAAOK,GAAO,CAC3F,SAASC,EAASJ,GAAS,IAAMC,EAAKN,EAAiB,MAAEK,GAAU,CAAC,MAAOG,GAAKL,EAAOK,GAAO,CAC9F,SAASF,EAAKI,GAJlB,IAAeL,EAIaK,EAAOC,KAAOT,EAAQQ,EAAOL,QAJ1CA,EAIyDK,EAAOL,MAJhDA,aAAiBN,EAAIM,EAAQ,IAAIN,GA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