balm-ui
Version:
A modular and customizable UI library based on Material Design and Vue 3
1 lines • 57.7 kB
JavaScript
!function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define("UiList",["vue"],t):"object"===typeof exports?exports.UiList=t(require("vue")):e.UiList=t(e.Vue)}("undefined"!==typeof self?self:this,(function(e){return function(){"use strict";var t={744:function(e){var t=function(e){return function(e){return!!e&&"object"===typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===n}(e)}(e)};var n="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(e,t){return!1!==t.clone&&t.isMergeableObject(e)?d((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,n){return e.concat(t).map((function(e){return i(e,n)}))}function s(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function a(e,t){try{return t in e}catch(n){return!1}}function o(e,t,n){var r={};return n.isMergeableObject(e)&&s(e).forEach((function(t){r[t]=i(e[t],n)})),s(t).forEach((function(s){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,s)||(a(e,s)&&n.isMergeableObject(t[s])?r[s]=function(e,t){if(!t.customMerge)return d;var n=t.customMerge(e);return"function"===typeof n?n:d}(s,n)(e[s],t[s],n):r[s]=i(t[s],n))})),r}function d(e,n,s){(s=s||{}).arrayMerge=s.arrayMerge||r,s.isMergeableObject=s.isMergeableObject||t,s.cloneUnlessOtherwiseSpecified=i;var a=Array.isArray(n);return a===Array.isArray(e)?a?s.arrayMerge(e,n,s):o(e,n,s):i(n,s)}d.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return d(e,n,t)}),{})};var c=d;e.exports=c},262:function(e,t){t.A=(e,t)=>{const n=e.__vccOpts||e;for(const[i,r]of t)n[i]=r;return n}},154:function(t){t.exports=e}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var s=n[e]={exports:{}};return t[e](s,s.exports,i),s.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var r={};i.d(r,{default:function(){return bt}});var s=i(744),a=i.n(s);const o=/(?:^\[object\s(.*?)\]$)/;var d=e=>Object.prototype.toString.call(e).replace(o,"$1").toLowerCase();const c=e=>{let{componentProps:t,propName:n,props:i}=e,r=i[n];if("object"===d(r)){const e=t[n].default;t[n].default=()=>a()(e,r)}else Array.isArray(r)?t[n].default=()=>r:t[n].default=r},l=e=>{let{componentMixins:t,propName:n,props:i}=e;if(t.length){let e=t.length;for(;e--;)if(t[e].props&&void 0!==t[e].props[n]){c({componentProps:t[e].props,propName:n,props:i});break}}};var u=(e,t)=>{for(const n of Object.keys(t))e.props?void 0===e.props[n]?l({componentMixins:e.mixins,propName:n,props:t}):c({componentProps:e.props,propName:n,props:t}):l({componentMixins:e.mixins,propName:n,props:t})};var p=(e,t)=>{for(const n of Object.keys(t))if(/^Ui[A-Z]{1}[A-Za-z]+$/.test(n)){const i=e[n],r=t[n];u(i,r)}};var f=e=>{const t={install(t){p(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});for(let n in e){const i=e[n];t.component(i.name,i)}}};return t},h=i(154),m=function(e,t){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},m(e,t)};function I(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}m(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var E=function(){return E=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},E.apply(this,arguments)};Object.create;function v(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function A(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,s=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(i=s.next()).done;)a.push(i.value)}catch(o){r={error:o}}finally{try{i&&!i.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return a}function y(e,t,n){if(n||2===arguments.length)for(var i,r=0,s=t.length;r<s;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}Object.create;"function"===typeof SuppressedError&&SuppressedError;var S,C,x=function(){function e(e){void 0===e&&(e={}),this.adapter=e}return Object.defineProperty(e,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.destroy=function(){},e}(),b=function(){function e(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];this.root=e,this.initialize.apply(this,y([],A(n))),this.foundation=void 0===t?this.getDefaultFoundation():t,this.foundation.init(),this.initialSyncWithDOM()}return e.attachTo=function(t){return new e(t,new x({}))},e.prototype.initialize=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},e.prototype.initialSyncWithDOM=function(){},e.prototype.destroy=function(){this.foundation.destroy()},e.prototype.listen=function(e,t,n){this.root.addEventListener(e,t,n)},e.prototype.unlisten=function(e,t,n){this.root.removeEventListener(e,t,n)},e.prototype.emit=function(e,t,n){var i;void 0===n&&(n=!1),"function"===typeof CustomEvent?i=new CustomEvent(e,{bubbles:n,detail:t}):(i=document.createEvent("CustomEvent")).initCustomEvent(e,n,!1,t),this.root.dispatchEvent(i)},e}();function T(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}var _={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_DISABLED_CLASS:"mdc-list-item--disabled",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",LIST_ITEM_TEXT_CLASS:"mdc-list-item__text",LIST_ITEM_PRIMARY_TEXT_CLASS:"mdc-list-item__primary-text",ROOT:"mdc-list"},g=((S={})[""+_.LIST_ITEM_ACTIVATED_CLASS]="mdc-list-item--activated",S[""+_.LIST_ITEM_CLASS]="mdc-list-item",S[""+_.LIST_ITEM_DISABLED_CLASS]="mdc-list-item--disabled",S[""+_.LIST_ITEM_SELECTED_CLASS]="mdc-list-item--selected",S[""+_.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-list-item__primary-text",S[""+_.ROOT]="mdc-list",S),L=((C={})[""+_.LIST_ITEM_ACTIVATED_CLASS]="mdc-deprecated-list-item--activated",C[""+_.LIST_ITEM_CLASS]="mdc-deprecated-list-item",C[""+_.LIST_ITEM_DISABLED_CLASS]="mdc-deprecated-list-item--disabled",C[""+_.LIST_ITEM_SELECTED_CLASS]="mdc-deprecated-list-item--selected",C[""+_.LIST_ITEM_TEXT_CLASS]="mdc-deprecated-list-item__text",C[""+_.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-deprecated-list-item__primary-text",C[""+_.ROOT]="mdc-deprecated-list",C),O={ACTION_EVENT:"MDCList:action",SELECTION_CHANGE_EVENT:"MDCList:selectionChange",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_DISABLED:"aria-disabled",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",ARIA_INTERACTIVE_ROLES_SELECTOR:'[role="listbox"], [role="menu"]',ARIA_MULTI_SELECTABLE_SELECTOR:'[aria-multiselectable="true"]',CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+_.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+_.LIST_ITEM_CLASS+" a,\n ."+L[_.LIST_ITEM_CLASS]+" button:not(:disabled),\n ."+L[_.LIST_ITEM_CLASS]+" a\n ",DEPRECATED_SELECTOR:".mdc-deprecated-list",FOCUSABLE_CHILD_ELEMENTS:"\n ."+_.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+_.LIST_ITEM_CLASS+" a,\n ."+_.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+_.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled),\n .'+L[_.LIST_ITEM_CLASS]+" button:not(:disabled),\n ."+L[_.LIST_ITEM_CLASS]+" a,\n ."+L[_.LIST_ITEM_CLASS]+' input[type="radio"]:not(:disabled),\n .'+L[_.LIST_ITEM_CLASS]+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]',SELECTED_ITEM_SELECTOR:'[aria-selected="true"], [aria-current="true"]'},D={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300},R="Unknown",N="Backspace",F="Enter",M="Spacebar",k="PageUp",w="PageDown",U="End",B="Home",H="ArrowLeft",V="ArrowUp",P="ArrowRight",j="ArrowDown",X="Delete",z="Escape",G="Tab",K=new Set;K.add(N),K.add(F),K.add(M),K.add(k),K.add(w),K.add(U),K.add(B),K.add(H),K.add(V),K.add(P),K.add(j),K.add(X),K.add(z),K.add(G);var $=8,q=13,Y=32,W=33,Z=34,J=35,Q=36,ee=37,te=38,ne=39,ie=40,re=46,se=27,ae=9,oe=new Map;oe.set($,N),oe.set(q,F),oe.set(Y,M),oe.set(W,k),oe.set(Z,w),oe.set(J,U),oe.set(Q,B),oe.set(ee,H),oe.set(te,V),oe.set(ne,P),oe.set(ie,j),oe.set(re,X),oe.set(se,z),oe.set(ae,G);var de=new Set;function ce(e){var t=e.key;if(K.has(t))return t;var n=oe.get(e.keyCode);return n||R}de.add(k),de.add(w),de.add(U),de.add(B),de.add(H),de.add(V),de.add(P),de.add(j);var le=["input","button","textarea","select"],ue=function(e){var t=e.target;if(t){var n=(""+t.tagName).toLowerCase();-1===le.indexOf(n)&&e.preventDefault()}};function pe(e,t){var n,i=e.nextChar,r=e.focusItemAtIndex,s=e.sortedIndexByFirstChar,a=e.focusedItemIndex,o=e.skipFocus,d=e.isItemAtIndexDisabled;return clearTimeout(t.bufferClearTimeout),t.bufferClearTimeout=setTimeout((function(){he(t)}),D.TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS),t.typeaheadBuffer=t.typeaheadBuffer+i,n=1===t.typeaheadBuffer.length?function(e,t,n,i){var r=i.typeaheadBuffer[0],s=e.get(r);if(!s)return-1;if(r===i.currentFirstChar&&s[i.sortedIndexCursor].index===t){i.sortedIndexCursor=(i.sortedIndexCursor+1)%s.length;var a=s[i.sortedIndexCursor].index;if(!n(a))return a}i.currentFirstChar=r;var o,d=-1;for(o=0;o<s.length;o++)if(!n(s[o].index)){d=o;break}for(;o<s.length;o++)if(s[o].index>t&&!n(s[o].index)){d=o;break}if(-1!==d)return i.sortedIndexCursor=d,s[i.sortedIndexCursor].index;return-1}(s,a,d,t):function(e,t,n){var i=n.typeaheadBuffer[0],r=e.get(i);if(!r)return-1;var s=r[n.sortedIndexCursor];if(0===s.text.lastIndexOf(n.typeaheadBuffer,0)&&!t(s.index))return s.index;var a=(n.sortedIndexCursor+1)%r.length,o=-1;for(;a!==n.sortedIndexCursor;){var d=r[a],c=0===d.text.lastIndexOf(n.typeaheadBuffer,0),l=!t(d.index);if(c&&l){o=a;break}a=(a+1)%r.length}if(-1!==o)return n.sortedIndexCursor=o,r[n.sortedIndexCursor].index;return-1}(s,d,t),-1===n||o||r(n),n}function fe(e){return e.typeaheadBuffer.length>0}function he(e){e.typeaheadBuffer=""}function me(e,t){var n=e.event,i=e.isTargetListItem,r=e.focusedItemIndex,s=e.focusItemAtIndex,a=e.sortedIndexByFirstChar,o=e.isItemAtIndexDisabled,d="ArrowLeft"===ce(n),c="ArrowUp"===ce(n),l="ArrowRight"===ce(n),u="ArrowDown"===ce(n),p="Home"===ce(n),f="End"===ce(n),h="Enter"===ce(n),m="Spacebar"===ce(n);return n.altKey||n.ctrlKey||n.metaKey||d||c||l||u||p||f||h?-1:m||1!==n.key.length?m?(i&&ue(n),i&&fe(t)?pe({focusItemAtIndex:s,focusedItemIndex:r,nextChar:" ",sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:o},t):-1):-1:(ue(n),pe({focusItemAtIndex:s,focusedItemIndex:r,nextChar:n.key.toLowerCase(),sortedIndexByFirstChar:a,skipFocus:!1,isItemAtIndexDisabled:o},t))}var Ie=["Alt","Control","Meta","Shift"];function Ee(e){var t=new Set(e?Ie.filter((function(t){return e.getModifierState(t)})):[]);return function(e){return e.every((function(e){return t.has(e)}))&&e.length===t.size}}var ve=function(e){function t(n){var i=e.call(this,E(E({},t.defaultAdapter),n))||this;return i.wrapFocus=!1,i.isVertical=!0,i.isSingleSelectionList=!1,i.areDisabledItemsFocusable=!0,i.selectedIndex=D.UNSET_INDEX,i.focusedItemIndex=D.UNSET_INDEX,i.useActivatedClass=!1,i.useSelectedAttr=!1,i.ariaCurrentAttrValue=null,i.isCheckboxList=!1,i.isRadioList=!1,i.lastSelectedIndex=null,i.hasTypeahead=!1,i.typeaheadState={bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""},i.sortedIndexByFirstChar=new Map,i}return I(t,e),Object.defineProperty(t,"strings",{get:function(){return O},enumerable:!1,configurable:!0}),Object.defineProperty(t,"cssClasses",{get:function(){return _},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return D},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClassForElementIndex:function(){},focusItemAtIndex:function(){},getAttributeForElementIndex:function(){return null},getFocusedElementIndex:function(){return 0},getListItemCount:function(){return 0},hasCheckboxAtIndex:function(){return!1},hasRadioAtIndex:function(){return!1},isCheckboxCheckedAtIndex:function(){return!1},isFocusInsideList:function(){return!1},isRootFocused:function(){return!1},listItemAtIndexHasClass:function(){return!1},notifyAction:function(){},notifySelectionChange:function(){},removeClassForElementIndex:function(){},setAttributeForElementIndex:function(){},setCheckedCheckboxOrRadioAtIndex:function(){},setTabIndexForListItemChildren:function(){},getPrimaryTextAtIndex:function(){return""}}},enumerable:!1,configurable:!0}),t.prototype.layout=function(){0!==this.adapter.getListItemCount()&&(this.adapter.hasCheckboxAtIndex(0)?this.isCheckboxList=!0:this.adapter.hasRadioAtIndex(0)?this.isRadioList=!0:this.maybeInitializeSingleSelection(),this.hasTypeahead&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex()))},t.prototype.getFocusedItemIndex=function(){return this.focusedItemIndex},t.prototype.setWrapFocus=function(e){this.wrapFocus=e},t.prototype.setVerticalOrientation=function(e){this.isVertical=e},t.prototype.setSingleSelection=function(e){this.isSingleSelectionList=e,e&&(this.maybeInitializeSingleSelection(),this.selectedIndex=this.getSelectedIndexFromDOM())},t.prototype.setDisabledItemsFocusable=function(e){this.areDisabledItemsFocusable=e},t.prototype.maybeInitializeSingleSelection=function(){var e=this.getSelectedIndexFromDOM();e!==D.UNSET_INDEX&&(this.adapter.listItemAtIndexHasClass(e,_.LIST_ITEM_ACTIVATED_CLASS)&&this.setUseActivatedClass(!0),this.isSingleSelectionList=!0,this.selectedIndex=e)},t.prototype.getSelectedIndexFromDOM=function(){for(var e=D.UNSET_INDEX,t=this.adapter.getListItemCount(),n=0;n<t;n++){var i=this.adapter.listItemAtIndexHasClass(n,_.LIST_ITEM_SELECTED_CLASS),r=this.adapter.listItemAtIndexHasClass(n,_.LIST_ITEM_ACTIVATED_CLASS);if(i||r){e=n;break}}return e},t.prototype.setHasTypeahead=function(e){this.hasTypeahead=e,e&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex())},t.prototype.isTypeaheadInProgress=function(){return this.hasTypeahead&&fe(this.typeaheadState)},t.prototype.setUseActivatedClass=function(e){this.useActivatedClass=e},t.prototype.setUseSelectedAttribute=function(e){this.useSelectedAttr=e},t.prototype.getSelectedIndex=function(){return this.selectedIndex},t.prototype.setSelectedIndex=function(e,t){void 0===t&&(t={}),this.isIndexValid(e)&&(this.isCheckboxList?this.setCheckboxAtIndex(e,t):this.isRadioList?this.setRadioAtIndex(e,t):this.setSingleSelectionAtIndex(e,t))},t.prototype.handleFocusIn=function(e){e>=0&&(this.focusedItemIndex=e,this.adapter.setAttributeForElementIndex(e,"tabindex","0"),this.adapter.setTabIndexForListItemChildren(e,"0"))},t.prototype.handleFocusOut=function(e){var t=this;e>=0&&(this.adapter.setAttributeForElementIndex(e,"tabindex","-1"),this.adapter.setTabIndexForListItemChildren(e,"-1")),setTimeout((function(){t.adapter.isFocusInsideList()||t.setTabindexToFirstSelectedOrFocusedItem()}),0)},t.prototype.isIndexDisabled=function(e){return this.adapter.listItemAtIndexHasClass(e,_.LIST_ITEM_DISABLED_CLASS)},t.prototype.handleKeydown=function(e,t,n){var i,r=this,s="ArrowLeft"===ce(e),a="ArrowUp"===ce(e),o="ArrowRight"===ce(e),d="ArrowDown"===ce(e),c="Home"===ce(e),l="End"===ce(e),u="Enter"===ce(e),p="Spacebar"===ce(e),f=this.isVertical&&d||!this.isVertical&&o,h=this.isVertical&&a||!this.isVertical&&s,m="A"===e.key||"a"===e.key,I=Ee(e);if(this.adapter.isRootFocused()){if((h||l)&&I([]))e.preventDefault(),this.focusLastElement();else if((f||c)&&I([]))e.preventDefault(),this.focusFirstElement();else if(h&&I(["Shift"])&&this.isCheckboxList){e.preventDefault(),-1!==(v=this.focusLastElement())&&this.setSelectedIndexOnAction(v,!1)}else if(f&&I(["Shift"])&&this.isCheckboxList){e.preventDefault(),-1!==(v=this.focusFirstElement())&&this.setSelectedIndexOnAction(v,!1)}this.hasTypeahead&&me({event:e,focusItemAtIndex:function(e){r.focusItemAtIndex(e)},focusedItemIndex:-1,isTargetListItem:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(e){return r.isIndexDisabled(e)}},this.typeaheadState)}else{var E=this.adapter.getFocusedElementIndex();if(!(-1===E&&(E=n)<0)){if(f&&I([]))ue(e),this.focusNextElement(E);else if(h&&I([]))ue(e),this.focusPrevElement(E);else if(f&&I(["Shift"])&&this.isCheckboxList){ue(e),-1!==(v=this.focusNextElement(E))&&this.setSelectedIndexOnAction(v,!1)}else if(h&&I(["Shift"])&&this.isCheckboxList){var v;ue(e),-1!==(v=this.focusPrevElement(E))&&this.setSelectedIndexOnAction(v,!1)}else if(c&&I([]))ue(e),this.focusFirstElement();else if(l&&I([]))ue(e),this.focusLastElement();else if(c&&I(["Control","Shift"])&&this.isCheckboxList){if(ue(e),this.isIndexDisabled(E))return;this.focusFirstElement(),this.toggleCheckboxRange(0,E,E)}else if(l&&I(["Control","Shift"])&&this.isCheckboxList){if(ue(e),this.isIndexDisabled(E))return;this.focusLastElement(),this.toggleCheckboxRange(E,this.adapter.getListItemCount()-1,E)}else if(m&&I(["Control"])&&this.isCheckboxList)e.preventDefault(),this.checkboxListToggleAll(this.selectedIndex===D.UNSET_INDEX?[]:this.selectedIndex,!0);else if((u||p)&&I([])){if(t){if((A=e.target)&&"A"===A.tagName&&u)return;if(ue(e),this.isIndexDisabled(E))return;this.isTypeaheadInProgress()||(this.isSelectableList()&&this.setSelectedIndexOnAction(E,!1),this.adapter.notifyAction(E))}}else if((u||p)&&I(["Shift"])&&this.isCheckboxList){var A;if((A=e.target)&&"A"===A.tagName&&u)return;if(ue(e),this.isIndexDisabled(E))return;this.isTypeaheadInProgress()||(this.toggleCheckboxRange(null!==(i=this.lastSelectedIndex)&&void 0!==i?i:E,E,E),this.adapter.notifyAction(E))}if(this.hasTypeahead)me({event:e,focusItemAtIndex:function(e){r.focusItemAtIndex(e)},focusedItemIndex:this.focusedItemIndex,isTargetListItem:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(e){return r.isIndexDisabled(e)}},this.typeaheadState)}}},t.prototype.handleClick=function(e,t,n){var i,r=Ee(n);e!==D.UNSET_INDEX&&(this.isIndexDisabled(e)||(r([])?(this.isSelectableList()&&this.setSelectedIndexOnAction(e,t),this.adapter.notifyAction(e)):this.isCheckboxList&&r(["Shift"])&&(this.toggleCheckboxRange(null!==(i=this.lastSelectedIndex)&&void 0!==i?i:e,e,e),this.adapter.notifyAction(e))))},t.prototype.focusNextElement=function(e){var t=this.adapter.getListItemCount(),n=e,i=null;do{if(++n>=t){if(!this.wrapFocus)return e;n=0}if(n===i)return-1;i=null!==i&&void 0!==i?i:n}while(!this.areDisabledItemsFocusable&&this.isIndexDisabled(n));return this.focusItemAtIndex(n),n},t.prototype.focusPrevElement=function(e){var t=this.adapter.getListItemCount(),n=e,i=null;do{if(--n<0){if(!this.wrapFocus)return e;n=t-1}if(n===i)return-1;i=null!==i&&void 0!==i?i:n}while(!this.areDisabledItemsFocusable&&this.isIndexDisabled(n));return this.focusItemAtIndex(n),n},t.prototype.focusFirstElement=function(){return this.focusNextElement(-1)},t.prototype.focusLastElement=function(){return this.focusPrevElement(this.adapter.getListItemCount())},t.prototype.focusInitialElement=function(){var e=this.getFirstSelectedOrFocusedItemIndex();return this.focusItemAtIndex(e),e},t.prototype.setEnabled=function(e,t){this.isIndexValid(e,!1)&&(t?(this.adapter.removeClassForElementIndex(e,_.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(e,O.ARIA_DISABLED,"false")):(this.adapter.addClassForElementIndex(e,_.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(e,O.ARIA_DISABLED,"true")))},t.prototype.setSingleSelectionAtIndex=function(e,t){if(void 0===t&&(t={}),this.selectedIndex!==e||t.forceUpdate){var n=_.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass&&(n=_.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex!==D.UNSET_INDEX&&this.adapter.removeClassForElementIndex(this.selectedIndex,n),this.setAriaForSingleSelectionAtIndex(e),this.setTabindexAtIndex(e),e!==D.UNSET_INDEX&&this.adapter.addClassForElementIndex(e,n),this.selectedIndex=e,t.isUserInteraction&&!t.forceUpdate&&this.adapter.notifySelectionChange([e])}},t.prototype.setAriaForSingleSelectionAtIndex=function(e){this.selectedIndex===D.UNSET_INDEX&&(this.ariaCurrentAttrValue=this.adapter.getAttributeForElementIndex(e,O.ARIA_CURRENT));var t=null!==this.ariaCurrentAttrValue,n=t?O.ARIA_CURRENT:O.ARIA_SELECTED;if(this.selectedIndex!==D.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex,n,"false"),e!==D.UNSET_INDEX){var i=t?this.ariaCurrentAttrValue:"true";this.adapter.setAttributeForElementIndex(e,n,i)}},t.prototype.getSelectionAttribute=function(){return this.useSelectedAttr?O.ARIA_SELECTED:O.ARIA_CHECKED},t.prototype.setRadioAtIndex=function(e,t){void 0===t&&(t={});var n=this.getSelectionAttribute();this.adapter.setCheckedCheckboxOrRadioAtIndex(e,!0),(this.selectedIndex!==e||t.forceUpdate)&&(this.selectedIndex!==D.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex,n,"false"),this.adapter.setAttributeForElementIndex(e,n,"true"),this.selectedIndex=e,t.isUserInteraction&&!t.forceUpdate&&this.adapter.notifySelectionChange([e]))},t.prototype.setCheckboxAtIndex=function(e,t){void 0===t&&(t={});for(var n=this.selectedIndex,i=t.isUserInteraction?new Set(n===D.UNSET_INDEX?[]:n):null,r=this.getSelectionAttribute(),s=[],a=0;a<this.adapter.getListItemCount();a++){var o=null===i||void 0===i?void 0:i.has(a),d=e.indexOf(a)>=0;d!==o&&s.push(a),this.adapter.setCheckedCheckboxOrRadioAtIndex(a,d),this.adapter.setAttributeForElementIndex(a,r,d?"true":"false")}this.selectedIndex=e,t.isUserInteraction&&s.length&&this.adapter.notifySelectionChange(s)},t.prototype.toggleCheckboxRange=function(e,t,n){this.lastSelectedIndex=n;for(var i=new Set(this.selectedIndex===D.UNSET_INDEX?[]:this.selectedIndex),r=!(null===i||void 0===i?void 0:i.has(n)),s=A([e,t].sort(),2),a=s[0],o=s[1],d=this.getSelectionAttribute(),c=[],l=a;l<=o;l++){if(!this.isIndexDisabled(l))r!==i.has(l)&&(c.push(l),this.adapter.setCheckedCheckboxOrRadioAtIndex(l,r),this.adapter.setAttributeForElementIndex(l,d,""+r),r?i.add(l):i.delete(l))}c.length&&(this.selectedIndex=y([],A(i)),this.adapter.notifySelectionChange(c))},t.prototype.setTabindexAtIndex=function(e){this.focusedItemIndex===D.UNSET_INDEX&&0!==e?this.adapter.setAttributeForElementIndex(0,"tabindex","-1"):this.focusedItemIndex>=0&&this.focusedItemIndex!==e&&this.adapter.setAttributeForElementIndex(this.focusedItemIndex,"tabindex","-1"),this.selectedIndex instanceof Array||this.selectedIndex===e||this.adapter.setAttributeForElementIndex(this.selectedIndex,"tabindex","-1"),e!==D.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(e,"tabindex","0")},t.prototype.isSelectableList=function(){return this.isSingleSelectionList||this.isCheckboxList||this.isRadioList},t.prototype.setTabindexToFirstSelectedOrFocusedItem=function(){var e=this.getFirstSelectedOrFocusedItemIndex();this.setTabindexAtIndex(e)},t.prototype.getFirstSelectedOrFocusedItemIndex=function(){return this.isSelectableList()?"number"===typeof this.selectedIndex&&this.selectedIndex!==D.UNSET_INDEX?this.selectedIndex:this.selectedIndex instanceof Array&&this.selectedIndex.length>0?this.selectedIndex.reduce((function(e,t){return Math.min(e,t)})):0:Math.max(this.focusedItemIndex,0)},t.prototype.isIndexValid=function(e,t){var n=this;if(void 0===t&&(t=!0),e instanceof Array){if(!this.isCheckboxList&&t)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");return 0===e.length||e.some((function(e){return n.isIndexInRange(e)}))}if("number"===typeof e){if(this.isCheckboxList&&t)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+e);return this.isIndexInRange(e)||this.isSingleSelectionList&&e===D.UNSET_INDEX}return!1},t.prototype.isIndexInRange=function(e){var t=this.adapter.getListItemCount();return e>=0&&e<t},t.prototype.setSelectedIndexOnAction=function(e,t){this.lastSelectedIndex=e,this.isCheckboxList?(this.toggleCheckboxAtIndex(e,t),this.adapter.notifySelectionChange([e])):this.setSelectedIndex(e,{isUserInteraction:!0})},t.prototype.toggleCheckboxAtIndex=function(e,t){var n,i=this.getSelectionAttribute(),r=this.adapter.isCheckboxCheckedAtIndex(e);t?n=r:(n=!r,this.adapter.setCheckedCheckboxOrRadioAtIndex(e,n)),this.adapter.setAttributeForElementIndex(e,i,n?"true":"false");var s=this.selectedIndex===D.UNSET_INDEX?[]:this.selectedIndex.slice();n?s.push(e):s=s.filter((function(t){return t!==e})),this.selectedIndex=s},t.prototype.focusItemAtIndex=function(e){this.adapter.focusItemAtIndex(e),this.focusedItemIndex=e},t.prototype.checkboxListToggleAll=function(e,t){var n=this.adapter.getListItemCount();if(e.length===n)this.setCheckboxAtIndex([],{isUserInteraction:t});else{for(var i=[],r=0;r<n;r++)(!this.isIndexDisabled(r)||e.indexOf(r)>-1)&&i.push(r);this.setCheckboxAtIndex(i,{isUserInteraction:t})}},t.prototype.typeaheadMatchItem=function(e,t,n){var i=this;return void 0===n&&(n=!1),pe({focusItemAtIndex:function(e){i.focusItemAtIndex(e)},focusedItemIndex:t||this.focusedItemIndex,nextChar:e,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:n,isItemAtIndexDisabled:function(e){return i.isIndexDisabled(e)}},this.typeaheadState)},t.prototype.typeaheadInitSortedIndex=function(){return function(e,t){for(var n=new Map,i=0;i<e;i++){var r=t(i).trim();if(r){var s=r[0].toLowerCase();n.has(s)||n.set(s,[]),n.get(s).push({text:r.toLowerCase(),index:i})}}return n.forEach((function(e){e.sort((function(e,t){return e.index-t.index}))})),n}(this.adapter.getListItemCount(),this.adapter.getPrimaryTextAtIndex)},t.prototype.clearTypeaheadBuffer=function(){he(this.typeaheadState)},t}(x),Ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return I(t,e),Object.defineProperty(t.prototype,"vertical",{set:function(e){this.foundation.setVerticalOrientation(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"listElements",{get:function(){return Array.from(this.root.querySelectorAll("."+this.classNameMap[_.LIST_ITEM_CLASS]))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wrapFocus",{set:function(e){this.foundation.setWrapFocus(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"typeaheadInProgress",{get:function(){return this.foundation.isTypeaheadInProgress()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasTypeahead",{set:function(e){this.foundation.setHasTypeahead(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"singleSelection",{set:function(e){this.foundation.setSingleSelection(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disabledItemsFocusable",{set:function(e){this.foundation.setDisabledItemsFocusable(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this.foundation.getSelectedIndex()},set:function(e){this.foundation.setSelectedIndex(e)},enumerable:!1,configurable:!0}),t.attachTo=function(e){return new t(e)},t.prototype.initialSyncWithDOM=function(){this.isEvolutionEnabled="evolution"in this.root.dataset,this.isEvolutionEnabled?this.classNameMap=g:T(this.root,O.DEPRECATED_SELECTOR)?this.classNameMap=L:this.classNameMap=Object.values(_).reduce((function(e,t){return e[t]=t,e}),{}),this.handleClick=this.handleClickEvent.bind(this),this.handleKeydown=this.handleKeydownEvent.bind(this),this.focusInEventListener=this.handleFocusInEvent.bind(this),this.focusOutEventListener=this.handleFocusOutEvent.bind(this),this.listen("keydown",this.handleKeydown),this.listen("click",this.handleClick),this.listen("focusin",this.focusInEventListener),this.listen("focusout",this.focusOutEventListener),this.layout(),this.initializeListType(),this.ensureFocusable()},t.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown),this.unlisten("click",this.handleClick),this.unlisten("focusin",this.focusInEventListener),this.unlisten("focusout",this.focusOutEventListener)},t.prototype.layout=function(){var e=this.root.getAttribute(O.ARIA_ORIENTATION);this.vertical=e!==O.ARIA_ORIENTATION_HORIZONTAL;var t="."+this.classNameMap[_.LIST_ITEM_CLASS]+":not([tabindex])",n=O.FOCUSABLE_CHILD_ELEMENTS,i=this.root.querySelectorAll(t);i.length&&Array.prototype.forEach.call(i,(function(e){e.setAttribute("tabindex","-1")}));var r=this.root.querySelectorAll(n);r.length&&Array.prototype.forEach.call(r,(function(e){e.setAttribute("tabindex","-1")})),this.isEvolutionEnabled&&this.foundation.setUseSelectedAttribute(!0),this.foundation.layout()},t.prototype.getPrimaryText=function(e){var t,n=e.querySelector("."+this.classNameMap[_.LIST_ITEM_PRIMARY_TEXT_CLASS]);if(this.isEvolutionEnabled||n)return null!==(t=null===n||void 0===n?void 0:n.textContent)&&void 0!==t?t:"";var i=e.querySelector("."+this.classNameMap[_.LIST_ITEM_TEXT_CLASS]);return i&&i.textContent||""},t.prototype.initializeListType=function(){var e=this;if(this.isInteractive=T(this.root,O.ARIA_INTERACTIVE_ROLES_SELECTOR),this.isEvolutionEnabled&&this.isInteractive){var t=Array.from(this.root.querySelectorAll(O.SELECTED_ITEM_SELECTOR),(function(t){return e.listElements.indexOf(t)}));T(this.root,O.ARIA_MULTI_SELECTABLE_SELECTOR)?this.selectedIndex=t:t.length>0&&(this.selectedIndex=t[0])}else{var n=this.root.querySelectorAll(O.ARIA_ROLE_CHECKBOX_SELECTOR),i=this.root.querySelector(O.ARIA_CHECKED_RADIO_SELECTOR);if(n.length){var r=this.root.querySelectorAll(O.ARIA_CHECKED_CHECKBOX_SELECTOR);this.selectedIndex=Array.from(r,(function(t){return e.listElements.indexOf(t)}))}else i&&(this.selectedIndex=this.listElements.indexOf(i))}},t.prototype.setEnabled=function(e,t){this.foundation.setEnabled(e,t)},t.prototype.typeaheadMatchItem=function(e,t){return this.foundation.typeaheadMatchItem(e,t,!0)},t.prototype.getDefaultFoundation=function(){var e=this;return new ve({addClassForElementIndex:function(t,n){var i=e.listElements[t];i&&i.classList.add(e.classNameMap[n])},focusItemAtIndex:function(t){var n=e.listElements[t];n&&n.focus()},getAttributeForElementIndex:function(t,n){return e.listElements[t].getAttribute(n)},getFocusedElementIndex:function(){return e.listElements.indexOf(document.activeElement)},getListItemCount:function(){return e.listElements.length},getPrimaryTextAtIndex:function(t){return e.getPrimaryText(e.listElements[t])},hasCheckboxAtIndex:function(t){return!!e.listElements[t].querySelector(O.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(t){return!!e.listElements[t].querySelector(O.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(t){return e.listElements[t].querySelector(O.CHECKBOX_SELECTOR).checked},isFocusInsideList:function(){return e.root!==document.activeElement&&e.root.contains(document.activeElement)},isRootFocused:function(){return document.activeElement===e.root},listItemAtIndexHasClass:function(t,n){return e.listElements[t].classList.contains(e.classNameMap[n])},notifyAction:function(t){e.emit(O.ACTION_EVENT,{index:t},!0)},notifySelectionChange:function(t){e.emit(O.SELECTION_CHANGE_EVENT,{changedIndices:t},!0)},removeClassForElementIndex:function(t,n){var i=e.listElements[t];i&&i.classList.remove(e.classNameMap[n])},setAttributeForElementIndex:function(t,n,i){var r=e.listElements[t];r&&r.setAttribute(n,i)},setCheckedCheckboxOrRadioAtIndex:function(t,n){var i=e.listElements[t].querySelector(O.CHECKBOX_RADIO_SELECTOR);i.checked=n;var r=document.createEvent("Event");r.initEvent("change",!0,!0),i.dispatchEvent(r)},setTabIndexForListItemChildren:function(t,n){var i=e.listElements[t],r=O.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX;Array.prototype.forEach.call(i.querySelectorAll(r),(function(e){e.setAttribute("tabindex",n)}))}})},t.prototype.ensureFocusable=function(){if(this.isEvolutionEnabled&&this.isInteractive&&!this.root.querySelector("."+this.classNameMap[_.LIST_ITEM_CLASS]+'[tabindex="0"]')){var e=this.initialFocusIndex();-1!==e&&(this.listElements[e].tabIndex=0)}},t.prototype.initialFocusIndex=function(){if(this.selectedIndex instanceof Array&&this.selectedIndex.length>0)return this.selectedIndex[0];if("number"===typeof this.selectedIndex&&this.selectedIndex!==D.UNSET_INDEX)return this.selectedIndex;var e=this.root.querySelector("."+this.classNameMap[_.LIST_ITEM_CLASS]+":not(."+this.classNameMap[_.LIST_ITEM_DISABLED_CLASS]+")");return null===e?-1:this.getListItemIndex(e)},t.prototype.getListItemIndex=function(e){var t=function(e,t){if(e.closest)return e.closest(t);for(var n=e;n;){if(T(n,t))return n;n=n.parentElement}return null}(e,"."+this.classNameMap[_.LIST_ITEM_CLASS]+", ."+this.classNameMap[_.ROOT]);return t&&T(t,"."+this.classNameMap[_.LIST_ITEM_CLASS])?this.listElements.indexOf(t):-1},t.prototype.handleFocusInEvent=function(e){var t=this.getListItemIndex(e.target);this.foundation.handleFocusIn(t)},t.prototype.handleFocusOutEvent=function(e){var t=this.getListItemIndex(e.target);this.foundation.handleFocusOut(t)},t.prototype.handleKeydownEvent=function(e){var t=this.getListItemIndex(e.target),n=e.target;this.foundation.handleKeydown(e,n.classList.contains(this.classNameMap[_.LIST_ITEM_CLASS]),t)},t.prototype.handleClickEvent=function(e){var t=this.getListItemIndex(e.target),n=!T(e.target,O.CHECKBOX_RADIO_SELECTOR);this.foundation.handleClick(t,n,e)},t}(b);var ye=(e,t,n)=>e[n]||e.type===t[n]||e.type===n;const Se=Object.assign({},L,{"mdc-list-item__graphic":"mdc-deprecated-list-item__graphic","mdc-list-item__meta":"mdc-deprecated-list-item__meta","mdc-list-item__secondary-text":"mdc-deprecated-list-item__secondary-text","mdc-list-item__ripple":"mdc-deprecated-list-item__ripple","mdc-list-group__subheader":"mdc-deprecated-list-group__subheader","mdc-list-group":"mdc-deprecated-list-group","mdc-list-divider":"mdc-deprecated-list-divider"}),Ce={TYPES:{singleLine:1,twoLine:2},EVENTS:{ACTION:"update:modelValue"}},xe={cssClasses:{active:Se["mdc-list-item--activated"],firstTile:Se["mdc-list-item__graphic"],lastTile:Se["mdc-list-item__meta"]}},be={type:{type:[String,Number],default:1},nonInteractive:{type:Boolean,default:!1},dense:{type:Boolean,default:!1},avatar:{type:Boolean,default:!1}},Te=(0,h.reactive)({$list:null});function _e(e,t,n){let{init:i,update:r}=n;const s=(0,h.computed)((()=>ye(t,Ce.TYPES,"twoLine"))),a=(0,h.computed)((()=>[Se["mdc-list"],{"mdc-deprecated-list--two-line":s.value,"mdc-deprecated-list--non-interactive":t.nonInteractive,"mdc-deprecated-list--dense":t.dense,"mdc-deprecated-list--avatar-list":t.avatar}]));return(0,h.onMounted)((()=>{Te.$list=new Ae(e.value),i&&i(Te.$list),function(e){const t=e.value.parentNode;if(t&&t.classList.contains("mdc-drawer__content")&&Te.$list.listElements.length){const e=Te.$list.listElements.find((e=>e.classList.contains(xe.cssClasses.active)||e.classList.contains(Se["mdc-list-item--activated"])))||Te.$list.listElements[0];e.setAttribute("tabindex",0)}}(e),(0,h.watch)((()=>t.modelValue),(e=>{Te.$list&&(Te.$list.selectedIndex=e)}))})),(0,h.onUpdated)((()=>r&&r(Te.$list))),{className:a}}const ge={name:"UiNav",customOptions:{}};var Le=Object.assign(ge,{props:{...be},setup(e){const t=e,n=(0,h.ref)(null),{className:i}=_e(n,t,{});return(e,t)=>((0,h.openBlock)(),(0,h.createElementBlock)("nav",{ref_key:"list",ref:n,class:(0,h.normalizeClass)((0,h.unref)(i))},[(0,h.renderSlot)(e.$slots,"default")],2))}});var Oe=Le;const De={cssClasses:{icon:"material-icons"},EVENTS:{CLICK:"click"},getMaterialIconClass:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return[De.cssClasses.icon,...t]}};function Re(e){let{emit:t}=e;return{handleClick:function(e){t(De.EVENTS.CLICK,e)}}}var Ne=De;function Fe(e){let t=null;const n=e.parentNode;if(n){t=n.classList.contains(Se["mdc-list"])?n:Fe(n)}return t}function Me(e){let{disabled:t,selected:n,activated:i}=e,r=[];return t&&r.push(Se["mdc-list-item--disabled"]),n&&r.push(Se["mdc-list-item--selected"]),i&&r.push(Se["mdc-list-item--activated"]),r}function ke(e){let t=null;return{hasRipple:(0,h.computed)((async()=>{await(0,h.nextTick)((()=>{const n=e.value;t=Fe(n)}));return!(t&&t.classList.contains("mdc-deprecated-list--non-interactive"))})),deprecatedListClassNameMap:Se}}const we=["href"],Ue={name:"UiNavItem",customOptions:{UI_GLOBAL:Ne,UI_ITEM:xe}};var Be=Object.assign(Ue,{props:{href:{type:String,required:!0},active:{type:Boolean,default:!1}},emits:[Ne.EVENTS.CLICK],setup(e,t){let{emit:n}=t;const i=e,r=n,s=(0,h.ref)(null),{handleClick:a}=Re({emit:r}),{hasRipple:o,deprecatedListClassNameMap:d}=ke(s),c=(0,h.computed)((()=>[d["mdc-list-item"],...Me({activated:i.active})]));return(t,n)=>((0,h.openBlock)(),(0,h.createElementBlock)("a",{ref_key:"item",ref:s,href:e.href,class:(0,h.normalizeClass)(c.value),onClick:n[0]||(n[0]=function(){return(0,h.unref)(a)&&(0,h.unref)(a)(...arguments)})},[(0,h.unref)(o)?((0,h.openBlock)(),(0,h.createElementBlock)("span",{key:0,class:(0,h.normalizeClass)((0,h.unref)(d)["mdc-list-item__ripple"])},null,2)):(0,h.createCommentVNode)("",!0),(0,h.renderSlot)(t.$slots,"before",{iconClass:(0,h.unref)(xe).cssClasses.firstTile}),(0,h.renderSlot)(t.$slots,"default"),(0,h.renderSlot)(t.$slots,"after",{iconClass:(0,h.unref)(xe).cssClasses.lastTile})],10,we))}});var He=Be;function Ve(e){return void 0===e&&(e=window),!!function(e){void 0===e&&(e=window);var t=!1;try{var n={get passive(){return t=!0,!1}},i=function(){};e.document.addEventListener("test",i,n),e.document.removeEventListener("test",i,n)}catch(r){t=!1}return t}(e)&&{passive:!0}}var Pe,je={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"},Xe={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"},ze={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};var Ge=["touchstart","pointerdown","mousedown","keydown"],Ke=["touchend","pointerup","mouseup","contextmenu"],$e=[],qe=function(e){function t(n){var i=e.call(this,E(E({},t.defaultAdapter),n))||this;return i.activationAnimationHasEnded=!1,i.activationTimer=0,i.fgDeactivationRemovalTimer=0,i.fgScale="0",i.frame={width:0,height:0},i.initialSize=0,i.layoutFrame=0,i.maxRadius=0,i.unboundedCoords={left:0,top:0},i.activationState=i.defaultActivationState(),i.activationTimerCallback=function(){i.activationAnimationHasEnded=!0,i.runDeactivationUXLogicIfReady()},i.activateHandler=function(e){i.activateImpl(e)},i.deactivateHandler=function(){i.deactivateImpl()},i.focusHandler=function(){i.handleFocus()},i.blurHandler=function(){i.handleBlur()},i.resizeHandler=function(){i.layout()},i}return I(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return je},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Xe},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return ze},enumerable:!1,configurable:!0}),Object.defineProperty(t,"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}),t.prototype.init=function(){var e=this,n=this.supportsPressRipple();if(this.registerRootHandlers(n),n){var i=t.cssClasses,r=i.ROOT,s=i.UNBOUNDED;requestAnimationFrame((function(){e.adapter.addClass(r),e.adapter.isUnbounded()&&(e.adapter.addClass(s),e.layoutInternal())}))}},t.prototype.destroy=function(){var e=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(t.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(t.cssClasses.FG_DEACTIVATION));var n=t.cssClasses,i=n.ROOT,r=n.UNBOUNDED;requestAnimationFrame((function(){e.adapter.removeClass(i),e.adapter.removeClass(r),e.removeCssVars()}))}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},t.prototype.activate=function(e){this.activateImpl(e)},t.prototype.deactivate=function(){this.deactivateImpl()},t.prototype.layout=function(){var e=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame((function(){e.layoutInternal(),e.layoutFrame=0}))},t.prototype.setUnbounded=function(e){var n=t.cssClasses.UNBOUNDED;e?this.adapter.addClass(n):this.adapter.removeClass(n)},t.prototype.handleFocus=function(){var e=this;requestAnimationFrame((function(){return e.adapter.addClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.handleBlur=function(){var e=this;requestAnimationFrame((function(){return e.adapter.removeClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},t.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},t.prototype.registerRootHandlers=function(e){var t,n;if(e){try{for(var i=v(Ge),r=i.next();!r.done;r=i.next()){var s=r.value;this.adapter.registerInteractionHandler(s,this.activateHandler)}}catch(a){t={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},t.prototype.registerDeactivationHandlers=function(e){var t,n;if("keydown"===e.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var i=v(Ke),r=i.next();!r.done;r=i.next()){var s=r.value;this.adapter.registerDocumentInteractionHandler(s,this.deactivateHandler)}}catch(a){t={error:a}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},t.prototype.deregisterRootHandlers=function(){var e,t;try{for(var n=v(Ge),i=n.next();!i.done;i=n.next()){var r=i.value;this.adapter.deregisterInteractionHandler(r,this.activateHandler)}}catch(s){e={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},t.prototype.deregisterDeactivationHandlers=function(){var e,t;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var n=v(Ke),i=n.next();!i.done;i=n.next()){var r=i.value;this.adapter.deregisterDocumentInteractionHandler(r,this.deactivateHandler)}}catch(s){e={error:s}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},t.prototype.removeCssVars=function(){var e=this,n=t.strings;Object.keys(n).forEach((function(t){0===t.indexOf("VAR_")&&e.adapter.updateCssVariable(n[t],null)}))},t.prototype.activateImpl=function(e){var t=this;if(!this.adapter.isSurfaceDisabled()){var n=this.activationState;if(!n.isActivated){var i=this.previousActivationEvent;if(!(i&&void 0!==e&&i.type!==e.type))n.isActivated=!0,n.isProgrammatic=void 0===e,n.activationEvent=e,n.wasActivatedByPointer=!n.isProgrammatic&&(void 0!==e&&("mousedown"===e.type||"touchstart"===e.type||"pointerdown"===e.type)),void 0!==e&&$e.length>0&&$e.some((function(e){return t.adapter.containsEventTarget(e)}))?this.resetActivationState():(void 0!==e&&($e.push(e.target),this.registerDeactivationHandlers(e)),n.wasElementMadeActive=this.checkElementMadeActive(e),n.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){$e=[],n.wasElementMadeActive||void 0===e||" "!==e.key&&32!==e.keyCode||(n.wasElementMadeActive=t.checkElementMadeActive(e),n.wasElementMadeActive&&t.animateActivation()),n.wasElementMadeActive||(t.activationState=t.defaultActivationState())})))}}},t.prototype.checkElementMadeActive=function(e){return void 0===e||"keydown"!==e.type||this.adapter.isSurfaceActive()},t.prototype.animateActivation=function(){var e=this,n=t.strings,i=n.VAR_FG_TRANSLATE_START,r=n.VAR_FG_TRANSLATE_END,s=t.cssClasses,a=s.FG_DEACTIVATION,o=s.FG_ACTIVATION,d=t.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var c="",l="";if(!this.adapter.isUnbounded()){var u=this.getFgTranslationCoordinates(),p=u.startPoint,f=u.endPoint;c=p.x+"px, "+p.y+"px",l=f.x+"px, "+f.y+"px"}this.adapter.updateCssVariable(i,c),this.adapter.updateCssVariable(r,l),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(a),this.adapter.computeBoundingRect(),this.adapter.addClass(o),this.activationTimer=setTimeout((function(){e.activationTimerCallback()}),d)},t.prototype.getFgTranslationCoordinates=function(){var e,t=this.activationState,n=t.activationEvent;return{startPoint:e={x:(e=t.wasActivatedByPointer?function(e,t,n){if(!e)return{x:0,y:0};var i,r,s=t.x,a=t.y,o=s+n.left,d=a+n.top;if("touchstart"===e.type){var c=e;i=c.changedTouches[0].pageX-o,r=c.changedTouches[0].pageY-d}else{var l=e;i=l.pageX-o,r=l.pageY-d}return{x:i,y:r}}(n,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2}).x-this.initialSize/2,y:e.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},t.prototype.runDeactivationUXLogicIfReady=function(){var e=this,n=t.cssClasses.FG_DEACTIVATION,i=this.activationState,r=i.hasDeactivationUXRun,s=i.isActivated;(r||!s)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(n),this.fgDeactivationRemovalTimer=setTimeout((function(){e.adapter.removeClass(n)}),ze.FG_DEACTIVATION_MS))},t.prototype.rmBoundedActivationClasses=function(){var e=t.cssClasses.FG_ACTIVATION;this.adapter.removeClass(e),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},t.prototype.resetActivationState=function(){var e=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout((function(){return e.previousActivationEvent=void 0}),t.numbers.TAP_DELAY_MS)},t.prototype.deactivateImpl=function(){var e=this,t=this.activationState;if(t.isActivated){var n=E({},t);t.isProgrammatic?(requestAnimationFrame((function(){e.animateDeactivation(n)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){e.activationState.hasDeactivationUXRun=!0,e.animateDeactivation(n),e.resetActivationState()})))}},t.prototype.animateDeactivation=function(e){var t=e.wasActivatedByPointer,n=e.wasElementMadeActive;(t||n)&&this.runDeactivationUXLogicIfReady()},t.prototype.layoutInternal=function(){var e=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(e.frame.width,2)+Math.pow(e.frame.height,2))+t.numbers.PADDING;var i=Math.floor(n*t.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&i%2!==0?this.initialSize=i-1:this.initialSize=i,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},t.prototype.updateLayoutCssVars=function(){var e=t.strings,n=e.VAR_FG_SIZE,i=e.VAR_LEFT,r=e.VAR_TOP,s=e.VAR_FG_SCALE;this.adapter.updateCssVariable(n,this.initialSize+"px"),this.adapter.updateCssVariable(s,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(i,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(r,this.unboundedCoords.top+"px"))},t}(x),Ye=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.disabled=!1,t}return I(t,e),t.attachTo=function(e,n){void