!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/platform-browser"),require("@angular/core"),require("devextreme/ui/switch"),require("@angular/forms"),require("devextreme-angular/core")):"function"==typeof define&&define.amd?define("devextreme-angular/ui/switch",["exports","@angular/platform-browser","@angular/core","devextreme/ui/switch","@angular/forms","devextreme-angular/core"],t):t(((e=e||self)["devextreme-angular"]=e["devextreme-angular"]||{},e["devextreme-angular"].ui=e["devextreme-angular"].ui||{},e["devextreme-angular"].ui.switch={}),e.ng.platformBrowser,e.ng.core,e.DxSwitch,e.ng.forms,e["devextreme-angular"].core)}(this,(function(e,t,n,i,o,r){"use strict";i=i&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i;
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation. All rights reserved.
    Licensed under the Apache License, Version 2.0 (the "License"); you may not use
    this file except in compliance with the License. You may obtain a copy of the
    License at http://www.apache.org/licenses/LICENSE-2.0

    THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
    WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
    MERCHANTABLITY OR NON-INFRINGEMENT.

    See the Apache Version 2.0 License for specific language governing permissions
    and limitations under the License.
    ***************************************************************************** */
var p=function(e,t){return(p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function a(e,t,n,i){var o,r=arguments.length,p=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(e,t,n,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(p=(r<3?o(p):r>3?o(t,n,p):o(t,n))||p);return r>3&&p&&Object.defineProperty(t,n,p),p}function s(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}
/*!
     * devextreme-angular
     * Version: 20.1.3
     * Build date: Fri Apr 24 2020
     *
     * Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED
     *
     * This software may be modified and distributed under the terms
     * of the MIT license. See the LICENSE file in the root of the project for details.
     *
     * https://github.com/DevExpress/devextreme-angular
     */
var u={provide:o.NG_VALUE_ACCESSOR,useExisting:n.forwardRef((function(){return d})),multi:!0},d=function(e){function o(t,n,i,o,r,p,a,s){var u=e.call(this,t,n,i,o,a,s)||this;return u._watcherHelper=o,u._idh=r,u.touched=function(e){},u._createEventEmitters([{subscribe:"contentReady",emit:"onContentReady"},{subscribe:"disposing",emit:"onDisposing"},{subscribe:"initialized",emit:"onInitialized"},{subscribe:"optionChanged",emit:"onOptionChanged"},{subscribe:"valueChanged",emit:"onValueChanged"},{emit:"accessKeyChange"},{emit:"activeStateEnabledChange"},{emit:"disabledChange"},{emit:"elementAttrChange"},{emit:"focusStateEnabledChange"},{emit:"heightChange"},{emit:"hintChange"},{emit:"hoverStateEnabledChange"},{emit:"isValidChange"},{emit:"nameChange"},{emit:"offTextChange"},{emit:"onTextChange"},{emit:"readOnlyChange"},{emit:"rtlEnabledChange"},{emit:"switchedOffTextChange"},{emit:"switchedOnTextChange"},{emit:"tabIndexChange"},{emit:"validationErrorChange"},{emit:"validationErrorsChange"},{emit:"validationMessageModeChange"},{emit:"validationStatusChange"},{emit:"valueChange"},{emit:"visibleChange"},{emit:"widthChange"},{emit:"onBlur"}]),u._idh.setHost(u),p.setHost(u),u}var d,l;return function(e,t){function n(){this.constructor=e}p(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(o,e),Object.defineProperty(o.prototype,"accessKey",{get:function(){return this._getOption("accessKey")},set:function(e){this._setOption("accessKey",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"activeStateEnabled",{get:function(){return this._getOption("activeStateEnabled")},set:function(e){this._setOption("activeStateEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"disabled",{get:function(){return this._getOption("disabled")},set:function(e){this._setOption("disabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"elementAttr",{get:function(){return this._getOption("elementAttr")},set:function(e){this._setOption("elementAttr",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"focusStateEnabled",{get:function(){return this._getOption("focusStateEnabled")},set:function(e){this._setOption("focusStateEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"height",{get:function(){return this._getOption("height")},set:function(e){this._setOption("height",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hint",{get:function(){return this._getOption("hint")},set:function(e){this._setOption("hint",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hoverStateEnabled",{get:function(){return this._getOption("hoverStateEnabled")},set:function(e){this._setOption("hoverStateEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isValid",{get:function(){return this._getOption("isValid")},set:function(e){this._setOption("isValid",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"name",{get:function(){return this._getOption("name")},set:function(e){this._setOption("name",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"offText",{get:function(){return this._getOption("offText")},set:function(e){this._setOption("offText",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"onText",{get:function(){return this._getOption("onText")},set:function(e){this._setOption("onText",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"readOnly",{get:function(){return this._getOption("readOnly")},set:function(e){this._setOption("readOnly",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"rtlEnabled",{get:function(){return this._getOption("rtlEnabled")},set:function(e){this._setOption("rtlEnabled",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"switchedOffText",{get:function(){return this._getOption("switchedOffText")},set:function(e){this._setOption("switchedOffText",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"switchedOnText",{get:function(){return this._getOption("switchedOnText")},set:function(e){this._setOption("switchedOnText",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"tabIndex",{get:function(){return this._getOption("tabIndex")},set:function(e){this._setOption("tabIndex",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"validationError",{get:function(){return this._getOption("validationError")},set:function(e){this._setOption("validationError",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"validationErrors",{get:function(){return this._getOption("validationErrors")},set:function(e){this._setOption("validationErrors",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"validationMessageMode",{get:function(){return this._getOption("validationMessageMode")},set:function(e){this._setOption("validationMessageMode",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"validationStatus",{get:function(){return this._getOption("validationStatus")},set:function(e){this._setOption("validationStatus",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"value",{get:function(){return this._getOption("value")},set:function(e){this._setOption("value",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"visible",{get:function(){return this._getOption("visible")},set:function(e){this._setOption("visible",e)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"width",{get:function(){return this._getOption("width")},set:function(e){this._setOption("width",e)},enumerable:!0,configurable:!0}),o.prototype.change=function(e){},o.prototype._createInstance=function(e,t){return new i(e,t)},o.prototype.writeValue=function(e){this.eventHelper.lockedValueChangeEvent=!0,this.value=e,this.eventHelper.lockedValueChangeEvent=!1},o.prototype.setDisabledState=function(e){this.disabled=e},o.prototype.registerOnChange=function(e){this.change=e},o.prototype.registerOnTouched=function(e){this.touched=e},o.prototype._createWidget=function(t){var n=this;e.prototype._createWidget.call(this,t),this.instance.on("focusOut",(function(e){n.eventHelper.fireNgEvent("onBlur",[e])}))},o.prototype.ngOnDestroy=function(){this._destroyWidget()},o.prototype.ngOnChanges=function(t){e.prototype.ngOnChanges.call(this,t),this.setupChanges("validationErrors",t)},o.prototype.setupChanges=function(e,t){e in this._optionsToUpdate||this._idh.setup(e,t)},o.prototype.ngDoCheck=function(){this._idh.doCheck("validationErrors"),this._watcherHelper.checkWatchers(),e.prototype.ngDoCheck.call(this),e.prototype.clearChangedOptions.call(this)},o.prototype._setOption=function(t,n){var i=this._idh.setupSingle(t,n),o=null!==this._idh.getChanges(t,n);(i||o)&&e.prototype._setOption.call(this,t,n)},o.ctorParameters=function(){return[{type:n.ElementRef},{type:n.NgZone},{type:r.DxTemplateHost},{type:r.WatcherHelper},{type:r.IterableDifferHelper},{type:r.NestedOptionHost},{type:t.TransferState},{type:void 0,decorators:[{type:n.Inject,args:[n.PLATFORM_ID]}]}]},a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],o.prototype,"accessKey",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],o.prototype,"activeStateEnabled",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],o.prototype,"disabled",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],o.prototype,"elementAttr",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],o.prototype,"focusStateEnabled",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],o.prototype,"height",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],o.prototype,"hint",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],o.prototype,"hoverStateEnabled",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],o.prototype,"isValid",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],o.prototype,"name",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],o.prototype,"offText",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],o.prototype,"onText",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],o.prototype,"readOnly",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],o.prototype,"rtlEnabled",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],o.prototype,"switchedOffText",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],o.prototype,"switchedOnText",null),a([n.Input(),s("design:type",Number),s("design:paramtypes",[Number])],o.prototype,"tabIndex",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],o.prototype,"validationError",null),a([n.Input(),s("design:type",Array),s("design:paramtypes",[Array])],o.prototype,"validationErrors",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],o.prototype,"validationMessageMode",null),a([n.Input(),s("design:type",String),s("design:paramtypes",[String])],o.prototype,"validationStatus",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],o.prototype,"value",null),a([n.Input(),s("design:type",Boolean),s("design:paramtypes",[Boolean])],o.prototype,"visible",null),a([n.Input(),s("design:type",Object),s("design:paramtypes",[Object])],o.prototype,"width",null),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onContentReady",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onDisposing",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onInitialized",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onOptionChanged",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onValueChanged",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"accessKeyChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"activeStateEnabledChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"disabledChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"elementAttrChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"focusStateEnabledChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"heightChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"hintChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"hoverStateEnabledChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"isValidChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"nameChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"offTextChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onTextChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"readOnlyChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"rtlEnabledChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"switchedOffTextChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"switchedOnTextChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"tabIndexChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"validationErrorChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"validationErrorsChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"validationMessageModeChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"validationStatusChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"valueChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"visibleChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"widthChange",void 0),a([n.Output(),s("design:type",n.EventEmitter)],o.prototype,"onBlur",void 0),a([n.HostListener("valueChange",["$event"]),s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],o.prototype,"change",null),a([n.HostListener("onBlur",["$event"]),s("design:type",Object)],o.prototype,"touched",void 0),o=a([n.Component({selector:"dx-switch",template:"",providers:[r.DxTemplateHost,r.WatcherHelper,u,r.NestedOptionHost,r.IterableDifferHelper]}),(d=7,l=n.Inject(n.PLATFORM_ID),function(e,t){l(e,t,d)}),s("design:paramtypes",[n.ElementRef,n.NgZone,r.DxTemplateHost,r.WatcherHelper,r.IterableDifferHelper,r.NestedOptionHost,t.TransferState,Object])],o)}(r.DxComponent),l=function(){function e(){}return e=a([n.NgModule({imports:[r.DxIntegrationModule,r.DxTemplateModule,t.BrowserTransferStateModule],declarations:[d],exports:[d,r.DxTemplateModule]})],e)}();e.DxSwitchComponent=d,e.DxSwitchModule=l,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=devextreme-angular-ui-switch.umd.min.js.map