import{r as t,c as n,h as e,g as i}from"./p-5a5e7c99.js";import{_ as s,a as c,M as r,d as a,b as u}from"./p-2b926682.js";import{m as o}from"./p-c0a20e71.js";import{M as h,a as d}from"./p-216a6f85.js";
/**
 * @license
 * Copyright 2018 Google Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */var l={CHECKED:"mdc-switch--checked",DISABLED:"mdc-switch--disabled"},f={NATIVE_CONTROL_SELECTOR:".mdc-switch__native-control",RIPPLE_SURFACE_SELECTOR:".mdc-switch__thumb-underlay"},m=function(t){function n(e){return t.call(this,c({},n.defaultAdapter,e))||this}return s(n,t),Object.defineProperty(n,"strings",{get:function(){return f},enumerable:!0,configurable:!0}),Object.defineProperty(n,"cssClasses",{get:function(){return l},enumerable:!0,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNativeControlChecked:function(){},setNativeControlDisabled:function(){}}},enumerable:!0,configurable:!0}),n.prototype.setChecked=function(t){this.adapter_.setNativeControlChecked(t),this.updateCheckedStyling_(t)},n.prototype.setDisabled=function(t){this.adapter_.setNativeControlDisabled(t),t?this.adapter_.addClass(l.DISABLED):this.adapter_.removeClass(l.DISABLED)},n.prototype.handleChange=function(t){this.updateCheckedStyling_(t.target.checked)},n.prototype.updateCheckedStyling_=function(t){t?this.adapter_.addClass(l.CHECKED):this.adapter_.removeClass(l.CHECKED)},n}(r),b=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.ripple_=n.createRipple_(),n}return s(n,t),n.attachTo=function(t){return new n(t)},n.prototype.destroy=function(){t.prototype.destroy.call(this),this.ripple_.destroy(),this.nativeControl_.removeEventListener("change",this.changeHandler_)},n.prototype.initialSyncWithDOM=function(){var t=this;this.changeHandler_=function(){for(var n,e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];return(n=t.foundation_).handleChange.apply(n,a(e))},this.nativeControl_.addEventListener("change",this.changeHandler_),this.checked=this.checked},n.prototype.getDefaultFoundation=function(){var t=this;return new m({addClass:function(n){return t.root_.classList.add(n)},removeClass:function(n){return t.root_.classList.remove(n)},setNativeControlChecked:function(n){return t.nativeControl_.checked=n},setNativeControlDisabled:function(n){return t.nativeControl_.disabled=n}})},Object.defineProperty(n.prototype,"ripple",{get:function(){return this.ripple_},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"checked",{get:function(){return this.nativeControl_.checked},set:function(t){this.foundation_.setChecked(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disabled",{get:function(){return this.nativeControl_.disabled},set:function(t){this.foundation_.setDisabled(t)},enumerable:!0,configurable:!0}),n.prototype.createRipple_=function(){var t=this,n=this.root_.querySelector(m.strings.RIPPLE_SURFACE_SELECTOR),e=c({},h.createAdapter(this),{addClass:function(t){return n.classList.add(t)},computeBoundingRect:function(){return n.getBoundingClientRect()},deregisterInteractionHandler:function(n,e){t.nativeControl_.removeEventListener(n,e)},isSurfaceActive:function(){return o(t.nativeControl_,":active")},isUnbounded:function(){return!0},registerInteractionHandler:function(n,e){t.nativeControl_.addEventListener(n,e)},removeClass:function(t){return n.classList.remove(t)},updateCssVariable:function(t,e){n.style.setProperty(t,e)}});return new h(this.root_,new d(e))},Object.defineProperty(n.prototype,"nativeControl_",{get:function(){return this.root_.querySelector(m.strings.NATIVE_CONTROL_SELECTOR)},enumerable:!0,configurable:!0}),n}(u);const g=class{constructor(e){t(this,e),this.change=n(this,"change",7)}componentDidLoad(){this.switch=new b(this.host.shadowRoot.querySelector(".mdc-switch"))}switchUpdate(){this.checked=this.switch.checked,this.change.emit(this.checked)}render(){return[e("div",{class:{"mdc-switch":!0,"mdc-switch--disabled":this.disabled,"mdc-switch--checked":this.checked}},e("div",{class:"mdc-switch__track"}),e("div",{class:"mdc-switch__thumb-underlay"},e("div",{class:"mdc-switch__thumb"},e("input",{disabled:this.disabled,checked:this.checked,type:"checkbox",id:"switch-id",class:"mdc-switch__native-control",role:"switch",onChange:()=>this.switchUpdate()})))),e("label",{class:"mdc-typography",htmlFor:"switch-id"},this.label)]}get host(){return i(this)}static get style(){return":host{\@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));}}\@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));}}\@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0;}to{opacity:var(--mdc-ripple-fg-opacity,0);}}\@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0;}to{opacity:var(--mdc-ripple-fg-opacity,0);}}\@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity,0);}to{opacity:0;}}\@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity,0);}to{opacity:0;}}}:host .mdc-switch{display:inline-block;position:relative;outline:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}:host .mdc-switch.mdc-switch--checked .mdc-switch__track{background-color:#018786;background-color:var(--mdc-theme-secondary,#018786);border-color:#018786;border-color:var(--mdc-theme-secondary,#018786);}:host .mdc-switch.mdc-switch--checked .mdc-switch__thumb{background-color:#018786;background-color:var(--mdc-theme-secondary,#018786);border-color:#018786;border-color:var(--mdc-theme-secondary,#018786);}:host .mdc-switch:not(.mdc-switch--checked) .mdc-switch__track{background-color:#000;border-color:#000;}:host .mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb{background-color:#fff;border-color:#fff;}:host .mdc-switch__native-control{left:0;right:initial;position:absolute;top:0;width:68px;height:48px;margin:0;opacity:0;cursor:pointer;pointer-events:auto;}[dir=rtl]:host .mdc-switch__native-control,:host .mdc-switch__native-control[dir=rtl]{left:initial;right:0;}:host .mdc-switch__track{-webkit-box-sizing:border-box;box-sizing:border-box;width:32px;height:14px;border:1px solid;border-radius:7px;opacity:0.38;-webkit-transition:opacity 90ms cubic-bezier(0.4,0,0.2,1),background-color 90ms cubic-bezier(0.4,0,0.2,1),border-color 90ms cubic-bezier(0.4,0,0.2,1);transition:opacity 90ms cubic-bezier(0.4,0,0.2,1),background-color 90ms cubic-bezier(0.4,0,0.2,1),border-color 90ms cubic-bezier(0.4,0,0.2,1);}:host .mdc-switch__thumb-underlay{left:-18px;right:initial;display:-ms-flexbox;display:flex;position:absolute;top:-17px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:48px;height:48px;-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition:background-color 90ms cubic-bezier(0.4,0,0.2,1),border-color 90ms cubic-bezier(0.4,0,0.2,1),-webkit-transform 90ms cubic-bezier(0.4,0,0.2,1);transition:background-color 90ms cubic-bezier(0.4,0,0.2,1),border-color 90ms cubic-bezier(0.4,0,0.2,1),-webkit-transform 90ms cubic-bezier(0.4,0,0.2,1);transition:transform 90ms cubic-bezier(0.4,0,0.2,1),background-color 90ms cubic-bezier(0.4,0,0.2,1),border-color 90ms cubic-bezier(0.4,0,0.2,1);transition:transform 90ms cubic-bezier(0.4,0,0.2,1),background-color 90ms cubic-bezier(0.4,0,0.2,1),border-color 90ms cubic-bezier(0.4,0,0.2,1),-webkit-transform 90ms cubic-bezier(0.4,0,0.2,1);}[dir=rtl]:host .mdc-switch__thumb-underlay,:host .mdc-switch__thumb-underlay[dir=rtl]{left:initial;right:-18px;}:host .mdc-switch__thumb{-webkit-box-shadow:0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12);box-shadow:0px 3px 1px -2px rgba(0,0,0,0.2),0px 2px 2px 0px rgba(0,0,0,0.14),0px 1px 5px 0px rgba(0,0,0,0.12);-webkit-box-sizing:border-box;box-sizing:border-box;width:20px;height:20px;border:10px solid;border-radius:50%;pointer-events:none;z-index:1;}:host .mdc-switch--checked .mdc-switch__track{opacity:0.54;}:host .mdc-switch--checked .mdc-switch__thumb-underlay{-webkit-transform:translateX(20px);transform:translateX(20px);}[dir=rtl]:host .mdc-switch--checked .mdc-switch__thumb-underlay,:host .mdc-switch--checked .mdc-switch__thumb-underlay[dir=rtl]{-webkit-transform:translateX(-20px);transform:translateX(-20px);}:host .mdc-switch--checked .mdc-switch__native-control{-webkit-transform:translateX(-20px);transform:translateX(-20px);}[dir=rtl]:host .mdc-switch--checked .mdc-switch__native-control,:host .mdc-switch--checked .mdc-switch__native-control[dir=rtl]{-webkit-transform:translateX(20px);transform:translateX(20px);}:host .mdc-switch--disabled{opacity:0.38;pointer-events:none;}:host .mdc-switch--disabled .mdc-switch__thumb{border-width:1px;}:host .mdc-switch--disabled .mdc-switch__native-control{cursor:default;pointer-events:none;}:host .mdc-ripple-surface--test-edge-var-bug{--mdc-ripple-surface-test-edge-var:1px solid #000;visibility:hidden;}:host .mdc-ripple-surface--test-edge-var-bug::before{border:var(--mdc-ripple-surface-test-edge-var);}:host .mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb-underlay::before,:host .mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb-underlay::after{background-color:#9e9e9e;}:host .mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb-underlay:hover::before{opacity:0.08;}:host .mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb-underlay:not(.mdc-ripple-upgraded):focus::before,:host .mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb-underlay.mdc-ripple-upgraded--background-focused::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:0.24;}:host .mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb-underlay:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear;}:host .mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb-underlay:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:0.24;}:host .mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb-underlay.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:0.24;}:host .mdc-switch__thumb-underlay{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:rgba(0,0,0,0);}:host .mdc-switch__thumb-underlay::before,:host .mdc-switch__thumb-underlay::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\";}:host .mdc-switch__thumb-underlay::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;}:host .mdc-switch__thumb-underlay.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1));}:host .mdc-switch__thumb-underlay.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center;}:host .mdc-switch__thumb-underlay.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0);}:host .mdc-switch__thumb-underlay.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;}:host .mdc-switch__thumb-underlay.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));}:host .mdc-switch__thumb-underlay::before,:host .mdc-switch__thumb-underlay::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%;}:host .mdc-switch__thumb-underlay.mdc-ripple-upgraded::before,:host .mdc-switch__thumb-underlay.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%);}:host .mdc-switch__thumb-underlay.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%);}:host .mdc-switch__thumb-underlay::before,:host .mdc-switch__thumb-underlay::after{background-color:#018786;}\@supports not (-ms-ime-align:auto){:host .mdc-switch__thumb-underlay::before,:host .mdc-switch__thumb-underlay::after{background-color:var(--mdc-theme-secondary,#018786);}}:host .mdc-switch__thumb-underlay:hover::before{opacity:0.04;}:host .mdc-switch__thumb-underlay:not(.mdc-ripple-upgraded):focus::before,:host .mdc-switch__thumb-underlay.mdc-ripple-upgraded--background-focused::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:0.12;}:host .mdc-switch__thumb-underlay:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear;}:host .mdc-switch__thumb-underlay:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:0.12;}:host .mdc-switch__thumb-underlay.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:0.12;}:host .mdc-typography{font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;}:host .mdc-typography--headline1{font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:6rem;line-height:6rem;font-weight:300;letter-spacing:-0.015625em;text-decoration:inherit;text-transform:inherit;}:host .mdc-typography--headline2{font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:3.75rem;line-height:3.75rem;font-weight:300;letter-spacing:-0.0083333333em;text-decoration:inherit;text-transform:inherit;}:host .mdc-typography--headline3{font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:3rem;line-height:3.125rem;font-weight:400;letter-spacing:normal;text-decoration:inherit;text-transform:inherit;}:host .mdc-typography--headline4{font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:2.125rem;line-height:2.5rem;font-weight:400;letter-spacing:0.0073529412em;text-decoration:inherit;text-transform:inherit;}:host .mdc-typography--headline5{font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:1.5rem;line-height:2rem;font-weight:400;letter-spacing:normal;text-decoration:inherit;text-transform:inherit;}:host .mdc-typography--headline6{font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:1.25rem;line-height:2rem;font-weight:500;letter-spacing:0.0125em;text-decoration:inherit;text-transform:inherit;}:host .mdc-typography--subtitle1{font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:1rem;line-height:1.75rem;font-weight:400;letter-spacing:0.009375em;text-decoration:inherit;text-transform:inherit;}:host .mdc-typography--subtitle2{font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:0.875rem;line-height:1.375rem;font-weight:500;letter-spacing:0.0071428571em;text-decoration:inherit;text-transform:inherit;}:host .mdc-typography--body1{font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:1rem;line-height:1.5rem;font-weight:400;letter-spacing:0.03125em;text-decoration:inherit;text-transform:inherit;}:host .mdc-typography--body2{font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:0.875rem;line-height:1.25rem;font-weight:400;letter-spacing:0.0178571429em;text-decoration:inherit;text-transform:inherit;}:host .mdc-typography--caption{font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:0.75rem;line-height:1.25rem;font-weight:400;letter-spacing:0.0333333333em;text-decoration:inherit;text-transform:inherit;}:host .mdc-typography--button{font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:0.875rem;line-height:2.25rem;font-weight:500;letter-spacing:0.0892857143em;text-decoration:none;text-transform:uppercase;}:host .mdc-typography--overline{font-family:Roboto,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:0.75rem;line-height:2rem;font-weight:500;letter-spacing:0.1666666667em;text-decoration:none;text-transform:uppercase;}:host label{margin-left:10px;cursor:pointer;}"}};export{g as materials_switch};