UNPKG

balm-ui

Version:

A modular and customizable UI library based on Material Design and Vue 3

1 lines 44.2 kB
!function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("vue")):"function"===typeof define&&define.amd?define("UiDialog",["vue"],e):"object"===typeof exports?exports.UiDialog=e(require("vue")):t.UiDialog=e(t.Vue)}("undefined"!==typeof self?self:this,(function(t){return function(){"use strict";var e={744:function(t){var e=function(t){return function(t){return!!t&&"object"===typeof t}(t)&&!function(t){var e=Object.prototype.toString.call(t);return"[object RegExp]"===e||"[object Date]"===e||function(t){return t.$$typeof===n}(t)}(t)};var n="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(t,e){return!1!==e.clone&&e.isMergeableObject(t)?c((n=t,Array.isArray(n)?[]:{}),t,e):t;var n}function i(t,e,n){return t.concat(e).map((function(t){return o(t,n)}))}function r(t){return Object.keys(t).concat(function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(e){return Object.propertyIsEnumerable.call(t,e)})):[]}(t))}function a(t,e){try{return e in t}catch(n){return!1}}function s(t,e,n){var i={};return n.isMergeableObject(t)&&r(t).forEach((function(e){i[e]=o(t[e],n)})),r(e).forEach((function(r){(function(t,e){return a(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))})(t,r)||(a(t,r)&&n.isMergeableObject(e[r])?i[r]=function(t,e){if(!e.customMerge)return c;var n=e.customMerge(t);return"function"===typeof n?n:c}(r,n)(t[r],e[r],n):i[r]=o(e[r],n))})),i}function c(t,n,r){(r=r||{}).arrayMerge=r.arrayMerge||i,r.isMergeableObject=r.isMergeableObject||e,r.cloneUnlessOtherwiseSpecified=o;var a=Array.isArray(n);return a===Array.isArray(t)?a?r.arrayMerge(t,n,r):s(t,n,r):o(n,r)}c.all=function(t,e){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce((function(t,n){return c(t,n,e)}),{})};var l=c;t.exports=l},262:function(t,e){e.A=(t,e)=>{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n}},154:function(e){e.exports=t}},n={};function o(t){var i=n[t];if(void 0!==i)return i.exports;var r=n[t]={exports:{}};return e[t](r,r.exports,o),r.exports}o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var i={};o.d(i,{default:function(){return St}});var r=o(744),a=o.n(r);const s=/(?:^\[object\s(.*?)\]$)/;var c=t=>Object.prototype.toString.call(t).replace(s,"$1").toLowerCase();const l=t=>{let{componentProps:e,propName:n,props:o}=t,i=o[n];if("object"===c(i)){const t=e[n].default;e[n].default=()=>a()(t,i)}else Array.isArray(i)?e[n].default=()=>i:e[n].default=i},u=t=>{let{componentMixins:e,propName:n,props:o}=t;if(e.length){let t=e.length;for(;t--;)if(e[t].props&&void 0!==e[t].props[n]){l({componentProps:e[t].props,propName:n,props:o});break}}};var d=(t,e)=>{for(const n of Object.keys(e))t.props?void 0===t.props[n]?u({componentMixins:t.mixins,propName:n,props:e}):l({componentProps:t.props,propName:n,props:e}):u({componentMixins:t.mixins,propName:n,props:e})};var p=(t,e)=>{for(const n of Object.keys(e))if(/^Ui[A-Z]{1}[A-Za-z]+$/.test(n)){const o=t[n],i=e[n];d(o,i)}};var f=t=>{const e={install(e){p(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});for(let n in t){const o=t[n];e.component(o.name,o)}}};return e},h=o(154),m=function(t,e){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},m(t,e)};function v(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}m(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var y=function(){return y=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},y.apply(this,arguments)};Object.create;function g(t){var e="function"===typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"===typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function E(t,e){var n="function"===typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,i,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=r.next()).done;)a.push(o.value)}catch(s){i={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return a}function C(t,e,n){if(n||2===arguments.length)for(var o,i=0,r=e.length;i<r;i++)!o&&i in e||(o||(o=Array.prototype.slice.call(e,0,i)),o[i]=e[i]);return t.concat(o||Array.prototype.slice.call(e))}Object.create;"function"===typeof SuppressedError&&SuppressedError;var S=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),A=function(){function t(t,e){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];this.root=t,this.initialize.apply(this,C([],E(n))),this.foundation=void 0===e?this.getDefaultFoundation():e,this.foundation.init(),this.initialSyncWithDOM()}return t.attachTo=function(e){return new t(e,new S({}))},t.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},t.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},t.prototype.initialSyncWithDOM=function(){},t.prototype.destroy=function(){this.foundation.destroy()},t.prototype.listen=function(t,e,n){this.root.addEventListener(t,e,n)},t.prototype.unlisten=function(t,e,n){this.root.removeEventListener(t,e,n)},t.prototype.emit=function(t,e,n){var o;void 0===n&&(n=!1),"function"===typeof CustomEvent?o=new CustomEvent(t,{bubbles:n,detail:e}):(o=document.createEvent("CustomEvent")).initCustomEvent(t,n,!1,e),this.root.dispatchEvent(o)},t}(),b="mdc-dom-focus-sentinel",O=function(){function t(t,e){void 0===e&&(e={}),this.root=t,this.options=e,this.elFocusedBeforeTrapFocus=null}return t.prototype.trapFocus=function(){var t=this.getFocusableElements(this.root);if(0===t.length)throw new Error("FocusTrap: Element must have at least one focusable child.");this.elFocusedBeforeTrapFocus=document.activeElement instanceof HTMLElement?document.activeElement:null,this.wrapTabFocus(this.root),this.options.skipInitialFocus||this.focusInitialElement(t,this.options.initialFocusEl)},t.prototype.releaseFocus=function(){[].slice.call(this.root.querySelectorAll("."+b)).forEach((function(t){t.parentElement.removeChild(t)})),!this.options.skipRestoreFocus&&this.elFocusedBeforeTrapFocus&&this.elFocusedBeforeTrapFocus.focus()},t.prototype.wrapTabFocus=function(t){var e=this,n=this.createSentinel(),o=this.createSentinel();n.addEventListener("focus",(function(){var n=e.getFocusableElements(t);n.length>0&&n[n.length-1].focus()})),o.addEventListener("focus",(function(){var n=e.getFocusableElements(t);n.length>0&&n[0].focus()})),t.insertBefore(n,t.children[0]),t.appendChild(o)},t.prototype.focusInitialElement=function(t,e){var n=0;e&&(n=Math.max(t.indexOf(e),0)),t[n].focus()},t.prototype.getFocusableElements=function(t){return[].slice.call(t.querySelectorAll("[autofocus], [tabindex], a, input, textarea, select, button")).filter((function(t){var e="true"===t.getAttribute("aria-disabled")||null!=t.getAttribute("disabled")||null!=t.getAttribute("hidden")||"true"===t.getAttribute("aria-hidden"),n=t.tabIndex>=0&&t.getBoundingClientRect().width>0&&!t.classList.contains(b)&&!e,o=!1;if(n){var i=getComputedStyle(t);o="none"===i.display||"hidden"===i.visibility}return n&&!o}))},t.prototype.createSentinel=function(){var t=document.createElement("div");return t.setAttribute("tabindex","0"),t.setAttribute("aria-hidden","true"),t.classList.add(b),t},t}();function T(t,e){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e)}function _(t){return void 0===t&&(t=window),!!function(t){void 0===t&&(t=window);var e=!1;try{var n={get passive(){return e=!0,!1}},o=function(){};t.document.addEventListener("test",o,n),t.document.removeEventListener("test",o,n)}catch(i){e=!1}return e}(t)&&{passive:!0}}var I,N={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},D={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},L={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};var R,w=["touchstart","pointerdown","mousedown","keydown"],F=["touchend","pointerup","mouseup","contextmenu"],B=[],k=function(t){function e(n){var o=t.call(this,y(y({},e.defaultAdapter),n))||this;return o.activationAnimationHasEnded=!1,o.activationTimer=0,o.fgDeactivationRemovalTimer=0,o.fgScale="0",o.frame={width:0,height:0},o.initialSize=0,o.layoutFrame=0,o.maxRadius=0,o.unboundedCoords={left:0,top:0},o.activationState=o.defaultActivationState(),o.activationTimerCallback=function(){o.activationAnimationHasEnded=!0,o.runDeactivationUXLogicIfReady()},o.activateHandler=function(t){o.activateImpl(t)},o.deactivateHandler=function(){o.deactivateImpl()},o.focusHandler=function(){o.handleFocus()},o.blurHandler=function(){o.handleBlur()},o.resizeHandler=function(){o.layout()},o}return v(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return N},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return D},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return L},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this,n=this.supportsPressRipple();if(this.registerRootHandlers(n),n){var o=e.cssClasses,i=o.ROOT,r=o.UNBOUNDED;requestAnimationFrame((function(){t.adapter.addClass(i),t.adapter.isUnbounded()&&(t.adapter.addClass(r),t.layoutInternal())}))}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(e.cssClasses.FG_DEACTIVATION));var n=e.cssClasses,o=n.ROOT,i=n.UNBOUNDED;requestAnimationFrame((function(){t.adapter.removeClass(o),t.adapter.removeClass(i),t.removeCssVars()}))}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},e.prototype.activate=function(t){this.activateImpl(t)},e.prototype.deactivate=function(){this.deactivateImpl()},e.prototype.layout=function(){var t=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame((function(){t.layoutInternal(),t.layoutFrame=0}))},e.prototype.setUnbounded=function(t){var n=e.cssClasses.UNBOUNDED;t?this.adapter.addClass(n):this.adapter.removeClass(n)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame((function(){return t.adapter.addClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame((function(){return t.adapter.removeClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},e.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers=function(t){var e,n;if(t){try{for(var o=g(w),i=o.next();!i.done;i=o.next()){var r=i.value;this.adapter.registerInteractionHandler(r,this.activateHandler)}}catch(a){e={error:a}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},e.prototype.registerDeactivationHandlers=function(t){var e,n;if("keydown"===t.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var o=g(F),i=o.next();!i.done;i=o.next()){var r=i.value;this.adapter.registerDocumentInteractionHandler(r,this.deactivateHandler)}}catch(a){e={error:a}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}},e.prototype.deregisterRootHandlers=function(){var t,e;try{for(var n=g(w),o=n.next();!o.done;o=n.next()){var i=o.value;this.adapter.deregisterInteractionHandler(i,this.activateHandler)}}catch(r){t={error:r}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},e.prototype.deregisterDeactivationHandlers=function(){var t,e;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var n=g(F),o=n.next();!o.done;o=n.next()){var i=o.value;this.adapter.deregisterDocumentInteractionHandler(i,this.deactivateHandler)}}catch(r){t={error:r}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}},e.prototype.removeCssVars=function(){var t=this,n=e.strings;Object.keys(n).forEach((function(e){0===e.indexOf("VAR_")&&t.adapter.updateCssVariable(n[e],null)}))},e.prototype.activateImpl=function(t){var e=this;if(!this.adapter.isSurfaceDisabled()){var n=this.activationState;if(!n.isActivated){var o=this.previousActivationEvent;if(!(o&&void 0!==t&&o.type!==t.type))n.isActivated=!0,n.isProgrammatic=void 0===t,n.activationEvent=t,n.wasActivatedByPointer=!n.isProgrammatic&&(void 0!==t&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type)),void 0!==t&&B.length>0&&B.some((function(t){return e.adapter.containsEventTarget(t)}))?this.resetActivationState():(void 0!==t&&(B.push(t.target),this.registerDeactivationHandlers(t)),n.wasElementMadeActive=this.checkElementMadeActive(t),n.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){B=[],n.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(n.wasElementMadeActive=e.checkElementMadeActive(t),n.wasElementMadeActive&&e.animateActivation()),n.wasElementMadeActive||(e.activationState=e.defaultActivationState())})))}}},e.prototype.checkElementMadeActive=function(t){return void 0===t||"keydown"!==t.type||this.adapter.isSurfaceActive()},e.prototype.animateActivation=function(){var t=this,n=e.strings,o=n.VAR_FG_TRANSLATE_START,i=n.VAR_FG_TRANSLATE_END,r=e.cssClasses,a=r.FG_DEACTIVATION,s=r.FG_ACTIVATION,c=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var l="",u="";if(!this.adapter.isUnbounded()){var d=this.getFgTranslationCoordinates(),p=d.startPoint,f=d.endPoint;l=p.x+"px, "+p.y+"px",u=f.x+"px, "+f.y+"px"}this.adapter.updateCssVariable(o,l),this.adapter.updateCssVariable(i,u),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(a),this.adapter.computeBoundingRect(),this.adapter.addClass(s),this.activationTimer=setTimeout((function(){t.activationTimerCallback()}),c)},e.prototype.getFgTranslationCoordinates=function(){var t,e=this.activationState,n=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?function(t,e,n){if(!t)return{x:0,y:0};var o,i,r=e.x,a=e.y,s=r+n.left,c=a+n.top;if("touchstart"===t.type){var l=t;o=l.changedTouches[0].pageX-s,i=l.changedTouches[0].pageY-c}else{var u=t;o=u.pageX-s,i=u.pageY-c}return{x:o,y:i}}(n,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2}).x-this.initialSize/2,y:t.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},e.prototype.runDeactivationUXLogicIfReady=function(){var t=this,n=e.cssClasses.FG_DEACTIVATION,o=this.activationState,i=o.hasDeactivationUXRun,r=o.isActivated;(i||!r)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(n),this.fgDeactivationRemovalTimer=setTimeout((function(){t.adapter.removeClass(n)}),L.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter.removeClass(t),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},e.prototype.resetActivationState=function(){var t=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout((function(){return t.previousActivationEvent=void 0}),e.numbers.TAP_DELAY_MS)},e.prototype.deactivateImpl=function(){var t=this,e=this.activationState;if(e.isActivated){var n=y({},e);e.isProgrammatic?(requestAnimationFrame((function(){t.animateDeactivation(n)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){t.activationState.hasDeactivationUXRun=!0,t.animateDeactivation(n),t.resetActivationState()})))}},e.prototype.animateDeactivation=function(t){var e=t.wasActivatedByPointer,n=t.wasElementMadeActive;(e||n)&&this.runDeactivationUXLogicIfReady()},e.prototype.layoutInternal=function(){var t=this;this.frame=this.adapter.computeBoundingRect();var n=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?n:Math.sqrt(Math.pow(t.frame.width,2)+Math.pow(t.frame.height,2))+e.numbers.PADDING;var o=Math.floor(n*e.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&o%2!==0?this.initialSize=o-1:this.initialSize=o,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},e.prototype.updateLayoutCssVars=function(){var t=e.strings,n=t.VAR_FG_SIZE,o=t.VAR_LEFT,i=t.VAR_TOP,r=t.VAR_FG_SCALE;this.adapter.updateCssVariable(n,this.initialSize+"px"),this.adapter.updateCssVariable(r,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(o,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(i,this.unboundedCoords.top+"px"))},e}(S),H=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.disabled=!1,e}return v(e,t),e.attachTo=function(t,n){void 0===n&&(n={isUnbounded:void 0});var o=new e(t);return void 0!==n.isUnbounded&&(o.unbounded=n.isUnbounded),o},e.createAdapter=function(t){return{addClass:function(e){return t.root.classList.add(e)},browserSupportsCssVars:function(){return function(t,e){void 0===e&&(e=!1);var n,o=t.CSS;if("boolean"===typeof I&&!e)return I;if(!o||"function"!==typeof o.supports)return!1;var i=o.supports("--css-vars","yes"),r=o.supports("(--css-vars: yes)")&&o.supports("color","#00000000");return n=i||r,e||(I=n),n}(window)},computeBoundingRect:function(){return t.root.getBoundingClientRect()},containsEventTarget:function(e){return t.root.contains(e)},deregisterDocumentInteractionHandler:function(t,e){return document.documentElement.removeEventListener(t,e,_())},deregisterInteractionHandler:function(e,n){return t.root.removeEventListener(e,n,_())},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return T(t.root,":active")},isSurfaceDisabled:function(){return Boolean(t.disabled)},isUnbounded:function(){return Boolean(t.unbounded)},registerDocumentInteractionHandler:function(t,e){return document.documentElement.addEventListener(t,e,_())},registerInteractionHandler:function(e,n){return t.root.addEventListener(e,n,_())},registerResizeHandler:function(t){return window.addEventListener("resize",t)},removeClass:function(e){return t.root.classList.remove(e)},updateCssVariable:function(e,n){return t.root.style.setProperty(e,n)}}},Object.defineProperty(e.prototype,"unbounded",{get:function(){return Boolean(this.isUnbounded)},set:function(t){this.isUnbounded=Boolean(t),this.setUnbounded()},enumerable:!1,configurable:!0}),e.prototype.activate=function(){this.foundation.activate()},e.prototype.deactivate=function(){this.foundation.deactivate()},e.prototype.layout=function(){this.foundation.layout()},e.prototype.getDefaultFoundation=function(){return new k(e.createAdapter(this))},e.prototype.initialSyncWithDOM=function(){var t=this.root;this.isUnbounded="mdcRippleIsUnbounded"in t.dataset},e.prototype.setUnbounded=function(){this.foundation.setUnbounded(Boolean(this.isUnbounded))},e}(A),V=function(){function t(){this.rafIDs=new Map}return t.prototype.request=function(t,e){var n=this;this.cancel(t);var o=requestAnimationFrame((function(o){n.rafIDs.delete(t),e(o)}));this.rafIDs.set(t,o)},t.prototype.cancel=function(t){var e=this.rafIDs.get(t);e&&(cancelAnimationFrame(e),this.rafIDs.delete(t))},t.prototype.cancelAll=function(){var t=this;this.rafIDs.forEach((function(e,n){t.cancel(n)}))},t.prototype.getQueue=function(){var t=[];return this.rafIDs.forEach((function(e,n){t.push(n)})),t},t}(),M={CLOSING:"mdc-dialog--closing",OPEN:"mdc-dialog--open",OPENING:"mdc-dialog--opening",SCROLLABLE:"mdc-dialog--scrollable",SCROLL_LOCK:"mdc-dialog-scroll-lock",STACKED:"mdc-dialog--stacked",FULLSCREEN:"mdc-dialog--fullscreen",SCROLL_DIVIDER_HEADER:"mdc-dialog-scroll-divider-header",SCROLL_DIVIDER_FOOTER:"mdc-dialog-scroll-divider-footer",SURFACE_SCRIM_SHOWN:"mdc-dialog__surface-scrim--shown",SURFACE_SCRIM_SHOWING:"mdc-dialog__surface-scrim--showing",SURFACE_SCRIM_HIDING:"mdc-dialog__surface-scrim--hiding",SCRIM_HIDDEN:"mdc-dialog__scrim--hidden"},U={ACTION_ATTRIBUTE:"data-mdc-dialog-action",BUTTON_DEFAULT_ATTRIBUTE:"data-mdc-dialog-button-default",BUTTON_SELECTOR:".mdc-dialog__button",CLOSED_EVENT:"MDCDialog:closed",CLOSE_ACTION:"close",CLOSING_EVENT:"MDCDialog:closing",CONTAINER_SELECTOR:".mdc-dialog__container",CONTENT_SELECTOR:".mdc-dialog__content",DESTROY_ACTION:"destroy",INITIAL_FOCUS_ATTRIBUTE:"data-mdc-dialog-initial-focus",OPENED_EVENT:"MDCDialog:opened",OPENING_EVENT:"MDCDialog:opening",SCRIM_SELECTOR:".mdc-dialog__scrim",SUPPRESS_DEFAULT_PRESS_SELECTOR:["textarea",".mdc-menu .mdc-list-item",".mdc-menu .mdc-deprecated-list-item"].join(", "),SURFACE_SELECTOR:".mdc-dialog__surface"},P={DIALOG_ANIMATION_CLOSE_TIME_MS:75,DIALOG_ANIMATION_OPEN_TIME_MS:150};!function(t){t.POLL_SCROLL_POS="poll_scroll_position",t.POLL_LAYOUT_CHANGE="poll_layout_change"}(R||(R={}));var x=function(t){function e(n){var o=t.call(this,y(y({},e.defaultAdapter),n))||this;return o.dialogOpen=!1,o.isFullscreen=!1,o.animationFrame=0,o.animationTimer=0,o.escapeKeyAction=U.CLOSE_ACTION,o.scrimClickAction=U.CLOSE_ACTION,o.autoStackButtons=!0,o.areButtonsStacked=!1,o.suppressDefaultPressSelector=U.SUPPRESS_DEFAULT_PRESS_SELECTOR,o.animFrame=new V,o.contentScrollHandler=function(){o.handleScrollEvent()},o.windowResizeHandler=function(){o.layout()},o.windowOrientationChangeHandler=function(){o.layout()},o}return v(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return M},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return U},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return P},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addBodyClass:function(){},addClass:function(){},areButtonsStacked:function(){return!1},clickDefaultButton:function(){},eventTargetMatches:function(){return!1},getActionFromEvent:function(){return""},getInitialFocusEl:function(){return null},hasClass:function(){return!1},isContentScrollable:function(){return!1},notifyClosed:function(){},notifyClosing:function(){},notifyOpened:function(){},notifyOpening:function(){},releaseFocus:function(){},removeBodyClass:function(){},removeClass:function(){},reverseButtons:function(){},trapFocus:function(){},registerContentEventHandler:function(){},deregisterContentEventHandler:function(){},isScrollableContentAtTop:function(){return!1},isScrollableContentAtBottom:function(){return!1},registerWindowEventHandler:function(){},deregisterWindowEventHandler:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){this.adapter.hasClass(M.STACKED)&&this.setAutoStackButtons(!1),this.isFullscreen=this.adapter.hasClass(M.FULLSCREEN)},e.prototype.destroy=function(){this.animationTimer&&(clearTimeout(this.animationTimer),this.handleAnimationTimerEnd()),this.isFullscreen&&this.adapter.deregisterContentEventHandler("scroll",this.contentScrollHandler),this.animFrame.cancelAll(),this.adapter.deregisterWindowEventHandler("resize",this.windowResizeHandler),this.adapter.deregisterWindowEventHandler("orientationchange",this.windowOrientationChangeHandler)},e.prototype.open=function(t){var e=this;this.dialogOpen=!0,this.adapter.notifyOpening(),this.adapter.addClass(M.OPENING),this.isFullscreen&&this.adapter.registerContentEventHandler("scroll",this.contentScrollHandler),t&&t.isAboveFullscreenDialog&&this.adapter.addClass(M.SCRIM_HIDDEN),this.adapter.registerWindowEventHandler("resize",this.windowResizeHandler),this.adapter.registerWindowEventHandler("orientationchange",this.windowOrientationChangeHandler),this.runNextAnimationFrame((function(){e.adapter.addClass(M.OPEN),e.adapter.addBodyClass(M.SCROLL_LOCK),e.layout(),e.animationTimer=setTimeout((function(){e.handleAnimationTimerEnd(),e.adapter.trapFocus(e.adapter.getInitialFocusEl()),e.adapter.notifyOpened()}),P.DIALOG_ANIMATION_OPEN_TIME_MS)}))},e.prototype.close=function(t){var e=this;void 0===t&&(t=""),this.dialogOpen&&(this.dialogOpen=!1,this.adapter.notifyClosing(t),this.adapter.addClass(M.CLOSING),this.adapter.removeClass(M.OPEN),this.adapter.removeBodyClass(M.SCROLL_LOCK),this.isFullscreen&&this.adapter.deregisterContentEventHandler("scroll",this.contentScrollHandler),this.adapter.deregisterWindowEventHandler("resize",this.windowResizeHandler),this.adapter.deregisterWindowEventHandler("orientationchange",this.windowOrientationChangeHandler),cancelAnimationFrame(this.animationFrame),this.animationFrame=0,clearTimeout(this.animationTimer),this.animationTimer=setTimeout((function(){e.adapter.releaseFocus(),e.handleAnimationTimerEnd(),e.adapter.notifyClosed(t)}),P.DIALOG_ANIMATION_CLOSE_TIME_MS))},e.prototype.showSurfaceScrim=function(){var t=this;this.adapter.addClass(M.SURFACE_SCRIM_SHOWING),this.runNextAnimationFrame((function(){t.adapter.addClass(M.SURFACE_SCRIM_SHOWN)}))},e.prototype.hideSurfaceScrim=function(){this.adapter.removeClass(M.SURFACE_SCRIM_SHOWN),this.adapter.addClass(M.SURFACE_SCRIM_HIDING)},e.prototype.handleSurfaceScrimTransitionEnd=function(){this.adapter.removeClass(M.SURFACE_SCRIM_HIDING),this.adapter.removeClass(M.SURFACE_SCRIM_SHOWING)},e.prototype.isOpen=function(){return this.dialogOpen},e.prototype.getEscapeKeyAction=function(){return this.escapeKeyAction},e.prototype.setEscapeKeyAction=function(t){this.escapeKeyAction=t},e.prototype.getScrimClickAction=function(){return this.scrimClickAction},e.prototype.setScrimClickAction=function(t){this.scrimClickAction=t},e.prototype.getAutoStackButtons=function(){return this.autoStackButtons},e.prototype.setAutoStackButtons=function(t){this.autoStackButtons=t},e.prototype.getSuppressDefaultPressSelector=function(){return this.suppressDefaultPressSelector},e.prototype.setSuppressDefaultPressSelector=function(t){this.suppressDefaultPressSelector=t},e.prototype.layout=function(){var t=this;this.animFrame.request(R.POLL_LAYOUT_CHANGE,(function(){t.layoutInternal()}))},e.prototype.handleClick=function(t){if(this.adapter.eventTargetMatches(t.target,U.SCRIM_SELECTOR)&&""!==this.scrimClickAction)this.close(this.scrimClickAction);else{var e=this.adapter.getActionFromEvent(t);e&&this.close(e)}},e.prototype.handleKeydown=function(t){var e="Enter"===t.key||13===t.keyCode;if(e&&!this.adapter.getActionFromEvent(t)){var n=t.composedPath?t.composedPath()[0]:t.target,o=!this.suppressDefaultPressSelector||!this.adapter.eventTargetMatches(n,this.suppressDefaultPressSelector);e&&o&&this.adapter.clickDefaultButton()}},e.prototype.handleDocumentKeydown=function(t){("Escape"===t.key||27===t.keyCode)&&""!==this.escapeKeyAction&&this.close(this.escapeKeyAction)},e.prototype.handleScrollEvent=function(){var t=this;this.animFrame.request(R.POLL_SCROLL_POS,(function(){t.toggleScrollDividerHeader(),t.toggleScrollDividerFooter()}))},e.prototype.layoutInternal=function(){this.autoStackButtons&&this.detectStackedButtons(),this.toggleScrollableClasses()},e.prototype.handleAnimationTimerEnd=function(){this.animationTimer=0,this.adapter.removeClass(M.OPENING),this.adapter.removeClass(M.CLOSING)},e.prototype.runNextAnimationFrame=function(t){var e=this;cancelAnimationFrame(this.animationFrame),this.animationFrame=requestAnimationFrame((function(){e.animationFrame=0,clearTimeout(e.animationTimer),e.animationTimer=setTimeout(t,0)}))},e.prototype.detectStackedButtons=function(){this.adapter.removeClass(M.STACKED);var t=this.adapter.areButtonsStacked();t&&this.adapter.addClass(M.STACKED),t!==this.areButtonsStacked&&(this.adapter.reverseButtons(),this.areButtonsStacked=t)},e.prototype.toggleScrollableClasses=function(){this.adapter.removeClass(M.SCROLLABLE),this.adapter.isContentScrollable()&&(this.adapter.addClass(M.SCROLLABLE),this.isFullscreen&&(this.toggleScrollDividerHeader(),this.toggleScrollDividerFooter()))},e.prototype.toggleScrollDividerHeader=function(){this.adapter.isScrollableContentAtTop()?this.adapter.hasClass(M.SCROLL_DIVIDER_HEADER)&&this.adapter.removeClass(M.SCROLL_DIVIDER_HEADER):this.adapter.addClass(M.SCROLL_DIVIDER_HEADER)},e.prototype.toggleScrollDividerFooter=function(){this.adapter.isScrollableContentAtBottom()?this.adapter.hasClass(M.SCROLL_DIVIDER_FOOTER)&&this.adapter.removeClass(M.SCROLL_DIVIDER_FOOTER):this.adapter.addClass(M.SCROLL_DIVIDER_FOOTER)},e}(S);var G=x.strings,j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return v(e,t),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this.foundation.isOpen()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"escapeKeyAction",{get:function(){return this.foundation.getEscapeKeyAction()},set:function(t){this.foundation.setEscapeKeyAction(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scrimClickAction",{get:function(){return this.foundation.getScrimClickAction()},set:function(t){this.foundation.setScrimClickAction(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"autoStackButtons",{get:function(){return this.foundation.getAutoStackButtons()},set:function(t){this.foundation.setAutoStackButtons(t)},enumerable:!1,configurable:!0}),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t){var e,n;void 0===t&&(t=function(t,e){return new O(t,e)});var o=this.root.querySelector(G.CONTAINER_SELECTOR);if(!o)throw new Error("Dialog component requires a "+G.CONTAINER_SELECTOR+" container element");this.container=o,this.content=this.root.querySelector(G.CONTENT_SELECTOR),this.buttons=[].slice.call(this.root.querySelectorAll(G.BUTTON_SELECTOR)),this.defaultButton=this.root.querySelector("["+G.BUTTON_DEFAULT_ATTRIBUTE+"]"),this.focusTrapFactory=t,this.buttonRipples=[];try{for(var i=g(this.buttons),r=i.next();!r.done;r=i.next()){var a=r.value;this.buttonRipples.push(new H(a))}}catch(s){e={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}},e.prototype.initialSyncWithDOM=function(){var t,e,n,o=this;this.focusTrap=(t=this.container,e=this.focusTrapFactory,n=this.getInitialFocusEl()||void 0,e(t,{initialFocusEl:n})),this.handleClick=this.foundation.handleClick.bind(this.foundation),this.handleKeydown=this.foundation.handleKeydown.bind(this.foundation),this.handleDocumentKeydown=this.foundation.handleDocumentKeydown.bind(this.foundation),this.handleOpening=function(){document.addEventListener("keydown",o.handleDocumentKeydown)},this.handleClosing=function(){document.removeEventListener("keydown",o.handleDocumentKeydown)},this.listen("click",this.handleClick),this.listen("keydown",this.handleKeydown),this.listen(G.OPENING_EVENT,this.handleOpening),this.listen(G.CLOSING_EVENT,this.handleClosing)},e.prototype.destroy=function(){this.unlisten("click",this.handleClick),this.unlisten("keydown",this.handleKeydown),this.unlisten(G.OPENING_EVENT,this.handleOpening),this.unlisten(G.CLOSING_EVENT,this.handleClosing),this.handleClosing(),this.buttonRipples.forEach((function(t){t.destroy()})),t.prototype.destroy.call(this)},e.prototype.layout=function(){this.foundation.layout()},e.prototype.open=function(){this.foundation.open()},e.prototype.close=function(t){void 0===t&&(t=""),this.foundation.close(t)},e.prototype.getDefaultFoundation=function(){var t=this;return new x({addBodyClass:function(t){return document.body.classList.add(t)},addClass:function(e){return t.root.classList.add(e)},areButtonsStacked:function(){return function(t){var e=new Set;return[].forEach.call(t,(function(t){return e.add(t.offsetTop)})),e.size>1}(t.buttons)},clickDefaultButton:function(){t.defaultButton&&!t.defaultButton.disabled&&t.defaultButton.click()},eventTargetMatches:function(t,e){return!!t&&T(t,e)},getActionFromEvent:function(t){if(!t.target)return"";var e=function(t,e){if(t.closest)return t.closest(e);for(var n=t;n;){if(T(n,e))return n;n=n.parentElement}return null}(t.target,"["+G.ACTION_ATTRIBUTE+"]");return e&&e.getAttribute(G.ACTION_ATTRIBUTE)},getInitialFocusEl:function(){return t.getInitialFocusEl()},hasClass:function(e){return t.root.classList.contains(e)},isContentScrollable:function(){return!!(e=t.content)&&e.scrollHeight>e.offsetHeight;var e},notifyClosed:function(e){return t.emit(G.CLOSED_EVENT,e?{action:e}:{})},notifyClosing:function(e){return t.emit(G.CLOSING_EVENT,e?{action:e}:{})},notifyOpened:function(){return t.emit(G.OPENED_EVENT,{})},notifyOpening:function(){return t.emit(G.OPENING_EVENT,{})},releaseFocus:function(){t.focusTrap.releaseFocus()},removeBodyClass:function(t){return document.body.classList.remove(t)},removeClass:function(e){return t.root.classList.remove(e)},reverseButtons:function(){t.buttons.reverse(),t.buttons.forEach((function(t){t.parentElement.appendChild(t)}))},trapFocus:function(){t.focusTrap.trapFocus()},registerContentEventHandler:function(e,n){t.content instanceof HTMLElement&&t.content.addEventListener(e,n)},deregisterContentEventHandler:function(e,n){t.content instanceof HTMLElement&&t.content.removeEventListener(e,n)},isScrollableContentAtTop:function(){return!!(e=t.content)&&0===e.scrollTop;var e},isScrollableContentAtBottom:function(){return!!(e=t.content)&&Math.ceil(e.scrollHeight-e.scrollTop)===e.clientHeight;var e},registerWindowEventHandler:function(t,e){window.addEventListener(t,e)},deregisterWindowEventHandler:function(t,e){window.removeEventListener(t,e)}})},e.prototype.getInitialFocusEl=function(){return this.root.querySelector("["+G.INITIAL_FOCUS_ATTRIBUTE+"]")},e}(A);const z={cssClasses:{icon:"material-icons"},EVENTS:{CLICK:"click"},getMaterialIconClass:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return[z.cssClasses.icon,...e]}};function K(t){let{emit:e}=t;return{handleClick:function(t){e(z.EVENTS.CLICK,t)}}}var q=z;const $=(0,h.createElementVNode)("div",{class:"mdc-icon-button__ripple"},null,-1),W=(0,h.createElementVNode)("span",{class:"mdc-icon-button__focus-ring"},null,-1),X={name:"MdcIconButton",customOptions:{UI_GLOBAL:q}};var Y=Object.assign(X,{emits:[q.EVENTS.CLICK],setup(t,e){let{emit:n}=e;const o=n,{handleClick:i}=K({emit:o});return(t,e)=>((0,h.openBlock)(),(0,h.createElementBlock)("button",{type:"button",class:(0,h.normalizeClass)(["mdc-icon-button",(0,h.unref)(q).cssClasses.icon]),onClick:e[0]||(e[0]=function(){return(0,h.unref)(i)&&(0,h.unref)(i)(...arguments)})},[$,W,(0,h.renderSlot)(t.$slots,"default")],2))}});var Z=Y;function Q(){document.querySelector("body").classList.remove(M.SCROLL_LOCK)}const J={contentComponentName:"UiDialogContent",cssClasses:{content:"mdc-dialog__content"},EVENTS:{CHANGE:"update:modelValue",CLOSE:"close",CONFIRM:"confirm"}},tt={class:"mdc-dialog__container"},et="UiDialog",nt={name:et,customOptions:{name:et,UI_DIALOG:J}};var ot=Object.assign(nt,{props:{modelValue:{type:Boolean,default:!1},escapeKey:{type:Boolean,default:!0},closable:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!1},noScrim:{type:Boolean,default:!1},resetScroll:{type:Boolean,default:!1},fullscreen:{type:Boolean,default:!1},sheet:{type:Boolean,default:!1},noContentPadding:{type:Boolean,default:!1}},emits:[J.EVENTS.CHANGE,J.EVENTS.CLOSE,J.EVENTS.CONFIRM],setup(t,e){let{expose:n,emit:o}=e;const i=t,r=o,a=(0,h.ref)(null),s=(0,h.ref)(null),c=(0,h.reactive)({$dialog:null,dialogBody:null}),l=(0,h.computed)((()=>({"mdc-dialog":!0,"mdc-dialog--fullscreen":i.fullscreen,"mdc-dialog--sheet":i.sheet,"mdc-dialog--no-content-padding":i.noContentPadding})));function u(){(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||i.closable)&&r(J.EVENTS.CHANGE,!1),r(J.EVENTS.CLOSE)}return(0,h.onMounted)((()=>{const t=a.value;c.$dialog=new j(t),(0,h.nextTick)((()=>{c.dialogBody=s.value.querySelector(`.${J.cssClasses.content}`),c.$dialog.listen(U.OPENED_EVENT,(()=>{c.dialogBody.setAttribute("aria-hidden","true"),i.noScrim&&Q()})),c.$dialog.listen(U.CLOSING_EVENT,(t=>{let{detail:e}=t;c.dialogBody.removeAttribute("aria-hidden"),c.$dialog.escapeKeyAction&&u()})),t.querySelector(".mdc-button")||t.querySelector(".mdc-icon-button")||console.warn(`[${et}]: At least one <ui-button> or <ui-icon-button> needs to be added to the <ui-dialog>`),i.escapeKey&&i.closable||(c.$dialog.escapeKeyAction="")})),(0,h.watch)((()=>i.modelValue),(t=>{t?c.$dialog.open():(c.$dialog.close(),i.resetScroll&&(c.dialogBody.scrollTop=0))}))})),n({handleAccept:function(){r(J.EVENTS.CONFIRM,!0),u()},handleCancel:function(){r(J.EVENTS.CONFIRM,!1),u()}}),(e,n)=>((0,h.openBlock)(),(0,h.createElementBlock)("div",{ref_key:"dialog",ref:a,class:(0,h.normalizeClass)(l.value)},[(0,h.createElementVNode)("div",tt,[(0,h.createElementVNode)("div",{ref_key:"dialogSurface",ref:s,class:"mdc-dialog__surface",role:"alertdialog","aria-modal":"true"},[t.sheet?((0,h.openBlock)(),(0,h.createBlock)(Z,{key:0,class:"mdc-dialog__close","data-mdc-dialog-action":"close"},{default:(0,h.withCtx)((()=>[(0,h.createTextVNode)(" close ")])),_:1})):(0,h.createCommentVNode)("",!0),(0,h.renderSlot)(e.$slots,"default")],512)]),t.noScrim?(0,h.createCommentVNode)("",!0):((0,h.openBlock)(),(0,h.createElementBlock)(h.Fragment,{key:0},[t.maskClosable?((0,h.openBlock)(),(0,h.createElementBlock)("div",{key:0,class:"mdc-dialog__scrim",onClick:u})):((0,h.openBlock)(),(0,h.createElementBlock)("div",{key:1,class:"mdc-dialog__scrim",onClick:n[0]||(n[0]=(0,h.withModifiers)((()=>{}),["stop"]))}))],64))],2))}});var it=ot;const rt={class:"mdc-dialog__title"},at={name:"UiDialogTitle",customOptions:{}};var st=Object.assign(at,{props:{closable:{type:Boolean,default:!1}},setup(t){const e=t,n=(0,h.getCurrentInstance)().parent,o=(0,h.computed)((()=>({"mdc-dialog__header":!0,"mdc-dialog__title--closable":e.closable}))),i=(0,h.computed)((()=>n.props.fullscreen||e.closable));return(t,e)=>((0,h.openBlock)(),(0,h.createElementBlock)("div",{class:(0,h.normalizeClass)(o.value)},[(0,h.createElementVNode)("h2",rt,[(0,h.renderSlot)(t.$slots,"default")]),i.value?((0,h.openBlock)(),(0,h.createBlock)(Z,{key:0,class:"mdc-dialog__close","data-mdc-dialog-action":"close"},{default:(0,h.withCtx)((()=>[(0,h.createTextVNode)(" close ")])),_:1})):(0,h.createCommentVNode)("",!0)],2))}});var ct={name:J.contentComponentName,data(){return{UI_DIALOG:J}}};var lt=(0,o(262).A)(ct,[["render",function(t,e,n,o,i,r){return(0,h.openBlock)(),(0,h.createElementBlock)("div",{class:(0,h.normalizeClass)(i.UI_DIALOG.cssClasses.content)},[(0,h.renderSlot)(t.$slots,"default")],2)}]]);const ut={icon:{type:String,default:""}};const dt=(0,h.createElementVNode)("span",{class:"mdc-button__ripple"},null,-1),pt=(0,h.createElementVNode)("span",{class:"mdc-button__focus-ring"},null,-1),ft=["textContent"],ht={key:1,class:"mdc-button__label"},mt={name:"MdcButton",customOptions:{UI_GLOBAL:q}};var vt=Object.assign(mt,{props:{outlined:{type:Boolean,default:!1},unelevated:{type:Boolean,default:!1},...ut,noLabel:{type:Boolean,default:!1}},emits:[q.EVENTS.CLICK],setup(t,e){let{emit:n}=e;const o=t,i=n,{handleClick:r}=K({emit:i}),{materialIcon:a}=function(t){return{materialIcon:(0,h.computed)((()=>t.icon||!1))}}(o),s=(0,h.computed)((()=>({"mdc-button":!0,"mdc-button--outlined":o.outlined,"mdc-button--unelevated":o.unelevated})));return(e,n)=>((0,h.openBlock)(),(0,h.createElementBlock)("button",{type:"button",class:(0,h.normalizeClass)(s.value),onClick:n[0]||(n[0]=function(){return(0,h.unref)(r)&&(0,h.unref)(r)(...arguments)})},[dt,pt,(0,h.renderSlot)(e.$slots,"icon",{},(()=>[(0,h.unref)(a)?((0,h.openBlock)(),(0,h.createElementBlock)("i",{key:0,class:(0,h.normalizeClass)((0,h.unref)(q).getMaterialIconClass("mdc-button__icon")),"aria-hidden":"true",textContent:(0,h.toDisplayString)((0,h.unref)(a))},null,10,ft)):(0,h.createCommentVNode)("",!0)])),t.noLabel?(0,h.renderSlot)(e.$slots,"default",{key:0}):((0,h.openBlock)(),(0,h.createElementBlock)("span",ht,[(0,h.renderSlot)(e.$slots,"default")]))],2))}});var yt=vt;const gt={class:"mdc-dialog__actions"},Et={cssClasses:{button:"mdc-dialog__button"}},Ct={name:"UiDialogActions",customOptions:{UI_DIALOG_ACTION:Et}};var St=f({UiDialog:it,UiDialogTitle:st,UiDialogContent:lt,UiDialogActions:Object.assign(Ct,{props:{acceptText:{type:String,default:"OK"},cancelText:{type:String,default:"Cancel"}},setup(t){const e=(0,h.getCurrentInstance)().parent,n=(0,h.computed)((()=>e.props.closable));return(e,o)=>((0,h.openBlock)(),(0,h.createElementBlock)("footer",gt,[(0,h.renderSlot)(e.$slots,"default",{buttonClass:Et.cssClasses.button},(()=>[(0,h.createVNode)(yt,{class:(0,h.normalizeClass)(Et.cssClasses.button),"data-mdc-dialog-action":n.value?"close":null,onClick:e.$parent.handleCancel},{default:(0,h.withCtx)((()=>[(0,h.createTextVNode)((0,h.toDisplayString)(t.cancelText),1)])),_:1},8,["class","data-mdc-dialog-action","onClick"]),(0,h.createVNode)(yt,{class:(0,h.normalizeClass)(Et.cssClasses.button),"data-mdc-dialog-action":n.value?"accept":null,"data-mdc-dialog-button-default":"",onClick:e.$parent.handleAccept},{default:(0,h.withCtx)((()=>[(0,h.createTextVNode)((0,h.toDisplayString)(t.acceptText),1)])),_:1},8,["class","data-mdc-dialog-action","onClick"])]))]))}})});return i=i.default}()}));