(function () {
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }

  function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }

  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

  function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }

  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }

  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }

  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }

  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }

  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }

  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }

  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

  (window["webpackJsonp"] = window["webpackJsonp"] || []).push([["default~add-money-add-money-module~raise-dispute-transaction-raise-dispute-transaction-module~servic~c83d0716"], {
    /***/
    "0FS3":
    /*!********************************************************************************!*\
      !*** ./node_modules/@ngx-formly/core/__ivy_ngcc__/fesm2015/ngx-formly-core.js ***!
      \********************************************************************************/

    /*! exports provided: FormlyForm, FormlyField, FormlyAttributes, FORMLY_CONFIG, FormlyConfig, FormlyFormBuilder, FieldType, Field, FieldArrayType, FieldWrapper, FormlyModule, ɵdefineHiddenProp, ɵreverseDeepMerge, ɵgetFieldInitialValue, ɵclone, ɵwrapProperty, ɵa, ɵe, ɵh, ɵg, ɵf, ɵd, ɵb, ɵc */

    /***/
    function FS3(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormlyForm", function () {
        return FormlyForm;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormlyField", function () {
        return FormlyField;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormlyAttributes", function () {
        return FormlyAttributes;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FORMLY_CONFIG", function () {
        return FORMLY_CONFIG;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormlyConfig", function () {
        return FormlyConfig;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormlyFormBuilder", function () {
        return FormlyFormBuilder;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FieldType", function () {
        return FieldType;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "Field", function () {
        return Field;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FieldArrayType", function () {
        return FieldArrayType;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FieldWrapper", function () {
        return FieldWrapper;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormlyModule", function () {
        return FormlyModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵdefineHiddenProp", function () {
        return defineHiddenProp;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵreverseDeepMerge", function () {
        return reverseDeepMerge;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵgetFieldInitialValue", function () {
        return getFieldInitialValue;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵclone", function () {
        return clone;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵwrapProperty", function () {
        return wrapProperty;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵa", function () {
        return defaultFormlyConfig;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵe", function () {
        return CoreExtension;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵh", function () {
        return FieldExpressionExtension;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵg", function () {
        return FieldFormExtension;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵf", function () {
        return FieldValidationExtension;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵd", function () {
        return FormlyTemplateType;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵb", function () {
        return FormlyGroup;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵc", function () {
        return FormlyValidationMessage;
      });
      /* harmony import */


      var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @angular/common */
      "ofXK");
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @angular/platform-browser */
      "jhN1");
      /* harmony import */


      var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! tslib */
      "SOwp");
      /* harmony import */


      var rxjs_operators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! rxjs/operators */
      "kU1M");
      /* harmony import */


      var _angular_forms__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! @angular/forms */
      "3Pt+");
      /* harmony import */


      var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
      /*! rxjs */
      "qCKp");
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * @param {?} formId
       * @param {?} field
       * @param {?} index
       * @return {?}
       */


      var _c0 = ["content"];

      function FormlyForm_formly_field_0_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](0, "formly-field", 2);
        }

        if (rf & 2) {
          var field_r2 = ctx.$implicit;

          _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("form", field_r2.form)("options", field_r2.options)("model", field_r2.model)("field", field_r2);
        }
      }

      var _c1 = ["*"];
      var _c2 = ["container"];

      function FormlyField_ng_template_0_Template(rf, ctx) {}

      var _c3 = ["fieldComponent"];

      function FormlyGroup_formly_field_0_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](0, "formly-field", 1);
        }

        if (rf & 2) {
          var f_r1 = ctx.$implicit;

          _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("field", f_r1);
        }
      }

      function getFieldId(formId, field, index) {
        if (field.id) return field.id;
        /** @type {?} */

        var type = field.type;
        if (!type && field.template) type = 'template';
        return [formId, type, field.key, index].join('_');
      }
      /**
       * @param {?} field
       * @return {?}
       */


      function getKeyPath(field) {
        if (!field.key) {
          return [];
        }
        /* We store the keyPath in the field for performance reasons. This function will be called frequently. */


        if (!field._keyPath || field._keyPath.key !== field.key) {
          /** @type {?} */
          var path = [];

          if (typeof field.key === 'string') {
            /** @type {?} */
            var key = field.key.indexOf('[') === -1 ? field.key : field.key.replace(/\[(\w+)\]/g, '.$1');
            path = key.indexOf('.') !== -1 ? key.split('.') : [key];
          } else if (Array.isArray(field.key)) {
            path = field.key.slice(0);
          } else {
            path = ["".concat(field.key)];
          }

          field._keyPath = {
            key: field.key,
            path: path
          };
        }

        return field._keyPath.path.slice(0);
      }
      /** @type {?} */


      var FORMLY_VALIDATORS = ['required', 'pattern', 'minLength', 'maxLength', 'min', 'max'];
      /**
       * @param {?} field
       * @param {?} value
       * @return {?}
       */

      function assignFieldValue(field, value) {
        /** @type {?} */
        var paths = getKeyPath(field);

        if (paths.length === 0) {
          return;
        }
        /** @type {?} */


        var root = field;

        while (root.parent) {
          root = root.parent;
          paths = [].concat(_toConsumableArray(getKeyPath(root)), _toConsumableArray(paths));
        }

        if (value === undefined && field.resetOnHide) {
          /** @type {?} */
          var k = paths.pop();
          /** @type {?} */

          var m = paths.reduce(
          /**
          * @param {?} model
          * @param {?} path
          * @return {?}
          */
          function (model, path) {
            return model[path] || {};
          }, root.model);
          delete m[k];
          return;
        }

        assignModelValue(root.model, paths, value);
      }
      /**
       * @param {?} model
       * @param {?} paths
       * @param {?} value
       * @return {?}
       */


      function assignModelValue(model, paths, value) {
        for (var i = 0; i < paths.length - 1; i++) {
          /** @type {?} */
          var path = paths[i];

          if (!model[path] || !isObject(model[path])) {
            model[path] = /^\d+$/.test(paths[i + 1]) ? [] : {};
          }

          model = model[path];
        }

        model[paths[paths.length - 1]] = clone(value);
      }
      /**
       * @param {?} field
       * @return {?}
       */


      function getFieldInitialValue(field) {
        /** @type {?} */
        var value = field.options['_initialModel'];
        /** @type {?} */

        var paths = getKeyPath(field);

        while (field.parent) {
          field = field.parent;
          paths = [].concat(_toConsumableArray(getKeyPath(field)), _toConsumableArray(paths));
        }

        var _iterator = _createForOfIteratorHelper(paths),
            _step;

        try {
          for (_iterator.s(); !(_step = _iterator.n()).done;) {
            var path = _step.value;

            if (!value) {
              return undefined;
            }

            value = value[path];
          }
        } catch (err) {
          _iterator.e(err);
        } finally {
          _iterator.f();
        }

        return value;
      }
      /**
       * @param {?} field
       * @return {?}
       */


      function getFieldValue(field) {
        /** @type {?} */
        var model = field.parent.model;

        var _iterator2 = _createForOfIteratorHelper(getKeyPath(field)),
            _step2;

        try {
          for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
            var path = _step2.value;

            if (!model) {
              return model;
            }

            model = model[path];
          }
        } catch (err) {
          _iterator2.e(err);
        } finally {
          _iterator2.f();
        }

        return model;
      }
      /**
       * @param {?} dest
       * @param {...?} args
       * @return {?}
       */


      function reverseDeepMerge(dest) {
        for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
          args[_key - 1] = arguments[_key];
        }

        args.forEach(
        /**
        * @param {?} src
        * @return {?}
        */
        function (src) {
          for (var srcArg in src) {
            if (isNullOrUndefined(dest[srcArg]) || isBlankString(dest[srcArg])) {
              dest[srcArg] = clone(src[srcArg]);
            } else if (objAndSameType(dest[srcArg], src[srcArg])) {
              reverseDeepMerge(dest[srcArg], src[srcArg]);
            }
          }
        });
        return dest;
      }
      /**
       * @param {?} value
       * @return {?}
       */


      function isNullOrUndefined(value) {
        return value === undefined || value === null;
      }
      /**
       * @param {?} value
       * @return {?}
       */


      function isUndefined(value) {
        return value === undefined;
      }
      /**
       * @param {?} value
       * @return {?}
       */


      function isBlankString(value) {
        return value === '';
      }
      /**
       * @param {?} value
       * @return {?}
       */


      function isFunction(value) {
        return typeof value === 'function';
      }
      /**
       * @param {?} obj1
       * @param {?} obj2
       * @return {?}
       */


      function objAndSameType(obj1, obj2) {
        return isObject(obj1) && isObject(obj2) && Object.getPrototypeOf(obj1) === Object.getPrototypeOf(obj2) && !(Array.isArray(obj1) || Array.isArray(obj2));
      }
      /**
       * @param {?} x
       * @return {?}
       */


      function isObject(x) {
        return x != null && typeof x === 'object';
      }
      /**
       * @param {?} obj
       * @return {?}
       */


      function isPromise(obj) {
        return !!obj && typeof obj.then === 'function';
      }
      /**
       * @param {?} value
       * @return {?}
       */


      function clone(value) {
        if (!isObject(value) || Object(rxjs__WEBPACK_IMPORTED_MODULE_6__["isObservable"])(value) ||
        /* instanceof SafeHtmlImpl */
        value.changingThisBreaksApplicationSecurity || ['RegExp', 'FileList', 'File', 'Blob'].indexOf(value.constructor.name) !== -1) {
          return value;
        }

        if (value instanceof Set) {
          return new Set(value);
        }

        if (value instanceof Map) {
          return new Map(value);
        } // https://github.com/moment/moment/blob/master/moment.js#L252


        if (value._isAMomentObject && isFunction(value.clone)) {
          return value.clone();
        }

        if (value instanceof _angular_forms__WEBPACK_IMPORTED_MODULE_5__["AbstractControl"]) {
          return null;
        }

        if (value instanceof Date) {
          return new Date(value.getTime());
        }

        if (Array.isArray(value)) {
          return value.slice(0).map(
          /**
          * @param {?} v
          * @return {?}
          */
          function (v) {
            return clone(v);
          });
        } // best way to clone a js object maybe
        // https://stackoverflow.com/questions/41474986/how-to-clone-a-javascript-es6-class-instance

        /** @type {?} */


        var proto = Object.getPrototypeOf(value);
        /** @type {?} */

        var c = Object.create(proto);
        c = Object.setPrototypeOf(c, proto); // need to make a deep copy so we dont use Object.assign
        // also Object.assign wont copy property descriptor exactly

        return Object.keys(value).reduce(
        /**
        * @param {?} newVal
        * @param {?} prop
        * @return {?}
        */
        function (newVal, prop) {
          /** @type {?} */
          var propDesc = Object.getOwnPropertyDescriptor(value, prop);

          if (propDesc.get) {
            Object.defineProperty(newVal, prop, propDesc);
          } else {
            newVal[prop] = clone(value[prop]);
          }

          return newVal;
        }, c);
      }
      /**
       * @param {?} field
       * @param {?} prop
       * @param {?} defaultValue
       * @return {?}
       */


      function defineHiddenProp(field, prop, defaultValue) {
        Object.defineProperty(field, prop, {
          enumerable: false,
          writable: true,
          configurable: true
        });
        field[prop] = defaultValue;
      }
      /**
       * @template T
       * @param {?} o
       * @param {?} prop
       * @param {?} setFn
       * @return {?}
       */


      function wrapProperty(o, prop, setFn) {
        if (!o._observers) {
          defineHiddenProp(o, '_observers', {});
        }

        if (!o._observers[prop]) {
          o._observers[prop] = [];
        }
        /** @type {?} */


        var fns = o._observers[prop];

        if (fns.indexOf(setFn) === -1) {
          fns.push(setFn);
          setFn({
            currentValue: o[prop],
            firstChange: true
          });

          if (fns.length === 1) {
            defineHiddenProp(o, "___$".concat(prop), o[prop]);
            Object.defineProperty(o, prop, {
              configurable: true,
              get:
              /**
              * @return {?}
              */
              function get() {
                return o["___$".concat(prop)];
              },
              set:
              /**
              * @param {?} currentValue
              * @return {?}
              */
              function set(currentValue) {
                if (currentValue !== o["___$".concat(prop)]) {
                  /** @type {?} */
                  var previousValue = o["___$".concat(prop)];
                  o["___$".concat(prop)] = currentValue;
                  fns.forEach(
                  /**
                  * @param {?} changeFn
                  * @return {?}
                  */
                  function (changeFn) {
                    return changeFn({
                      previousValue: previousValue,
                      currentValue: currentValue,
                      firstChange: false
                    });
                  });
                }
              }
            });
          }
        }

        return (
          /**
          * @return {?}
          */
          function () {
            return fns.splice(fns.indexOf(setFn), 1);
          }
        );
      }
      /**
       * @param {?} form
       * @param {?} action
       * @return {?}
       */


      function reduceFormUpdateValidityCalls(form, action) {
        /** @type {?} */
        var updateValidity = form._updateTreeValidity.bind(form);
        /** @type {?} */


        var updateValidityArgs = {
          called: false,
          emitEvent: false
        };

        form._updateTreeValidity =
        /**
        * @param {?=} __0
        * @return {?}
        */
        function () {
          var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
            emitEvent: true
          },
              emitEvent = _ref.emitEvent;

          return updateValidityArgs = {
            called: true,
            emitEvent: emitEvent || updateValidityArgs.emitEvent
          };
        };

        action();
        updateValidityArgs.called && updateValidity({
          emitEvent: updateValidityArgs.emitEvent
        });
        form._updateTreeValidity = updateValidity;
      }
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /** @type {?} */


      var FORMLY_CONFIG = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["InjectionToken"]('FORMLY_CONFIG');
      /**
       * Maintains list of formly field directive types. This can be used to register new field templates.
       */

      var FormlyConfig = /*#__PURE__*/function () {
        function FormlyConfig() {
          _classCallCheck(this, FormlyConfig);

          this.types = {};
          this.validators = {};
          this.wrappers = {};
          this.messages = {};
          this.templateManipulators = {
            preWrapper: [],
            postWrapper: []
          };
          this.extras = {
            checkExpressionOn: 'changeDetectionCheck',
            lazyRender: false,
            showError:
            /**
            * @param {?} field
            * @return {?}
            */
            function showError(field) {
              return field.formControl && field.formControl.invalid && (field.formControl.touched || field.options.parentForm && field.options.parentForm.submitted || !!(field.field.validation && field.field.validation.show));
            }
          };
          this.extensions = {};
        }
        /**
         * @param {?} config
         * @return {?}
         */


        _createClass(FormlyConfig, [{
          key: "addConfig",
          value: function addConfig(config) {
            var _this = this;

            if (config.types) {
              config.types.forEach(
              /**
              * @param {?} type
              * @return {?}
              */
              function (type) {
                return _this.setType(type);
              });
            }

            if (config.validators) {
              config.validators.forEach(
              /**
              * @param {?} validator
              * @return {?}
              */
              function (validator) {
                return _this.setValidator(validator);
              });
            }

            if (config.wrappers) {
              config.wrappers.forEach(
              /**
              * @param {?} wrapper
              * @return {?}
              */
              function (wrapper) {
                return _this.setWrapper(wrapper);
              });
            }

            if (config.manipulators) {
              console.warn("NgxFormly: passing 'manipulators' config is deprecated, use custom extension instead.");
              config.manipulators.forEach(
              /**
              * @param {?} manipulator
              * @return {?}
              */
              function (manipulator) {
                return _this.setManipulator(manipulator);
              });
            }

            if (config.validationMessages) {
              config.validationMessages.forEach(
              /**
              * @param {?} validation
              * @return {?}
              */
              function (validation) {
                return _this.addValidatorMessage(validation.name, validation.message);
              });
            }

            if (config.extensions) {
              config.extensions.forEach(
              /**
              * @param {?} c
              * @return {?}
              */
              function (c) {
                return _this.extensions[c.name] = c.extension;
              });
            }

            if (config.extras) {
              this.extras = Object.assign({}, this.extras, config.extras);
            }
          }
          /**
           * @param {?} options
           * @return {?}
           */

        }, {
          key: "setType",
          value: function setType(options) {
            var _this2 = this;

            if (Array.isArray(options)) {
              options.forEach(
              /**
              * @param {?} option
              * @return {?}
              */
              function (option) {
                return _this2.setType(option);
              });
            } else {
              if (!this.types[options.name]) {
                this.types[options.name] =
                /** @type {?} */
                {
                  name: options.name
                };
              }

              ['component', 'extends', 'defaultOptions', 'wrappers'].forEach(
              /**
              * @param {?} prop
              * @return {?}
              */
              function (prop) {
                if (options.hasOwnProperty(prop)) {
                  _this2.types[options.name][prop] = options[prop];
                }
              });
            }
          }
          /**
           * @param {?} name
           * @return {?}
           */

        }, {
          key: "getType",
          value: function getType(name) {
            if (!this.types[name]) {
              throw new Error("[Formly Error] The type \"".concat(name, "\" could not be found. Please make sure that is registered through the FormlyModule declaration."));
            }

            this.mergeExtendedType(name);
            return this.types[name];
          }
          /**
           * @param {?=} field
           * @return {?}
           */

        }, {
          key: "getMergedField",
          value: function getMergedField() {
            var _this3 = this;

            var field = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

            /** @type {?} */
            var type = this.getType(field.type);

            if (type.defaultOptions) {
              reverseDeepMerge(field, type.defaultOptions);
            }
            /** @type {?} */


            var extendDefaults = type["extends"] && this.getType(type["extends"]).defaultOptions;

            if (extendDefaults) {
              reverseDeepMerge(field, extendDefaults);
            }

            if (field && field.optionsTypes) {
              field.optionsTypes.forEach(
              /**
              * @param {?} option
              * @return {?}
              */
              function (option) {
                /** @type {?} */
                var defaultOptions = _this3.getType(option).defaultOptions;

                if (defaultOptions) {
                  reverseDeepMerge(field, defaultOptions);
                }
              });
            }
            /** @type {?} */


            var componentRef = this.resolveFieldTypeRef(field);

            if (componentRef && componentRef.instance && componentRef.instance.defaultOptions) {
              reverseDeepMerge(field, componentRef.instance.defaultOptions);
            }

            if (!field.wrappers && type.wrappers) {
              field.wrappers = _toConsumableArray(type.wrappers);
            }
          }
          /**
           * \@internal
           * @param {?=} field
           * @return {?}
           */

        }, {
          key: "resolveFieldTypeRef",
          value: function resolveFieldTypeRef() {
            var field = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

            if (!field.type) {
              return null;
            }
            /** @type {?} */


            var type = this.getType(field.type);

            if (!type.component || type['_componentRef']) {
              return type['_componentRef'];
            }

            var _field$parent$options = field.parent.options,
                _resolver = _field$parent$options._resolver,
                _injector = _field$parent$options._injector;
            /** @type {?} */

            var componentRef = _resolver.resolveComponentFactory(type.component).create(_injector);

            defineHiddenProp(type, '_componentRef', componentRef);
            componentRef.destroy();
            return type['_componentRef'];
          }
          /**
           * @param {?} options
           * @return {?}
           */

        }, {
          key: "setWrapper",
          value: function setWrapper(options) {
            var _this4 = this;

            this.wrappers[options.name] = options;

            if (options.types) {
              options.types.forEach(
              /**
              * @param {?} type
              * @return {?}
              */
              function (type) {
                _this4.setTypeWrapper(type, options.name);
              });
            }
          }
          /**
           * @param {?} name
           * @return {?}
           */

        }, {
          key: "getWrapper",
          value: function getWrapper(name) {
            if (!this.wrappers[name]) {
              throw new Error("[Formly Error] The wrapper \"".concat(name, "\" could not be found. Please make sure that is registered through the FormlyModule declaration."));
            }

            return this.wrappers[name];
          }
          /**
           * @param {?} type
           * @param {?} name
           * @return {?}
           */

        }, {
          key: "setTypeWrapper",
          value: function setTypeWrapper(type, name) {
            if (!this.types[type]) {
              this.types[type] =
              /** @type {?} */
              {};
            }

            if (!this.types[type].wrappers) {
              this.types[type].wrappers = [];
            }

            if (this.types[type].wrappers.indexOf(name) === -1) {
              this.types[type].wrappers.push(name);
            }
          }
          /**
           * @param {?} options
           * @return {?}
           */

        }, {
          key: "setValidator",
          value: function setValidator(options) {
            this.validators[options.name] = options;
          }
          /**
           * @param {?} name
           * @return {?}
           */

        }, {
          key: "getValidator",
          value: function getValidator(name) {
            if (!this.validators[name]) {
              throw new Error("[Formly Error] The validator \"".concat(name, "\" could not be found. Please make sure that is registered through the FormlyModule declaration."));
            }

            return this.validators[name];
          }
          /**
           * @param {?} name
           * @param {?} message
           * @return {?}
           */

        }, {
          key: "addValidatorMessage",
          value: function addValidatorMessage(name, message) {
            this.messages[name] = message;
          }
          /**
           * @param {?} name
           * @return {?}
           */

        }, {
          key: "getValidatorMessage",
          value: function getValidatorMessage(name) {
            return this.messages[name];
          }
          /**
           * @param {?} manipulator
           * @return {?}
           */

        }, {
          key: "setManipulator",
          value: function setManipulator(manipulator) {
            new manipulator["class"]()[manipulator.method](this);
          }
          /**
           * @private
           * @param {?} name
           * @return {?}
           */

        }, {
          key: "mergeExtendedType",
          value: function mergeExtendedType(name) {
            if (!this.types[name]["extends"]) {
              return;
            }
            /** @type {?} */


            var extendedType = this.getType(this.types[name]["extends"]);

            if (!this.types[name].component) {
              this.types[name].component = extendedType.component;
            }

            if (!this.types[name].wrappers) {
              this.types[name].wrappers = extendedType.wrappers;
            }
          }
        }]);

        return FormlyConfig;
      }();

      FormlyConfig.ɵfac = function FormlyConfig_Factory(t) {
        return new (t || FormlyConfig)();
      };

      FormlyConfig.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: FormlyConfig,
        factory: FormlyConfig.ɵfac,
        providedIn: 'root'
      });
      /** @nocollapse */

      FormlyConfig.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["defineInjectable"])({
        factory: function FormlyConfig_Factory() {
          return new FormlyConfig();
        },
        token: FormlyConfig,
        providedIn: "root"
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](FormlyConfig, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"],
          args: [{
            providedIn: 'root'
          }]
        }], function () {
          return [];
        }, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      var FormlyFormBuilder = /*#__PURE__*/function () {
        /**
         * @param {?} formlyConfig
         * @param {?} componentFactoryResolver
         * @param {?} injector
         */
        function FormlyFormBuilder(formlyConfig, componentFactoryResolver, injector) {
          _classCallCheck(this, FormlyFormBuilder);

          this.formlyConfig = formlyConfig;
          this.componentFactoryResolver = componentFactoryResolver;
          this.injector = injector;
        }
        /**
         * @param {?} formControl
         * @param {?=} fieldGroup
         * @param {?=} model
         * @param {?=} options
         * @return {?}
         */


        _createClass(FormlyFormBuilder, [{
          key: "buildForm",
          value: function buildForm(formControl) {
            var _this5 = this;

            var fieldGroup = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
            var model = arguments.length > 2 ? arguments[2] : undefined;
            var options = arguments.length > 3 ? arguments[3] : undefined;

            if (!this.formlyConfig.extensions.core) {
              throw new Error('NgxFormly: missing `forRoot()` call. use `forRoot()` when registering the `FormlyModule`.');
            }
            /** @type {?} */


            var field = {
              fieldGroup: fieldGroup,
              model: model,
              formControl: formControl,
              options: this._setOptions(options)
            };
            reduceFormUpdateValidityCalls(formControl,
            /**
            * @return {?}
            */
            function () {
              return _this5._buildForm(field);
            });

            field.options._checkField(field, true);
          }
          /**
           * @private
           * @param {?} field
           * @return {?}
           */

        }, {
          key: "_buildForm",
          value: function _buildForm(field) {
            var _this6 = this;

            this.getExtensions().forEach(
            /**
            * @param {?} extension
            * @return {?}
            */
            function (extension) {
              return extension.prePopulate && extension.prePopulate(field);
            });
            this.getExtensions().forEach(
            /**
            * @param {?} extension
            * @return {?}
            */
            function (extension) {
              return extension.onPopulate && extension.onPopulate(field);
            });

            if (field.fieldGroup) {
              field.fieldGroup.forEach(
              /**
              * @param {?} f
              * @return {?}
              */
              function (f) {
                return _this6._buildForm(f);
              });
            }

            this.getExtensions().forEach(
            /**
            * @param {?} extension
            * @return {?}
            */
            function (extension) {
              return extension.postPopulate && extension.postPopulate(field);
            });
          }
          /**
           * @private
           * @return {?}
           */

        }, {
          key: "getExtensions",
          value: function getExtensions() {
            var _this7 = this;

            return Object.keys(this.formlyConfig.extensions).map(
            /**
            * @param {?} name
            * @return {?}
            */
            function (name) {
              return _this7.formlyConfig.extensions[name];
            });
          }
          /**
           * @private
           * @param {?} options
           * @return {?}
           */

        }, {
          key: "_setOptions",
          value: function _setOptions(options) {
            var _this8 = this;

            options = options || {};
            options.formState = options.formState || {};

            if (!options.showError) {
              options.showError = this.formlyConfig.extras.showError;
            }

            if (!options.fieldChanges) {
              defineHiddenProp(options, 'fieldChanges', new rxjs__WEBPACK_IMPORTED_MODULE_6__["Subject"]());
            }

            if (!options._resolver) {
              defineHiddenProp(options, '_resolver', this.componentFactoryResolver);
            }

            if (!options._injector) {
              defineHiddenProp(options, '_injector', this.injector);
            }

            if (!options._hiddenFieldsForCheck) {
              options._hiddenFieldsForCheck = [];
            }

            if (!options._markForCheck) {
              options._markForCheck =
              /**
              * @param {?} field
              * @return {?}
              */
              function (field) {
                if (field._componentRefs) {
                  field._componentRefs.forEach(
                  /**
                  * @param {?} ref
                  * @return {?}
                  */
                  function (ref) {
                    // NOTE: we cannot use ref.changeDetectorRef, see https://github.com/ngx-formly/ngx-formly/issues/2191

                    /** @type {?} */
                    var changeDetectorRef = ref.injector.get(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectorRef"]);
                    changeDetectorRef.markForCheck();
                  });
                }

                if (field.fieldGroup) {
                  field.fieldGroup.forEach(
                  /**
                  * @param {?} f
                  * @return {?}
                  */
                  function (f) {
                    return options._markForCheck(f);
                  });
                }
              };
            }

            if (!options._buildField) {
              options._buildField =
              /**
              * @param {?} field
              * @return {?}
              */
              function (field) {
                _this8.buildForm(field.form, field.fieldGroup, field.model, field.options);

                return field;
              };
            }

            return options;
          }
        }]);

        return FormlyFormBuilder;
      }();

      FormlyFormBuilder.ɵfac = function FormlyFormBuilder_Factory(t) {
        return new (t || FormlyFormBuilder)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](FormlyConfig), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]));
      };

      FormlyFormBuilder.ɵprov = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
        token: FormlyFormBuilder,
        factory: FormlyFormBuilder.ɵfac,
        providedIn: 'root'
      });
      /** @nocollapse */

      FormlyFormBuilder.ctorParameters = function () {
        return [{
          type: FormlyConfig
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
        }];
      };
      /** @nocollapse */


      FormlyFormBuilder.ngInjectableDef = Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["defineInjectable"])({
        factory: function FormlyFormBuilder_Factory() {
          return new FormlyFormBuilder(Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(FormlyConfig), Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]), Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["inject"])(_angular_core__WEBPACK_IMPORTED_MODULE_1__["INJECTOR"]));
        },
        token: FormlyFormBuilder,
        providedIn: "root"
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](FormlyFormBuilder, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"],
          args: [{
            providedIn: 'root'
          }]
        }], function () {
          return [{
            type: FormlyConfig
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Injector"]
          }];
        }, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * @param {?} field
       * @param {?=} emitEvent
       * @return {?}
       */


      function unregisterControl(field) {
        var emitEvent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

        /** @type {?} */
        var form =
        /** @type {?} */
        field.formControl.parent;

        if (!form) {
          return;
        }
        /** @type {?} */


        var control = field.formControl;
        /** @type {?} */

        var opts = {
          emitEvent: emitEvent
        };

        if (form instanceof _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormArray"]) {
          /** @type {?} */
          var key = form.controls.findIndex(
          /**
          * @param {?} c
          * @return {?}
          */
          function (c) {
            return c === control;
          });

          if (key !== -1) {
            updateControl(form, opts,
            /**
            * @return {?}
            */
            function () {
              return form.removeAt(key);
            });
          }
        } else if (form instanceof _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormGroup"]) {
          /** @type {?} */
          var paths = getKeyPath(field);
          /** @type {?} */

          var _key2 = paths[paths.length - 1];

          if (form.get([_key2]) === control) {
            updateControl(form, opts,
            /**
            * @return {?}
            */
            function () {
              return form.removeControl(_key2);
            });
          }
        }

        control.setParent(null);
      }
      /**
       * @param {?} field
       * @return {?}
       */


      function findControl(field) {
        if (field.formControl) {
          return field.formControl;
        }

        if (field['shareFormControl'] === false) {
          return null;
        }
        /** @type {?} */


        var form =
        /** @type {?} */
        field.parent.formControl;
        return form ? form.get(getKeyPath(field)) : null;
      }
      /**
       * @param {?} field
       * @param {?=} control
       * @param {?=} emitEvent
       * @return {?}
       */


      function registerControl(field, control) {
        var emitEvent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
        control = control || field.formControl;

        if (!control['_fields']) {
          defineHiddenProp(control, '_fields', []);
        }

        if (control['_fields'].indexOf(field) === -1) {
          control['_fields'].push(field);
        }

        if (!field.formControl && control) {
          defineHiddenProp(field, 'formControl', control);
          control.setValidators(null);
          control.setAsyncValidators(null);
          field.templateOptions.disabled = !!field.templateOptions.disabled;
          wrapProperty(field.templateOptions, 'disabled',
          /**
          * @param {?} __0
          * @return {?}
          */
          function (_ref2) {
            var firstChange = _ref2.firstChange,
                currentValue = _ref2.currentValue;

            if (!firstChange) {
              currentValue ? field.formControl.disable() : field.formControl.enable();
            }
          });

          if (control.registerOnDisabledChange) {
            control.registerOnDisabledChange(
            /**
            * @param {?} value
            * @return {?}
            */
            function (value) {
              field.templateOptions['___$disabled'] = value; // TODO remove in V6

              field.options && field.options._markForCheck(field);
            });
          }
        }
        /** @type {?} */


        var parent =
        /** @type {?} */
        field.parent.formControl;

        if (!parent || !field.key) {
          return;
        }
        /** @type {?} */


        var paths = getKeyPath(field);
        /** @type {?} */

        var value = getFieldValue(field);

        if (!(isNullOrUndefined(control.value) && isNullOrUndefined(value)) && control.value !== value && control instanceof _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormControl"]) {
          control.patchValue(value);
        }

        var _loop = function _loop(i) {
          /** @type {?} */
          var path = paths[i];

          if (!parent.get([path])) {
            updateControl(parent, {
              emitEvent: emitEvent
            },
            /**
            * @return {?}
            */
            function () {
              return parent.setControl(path, new _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormGroup"]({}));
            });
          }

          parent =
          /** @type {?} */
          parent.get([path]);
        };

        for (var i = 0; i < paths.length - 1; i++) {
          _loop(i);
        }
        /** @type {?} */


        var key = paths[paths.length - 1];

        if (!field._hide && parent.get([key]) !== control) {
          updateControl(parent, {
            emitEvent: emitEvent
          },
          /**
          * @return {?}
          */
          function () {
            return parent.setControl(key, control);
          });
        }
      }
      /**
       * @param {?} c
       * @return {?}
       */


      function updateValidity(c) {
        /** @type {?} */
        var status = c.status;
        c.updateValueAndValidity({
          emitEvent: false
        });

        if (status !== c.status) {
          /** @type {?} */
          c.statusChanges.emit(c.status);
        }
      }
      /**
       * @param {?} form
       * @param {?} opts
       * @param {?} action
       * @return {?}
       */


      function updateControl(form, opts, action) {
        /**
         *  workaround for https://github.com/angular/angular/issues/27679
         */
        if (form instanceof _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormGroup"] && !form['__patchForEachChild']) {
          defineHiddenProp(form, '__patchForEachChild', true);

          /** @type {?} */
          form._forEachChild =
          /**
          * @param {?} cb
          * @return {?}
          */
          function (cb) {
            Object.keys(form.controls).forEach(
            /**
            * @param {?} k
            * @return {?}
            */
            function (k) {
              return form.controls[k] && cb(form.controls[k], k);
            });
          };
        }
        /**
         * workaround for https://github.com/angular/angular/issues/20439
         * @type {?}
         */


        var updateValueAndValidity = form.updateValueAndValidity.bind(form);

        if (opts.emitEvent === false) {
          form.updateValueAndValidity =
          /**
          * @param {?} opts
          * @return {?}
          */
          function (opts) {
            updateValueAndValidity(Object.assign({}, opts || {}, {
              emitEvent: false
            }));
          };
        }

        action();

        if (opts.emitEvent === false) {
          form.updateValueAndValidity = updateValueAndValidity;
        }
      }
      /**
       * @param {?} form
       * @return {?}
       */


      function clearControl(form) {
        form['_fields'] && delete form['_fields'];

        if (form instanceof _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormGroup"] || form instanceof _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormArray"]) {
          Object.keys(form.controls).forEach(
          /**
          * @param {?} k
          * @return {?}
          */
          function (k) {
            return clearControl(form.controls[k]);
          });
        }
      }
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      var FormlyForm = /*#__PURE__*/function () {
        /**
         * @param {?} formlyBuilder
         * @param {?} formlyConfig
         * @param {?} ngZone
         * @param {?} immutable
         * @param {?} parentFormGroup
         */
        function FormlyForm(formlyBuilder, formlyConfig, ngZone, // tslint:disable-next-line
        immutable, parentFormGroup) {
          var _this9 = this;

          _classCallCheck(this, FormlyForm);

          this.formlyBuilder = formlyBuilder;
          this.formlyConfig = formlyConfig;
          this.ngZone = ngZone;
          this.parentFormGroup = parentFormGroup;
          this.modelChange = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
          this.immutable = false;
          this._modelChangeValue = {};
          this.modelChangeSubs = [];
          this.modelChange$ = new rxjs__WEBPACK_IMPORTED_MODULE_6__["Subject"]();
          this.modelChangeSub = this.modelChange$.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["switchMap"])(
          /**
          * @return {?}
          */
          function () {
            return _this9.ngZone.onStable.asObservable().pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["take"])(1));
          })).subscribe(
          /**
          * @return {?}
          */
          function () {
            return _this9.ngZone.runGuarded(
            /**
            * @return {?}
            */
            function () {
              // runGuarded is used to keep the expression changes in-sync
              // https://github.com/ngx-formly/ngx-formly/issues/2095
              _this9.checkExpressionChange();

              _this9.modelChange.emit(_this9._modelChangeValue = clone(_this9.model));
            });
          });

          if (immutable !== null) {
            console.warn("NgxFormly: passing 'immutable' attribute to 'formly-form' component is deprecated since v5.5, enable immutable mode through NgModule declaration instead.");
          }

          this.immutable = immutable !== null || !!formlyConfig.extras.immutable;
        }
        /**
         * @param {?} model
         * @return {?}
         */


        _createClass(FormlyForm, [{
          key: "model",
          get:
          /**
           * @return {?}
           */
          function get() {
            if (!this._model) {
              this._model = {};
            }

            return this._model;
          }
          /**
           * @param {?} fields
           * @return {?}
           */
          ,
          set: function set(model) {
            this._model = this.immutable ? clone(model) : model;
          }
        }, {
          key: "fields",
          get:
          /**
           * @return {?}
           */
          function get() {
            return this._fields || [];
          }
          /**
           * @param {?} options
           * @return {?}
           */
          ,
          set: function set(fields) {
            this._fields = this.immutable ? clone(fields) : fields;
          }
        }, {
          key: "options",
          get:
          /**
           * @return {?}
           */
          function get() {
            return this._options;
          }
          /**
           * @param {?} content
           * @return {?}
           */
          ,
          set: function set(options) {
            this._options = this.immutable ? clone(options) : options;
          }
        }, {
          key: "content",
          set: function set(content) {
            if (content) {
              /** @type {?} */
              var hasContent = false;
              /** @type {?} */

              var node = content.nativeElement.nextSibling;

              while (node && !hasContent) {
                if (node.nodeType === Node.ELEMENT_NODE || node.nodeType === Node.TEXT_NODE && node.textContent && node.textContent.trim() !== '') {
                  hasContent = true;
                }

                node = node.nextSibling;
              }

              if (hasContent) {
                console.warn("NgxFormly: content projection for 'formly-form' component is deprecated since v5.5, you should avoid passing content inside the 'formly-form' tag.");
              }
            }
          }
          /**
           * @return {?}
           */

        }, {
          key: "ngDoCheck",
          value: function ngDoCheck() {
            if (this.formlyConfig.extras.checkExpressionOn === 'changeDetectionCheck') {
              this.checkExpressionChange();
            }
          }
          /**
           * @param {?} changes
           * @return {?}
           */

        }, {
          key: "ngOnChanges",
          value: function ngOnChanges(changes) {
            // https://github.com/ngx-formly/ngx-formly/issues/2294
            if (changes.model && this.field) {
              this.field.model = this.model;
            }

            if (changes.fields && this.form) {
              clearControl(this.form);
            }

            if (changes.fields || changes.form || changes.model && this._modelChangeValue !== changes.model.currentValue) {
              this.form = this.form || new _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormGroup"]({});
              this.setOptions();
              this.options.updateInitialValue();
              this.clearModelSubscriptions();
              this.formlyBuilder.buildForm(this.form, this.fields, this.model, this.options);
              this.trackModelChanges(this.fields);
            }
          }
          /**
           * @return {?}
           */

        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            this.modelChangeSub.unsubscribe();
            this.clearModelSubscriptions();
          }
          /**
           * @param {?} __0
           * @return {?}
           */

        }, {
          key: "changeModel",
          value: function changeModel(_ref3) {
            var key = _ref3.key,
                value = _ref3.value,
                field = _ref3.field;
            assignFieldValue(field, value);
            this.modelChange$.next();
          }
          /**
           * @return {?}
           */

        }, {
          key: "setOptions",
          value: function setOptions() {
            var _this10 = this;

            if (!this.options) {
              this.options = {};
            }

            if (!this.options.resetModel) {
              this.options.resetModel =
              /**
              * @param {?=} model
              * @return {?}
              */
              function (model) {
                model = clone(isNullOrUndefined(model) ?
                /** @type {?} */
                _this10.options._initialModel : model);

                if (_this10.model) {
                  Object.keys(_this10.model).forEach(
                  /**
                  * @param {?} k
                  * @return {?}
                  */
                  function (k) {
                    return delete _this10.model[k];
                  });
                  Object.assign(_this10.model, model || {});
                }

                /** @type {?} */
                _this10.options._buildForm(); // we should call `NgForm::resetForm` to ensure changing `submitted` state after resetting form
                // but only when the current component is a root one.


                if (_this10.options.parentForm && _this10.options.parentForm.control === _this10.form) {
                  _this10.options.parentForm.resetForm(_this10.model);
                } else {
                  _this10.form.reset(_this10.model);
                }
              };
            }

            if (!this.options.parentForm && this.parentFormGroup) {
              defineHiddenProp(this.options, 'parentForm', this.parentFormGroup);
              wrapProperty(this.options.parentForm, 'submitted',
              /**
              * @param {?} __0
              * @return {?}
              */
              function (_ref4) {
                var firstChange = _ref4.firstChange;

                if (!firstChange) {
                  _this10.checkExpressionChange();

                  /** @type {?} */
                  _this10.options._markForCheck({
                    fieldGroup: _this10.fields,
                    model: _this10.model,
                    formControl: _this10.form,
                    options: _this10.options
                  });
                }
              });
            }

            if (!this.options.updateInitialValue) {
              this.options.updateInitialValue =
              /**
              * @return {?}
              */
              function () {
                return (
                  /** @type {?} */
                  _this10.options._initialModel = clone(_this10.model)
                );
              };
            }

            if (!
            /** @type {?} */
            this.options._buildForm) {
              /** @type {?} */
              this.options._buildForm =
              /**
              * @param {?=} emitModelChange
              * @return {?}
              */
              function () {
                var emitModelChange = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;

                _this10.clearModelSubscriptions();

                _this10.formlyBuilder.buildForm(_this10.form, _this10.fields, _this10.model, _this10.options);

                _this10.trackModelChanges(_this10.fields);

                if (emitModelChange) {
                  _this10.modelChange.emit(_this10._modelChangeValue = clone(_this10.model));
                }
              };
            }
          }
          /**
           * @private
           * @return {?}
           */

        }, {
          key: "checkExpressionChange",
          value: function checkExpressionChange() {
            if (this.options &&
            /** @type {?} */
            this.options._checkField) {
              /** @type {?} */
              this.options._checkField({
                fieldGroup: this.fields,
                model: this.model,
                formControl: this.form,
                options: this.options
              });
            }
          }
          /**
           * @private
           * @param {?} fields
           * @param {?=} rootKey
           * @return {?}
           */

        }, {
          key: "trackModelChanges",
          value: function trackModelChanges(fields) {
            var _this11 = this;

            var rootKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
            fields.forEach(
            /**
            * @param {?} field
            * @return {?}
            */
            function (field) {
              if (field.key && !field.fieldGroup && field.formControl) {
                /** @type {?} */
                var control = field.formControl;
                /** @type {?} */

                var valueChanges = control.valueChanges.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["distinctUntilChanged"])(
                /**
                * @param {?} x
                * @param {?} y
                * @return {?}
                */
                function (x, y) {
                  if (x !== y || Array.isArray(x) || isObject(x)) {
                    return false;
                  }

                  return true;
                }));
                var _field$modelOptions = field.modelOptions,
                    updateOn = _field$modelOptions.updateOn,
                    debounce = _field$modelOptions.debounce;

                if ((!updateOn || updateOn === 'change') && debounce && debounce["default"] > 0) {
                  valueChanges = control.valueChanges.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["debounceTime"])(debounce["default"]));
                }

                _this11.modelChangeSubs.push(valueChanges.subscribe(
                /**
                * @param {?} value
                * @return {?}
                */
                function (value) {
                  // workaround for https://github.com/angular/angular/issues/13792
                  if (control instanceof _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormControl"] && control['_fields'] && control['_fields'].length > 1) {
                    control.patchValue(value, {
                      emitEvent: false,
                      onlySelf: true
                    });
                  }

                  if (field.parsers && field.parsers.length > 0) {
                    field.parsers.forEach(
                    /**
                    * @param {?} parserFn
                    * @return {?}
                    */
                    function (parserFn) {
                      return value = parserFn(value);
                    });
                  }

                  _this11.changeModel({
                    key: [].concat(_toConsumableArray(rootKey), _toConsumableArray(getKeyPath(field))).join('.'),
                    value: value,
                    field: field
                  });
                })); // workaround for v5 (https://github.com/ngx-formly/ngx-formly/issues/2061)

                /** @type {?} */


                var observers = control.valueChanges['observers'];

                if (observers && observers.length > 1) {
                  observers.unshift(observers.pop());
                }
              }

              if (field.fieldGroup && field.fieldGroup.length > 0) {
                _this11.trackModelChanges(field.fieldGroup, field.key ? [].concat(_toConsumableArray(rootKey), _toConsumableArray(getKeyPath(field))) : rootKey);
              }
            });
          }
          /**
           * @private
           * @return {?}
           */

        }, {
          key: "clearModelSubscriptions",
          value: function clearModelSubscriptions() {
            this.modelChangeSubs.forEach(
            /**
            * @param {?} sub
            * @return {?}
            */
            function (sub) {
              return sub.unsubscribe();
            });
            this.modelChangeSubs = [];
          }
          /**
           * @private
           * @return {?}
           */

        }, {
          key: "field",
          get: function get() {
            return this.fields && this.fields[0] && this.fields[0].parent;
          }
        }]);

        return FormlyForm;
      }();

      FormlyForm.ɵfac = function FormlyForm_Factory(t) {
        return new (t || FormlyForm)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](FormlyFormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](FormlyConfig), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinjectAttribute"]('immutable'), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormGroupDirective"], 8));
      };

      FormlyForm.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: FormlyForm,
        selectors: [["formly-form"]],
        viewQuery: function FormlyForm_Query(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵviewQuery"](_c0, true);
          }

          if (rf & 2) {
            var _t;

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]()) && (ctx.content = _t.first);
          }
        },
        inputs: {
          model: "model",
          fields: "fields",
          options: "options",
          form: "form"
        },
        outputs: {
          modelChange: "modelChange"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵProvidersFeature"]([FormlyFormBuilder]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵNgOnChangesFeature"]],
        ngContentSelectors: _c1,
        decls: 4,
        vars: 1,
        consts: [["hide-deprecation", "", 3, "form", "options", "model", "field", 4, "ngFor", "ngForOf"], ["content", ""], ["hide-deprecation", "", 3, "form", "options", "model", "field"]],
        template: function FormlyForm_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](0, FormlyForm_formly_field_0_Template, 1, 4, "formly-field", 0);

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementContainerStart"](1, null, 1);

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](3);

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementContainerEnd"]();
          }

          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngForOf", ctx.fields);
          }
        },
        directives: function directives() {
          return [_angular_common__WEBPACK_IMPORTED_MODULE_0__["NgForOf"], FormlyField];
        },
        encapsulation: 2
      });
      /** @nocollapse */

      FormlyForm.ctorParameters = function () {
        return [{
          type: FormlyFormBuilder
        }, {
          type: FormlyConfig
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
        }, {
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"],
            args: ['immutable']
          }]
        }, {
          type: _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormGroupDirective"],
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
          }]
        }];
      };

      FormlyForm.propDecorators = {
        form: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        model: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        fields: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        options: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        modelChange: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"]
        }],
        content: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"],
          args: ['content']
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](FormlyForm, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: 'formly-form',
            template: "\n    <formly-field *ngFor=\"let field of fields\"\n      hide-deprecation\n      [form]=\"field.form\"\n      [options]=\"field.options\"\n      [model]=\"field.model\"\n      [field]=\"field\">\n    </formly-field>\n    <ng-container #content>\n      <ng-content></ng-content>\n    </ng-container>\n  ",
            providers: [FormlyFormBuilder]
          }]
        }], function () {
          return [{
            type: FormlyFormBuilder
          }, {
            type: FormlyConfig
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgZone"]
          }, {
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"],
              args: ['immutable']
            }]
          }, {
            type: _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormGroupDirective"],
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
            }]
          }];
        }, {
          modelChange: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"]
          }],
          model: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          fields: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          options: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          content: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"],
            args: ['content']
          }],
          form: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }]
        });
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      var FormlyField = /*#__PURE__*/function () {
        /**
         * @param {?} formlyConfig
         * @param {?} renderer
         * @param {?} resolver
         * @param {?} elementRef
         * @param {?} hideDeprecation
         */
        function FormlyField(formlyConfig, renderer, resolver, elementRef, // tslint:disable-next-line
        hideDeprecation) {
          _classCallCheck(this, FormlyField);

          this.formlyConfig = formlyConfig;
          this.renderer = renderer;
          this.resolver = resolver;
          this.elementRef = elementRef;
          this.warnDeprecation = false;
          this.modelChange = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"]();
          this.hostObservers = [];
          this.componentRefs = [];
          this.hooksObservers = [];
          this.detectFieldBuild = false;
          this.warnDeprecation = hideDeprecation === null;
        }
        /**
         * @param {?} m
         * @return {?}
         */


        _createClass(FormlyField, [{
          key: "model",
          set: function set(m) {
            this.warnDeprecation && console.warn("NgxFormly: passing 'model' input to '".concat(this.constructor.name, "' component is not required anymore, you may remove it!"));
          }
          /**
           * @param {?} form
           * @return {?}
           */

        }, {
          key: "form",
          set: function set(form) {
            this.warnDeprecation && console.warn("NgxFormly: passing 'form' input to '".concat(this.constructor.name, "' component is not required anymore, you may remove it!"));
          }
          /**
           * @param {?} options
           * @return {?}
           */

        }, {
          key: "options",
          set: function set(options) {
            this.warnDeprecation && console.warn("NgxFormly: passing 'options' input to '".concat(this.constructor.name, "' component is not required anymore, you may remove it!"));
          }
          /**
           * @return {?}
           */

        }, {
          key: "ngAfterContentInit",
          value: function ngAfterContentInit() {
            this.triggerHook('afterContentInit');
          }
          /**
           * @return {?}
           */

        }, {
          key: "ngAfterContentChecked",
          value: function ngAfterContentChecked() {
            this.triggerHook('afterContentChecked');
          }
          /**
           * @return {?}
           */

        }, {
          key: "ngAfterViewInit",
          value: function ngAfterViewInit() {
            this.triggerHook('afterViewInit');
          }
          /**
           * @return {?}
           */

        }, {
          key: "ngAfterViewChecked",
          value: function ngAfterViewChecked() {
            this.triggerHook('afterViewChecked');
          }
          /**
           * @return {?}
           */

        }, {
          key: "ngDoCheck",
          value: function ngDoCheck() {
            this.triggerHook('doCheck');

            if (this.detectFieldBuild && this.field && this.field.options) {
              this.render();
            }
          }
          /**
           * @return {?}
           */

        }, {
          key: "ngOnInit",
          value: function ngOnInit() {
            this.triggerHook('onInit');
          }
          /**
           * @param {?} changes
           * @return {?}
           */

        }, {
          key: "ngOnChanges",
          value: function ngOnChanges(changes) {
            this.triggerHook('onChanges', changes);
          }
          /**
           * @return {?}
           */

        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            this.resetRefs(this.field);
            this.hostObservers.forEach(
            /**
            * @param {?} unsubscribe
            * @return {?}
            */
            function (unsubscribe) {
              return unsubscribe();
            });
            this.hooksObservers.forEach(
            /**
            * @param {?} unsubscribe
            * @return {?}
            */
            function (unsubscribe) {
              return unsubscribe();
            });
            this.triggerHook('onDestroy');
          }
          /**
           * @private
           * @param {?} containerRef
           * @param {?} f
           * @param {?=} wrappers
           * @return {?}
           */

        }, {
          key: "renderField",
          value: function renderField(containerRef, f) {
            var _this12 = this;

            var wrappers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];

            if (this.containerRef === containerRef) {
              this.resetRefs(this.field);
              this.containerRef.clear();
              wrappers = this.field ? this.field.wrappers : [];
            }

            if (wrappers && wrappers.length > 0) {
              var _wrappers = wrappers,
                  _wrappers2 = _toArray(_wrappers),
                  wrapper = _wrappers2[0],
                  wps = _wrappers2.slice(1);

              var _this$formlyConfig$ge = this.formlyConfig.getWrapper(wrapper),
                  component = _this$formlyConfig$ge.component;
              /** @type {?} */


              var ref = containerRef.createComponent(this.resolver.resolveComponentFactory(component));
              this.attachComponentRef(ref, f);
              wrapProperty(ref.instance, 'fieldComponent',
              /**
              * @param {?} __0
              * @return {?}
              */
              function (_ref5) {
                var firstChange = _ref5.firstChange,
                    previousValue = _ref5.previousValue,
                    currentValue = _ref5.currentValue;

                if (currentValue) {
                  if (previousValue && previousValue['_lContainer'] === currentValue['_lContainer']) {
                    return;
                  }
                  /** @type {?} */


                  var viewRef = previousValue ? previousValue.detach() : null;

                  if (viewRef && !viewRef.destroyed) {
                    currentValue.insert(viewRef);
                  } else {
                    _this12.renderField(currentValue, f, wps);
                  }

                  !firstChange && ref.changeDetectorRef.detectChanges();
                }
              });
            } else if (f && f.type) {
              var _this$formlyConfig$ge2 = this.formlyConfig.getType(f.type),
                  _component = _this$formlyConfig$ge2.component;
              /** @type {?} */


              var _ref6 = containerRef.createComponent(this.resolver.resolveComponentFactory(_component));

              this.attachComponentRef(_ref6, f);
            }
          }
          /**
           * @private
           * @param {?} name
           * @param {?=} changes
           * @return {?}
           */

        }, {
          key: "triggerHook",
          value: function triggerHook(name, changes) {
            if (this.field && this.field.hooks && this.field.hooks[name]) {
              if (!changes || changes.field) {
                /** @type {?} */
                var r = this.field.hooks[name](this.field);

                if (Object(rxjs__WEBPACK_IMPORTED_MODULE_6__["isObservable"])(r) && ['onInit', 'afterContentInit', 'afterViewInit'].indexOf(name) !== -1) {
                  /** @type {?} */
                  var sub = r.subscribe();
                  this.hooksObservers.push(
                  /**
                  * @return {?}
                  */
                  function () {
                    return sub.unsubscribe();
                  });
                }
              }
            }

            if (this.field && this.field.lifecycle && this.field.lifecycle[name]) {
              this.field.lifecycle[name](this.field.form, this.field, this.field.model, this.field.options);
            }

            if (name === 'onChanges' && changes.field) {
              this.resetRefs(changes.field.previousValue);
              this.render();
            }
          }
          /**
           * @private
           * @template T
           * @param {?} ref
           * @param {?} field
           * @return {?}
           */

        }, {
          key: "attachComponentRef",
          value: function attachComponentRef(ref, field) {
            this.componentRefs.push(ref);

            field._componentRefs.push(ref);

            Object.assign(ref.instance, {
              field: field
            });
          }
          /**
           * @private
           * @return {?}
           */

        }, {
          key: "render",
          value: function render() {
            var _this13 = this;

            if (!this.field) {
              return;
            } // require Formly build


            if (!this.field.options) {
              this.detectFieldBuild = true;
              return;
            }

            this.detectFieldBuild = false;
            this.hostObservers.forEach(
            /**
            * @param {?} unsubscribe
            * @return {?}
            */
            function (unsubscribe) {
              return unsubscribe();
            });
            this.hostObservers = [wrapProperty(this.field, 'hide',
            /**
            * @param {?} __0
            * @return {?}
            */
            function (_ref7) {
              var firstChange = _ref7.firstChange,
                  currentValue = _ref7.currentValue;

              if (!_this13.formlyConfig.extras.lazyRender) {
                firstChange && _this13.renderField(_this13.containerRef, _this13.field);

                if (!firstChange || firstChange && currentValue) {
                  _this13.renderer.setStyle(_this13.elementRef.nativeElement, 'display', currentValue ? 'none' : '');
                }
              } else {
                if (currentValue) {
                  _this13.containerRef.clear();
                } else {
                  _this13.renderField(_this13.containerRef, _this13.field);
                }
              }
            }), wrapProperty(this.field, 'className',
            /**
            * @param {?} __0
            * @return {?}
            */
            function (_ref8) {
              var firstChange = _ref8.firstChange,
                  currentValue = _ref8.currentValue;

              if (!firstChange || firstChange && currentValue) {
                _this13.renderer.setAttribute(_this13.elementRef.nativeElement, 'class', currentValue);
              }
            })];
          }
          /**
           * @private
           * @param {?} field
           * @return {?}
           */

        }, {
          key: "resetRefs",
          value: function resetRefs(field) {
            var _this14 = this;

            if (field) {
              if (field._componentRefs) {
                field._componentRefs = field._componentRefs.filter(
                /**
                * @param {?} ref
                * @return {?}
                */
                function (ref) {
                  return _this14.componentRefs.indexOf(ref) === -1;
                });
              } else {
                defineHiddenProp(this.field, '_componentRefs', []);
              }
            }

            this.componentRefs = [];
          }
        }]);

        return FormlyField;
      }();

      FormlyField.ɵfac = function FormlyField_Factory(t) {
        return new (t || FormlyField)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](FormlyConfig), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinjectAttribute"]('hide-deprecation'));
      };

      FormlyField.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: FormlyField,
        selectors: [["formly-field"]],
        viewQuery: function FormlyField_Query(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵstaticViewQuery"](_c2, true, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"]);
          }

          if (rf & 2) {
            var _t;

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]()) && (ctx.containerRef = _t.first);
          }
        },
        inputs: {
          model: "model",
          form: "form",
          options: "options",
          field: "field"
        },
        outputs: {
          modelChange: "modelChange"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵNgOnChangesFeature"]],
        decls: 2,
        vars: 0,
        consts: [["container", ""]],
        template: function FormlyField_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](0, FormlyField_ng_template_0_Template, 0, 0, "ng-template", null, 0, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplateRefExtractor"]);
          }
        },
        encapsulation: 2
      });
      /** @nocollapse */

      FormlyField.ctorParameters = function () {
        return [{
          type: FormlyConfig
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"],
            args: ['hide-deprecation']
          }]
        }];
      };

      FormlyField.propDecorators = {
        field: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        model: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        form: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        options: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        modelChange: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"]
        }],
        containerRef: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"],
          args: ['container',
          /** @type {?} */
          {
            read: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"],
            "static": true
          }]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](FormlyField, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: 'formly-field',
            template: "<ng-template #container></ng-template>"
          }]
        }], function () {
          return [{
            type: FormlyConfig
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ComponentFactoryResolver"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Attribute"],
              args: ['hide-deprecation']
            }]
          }];
        }, {
          modelChange: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"]
          }],
          model: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          form: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          options: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          field: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }],
          containerRef: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"],
            args: ['container',
            /** @type {?} */
            {
              read: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"],
              "static": true
            }]
          }]
        });
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      var FormlyAttributes = /*#__PURE__*/function () {
        /**
         * @param {?} renderer
         * @param {?} elementRef
         * @param {?} _document
         */
        function FormlyAttributes(renderer, elementRef, _document) {
          _classCallCheck(this, FormlyAttributes);

          this.renderer = renderer;
          this.elementRef = elementRef;
          this.uiAttributesCache = {};
          this.uiAttributes = [].concat(FORMLY_VALIDATORS, ['tabindex', 'placeholder', 'readonly', 'disabled', 'step']);
          /**
           * HostBinding doesn't register listeners conditionally which may produce some perf issues.
           *
           * Formly issue: https://github.com/ngx-formly/ngx-formly/issues/1991
           */

          this.uiEvents = {
            listeners: [],
            events: ['click', 'keyup', 'keydown', 'keypress']
          };
          this.document = _document;
        }
        /**
         * @return {?}
         */


        _createClass(FormlyAttributes, [{
          key: "to",
          get: function get() {
            return this.field.templateOptions || {};
          }
          /**
           * @private
           * @return {?}
           */

        }, {
          key: "fieldAttrElements",
          get: function get() {
            return this.field && this.field['_elementRefs'] || [];
          }
          /**
           * @param {?} changes
           * @return {?}
           */

        }, {
          key: "ngOnChanges",
          value: function ngOnChanges(changes) {
            var _this15 = this;

            if (changes.field) {
              this.field.name && this.setAttribute('name', this.field.name);
              this.uiEvents.listeners.forEach(
              /**
              * @param {?} listener
              * @return {?}
              */
              function (listener) {
                return listener();
              });
              this.uiEvents.events.forEach(
              /**
              * @param {?} eventName
              * @return {?}
              */
              function (eventName) {
                if (_this15.to && _this15.to[eventName]) {
                  _this15.uiEvents.listeners.push(_this15.renderer.listen(_this15.elementRef.nativeElement, eventName,
                  /**
                  * @param {?} e
                  * @return {?}
                  */
                  function (e) {
                    return _this15.to[eventName](_this15.field, e);
                  }));
                }
              });

              if (this.to && this.to.attributes) {
                wrapProperty(this.to, 'attributes',
                /**
                * @param {?} __0
                * @return {?}
                */
                function (_ref9) {
                  var currentValue = _ref9.currentValue,
                      previousValue = _ref9.previousValue;

                  if (previousValue) {
                    Object.keys(previousValue).forEach(
                    /**
                    * @param {?} attr
                    * @return {?}
                    */
                    function (attr) {
                      return _this15.removeAttribute(attr);
                    });
                  }

                  if (currentValue) {
                    Object.keys(currentValue).forEach(
                    /**
                    * @param {?} attr
                    * @return {?}
                    */
                    function (attr) {
                      if (currentValue[attr] != null) {
                        _this15.setAttribute(attr, currentValue[attr]);
                      }
                    });
                  }
                });
              }

              this.detachElementRef(changes.field.previousValue);
              this.attachElementRef(changes.field.currentValue);

              if (this.fieldAttrElements.length === 1) {
                !this.id && this.field.id && this.setAttribute('id', this.field.id);
                wrapProperty(this.field, 'focus',
                /**
                * @param {?} __0
                * @return {?}
                */
                function (_ref10) {
                  var currentValue = _ref10.currentValue;

                  _this15.toggleFocus(currentValue);
                });
              }
            }

            if (changes.id) {
              this.setAttribute('id', this.id);
            }
          }
          /**
           * We need to re-evaluate all the attributes on every change detection cycle, because
           * by using a HostBinding we run into certain edge cases. This means that whatever logic
           * is in here has to be super lean or we risk seriously damaging or destroying the performance.
           *
           * Formly issue: https://github.com/ngx-formly/ngx-formly/issues/1317
           * Material issue: https://github.com/angular/components/issues/14024
           * @return {?}
           */

        }, {
          key: "ngDoCheck",
          value: function ngDoCheck() {
            var _this16 = this;

            this.uiAttributes.forEach(
            /**
            * @param {?} attr
            * @return {?}
            */
            function (attr) {
              /** @type {?} */
              var value = _this16.to[attr];

              if (_this16.uiAttributesCache[attr] !== value && (!_this16.to.attributes || !_this16.to.attributes.hasOwnProperty(attr.toLowerCase()))) {
                _this16.uiAttributesCache[attr] = value;

                if (value || value === 0) {
                  _this16.setAttribute(attr, value === true ? attr : "".concat(value));
                } else {
                  _this16.removeAttribute(attr);
                }
              }
            });
          }
          /**
           * @return {?}
           */

        }, {
          key: "ngOnDestroy",
          value: function ngOnDestroy() {
            this.uiEvents.listeners.forEach(
            /**
            * @param {?} listener
            * @return {?}
            */
            function (listener) {
              return listener();
            });
            this.detachElementRef(this.field);
          }
          /**
           * @param {?} value
           * @return {?}
           */

        }, {
          key: "toggleFocus",
          value: function toggleFocus(value) {
            var _this17 = this;

            /** @type {?} */
            var element = this.fieldAttrElements ? this.fieldAttrElements[0] : null;

            if (!element || !element.nativeElement.focus) {
              return;
            }
            /** @type {?} */


            var isFocused = !!this.document.activeElement && this.fieldAttrElements.some(
            /**
            * @param {?} __0
            * @return {?}
            */
            function (_ref11) {
              var nativeElement = _ref11.nativeElement;
              return _this17.document.activeElement === nativeElement || nativeElement.contains(_this17.document.activeElement);
            });

            if (value && !isFocused) {
              element.nativeElement.focus();
            } else if (!value && isFocused) {
              element.nativeElement.blur();
            }
          }
          /**
           * @param {?} $event
           * @return {?}
           */

        }, {
          key: "onFocus",
          value: function onFocus($event) {
            this.field['___$focus'] = true;

            if (this.to.focus) {
              this.to.focus(this.field, $event);
            }
          }
          /**
           * @param {?} $event
           * @return {?}
           */

        }, {
          key: "onBlur",
          value: function onBlur($event) {
            this.field['___$focus'] = false;

            if (this.to.blur) {
              this.to.blur(this.field, $event);
            }
          }
          /**
           * @param {?} $event
           * @return {?}
           */

        }, {
          key: "onChange",
          value: function onChange($event) {
            if (this.to.change) {
              this.to.change(this.field, $event);
            }

            if (this.field.formControl) {
              this.field.formControl.markAsDirty();
            }
          }
          /**
           * @private
           * @param {?} f
           * @return {?}
           */

        }, {
          key: "attachElementRef",
          value: function attachElementRef(f) {
            if (!f) {
              return;
            }

            if (f['_elementRefs'] && f['_elementRefs'].indexOf(this.elementRef) === -1) {
              f['_elementRefs'].push(this.elementRef);
            } else {
              defineHiddenProp(f, '_elementRefs', [this.elementRef]);
            }
          }
          /**
           * @private
           * @param {?} f
           * @return {?}
           */

        }, {
          key: "detachElementRef",
          value: function detachElementRef(f) {
            /** @type {?} */
            var index = f && f['_elementRefs'] ? this.fieldAttrElements.indexOf(this.elementRef) : -1;

            if (index !== -1) {
              this.field['_elementRefs'].splice(index, 1);
            }
          }
          /**
           * @private
           * @param {?} attr
           * @param {?} value
           * @return {?}
           */

        }, {
          key: "setAttribute",
          value: function setAttribute(attr, value) {
            this.renderer.setAttribute(this.elementRef.nativeElement, attr, value);
          }
          /**
           * @private
           * @param {?} attr
           * @return {?}
           */

        }, {
          key: "removeAttribute",
          value: function removeAttribute(attr) {
            this.renderer.removeAttribute(this.elementRef.nativeElement, attr);
          }
        }]);

        return FormlyAttributes;
      }();

      FormlyAttributes.ɵfac = function FormlyAttributes_Factory(t) {
        return new (t || FormlyAttributes)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]));
      };

      FormlyAttributes.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({
        type: FormlyAttributes,
        selectors: [["", "formlyAttributes", ""]],
        hostBindings: function FormlyAttributes_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("focus", function FormlyAttributes_focus_HostBindingHandler($event) {
              return ctx.onFocus($event);
            })("blur", function FormlyAttributes_blur_HostBindingHandler($event) {
              return ctx.onBlur($event);
            })("change", function FormlyAttributes_change_HostBindingHandler($event) {
              return ctx.onChange($event);
            });
          }
        },
        inputs: {
          field: ["formlyAttributes", "field"],
          id: "id"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵNgOnChangesFeature"]]
      });
      /** @nocollapse */

      FormlyAttributes.ctorParameters = function () {
        return [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"]
        }, {
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
        }, {
          type: undefined,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
            args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
          }]
        }];
      };

      FormlyAttributes.propDecorators = {
        field: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"],
          args: ['formlyAttributes']
        }],
        id: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](FormlyAttributes, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"],
          args: [{
            selector: '[formlyAttributes]',
            host: {
              '(focus)': 'onFocus($event)',
              '(blur)': 'onBlur($event)',
              '(change)': 'onChange($event)'
            }
          }]
        }], function () {
          return [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Renderer2"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ElementRef"]
          }, {
            type: undefined,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
              args: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["DOCUMENT"]]
            }]
          }];
        }, {
          field: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"],
            args: ['formlyAttributes']
          }],
          id: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }]
        });
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * @abstract
       * @template F
       */


      var FieldType = /*#__PURE__*/function () {
        function FieldType() {
          _classCallCheck(this, FieldType);
        }

        _createClass(FieldType, [{
          key: "model",
          get:
          /**
           * @return {?}
           */
          function get() {
            return this.field.model;
          }
          /**
           * @param {?} m
           * @return {?}
           */
          ,
          set: function set(m) {
            console.warn("NgxFormly: passing 'model' input to '".concat(this.constructor.name, "' component is not required anymore, you may remove it!"));
          }
          /**
           * @return {?}
           */

        }, {
          key: "form",
          get: function get() {
            return (
              /** @type {?} */
              this.field.parent.formControl
            );
          }
          /**
           * @param {?} form
           * @return {?}
           */
          ,
          set: function set(form) {
            console.warn("NgxFormly: passing 'form' input to '".concat(this.constructor.name, "' component is not required anymore, you may remove it!"));
          }
          /**
           * @return {?}
           */

        }, {
          key: "options",
          get: function get() {
            return this.field.options;
          }
          /**
           * @param {?} options
           * @return {?}
           */
          ,
          set: function set(options) {
            console.warn("NgxFormly: passing 'options' input to '".concat(this.constructor.name, "' component is not required anymore, you may remove it!"));
          }
          /**
           * @return {?}
           */

        }, {
          key: "key",
          get: function get() {
            return this.field.key;
          }
          /**
           * @return {?}
           */

        }, {
          key: "formControl",
          get: function get() {
            return this.field.formControl;
          }
          /**
           * @return {?}
           */

        }, {
          key: "to",
          get: function get() {
            return this.field.templateOptions || {};
          }
          /**
           * @return {?}
           */

        }, {
          key: "showError",
          get: function get() {
            return this.options.showError(this);
          }
          /**
           * @return {?}
           */

        }, {
          key: "id",
          get: function get() {
            return this.field.id;
          }
          /**
           * @return {?}
           */

        }, {
          key: "formState",
          get: function get() {
            return this.options.formState || {};
          }
        }]);

        return FieldType;
      }();

      FieldType.ɵfac = function FieldType_Factory(t) {
        return new (t || FieldType)();
      };

      FieldType.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({
        type: FieldType,
        inputs: {
          model: "model",
          form: "form",
          options: "options",
          field: "field"
        }
      });
      FieldType.propDecorators = {
        field: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        model: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        form: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }],
        options: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }]
      };
      /**
       * @deprecated use `FieldType` instead
       * @abstract
       */

      var Field = /*#__PURE__*/function (_FieldType) {
        _inherits(Field, _FieldType);

        var _super = _createSuper(Field);

        function Field() {
          var _this18;

          _classCallCheck(this, Field);

          _this18 = _super.call(this);
          console.warn("NgxFormly: 'Field' has been renamed to 'FieldType', extend 'FieldType' instead.");
          return _this18;
        }

        return Field;
      }(FieldType);
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */
      // TODO remove `selector` in V6
      // tslint:disable-next-line

      /**
       * @abstract
       * @template F
       */


      var FieldArrayType = /*#__PURE__*/function (_FieldType2) {
        _inherits(FieldArrayType, _FieldType2);

        var _super2 = _createSuper(FieldArrayType);

        /**
         * @param {?=} builder
         */
        function FieldArrayType(builder) {
          var _this19;

          _classCallCheck(this, FieldArrayType);

          _this19 = _super2.call(this);
          _this19.defaultOptions = {
            defaultValue: []
          };

          if (builder instanceof FormlyFormBuilder) {
            console.warn("NgxFormly: passing 'FormlyFormBuilder' to '".concat(_this19.constructor.name, "' type is not required anymore, you may remove it!"));
          }

          return _this19;
        }
        /**
         * @return {?}
         */


        _createClass(FieldArrayType, [{
          key: "formControl",
          get: function get() {
            return (
              /** @type {?} */
              this.field.formControl
            );
          }
          /**
           * @param {?} field
           * @return {?}
           */

        }, {
          key: "onPopulate",
          value: function onPopulate(field) {
            if (!field.formControl && field.key) {
              /** @type {?} */
              var control = findControl(field);
              registerControl(field, control ? control : new _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormArray"]([], {
                updateOn: field.modelOptions.updateOn
              }));
            }

            field.fieldGroup = field.fieldGroup || [];
            /** @type {?} */

            var length = field.model ? field.model.length : 0;

            if (field.fieldGroup.length > length) {
              for (var i = field.fieldGroup.length - 1; i >= length; --i) {
                unregisterControl(field.fieldGroup[i]);
                field.fieldGroup.splice(i, 1);
              }
            }

            for (var _i = field.fieldGroup.length; _i < length; _i++) {
              /** @type {?} */
              var f = Object.assign({}, clone(field.fieldArray), {
                key: "".concat(_i)
              });
              field.fieldGroup.push(f);
            }
          }
          /**
           * @param {?=} i
           * @param {?=} initialModel
           * @param {?=} __2
           * @return {?}
           */

        }, {
          key: "add",
          value: function add(i, initialModel) {
            var _ref12 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
              markAsDirty: true
            },
                markAsDirty = _ref12.markAsDirty;

            i = isNullOrUndefined(i) ? this.field.fieldGroup.length : i;

            if (!this.model) {
              assignFieldValue(this.field, []);
            }

            this.model.splice(i, 0, initialModel ? clone(initialModel) : undefined);

            /** @type {?} */
            this.options._buildForm(true);

            markAsDirty && this.formControl.markAsDirty();
          }
          /**
           * @param {?} i
           * @param {?=} __1
           * @return {?}
           */

        }, {
          key: "remove",
          value: function remove(i) {
            var _ref13 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
              markAsDirty: true
            },
                markAsDirty = _ref13.markAsDirty;

            this.model.splice(i, 1);
            unregisterControl(this.field.fieldGroup[i], true);
            this.field.fieldGroup.splice(i, 1);
            this.field.fieldGroup.forEach(
            /**
            * @param {?} f
            * @param {?} key
            * @return {?}
            */
            function (f, key) {
              return f.key = "".concat(key);
            });

            /** @type {?} */
            this.options._buildForm(true);

            markAsDirty && this.formControl.markAsDirty();
          }
        }]);

        return FieldArrayType;
      }(FieldType);

      FieldArrayType.ɵfac = function FieldArrayType_Factory(t) {
        return new (t || FieldArrayType)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](FORMLY_CONFIG, 8));
      };

      FieldArrayType.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({
        type: FieldArrayType,
        selectors: [["fieldArray"]],
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵInheritDefinitionFeature"]]
      });
      /** @nocollapse */

      FieldArrayType.ctorParameters = function () {
        return [{
          type: FormlyFormBuilder,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
            args: [FORMLY_CONFIG]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
          }]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](FieldArrayType, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Directive"],
          args: [{
            selector: '[ɵfieldArray]'
          }]
        }], function () {
          return [{
            type: FormlyFormBuilder,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
              args: [FORMLY_CONFIG]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
            }]
          }];
        }, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * @abstract
       * @template F
       */


      var FieldWrapper = /*#__PURE__*/function (_FieldType3) {
        _inherits(FieldWrapper, _FieldType3);

        var _super3 = _createSuper(FieldWrapper);

        function FieldWrapper() {
          _classCallCheck(this, FieldWrapper);

          return _super3.apply(this, arguments);
        }

        return FieldWrapper;
      }(FieldType);

      FieldWrapper.ɵfac = function FieldWrapper_Factory(t) {
        return ɵFieldWrapper_BaseFactory(t || FieldWrapper);
      };

      FieldWrapper.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineDirective"]({
        type: FieldWrapper,
        viewQuery: function FieldWrapper_Query(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵviewQuery"](_c3, true, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"]);
          }

          if (rf & 2) {
            var _t;

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵqueryRefresh"](_t = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵloadQuery"]()) && (ctx.fieldComponent = _t.first);
          }
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵInheritDefinitionFeature"]]
      });
      FieldWrapper.propDecorators = {
        fieldComponent: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewChild"],
          args: ['fieldComponent',
          /** @type {?} */
          {
            read: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewContainerRef"],
            "static": false
          }]
        }]
      };

      var ɵFieldWrapper_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵgetInheritedFactory"](FieldWrapper);
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      var FormlyGroup = /*#__PURE__*/function (_FieldType4) {
        _inherits(FormlyGroup, _FieldType4);

        var _super4 = _createSuper(FormlyGroup);

        function FormlyGroup() {
          var _this20;

          _classCallCheck(this, FormlyGroup);

          _this20 = _super4.apply(this, arguments);
          _this20.defaultOptions = {
            defaultValue: {}
          };
          return _this20;
        }

        return FormlyGroup;
      }(FieldType);

      FormlyGroup.ɵfac = function FormlyGroup_Factory(t) {
        return ɵFormlyGroup_BaseFactory(t || FormlyGroup);
      };

      FormlyGroup.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: FormlyGroup,
        selectors: [["formly-group"]],
        hostVars: 2,
        hostBindings: function FormlyGroup_HostBindings(rf, ctx) {
          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵclassMap"](ctx.field.fieldGroupClassName || "");
          }
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵInheritDefinitionFeature"]],
        ngContentSelectors: _c1,
        decls: 2,
        vars: 1,
        consts: [[3, "field", 4, "ngFor", "ngForOf"], [3, "field"]],
        template: function FormlyGroup_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojectionDef"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtemplate"](0, FormlyGroup_formly_field_0_Template, 1, 1, "formly-field", 0);

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵprojection"](1);
          }

          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngForOf", ctx.field.fieldGroup);
          }
        },
        directives: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["NgForOf"], FormlyField],
        encapsulation: 2
      });

      var ɵFormlyGroup_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵgetInheritedFactory"](FormlyGroup);
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](FormlyGroup, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: 'formly-group',
            template: "\n    <formly-field *ngFor=\"let f of field.fieldGroup\" [field]=\"f\"></formly-field>\n    <ng-content></ng-content>\n  ",
            host: {
              '[class]': 'field.fieldGroupClassName || ""'
            }
          }]
        }], null, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      var FormlyValidationMessage = /*#__PURE__*/function () {
        /**
         * @param {?} formlyConfig
         */
        function FormlyValidationMessage(formlyConfig) {
          _classCallCheck(this, FormlyValidationMessage);

          this.formlyConfig = formlyConfig;
        }
        /**
         * @return {?}
         */


        _createClass(FormlyValidationMessage, [{
          key: "ngOnChanges",
          value: function ngOnChanges() {
            var _this21 = this;

            this.errorMessage$ = this.field.formControl.statusChanges.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["startWith"])(null), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["switchMap"])(
            /**
            * @return {?}
            */
            function () {
              return Object(rxjs__WEBPACK_IMPORTED_MODULE_6__["isObservable"])(_this21.errorMessage) ? _this21.errorMessage : Object(rxjs__WEBPACK_IMPORTED_MODULE_6__["of"])(_this21.errorMessage);
            }));
          }
          /**
           * @return {?}
           */

        }, {
          key: "errorMessage",
          get: function get() {
            /** @type {?} */
            var fieldForm = this.field.formControl;

            for (var error in fieldForm.errors) {
              if (fieldForm.errors.hasOwnProperty(error)) {
                /** @type {?} */
                var message = this.formlyConfig.getValidatorMessage(error);

                if (isObject(fieldForm.errors[error])) {
                  if (fieldForm.errors[error].errorPath) {
                    return;
                  }

                  if (fieldForm.errors[error].message) {
                    message = fieldForm.errors[error].message;
                  }
                }

                if (this.field.validation && this.field.validation.messages && this.field.validation.messages[error]) {
                  message = this.field.validation.messages[error];
                }

                if (this.field.validators && this.field.validators[error] && this.field.validators[error].message) {
                  message = this.field.validators[error].message;
                }

                if (this.field.asyncValidators && this.field.asyncValidators[error] && this.field.asyncValidators[error].message) {
                  message = this.field.asyncValidators[error].message;
                }

                if (typeof message === 'function') {
                  return message(fieldForm.errors[error], this.field);
                }

                return message;
              }
            }
          }
        }]);

        return FormlyValidationMessage;
      }();

      FormlyValidationMessage.ɵfac = function FormlyValidationMessage_Factory(t) {
        return new (t || FormlyValidationMessage)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](FormlyConfig));
      };

      FormlyValidationMessage.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: FormlyValidationMessage,
        selectors: [["formly-validation-message"]],
        inputs: {
          field: "field"
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵNgOnChangesFeature"]],
        decls: 2,
        vars: 3,
        template: function FormlyValidationMessage_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](0);

            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](1, "async");
          }

          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](1, 1, ctx.errorMessage$));
          }
        },
        pipes: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["AsyncPipe"]],
        encapsulation: 2,
        changeDetection: 0
      });
      /** @nocollapse */

      FormlyValidationMessage.ctorParameters = function () {
        return [{
          type: FormlyConfig
        }];
      };

      FormlyValidationMessage.propDecorators = {
        field: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
        }]
      };
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](FormlyValidationMessage, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: 'formly-validation-message',
            template: "{{ errorMessage$ | async }}",
            changeDetection: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ChangeDetectionStrategy"].OnPush
          }]
        }], function () {
          return [{
            type: FormlyConfig
          }];
        }, {
          field: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"]
          }]
        });
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      var FormlyTemplateType = /*#__PURE__*/function (_FieldType5) {
        _inherits(FormlyTemplateType, _FieldType5);

        var _super5 = _createSuper(FormlyTemplateType);

        /**
         * @param {?} sanitizer
         */
        function FormlyTemplateType(sanitizer) {
          var _this22;

          _classCallCheck(this, FormlyTemplateType);

          _this22 = _super5.call(this);
          _this22.sanitizer = sanitizer;
          _this22.innerHtml = {
            content: null,
            template: null
          };
          return _this22;
        }
        /**
         * @return {?}
         */


        _createClass(FormlyTemplateType, [{
          key: "template",
          get: function get() {
            if (this.field && this.field.template !== this.innerHtml.template) {
              this.innerHtml = {
                template: this.field.template,
                content: this.to.safeHtml ? this.sanitizer.bypassSecurityTrustHtml(this.field.template) : this.field.template
              };
            }

            return this.innerHtml.content;
          }
        }]);

        return FormlyTemplateType;
      }(FieldType);

      FormlyTemplateType.ɵfac = function FormlyTemplateType_Factory(t) {
        return new (t || FormlyTemplateType)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_platform_browser__WEBPACK_IMPORTED_MODULE_2__["DomSanitizer"]));
      };

      FormlyTemplateType.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
        type: FormlyTemplateType,
        selectors: [["formly-template"]],
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵInheritDefinitionFeature"]],
        decls: 1,
        vars: 1,
        consts: [[3, "innerHtml"]],
        template: function FormlyTemplateType_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](0, "div", 0);
          }

          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("innerHtml", ctx.template, _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵsanitizeHtml"]);
          }
        },
        encapsulation: 2
      });
      /** @nocollapse */

      FormlyTemplateType.ctorParameters = function () {
        return [{
          type: _angular_platform_browser__WEBPACK_IMPORTED_MODULE_2__["DomSanitizer"]
        }];
      };
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](FormlyTemplateType, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"],
          args: [{
            selector: 'formly-template',
            template: "<div [innerHtml]=\"template\"></div>"
          }]
        }], function () {
          return [{
            type: _angular_platform_browser__WEBPACK_IMPORTED_MODULE_2__["DomSanitizer"]
          }];
        }, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * @param {?} expression
       * @param {?} argNames
       * @return {?}
       */


      function evalStringExpression(expression, argNames) {
        try {
          if (expression.indexOf('this.field') !== -1) {
            console.warn("NgxFormly: using 'this.field' in expressionProperties is deprecated since v5.1, use 'field' instead.");
          }

          return (
            /** @type {?} */
            Function.apply(void 0, _toConsumableArray(argNames).concat(["return ".concat(expression, ";")]))
          );
        } catch (error) {
          console.error(error);
        }
      }
      /**
       * @param {?} expression
       * @param {?} thisArg
       * @param {?} argVal
       * @return {?}
       */


      function evalExpression(expression, thisArg, argVal) {
        if (expression instanceof Function) {
          return expression.apply(thisArg, argVal);
        } else {
          return expression ? true : false;
        }
      }
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * \@experimental
       */


      var FieldExpressionExtension = /*#__PURE__*/function () {
        function FieldExpressionExtension() {
          _classCallCheck(this, FieldExpressionExtension);
        }

        _createClass(FieldExpressionExtension, [{
          key: "prePopulate",
          value:
          /**
           * @param {?} field
           * @return {?}
           */
          function prePopulate(field) {
            var _this23 = this;

            if (field.parent || field.options._checkField) {
              return;
            }
            /** @type {?} */


            var checkLocked = false;

            field.options._checkField =
            /**
            * @param {?} f
            * @param {?} ignoreCache
            * @return {?}
            */
            function (f, ignoreCache) {
              if (!checkLocked) {
                checkLocked = true;
                reduceFormUpdateValidityCalls(f.formControl,
                /**
                * @return {?}
                */
                function () {
                  return _this23.checkField(f, ignoreCache);
                });
                checkLocked = false;
              }
            };
          }
          /**
           * @param {?} field
           * @return {?}
           */

        }, {
          key: "postPopulate",
          value: function postPopulate(field) {
            var _this24 = this;

            if (!field.parent || field._expressionProperties) {
              return;
            } // cache built expression


            defineHiddenProp(field, '_expressionProperties', {});

            if (field.expressionProperties) {
              var _loop2 = function _loop2(key) {
                /** @type {?} */
                var expressionProperty = field.expressionProperties[key];

                if (typeof expressionProperty === 'string' || isFunction(expressionProperty)) {
                  field._expressionProperties[key] = {
                    expression: _this24._evalExpression(key, expressionProperty, key === 'templateOptions.disabled' && field.parent.expressionProperties && field.parent.expressionProperties.hasOwnProperty('templateOptions.disabled') ?
                    /**
                    * @return {?}
                    */
                    function () {
                      return field.parent.templateOptions.disabled;
                    } : undefined)
                  };

                  if (key === 'templateOptions.disabled') {
                    Object.defineProperty(field._expressionProperties[key], 'expressionValue', {
                      get:
                      /**
                      * @return {?}
                      */
                      function get() {
                        return field.templateOptions.disabled;
                      },
                      set:
                      /**
                      * @return {?}
                      */
                      function set() {},
                      enumerable: true,
                      configurable: true
                    });
                  }
                } else if (expressionProperty instanceof rxjs__WEBPACK_IMPORTED_MODULE_6__["Observable"]) {
                  /** @type {?} */
                  var subscribe =
                  /**
                  * @return {?}
                  */
                  function subscribe() {
                    return (
                      /** @type {?} */
                      expressionProperty.subscribe(
                      /**
                      * @param {?} v
                      * @return {?}
                      */
                      function (v) {
                        _this24.setExprValue(field, key, v);

                        if (field.options && field.options._markForCheck) {
                          field.options._markForCheck(field);
                        }
                      })
                    );
                  };
                  /** @type {?} */


                  var subscription = subscribe();
                  /** @type {?} */

                  var onInit = field.hooks.onInit;

                  field.hooks.onInit =
                  /**
                  * @return {?}
                  */
                  function () {
                    if (subscription === null) {
                      subscription = subscribe();
                    }

                    return onInit && onInit(field);
                  };
                  /** @type {?} */


                  var onDestroy = field.hooks.onDestroy;

                  field.hooks.onDestroy =
                  /**
                  * @return {?}
                  */
                  function () {
                    onDestroy && onDestroy(field);
                    subscription.unsubscribe();
                    subscription = null;
                  };
                }
              };

              for (var key in field.expressionProperties) {
                _loop2(key);
              }
            }

            if (field.hideExpression) {
              // delete hide value in order to force re-evaluate it in FormlyFormExpression.
              delete field.hide;
              field.hideExpression = this._evalExpression('hide', field.hideExpression,
              /**
              * @return {?}
              */
              function () {
                /** @type {?} */
                var root = field.parent;

                while (root.parent && !root.hide) {
                  root = root.parent;
                }

                return root.hide;
              });
            } else {
              wrapProperty(field, 'hide',
              /**
              * @param {?} __0
              * @return {?}
              */
              function (_ref14) {
                var currentValue = _ref14.currentValue,
                    firstChange = _ref14.firstChange;
                field._hide = currentValue;

                if (!firstChange || firstChange && currentValue === true) {
                  field.options._hiddenFieldsForCheck.push(field);
                }
              });
            }
          }
          /**
           * @private
           * @param {?} prop
           * @param {?} expression
           * @param {?=} parentExpression
           * @return {?}
           */

        }, {
          key: "_evalExpression",
          value: function _evalExpression(prop, _expression, parentExpression) {
            return (
              /**
              * @param {?} model
              * @param {?} formState
              * @param {?} field
              * @return {?}
              */
              function (model, formState, field) {
                try {
                  if (typeof _expression === 'string') {
                    _expression = evalStringExpression(_expression, ['model', 'formState', 'field']);
                  }

                  if (typeof _expression !== 'function') {
                    _expression =
                    /**
                    * @return {?}
                    */
                    function expression() {
                      return !!_expression;
                    };
                  }

                  return parentExpression && parentExpression() || _expression(model, formState, field);
                } catch (error) {
                  error.message = "[Formly Error] [Expression \"".concat(prop, "\"] ").concat(error.message);
                  throw error;
                }
              }
            );
          }
          /**
           * @private
           * @param {?} field
           * @param {?=} ignoreCache
           * @return {?}
           */

        }, {
          key: "checkField",
          value: function checkField(field) {
            var _this25 = this;

            var ignoreCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

            /** @type {?} */
            var fieldChanged = this._checkField(field, ignoreCache);

            field.options._hiddenFieldsForCheck.sort(
            /**
            * @param {?} f
            * @return {?}
            */
            function (f) {
              return f.hide ? -1 : 1;
            }).forEach(
            /**
            * @param {?} f
            * @return {?}
            */
            function (f) {
              return _this25.toggleFormControl(f, !!f.hide, !ignoreCache);
            });

            field.options._hiddenFieldsForCheck = [];

            if (fieldChanged) {
              this.checkField(field);

              if (field.options && field.options._markForCheck) {
                field.options._markForCheck(field);
              }
            }
          }
          /**
           * @private
           * @param {?} field
           * @param {?=} ignoreCache
           * @return {?}
           */

        }, {
          key: "_checkField",
          value: function _checkField(field) {
            var _this26 = this;

            var ignoreCache = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;

            /** @type {?} */
            var fieldChanged = false;
            field.fieldGroup.forEach(
            /**
            * @param {?} f
            * @return {?}
            */
            function (f) {
              if (!f.options) {
                return;
              }

              _this26.checkFieldExpressionChange(f, ignoreCache) && (fieldChanged = true);

              if (_this26.checkFieldVisibilityChange(f, ignoreCache)) {
                field.options._hiddenFieldsForCheck.push(f);

                fieldChanged = true;
              }

              if (f.fieldGroup && f.fieldGroup.length > 0) {
                _this26._checkField(f, ignoreCache) && (fieldChanged = true);
              }
            });
            return fieldChanged;
          }
          /**
           * @private
           * @param {?} field
           * @param {?} ignoreCache
           * @return {?}
           */

        }, {
          key: "checkFieldExpressionChange",
          value: function checkFieldExpressionChange(field, ignoreCache) {
            if (!field || !field._expressionProperties) {
              return false;
            }
            /** @type {?} */


            var markForCheck = false;
            /** @type {?} */

            var expressionProperties = field._expressionProperties;

            for (var key in expressionProperties) {
              /** @type {?} */
              var expressionValue = evalExpression(expressionProperties[key].expression, {
                field: field
              }, [field.model, field.options.formState, field]);

              if (key === 'templateOptions.disabled') {
                expressionValue = !!expressionValue;
              }

              if (ignoreCache || expressionProperties[key].expressionValue !== expressionValue && (!isObject(expressionValue) || Object(rxjs__WEBPACK_IMPORTED_MODULE_6__["isObservable"])(expressionValue) || JSON.stringify(expressionValue) !== JSON.stringify(expressionProperties[key].expressionValue))) {
                markForCheck = true;
                expressionProperties[key].expressionValue = expressionValue;
                this.setExprValue(field, key, expressionValue);
              }
            }

            return markForCheck;
          }
          /**
           * @private
           * @param {?} field
           * @param {?} ignoreCache
           * @return {?}
           */

        }, {
          key: "checkFieldVisibilityChange",
          value: function checkFieldVisibilityChange(field, ignoreCache) {
            if (!field || isNullOrUndefined(field.hideExpression)) {
              return false;
            }
            /** @type {?} */


            var hideExpressionResult = !!evalExpression(field.hideExpression, {
              field: field
            }, [field.model, field.options.formState, field]);
            /** @type {?} */

            var markForCheck = false;

            if (hideExpressionResult !== field.hide || ignoreCache) {
              markForCheck = true; // toggle hide

              field.hide = hideExpressionResult;
              field.templateOptions.hidden = hideExpressionResult;
            }

            return markForCheck;
          }
          /**
           * @private
           * @param {?} field
           * @param {?} value
           * @return {?}
           */

        }, {
          key: "setDisabledState",
          value: function setDisabledState(field, value) {
            var _this27 = this;

            if (field.fieldGroup) {
              field.fieldGroup.filter(
              /**
              * @param {?} f
              * @return {?}
              */
              function (f) {
                return !f.expressionProperties || !f.expressionProperties.hasOwnProperty('templateOptions.disabled');
              }).forEach(
              /**
              * @param {?} f
              * @return {?}
              */
              function (f) {
                return _this27.setDisabledState(f, value);
              });
            }

            if (field.key && field.templateOptions.disabled !== value) {
              field.templateOptions.disabled = value;
            }
          }
          /**
           * @private
           * @param {?} field
           * @param {?} hide
           * @param {?} resetOnHide
           * @return {?}
           */

        }, {
          key: "toggleFormControl",
          value: function toggleFormControl(field, hide, resetOnHide) {
            var _this28 = this;

            if (field.formControl && field.key) {
              defineHiddenProp(field, '_hide', !!(hide || field.hide));
              /** @type {?} */

              var c = field.formControl;

              if (c['_fields'] && c['_fields'].length > 1) {
                updateValidity(c);
              }

              if (hide === true && (!c['_fields'] || c['_fields'].every(
              /**
              * @param {?} f
              * @return {?}
              */
              function (f) {
                return !!f._hide;
              }))) {
                unregisterControl(field, true);

                if (resetOnHide && field.resetOnHide) {
                  field.formControl.reset({
                    value: undefined,
                    disabled: field.formControl.disabled
                  });

                  if (field.fieldGroup) {
                    assignFieldValue(field, undefined);

                    if (field.formControl instanceof _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormArray"]) {
                      field.fieldGroup.length = 0;
                    }
                  }
                }
              } else if (hide === false) {
                if (field.resetOnHide && field.parent && !isUndefined(field.defaultValue) && isUndefined(getFieldValue(field))) {
                  assignFieldValue(field, field.defaultValue);
                }

                registerControl(field, undefined, true);

                if (field.resetOnHide && field.fieldArray && (field.fieldGroup || []).length !== (field.model || []).length) {
                  /** @type {?} */
                  field.options._buildForm(true);
                }
              }
            }

            if (field.fieldGroup) {
              field.fieldGroup.filter(
              /**
              * @param {?} f
              * @return {?}
              */
              function (f) {
                return !f.hideExpression;
              }).forEach(
              /**
              * @param {?} f
              * @return {?}
              */
              function (f) {
                return _this28.toggleFormControl(f, hide, resetOnHide);
              });
            }

            if (field.options.fieldChanges) {
              field.options.fieldChanges.next(
              /** @type {?} */
              {
                field: field,
                type: 'hidden',
                value: hide
              });
            }
          }
          /**
           * @private
           * @param {?} field
           * @param {?} prop
           * @param {?} value
           * @return {?}
           */

        }, {
          key: "setExprValue",
          value: function setExprValue(field, prop, value) {
            try {
              /** @type {?} */
              var target = field;
              /** @type {?} */

              var paths = prop.indexOf('[') === -1 ? prop.split('.') : prop.replace(/\'|\"/g, '').split(/[[\]]{1,2}/) // https://stackoverflow.com/a/20198206
              .filter(
              /**
              * @param {?} v
              * @return {?}
              */
              function (v) {
                return v;
              });
              /** @type {?} */

              var lastIndex = paths.length - 1;

              for (var i = 0; i < lastIndex; i++) {
                target = target[paths[i]];
              }

              target[paths[lastIndex]] = value;
            } catch (error) {
              error.message = "[Formly Error] [Expression \"".concat(prop, "\"] ").concat(error.message);
              throw error;
            }

            if (prop === 'templateOptions.disabled' && field.key) {
              this.setDisabledState(field, value);
            }

            if (prop.indexOf('model.') === 0) {
              /** @type {?} */
              var path = prop.replace(/^model\./, '');
              /** @type {?} */

              var control = field.key && prop === path ? field.formControl : field.parent.formControl.get(path);

              if (control && !(isNullOrUndefined(control.value) && isNullOrUndefined(value)) && control.value !== value) {
                control.patchValue(value);
              }
            }

            this.emitExpressionChanges(field, prop, value);
          }
          /**
           * @private
           * @param {?} field
           * @param {?} property
           * @param {?} value
           * @return {?}
           */

        }, {
          key: "emitExpressionChanges",
          value: function emitExpressionChanges(field, property, value) {
            if (!field.options.fieldChanges) {
              return;
            }

            field.options.fieldChanges.next({
              field: field,
              type: 'expressionChanges',
              property: property,
              value: value
            });
          }
        }]);

        return FieldExpressionExtension;
      }();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * \@experimental
       */


      var FieldValidationExtension = /*#__PURE__*/function () {
        /**
         * @param {?} formlyConfig
         */
        function FieldValidationExtension(formlyConfig) {
          _classCallCheck(this, FieldValidationExtension);

          this.formlyConfig = formlyConfig;
        }
        /**
         * @param {?} field
         * @return {?}
         */


        _createClass(FieldValidationExtension, [{
          key: "onPopulate",
          value: function onPopulate(field) {
            this.initFieldValidation(field, 'validators');
            this.initFieldValidation(field, 'asyncValidators');
          }
          /**
           * @private
           * @param {?} field
           * @param {?} type
           * @return {?}
           */

        }, {
          key: "initFieldValidation",
          value: function initFieldValidation(field, type) {
            var _this29 = this;

            /** @type {?} */
            var validators = [];

            if (type === 'validators' && !(field.hasOwnProperty('fieldGroup') && !field.key)) {
              validators.push(this.getPredefinedFieldValidation(field));
            }

            if (field[type]) {
              for (var validatorName in field[type]) {
                if (validatorName === 'validation' && !Array.isArray(field[type].validation)) {
                  field[type].validation = [field[type].validation];
                  console.warn("NgxFormly(".concat(field.key, "): passing a non array value to the 'validation' is deprecated, pass an array instead"));
                }

                validatorName === 'validation' ? validators.push.apply(validators, _toConsumableArray(field[type].validation.map(
                /**
                * @param {?} v
                * @return {?}
                */
                function (v) {
                  return _this29.wrapNgValidatorFn(field, v);
                }))) : validators.push(this.wrapNgValidatorFn(field, field[type][validatorName], validatorName));
              }
            }

            defineHiddenProp(field, '_' + type, validators);
          }
          /**
           * @private
           * @param {?} field
           * @return {?}
           */

        }, {
          key: "getPredefinedFieldValidation",
          value: function getPredefinedFieldValidation(field) {
            /** @type {?} */
            var VALIDATORS = [];
            FORMLY_VALIDATORS.forEach(
            /**
            * @param {?} opt
            * @return {?}
            */
            function (opt) {
              return wrapProperty(field.templateOptions, opt,
              /**
              * @param {?} __0
              * @return {?}
              */
              function (_ref15) {
                var currentValue = _ref15.currentValue,
                    firstChange = _ref15.firstChange;
                VALIDATORS = VALIDATORS.filter(
                /**
                * @param {?} o
                * @return {?}
                */
                function (o) {
                  return o !== opt;
                });

                if (currentValue != null && currentValue !== false) {
                  VALIDATORS.push(opt);
                }

                if (!firstChange && field.formControl) {
                  updateValidity(field.formControl);
                }
              });
            });
            return (
              /**
              * @param {?} control
              * @return {?}
              */
              function (control) {
                if (VALIDATORS.length === 0) {
                  return null;
                }

                return _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].compose(VALIDATORS.map(
                /**
                * @param {?} opt
                * @return {?}
                */
                function (opt) {
                  return (
                    /**
                    * @return {?}
                    */
                    function () {
                      /** @type {?} */
                      var value = field.templateOptions[opt];

                      switch (opt) {
                        case 'required':
                          return _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].required(control);

                        case 'pattern':
                          return _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].pattern(value)(control);

                        case 'minLength':
                          return _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].minLength(value)(control);

                        case 'maxLength':
                          return _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].maxLength(value)(control);

                        case 'min':
                          return _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].min(value)(control);

                        case 'max':
                          return _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].max(value)(control);
                      }
                    }
                  );
                }))(control);
              }
            );
          }
          /**
           * @private
           * @param {?} field
           * @param {?} validator
           * @param {?=} validatorName
           * @return {?}
           */

        }, {
          key: "wrapNgValidatorFn",
          value: function wrapNgValidatorFn(field, validator, validatorName) {
            var _this30 = this;

            /** @type {?} */
            var validatorOption = null;

            if (typeof validator === 'string') {
              validatorOption = clone(this.formlyConfig.getValidator(validator));
            }

            if (typeof validator === 'object' && validator.name) {
              validatorOption = clone(this.formlyConfig.getValidator(validator.name));

              if (validator.options) {
                validatorOption.options = validator.options;
              }
            }

            if (typeof validator === 'object' && validator.expression) {
              var expression = validator.expression,
                  options = Object(tslib__WEBPACK_IMPORTED_MODULE_3__["__rest"])(validator, ["expression"]);
              validatorOption = {
                name: validatorName,
                validation: expression,
                options: Object.keys(options).length > 0 ? options : null
              };
            }

            if (typeof validator === 'function') {
              validatorOption = {
                name: validatorName,
                validation: validator
              };
            }

            return (
              /**
              * @param {?} control
              * @return {?}
              */
              function (control) {
                /** @type {?} */
                var errors = validatorOption.validation(control, field, validatorOption.options);

                if (isPromise(errors)) {
                  return errors.then(
                  /**
                  * @param {?} v
                  * @return {?}
                  */
                  function (v) {
                    return _this30.handleAsyncResult(field, validatorName ? !!v : v, validatorOption);
                  });
                }

                if (Object(rxjs__WEBPACK_IMPORTED_MODULE_6__["isObservable"])(errors)) {
                  return errors.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["map"])(
                  /**
                  * @param {?} v
                  * @return {?}
                  */
                  function (v) {
                    return _this30.handleAsyncResult(field, validatorName ? !!v : v, validatorOption);
                  }));
                }

                return _this30.handleResult(field, validatorName ? !!errors : errors, validatorOption);
              }
            );
          }
          /**
           * @private
           * @param {?} field
           * @param {?} errors
           * @param {?} options
           * @return {?}
           */

        }, {
          key: "handleAsyncResult",
          value: function handleAsyncResult(field, errors, options) {
            // workaround for https://github.com/angular/angular/issues/13200
            if (field.options && field.options._markForCheck) {
              field.options._markForCheck(field);
            }

            return this.handleResult(field, errors, options);
          }
          /**
           * @private
           * @param {?} field
           * @param {?} errors
           * @param {?} __2
           * @return {?}
           */

        }, {
          key: "handleResult",
          value: function handleResult(field, errors, _ref16) {
            var name = _ref16.name,
                options = _ref16.options;

            if (typeof errors === 'boolean') {
              errors = errors ? null : _defineProperty({}, name, options ? options : true);
            }
            /** @type {?} */


            var ctrl = field.formControl;
            ctrl['_childrenErrors'] && ctrl['_childrenErrors'][name] && ctrl['_childrenErrors'][name]();

            if (isObject(errors)) {
              Object.keys(errors).forEach(
              /**
              * @param {?} name
              * @return {?}
              */
              function (name) {
                /** @type {?} */
                var errorPath = errors[name].errorPath ? errors[name].errorPath : (options || {}).errorPath;
                /** @type {?} */

                var childCtrl = errorPath ? field.formControl.get(errorPath) : null;

                if (childCtrl) {
                  var _a = errors[name],
                      opts = Object(tslib__WEBPACK_IMPORTED_MODULE_3__["__rest"])(_a, ["errorPath"]);
                  childCtrl.setErrors(Object.assign({}, childCtrl.errors || {}, _defineProperty({}, name, opts)));
                  !ctrl['_childrenErrors'] && defineHiddenProp(ctrl, '_childrenErrors', {});

                  ctrl['_childrenErrors'][name] =
                  /**
                  * @return {?}
                  */
                  function () {
                    var _a = childCtrl.errors || {},
                        _b = name,
                        toDelete = _a[_b],
                        childErrors = Object(tslib__WEBPACK_IMPORTED_MODULE_3__["__rest"])(_a, [typeof _b === "symbol" ? _b : _b + ""]);

                    childCtrl.setErrors(Object.keys(childErrors).length === 0 ? null : childErrors);
                  };
                }
              });
            }

            return errors;
          }
        }]);

        return FieldValidationExtension;
      }();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * \@experimental
       */


      var FieldFormExtension = /*#__PURE__*/function () {
        /**
         * @param {?} config
         */
        function FieldFormExtension(config) {
          _classCallCheck(this, FieldFormExtension);

          this.config = config;
        }
        /**
         * @param {?} field
         * @return {?}
         */


        _createClass(FieldFormExtension, [{
          key: "onPopulate",
          value: function onPopulate(field) {
            if (!field.parent) {
              return;
            }

            if (field.fieldGroup && !field.key) {
              defineHiddenProp(field, 'formControl', field.parent.formControl);
            } else {
              this.addFormControl(field);
            }
          }
          /**
           * @param {?} field
           * @return {?}
           */

        }, {
          key: "postPopulate",
          value: function postPopulate(field) {
            if (field.parent) {
              return;
            }
            /** @type {?} */


            var fieldsToUpdate = this.setValidators(field);

            if (fieldsToUpdate.length === 0) {
              return;
            }

            if (fieldsToUpdate.length === 1) {
              /** @type {?} */
              var control = fieldsToUpdate[0].formControl;

              while (control) {
                /** @type {?} */
                control._updateTreeValidity({
                  onlySelf: true
                });

                control = control.parent;
              }
            } else {
              /** @type {?} */
              field.formControl._updateTreeValidity();
            }
          }
          /**
           * @private
           * @param {?} field
           * @return {?}
           */

        }, {
          key: "addFormControl",
          value: function addFormControl(field) {
            /** @type {?} */
            var control = findControl(field);

            if (!control) {
              /** @type {?} */
              var controlOptions = {
                updateOn: field.modelOptions.updateOn
              };
              /** @type {?} */

              var value = field.key ? getFieldValue(field) : field.defaultValue;
              /** @type {?} */

              var ref = this.config ? this.config.resolveFieldTypeRef(field) : null;

              if (ref && ref.componentType && ref.componentType['createControl']) {
                /** @type {?} */
                var component = ref.componentType;
                console.warn("NgxFormly: '".concat(component.name, "::createControl' is deprecated since v5.0, use 'prePopulate' hook instead."));
                control = component['createControl'](value, field);
              } else if (field.fieldGroup) {
                // TODO: move to postPopulate
                control = new _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormGroup"]({}, controlOptions);
              } else {
                control = new _angular_forms__WEBPACK_IMPORTED_MODULE_5__["FormControl"](value, controlOptions);
              }
            }

            registerControl(field, control);
          }
          /**
           * @private
           * @param {?} field
           * @return {?}
           */

        }, {
          key: "setValidators",
          value: function setValidators(field) {
            var _this31 = this;

            /** @type {?} */
            var updateValidity$$1 = false;

            if (field.key || !field.parent || !field.key && !field.fieldGroup) {
              var c = field.formControl;
              /** @type {?} */

              var disabled = field.templateOptions ? field.templateOptions.disabled : false;

              if (field.key && c) {
                if (disabled && c.enabled) {
                  c.disable({
                    emitEvent: false,
                    onlySelf: true
                  });

                  if (!c.parent) {
                    updateValidity(c);
                  } else {
                    updateValidity$$1 = true;
                  }
                }

                if (!disabled && c.disabled) {
                  c.enable({
                    emitEvent: false,
                    onlySelf: true
                  });

                  if (!c.parent) {
                    updateValidity(c);
                  } else {
                    updateValidity$$1 = true;
                  }
                }
              }

              if (c && (null === c.validator || null === c.asyncValidator)) {
                c.setValidators(
                /**
                * @return {?}
                */
                function () {
                  /** @type {?} */
                  var v = _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].compose(_this31.mergeValidators(field, '_validators'));

                  return v ? v(c) : null;
                });
                c.setAsyncValidators(
                /**
                * @return {?}
                */
                function () {
                  /** @type {?} */
                  var v = _angular_forms__WEBPACK_IMPORTED_MODULE_5__["Validators"].composeAsync(_this31.mergeValidators(field, '_asyncValidators'));

                  return v ? v(c) : Object(rxjs__WEBPACK_IMPORTED_MODULE_6__["of"])(null);
                });

                if (!c.parent) {
                  updateValidity(c);
                } else {
                  updateValidity$$1 = true;
                }
              }
            }
            /** @type {?} */


            var fieldsToUpdate = updateValidity$$1 ? [field] : [];
            (field.fieldGroup || []).forEach(
            /**
            * @param {?} f
            * @return {?}
            */
            function (f) {
              /** @type {?} */
              var childrenToUpdate = _this31.setValidators(f);

              if (!updateValidity$$1) {
                fieldsToUpdate.push.apply(fieldsToUpdate, _toConsumableArray(childrenToUpdate));
              }
            });
            return fieldsToUpdate;
          }
          /**
           * @private
           * @template T
           * @param {?} field
           * @param {?} type
           * @return {?}
           */

        }, {
          key: "mergeValidators",
          value: function mergeValidators(field, type) {
            var _this32 = this;

            /** @type {?} */
            var validators = [];
            /** @type {?} */

            var c = field.formControl;

            if (c && c['_fields'] && c['_fields'].length > 1) {
              c['_fields'].filter(
              /**
              * @param {?} f
              * @return {?}
              */
              function (f) {
                return !f._hide;
              }).forEach(
              /**
              * @param {?} f
              * @return {?}
              */
              function (f) {
                return validators.push.apply(validators, _toConsumableArray(f[type]));
              });
            } else if (field[type]) {
              validators.push.apply(validators, _toConsumableArray(field[type]));
            }

            if (field.fieldGroup) {
              field.fieldGroup.filter(
              /**
              * @param {?} f
              * @return {?}
              */
              function (f) {
                return !f.key && f.fieldGroup;
              }).forEach(
              /**
              * @param {?} f
              * @return {?}
              */
              function (f) {
                return validators.push.apply(validators, _toConsumableArray(_this32.mergeValidators(f, type)));
              });
            }

            return validators;
          }
        }]);

        return FieldFormExtension;
      }();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * \@experimental
       */


      var CoreExtension = /*#__PURE__*/function () {
        /**
         * @param {?} formlyConfig
         */
        function CoreExtension(formlyConfig) {
          _classCallCheck(this, CoreExtension);

          this.formlyConfig = formlyConfig;
          this.formId = 0;
        }
        /**
         * @param {?} field
         * @return {?}
         */


        _createClass(CoreExtension, [{
          key: "prePopulate",
          value: function prePopulate(field) {
            this.getFieldComponentInstance(field).prePopulate();

            if (field.parent) {
              return;
            }
            /** @type {?} */


            var fieldTransforms = field.options && field.options.fieldTransform || this.formlyConfig.extras.fieldTransform;
            (Array.isArray(fieldTransforms) ? fieldTransforms : [fieldTransforms]).forEach(
            /**
            * @param {?} fieldTransform
            * @return {?}
            */
            function (fieldTransform) {
              if (fieldTransform) {
                console.warn("NgxFormly: fieldTransform is deprecated since v5.0, use custom extension instead.");
                /** @type {?} */

                var fieldGroup = fieldTransform(field.fieldGroup, field.model,
                /** @type {?} */
                field.formControl, field.options);

                if (!fieldGroup) {
                  throw new Error('fieldTransform must return an array of fields');
                }
              }
            });
          }
          /**
           * @param {?} field
           * @return {?}
           */

        }, {
          key: "onPopulate",
          value: function onPopulate(field) {
            var _this33 = this;

            this.initFieldOptions(field);
            this.getFieldComponentInstance(field).onPopulate();

            if (field.fieldGroup) {
              field.fieldGroup.forEach(
              /**
              * @param {?} f
              * @param {?} index
              * @return {?}
              */
              function (f, index) {
                Object.defineProperty(f, 'parent', {
                  get:
                  /**
                  * @return {?}
                  */
                  function get() {
                    return field;
                  },
                  configurable: true
                });
                Object.defineProperty(f, 'index', {
                  get:
                  /**
                  * @return {?}
                  */
                  function get() {
                    return index;
                  },
                  configurable: true
                });
                _this33.formId++;
              });
            }
          }
          /**
           * @param {?} field
           * @return {?}
           */

        }, {
          key: "postPopulate",
          value: function postPopulate(field) {
            this.getFieldComponentInstance(field).postPopulate();
          }
          /**
           * @private
           * @param {?} field
           * @return {?}
           */

        }, {
          key: "initFieldOptions",
          value: function initFieldOptions(field) {
            /** @type {?} */
            var root =
            /** @type {?} */
            field.parent;

            if (!root) {
              return;
            }

            Object.defineProperty(field, 'form', {
              get:
              /**
              * @return {?}
              */
              function get() {
                return root.formControl;
              },
              configurable: true
            });
            Object.defineProperty(field, 'options', {
              get:
              /**
              * @return {?}
              */
              function get() {
                return root.options;
              },
              configurable: true
            });
            Object.defineProperty(field, 'model', {
              get:
              /**
              * @return {?}
              */
              function get() {
                return field.key && field.fieldGroup ? getFieldValue(field) : root.model;
              },
              configurable: true
            });
            reverseDeepMerge(field, {
              id: getFieldId("formly_".concat(this.formId), field, field['index']),
              hooks: {},
              modelOptions: {},
              templateOptions: !field.type || !field.key ? {} : {
                label: '',
                placeholder: '',
                focus: false,
                disabled: false
              }
            });

            if (this.formlyConfig.extras.resetFieldOnHide && field.resetOnHide !== false) {
              field.resetOnHide = true;
            }

            if (field.lifecycle) {
              console.warn("NgxFormly: 'lifecycle' is deprecated since v5.0, use 'hooks' instead.");
            }

            if (field.type !== 'formly-template' && (field.template || field.expressionProperties && field.expressionProperties.template)) {
              if (field.type) {
                console.warn("NgxFormly: passing 'type' property is not allowed when 'template' is set.");
              }

              field.type = 'formly-template';
            }

            if (!field.type && field.fieldGroup) {
              field.type = 'formly-group';
            }

            if (field.type) {
              this.formlyConfig.getMergedField(field);
            }

            if (field.parent) {
              /** @type {?} */
              var setDefaultValue = !isUndefined(field.key) && !isUndefined(field.defaultValue) && isUndefined(getFieldValue(field)) && (!field.resetOnHide || !(field.hide || field.hideExpression));

              if (setDefaultValue && field.resetOnHide) {
                /** @type {?} */
                var parent = field.parent;

                while (parent && !parent.hideExpression && !parent.hide) {
                  parent = parent.parent;
                }

                setDefaultValue = !parent || !(parent.hideExpression || parent.hide);
              }

              if (setDefaultValue) {
                assignFieldValue(field, field.defaultValue);
              }
            }

            this.initFieldWrappers(field);
          }
          /**
           * @private
           * @param {?} field
           * @return {?}
           */

        }, {
          key: "initFieldWrappers",
          value: function initFieldWrappers(field) {
            field.wrappers = field.wrappers || [];
            /** @type {?} */

            var fieldTemplateManipulators = Object.assign({
              preWrapper: [],
              postWrapper: []
            }, field.templateOptions.templateManipulators || {});
            field.wrappers = [].concat(_toConsumableArray(this.formlyConfig.templateManipulators.preWrapper.map(
            /**
            * @param {?} m
            * @return {?}
            */
            function (m) {
              return m(field);
            })), _toConsumableArray(fieldTemplateManipulators.preWrapper.map(
            /**
            * @param {?} m
            * @return {?}
            */
            function (m) {
              return m(field);
            })), _toConsumableArray(field.wrappers), _toConsumableArray(this.formlyConfig.templateManipulators.postWrapper.map(
            /**
            * @param {?} m
            * @return {?}
            */
            function (m) {
              return m(field);
            })), _toConsumableArray(fieldTemplateManipulators.postWrapper.map(
            /**
            * @param {?} m
            * @return {?}
            */
            function (m) {
              return m(field);
            }))).filter(
            /**
            * @param {?} el
            * @param {?} i
            * @param {?} a
            * @return {?}
            */
            function (el, i, a) {
              return el && i === a.indexOf(el);
            });
          }
          /**
           * @private
           * @param {?} field
           * @return {?}
           */

        }, {
          key: "getFieldComponentInstance",
          value: function getFieldComponentInstance(field) {
            /** @type {?} */
            var componentRef = this.formlyConfig.resolveFieldTypeRef(field);
            /** @type {?} */

            var instance = componentRef ?
            /** @type {?} */
            componentRef.instance : {};
            return {
              prePopulate:
              /**
              * @return {?}
              */
              function prePopulate() {
                return instance.prePopulate && instance.prePopulate(field);
              },
              onPopulate:
              /**
              * @return {?}
              */
              function onPopulate() {
                return instance.onPopulate && instance.onPopulate(field);
              },
              postPopulate:
              /**
              * @return {?}
              */
              function postPopulate() {
                return instance.postPopulate && instance.postPopulate(field);
              }
            };
          }
        }]);

        return CoreExtension;
      }();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * @param {?} formlyConfig
       * @return {?}
       */


      function defaultFormlyConfig(formlyConfig) {
        return {
          types: [{
            name: 'formly-group',
            component: FormlyGroup
          }, {
            name: 'formly-template',
            component: FormlyTemplateType
          }],
          extensions: [{
            name: 'core',
            extension: new CoreExtension(formlyConfig)
          }, {
            name: 'field-validation',
            extension: new FieldValidationExtension(formlyConfig)
          }, {
            name: 'field-form',
            extension: new FieldFormExtension(formlyConfig)
          }, {
            name: 'field-expression',
            extension: new FieldExpressionExtension()
          }]
        };
      }

      var FormlyModule = /*#__PURE__*/function () {
        /**
         * @param {?} configService
         * @param {?=} configs
         */
        function FormlyModule(configService) {
          var configs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];

          _classCallCheck(this, FormlyModule);

          if (!configs) {
            return;
          }

          configs.forEach(
          /**
          * @param {?} config
          * @return {?}
          */
          function (config) {
            return configService.addConfig(config);
          });
        }
        /**
         * @param {?=} config
         * @return {?}
         */


        _createClass(FormlyModule, null, [{
          key: "forRoot",
          value: function forRoot() {
            var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
            return {
              ngModule: FormlyModule,
              providers: [{
                provide: FORMLY_CONFIG,
                multi: true,
                useFactory: defaultFormlyConfig,
                deps: [FormlyConfig]
              }, {
                provide: FORMLY_CONFIG,
                useValue: config,
                multi: true
              }, {
                provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ANALYZE_FOR_ENTRY_COMPONENTS"],
                useValue: config,
                multi: true
              }, FormlyConfig, FormlyFormBuilder]
            };
          }
          /**
           * @param {?=} config
           * @return {?}
           */

        }, {
          key: "forChild",
          value: function forChild() {
            var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
            return {
              ngModule: FormlyModule,
              providers: [{
                provide: FORMLY_CONFIG,
                multi: true,
                useFactory: defaultFormlyConfig,
                deps: [FormlyConfig]
              }, {
                provide: FORMLY_CONFIG,
                useValue: config,
                multi: true
              }, {
                provide: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ANALYZE_FOR_ENTRY_COMPONENTS"],
                useValue: config,
                multi: true
              }, FormlyFormBuilder]
            };
          }
        }]);

        return FormlyModule;
      }();

      FormlyModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineNgModule"]({
        type: FormlyModule
      });
      FormlyModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjector"]({
        factory: function FormlyModule_Factory(t) {
          return new (t || FormlyModule)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](FormlyConfig), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](FORMLY_CONFIG, 8));
        },
        imports: [[_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"]]]
      });
      /** @nocollapse */

      FormlyModule.ctorParameters = function () {
        return [{
          type: FormlyConfig
        }, {
          type: Array,
          decorators: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
          }, {
            type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
            args: [FORMLY_CONFIG]
          }]
        }];
      };

      (function () {
        (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵsetNgModuleScope"](FormlyModule, {
          declarations: function declarations() {
            return [FormlyForm, FormlyField, FormlyAttributes, FormlyGroup, FormlyValidationMessage, FormlyTemplateType, FieldArrayType];
          },
          imports: function imports() {
            return [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"]];
          },
          exports: function exports() {
            return [FormlyForm, FormlyField, FormlyAttributes, FormlyGroup, FormlyValidationMessage];
          }
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵsetClassMetadata"](FormlyModule, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"],
          args: [{
            declarations: [FormlyForm, FormlyField, FormlyAttributes, FormlyGroup, FormlyValidationMessage, FormlyTemplateType,
            /** @type {?} */
            FieldArrayType],
            entryComponents: [FormlyGroup, FormlyTemplateType],
            exports: [FormlyForm, FormlyField, FormlyAttributes, FormlyGroup, FormlyValidationMessage],
            imports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"]]
          }]
        }], function () {
          return [{
            type: FormlyConfig
          }, {
            type: Array,
            decorators: [{
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Optional"]
            }, {
              type: _angular_core__WEBPACK_IMPORTED_MODULE_1__["Inject"],
              args: [FORMLY_CONFIG]
            }]
          }];
        }, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */
      //# sourceMappingURL=ngx-formly-core.js.map

      /***/

    },

    /***/
    "8mWu":
    /*!**********************************************************************************!*\
      !*** ./node_modules/@ngx-formly/ionic/__ivy_ngcc__/fesm2015/ngx-formly-ionic.js ***!
      \**********************************************************************************/

    /*! exports provided: FormlyIonicModule, FormlyFieldInput, FormlyFieldCheckbox, FormlyFieldDatetime, FormlyFieldRadio, FormlyFieldToggle, FormlyFieldSelect, FormlyFieldRange, FormlyFieldTextArea, FormlyWrapperFormField, ɵc, ɵa, ɵb */

    /***/
    function mWu(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormlyIonicModule", function () {
        return FormlyIonicModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormlyFieldInput", function () {
        return FormlyFieldInput;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormlyFieldCheckbox", function () {
        return FormlyFieldCheckbox;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormlyFieldDatetime", function () {
        return FormlyFieldDatetime;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormlyFieldRadio", function () {
        return FormlyFieldRadio;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormlyFieldToggle", function () {
        return FormlyFieldToggle;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormlyFieldSelect", function () {
        return FormlyFieldSelect;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormlyFieldRange", function () {
        return FormlyFieldRange;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormlyFieldTextArea", function () {
        return FormlyFieldTextArea;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormlyWrapperFormField", function () {
        return FormlyWrapperFormField;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵc", function () {
        return IonFormlyAttributes;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵa", function () {
        return FIELD_TYPE_COMPONENTS;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵb", function () {
        return IONIC_FORMLY_CONFIG;
      });
      /* harmony import */


      var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @angular/common */
      "ofXK");
      /* harmony import */


      var _angular_forms__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! @angular/forms */
      "3Pt+");
      /* harmony import */


      var _ionic_angular__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! @ionic/angular */
      "TEn/");
      /* harmony import */


      var _ngx_formly_core_select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
      /*! @ngx-formly/core/select */
      "oKox");
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var _ngx_formly_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
      /*! @ngx-formly/core */
      "0FS3");
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      function FormlyFieldInput_ion_input_0_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](0, "ion-input", 2);
        }

        if (rf & 2) {
          var ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("type", ctx_r0.to.type || "text")("formControl", ctx_r0.formControl)("ionFormlyAttributes", ctx_r0.field);
        }
      }

      function FormlyFieldInput_ng_template_1_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](0, "ion-input", 3);
        }

        if (rf & 2) {
          var ctx_r2 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("formControl", ctx_r2.formControl)("ionFormlyAttributes", ctx_r2.field);
        }
      }

      function FormlyFieldRadio_ion_item_4_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "ion-item", 3);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](1, "ion-label");

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](3, "ion-radio", 4);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
        }

        if (rf & 2) {
          var option_r2 = ctx.$implicit;

          var ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("disabled", option_r2.disabled || ctx_r0.formControl.disabled);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate"](option_r2.label);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](1);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("value", option_r2.value);
        }
      }

      function FormlyFieldRadio_ion_item_7_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "ion-item", 5);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](1, "ion-label");

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](2, "ion-text", 6);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "p");

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](4, "formly-validation-message", 7);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
        }

        if (rf & 2) {
          var ctx_r1 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](4);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("field", ctx_r1.field);
        }
      }

      function FormlyFieldSelect_ng_container_0_ion_select_option_2_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "ion-select-option", 3);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](1);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
        }

        if (rf & 2) {
          var option_r3 = ctx.$implicit;

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("value", option_r3.value)("disabled", option_r3.disabled);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](1);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate1"](" ", option_r3.label, " ");
        }
      }

      function FormlyFieldSelect_ng_container_0_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementContainerStart"](0);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](1, "ion-select", 1);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](2, FormlyFieldSelect_ng_container_0_ion_select_option_2_Template, 2, 3, "ion-select-option", 2);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementContainerEnd"]();
        }

        if (rf & 2) {
          var selectOptions_r1 = ctx.$implicit;

          var ctx_r0 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](1);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵstyleProp"]("align-self", ctx_r0.to.labelPosition === "floating" ? "stretch" : "")("max-width", ctx_r0.to.labelPosition === "floating" ? 100 : "", "%");

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("formControl", ctx_r0.formControl)("compareWith", ctx_r0.to.compareWith)("ionFormlyAttributes", ctx_r0.field)("multiple", ctx_r0.to.multiple)("interface", ctx_r0.to["interface"])("okText", ctx_r0.to.okText)("cancelText", ctx_r0.to.cancelText);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](1);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngForOf", selectOptions_r1);
        }
      }

      function FormlyWrapperFormField_span_3_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "span", 5);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](1, "*");

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
        }
      }

      function FormlyWrapperFormField_ng_template_4_Template(rf, ctx) {}

      function FormlyWrapperFormField_ion_item_6_Template(rf, ctx) {
        if (rf & 1) {
          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "ion-item", 6);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](1, "ion-label");

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](2, "ion-text", 7);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "p");

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](4, "formly-validation-message", 8);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
        }

        if (rf & 2) {
          var ctx_r3 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵnextContext"]();

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](4);

          _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("field", ctx_r3.field);
        }
      }

      var FormlyFieldInput = /*#__PURE__*/function (_ngx_formly_core__WEB) {
        _inherits(FormlyFieldInput, _ngx_formly_core__WEB);

        var _super6 = _createSuper(FormlyFieldInput);

        function FormlyFieldInput() {
          _classCallCheck(this, FormlyFieldInput);

          return _super6.apply(this, arguments);
        }

        return FormlyFieldInput;
      }(_ngx_formly_core__WEBPACK_IMPORTED_MODULE_5__["FieldType"]);

      FormlyFieldInput.ɵfac = function FormlyFieldInput_Factory(t) {
        return ɵFormlyFieldInput_BaseFactory(t || FormlyFieldInput);
      };

      FormlyFieldInput.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineComponent"]({
        type: FormlyFieldInput,
        selectors: [["formly-field-ion-input"]],
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInheritDefinitionFeature"]],
        decls: 3,
        vars: 2,
        consts: [[3, "type", "formControl", "ionFormlyAttributes", 4, "ngIf", "ngIfElse"], ["numberTmp", ""], [3, "type", "formControl", "ionFormlyAttributes"], ["type", "number", 3, "formControl", "ionFormlyAttributes"]],
        template: function FormlyFieldInput_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](0, FormlyFieldInput_ion_input_0_Template, 1, 3, "ion-input", 0);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](1, FormlyFieldInput_ng_template_1_Template, 1, 2, "ng-template", null, 1, _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplateRefExtractor"]);
          }

          if (rf & 2) {
            var _r1 = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵreference"](2);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngIf", ctx.to.type !== "number")("ngIfElse", _r1);
          }
        },
        directives: function directives() {
          return [_angular_common__WEBPACK_IMPORTED_MODULE_0__["NgIf"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonInput"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["TextValueAccessor"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NgControlStatus"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["FormControlDirective"], IonFormlyAttributes, _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["NumericValueAccessor"]];
        },
        styles: ["[_nghost-%COMP%] { display: inherit; }"]
      });

      var ɵFormlyFieldInput_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵgetInheritedFactory"](FormlyFieldInput);
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](FormlyFieldInput, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"],
          args: [{
            selector: 'formly-field-ion-input',
            template: "\n    <ion-input *ngIf=\"to.type !== 'number' else numberTmp\" [type]=\"to.type || 'text'\" [formControl]=\"formControl\" [ionFormlyAttributes]=\"field\"></ion-input>\n    <ng-template #numberTmp>\n      <ion-input type=\"number\" [formControl]=\"formControl\" [ionFormlyAttributes]=\"field\"></ion-input>\n    </ng-template>\n  ",
            styles: [':host { display: inherit; }']
          }]
        }], null, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      var FormlyFieldCheckbox = /*#__PURE__*/function (_ngx_formly_core__WEB2) {
        _inherits(FormlyFieldCheckbox, _ngx_formly_core__WEB2);

        var _super7 = _createSuper(FormlyFieldCheckbox);

        function FormlyFieldCheckbox() {
          _classCallCheck(this, FormlyFieldCheckbox);

          return _super7.apply(this, arguments);
        }

        return FormlyFieldCheckbox;
      }(_ngx_formly_core__WEBPACK_IMPORTED_MODULE_5__["FieldType"]);

      FormlyFieldCheckbox.ɵfac = function FormlyFieldCheckbox_Factory(t) {
        return ɵFormlyFieldCheckbox_BaseFactory(t || FormlyFieldCheckbox);
      };

      FormlyFieldCheckbox.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineComponent"]({
        type: FormlyFieldCheckbox,
        selectors: [["formly-field-ion-checkbox"]],
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInheritDefinitionFeature"]],
        decls: 1,
        vars: 2,
        consts: [[3, "formControl", "ionFormlyAttributes"]],
        template: function FormlyFieldCheckbox_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](0, "ion-checkbox", 0);
          }

          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("formControl", ctx.formControl)("ionFormlyAttributes", ctx.field);
          }
        },
        directives: function directives() {
          return [_ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonCheckbox"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["BooleanValueAccessor"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NgControlStatus"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["FormControlDirective"], IonFormlyAttributes];
        },
        encapsulation: 2
      });

      var ɵFormlyFieldCheckbox_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵgetInheritedFactory"](FormlyFieldCheckbox);
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](FormlyFieldCheckbox, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"],
          args: [{
            selector: 'formly-field-ion-checkbox',
            template: "\n    <ion-checkbox\n      [formControl]=\"formControl\"\n      [ionFormlyAttributes]=\"field\">\n    </ion-checkbox>\n  "
          }]
        }], null, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      var FormlyFieldDatetime = /*#__PURE__*/function (_ngx_formly_core__WEB3) {
        _inherits(FormlyFieldDatetime, _ngx_formly_core__WEB3);

        var _super8 = _createSuper(FormlyFieldDatetime);

        function FormlyFieldDatetime() {
          _classCallCheck(this, FormlyFieldDatetime);

          return _super8.apply(this, arguments);
        }

        return FormlyFieldDatetime;
      }(_ngx_formly_core__WEBPACK_IMPORTED_MODULE_5__["FieldType"]);

      FormlyFieldDatetime.ɵfac = function FormlyFieldDatetime_Factory(t) {
        return ɵFormlyFieldDatetime_BaseFactory(t || FormlyFieldDatetime);
      };

      FormlyFieldDatetime.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineComponent"]({
        type: FormlyFieldDatetime,
        selectors: [["formly-field-ion-datetime"]],
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInheritDefinitionFeature"]],
        decls: 1,
        vars: 18,
        consts: [[3, "cancelText", "dayNames", "dayShortNames", "dayValues", "displayFormat", "doneText", "hourValues", "minuteValues", "monthNames", "monthShortNames", "monthValues", "pickerFormat", "pickerOptions", "yearValues", "min", "max", "formControl", "ionFormlyAttributes"]],
        template: function FormlyFieldDatetime_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](0, "ion-datetime", 0);
          }

          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("cancelText", ctx.to.cancelText)("dayNames", ctx.to.dayNames)("dayShortNames", ctx.to.dayShortNames)("dayValues", ctx.to.dayValues)("displayFormat", ctx.to.displayFormat)("doneText", ctx.to.doneText)("hourValues", ctx.to.hourValues)("minuteValues", ctx.to.minuteValues)("monthNames", ctx.to.monthNames)("monthShortNames", ctx.to.monthShortNames)("monthValues", ctx.to.monthValues)("pickerFormat", ctx.to.pickerFormat)("pickerOptions", ctx.to.pickerOptions)("yearValues", ctx.to.yearValues)("min", ctx.to.minDate ? ctx.to.minDate : ctx.to.min)("max", ctx.to.maxDate ? ctx.to.maxDate : ctx.to.max)("formControl", ctx.formControl)("ionFormlyAttributes", ctx.field);
          }
        },
        directives: function directives() {
          return [_ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonDatetime"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["SelectValueAccessor"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NgControlStatus"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["FormControlDirective"], IonFormlyAttributes];
        },
        encapsulation: 2
      });

      var ɵFormlyFieldDatetime_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵgetInheritedFactory"](FormlyFieldDatetime);
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](FormlyFieldDatetime, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"],
          args: [{
            selector: 'formly-field-ion-datetime',
            template: "\n    <ion-datetime\n      [cancelText]=\"to.cancelText\"\n      [dayNames]=\"to.dayNames\"\n      [dayShortNames]=\"to.dayShortNames\"\n      [dayValues]=\"to.dayValues\"\n      [displayFormat]=\"to.displayFormat\"\n      [doneText]=\"to.doneText\"\n      [hourValues]=\"to.hourValues\"\n      [minuteValues]=\"to.minuteValues\"\n      [monthNames]=\"to.monthNames\"\n      [monthShortNames]=\"to.monthShortNames\"\n      [monthValues]=\"to.monthValues\"\n      [pickerFormat]=\"to.pickerFormat\"\n      [pickerOptions]=\"to.pickerOptions\"\n      [yearValues]=\"to.yearValues\"\n      [min]=\"to.minDate ? to.minDate : to.min\"\n      [max]=\"to.maxDate ? to.maxDate : to.max\"\n      [formControl]=\"formControl\"\n      [ionFormlyAttributes]=\"field\">\n    </ion-datetime>\n  "
          }]
        }], null, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      var FormlyFieldRadio = /*#__PURE__*/function (_ngx_formly_core__WEB4) {
        _inherits(FormlyFieldRadio, _ngx_formly_core__WEB4);

        var _super9 = _createSuper(FormlyFieldRadio);

        function FormlyFieldRadio() {
          var _this34;

          _classCallCheck(this, FormlyFieldRadio);

          _this34 = _super9.apply(this, arguments);
          _this34.defaultOptions = {
            templateOptions: {
              options: []
            }
          };
          return _this34;
        }

        return FormlyFieldRadio;
      }(_ngx_formly_core__WEBPACK_IMPORTED_MODULE_5__["FieldType"]);

      FormlyFieldRadio.ɵfac = function FormlyFieldRadio_Factory(t) {
        return ɵFormlyFieldRadio_BaseFactory(t || FormlyFieldRadio);
      };

      FormlyFieldRadio.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineComponent"]({
        type: FormlyFieldRadio,
        selectors: [["formly-field-ion-radio"]],
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInheritDefinitionFeature"]],
        decls: 8,
        vars: 10,
        consts: [[3, "formControl", "ionFormlyAttributes"], [3, "disabled", 4, "ngFor", "ngForOf"], ["lines", "none", 4, "ngIf"], [3, "disabled"], [3, "value"], ["lines", "none"], ["color", "danger"], [3, "field"]],
        template: function FormlyFieldRadio_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "ion-list");

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](1, "ion-radio-group", 0);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](2, "ion-list-header");

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](3);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](4, FormlyFieldRadio_ion_item_4_Template, 4, 3, "ion-item", 1);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](5, "async");

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](6, "formlySelectOptions");

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](7, FormlyFieldRadio_ion_item_7_Template, 5, 1, "ion-item", 2);
          }

          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](1);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("formControl", ctx.formControl)("ionFormlyAttributes", ctx.field);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate"](ctx.to.label);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](1);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngForOf", _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind1"](5, 5, _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind2"](6, 7, ctx.to.options, ctx.field)));

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](3);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngIf", ctx.showError);
          }
        },
        directives: function directives() {
          return [_ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonList"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonRadioGroup"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["SelectValueAccessor"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NgControlStatus"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["FormControlDirective"], IonFormlyAttributes, _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonListHeader"], _angular_common__WEBPACK_IMPORTED_MODULE_0__["NgForOf"], _angular_common__WEBPACK_IMPORTED_MODULE_0__["NgIf"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonItem"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonLabel"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonRadio"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["RadioValueAccessor"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonText"], _ngx_formly_core__WEBPACK_IMPORTED_MODULE_5__["ɵc"]];
        },
        pipes: function pipes() {
          return [_angular_common__WEBPACK_IMPORTED_MODULE_0__["AsyncPipe"], _ngx_formly_core_select__WEBPACK_IMPORTED_MODULE_3__["ɵa"]];
        },
        encapsulation: 2
      });

      var ɵFormlyFieldRadio_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵgetInheritedFactory"](FormlyFieldRadio);
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](FormlyFieldRadio, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"],
          args: [{
            selector: 'formly-field-ion-radio',
            template: "\n    <ion-list>\n      <ion-radio-group\n        [formControl]=\"formControl\"\n        [ionFormlyAttributes]=\"field\">\n        <ion-list-header>{{ to.label }}</ion-list-header>\n        <ion-item *ngFor=\"let option of to.options | formlySelectOptions:field | async\" [disabled]=\"option.disabled || formControl.disabled\">\n          <ion-label>{{ option.label }}</ion-label>\n          <ion-radio [value]=\"option.value\"></ion-radio>\n        </ion-item>\n      </ion-radio-group>\n    </ion-list>\n    <ion-item lines=\"none\" *ngIf=\"showError\">\n      <ion-label>\n        <ion-text color=\"danger\">\n          <p>\n            <formly-validation-message [field]=\"field\"></formly-validation-message>\n          </p>\n        </ion-text>\n      </ion-label>\n    </ion-item>\n  "
          }]
        }], null, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      var FormlyFieldToggle = /*#__PURE__*/function (_ngx_formly_core__WEB5) {
        _inherits(FormlyFieldToggle, _ngx_formly_core__WEB5);

        var _super10 = _createSuper(FormlyFieldToggle);

        function FormlyFieldToggle() {
          _classCallCheck(this, FormlyFieldToggle);

          return _super10.apply(this, arguments);
        }

        return FormlyFieldToggle;
      }(_ngx_formly_core__WEBPACK_IMPORTED_MODULE_5__["FieldType"]);

      FormlyFieldToggle.ɵfac = function FormlyFieldToggle_Factory(t) {
        return ɵFormlyFieldToggle_BaseFactory(t || FormlyFieldToggle);
      };

      FormlyFieldToggle.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineComponent"]({
        type: FormlyFieldToggle,
        selectors: [["formly-field-ion-toggle"]],
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInheritDefinitionFeature"]],
        decls: 1,
        vars: 2,
        consts: [[3, "formControl", "ionFormlyAttributes"]],
        template: function FormlyFieldToggle_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](0, "ion-toggle", 0);
          }

          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("formControl", ctx.formControl)("ionFormlyAttributes", ctx.field);
          }
        },
        directives: function directives() {
          return [_ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonToggle"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["BooleanValueAccessor"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NgControlStatus"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["FormControlDirective"], IonFormlyAttributes];
        },
        encapsulation: 2
      });

      var ɵFormlyFieldToggle_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵgetInheritedFactory"](FormlyFieldToggle);
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](FormlyFieldToggle, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"],
          args: [{
            selector: 'formly-field-ion-toggle',
            template: "\n    <ion-toggle\n      [formControl]=\"formControl\"\n      [ionFormlyAttributes]=\"field\">\n    </ion-toggle>\n  "
          }]
        }], null, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      var FormlyFieldSelect = /*#__PURE__*/function (_ngx_formly_core__WEB6) {
        _inherits(FormlyFieldSelect, _ngx_formly_core__WEB6);

        var _super11 = _createSuper(FormlyFieldSelect);

        function FormlyFieldSelect() {
          var _this35;

          _classCallCheck(this, FormlyFieldSelect);

          _this35 = _super11.apply(this, arguments);
          _this35.defaultOptions = {
            templateOptions: {
              options: [],

              /**
               * @param {?} o1
               * @param {?} o2
               * @return {?}
               */
              compareWith: function compareWith(o1, o2) {
                return o1 === o2;
              }
            }
          };
          return _this35;
        }

        return FormlyFieldSelect;
      }(_ngx_formly_core__WEBPACK_IMPORTED_MODULE_5__["FieldType"]);

      FormlyFieldSelect.ɵfac = function FormlyFieldSelect_Factory(t) {
        return ɵFormlyFieldSelect_BaseFactory(t || FormlyFieldSelect);
      };

      FormlyFieldSelect.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineComponent"]({
        type: FormlyFieldSelect,
        selectors: [["formly-field-ion-select"]],
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInheritDefinitionFeature"]],
        decls: 3,
        vars: 6,
        consts: [[4, "ngIf"], [3, "formControl", "compareWith", "ionFormlyAttributes", "multiple", "interface", "okText", "cancelText"], [3, "value", "disabled", 4, "ngFor", "ngForOf"], [3, "value", "disabled"]],
        template: function FormlyFieldSelect_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](0, FormlyFieldSelect_ng_container_0_Template, 3, 12, "ng-container", 0);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](1, "async");

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipe"](2, "formlySelectOptions");
          }

          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngIf", _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind1"](1, 1, _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵpipeBind2"](2, 3, ctx.to.options, ctx.field)));
          }
        },
        directives: function directives() {
          return [_angular_common__WEBPACK_IMPORTED_MODULE_0__["NgIf"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonSelect"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["SelectValueAccessor"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NgControlStatus"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["FormControlDirective"], IonFormlyAttributes, _angular_common__WEBPACK_IMPORTED_MODULE_0__["NgForOf"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonSelectOption"]];
        },
        pipes: function pipes() {
          return [_angular_common__WEBPACK_IMPORTED_MODULE_0__["AsyncPipe"], _ngx_formly_core_select__WEBPACK_IMPORTED_MODULE_3__["ɵa"]];
        },
        styles: ["[_nghost-%COMP%] { display: inherit; }"]
      });

      var ɵFormlyFieldSelect_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵgetInheritedFactory"](FormlyFieldSelect);
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](FormlyFieldSelect, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"],
          args: [{
            selector: 'formly-field-ion-select',
            template: "\n    <!-- ng-container used as a workaround for https://github.com/ionic-team/ionic/issues/19324 -->\n    <ng-container *ngIf=\"to.options | formlySelectOptions:field | async; let selectOptions\">\n      <ion-select\n        [style.align-self]=\"to.labelPosition === 'floating' ? 'stretch':''\"\n        [style.max-width.%]=\"to.labelPosition === 'floating' ? 100 : ''\"\n\n        [formControl]=\"formControl\"\n        [compareWith]=\"to.compareWith\"\n        [ionFormlyAttributes]=\"field\"\n        [multiple]=\"to.multiple\"\n        [interface]=\"to.interface\"\n        [okText]=\"to.okText\"\n        [cancelText]=\"to.cancelText\">\n        <ion-select-option *ngFor=\"let option of selectOptions\" [value]=\"option.value\" [disabled]=\"option.disabled\">\n            {{ option.label }}\n        </ion-select-option>\n      </ion-select>\n    </ng-container>\n  ",
            styles: [':host { display: inherit; }']
          }]
        }], null, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      var FormlyFieldRange = /*#__PURE__*/function (_ngx_formly_core__WEB7) {
        _inherits(FormlyFieldRange, _ngx_formly_core__WEB7);

        var _super12 = _createSuper(FormlyFieldRange);

        function FormlyFieldRange() {
          _classCallCheck(this, FormlyFieldRange);

          return _super12.apply(this, arguments);
        }

        return FormlyFieldRange;
      }(_ngx_formly_core__WEBPACK_IMPORTED_MODULE_5__["FieldType"]);

      FormlyFieldRange.ɵfac = function FormlyFieldRange_Factory(t) {
        return ɵFormlyFieldRange_BaseFactory(t || FormlyFieldRange);
      };

      FormlyFieldRange.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineComponent"]({
        type: FormlyFieldRange,
        selectors: [["formly-field-ion-range"]],
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInheritDefinitionFeature"]],
        decls: 5,
        vars: 6,
        consts: [[3, "min", "max", "formControl", "ionFormlyAttributes"], ["slot", "start"], ["slot", "end"]],
        template: function FormlyFieldRange_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "ion-range", 0);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](1, "ion-label", 1);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](3, "ion-label", 2);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](4);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();
          }

          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("min", ctx.to.min)("max", ctx.to.max)("formControl", ctx.formControl)("ionFormlyAttributes", ctx.field);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate"](ctx.to.min);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](2);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate"](ctx.to.max);
          }
        },
        directives: function directives() {
          return [_ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonRange"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["SelectValueAccessor"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NgControlStatus"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["FormControlDirective"], IonFormlyAttributes, _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonLabel"]];
        },
        styles: ["[_nghost-%COMP%] { display: inherit; }"]
      });

      var ɵFormlyFieldRange_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵgetInheritedFactory"](FormlyFieldRange);
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](FormlyFieldRange, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"],
          args: [{
            selector: 'formly-field-ion-range',
            template: "\n    <ion-range\n      [min]=\"to.min\"\n      [max]=\"to.max\"\n      [formControl]=\"formControl\"\n      [ionFormlyAttributes]=\"field\">\n      <ion-label slot=\"start\">{{ to.min }}</ion-label>\n      <ion-label slot=\"end\">{{ to.max }}</ion-label>\n    </ion-range>\n  ",
            styles: [':host { display: inherit; }']
          }]
        }], null, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      var FormlyFieldTextArea = /*#__PURE__*/function (_ngx_formly_core__WEB8) {
        _inherits(FormlyFieldTextArea, _ngx_formly_core__WEB8);

        var _super13 = _createSuper(FormlyFieldTextArea);

        function FormlyFieldTextArea() {
          _classCallCheck(this, FormlyFieldTextArea);

          return _super13.apply(this, arguments);
        }

        return FormlyFieldTextArea;
      }(_ngx_formly_core__WEBPACK_IMPORTED_MODULE_5__["FieldType"]);

      FormlyFieldTextArea.ɵfac = function FormlyFieldTextArea_Factory(t) {
        return ɵFormlyFieldTextArea_BaseFactory(t || FormlyFieldTextArea);
      };

      FormlyFieldTextArea.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineComponent"]({
        type: FormlyFieldTextArea,
        selectors: [["formly-field-ion-textarea"]],
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInheritDefinitionFeature"]],
        decls: 1,
        vars: 4,
        consts: [[3, "formControl", "ionFormlyAttributes", "cols", "rows"]],
        template: function FormlyFieldTextArea_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelement"](0, "ion-textarea", 0);
          }

          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("formControl", ctx.formControl)("ionFormlyAttributes", ctx.field)("cols", ctx.to.cols)("rows", ctx.to.rows);
          }
        },
        directives: function directives() {
          return [_ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonTextarea"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["TextValueAccessor"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["NgControlStatus"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["FormControlDirective"], IonFormlyAttributes];
        },
        styles: ["[_nghost-%COMP%] { display: inherit; }"]
      });

      var ɵFormlyFieldTextArea_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵgetInheritedFactory"](FormlyFieldTextArea);
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](FormlyFieldTextArea, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"],
          args: [{
            selector: 'formly-field-ion-textarea',
            template: "\n    <ion-textarea\n      [formControl]=\"formControl\"\n      [ionFormlyAttributes]=\"field\"\n      [cols]=\"to.cols\"\n      [rows]=\"to.rows\">\n    </ion-textarea>\n  ",
            styles: [':host { display: inherit; }']
          }]
        }], null, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      var FormlyWrapperFormField = /*#__PURE__*/function (_ngx_formly_core__WEB9) {
        _inherits(FormlyWrapperFormField, _ngx_formly_core__WEB9);

        var _super14 = _createSuper(FormlyWrapperFormField);

        function FormlyWrapperFormField() {
          _classCallCheck(this, FormlyWrapperFormField);

          return _super14.apply(this, arguments);
        }

        return FormlyWrapperFormField;
      }(_ngx_formly_core__WEBPACK_IMPORTED_MODULE_5__["FieldWrapper"]);

      FormlyWrapperFormField.ɵfac = function FormlyWrapperFormField_Factory(t) {
        return ɵFormlyWrapperFormField_BaseFactory(t || FormlyWrapperFormField);
      };

      FormlyWrapperFormField.ɵcmp = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineComponent"]({
        type: FormlyWrapperFormField,
        selectors: [["formly-wrapper-ion-form-field"]],
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInheritDefinitionFeature"]],
        decls: 7,
        vars: 5,
        consts: [[3, "lines"], [3, "position"], ["aria-hidden", "true", 4, "ngIf"], ["fieldComponent", ""], ["lines", "none", 4, "ngIf"], ["aria-hidden", "true"], ["lines", "none"], ["color", "danger"], [3, "field"]],
        template: function FormlyWrapperFormField_Template(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](0, "ion-item", 0);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementStart"](1, "ion-label", 1);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtext"](2);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](3, FormlyWrapperFormField_span_3_Template, 2, 0, "span", 2);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](4, FormlyWrapperFormField_ng_template_4_Template, 0, 0, "ng-template", null, 3, _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplateRefExtractor"]);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵelementEnd"]();

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtemplate"](6, FormlyWrapperFormField_ion_item_6_Template, 5, 1, "ion-item", 4);
          }

          if (rf & 2) {
            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("lines", ctx.to.itemLines);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](1);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("position", ctx.to.labelPosition);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](1);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵtextInterpolate1"](" ", ctx.to.label, " ");

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](1);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngIf", ctx.to.required && ctx.to.hideRequiredMarker !== true);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵadvance"](3);

            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵproperty"]("ngIf", ctx.showError);
          }
        },
        directives: [_ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonItem"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonLabel"], _angular_common__WEBPACK_IMPORTED_MODULE_0__["NgIf"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonText"], _ngx_formly_core__WEBPACK_IMPORTED_MODULE_5__["ɵc"]],
        encapsulation: 2
      });

      var ɵFormlyWrapperFormField_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵgetInheritedFactory"](FormlyWrapperFormField);
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](FormlyWrapperFormField, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Component"],
          args: [{
            selector: 'formly-wrapper-ion-form-field',
            template: "\n    <ion-item [lines]=\"to.itemLines\">\n      <ion-label [position]=\"to.labelPosition\">\n        {{ to.label }}\n        <span *ngIf=\"to.required && to.hideRequiredMarker !== true\" aria-hidden=\"true\">*</span>\n      </ion-label>\n      <ng-template #fieldComponent></ng-template>\n    </ion-item>\n    <ion-item lines=\"none\" *ngIf=\"showError\">\n      <ion-label>\n        <ion-text color=\"danger\">\n          <p>\n            <formly-validation-message [field]=\"field\"></formly-validation-message>\n          </p>\n        </ion-text>\n      </ion-label>\n    </ion-item>\n  "
          }]
        }], null, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /** @type {?} */


      var FIELD_TYPE_COMPONENTS = [// types
      FormlyFieldInput, FormlyFieldCheckbox, FormlyFieldDatetime, FormlyFieldRadio, FormlyFieldToggle, FormlyFieldSelect, FormlyFieldRange, FormlyFieldTextArea, // wrappers
      FormlyWrapperFormField];
      /** @type {?} */

      var IONIC_FORMLY_CONFIG = {
        types: [{
          name: 'input',
          component: FormlyFieldInput,
          wrappers: ['form-field']
        }, {
          name: 'checkbox',
          component: FormlyFieldCheckbox,
          wrappers: ['form-field']
        }, {
          name: 'datetime',
          component: FormlyFieldDatetime,
          wrappers: ['form-field']
        }, {
          name: 'radio',
          component: FormlyFieldRadio,
          wrappers: []
        }, {
          name: 'toggle',
          component: FormlyFieldToggle,
          wrappers: ['form-field']
        }, {
          name: 'select',
          component: FormlyFieldSelect,
          wrappers: ['form-field']
        }, {
          name: 'range',
          component: FormlyFieldRange,
          wrappers: ['form-field']
        }, {
          name: 'textarea',
          component: FormlyFieldTextArea,
          wrappers: ['form-field']
        }],
        wrappers: [{
          name: 'form-field',
          component: FormlyWrapperFormField
        }]
      };
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      var IonFormlyAttributes = /*#__PURE__*/function (_ngx_formly_core__WEB10) {
        _inherits(IonFormlyAttributes, _ngx_formly_core__WEB10);

        var _super15 = _createSuper(IonFormlyAttributes);

        function IonFormlyAttributes() {
          _classCallCheck(this, IonFormlyAttributes);

          return _super15.apply(this, arguments);
        }

        _createClass(IonFormlyAttributes, [{
          key: "focusElement",
          value:
          /**
           * @param {?} element
           * @param {?} value
           * @return {?}
           */
          function focusElement(element, value) {
            if (!element.setFocus || !value) {
              return;
            }

            if (!element.getInputElement()) {
              setTimeout(
              /**
              * @return {?}
              */
              function () {
                return element.setFocus();
              }, 300);
            } else {
              element.setFocus();
            }
          }
        }]);

        return IonFormlyAttributes;
      }(_ngx_formly_core__WEBPACK_IMPORTED_MODULE_5__["FormlyAttributes"]);

      IonFormlyAttributes.ɵfac = function IonFormlyAttributes_Factory(t) {
        return ɵIonFormlyAttributes_BaseFactory(t || IonFormlyAttributes);
      };

      IonFormlyAttributes.ɵdir = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineDirective"]({
        type: IonFormlyAttributes,
        selectors: [["", "ionFormlyAttributes", ""]],
        hostBindings: function IonFormlyAttributes_HostBindings(rf, ctx) {
          if (rf & 1) {
            _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵlistener"]("ionFocus", function IonFormlyAttributes_ionFocus_HostBindingHandler($event) {
              return ctx.onFocus($event);
            })("ionBlur", function IonFormlyAttributes_ionBlur_HostBindingHandler($event) {
              return ctx.onBlur($event);
            })("ionChange", function IonFormlyAttributes_ionChange_HostBindingHandler($event) {
              return ctx.onChange($event);
            });
          }
        },
        inputs: {
          field: ["ionFormlyAttributes", "field"]
        },
        features: [_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵInheritDefinitionFeature"]]
      });
      IonFormlyAttributes.propDecorators = {
        field: [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"],
          args: ['ionFormlyAttributes']
        }]
      };

      var ɵIonFormlyAttributes_BaseFactory = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵgetInheritedFactory"](IonFormlyAttributes);
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](IonFormlyAttributes, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Directive"],
          args: [{
            // tslint:disable-next-line
            selector: '[ionFormlyAttributes]',
            host: {
              '(ionFocus)': 'onFocus($event)',
              '(ionBlur)': 'onBlur($event)',
              '(ionChange)': 'onChange($event)'
            }
          }]
        }], null, {
          field: [{
            type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["Input"],
            args: ['ionFormlyAttributes']
          }]
        });
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      var FormlyIonicModule = function FormlyIonicModule() {
        _classCallCheck(this, FormlyIonicModule);
      };

      FormlyIonicModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineNgModule"]({
        type: FormlyIonicModule
      });
      FormlyIonicModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjector"]({
        factory: function FormlyIonicModule_Factory(t) {
          return new (t || FormlyIonicModule)();
        },
        imports: [[_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonicModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["ReactiveFormsModule"], _ngx_formly_core_select__WEBPACK_IMPORTED_MODULE_3__["FormlySelectModule"], _ngx_formly_core__WEBPACK_IMPORTED_MODULE_5__["FormlyModule"].forChild(IONIC_FORMLY_CONFIG)]]
      });

      (function () {
        (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵsetNgModuleScope"](FormlyIonicModule, {
          declarations: function declarations() {
            return [FormlyFieldInput, FormlyFieldCheckbox, FormlyFieldDatetime, FormlyFieldRadio, FormlyFieldToggle, FormlyFieldSelect, FormlyFieldRange, FormlyFieldTextArea, FormlyWrapperFormField, IonFormlyAttributes];
          },
          imports: function imports() {
            return [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonicModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["ReactiveFormsModule"], _ngx_formly_core_select__WEBPACK_IMPORTED_MODULE_3__["FormlySelectModule"], _ngx_formly_core__WEBPACK_IMPORTED_MODULE_5__["FormlyModule"]];
          },
          exports: function exports() {
            return [IonFormlyAttributes];
          }
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵsetClassMetadata"](FormlyIonicModule, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_4__["NgModule"],
          args: [{
            declarations: [FIELD_TYPE_COMPONENTS, IonFormlyAttributes],
            imports: [_angular_common__WEBPACK_IMPORTED_MODULE_0__["CommonModule"], _ionic_angular__WEBPACK_IMPORTED_MODULE_2__["IonicModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_1__["ReactiveFormsModule"], _ngx_formly_core_select__WEBPACK_IMPORTED_MODULE_3__["FormlySelectModule"], _ngx_formly_core__WEBPACK_IMPORTED_MODULE_5__["FormlyModule"].forChild(IONIC_FORMLY_CONFIG)],
            exports: [IonFormlyAttributes]
          }]
        }], null, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */
      //# sourceMappingURL=ngx-formly-ionic.js.map

      /***/

    },

    /***/
    "oKox":
    /*!***************************************************************************************!*\
      !*** ./node_modules/@ngx-formly/core/__ivy_ngcc__/fesm2015/ngx-formly-core-select.js ***!
      \***************************************************************************************/

    /*! exports provided: FormlySelectModule, ɵa */

    /***/
    function oKox(module, __webpack_exports__, __webpack_require__) {
      "use strict";

      __webpack_require__.r(__webpack_exports__);
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "FormlySelectModule", function () {
        return FormlySelectModule;
      });
      /* harmony export (binding) */


      __webpack_require__.d(__webpack_exports__, "ɵa", function () {
        return FormlySelectOptionsPipe;
      });
      /* harmony import */


      var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
      /*! @angular/core */
      "fXoL");
      /* harmony import */


      var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
      /*! rxjs */
      "qCKp");
      /* harmony import */


      var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
      /*! rxjs/operators */
      "kU1M");
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      var FormlySelectOptionsPipe = /*#__PURE__*/function () {
        function FormlySelectOptionsPipe() {
          _classCallCheck(this, FormlySelectOptionsPipe);
        }

        _createClass(FormlySelectOptionsPipe, [{
          key: "transform",
          value:
          /**
           * @param {?} options
           * @param {?=} field
           * @return {?}
           */
          function transform(options, field) {
            var _this36 = this;

            if (!(options instanceof rxjs__WEBPACK_IMPORTED_MODULE_1__["Observable"])) {
              options = Object(rxjs__WEBPACK_IMPORTED_MODULE_1__["of"])(options);
            }

            return (
              /** @type {?} */
              options.pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["map"])(
              /**
              * @param {?} value
              * @return {?}
              */
              function (value) {
                return _this36.toOptions(value, field || {});
              }))
            );
          }
          /**
           * @private
           * @param {?} options
           * @param {?} field
           * @return {?}
           */

        }, {
          key: "toOptions",
          value: function toOptions(options, field) {
            var _this37 = this;

            /** @type {?} */
            var gOptions = [];
            /** @type {?} */

            var groups = {};
            /** @type {?} */

            var to = field.templateOptions || {};
            to._flatOptions = true;
            options.map(
            /**
            * @param {?} option
            * @return {?}
            */
            function (option) {
              if (!_this37.getGroupProp(option, to)) {
                gOptions.push(_this37.toOption(option, to));
              } else {
                to._flatOptions = false;

                if (!groups[_this37.getGroupProp(option, to)]) {
                  groups[_this37.getGroupProp(option, to)] = [];
                  gOptions.push({
                    label: _this37.getGroupProp(option, to),
                    group: groups[_this37.getGroupProp(option, to)]
                  });
                }

                groups[_this37.getGroupProp(option, to)].push(_this37.toOption(option, to));
              }
            });
            return gOptions;
          }
          /**
           * @private
           * @param {?} item
           * @param {?} to
           * @return {?}
           */

        }, {
          key: "toOption",
          value: function toOption(item, to) {
            return {
              label: this.getLabelProp(item, to),
              value: this.getValueProp(item, to),
              disabled: this.getDisabledProp(item, to) || false
            };
          }
          /**
           * @private
           * @param {?} item
           * @param {?} to
           * @return {?}
           */

        }, {
          key: "getLabelProp",
          value: function getLabelProp(item, to) {
            if (typeof to.labelProp === 'function') {
              return to.labelProp(item);
            }

            if (this.shouldUseLegacyOption(item, to)) {
              console.warn("NgxFormly: legacy select option '{key, value}' is deprecated since v5.5, use '{value, label}' instead.");
              return item.value;
            }

            return item[to.labelProp || 'label'];
          }
          /**
           * @private
           * @param {?} item
           * @param {?} to
           * @return {?}
           */

        }, {
          key: "getValueProp",
          value: function getValueProp(item, to) {
            if (typeof to.valueProp === 'function') {
              return to.valueProp(item);
            }

            if (this.shouldUseLegacyOption(item, to)) {
              return item.key;
            }

            return item[to.valueProp || 'value'];
          }
          /**
           * @private
           * @param {?} item
           * @param {?} to
           * @return {?}
           */

        }, {
          key: "getDisabledProp",
          value: function getDisabledProp(item, to) {
            if (typeof to.disabledProp === 'function') {
              return to.disabledProp(item);
            }

            return item[to.disabledProp || 'disabled'];
          }
          /**
           * @private
           * @param {?} item
           * @param {?} to
           * @return {?}
           */

        }, {
          key: "getGroupProp",
          value: function getGroupProp(item, to) {
            if (typeof to.groupProp === 'function') {
              return to.groupProp(item);
            }

            return item[to.groupProp || 'group'];
          }
          /**
           * @private
           * @param {?} item
           * @param {?} to
           * @return {?}
           */

        }, {
          key: "shouldUseLegacyOption",
          value: function shouldUseLegacyOption(item, to) {
            return !to.valueProp && !to.labelProp && item != null && typeof item === 'object' && 'key' in item && 'value' in item;
          }
        }]);

        return FormlySelectOptionsPipe;
      }();

      FormlySelectOptionsPipe.ɵfac = function FormlySelectOptionsPipe_Factory(t) {
        return new (t || FormlySelectOptionsPipe)();
      };

      FormlySelectOptionsPipe.ɵpipe = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefinePipe"]({
        name: "formlySelectOptions",
        type: FormlySelectOptionsPipe,
        pure: true
      });
      /*@__PURE__*/

      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](FormlySelectOptionsPipe, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["Pipe"],
          args: [{
            name: 'formlySelectOptions'
          }]
        }], null, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */


      var FormlySelectModule = function FormlySelectModule() {
        _classCallCheck(this, FormlySelectModule);
      };

      FormlySelectModule.ɵmod = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineNgModule"]({
        type: FormlySelectModule
      });
      FormlySelectModule.ɵinj = _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjector"]({
        factory: function FormlySelectModule_Factory(t) {
          return new (t || FormlySelectModule)();
        }
      });

      (function () {
        (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵsetNgModuleScope"](FormlySelectModule, {
          declarations: [FormlySelectOptionsPipe],
          exports: [FormlySelectOptionsPipe]
        });
      })();
      /*@__PURE__*/


      (function () {
        _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵsetClassMetadata"](FormlySelectModule, [{
          type: _angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"],
          args: [{
            declarations: [FormlySelectOptionsPipe],
            exports: [FormlySelectOptionsPipe]
          }]
        }], null, null);
      })();
      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */

      /**
       * @fileoverview added by tsickle
       * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
       */
      //# sourceMappingURL=ngx-formly-core-select.js.map

      /***/

    }
  }]);
})();
//# sourceMappingURL=default~add-money-add-money-module~raise-dispute-transaction-raise-dispute-transaction-module~servic~c83d0716-es5.js.map