@openremote/or-asset-tree 1.9.0-snapshot.20250825142142 → 1.9.0-snapshot.20250826113849

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/umd/index.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("ORTranslate"),require("ORCore"),require("ORModel"),require("ORIcon")):"function"==typeof define&&define.amd?define(["ORTranslate","ORCore","ORModel","ORIcon"],e):"object"==typeof exports?exports.ORAssetTree=e(require("ORTranslate"),require("ORCore"),require("ORModel"),require("ORIcon")):t.ORAssetTree=e(t.ORTranslate,t.ORCore,t.ORModel,t.ORIcon)}(self,(__WEBPACK_EXTERNAL_MODULE__9329__,__WEBPACK_EXTERNAL_MODULE__6801__,__WEBPACK_EXTERNAL_MODULE__4297__,__WEBPACK_EXTERNAL_MODULE__6243__)=>(()=>{var __webpack_modules__={1872:function(t,e,n){"use strict";n.d(e,{B:()=>a});function i(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function r(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(i(arguments[e]));return t}var o=n(4327),a=function(){function t(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];this.root=t,this.initialize.apply(this,r(n)),this.foundation=void 0===e?this.getDefaultFoundation():e,this.foundation.init(),this.initialSyncWithDOM()}return t.attachTo=function(e){return new t(e,new o.K({}))},t.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},t.prototype.getDefaultFoundation=function(){throw 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 i;void 0===n&&(n=!1),"function"==typeof CustomEvent?i=new CustomEvent(t,{bubbles:n,detail:e}):(i=document.createEvent("CustomEvent")).initCustomEvent(t,n,!1,e),this.root.dispatchEvent(i)},t}()},4327:function(t,e,n){"use strict";n.d(e,{K:()=>i});var i=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}()},9364:function(t,e,n){"use strict";function i(t){return void 0===t&&(t=window),!!r(t)&&{passive:!0}}function r(t){void 0===t&&(t=window);var e=!1;try{var n={get passive(){return e=!0,!1}},i=function(){};t.document.addEventListener("test",i,n),t.document.removeEventListener("test",i,n)}catch(t){e=!1}return e}n.d(e,{K:()=>i})},9905:function(t,e,n){"use strict";n.d(e,{Fn:()=>i,ku:()=>y});var i={UNKNOWN:"Unknown",BACKSPACE:"Backspace",ENTER:"Enter",SPACEBAR:"Spacebar",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",END:"End",HOME:"Home",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",DELETE:"Delete",ESCAPE:"Escape"},r=new Set;r.add(i.BACKSPACE),r.add(i.ENTER),r.add(i.SPACEBAR),r.add(i.PAGE_UP),r.add(i.PAGE_DOWN),r.add(i.END),r.add(i.HOME),r.add(i.ARROW_LEFT),r.add(i.ARROW_UP),r.add(i.ARROW_RIGHT),r.add(i.ARROW_DOWN),r.add(i.DELETE),r.add(i.ESCAPE);var o=8,a=13,l=32,c=33,d=34,s=35,m=36,p=37,u=38,f=39,h=40,g=46,b=27,_=new Map;_.set(o,i.BACKSPACE),_.set(a,i.ENTER),_.set(l,i.SPACEBAR),_.set(c,i.PAGE_UP),_.set(d,i.PAGE_DOWN),_.set(s,i.END),_.set(m,i.HOME),_.set(p,i.ARROW_LEFT),_.set(u,i.ARROW_UP),_.set(f,i.ARROW_RIGHT),_.set(h,i.ARROW_DOWN),_.set(g,i.DELETE),_.set(b,i.ESCAPE);var v=new Set;function y(t){var e=t.key;if(r.has(e))return e;var n=_.get(t.keyCode);return n||i.UNKNOWN}v.add(i.PAGE_UP),v.add(i.PAGE_DOWN),v.add(i.END),v.add(i.HOME),v.add(i.ARROW_LEFT),v.add(i.ARROW_UP),v.add(i.ARROW_RIGHT),v.add(i.ARROW_DOWN)},2584:function(t,e,n){"use strict";function i(t,e){if(t.closest)return t.closest(e);for(var n=t;n;){if(r(n,e))return n;n=n.parentElement}return null}function r(t,e){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e)}function o(t){var e=t;if(null!==e.offsetParent)return e.scrollWidth;var n=e.cloneNode(!0);n.style.setProperty("position","absolute"),n.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(n);var i=n.scrollWidth;return document.documentElement.removeChild(n),i}n.d(e,{FL:()=>o,oq:()=>i,wB:()=>r})},2326:function(t,e,n){"use strict";n.d(e,{e:()=>c});var i=n(2093),r=n(1872),o=n(2584),a=n(3164),l=n(7066),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),Object.defineProperty(e.prototype,"vertical",{set:function(t){this.foundation.setVerticalOrientation(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"listElements",{get:function(){return[].slice.call(this.root.querySelectorAll("."+a.UX.LIST_ITEM_CLASS))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wrapFocus",{set:function(t){this.foundation.setWrapFocus(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"typeaheadInProgress",{get:function(){return this.foundation.isTypeaheadInProgress()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasTypeahead",{set:function(t){this.foundation.setHasTypeahead(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"singleSelection",{set:function(t){this.foundation.setSingleSelection(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedIndex",{get:function(){return this.foundation.getSelectedIndex()},set:function(t){this.foundation.setSelectedIndex(t)},enumerable:!0,configurable:!0}),e.attachTo=function(t){return new e(t)},e.prototype.initialSyncWithDOM=function(){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()},e.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown_),this.unlisten("click",this.handleClick_),this.unlisten("focusin",this.focusInEventListener_),this.unlisten("focusout",this.focusOutEventListener_)},e.prototype.layout=function(){var t=this.root.getAttribute(a.j2.ARIA_ORIENTATION);this.vertical=t!==a.j2.ARIA_ORIENTATION_HORIZONTAL,[].slice.call(this.root.querySelectorAll(".mdc-list-item:not([tabindex])")).forEach(function(t){t.setAttribute("tabindex","-1")}),[].slice.call(this.root.querySelectorAll(a.j2.FOCUSABLE_CHILD_ELEMENTS)).forEach(function(t){return t.setAttribute("tabindex","-1")}),this.foundation.layout()},e.prototype.getPrimaryText=function(t){var e=t.querySelector("."+a.UX.LIST_ITEM_PRIMARY_TEXT_CLASS);if(e)return e.textContent||"";var n=t.querySelector("."+a.UX.LIST_ITEM_TEXT_CLASS);return n&&n.textContent||""},e.prototype.initializeListType=function(){var t=this,e=this.root.querySelectorAll(a.j2.ARIA_ROLE_CHECKBOX_SELECTOR),n=this.root.querySelector(a.j2.ARIA_CHECKED_RADIO_SELECTOR);if(e.length){var i=this.root.querySelectorAll(a.j2.ARIA_CHECKED_CHECKBOX_SELECTOR);this.selectedIndex=[].map.call(i,function(e){return t.listElements.indexOf(e)})}else n&&(this.selectedIndex=this.listElements.indexOf(n))},e.prototype.setEnabled=function(t,e){this.foundation.setEnabled(t,e)},e.prototype.typeaheadMatchItem=function(t,e){return this.foundation.typeaheadMatchItem(t,e,!0)},e.prototype.getDefaultFoundation=function(){var t=this,e={addClassForElementIndex:function(e,n){var i=t.listElements[e];i&&i.classList.add(n)},focusItemAtIndex:function(e){var n=t.listElements[e];n&&n.focus()},getAttributeForElementIndex:function(e,n){return t.listElements[e].getAttribute(n)},getFocusedElementIndex:function(){return t.listElements.indexOf(document.activeElement)},getListItemCount:function(){return t.listElements.length},getPrimaryTextAtIndex:function(e){return t.getPrimaryText(t.listElements[e])},hasCheckboxAtIndex:function(e){return!!t.listElements[e].querySelector(a.j2.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(e){return!!t.listElements[e].querySelector(a.j2.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(e){return t.listElements[e].querySelector(a.j2.CHECKBOX_SELECTOR).checked},isFocusInsideList:function(){return t.root!==document.activeElement&&t.root.contains(document.activeElement)},isRootFocused:function(){return document.activeElement===t.root},listItemAtIndexHasClass:function(e,n){return t.listElements[e].classList.contains(n)},notifyAction:function(e){t.emit(a.j2.ACTION_EVENT,{index:e},!0)},removeClassForElementIndex:function(e,n){var i=t.listElements[e];i&&i.classList.remove(n)},setAttributeForElementIndex:function(e,n,i){var r=t.listElements[e];r&&r.setAttribute(n,i)},setCheckedCheckboxOrRadioAtIndex:function(e,n){var i=t.listElements[e].querySelector(a.j2.CHECKBOX_RADIO_SELECTOR);i.checked=n;var r=document.createEvent("Event");r.initEvent("change",!0,!0),i.dispatchEvent(r)},setTabIndexForListItemChildren:function(e,n){var i=t.listElements[e];[].slice.call(i.querySelectorAll(a.j2.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX)).forEach(function(t){return t.setAttribute("tabindex",n)})}};return new l.I(e)},e.prototype.getListItemIndex_=function(t){var e=t.target,n=(0,o.oq)(e,"."+a.UX.LIST_ITEM_CLASS+", ."+a.UX.ROOT);return n&&(0,o.wB)(n,"."+a.UX.LIST_ITEM_CLASS)?this.listElements.indexOf(n):-1},e.prototype.handleFocusInEvent_=function(t){var e=this.getListItemIndex_(t);this.foundation.handleFocusIn(t,e)},e.prototype.handleFocusOutEvent_=function(t){var e=this.getListItemIndex_(t);this.foundation.handleFocusOut(t,e)},e.prototype.handleKeydownEvent_=function(t){var e=this.getListItemIndex_(t),n=t.target;this.foundation.handleKeydown(t,n.classList.contains(a.UX.LIST_ITEM_CLASS),e)},e.prototype.handleClickEvent_=function(t){var e=this.getListItemIndex_(t),n=t.target,i=!(0,o.wB)(n,a.j2.CHECKBOX_RADIO_SELECTOR);this.foundation.handleClick(e,i)},e}(r.B)},3164:function(t,e,n){"use strict";n.d(e,{KT:()=>o,UX:()=>i,j2:()=>r});var i={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"},r={ACTION_EVENT:"MDCList:action",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",CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+i.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+i.LIST_ITEM_CLASS+" a\n ",FOCUSABLE_CHILD_ELEMENTS:"\n ."+i.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+i.LIST_ITEM_CLASS+" a,\n ."+i.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+i.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]'},o={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300}},7066:function(t,e,n){"use strict";n.d(e,{I:()=>_});var i=n(2093),r=n(4327),o=n(9905),a=n(3164),l=["input","button","textarea","select"],c=function(t){var e=t.target;if(e){var n=(""+e.tagName).toLowerCase();-1===l.indexOf(n)&&t.preventDefault()}};function d(){return{bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""}}function s(t,e){for(var n=new Map,i=0;i<t;i++){var r=e(i).trim();if(r){var o=r[0].toLowerCase();n.has(o)||n.set(o,[]),n.get(o).push({text:r.toLowerCase(),index:i})}}return n.forEach(function(t){t.sort(function(t,e){return t.index-e.index})}),n}function m(t,e){var n,i=t.nextChar,r=t.focusItemAtIndex,o=t.sortedIndexByFirstChar,l=t.focusedItemIndex,c=t.skipFocus,d=t.isItemAtIndexDisabled;return clearTimeout(e.bufferClearTimeout),e.bufferClearTimeout=setTimeout(function(){h(e)},a.KT.TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS),e.typeaheadBuffer=e.typeaheadBuffer+i,-1===(n=1===e.typeaheadBuffer.length?p(o,l,d,e):u(o,d,e))||c||r(n),n}function p(t,e,n,i){var r,o=i.typeaheadBuffer[0],a=t.get(o);if(!a)return -1;if(o===i.currentFirstChar&&a[i.sortedIndexCursor].index===e){i.sortedIndexCursor=(i.sortedIndexCursor+1)%a.length;var l=a[i.sortedIndexCursor].index;if(!n(l))return l}i.currentFirstChar=o;var c=-1;for(r=0;r<a.length;r++)if(!n(a[r].index)){c=r;break}for(;r<a.length;r++)if(a[r].index>e&&!n(a[r].index)){c=r;break}return -1!==c?(i.sortedIndexCursor=c,a[i.sortedIndexCursor].index):-1}function u(t,e,n){var i=n.typeaheadBuffer[0],r=t.get(i);if(!r)return -1;var o=r[n.sortedIndexCursor];if(0===o.text.lastIndexOf(n.typeaheadBuffer,0)&&!e(o.index))return o.index;for(var a=(n.sortedIndexCursor+1)%r.length,l=-1;a!==n.sortedIndexCursor;){var c=r[a],d=0===c.text.lastIndexOf(n.typeaheadBuffer,0),s=!e(c.index);if(d&&s){l=a;break}a=(a+1)%r.length}return -1!==l?(n.sortedIndexCursor=l,r[n.sortedIndexCursor].index):-1}function f(t){return t.typeaheadBuffer.length>0}function h(t){t.typeaheadBuffer=""}function g(t,e){var n=t.event,i=t.isTargetListItem,r=t.focusedItemIndex,a=t.focusItemAtIndex,l=t.sortedIndexByFirstChar,d=t.isItemAtIndexDisabled,s="ArrowLeft"===(0,o.ku)(n),p="ArrowUp"===(0,o.ku)(n),u="ArrowRight"===(0,o.ku)(n),h="ArrowDown"===(0,o.ku)(n),g="Home"===(0,o.ku)(n),b="End"===(0,o.ku)(n),_="Enter"===(0,o.ku)(n),v="Spacebar"===(0,o.ku)(n);if(s||p||u||h||g||b||_)return -1;if(!v&&1===n.key.length){c(n);var y={focusItemAtIndex:a,focusedItemIndex:r,nextChar:n.key.toLowerCase(),sortedIndexByFirstChar:l,skipFocus:!1,isItemAtIndexDisabled:d};return m(y,e)}if(!v)return -1;if(i&&c(n),i&&f(e)){var y={focusItemAtIndex:a,focusedItemIndex:r,nextChar:" ",sortedIndexByFirstChar:l,skipFocus:!1,isItemAtIndexDisabled:d};return m(y,e)}return -1}function b(t){return t instanceof Array}var _=function(t){function e(n){var r=t.call(this,(0,i.pi)((0,i.pi)({},e.defaultAdapter),n))||this;return r.wrapFocus_=!1,r.isVertical_=!0,r.isSingleSelectionList_=!1,r.selectedIndex_=a.KT.UNSET_INDEX,r.focusedItemIndex=a.KT.UNSET_INDEX,r.useActivatedClass_=!1,r.useSelectedAttr_=!1,r.ariaCurrentAttrValue_=null,r.isCheckboxList_=!1,r.isRadioList_=!1,r.hasTypeahead=!1,r.typeaheadState=d(),r.sortedIndexByFirstChar=new Map,r}return(0,i.ZT)(e,t),Object.defineProperty(e,"strings",{get:function(){return a.j2},enumerable:!0,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return a.UX},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return a.KT},enumerable:!0,configurable:!0}),Object.defineProperty(e,"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(){},removeClassForElementIndex:function(){},setAttributeForElementIndex:function(){},setCheckedCheckboxOrRadioAtIndex:function(){},setTabIndexForListItemChildren:function(){},getPrimaryTextAtIndex:function(){return""}}},enumerable:!0,configurable:!0}),e.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()))},e.prototype.setWrapFocus=function(t){this.wrapFocus_=t},e.prototype.setVerticalOrientation=function(t){this.isVertical_=t},e.prototype.setSingleSelection=function(t){this.isSingleSelectionList_=t,t&&this.maybeInitializeSingleSelection()},e.prototype.maybeInitializeSingleSelection=function(){for(var t=0;t<this.adapter.getListItemCount();t++){var e=this.adapter.listItemAtIndexHasClass(t,a.UX.LIST_ITEM_SELECTED_CLASS),n=this.adapter.listItemAtIndexHasClass(t,a.UX.LIST_ITEM_ACTIVATED_CLASS);if(e||n){n&&this.setUseActivatedClass(!0),this.isSingleSelectionList_=!0,this.selectedIndex_=t;return}}},e.prototype.setHasTypeahead=function(t){this.hasTypeahead=t,t&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex())},e.prototype.isTypeaheadInProgress=function(){return this.hasTypeahead&&f(this.typeaheadState)},e.prototype.setUseActivatedClass=function(t){this.useActivatedClass_=t},e.prototype.setUseSelectedAttribute=function(t){this.useSelectedAttr_=t},e.prototype.getSelectedIndex=function(){return this.selectedIndex_},e.prototype.setSelectedIndex=function(t){this.isIndexValid_(t)&&(this.isCheckboxList_?this.setCheckboxAtIndex_(t):this.isRadioList_?this.setRadioAtIndex_(t):this.setSingleSelectionAtIndex_(t))},e.prototype.handleFocusIn=function(t,e){e>=0&&(this.focusedItemIndex=e,this.adapter.setAttributeForElementIndex(e,"tabindex","0"),this.adapter.setTabIndexForListItemChildren(e,"0"))},e.prototype.handleFocusOut=function(t,e){var n=this;e>=0&&(this.adapter.setAttributeForElementIndex(e,"tabindex","-1"),this.adapter.setTabIndexForListItemChildren(e,"-1")),setTimeout(function(){n.adapter.isFocusInsideList()||n.setTabindexToFirstSelectedOrFocusedItem()},0)},e.prototype.handleKeydown=function(t,e,n){var i=this,r="ArrowLeft"===(0,o.ku)(t),l="ArrowUp"===(0,o.ku)(t),d="ArrowRight"===(0,o.ku)(t),s="ArrowDown"===(0,o.ku)(t),m="Home"===(0,o.ku)(t),p="End"===(0,o.ku)(t),u="Enter"===(0,o.ku)(t),f="Spacebar"===(0,o.ku)(t),h="A"===t.key||"a"===t.key;if(this.adapter.isRootFocused()){if(l||p?(t.preventDefault(),this.focusLastElement()):(s||m)&&(t.preventDefault(),this.focusFirstElement()),this.hasTypeahead){var b={event:t,focusItemAtIndex:function(t){i.focusItemAtIndex(t)},focusedItemIndex:-1,isTargetListItem:e,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(t){return i.adapter.listItemAtIndexHasClass(t,a.UX.LIST_ITEM_DISABLED_CLASS)}};g(b,this.typeaheadState)}return}var _=this.adapter.getFocusedElementIndex();if(-1!==_||!((_=n)<0)){if(this.isVertical_&&s||!this.isVertical_&&d)c(t),this.focusNextElement(_);else if(this.isVertical_&&l||!this.isVertical_&&r)c(t),this.focusPrevElement(_);else if(m)c(t),this.focusFirstElement();else if(p)c(t),this.focusLastElement();else if(h&&t.ctrlKey&&this.isCheckboxList_)t.preventDefault(),this.toggleAll(this.selectedIndex_===a.KT.UNSET_INDEX?[]:this.selectedIndex_);else if((u||f)&&e){var v=t.target;if(v&&"A"===v.tagName&&u||(c(t),this.adapter.listItemAtIndexHasClass(_,a.UX.LIST_ITEM_DISABLED_CLASS)))return;this.isTypeaheadInProgress()||(this.isSelectableList_()&&this.setSelectedIndexOnAction_(_),this.adapter.notifyAction(_))}if(this.hasTypeahead){var b={event:t,focusItemAtIndex:function(t){i.focusItemAtIndex(t)},focusedItemIndex:this.focusedItemIndex,isTargetListItem:e,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(t){return i.adapter.listItemAtIndexHasClass(t,a.UX.LIST_ITEM_DISABLED_CLASS)}};g(b,this.typeaheadState)}}},e.prototype.handleClick=function(t,e){t!==a.KT.UNSET_INDEX&&(this.adapter.listItemAtIndexHasClass(t,a.UX.LIST_ITEM_DISABLED_CLASS)||(this.isSelectableList_()&&this.setSelectedIndexOnAction_(t,e),this.adapter.notifyAction(t)))},e.prototype.focusNextElement=function(t){var e=this.adapter.getListItemCount(),n=t+1;if(n>=e)if(!this.wrapFocus_)return t;else n=0;return this.focusItemAtIndex(n),n},e.prototype.focusPrevElement=function(t){var e=t-1;if(e<0)if(!this.wrapFocus_)return t;else e=this.adapter.getListItemCount()-1;return this.focusItemAtIndex(e),e},e.prototype.focusFirstElement=function(){return this.focusItemAtIndex(0),0},e.prototype.focusLastElement=function(){var t=this.adapter.getListItemCount()-1;return this.focusItemAtIndex(t),t},e.prototype.focusInitialElement=function(){var t=this.getFirstSelectedOrFocusedItemIndex();return this.focusItemAtIndex(t),t},e.prototype.setEnabled=function(t,e){this.isIndexValid_(t)&&(e?(this.adapter.removeClassForElementIndex(t,a.UX.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(t,a.j2.ARIA_DISABLED,"false")):(this.adapter.addClassForElementIndex(t,a.UX.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(t,a.j2.ARIA_DISABLED,"true")))},e.prototype.setSingleSelectionAtIndex_=function(t){if(this.selectedIndex_!==t){var e=a.UX.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass_&&(e=a.UX.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex_!==a.KT.UNSET_INDEX&&this.adapter.removeClassForElementIndex(this.selectedIndex_,e),this.setAriaForSingleSelectionAtIndex_(t),this.setTabindexAtIndex(t),t!==a.KT.UNSET_INDEX&&this.adapter.addClassForElementIndex(t,e),this.selectedIndex_=t}},e.prototype.setAriaForSingleSelectionAtIndex_=function(t){this.selectedIndex_===a.KT.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter.getAttributeForElementIndex(t,a.j2.ARIA_CURRENT));var e=null!==this.ariaCurrentAttrValue_,n=e?a.j2.ARIA_CURRENT:a.j2.ARIA_SELECTED;if(this.selectedIndex_!==a.KT.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex_,n,"false"),t!==a.KT.UNSET_INDEX){var i=e?this.ariaCurrentAttrValue_:"true";this.adapter.setAttributeForElementIndex(t,n,i)}},e.prototype.getSelectionAttribute=function(){return this.useSelectedAttr_?a.j2.ARIA_SELECTED:a.j2.ARIA_CHECKED},e.prototype.setRadioAtIndex_=function(t){var e=this.getSelectionAttribute();this.adapter.setCheckedCheckboxOrRadioAtIndex(t,!0),this.selectedIndex_!==a.KT.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex_,e,"false"),this.adapter.setAttributeForElementIndex(t,e,"true"),this.selectedIndex_=t},e.prototype.setCheckboxAtIndex_=function(t){for(var e=this.getSelectionAttribute(),n=0;n<this.adapter.getListItemCount();n++){var i=!1;t.indexOf(n)>=0&&(i=!0),this.adapter.setCheckedCheckboxOrRadioAtIndex(n,i),this.adapter.setAttributeForElementIndex(n,e,i?"true":"false")}this.selectedIndex_=t},e.prototype.setTabindexAtIndex=function(t){this.focusedItemIndex===a.KT.UNSET_INDEX&&0!==t?this.adapter.setAttributeForElementIndex(0,"tabindex","-1"):this.focusedItemIndex>=0&&this.focusedItemIndex!==t&&this.adapter.setAttributeForElementIndex(this.focusedItemIndex,"tabindex","-1"),this.selectedIndex_ instanceof Array||this.selectedIndex_===t||this.adapter.setAttributeForElementIndex(this.selectedIndex_,"tabindex","-1"),t!==a.KT.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(t,"tabindex","0")},e.prototype.isSelectableList_=function(){return this.isSingleSelectionList_||this.isCheckboxList_||this.isRadioList_},e.prototype.setTabindexToFirstSelectedOrFocusedItem=function(){var t=this.getFirstSelectedOrFocusedItemIndex();this.setTabindexAtIndex(t)},e.prototype.getFirstSelectedOrFocusedItemIndex=function(){var t=this.focusedItemIndex>=0?this.focusedItemIndex:0;return this.isSelectableList_()&&("number"==typeof this.selectedIndex_&&this.selectedIndex_!==a.KT.UNSET_INDEX?t=this.selectedIndex_:b(this.selectedIndex_)&&this.selectedIndex_.length>0&&(t=this.selectedIndex_.reduce(function(t,e){return Math.min(t,e)}))),t},e.prototype.isIndexValid_=function(t){var e=this;if(t instanceof Array){if(!this.isCheckboxList_)throw Error("MDCListFoundation: Array of index is only supported for checkbox based list");return 0===t.length||t.some(function(t){return e.isIndexInRange_(t)})}if("number"!=typeof t)return!1;if(this.isCheckboxList_)throw Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+t);return this.isIndexInRange_(t)||this.isSingleSelectionList_&&t===a.KT.UNSET_INDEX},e.prototype.isIndexInRange_=function(t){var e=this.adapter.getListItemCount();return t>=0&&t<e},e.prototype.setSelectedIndexOnAction_=function(t,e){void 0===e&&(e=!0),this.isCheckboxList_?this.toggleCheckboxAtIndex_(t,e):this.setSelectedIndex(t)},e.prototype.toggleCheckboxAtIndex_=function(t,e){var n=this.getSelectionAttribute(),i=this.adapter.isCheckboxCheckedAtIndex(t);e&&(i=!i,this.adapter.setCheckedCheckboxOrRadioAtIndex(t,i)),this.adapter.setAttributeForElementIndex(t,n,i?"true":"false");var r=this.selectedIndex_===a.KT.UNSET_INDEX?[]:this.selectedIndex_.slice();i?r.push(t):r=r.filter(function(e){return e!==t}),this.selectedIndex_=r},e.prototype.focusItemAtIndex=function(t){this.adapter.focusItemAtIndex(t),this.focusedItemIndex=t},e.prototype.toggleAll=function(t){var e=this.adapter.getListItemCount();if(t.length===e)this.setCheckboxAtIndex_([]);else{for(var n=[],i=0;i<e;i++)(!this.adapter.listItemAtIndexHasClass(i,a.UX.LIST_ITEM_DISABLED_CLASS)||t.indexOf(i)>-1)&&n.push(i);this.setCheckboxAtIndex_(n)}},e.prototype.typeaheadMatchItem=function(t,e,n){var i=this;return void 0===n&&(n=!1),m({focusItemAtIndex:function(t){i.focusItemAtIndex(t)},focusedItemIndex:e||this.focusedItemIndex,nextChar:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:n,isItemAtIndexDisabled:function(t){return i.adapter.listItemAtIndexHasClass(t,a.UX.LIST_ITEM_DISABLED_CLASS)}},this.typeaheadState)},e.prototype.typeaheadInitSortedIndex=function(){return s(this.adapter.getListItemCount(),this.adapter.getPrimaryTextAtIndex)},e.prototype.clearTypeaheadBuffer=function(){h(this.typeaheadState)},e}(r.K)},2093:function(t,e,n){"use strict";n.d(e,{ZT:()=>r,pi:()=>o});var i=function(t,e){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)}},1124:function(t,e,n){"use strict";n.d(e,{HX:()=>i,KT:()=>l,Ns:()=>r,UX:()=>o,j2:()=>a});var i,r,o={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},a={CLOSED_EVENT:"MDCMenuSurface:closed",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:'button:not(:disabled), [href]:not([aria-disabled="true"]), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'},l={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67};!function(t){t[t.BOTTOM=1]="BOTTOM",t[t.CENTER=2]="CENTER",t[t.RIGHT=4]="RIGHT",t[t.FLIP_RTL=8]="FLIP_RTL"}(i||(i={})),function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=4]="TOP_RIGHT",t[t.BOTTOM_LEFT=1]="BOTTOM_LEFT",t[t.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",t[t.TOP_START=8]="TOP_START",t[t.TOP_END=12]="TOP_END",t[t.BOTTOM_START=9]="BOTTOM_START",t[t.BOTTOM_END=13]="BOTTOM_END"}(r||(r={}))},4266:function(t,e,n){"use strict";n.d(e,{g:()=>k});var i,r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var a=function(){return(a=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},l=n(1872),c=n(2584),d=n(2326),s=n(3164),m=n(7066),p=function(t,e){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function u(t,e){function n(){this.constructor=t}p(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var f=function(){return(f=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function h(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var g=n(1124),b=n(4327),_=function(t){function e(n){var i=t.call(this,f(f({},e.defaultAdapter),n))||this;return i.isSurfaceOpen=!1,i.isQuickOpen=!1,i.isHoistedElement=!1,i.isFixedPosition=!1,i.openAnimationEndTimerId=0,i.closeAnimationEndTimerId=0,i.animationRequestId=0,i.anchorCorner=g.Ns.TOP_START,i.originCorner=g.Ns.TOP_START,i.anchorMargin={top:0,right:0,bottom:0,left:0},i.position={x:0,y:0},i}return u(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return g.UX},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return g.j2},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return g.KT},enumerable:!0,configurable:!0}),Object.defineProperty(e,"Corner",{get:function(){return g.Ns},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyOpen:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=e.cssClasses,n=t.ROOT,i=t.OPEN;if(!this.adapter.hasClass(n))throw Error(n+" class required in root element.");this.adapter.hasClass(i)&&(this.isSurfaceOpen=!0)},e.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},e.prototype.setAnchorCorner=function(t){this.anchorCorner=t},e.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^g.HX.RIGHT},e.prototype.setAnchorMargin=function(t){this.anchorMargin.top=t.top||0,this.anchorMargin.right=t.right||0,this.anchorMargin.bottom=t.bottom||0,this.anchorMargin.left=t.left||0},e.prototype.setIsHoisted=function(t){this.isHoistedElement=t},e.prototype.setFixedPosition=function(t){this.isFixedPosition=t},e.prototype.setAbsolutePosition=function(t,e){this.position.x=this.isFinite(t)?t:0,this.position.y=this.isFinite(e)?e:0},e.prototype.setQuickOpen=function(t){this.isQuickOpen=t},e.prototype.isOpen=function(){return this.isSurfaceOpen},e.prototype.open=function(){var t=this;this.isSurfaceOpen||(this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(e.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(e.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame(function(){t.adapter.addClass(e.cssClasses.OPEN),t.dimensions=t.adapter.getInnerDimensions(),t.autoposition(),t.openAnimationEndTimerId=setTimeout(function(){t.openAnimationEndTimerId=0,t.adapter.removeClass(e.cssClasses.ANIMATING_OPEN),t.adapter.notifyOpen()},g.KT.TRANSITION_OPEN_DURATION)}),this.isSurfaceOpen=!0))},e.prototype.close=function(t){var n=this;void 0===t&&(t=!1),this.isSurfaceOpen&&(this.isQuickOpen?(this.isSurfaceOpen=!1,t||this.maybeRestoreFocus(),this.adapter.removeClass(e.cssClasses.OPEN),this.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),this.adapter.notifyClose()):(this.adapter.addClass(e.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){n.adapter.removeClass(e.cssClasses.OPEN),n.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),n.closeAnimationEndTimerId=setTimeout(function(){n.closeAnimationEndTimerId=0,n.adapter.removeClass(e.cssClasses.ANIMATING_CLOSED),n.adapter.notifyClose()},g.KT.TRANSITION_CLOSE_DURATION)}),this.isSurfaceOpen=!1,t||this.maybeRestoreFocus()))},e.prototype.handleBodyClick=function(t){var e=t.target;this.adapter.isElementInContainer(e)||this.close()},e.prototype.handleKeydown=function(t){var e=t.keyCode;("Escape"===t.key||27===e)&&this.close()},e.prototype.autoposition=function(){this.measurements=this.getAutoLayoutmeasurements();var t,n=this.getoriginCorner(),i=this.getMenuSurfaceMaxHeight(n),r=this.hasBit(n,g.HX.BOTTOM)?"bottom":"top",o=this.hasBit(n,g.HX.RIGHT)?"right":"left",a=this.getHorizontalOriginOffset(n),l=this.getVerticalOriginOffset(n),c=this.measurements,d=c.anchorSize,s=c.surfaceSize,m=((t={})[o]=a,t[r]=l,t);d.width/s.width>g.KT.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(o="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(m),this.adapter.setTransformOrigin(o+" "+r),this.adapter.setPosition(m),this.adapter.setMaxHeight(i?i+"px":""),this.hasBit(n,g.HX.BOTTOM)||this.adapter.addClass(e.cssClasses.IS_OPEN_BELOW)},e.prototype.getAutoLayoutmeasurements=function(){var t=this.adapter.getAnchorDimensions(),e=this.adapter.getBodyDimensions(),n=this.adapter.getWindowDimensions(),i=this.adapter.getWindowScroll();return t||(t={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:t,bodySize:e,surfaceSize:this.dimensions,viewportDistance:{top:t.top,right:n.width-t.right,bottom:n.height-t.bottom,left:t.left},viewportSize:n,windowScroll:i}},e.prototype.getoriginCorner=function(){var t,n,i,r,o=this.originCorner,a=this.measurements,l=a.viewportDistance,c=a.anchorSize,d=a.surfaceSize,s=e.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,g.HX.BOTTOM)?(t=l.top-s+c.height+this.anchorMargin.bottom,n=l.bottom-s-this.anchorMargin.bottom):(t=l.top-s+this.anchorMargin.top,n=l.bottom-s+c.height-this.anchorMargin.top),!(n-d.height>0)&&t>=n&&(o=this.setBit(o,g.HX.BOTTOM));var m=this.adapter.isRtl(),p=this.hasBit(this.anchorCorner,g.HX.FLIP_RTL),u=this.hasBit(this.anchorCorner,g.HX.RIGHT)||this.hasBit(o,g.HX.RIGHT),f=!1;(f=m&&p?!u:u)?(i=l.left+c.width+this.anchorMargin.right,r=l.right-this.anchorMargin.right):(i=l.left+this.anchorMargin.left,r=l.right+c.width-this.anchorMargin.left);var h=i-d.width>0,b=r-d.width>0,_=this.hasBit(o,g.HX.FLIP_RTL)&&this.hasBit(o,g.HX.RIGHT);return b&&_&&m||!h&&_?o=this.unsetBit(o,g.HX.RIGHT):(h&&f&&m||h&&!f&&u||!b&&i>=r)&&(o=this.setBit(o,g.HX.RIGHT)),o},e.prototype.getMenuSurfaceMaxHeight=function(t){var n=this.measurements.viewportDistance,i=0,r=this.hasBit(t,g.HX.BOTTOM),o=this.hasBit(this.anchorCorner,g.HX.BOTTOM),a=e.numbers.MARGIN_TO_EDGE;return r?(i=n.top+this.anchorMargin.top-a,o||(i+=this.measurements.anchorSize.height)):(i=n.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-a,o&&(i-=this.measurements.anchorSize.height)),i},e.prototype.getHorizontalOriginOffset=function(t){var e=this.measurements.anchorSize,n=this.hasBit(t,g.HX.RIGHT),i=this.hasBit(this.anchorCorner,g.HX.RIGHT);if(n){var r=i?e.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?r-(this.measurements.viewportSize.width-this.measurements.bodySize.width):r}return i?e.width-this.anchorMargin.right:this.anchorMargin.left},e.prototype.getVerticalOriginOffset=function(t){var e=this.measurements.anchorSize,n=this.hasBit(t,g.HX.BOTTOM),i=this.hasBit(this.anchorCorner,g.HX.BOTTOM),r=0;return n?i?e.height-this.anchorMargin.top:-this.anchorMargin.bottom:i?e.height+this.anchorMargin.bottom:this.anchorMargin.top},e.prototype.adjustPositionForHoistedElement=function(t){var e,n,i=this.measurements,r=i.windowScroll,o=i.viewportDistance,a=Object.keys(t);try{for(var l=h(a),c=l.next();!c.done;c=l.next()){var d=c.value,s=t[d]||0;s+=o[d],this.isFixedPosition||("top"===d?s+=r.y:"bottom"===d?s-=r.y:"left"===d?s+=r.x:s-=r.x),t[d]=s}}catch(t){e={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(e)throw e.error}}},e.prototype.maybeRestoreFocus=function(){var t=this.adapter.isFocused(),e=document.activeElement&&this.adapter.isElementInContainer(document.activeElement);(t||e)&&this.adapter.restoreFocus()},e.prototype.hasBit=function(t,e){return!!(t&e)},e.prototype.setBit=function(t,e){return t|e},e.prototype.unsetBit=function(t,e){return t^e},e.prototype.isFinite=function(t){return"number"==typeof t&&isFinite(t)},e}(b.K);function v(t,e){return void 0===e&&(e=!1),(void 0===i||e)&&(i="transform"in t.document.createElement("div").style?"transform":"webkitTransform"),i}var y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialSyncWithDOM=function(){var t=this,e=this.root.parentElement;this.anchorElement=e&&e.classList.contains(g.UX.ANCHOR)?e:null,this.root.classList.contains(g.UX.FIXED)&&this.setFixedPosition(!0),this.handleKeydown=function(e){t.foundation.handleKeydown(e)},this.handleBodyClick=function(e){t.foundation.handleBodyClick(e)},this.registerBodyClickListener=function(){document.body.addEventListener("click",t.handleBodyClick,{capture:!0})},this.deregisterBodyClickListener=function(){document.body.removeEventListener("click",t.handleBodyClick,{capture:!0})},this.listen("keydown",this.handleKeydown),this.listen(g.j2.OPENED_EVENT,this.registerBodyClickListener),this.listen(g.j2.CLOSED_EVENT,this.deregisterBodyClickListener)},e.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown),this.unlisten(g.j2.OPENED_EVENT,this.registerBodyClickListener),this.unlisten(g.j2.CLOSED_EVENT,this.deregisterBodyClickListener),t.prototype.destroy.call(this)},e.prototype.isOpen=function(){return this.foundation.isOpen()},e.prototype.open=function(){this.foundation.open()},e.prototype.close=function(t){void 0===t&&(t=!1),this.foundation.close(t)},Object.defineProperty(e.prototype,"quickOpen",{set:function(t){this.foundation.setQuickOpen(t)},enumerable:!0,configurable:!0}),e.prototype.setIsHoisted=function(t){this.foundation.setIsHoisted(t)},e.prototype.setMenuSurfaceAnchorElement=function(t){this.anchorElement=t},e.prototype.setFixedPosition=function(t){t?this.root.classList.add(g.UX.FIXED):this.root.classList.remove(g.UX.FIXED),this.foundation.setFixedPosition(t)},e.prototype.setAbsolutePosition=function(t,e){this.foundation.setAbsolutePosition(t,e),this.setIsHoisted(!0)},e.prototype.setAnchorCorner=function(t){this.foundation.setAnchorCorner(t)},e.prototype.setAnchorMargin=function(t){this.foundation.setAnchorMargin(t)},e.prototype.getDefaultFoundation=function(){var t=this,e={addClass:function(e){return t.root.classList.add(e)},removeClass:function(e){return t.root.classList.remove(e)},hasClass:function(e){return t.root.classList.contains(e)},hasAnchor:function(){return!!t.anchorElement},notifyClose:function(){return t.emit(_.strings.CLOSED_EVENT,{})},notifyOpen:function(){return t.emit(_.strings.OPENED_EVENT,{})},isElementInContainer:function(e){return t.root.contains(e)},isRtl:function(){return"rtl"===getComputedStyle(t.root).getPropertyValue("direction")},setTransformOrigin:function(e){var n=v(window)+"-origin";t.root.style.setProperty(n,e)},isFocused:function(){return document.activeElement===t.root},saveFocus:function(){t.previousFocus=document.activeElement},restoreFocus:function(){t.root.contains(document.activeElement)&&t.previousFocus&&t.previousFocus.focus&&t.previousFocus.focus()},getInnerDimensions:function(){return{width:t.root.offsetWidth,height:t.root.offsetHeight}},getAnchorDimensions:function(){return t.anchorElement?t.anchorElement.getBoundingClientRect():null},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(e){var n=t.root;n.style.left="left"in e?e.left+"px":"",n.style.right="right"in e?e.right+"px":"",n.style.top="top"in e?e.top+"px":"",n.style.bottom="bottom"in e?e.bottom+"px":""},setMaxHeight:function(e){t.root.style.maxHeight=e}};return new _(e)},e}(l.B),x=n(7838),w=function(t){function e(n){var i=t.call(this,a(a({},e.defaultAdapter),n))||this;return i.closeAnimationEndTimerId_=0,i.defaultFocusState_=x.yM.LIST_ROOT,i}return o(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return x.UX},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return x.j2},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return x.KT},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return -1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return -1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this.closeAnimationEndTimerId_&&clearTimeout(this.closeAnimationEndTimerId_),this.adapter.closeSurface()},e.prototype.handleKeydown=function(t){var e=t.key,n=t.keyCode;("Tab"===e||9===n)&&this.adapter.closeSurface(!0)},e.prototype.handleItemAction=function(t){var e=this,n=this.adapter.getElementIndex(t);n<0||(this.adapter.notifySelected({index:n}),this.adapter.closeSurface(),this.closeAnimationEndTimerId_=setTimeout(function(){var n=e.adapter.getElementIndex(t);n>=0&&e.adapter.isSelectableItemAtIndex(n)&&e.setSelectedIndex(n)},_.numbers.TRANSITION_CLOSE_DURATION))},e.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState_){case x.yM.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case x.yM.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case x.yM.NONE:break;default:this.adapter.focusListRoot()}},e.prototype.setDefaultFocusState=function(t){this.defaultFocusState_=t},e.prototype.setSelectedIndex=function(t){if(this.validatedIndex_(t),!this.adapter.isSelectableItemAtIndex(t))throw Error("MDCMenuFoundation: No selection group at specified index.");var e=this.adapter.getSelectedSiblingOfItemAtIndex(t);e>=0&&(this.adapter.removeAttributeFromElementAtIndex(e,x.j2.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(e,x.UX.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(t,x.UX.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(t,x.j2.ARIA_CHECKED_ATTR,"true")},e.prototype.setEnabled=function(t,e){this.validatedIndex_(t),e?(this.adapter.removeClassFromElementAtIndex(t,s.UX.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,x.j2.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(t,s.UX.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,x.j2.ARIA_DISABLED_ATTR,"true"))},e.prototype.validatedIndex_=function(t){var e=this.adapter.getMenuItemCount();if(!(t>=0&&t<e))throw Error("MDCMenuFoundation: No list item at specified index.")},e}(b.K),k=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t,e){void 0===t&&(t=function(t){return new y(t)}),void 0===e&&(e=function(t){return new d.e(t)}),this.menuSurfaceFactory_=t,this.listFactory_=e},e.prototype.initialSyncWithDOM=function(){var t=this;this.menuSurface_=this.menuSurfaceFactory_(this.root);var e=this.root.querySelector(x.j2.LIST_SELECTOR);e?(this.list_=this.listFactory_(e),this.list_.wrapFocus=!0):this.list_=null,this.handleKeydown_=function(e){return t.foundation.handleKeydown(e)},this.handleItemAction_=function(e){return t.foundation.handleItemAction(t.items[e.detail.index])},this.handleMenuSurfaceOpened_=function(){return t.foundation.handleMenuSurfaceOpened()},this.menuSurface_.listen(_.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.listen("keydown",this.handleKeydown_),this.listen(m.I.strings.ACTION_EVENT,this.handleItemAction_)},e.prototype.destroy=function(){this.list_&&this.list_.destroy(),this.menuSurface_.destroy(),this.menuSurface_.unlisten(_.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.unlisten("keydown",this.handleKeydown_),this.unlisten(m.I.strings.ACTION_EVENT,this.handleItemAction_),t.prototype.destroy.call(this)},Object.defineProperty(e.prototype,"open",{get:function(){return this.menuSurface_.isOpen()},set:function(t){t?this.menuSurface_.open():this.menuSurface_.close()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wrapFocus",{get:function(){return!!this.list_&&this.list_.wrapFocus},set:function(t){this.list_&&(this.list_.wrapFocus=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasTypeahead",{set:function(t){this.list_&&(this.list_.hasTypeahead=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"typeaheadInProgress",{get:function(){return!!this.list_&&this.list_.typeaheadInProgress},enumerable:!0,configurable:!0}),e.prototype.typeaheadMatchItem=function(t,e){return this.list_?this.list_.typeaheadMatchItem(t,e):-1},e.prototype.layout=function(){this.list_&&this.list_.layout()},Object.defineProperty(e.prototype,"items",{get:function(){return this.list_?this.list_.listElements:[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"singleSelection",{set:function(t){this.list_&&(this.list_.singleSelection=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedIndex",{get:function(){return this.list_?this.list_.selectedIndex:s.KT.UNSET_INDEX},set:function(t){this.list_&&(this.list_.selectedIndex=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"quickOpen",{set:function(t){this.menuSurface_.quickOpen=t},enumerable:!0,configurable:!0}),e.prototype.setDefaultFocusState=function(t){this.foundation.setDefaultFocusState(t)},e.prototype.setAnchorCorner=function(t){this.menuSurface_.setAnchorCorner(t)},e.prototype.setAnchorMargin=function(t){this.menuSurface_.setAnchorMargin(t)},e.prototype.setSelectedIndex=function(t){this.foundation.setSelectedIndex(t)},e.prototype.setEnabled=function(t,e){this.foundation.setEnabled(t,e)},e.prototype.getOptionByIndex=function(t){return t<this.items.length?this.items[t]:null},e.prototype.getPrimaryTextAtIndex=function(t){var e=this.getOptionByIndex(t);return e&&this.list_&&this.list_.getPrimaryText(e)||""},e.prototype.setFixedPosition=function(t){this.menuSurface_.setFixedPosition(t)},e.prototype.setIsHoisted=function(t){this.menuSurface_.setIsHoisted(t)},e.prototype.setAbsolutePosition=function(t,e){this.menuSurface_.setAbsolutePosition(t,e)},e.prototype.setAnchorElement=function(t){this.menuSurface_.anchorElement=t},e.prototype.getDefaultFoundation=function(){var t=this;return new w({addClassToElementAtIndex:function(e,n){t.items[e].classList.add(n)},removeClassFromElementAtIndex:function(e,n){t.items[e].classList.remove(n)},addAttributeToElementAtIndex:function(e,n,i){t.items[e].setAttribute(n,i)},removeAttributeFromElementAtIndex:function(e,n){t.items[e].removeAttribute(n)},elementContainsClass:function(t,e){return t.classList.contains(e)},closeSurface:function(e){return t.menuSurface_.close(e)},getElementIndex:function(e){return t.items.indexOf(e)},notifySelected:function(e){return t.emit(x.j2.SELECTED_EVENT,{index:e.index,item:t.items[e.index]})},getMenuItemCount:function(){return t.items.length},focusItemAtIndex:function(e){return t.items[e].focus()},focusListRoot:function(){return t.root.querySelector(x.j2.LIST_SELECTOR).focus()},isSelectableItemAtIndex:function(e){return!!(0,c.oq)(t.items[e],"."+x.UX.MENU_SELECTION_GROUP)},getSelectedSiblingOfItemAtIndex:function(e){var n=(0,c.oq)(t.items[e],"."+x.UX.MENU_SELECTION_GROUP).querySelector("."+x.UX.MENU_SELECTED_LIST_ITEM);return n?t.items.indexOf(n):-1}})},e}(l.B)},7838:function(t,e,n){"use strict";n.d(e,{KT:()=>a,UX:()=>r,j2:()=>o,yM:()=>i});var i,r={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},o={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list",SELECTED_EVENT:"MDCMenu:selected"},a={FOCUS_ROOT_INDEX:-1};!function(t){t[t.NONE=0]="NONE",t[t.LIST_ROOT=1]="LIST_ROOT",t[t.FIRST_ITEM=2]="FIRST_ITEM",t[t.LAST_ITEM=3]="LAST_ITEM"}(i||(i={}))},6645:function(t,e,n){"use strict";n.d(e,{F:()=>d});var i=n(4322),r=n(1872),o=n(9364),a=n(2584),l=n(1883),c=n(5749),d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.disabled=!1,e}return(0,i.ZT)(e,t),e.attachTo=function(t,n){void 0===n&&(n={isUnbounded:void 0});var i=new e(t);return void 0!==n.isUnbounded&&(i.unbounded=n.isUnbounded),i},e.createAdapter=function(t){return{addClass:function(e){return t.root.classList.add(e)},browserSupportsCssVars:function(){return c.x(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,(0,o.K)())},deregisterInteractionHandler:function(e,n){return t.root.removeEventListener(e,n,(0,o.K)())},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return(0,a.wB)(t.root,":active")},isSurfaceDisabled:function(){return!!t.disabled},isUnbounded:function(){return!!t.unbounded},registerDocumentInteractionHandler:function(t,e){return document.documentElement.addEventListener(t,e,(0,o.K)())},registerInteractionHandler:function(e,n){return t.root.addEventListener(e,n,(0,o.K)())},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!!this.unbounded_},set:function(t){this.unbounded_=!!t,this.setUnbounded_()},enumerable:!0,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 l.l(e.createAdapter(this))},e.prototype.initialSyncWithDOM=function(){var t=this.root;this.unbounded="mdcRippleIsUnbounded"in t.dataset},e.prototype.setUnbounded_=function(){this.foundation.setUnbounded(!!this.unbounded_)},e}(r.B)},1883:function(t,e,n){"use strict";n.d(e,{l:()=>p});var i=n(4322),r=n(4327),o={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"},a={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},c=n(5749),d=["touchstart","pointerdown","mousedown","keydown"],s=["touchend","pointerup","mouseup","contextmenu"],m=[],p=function(t){function e(n){var r=t.call(this,(0,i.pi)((0,i.pi)({},e.defaultAdapter),n))||this;return r.activationAnimationHasEnded_=!1,r.activationTimer_=0,r.fgDeactivationRemovalTimer_=0,r.fgScale_="0",r.frame_={width:0,height:0},r.initialSize_=0,r.layoutFrame_=0,r.maxRadius_=0,r.unboundedCoords_={left:0,top:0},r.activationState_=r.defaultActivationState_(),r.activationTimerCallback_=function(){r.activationAnimationHasEnded_=!0,r.runDeactivationUXLogicIfReady_()},r.activateHandler_=function(t){return r.activate_(t)},r.deactivateHandler_=function(){return r.deactivate_()},r.focusHandler_=function(){return r.handleFocus()},r.blurHandler_=function(){return r.handleBlur()},r.resizeHandler_=function(){return r.layout()},r}return(0,i.ZT)(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return o},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return a},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return l},enumerable:!0,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:!0,configurable:!0}),e.prototype.init=function(){var t=this,n=this.supportsPressRipple_();if(this.registerRootHandlers_(n),n){var i=e.cssClasses,r=i.ROOT,o=i.UNBOUNDED;requestAnimationFrame(function(){t.adapter.addClass(r),t.adapter.isUnbounded()&&(t.adapter.addClass(o),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,i=n.ROOT,r=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter.removeClass(i),t.adapter.removeClass(r),t.removeCssVars_()})}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_()},e.prototype.activate=function(t){this.activate_(t)},e.prototype.deactivate=function(){this.deactivate_()},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=this;t&&(d.forEach(function(t){e.adapter.registerInteractionHandler(t,e.activateHandler_)}),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=this;"keydown"===t.type?this.adapter.registerInteractionHandler("keyup",this.deactivateHandler_):s.forEach(function(t){e.adapter.registerDocumentInteractionHandler(t,e.deactivateHandler_)})},e.prototype.deregisterRootHandlers_=function(){var t=this;d.forEach(function(e){t.adapter.deregisterInteractionHandler(e,t.activateHandler_)}),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=this;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler_),s.forEach(function(e){t.adapter.deregisterDocumentInteractionHandler(e,t.deactivateHandler_)})},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.activate_=function(t){var e=this;if(!this.adapter.isSurfaceDisabled()){var n=this.activationState_;if(!n.isActivated){var i=this.previousActivationEvent_;if(!(i&&void 0!==t&&i.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);var r=void 0!==t&&m.length>0&&m.some(function(t){return e.adapter.containsEventTarget(t)});if(r)return void this.resetActivationState_();void 0!==t&&(m.push(t.target),this.registerDeactivationHandlers_(t)),n.wasElementMadeActive=this.checkElementMadeActive_(t),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame(function(){m=[],!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,i=n.VAR_FG_TRANSLATE_START,r=n.VAR_FG_TRANSLATE_END,o=e.cssClasses,a=o.FG_DEACTIVATION,l=o.FG_ACTIVATION,c=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var d="",s="";if(!this.adapter.isUnbounded()){var m=this.getFgTranslationCoordinates_(),p=m.startPoint,u=m.endPoint;d=p.x+"px, "+p.y+"px",s=u.x+"px, "+u.y+"px"}this.adapter.updateCssVariable(i,d),this.adapter.updateCssVariable(r,s),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter.removeClass(a),this.adapter.computeBoundingRect(),this.adapter.addClass(l),this.activationTimer_=setTimeout(function(){return t.activationTimerCallback_()},c)},e.prototype.getFgTranslationCoordinates_=function(){var t,e=this.activationState_,n=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?(0,c.Y)(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,i=this.activationState_,r=i.hasDeactivationUXRun,o=i.isActivated;(r||!o)&&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.deactivate_=function(){var t=this,e=this.activationState_;if(e.isActivated){var n=(0,i.pi)({},e);e.isProgrammatic?(requestAnimationFrame(function(){return 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),i=function(){return Math.sqrt(Math.pow(t.frame_.width,2)+Math.pow(t.frame_.height,2))+e.numbers.PADDING};this.maxRadius_=this.adapter.isUnbounded()?n:i();var r=Math.floor(n*e.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&r%2!=0?this.initialSize_=r-1:this.initialSize_=r,this.fgScale_=""+this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()},e.prototype.updateLayoutCssVars_=function(){var t=e.strings,n=t.VAR_FG_SIZE,i=t.VAR_LEFT,r=t.VAR_TOP,o=t.VAR_FG_SCALE;this.adapter.updateCssVariable(n,this.initialSize_+"px"),this.adapter.updateCssVariable(o,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"))},e}(r.K)},4322:function(t,e,n){"use strict";n.d(e,{ZT:()=>r,pi:()=>o});var i=function(t,e){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)}},5749:function(t,e,n){"use strict";var i;function r(t,e){void 0===e&&(e=!1);var n=t.CSS,r=i;if("boolean"==typeof i&&!e)return i;if(!(n&&"function"==typeof n.supports))return!1;var o=n.supports("--css-vars","yes"),a=n.supports("(--css-vars: yes)")&&n.supports("color","#00000000");return r=o||a,e||(i=r),r}function o(t,e,n){if(!t)return{x:0,y:0};var i,r,o=e.x,a=e.y,l=o+n.left,c=a+n.top;if("touchstart"===t.type){var d=t;i=d.changedTouches[0].pageX-l,r=d.changedTouches[0].pageY-c}else{var s=t;i=s.pageX-l,r=s.pageY-c}return{x:i,y:r}}n.d(e,{Y:()=>o,x:()=>r})},7737:function(t,e,n){"use strict";var i=n(1528),r=n(3235),o=r(i("String.prototype.indexOf"));t.exports=function(t,e){var n=i(t,!!e);return"function"==typeof n&&o(t,".prototype.")>-1?r(n):n}},3235:function(t,e,n){"use strict";var i=n(7156),r=n(1528),o=n(1744),a=n(682),l=r("%Function.prototype.apply%"),c=r("%Function.prototype.call%"),d=r("%Reflect.apply%",!0)||i.call(c,l),s=r("%Object.defineProperty%",!0),m=r("%Math.max%");if(s)try{s({},"a",{value:1})}catch(t){s=null}t.exports=function(t){if("function"!=typeof t)throw new a("a function is required");var e=d(i,c,arguments);return o(e,1+m(0,t.length-(arguments.length-1)),!0)};var p=function(){return d(i,l,arguments)};s?s(t.exports,"apply",{value:p}):t.exports.apply=p},7892:function(t,e,n){"use strict";var i=n(2320)(),r=n(1528),o=i&&r("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch(t){o=!1}var a=n(4332),l=n(682),c=n(1455);t.exports=function(t,e,n){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new l("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new l("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new l("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new l("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new l("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new l("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,r=arguments.length>4?arguments[4]:null,d=arguments.length>5?arguments[5]:null,s=arguments.length>6&&arguments[6],m=!!c&&c(t,e);if(o)o(t,e,{configurable:null===d&&m?m.configurable:!d,enumerable:null===i&&m?m.enumerable:!i,value:n,writable:null===r&&m?m.writable:!r});else if(!s&&(i||r||d))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else t[e]=n}},5727:function(t){"use strict";t.exports=EvalError},4772:function(t){"use strict";t.exports=Error},511:function(t){"use strict";t.exports=RangeError},5912:function(t){"use strict";t.exports=ReferenceError},4332:function(t){"use strict";t.exports=SyntaxError},682:function(t){"use strict";t.exports=TypeError},4834:function(t){"use strict";t.exports=URIError},2521:function(t){"use strict";var e="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,i=Math.max,r="[object Function]",o=function(t,e){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var r=0;r<e.length;r+=1)n[r+t.length]=e[r];return n},a=function(t,e){for(var n=[],i=e||0,r=0;i<t.length;i+=1,r+=1)n[r]=t[i];return n},l=function(t,e){for(var n="",i=0;i<t.length;i+=1)n+=t[i],i+1<t.length&&(n+=e);return n};t.exports=function(t){var c,d=this;if("function"!=typeof d||n.apply(d)!==r)throw TypeError(e+d);for(var s=a(arguments,1),m=function(){if(this instanceof c){var e=d.apply(this,o(s,arguments));return Object(e)===e?e:this}return d.apply(t,o(s,arguments))},p=i(0,d.length-s.length),u=[],f=0;f<p;f++)u[f]="$"+f;if(c=Function("binder","return function ("+l(u,",")+"){ return binder.apply(this,arguments); }")(m),d.prototype){var h=function(){};h.prototype=d.prototype,c.prototype=new h,h.prototype=null}return c}},7156:function(t,e,n){"use strict";var i=n(2521);t.exports=Function.prototype.bind||i},1528:function(t,e,n){"use strict";var i,r=n(4772),o=n(5727),a=n(511),l=n(5912),c=n(4332),d=n(682),s=n(4834),m=Function,p=function(t){try{return m('"use strict"; return ('+t+").constructor;")()}catch(t){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(t){u=null}var f=function(){throw new d},h=u?function(){try{return arguments.callee,f}catch(t){try{return u(arguments,"callee").get}catch(t){return f}}}():f,g=n(465)(),b=n(1209)(),_=Object.getPrototypeOf||(b?function(t){return t.__proto__}:null),v={},y="undefined"!=typeof Uint8Array&&_?_(Uint8Array):i,x={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?i:ArrayBuffer,"%ArrayIteratorPrototype%":g&&_?_([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?i:Atomics,"%BigInt%":"undefined"==typeof BigInt?i:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?i:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?i:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":o,"%Float32Array%":"undefined"==typeof Float32Array?i:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?i:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?i:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?i:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?i:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&_?_(_([][Symbol.iterator]())):i,"%JSON%":"object"==typeof JSON?JSON:i,"%Map%":"undefined"==typeof Map?i:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&_?_(new Map()[Symbol.iterator]()):i,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?i:Promise,"%Proxy%":"undefined"==typeof Proxy?i:Proxy,"%RangeError%":a,"%ReferenceError%":l,"%Reflect%":"undefined"==typeof Reflect?i:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?i:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&_?_(new Set()[Symbol.iterator]()):i,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&_?_(""[Symbol.iterator]()):i,"%Symbol%":g?Symbol:i,"%SyntaxError%":c,"%ThrowTypeError%":h,"%TypedArray%":y,"%TypeError%":d,"%Uint8Array%":"undefined"==typeof Uint8Array?i:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?i:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?i:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?i:Uint32Array,"%URIError%":s,"%WeakMap%":"undefined"==typeof WeakMap?i:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?i:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?i:WeakSet};if(_)try{null.error}catch(t){var w=_(_(t));x["%Error.prototype%"]=w}var k=function t(e){var n;if("%AsyncFunction%"===e)n=p("async function () {}");else if("%GeneratorFunction%"===e)n=p("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=p("async function* () {}");else if("%AsyncGenerator%"===e){var i=t("%AsyncGeneratorFunction%");i&&(n=i.prototype)}else if("%AsyncIteratorPrototype%"===e){var r=t("%AsyncGenerator%");r&&_&&(n=_(r.prototype))}return x[e]=n,n},E={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=n(7156),T=n(5673),C=A.call(Function.call,Array.prototype.concat),I=A.call(Function.apply,Array.prototype.splice),S=A.call(Function.call,String.prototype.replace),O=A.call(Function.call,String.prototype.slice),L=A.call(Function.call,RegExp.prototype.exec),R=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,D=function(t){var e=O(t,0,1),n=O(t,-1);if("%"===e&&"%"!==n)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new c("invalid intrinsic syntax, expected opening `%`");var i=[];return S(t,R,function(t,e,n,r){i[i.length]=n?S(r,N,"$1"):e||t}),i},z=function(t,e){var n,i=t;if(T(E,i)&&(i="%"+(n=E[i])[0]+"%"),T(x,i)){var r=x[i];if(r===v&&(r=k(i)),void 0===r&&!e)throw new d("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:r}}throw new c("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new d("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new d('"allowMissing" argument must be a boolean');if(null===L(/^%?[^%]*%?$/,t))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=D(t),i=n.length>0?n[0]:"",r=z("%"+i+"%",e),o=r.name,a=r.value,l=!1,s=r.alias;s&&(i=s[0],I(n,C([0,1],s)));for(var m=1,p=!0;m<n.length;m+=1){var f=n[m],h=O(f,0,1),g=O(f,-1);if(('"'===h||"'"===h||"`"===h||'"'===g||"'"===g||"`"===g)&&h!==g)throw new c("property names with quotes must have matching quotes");if("constructor"!==f&&p||(l=!0),i+="."+f,T(x,o="%"+i+"%"))a=x[o];else if(null!=a){if(!(f in a)){if(!e)throw new d("base intrinsic for "+t+" exists, but the property is not available.");return}if(u&&m+1>=n.length){var b=u(a,f);a=(p=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:a[f]}else p=T(a,f),a=a[f];p&&!l&&(x[o]=a)}}return a}},1455:function(t,e,n){"use strict";var i=n(1528)("%Object.getOwnPropertyDescriptor%",!0);if(i)try{i([],"length")}catch(t){i=null}t.exports=i},2320:function(t,e,n){"use strict";var i=n(1528)("%Object.defineProperty%",!0),r=function(){if(i)try{return i({},"a",{value:1}),!0}catch(t){}return!1};r.hasArrayLengthDefineBug=function(){if(!r())return null;try{return 1!==i([],"length",{value:1}).length}catch(t){return!0}},t.exports=r},1209:function(t){"use strict";var e={foo:{}},n=Object;t.exports=function(){return({__proto__:e}).foo===e.foo&&!(({__proto__:null})instanceof n)}},465:function(t,e,n){"use strict";var i="undefined"!=typeof Symbol&&Symbol,r=n(6073);t.exports=function(){return"function"==typeof i&&"function"==typeof Symbol&&"symbol"==typeof i("foo")&&"symbol"==typeof Symbol("bar")&&r()}},6073:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e||"[object Symbol]"!==Object.prototype.toString.call(e)||"[object Symbol]"!==Object.prototype.toString.call(n))return!1;var i=42;for(e in t[e]=i,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(o.value!==i||!0!==o.enumerable)return!1}return!0}},5673:function(t,e,n){"use strict";var i=Function.prototype.call,r=Object.prototype.hasOwnProperty;t.exports=n(7156).call(i,r)},2490:function(t){"use strict";var e=String.prototype.replace,n=/%20/g,i="RFC3986";t.exports={default:i,formatters:{RFC1738:function(t){return e.call(t,n,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:i}},3348:function(t,e,n){"use strict";var i=n(7530),r=n(8429);t.exports={formats:n(2490),parse:r,stringify:i}},8429:function(t,e,n){"use strict";var i=n(3422),r=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:i.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},l=function(t){return t.replace(/&#(\d+);/g,function(t,e){return String.fromCharCode(parseInt(e,10))})},c=function(t,e){return t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},d="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",m=function(t,e){var n={__proto__:null},m=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,p=e.parameterLimit===1/0?void 0:e.parameterLimit,u=m.split(e.delimiter,p),f=-1,h=e.charset;if(e.charsetSentinel)for(g=0;g<u.length;++g)0===u[g].indexOf("utf8=")&&(u[g]===s?h="utf-8":u[g]===d&&(h="iso-8859-1"),f=g,g=u.length);for(g=0;g<u.length;++g)if(g!==f){var g,b,_,v=u[g],y=v.indexOf("]="),x=-1===y?v.indexOf("="):y+1;-1===x?(b=e.decoder(v,a.decoder,h,"key"),_=e.strictNullHandling?null:""):(b=e.decoder(v.slice(0,x),a.decoder,h,"key"),_=i.maybeMap(c(v.slice(x+1),e),function(t){return e.decoder(t,a.decoder,h,"value")})),_&&e.interpretNumericEntities&&"iso-8859-1"===h&&(_=l(_)),v.indexOf("[]=")>-1&&(_=o(_)?[_]:_),r.call(n,b)?n[b]=i.combine(n[b],_):n[b]=_}return n},p=function(t,e,n,i){for(var r=i?e:c(e,n),o=t.length-1;o>=0;--o){var a,l=t[o];if("[]"===l&&n.parseArrays)a=[].concat(r);else{a=n.plainObjects?Object.create(null):{};var d="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,s=parseInt(d,10);n.parseArrays||""!==d?!isNaN(s)&&l!==d&&String(s)===d&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(a=[])[s]=r:"__proto__"!==d&&(a[d]=r):a={0:r}}r=a}return r},u=function(t,e,n,i){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,c=n.depth>0&&a.exec(o),d=c?o.slice(0,c.index):o,s=[];if(d){if(!n.plainObjects&&r.call(Object.prototype,d)&&!n.allowPrototypes)return;s.push(d)}for(var m=0;n.depth>0&&null!==(c=l.exec(o))&&m<n.depth;){if(m+=1,!n.plainObjects&&r.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;s.push(c[1])}return c&&s.push("["+o.slice(c.index)+"]"),p(s,e,n,i)}},f=function(t){if(!t)return a;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?a.charset:t.charset;return{allowDots:void 0===t.allowDots?a.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:a.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:a.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:a.comma,decoder:"function"==typeof t.decoder?t.decoder:a.decoder,delimiter:"string"==typeof t.delimiter||i.isRegExp(t.delimiter)?t.delimiter:a.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:a.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:a.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:a.strictNullHandling}};t.exports=function(t,e){var n=f(e);if(""===t||null==t)return n.plainObjects?Object.create(null):{};for(var r="string"==typeof t?m(t,n):t,o=n.plainObjects?Object.create(null):{},a=Object.keys(r),l=0;l<a.length;++l){var c=a[l],d=u(c,r[c],n,"string"==typeof t);o=i.merge(o,d,n)}return!0===n.allowSparse?o:i.compact(o)}},7530:function(t,e,n){"use strict";var i=n(2538),r=n(3422),o=n(2490),a=Object.prototype.hasOwnProperty,l={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},c=Array.isArray,d=Array.prototype.push,s=function(t,e){d.apply(t,c(e)?e:[e])},m=Date.prototype.toISOString,p=o.default,u={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,format:p,formatter:o.formatters[p],indices:!1,serializeDate:function(t){return m.call(t)},skipNulls:!1,strictNullHandling:!1},f=function(t){return"string"==typeof t||"number"==typeof t||"boolean"==typeof t||"symbol"==typeof t||"bigint"==typeof t},h={},g=function t(e,n,o,a,l,d,m,p,g,b,_,v,y,x,w,k){for(var E,A=e,T=k,C=0,I=!1;void 0!==(T=T.get(h))&&!I;){var S=T.get(e);if(C+=1,void 0!==S)if(S===C)throw RangeError("Cyclic object value");else I=!0;void 0===T.get(h)&&(C=0)}if("function"==typeof p?A=p(n,A):A instanceof Date?A=_(A):"comma"===o&&c(A)&&(A=r.maybeMap(A,function(t){return t instanceof Date?_(t):t})),null===A){if(l)return m&&!x?m(n,u.encoder,w,"key",v):n;A=""}if(f(A)||r.isBuffer(A))return m?[y(x?n:m(n,u.encoder,w,"key",v))+"="+y(m(A,u.encoder,w,"value",v))]:[y(n)+"="+y(String(A))];var O=[];if(void 0===A)return O;if("comma"===o&&c(A))x&&m&&(A=r.maybeMap(A,m)),E=[{value:A.length>0?A.join(",")||null:void 0}];else if(c(p))E=p;else{var L=Object.keys(A);E=g?L.sort(g):L}for(var R=a&&c(A)&&1===A.length?n+"[]":n,N=0;N<E.length;++N){var D=E[N],z="object"==typeof D&&void 0!==D.value?D.value:A[D];if(!d||null!==z){var P=c(A)?"function"==typeof o?o(R,D):R:R+(b?"."+D:"["+D+"]");k.set(e,C);var M=i();M.set(h,k),s(O,t(z,P,o,a,l,d,"comma"===o&&x&&c(A)?null:m,p,g,b,_,v,y,x,w,M))}}return O},b=function(t){if(!t)return u;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw TypeError("Encoder has to be a function.");var e=t.charset||u.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if(void 0!==t.format){if(!a.call(o.formatters,t.format))throw TypeError("Unknown format option provided.");n=t.format}var i=o.formatters[n],r=u.filter;return("function"==typeof t.filter||c(t.filter))&&(r=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:u.addQueryPrefix,allowDots:void 0===t.allowDots?u.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:u.charsetSentinel,delimiter:void 0===t.delimiter?u.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:u.encode,encoder:"function"==typeof t.encoder?t.encoder:u.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:u.encodeValuesOnly,filter:r,format:n,formatter:i,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:u.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:u.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:u.strictNullHandling}};t.exports=function(t,e){var n,r,o,a=t,d=b(e);"function"==typeof d.filter?a=(r=d.filter)("",a):c(d.filter)&&(n=r=d.filter);var m=[];if("object"!=typeof a||null===a)return"";o=e&&e.arrayFormat in l?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var p=l[o];if(e&&"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var u="comma"===p&&e&&e.commaRoundTrip;n||(n=Object.keys(a)),d.sort&&n.sort(d.sort);for(var f=i(),h=0;h<n.length;++h){var _=n[h];d.skipNulls&&null===a[_]||s(m,g(a[_],_,p,u,d.strictNullHandling,d.skipNulls,d.encode?d.encoder:null,d.filter,d.sort,d.allowDots,d.serializeDate,d.format,d.formatter,d.encodeValuesOnly,d.charset,f))}var v=m.join(d.delimiter),y=!0===d.addQueryPrefix?"?":"";return d.charsetSentinel&&("iso-8859-1"===d.charset?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),v.length>0?y+v:""}},3422:function(t,e,n){"use strict";var i=n(2490),r=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),l=function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(o(n)){for(var i=[],r=0;r<n.length;++r)void 0!==n[r]&&i.push(n[r]);e.obj[e.prop]=i}}},c=function(t,e){for(var n=e&&e.plainObjects?Object.create(null):{},i=0;i<t.length;++i)void 0!==t[i]&&(n[i]=t[i]);return n},d=function t(e,n,i){if(!n)return e;if("object"!=typeof n){if(o(e))e.push(n);else{if(!e||"object"!=typeof e)return[e,n];(i&&(i.plainObjects||i.allowPrototypes)||!r.call(Object.prototype,n))&&(e[n]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(n);var a=e;return(o(e)&&!o(n)&&(a=c(e,i)),o(e)&&o(n))?(n.forEach(function(n,o){if(r.call(e,o)){var a=e[o];a&&"object"==typeof a&&n&&"object"==typeof n?e[o]=t(a,n,i):e.push(n)}else e[o]=n}),e):Object.keys(n).reduce(function(e,o){var a=n[o];return r.call(e,o)?e[o]=t(e[o],a,i):e[o]=a,e},a)};t.exports={arrayToObject:c,assign:function(t,e){return Object.keys(e).reduce(function(t,n){return t[n]=e[n],t},t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],i=0;i<e.length;++i)for(var r=e[i],o=r.obj[r.prop],a=Object.keys(o),c=0;c<a.length;++c){var d=a[c],s=o[d];"object"==typeof s&&null!==s&&-1===n.indexOf(s)&&(e.push({obj:o,prop:d}),n.push(s))}return l(e),t},decode:function(t,e,n){var i=t.replace(/\+/g," ");if("iso-8859-1"===n)return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch(t){return i}},encode:function(t,e,n,r,o){if(0===t.length)return t;var l=t;if("symbol"==typeof t?l=Symbol.prototype.toString.call(t):"string"!=typeof t&&(l=String(t)),"iso-8859-1"===n)return escape(l).replace(/%u[0-9a-f]{4}/gi,function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"});for(var c="",d=0;d<l.length;++d){var s=l.charCodeAt(d);if(45===s||46===s||95===s||126===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||o===i.RFC1738&&(40===s||41===s)){c+=l.charAt(d);continue}if(s<128){c+=a[s];continue}if(s<2048){c+=a[192|s>>6]+a[128|63&s];continue}if(s<55296||s>=57344){c+=a[224|s>>12]+a[128|s>>6&63]+a[128|63&s];continue}d+=1,c+=a[240|(s=65536+((1023&s)<<10|1023&l.charCodeAt(d)))>>18]+a[128|s>>12&63]+a[128|s>>6&63]+a[128|63&s]}return c},isBuffer:function(t){return!!t&&"object"==typeof t&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(o(t)){for(var n=[],i=0;i<t.length;i+=1)n.push(e(t[i]));return n}return e(t)},merge:d}},1744:function(t,e,n){"use strict";var i=n(1528),r=n(7892),o=n(2320)(),a=n(1455),l=n(682),c=i("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new l("`fn` is not a function");if("number"!=typeof e||e<0||e>0xffffffff||c(e)!==e)throw new l("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,d=!0;if("length"in t&&a){var s=a(t,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(d=!1)}return(i||d||!n)&&(o?r(t,"length",e,!0,!0):r(t,"length",e)),t}},2538:function(t,e,n){"use strict";var i=n(1528),r=n(7737),o=n(8683),a=n(682),l=i("%WeakMap%",!0),c=i("%Map%",!0),d=r("WeakMap.prototype.get",!0),s=r("WeakMap.prototype.set",!0),m=r("WeakMap.prototype.has",!0),p=r("Map.prototype.get",!0),u=r("Map.prototype.set",!0),f=r("Map.prototype.has",!0),h=function(t,e){for(var n,i=t;null!==(n=i.next);i=n)if(n.key===e)return i.next=n.next,n.next=t.next,t.next=n,n},g=function(t,e){var n=h(t,e);return n&&n.value},b=function(t,e,n){var i=h(t,e);i?i.value=n:t.next={key:e,next:t.next,value:n}},_=function(t,e){return!!h(t,e)};t.exports=function(){var t,e,n,i={assert:function(t){if(!i.has(t))throw new a("Side channel does not contain "+o(t))},get:function(i){if(l&&i&&("object"==typeof i||"function"==typeof i)){if(t)return d(t,i)}else if(c){if(e)return p(e,i)}else if(n)return g(n,i)},has:function(i){if(l&&i&&("object"==typeof i||"function"==typeof i)){if(t)return m(t,i)}else if(c){if(e)return f(e,i)}else if(n)return _(n,i);return!1},set:function(i,r){l&&i&&("object"==typeof i||"function"==typeof i)?(t||(t=new l),s(t,i,r)):c?(e||(e=new c),u(e,i,r)):(n||(n={key:{},next:null}),b(n,i,r))}};return i}},8683:function(t,e,n){var i="function"==typeof Map&&Map.prototype,r=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=i&&r&&"function"==typeof r.get?r.get:null,a=i&&Map.prototype.forEach,l="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&l?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,d=l&&c&&"function"==typeof c.get?c.get:null,s=l&&Set.prototype.forEach,m="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,u="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,h=Object.prototype.toString,g=Function.prototype.toString,b=String.prototype.match,_=String.prototype.slice,v=String.prototype.replace,y=String.prototype.toUpperCase,x=String.prototype.toLowerCase,w=RegExp.prototype.test,k=Array.prototype.concat,E=Array.prototype.join,A=Array.prototype.slice,T=Math.floor,C="function"==typeof BigInt?BigInt.prototype.valueOf:null,I=Object.getOwnPropertySymbols,S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,O="function"==typeof Symbol&&"object"==typeof Symbol.iterator,L="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===O?"object":"symbol")?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,N=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function D(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||w.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var i=t<0?-T(-t):T(t);if(i!==t){var r=String(i),o=_.call(e,r.length+1);return v.call(r,n,"$&_")+"."+v.call(v.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,n,"$&_")}var z=n(9180),P=z.custom,M=K(P)?P:null;function $(t,e,n){var i="double"===(n.quoteStyle||e)?'"':"'";return i+t+i}function F(t){return v.call(String(t),/"/g,"&quot;")}function B(t){return"[object Array]"===J(t)&&(!L||!("object"==typeof t&&L in t))}function H(t){return"[object Date]"===J(t)&&(!L||!("object"==typeof t&&L in t))}function U(t){return"[object RegExp]"===J(t)&&(!L||!("object"==typeof t&&L in t))}function j(t){return"[object Error]"===J(t)&&(!L||!("object"==typeof t&&L in t))}function X(t){return"[object String]"===J(t)&&(!L||!("object"==typeof t&&L in t))}function V(t){return"[object Number]"===J(t)&&(!L||!("object"==typeof t&&L in t))}function Y(t){return"[object Boolean]"===J(t)&&(!L||!("object"==typeof t&&L in t))}function K(t){if(O)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!S)return!1;try{return S.call(t),!0}catch(t){}return!1}function G(t){if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,i,r,l){var c=i||{};if(W(c,"quoteStyle")&&"single"!==c.quoteStyle&&"double"!==c.quoteStyle)throw TypeError('option "quoteStyle" must be "single" or "double"');if(W(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!W(c,"customInspect")||c.customInspect;if("boolean"!=typeof m&&"symbol"!==m)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(W(c,"indent")&&null!==c.indent&&" "!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(W(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var p=c.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return ta(e,c);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var u=String(e);return p?D(e,u):u}if("bigint"==typeof e){var h=String(e)+"n";return p?D(e,h):h}var g=void 0===c.depth?5:c.depth;if(void 0===r&&(r=0),r>=g&&g>0&&"object"==typeof e)return B(e)?"[Array]":"[Object]";var b=tp(c,r);if(void 0===l)l=[];else if(Z(l,e)>=0)return"[Circular]";function y(e,n,i){if(n&&(l=A.call(l)).push(n),i){var o={depth:c.depth};return W(c,"quoteStyle")&&(o.quoteStyle=c.quoteStyle),t(e,o,r+1,l)}return t(e,c,r+1,l)}if("function"==typeof e&&!U(e)){var w=Q(e),T=tf(e,y);return"[Function"+(w?": "+w:" (anonymous)")+"]"+(T.length>0?" { "+E.call(T,", ")+" }":"")}if(K(e)){var I=O?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):S.call(e);return"object"!=typeof e||O?I:tc(I)}if(to(e)){for(var P="<"+x.call(String(e.nodeName)),q=e.attributes||[],tl=0;tl<q.length;tl++)P+=" "+q[tl].name+"="+$(F(q[tl].value),"double",c);return P+=">",e.childNodes&&e.childNodes.length&&(P+="..."),P+="</"+x.call(String(e.nodeName))+">"}if(B(e)){if(0===e.length)return"[]";var th=tf(e,y);return b&&!tm(th)?"["+tu(th,b)+"]":"[ "+E.call(th,", ")+" ]"}if(j(e)){var tg=tf(e,y);return"cause"in Error.prototype||!("cause"in e)||R.call(e,"cause")?0===tg.length?"["+String(e)+"]":"{ ["+String(e)+"] "+E.call(tg,", ")+" }":"{ ["+String(e)+"] "+E.call(k.call("[cause]: "+y(e.cause),tg),", ")+" }"}if("object"==typeof e&&m){if(M&&"function"==typeof e[M]&&z)return z(e,{depth:g-r});else if("symbol"!==m&&"function"==typeof e.inspect)return e.inspect()}if(tt(e)){var tb=[];return a&&a.call(e,function(t,n){tb.push(y(n,e,!0)+" => "+y(t,e))}),ts("Map",o.call(e),tb,b)}if(ti(e)){var t_=[];return s&&s.call(e,function(t){t_.push(y(t,e))}),ts("Set",d.call(e),t_,b)}if(te(e))return td("WeakMap");if(tr(e))return td("WeakSet");if(tn(e))return td("WeakRef");if(V(e))return tc(y(Number(e)));if(G(e))return tc(y(C.call(e)));if(Y(e))return tc(f.call(e));if(X(e))return tc(y(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if(e===n.g)return"{ [object globalThis] }";if(!H(e)&&!U(e)){var tv=tf(e,y),ty=N?N(e)===Object.prototype:e instanceof Object||e.constructor===Object,tx=e instanceof Object?"":"null prototype",tw=!ty&&L&&Object(e)===e&&L in e?_.call(J(e),8,-1):tx?"Object":"",tk=(ty||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(tw||tx?"["+E.call(k.call([],tw||[],tx||[]),": ")+"] ":"");return 0===tv.length?tk+"{}":b?tk+"{"+tu(tv,b)+"}":tk+"{ "+E.call(tv,", ")+" }"}return String(e)};var q=Object.prototype.hasOwnProperty||function(t){return t in this};function W(t,e){return q.call(t,e)}function J(t){return h.call(t)}function Q(t){if(t.name)return t.name;var e=b.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function Z(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return -1}function tt(t){if(!o||!t||"object"!=typeof t)return!1;try{o.call(t);try{d.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}function te(t){if(!m||!t||"object"!=typeof t)return!1;try{m.call(t,m);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}function tn(t){if(!u||!t||"object"!=typeof t)return!1;try{return u.call(t),!0}catch(t){}return!1}function ti(t){if(!d||!t||"object"!=typeof t)return!1;try{d.call(t);try{o.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}function tr(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{m.call(t,m)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}function to(t){return!!t&&"object"==typeof t&&(!!("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)||"string"==typeof t.nodeName&&"function"==typeof t.getAttribute)}function ta(t,e){if(t.length>e.maxStringLength){var n=t.length-e.maxStringLength,i="... "+n+" more character"+(n>1?"s":"");return ta(_.call(t,0,e.maxStringLength),e)+i}return $(v.call(v.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,tl),"single",e)}function tl(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+y.call(e.toString(16))}function tc(t){return"Object("+t+")"}function td(t){return t+" { ? }"}function ts(t,e,n,i){return t+" ("+e+") {"+(i?tu(n,i):E.call(n,", "))+"}"}function tm(t){for(var e=0;e<t.length;e++)if(Z(t[e],"\n")>=0)return!1;return!0}function tp(t,e){var n;if(" "===t.indent)n=" ";else{if("number"!=typeof t.indent||!(t.indent>0))return null;n=E.call(Array(t.indent+1)," ")}return{base:n,prev:E.call(Array(e+1),n)}}function tu(t,e){if(0===t.length)return"";var n="\n"+e.prev+e.base;return n+E.call(t,","+n)+"\n"+e.prev}function tf(t,e){var n,i=B(t),r=[];if(i){r.length=t.length;for(var o=0;o<t.length;o++)r[o]=W(t,o)?e(t[o],t):""}var a="function"==typeof I?I(t):[];if(O){n={};for(var l=0;l<a.length;l++)n["$"+a[l]]=a[l]}for(var c in t)if(W(t,c)&&(!i||String(Number(c))!==c||!(c<t.length)))if(O&&n["$"+c]instanceof Symbol)continue;else w.call(/[^\w$]/,c)?r.push(e(c,t)+": "+e(t[c],t)):r.push(c+": "+e(t[c],t));if("function"==typeof I)for(var d=0;d<a.length;d++)R.call(t,a[d])&&r.push("["+e(a[d])+"]: "+e(t[a[d]],t));return r}},9357:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{OrAssetTree:()=>OrAssetTree,OrAssetTreeAddEvent:()=>OrAssetTreeAddEvent,OrAssetTreeAssetEvent:()=>OrAssetTreeAssetEvent,OrAssetTreeChangeParentEvent:()=>OrAssetTreeChangeParentEvent,OrAssetTreeFilter:()=>OrAssetTreeFilter,OrAssetTreeRequestAddEvent:()=>OrAssetTreeRequestAddEvent,OrAssetTreeRequestDeleteEvent:()=>OrAssetTreeRequestDeleteEvent,OrAssetTreeRequestSelectionEvent:()=>OrAssetTreeRequestSelectionEvent,OrAssetTreeSelectionEvent:()=>OrAssetTreeSelectionEvent,OrAssetTreeToggleExpandEvent:()=>OrAssetTreeToggleExpandEvent,getAssetTypes:()=>getAssetTypes,style:()=>_style__WEBPACK_IMPORTED_MODULE_6__.o});var OrAssetTree_1,FilterElementType,lit__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(538),lit_decorators_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(3176),_openremote_or_mwc_components_or_mwc_input__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(6505),_openremote_or_icon__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(6243),_openremote_or_icon__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_openremote_or_icon__WEBPACK_IMPORTED_MODULE_3__),_openremote_model__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(4297),_openremote_model__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_openremote_model__WEBPACK_IMPORTED_MODULE_4__),_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(9329),_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__),_style__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(6748),_openremote_core__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(6801),_openremote_core__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_openremote_core__WEBPACK_IMPORTED_MODULE_7__),qs__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(3348),qs__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_8__),_openremote_or_mwc_components_or_mwc_menu__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(5320),_openremote_or_mwc_components_or_mwc_list__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(2730),_openremote_or_mwc_components_or_mwc_dialog__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(5839),_or_add_asset_dialog__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(7987),_openremote_or_mwc_components_or_mwc_snackbar__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(6445),lit_directives_when_js__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(5058),__decorate=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var l=t.length-1;l>=0;l--)(r=t[l])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},__awaiter=function(t,e,n,i){function r(t){return t instanceof n?t:new n(function(e){e(t)})}return new(n||(n=Promise))(function(n,o){function a(t){try{c(i.next(t))}catch(t){o(t)}}function l(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){t.done?n(t.value):r(t.value).then(a,l)}c((i=i.apply(t,e||[])).next())})};class OrAssetTreeRequestSelectionEvent extends CustomEvent{constructor(t){super(OrAssetTreeRequestSelectionEvent.NAME,{bubbles:!0,composed:!0,detail:{allow:!0,detail:t}})}}OrAssetTreeRequestSelectionEvent.NAME="or-asset-tree-request-selection";class OrAssetTreeSelectionEvent extends CustomEvent{constructor(t){super(OrAssetTreeSelectionEvent.NAME,{bubbles:!0,composed:!0,detail:t})}}OrAssetTreeSelectionEvent.NAME="or-asset-tree-selection";class OrAssetTreeChangeParentEvent extends CustomEvent{constructor(t,e){super(OrAssetTreeChangeParentEvent.NAME,{bubbles:!0,composed:!0,detail:{parentId:t,assetIds:e}})}}OrAssetTreeChangeParentEvent.NAME="or-asset-tree-change-parent";class OrAssetTreeToggleExpandEvent extends CustomEvent{constructor(t){super(OrAssetTreeToggleExpandEvent.NAME,{bubbles:!0,composed:!0,detail:t})}}OrAssetTreeToggleExpandEvent.NAME="or-asset-tree-expand",function(t){t[t.SEARCH_FILTER=0]="SEARCH_FILTER",t[t.ASSET_TYPE=1]="ASSET_TYPE",t[t.ATTRIBUTE_NAME=2]="ATTRIBUTE_NAME",t[t.ATTRIBUTE_VALUE=3]="ATTRIBUTE_VALUE"}(FilterElementType||(FilterElementType={}));class OrAssetTreeRequestAddEvent extends CustomEvent{constructor(t){super(OrAssetTreeRequestAddEvent.NAME,{bubbles:!0,composed:!0,detail:{allow:!0,detail:t}})}}OrAssetTreeRequestAddEvent.NAME="or-asset-tree-request-add";class OrAssetTreeAddEvent extends CustomEvent{constructor(t){super(OrAssetTreeAddEvent.NAME,{bubbles:!0,composed:!0,detail:t})}}OrAssetTreeAddEvent.NAME="or-asset-tree-add";class OrAssetTreeRequestDeleteEvent extends CustomEvent{constructor(t){super(OrAssetTreeRequestDeleteEvent.NAME,{bubbles:!0,composed:!0,detail:{allow:!0,detail:t}})}}OrAssetTreeRequestDeleteEvent.NAME="or-asset-tree-request-delete";class OrAssetTreeAssetEvent extends CustomEvent{constructor(t){super(OrAssetTreeAssetEvent.NAME,{bubbles:!0,composed:!0,detail:t})}}OrAssetTreeAssetEvent.NAME="or-asset-tree-asset-event";class OrAssetTreeFilter{constructor(){this.asset=void 0,this.assetType=[],this.attribute=[],this.attributeValue=[]}}let getAssetTypes=()=>__awaiter(void 0,void 0,void 0,function*(){let t=yield _openremote_core__WEBPACK_IMPORTED_MODULE_7___default().rest.api.AssetResource.queryAssets({select:{attributes:[]},recursive:!0});if(t&&t.data)return t.data.map(t=>t.type)}),OrAssetTree=OrAssetTree_1=class OrAssetTree extends(0,_openremote_core__WEBPACK_IMPORTED_MODULE_7__.subscribe)(_openremote_core__WEBPACK_IMPORTED_MODULE_7___default())(lit__WEBPACK_IMPORTED_MODULE_0__.oi){constructor(){super(...arguments),this.readonly=!1,this.disabled=!1,this.disableSubscribe=!1,this.showDeselectBtn=!0,this.showSortBtn=!0,this.showFilter=!0,this.sortBy="name",this.expandAllNodes=!1,this.expandedIds=[],this.checkboxes=!1,this._loading=!1,this._connected=!1,this._selectedNodes=[],this._expandedNodes=[],this._filter=new OrAssetTreeFilter,this._searchInputTimer=void 0,this._filterSettingOpen=!1,this._assetTypes=[],this._uniqueAssetTypes=[],this._dragDropParentId=null,this._expandTimer=void 0,this._latestSelected=void 0,this.assetsChildren={}}static get styles(){return[_style__WEBPACK_IMPORTED_MODULE_6__.o]}get selectedNodes(){return this._selectedNodes?[...this._selectedNodes]:[]}set selectedNodes(t){this.selectedIds=t.map(t=>t.asset.id)}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this.requestUpdate()}refresh(){this._nodes=void 0}isAncestorSelected(t){if(!this.selectedIds||!t.parent)return!1;for(;t.parent;)if(t=t.parent,this.selectedIds.includes(t.asset.id))return!0;return!1}mapDescriptors(t,e){let n=t.map(t=>({styleMap:{"--or-icon-fill":t.colour?"#"+t.colour:"unset"},icon:t.icon,text:_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.getAssetTypeLabel(t),value:t.name,data:t})).sort(_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.sortByString(t=>t.text));return e&&n.splice(0,0,e),n}getSelectHeader(){return(0,lit__WEBPACK_IMPORTED_MODULE_0__.dy)`<or-mwc-input style="width:100%;" ?disabled="${this._loading}" type="${_openremote_or_mwc_components_or_mwc_input__WEBPACK_IMPORTED_MODULE_2__.n$.TEXT}" .label="${_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__.i18next.t("filter.assetTypeLabel")}" iconTrailing="menu-down" iconColor="rgba(0, 0, 0, 0.87)" icon="selection-ellipse" value="${_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__.i18next.t("filter.assetTypeNone")}"></or-mwc-input>`}getSelectedHeader(t){return(0,lit__WEBPACK_IMPORTED_MODULE_0__.dy)`<or-mwc-input style="width:100%;" ?disabled="${this._loading}" type="${_openremote_or_mwc_components_or_mwc_input__WEBPACK_IMPORTED_MODULE_2__.n$.TEXT}" .label="${_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__.i18next.t("filter.assetTypeLabel")}" .iconColor="${t.colour}" iconTrailing="menu-down" icon="${t.icon}" value="${_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.getAssetTypeLabel(t)}"></or-mwc-input>`}assetTypeSelect(){if(!this._assetTypeFilter)return this.getSelectHeader();{let t=this._assetTypes.find(t=>t.name===this._assetTypeFilter);return t?this.getSelectedHeader(t):this.getSelectHeader()}}atLeastOneNodeToBeShown(){var t;let e=!1;return null==(t=this._nodes)||t.forEach(t=>{t.hidden||(e=!0)}),e}render(){let t=this._canAdd();return(0,lit__WEBPACK_IMPORTED_MODULE_0__.dy)`
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("ORTranslate"),require("ORCore"),require("ORModel"),require("ORIcon")):"function"==typeof define&&define.amd?define(["ORTranslate","ORCore","ORModel","ORIcon"],e):"object"==typeof exports?exports.ORAssetTree=e(require("ORTranslate"),require("ORCore"),require("ORModel"),require("ORIcon")):t.ORAssetTree=e(t.ORTranslate,t.ORCore,t.ORModel,t.ORIcon)}(self,(__WEBPACK_EXTERNAL_MODULE__9329__,__WEBPACK_EXTERNAL_MODULE__6801__,__WEBPACK_EXTERNAL_MODULE__4297__,__WEBPACK_EXTERNAL_MODULE__6243__)=>(()=>{var __webpack_modules__={1872:function(t,e,n){"use strict";n.d(e,{B:()=>a});function i(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,r,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return a}function r(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(i(arguments[e]));return t}var o=n(4327),a=function(){function t(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];this.root=t,this.initialize.apply(this,r(n)),this.foundation=void 0===e?this.getDefaultFoundation():e,this.foundation.init(),this.initialSyncWithDOM()}return t.attachTo=function(e){return new t(e,new o.K({}))},t.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},t.prototype.getDefaultFoundation=function(){throw 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 i;void 0===n&&(n=!1),"function"==typeof CustomEvent?i=new CustomEvent(t,{bubbles:n,detail:e}):(i=document.createEvent("CustomEvent")).initCustomEvent(t,n,!1,e),this.root.dispatchEvent(i)},t}()},4327:function(t,e,n){"use strict";n.d(e,{K:()=>i});var i=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}()},9364:function(t,e,n){"use strict";function i(t){return void 0===t&&(t=window),!!r(t)&&{passive:!0}}function r(t){void 0===t&&(t=window);var e=!1;try{var n={get passive(){return e=!0,!1}},i=function(){};t.document.addEventListener("test",i,n),t.document.removeEventListener("test",i,n)}catch(t){e=!1}return e}n.d(e,{K:()=>i})},9905:function(t,e,n){"use strict";n.d(e,{Fn:()=>i,ku:()=>y});var i={UNKNOWN:"Unknown",BACKSPACE:"Backspace",ENTER:"Enter",SPACEBAR:"Spacebar",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",END:"End",HOME:"Home",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",DELETE:"Delete",ESCAPE:"Escape"},r=new Set;r.add(i.BACKSPACE),r.add(i.ENTER),r.add(i.SPACEBAR),r.add(i.PAGE_UP),r.add(i.PAGE_DOWN),r.add(i.END),r.add(i.HOME),r.add(i.ARROW_LEFT),r.add(i.ARROW_UP),r.add(i.ARROW_RIGHT),r.add(i.ARROW_DOWN),r.add(i.DELETE),r.add(i.ESCAPE);var o=8,a=13,l=32,c=33,d=34,s=35,m=36,p=37,u=38,f=39,h=40,g=46,b=27,_=new Map;_.set(o,i.BACKSPACE),_.set(a,i.ENTER),_.set(l,i.SPACEBAR),_.set(c,i.PAGE_UP),_.set(d,i.PAGE_DOWN),_.set(s,i.END),_.set(m,i.HOME),_.set(p,i.ARROW_LEFT),_.set(u,i.ARROW_UP),_.set(f,i.ARROW_RIGHT),_.set(h,i.ARROW_DOWN),_.set(g,i.DELETE),_.set(b,i.ESCAPE);var v=new Set;function y(t){var e=t.key;if(r.has(e))return e;var n=_.get(t.keyCode);return n||i.UNKNOWN}v.add(i.PAGE_UP),v.add(i.PAGE_DOWN),v.add(i.END),v.add(i.HOME),v.add(i.ARROW_LEFT),v.add(i.ARROW_UP),v.add(i.ARROW_RIGHT),v.add(i.ARROW_DOWN)},2584:function(t,e,n){"use strict";function i(t,e){if(t.closest)return t.closest(e);for(var n=t;n;){if(r(n,e))return n;n=n.parentElement}return null}function r(t,e){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e)}function o(t){var e=t;if(null!==e.offsetParent)return e.scrollWidth;var n=e.cloneNode(!0);n.style.setProperty("position","absolute"),n.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(n);var i=n.scrollWidth;return document.documentElement.removeChild(n),i}n.d(e,{FL:()=>o,oq:()=>i,wB:()=>r})},2326:function(t,e,n){"use strict";n.d(e,{e:()=>c});var i=n(2093),r=n(1872),o=n(2584),a=n(3164),l=n(7066),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return(0,i.ZT)(e,t),Object.defineProperty(e.prototype,"vertical",{set:function(t){this.foundation.setVerticalOrientation(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"listElements",{get:function(){return[].slice.call(this.root.querySelectorAll("."+a.UX.LIST_ITEM_CLASS))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wrapFocus",{set:function(t){this.foundation.setWrapFocus(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"typeaheadInProgress",{get:function(){return this.foundation.isTypeaheadInProgress()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasTypeahead",{set:function(t){this.foundation.setHasTypeahead(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"singleSelection",{set:function(t){this.foundation.setSingleSelection(t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedIndex",{get:function(){return this.foundation.getSelectedIndex()},set:function(t){this.foundation.setSelectedIndex(t)},enumerable:!0,configurable:!0}),e.attachTo=function(t){return new e(t)},e.prototype.initialSyncWithDOM=function(){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()},e.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown_),this.unlisten("click",this.handleClick_),this.unlisten("focusin",this.focusInEventListener_),this.unlisten("focusout",this.focusOutEventListener_)},e.prototype.layout=function(){var t=this.root.getAttribute(a.j2.ARIA_ORIENTATION);this.vertical=t!==a.j2.ARIA_ORIENTATION_HORIZONTAL,[].slice.call(this.root.querySelectorAll(".mdc-list-item:not([tabindex])")).forEach(function(t){t.setAttribute("tabindex","-1")}),[].slice.call(this.root.querySelectorAll(a.j2.FOCUSABLE_CHILD_ELEMENTS)).forEach(function(t){return t.setAttribute("tabindex","-1")}),this.foundation.layout()},e.prototype.getPrimaryText=function(t){var e=t.querySelector("."+a.UX.LIST_ITEM_PRIMARY_TEXT_CLASS);if(e)return e.textContent||"";var n=t.querySelector("."+a.UX.LIST_ITEM_TEXT_CLASS);return n&&n.textContent||""},e.prototype.initializeListType=function(){var t=this,e=this.root.querySelectorAll(a.j2.ARIA_ROLE_CHECKBOX_SELECTOR),n=this.root.querySelector(a.j2.ARIA_CHECKED_RADIO_SELECTOR);if(e.length){var i=this.root.querySelectorAll(a.j2.ARIA_CHECKED_CHECKBOX_SELECTOR);this.selectedIndex=[].map.call(i,function(e){return t.listElements.indexOf(e)})}else n&&(this.selectedIndex=this.listElements.indexOf(n))},e.prototype.setEnabled=function(t,e){this.foundation.setEnabled(t,e)},e.prototype.typeaheadMatchItem=function(t,e){return this.foundation.typeaheadMatchItem(t,e,!0)},e.prototype.getDefaultFoundation=function(){var t=this,e={addClassForElementIndex:function(e,n){var i=t.listElements[e];i&&i.classList.add(n)},focusItemAtIndex:function(e){var n=t.listElements[e];n&&n.focus()},getAttributeForElementIndex:function(e,n){return t.listElements[e].getAttribute(n)},getFocusedElementIndex:function(){return t.listElements.indexOf(document.activeElement)},getListItemCount:function(){return t.listElements.length},getPrimaryTextAtIndex:function(e){return t.getPrimaryText(t.listElements[e])},hasCheckboxAtIndex:function(e){return!!t.listElements[e].querySelector(a.j2.CHECKBOX_SELECTOR)},hasRadioAtIndex:function(e){return!!t.listElements[e].querySelector(a.j2.RADIO_SELECTOR)},isCheckboxCheckedAtIndex:function(e){return t.listElements[e].querySelector(a.j2.CHECKBOX_SELECTOR).checked},isFocusInsideList:function(){return t.root!==document.activeElement&&t.root.contains(document.activeElement)},isRootFocused:function(){return document.activeElement===t.root},listItemAtIndexHasClass:function(e,n){return t.listElements[e].classList.contains(n)},notifyAction:function(e){t.emit(a.j2.ACTION_EVENT,{index:e},!0)},removeClassForElementIndex:function(e,n){var i=t.listElements[e];i&&i.classList.remove(n)},setAttributeForElementIndex:function(e,n,i){var r=t.listElements[e];r&&r.setAttribute(n,i)},setCheckedCheckboxOrRadioAtIndex:function(e,n){var i=t.listElements[e].querySelector(a.j2.CHECKBOX_RADIO_SELECTOR);i.checked=n;var r=document.createEvent("Event");r.initEvent("change",!0,!0),i.dispatchEvent(r)},setTabIndexForListItemChildren:function(e,n){var i=t.listElements[e];[].slice.call(i.querySelectorAll(a.j2.CHILD_ELEMENTS_TO_TOGGLE_TABINDEX)).forEach(function(t){return t.setAttribute("tabindex",n)})}};return new l.I(e)},e.prototype.getListItemIndex_=function(t){var e=t.target,n=(0,o.oq)(e,"."+a.UX.LIST_ITEM_CLASS+", ."+a.UX.ROOT);return n&&(0,o.wB)(n,"."+a.UX.LIST_ITEM_CLASS)?this.listElements.indexOf(n):-1},e.prototype.handleFocusInEvent_=function(t){var e=this.getListItemIndex_(t);this.foundation.handleFocusIn(t,e)},e.prototype.handleFocusOutEvent_=function(t){var e=this.getListItemIndex_(t);this.foundation.handleFocusOut(t,e)},e.prototype.handleKeydownEvent_=function(t){var e=this.getListItemIndex_(t),n=t.target;this.foundation.handleKeydown(t,n.classList.contains(a.UX.LIST_ITEM_CLASS),e)},e.prototype.handleClickEvent_=function(t){var e=this.getListItemIndex_(t),n=t.target,i=!(0,o.wB)(n,a.j2.CHECKBOX_RADIO_SELECTOR);this.foundation.handleClick(e,i)},e}(r.B)},3164:function(t,e,n){"use strict";n.d(e,{KT:()=>o,UX:()=>i,j2:()=>r});var i={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"},r={ACTION_EVENT:"MDCList:action",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",CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:"\n ."+i.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+i.LIST_ITEM_CLASS+" a\n ",FOCUSABLE_CHILD_ELEMENTS:"\n ."+i.LIST_ITEM_CLASS+" button:not(:disabled),\n ."+i.LIST_ITEM_CLASS+" a,\n ."+i.LIST_ITEM_CLASS+' input[type="radio"]:not(:disabled),\n .'+i.LIST_ITEM_CLASS+' input[type="checkbox"]:not(:disabled)\n ',RADIO_SELECTOR:'input[type="radio"]'},o={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300}},7066:function(t,e,n){"use strict";n.d(e,{I:()=>_});var i=n(2093),r=n(4327),o=n(9905),a=n(3164),l=["input","button","textarea","select"],c=function(t){var e=t.target;if(e){var n=(""+e.tagName).toLowerCase();-1===l.indexOf(n)&&t.preventDefault()}};function d(){return{bufferClearTimeout:0,currentFirstChar:"",sortedIndexCursor:0,typeaheadBuffer:""}}function s(t,e){for(var n=new Map,i=0;i<t;i++){var r=e(i).trim();if(r){var o=r[0].toLowerCase();n.has(o)||n.set(o,[]),n.get(o).push({text:r.toLowerCase(),index:i})}}return n.forEach(function(t){t.sort(function(t,e){return t.index-e.index})}),n}function m(t,e){var n,i=t.nextChar,r=t.focusItemAtIndex,o=t.sortedIndexByFirstChar,l=t.focusedItemIndex,c=t.skipFocus,d=t.isItemAtIndexDisabled;return clearTimeout(e.bufferClearTimeout),e.bufferClearTimeout=setTimeout(function(){h(e)},a.KT.TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS),e.typeaheadBuffer=e.typeaheadBuffer+i,-1===(n=1===e.typeaheadBuffer.length?p(o,l,d,e):u(o,d,e))||c||r(n),n}function p(t,e,n,i){var r,o=i.typeaheadBuffer[0],a=t.get(o);if(!a)return -1;if(o===i.currentFirstChar&&a[i.sortedIndexCursor].index===e){i.sortedIndexCursor=(i.sortedIndexCursor+1)%a.length;var l=a[i.sortedIndexCursor].index;if(!n(l))return l}i.currentFirstChar=o;var c=-1;for(r=0;r<a.length;r++)if(!n(a[r].index)){c=r;break}for(;r<a.length;r++)if(a[r].index>e&&!n(a[r].index)){c=r;break}return -1!==c?(i.sortedIndexCursor=c,a[i.sortedIndexCursor].index):-1}function u(t,e,n){var i=n.typeaheadBuffer[0],r=t.get(i);if(!r)return -1;var o=r[n.sortedIndexCursor];if(0===o.text.lastIndexOf(n.typeaheadBuffer,0)&&!e(o.index))return o.index;for(var a=(n.sortedIndexCursor+1)%r.length,l=-1;a!==n.sortedIndexCursor;){var c=r[a],d=0===c.text.lastIndexOf(n.typeaheadBuffer,0),s=!e(c.index);if(d&&s){l=a;break}a=(a+1)%r.length}return -1!==l?(n.sortedIndexCursor=l,r[n.sortedIndexCursor].index):-1}function f(t){return t.typeaheadBuffer.length>0}function h(t){t.typeaheadBuffer=""}function g(t,e){var n=t.event,i=t.isTargetListItem,r=t.focusedItemIndex,a=t.focusItemAtIndex,l=t.sortedIndexByFirstChar,d=t.isItemAtIndexDisabled,s="ArrowLeft"===(0,o.ku)(n),p="ArrowUp"===(0,o.ku)(n),u="ArrowRight"===(0,o.ku)(n),h="ArrowDown"===(0,o.ku)(n),g="Home"===(0,o.ku)(n),b="End"===(0,o.ku)(n),_="Enter"===(0,o.ku)(n),v="Spacebar"===(0,o.ku)(n);if(s||p||u||h||g||b||_)return -1;if(!v&&1===n.key.length){c(n);var y={focusItemAtIndex:a,focusedItemIndex:r,nextChar:n.key.toLowerCase(),sortedIndexByFirstChar:l,skipFocus:!1,isItemAtIndexDisabled:d};return m(y,e)}if(!v)return -1;if(i&&c(n),i&&f(e)){var y={focusItemAtIndex:a,focusedItemIndex:r,nextChar:" ",sortedIndexByFirstChar:l,skipFocus:!1,isItemAtIndexDisabled:d};return m(y,e)}return -1}function b(t){return t instanceof Array}var _=function(t){function e(n){var r=t.call(this,(0,i.pi)((0,i.pi)({},e.defaultAdapter),n))||this;return r.wrapFocus_=!1,r.isVertical_=!0,r.isSingleSelectionList_=!1,r.selectedIndex_=a.KT.UNSET_INDEX,r.focusedItemIndex=a.KT.UNSET_INDEX,r.useActivatedClass_=!1,r.useSelectedAttr_=!1,r.ariaCurrentAttrValue_=null,r.isCheckboxList_=!1,r.isRadioList_=!1,r.hasTypeahead=!1,r.typeaheadState=d(),r.sortedIndexByFirstChar=new Map,r}return(0,i.ZT)(e,t),Object.defineProperty(e,"strings",{get:function(){return a.j2},enumerable:!0,configurable:!0}),Object.defineProperty(e,"cssClasses",{get:function(){return a.UX},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return a.KT},enumerable:!0,configurable:!0}),Object.defineProperty(e,"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(){},removeClassForElementIndex:function(){},setAttributeForElementIndex:function(){},setCheckedCheckboxOrRadioAtIndex:function(){},setTabIndexForListItemChildren:function(){},getPrimaryTextAtIndex:function(){return""}}},enumerable:!0,configurable:!0}),e.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()))},e.prototype.setWrapFocus=function(t){this.wrapFocus_=t},e.prototype.setVerticalOrientation=function(t){this.isVertical_=t},e.prototype.setSingleSelection=function(t){this.isSingleSelectionList_=t,t&&this.maybeInitializeSingleSelection()},e.prototype.maybeInitializeSingleSelection=function(){for(var t=0;t<this.adapter.getListItemCount();t++){var e=this.adapter.listItemAtIndexHasClass(t,a.UX.LIST_ITEM_SELECTED_CLASS),n=this.adapter.listItemAtIndexHasClass(t,a.UX.LIST_ITEM_ACTIVATED_CLASS);if(e||n){n&&this.setUseActivatedClass(!0),this.isSingleSelectionList_=!0,this.selectedIndex_=t;return}}},e.prototype.setHasTypeahead=function(t){this.hasTypeahead=t,t&&(this.sortedIndexByFirstChar=this.typeaheadInitSortedIndex())},e.prototype.isTypeaheadInProgress=function(){return this.hasTypeahead&&f(this.typeaheadState)},e.prototype.setUseActivatedClass=function(t){this.useActivatedClass_=t},e.prototype.setUseSelectedAttribute=function(t){this.useSelectedAttr_=t},e.prototype.getSelectedIndex=function(){return this.selectedIndex_},e.prototype.setSelectedIndex=function(t){this.isIndexValid_(t)&&(this.isCheckboxList_?this.setCheckboxAtIndex_(t):this.isRadioList_?this.setRadioAtIndex_(t):this.setSingleSelectionAtIndex_(t))},e.prototype.handleFocusIn=function(t,e){e>=0&&(this.focusedItemIndex=e,this.adapter.setAttributeForElementIndex(e,"tabindex","0"),this.adapter.setTabIndexForListItemChildren(e,"0"))},e.prototype.handleFocusOut=function(t,e){var n=this;e>=0&&(this.adapter.setAttributeForElementIndex(e,"tabindex","-1"),this.adapter.setTabIndexForListItemChildren(e,"-1")),setTimeout(function(){n.adapter.isFocusInsideList()||n.setTabindexToFirstSelectedOrFocusedItem()},0)},e.prototype.handleKeydown=function(t,e,n){var i=this,r="ArrowLeft"===(0,o.ku)(t),l="ArrowUp"===(0,o.ku)(t),d="ArrowRight"===(0,o.ku)(t),s="ArrowDown"===(0,o.ku)(t),m="Home"===(0,o.ku)(t),p="End"===(0,o.ku)(t),u="Enter"===(0,o.ku)(t),f="Spacebar"===(0,o.ku)(t),h="A"===t.key||"a"===t.key;if(this.adapter.isRootFocused()){if(l||p?(t.preventDefault(),this.focusLastElement()):(s||m)&&(t.preventDefault(),this.focusFirstElement()),this.hasTypeahead){var b={event:t,focusItemAtIndex:function(t){i.focusItemAtIndex(t)},focusedItemIndex:-1,isTargetListItem:e,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(t){return i.adapter.listItemAtIndexHasClass(t,a.UX.LIST_ITEM_DISABLED_CLASS)}};g(b,this.typeaheadState)}return}var _=this.adapter.getFocusedElementIndex();if(-1!==_||!((_=n)<0)){if(this.isVertical_&&s||!this.isVertical_&&d)c(t),this.focusNextElement(_);else if(this.isVertical_&&l||!this.isVertical_&&r)c(t),this.focusPrevElement(_);else if(m)c(t),this.focusFirstElement();else if(p)c(t),this.focusLastElement();else if(h&&t.ctrlKey&&this.isCheckboxList_)t.preventDefault(),this.toggleAll(this.selectedIndex_===a.KT.UNSET_INDEX?[]:this.selectedIndex_);else if((u||f)&&e){var v=t.target;if(v&&"A"===v.tagName&&u||(c(t),this.adapter.listItemAtIndexHasClass(_,a.UX.LIST_ITEM_DISABLED_CLASS)))return;this.isTypeaheadInProgress()||(this.isSelectableList_()&&this.setSelectedIndexOnAction_(_),this.adapter.notifyAction(_))}if(this.hasTypeahead){var b={event:t,focusItemAtIndex:function(t){i.focusItemAtIndex(t)},focusedItemIndex:this.focusedItemIndex,isTargetListItem:e,sortedIndexByFirstChar:this.sortedIndexByFirstChar,isItemAtIndexDisabled:function(t){return i.adapter.listItemAtIndexHasClass(t,a.UX.LIST_ITEM_DISABLED_CLASS)}};g(b,this.typeaheadState)}}},e.prototype.handleClick=function(t,e){t!==a.KT.UNSET_INDEX&&(this.adapter.listItemAtIndexHasClass(t,a.UX.LIST_ITEM_DISABLED_CLASS)||(this.isSelectableList_()&&this.setSelectedIndexOnAction_(t,e),this.adapter.notifyAction(t)))},e.prototype.focusNextElement=function(t){var e=this.adapter.getListItemCount(),n=t+1;if(n>=e)if(!this.wrapFocus_)return t;else n=0;return this.focusItemAtIndex(n),n},e.prototype.focusPrevElement=function(t){var e=t-1;if(e<0)if(!this.wrapFocus_)return t;else e=this.adapter.getListItemCount()-1;return this.focusItemAtIndex(e),e},e.prototype.focusFirstElement=function(){return this.focusItemAtIndex(0),0},e.prototype.focusLastElement=function(){var t=this.adapter.getListItemCount()-1;return this.focusItemAtIndex(t),t},e.prototype.focusInitialElement=function(){var t=this.getFirstSelectedOrFocusedItemIndex();return this.focusItemAtIndex(t),t},e.prototype.setEnabled=function(t,e){this.isIndexValid_(t)&&(e?(this.adapter.removeClassForElementIndex(t,a.UX.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(t,a.j2.ARIA_DISABLED,"false")):(this.adapter.addClassForElementIndex(t,a.UX.LIST_ITEM_DISABLED_CLASS),this.adapter.setAttributeForElementIndex(t,a.j2.ARIA_DISABLED,"true")))},e.prototype.setSingleSelectionAtIndex_=function(t){if(this.selectedIndex_!==t){var e=a.UX.LIST_ITEM_SELECTED_CLASS;this.useActivatedClass_&&(e=a.UX.LIST_ITEM_ACTIVATED_CLASS),this.selectedIndex_!==a.KT.UNSET_INDEX&&this.adapter.removeClassForElementIndex(this.selectedIndex_,e),this.setAriaForSingleSelectionAtIndex_(t),this.setTabindexAtIndex(t),t!==a.KT.UNSET_INDEX&&this.adapter.addClassForElementIndex(t,e),this.selectedIndex_=t}},e.prototype.setAriaForSingleSelectionAtIndex_=function(t){this.selectedIndex_===a.KT.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter.getAttributeForElementIndex(t,a.j2.ARIA_CURRENT));var e=null!==this.ariaCurrentAttrValue_,n=e?a.j2.ARIA_CURRENT:a.j2.ARIA_SELECTED;if(this.selectedIndex_!==a.KT.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex_,n,"false"),t!==a.KT.UNSET_INDEX){var i=e?this.ariaCurrentAttrValue_:"true";this.adapter.setAttributeForElementIndex(t,n,i)}},e.prototype.getSelectionAttribute=function(){return this.useSelectedAttr_?a.j2.ARIA_SELECTED:a.j2.ARIA_CHECKED},e.prototype.setRadioAtIndex_=function(t){var e=this.getSelectionAttribute();this.adapter.setCheckedCheckboxOrRadioAtIndex(t,!0),this.selectedIndex_!==a.KT.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex_,e,"false"),this.adapter.setAttributeForElementIndex(t,e,"true"),this.selectedIndex_=t},e.prototype.setCheckboxAtIndex_=function(t){for(var e=this.getSelectionAttribute(),n=0;n<this.adapter.getListItemCount();n++){var i=!1;t.indexOf(n)>=0&&(i=!0),this.adapter.setCheckedCheckboxOrRadioAtIndex(n,i),this.adapter.setAttributeForElementIndex(n,e,i?"true":"false")}this.selectedIndex_=t},e.prototype.setTabindexAtIndex=function(t){this.focusedItemIndex===a.KT.UNSET_INDEX&&0!==t?this.adapter.setAttributeForElementIndex(0,"tabindex","-1"):this.focusedItemIndex>=0&&this.focusedItemIndex!==t&&this.adapter.setAttributeForElementIndex(this.focusedItemIndex,"tabindex","-1"),this.selectedIndex_ instanceof Array||this.selectedIndex_===t||this.adapter.setAttributeForElementIndex(this.selectedIndex_,"tabindex","-1"),t!==a.KT.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(t,"tabindex","0")},e.prototype.isSelectableList_=function(){return this.isSingleSelectionList_||this.isCheckboxList_||this.isRadioList_},e.prototype.setTabindexToFirstSelectedOrFocusedItem=function(){var t=this.getFirstSelectedOrFocusedItemIndex();this.setTabindexAtIndex(t)},e.prototype.getFirstSelectedOrFocusedItemIndex=function(){var t=this.focusedItemIndex>=0?this.focusedItemIndex:0;return this.isSelectableList_()&&("number"==typeof this.selectedIndex_&&this.selectedIndex_!==a.KT.UNSET_INDEX?t=this.selectedIndex_:b(this.selectedIndex_)&&this.selectedIndex_.length>0&&(t=this.selectedIndex_.reduce(function(t,e){return Math.min(t,e)}))),t},e.prototype.isIndexValid_=function(t){var e=this;if(t instanceof Array){if(!this.isCheckboxList_)throw Error("MDCListFoundation: Array of index is only supported for checkbox based list");return 0===t.length||t.some(function(t){return e.isIndexInRange_(t)})}if("number"!=typeof t)return!1;if(this.isCheckboxList_)throw Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+t);return this.isIndexInRange_(t)||this.isSingleSelectionList_&&t===a.KT.UNSET_INDEX},e.prototype.isIndexInRange_=function(t){var e=this.adapter.getListItemCount();return t>=0&&t<e},e.prototype.setSelectedIndexOnAction_=function(t,e){void 0===e&&(e=!0),this.isCheckboxList_?this.toggleCheckboxAtIndex_(t,e):this.setSelectedIndex(t)},e.prototype.toggleCheckboxAtIndex_=function(t,e){var n=this.getSelectionAttribute(),i=this.adapter.isCheckboxCheckedAtIndex(t);e&&(i=!i,this.adapter.setCheckedCheckboxOrRadioAtIndex(t,i)),this.adapter.setAttributeForElementIndex(t,n,i?"true":"false");var r=this.selectedIndex_===a.KT.UNSET_INDEX?[]:this.selectedIndex_.slice();i?r.push(t):r=r.filter(function(e){return e!==t}),this.selectedIndex_=r},e.prototype.focusItemAtIndex=function(t){this.adapter.focusItemAtIndex(t),this.focusedItemIndex=t},e.prototype.toggleAll=function(t){var e=this.adapter.getListItemCount();if(t.length===e)this.setCheckboxAtIndex_([]);else{for(var n=[],i=0;i<e;i++)(!this.adapter.listItemAtIndexHasClass(i,a.UX.LIST_ITEM_DISABLED_CLASS)||t.indexOf(i)>-1)&&n.push(i);this.setCheckboxAtIndex_(n)}},e.prototype.typeaheadMatchItem=function(t,e,n){var i=this;return void 0===n&&(n=!1),m({focusItemAtIndex:function(t){i.focusItemAtIndex(t)},focusedItemIndex:e||this.focusedItemIndex,nextChar:t,sortedIndexByFirstChar:this.sortedIndexByFirstChar,skipFocus:n,isItemAtIndexDisabled:function(t){return i.adapter.listItemAtIndexHasClass(t,a.UX.LIST_ITEM_DISABLED_CLASS)}},this.typeaheadState)},e.prototype.typeaheadInitSortedIndex=function(){return s(this.adapter.getListItemCount(),this.adapter.getPrimaryTextAtIndex)},e.prototype.clearTypeaheadBuffer=function(){h(this.typeaheadState)},e}(r.K)},2093:function(t,e,n){"use strict";n.d(e,{ZT:()=>r,pi:()=>o});var i=function(t,e){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)}},1124:function(t,e,n){"use strict";n.d(e,{HX:()=>i,KT:()=>l,Ns:()=>r,UX:()=>o,j2:()=>a});var i,r,o={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},a={CLOSED_EVENT:"MDCMenuSurface:closed",OPENED_EVENT:"MDCMenuSurface:opened",FOCUSABLE_ELEMENTS:'button:not(:disabled), [href]:not([aria-disabled="true"]), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'},l={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67};!function(t){t[t.BOTTOM=1]="BOTTOM",t[t.CENTER=2]="CENTER",t[t.RIGHT=4]="RIGHT",t[t.FLIP_RTL=8]="FLIP_RTL"}(i||(i={})),function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=4]="TOP_RIGHT",t[t.BOTTOM_LEFT=1]="BOTTOM_LEFT",t[t.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",t[t.TOP_START=8]="TOP_START",t[t.TOP_END=12]="TOP_END",t[t.BOTTOM_START=9]="BOTTOM_START",t[t.BOTTOM_END=13]="BOTTOM_END"}(r||(r={}))},4266:function(t,e,n){"use strict";n.d(e,{g:()=>k});var i,r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function o(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var a=function(){return(a=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},l=n(1872),c=n(2584),d=n(2326),s=n(3164),m=n(7066),p=function(t,e){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function u(t,e){function n(){this.constructor=t}p(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var f=function(){return(f=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function h(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],i=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}var g=n(1124),b=n(4327),_=function(t){function e(n){var i=t.call(this,f(f({},e.defaultAdapter),n))||this;return i.isSurfaceOpen=!1,i.isQuickOpen=!1,i.isHoistedElement=!1,i.isFixedPosition=!1,i.openAnimationEndTimerId=0,i.closeAnimationEndTimerId=0,i.animationRequestId=0,i.anchorCorner=g.Ns.TOP_START,i.originCorner=g.Ns.TOP_START,i.anchorMargin={top:0,right:0,bottom:0,left:0},i.position={x:0,y:0},i}return u(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return g.UX},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return g.j2},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return g.KT},enumerable:!0,configurable:!0}),Object.defineProperty(e,"Corner",{get:function(){return g.Ns},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyOpen:function(){}}},enumerable:!0,configurable:!0}),e.prototype.init=function(){var t=e.cssClasses,n=t.ROOT,i=t.OPEN;if(!this.adapter.hasClass(n))throw Error(n+" class required in root element.");this.adapter.hasClass(i)&&(this.isSurfaceOpen=!0)},e.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},e.prototype.setAnchorCorner=function(t){this.anchorCorner=t},e.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^g.HX.RIGHT},e.prototype.setAnchorMargin=function(t){this.anchorMargin.top=t.top||0,this.anchorMargin.right=t.right||0,this.anchorMargin.bottom=t.bottom||0,this.anchorMargin.left=t.left||0},e.prototype.setIsHoisted=function(t){this.isHoistedElement=t},e.prototype.setFixedPosition=function(t){this.isFixedPosition=t},e.prototype.setAbsolutePosition=function(t,e){this.position.x=this.isFinite(t)?t:0,this.position.y=this.isFinite(e)?e:0},e.prototype.setQuickOpen=function(t){this.isQuickOpen=t},e.prototype.isOpen=function(){return this.isSurfaceOpen},e.prototype.open=function(){var t=this;this.isSurfaceOpen||(this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(e.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(e.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame(function(){t.adapter.addClass(e.cssClasses.OPEN),t.dimensions=t.adapter.getInnerDimensions(),t.autoposition(),t.openAnimationEndTimerId=setTimeout(function(){t.openAnimationEndTimerId=0,t.adapter.removeClass(e.cssClasses.ANIMATING_OPEN),t.adapter.notifyOpen()},g.KT.TRANSITION_OPEN_DURATION)}),this.isSurfaceOpen=!0))},e.prototype.close=function(t){var n=this;void 0===t&&(t=!1),this.isSurfaceOpen&&(this.isQuickOpen?(this.isSurfaceOpen=!1,t||this.maybeRestoreFocus(),this.adapter.removeClass(e.cssClasses.OPEN),this.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),this.adapter.notifyClose()):(this.adapter.addClass(e.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){n.adapter.removeClass(e.cssClasses.OPEN),n.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),n.closeAnimationEndTimerId=setTimeout(function(){n.closeAnimationEndTimerId=0,n.adapter.removeClass(e.cssClasses.ANIMATING_CLOSED),n.adapter.notifyClose()},g.KT.TRANSITION_CLOSE_DURATION)}),this.isSurfaceOpen=!1,t||this.maybeRestoreFocus()))},e.prototype.handleBodyClick=function(t){var e=t.target;this.adapter.isElementInContainer(e)||this.close()},e.prototype.handleKeydown=function(t){var e=t.keyCode;("Escape"===t.key||27===e)&&this.close()},e.prototype.autoposition=function(){this.measurements=this.getAutoLayoutmeasurements();var t,n=this.getoriginCorner(),i=this.getMenuSurfaceMaxHeight(n),r=this.hasBit(n,g.HX.BOTTOM)?"bottom":"top",o=this.hasBit(n,g.HX.RIGHT)?"right":"left",a=this.getHorizontalOriginOffset(n),l=this.getVerticalOriginOffset(n),c=this.measurements,d=c.anchorSize,s=c.surfaceSize,m=((t={})[o]=a,t[r]=l,t);d.width/s.width>g.KT.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(o="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(m),this.adapter.setTransformOrigin(o+" "+r),this.adapter.setPosition(m),this.adapter.setMaxHeight(i?i+"px":""),this.hasBit(n,g.HX.BOTTOM)||this.adapter.addClass(e.cssClasses.IS_OPEN_BELOW)},e.prototype.getAutoLayoutmeasurements=function(){var t=this.adapter.getAnchorDimensions(),e=this.adapter.getBodyDimensions(),n=this.adapter.getWindowDimensions(),i=this.adapter.getWindowScroll();return t||(t={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:t,bodySize:e,surfaceSize:this.dimensions,viewportDistance:{top:t.top,right:n.width-t.right,bottom:n.height-t.bottom,left:t.left},viewportSize:n,windowScroll:i}},e.prototype.getoriginCorner=function(){var t,n,i,r,o=this.originCorner,a=this.measurements,l=a.viewportDistance,c=a.anchorSize,d=a.surfaceSize,s=e.numbers.MARGIN_TO_EDGE;this.hasBit(this.anchorCorner,g.HX.BOTTOM)?(t=l.top-s+c.height+this.anchorMargin.bottom,n=l.bottom-s-this.anchorMargin.bottom):(t=l.top-s+this.anchorMargin.top,n=l.bottom-s+c.height-this.anchorMargin.top),!(n-d.height>0)&&t>=n&&(o=this.setBit(o,g.HX.BOTTOM));var m=this.adapter.isRtl(),p=this.hasBit(this.anchorCorner,g.HX.FLIP_RTL),u=this.hasBit(this.anchorCorner,g.HX.RIGHT)||this.hasBit(o,g.HX.RIGHT),f=!1;(f=m&&p?!u:u)?(i=l.left+c.width+this.anchorMargin.right,r=l.right-this.anchorMargin.right):(i=l.left+this.anchorMargin.left,r=l.right+c.width-this.anchorMargin.left);var h=i-d.width>0,b=r-d.width>0,_=this.hasBit(o,g.HX.FLIP_RTL)&&this.hasBit(o,g.HX.RIGHT);return b&&_&&m||!h&&_?o=this.unsetBit(o,g.HX.RIGHT):(h&&f&&m||h&&!f&&u||!b&&i>=r)&&(o=this.setBit(o,g.HX.RIGHT)),o},e.prototype.getMenuSurfaceMaxHeight=function(t){var n=this.measurements.viewportDistance,i=0,r=this.hasBit(t,g.HX.BOTTOM),o=this.hasBit(this.anchorCorner,g.HX.BOTTOM),a=e.numbers.MARGIN_TO_EDGE;return r?(i=n.top+this.anchorMargin.top-a,o||(i+=this.measurements.anchorSize.height)):(i=n.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-a,o&&(i-=this.measurements.anchorSize.height)),i},e.prototype.getHorizontalOriginOffset=function(t){var e=this.measurements.anchorSize,n=this.hasBit(t,g.HX.RIGHT),i=this.hasBit(this.anchorCorner,g.HX.RIGHT);if(n){var r=i?e.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?r-(this.measurements.viewportSize.width-this.measurements.bodySize.width):r}return i?e.width-this.anchorMargin.right:this.anchorMargin.left},e.prototype.getVerticalOriginOffset=function(t){var e=this.measurements.anchorSize,n=this.hasBit(t,g.HX.BOTTOM),i=this.hasBit(this.anchorCorner,g.HX.BOTTOM),r=0;return n?i?e.height-this.anchorMargin.top:-this.anchorMargin.bottom:i?e.height+this.anchorMargin.bottom:this.anchorMargin.top},e.prototype.adjustPositionForHoistedElement=function(t){var e,n,i=this.measurements,r=i.windowScroll,o=i.viewportDistance,a=Object.keys(t);try{for(var l=h(a),c=l.next();!c.done;c=l.next()){var d=c.value,s=t[d]||0;s+=o[d],this.isFixedPosition||("top"===d?s+=r.y:"bottom"===d?s-=r.y:"left"===d?s+=r.x:s-=r.x),t[d]=s}}catch(t){e={error:t}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(e)throw e.error}}},e.prototype.maybeRestoreFocus=function(){var t=this.adapter.isFocused(),e=document.activeElement&&this.adapter.isElementInContainer(document.activeElement);(t||e)&&this.adapter.restoreFocus()},e.prototype.hasBit=function(t,e){return!!(t&e)},e.prototype.setBit=function(t,e){return t|e},e.prototype.unsetBit=function(t,e){return t^e},e.prototype.isFinite=function(t){return"number"==typeof t&&isFinite(t)},e}(b.K);function v(t,e){return void 0===e&&(e=!1),(void 0===i||e)&&(i="transform"in t.document.createElement("div").style?"transform":"webkitTransform"),i}var y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialSyncWithDOM=function(){var t=this,e=this.root.parentElement;this.anchorElement=e&&e.classList.contains(g.UX.ANCHOR)?e:null,this.root.classList.contains(g.UX.FIXED)&&this.setFixedPosition(!0),this.handleKeydown=function(e){t.foundation.handleKeydown(e)},this.handleBodyClick=function(e){t.foundation.handleBodyClick(e)},this.registerBodyClickListener=function(){document.body.addEventListener("click",t.handleBodyClick,{capture:!0})},this.deregisterBodyClickListener=function(){document.body.removeEventListener("click",t.handleBodyClick,{capture:!0})},this.listen("keydown",this.handleKeydown),this.listen(g.j2.OPENED_EVENT,this.registerBodyClickListener),this.listen(g.j2.CLOSED_EVENT,this.deregisterBodyClickListener)},e.prototype.destroy=function(){this.unlisten("keydown",this.handleKeydown),this.unlisten(g.j2.OPENED_EVENT,this.registerBodyClickListener),this.unlisten(g.j2.CLOSED_EVENT,this.deregisterBodyClickListener),t.prototype.destroy.call(this)},e.prototype.isOpen=function(){return this.foundation.isOpen()},e.prototype.open=function(){this.foundation.open()},e.prototype.close=function(t){void 0===t&&(t=!1),this.foundation.close(t)},Object.defineProperty(e.prototype,"quickOpen",{set:function(t){this.foundation.setQuickOpen(t)},enumerable:!0,configurable:!0}),e.prototype.setIsHoisted=function(t){this.foundation.setIsHoisted(t)},e.prototype.setMenuSurfaceAnchorElement=function(t){this.anchorElement=t},e.prototype.setFixedPosition=function(t){t?this.root.classList.add(g.UX.FIXED):this.root.classList.remove(g.UX.FIXED),this.foundation.setFixedPosition(t)},e.prototype.setAbsolutePosition=function(t,e){this.foundation.setAbsolutePosition(t,e),this.setIsHoisted(!0)},e.prototype.setAnchorCorner=function(t){this.foundation.setAnchorCorner(t)},e.prototype.setAnchorMargin=function(t){this.foundation.setAnchorMargin(t)},e.prototype.getDefaultFoundation=function(){var t=this,e={addClass:function(e){return t.root.classList.add(e)},removeClass:function(e){return t.root.classList.remove(e)},hasClass:function(e){return t.root.classList.contains(e)},hasAnchor:function(){return!!t.anchorElement},notifyClose:function(){return t.emit(_.strings.CLOSED_EVENT,{})},notifyOpen:function(){return t.emit(_.strings.OPENED_EVENT,{})},isElementInContainer:function(e){return t.root.contains(e)},isRtl:function(){return"rtl"===getComputedStyle(t.root).getPropertyValue("direction")},setTransformOrigin:function(e){var n=v(window)+"-origin";t.root.style.setProperty(n,e)},isFocused:function(){return document.activeElement===t.root},saveFocus:function(){t.previousFocus=document.activeElement},restoreFocus:function(){t.root.contains(document.activeElement)&&t.previousFocus&&t.previousFocus.focus&&t.previousFocus.focus()},getInnerDimensions:function(){return{width:t.root.offsetWidth,height:t.root.offsetHeight}},getAnchorDimensions:function(){return t.anchorElement?t.anchorElement.getBoundingClientRect():null},getWindowDimensions:function(){return{width:window.innerWidth,height:window.innerHeight}},getBodyDimensions:function(){return{width:document.body.clientWidth,height:document.body.clientHeight}},getWindowScroll:function(){return{x:window.pageXOffset,y:window.pageYOffset}},setPosition:function(e){var n=t.root;n.style.left="left"in e?e.left+"px":"",n.style.right="right"in e?e.right+"px":"",n.style.top="top"in e?e.top+"px":"",n.style.bottom="bottom"in e?e.bottom+"px":""},setMaxHeight:function(e){t.root.style.maxHeight=e}};return new _(e)},e}(l.B),x=n(7838),w=function(t){function e(n){var i=t.call(this,a(a({},e.defaultAdapter),n))||this;return i.closeAnimationEndTimerId_=0,i.defaultFocusState_=x.yM.LIST_ROOT,i}return o(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return x.UX},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return x.j2},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return x.KT},enumerable:!0,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return -1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return -1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this.closeAnimationEndTimerId_&&clearTimeout(this.closeAnimationEndTimerId_),this.adapter.closeSurface()},e.prototype.handleKeydown=function(t){var e=t.key,n=t.keyCode;("Tab"===e||9===n)&&this.adapter.closeSurface(!0)},e.prototype.handleItemAction=function(t){var e=this,n=this.adapter.getElementIndex(t);n<0||(this.adapter.notifySelected({index:n}),this.adapter.closeSurface(),this.closeAnimationEndTimerId_=setTimeout(function(){var n=e.adapter.getElementIndex(t);n>=0&&e.adapter.isSelectableItemAtIndex(n)&&e.setSelectedIndex(n)},_.numbers.TRANSITION_CLOSE_DURATION))},e.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState_){case x.yM.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case x.yM.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case x.yM.NONE:break;default:this.adapter.focusListRoot()}},e.prototype.setDefaultFocusState=function(t){this.defaultFocusState_=t},e.prototype.setSelectedIndex=function(t){if(this.validatedIndex_(t),!this.adapter.isSelectableItemAtIndex(t))throw Error("MDCMenuFoundation: No selection group at specified index.");var e=this.adapter.getSelectedSiblingOfItemAtIndex(t);e>=0&&(this.adapter.removeAttributeFromElementAtIndex(e,x.j2.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(e,x.UX.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(t,x.UX.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(t,x.j2.ARIA_CHECKED_ATTR,"true")},e.prototype.setEnabled=function(t,e){this.validatedIndex_(t),e?(this.adapter.removeClassFromElementAtIndex(t,s.UX.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,x.j2.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(t,s.UX.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,x.j2.ARIA_DISABLED_ATTR,"true"))},e.prototype.validatedIndex_=function(t){var e=this.adapter.getMenuItemCount();if(!(t>=0&&t<e))throw Error("MDCMenuFoundation: No list item at specified index.")},e}(b.K),k=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.attachTo=function(t){return new e(t)},e.prototype.initialize=function(t,e){void 0===t&&(t=function(t){return new y(t)}),void 0===e&&(e=function(t){return new d.e(t)}),this.menuSurfaceFactory_=t,this.listFactory_=e},e.prototype.initialSyncWithDOM=function(){var t=this;this.menuSurface_=this.menuSurfaceFactory_(this.root);var e=this.root.querySelector(x.j2.LIST_SELECTOR);e?(this.list_=this.listFactory_(e),this.list_.wrapFocus=!0):this.list_=null,this.handleKeydown_=function(e){return t.foundation.handleKeydown(e)},this.handleItemAction_=function(e){return t.foundation.handleItemAction(t.items[e.detail.index])},this.handleMenuSurfaceOpened_=function(){return t.foundation.handleMenuSurfaceOpened()},this.menuSurface_.listen(_.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.listen("keydown",this.handleKeydown_),this.listen(m.I.strings.ACTION_EVENT,this.handleItemAction_)},e.prototype.destroy=function(){this.list_&&this.list_.destroy(),this.menuSurface_.destroy(),this.menuSurface_.unlisten(_.strings.OPENED_EVENT,this.handleMenuSurfaceOpened_),this.unlisten("keydown",this.handleKeydown_),this.unlisten(m.I.strings.ACTION_EVENT,this.handleItemAction_),t.prototype.destroy.call(this)},Object.defineProperty(e.prototype,"open",{get:function(){return this.menuSurface_.isOpen()},set:function(t){t?this.menuSurface_.open():this.menuSurface_.close()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"wrapFocus",{get:function(){return!!this.list_&&this.list_.wrapFocus},set:function(t){this.list_&&(this.list_.wrapFocus=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasTypeahead",{set:function(t){this.list_&&(this.list_.hasTypeahead=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"typeaheadInProgress",{get:function(){return!!this.list_&&this.list_.typeaheadInProgress},enumerable:!0,configurable:!0}),e.prototype.typeaheadMatchItem=function(t,e){return this.list_?this.list_.typeaheadMatchItem(t,e):-1},e.prototype.layout=function(){this.list_&&this.list_.layout()},Object.defineProperty(e.prototype,"items",{get:function(){return this.list_?this.list_.listElements:[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"singleSelection",{set:function(t){this.list_&&(this.list_.singleSelection=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selectedIndex",{get:function(){return this.list_?this.list_.selectedIndex:s.KT.UNSET_INDEX},set:function(t){this.list_&&(this.list_.selectedIndex=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"quickOpen",{set:function(t){this.menuSurface_.quickOpen=t},enumerable:!0,configurable:!0}),e.prototype.setDefaultFocusState=function(t){this.foundation.setDefaultFocusState(t)},e.prototype.setAnchorCorner=function(t){this.menuSurface_.setAnchorCorner(t)},e.prototype.setAnchorMargin=function(t){this.menuSurface_.setAnchorMargin(t)},e.prototype.setSelectedIndex=function(t){this.foundation.setSelectedIndex(t)},e.prototype.setEnabled=function(t,e){this.foundation.setEnabled(t,e)},e.prototype.getOptionByIndex=function(t){return t<this.items.length?this.items[t]:null},e.prototype.getPrimaryTextAtIndex=function(t){var e=this.getOptionByIndex(t);return e&&this.list_&&this.list_.getPrimaryText(e)||""},e.prototype.setFixedPosition=function(t){this.menuSurface_.setFixedPosition(t)},e.prototype.setIsHoisted=function(t){this.menuSurface_.setIsHoisted(t)},e.prototype.setAbsolutePosition=function(t,e){this.menuSurface_.setAbsolutePosition(t,e)},e.prototype.setAnchorElement=function(t){this.menuSurface_.anchorElement=t},e.prototype.getDefaultFoundation=function(){var t=this;return new w({addClassToElementAtIndex:function(e,n){t.items[e].classList.add(n)},removeClassFromElementAtIndex:function(e,n){t.items[e].classList.remove(n)},addAttributeToElementAtIndex:function(e,n,i){t.items[e].setAttribute(n,i)},removeAttributeFromElementAtIndex:function(e,n){t.items[e].removeAttribute(n)},elementContainsClass:function(t,e){return t.classList.contains(e)},closeSurface:function(e){return t.menuSurface_.close(e)},getElementIndex:function(e){return t.items.indexOf(e)},notifySelected:function(e){return t.emit(x.j2.SELECTED_EVENT,{index:e.index,item:t.items[e.index]})},getMenuItemCount:function(){return t.items.length},focusItemAtIndex:function(e){return t.items[e].focus()},focusListRoot:function(){return t.root.querySelector(x.j2.LIST_SELECTOR).focus()},isSelectableItemAtIndex:function(e){return!!(0,c.oq)(t.items[e],"."+x.UX.MENU_SELECTION_GROUP)},getSelectedSiblingOfItemAtIndex:function(e){var n=(0,c.oq)(t.items[e],"."+x.UX.MENU_SELECTION_GROUP).querySelector("."+x.UX.MENU_SELECTED_LIST_ITEM);return n?t.items.indexOf(n):-1}})},e}(l.B)},7838:function(t,e,n){"use strict";n.d(e,{KT:()=>a,UX:()=>r,j2:()=>o,yM:()=>i});var i,r={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},o={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list",SELECTED_EVENT:"MDCMenu:selected"},a={FOCUS_ROOT_INDEX:-1};!function(t){t[t.NONE=0]="NONE",t[t.LIST_ROOT=1]="LIST_ROOT",t[t.FIRST_ITEM=2]="FIRST_ITEM",t[t.LAST_ITEM=3]="LAST_ITEM"}(i||(i={}))},6645:function(t,e,n){"use strict";n.d(e,{F:()=>d});var i=n(4322),r=n(1872),o=n(9364),a=n(2584),l=n(1883),c=n(5749),d=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.disabled=!1,e}return(0,i.ZT)(e,t),e.attachTo=function(t,n){void 0===n&&(n={isUnbounded:void 0});var i=new e(t);return void 0!==n.isUnbounded&&(i.unbounded=n.isUnbounded),i},e.createAdapter=function(t){return{addClass:function(e){return t.root.classList.add(e)},browserSupportsCssVars:function(){return c.x(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,(0,o.K)())},deregisterInteractionHandler:function(e,n){return t.root.removeEventListener(e,n,(0,o.K)())},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return(0,a.wB)(t.root,":active")},isSurfaceDisabled:function(){return!!t.disabled},isUnbounded:function(){return!!t.unbounded},registerDocumentInteractionHandler:function(t,e){return document.documentElement.addEventListener(t,e,(0,o.K)())},registerInteractionHandler:function(e,n){return t.root.addEventListener(e,n,(0,o.K)())},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!!this.unbounded_},set:function(t){this.unbounded_=!!t,this.setUnbounded_()},enumerable:!0,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 l.l(e.createAdapter(this))},e.prototype.initialSyncWithDOM=function(){var t=this.root;this.unbounded="mdcRippleIsUnbounded"in t.dataset},e.prototype.setUnbounded_=function(){this.foundation.setUnbounded(!!this.unbounded_)},e}(r.B)},1883:function(t,e,n){"use strict";n.d(e,{l:()=>p});var i=n(4322),r=n(4327),o={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"},a={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},c=n(5749),d=["touchstart","pointerdown","mousedown","keydown"],s=["touchend","pointerup","mouseup","contextmenu"],m=[],p=function(t){function e(n){var r=t.call(this,(0,i.pi)((0,i.pi)({},e.defaultAdapter),n))||this;return r.activationAnimationHasEnded_=!1,r.activationTimer_=0,r.fgDeactivationRemovalTimer_=0,r.fgScale_="0",r.frame_={width:0,height:0},r.initialSize_=0,r.layoutFrame_=0,r.maxRadius_=0,r.unboundedCoords_={left:0,top:0},r.activationState_=r.defaultActivationState_(),r.activationTimerCallback_=function(){r.activationAnimationHasEnded_=!0,r.runDeactivationUXLogicIfReady_()},r.activateHandler_=function(t){return r.activate_(t)},r.deactivateHandler_=function(){return r.deactivate_()},r.focusHandler_=function(){return r.handleFocus()},r.blurHandler_=function(){return r.handleBlur()},r.resizeHandler_=function(){return r.layout()},r}return(0,i.ZT)(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return o},enumerable:!0,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return a},enumerable:!0,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return l},enumerable:!0,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:!0,configurable:!0}),e.prototype.init=function(){var t=this,n=this.supportsPressRipple_();if(this.registerRootHandlers_(n),n){var i=e.cssClasses,r=i.ROOT,o=i.UNBOUNDED;requestAnimationFrame(function(){t.adapter.addClass(r),t.adapter.isUnbounded()&&(t.adapter.addClass(o),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,i=n.ROOT,r=n.UNBOUNDED;requestAnimationFrame(function(){t.adapter.removeClass(i),t.adapter.removeClass(r),t.removeCssVars_()})}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_()},e.prototype.activate=function(t){this.activate_(t)},e.prototype.deactivate=function(){this.deactivate_()},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=this;t&&(d.forEach(function(t){e.adapter.registerInteractionHandler(t,e.activateHandler_)}),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=this;"keydown"===t.type?this.adapter.registerInteractionHandler("keyup",this.deactivateHandler_):s.forEach(function(t){e.adapter.registerDocumentInteractionHandler(t,e.deactivateHandler_)})},e.prototype.deregisterRootHandlers_=function(){var t=this;d.forEach(function(e){t.adapter.deregisterInteractionHandler(e,t.activateHandler_)}),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=this;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler_),s.forEach(function(e){t.adapter.deregisterDocumentInteractionHandler(e,t.deactivateHandler_)})},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.activate_=function(t){var e=this;if(!this.adapter.isSurfaceDisabled()){var n=this.activationState_;if(!n.isActivated){var i=this.previousActivationEvent_;if(!(i&&void 0!==t&&i.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);var r=void 0!==t&&m.length>0&&m.some(function(t){return e.adapter.containsEventTarget(t)});if(r)return void this.resetActivationState_();void 0!==t&&(m.push(t.target),this.registerDeactivationHandlers_(t)),n.wasElementMadeActive=this.checkElementMadeActive_(t),n.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame(function(){m=[],!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,i=n.VAR_FG_TRANSLATE_START,r=n.VAR_FG_TRANSLATE_END,o=e.cssClasses,a=o.FG_DEACTIVATION,l=o.FG_ACTIVATION,c=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var d="",s="";if(!this.adapter.isUnbounded()){var m=this.getFgTranslationCoordinates_(),p=m.startPoint,u=m.endPoint;d=p.x+"px, "+p.y+"px",s=u.x+"px, "+u.y+"px"}this.adapter.updateCssVariable(i,d),this.adapter.updateCssVariable(r,s),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter.removeClass(a),this.adapter.computeBoundingRect(),this.adapter.addClass(l),this.activationTimer_=setTimeout(function(){return t.activationTimerCallback_()},c)},e.prototype.getFgTranslationCoordinates_=function(){var t,e=this.activationState_,n=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?(0,c.Y)(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,i=this.activationState_,r=i.hasDeactivationUXRun,o=i.isActivated;(r||!o)&&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.deactivate_=function(){var t=this,e=this.activationState_;if(e.isActivated){var n=(0,i.pi)({},e);e.isProgrammatic?(requestAnimationFrame(function(){return 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),i=function(){return Math.sqrt(Math.pow(t.frame_.width,2)+Math.pow(t.frame_.height,2))+e.numbers.PADDING};this.maxRadius_=this.adapter.isUnbounded()?n:i();var r=Math.floor(n*e.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&r%2!=0?this.initialSize_=r-1:this.initialSize_=r,this.fgScale_=""+this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()},e.prototype.updateLayoutCssVars_=function(){var t=e.strings,n=t.VAR_FG_SIZE,i=t.VAR_LEFT,r=t.VAR_TOP,o=t.VAR_FG_SCALE;this.adapter.updateCssVariable(n,this.initialSize_+"px"),this.adapter.updateCssVariable(o,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"))},e}(r.K)},4322:function(t,e,n){"use strict";n.d(e,{ZT:()=>r,pi:()=>o});var i=function(t,e){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)}},5749:function(t,e,n){"use strict";var i;function r(t,e){void 0===e&&(e=!1);var n=t.CSS,r=i;if("boolean"==typeof i&&!e)return i;if(!(n&&"function"==typeof n.supports))return!1;var o=n.supports("--css-vars","yes"),a=n.supports("(--css-vars: yes)")&&n.supports("color","#00000000");return r=o||a,e||(i=r),r}function o(t,e,n){if(!t)return{x:0,y:0};var i,r,o=e.x,a=e.y,l=o+n.left,c=a+n.top;if("touchstart"===t.type){var d=t;i=d.changedTouches[0].pageX-l,r=d.changedTouches[0].pageY-c}else{var s=t;i=s.pageX-l,r=s.pageY-c}return{x:i,y:r}}n.d(e,{Y:()=>o,x:()=>r})},7737:function(t,e,n){"use strict";var i=n(1528),r=n(3235),o=r(i("String.prototype.indexOf"));t.exports=function(t,e){var n=i(t,!!e);return"function"==typeof n&&o(t,".prototype.")>-1?r(n):n}},3235:function(t,e,n){"use strict";var i=n(7156),r=n(1528),o=n(1744),a=n(682),l=r("%Function.prototype.apply%"),c=r("%Function.prototype.call%"),d=r("%Reflect.apply%",!0)||i.call(c,l),s=r("%Object.defineProperty%",!0),m=r("%Math.max%");if(s)try{s({},"a",{value:1})}catch(t){s=null}t.exports=function(t){if("function"!=typeof t)throw new a("a function is required");var e=d(i,c,arguments);return o(e,1+m(0,t.length-(arguments.length-1)),!0)};var p=function(){return d(i,l,arguments)};s?s(t.exports,"apply",{value:p}):t.exports.apply=p},7892:function(t,e,n){"use strict";var i=n(2320)(),r=n(1528),o=i&&r("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch(t){o=!1}var a=n(4332),l=n(682),c=n(1455);t.exports=function(t,e,n){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new l("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new l("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new l("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new l("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new l("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new l("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,r=arguments.length>4?arguments[4]:null,d=arguments.length>5?arguments[5]:null,s=arguments.length>6&&arguments[6],m=!!c&&c(t,e);if(o)o(t,e,{configurable:null===d&&m?m.configurable:!d,enumerable:null===i&&m?m.enumerable:!i,value:n,writable:null===r&&m?m.writable:!r});else if(!s&&(i||r||d))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else t[e]=n}},5727:function(t){"use strict";t.exports=EvalError},4772:function(t){"use strict";t.exports=Error},511:function(t){"use strict";t.exports=RangeError},5912:function(t){"use strict";t.exports=ReferenceError},4332:function(t){"use strict";t.exports=SyntaxError},682:function(t){"use strict";t.exports=TypeError},4834:function(t){"use strict";t.exports=URIError},2521:function(t){"use strict";var e="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,i=Math.max,r="[object Function]",o=function(t,e){for(var n=[],i=0;i<t.length;i+=1)n[i]=t[i];for(var r=0;r<e.length;r+=1)n[r+t.length]=e[r];return n},a=function(t,e){for(var n=[],i=e||0,r=0;i<t.length;i+=1,r+=1)n[r]=t[i];return n},l=function(t,e){for(var n="",i=0;i<t.length;i+=1)n+=t[i],i+1<t.length&&(n+=e);return n};t.exports=function(t){var c,d=this;if("function"!=typeof d||n.apply(d)!==r)throw TypeError(e+d);for(var s=a(arguments,1),m=function(){if(this instanceof c){var e=d.apply(this,o(s,arguments));return Object(e)===e?e:this}return d.apply(t,o(s,arguments))},p=i(0,d.length-s.length),u=[],f=0;f<p;f++)u[f]="$"+f;if(c=Function("binder","return function ("+l(u,",")+"){ return binder.apply(this,arguments); }")(m),d.prototype){var h=function(){};h.prototype=d.prototype,c.prototype=new h,h.prototype=null}return c}},7156:function(t,e,n){"use strict";var i=n(2521);t.exports=Function.prototype.bind||i},1528:function(t,e,n){"use strict";var i,r=n(4772),o=n(5727),a=n(511),l=n(5912),c=n(4332),d=n(682),s=n(4834),m=Function,p=function(t){try{return m('"use strict"; return ('+t+").constructor;")()}catch(t){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(t){u=null}var f=function(){throw new d},h=u?function(){try{return arguments.callee,f}catch(t){try{return u(arguments,"callee").get}catch(t){return f}}}():f,g=n(465)(),b=n(1209)(),_=Object.getPrototypeOf||(b?function(t){return t.__proto__}:null),v={},y="undefined"!=typeof Uint8Array&&_?_(Uint8Array):i,x={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?i:ArrayBuffer,"%ArrayIteratorPrototype%":g&&_?_([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?i:Atomics,"%BigInt%":"undefined"==typeof BigInt?i:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?i:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?i:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":o,"%Float32Array%":"undefined"==typeof Float32Array?i:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?i:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?i:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?i:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?i:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&_?_(_([][Symbol.iterator]())):i,"%JSON%":"object"==typeof JSON?JSON:i,"%Map%":"undefined"==typeof Map?i:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&_?_(new Map()[Symbol.iterator]()):i,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?i:Promise,"%Proxy%":"undefined"==typeof Proxy?i:Proxy,"%RangeError%":a,"%ReferenceError%":l,"%Reflect%":"undefined"==typeof Reflect?i:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?i:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&_?_(new Set()[Symbol.iterator]()):i,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&_?_(""[Symbol.iterator]()):i,"%Symbol%":g?Symbol:i,"%SyntaxError%":c,"%ThrowTypeError%":h,"%TypedArray%":y,"%TypeError%":d,"%Uint8Array%":"undefined"==typeof Uint8Array?i:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?i:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?i:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?i:Uint32Array,"%URIError%":s,"%WeakMap%":"undefined"==typeof WeakMap?i:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?i:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?i:WeakSet};if(_)try{null.error}catch(t){var w=_(_(t));x["%Error.prototype%"]=w}var k=function t(e){var n;if("%AsyncFunction%"===e)n=p("async function () {}");else if("%GeneratorFunction%"===e)n=p("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=p("async function* () {}");else if("%AsyncGenerator%"===e){var i=t("%AsyncGeneratorFunction%");i&&(n=i.prototype)}else if("%AsyncIteratorPrototype%"===e){var r=t("%AsyncGenerator%");r&&_&&(n=_(r.prototype))}return x[e]=n,n},E={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},A=n(7156),T=n(5673),C=A.call(Function.call,Array.prototype.concat),I=A.call(Function.apply,Array.prototype.splice),S=A.call(Function.call,String.prototype.replace),O=A.call(Function.call,String.prototype.slice),L=A.call(Function.call,RegExp.prototype.exec),R=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,D=function(t){var e=O(t,0,1),n=O(t,-1);if("%"===e&&"%"!==n)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new c("invalid intrinsic syntax, expected opening `%`");var i=[];return S(t,R,function(t,e,n,r){i[i.length]=n?S(r,N,"$1"):e||t}),i},z=function(t,e){var n,i=t;if(T(E,i)&&(i="%"+(n=E[i])[0]+"%"),T(x,i)){var r=x[i];if(r===v&&(r=k(i)),void 0===r&&!e)throw new d("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:r}}throw new c("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new d("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new d('"allowMissing" argument must be a boolean');if(null===L(/^%?[^%]*%?$/,t))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=D(t),i=n.length>0?n[0]:"",r=z("%"+i+"%",e),o=r.name,a=r.value,l=!1,s=r.alias;s&&(i=s[0],I(n,C([0,1],s)));for(var m=1,p=!0;m<n.length;m+=1){var f=n[m],h=O(f,0,1),g=O(f,-1);if(('"'===h||"'"===h||"`"===h||'"'===g||"'"===g||"`"===g)&&h!==g)throw new c("property names with quotes must have matching quotes");if("constructor"!==f&&p||(l=!0),i+="."+f,T(x,o="%"+i+"%"))a=x[o];else if(null!=a){if(!(f in a)){if(!e)throw new d("base intrinsic for "+t+" exists, but the property is not available.");return}if(u&&m+1>=n.length){var b=u(a,f);a=(p=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:a[f]}else p=T(a,f),a=a[f];p&&!l&&(x[o]=a)}}return a}},1455:function(t,e,n){"use strict";var i=n(1528)("%Object.getOwnPropertyDescriptor%",!0);if(i)try{i([],"length")}catch(t){i=null}t.exports=i},2320:function(t,e,n){"use strict";var i=n(1528)("%Object.defineProperty%",!0),r=function(){if(i)try{return i({},"a",{value:1}),!0}catch(t){}return!1};r.hasArrayLengthDefineBug=function(){if(!r())return null;try{return 1!==i([],"length",{value:1}).length}catch(t){return!0}},t.exports=r},1209:function(t){"use strict";var e={foo:{}},n=Object;t.exports=function(){return({__proto__:e}).foo===e.foo&&!(({__proto__:null})instanceof n)}},465:function(t,e,n){"use strict";var i="undefined"!=typeof Symbol&&Symbol,r=n(6073);t.exports=function(){return"function"==typeof i&&"function"==typeof Symbol&&"symbol"==typeof i("foo")&&"symbol"==typeof Symbol("bar")&&r()}},6073:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e||"[object Symbol]"!==Object.prototype.toString.call(e)||"[object Symbol]"!==Object.prototype.toString.call(n))return!1;var i=42;for(e in t[e]=i,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(o.value!==i||!0!==o.enumerable)return!1}return!0}},5673:function(t,e,n){"use strict";var i=Function.prototype.call,r=Object.prototype.hasOwnProperty;t.exports=n(7156).call(i,r)},2490:function(t){"use strict";var e=String.prototype.replace,n=/%20/g,i="RFC3986";t.exports={default:i,formatters:{RFC1738:function(t){return e.call(t,n,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:i}},3348:function(t,e,n){"use strict";var i=n(7530),r=n(8429);t.exports={formats:n(2490),parse:r,stringify:i}},8429:function(t,e,n){"use strict";var i=n(3422),r=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:i.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},l=function(t){return t.replace(/&#(\d+);/g,function(t,e){return String.fromCharCode(parseInt(e,10))})},c=function(t,e){return t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},d="utf8=%26%2310003%3B",s="utf8=%E2%9C%93",m=function(t,e){var n={__proto__:null},m=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,p=e.parameterLimit===1/0?void 0:e.parameterLimit,u=m.split(e.delimiter,p),f=-1,h=e.charset;if(e.charsetSentinel)for(g=0;g<u.length;++g)0===u[g].indexOf("utf8=")&&(u[g]===s?h="utf-8":u[g]===d&&(h="iso-8859-1"),f=g,g=u.length);for(g=0;g<u.length;++g)if(g!==f){var g,b,_,v=u[g],y=v.indexOf("]="),x=-1===y?v.indexOf("="):y+1;-1===x?(b=e.decoder(v,a.decoder,h,"key"),_=e.strictNullHandling?null:""):(b=e.decoder(v.slice(0,x),a.decoder,h,"key"),_=i.maybeMap(c(v.slice(x+1),e),function(t){return e.decoder(t,a.decoder,h,"value")})),_&&e.interpretNumericEntities&&"iso-8859-1"===h&&(_=l(_)),v.indexOf("[]=")>-1&&(_=o(_)?[_]:_),r.call(n,b)?n[b]=i.combine(n[b],_):n[b]=_}return n},p=function(t,e,n,i){for(var r=i?e:c(e,n),o=t.length-1;o>=0;--o){var a,l=t[o];if("[]"===l&&n.parseArrays)a=[].concat(r);else{a=n.plainObjects?Object.create(null):{};var d="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,s=parseInt(d,10);n.parseArrays||""!==d?!isNaN(s)&&l!==d&&String(s)===d&&s>=0&&n.parseArrays&&s<=n.arrayLimit?(a=[])[s]=r:"__proto__"!==d&&(a[d]=r):a={0:r}}r=a}return r},u=function(t,e,n,i){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,c=n.depth>0&&a.exec(o),d=c?o.slice(0,c.index):o,s=[];if(d){if(!n.plainObjects&&r.call(Object.prototype,d)&&!n.allowPrototypes)return;s.push(d)}for(var m=0;n.depth>0&&null!==(c=l.exec(o))&&m<n.depth;){if(m+=1,!n.plainObjects&&r.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;s.push(c[1])}return c&&s.push("["+o.slice(c.index)+"]"),p(s,e,n,i)}},f=function(t){if(!t)return a;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?a.charset:t.charset;return{allowDots:void 0===t.allowDots?a.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:a.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:a.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:a.comma,decoder:"function"==typeof t.decoder?t.decoder:a.decoder,delimiter:"string"==typeof t.delimiter||i.isRegExp(t.delimiter)?t.delimiter:a.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:a.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:a.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:a.strictNullHandling}};t.exports=function(t,e){var n=f(e);if(""===t||null==t)return n.plainObjects?Object.create(null):{};for(var r="string"==typeof t?m(t,n):t,o=n.plainObjects?Object.create(null):{},a=Object.keys(r),l=0;l<a.length;++l){var c=a[l],d=u(c,r[c],n,"string"==typeof t);o=i.merge(o,d,n)}return!0===n.allowSparse?o:i.compact(o)}},7530:function(t,e,n){"use strict";var i=n(2538),r=n(3422),o=n(2490),a=Object.prototype.hasOwnProperty,l={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},c=Array.isArray,d=Array.prototype.push,s=function(t,e){d.apply(t,c(e)?e:[e])},m=Date.prototype.toISOString,p=o.default,u={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,format:p,formatter:o.formatters[p],indices:!1,serializeDate:function(t){return m.call(t)},skipNulls:!1,strictNullHandling:!1},f=function(t){return"string"==typeof t||"number"==typeof t||"boolean"==typeof t||"symbol"==typeof t||"bigint"==typeof t},h={},g=function t(e,n,o,a,l,d,m,p,g,b,_,v,y,x,w,k){for(var E,A=e,T=k,C=0,I=!1;void 0!==(T=T.get(h))&&!I;){var S=T.get(e);if(C+=1,void 0!==S)if(S===C)throw RangeError("Cyclic object value");else I=!0;void 0===T.get(h)&&(C=0)}if("function"==typeof p?A=p(n,A):A instanceof Date?A=_(A):"comma"===o&&c(A)&&(A=r.maybeMap(A,function(t){return t instanceof Date?_(t):t})),null===A){if(l)return m&&!x?m(n,u.encoder,w,"key",v):n;A=""}if(f(A)||r.isBuffer(A))return m?[y(x?n:m(n,u.encoder,w,"key",v))+"="+y(m(A,u.encoder,w,"value",v))]:[y(n)+"="+y(String(A))];var O=[];if(void 0===A)return O;if("comma"===o&&c(A))x&&m&&(A=r.maybeMap(A,m)),E=[{value:A.length>0?A.join(",")||null:void 0}];else if(c(p))E=p;else{var L=Object.keys(A);E=g?L.sort(g):L}for(var R=a&&c(A)&&1===A.length?n+"[]":n,N=0;N<E.length;++N){var D=E[N],z="object"==typeof D&&void 0!==D.value?D.value:A[D];if(!d||null!==z){var P=c(A)?"function"==typeof o?o(R,D):R:R+(b?"."+D:"["+D+"]");k.set(e,C);var M=i();M.set(h,k),s(O,t(z,P,o,a,l,d,"comma"===o&&x&&c(A)?null:m,p,g,b,_,v,y,x,w,M))}}return O},b=function(t){if(!t)return u;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw TypeError("Encoder has to be a function.");var e=t.charset||u.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if(void 0!==t.format){if(!a.call(o.formatters,t.format))throw TypeError("Unknown format option provided.");n=t.format}var i=o.formatters[n],r=u.filter;return("function"==typeof t.filter||c(t.filter))&&(r=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:u.addQueryPrefix,allowDots:void 0===t.allowDots?u.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:u.charsetSentinel,delimiter:void 0===t.delimiter?u.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:u.encode,encoder:"function"==typeof t.encoder?t.encoder:u.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:u.encodeValuesOnly,filter:r,format:n,formatter:i,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:u.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:u.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:u.strictNullHandling}};t.exports=function(t,e){var n,r,o,a=t,d=b(e);"function"==typeof d.filter?a=(r=d.filter)("",a):c(d.filter)&&(n=r=d.filter);var m=[];if("object"!=typeof a||null===a)return"";o=e&&e.arrayFormat in l?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var p=l[o];if(e&&"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw TypeError("`commaRoundTrip` must be a boolean, or absent");var u="comma"===p&&e&&e.commaRoundTrip;n||(n=Object.keys(a)),d.sort&&n.sort(d.sort);for(var f=i(),h=0;h<n.length;++h){var _=n[h];d.skipNulls&&null===a[_]||s(m,g(a[_],_,p,u,d.strictNullHandling,d.skipNulls,d.encode?d.encoder:null,d.filter,d.sort,d.allowDots,d.serializeDate,d.format,d.formatter,d.encodeValuesOnly,d.charset,f))}var v=m.join(d.delimiter),y=!0===d.addQueryPrefix?"?":"";return d.charsetSentinel&&("iso-8859-1"===d.charset?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),v.length>0?y+v:""}},3422:function(t,e,n){"use strict";var i=n(2490),r=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),l=function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(o(n)){for(var i=[],r=0;r<n.length;++r)void 0!==n[r]&&i.push(n[r]);e.obj[e.prop]=i}}},c=function(t,e){for(var n=e&&e.plainObjects?Object.create(null):{},i=0;i<t.length;++i)void 0!==t[i]&&(n[i]=t[i]);return n},d=function t(e,n,i){if(!n)return e;if("object"!=typeof n){if(o(e))e.push(n);else{if(!e||"object"!=typeof e)return[e,n];(i&&(i.plainObjects||i.allowPrototypes)||!r.call(Object.prototype,n))&&(e[n]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(n);var a=e;return(o(e)&&!o(n)&&(a=c(e,i)),o(e)&&o(n))?(n.forEach(function(n,o){if(r.call(e,o)){var a=e[o];a&&"object"==typeof a&&n&&"object"==typeof n?e[o]=t(a,n,i):e.push(n)}else e[o]=n}),e):Object.keys(n).reduce(function(e,o){var a=n[o];return r.call(e,o)?e[o]=t(e[o],a,i):e[o]=a,e},a)};t.exports={arrayToObject:c,assign:function(t,e){return Object.keys(e).reduce(function(t,n){return t[n]=e[n],t},t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],i=0;i<e.length;++i)for(var r=e[i],o=r.obj[r.prop],a=Object.keys(o),c=0;c<a.length;++c){var d=a[c],s=o[d];"object"==typeof s&&null!==s&&-1===n.indexOf(s)&&(e.push({obj:o,prop:d}),n.push(s))}return l(e),t},decode:function(t,e,n){var i=t.replace(/\+/g," ");if("iso-8859-1"===n)return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch(t){return i}},encode:function(t,e,n,r,o){if(0===t.length)return t;var l=t;if("symbol"==typeof t?l=Symbol.prototype.toString.call(t):"string"!=typeof t&&(l=String(t)),"iso-8859-1"===n)return escape(l).replace(/%u[0-9a-f]{4}/gi,function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"});for(var c="",d=0;d<l.length;++d){var s=l.charCodeAt(d);if(45===s||46===s||95===s||126===s||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||o===i.RFC1738&&(40===s||41===s)){c+=l.charAt(d);continue}if(s<128){c+=a[s];continue}if(s<2048){c+=a[192|s>>6]+a[128|63&s];continue}if(s<55296||s>=57344){c+=a[224|s>>12]+a[128|s>>6&63]+a[128|63&s];continue}d+=1,c+=a[240|(s=65536+((1023&s)<<10|1023&l.charCodeAt(d)))>>18]+a[128|s>>12&63]+a[128|s>>6&63]+a[128|63&s]}return c},isBuffer:function(t){return!!t&&"object"==typeof t&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(o(t)){for(var n=[],i=0;i<t.length;i+=1)n.push(e(t[i]));return n}return e(t)},merge:d}},1744:function(t,e,n){"use strict";var i=n(1528),r=n(7892),o=n(2320)(),a=n(1455),l=n(682),c=i("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new l("`fn` is not a function");if("number"!=typeof e||e<0||e>0xffffffff||c(e)!==e)throw new l("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,d=!0;if("length"in t&&a){var s=a(t,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(d=!1)}return(i||d||!n)&&(o?r(t,"length",e,!0,!0):r(t,"length",e)),t}},2538:function(t,e,n){"use strict";var i=n(1528),r=n(7737),o=n(8683),a=n(682),l=i("%WeakMap%",!0),c=i("%Map%",!0),d=r("WeakMap.prototype.get",!0),s=r("WeakMap.prototype.set",!0),m=r("WeakMap.prototype.has",!0),p=r("Map.prototype.get",!0),u=r("Map.prototype.set",!0),f=r("Map.prototype.has",!0),h=function(t,e){for(var n,i=t;null!==(n=i.next);i=n)if(n.key===e)return i.next=n.next,n.next=t.next,t.next=n,n},g=function(t,e){var n=h(t,e);return n&&n.value},b=function(t,e,n){var i=h(t,e);i?i.value=n:t.next={key:e,next:t.next,value:n}},_=function(t,e){return!!h(t,e)};t.exports=function(){var t,e,n,i={assert:function(t){if(!i.has(t))throw new a("Side channel does not contain "+o(t))},get:function(i){if(l&&i&&("object"==typeof i||"function"==typeof i)){if(t)return d(t,i)}else if(c){if(e)return p(e,i)}else if(n)return g(n,i)},has:function(i){if(l&&i&&("object"==typeof i||"function"==typeof i)){if(t)return m(t,i)}else if(c){if(e)return f(e,i)}else if(n)return _(n,i);return!1},set:function(i,r){l&&i&&("object"==typeof i||"function"==typeof i)?(t||(t=new l),s(t,i,r)):c?(e||(e=new c),u(e,i,r)):(n||(n={key:{},next:null}),b(n,i,r))}};return i}},8683:function(t,e,n){var i="function"==typeof Map&&Map.prototype,r=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=i&&r&&"function"==typeof r.get?r.get:null,a=i&&Map.prototype.forEach,l="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&l?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,d=l&&c&&"function"==typeof c.get?c.get:null,s=l&&Set.prototype.forEach,m="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,u="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,h=Object.prototype.toString,g=Function.prototype.toString,b=String.prototype.match,_=String.prototype.slice,v=String.prototype.replace,y=String.prototype.toUpperCase,x=String.prototype.toLowerCase,w=RegExp.prototype.test,k=Array.prototype.concat,E=Array.prototype.join,A=Array.prototype.slice,T=Math.floor,C="function"==typeof BigInt?BigInt.prototype.valueOf:null,I=Object.getOwnPropertySymbols,S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,O="function"==typeof Symbol&&"object"==typeof Symbol.iterator,L="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===O?"object":"symbol")?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,N=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function D(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||w.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var i=t<0?-T(-t):T(t);if(i!==t){var r=String(i),o=_.call(e,r.length+1);return v.call(r,n,"$&_")+"."+v.call(v.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,n,"$&_")}var z=n(9180),P=z.custom,M=K(P)?P:null;function $(t,e,n){var i="double"===(n.quoteStyle||e)?'"':"'";return i+t+i}function F(t){return v.call(String(t),/"/g,"&quot;")}function B(t){return"[object Array]"===J(t)&&(!L||!("object"==typeof t&&L in t))}function H(t){return"[object Date]"===J(t)&&(!L||!("object"==typeof t&&L in t))}function U(t){return"[object RegExp]"===J(t)&&(!L||!("object"==typeof t&&L in t))}function j(t){return"[object Error]"===J(t)&&(!L||!("object"==typeof t&&L in t))}function X(t){return"[object String]"===J(t)&&(!L||!("object"==typeof t&&L in t))}function V(t){return"[object Number]"===J(t)&&(!L||!("object"==typeof t&&L in t))}function Y(t){return"[object Boolean]"===J(t)&&(!L||!("object"==typeof t&&L in t))}function K(t){if(O)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!S)return!1;try{return S.call(t),!0}catch(t){}return!1}function G(t){if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(e,i,r,l){var c=i||{};if(W(c,"quoteStyle")&&"single"!==c.quoteStyle&&"double"!==c.quoteStyle)throw TypeError('option "quoteStyle" must be "single" or "double"');if(W(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!W(c,"customInspect")||c.customInspect;if("boolean"!=typeof m&&"symbol"!==m)throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(W(c,"indent")&&null!==c.indent&&" "!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(W(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw TypeError('option "numericSeparator", if provided, must be `true` or `false`');var p=c.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return ta(e,c);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var u=String(e);return p?D(e,u):u}if("bigint"==typeof e){var h=String(e)+"n";return p?D(e,h):h}var g=void 0===c.depth?5:c.depth;if(void 0===r&&(r=0),r>=g&&g>0&&"object"==typeof e)return B(e)?"[Array]":"[Object]";var b=tp(c,r);if(void 0===l)l=[];else if(Z(l,e)>=0)return"[Circular]";function y(e,n,i){if(n&&(l=A.call(l)).push(n),i){var o={depth:c.depth};return W(c,"quoteStyle")&&(o.quoteStyle=c.quoteStyle),t(e,o,r+1,l)}return t(e,c,r+1,l)}if("function"==typeof e&&!U(e)){var w=Q(e),T=tf(e,y);return"[Function"+(w?": "+w:" (anonymous)")+"]"+(T.length>0?" { "+E.call(T,", ")+" }":"")}if(K(e)){var I=O?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):S.call(e);return"object"!=typeof e||O?I:tc(I)}if(to(e)){for(var P="<"+x.call(String(e.nodeName)),q=e.attributes||[],tl=0;tl<q.length;tl++)P+=" "+q[tl].name+"="+$(F(q[tl].value),"double",c);return P+=">",e.childNodes&&e.childNodes.length&&(P+="..."),P+="</"+x.call(String(e.nodeName))+">"}if(B(e)){if(0===e.length)return"[]";var th=tf(e,y);return b&&!tm(th)?"["+tu(th,b)+"]":"[ "+E.call(th,", ")+" ]"}if(j(e)){var tg=tf(e,y);return"cause"in Error.prototype||!("cause"in e)||R.call(e,"cause")?0===tg.length?"["+String(e)+"]":"{ ["+String(e)+"] "+E.call(tg,", ")+" }":"{ ["+String(e)+"] "+E.call(k.call("[cause]: "+y(e.cause),tg),", ")+" }"}if("object"==typeof e&&m){if(M&&"function"==typeof e[M]&&z)return z(e,{depth:g-r});else if("symbol"!==m&&"function"==typeof e.inspect)return e.inspect()}if(tt(e)){var tb=[];return a&&a.call(e,function(t,n){tb.push(y(n,e,!0)+" => "+y(t,e))}),ts("Map",o.call(e),tb,b)}if(ti(e)){var t_=[];return s&&s.call(e,function(t){t_.push(y(t,e))}),ts("Set",d.call(e),t_,b)}if(te(e))return td("WeakMap");if(tr(e))return td("WeakSet");if(tn(e))return td("WeakRef");if(V(e))return tc(y(Number(e)));if(G(e))return tc(y(C.call(e)));if(Y(e))return tc(f.call(e));if(X(e))return tc(y(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if(e===n.g)return"{ [object globalThis] }";if(!H(e)&&!U(e)){var tv=tf(e,y),ty=N?N(e)===Object.prototype:e instanceof Object||e.constructor===Object,tx=e instanceof Object?"":"null prototype",tw=!ty&&L&&Object(e)===e&&L in e?_.call(J(e),8,-1):tx?"Object":"",tk=(ty||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(tw||tx?"["+E.call(k.call([],tw||[],tx||[]),": ")+"] ":"");return 0===tv.length?tk+"{}":b?tk+"{"+tu(tv,b)+"}":tk+"{ "+E.call(tv,", ")+" }"}return String(e)};var q=Object.prototype.hasOwnProperty||function(t){return t in this};function W(t,e){return q.call(t,e)}function J(t){return h.call(t)}function Q(t){if(t.name)return t.name;var e=b.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function Z(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return -1}function tt(t){if(!o||!t||"object"!=typeof t)return!1;try{o.call(t);try{d.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}function te(t){if(!m||!t||"object"!=typeof t)return!1;try{m.call(t,m);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}function tn(t){if(!u||!t||"object"!=typeof t)return!1;try{return u.call(t),!0}catch(t){}return!1}function ti(t){if(!d||!t||"object"!=typeof t)return!1;try{d.call(t);try{o.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}function tr(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{m.call(t,m)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}function to(t){return!!t&&"object"==typeof t&&(!!("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)||"string"==typeof t.nodeName&&"function"==typeof t.getAttribute)}function ta(t,e){if(t.length>e.maxStringLength){var n=t.length-e.maxStringLength,i="... "+n+" more character"+(n>1?"s":"");return ta(_.call(t,0,e.maxStringLength),e)+i}return $(v.call(v.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,tl),"single",e)}function tl(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+y.call(e.toString(16))}function tc(t){return"Object("+t+")"}function td(t){return t+" { ? }"}function ts(t,e,n,i){return t+" ("+e+") {"+(i?tu(n,i):E.call(n,", "))+"}"}function tm(t){for(var e=0;e<t.length;e++)if(Z(t[e],"\n")>=0)return!1;return!0}function tp(t,e){var n;if(" "===t.indent)n=" ";else{if("number"!=typeof t.indent||!(t.indent>0))return null;n=E.call(Array(t.indent+1)," ")}return{base:n,prev:E.call(Array(e+1),n)}}function tu(t,e){if(0===t.length)return"";var n="\n"+e.prev+e.base;return n+E.call(t,","+n)+"\n"+e.prev}function tf(t,e){var n,i=B(t),r=[];if(i){r.length=t.length;for(var o=0;o<t.length;o++)r[o]=W(t,o)?e(t[o],t):""}var a="function"==typeof I?I(t):[];if(O){n={};for(var l=0;l<a.length;l++)n["$"+a[l]]=a[l]}for(var c in t)if(W(t,c)&&(!i||String(Number(c))!==c||!(c<t.length)))if(O&&n["$"+c]instanceof Symbol)continue;else w.call(/[^\w$]/,c)?r.push(e(c,t)+": "+e(t[c],t)):r.push(c+": "+e(t[c],t));if("function"==typeof I)for(var d=0;d<a.length;d++)R.call(t,a[d])&&r.push("["+e(a[d])+"]: "+e(t[a[d]],t));return r}},9357:function(__unused_webpack_module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{OrAssetTree:()=>OrAssetTree,OrAssetTreeAddEvent:()=>OrAssetTreeAddEvent,OrAssetTreeAssetEvent:()=>OrAssetTreeAssetEvent,OrAssetTreeChangeParentEvent:()=>OrAssetTreeChangeParentEvent,OrAssetTreeFilter:()=>OrAssetTreeFilter,OrAssetTreeRequestAddEvent:()=>OrAssetTreeRequestAddEvent,OrAssetTreeRequestDeleteEvent:()=>OrAssetTreeRequestDeleteEvent,OrAssetTreeRequestSelectionEvent:()=>OrAssetTreeRequestSelectionEvent,OrAssetTreeSelectionEvent:()=>OrAssetTreeSelectionEvent,OrAssetTreeToggleExpandEvent:()=>OrAssetTreeToggleExpandEvent,getAssetTypes:()=>getAssetTypes,style:()=>_style__WEBPACK_IMPORTED_MODULE_6__.o});var OrAssetTree_1,FilterElementType,lit__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(538),lit_decorators_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(3176),_openremote_or_mwc_components_or_mwc_input__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(6505),_openremote_or_icon__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(6243),_openremote_or_icon__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(_openremote_or_icon__WEBPACK_IMPORTED_MODULE_3__),_openremote_model__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(4297),_openremote_model__WEBPACK_IMPORTED_MODULE_4___default=__webpack_require__.n(_openremote_model__WEBPACK_IMPORTED_MODULE_4__),_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(9329),_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5___default=__webpack_require__.n(_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__),_style__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(6748),_openremote_core__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(6801),_openremote_core__WEBPACK_IMPORTED_MODULE_7___default=__webpack_require__.n(_openremote_core__WEBPACK_IMPORTED_MODULE_7__),qs__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(3348),qs__WEBPACK_IMPORTED_MODULE_8___default=__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_8__),_openremote_or_mwc_components_or_mwc_menu__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(5320),_openremote_or_mwc_components_or_mwc_list__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(2730),_openremote_or_mwc_components_or_mwc_dialog__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(5839),_or_add_asset_dialog__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(7987),_openremote_or_mwc_components_or_mwc_snackbar__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(6445),lit_directives_when_js__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(5058),__decorate=function(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var l=t.length-1;l>=0;l--)(r=t[l])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a},__awaiter=function(t,e,n,i){function r(t){return t instanceof n?t:new n(function(e){e(t)})}return new(n||(n=Promise))(function(n,o){function a(t){try{c(i.next(t))}catch(t){o(t)}}function l(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){t.done?n(t.value):r(t.value).then(a,l)}c((i=i.apply(t,e||[])).next())})};class OrAssetTreeRequestSelectionEvent extends CustomEvent{constructor(t){super(OrAssetTreeRequestSelectionEvent.NAME,{bubbles:!0,composed:!0,detail:{allow:!0,detail:t}})}}OrAssetTreeRequestSelectionEvent.NAME="or-asset-tree-request-selection";class OrAssetTreeSelectionEvent extends CustomEvent{constructor(t){super(OrAssetTreeSelectionEvent.NAME,{bubbles:!0,composed:!0,detail:t})}}OrAssetTreeSelectionEvent.NAME="or-asset-tree-selection";class OrAssetTreeChangeParentEvent extends CustomEvent{constructor(t,e){super(OrAssetTreeChangeParentEvent.NAME,{bubbles:!0,composed:!0,detail:{parentId:t,assetIds:e}})}}OrAssetTreeChangeParentEvent.NAME="or-asset-tree-change-parent";class OrAssetTreeToggleExpandEvent extends CustomEvent{constructor(t){super(OrAssetTreeToggleExpandEvent.NAME,{bubbles:!0,composed:!0,detail:t})}}OrAssetTreeToggleExpandEvent.NAME="or-asset-tree-expand",function(t){t[t.SEARCH_FILTER=0]="SEARCH_FILTER",t[t.ASSET_TYPE=1]="ASSET_TYPE",t[t.ATTRIBUTE_NAME=2]="ATTRIBUTE_NAME",t[t.ATTRIBUTE_VALUE=3]="ATTRIBUTE_VALUE"}(FilterElementType||(FilterElementType={}));class OrAssetTreeRequestAddEvent extends CustomEvent{constructor(t){super(OrAssetTreeRequestAddEvent.NAME,{bubbles:!0,composed:!0,detail:{allow:!0,detail:t}})}}OrAssetTreeRequestAddEvent.NAME="or-asset-tree-request-add";class OrAssetTreeAddEvent extends CustomEvent{constructor(t){super(OrAssetTreeAddEvent.NAME,{bubbles:!0,composed:!0,detail:t})}}OrAssetTreeAddEvent.NAME="or-asset-tree-add";class OrAssetTreeRequestDeleteEvent extends CustomEvent{constructor(t){super(OrAssetTreeRequestDeleteEvent.NAME,{bubbles:!0,composed:!0,detail:{allow:!0,detail:t}})}}OrAssetTreeRequestDeleteEvent.NAME="or-asset-tree-request-delete";class OrAssetTreeAssetEvent extends CustomEvent{constructor(t){super(OrAssetTreeAssetEvent.NAME,{bubbles:!0,composed:!0,detail:t})}}OrAssetTreeAssetEvent.NAME="or-asset-tree-asset-event";class OrAssetTreeFilter{constructor(t){this.asset=t,this.assetType=[],this.attribute=[],this.attributeValue=[]}}let getAssetTypes=()=>__awaiter(void 0,void 0,void 0,function*(){let t=yield _openremote_core__WEBPACK_IMPORTED_MODULE_7___default().rest.api.AssetResource.queryAssets({select:{attributes:[]},recursive:!0});if(t&&t.data)return t.data.map(t=>t.type)}),OrAssetTree=OrAssetTree_1=class OrAssetTree extends(0,_openremote_core__WEBPACK_IMPORTED_MODULE_7__.subscribe)(_openremote_core__WEBPACK_IMPORTED_MODULE_7___default())(lit__WEBPACK_IMPORTED_MODULE_0__.oi){constructor(){super(...arguments),this.readonly=!1,this.disabled=!1,this.disableSubscribe=!1,this.showDeselectBtn=!0,this.showSortBtn=!0,this.showFilter=!0,this.sortBy="name",this.expandAllNodes=!1,this.expandedIds=[],this.checkboxes=!1,this._loading=!1,this._connected=!1,this._selectedNodes=[],this._expandedNodes=[],this._filter=new OrAssetTreeFilter,this._searchInputTimer=void 0,this._filterSettingOpen=!1,this._assetTypes=[],this._uniqueAssetTypes=[],this._dragDropParentId=null,this._expandTimer=void 0,this._latestSelected=void 0,this.assetsChildren={}}static get styles(){return[_style__WEBPACK_IMPORTED_MODULE_6__.o]}get selectedNodes(){return this._selectedNodes?[...this._selectedNodes]:[]}set selectedNodes(t){this.selectedIds=t.map(t=>t.asset.id)}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this.requestUpdate()}refresh(){this._nodes=void 0}isAncestorSelected(t){if(!this.selectedIds||!t.parent)return!1;for(;t.parent;)if(t=t.parent,this.selectedIds.includes(t.asset.id))return!0;return!1}applyFilter(t,e=!1){if(t&&"string"!=typeof t||(t=this.parseFromInputFilter(t)),_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.objectsEqual(this._filter,t))return void console.debug("Tried to apply filter to the asset tree, but it was the same.",t);console.debug("Applying filter to the asset tree:",t),this._filter=t,e&&this.updateComplete.finally(()=>this._filterInput.value=this.formatFilter(t))}mapDescriptors(t,e){let n=t.map(t=>({styleMap:{"--or-icon-fill":t.colour?"#"+t.colour:"unset"},icon:t.icon,text:_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.getAssetTypeLabel(t),value:t.name,data:t})).sort(_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.sortByString(t=>t.text));return e&&n.splice(0,0,e),n}getSelectHeader(){return(0,lit__WEBPACK_IMPORTED_MODULE_0__.dy)`<or-mwc-input style="width:100%;" ?disabled="${this._loading}" type="${_openremote_or_mwc_components_or_mwc_input__WEBPACK_IMPORTED_MODULE_2__.n$.TEXT}" .label="${_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__.i18next.t("filter.assetTypeLabel")}" iconTrailing="menu-down" iconColor="rgba(0, 0, 0, 0.87)" icon="selection-ellipse" value="${_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__.i18next.t("filter.assetTypeNone")}"></or-mwc-input>`}getSelectedHeader(t){return(0,lit__WEBPACK_IMPORTED_MODULE_0__.dy)`<or-mwc-input style="width:100%;" ?disabled="${this._loading}" type="${_openremote_or_mwc_components_or_mwc_input__WEBPACK_IMPORTED_MODULE_2__.n$.TEXT}" .label="${_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__.i18next.t("filter.assetTypeLabel")}" .iconColor="${t.colour}" iconTrailing="menu-down" icon="${t.icon}" value="${_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.getAssetTypeLabel(t)}"></or-mwc-input>`}assetTypeSelect(){if(!this._assetTypeFilter)return this.getSelectHeader();{let t=this._assetTypes.find(t=>t.name===this._assetTypeFilter);return t?this.getSelectedHeader(t):this.getSelectHeader()}}atLeastOneNodeToBeShown(){var t;let e=!1;return null==(t=this._nodes)||t.forEach(t=>{t.hidden||(e=!0)}),e}render(){let t=this._canAdd();return(0,lit__WEBPACK_IMPORTED_MODULE_0__.dy)`
2
2
  <div id="header">
3
3
  <div id="title-container">
4
4
  <or-translate id="title" value="asset_plural"></or-translate>
@@ -44,7 +44,7 @@
44
44
  style="margin-top: 10px;"
45
45
  disabled></or-mwc-input>
46
46
  <div style="margin-top: 10px;">
47
- <or-mwc-input style="float:left;" type="${_openremote_or_mwc_components_or_mwc_input__WEBPACK_IMPORTED_MODULE_2__.n$.BUTTON}" label="filter.clear" @or-mwc-input-changed="${()=>{this._filterInput.value=void 0,this._attributeValueFilter.value=void 0,this._attributeNameFilter.value=void 0,this._attributeValueFilter.disabled=!0,this._assetTypeFilter="",this._filter=new OrAssetTreeFilter,this._doFiltering()}}"></or-mwc-input>
47
+ <or-mwc-input style="float:left;" type="${_openremote_or_mwc_components_or_mwc_input__WEBPACK_IMPORTED_MODULE_2__.n$.BUTTON}" label="filter.clear" @or-mwc-input-changed="${()=>{this._filterInput.value=void 0,this._attributeValueFilter.value=void 0,this._attributeNameFilter.value=void 0,this._attributeValueFilter.disabled=!0,this._assetTypeFilter="",this.applyFilter(new OrAssetTreeFilter),this._doFiltering()}}"></or-mwc-input>
48
48
  <or-mwc-input style="float: right;" type="${_openremote_or_mwc_components_or_mwc_input__WEBPACK_IMPORTED_MODULE_2__.n$.BUTTON}" label="filter.action" raised @or-mwc-input-changed="${()=>{this._filterFromSettings()}}"></or-mwc-input>
49
49
  </div>
50
50
  </div>
@@ -66,7 +66,7 @@
66
66
  <div id="footer">
67
67
 
68
68
  </div>
69
- `}_isReadonly(){return this.readonly||!_openremote_core__WEBPACK_IMPORTED_MODULE_7___default().hasRole("write:assets")}shouldUpdate(t){let e=super.shouldUpdate(t);return((t.has("assets")||t.has("rootAssets")||t.has("rootAssetIds"))&&(this._nodes=void 0),this._nodes)?(t.has("selectedIds")&&!_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.objectsEqual(t.get("selectedIds"),this.selectedIds)&&this._updateSelectedNodes(),t.has("sortBy")&&this._updateSort(this._nodes,this._getSortFunction()),t.has("disabledSubscribe")&&this.disableSubscribe&&this._removeEventSubscriptions(),e):(this._loadAssets(),!0)}_updateSelectedNodes(){let t=[],e=[];OrAssetTree_1._forEachNodeRecursive(this._nodes,n=>{if(this.selectedIds&&this.selectedIds.indexOf(n.asset.id)>=0){t.push(n.asset.id),e.push(n),n.selected=!0;let i=n.parent;for(;i;)i.expanded=!0,i=i.parent}else n.selected=!1;if(this.checkboxes){let e=n.parent;for(;e;){let n=[];OrAssetTree_1._forEachNodeRecursive(e.children,t=>{n.push(t)}),e.someChildrenSelected=!1,e.allChildrenSelected=!1,n.every(e=>t.includes(e.asset.id))?e.allChildrenSelected=!0:n.some(e=>t.includes(e.asset.id))&&(e.someChildrenSelected=!0),e=e.parent}}}),this.selectedIds=t;let n=this._selectedNodes;this._selectedNodes=e,this.dispatchEvent(new OrAssetTreeSelectionEvent({oldNodes:n,newNodes:e}))}_updateSort(t,e){t&&(t.sort(e),t.forEach(t=>this._updateSort(t.children,e)))}_toggleExpander(t,e,n=!1){e&&e.expandable&&(e.expanded=!e.expanded,e.expanded?this._expandedNodes.push(e):this._expandedNodes=this._expandedNodes.filter(t=>t!==e),t.parentElement.parentElement.parentElement.toggleAttribute("data-expanded"),n||this.dispatchEvent(new OrAssetTreeToggleExpandEvent({node:e})),this.requestUpdate())}_buildPaths(t){let e=[];return t.asset&&t.asset.id?(e.push(t.asset.id),t.children.length>0&&t.expanded&&t.children.forEach(t=>{e=e.concat(this._buildPaths(t))}),e):[]}_findNode(t,e){if(t.asset&&t.asset.id){if(t.asset.id===e)return t;if(t.children.length>0&&t.expanded){let n;return t.children.forEach(t=>{n||(n=this._findNode(t,e))}),n}return}}_findNodeFromAssetId(t){if(this._nodes){let e;return this._nodes.forEach(n=>{e||(e=this._findNode(n,t))}),e}}_onNodeClicked(t,e){var n,i,r,o;if(t&&t.defaultPrevented)return;t&&t.preventDefault();let a=t&&t.target.className.indexOf("expander")>=0,l=t&&(null==(i=null==(n=t.target)?void 0:n.icon)?void 0:i.includes("checkbox-multiple"));if(a)this._toggleExpander(t.target,e);else{let n=!0;if(e&&this.config&&(null==(r=this.config.select)?void 0:r.types)&&(n=this.config.select.types.indexOf(e.asset.type)>=0),!n&&!l)return;let i=[];if(e){let n=this.selectedNodes.indexOf(e),r=!0,a=!0,c=!this._isReadonly()&&(!this.config||!this.config.select||!this.config.select.multiSelect);if((this.checkboxes||c&&t&&(t.ctrlKey||t.shiftKey||t.metaKey))&&(a=!1,n>=0&&this.selectedIds&&this.selectedIds.length>1&&(r=!1)),l){i=[...this.selectedNodes];let t=[];OrAssetTree_1._forEachNodeRecursive(e.children,e=>{var n,i;let r=!0;e&&(null==(i=null==(n=this.config)?void 0:n.select)?void 0:i.types)&&(r=this.config.select.types.indexOf(e.asset.type)>=0),r&&t.push(e)}),i=e.allChildrenSelected?i.filter(e=>!t.map(t=>t.asset.id).includes(e.asset.id)):i.concat(t)}else if(a)this._latestSelected=Object.assign({},e),i=[e];else if(r){if(n<0){if(t&&t.shiftKey){let t=[];if(null==(o=this._nodes)||o.forEach(e=>{t=t.concat(this._buildPaths(e))}),this._latestSelected&&this._latestSelected.asset&&this._latestSelected.asset.id&&e.asset&&e.asset.id){let n=this._latestSelected.asset.id,r=e.asset.id,o=t.findIndex(t=>t.includes(n)),a=t.findIndex(t=>t.includes(r)),l=-1,c=-1;o>a?(l=a,c=o):(l=o,c=a);let d=t.slice(l,c+1),s=[];d.forEach(t=>{let e=this._findNodeFromAssetId(t);e&&s.push(e)}),i=(i=[...this.selectedNodes]).concat(s)}}else(i=[...this.selectedNodes]).push(e);this._latestSelected=Object.assign({},e)}}else n>=0&&(1===(i=[...this.selectedNodes]).length&&(this._latestSelected=void 0),i.splice(n,1))}_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.dispatchCancellableEvent(this,new OrAssetTreeRequestSelectionEvent({oldNodes:this.selectedNodes,newNodes:i})).then(t=>{t.allow&&(this.selectedNodes=t.detail.newNodes)})}}_onDeselectClicked(){this._onNodeClicked(null,null)}parseFromInputFilter(t){let e=this._filterInput.value;t&&(e=t);let n=new OrAssetTreeFilter;if(e){let t=e,i=e.match(/(attribute\:)(\"[^"]+\")\S*/g);i&&(i.length>0&&i.forEach((e,i)=>{t=t.replace(e,"");let r=e.toString().indexOf("attribute:"),o=e.toString().substring(r+10+1,e.toString().length-1);n.attribute.push(o),n.attributeValue.push("")}),this._attributeValueFilter.disabled=!1),(i=e.match(/(type\:)\S+/g))&&i.length>0&&i.forEach((e,i)=>{t=t.replace(e,"");let r=e.toString().indexOf("type:"),o=e.toString().substring(r+5);n.assetType.push(o)}),(i=e.match(/(\"[^\"]+\")\:(([^\"\s]+)|(\"[^\"]+\"))/g))&&i.length>0&&i.forEach((e,i)=>{t=t.replace(e,"");let r=e.toString().indexOf('":'),o=e.toString().substring(r+2),a=e.toString().substring(1,r);'"'===o[0]&&'"'===o[o.length-1]&&(o=o.substring(1,o.length-1)),n.attribute.push(a),n.attributeValue.push(o)}),n.asset=t&&t.length>0?t.trim():void 0}return n}formatFilter(t){let e=t.asset?t.asset:"",n=t.asset?" ":"",i=[];return t.assetType.length>0&&t.assetType.forEach(t=>{e+=n+"type:"+t,n=" "}),t.attribute.length>0&&t.attributeValue.length>0&&t.attributeValue.forEach((r,o)=>{i.push(t.attribute[o]),e+=n+'"'+t.attribute[o]+'":'+r,n=" "}),t.attribute.length>0&&0===t.attributeValue.length&&t.attribute.forEach(t=>{i.includes(t)||(e+=n+'attribute:"'+t+'"',n=" ")}),e}_shouldEnableAttrTypeEvent(t){let e;t.composedPath()&&(e=t.composedPath()[0].value||void 0),this._shouldEnableAttrType(e)}_shouldEnableAttrType(t){t?this._attributeValueFilter.disabled=!1:this._attributeValueFilter.disabled=!0}applySettingFields(t){if(this._assetTypeFilter?t.assetType=[this._assetTypeFilter]:t.assetType=[],this._attributeNameFilter.value?t.attribute=[this._attributeNameFilter.value]:t.attribute=[],this._attributeNameFilter.value&&this._attributeValueFilter.value){let e=this._attributeValueFilter.value;e.includes(" ")&&(e='"'+e+'"'),t.attributeValue=[e]}else t.attributeValue=[];return t}_filterFromSettings(){let t=this.parseFromInputFilter(),e=this.applySettingFields(t);this._filter=e;let n=this.formatFilter(this._filter);this._filterInput.value=n,this._filterSettingOpen=!1,this._doFiltering()}_onFilterInputEvent(t){let e;t.composedPath()&&(e=t.composedPath()[0].value||void 0),this._onFilterInput(e,!1)}_onFilterInput(t,e){let n=this.parseFromInputFilter(t);_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.objectsEqual(this._filter,n,!0)||(this._filter=n,this._searchInputTimer&&clearTimeout(this._searchInputTimer),e?this._doFiltering():this._searchInputTimer=window.setTimeout(()=>{this._doFiltering()},350))}_doFiltering(){return __awaiter(this,void 0,void 0,function*(){if(this._searchInputTimer&&(clearTimeout(this._searchInputTimer),this._searchInputTimer=void 0),this.isConnected&&this._nodes){if(!this._filter.asset&&!this._filter.attribute&&!this._filter.assetType&&!this._filter.attributeValue){OrAssetTree_1._forEachNodeRecursive(this._nodes,t=>{t.notMatchingFilter=!1,t.hidden=!1}),this.requestUpdate("_nodes");return}if(this.disabled=!0,this._filter.asset||this._filter.assetType||this._filter.attribute){let t=!1;this._filter.attribute&&(t=!0),this.getMatcher(t).then(t=>{this._nodes&&(this._nodes.forEach(e=>{this.filterTreeNode(e,t)}),this.disabled=!1)})}}})}getMatcher(t){return t?this.getMatcherFromQuery():this.getSimpleNameMatcher()}getSimpleNameMatcher(){return __awaiter(this,void 0,void 0,function*(){return t=>{let e=!0;return this._filter.asset&&(e=e&&t.name.toLowerCase().includes(this._filter.asset.toLowerCase())),this._filter.assetType.length>0&&(e=e&&t.type.toLowerCase()===this._filter.assetType[0].toLowerCase()),e}})}getMatcherFromQuery(){return __awaiter(this,void 0,void 0,function*(){let response,foundAssetIds,assetCond,attributeCond,assetTypeCond;this._filter.asset&&(assetCond=[{predicateType:"string",match:"CONTAINS",value:this._filter.asset,caseSensitive:!1}]),this._filter.assetType.length>0&&(assetTypeCond=this._filter.assetType),this._filter.attribute.length>0&&(attributeCond={operator:"AND",items:this._filter.attribute.map(t=>({name:{predicateType:"string",match:"EXACT",value:_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.sentenceCaseToCamelCase(t),caseSensitive:!1}}))});let query={select:{attributes:attributeCond?void 0:[]},names:assetCond,types:assetTypeCond,attributes:attributeCond};try{foundAssetIds=(response=yield _openremote_core__WEBPACK_IMPORTED_MODULE_7___default().rest.api.AssetResource.queryAssets(query)).data.map(t=>t.id)}catch(e){this._filter.assetType.forEach(t=>{-1===this._assetTypes.findIndex(e=>e.name===t)&&(0,_openremote_or_mwc_components_or_mwc_snackbar__WEBPACK_IMPORTED_MODULE_13__.OV)(void 0,"filter.assetTypeDoesNotExist","dismiss")}),foundAssetIds=[]}return asset=>{let attrValueCheck=!0;if(this._filter.attribute.length>0&&this._filter.attributeValue.length>0&&foundAssetIds.includes(asset.id)){let attributeVal=[];this._filter.attributeValue.forEach((t,e)=>{t.length>0&&attributeVal.push([this._filter.attribute[e],t])});let matchingAsset=response.data.find(t=>t.id===asset.id);if(matchingAsset&&matchingAsset.attributes)for(let attributeValIndex=0;attributeValIndex<attributeVal.length;attributeValIndex++){let currentAttributeVal=attributeVal[attributeValIndex],atLeastOneAttributeMatchValue=!1;Object.keys(matchingAsset.attributes).forEach(key=>{var _a,_b,_c;let attr=matchingAsset.attributes[key];if(attr.name.toLowerCase()===currentAttributeVal[0].toLowerCase())switch(attr.type){case"number":case"integer":case"long":case"bigInteger":case"bigNumber":case"positiveInteger":case"negativeInteger":case"positiveNumber":case"negativeNumber":{let normalizedValue=null==(_a=currentAttributeVal[1])?void 0:_a.replace(",",".");if(isNaN(Number(normalizedValue))){if(/\d/.test(normalizedValue)){normalizedValue.endsWith("%")&&(normalizedValue=null==normalizedValue?void 0:normalizedValue.replace("%","")),/^[0-9]/.test(normalizedValue)&&(normalizedValue="=="+normalizedValue);let func=attr.value+normalizedValue.replace(/[a-z]/gi,"");try{let resultNumberEval=eval(func);resultNumberEval&&(atLeastOneAttributeMatchValue=!0)}catch(_ignored){console.warn("Could not process filter on attribute number value;",func)}}}else(null!=(_b=attr.value)?_b:0)===Number(normalizedValue)&&(atLeastOneAttributeMatchValue=!0);break}case"boolean":{let value=currentAttributeVal[1];("false"===value||"true"===value)&&value===(null!=(_c=attr.value)&&_c).toString()&&(atLeastOneAttributeMatchValue=!0);break}case"text":if(attr.value){let unparsedValue=currentAttributeVal[1],multicharString="*",parsedValue=unparsedValue.replace(multicharString,".*");parsedValue=parsedValue.replace(/"/g,""),-1!=attr.value.toLowerCase().indexOf(parsedValue.toLowerCase())&&(atLeastOneAttributeMatchValue=!0)}}}),attrValueCheck=atLeastOneAttributeMatchValue}}return foundAssetIds.includes(asset.id)&&attrValueCheck}})}isAnyFilter(){return void 0!==this._filter.asset||this._filter.assetType.length>0||this._filter.attribute.length>0}filterTreeNode(t,e,n=!1){let i=e(t.asset);t.notMatchingFilter=!i;let r=t.children.map(t=>this.filterTreeNode(t,e,i)).some(t=>t);return i=i||r,t.expanded=r&&t.children.length>0&&this.isAnyFilter(),t.hidden=!i&&!n,i}_onCopyClicked(){return __awaiter(this,void 0,void 0,function*(){if(1===this._selectedNodes.length)try{let t=yield _openremote_core__WEBPACK_IMPORTED_MODULE_7___default().rest.api.AssetResource.get(this._selectedNodes[0].asset.id);if(!t.data)throw Error("API returned an invalid response when retrieving the source asset");let e=JSON.parse(JSON.stringify(t.data));e.name+=" copy",delete e.id,delete e.path,delete e.createdOn,delete e.version,_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.dispatchCancellableEvent(this,new OrAssetTreeRequestAddEvent({sourceAsset:this._selectedNodes[0].asset,asset:e})).then(t=>{t.allow&&this.dispatchEvent(new OrAssetTreeAddEvent(t.detail))})}catch(t){console.error("Failed to copy asset",t),(0,_openremote_or_mwc_components_or_mwc_dialog__WEBPACK_IMPORTED_MODULE_11__.gs)("Failed to copy asset")}})}_onAddClicked(){let t,e=this._getAllowedChildTypes(this._selectedNodes[0]),n=e.filter(t=>"agent"===t.descriptorType),i=e.filter(t=>"asset"===t.descriptorType),r=this._selectedNodes&&1===this._selectedNodes.length?this._selectedNodes[0].asset:void 0,o=e=>{let n=!!e.detail.name&&e.detail.name.trim().length>0&&e.detail.name.trim().length<1024;t.shadowRoot.getElementById("add-btn").disabled=!e.detail.descriptor||!n};t=(0,_openremote_or_mwc_components_or_mwc_dialog__WEBPACK_IMPORTED_MODULE_11__.vC)(new _openremote_or_mwc_components_or_mwc_dialog__WEBPACK_IMPORTED_MODULE_11__.iq().setHeading(_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__.i18next.t("addAsset")).setContent((0,lit__WEBPACK_IMPORTED_MODULE_0__.dy)`
69
+ `}_isReadonly(){return this.readonly||!_openremote_core__WEBPACK_IMPORTED_MODULE_7___default().authenticated||!_openremote_core__WEBPACK_IMPORTED_MODULE_7___default().hasRole("write:assets")}shouldUpdate(t){var e;let n=super.shouldUpdate(t);if((t.has("assets")||t.has("rootAssets")||t.has("rootAssetIds"))&&(this._nodes=void 0),!this._nodes)return this._loadAssets(),!0;if(t.has("selectedIds")){let n=t.get("selectedIds");!_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.objectsEqual(n,this.selectedIds)&&(this._updateSelectedNodes(),(null==n?void 0:n.length)===1&&this._filter.asset===n[0]&&(this.applyFilter(new OrAssetTreeFilter,!0),(null==(e=this.selectedIds)?void 0:e.length)||this._doFiltering()))}return t.has("sortBy")&&this._updateSort(this._nodes,this._getSortFunction()),t.has("disabledSubscribe")&&this.disableSubscribe&&this._removeEventSubscriptions(),n}_updateSelectedNodes(){let t=[],e=[];OrAssetTree_1._forEachNodeRecursive(this._nodes,n=>{if(this.selectedIds&&this.selectedIds.indexOf(n.asset.id)>=0){t.push(n.asset.id),e.push(n),n.selected=!0;let i=n.parent;for(;i;)i.expanded=!0,i=i.parent}else n.selected=!1;if(this.checkboxes){let e=n.parent;for(;e;){let n=[];OrAssetTree_1._forEachNodeRecursive(e.children,t=>{n.push(t)}),e.someChildrenSelected=!1,e.allChildrenSelected=!1,n.every(e=>t.includes(e.asset.id))?e.allChildrenSelected=!0:n.some(e=>t.includes(e.asset.id))&&(e.someChildrenSelected=!0),e=e.parent}}}),this.selectedIds=t;let n=this._selectedNodes;this._selectedNodes=e,this.dispatchEvent(new OrAssetTreeSelectionEvent({oldNodes:n,newNodes:e}))}_updateSort(t,e){t&&(t.sort(e),t.forEach(t=>this._updateSort(t.children,e)))}_toggleExpander(t,e,n=!1){e&&e.expandable&&(e.expanded=!e.expanded,e.expanded?this._expandedNodes.push(e):this._expandedNodes=this._expandedNodes.filter(t=>t!==e),t.parentElement.parentElement.parentElement.toggleAttribute("data-expanded"),n||this.dispatchEvent(new OrAssetTreeToggleExpandEvent({node:e})),this.requestUpdate())}_buildPaths(t){let e=[];return t.asset&&t.asset.id?(e.push(t.asset.id),t.children.length>0&&t.expanded&&t.children.forEach(t=>{e=e.concat(this._buildPaths(t))}),e):[]}_findNode(t,e){if(t.asset&&t.asset.id){if(t.asset.id===e)return t;if(t.children.length>0&&t.expanded){let n;return t.children.forEach(t=>{n||(n=this._findNode(t,e))}),n}return}}_findNodeFromAssetId(t){if(this._nodes){let e;return this._nodes.forEach(n=>{e||(e=this._findNode(n,t))}),e}}_onNodeClicked(t,e){var n,i,r,o;if(t&&t.defaultPrevented)return;t&&t.preventDefault();let a=t&&t.target.className.indexOf("expander")>=0,l=t&&(null==(i=null==(n=t.target)?void 0:n.icon)?void 0:i.includes("checkbox-multiple"));if(a)this._toggleExpander(t.target,e);else{let n=!0;if(e&&this.config&&(null==(r=this.config.select)?void 0:r.types)&&(n=this.config.select.types.indexOf(e.asset.type)>=0),!n&&!l)return;let i=[];if(e){let n=this.selectedNodes.indexOf(e),r=!0,a=!0,c=!this._isReadonly()&&(!this.config||!this.config.select||!this.config.select.multiSelect);if((this.checkboxes||c&&t&&(t.ctrlKey||t.shiftKey||t.metaKey))&&(a=!1,n>=0&&this.selectedIds&&this.selectedIds.length>1&&(r=!1)),l){i=[...this.selectedNodes];let t=[];OrAssetTree_1._forEachNodeRecursive(e.children,e=>{var n,i;let r=!0;e&&(null==(i=null==(n=this.config)?void 0:n.select)?void 0:i.types)&&(r=this.config.select.types.indexOf(e.asset.type)>=0),r&&t.push(e)}),i=e.allChildrenSelected?i.filter(e=>!t.map(t=>t.asset.id).includes(e.asset.id)):i.concat(t)}else if(a)this._latestSelected=Object.assign({},e),i=[e];else if(r){if(n<0){if(t&&t.shiftKey){let t=[];if(null==(o=this._nodes)||o.forEach(e=>{t=t.concat(this._buildPaths(e))}),this._latestSelected&&this._latestSelected.asset&&this._latestSelected.asset.id&&e.asset&&e.asset.id){let n=this._latestSelected.asset.id,r=e.asset.id,o=t.findIndex(t=>t.includes(n)),a=t.findIndex(t=>t.includes(r)),l=-1,c=-1;o>a?(l=a,c=o):(l=o,c=a);let d=t.slice(l,c+1),s=[];d.forEach(t=>{let e=this._findNodeFromAssetId(t);e&&s.push(e)}),i=(i=[...this.selectedNodes]).concat(s)}}else(i=[...this.selectedNodes]).push(e);this._latestSelected=Object.assign({},e)}}else n>=0&&(1===(i=[...this.selectedNodes]).length&&(this._latestSelected=void 0),i.splice(n,1))}_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.dispatchCancellableEvent(this,new OrAssetTreeRequestSelectionEvent({oldNodes:this.selectedNodes,newNodes:i})).then(t=>{t.allow&&(this.selectedNodes=t.detail.newNodes)})}}_onDeselectClicked(){this._onNodeClicked(null,null)}parseFromInputFilter(t){var e;void 0===t&&(t=null==(e=this._filterInput)?void 0:e.value);let n=new OrAssetTreeFilter;if(t){let e=t,i=t.match(/(attribute\:)(\"[^"]+\")\S*/g);i&&(i.length>0&&i.forEach((t,i)=>{e=e.replace(t,"");let r=t.toString().indexOf("attribute:"),o=t.toString().substring(r+10+1,t.toString().length-1);n.attribute.push(o),n.attributeValue.push("")}),this._attributeValueFilter.disabled=!1),(i=t.match(/(type\:)\S+/g))&&i.length>0&&i.forEach((t,i)=>{e=e.replace(t,"");let r=t.toString().indexOf("type:"),o=t.toString().substring(r+5);n.assetType.push(o)}),(i=t.match(/(\"[^\"]+\")\:(([^\"\s]+)|(\"[^\"]+\"))/g))&&i.length>0&&i.forEach((t,i)=>{e=e.replace(t,"");let r=t.toString().indexOf('":'),o=t.toString().substring(r+2),a=t.toString().substring(1,r);'"'===o[0]&&'"'===o[o.length-1]&&(o=o.substring(1,o.length-1)),n.attribute.push(a),n.attributeValue.push(o)}),n.asset=e&&e.length>0?e.trim():void 0}return n}formatFilter(t){let e=t.asset?t.asset:"",n=t.asset?" ":"",i=[];return t.assetType.length>0&&t.assetType.forEach(t=>{e+=n+"type:"+t,n=" "}),t.attribute.length>0&&t.attributeValue.length>0&&t.attributeValue.forEach((r,o)=>{i.push(t.attribute[o]),e+=n+'"'+t.attribute[o]+'":'+r,n=" "}),t.attribute.length>0&&0===t.attributeValue.length&&t.attribute.forEach(t=>{i.includes(t)||(e+=n+'attribute:"'+t+'"',n=" ")}),e}_shouldEnableAttrTypeEvent(t){let e;t.composedPath()&&(e=t.composedPath()[0].value||void 0),this._shouldEnableAttrType(e)}_shouldEnableAttrType(t){t?this._attributeValueFilter.disabled=!1:this._attributeValueFilter.disabled=!0}applySettingFields(t){if(this._assetTypeFilter?t.assetType=[this._assetTypeFilter]:t.assetType=[],this._attributeNameFilter.value?t.attribute=[this._attributeNameFilter.value]:t.attribute=[],this._attributeNameFilter.value&&this._attributeValueFilter.value){let e=this._attributeValueFilter.value;e.includes(" ")&&(e='"'+e+'"'),t.attributeValue=[e]}else t.attributeValue=[];return t}_filterFromSettings(){let t=this.parseFromInputFilter(),e=this.applySettingFields(t);this.applyFilter(e);let n=this.formatFilter(this._filter);this._filterInput.value=n,this._filterSettingOpen=!1,this._doFiltering()}_onFilterInputEvent(t){var e;this._onFilterInput(null==(e=this._filterInput)?void 0:e.nativeValue,!1)}_onFilterInput(t,e){this.applyFilter(t),this._searchInputTimer&&clearTimeout(this._searchInputTimer),e?this._doFiltering():this._searchInputTimer=window.setTimeout(()=>{this._doFiltering()},350)}_doFiltering(){return __awaiter(this,void 0,void 0,function*(){if(this._searchInputTimer&&(clearTimeout(this._searchInputTimer),this._searchInputTimer=void 0),this.isConnected&&this._nodes){if(!this._filter.asset&&!this._filter.attribute&&!this._filter.assetType&&!this._filter.attributeValue){OrAssetTree_1._forEachNodeRecursive(this._nodes,t=>{t.notMatchingFilter=!1,t.hidden=!1}),this.requestUpdate("_nodes");return}if(this.disabled=!0,this._filter.asset||this._filter.assetType||this._filter.attribute){let t=!1;this._filter.attribute&&(t=!0),this.getMatcher(t).then(t=>{this._nodes&&(this._nodes.forEach(e=>{this.filterTreeNode(e,t)}),this.disabled=!1)})}}})}getMatcher(t){return t?this.getMatcherFromQuery():this.getSimpleNameMatcher()}getSimpleNameMatcher(){return __awaiter(this,void 0,void 0,function*(){return t=>{let e=!0;return this._filter.asset&&(e=e&&t.name.toLowerCase().includes(this._filter.asset.toLowerCase())),this._filter.assetType.length>0&&(e=e&&t.type.toLowerCase()===this._filter.assetType[0].toLowerCase()),e}})}getMatcherFromQuery(){return __awaiter(this,void 0,void 0,function*(){let assetCond,attributeCond,assetTypeCond,foundAssets,foundAssetIds,assetQueries=[];this._filter.asset&&(assetCond=[{predicateType:"string",match:"CONTAINS",value:this._filter.asset,caseSensitive:!1}]),this._filter.assetType.length>0&&(assetTypeCond=this._filter.assetType),this._filter.attribute.length>0&&(attributeCond={operator:"AND",items:this._filter.attribute.map(t=>({name:{predicateType:"string",match:"EXACT",value:_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.sentenceCaseToCamelCase(t),caseSensitive:!1}}))}),assetQueries.push({select:{attributes:attributeCond?void 0:[]},names:assetCond,types:assetTypeCond,attributes:attributeCond}),this._filter.asset&&22===this._filter.asset.length&&assetQueries.push({select:{attributes:attributeCond?void 0:[]},types:assetTypeCond,attributes:attributeCond,ids:[this._filter.asset],limit:1});try{let promises=assetQueries.map(t=>_openremote_core__WEBPACK_IMPORTED_MODULE_7___default().rest.api.AssetResource.queryAssets(t));foundAssetIds=(foundAssets=(yield Promise.all(promises)).flatMap(t=>t.data)).map(t=>t.id)}catch(e){console.error("Error querying Asset Tree assets with filter:",e),this._filter.assetType.forEach(t=>{-1===this._assetTypes.findIndex(e=>e.name===t)&&(0,_openremote_or_mwc_components_or_mwc_snackbar__WEBPACK_IMPORTED_MODULE_13__.OV)(void 0,"filter.assetTypeDoesNotExist","dismiss")}),foundAssetIds=[]}return asset=>{let attrValueCheck=!0;if(this._filter.attribute.length>0&&this._filter.attributeValue.length>0&&foundAssetIds.includes(asset.id)){let attributeVal=[];this._filter.attributeValue.forEach((t,e)=>{t.length>0&&attributeVal.push([this._filter.attribute[e],t])});let matchingAsset=foundAssets.find(t=>t.id===asset.id);if(matchingAsset&&matchingAsset.attributes)for(let attributeValIndex=0;attributeValIndex<attributeVal.length;attributeValIndex++){let currentAttributeVal=attributeVal[attributeValIndex],atLeastOneAttributeMatchValue=!1;Object.keys(matchingAsset.attributes).forEach(key=>{var _a,_b,_c;let attr=matchingAsset.attributes[key];if(attr.name.toLowerCase()===currentAttributeVal[0].toLowerCase())switch(attr.type){case"number":case"integer":case"long":case"bigInteger":case"bigNumber":case"positiveInteger":case"negativeInteger":case"positiveNumber":case"negativeNumber":{let normalizedValue=null==(_a=currentAttributeVal[1])?void 0:_a.replace(",",".");if(isNaN(Number(normalizedValue))){if(/\d/.test(normalizedValue)){normalizedValue.endsWith("%")&&(normalizedValue=null==normalizedValue?void 0:normalizedValue.replace("%","")),/^[0-9]/.test(normalizedValue)&&(normalizedValue="=="+normalizedValue);let func=attr.value+normalizedValue.replace(/[a-z]/gi,"");try{let resultNumberEval=eval(func);resultNumberEval&&(atLeastOneAttributeMatchValue=!0)}catch(_ignored){console.warn("Could not process filter on attribute number value;",func)}}}else(null!=(_b=attr.value)?_b:0)===Number(normalizedValue)&&(atLeastOneAttributeMatchValue=!0);break}case"boolean":{let value=currentAttributeVal[1];("false"===value||"true"===value)&&value===(null!=(_c=attr.value)&&_c).toString()&&(atLeastOneAttributeMatchValue=!0);break}case"text":if(attr.value){let unparsedValue=currentAttributeVal[1],multicharString="*",parsedValue=unparsedValue.replace(multicharString,".*");parsedValue=parsedValue.replace(/"/g,""),-1!=attr.value.toLowerCase().indexOf(parsedValue.toLowerCase())&&(atLeastOneAttributeMatchValue=!0)}}}),attrValueCheck=atLeastOneAttributeMatchValue}}return foundAssetIds.includes(asset.id)&&attrValueCheck}})}isAnyFilter(){return void 0!==this._filter.asset||this._filter.assetType.length>0||this._filter.attribute.length>0}filterTreeNode(t,e,n=!1){let i=e(t.asset);t.notMatchingFilter=!i;let r=t.children.map(t=>this.filterTreeNode(t,e,i)).some(t=>t);return i=i||r,t.expanded=r&&t.children.length>0&&this.isAnyFilter(),t.hidden=!i&&!n,i}_onCopyClicked(){return __awaiter(this,void 0,void 0,function*(){if(1===this._selectedNodes.length)try{let t=yield _openremote_core__WEBPACK_IMPORTED_MODULE_7___default().rest.api.AssetResource.get(this._selectedNodes[0].asset.id);if(!t.data)throw Error("API returned an invalid response when retrieving the source asset");let e=JSON.parse(JSON.stringify(t.data));e.name+=" copy",delete e.id,delete e.path,delete e.createdOn,delete e.version,_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.dispatchCancellableEvent(this,new OrAssetTreeRequestAddEvent({sourceAsset:this._selectedNodes[0].asset,asset:e})).then(t=>{t.allow&&this.dispatchEvent(new OrAssetTreeAddEvent(t.detail))})}catch(t){console.error("Failed to copy asset",t),(0,_openremote_or_mwc_components_or_mwc_dialog__WEBPACK_IMPORTED_MODULE_11__.gs)("Failed to copy asset")}})}_onAddClicked(){let t,e=this._getAllowedChildTypes(this._selectedNodes[0]),n=e.filter(t=>"agent"===t.descriptorType),i=e.filter(t=>"asset"===t.descriptorType),r=this._selectedNodes&&1===this._selectedNodes.length?this._selectedNodes[0].asset:void 0,o=e=>{let n=!!e.detail.name&&e.detail.name.trim().length>0&&e.detail.name.trim().length<1024;t.shadowRoot.getElementById("add-btn").disabled=!e.detail.descriptor||!n};t=(0,_openremote_or_mwc_components_or_mwc_dialog__WEBPACK_IMPORTED_MODULE_11__.vC)(new _openremote_or_mwc_components_or_mwc_dialog__WEBPACK_IMPORTED_MODULE_11__.iq().setHeading(_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__.i18next.t("addAsset")).setContent((0,lit__WEBPACK_IMPORTED_MODULE_0__.dy)`
70
70
  <or-add-asset-dialog id="add-panel" .config="${this.config}" .agentTypes="${n}" .assetTypes="${i}" .parent="${r}" @or-add-asset-changed="${o}"></or-add-asset-dialog>
71
71
  `).setActions([{actionName:"cancel",content:"cancel"},{actionName:"add",content:(0,lit__WEBPACK_IMPORTED_MODULE_0__.dy)`<or-mwc-input id="add-btn" class="button" .type="${_openremote_or_mwc_components_or_mwc_input__WEBPACK_IMPORTED_MODULE_2__.n$.BUTTON}" label="add" disabled></or-mwc-input>`,action:()=>{let e=t.shadowRoot.getElementById("add-panel"),n=e.selectedType,i=e.selectedAttributes,r=e.name.trim(),o=e.parent;if(!n)return;let a={name:r,type:n.name,realm:_openremote_core__WEBPACK_IMPORTED_MODULE_7___default().displayRealm},l=_openremote_model__WEBPACK_IMPORTED_MODULE_4__.AssetModelUtil.getAssetTypeInfo(n.name);if(!l)return;l.attributeDescriptors&&(a.attributes={},l.attributeDescriptors.filter(t=>!t.optional).forEach(t=>{a.attributes[t.name]={name:t.name,type:t.type,meta:t.meta?Object.assign({},t.meta):void 0}})),i&&(null==i||i.forEach(t=>{a.attributes[t.name]={name:t.name,type:t.type,meta:t.meta?Object.assign({},t.meta):void 0}})),this.selectedIds&&(a.parentId=o?o.id:void 0);let c={asset:a};_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.dispatchCancellableEvent(this,new OrAssetTreeRequestAddEvent(c)).then(t=>{t.allow&&this.dispatchEvent(new OrAssetTreeAddEvent(t.detail))})}}]).setStyles((0,lit__WEBPACK_IMPORTED_MODULE_0__.dy)`
72
72
  <style>
@@ -74,7 +74,7 @@
74
74
  padding: 0 !important;
75
75
  }
76
76
  </style>
77
- `).setDismissAction(null))}_gatewayDescendantIsSelected(){return this._selectedNodes.some(t=>{var e;let n=null==t?void 0:t.parent;for(;n;){if((null==(e=n.asset)?void 0:e.type)==="GatewayAsset")return!0;n=n.parent}return!1})}_onDeleteClicked(){this._selectedNodes.length>0&&_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.dispatchCancellableEvent(this,new OrAssetTreeRequestDeleteEvent(this._selectedNodes)).then(t=>{t.allow&&this._doDelete()})}_onSortClicked(t){this.sortBy=t}_doDelete(){if(!this._selectedNodes||0===this._selectedNodes.length)return;let t=new Set,e=this._selectedNodes.filter(e=>{var n;return(null==(n=e.asset)?void 0:n.type)!=="GatewayAsset"||(t.add(e.asset),!1)});OrAssetTree_1._forEachNodeRecursive(e,e=>{var n;let i=e.parent,r=!0;for(;i&&r;)"GatewayAsset"===(null==(n=null==i?void 0:i.asset)?void 0:n.type)&&(r=!1),i=i.parent;r&&t.add(e.asset)});let n=Array.from(t).map(t=>t.id),i=Array.from(t).map(t=>t.name),r=()=>{this.disabled=!0,_openremote_core__WEBPACK_IMPORTED_MODULE_7___default().rest.api.AssetResource.delete({assetId:n},{paramsSerializer:t=>qs__WEBPACK_IMPORTED_MODULE_8___default().stringify(t,{arrayFormat:"repeat"})}).then(t=>{this.refresh(),this.disabled=!1,204!==t.status&&(0,_openremote_or_mwc_components_or_mwc_dialog__WEBPACK_IMPORTED_MODULE_11__.gs)(_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__.i18next.t("deleteAssetsFailed"))}).catch(t=>{this.refresh(),this.disabled=!1,(0,_openremote_or_mwc_components_or_mwc_dialog__WEBPACK_IMPORTED_MODULE_11__.gs)(_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__.i18next.t("deleteAssetsFailed"))})};(0,_openremote_or_mwc_components_or_mwc_dialog__WEBPACK_IMPORTED_MODULE_11__.w)(_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__.i18next.t("deleteAssets"),_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__.i18next.t("deleteAssetsConfirm",{assetNames:i.join(",\n- ")}),_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__.i18next.t("delete")).then(t=>{t&&r()})}_canAdd(){var t;if(this._selectedNodes&&this._selectedNodes.length>1)return!1;let e=this._selectedNodes?this._selectedNodes[0]:void 0;return!((null==(t=null==e?void 0:e.asset)?void 0:t.type)==="GatewayAsset"||this._gatewayDescendantIsSelected())&&this._getAllowedChildTypes(e).length>0}_getAllowedChildTypes(t){let e,n;if(this.config&&this.config.add){if(this.config.add.typesProvider){let e=this.config.add.typesProvider(t);if(e)return e}if(this.config.add.typesParent){let i;!t&&this.config.add.typesParent.none?i=this.config.add.typesParent.none:t&&this.config.add.typesParent.assetTypes&&(i=this.config.add.typesParent.assetTypes[t.asset.type]),i||(i=this.config.add.typesParent.default),i&&(e=i.include,n=i.exclude||[])}}return _openremote_model__WEBPACK_IMPORTED_MODULE_4__.AssetModelUtil.getAssetDescriptors().filter(t=>(!e||e.some(e=>_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.stringMatch(e,t.name)))&&(!n||!n.some(e=>_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.stringMatch(e,t.name))))}_getSortFunction(){return"createdOn"===this.sortBy?_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.sortByNumber(t=>t.asset[this.sortBy]):_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.sortByString(t=>t.asset[this.sortBy])}_loadAssets(){let t=this._getSortFunction();if(this.assets)this._loading=!1,this._buildTreeNodes(this.assets,t);else{if(!this._connected||this._loading)return;if(this._loading=!0,this.dataProvider)this.dataProvider().then(e=>{this._loading=!1,this._buildTreeNodes(e,t)});else{let e={realm:{name:_openremote_core__WEBPACK_IMPORTED_MODULE_7___default().displayRealm},select:{attributes:[]}};this.assetIds?(e.ids=this.assetIds,e.recursive=!0):this.rootAssets?(e.ids=this.rootAssets.map(t=>t.id),e.recursive=!0):this.rootAssetIds&&(e.ids=this.rootAssetIds,e.recursive=!0),this._sendEventWithReply({eventType:"read-assets",assetQuery:e}).then(e=>{this._loading=!1,this._buildTreeNodes(e.assets,t)})}}}_addEventSubscriptions(){return __awaiter(this,void 0,void 0,function*(){this.disableSubscribe||(this._subscriptionIds=[(yield _openremote_core__WEBPACK_IMPORTED_MODULE_7___default().getEventProvider().subscribeAssetEvents(void 0,!1,t=>this._onEvent(t)))])})}onEventsConnect(){this._connected=!0,this._loadAssets()}onEventsDisconnect(){this._connected=!1,this._nodes=void 0}getNodes(){return this._nodes||[]}_onEvent(t){if("assets"===t.eventType){let e=t;this._buildTreeNodes(e.assets,this._getSortFunction());return}if("asset"===t.eventType){let e=t;if("READ"===e.cause||"UPDATE"===e.cause&&!(e.updatedProperties.includes("name")||e.updatedProperties.includes("parentId")))return;let n=[];"DELETE"!==e.cause&&n.push(e.asset),this._nodes&&OrAssetTree_1._forEachNodeRecursive(this._nodes,t=>{t.asset.id!==e.asset.id&&n.push(t.asset)}),this._buildTreeNodes(n,this._getSortFunction()),this._filterInput.value&&this._doFiltering(),this.dispatchEvent(new OrAssetTreeAssetEvent(e))}}_buildTreeNodes(t,e){if(t&&0!==t.length){let n,i;_openremote_core__WEBPACK_IMPORTED_MODULE_7___default().isRestrictedUser()&&t.forEach(e=>{if(e.parentId&&e.path&&void 0===t.find(t=>t.id===e.parentId)){let n=null;for(let i=0;i<e.path.length;i++){let r=e.path[i];e.id!==r&&void 0!==t.find(t=>t.id===r)&&(n=r)}e.reparentId=n}}),this.rootAssetIds?n=this.rootAssetIds:this.rootAssets&&(n=this.rootAssets.map(t=>t.id)),i=n?t.filter(t=>n.indexOf(t.id)>=0||null===t.reparentId).map(t=>({asset:t})):t.filter(t=>!t.parentId||null===t.reparentId).map(t=>({asset:t})),this.assetsChildren={},t.forEach(t=>{t.parentId&&(this.assetsChildren[t.parentId]||(this.assetsChildren[t.parentId]=[]),this.assetsChildren[t.parentId].push({asset:t})),t.reparentId&&(this.assetsChildren[t.reparentId]||(this.assetsChildren[t.reparentId]=[]),this.assetsChildren[t.reparentId].push({asset:t}))}),i.sort(e),i.forEach(n=>this._buildChildTreeNodes(n,t,e)),this._nodes=i;let r=[];this._expandedNodes.forEach(t=>{OrAssetTree_1._forEachNodeRecursive(this._nodes,e=>{if(e.asset&&t&&t.asset&&e.asset.id===t.asset.id){e.expanded=!0,r.push(e);let t=e.parent;for(;t;)t.expanded=!0,t=t.parent,0>r.indexOf(t)&&r.push(t)}})}),this._expandedNodes=r}else this._nodes=[];this.selectedIds&&this.selectedIds.length>0&&this._updateSelectedNodes(),this.expandAllNodes&&OrAssetTree_1._forEachNodeRecursive(this._nodes,t=>{t.children&&t.children.length>0&&(t.expanded=!0)})}_buildChildTreeNodes(t,e,n){let i=this.assetsChildren[t.asset.id];t.children=i?i.sort(n):[],t.children.length>0&&(t.expandable=!0),t.children.forEach(i=>{i.parent=t,this._buildChildTreeNodes(i,e,n)})}_onDragStart(t){this._dragDropParentId=null;let e=t.currentTarget.getAttribute("node-asset-id");this.selectedIds||(this.selectedIds=[]),e&&this.selectedIds&&!this.selectedIds.includes(e)&&(t.ctrlKey||t.shiftKey||(this.selectedIds=[]),this.selectedIds.push(e))}_onDragEnd(t){let e=t.x,n=t.y;if(null!==this.shadowRoot){let t=this.shadowRoot.getElementById("list");if(t){let i=t.getBoundingClientRect().top,r=t.getBoundingClientRect().bottom,o=t.getBoundingClientRect().left,a=t.getBoundingClientRect().right;if(e<o||e>a||n>r||n<i)return}}this.selectedIds&&this.dispatchEvent(new OrAssetTreeChangeParentEvent(!this._dragDropParentId?void 0:this._dragDropParentId,this.selectedIds))}isExpandable(t){return!!(this._nodes&&this.shadowRoot&&this.shadowRoot.querySelector('[node-asset-id="'+t+'"] > .node-name > [data-expandable]'))||!1}_onDragOver(t){let e=t.currentTarget;e.classList.add("over");let n=e.getAttribute("node-asset-id");n&&this.isExpandable(n)&&!this._expandTimer&&(this._expandTimer=window.setTimeout(()=>{this.expandNode(n)},1e3))}expandNode(t){var e;if(this.shadowRoot&&t&&t===this._dragDropParentId){let n=this._findNodeFromAssetId(t),i=null==(e=this.shadowRoot)?void 0:e.querySelector('[node-asset-id="'+t+'"]');i&&n&&!n.expanded&&this._toggleExpander(i.firstElementChild.firstElementChild,n,!0)}}_onDragEnter(t){let e=t.currentTarget;e.classList.add("over");let n=e.getAttribute("node-asset-id");this._dragDropParentId=n}_onDragLeave(t){t.currentTarget.classList.remove("over"),clearTimeout(this._expandTimer),this._expandTimer=void 0}_treeNodeTemplate(t,e){let n,i=_openremote_model__WEBPACK_IMPORTED_MODULE_4__.AssetModelUtil.getAssetDescriptor(t.asset.type);if(n=t.allChildrenSelected?"checkbox-multiple-marked":t.someChildrenSelected?"checkbox-multiple-marked-outline":"checkbox-multiple-blank-outline",t.hidden)return(0,lit__WEBPACK_IMPORTED_MODULE_0__.dy)``;let r=!1;return t.asset&&t.notMatchingFilter&&(r=!0),t.expanded&&0===t.children.length&&(t.expanded=!1),this.expandedIds&&-1!==this.expandedIds.findIndex(e=>e===t.asset.id)&&(t.expanded=!0),(0,lit__WEBPACK_IMPORTED_MODULE_0__.dy)`
77
+ `).setDismissAction(null))}_gatewayDescendantIsSelected(){return this._selectedNodes.some(t=>{var e;let n=null==t?void 0:t.parent;for(;n;){if((null==(e=n.asset)?void 0:e.type)==="GatewayAsset")return!0;n=n.parent}return!1})}_onDeleteClicked(){this._selectedNodes.length>0&&_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.dispatchCancellableEvent(this,new OrAssetTreeRequestDeleteEvent(this._selectedNodes)).then(t=>{t.allow&&this._doDelete()})}_onSortClicked(t){this.sortBy=t}_doDelete(){if(!this._selectedNodes||0===this._selectedNodes.length)return;let t=new Set,e=this._selectedNodes.filter(e=>{var n;return(null==(n=e.asset)?void 0:n.type)!=="GatewayAsset"||(t.add(e.asset),!1)});OrAssetTree_1._forEachNodeRecursive(e,e=>{var n;let i=e.parent,r=!0;for(;i&&r;)"GatewayAsset"===(null==(n=null==i?void 0:i.asset)?void 0:n.type)&&(r=!1),i=i.parent;r&&t.add(e.asset)});let n=Array.from(t).map(t=>t.id),i=Array.from(t).map(t=>t.name),r=()=>{this.disabled=!0,_openremote_core__WEBPACK_IMPORTED_MODULE_7___default().rest.api.AssetResource.delete({assetId:n},{paramsSerializer:t=>qs__WEBPACK_IMPORTED_MODULE_8___default().stringify(t,{arrayFormat:"repeat"})}).then(t=>{this.refresh(),this.disabled=!1,204!==t.status&&(0,_openremote_or_mwc_components_or_mwc_dialog__WEBPACK_IMPORTED_MODULE_11__.gs)(_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__.i18next.t("deleteAssetsFailed"))}).catch(t=>{this.refresh(),this.disabled=!1,(0,_openremote_or_mwc_components_or_mwc_dialog__WEBPACK_IMPORTED_MODULE_11__.gs)(_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__.i18next.t("deleteAssetsFailed"))})};(0,_openremote_or_mwc_components_or_mwc_dialog__WEBPACK_IMPORTED_MODULE_11__.w)(_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__.i18next.t("deleteAssets"),_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__.i18next.t("deleteAssetsConfirm",{assetNames:i.join(",\n- ")}),_openremote_or_translate__WEBPACK_IMPORTED_MODULE_5__.i18next.t("delete")).then(t=>{t&&r()})}_canAdd(){var t;if(this._selectedNodes&&this._selectedNodes.length>1)return!1;let e=this._selectedNodes?this._selectedNodes[0]:void 0;return!((null==(t=null==e?void 0:e.asset)?void 0:t.type)==="GatewayAsset"||this._gatewayDescendantIsSelected())&&this._getAllowedChildTypes(e).length>0}_getAllowedChildTypes(t){let e,n;if(this.config&&this.config.add){if(this.config.add.typesProvider){let e=this.config.add.typesProvider(t);if(e)return e}if(this.config.add.typesParent){let i;!t&&this.config.add.typesParent.none?i=this.config.add.typesParent.none:t&&this.config.add.typesParent.assetTypes&&(i=this.config.add.typesParent.assetTypes[t.asset.type]),i||(i=this.config.add.typesParent.default),i&&(e=i.include,n=i.exclude||[])}}return _openremote_model__WEBPACK_IMPORTED_MODULE_4__.AssetModelUtil.getAssetDescriptors().filter(t=>(!e||e.some(e=>_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.stringMatch(e,t.name)))&&(!n||!n.some(e=>_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.stringMatch(e,t.name))))}_getSortFunction(){return"createdOn"===this.sortBy?_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.sortByNumber(t=>t.asset[this.sortBy]):_openremote_core__WEBPACK_IMPORTED_MODULE_7__.Util.sortByString(t=>t.asset[this.sortBy])}_loadAssets(){let t=this._getSortFunction();if(this.assets)this._loading=!1,this._buildTreeNodes(this.assets,t);else{if(!this._connected||this._loading)return;if(this._loading=!0,this.dataProvider)this.dataProvider().then(e=>{var n;this._loading=!1,this._buildTreeNodes(e,t),(null==(n=this._filterInput)?void 0:n.value)&&this._doFiltering()});else{let e={realm:{name:_openremote_core__WEBPACK_IMPORTED_MODULE_7___default().displayRealm},select:{attributes:[]}};this.assetIds?(e.ids=this.assetIds,e.recursive=!0):this.rootAssets?(e.ids=this.rootAssets.map(t=>t.id),e.recursive=!0):this.rootAssetIds&&(e.ids=this.rootAssetIds,e.recursive=!0),this._sendEventWithReply({eventType:"read-assets",assetQuery:e}).then(e=>{var n;this._loading=!1,this._buildTreeNodes(e.assets,t),(null==(n=this._filterInput)?void 0:n.value)&&this._doFiltering()})}}}_addEventSubscriptions(){return __awaiter(this,void 0,void 0,function*(){this.disableSubscribe||(this._subscriptionIds=[(yield _openremote_core__WEBPACK_IMPORTED_MODULE_7___default().getEventProvider().subscribeAssetEvents(void 0,!1,t=>this._onEvent(t)))])})}onEventsConnect(){this._connected=!0,this._loadAssets()}onEventsDisconnect(){this._connected=!1,this._nodes=void 0}getNodes(){return this._nodes||[]}_onEvent(t){var e;if("assets"===t.eventType){let e=t;this._buildTreeNodes(e.assets,this._getSortFunction());return}if("asset"===t.eventType){let n=t;if("READ"===n.cause||"UPDATE"===n.cause&&!(n.updatedProperties.includes("name")||n.updatedProperties.includes("parentId")))return;let i=[];"DELETE"!==n.cause&&i.push(n.asset),this._nodes&&OrAssetTree_1._forEachNodeRecursive(this._nodes,t=>{t.asset.id!==n.asset.id&&i.push(t.asset)}),this._buildTreeNodes(i,this._getSortFunction()),(null==(e=this._filterInput)?void 0:e.value)&&this._doFiltering(),this.dispatchEvent(new OrAssetTreeAssetEvent(n))}}_buildTreeNodes(t,e){if(t&&0!==t.length){let n,i;_openremote_core__WEBPACK_IMPORTED_MODULE_7___default().isRestrictedUser()&&t.forEach(e=>{if(e.parentId&&e.path&&void 0===t.find(t=>t.id===e.parentId)){let n=null;for(let i=0;i<e.path.length;i++){let r=e.path[i];e.id!==r&&void 0!==t.find(t=>t.id===r)&&(n=r)}e.reparentId=n}}),this.rootAssetIds?n=this.rootAssetIds:this.rootAssets&&(n=this.rootAssets.map(t=>t.id)),i=n?t.filter(t=>n.indexOf(t.id)>=0||null===t.reparentId).map(t=>({asset:t})):t.filter(t=>!t.parentId||null===t.reparentId).map(t=>({asset:t})),this.assetsChildren={},t.forEach(t=>{t.parentId&&(this.assetsChildren[t.parentId]||(this.assetsChildren[t.parentId]=[]),this.assetsChildren[t.parentId].push({asset:t})),t.reparentId&&(this.assetsChildren[t.reparentId]||(this.assetsChildren[t.reparentId]=[]),this.assetsChildren[t.reparentId].push({asset:t}))}),i.sort(e),i.forEach(n=>this._buildChildTreeNodes(n,t,e)),this._nodes=i;let r=[];this._expandedNodes.forEach(t=>{OrAssetTree_1._forEachNodeRecursive(this._nodes,e=>{if(e.asset&&t&&t.asset&&e.asset.id===t.asset.id){e.expanded=!0,r.push(e);let t=e.parent;for(;t;)t.expanded=!0,t=t.parent,0>r.indexOf(t)&&r.push(t)}})}),this._expandedNodes=r}else this._nodes=[];this.selectedIds&&this.selectedIds.length>0&&this._updateSelectedNodes(),this.expandAllNodes&&OrAssetTree_1._forEachNodeRecursive(this._nodes,t=>{t.children&&t.children.length>0&&(t.expanded=!0)})}_buildChildTreeNodes(t,e,n){let i=this.assetsChildren[t.asset.id];t.children=i?i.sort(n):[],t.children.length>0&&(t.expandable=!0),t.children.forEach(i=>{i.parent=t,this._buildChildTreeNodes(i,e,n)})}_onDragStart(t){this._dragDropParentId=null;let e=t.currentTarget.getAttribute("node-asset-id");this.selectedIds||(this.selectedIds=[]),e&&this.selectedIds&&!this.selectedIds.includes(e)&&(t.ctrlKey||t.shiftKey||(this.selectedIds=[]),this.selectedIds.push(e))}_onDragEnd(t){let e=t.x,n=t.y;if(null!==this.shadowRoot){let t=this.shadowRoot.getElementById("list");if(t){let i=t.getBoundingClientRect().top,r=t.getBoundingClientRect().bottom,o=t.getBoundingClientRect().left,a=t.getBoundingClientRect().right;if(e<o||e>a||n>r||n<i)return}}this.selectedIds&&this.dispatchEvent(new OrAssetTreeChangeParentEvent(!this._dragDropParentId?void 0:this._dragDropParentId,this.selectedIds))}isExpandable(t){return!!(this._nodes&&this.shadowRoot&&this.shadowRoot.querySelector('[node-asset-id="'+t+'"] > .node-name > [data-expandable]'))||!1}_onDragOver(t){let e=t.currentTarget;e.classList.add("over");let n=e.getAttribute("node-asset-id");n&&this.isExpandable(n)&&!this._expandTimer&&(this._expandTimer=window.setTimeout(()=>{this.expandNode(n)},1e3))}expandNode(t){var e;if(this.shadowRoot&&t&&t===this._dragDropParentId){let n=this._findNodeFromAssetId(t),i=null==(e=this.shadowRoot)?void 0:e.querySelector('[node-asset-id="'+t+'"]');i&&n&&!n.expanded&&this._toggleExpander(i.firstElementChild.firstElementChild,n,!0)}}_onDragEnter(t){let e=t.currentTarget;e.classList.add("over");let n=e.getAttribute("node-asset-id");this._dragDropParentId=n}_onDragLeave(t){t.currentTarget.classList.remove("over"),clearTimeout(this._expandTimer),this._expandTimer=void 0}_treeNodeTemplate(t,e){let n,i=_openremote_model__WEBPACK_IMPORTED_MODULE_4__.AssetModelUtil.getAssetDescriptor(t.asset.type);if(n=t.allChildrenSelected?"checkbox-multiple-marked":t.someChildrenSelected?"checkbox-multiple-marked-outline":"checkbox-multiple-blank-outline",t.hidden)return(0,lit__WEBPACK_IMPORTED_MODULE_0__.dy)``;let r=!1;return t.asset&&t.notMatchingFilter&&(r=!0),t.expanded&&0===t.children.length&&(t.expanded=!1),this.expandedIds&&-1!==this.expandedIds.findIndex(e=>e===t.asset.id)&&(t.expanded=!0),(0,lit__WEBPACK_IMPORTED_MODULE_0__.dy)`
78
78
  <li class="asset-list-element" ?data-selected="${t.selected}" ?data-expanded="${t.expanded}" @click="${e=>this._onNodeClicked(e,t)}">
79
79
  <div class="in-between-element" node-asset-id="${t.parent?t.parent.asset?t.parent.asset.id:"":void 0}" @dragleave=${t=>{this._onDragLeave(t)}} @dragenter="${t=>this._onDragEnter(t)}" @dragend="${t=>this._onDragEnd(t)}" @dragover="${t=>this._onDragOver(t)}"></div>
80
80
  <div class="node-container draggable" node-asset-id="${t.asset?t.asset.id:""}" draggable="${!this._isReadonly()}" @dragleave=${t=>{this._onDragLeave(t)}} @dragenter="${t=>this._onDragEnter(t)}" @dragstart="${t=>this._onDragStart(t)}" @dragend="${t=>this._onDragEnd(t)}" @dragover="${t=>this._onDragOver(t)}" style="padding-left: ${22*e}px">