UNPKG

material-components-vue

Version:
2 lines 30.9 kB
/*! For license information please see toolbar.min.js.LICENSE */ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i=e();for(var n in i)("object"==typeof exports?exports:t)[n]=i[n]}}(window,function(){return i={},t.m=e={0:function(t,e,i){"use strict";i.d(e,"b",function(){return r}),i.d(e,"a",function(){return a}),i.d(e,"e",function(){return o}),i.d(e,"c",function(){return s}),i.d(e,"d",function(){return l});var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(t,e)};function r(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var a=function(){return(a=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function o(t){var e="function"==typeof Symbol&&t[Symbol.iterator],i=0;return e?e.call(t):{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}}}function s(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,a=i.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(n=a.next()).done;)o.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}function l(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(s(arguments[e]));return t}},1:function(t,e,i){"use strict";var n={inheritAttrs:!1},r=["primary","secondary","background","surface","on-primary","on-secondary","on-surface","primary-bg","secondary-bg","text-primary-on-light","text-secondary-on-light","text-hint-on-light","text-disabled-on-light","text-icon-on-light","text-primary-on-dark","text-secondary-on-dark","text-hint-on-dark","text-disabled-on-dark","text-icon-on-dark"],a={props:{theming:{type:String,default:""}},mounted:function(){-1<r.indexOf(this.theming)&&this.$el.classList.add("mdc-theme--"+this.theming)}};i.d(e,"a",function(){return n}),i.d(e,"b",function(){return a})},10:function(t,e,i){"use strict";var n=i(0),r=i(2),a={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"},s={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300},l=i(6);i.d(e,"a",function(){return _});var c,u=["touchstart","pointerdown","mousedown","keydown"],d=["touchend","pointerup","mouseup","contextmenu"],f=[],_=(c=r.a,n.b(p,c),Object.defineProperty(p,"cssClasses",{get:function(){return a},enumerable:!0,configurable:!0}),Object.defineProperty(p,"strings",{get:function(){return o},enumerable:!0,configurable:!0}),Object.defineProperty(p,"numbers",{get:function(){return s},enumerable:!0,configurable:!0}),Object.defineProperty(p,"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}),p.prototype.init=function(){var t=this,e=this.supportsPressRipple_();if(this.registerRootHandlers_(e),e){var i=p.cssClasses,n=i.ROOT,r=i.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.addClass(n),t.adapter_.isUnbounded()&&(t.adapter_.addClass(r),t.layoutInternal_())})}},p.prototype.destroy=function(){var t=this;if(this.supportsPressRipple_()){this.activationTimer_&&(clearTimeout(this.activationTimer_),this.activationTimer_=0,this.adapter_.removeClass(p.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer_&&(clearTimeout(this.fgDeactivationRemovalTimer_),this.fgDeactivationRemovalTimer_=0,this.adapter_.removeClass(p.cssClasses.FG_DEACTIVATION));var e=p.cssClasses,i=e.ROOT,n=e.UNBOUNDED;requestAnimationFrame(function(){t.adapter_.removeClass(i),t.adapter_.removeClass(n),t.removeCssVars_()})}this.deregisterRootHandlers_(),this.deregisterDeactivationHandlers_()},p.prototype.activate=function(t){this.activate_(t)},p.prototype.deactivate=function(){this.deactivate_()},p.prototype.layout=function(){var t=this;this.layoutFrame_&&cancelAnimationFrame(this.layoutFrame_),this.layoutFrame_=requestAnimationFrame(function(){t.layoutInternal_(),t.layoutFrame_=0})},p.prototype.setUnbounded=function(t){var e=p.cssClasses.UNBOUNDED;t?this.adapter_.addClass(e):this.adapter_.removeClass(e)},p.prototype.handleFocus=function(){var t=this;requestAnimationFrame(function(){return t.adapter_.addClass(p.cssClasses.BG_FOCUSED)})},p.prototype.handleBlur=function(){var t=this;requestAnimationFrame(function(){return t.adapter_.removeClass(p.cssClasses.BG_FOCUSED)})},p.prototype.supportsPressRipple_=function(){return this.adapter_.browserSupportsCssVars()},p.prototype.defaultActivationState_=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},p.prototype.registerRootHandlers_=function(t){var e=this;t&&(u.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_)},p.prototype.registerDeactivationHandlers_=function(t){var e=this;"keydown"===t.type?this.adapter_.registerInteractionHandler("keyup",this.deactivateHandler_):d.forEach(function(t){e.adapter_.registerDocumentInteractionHandler(t,e.deactivateHandler_)})},p.prototype.deregisterRootHandlers_=function(){var t=this;u.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_)},p.prototype.deregisterDeactivationHandlers_=function(){var t=this;this.adapter_.deregisterInteractionHandler("keyup",this.deactivateHandler_),d.forEach(function(e){t.adapter_.deregisterDocumentInteractionHandler(e,t.deactivateHandler_)})},p.prototype.removeCssVars_=function(){var t=this,e=p.strings;Object.keys(e).forEach(function(i){0===i.indexOf("VAR_")&&t.adapter_.updateCssVariable(e[i],null)})},p.prototype.activate_=function(t){var e=this;if(!this.adapter_.isSurfaceDisabled()){var i=this.activationState_;if(!i.isActivated){var n=this.previousActivationEvent_;n&&void 0!==t&&n.type!==t.type||(i.isActivated=!0,i.isProgrammatic=void 0===t,i.activationEvent=t,i.wasActivatedByPointer=!i.isProgrammatic&&void 0!==t&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type),void 0!==t&&0<f.length&&f.some(function(t){return e.adapter_.containsEventTarget(t)})?this.resetActivationState_():(void 0!==t&&(f.push(t.target),this.registerDeactivationHandlers_(t)),i.wasElementMadeActive=this.checkElementMadeActive_(t),i.wasElementMadeActive&&this.animateActivation_(),requestAnimationFrame(function(){f=[],i.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(i.wasElementMadeActive=e.checkElementMadeActive_(t),i.wasElementMadeActive&&e.animateActivation_()),i.wasElementMadeActive||(e.activationState_=e.defaultActivationState_())})))}}},p.prototype.checkElementMadeActive_=function(t){return void 0===t||"keydown"!==t.type||this.adapter_.isSurfaceActive()},p.prototype.animateActivation_=function(){var t=this,e=p.strings,i=e.VAR_FG_TRANSLATE_START,n=e.VAR_FG_TRANSLATE_END,r=p.cssClasses,a=r.FG_DEACTIVATION,o=r.FG_ACTIVATION,s=p.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal_();var l="",c="";if(!this.adapter_.isUnbounded()){var u=this.getFgTranslationCoordinates_(),d=u.startPoint,f=u.endPoint;l=d.x+"px, "+d.y+"px",c=f.x+"px, "+f.y+"px"}this.adapter_.updateCssVariable(i,l),this.adapter_.updateCssVariable(n,c),clearTimeout(this.activationTimer_),clearTimeout(this.fgDeactivationRemovalTimer_),this.rmBoundedActivationClasses_(),this.adapter_.removeClass(a),this.adapter_.computeBoundingRect(),this.adapter_.addClass(o),this.activationTimer_=setTimeout(function(){return t.activationTimerCallback_()},s)},p.prototype.getFgTranslationCoordinates_=function(){var t,e=this.activationState_,i=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?Object(l.b)(i,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}}},p.prototype.runDeactivationUXLogicIfReady_=function(){var t=this,e=p.cssClasses.FG_DEACTIVATION,i=this.activationState_,n=i.hasDeactivationUXRun,r=i.isActivated;!n&&r||!this.activationAnimationHasEnded_||(this.rmBoundedActivationClasses_(),this.adapter_.addClass(e),this.fgDeactivationRemovalTimer_=setTimeout(function(){t.adapter_.removeClass(e)},s.FG_DEACTIVATION_MS))},p.prototype.rmBoundedActivationClasses_=function(){var t=p.cssClasses.FG_ACTIVATION;this.adapter_.removeClass(t),this.activationAnimationHasEnded_=!1,this.adapter_.computeBoundingRect()},p.prototype.resetActivationState_=function(){var t=this;this.previousActivationEvent_=this.activationState_.activationEvent,this.activationState_=this.defaultActivationState_(),setTimeout(function(){return t.previousActivationEvent_=void 0},p.numbers.TAP_DELAY_MS)},p.prototype.deactivate_=function(){var t=this,e=this.activationState_;if(e.isActivated){var i=n.a({},e);e.isProgrammatic?(requestAnimationFrame(function(){return t.animateDeactivation_(i)}),this.resetActivationState_()):(this.deregisterDeactivationHandlers_(),requestAnimationFrame(function(){t.activationState_.hasDeactivationUXRun=!0,t.animateDeactivation_(i),t.resetActivationState_()}))}},p.prototype.animateDeactivation_=function(t){var e=t.wasActivatedByPointer,i=t.wasElementMadeActive;(e||i)&&this.runDeactivationUXLogicIfReady_()},p.prototype.layoutInternal_=function(){this.frame_=this.adapter_.computeBoundingRect();var t=Math.max(this.frame_.height,this.frame_.width);this.maxRadius_=this.adapter_.isUnbounded()?t:Math.sqrt(Math.pow(this.frame_.width,2)+Math.pow(this.frame_.height,2))+p.numbers.PADDING,this.initialSize_=Math.floor(t*p.numbers.INITIAL_ORIGIN_SCALE),this.fgScale_=""+this.maxRadius_/this.initialSize_,this.updateLayoutCssVars_()},p.prototype.updateLayoutCssVars_=function(){var t=p.strings,e=t.VAR_FG_SIZE,i=t.VAR_LEFT,n=t.VAR_TOP,r=t.VAR_FG_SCALE;this.adapter_.updateCssVariable(e,this.initialSize_+"px"),this.adapter_.updateCssVariable(r,this.fgScale_),this.adapter_.isUnbounded()&&(this.unboundedCoords_={left:Math.round(this.frame_.width/2-this.initialSize_/2),top:Math.round(this.frame_.height/2-this.initialSize_/2)},this.adapter_.updateCssVariable(i,this.unboundedCoords_.left+"px"),this.adapter_.updateCssVariable(n,this.unboundedCoords_.top+"px"))},p);function p(t){var e=c.call(this,n.a({},p.defaultAdapter,t))||this;return e.activationAnimationHasEnded_=!1,e.activationTimer_=0,e.fgDeactivationRemovalTimer_=0,e.fgScale_="0",e.frame_={width:0,height:0},e.initialSize_=0,e.layoutFrame_=0,e.maxRadius_=0,e.unboundedCoords_={left:0,top:0},e.activationState_=e.defaultActivationState_(),e.activationTimerCallback_=function(){e.activationAnimationHasEnded_=!0,e.runDeactivationUXLogicIfReady_()},e.activateHandler_=function(t){return e.activate_(t)},e.deactivateHandler_=function(){return e.deactivate_()},e.focusHandler_=function(){return e.handleFocus()},e.blurHandler_=function(){return e.handleBlur()},e.resizeHandler_=function(){return e.layout()},e}},12:function(t,e,i){"use strict";i.d(e,"a",function(){return c});var n,r=i(0),a=i(5),o=i(8),s=i(10),l=i(6),c=(n=a.a,r.b(u,n),u.attachTo=function(t,e){void 0===e&&(e={isUnbounded:void 0});var i=new u(t);return void 0!==e.isUnbounded&&(i.unbounded=e.isUnbounded),i},u.createAdapter=function(t){return{addClass:function(e){return t.root_.classList.add(e)},browserSupportsCssVars:function(){return l.c(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,l.a())},deregisterInteractionHandler:function(e,i){return t.root_.removeEventListener(e,i,l.a())},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},getWindowPageOffset:function(){return{x:window.pageXOffset,y:window.pageYOffset}},isSurfaceActive:function(){return Object(o.b)(t.root_,":active")},isSurfaceDisabled:function(){return Boolean(t.disabled)},isUnbounded:function(){return Boolean(t.unbounded)},registerDocumentInteractionHandler:function(t,e){return document.documentElement.addEventListener(t,e,l.a())},registerInteractionHandler:function(e,i){return t.root_.addEventListener(e,i,l.a())},registerResizeHandler:function(t){return window.addEventListener("resize",t)},removeClass:function(e){return t.root_.classList.remove(e)},updateCssVariable:function(e,i){return t.root_.style.setProperty(e,i)}}},Object.defineProperty(u.prototype,"unbounded",{get:function(){return Boolean(this.unbounded_)},set:function(t){this.unbounded_=Boolean(t),this.setUnbounded_()},enumerable:!0,configurable:!0}),u.prototype.activate=function(){this.foundation_.activate()},u.prototype.deactivate=function(){this.foundation_.deactivate()},u.prototype.layout=function(){this.foundation_.layout()},u.prototype.getDefaultFoundation=function(){return new s.a(u.createAdapter(this))},u.prototype.initialSyncWithDOM=function(){var t=this.root_;this.unbounded="mdcRippleIsUnbounded"in t.dataset},u.prototype.setUnbounded_=function(){this.foundation_.setUnbounded(Boolean(this.unbounded_))},u);function u(){var t=null!==n&&n.apply(this,arguments)||this;return t.disabled=!1,t}},2:function(t,e,i){"use strict";i.d(e,"a",function(){return n});var n=(Object.defineProperty(r,"cssClasses",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(r,"strings",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(r,"numbers",{get:function(){return{}},enumerable:!0,configurable:!0}),Object.defineProperty(r,"defaultAdapter",{get:function(){return{}},enumerable:!0,configurable:!0}),r.prototype.init=function(){},r.prototype.destroy=function(){},r);function r(t){void 0===t&&(t={}),this.adapter_=t}},4:function(t,e,i){"use strict";function n(t,e,i,n,r,a,o,s){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),a&&(c._scopeId="data-v-"+a),o?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},c._ssrRegister=l):r&&(l=s?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}i.d(e,"a",function(){return n})},5:function(t,e,i){"use strict";i.d(e,"a",function(){return a});var n=i(0),r=i(2),a=(o.attachTo=function(t){return new o(t,new r.a({}))},o.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e]},o.prototype.getDefaultFoundation=function(){throw new Error("Subclasses must override getDefaultFoundation to return a properly configured foundation class")},o.prototype.initialSyncWithDOM=function(){},o.prototype.destroy=function(){this.foundation_.destroy()},o.prototype.listen=function(t,e){this.root_.addEventListener(t,e)},o.prototype.unlisten=function(t,e){this.root_.removeEventListener(t,e)},o.prototype.emit=function(t,e,i){var n;void 0===i&&(i=!1),"function"==typeof CustomEvent?n=new CustomEvent(t,{bubbles:i,detail:e}):(n=document.createEvent("CustomEvent")).initCustomEvent(t,i,!1,e),this.root_.dispatchEvent(n)},o);function o(t,e){for(var i=[],r=2;r<arguments.length;r++)i[r-2]=arguments[r];this.root_=t,this.initialize.apply(this,n.d(i)),this.foundation_=void 0===e?this.getDefaultFoundation():e,this.foundation_.init(),this.initialSyncWithDOM()}},55:function(t,e,i){},6:function(t,e,i){"use strict";var n,r;function a(t,e){void 0===e&&(e=!1);var i,r=t.CSS;if("boolean"==typeof n&&!e)return n;if(!r||"function"!=typeof r.supports)return!1;var a=r.supports("--css-vars","yes"),o=r.supports("(--css-vars: yes)")&&r.supports("color","#00000000");return i=!(!a&&!o||function(t){var e=t.document,i=e.createElement("div");i.className="mdc-ripple-surface--test-edge-var-bug",e.body.appendChild(i);var n=t.getComputedStyle(i),r=null!==n&&"solid"===n.borderTopStyle;return i.parentNode&&i.parentNode.removeChild(i),r}(t)),e||(n=i),i}function o(t,e){if(void 0===t&&(t=window),void 0===e&&(e=!1),void 0===r||e){var i=!1;try{t.document.addEventListener("test",function(){},{get passive(){return i=!0}})}catch(t){}r=i}return!!r&&{passive:!0}}function s(t,e,i){if(!t)return{x:0,y:0};var n,r,a=e.x,o=e.y,s=a+i.left,l=o+i.top;if("touchstart"===t.type){var c=t;n=c.changedTouches[0].pageX-s,r=c.changedTouches[0].pageY-l}else{var u=t;n=u.pageX-s,r=u.pageY-l}return{x:n,y:r}}i.d(e,"c",function(){return a}),i.d(e,"a",function(){return o}),i.d(e,"b",function(){return s})},64:function(t,e,i){"use strict";i.r(e);var n,r=i(0),a=i(5),o=i(12),s=i(2),l={FIXED:"mdc-toolbar--fixed",FIXED_AT_LAST_ROW:"mdc-toolbar--fixed-at-last-row",FIXED_LASTROW:"mdc-toolbar--fixed-lastrow-only",FLEXIBLE_DEFAULT_BEHAVIOR:"mdc-toolbar--flexible-default-behavior",FLEXIBLE_MAX:"mdc-toolbar--flexible-space-maximized",FLEXIBLE_MIN:"mdc-toolbar--flexible-space-minimized",TOOLBAR_ROW_FLEXIBLE:"mdc-toolbar--flexible"},c={CHANGE_EVENT:"MDCToolbar:change",FIRST_ROW_SELECTOR:".mdc-toolbar__row:first-child",ICON_SELECTOR:".mdc-toolbar__icon",TITLE_SELECTOR:".mdc-toolbar__title"},u={MAX_TITLE_SIZE:2.125,MIN_TITLE_SIZE:1.25,TOOLBAR_MOBILE_BREAKPOINT:600,TOOLBAR_ROW_HEIGHT:64,TOOLBAR_ROW_MOBILE_HEIGHT:56},d=(n=s.a,r.b(f,n),Object.defineProperty(f,"cssClasses",{get:function(){return l},enumerable:!0,configurable:!0}),Object.defineProperty(f,"strings",{get:function(){return c},enumerable:!0,configurable:!0}),Object.defineProperty(f,"numbers",{get:function(){return u},enumerable:!0,configurable:!0}),Object.defineProperty(f,"defaultAdapter",{get:function(){return{hasClass:function(){return!1},addClass:function(){},removeClass:function(){},registerScrollHandler:function(){},deregisterScrollHandler:function(){},registerResizeHandler:function(){},deregisterResizeHandler:function(){},getViewportWidth:function(){return 0},getViewportScrollY:function(){return 0},getOffsetHeight:function(){return 0},getFirstRowElementOffsetHeight:function(){return 0},notifyChange:function(){},setStyle:function(){},setStyleForTitleElement:function(){},setStyleForFlexibleRowElement:function(){},setStyleForFixedAdjustElement:function(){}}},enumerable:!0,configurable:!0}),f.prototype.init=function(){var t=this;this.isFixed_=this.adapter_.hasClass(l.FIXED),this.isFixedLastRow_=this.adapter_.hasClass(l.FIXED_LASTROW)&&this.isFixed_,this.hasFlexibleFirstRow_=this.adapter_.hasClass(l.TOOLBAR_ROW_FLEXIBLE),this.hasFlexibleFirstRow_&&(this.useFlexDefaultBehavior_=this.adapter_.hasClass(l.FLEXIBLE_DEFAULT_BEHAVIOR)),this.resizeHandler_=function(){return t.checkRowHeight_()},this.scrollHandler_=function(){return t.updateToolbarStyles_()},this.adapter_.registerResizeHandler(this.resizeHandler_),this.adapter_.registerScrollHandler(this.scrollHandler_),this.initKeyRatio_(),this.setKeyHeights_()},f.prototype.destroy=function(){this.adapter_.deregisterResizeHandler(this.resizeHandler_),this.adapter_.deregisterScrollHandler(this.scrollHandler_)},f.prototype.updateAdjustElementStyles=function(){this.isFixed_&&this.adapter_.setStyleForFixedAdjustElement("margin-top",this.calculations_.toolbarHeight+"px")},f.prototype.getFlexibleExpansionRatio_=function(t){return Math.max(0,1-t/(this.calculations_.flexibleExpansionHeight+1e-4))},f.prototype.checkRowHeight_=function(){var t=this;cancelAnimationFrame(this.checkRowHeightFrame_),this.checkRowHeightFrame_=requestAnimationFrame(function(){return t.setKeyHeights_()})},f.prototype.setKeyHeights_=function(){var t=this.getRowHeight_();t!==this.calculations_.toolbarRowHeight&&(this.calculations_.toolbarRowHeight=t,this.calculations_.toolbarHeight=this.calculations_.toolbarRatio*this.calculations_.toolbarRowHeight,this.calculations_.flexibleExpansionHeight=this.calculations_.flexibleExpansionRatio*this.calculations_.toolbarRowHeight,this.calculations_.maxTranslateYDistance=this.calculations_.maxTranslateYRatio*this.calculations_.toolbarRowHeight,this.calculations_.scrollThreshold=this.calculations_.scrollThresholdRatio*this.calculations_.toolbarRowHeight,this.updateAdjustElementStyles(),this.updateToolbarStyles_())},f.prototype.updateToolbarStyles_=function(){var t=this;cancelAnimationFrame(this.scrollFrame_),this.scrollFrame_=requestAnimationFrame(function(){var e=t.adapter_.getViewportScrollY(),i=t.scrolledOutOfThreshold_(e);if(!i||!t.executedLastChange_){var n=t.getFlexibleExpansionRatio_(e);t.updateToolbarFlexibleState_(n),t.isFixedLastRow_&&t.updateToolbarFixedState_(e),t.hasFlexibleFirstRow_&&t.updateFlexibleRowElementStyles_(n),t.executedLastChange_=i,t.adapter_.notifyChange({flexibleExpansionRatio:n})}})},f.prototype.scrolledOutOfThreshold_=function(t){return t>this.calculations_.scrollThreshold},f.prototype.initKeyRatio_=function(){var t=this.getRowHeight_(),e=this.adapter_.getFirstRowElementOffsetHeight()/t;this.calculations_.toolbarRatio=this.adapter_.getOffsetHeight()/t,this.calculations_.flexibleExpansionRatio=e-1,this.calculations_.maxTranslateYRatio=this.isFixedLastRow_?this.calculations_.toolbarRatio-e:0,this.calculations_.scrollThresholdRatio=(this.isFixedLastRow_?this.calculations_.toolbarRatio:e)-1},f.prototype.getRowHeight_=function(){var t=u.TOOLBAR_MOBILE_BREAKPOINT;return this.adapter_.getViewportWidth()<t?u.TOOLBAR_ROW_MOBILE_HEIGHT:u.TOOLBAR_ROW_HEIGHT},f.prototype.updateToolbarFlexibleState_=function(t){this.adapter_.removeClass(l.FLEXIBLE_MAX),this.adapter_.removeClass(l.FLEXIBLE_MIN),1===t?this.adapter_.addClass(l.FLEXIBLE_MAX):0===t&&this.adapter_.addClass(l.FLEXIBLE_MIN)},f.prototype.updateToolbarFixedState_=function(t){var e=Math.max(0,Math.min(t-this.calculations_.flexibleExpansionHeight,this.calculations_.maxTranslateYDistance));this.adapter_.setStyle("transform","translateY("+-e+"px)"),e===this.calculations_.maxTranslateYDistance?this.adapter_.addClass(l.FIXED_AT_LAST_ROW):this.adapter_.removeClass(l.FIXED_AT_LAST_ROW)},f.prototype.updateFlexibleRowElementStyles_=function(t){if(this.isFixed_){var e=this.calculations_.flexibleExpansionHeight*t;this.adapter_.setStyleForFlexibleRowElement("height",e+this.calculations_.toolbarRowHeight+"px")}this.useFlexDefaultBehavior_&&this.updateElementStylesDefaultBehavior_(t)},f.prototype.updateElementStylesDefaultBehavior_=function(t){var e=u.MIN_TITLE_SIZE,i=(u.MAX_TITLE_SIZE-e)*t+e;this.adapter_.setStyleForTitleElement("font-size",i+"rem")},f);function f(t){var e=n.call(this,r.a({},f.defaultAdapter,t))||this;return e.checkRowHeightFrame_=0,e.scrollFrame_=0,e.executedLastChange_=!1,e.isFixed_=!1,e.isFixedLastRow_=!1,e.hasFlexibleFirstRow_=!1,e.useFlexDefaultBehavior_=!1,e.calculations_={flexibleExpansionHeight:0,flexibleExpansionRatio:0,maxTranslateYDistance:0,maxTranslateYRatio:0,scrollThreshold:0,scrollThresholdRatio:0,toolbarHeight:0,toolbarRatio:0,toolbarRowHeight:0},e}var _,p=d.strings,h=(_=a.a,r.b(m,_),m.attachTo=function(t){return new m(t)},m.prototype.initialize=function(){var t=this;this.ripples_=[],this.fixedAdjustElement_=null,this.titleElement_=this.root_.querySelector(p.TITLE_SELECTOR);var e=this.root_.querySelector(p.FIRST_ROW_SELECTOR);if(!e)throw new Error("MDCToolbar: Required sub-element '"+p.FIRST_ROW_SELECTOR+"' is missing");this.firstRowElement_=e,[].forEach.call(this.root_.querySelectorAll(p.ICON_SELECTOR),function(e){var i=o.a.attachTo(e);i.unbounded=!0,t.ripples_.push(i)})},m.prototype.destroy=function(){this.ripples_.forEach(function(t){t.destroy()}),_.prototype.destroy.call(this)},Object.defineProperty(m.prototype,"fixedAdjustElement",{get:function(){return this.fixedAdjustElement_},set:function(t){this.fixedAdjustElement_=t,this.foundation_.updateAdjustElementStyles()},enumerable:!0,configurable:!0}),m.prototype.getDefaultFoundation=function(){var t=this;return new d({hasClass:function(e){return t.root_.classList.contains(e)},addClass:function(e){return t.root_.classList.add(e)},removeClass:function(e){return t.root_.classList.remove(e)},registerScrollHandler:function(t){return window.addEventListener("scroll",t)},deregisterScrollHandler:function(t){return window.removeEventListener("scroll",t)},registerResizeHandler:function(t){return window.addEventListener("resize",t)},deregisterResizeHandler:function(t){return window.removeEventListener("resize",t)},getViewportWidth:function(){return window.innerWidth},getViewportScrollY:function(){return window.pageYOffset},getOffsetHeight:function(){return t.root_.offsetHeight},getFirstRowElementOffsetHeight:function(){return t.firstRowElement_.offsetHeight},notifyChange:function(e){return t.emit(p.CHANGE_EVENT,e)},setStyle:function(e,i){return t.root_.style.setProperty(e,i)},setStyleForTitleElement:function(e,i){t.titleElement_&&t.titleElement_.style.setProperty(e,i)},setStyleForFlexibleRowElement:function(e,i){return t.firstRowElement_.style.setProperty(e,i)},setStyleForFixedAdjustElement:function(e,i){t.fixedAdjustElement&&t.fixedAdjustElement.style.setProperty(e,i)}})},m);function m(){return null!==_&&_.apply(this,arguments)||this}var v=i(1),b={mixins:[v.a,v.b],props:{flexible:{type:Boolean,required:!1},flexibleDefault:{type:Boolean,required:!1},fixed:{type:Boolean,required:!1},waterfall:{type:Boolean,required:!1},fixedLastRow:{type:Boolean,required:!1}},data:function(){return{mdcToolbar:void 0}},computed:{classes:function(){return{"mdc-toolbar--fixed":this.fixed||this.waterfall||this.fixedLastRow,"mdc-toolbar--fixed-lastrow-only":this.fixedLastRow,"mdc-toolbar--waterfall":this.waterfall,"mdc-toolbar--flexible":this.flexible,"mdc-toolbar--flexible-default-behavior":this.flexible&&this.flexibleDefault}}},mounted:function(){this.mdcToolbar=h.attachTo(this.$el),this.mdcToolbar.fixedAdjustElement=document.querySelector(".mdc-toolbar-fixed-adjust")},beforeDestroy:function(){this.mdcToolbar.destroy()}},y=i(4),g=Object(y.a)(b,function(){var t=this.$createElement;return(this._self._c||t)("header",{staticClass:"mdc-toolbar",class:this.classes},[this._t("default")],2)},[],!1,null,null,null).exports,E={mixins:[v.a,v.b]},T=Object(y.a)(E,function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"mdc-toolbar-fixed-adjust"},[this._t("default")],2)},[],!1,null,null,null).exports,A={mixins:[v.a,v.b],props:{icon:{type:String,required:!0},menuIcon:{type:Boolean,default:!1}},computed:{classes:function(){return{"mdc-toolbar__menu-icon":this.menuIcon,"mdc-toolbar__icon":!this.menuIcon}}}},R=Object(y.a)(A,function(){var t=this,e=t.$createElement;return(t._self._c||e)("a",t._g({staticClass:"material-icons",class:t.classes},t.$listeners),[t._v("\n "+t._s(t.icon)+"\n")])},[],!1,null,null,null).exports,x={mixins:[v.a,v.b],props:{shrinkStart:{type:Boolean,required:!1},shrinkCenter:{type:Boolean,required:!1},shrinkEnd:{type:Boolean,required:!1}},methods:{shrinkClass:function(t){return{"mdc-toolbar__section--shrink-to-fit":t}}}},S=Object(y.a)(x,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"mdc-toolbar__row"},[t.$slots.default||t.$slots.start?i("section",{staticClass:"mdc-toolbar__section mdc-toolbar__section--align-start",class:t.shrinkClass(t.shrinkStart)},[t._t("start"),t._v(" "),t.$slots.default?i("span",{staticClass:"mdc-toolbar__title"},[t._t("default")],2):t._e()],2):t._e(),t._v(" "),t.$slots.center?i("section",{staticClass:"mdc-toolbar__section",class:t.shrinkClass(t.shrinkCenter)},[t._t("center")],2):t._e(),t._v(" "),t.$slots.end?i("section",{staticClass:"mdc-toolbar__section mdc-toolbar__section--align-end",class:t.shrinkClass(t.shrinkEnd)},[t._t("end")],2):t._e()])},[],!1,null,null,null).exports,C=(i(55),i(7)),w={install:function(t){t.component("m-toolbar",g),t.component("m-toolbar-fixed-adjust",T),t.component("m-toolbar-icon",R),t.component("m-toolbar-row",S)}};e.default=w,Object(C.a)(w)},7:function(t,e,i){"use strict";function n(t){"undefined"!=typeof window&&window.Vue&&window.Vue.use(t)}i.d(e,"a",function(){return n})},8:function(t,e,i){"use strict";function n(t,e){if(t.closest)return t.closest(e);for(var i=t;i;){if(r(i,e))return i;i=i.parentElement}return null}function r(t,e){return(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e)}i.d(e,"a",function(){return n}),i.d(e,"b",function(){return r})}},t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{enumerable:!0,get:n})},t.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},t.t=function(e,i){if(1&i&&(e=t(e)),8&i)return e;if(4&i&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&i&&"string"!=typeof e)for(var r in e)t.d(n,r,function(t){return e[t]}.bind(null,r));return n},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},t.p="",t(t.s=64);function t(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var e,i});