UNPKG

balm-ui

Version:

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

1 lines 75.5 kB
!function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define("UiTable",["vue"],t):"object"===typeof exports?exports.UiTable=t(require("vue")):e.UiTable=t(e.Vue)}("undefined"!==typeof self?self:this,(function(e){return function(){"use strict";var t={744:function(e){var t=function(e){return function(e){return!!e&&"object"===typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===r}(e)}(e)};var r="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?c((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function o(e,t,r){return e.concat(t).map((function(e){return n(e,r)}))}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function i(e,t){try{return t in e}catch(r){return!1}}function s(e,t,r){var o={};return r.isMergeableObject(e)&&a(e).forEach((function(t){o[t]=n(e[t],r)})),a(t).forEach((function(a){(function(e,t){return i(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,a)||(i(e,a)&&r.isMergeableObject(t[a])?o[a]=function(e,t){if(!t.customMerge)return c;var r=t.customMerge(e);return"function"===typeof r?r:c}(a,r)(e[a],t[a],r):o[a]=n(t[a],r))})),o}function c(e,r,a){(a=a||{}).arrayMerge=a.arrayMerge||o,a.isMergeableObject=a.isMergeableObject||t,a.cloneUnlessOtherwiseSpecified=n;var i=Array.isArray(r);return i===Array.isArray(e)?i?a.arrayMerge(e,r,a):s(e,r,a):n(r,a)}c.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return c(e,r,t)}),{})};var l=c;e.exports=l},154:function(t){t.exports=e}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var a=r[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};n.d(o,{default:function(){return Lt}});var a=n(744),i=n.n(a);const s=/(?:^\[object\s(.*?)\]$)/;var c=e=>Object.prototype.toString.call(e).replace(s,"$1").toLowerCase();const l=e=>{let{componentProps:t,propName:r,props:n}=e,o=n[r];if("object"===c(o)){const e=t[r].default;t[r].default=()=>i()(e,o)}else Array.isArray(o)?t[r].default=()=>o:t[r].default=o},d=e=>{let{componentMixins:t,propName:r,props:n}=e;if(t.length){let e=t.length;for(;e--;)if(t[e].props&&void 0!==t[e].props[r]){l({componentProps:t[e].props,propName:r,props:n});break}}};var u=(e,t)=>{for(const r of Object.keys(t))e.props?void 0===e.props[r]?d({componentMixins:e.mixins,propName:r,props:t}):l({componentProps:e.props,propName:r,props:t}):d({componentMixins:e.mixins,propName:r,props:t})};var f=e=>{const t={install(t){u(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),t.component(e.name,e)}};return t},h=n(154),p=function(e,t){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},p(e,t)};function m(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var C=function(){return C=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},C.apply(this,arguments)};function y(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{c(n.next(e))}catch(t){a(t)}}function s(e){try{c(n.throw(e))}catch(t){a(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(i,s)}c((n=n.apply(e,t||[])).next())}))}function b(e,t){var r,n,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(c){s=[6,c],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}Object.create;function E(e){var t="function"===typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var r="function"===typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(s){o={error:s}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function g(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}Object.create;"function"===typeof SuppressedError&&SuppressedError;var A=function(){function e(e){void 0===e&&(e={}),this.adapter=e}return Object.defineProperty(e,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),e.prototype.init=function(){},e.prototype.destroy=function(){},e}(),S=function(){function e(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];this.root=e,this.initialize.apply(this,g([],v(r))),this.foundation=void 0===t?this.getDefaultFoundation():t,this.foundation.init(),this.initialSyncWithDOM()}return e.attachTo=function(t){return new e(t,new A({}))},e.prototype.initialize=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},e.prototype.initialSyncWithDOM=function(){},e.prototype.destroy=function(){this.foundation.destroy()},e.prototype.listen=function(e,t,r){this.root.addEventListener(e,t,r)},e.prototype.unlisten=function(e,t,r){this.root.removeEventListener(e,t,r)},e.prototype.emit=function(e,t,r){var n;void 0===r&&(r=!1),"function"===typeof CustomEvent?n=new CustomEvent(e,{bubbles:r,detail:t}):(n=document.createEvent("CustomEvent")).initCustomEvent(e,r,!1,t),this.root.dispatchEvent(n)},e}(),w={animation:{prefixed:"-webkit-animation",standard:"animation"},transform:{prefixed:"-webkit-transform",standard:"transform"},transition:{prefixed:"-webkit-transition",standard:"transition"}},_={animationend:{cssProperty:"animation",prefixed:"webkitAnimationEnd",standard:"animationend"},animationiteration:{cssProperty:"animation",prefixed:"webkitAnimationIteration",standard:"animationiteration"},animationstart:{cssProperty:"animation",prefixed:"webkitAnimationStart",standard:"animationstart"},transitionend:{cssProperty:"transition",prefixed:"webkitTransitionEnd",standard:"transitionend"}};function k(e){return Boolean(e.document)&&"function"===typeof e.document.createElement}function I(e,t){if(k(e)&&t in _){var r=e.document.createElement("div"),n=_[t],o=n.standard,a=n.prefixed;return n.cssProperty in r.style?o:a}return t}function x(e){return void 0===e&&(e=window),!!function(e){void 0===e&&(e=window);var t=!1;try{var r={get passive(){return t=!0,!1}},n=function(){};e.document.addEventListener("test",n,r),e.document.removeEventListener("test",n,r)}catch(o){t=!1}return t}(e)&&{passive:!0}}function R(e,t){if(e.closest)return e.closest(t);for(var r=e;r;){if(L(r,t))return r;r=r.parentElement}return null}function L(e,t){return(e.matches||e.webkitMatchesSelector||e.msMatchesSelector).call(e,t)}var T,N={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},O={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"},D={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};var B=["touchstart","pointerdown","mousedown","keydown"],H=["touchend","pointerup","mouseup","contextmenu"],P=[],M=function(e){function t(r){var n=e.call(this,C(C({},t.defaultAdapter),r))||this;return n.activationAnimationHasEnded=!1,n.activationTimer=0,n.fgDeactivationRemovalTimer=0,n.fgScale="0",n.frame={width:0,height:0},n.initialSize=0,n.layoutFrame=0,n.maxRadius=0,n.unboundedCoords={left:0,top:0},n.activationState=n.defaultActivationState(),n.activationTimerCallback=function(){n.activationAnimationHasEnded=!0,n.runDeactivationUXLogicIfReady()},n.activateHandler=function(e){n.activateImpl(e)},n.deactivateHandler=function(){n.deactivateImpl()},n.focusHandler=function(){n.handleFocus()},n.blurHandler=function(){n.handleBlur()},n.resizeHandler=function(){n.layout()},n}return m(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return N},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return O},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return D},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){var e=this,r=this.supportsPressRipple();if(this.registerRootHandlers(r),r){var n=t.cssClasses,o=n.ROOT,a=n.UNBOUNDED;requestAnimationFrame((function(){e.adapter.addClass(o),e.adapter.isUnbounded()&&(e.adapter.addClass(a),e.layoutInternal())}))}},t.prototype.destroy=function(){var e=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(t.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(t.cssClasses.FG_DEACTIVATION));var r=t.cssClasses,n=r.ROOT,o=r.UNBOUNDED;requestAnimationFrame((function(){e.adapter.removeClass(n),e.adapter.removeClass(o),e.removeCssVars()}))}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},t.prototype.activate=function(e){this.activateImpl(e)},t.prototype.deactivate=function(){this.deactivateImpl()},t.prototype.layout=function(){var e=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame((function(){e.layoutInternal(),e.layoutFrame=0}))},t.prototype.setUnbounded=function(e){var r=t.cssClasses.UNBOUNDED;e?this.adapter.addClass(r):this.adapter.removeClass(r)},t.prototype.handleFocus=function(){var e=this;requestAnimationFrame((function(){return e.adapter.addClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.handleBlur=function(){var e=this;requestAnimationFrame((function(){return e.adapter.removeClass(t.cssClasses.BG_FOCUSED)}))},t.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},t.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},t.prototype.registerRootHandlers=function(e){var t,r;if(e){try{for(var n=E(B),o=n.next();!o.done;o=n.next()){var a=o.value;this.adapter.registerInteractionHandler(a,this.activateHandler)}}catch(i){t={error:i}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},t.prototype.registerDeactivationHandlers=function(e){var t,r;if("keydown"===e.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var n=E(H),o=n.next();!o.done;o=n.next()){var a=o.value;this.adapter.registerDocumentInteractionHandler(a,this.deactivateHandler)}}catch(i){t={error:i}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},t.prototype.deregisterRootHandlers=function(){var e,t;try{for(var r=E(B),n=r.next();!n.done;n=r.next()){var o=n.value;this.adapter.deregisterInteractionHandler(o,this.activateHandler)}}catch(a){e={error:a}}finally{try{n&&!n.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},t.prototype.deregisterDeactivationHandlers=function(){var e,t;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var r=E(H),n=r.next();!n.done;n=r.next()){var o=n.value;this.adapter.deregisterDocumentInteractionHandler(o,this.deactivateHandler)}}catch(a){e={error:a}}finally{try{n&&!n.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}},t.prototype.removeCssVars=function(){var e=this,r=t.strings;Object.keys(r).forEach((function(t){0===t.indexOf("VAR_")&&e.adapter.updateCssVariable(r[t],null)}))},t.prototype.activateImpl=function(e){var t=this;if(!this.adapter.isSurfaceDisabled()){var r=this.activationState;if(!r.isActivated){var n=this.previousActivationEvent;if(!(n&&void 0!==e&&n.type!==e.type))r.isActivated=!0,r.isProgrammatic=void 0===e,r.activationEvent=e,r.wasActivatedByPointer=!r.isProgrammatic&&(void 0!==e&&("mousedown"===e.type||"touchstart"===e.type||"pointerdown"===e.type)),void 0!==e&&P.length>0&&P.some((function(e){return t.adapter.containsEventTarget(e)}))?this.resetActivationState():(void 0!==e&&(P.push(e.target),this.registerDeactivationHandlers(e)),r.wasElementMadeActive=this.checkElementMadeActive(e),r.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){P=[],r.wasElementMadeActive||void 0===e||" "!==e.key&&32!==e.keyCode||(r.wasElementMadeActive=t.checkElementMadeActive(e),r.wasElementMadeActive&&t.animateActivation()),r.wasElementMadeActive||(t.activationState=t.defaultActivationState())})))}}},t.prototype.checkElementMadeActive=function(e){return void 0===e||"keydown"!==e.type||this.adapter.isSurfaceActive()},t.prototype.animateActivation=function(){var e=this,r=t.strings,n=r.VAR_FG_TRANSLATE_START,o=r.VAR_FG_TRANSLATE_END,a=t.cssClasses,i=a.FG_DEACTIVATION,s=a.FG_ACTIVATION,c=t.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var l="",d="";if(!this.adapter.isUnbounded()){var u=this.getFgTranslationCoordinates(),f=u.startPoint,h=u.endPoint;l=f.x+"px, "+f.y+"px",d=h.x+"px, "+h.y+"px"}this.adapter.updateCssVariable(n,l),this.adapter.updateCssVariable(o,d),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(i),this.adapter.computeBoundingRect(),this.adapter.addClass(s),this.activationTimer=setTimeout((function(){e.activationTimerCallback()}),c)},t.prototype.getFgTranslationCoordinates=function(){var e,t=this.activationState,r=t.activationEvent;return{startPoint:e={x:(e=t.wasActivatedByPointer?function(e,t,r){if(!e)return{x:0,y:0};var n,o,a=t.x,i=t.y,s=a+r.left,c=i+r.top;if("touchstart"===e.type){var l=e;n=l.changedTouches[0].pageX-s,o=l.changedTouches[0].pageY-c}else{var d=e;n=d.pageX-s,o=d.pageY-c}return{x:n,y:o}}(r,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2}).x-this.initialSize/2,y:e.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},t.prototype.runDeactivationUXLogicIfReady=function(){var e=this,r=t.cssClasses.FG_DEACTIVATION,n=this.activationState,o=n.hasDeactivationUXRun,a=n.isActivated;(o||!a)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(r),this.fgDeactivationRemovalTimer=setTimeout((function(){e.adapter.removeClass(r)}),D.FG_DEACTIVATION_MS))},t.prototype.rmBoundedActivationClasses=function(){var e=t.cssClasses.FG_ACTIVATION;this.adapter.removeClass(e),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},t.prototype.resetActivationState=function(){var e=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout((function(){return e.previousActivationEvent=void 0}),t.numbers.TAP_DELAY_MS)},t.prototype.deactivateImpl=function(){var e=this,t=this.activationState;if(t.isActivated){var r=C({},t);t.isProgrammatic?(requestAnimationFrame((function(){e.animateDeactivation(r)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){e.activationState.hasDeactivationUXRun=!0,e.animateDeactivation(r),e.resetActivationState()})))}},t.prototype.animateDeactivation=function(e){var t=e.wasActivatedByPointer,r=e.wasElementMadeActive;(t||r)&&this.runDeactivationUXLogicIfReady()},t.prototype.layoutInternal=function(){var e=this;this.frame=this.adapter.computeBoundingRect();var r=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?r:Math.sqrt(Math.pow(e.frame.width,2)+Math.pow(e.frame.height,2))+t.numbers.PADDING;var n=Math.floor(r*t.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&n%2!==0?this.initialSize=n-1:this.initialSize=n,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},t.prototype.updateLayoutCssVars=function(){var e=t.strings,r=e.VAR_FG_SIZE,n=e.VAR_LEFT,o=e.VAR_TOP,a=e.VAR_FG_SCALE;this.adapter.updateCssVariable(r,this.initialSize+"px"),this.adapter.updateCssVariable(a,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(n,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(o,this.unboundedCoords.top+"px"))},t}(A),V=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.disabled=!1,t}return m(t,e),t.attachTo=function(e,r){void 0===r&&(r={isUnbounded:void 0});var n=new t(e);return void 0!==r.isUnbounded&&(n.unbounded=r.isUnbounded),n},t.createAdapter=function(e){return{addClass:function(t){return e.root.classList.add(t)},browserSupportsCssVars:function(){return function(e,t){void 0===t&&(t=!1);var r,n=e.CSS;if("boolean"===typeof T&&!t)return T;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,t||(T=r),r}(window)},computeBoundingRect:function(){return e.root.getBoundingClientRect()},containsEventTarget:function(t){return e.root.contains(t)},deregisterDocumentInteractionHandler:function(e,t){return document.documentElement.removeEventListener(e,t,x())},deregisterInteractionHandler:function(t,r){return e.root.removeEventListener(t,r,x())},deregisterResizeHandler:function(e){return window.removeEventListener("resize",e)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return L(e.root,":active")},isSurfaceDisabled:function(){return Boolean(e.disabled)},isUnbounded:function(){return Boolean(e.unbounded)},registerDocumentInteractionHandler:function(e,t){return document.documentElement.addEventListener(e,t,x())},registerInteractionHandler:function(t,r){return e.root.addEventListener(t,r,x())},registerResizeHandler:function(e){return window.addEventListener("resize",e)},removeClass:function(t){return e.root.classList.remove(t)},updateCssVariable:function(t,r){return e.root.style.setProperty(t,r)}}},Object.defineProperty(t.prototype,"unbounded",{get:function(){return Boolean(this.isUnbounded)},set:function(e){this.isUnbounded=Boolean(e),this.setUnbounded()},enumerable:!1,configurable:!0}),t.prototype.activate=function(){this.foundation.activate()},t.prototype.deactivate=function(){this.foundation.deactivate()},t.prototype.layout=function(){this.foundation.layout()},t.prototype.getDefaultFoundation=function(){return new M(t.createAdapter(this))},t.prototype.initialSyncWithDOM=function(){var e=this.root;this.isUnbounded="mdcRippleIsUnbounded"in e.dataset},t.prototype.setUnbounded=function(){this.foundation.setUnbounded(Boolean(this.isUnbounded))},t}(S),U={ANIM_CHECKED_INDETERMINATE:"mdc-checkbox--anim-checked-indeterminate",ANIM_CHECKED_UNCHECKED:"mdc-checkbox--anim-checked-unchecked",ANIM_INDETERMINATE_CHECKED:"mdc-checkbox--anim-indeterminate-checked",ANIM_INDETERMINATE_UNCHECKED:"mdc-checkbox--anim-indeterminate-unchecked",ANIM_UNCHECKED_CHECKED:"mdc-checkbox--anim-unchecked-checked",ANIM_UNCHECKED_INDETERMINATE:"mdc-checkbox--anim-unchecked-indeterminate",BACKGROUND:"mdc-checkbox__background",CHECKED:"mdc-checkbox--checked",CHECKMARK:"mdc-checkbox__checkmark",CHECKMARK_PATH:"mdc-checkbox__checkmark-path",DISABLED:"mdc-checkbox--disabled",INDETERMINATE:"mdc-checkbox--indeterminate",MIXEDMARK:"mdc-checkbox__mixedmark",NATIVE_CONTROL:"mdc-checkbox__native-control",ROOT:"mdc-checkbox",SELECTED:"mdc-checkbox--selected",UPGRADED:"mdc-checkbox--upgraded"},F={ARIA_CHECKED_ATTR:"aria-checked",ARIA_CHECKED_INDETERMINATE_VALUE:"mixed",DATA_INDETERMINATE_ATTR:"data-indeterminate",NATIVE_CONTROL_SELECTOR:".mdc-checkbox__native-control",TRANSITION_STATE_CHECKED:"checked",TRANSITION_STATE_INDETERMINATE:"indeterminate",TRANSITION_STATE_INIT:"init",TRANSITION_STATE_UNCHECKED:"unchecked"},j={ANIM_END_LATCH_MS:250},K=function(e){function t(r){var n=e.call(this,C(C({},t.defaultAdapter),r))||this;return n.currentCheckState=F.TRANSITION_STATE_INIT,n.currentAnimationClass="",n.animEndLatchTimer=0,n.enableAnimationEndHandler=!1,n}return m(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return U},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return F},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return j},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},forceLayout:function(){},hasNativeControl:function(){return!1},isAttachedToDOM:function(){return!1},isChecked:function(){return!1},isIndeterminate:function(){return!1},removeClass:function(){},removeNativeControlAttr:function(){},setNativeControlAttr:function(){},setNativeControlDisabled:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){this.currentCheckState=this.determineCheckState(),this.updateAriaChecked(),this.adapter.addClass(U.UPGRADED)},t.prototype.destroy=function(){clearTimeout(this.animEndLatchTimer)},t.prototype.setDisabled=function(e){this.adapter.setNativeControlDisabled(e),e?this.adapter.addClass(U.DISABLED):this.adapter.removeClass(U.DISABLED)},t.prototype.handleAnimationEnd=function(){var e=this;this.enableAnimationEndHandler&&(clearTimeout(this.animEndLatchTimer),this.animEndLatchTimer=setTimeout((function(){e.adapter.removeClass(e.currentAnimationClass),e.enableAnimationEndHandler=!1}),j.ANIM_END_LATCH_MS))},t.prototype.handleChange=function(){this.transitionCheckState()},t.prototype.transitionCheckState=function(){if(this.adapter.hasNativeControl()){var e=this.currentCheckState,t=this.determineCheckState();if(e!==t){this.updateAriaChecked();var r=U.SELECTED;t===F.TRANSITION_STATE_UNCHECKED?this.adapter.removeClass(r):this.adapter.addClass(r),this.currentAnimationClass.length>0&&(clearTimeout(this.animEndLatchTimer),this.adapter.forceLayout(),this.adapter.removeClass(this.currentAnimationClass)),this.currentAnimationClass=this.getTransitionAnimationClass(e,t),this.currentCheckState=t,this.adapter.isAttachedToDOM()&&this.currentAnimationClass.length>0&&(this.adapter.addClass(this.currentAnimationClass),this.enableAnimationEndHandler=!0)}}},t.prototype.determineCheckState=function(){var e=F.TRANSITION_STATE_INDETERMINATE,t=F.TRANSITION_STATE_CHECKED,r=F.TRANSITION_STATE_UNCHECKED;return this.adapter.isIndeterminate()?e:this.adapter.isChecked()?t:r},t.prototype.getTransitionAnimationClass=function(e,r){var n=F.TRANSITION_STATE_INIT,o=F.TRANSITION_STATE_CHECKED,a=F.TRANSITION_STATE_UNCHECKED,i=t.cssClasses,s=i.ANIM_UNCHECKED_CHECKED,c=i.ANIM_UNCHECKED_INDETERMINATE,l=i.ANIM_CHECKED_UNCHECKED,d=i.ANIM_CHECKED_INDETERMINATE,u=i.ANIM_INDETERMINATE_CHECKED,f=i.ANIM_INDETERMINATE_UNCHECKED;switch(e){case n:return r===a?"":r===o?u:f;case a:return r===o?s:c;case o:return r===a?l:d;default:return r===o?u:f}},t.prototype.updateAriaChecked=function(){this.adapter.isIndeterminate()?this.adapter.setNativeControlAttr(F.ARIA_CHECKED_ATTR,F.ARIA_CHECKED_INDETERMINATE_VALUE):this.adapter.removeNativeControlAttr(F.ARIA_CHECKED_ATTR)},t}(A),G=["checked","indeterminate"],W=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rippleSurface=t.createRipple(),t}return m(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"ripple",{get:function(){return this.rippleSurface},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"checked",{get:function(){return this.getNativeControl().checked},set:function(e){this.getNativeControl().checked=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"indeterminate",{get:function(){return this.getNativeControl().indeterminate},set:function(e){this.getNativeControl().indeterminate=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"disabled",{get:function(){return this.getNativeControl().disabled},set:function(e){this.foundation.setDisabled(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.getNativeControl().value},set:function(e){this.getNativeControl().value=e},enumerable:!1,configurable:!0}),t.prototype.initialize=function(){var e=F.DATA_INDETERMINATE_ATTR;this.getNativeControl().indeterminate="true"===this.getNativeControl().getAttribute(e),this.getNativeControl().removeAttribute(e)},t.prototype.initialSyncWithDOM=function(){var e=this;this.handleChange=function(){e.foundation.handleChange()},this.handleAnimationEnd=function(){e.foundation.handleAnimationEnd()},this.getNativeControl().addEventListener("change",this.handleChange),this.listen(I(window,"animationend"),this.handleAnimationEnd),this.installPropertyChangeHooks()},t.prototype.destroy=function(){this.rippleSurface.destroy(),this.getNativeControl().removeEventListener("change",this.handleChange),this.unlisten(I(window,"animationend"),this.handleAnimationEnd),this.uninstallPropertyChangeHooks(),e.prototype.destroy.call(this)},t.prototype.getDefaultFoundation=function(){var e=this;return new K({addClass:function(t){return e.root.classList.add(t)},forceLayout:function(){return e.root.offsetWidth},hasNativeControl:function(){return!!e.getNativeControl()},isAttachedToDOM:function(){return Boolean(e.root.parentNode)},isChecked:function(){return e.checked},isIndeterminate:function(){return e.indeterminate},removeClass:function(t){e.root.classList.remove(t)},removeNativeControlAttr:function(t){e.getNativeControl().removeAttribute(t)},setNativeControlAttr:function(t,r){e.getNativeControl().setAttribute(t,r)},setNativeControlDisabled:function(t){e.getNativeControl().disabled=t}})},t.prototype.createRipple=function(){var e=this,t=C(C({},V.createAdapter(this)),{deregisterInteractionHandler:function(t,r){e.getNativeControl().removeEventListener(t,r,x())},isSurfaceActive:function(){return L(e.getNativeControl(),":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(t,r){e.getNativeControl().addEventListener(t,r,x())}});return new V(this.root,new M(t))},t.prototype.installPropertyChangeHooks=function(){var e,t,r=this,n=this.getNativeControl(),o=Object.getPrototypeOf(n),a=function(e){var t=Object.getOwnPropertyDescriptor(o,e);if(!$(t))return{value:void 0};var a=t.get,i={configurable:t.configurable,enumerable:t.enumerable,get:a,set:function(e){t.set.call(n,e),r.foundation.handleChange()}};Object.defineProperty(n,e,i)};try{for(var i=E(G),s=i.next();!s.done;s=i.next()){var c=a(s.value);if("object"===typeof c)return c.value}}catch(l){e={error:l}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}},t.prototype.uninstallPropertyChangeHooks=function(){var e,t,r=this.getNativeControl(),n=Object.getPrototypeOf(r);try{for(var o=E(G),a=o.next();!a.done;a=o.next()){var i=a.value,s=Object.getOwnPropertyDescriptor(n,i);if(!$(s))return;Object.defineProperty(r,i,s)}}catch(c){e={error:c}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}},t.prototype.getNativeControl=function(){var e=F.NATIVE_CONTROL_SELECTOR,t=this.root.querySelector(e);if(!t)throw new Error("Checkbox component requires a "+e+" element");return t},t}(S);function $(e){return!!e&&"function"===typeof e.set}var z,X={CLOSED_CLASS:"mdc-linear-progress--closed",CLOSED_ANIMATION_OFF_CLASS:"mdc-linear-progress--closed-animation-off",INDETERMINATE_CLASS:"mdc-linear-progress--indeterminate",REVERSED_CLASS:"mdc-linear-progress--reversed",ANIMATION_READY_CLASS:"mdc-linear-progress--animation-ready"},q={ARIA_HIDDEN:"aria-hidden",ARIA_VALUEMAX:"aria-valuemax",ARIA_VALUEMIN:"aria-valuemin",ARIA_VALUENOW:"aria-valuenow",BUFFER_BAR_SELECTOR:".mdc-linear-progress__buffer-bar",FLEX_BASIS:"flex-basis",PRIMARY_BAR_SELECTOR:".mdc-linear-progress__primary-bar"},Y=.8367142,Z=2.00611057,J=.37651913,Q=.84386165,ee=1.60277782,te=function(e){function t(r){var n=e.call(this,C(C({},t.defaultAdapter),r))||this;return n.observer=null,n}return m(t,e),Object.defineProperty(t,"cssClasses",{get:function(){return X},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return q},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},attachResizeObserver:function(){return null},forceLayout:function(){},getWidth:function(){return 0},hasClass:function(){return!1},setBufferBarStyle:function(){return null},setPrimaryBarStyle:function(){return null},setStyle:function(){},removeAttribute:function(){},removeClass:function(){},setAttribute:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){var e=this;this.determinate=!this.adapter.hasClass(X.INDETERMINATE_CLASS),this.adapter.addClass(X.ANIMATION_READY_CLASS),this.progress=0,this.buffer=1,this.observer=this.adapter.attachResizeObserver((function(t){var r,n;if(!e.determinate)try{for(var o=E(t),a=o.next();!a.done;a=o.next()){var i=a.value;i.contentRect&&e.calculateAndSetDimensions(i.contentRect.width)}}catch(s){r={error:s}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}})),!this.determinate&&this.observer&&this.calculateAndSetDimensions(this.adapter.getWidth())},t.prototype.setDeterminate=function(e){if(this.determinate=e,this.determinate)return this.adapter.removeClass(X.INDETERMINATE_CLASS),this.adapter.setAttribute(q.ARIA_VALUENOW,this.progress.toString()),this.adapter.setAttribute(q.ARIA_VALUEMAX,"1"),this.adapter.setAttribute(q.ARIA_VALUEMIN,"0"),this.setPrimaryBarProgress(this.progress),void this.setBufferBarProgress(this.buffer);this.observer&&this.calculateAndSetDimensions(this.adapter.getWidth()),this.adapter.addClass(X.INDETERMINATE_CLASS),this.adapter.removeAttribute(q.ARIA_VALUENOW),this.adapter.removeAttribute(q.ARIA_VALUEMAX),this.adapter.removeAttribute(q.ARIA_VALUEMIN),this.setPrimaryBarProgress(1),this.setBufferBarProgress(1)},t.prototype.isDeterminate=function(){return this.determinate},t.prototype.setProgress=function(e){this.progress=e,this.determinate&&(this.setPrimaryBarProgress(e),this.adapter.setAttribute(q.ARIA_VALUENOW,e.toString()))},t.prototype.getProgress=function(){return this.progress},t.prototype.setBuffer=function(e){this.buffer=e,this.determinate&&this.setBufferBarProgress(e)},t.prototype.getBuffer=function(){return this.buffer},t.prototype.open=function(){this.adapter.removeClass(X.CLOSED_CLASS),this.adapter.removeClass(X.CLOSED_ANIMATION_OFF_CLASS),this.adapter.removeAttribute(q.ARIA_HIDDEN)},t.prototype.close=function(){this.adapter.addClass(X.CLOSED_CLASS),this.adapter.setAttribute(q.ARIA_HIDDEN,"true")},t.prototype.isClosed=function(){return this.adapter.hasClass(X.CLOSED_CLASS)},t.prototype.handleTransitionEnd=function(){this.adapter.hasClass(X.CLOSED_CLASS)&&this.adapter.addClass(X.CLOSED_ANIMATION_OFF_CLASS)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.observer&&this.observer.disconnect()},t.prototype.restartAnimation=function(){this.adapter.removeClass(X.ANIMATION_READY_CLASS),this.adapter.forceLayout(),this.adapter.addClass(X.ANIMATION_READY_CLASS)},t.prototype.setPrimaryBarProgress=function(e){var t="scaleX("+e+")",r="undefined"!==typeof window?function(e,t){if(k(e)&&t in w){var r=e.document.createElement("div"),n=w[t],o=n.standard,a=n.prefixed;return o in r.style?o:a}return t}(window,"transform"):"transform";this.adapter.setPrimaryBarStyle(r,t)},t.prototype.setBufferBarProgress=function(e){var t=100*e+"%";this.adapter.setBufferBarStyle(q.FLEX_BASIS,t)},t.prototype.calculateAndSetDimensions=function(e){var t=e*Y,r=e*Z,n=e*J,o=e*Q,a=e*ee;this.adapter.setStyle("--mdc-linear-progress-primary-half",t+"px"),this.adapter.setStyle("--mdc-linear-progress-primary-half-neg",-t+"px"),this.adapter.setStyle("--mdc-linear-progress-primary-full",r+"px"),this.adapter.setStyle("--mdc-linear-progress-primary-full-neg",-r+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-quarter",n+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-quarter-neg",-n+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-half",o+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-half-neg",-o+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-full",a+"px"),this.adapter.setStyle("--mdc-linear-progress-secondary-full-neg",-a+"px"),this.restartAnimation()},t}(A),re=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.attachTo=function(e){return new t(e)},Object.defineProperty(t.prototype,"determinate",{set:function(e){this.foundation.setDeterminate(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progress",{set:function(e){this.foundation.setProgress(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buffer",{set:function(e){this.foundation.setBuffer(e)},enumerable:!1,configurable:!0}),t.prototype.open=function(){this.foundation.open()},t.prototype.close=function(){this.foundation.close()},t.prototype.initialSyncWithDOM=function(){var e=this;this.root.addEventListener("transitionend",(function(){e.foundation.handleTransitionEnd()}))},t.prototype.getDefaultFoundation=function(){var e=this;return new te({addClass:function(t){e.root.classList.add(t)},forceLayout:function(){e.root.getBoundingClientRect()},setBufferBarStyle:function(t,r){var n=e.root.querySelector(te.strings.BUFFER_BAR_SELECTOR);n&&n.style.setProperty(t,r)},setPrimaryBarStyle:function(t,r){var n=e.root.querySelector(te.strings.PRIMARY_BAR_SELECTOR);n&&n.style.setProperty(t,r)},hasClass:function(t){return e.root.classList.contains(t)},removeAttribute:function(t){e.root.removeAttribute(t)},removeClass:function(t){e.root.classList.remove(t)},setAttribute:function(t,r){e.root.setAttribute(t,r)},setStyle:function(t,r){e.root.style.setProperty(t,r)},attachResizeObserver:function(t){var r=window.ResizeObserver;if(r){var n=new r(t);return n.observe(e.root),n}return null},getWidth:function(){return e.root.offsetWidth}})},t}(S),ne="mdc-data-table__content",oe="mdc-data-table__header-cell--sorted",ae="mdc-data-table__header-cell--sorted-descending",ie="mdc-data-table__header-row",se="mdc-data-table--in-progress",ce="mdc-data-table__linear-progress",le="mdc-data-table__row--selected",de="mdc-data-table__table-container",ue="data-column-id",fe="data-row-id",he={CONTENT:"."+ne,HEADER_CELL:"."+"mdc-data-table__header-cell",HEADER_CELL_WITH_SORT:"."+"mdc-data-table__header-cell--with-sort",HEADER_ROW:"."+ie,HEADER_ROW_CHECKBOX:"."+"mdc-data-table__header-row-checkbox",PROGRESS_INDICATOR:"."+"mdc-data-table__progress-indicator",ROW:"."+"mdc-data-table__row",ROW_CHECKBOX:"."+"mdc-data-table__row-checkbox",ROW_SELECTED:"."+le,SORT_ICON_BUTTON:"."+"mdc-data-table__sort-icon-button",SORT_STATUS_LABEL:"."+"mdc-data-table__sort-status-label"},pe="Sorted in descending order",me="Sorted in ascending order",Ce={ARIA_SELECTED:"aria-selected",ARIA_SORT:"aria-sort",DATA_ROW_ID_ATTR:fe,HEADER_ROW_CHECKBOX_SELECTOR:he.HEADER_ROW_CHECKBOX,ROW_CHECKBOX_SELECTOR:he.ROW_CHECKBOX,ROW_SELECTED_SELECTOR:he.ROW_SELECTED,ROW_SELECTOR:he.ROW};!function(e){e.ASCENDING="ascending",e.DESCENDING="descending",e.NONE="none",e.OTHER="other"}(z||(z={}));var ye="MDCDataTable:rowClick",be="MDCDataTable:rowSelectionChanged",Ee="MDCDataTable:selectedAll",ve="MDCDataTable:sorted",ge="MDCDataTable:unselectedAll",Ae=function(e){function t(r){return e.call(this,C(C({},t.defaultAdapter),r))||this}return m(t,e),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},addClassAtRowIndex:function(){},getAttributeByHeaderCellIndex:function(){return""},getHeaderCellCount:function(){return 0},getHeaderCellElements:function(){return[]},getRowCount:function(){return 0},getRowElements:function(){return[]},getRowIdAtIndex:function(){return""},getRowIndexByChildElement:function(){return 0},getSelectedRowCount:function(){return 0},getTableContainerHeight:function(){return 0},getTableHeaderHeight:function(){return 0},isCheckboxAtRowIndexChecked:function(){return!1},isHeaderRowCheckboxChecked:function(){return!1},isRowsSelectable:function(){return!1},notifyRowSelectionChanged:function(){},notifySelectedAll:function(){},notifySortAction:function(){},notifyUnselectedAll:function(){},notifyRowClick:function(){},registerHeaderRowCheckbox:function(){},registerRowCheckboxes:function(){},removeClass:function(){},removeClassAtRowIndex:function(){},removeClassNameByHeaderCellIndex:function(){},setAttributeAtRowIndex:function(){},setAttributeByHeaderCellIndex:function(){},setClassNameByHeaderCellIndex:function(){},setHeaderRowCheckboxChecked:function(){},setHeaderRowCheckboxIndeterminate:function(){},setProgressIndicatorStyles:function(){},setRowCheckboxCheckedAtIndex:function(){},setSortStatusLabelByHeaderCellIndex:function(){}}},enumerable:!1,configurable:!0}),t.prototype.layout=function(){this.adapter.isRowsSelectable()&&(this.adapter.registerHeaderRowCheckbox(),this.adapter.registerRowCheckboxes(),this.setHeaderRowCheckboxState())},t.prototype.layoutAsync=function(){return y(this,void 0,void 0,(function(){return b(this,(function(e){switch(e.label){case 0:return this.adapter.isRowsSelectable()?[4,this.adapter.registerHeaderRowCheckbox()]:[3,3];case 1:return e.sent(),[4,this.adapter.registerRowCheckboxes()];case 2:e.sent(),this.setHeaderRowCheckboxState(),e.label=3;case 3:return[2]}}))}))},t.prototype.getRows=function(){return this.adapter.getRowElements()},t.prototype.getHeaderCells=function(){return this.adapter.getHeaderCellElements()},t.prototype.setSelectedRowIds=function(e){for(var t=0;t<this.adapter.getRowCount();t++){var r=this.adapter.getRowIdAtIndex(t),n=!1;r&&e.indexOf(r)>=0&&(n=!0),this.adapter.setRowCheckboxCheckedAtIndex(t,n),this.selectRowAtIndex(t,n)}this.setHeaderRowCheckboxState()},t.prototype.getRowIds=function(){for(var e=[],t=0;t<this.adapter.getRowCount();t++)e.push(this.adapter.getRowIdAtIndex(t));return e},t.prototype.getSelectedRowIds=function(){for(var e=[],t=0;t<this.adapter.getRowCount();t++)this.adapter.isCheckboxAtRowIndexChecked(t)&&e.push(this.adapter.getRowIdAtIndex(t));return e},t.prototype.handleHeaderRowCheckboxChange=function(){for(var e=this.adapter.isHeaderRowCheckboxChecked(),t=0;t<this.adapter.getRowCount();t++)this.adapter.setRowCheckboxCheckedAtIndex(t,e),this.selectRowAtIndex(t,e);e?this.adapter.notifySelectedAll():this.adapter.notifyUnselectedAll()},t.prototype.handleRowCheckboxChange=function(e){var t=this.adapter.getRowIndexByChildElement(e.target);if(-1!==t){var r=this.adapter.isCheckboxAtRowIndexChecked(t);this.selectRowAtIndex(t,r),this.setHeaderRowCheckboxState();var n=this.adapter.getRowIdAtIndex(t);this.adapter.notifyRowSelectionChanged({rowId:n,rowIndex:t,selected:r})}},t.prototype.handleSortAction=function(e){for(var t=e.columnId,r=e.columnIndex,n=e.headerCell,o=0;o<this.adapter.getHeaderCellCount();o++)o!==r&&(this.adapter.removeClassNameByHeaderCellIndex(o,oe),this.adapter.removeClassNameByHeaderCellIndex(o,ae),this.adapter.setAttributeByHeaderCellIndex(o,Ce.ARIA_SORT,z.NONE),this.adapter.setSortStatusLabelByHeaderCellIndex(o,z.NONE));this.adapter.setClassNameByHeaderCellIndex(r,oe);var a=this.adapter.getAttributeByHeaderCellIndex(r,Ce.ARIA_SORT),i=z.NONE;a===z.ASCENDING?(this.adapter.setClassNameByHeaderCellIndex(r,ae),this.adapter.setAttributeByHeaderCellIndex(r,Ce.ARIA_SORT,z.DESCENDING),i=z.DESCENDING):a===z.DESCENDING?(this.adapter.removeClassNameByHeaderCellIndex(r,ae),this.adapter.setAttributeByHeaderCellIndex(r,Ce.ARIA_SORT,z.ASCENDING),i=z.ASCENDING):(this.adapter.setAttributeByHeaderCellIndex(r,Ce.ARIA_SORT,z.ASCENDING),i=z.ASCENDING),this.adapter.setSortStatusLabelByHeaderCellIndex(r,i),this.adapter.notifySortAction({columnId:t,columnIndex:r,headerCell:n,sortValue:i})},t.prototype.handleRowClick=function(e){var t=e.rowId,r=e.row;this.adapter.notifyRowClick({rowId:t,row:r})},t.prototype.showProgress=function(){var e=this.adapter.getTableHeaderHeight(),t=this.adapter.getTableContainerHeight()-e,r=e;this.adapter.setProgressIndicatorStyles({height:t+"px",top:r+"px"}),this.adapter.addClass(se)},t.prototype.hideProgress=function(){this.adapter.removeClass(se)},t.prototype.setHeaderRowCheckboxState=function(){0===this.adapter.getSelectedRowCount()?(this.adapter.setHeaderRowCheckboxChecked(!1),this.adapter.setHeaderRowCheckboxIndeterminate(!1)):this.adapter.getSelectedRowCount()===this.adapter.getRowCount()?(this.adapter.setHeaderRowCheckboxChecked(!0),this.adapter.setHeaderRowCheckboxIndeterminate(!1)):(this.adapter.setHeaderRowCheckboxIndeterminate(!0),this.adapter.setHeaderRowCheckboxChecked(!1))},t.prototype.selectRowAtIndex=function(e,t){t?(this.adapter.addClassAtRowIndex(e,le),this.adapter.setAttributeAtRowIndex(e,Ce.ARIA_SELECTED,"true")):(this.adapter.removeClassAtRowIndex(e,le),this.adapter.setAttributeAtRowIndex(e,Ce.ARIA_SELECTED,"false"))},t}(A),Se=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return m(t,e),t.attachTo=function(e){return new t(e)},t.prototype.initialize=function(e){void 0===e&&(e=function(e){return new W(e)}),this.checkboxFactory=e},t.prototype.initialSyncWithDOM=function(){var e=this;this.headerRow=this.root.querySelector("."+ie),this.handleHeaderRowCheckboxChange=function(){e.foundation.handleHeaderRowCheckboxChange()},this.headerRow.addEventListener("change",this.handleHeaderRowCheckboxChange),this.headerRowClickListener=function(t){e.handleHeaderRowClick(t)},this.headerRow.addEventListener("click",this.headerRowClickListener),this.content=this.root.querySelector("."+ne),this.handleContentClick=function(t){var r=R(t.target,he.ROW);r&&e.foundation.handleRowClick({rowId:e.getRowIdByRowElement(r),row:r})},this.content.addEventListener("click",this.handleContentClick),this.handleRowCheckboxChange=function(t){e.foundation.handleRowCheckboxChange(t)},this.content.addEventListener("change",this.handleRowCheckboxChange),this.layout()},t.prototype.layout=function(){this.foundation.layout()},t.prototype.getHeaderCells=function(){return[].slice.call(this.root.querySelectorAll(he.HEADER_CELL))},t.prototype.getRows=function(){return this.foundation.getRows()},t.prototype.getSelectedRowIds=function(){return this.foundation.getSelectedRowIds()},t.prototype.setSelectedRowIds=function(e){this.foundation.setSelectedRowIds(e)},t.prototype.showProgress=function(){this.getLinearProgress().open(),this.foundation.showProgress()},t.prototype.hideProgress=function(){this.foundation.hideProgress(),this.getLinearProgress().close()},t.prototype.destroy=function(){var e,t;if(this.handleHeaderRowCheckboxChange&&this.headerRow.removeEventListener("change",this.handleHeaderRowCheckboxChange),this.headerRowClickListener&&this.headerRow.removeEventListener("click",this.headerRowClickListener),this.handleRowCheckboxChange&&this.content.removeEventListener("change",this.handleRowCheckboxChange),this.headerRowCheckbox&&this.headerRowCheckbox.destroy(),this.rowCheckboxList)try{for(var r=E(this.rowCheckboxList),n=r.next();!n.done;n=r.next()){n.value.destroy()}}catch(o){e={error:o}}finally{try{n&&!n.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}this.handleContentClick&&this.content.removeEventListener("click",this.handleContentClick)},t.prototype.getDefaultFoundation=function(){var e=this;return new Ae({addClass:function(t){e.root.classList.add(t)},removeClass:function(t){e.root.classList.remove(t)},getHeaderCellElements:function(){return e.getHeaderCells()},getHeaderCellCount:function(){return e.getHeaderCells().length},getAttributeByHeaderCellIndex:function(t,r){return e.getHeaderCells()[t].getAttribute(r)},setAttributeByHeaderCellIndex:function(t,r,n){e.getHeaderCells()[t].setAttribute(r,n)},setClassNameByHeaderCellIndex:function(t,r){e.getHeaderCells()[t].classList.add(r)},removeClassNameByHeaderCellIndex:function(t,r){e.getHeaderCells()[t].classList.remove(r)},notifySortAction:function(t){e.emit(ve,t,!0)},getTableContainerHeight:function(){var t=e.root.querySelector("."+de);if(!t)throw new Error("MDCDataTable: Table container element not found.");return t.getBoundingClientRect().height},getTableHeaderHeight:function(){var t=e.root.querySelector(he.HEADER_ROW);if(!t)throw new Error("MDCDataTable: Table header element not found.");return t.getBoundingClientRect().height},setProgressIndicatorStyles:function(t){var r=e.root.querySelector(he.PROGRESS_INDICATOR);if(!r)throw new Error("MDCDataTable: Progress indicator element not found.");r.style.setProperty("height",t.height),r.style.setProperty("top",t.top)},addClassAtRowIndex:function(t,r){e.getRows()[t].classList.add(r)},getRowCount:function(){return e.getRows().length},getRowElements:function(){return[].slice.call(e.root.querySelectorAll(he.ROW))},getRowIdAtIndex:function(t){return e.getRows()[t].getAttribute(fe)},getRowIndexByChildElement:function(t){return e.getRows().indexOf(R(t,he.ROW))},getSelectedRowCount:function(){return e.root.querySelectorAll(he.ROW_SELECTED).length},isCheckboxAtRowIndexChecked:function(t){return e.rowCheckboxList[t].checked},isHeaderRowCheckboxChecked:function(){return e.headerRowCheckbox.checked},isRowsSelectable:function(){return!!e.root.querySelector(he.ROW_CHECKBOX)||!!e.root.querySelector(he.HEADER_ROW_CHECKBOX)},notifyRowSelectionChanged:function(t){e.emit(be,{row:e.getRowByIndex(t.rowIndex),rowId:e.getRowIdByIndex(t.rowIndex),rowIndex:t.rowIndex,selected:t.selected},!0)},notifySelectedAll:function(){e.emit(Ee,{},!0)},notifyUnselectedAll:function(){e.emit(ge,{},!0)},notifyRowClick:function(t){e.emit(ye,t,!0)},registerHeaderRowCheckbox:function(){e.headerRowCheckbox&&e.headerRowCheckbox.destroy();var t=e.root.querySelector(he.HEADER_ROW_CHECKBOX);e.headerRowCheckbox=e.checkboxFactory(t)},registerRowCheckboxes:function(){e.rowCheckboxList&&e.rowCheckboxList.forEach((function(e){e.destroy()})),e.rowCheckboxList=[],e.getRows().forEach((function(t){var r=e.checkboxFactory(t.querySelector(he.ROW_CHECKBOX));e.rowCheckboxList.push(r)}))},removeClassAtRowIndex:function(t,r){e.getRows()[t].classList.remove(r)},setAttributeAtRowIndex:function(t,r,n){e.getRows()[t].setAttribute(r,n)},setHeaderRowCheckboxChecked:function(t){e.headerRowCheckbox.checked=t},setHeaderRowCheckboxIndeterminate:function(t){e.headerRowCheckbox.indeterminate=t},setRowCheckboxCheckedAtIndex:function(t,r){e.rowCheckboxList[t].checked=r},setSortStatusLabelByHeaderCellIndex:function(t,r){var n=e.getHeaderCells()[t].querySelector(he.SORT_STATUS_LABEL);n&&(n.textContent=e.getS