(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["app-pages-portal-usuarios-do-portal-usuarios-do-portal-module"],{

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal-filter/usuarios-do-portal-filter.component.html":
/*!**********************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal-filter/usuarios-do-portal-filter.component.html ***!
  \**********************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<div class=\"modal\" id=\"usuarios-do-portal-filter-dialog\" tabindex=\"-1\" role=\"dialog\" data-backdrop=\"static\">\r\n    <div class=\"modal-dialog\">\r\n        <div class=\"modal-content\">\r\n            <div class=\"modal-header\">\r\n                <h6 class=\"modal-title\">{{ 'titles.usuariosDoPortal' | translate }}</h6>\r\n            </div>\r\n            <form class=\"form\" #form=\"ngForm\" (ngSubmit)=\"onSubmit(form)\">\r\n                <app-validacoes></app-validacoes>\r\n                <div class=\"modal-body\">\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12 col-md-6 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"destinatarioIdCliente\"></label>\r\n                                <app-pesquisa-destinatario id=\"destinatarioIdCliente\" name=\"destinatarioIdCliente\"\r\n                                    showCgcCpf=\"false\" showInscricao=\"false\" label=\"destinatario\"\r\n                                    [(ngModel)]=\"data.destinatarioIdCliente\" (outModel)=\"trataCliente($event)\">\r\n                                </app-pesquisa-destinatario>\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                    <div class=\"row\">\r\n                        <div class=\"col-lg-12 col-md-6 col-sm-12\">\r\n                            <div class=\"form-group form-group-sm\">\r\n                                <label for=\"email\">{{ 'labels.email' | translate }}</label>\r\n                                <input id=\"email\" name=\"email\" [(ngModel)]=\"data.email\"\r\n                                    class=\"form-control form-control-sm\" type=\"email\"\r\n                                    data-title=\"{{ 'labels.email' | translate }}\">\r\n                            </div>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n                <div class=\"modal-footer\">\r\n                    <button class=\"btn btn-success mr-1\" type=\"submit\">{{ 'buttons.pesquisar' | translate\r\n                        }}</button>\r\n                    <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">{{ 'buttons.sair' | translate\r\n                        }}</button>\r\n                </div>\r\n            </form>\r\n        </div>\r\n    </div>\r\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal-form/usuarios-do-portal-form.component.html":
/*!******************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal-form/usuarios-do-portal-form.component.html ***!
  \******************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaForm\" [formAction]=\"actionForm\" [itemData]=\"data.codUsuario\"\n  [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <app-form-legenda></app-form-legenda>\n    <div class=\"card-body widget-body\">\n        <form class=\"form\" #f=\"ngForm\" (ngSubmit)=\"onSubmit(f)\">\n            <app-validacoes></app-validacoes>\n            <div class=\"row\">\n                <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <app-pesquisa-destinatario id=\"destinatarioIdCliente\" name=\"destinatarioIdCliente\"\n                            label=\"destinatario\" [inSelected]=\"data.cliente\" modalTitle=\"pesquisaDeCliente\"\n                            (outModel)=\"trataCliente($event)\" [(ngModel)]=\"data.destinatarioIdCliente\"\n                            [disabled]=\"funcoesService.isDetail(actionForm) || funcoesService.isEdit(actionForm)\"\n                            required=\"true\">\n                        </app-pesquisa-destinatario>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-3 col-md-6 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"email\" [class.required]=\"true\">{{ 'labels.email' | translate }}</label>\n                        <input id=\"email\" name=\"email\" [(ngModel)]=\"data.email\" class=\"form-control form-control-sm\"\n                            type=\"email\" [disabled]=\"funcoesService.isDetail(actionForm)\"\n                            data-title=\"{{ 'labels.email' | translate }}\" required (blur)=\"verificarEmailExistente()\">\n                    </div>\n                </div>\n                <div class=\"col-lg-2 col-md-6 col-sm-12 mt-4\">\n                    <div class=\"custom-control custom-checkbox\">\n                        <input id=\"estrangeiro\" name=\"estrangeiro\" [ngModel]=\"data.flagEstrangeiro === 'S'\"\n                            (ngModelChange)=\"data.flagEstrangeiro=$event?'S':'N'\"\n                            [disabled]=\"funcoesService.isDetail(actionForm) || habilitaCampos === false\"\n                            class=\"custom-control-input checkbox-success\" type=\"checkbox\"\n                            (change)=\"data.cpf = ''\">\n                        <label class=\"custom-control-label\" for=\"estrangeiro\">{{ 'labels.flagEstrangeiro' | translate\n                            }}</label>\n                    </div>\n                </div>\n                <div class=\"col-lg-2 col-md-6 col-sm-12 mt-4\">\n                    <div class=\"custom-control custom-checkbox\">\n                        <input id=\"supervisor\" name=\"supervisor\" [ngModel]=\"data.supervisor === 'S'\"\n                            (ngModelChange)=\"data.supervisor=$event?'S':'N'\"\n                            [disabled]=\"funcoesService.isDetail(actionForm) || habilitaCampos === false\"\n                            class=\"custom-control-input checkbox-success\" type=\"checkbox\">\n                        <label class=\"custom-control-label\" for=\"supervisor\">{{ 'labels.supervisor' | translate\n                            }}</label>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-6 col-md-6 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"cpf\" [class.required]=\"data.flagEstrangeiro !== 'S'\">{{ 'labels.cpf' |\n                            translate}}</label>\n                        <div class=\"input-group\">\n                            <input #cpf id=\"cpf\" name=\"cpf\" class=\"form-control form-control-sm\" type=\"text\"\n                                maxlength=\"14\" mask=\"000.000.000-00\" [(ngModel)]=\"data.cpf\"\n                                [disabled]=\"funcoesService.isDetail(actionForm) || data.flagEstrangeiro == 'S' || habilitaCampos === false\"\n                                (blur)=\"validaCpf()\" [required]=\"data.flagEstrangeiro !== 'S'\" />\n                            <span class=\"ml-2\" style=\"color:#F34235;\">\n                                <b>({{ 'messages.informeSomenteNumeros' | translate }})</b>\n                            </span>\n                        </div>\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-3 col-md-6 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"tipoDeDocumentoId\" [class.required]=\"data.flagEstrangeiro == 'S'\">{{\n                            'labels.tipoDocumento' | translate }}</label>\n                        <app-combo-padrao name=\"tipoDeDocumentoId\" id=\"tipoDeDocumentoId\" chave=\"TipoDoc\"\n                            descricao=\"DescrTipoDoc\" ativo=\"true\" required=\"true\" tabela=\"TipoDocumento\"\n                            [(ngModel)]=\"data.tipoDoc\"\n                            [disabled]=\"funcoesService.isDetail(actionForm) || habilitaCampos === false\"\n                            [required]=\"data.flagEstrangeiro == 'S'\">\n                        </app-combo-padrao>\n                    </div>\n                </div>\n                <div class=\"col-lg-3 col-md-6 col-sm-12\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"numeroDocto\" [class.required]=\"data.flagEstrangeiro == 'S'\">{{ 'labels.numeroDocto'\n                            | translate }}</label>\n                        <input id=\"numeroDocto\" name=\"numeroDocto\" class=\"form-control form-control-sm\" type=\"text\"\n                            [(ngModel)]=\"data.numeroDoc\" required maxlength=\"9\"\n                            data-title=\"{{ 'labels.numeroDocto' | translate }}\" [disabled]=\"funcoesService.isDetail(actionForm) || habilitaCampos === false\"\n                            [required]=\"data.flagEstrangeiro == 'S'\">\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-lg-6\">\n                    <div class=\"form-group form-group-sm\">\n                        <label for=\"nome\" class=\"required\">{{ 'labels.nome' | translate }}</label>\n                        <input id=\"nome\" name=\"nome\" [(ngModel)]=\"data.nome\" maxlength=\"50\"\n                            class=\"form-control form-control-sm\" type=\"text\"\n                            [disabled]=\"funcoesService.isDetail(actionForm) || habilitaCampos === false\" required\n                            data-title=\"{{ 'labels.nome' | translate }}\">\n                    </div>\n                </div>\n            </div>\n            <div class=\"row\">\n                <div class=\"col-12 mt-3\">\n                    <div class=\"form-group\">\n                        <button class=\"btn btn-success mr-2\" type=\"submit\"\n                            [disabled]=\"funcoesService.isDetail(actionForm)\">\n                            {{ 'buttons.salvar' | translate }}\n                        </button>\n                        <button class=\"btn btn-success mr-2\" (click)=\"saveAndCreate(f)\" type=\"button\"\n                            [disabled]=\"funcoesService.isDetail(actionForm)\">\n                            {{ 'buttons.salvarNovo' | translate }}\n                        </button>\n                    </div>\n                </div>\n            </div>\n        </form>\n    </div>\n</div>");

/***/ }),

/***/ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal-index/usuarios-do-portal-index.component.html":
/*!********************************************************************************************************************************************************!*\
  !*** ./node_modules/raw-loader/dist/cjs.js!./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal-index/usuarios-do-portal-index.component.html ***!
  \********************************************************************************************************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony default export */ __webpack_exports__["default"] = ("<app-menu-command-bar [botoesComando]=\"constantes.listaIndex\"\n                      [formAction]=\"actionForm\"\n                      [itemData]=\"dados.codUsuario\"\n                      [sisFormularioId]=\"constantes.sisFormularioId\">\n</app-menu-command-bar>\n\n<div class=\"section-comand-bar\">\n    <table id=\"dtUsuariosDoPortal\" class=\"table table-striped table-bordered table-hover nowrap table-sm\"></table>\n</div>\n\n<app-propriedades></app-propriedades>\n<app-liberar-acesso-supervisor></app-liberar-acesso-supervisor>\n<app-permissoes-rotina [constantes]=\"constantes\"></app-permissoes-rotina>\n<app-usuarios-do-portal-filter [data]=\"service.filtro\" (filtrar)=\"executaFiltro($event)\"></app-usuarios-do-portal-filter>\n");

/***/ }),

/***/ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal-filter/usuarios-do-portal-filter.component.ts":
/*!******************************************************************************************************************!*\
  !*** ./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal-filter/usuarios-do-portal-filter.component.ts ***!
  \******************************************************************************************************************/
/*! exports provided: UsuariosDoPortalFilterComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UsuariosDoPortalFilterComponent", function() { return UsuariosDoPortalFilterComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _usuarios_do_portal_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../usuarios-do-portal.model */ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal.model.ts");
/* harmony import */ var _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var _usuarios_do_portal_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../usuarios-do-portal.service */ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal.service.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};




var UsuariosDoPortalFilterComponent = /** @class */ (function () {
    function UsuariosDoPortalFilterComponent(service) {
        this.service = service;
        this.filtrar = new _angular_core__WEBPACK_IMPORTED_MODULE_0__["EventEmitter"]();
    }
    UsuariosDoPortalFilterComponent.prototype.ngOnInit = function () {
        this.service.filtro = this.data;
    };
    UsuariosDoPortalFilterComponent.prototype.onSubmit = function (form) {
        if (form.invalid) {
            _shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_2__["EventEmitterService"].get("formError").emit(form);
            return;
        }
        this.filtrar.emit(this.service.filtro);
        jQuery("#usuarios-do-portal-filter-dialog").modal("hide");
    };
    UsuariosDoPortalFilterComponent.prototype.trataCliente = function (cliente) {
        this.service.filtro.cliente = cliente;
    };
    UsuariosDoPortalFilterComponent.ctorParameters = function () { return [
        { type: _usuarios_do_portal_service__WEBPACK_IMPORTED_MODULE_3__["UsuariosDoPortalService"] }
    ]; };
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Input"])(),
        __metadata("design:type", _usuarios_do_portal_model__WEBPACK_IMPORTED_MODULE_1__["UsuariosDoPortalFilter"])
    ], UsuariosDoPortalFilterComponent.prototype, "data", void 0);
    __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Output"])(),
        __metadata("design:type", Object)
    ], UsuariosDoPortalFilterComponent.prototype, "filtrar", void 0);
    UsuariosDoPortalFilterComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-usuarios-do-portal-filter",
            template: __importDefault(__webpack_require__(/*! raw-loader!./usuarios-do-portal-filter.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal-filter/usuarios-do-portal-filter.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_usuarios_do_portal_service__WEBPACK_IMPORTED_MODULE_3__["UsuariosDoPortalService"]])
    ], UsuariosDoPortalFilterComponent);
    return UsuariosDoPortalFilterComponent;
}());



/***/ }),

/***/ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal-form/usuarios-do-portal-form.component.ts":
/*!**************************************************************************************************************!*\
  !*** ./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal-form/usuarios-do-portal-form.component.ts ***!
  \**************************************************************************************************************/
/*! exports provided: UsuariosDoPortalFormComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UsuariosDoPortalFormComponent", function() { return UsuariosDoPortalFormComponent; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.service */ "./src/app/pages/cadastro/destinatario/destinatario.service.ts");
/* harmony import */ var _usuarios_do_portal_model__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../usuarios-do-portal.model */ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal.model.ts");
/* harmony import */ var _usuarios_do_portal_constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../usuarios-do-portal.constants */ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal.constants.ts");
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var _usuarios_do_portal_service__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../usuarios-do-portal.service */ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal.service.ts");
/* harmony import */ var app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! app/shared/services/event-emitter/event-emitter.service */ "./src/app/shared/services/event-emitter/event-emitter.service.ts");
/* harmony import */ var app_shared_services_funcoes_cpf_cnpj_cpf_cnpj_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/shared/services/funcoes/cpf-cnpj/cpf-cnpj.service */ "./src/app/shared/services/funcoes/cpf-cnpj/cpf-cnpj.service.ts");
/* harmony import */ var app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! app/shared/services/funcoes/string-utils/string-utils.static.service */ "./src/app/shared/services/funcoes/string-utils/string-utils.static.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
    var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
    return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
    function verb(n) { return function (v) { return step([n, v]); }; }
    function step(op) {
        if (f) throw new TypeError("Generator is already executing.");
        while (_) try {
            if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
            if (y = 0, t) op = [op[0] & 2, t.value];
            switch (op[0]) {
                case 0: case 1: t = op; break;
                case 4: _.label++; return { value: op[1], done: false };
                case 5: _.label++; y = op[1]; op = [0]; continue;
                case 7: op = _.ops.pop(); _.trys.pop(); continue;
                default:
                    if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                    if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                    if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                    if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                    if (t[2]) _.ops.pop();
                    _.trys.pop(); continue;
            }
            op = body.call(thisArg, _);
        } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
        if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
    }
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};














var UsuariosDoPortalFormComponent = /** @class */ (function (_super) {
    __extends(UsuariosDoPortalFormComponent, _super);
    function UsuariosDoPortalFormComponent(router, messageService, activatedRoute, funcoesService, permissoesUtils, destinatarioService, service, cpfCnpjService) {
        var _this = _super.call(this, new _usuarios_do_portal_constants__WEBPACK_IMPORTED_MODULE_8__["UsuariosDoPortalConstants"](), funcoesService) || this;
        _this.router = router;
        _this.messageService = messageService;
        _this.activatedRoute = activatedRoute;
        _this.funcoesService = funcoesService;
        _this.permissoesUtils = permissoesUtils;
        _this.destinatarioService = destinatarioService;
        _this.service = service;
        _this.cpfCnpjService = cpfCnpjService;
        _this.data = new _usuarios_do_portal_model__WEBPACK_IMPORTED_MODULE_7__["UsuariosDoPortal"]();
        _this.habilitaCampos = true;
        _this.mensagens = [];
        _this.constantes = new _usuarios_do_portal_constants__WEBPACK_IMPORTED_MODULE_8__["UsuariosDoPortalConstants"]();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.pageRoute = "/portal/usuariosDoPortal";
        _this.verificarEmailExistente = function () { return __awaiter(_this, void 0, void 0, function () {
            var _a;
            return __generator(this, function (_b) {
                switch (_b.label) {
                    case 0:
                        if (!this.funcoesService.isCreate(this.actionForm)) return [3 /*break*/, 2];
                        if (!(this.data.email !== '')) return [3 /*break*/, 2];
                        this.service.filtroEmail.email = this.data.email;
                        _a = this;
                        return [4 /*yield*/, this.service.getByEmail(this.service.filtroEmail).toPromise().catch(function () { return null; })];
                    case 1:
                        _a.dataEmail = _b.sent();
                        if (!this.dataEmail || !this.dataEmail.email || this.dataEmail.email.length === 0) {
                            this.habilitaCampos = true;
                            this.data.flagEstrangeiro = 'N';
                            this.data.supervisor = 'S';
                            this.data.cpf = '';
                            this.data.tipoDoc = '';
                            this.data.numeroDoc = '';
                            this.data.nome = '';
                            this.data.tipoUsuario = 1;
                        }
                        else {
                            this.habilitaCampos = false;
                            this.data.flagEstrangeiro = this.dataEmail.flagEstrangeiro;
                            this.data.supervisor = this.dataEmail.supervisor;
                            this.data.cpf = this.dataEmail.cpf;
                            this.data.tipoDoc = this.dataEmail.tipoDoc;
                            this.data.numeroDoc = this.dataEmail.numeroDoc;
                            this.data.nome = this.dataEmail.nome;
                        }
                        _b.label = 2;
                    case 2: return [2 /*return*/];
                }
            });
        }); };
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    UsuariosDoPortalFormComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, this.permissoesUtils.getLibRotina(this.actionForm), function () {
            var codUsuario = _this.activatedRoute.snapshot.paramMap.get("codUsuario");
            var codDest = _this.activatedRoute.snapshot.paramMap.get("codDest");
            if (codUsuario) {
                _this.service._getById(+codUsuario, +codDest).subscribe(function (resp) {
                    if (resp) {
                        _this.data = resp;
                        _this.destinatarioService.getById(codDest).subscribe(function (cliente) {
                            _this.trataCliente(cliente);
                        });
                    }
                    else {
                        _this.messageService.warning("titles.usuariosDoPortal", "messages.nenhumRegistroEncontrado");
                        _this.back();
                    }
                });
            }
        }, function () {
            _this.permissoesUtils.back();
        });
    };
    UsuariosDoPortalFormComponent.prototype.onSubmit = function (form, create) {
        var _this = this;
        if (create === void 0) { create = false; }
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () {
            app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_11__["EventEmitterService"].get("formError").emit(form);
            if (form.invalid) {
                return;
            }
            if (_this.habilitaCampos == false) {
                if (_this.dataEmail.tipoUsuario === 2) {
                    _this.messageService.warning("titles.usuariosDoPortal", "messages.emailJaUtilizadoComoUsuarioReceita");
                    return;
                }
                if (_this.dataEmail.tipoUsuario === 3) {
                    _this.messageService.warning("titles.usuariosDoPortal", "messages.emailJaUtilizadoComoUsuarioColaborador");
                    return;
                }
            }
            _this.data.logRotina = "Usuarios do Portal";
            _this.data.senha = app_shared_services_funcoes_string_utils_string_utils_static_service__WEBPACK_IMPORTED_MODULE_13__["StringUtilsStaticService"].generateRandomString(20, true, true, true, false);
            var dataAtual = new Date();
            _this.data.validadeSenha = new Date(dataAtual.getTime() + 24 * 60 * 60 * 1000);
            _this.service
                .save(_this.data, _this.funcoesService.isEdit(_this.actionForm))
                .subscribe(function (result) {
                _this.mensagens = _this.messageService.validationResult(result.validationResult);
                if (!result.validationResult.isValid) {
                    app_shared_services_event_emitter_event_emitter_service__WEBPACK_IMPORTED_MODULE_11__["EventEmitterService"].get("backError").emit(_this.mensagens);
                }
                else {
                    _this.messageService.saveSuccess("titles.usuariosDoPortal");
                    if (create) {
                        _this.data = new _usuarios_do_portal_model__WEBPACK_IMPORTED_MODULE_7__["UsuariosDoPortal"]();
                        _this.router.navigate(["" + _this.target + _this.pageRoute + "/create"]);
                    }
                    else {
                        _this.back();
                    }
                }
            });
        });
    };
    UsuariosDoPortalFormComponent.prototype.edit = function () {
        this.router.navigate(["" + this.target + this.pageRoute + "/edit/" + this.data.codUsuario + "/" + this.data.destinatarioIdCliente]);
    };
    UsuariosDoPortalFormComponent.prototype.saveAndCreate = function (form) {
        this.onSubmit(form, true);
    };
    UsuariosDoPortalFormComponent.prototype.back = function () {
        this.funcoesService.desabilitarFiltro();
        this.router.navigate(["" + this.target + this.pageRoute]);
    };
    UsuariosDoPortalFormComponent.prototype.trataCliente = function (cliente) {
        if (!!cliente) {
            this.data.cliente = cliente;
            this.data.destinatarioIdCliente = cliente.destinatarioId;
        }
        else {
            this.data.cliente = new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_9__["Destinatario"]();
            this.data.destinatarioIdCliente = 0;
        }
    };
    UsuariosDoPortalFormComponent.prototype.validaCpf = function () {
        var valid = this.cpfCnpjService.valida_cpf(this.data.cpf);
        if (!valid) {
            this.messageService.warning("titles.loginPortal", "messages.cpfInvalido");
            return false;
        }
        return true;
    };
    UsuariosDoPortalFormComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"] },
        { type: _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"] },
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"] },
        { type: app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_6__["DestinatarioService"] },
        { type: _usuarios_do_portal_service__WEBPACK_IMPORTED_MODULE_10__["UsuariosDoPortalService"] },
        { type: app_shared_services_funcoes_cpf_cnpj_cpf_cnpj_service__WEBPACK_IMPORTED_MODULE_12__["CpfCnpjService"] }
    ]; };
    UsuariosDoPortalFormComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Component"])({
            selector: "app-usuarios-do-portal-form",
            template: __importDefault(__webpack_require__(/*! raw-loader!./usuarios-do-portal-form.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal-form/usuarios-do-portal-form.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_0__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_1__["Router"],
            _shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_2__["MessageService"],
            _angular_router__WEBPACK_IMPORTED_MODULE_1__["ActivatedRoute"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_3__["FuncoesService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_5__["PermissoesUtilsService"],
            app_pages_cadastro_destinatario_destinatario_service__WEBPACK_IMPORTED_MODULE_6__["DestinatarioService"],
            _usuarios_do_portal_service__WEBPACK_IMPORTED_MODULE_10__["UsuariosDoPortalService"],
            app_shared_services_funcoes_cpf_cnpj_cpf_cnpj_service__WEBPACK_IMPORTED_MODULE_12__["CpfCnpjService"]])
    ], UsuariosDoPortalFormComponent);
    return UsuariosDoPortalFormComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_4__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal-index/usuarios-do-portal-index.component.ts":
/*!****************************************************************************************************************!*\
  !*** ./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal-index/usuarios-do-portal-index.component.ts ***!
  \****************************************************************************************************************/
/*! exports provided: UsuariosDoPortalIndexComponent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UsuariosDoPortalIndexComponent", function() { return UsuariosDoPortalIndexComponent; });
/* harmony import */ var _shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../../../shared/services/funcoes/modal-utils/modal-utils.static.service */ "./src/app/shared/services/funcoes/modal-utils/modal-utils.static.service.ts");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../shared/services/datatables/datatables.service */ "./src/app/shared/services/datatables/datatables.service.ts");
/* harmony import */ var _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../shared/services/funcoes/funcoes.service */ "./src/app/shared/services/funcoes/funcoes.service.ts");
/* harmony import */ var _shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../shared/components/corporate/base/base.permissoes */ "./src/app/shared/components/corporate/base/base.permissoes.ts");
/* harmony import */ var _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../shared/services/funcoes/permissoes-utils/permissoes-utils.service */ "./src/app/shared/services/funcoes/permissoes-utils/permissoes-utils.service.ts");
/* harmony import */ var _login_login_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../login/login.service */ "./src/app/pages/login/login.service.ts");
/* harmony import */ var app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! app/shared/services/message/message.service */ "./src/app/shared/services/message/message.service.ts");
/* harmony import */ var _usuarios_do_portal_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../usuarios-do-portal.service */ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal.service.ts");
/* harmony import */ var _usuarios_do_portal_model__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../usuarios-do-portal.model */ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal.model.ts");
/* harmony import */ var _usuarios_do_portal_constants__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../usuarios-do-portal.constants */ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal.constants.ts");
/* harmony import */ var app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! app/shared/services/funcoes/number-utils/number-utils.static.service */ "./src/app/shared/services/funcoes/number-utils/number-utils.static.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};













var UsuariosDoPortalIndexComponent = /** @class */ (function (_super) {
    __extends(UsuariosDoPortalIndexComponent, _super);
    function UsuariosDoPortalIndexComponent(router, service, datatablesService, funcoesService, messageService, permissoesUtils, loginService) {
        var _this = _super.call(this, new _usuarios_do_portal_constants__WEBPACK_IMPORTED_MODULE_11__["UsuariosDoPortalConstants"](), funcoesService) || this;
        _this.router = router;
        _this.service = service;
        _this.datatablesService = datatablesService;
        _this.funcoesService = funcoesService;
        _this.messageService = messageService;
        _this.permissoesUtils = permissoesUtils;
        _this.loginService = loginService;
        _this.data = new _usuarios_do_portal_model__WEBPACK_IMPORTED_MODULE_10__["UsuariosDoPortal"]();
        _this.dados = new _usuarios_do_portal_model__WEBPACK_IMPORTED_MODULE_10__["UsuariosDoPortalIndex"]();
        _this.constantes = new _usuarios_do_portal_constants__WEBPACK_IMPORTED_MODULE_11__["UsuariosDoPortalConstants"]();
        // public filtro = new UsuariosDoPortalFilter();
        _this.target = _this.funcoesService.getTargetLocation();
        _this.pageRoute = "/portal/usuariosDoPortal";
        router.events.subscribe(function (event) {
            var params = _this.funcoesService.formParams.getParams(router, event);
            if (params) {
                _this.actionForm = params.action;
            }
        });
        return _this;
    }
    UsuariosDoPortalIndexComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            if (!_this.loginService.isTokenExpired()) {
                if (_this.funcoesService.abrirFiltro) {
                    _shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["ModalUtilsStaticService"].openModal('usuarios-do-portal-filter-dialog');
                }
                else {
                    _this.refresh();
                }
            }
        }, function () {
            _this.permissoesUtils.back();
        }, true);
    };
    UsuariosDoPortalIndexComponent.prototype.filtrar = function () {
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            _shared_services_funcoes_modal_utils_modal_utils_static_service__WEBPACK_IMPORTED_MODULE_0__["ModalUtilsStaticService"].openModal('usuarios-do-portal-filter-dialog');
        });
    };
    UsuariosDoPortalIndexComponent.prototype.executaFiltro = function (event) {
        this.service.filtro = event;
        this.refresh();
    };
    UsuariosDoPortalIndexComponent.prototype.refresh = function () {
        var _this = this;
        this.service.getByFilter(this.service.filtro).subscribe(function (data) {
            var columns = [
                _this.datatablesService.getDataString("codDest", "codigo"),
                _this.datatablesService.getDataString("clienteFantasia", "Fantasia"),
                _this.datatablesService.getDataString("email", "email"),
                _this.datatablesService.getDataString("nome", "nome")
            ];
            _this.datatablesService.toDataTable({ tableId: "dtUsuariosDoPortal", columns: columns, data: data, orientationOrder: _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["EOrientationOrder"].ASC }, function (aData) {
                _this.dados = aData;
                _this.data = aData;
            });
        });
    };
    UsuariosDoPortalIndexComponent.prototype.print = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 5, function () {
            _this.constantes.paramRelatorio = {
                destinatarioIdCliente: app_shared_services_funcoes_number_utils_number_utils_static_service__WEBPACK_IMPORTED_MODULE_12__["NumberUtilsStaticService"].toNumber(_this.service.filtro.destinatarioIdCliente),
                email: _this.service.filtro.email
            };
            _super.prototype.print.call(_this);
        });
    };
    UsuariosDoPortalIndexComponent.prototype.remove = function () {
        var _this = this;
        if (!!(this.dados.codUsuario)) {
            this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 3, function () {
                _this.messageService.removeConfirm(function () {
                    _this.service.remove(_this.data).subscribe(function () {
                        _this.service.remove(_this.data);
                        _this.datatablesService.remove("dtUsuariosDoPortal");
                    });
                });
            });
        }
    };
    UsuariosDoPortalIndexComponent.prototype.create = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 1, function () {
            _this.router.navigate(["" + _this.target + _this.pageRoute + "/create"]);
        });
    };
    UsuariosDoPortalIndexComponent.prototype.edit = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 2, function () {
            if (_this.funcoesService.isNotUndefinedOrNull(_this.dados.codUsuario)) {
                _this.router.navigate(["" + _this.target + _this.pageRoute + "/edit/" + _this.dados.codUsuario + "/" + _this.dados.codDest]);
            }
        });
    };
    UsuariosDoPortalIndexComponent.prototype.detail = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 4, function () {
            _this.router.navigate(["" + _this.target + _this.pageRoute + "/detail/" + _this.dados.codUsuario + "/" + _this.dados.codDest]);
        });
    };
    UsuariosDoPortalIndexComponent.prototype.properties = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 6, function () {
            _super.prototype.properties.call(_this, _this.dados);
        });
    };
    UsuariosDoPortalIndexComponent.prototype.permissoes = function () {
        var _this = this;
        this.permissoesUtils.verificaRotina(this.constantes.sisFormularioId, 7, function () {
            _super.prototype.permissoes.call(_this, _this.constantes);
        });
    };
    UsuariosDoPortalIndexComponent.ctorParameters = function () { return [
        { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"] },
        { type: _usuarios_do_portal_service__WEBPACK_IMPORTED_MODULE_9__["UsuariosDoPortalService"] },
        { type: _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"] },
        { type: _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"] },
        { type: app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"] },
        { type: _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"] },
        { type: _login_login_service__WEBPACK_IMPORTED_MODULE_7__["LoginService"] }
    ]; };
    UsuariosDoPortalIndexComponent = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({
            selector: "app-usuarios-do-portal-index",
            template: __importDefault(__webpack_require__(/*! raw-loader!./usuarios-do-portal-index.component.html */ "./node_modules/raw-loader/dist/cjs.js!./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal-index/usuarios-do-portal-index.component.html")).default,
            encapsulation: _angular_core__WEBPACK_IMPORTED_MODULE_1__["ViewEncapsulation"].None
        }),
        __metadata("design:paramtypes", [_angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"],
            _usuarios_do_portal_service__WEBPACK_IMPORTED_MODULE_9__["UsuariosDoPortalService"],
            _shared_services_datatables_datatables_service__WEBPACK_IMPORTED_MODULE_3__["DatatablesService"],
            _shared_services_funcoes_funcoes_service__WEBPACK_IMPORTED_MODULE_4__["FuncoesService"],
            app_shared_services_message_message_service__WEBPACK_IMPORTED_MODULE_8__["MessageService"],
            _shared_services_funcoes_permissoes_utils_permissoes_utils_service__WEBPACK_IMPORTED_MODULE_6__["PermissoesUtilsService"],
            _login_login_service__WEBPACK_IMPORTED_MODULE_7__["LoginService"]])
    ], UsuariosDoPortalIndexComponent);
    return UsuariosDoPortalIndexComponent;
}(_shared_components_corporate_base_base_permissoes__WEBPACK_IMPORTED_MODULE_5__["BasePermissoes"]));



/***/ }),

/***/ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal.constants.ts":
/*!*********************************************************************************!*\
  !*** ./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal.constants.ts ***!
  \*********************************************************************************/
/*! exports provided: UsuariosDoPortalConstants */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UsuariosDoPortalConstants", function() { return UsuariosDoPortalConstants; });
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};
var UsuariosDoPortalConstants = /** @class */ (function () {
    function UsuariosDoPortalConstants() {
        this.sisFormularioId = 375247;
        this.permissoes = [
            { sisFormularioId: this.sisFormularioId, libRotina: 1, acao: "labels.inclusao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 2, acao: "labels.alteracao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 3, acao: "labels.exclusao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 4, acao: "labels.consulta" },
            { sisFormularioId: this.sisFormularioId, libRotina: 5, acao: "labels.impressao" },
            { sisFormularioId: this.sisFormularioId, libRotina: 6, acao: "labels.propriedades" },
            { sisFormularioId: this.sisFormularioId, libRotina: 7, acao: "labels.permissoes" }
        ];
        this.sisSistemaId = "PTL";
        this.nomeForm = "titles.usuariosDoPortal";
        this.reportId = "PTL0007";
        this.reportTitulo = { "titulo": "Usuarios do Portal", "subTitulo": "" };
        this.listaIndex = [
            { title: 'Novo', action: 'create', icon: "icon-plus", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Visualizar', action: 'detail', icon: "icon-eye", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Excluir', action: 'remove', icon: "icon-close", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Atualizar', action: 'refresh', icon: "icon-reload", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Imprimir', action: 'print', icon: "icon-printer", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Pesquisar', action: 'filtrar', icon: "icon-search", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Propriedade', action: 'properties', icon: "icon-menu", exibeButton: true, eximeMenu: true, menuName: 'Movimento' },
            { title: 'Permissao', action: 'permissoes', icon: "icon-unlock", exibeButton: true, eximeMenu: true, menuName: 'Movimento' }
        ];
        this.listaForm = [
            { title: 'Editar', action: 'edit', icon: "icon-pencil", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
            { title: 'Voltar', action: 'back', icon: "icon-arrow-left", exibeButton: true, eximeMenu: true, menuName: 'Arquivo' },
        ];
    }
    return UsuariosDoPortalConstants;
}());



/***/ }),

/***/ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal.model.ts":
/*!*****************************************************************************!*\
  !*** ./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal.model.ts ***!
  \*****************************************************************************/
/*! exports provided: UsuariosDoPortalIndex, UsuariosDoPortal, UsuariosDoPortalFilter, UsuariosDoPortalEmailFilter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UsuariosDoPortalIndex", function() { return UsuariosDoPortalIndex; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UsuariosDoPortal", function() { return UsuariosDoPortal; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UsuariosDoPortalFilter", function() { return UsuariosDoPortalFilter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UsuariosDoPortalEmailFilter", function() { return UsuariosDoPortalEmailFilter; });
/* harmony import */ var app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! app/pages/cadastro/destinatario/destinatario.model */ "./src/app/pages/cadastro/destinatario/destinatario.model.ts");
/* harmony import */ var app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! app/shared/services/base/base.model */ "./src/app/shared/services/base/base.model.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};


var UsuariosDoPortalIndex = /** @class */ (function (_super) {
    __extends(UsuariosDoPortalIndex, _super);
    function UsuariosDoPortalIndex() {
        var _this = _super.call(this) || this;
        _this.codUsuario = 0;
        return _this;
    }
    return UsuariosDoPortalIndex;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_1__["BaseModel"]));

var UsuariosDoPortal = /** @class */ (function (_super) {
    __extends(UsuariosDoPortal, _super);
    function UsuariosDoPortal() {
        var _this = _super.call(this) || this;
        _this.codUsuario = 0;
        _this.destinatarioIdCliente = 0;
        _this.tipoUsuario = 1;
        _this.email = '';
        _this.flagEstrangeiro = 'N';
        _this.supervisor = 'S';
        _this.cpf = '';
        _this.tipoDoc = '';
        _this.numeroDoc = '';
        _this.nome = '';
        _this.senha = '';
        _this.alteraSenha = 'S';
        _this.validadeSenha = null;
        _this.cliente = new app_pages_cadastro_destinatario_destinatario_model__WEBPACK_IMPORTED_MODULE_0__["Destinatario"]();
        return _this;
    }
    return UsuariosDoPortal;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_1__["BaseModel"]));

var UsuariosDoPortalFilter = /** @class */ (function (_super) {
    __extends(UsuariosDoPortalFilter, _super);
    function UsuariosDoPortalFilter() {
        var _this = _super.call(this) || this;
        _this.destinatarioIdCliente = 0;
        _this.email = '';
        return _this;
    }
    return UsuariosDoPortalFilter;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_1__["BaseModel"]));

var UsuariosDoPortalEmailFilter = /** @class */ (function (_super) {
    __extends(UsuariosDoPortalEmailFilter, _super);
    function UsuariosDoPortalEmailFilter() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    return UsuariosDoPortalEmailFilter;
}(app_shared_services_base_base_model__WEBPACK_IMPORTED_MODULE_1__["BaseModel"]));



/***/ }),

/***/ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal.module.ts":
/*!******************************************************************************!*\
  !*** ./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal.module.ts ***!
  \******************************************************************************/
/*! exports provided: UsuariosDoPortalModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UsuariosDoPortalModule", function() { return UsuariosDoPortalModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _shared_shared_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../shared/shared.module */ "./src/app/shared/shared.module.ts");
/* harmony import */ var _usuarios_do_portal_routing_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./usuarios-do-portal.routing.module */ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal.routing.module.ts");
/* harmony import */ var _usuarios_do_portal_index_usuarios_do_portal_index_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./usuarios-do-portal-index/usuarios-do-portal-index.component */ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal-index/usuarios-do-portal-index.component.ts");
/* harmony import */ var _usuarios_do_portal_form_usuarios_do_portal_form_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./usuarios-do-portal-form/usuarios-do-portal-form.component */ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal-form/usuarios-do-portal-form.component.ts");
/* harmony import */ var _usuarios_do_portal_filter_usuarios_do_portal_filter_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./usuarios-do-portal-filter/usuarios-do-portal-filter.component */ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal-filter/usuarios-do-portal-filter.component.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};






var UsuariosDoPortalModule = /** @class */ (function () {
    function UsuariosDoPortalModule() {
    }
    UsuariosDoPortalModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            declarations: [
                _usuarios_do_portal_index_usuarios_do_portal_index_component__WEBPACK_IMPORTED_MODULE_3__["UsuariosDoPortalIndexComponent"],
                _usuarios_do_portal_form_usuarios_do_portal_form_component__WEBPACK_IMPORTED_MODULE_4__["UsuariosDoPortalFormComponent"],
                _usuarios_do_portal_filter_usuarios_do_portal_filter_component__WEBPACK_IMPORTED_MODULE_5__["UsuariosDoPortalFilterComponent"]
            ],
            imports: [
                _shared_shared_module__WEBPACK_IMPORTED_MODULE_1__["SharedModule"],
                _usuarios_do_portal_routing_module__WEBPACK_IMPORTED_MODULE_2__["UsuariosDoPortalRoutingModule"]
            ]
        })
    ], UsuariosDoPortalModule);
    return UsuariosDoPortalModule;
}());



/***/ }),

/***/ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal.routing.module.ts":
/*!**************************************************************************************!*\
  !*** ./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal.routing.module.ts ***!
  \**************************************************************************************/
/*! exports provided: UsuariosDoPortalRoutingModule */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UsuariosDoPortalRoutingModule", function() { return UsuariosDoPortalRoutingModule; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js");
/* harmony import */ var app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! app/config/enumerables */ "./src/app/config/enumerables.ts");
/* harmony import */ var _usuarios_do_portal_form_usuarios_do_portal_form_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./usuarios-do-portal-form/usuarios-do-portal-form.component */ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal-form/usuarios-do-portal-form.component.ts");
/* harmony import */ var _usuarios_do_portal_index_usuarios_do_portal_index_component__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./usuarios-do-portal-index/usuarios-do-portal-index.component */ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal-index/usuarios-do-portal-index.component.ts");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};





var UsuariosDoPortalRoutes = [
    {
        path: "",
        component: _usuarios_do_portal_index_usuarios_do_portal_index_component__WEBPACK_IMPORTED_MODULE_4__["UsuariosDoPortalIndexComponent"],
        data: {
            breadcrumb: "usuariosDoPortal",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].index }
        }
    },
    {
        path: "create",
        component: _usuarios_do_portal_form_usuarios_do_portal_form_component__WEBPACK_IMPORTED_MODULE_3__["UsuariosDoPortalFormComponent"],
        data: {
            breadcrumb: "usuariosDoPortal",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].create }
        }
    },
    {
        path: "detail/:codUsuario/:codDest",
        component: _usuarios_do_portal_form_usuarios_do_portal_form_component__WEBPACK_IMPORTED_MODULE_3__["UsuariosDoPortalFormComponent"],
        data: {
            breadcrumb: "usuariosDoPortal",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].detail }
        }
    },
    {
        path: "edit/:codUsuario/:codDest",
        component: _usuarios_do_portal_form_usuarios_do_portal_form_component__WEBPACK_IMPORTED_MODULE_3__["UsuariosDoPortalFormComponent"],
        data: {
            breadcrumb: "usuariosDoPortal",
            formParams: { action: app_config_enumerables__WEBPACK_IMPORTED_MODULE_2__["ActionForm"].edit }
        }
    }
];
var UsuariosDoPortalRoutingModule = /** @class */ (function () {
    function UsuariosDoPortalRoutingModule() {
    }
    UsuariosDoPortalRoutingModule = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["NgModule"])({
            imports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"].forChild(UsuariosDoPortalRoutes)],
            exports: [_angular_router__WEBPACK_IMPORTED_MODULE_1__["RouterModule"]]
        })
    ], UsuariosDoPortalRoutingModule);
    return UsuariosDoPortalRoutingModule;
}());



/***/ }),

/***/ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal.service.ts":
/*!*******************************************************************************!*\
  !*** ./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal.service.ts ***!
  \*******************************************************************************/
/*! exports provided: UsuariosDoPortalService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UsuariosDoPortalService", function() { return UsuariosDoPortalService; });
/* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js");
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js");
/* harmony import */ var app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! app/app.error-handler */ "./src/app/app.error-handler.ts");
/* harmony import */ var environments_environment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! environments/environment */ "./src/environments/environment.ts");
/* harmony import */ var _usuarios_do_portal_model__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./usuarios-do-portal.model */ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal.model.ts");
/* harmony import */ var _usuarios_do_portal_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./usuarios-do-portal.constants */ "./src/app/pages/portal/usuarios-do-portal/usuarios-do-portal.constants.ts");
/* harmony import */ var app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! app/shared/services/base/base.service */ "./src/app/shared/services/base/base.service.ts");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};








var UsuariosDoPortalService = /** @class */ (function (_super) {
    __extends(UsuariosDoPortalService, _super);
    function UsuariosDoPortalService(http) {
        var _this = _super.call(this, http, "portal/usuariosDoPortal") || this;
        _this.http = http;
        _this.constantes = new _usuarios_do_portal_constants__WEBPACK_IMPORTED_MODULE_6__["UsuariosDoPortalConstants"]();
        _this.filtro = new _usuarios_do_portal_model__WEBPACK_IMPORTED_MODULE_5__["UsuariosDoPortalFilter"]();
        _this.filtroEmail = new _usuarios_do_portal_model__WEBPACK_IMPORTED_MODULE_5__["UsuariosDoPortalEmailFilter"]();
        return _this;
    }
    UsuariosDoPortalService.prototype.getByFilter = function (filter) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/portal/usuariosDoPortal/getByFilter", filter)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    UsuariosDoPortalService.prototype.getByEmail = function (filter) {
        return this.http
            .post(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/portal/usuariosDoPortal/getByEmailExistente", filter)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    UsuariosDoPortalService.prototype._getById = function (codUsuario, codDest) {
        return this.http
            .get(environments_environment__WEBPACK_IMPORTED_MODULE_4__["environment"].service_url + "/api/v1/portal/usuariosDoPortal/" + codUsuario + "/" + codDest)
            .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_2__["catchError"])(app_app_error_handler__WEBPACK_IMPORTED_MODULE_3__["ErrorHandler"].handleError));
    };
    UsuariosDoPortalService.ctorParameters = function () { return [
        { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"] }
    ]; };
    UsuariosDoPortalService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({
            providedIn: "root"
        }),
        __metadata("design:paramtypes", [_angular_common_http__WEBPACK_IMPORTED_MODULE_0__["HttpClient"]])
    ], UsuariosDoPortalService);
    return UsuariosDoPortalService;
}(app_shared_services_base_base_service__WEBPACK_IMPORTED_MODULE_7__["BaseService"]));



/***/ }),

/***/ "./src/app/shared/services/funcoes/cpf-cnpj/cpf-cnpj.service.ts":
/*!**********************************************************************!*\
  !*** ./src/app/shared/services/funcoes/cpf-cnpj/cpf-cnpj.service.ts ***!
  \**********************************************************************/
/*! exports provided: CpfCnpjService */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CpfCnpjService", function() { return CpfCnpjService; });
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js");
/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js");
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (undefined && undefined.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __importDefault = (undefined && undefined.__importDefault) || function (mod) {
  return (mod && mod.__esModule) ? mod : { "default": mod };
};


var CpfCnpjService = /** @class */ (function () {
    function CpfCnpjService() {
        this.mask$ = new rxjs__WEBPACK_IMPORTED_MODULE_1__["BehaviorSubject"]('AA.AAA.AAA/AAAA-00');
    }
    CpfCnpjService.prototype.verifica_cpf_cnpj = function (valor) {
        valor = valor.toString();
        valor = valor.replace(/[^0-9A-Za-z]/g, '');
        if (valor.length === 11) {
            return 'CPF';
        }
        else if (valor.length === 14) {
            return 'CNPJ';
        }
        else {
            return false;
        }
    };
    CpfCnpjService.prototype.valida_cpf = function (valor) {
        if (!valor)
            return true;
        valor = valor.replace(/[^0-9]/g, '');
        if (!/^\d{11}$/.test(valor))
            return false;
        // elimina CPFs inválidos conhecidos (ex: 00000000000, 11111111111 etc.)
        if (/^(\d)\1{10}$/.test(valor))
            return false;
        var digitos = valor.substring(0, 9);
        // calcula 1º DV
        var soma = 0;
        for (var i = 0; i < 9; i++) {
            soma += parseInt(digitos.charAt(i), 10) * (10 - i);
        }
        var resto = soma % 11;
        var dv1 = resto < 2 ? 0 : 11 - resto;
        // calcula 2º DV
        soma = 0;
        var digitosMaisDv1 = digitos + dv1;
        for (var i = 0; i < 10; i++) {
            soma += parseInt(digitosMaisDv1.charAt(i), 10) * (11 - i);
        }
        resto = soma % 11;
        var dv2 = resto < 2 ? 0 : 11 - resto;
        // monta CPF completo calculado
        var cpfCalculado = digitos + dv1.toString() + dv2.toString();
        return valor === cpfCalculado;
    };
    CpfCnpjService.prototype.valida_cnpj = function (cnpj) {
        function calc_digitos_cnpj(digitos) {
            var soma = 0;
            var peso = digitos.length === 12 ? 5 : 6; // 1º DV começa em 5, 2º em 6
            for (var i = 0; i < digitos.length; i++) {
                var char = digitos.charAt(i);
                var valorNumerico = void 0;
                if (/[0-9]/.test(char)) {
                    valorNumerico = parseInt(char, 10);
                }
                else if (/[A-Z]/.test(char)) {
                    valorNumerico = char.charCodeAt(0) - 48; // NT 49/2024
                }
                else {
                    throw new Error("Caractere inv\u00E1lido no CNPJ: '" + char + "'");
                }
                soma += valorNumerico * peso;
                peso--;
                if (peso < 2)
                    peso = 9;
            }
            var resto = soma % 11;
            return resto < 2 ? 0 : 11 - resto;
        }
        cnpj = cnpj.replace(/[^0-9A-Za-z]/g, '').toUpperCase();
        if (!/^[0-9A-Z]{12}[0-9]{2}$/.test(cnpj)) {
            return false;
        }
        var corpo = cnpj.substring(0, 12);
        var dv1Informado = parseInt(cnpj.charAt(12), 10);
        var dv2Informado = parseInt(cnpj.charAt(13), 10);
        var dv1Calculado = calc_digitos_cnpj(corpo);
        var dv2Calculado = calc_digitos_cnpj(corpo + dv1Calculado);
        return dv1Informado === dv1Calculado && dv2Informado === dv2Calculado;
    };
    CpfCnpjService.prototype.valida_cpf_cnpj = function (valor) {
        var valida = this.verifica_cpf_cnpj(valor);
        if (valida === 'CPF') {
            return this.valida_cpf(valor);
        }
        else if (valida === 'CNPJ') {
            return this.valida_cnpj(valor);
        }
        else {
            return false;
        }
    };
    CpfCnpjService.prototype.formata_cpf_cnpj = function (valor) {
        var formatado = "";
        var valida = this.verifica_cpf_cnpj(valor);
        if (valida === 'CPF') {
            if (this.valida_cpf(valor)) {
                formatado = valor.substr(0, 3) + '.';
                formatado += valor.substr(3, 3) + '.';
                formatado += valor.substr(6, 3) + '-';
                formatado += valor.substr(9, 2) + '';
            }
        }
        else if (valida === 'CNPJ') {
            if (this.valida_cnpj(valor)) {
                formatado = valor.substr(0, 2) + '.';
                formatado += valor.substr(2, 3) + '.';
                formatado += valor.substr(5, 3) + '/';
                formatado += valor.substr(8, 4) + '-';
                formatado += valor.substr(12, 14) + '';
            }
        }
        return formatado;
    };
    CpfCnpjService.prototype.format = function (documento, tipo) {
        var _this = this;
        if (tipo === void 0) { tipo = ''; }
        var valor = documento.replace(/[^a-zA-Z0-9]/g, '') || '';
        setTimeout(function () {
            var novaMask = 'AA.AAA.AAA/AAAA-00';
            if (tipo === 'F') {
                novaMask = '000.000.000-00';
            }
            else if (tipo === 'J') {
                if (/^[0-9]{14}$/.test(valor)) {
                    novaMask = '00.000.000/0000-00';
                }
                else if (valor.length >= 14 && /[a-zA-Z]/.test(valor)) {
                    novaMask = 'AA.AAA.AAA/AAAA-00';
                }
            }
            else {
                // tipo vazio
                if (/^[0-9]{11}$/.test(valor)) {
                    novaMask = '000.000.000-00';
                }
                else if (/^[0-9]{14}$/.test(valor)) {
                    novaMask = '00.000.000/0000-00';
                }
                else if (valor.length >= 14 && /[a-zA-Z]/.test(valor)) {
                    novaMask = 'AA.AAA.AAA/AAAA-00';
                }
            }
            _this.mask$.next(novaMask);
        });
    };
    CpfCnpjService.prototype.length = function (tipo) {
        if (tipo === 'F') {
            return 14;
        }
        else {
            return 18;
        }
    };
    CpfCnpjService = __decorate([
        Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["Injectable"])({
            providedIn: 'root'
        }),
        __metadata("design:paramtypes", [])
    ], CpfCnpjService);
    return CpfCnpjService;
}());



/***/ })

}]);
//# sourceMappingURL=app-pages-portal-usuarios-do-portal-usuarios-do-portal-module.js.map