(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["main"],{ /***/ "./$$_lazy_route_resource lazy recursive": /*!******************************************************!*\ !*** ./$$_lazy_route_resource lazy namespace object ***! \******************************************************/ /*! no static exports found */ /***/ (function(module, exports) { function webpackEmptyAsyncContext(req) { // Here Promise.resolve().then() is used instead of new Promise() to prevent // uncaught exception popping up in devtools return Promise.resolve().then(function() { var e = new Error("Cannot find module '" + req + "'"); e.code = 'MODULE_NOT_FOUND'; throw e; }); } webpackEmptyAsyncContext.keys = function() { return []; }; webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext; module.exports = webpackEmptyAsyncContext; webpackEmptyAsyncContext.id = "./$$_lazy_route_resource lazy recursive"; /***/ }), /***/ "./node_modules/raw-loader/index.js!./src/app/app.component.html": /*!**************************************************************!*\ !*** ./node_modules/raw-loader!./src/app/app.component.html ***! \**************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\n" /***/ }), /***/ "./node_modules/raw-loader/index.js!./src/app/partial/bid-highlighteds/bid-highlighteds.component.html": /*!****************************************************************************************************!*\ !*** ./node_modules/raw-loader!./src/app/partial/bid-highlighteds/bid-highlighteds.component.html ***! \****************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
\n
\n
\n

{{'FEATURED.FEATURED_TITLE' | translate}}

\n
\n
\n
\n
\n
{{'FEATURED.FEATURED_TEXT' | translate}}
\n
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
{{ highlighted.title }}
\n
\n
\n
\n
{{'FEATURED.REQUESTED' | translate}}
\n
    \n
  • \n {{ product.name + \" \" + product.quantity + \" \" + product.measurementUnit | slice: 0:28 }}...\n
  • \n
\n
\n
\n
\n {{'FEATURED.REQUESTED' | translate}}: \n {{ highlighted.dateLimit }}\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
{{ highlighted.title }}
\n
\n
\n
\n
{{'FEATURED.REQUESTED' | translate}}
\n
    \n
  • \n {{ product.name + \" \" + product.quantity + \" \" + product.measurementUnit | slice: 0:28 }}...\n
  • \n
\n
\n
\n
\n {{'FEATURED.REQUESTED' | translate}}: \n {{ highlighted.dateLimit }}\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n" /***/ }), /***/ "./node_modules/raw-loader/index.js!./src/app/partial/carousel-vertical/carousel-vertical.component.html": /*!******************************************************************************************************!*\ !*** ./node_modules/raw-loader!./src/app/partial/carousel-vertical/carousel-vertical.component.html ***! \******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\n" /***/ }), /***/ "./node_modules/raw-loader/index.js!./src/app/partial/footer/footer.component.html": /*!********************************************************************************!*\ !*** ./node_modules/raw-loader!./src/app/partial/footer/footer.component.html ***! \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\n" /***/ }), /***/ "./node_modules/raw-loader/index.js!./src/app/partial/header/header.component.html": /*!********************************************************************************!*\ !*** ./node_modules/raw-loader!./src/app/partial/header/header.component.html ***! \********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
\n
\n
\n
\n
\n
\n \n
\n
\n \n\n
\n
\n
\n
\n\n\n" /***/ }), /***/ "./node_modules/raw-loader/index.js!./src/app/partial/marquee-companies/marquee-companies.component.html": /*!******************************************************************************************************!*\ !*** ./node_modules/raw-loader!./src/app/partial/marquee-companies/marquee-companies.component.html ***! \******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\n
\n
\n
\n \n
\n \"{{\n
\n
\n
\n
\n\n\n\n\n\n" /***/ }), /***/ "./node_modules/raw-loader/index.js!./src/app/partial/pressroom-article/pressroom-article.component.html": /*!******************************************************************************************************!*\ !*** ./node_modules/raw-loader!./src/app/partial/pressroom-article/pressroom-article.component.html ***! \******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
\n
\n
\n
{{ article.title.rendered | stripTags }}
\n
\n
\n \n
\n
\n" /***/ }), /***/ "./node_modules/raw-loader/index.js!./src/app/partial/pressroom-articles/pressroom-articles.component.html": /*!********************************************************************************************************!*\ !*** ./node_modules/raw-loader!./src/app/partial/pressroom-articles/pressroom-articles.component.html ***! \********************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
\n
\n
\n
\n
\n

{{ 'PRESSROOM.PRESSROOM_TITLE' | translate}}

\n

No hay artículos relacionados.

\n
\n \n
\n
\n \n
\n
\n
\n" /***/ }), /***/ "./node_modules/raw-loader/index.js!./src/app/partial/services-buyer/services-buyer.component.html": /*!************************************************************************************************!*\ !*** ./node_modules/raw-loader!./src/app/partial/services-buyer/services-buyer.component.html ***! \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
\n
\n\n
\n
\n
\n
\n \n \n \n
\n
\n

{{ 'SERVICES_BUYER.TITLE_1' | translate}}

\n
{{ 'SERVICES_BUYER.TEXT_1' | translate}}
\n
\n
\n
\n
\n\n
\n
\n
\n
\n \n \n \n
\n
\n

{{ 'SERVICES_BUYER.TITLE_2' | translate}}

\n
{{ 'SERVICES_BUYER.TEXT_2' | translate}}
\n
\n
\n
\n
\n\n
\n
\n
\n
\n \n \n \n
\n
\n

{{ 'SERVICES_BUYER.TITLE_3' | translate}}

\n
{{ 'SERVICES_BUYER.TEXT_3' | translate}}
\n
\n
\n
\n
\n\n
\n
\n
\n
\n \n \n \n
\n
\n

{{ 'SERVICES_BUYER.TITLE_4' | translate}}

\n
{{ 'SERVICES_BUYER.TEXT_4' | translate}}
\n
\n
\n
\n
\n\n\n
\n
\n" /***/ }), /***/ "./node_modules/raw-loader/index.js!./src/app/partial/services-home/services-home.component.html": /*!**********************************************************************************************!*\ !*** ./node_modules/raw-loader!./src/app/partial/services-home/services-home.component.html ***! \**********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
\n
\n
\n
\n
\n
\n \n \n \n
\n
\n

{{ 'SERVICES_HOME.TITLE_1' | translate}}

\n
{{ 'SERVICES_HOME.TEXT_1' | translate}}
\n
\n
\n
\n
\n\n
\n
\n
\n
\n \n \n \n
\n
\n

{{ 'SERVICES_HOME.TITLE_2' | translate}}

\n
{{ 'SERVICES_HOME.TEXT_2' | translate}}
\n
\n
\n
\n
\n\n
\n
\n
\n
\n \n \n \n
\n
\n

{{ 'SERVICES_HOME.TITLE_3' | translate}}

\n
{{ 'SERVICES_HOME.TEXT_3' | translate}}
\n
\n
\n
\n
\n\n
\n
\n
\n
\n \n \n \n
\n
\n

{{ 'SERVICES_HOME.TITLE_4' | translate}}

\n
{{ 'SERVICES_HOME.TEXT_4' | translate}}
\n
\n
\n
\n
\n\n\n
\n
\n\n" /***/ }), /***/ "./node_modules/raw-loader/index.js!./src/app/partial/services-offer/services-offer.component.html": /*!************************************************************************************************!*\ !*** ./node_modules/raw-loader!./src/app/partial/services-offer/services-offer.component.html ***! \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
\n
\n
\n
\n
\n
\n \n \n \n
\n
\n

{{service.title}}

\n
{{service.text}}
\n
\n
\n
\n
\n
\n
\n" /***/ }), /***/ "./node_modules/raw-loader/index.js!./src/app/partial/services-supplier/services-supplier.component.html": /*!******************************************************************************************************!*\ !*** ./node_modules/raw-loader!./src/app/partial/services-supplier/services-supplier.component.html ***! \******************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
\n
\n\n
\n
\n
\n
\n \n \n \n
\n
\n

{{ 'SERVICES_SUPPLIER.TITLE_1' | translate}}

\n
{{ 'SERVICES_SUPPLIER.TEXT_1' | translate}}
\n
\n
\n
\n
\n\n
\n
\n
\n
\n \n \n \n
\n
\n

{{ 'SERVICES_SUPPLIER.TITLE_2' | translate}}

\n
{{ 'SERVICES_SUPPLIER.TEXT_2' | translate}}
\n
\n
\n
\n
\n\n
\n
\n
\n
\n \n \n \n
\n
\n

{{ 'SERVICES_SUPPLIER.TITLE_3' | translate}}

\n
{{ 'SERVICES_SUPPLIER.TEXT_3' | translate}}
\n
\n
\n
\n
\n\n
\n
\n
\n
\n \n \n \n
\n
\n

{{ 'SERVICES_SUPPLIER.TITLE_4' | translate}}

\n
{{ 'SERVICES_SUPPLIER.TEXT_4' | translate}}
\n
\n
\n
\n
\n\n
\n
\n\n" /***/ }), /***/ "./node_modules/raw-loader/index.js!./src/app/partial/statistics/statistics.component.html": /*!****************************************************************************************!*\ !*** ./node_modules/raw-loader!./src/app/partial/statistics/statistics.component.html ***! \****************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
\n
\n
\n
\n
\n
\n
\n \n {{ statisticsBox.totalProposals }}\n \n
\n
\n
\n
\n
\n \n {{ statisticsBox.totalUsers }}\n \n
\n
\n
\n
\n
\n \n {{ statisticsBar.buyersPlusSuppliers }}\n \n
\n
\n
\n
\n
\n
\n
\n
\n" /***/ }), /***/ "./node_modules/raw-loader/index.js!./src/app/partial/testimonials/testimonials.component.html": /*!********************************************************************************************!*\ !*** ./node_modules/raw-loader!./src/app/partial/testimonials/testimonials.component.html ***! \********************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
\n
\n
\n
\n

{{ 'HOME.TESTIMONIAL' | translate}}

\n
\n
\n
\n
\n
\n
\n
\n
{{ testimonial.author }}
\n

{{ testimonial.company }}

\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n

\"{{wgd.comment | translate}}\"

\n
\n
{{ wgd.author }}
\n

{{wgd.charge | translate}} - {{ wgd.company }}

\n
\n
\n
\n
\n
\n
\n
\n" /***/ }), /***/ "./node_modules/raw-loader/index.js!./src/app/phone-input/phone-input.component.html": /*!**********************************************************************************!*\ !*** ./node_modules/raw-loader!./src/app/phone-input/phone-input.component.html ***! \**********************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
\n \n
\n
\n

{{ 'SUPPLIER_REGISTER.SR_USER_PHONE_INVALID' | translate }}

\n
\n
\n

{{ 'SUPPLIER_REGISTER.SR_INPUT_MANDATORY' | translate }}

\n
\n
\n \n
\n
\n

{{ 'SUPPLIER_REGISTER.SR_USER_PHONE_INVALID' | translate }}

\n
\n\n
\n \n
\n
\n

{{ 'SUPPLIER_REGISTER.SR_USER_PHONE_INVALID' | translate }}

\n
\n \n " /***/ }), /***/ "./node_modules/raw-loader/index.js!./src/app/suppliers-register/suppliers-register.component.html": /*!************************************************************************************************!*\ !*** ./node_modules/raw-loader!./src/app/suppliers-register/suppliers-register.component.html ***! \************************************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
\n
\n
\n
\n
\n\n
\n
\n
\n

{{'SUPPLIER_REGISTER.SR_TITLE' | translate}}

\n
\n
\n
    \n
  1. 1}\">\n {{'SUPPLIER_REGISTER.SR_DOTS_1' | translate}}\n
  2. \n
  3. 2, 'progress__last': steep < 2}\">\n {{'SUPPLIER_REGISTER.SR_DOTS_2' | translate}}\n
  4. \n
  5. 3, 'progress__last': steep < 3}\" *ngIf=\"!companyExists || steep===1\">\n {{'SUPPLIER_REGISTER.SR_DOTS_3' | translate}}\n
  6. \n
  7. \n {{'SUPPLIER_REGISTER.SR_DOTS_4' | translate}}\n
  8. \n
\n
\n
\n
\n
\n
\n \n
\n
\n

{{'SUPPLIER_REGISTER.SR_VALIDATING_CHILE' | translate}}

\n

{{'SUPPLIER_REGISTER.SR_VALIDATED' | translate}}

\n
\n
\n
\n

\n

\n
\n
\n
\n
\n
\n \n
\n
\n

{{'SUPPLIER_REGISTER.SR_VALIDATING' | translate}}

\n

{{'SUPPLIER_REGISTER.SR_VALIDATED' | translate}}

\n
\n
\n
\n\n
\n
\n
\n \n

\n El\n {{'SUPPLIER_REGISTER.SR_RUT' | translate}}\n {{'SUPPLIER_REGISTER.SR_NIT' | translate}}\n {{'SUPPLIER_REGISTER.SR_RUC' | translate}}\n {{'SUPPLIER_REGISTER.SR_RFC' | translate}}\n de empresa ya se encuentra registrado en el sistema.\n Notificaremos al administrador de la empresa mediante e-mail, rellena los datos de usuario para gestionar la creación de tu cuenta.

\n
\n
\n x\n
    \n
  • {{error | translate}}
  • \n
\n
\n \n
\n
\n {{'SUPPLIER_REGISTER.SR_LOCATION' | translate}}\n
\n
\n
\n \n \n
\n
\n

{{'SUPPLIER_REGISTER.SR_COUNTRY_REQ' | translate}}

\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n

{{'SUPPLIER_REGISTER.SR_INPUT_MANDATORY' | translate}}

\n
\n
\n
\n
\n
\n
\n\n
\n
\n \n \n
\n
\n

{{'SUPPLIER_REGISTER.SR_INPUT_MANDATORY' | translate}}

\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n

{{'SUPPLIER_REGISTER.SR_INPUT_MANDATORY' | translate}}

\n
\n
\n
\n
\n
\n
\n\n
\n
\n \n \n
\n
\n

{{'SUPPLIER_REGISTER.SR_INPUT_MANDATORY' | translate}}

\n
\n
\n
\n
\n
\n {{'SUPPLIER_REGISTER.SR_COM_DATA' | translate}}\n
\n
\n
\n \n \n
\n
\n

{{'SUPPLIER_REGISTER.SR_INPUT_MANDATORY' | translate}}

\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n

{{'SUPPLIER_REGISTER.SR_INPUT_MANDATORY' | translate}}

\n
\n
\n
\n
\n
\n
\n
\n
\n \n \n
\n

RUT {{'SUPPLIER_REGISTER.SR_COM_ID_INVALID' | translate}}

\n
\n
\n
\n
\n
\n \n \n
\n

RUC {{'SUPPLIER_REGISTER.SR_COM_ID_INVALID' | translate}}

\n
\n
\n
\n
\n
\n \n \n
\n

RFC {{'SUPPLIER_REGISTER.SR_COM_ID_INVALID' | translate}}

\n
\n
\n
\n
\n
\n \n \n
\n

NIT {{'SUPPLIER_REGISTER.SR_COM_ID_INVALID' | translate}}

\n
\n
\n

NIT {{'SUPPLIER_REGISTER.SR_COM_ID_INVALID_FORMAT' | translate}}

\n
\n
\n
\n\n
\n
\n \n \n
\n
\n

{{'SUPPLIER_REGISTER.SR_INPUT_MANDATORY' | translate}}

\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n
\n \n
\n
\n {{'SUPPLIER_REGISTER.SR_USER_DATA' | translate}}\n
\n
\n
\n \n \n
\n
\n

{{'SUPPLIER_REGISTER.SR_INPUT_MANDATORY' | translate}}

\n
\n
\n
\n
\n
\n
\n \n \n
\n
\n

{{'SUPPLIER_REGISTER.SR_INPUT_MANDATORY' | translate}}

\n
\n
\n
\n
\n

{{'SUPPLIER_REGISTER.SR_USER_EMAIL_INVALID' | translate}}

\n
\n
\n
\n
\n
\n
\n
\n \n
\n \n
\n
\n
\n \n
\n \n
\n
\n
\n\n\n
\n
\n
\n \n \n
\n
\n
\n
\n\n
\n {{'SUPPLIER_REGISTER.SR_BILLING_CONTACT' | translate}}\n
\n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n

{{'SUPPLIER_REGISTER.SR_USER_EMAIL_INVALID' | translate}}

\n
\n
\n
\n
\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n

{{'SUPPLIER_REGISTER.SR_CAT_TITLE' | translate}}

\n
\n
\n

{{'SUPPLIER_REGISTER.SR_CAT_TEXT' | translate}}

\n
\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n \n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n \n
\n \n \n
\n
\n
\n
\n
\n « \n
\n
\n
\n
\n
\n « \n {{'SUPPLIER_REGISTER.SR_CAT_SELECT' | translate}}\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n

2\">{{'SUPPLIER_REGISTER.SR_MANDATORY' | translate}} (*)
\n {{'SUPPLIER_REGISTER.SR_MANDATORY_CL' | translate}}\n {{'SUPPLIER_REGISTER.SR_MANDATORY_GB' | translate}}\n

\n
\n \"Bolsa\"\n
\n

wherEX Pay

\n

\n
\n \n
\n \n
\n
\n
\n
\n
\n

\n

\n
\n

\n
\n
\n\n
\n
\n
\n

\n
\n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n \n \n
\n
\n
\n
\n
\n \n
\n

{{'SUPPLIER_REGISTER.SR_CAPTCHA' | translate}}

\n
\n
\n
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n" /***/ }), /***/ "./node_modules/raw-loader/index.js!./src/app/suppliers/suppliers.component.html": /*!******************************************************************************!*\ !*** ./node_modules/raw-loader!./src/app/suppliers/suppliers.component.html ***! \******************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "
\n
\n
\n
\n
\n

{{ 'SUPPLIERS.SUPPLIERS_TITLE' | translate}}

\n

{{ 'SUPPLIERS.SUPPLIERS_TEXT' | translate}}

\n
\n
    \n
  • +{{format2(this.statisticsBar.totalRequirements) }} {{ 'SUPPLIERS.SUPPLIERS_LI_1' | translate}}
  • \n
  • \n
\n
\n
\n
\n
\n

{{'SUPPLIER_REGISTER.SR_TITLE' | translate}}

\n
\n \n \n
\n
\n

{{'SUPPLIER_REGISTER.SR_INPUT_MANDATORY' | translate}}

\n
\n
\n
\n
\n \n \n
\n
\n

Longitud del email invalida.

\n

{{'SUPPLIER_REGISTER.SR_USER_EMAIL_INVALID' | translate}}

\n
\n
\n
\n
\n \n \n
\n
\n

{{'SUPPLIER_REGISTER.SR_INPUT_MANDATORY' | translate}}

\n
\n
\n

{{'SUPPLIER_REGISTER.SR_MANDATORY' | translate}} (*)
\n {{'SUPPLIER_REGISTER.SR_MANDATORY_1' | translate}}\n

\n
200\">\n {{ errors }}\n
\n
\n
\n \n
\n
\n
\n
\n
\n
\n
\n\n
\n \n
\n \n
\n \n
\n
\n
\n

{{ 'SUPPLIERS.MARQUEE' | translate}}

\n \n
\n
\n
\n" /***/ }), /***/ "./src/app/app.component.ts": /*!**********************************!*\ !*** ./src/app/app.component.ts ***! \**********************************/ /*! exports provided: MetaService, AppComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MetaService", function() { return MetaService; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppComponent", function() { return AppComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js"); /* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); /* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js"); var MetaService = /** @class */ (function () { function MetaService(titleService, meta, router, activatedRoute) { this.titleService = titleService; this.meta = meta; this.router = router; this.activatedRoute = activatedRoute; } MetaService.prototype.updateTitle = function (title, description) { var _this = this; if (!title) { this.router.events .pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["filter"])(function (event) { return event instanceof _angular_router__WEBPACK_IMPORTED_MODULE_3__["NavigationEnd"]; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["map"])(function () { return _this.activatedRoute; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["map"])(function (route) { while (route.firstChild) { route = route.firstChild; } return route; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["filter"])(function (route) { return route.outlet === 'primary'; }), Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["mergeMap"])(function (route) { return route.data; })).subscribe(function (event) { _this.titleService.setTitle(event['title']); _this.meta.updateTag({ name: 'description', content: event['description'] }); }); } else { this.titleService.setTitle(title); this.meta.updateTag({ name: 'description', content: event['description'] }); } }; MetaService.ctorParameters = function () { return [ { type: _angular_platform_browser__WEBPACK_IMPORTED_MODULE_2__["Title"] }, { type: _angular_platform_browser__WEBPACK_IMPORTED_MODULE_2__["Meta"] }, { type: _angular_router__WEBPACK_IMPORTED_MODULE_3__["Router"] }, { type: _angular_router__WEBPACK_IMPORTED_MODULE_3__["ActivatedRoute"] } ]; }; MetaService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({ providedIn: 'root' }) ], MetaService); return MetaService; }()); var AppComponent = /** @class */ (function () { function AppComponent(meta) { this.meta = meta; this.meta.updateTitle(); } AppComponent.prototype.ngOnInit = function () { }; AppComponent.ctorParameters = function () { return [ { type: MetaService } ]; }; AppComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ selector: 'app-root', template: __webpack_require__(/*! raw-loader!./app.component.html */ "./node_modules/raw-loader/index.js!./src/app/app.component.html"), }) ], AppComponent); return AppComponent; }()); /***/ }), /***/ "./src/app/app.module.ts": /*!*******************************!*\ !*** ./src/app/app.module.ts ***! \*******************************/ /*! exports provided: AppModule, HttpLoaderFactory */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppModule", function() { return AppModule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HttpLoaderFactory", function() { return HttpLoaderFactory; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/platform-browser */ "./node_modules/@angular/platform-browser/fesm5/platform-browser.js"); /* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/forms */ "./node_modules/@angular/forms/fesm5/forms.js"); /* harmony import */ var ng2_rut__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ng2-rut */ "./node_modules/ng2-rut/dist/ng2-rut.module.js"); /* harmony import */ var ng2_rut__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(ng2_rut__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var ng_recaptcha__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ng-recaptcha */ "./node_modules/ng-recaptcha/index.js"); /* harmony import */ var ng_recaptcha__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(ng_recaptcha__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _ngx_translate_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js"); /* harmony import */ var _ngx_translate_http_loader__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ngx-translate/http-loader */ "./node_modules/@ngx-translate/http-loader/fesm5/ngx-translate-http-loader.js"); /* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/common */ "./node_modules/@angular/common/fesm5/common.js"); /* harmony import */ var _app_component__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./app.component */ "./src/app/app.component.ts"); /* harmony import */ var _app_routing__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./app.routing */ "./src/app/app.routing.ts"); /* harmony import */ var ngx_slick_carousel__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ngx-slick-carousel */ "./node_modules/ngx-slick-carousel/fesm5/ngx-slick-carousel.js"); /* harmony import */ var _suppliers_register_suppliers_register_component__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./suppliers-register/suppliers-register.component */ "./src/app/suppliers-register/suppliers-register.component.ts"); /* harmony import */ var _suppliers_suppliers_component__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./suppliers/suppliers.component */ "./src/app/suppliers/suppliers.component.ts"); /* harmony import */ var _partial_header_header_component__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./partial/header/header.component */ "./src/app/partial/header/header.component.ts"); /* harmony import */ var _partial_footer_footer_component__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./partial/footer/footer.component */ "./src/app/partial/footer/footer.component.ts"); /* harmony import */ var _partial_carousel_vertical_carousel_vertical_component__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./partial/carousel-vertical/carousel-vertical.component */ "./src/app/partial/carousel-vertical/carousel-vertical.component.ts"); /* harmony import */ var _partial_services_offer_services_offer_component__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./partial/services-offer/services-offer.component */ "./src/app/partial/services-offer/services-offer.component.ts"); /* harmony import */ var _partial_statistics_statistics_component__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./partial/statistics/statistics.component */ "./src/app/partial/statistics/statistics.component.ts"); /* harmony import */ var _partial_bid_highlighteds_bid_highlighteds_component__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./partial/bid-highlighteds/bid-highlighteds.component */ "./src/app/partial/bid-highlighteds/bid-highlighteds.component.ts"); /* harmony import */ var _partial_testimonials_testimonials_component__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./partial/testimonials/testimonials.component */ "./src/app/partial/testimonials/testimonials.component.ts"); /* harmony import */ var _partial_pressroom_article_pressroom_article_component__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./partial/pressroom-article/pressroom-article.component */ "./src/app/partial/pressroom-article/pressroom-article.component.ts"); /* harmony import */ var _partial_pressroom_articles_pressroom_articles_component__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./partial/pressroom-articles/pressroom-articles.component */ "./src/app/partial/pressroom-articles/pressroom-articles.component.ts"); /* harmony import */ var _partial_marquee_companies_marquee_companies_component__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./partial/marquee-companies/marquee-companies.component */ "./src/app/partial/marquee-companies/marquee-companies.component.ts"); /* harmony import */ var _pipes_strip_tags_pipe__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./pipes/strip-tags.pipe */ "./src/app/pipes/strip-tags.pipe.ts"); /* harmony import */ var _services_system_api_service__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./services/system-api.service */ "./src/app/services/system-api.service.ts"); /* harmony import */ var _pipes_no_comma_pipe__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./pipes/no-comma.pipe */ "./src/app/pipes/no-comma.pipe.ts"); /* harmony import */ var _services_vali_rut_service__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./services/vali-rut.service */ "./src/app/services/vali-rut.service.ts"); /* harmony import */ var _partial_services_buyer_services_buyer_component__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./partial/services-buyer/services-buyer.component */ "./src/app/partial/services-buyer/services-buyer.component.ts"); /* harmony import */ var _partial_services_supplier_services_supplier_component__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./partial/services-supplier/services-supplier.component */ "./src/app/partial/services-supplier/services-supplier.component.ts"); /* harmony import */ var _partial_services_home_services_home_component__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./partial/services-home/services-home.component */ "./src/app/partial/services-home/services-home.component.ts"); /* harmony import */ var _phone_input_phone_input_component__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./phone-input/phone-input.component */ "./src/app/phone-input/phone-input.component.ts"); // ANGULAR // Internacionalization // APP // library // SECTIONS // PARTIALS // MODALS // PIPES // SERVICES var AppModule = /** @class */ (function () { function AppModule() { } AppModule = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_3__["NgModule"])({ declarations: [ // APP _app_component__WEBPACK_IMPORTED_MODULE_10__["AppComponent"], // SECTIONS _suppliers_register_suppliers_register_component__WEBPACK_IMPORTED_MODULE_13__["SuppliersRegisterComponent"], _suppliers_suppliers_component__WEBPACK_IMPORTED_MODULE_14__["SuppliersComponent"], // PARTIALS _partial_header_header_component__WEBPACK_IMPORTED_MODULE_15__["HeaderComponent"], _partial_footer_footer_component__WEBPACK_IMPORTED_MODULE_16__["FooterComponent"], _partial_carousel_vertical_carousel_vertical_component__WEBPACK_IMPORTED_MODULE_17__["CarouselVerticalComponent"], _partial_bid_highlighteds_bid_highlighteds_component__WEBPACK_IMPORTED_MODULE_20__["BidHighlightedsComponent"], _partial_pressroom_article_pressroom_article_component__WEBPACK_IMPORTED_MODULE_22__["PressroomArticleComponent"], _partial_pressroom_articles_pressroom_articles_component__WEBPACK_IMPORTED_MODULE_23__["PressroomArticlesComponent"], _partial_testimonials_testimonials_component__WEBPACK_IMPORTED_MODULE_21__["TestimonialsComponent"], _partial_statistics_statistics_component__WEBPACK_IMPORTED_MODULE_19__["StatisticsComponent"], _partial_services_offer_services_offer_component__WEBPACK_IMPORTED_MODULE_18__["ServicesOfferComponent"], _partial_marquee_companies_marquee_companies_component__WEBPACK_IMPORTED_MODULE_24__["MarqueeCompaniesComponent"], // MODALS // PIPES _pipes_strip_tags_pipe__WEBPACK_IMPORTED_MODULE_25__["StripTagsPipe"], _pipes_no_comma_pipe__WEBPACK_IMPORTED_MODULE_27__["NoCommaPipe"], _partial_services_buyer_services_buyer_component__WEBPACK_IMPORTED_MODULE_29__["ServicesBuyerComponent"], _partial_services_supplier_services_supplier_component__WEBPACK_IMPORTED_MODULE_30__["ServicesSupplierComponent"], _partial_services_home_services_home_component__WEBPACK_IMPORTED_MODULE_31__["ServicesHomeComponent"], _phone_input_phone_input_component__WEBPACK_IMPORTED_MODULE_32__["PhoneInputComponent"], ], imports: [ _angular_platform_browser__WEBPACK_IMPORTED_MODULE_1__["BrowserModule"], _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClientModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_4__["FormsModule"], _angular_forms__WEBPACK_IMPORTED_MODULE_4__["ReactiveFormsModule"], ng2_rut__WEBPACK_IMPORTED_MODULE_5__["Ng2Rut"], ng_recaptcha__WEBPACK_IMPORTED_MODULE_6__["RecaptchaModule"].forRoot(), _app_routing__WEBPACK_IMPORTED_MODULE_11__["AppRouting"], ngx_slick_carousel__WEBPACK_IMPORTED_MODULE_12__["SlickCarouselModule"], // internacionalization _ngx_translate_core__WEBPACK_IMPORTED_MODULE_7__["TranslateModule"].forRoot({ loader: { provide: _ngx_translate_core__WEBPACK_IMPORTED_MODULE_7__["TranslateLoader"], useFactory: HttpLoaderFactory, deps: [_angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"]] } }) ], providers: [ _services_system_api_service__WEBPACK_IMPORTED_MODULE_26__["SystemApiService"], _services_vali_rut_service__WEBPACK_IMPORTED_MODULE_28__["ValiRutService"], { provide: _angular_common__WEBPACK_IMPORTED_MODULE_9__["LocationStrategy"], useClass: _angular_common__WEBPACK_IMPORTED_MODULE_9__["HashLocationStrategy"] }, { provide: ng_recaptcha__WEBPACK_IMPORTED_MODULE_6__["RECAPTCHA_LANGUAGE"], useValue: navigator.language } ], bootstrap: [_app_component__WEBPACK_IMPORTED_MODULE_10__["AppComponent"]] }) ], AppModule); return AppModule; }()); // translation function HttpLoaderFactory(http) { return new _ngx_translate_http_loader__WEBPACK_IMPORTED_MODULE_8__["TranslateHttpLoader"](http); } /***/ }), /***/ "./src/app/app.routing.ts": /*!********************************!*\ !*** ./src/app/app.routing.ts ***! \********************************/ /*! exports provided: AppRouting */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppRouting", function() { return AppRouting; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* 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 _suppliers_register_suppliers_register_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./suppliers-register/suppliers-register.component */ "./src/app/suppliers-register/suppliers-register.component.ts"); // ANGULAR // SECTIONS var routes = [ { path: '', component: _suppliers_register_suppliers_register_component__WEBPACK_IMPORTED_MODULE_3__["SuppliersRegisterComponent"], data: { title: 'Registro de proveedores - wherEX', description: 'Regístrate gratis como proveedor y accede a la demanda de importantes empresas' } } ]; var AppRouting = /** @class */ (function () { function AppRouting() { } AppRouting = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["NgModule"])({ imports: [_angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterModule"].forRoot(routes, { onSameUrlNavigation: 'reload', scrollPositionRestoration: 'top' })], exports: [_angular_router__WEBPACK_IMPORTED_MODULE_2__["RouterModule"]] }) ], AppRouting); return AppRouting; }()); /***/ }), /***/ "./src/app/partial/bid-highlighteds/bid-highlighteds.component.ts": /*!************************************************************************!*\ !*** ./src/app/partial/bid-highlighteds/bid-highlighteds.component.ts ***! \************************************************************************/ /*! exports provided: BidHighlightedsComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BidHighlightedsComponent", function() { return BidHighlightedsComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _services_system_api_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../services/system-api.service */ "./src/app/services/system-api.service.ts"); var BidHighlightedsComponent = /** @class */ (function () { function BidHighlightedsComponent(systemApiService) { this.systemApiService = systemApiService; this.statusSelector = 0; this.highlightedsGoodsPages = []; this.highlightedsServicesPages = []; } BidHighlightedsComponent.prototype.ngOnInit = function () { this.loading = true; this.highlightedsLimit = 4; this.highlighteds = []; this.goods = 1; this.getHighliteds(); this.page = 0; }; BidHighlightedsComponent.prototype.changeType = function (type) { this.statusSelector = type; this.page = 0; }; BidHighlightedsComponent.prototype.selectPage = function (page) { this.page = page; }; BidHighlightedsComponent.prototype.getHighliteds = function () { var _this = this; this.systemApiService.getBidHighlighteds() .subscribe(function (result) { _this.highlighteds.goods = result[0].data; _this.highlighteds.services = result[1].data; _this.highlightedsGoodsPagesNumber = Math.ceil(_this.highlighteds.goods.length / _this.highlightedsLimit); _this.highlightedsServicesPagesNumber = Math.ceil(_this.highlighteds.services.length / _this.highlightedsLimit); for (var i = 0; i < _this.highlightedsGoodsPagesNumber; i++) { _this.highlightedsGoodsPages.push(i); } for (var i = 0; i < _this.highlightedsServicesPagesNumber; i++) { _this.highlightedsServicesPages.push(i); } _this.loading = false; }); }; BidHighlightedsComponent.ctorParameters = function () { return [ { type: _services_system_api_service__WEBPACK_IMPORTED_MODULE_2__["SystemApiService"] } ]; }; BidHighlightedsComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ selector: 'app-bid-highlighteds', template: __webpack_require__(/*! raw-loader!./bid-highlighteds.component.html */ "./node_modules/raw-loader/index.js!./src/app/partial/bid-highlighteds/bid-highlighteds.component.html") }) ], BidHighlightedsComponent); return BidHighlightedsComponent; }()); /***/ }), /***/ "./src/app/partial/carousel-vertical/carousel-vertical.component.ts": /*!**************************************************************************!*\ !*** ./src/app/partial/carousel-vertical/carousel-vertical.component.ts ***! \**************************************************************************/ /*! exports provided: CarouselVerticalComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CarouselVerticalComponent", function() { return CarouselVerticalComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _services_system_api_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../services/system-api.service */ "./src/app/services/system-api.service.ts"); var CarouselVerticalComponent = /** @class */ (function () { function CarouselVerticalComponent(systemApiService) { this.systemApiService = systemApiService; this.statisticsHeader = { roundTotalCompanies: 0, totalSuppliers: 0, totalBuyers: 0, totalRequestsActives: 0, }; // Declarations of vars this.pos = 0; this.collectionsImgs = []; } CarouselVerticalComponent.prototype.ngOnInit = function () { this.getStatistics(); }; CarouselVerticalComponent.prototype.getStatistics = function () { var _this = this; this.systemApiService.getStatisticsHeader() .subscribe(function (result) { _this.statisticsHeader = result; _this.collectionsImgs = [ { id: 0, idName: 'img1', background: 'slider-home/slider-desktop-02.jpg', id_title: 0, title: 'Nuestro portal de compras
conecta a más de
' + _this.format(_this.statisticsHeader.roundTotalCompanies) + ' empresas.', descripcion: 'Accede a la mayor cobertura de oferta y demanda privada en pocos clicks.' }, { id: 1, idName: 'img2', background: 'slider-home/slider-desktop-01.jpg', id_title: 1, title: '' + _this.statisticsHeader.totalBuyers + ' compradores realizan
transacciones competitivas
y transparentes.', descripcion: 'Tu demanda conecta con la oferta de proveedores.' }, { id: 2, idName: 'img3', background: 'slider-home/slider-desktop-03.jpg', id_title: 2, title: 'Hay ' + _this.format(_this.statisticsHeader.totalRequestsActives) + ' requerimientos de
bienes y servicios activos
en la plataforma.', descripcion: 'Oportunidades de negocio con grandes empresas compradoras diariamente.' } ]; }); }; CarouselVerticalComponent.prototype.format = function (value) { return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.'); }; CarouselVerticalComponent.ctorParameters = function () { return [ { type: _services_system_api_service__WEBPACK_IMPORTED_MODULE_2__["SystemApiService"] } ]; }; CarouselVerticalComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ selector: 'app-carousel-vertical', template: __webpack_require__(/*! raw-loader!./carousel-vertical.component.html */ "./node_modules/raw-loader/index.js!./src/app/partial/carousel-vertical/carousel-vertical.component.html") }) ], CarouselVerticalComponent); return CarouselVerticalComponent; }()); /***/ }), /***/ "./src/app/partial/footer/footer.component.ts": /*!****************************************************!*\ !*** ./src/app/partial/footer/footer.component.ts ***! \****************************************************/ /*! exports provided: FooterComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FooterComponent", function() { return FooterComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var FooterComponent = /** @class */ (function () { function FooterComponent() { } FooterComponent.prototype.ngOnInit = function () { }; FooterComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ selector: 'app-footer', template: __webpack_require__(/*! raw-loader!./footer.component.html */ "./node_modules/raw-loader/index.js!./src/app/partial/footer/footer.component.html") }) ], FooterComponent); return FooterComponent; }()); /***/ }), /***/ "./src/app/partial/header/header.component.ts": /*!****************************************************!*\ !*** ./src/app/partial/header/header.component.ts ***! \****************************************************/ /*! exports provided: HeaderComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HeaderComponent", function() { return HeaderComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _ngx_translate_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js"); var HeaderComponent = /** @class */ (function () { function HeaderComponent(translate) { this.translate = translate; this.mobileMenu = function () { jquery__WEBPACK_IMPORTED_MODULE_2__(".toggle-mobile").click(function () { jquery__WEBPACK_IMPORTED_MODULE_2__('#navMobile').attr('style', 'width: 260px'); jquery__WEBPACK_IMPORTED_MODULE_2__('.over-content').show(); }); jquery__WEBPACK_IMPORTED_MODULE_2__(".over-content, .sidenav ul li a").click(function () { jquery__WEBPACK_IMPORTED_MODULE_2__('#navMobile').attr('style', 'width: 0px'); jquery__WEBPACK_IMPORTED_MODULE_2__('.over-content').hide(); }); }; //internacionalization translate.addLangs(['es_ES', 'en_GB']); translate.setDefaultLang('es_ES'); var browserLang = translate.getBrowserLang(); translate.use(browserLang.match(/es_ES|en_GB/) ? browserLang : 'es_ES'); } HeaderComponent.prototype.ngOnInit = function () { var _this = this; jquery__WEBPACK_IMPORTED_MODULE_2__(function () { _this.mobileMenu(); }); }; HeaderComponent.ctorParameters = function () { return [ { type: _ngx_translate_core__WEBPACK_IMPORTED_MODULE_3__["TranslateService"] } ]; }; HeaderComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ selector: 'app-header', template: __webpack_require__(/*! raw-loader!./header.component.html */ "./node_modules/raw-loader/index.js!./src/app/partial/header/header.component.html") }) ], HeaderComponent); return HeaderComponent; }()); /***/ }), /***/ "./src/app/partial/marquee-companies/marquee-companies.component.ts": /*!**************************************************************************!*\ !*** ./src/app/partial/marquee-companies/marquee-companies.component.ts ***! \**************************************************************************/ /*! exports provided: MarqueeCompaniesComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MarqueeCompaniesComponent", function() { return MarqueeCompaniesComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _services_system_api_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../services/system-api.service */ "./src/app/services/system-api.service.ts"); var MarqueeCompaniesComponent = /** @class */ (function () { function MarqueeCompaniesComponent(systemApiService) { this.systemApiService = systemApiService; this.loading = true; this.buyers = []; this.slideConfig = { slidesToShow: 10, slidesToScroll: 6, autoplay: true, arrows: false, dots: false, pauseOnHover: true, pauseOnFocus: true, draggable: true, speed: 500, touchThreshold: 6, easing: 'ease', rows: 2, responsive: [{ breakpoint: 992, settings: { slidesToShow: 6, slidesToScroll: 6 } }, { breakpoint: 520, settings: { slidesToShow: 3, slidesToScroll: 3 } }] }; } MarqueeCompaniesComponent.prototype.ngOnInit = function () { this.buyersLength = 0; this.getBuyers(); }; MarqueeCompaniesComponent.prototype.getBuyers = function () { var _this = this; this.systemApiService.getBuyers() .subscribe(function (result) { _this.loading = false; _this.buyers = result; _this.buyersLength = result.length; }); }; MarqueeCompaniesComponent.ctorParameters = function () { return [ { type: _services_system_api_service__WEBPACK_IMPORTED_MODULE_2__["SystemApiService"] } ]; }; MarqueeCompaniesComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ selector: 'app-marquee-companies', template: __webpack_require__(/*! raw-loader!./marquee-companies.component.html */ "./node_modules/raw-loader/index.js!./src/app/partial/marquee-companies/marquee-companies.component.html") }) ], MarqueeCompaniesComponent); return MarqueeCompaniesComponent; }()); /***/ }), /***/ "./src/app/partial/pressroom-article/pressroom-article.component.ts": /*!**************************************************************************!*\ !*** ./src/app/partial/pressroom-article/pressroom-article.component.ts ***! \**************************************************************************/ /*! exports provided: PressroomArticleComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PressroomArticleComponent", function() { return PressroomArticleComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var PressroomArticleComponent = /** @class */ (function () { function PressroomArticleComponent() { this.styles = false; } PressroomArticleComponent.prototype.ngOnInit = function () { if (undefined !== this.article._embedded['wp:featuredmedia'] && this.article._embedded['wp:featuredmedia'].length > 0) { var sourceUrl = this.article._embedded['wp:featuredmedia'][0].source_url; this.styles = { 'background-image': "url(\"" + sourceUrl + "\")", 'background-size': 'cover' }; } }; tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])() ], PressroomArticleComponent.prototype, "article", void 0); PressroomArticleComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ selector: 'app-pressroom-article', template: __webpack_require__(/*! raw-loader!./pressroom-article.component.html */ "./node_modules/raw-loader/index.js!./src/app/partial/pressroom-article/pressroom-article.component.html"), }) ], PressroomArticleComponent); return PressroomArticleComponent; }()); /***/ }), /***/ "./src/app/partial/pressroom-articles/pressroom-articles.component.ts": /*!****************************************************************************!*\ !*** ./src/app/partial/pressroom-articles/pressroom-articles.component.ts ***! \****************************************************************************/ /*! exports provided: PressroomArticlesComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PressroomArticlesComponent", function() { return PressroomArticlesComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var src_app_services_wordpress_api_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/services/wordpress-api.service */ "./src/app/services/wordpress-api.service.ts"); var PressroomArticlesComponent = /** @class */ (function () { function PressroomArticlesComponent(wordpressApiService) { this.wordpressApiService = wordpressApiService; this.loading = true; this.link = false; this.articles = []; } PressroomArticlesComponent.prototype.ngOnInit = function () { switch (this.type) { case 'latest': this.title = 'Sala de Prensa'; this.link = true; this.getLastestArticles(); break; case 'related': this.title = 'Artículos relacionados'; if (this.tags.length) { this.getLastestArticles(); } else { this.loading = false; } break; } }; PressroomArticlesComponent.prototype.getLastestArticles = function () { var _this = this; this.wordpressApiService.getArticles({ tags: this.tags, exclude: this.exclude }, {}, 4) .subscribe(function (articles) { _this.articles = articles; _this.loading = false; }); }; PressroomArticlesComponent.ctorParameters = function () { return [ { type: src_app_services_wordpress_api_service__WEBPACK_IMPORTED_MODULE_2__["WordpressApiService"] } ]; }; tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])() ], PressroomArticlesComponent.prototype, "type", void 0); tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])() ], PressroomArticlesComponent.prototype, "tags", void 0); tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])() ], PressroomArticlesComponent.prototype, "exclude", void 0); PressroomArticlesComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ selector: 'app-pressroom-articles', template: __webpack_require__(/*! raw-loader!./pressroom-articles.component.html */ "./node_modules/raw-loader/index.js!./src/app/partial/pressroom-articles/pressroom-articles.component.html"), }) ], PressroomArticlesComponent); return PressroomArticlesComponent; }()); /***/ }), /***/ "./src/app/partial/services-buyer/services-buyer.component.scss": /*!**********************************************************************!*\ !*** ./src/app/partial/services-buyer/services-buyer.component.scss ***! \**********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL3BhcnRpYWwvc2VydmljZXMtYnV5ZXIvc2VydmljZXMtYnV5ZXIuY29tcG9uZW50LnNjc3MifQ== */" /***/ }), /***/ "./src/app/partial/services-buyer/services-buyer.component.ts": /*!********************************************************************!*\ !*** ./src/app/partial/services-buyer/services-buyer.component.ts ***! \********************************************************************/ /*! exports provided: ServicesBuyerComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ServicesBuyerComponent", function() { return ServicesBuyerComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var ServicesBuyerComponent = /** @class */ (function () { function ServicesBuyerComponent() { } ServicesBuyerComponent.prototype.ngOnInit = function () { }; ServicesBuyerComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ selector: 'app-services-buyer', template: __webpack_require__(/*! raw-loader!./services-buyer.component.html */ "./node_modules/raw-loader/index.js!./src/app/partial/services-buyer/services-buyer.component.html"), styles: [__webpack_require__(/*! ./services-buyer.component.scss */ "./src/app/partial/services-buyer/services-buyer.component.scss")] }) ], ServicesBuyerComponent); return ServicesBuyerComponent; }()); /***/ }), /***/ "./src/app/partial/services-home/services-home.component.scss": /*!********************************************************************!*\ !*** ./src/app/partial/services-home/services-home.component.scss ***! \********************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL3BhcnRpYWwvc2VydmljZXMtaG9tZS9zZXJ2aWNlcy1ob21lLmNvbXBvbmVudC5zY3NzIn0= */" /***/ }), /***/ "./src/app/partial/services-home/services-home.component.ts": /*!******************************************************************!*\ !*** ./src/app/partial/services-home/services-home.component.ts ***! \******************************************************************/ /*! exports provided: ServicesHomeComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ServicesHomeComponent", function() { return ServicesHomeComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var ServicesHomeComponent = /** @class */ (function () { function ServicesHomeComponent() { } ServicesHomeComponent.prototype.ngOnInit = function () { }; ServicesHomeComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ selector: 'app-services-home', template: __webpack_require__(/*! raw-loader!./services-home.component.html */ "./node_modules/raw-loader/index.js!./src/app/partial/services-home/services-home.component.html"), styles: [__webpack_require__(/*! ./services-home.component.scss */ "./src/app/partial/services-home/services-home.component.scss")] }) ], ServicesHomeComponent); return ServicesHomeComponent; }()); /***/ }), /***/ "./src/app/partial/services-offer/services-offer.component.ts": /*!********************************************************************!*\ !*** ./src/app/partial/services-offer/services-offer.component.ts ***! \********************************************************************/ /*! exports provided: ServicesOfferComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ServicesOfferComponent", function() { return ServicesOfferComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var ServicesOfferComponent = /** @class */ (function () { function ServicesOfferComponent() { this.homeServices = [ { icon: 'wx-grow', title: 'Business intelligence', text: 'Analice en tiempo real y descubra oportunidades de mejora en su estrategia de compras.' }, { icon: 'wx-cloud2', title: 'Plataforma cloud', text: 'Alto nivel de seguridad y respaldo. Fácil acceso e implementación.' }, { icon: 'wx-brain', title: 'Inteligencia artificial', text: 'Tu demanda conectada con las mejores opciones gracias a tecnología de vanguardia.' }, { icon: 'wx-integration', title: 'Integración ERP', text: 'Conecta sin costo tu sistema de gestión y automatiza los requerimientos internos.' } ]; this.supplierServices = [ { icon: 'wx-grow', title: 'Eficiencia', text: 'Logre significativas eficiencias en su fuerza de ventas al menor costo de transacción y sin costos fijos.' }, { icon: 'wx-prevent', title: 'Confidencialidad y seguridad', text: 'Al editar y publicar su oferta, esta sólo podrá ser visualizada por usted y en la fecha de cierre se desbloqueará para el comprador.' }, { icon: 'wx-cloud2', title: 'Plataforma Cloud', text: 'Alto nivel de seguridad y respaldo. Portal de fácil acceso y usabilidad.' }, { icon: 'wx-rating', title: 'Evaluación', text: 'Califique al comprador y reciba sus evaluaciones en calidad y puntualidad.' } ]; this.services = []; } ServicesOfferComponent.prototype.ngOnInit = function () { this.setServices(); }; ServicesOfferComponent.prototype.setServices = function () { if (this.type === 'supplierServices') { this.services = this.supplierServices; } else { this.services = this.homeServices; } }; tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])() ], ServicesOfferComponent.prototype, "type", void 0); ServicesOfferComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ selector: 'app-services-offer', template: __webpack_require__(/*! raw-loader!./services-offer.component.html */ "./node_modules/raw-loader/index.js!./src/app/partial/services-offer/services-offer.component.html") }) ], ServicesOfferComponent); return ServicesOfferComponent; }()); /***/ }), /***/ "./src/app/partial/services-supplier/services-supplier.component.scss": /*!****************************************************************************!*\ !*** ./src/app/partial/services-supplier/services-supplier.component.scss ***! \****************************************************************************/ /*! no static exports found */ /***/ (function(module, exports) { module.exports = "\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJzcmMvYXBwL3BhcnRpYWwvc2VydmljZXMtc3VwcGxpZXIvc2VydmljZXMtc3VwcGxpZXIuY29tcG9uZW50LnNjc3MifQ== */" /***/ }), /***/ "./src/app/partial/services-supplier/services-supplier.component.ts": /*!**************************************************************************!*\ !*** ./src/app/partial/services-supplier/services-supplier.component.ts ***! \**************************************************************************/ /*! exports provided: ServicesSupplierComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ServicesSupplierComponent", function() { return ServicesSupplierComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var ServicesSupplierComponent = /** @class */ (function () { function ServicesSupplierComponent() { } ServicesSupplierComponent.prototype.ngOnInit = function () { }; ServicesSupplierComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ selector: 'app-services-supplier', template: __webpack_require__(/*! raw-loader!./services-supplier.component.html */ "./node_modules/raw-loader/index.js!./src/app/partial/services-supplier/services-supplier.component.html"), styles: [__webpack_require__(/*! ./services-supplier.component.scss */ "./src/app/partial/services-supplier/services-supplier.component.scss")] }) ], ServicesSupplierComponent); return ServicesSupplierComponent; }()); /***/ }), /***/ "./src/app/partial/statistics/statistics.component.ts": /*!************************************************************!*\ !*** ./src/app/partial/statistics/statistics.component.ts ***! \************************************************************/ /*! exports provided: StatisticsComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StatisticsComponent", function() { return StatisticsComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _services_system_api_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../services/system-api.service */ "./src/app/services/system-api.service.ts"); /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); /* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_3__); var StatisticsComponent = /** @class */ (function () { function StatisticsComponent(systemApiService) { this.systemApiService = systemApiService; this.statisticsBox = { totalProposals: 0, totalUsers: 0 }; this.statisticsBar = { totalSuppliers: 0, totalBuyers: 0, totalProposals: 0, totalRequirements: 0, //suma de compradores y proveedores buyersPlusSuppliers: 0 }; } StatisticsComponent.prototype.ngOnInit = function () { this.getStatistics(); }; StatisticsComponent.prototype.getStatistics = function () { var _this = this; this.systemApiService.getStatisticsBox() .subscribe(function (result) { _this.systemApiService.getStatisticsBar() .subscribe(function (results) { _this.statisticsBox = result; _this.statisticsBar = results; //suma de compradores y proveedores var buyersPlusSuppliers = Number(_this.statisticsBar.totalSuppliers) + Number(_this.statisticsBar.totalBuyers); _this.statisticsBar.buyersPlusSuppliers = buyersPlusSuppliers; _this.counterEfect(); }); }); }; StatisticsComponent.prototype.counterEfect = function () { var format = function (value) { return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.'); }; var animation = function () { var $counter = jquery__WEBPACK_IMPORTED_MODULE_3__(this); $counter.off('DOMSubtreeModified'); $counter.prop('Counter', 0).animate({ Counter: $counter.text() }, { duration: 3000, easing: 'swing', step: function (now) { return $counter.text(format(Math.ceil(now))); }, complete: function () { return $counter.on('DOMSubtreeModified', animation); } }); }; jquery__WEBPACK_IMPORTED_MODULE_3__('.block-statistics .statistic').each(function () { jquery__WEBPACK_IMPORTED_MODULE_3__(this).on('DOMSubtreeModified', animation); }); }; StatisticsComponent.ctorParameters = function () { return [ { type: _services_system_api_service__WEBPACK_IMPORTED_MODULE_2__["SystemApiService"] } ]; }; StatisticsComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ selector: 'app-statistics', template: __webpack_require__(/*! raw-loader!./statistics.component.html */ "./node_modules/raw-loader/index.js!./src/app/partial/statistics/statistics.component.html") }) ], StatisticsComponent); return StatisticsComponent; }()); /***/ }), /***/ "./src/app/partial/testimonials/testimonials.component.ts": /*!****************************************************************!*\ !*** ./src/app/partial/testimonials/testimonials.component.ts ***! \****************************************************************/ /*! exports provided: TestimonialsComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TestimonialsComponent", function() { return TestimonialsComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var TestimonialsComponent = /** @class */ (function () { function TestimonialsComponent() { this.testimonials = [ { id: 0, imgTest: 'testimonials/01.jpg', author: 'Cristian Jara', charge: 'TESTIMONIAL.POSITION_0', company: 'Ventisqueros', comment: 'TESTIMONIAL.TEXT_0' }, { id: 1, imgTest: 'testimonials/02.jpg', author: 'Marco Mansilla', charge: 'TESTIMONIAL.POSITION_1', company: 'Yadran', comment: 'TESTIMONIAL.TEXT_1' }, { id: 2, imgTest: 'testimonials/testimonial-ariztia.jpg', author: 'Luis Alberto Tagle V.', charge: 'TESTIMONIAL.POSITION_2', company: 'Ariztía', comment: 'TESTIMONIAL.TEXT_2' }, { id: 3, imgTest: 'testimonials/testimonial-la-higuera.jpg', author: 'Cristián Covarrubias', charge: 'TESTIMONIAL.POSITION_3', company: 'La Higuera', comment: 'TESTIMONIAL.TEXT_3' }, ]; this.contPos = 0; } TestimonialsComponent.prototype.showComments = function (idTestimonial) { var newPop = document.getElementById('popCommentWgd' + idTestimonial + ''); newPop.setAttribute('style', 'display:block;'); }; TestimonialsComponent.prototype.hideComments = function (idTestimonial) { var commentPop = document.getElementById('popComment' + idTestimonial + ''); commentPop.setAttribute('style', 'display: none;'); var newPop = document.getElementById('popCommentWgd' + idTestimonial + ''); newPop.setAttribute('style', 'display:none;'); }; TestimonialsComponent.prototype.showTestimonial = function (idTestimonial) { var newBloqWgd = document.getElementsByClassName('counterWidget')[0]; newBloqWgd.setAttribute('style', 'display:block;'); var selectTestimonial = document.getElementsByClassName('testimonial')[idTestimonial]; var selectWdg = document.getElementsByClassName('wgd')[idTestimonial]; selectTestimonial.setAttribute('class', 'testimonial selected'); this.showComments(idTestimonial); var segment = this.contPos + 2; if (idTestimonial > segment) { selectTestimonial.setAttribute('class', 'testimonial selected ultimate'); selectWdg.setAttribute('class', 'wgd selected ultimate'); } else { selectTestimonial.setAttribute('class', 'testimonial selected'); selectWdg.setAttribute('class', 'wgd selected'); } }; TestimonialsComponent.prototype.hideTestimonial = function (idTestimonial) { this.hideComments(idTestimonial); var selectTestimonial = document.getElementsByClassName('testimonial')[idTestimonial]; selectTestimonial.setAttribute('class', 'testimonial'); var selectWdg = document.getElementsByClassName('wgd')[idTestimonial]; selectWdg.setAttribute('class', 'wgd'); var newBloqWgd = document.getElementsByClassName('counterWidget')[0]; newBloqWgd.setAttribute('style', 'display:none;'); }; TestimonialsComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ selector: 'app-testimonials', template: __webpack_require__(/*! raw-loader!./testimonials.component.html */ "./node_modules/raw-loader/index.js!./src/app/partial/testimonials/testimonials.component.html") }) ], TestimonialsComponent); return TestimonialsComponent; }()); /***/ }), /***/ "./src/app/phone-input/phone-input.component.ts": /*!******************************************************!*\ !*** ./src/app/phone-input/phone-input.component.ts ***! \******************************************************/ /*! exports provided: PhoneInputComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PhoneInputComponent", function() { return PhoneInputComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _services_phone_input_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../services/phone-input.service */ "./src/app/services/phone-input.service.ts"); var PhoneInputComponent = /** @class */ (function () { function PhoneInputComponent(phoneNumberService) { this.phoneNumberService = phoneNumberService; this.required = false; this.countryChange = new _angular_core__WEBPACK_IMPORTED_MODULE_1__["EventEmitter"](); } PhoneInputComponent.prototype.ngAfterViewInit = function () { var _this = this; var inputId = "phone-input-" + this.uniqueId; this.iti = window['intlTelInput'](document.getElementById(inputId), { initialCountry: "auto", separateDialCode: true, geoIpLookup: function (callback) { fetch("https://ipapi.co/json") .then(function (res) { return res.json(); }) .then(function (data) { return callback(data.country_code); }) .catch(function () { return callback("cl"); }); }, utilsScript: "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/js/utils.js", preferredCountries: ["cl", "pe", "ar", "co", "mx", "us"], nationalMode: true, customPlaceholder: function (selectedCountryPlaceholder, selectedCountryData) { if (inputId.includes("cellphone") && selectedCountryData.iso2 === "cl") { return "9 1234 5678"; } else if (inputId == "phone-input-phone" && selectedCountryData.iso2 === "pe") { return "1 123 4567"; } else if (inputId == "phone-input-phone" && selectedCountryData.iso2 === "mx") { return "81 12345678"; } else if (inputId == "phone-input-phone" && selectedCountryData.iso2 === "co") { return "123 1234567"; } else if (inputId == "phone-input-phone" && selectedCountryData.iso2 === "us") { return "(555) 123-4567"; } else { return selectedCountryPlaceholder; } } }); if (this.iti) { this.iti.telInput.addEventListener('countrychange', function () { _this.countrySelected = _this.iti.getSelectedCountryData(); var inputElement = document.getElementById(inputId); ; inputElement.value = ''; _this.countryChange.emit(_this.countrySelected.dialCode); }); } }; PhoneInputComponent.prototype.onPhoneNumberChangeCellPhone = function (value) { var cellPhoneElement = document.querySelector("#phone-input-cellphone"); cellPhoneElement.addEventListener("input", function () { var value = cellPhoneElement.value; var number = Number(value); if (isNaN(number)) { cellPhoneElement.value = value.replace(/[^0-9]/g, ""); } }); if (this.countrySelected) { var fullNumber = this.iti.getNumber(); var phoneNumber = fullNumber.replace('+' + this.countrySelected.dialCode, ''); this.phoneNumberService.prefixPhone = phoneNumber; } else { this.phoneNumberService.prefixPhone = this.iti.getNumber(); } this.phoneNumberService.prefixPhone = this.phoneNumberService.prefixPhone.replace(/[^0-9+]/g, ""); cellPhoneElement.value = cellPhoneElement.value.replace(/[^0-9+]/g, ""); if (/[^0-9]/.test(cellPhoneElement.value)) { this.phoneNumberService.validatePhone = false; } else { this.phoneNumberService.validatePhone = this.iti.isValidNumber(); } this.phoneNumberService.sendValues = 0; }; PhoneInputComponent.prototype.onPhoneNumberChangePhone = function (value) { var phoneElement = document.querySelector("#phone-input-phone"); phoneElement.addEventListener("input", function () { var value = phoneElement.value; var number = Number(value); if (isNaN(number)) { phoneElement.value = value.replace(/[^0-9]/g, ""); } }); if (this.countrySelected) { var fullNumber = this.iti.getNumber(); var phoneNumber = fullNumber.replace('+' + this.countrySelected.dialCode, ''); this.phoneNumberService.prefixCellphone = phoneNumber; } else { this.phoneNumberService.prefixCellphone = this.iti.getNumber(); } this.phoneNumberService.prefixCellphone = this.phoneNumberService.prefixCellphone.replace(/[^0-9+]/g, ""); phoneElement.value = phoneElement.value.replace(/[^0-9+]/g, ""); if (/[^0-9]/.test(phoneElement.value)) { this.phoneNumberService.validateCellphone = false; } else { this.phoneNumberService.validateCellphone = this.iti.isValidNumber(); } this.phoneNumberService.sendValues = 0; }; PhoneInputComponent.prototype.onPhoneNumberChangeBillingPhone = function (value) { var billingPhoneElement = document.querySelector("#phone-input-billing_phone"); billingPhoneElement.addEventListener("input", function () { var value = billingPhoneElement.value; var number = Number(value); if (isNaN(number)) { billingPhoneElement.value = value.replace(/[^0-9]/g, ""); } }); if (this.countrySelected) { var fullNumber = this.iti.getNumber(); var phoneNumber = fullNumber.replace('+' + this.countrySelected.dialCode, ''); this.phoneNumberService.prefixBillingPhone = phoneNumber; } else { this.phoneNumberService.prefixBillingPhone = this.iti.getNumber(); } this.phoneNumberService.prefixBillingPhone = this.phoneNumberService.prefixBillingPhone.replace(/[^0-9+]/g, ""); billingPhoneElement.value = billingPhoneElement.value.replace(/[^0-9+]/g, ""); if (/[^0-9]/.test(billingPhoneElement.value)) { this.phoneNumberService.validateBillingPhone = false; } else { this.phoneNumberService.validateBillingPhone = this.iti.isValidNumber(); } this.phoneNumberService.sendValues = 0; }; PhoneInputComponent.ctorParameters = function () { return [ { type: _services_phone_input_service__WEBPACK_IMPORTED_MODULE_2__["PhoneService"] } ]; }; tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])() ], PhoneInputComponent.prototype, "required", void 0); tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])() ], PhoneInputComponent.prototype, "uniqueId", void 0); tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Input"])() ], PhoneInputComponent.prototype, "value", void 0); tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Output"])() ], PhoneInputComponent.prototype, "countryChange", void 0); PhoneInputComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ selector: 'app-phone-input', template: __webpack_require__(/*! raw-loader!./phone-input.component.html */ "./node_modules/raw-loader/index.js!./src/app/phone-input/phone-input.component.html"), }) ], PhoneInputComponent); return PhoneInputComponent; }()); /***/ }), /***/ "./src/app/pipes/no-comma.pipe.ts": /*!****************************************!*\ !*** ./src/app/pipes/no-comma.pipe.ts ***! \****************************************/ /*! exports provided: NoCommaPipe */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NoCommaPipe", function() { return NoCommaPipe; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var NoCommaPipe = /** @class */ (function () { function NoCommaPipe() { } NoCommaPipe.prototype.transform = function (val) { if (val !== undefined && val !== null) { // here we just remove the commas from value return val.toString().replace(/,/g, "."); } else { return ""; } }; NoCommaPipe = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({ name: 'noComma' }) ], NoCommaPipe); return NoCommaPipe; }()); /***/ }), /***/ "./src/app/pipes/strip-tags.pipe.ts": /*!******************************************!*\ !*** ./src/app/pipes/strip-tags.pipe.ts ***! \******************************************/ /*! exports provided: StripTagsPipe */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "StripTagsPipe", function() { return StripTagsPipe; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var StripTagsPipe = /** @class */ (function () { function StripTagsPipe() { } StripTagsPipe.prototype.transform = function (value) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } return value ? String(value).replace(/<[^>]+>/gm, '') : ''; }; StripTagsPipe = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Pipe"])({ name: 'stripTags' }) ], StripTagsPipe); return StripTagsPipe; }()); /***/ }), /***/ "./src/app/services/phone-input.service.ts": /*!*************************************************!*\ !*** ./src/app/services/phone-input.service.ts ***! \*************************************************/ /*! exports provided: PhoneService */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PhoneService", function() { return PhoneService; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var PhoneService = /** @class */ (function () { function PhoneService() { this.phone = ''; this.cellphone = ''; this.billing_phone = ''; this.prefixPhone = ''; this.prefixCellphone = ''; this.prefixBillingPhone = ''; this.validatePhone = false; this.validateCellphone = false; this.validateBillingPhone = false; } PhoneService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({ providedIn: 'root', }) ], PhoneService); return PhoneService; }()); /***/ }), /***/ "./src/app/services/system-api.service.ts": /*!************************************************!*\ !*** ./src/app/services/system-api.service.ts ***! \************************************************/ /*! exports provided: SystemApiService */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SystemApiService", function() { return SystemApiService; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _angular_common_http__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js"); /* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js"); /* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../environments/environment */ "./src/environments/environment.ts"); var SystemApiService = /** @class */ (function () { function SystemApiService(http) { this.http = http; this.systemUrl = _environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].systemUrl; this.systemApiUrl = _environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].systemUrl + _environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].systemApiPath; //dev //private systemApiUrl = environment.systemApiPath; this.endpoints = { // SYSTEM WEBSITE API bidHighlighteds: this.systemApiUrl + '/purchase-bid-highlighteds', statisticsBox: this.systemApiUrl + '/statistics/box', statisticsBar: this.systemApiUrl + '/statistics/bar', statisticsHeader: this.systemApiUrl + '/statistics/header-statistics', buyers: this.systemApiUrl + '/buyers', buyersRegistration: this.systemApiUrl + '/buyers/registration', supplierCheckData: this.systemApiUrl + '/suppliers/check-data', supplierRegistration: this.systemApiUrl + '/suppliers/registration', nodes: this.systemApiUrl + '/nodes', countries: this.systemApiUrl + '/countries', regions: this.systemApiUrl + '/regions', communes: this.systemApiUrl + '/communes', sectors: this.systemApiUrl + '/sectors', zones: this.systemApiUrl + '/zones', // SYSTEM login: this.systemUrl + '/secured/login_check', isLogin: this.systemUrl + '/secured/api/1/security/check', recover: this.systemUrl + '/password/retrieve', supplierCheckDataCompany: this.systemApiUrl + '/suppliers/check-data/step-1', supplierCheckDataUser: this.systemApiUrl + '/suppliers/check-data/step-2', supplierCheckDataPreRegister: this.systemApiUrl + '/suppliers/pre-register' }; // Var pre-register suppliers this.preName = ""; this.preEmail = ""; this.preRut = ""; this.preRuc = ""; this.preDni = ""; } // PURCHASE BID HIGHLIGHTEDS SystemApiService.prototype.getBidHighlighteds = function () { return this.http.get(this.endpoints.bidHighlighteds).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError)); }; // STATISTICS BOX SystemApiService.prototype.getStatisticsBox = function () { return this.http.get(this.endpoints.statisticsBox).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError)); }; // STATISTICS BAR SystemApiService.prototype.getStatisticsBar = function () { return this.http.get(this.endpoints.statisticsBar).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError)); }; // STATISTICS HEADER SystemApiService.prototype.getStatisticsHeader = function () { return this.http.get(this.endpoints.statisticsHeader).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError)); }; // BUYERS SystemApiService.prototype.getBuyers = function () { return this.http.get(this.endpoints.buyers).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError)); }; // BUYER REGISTRATION SystemApiService.prototype.buyersRegistration = function (params) { return this.http.post(this.endpoints.buyersRegistration, params); }; // COMPANY SUPPLIER CHECK DATA SystemApiService.prototype.companyCheckDataCompany = function (params) { return this.http.post(this.endpoints.supplierCheckDataCompany, params); }; // USER COMPANY SUPPLIER CHECK DATA SystemApiService.prototype.companyCheckDataUser = function (params) { return this.http.post(this.endpoints.supplierCheckDataUser, params); }; // SUPPLIER REGISTRATION SystemApiService.prototype.supplierRegistration = function (params) { return this.http.post(this.endpoints.supplierRegistration, params); }; // NODES SystemApiService.prototype.getNodes = function (services, language, country) { if (services === void 0) { services = false; } if (language === void 0) { language = null; } if (country === void 0) { country = null; } var params = services ? { services: '1', language: language, country: country } : { language: language, country: country }; return this.http.get(this.endpoints.nodes, { params: params }).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError)); }; // COUNTRIES SystemApiService.prototype.getCountries = function () { return this.http.get(this.endpoints.countries).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError)); }; // REGIONS SystemApiService.prototype.getRegions = function () { return this.http.get(this.endpoints.regions).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError)); }; // SECTORS SystemApiService.prototype.getSectors = function () { return this.http.get(this.endpoints.sectors).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError)); }; // ZONES SystemApiService.prototype.getZones = function () { return this.http.get(this.endpoints.zones).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError)); }; // LOGIN SystemApiService.prototype.loginUser = function (params) { var httpOptions = { headers: new _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpHeaders"]({ 'X-Requested-With': 'XMLHttpRequest' }), withCredentials: true }; return this.http.post(this.endpoints.login, params, httpOptions).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError)); }; // IS LOGIN SystemApiService.prototype.isLogin = function () { var httpOptions = { headers: new _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpHeaders"]({ 'X-Requested-With': 'XMLHttpRequest' }), withCredentials: true }; return this.http.post(this.endpoints.isLogin, {}, httpOptions); }; SystemApiService.prototype.handleError = function (error) { if (error.error instanceof ErrorEvent) { console.error('An error occurred:', error.error.message); } else { console.error("Backend returned code " + error.status); } return Object(rxjs__WEBPACK_IMPORTED_MODULE_3__["throwError"])('Something bad happened; please try again later.'); }; SystemApiService.prototype.validateInput = function (input) { if (this.valruc(input)) { return true; } else { return false; } }; SystemApiService.prototype.validateInputRfc = function (input) { if (this.valrfc(input)) { return true; } else { return false; } }; SystemApiService.prototype.valrfc = function (rfc) { var _rfc_pattern_pm = "^(([A-ZÑ&]{3})([0-9]{2})([0][13578]|[1][02])(([0][1-9]|[12][\\d])|[3][01])([A-Z0-9]{3}))|" + "(([A-ZÑ&]{3})([0-9]{2})([0][13456789]|[1][012])(([0][1-9]|[12][\\d])|[3][0])([A-Z0-9]{3}))|" + "(([A-ZÑ&]{3})([02468][048]|[13579][26])[0][2]([0][1-9]|[12][\\d])([A-Z0-9]{3}))|" + "(([A-ZÑ&]{3})([0-9]{2})[0][2]([0][1-9]|[1][0-9]|[2][0-8])([A-Z0-9]{3}))$"; var _rfc_pattern_pf = "^(([A-ZÑ&]{4})([0-9]{2})([0][13578]|[1][02])(([0][1-9]|[12][\\d])|[3][01])([A-Z0-9]{3}))|" + "(([A-ZÑ&]{4})([0-9]{2})([0][13456789]|[1][012])(([0][1-9]|[12][\\d])|[3][0])([A-Z0-9]{3}))|" + "(([A-ZÑ&]{4})([02468][048]|[13579][26])[0][2]([0][1-9]|[12][\\d])([A-Z0-9]{3}))|" + "(([A-ZÑ&]{4})([0-9]{2})[0][2]([0][1-9]|[1][0-9]|[2][0-8])([A-Z0-9]{3}))$"; if (rfc.match(_rfc_pattern_pm)) { var tipo = "PM"; } else if (rfc.match(_rfc_pattern_pf)) { var tipo = "PF"; } var regex = /^([A-ZÑ&]{3,4})?(\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01]))?([A-Z\d]{2})([A\d])$/; var validado = rfc.match(regex); if (!validado) return false; var digitoVerificador = validado.pop(), rfcSinDigito = validado.slice(1).join(''), len = rfcSinDigito.length, diccionario = "0123456789ABCDEFGHIJKLMN&OPQRSTUVWXYZ Ñ", indice = len + 1; var suma, digitoEsperado; if ((rfc.match(_rfc_pattern_pm)) || (rfc.match(_rfc_pattern_pf))) { return rfcSinDigito + digitoVerificador; } else { return false; } if (tipo == "PF") { suma = 0; } else if (tipo == "PM") { if (indice == 13) suma = 0; //Ajuste para persona moral con 13 digitos else if (indice == 12) suma = 481; //Ajuste para persona moral con 12 digitos } for (var i = 0; i < len; i++) { var valor = diccionario.indexOf(rfcSinDigito.charAt(i)) * (indice - i); suma = suma + valor; } digitoEsperado = (11000 - suma) % 11; if (digitoEsperado == 11) digitoEsperado = 0; else if (digitoEsperado == 10) digitoEsperado = "A"; if ((digitoVerificador != digitoEsperado) && (rfcSinDigito + digitoVerificador != "XAXX010101000")) return false; else if (rfcSinDigito + digitoVerificador == "XEXX010101000") return false; return rfcSinDigito + digitoVerificador; }; SystemApiService.prototype.valruc = function (valor) { var valor = valor.trim(); var regex = /^(10|20)[0-9]{9}$/; var validado = valor.match(regex); if (!validado) //Coincide con el formato general del regex? return false; if (this.esnumero(valor)) { if (valor.length == 8) { var suma = 0; for (var i = 0; i < valor.length - 1; i++) { var digito = valor.charAt(i) - 0; if (i == 0) { suma += (digito * 2); } else { suma += (digito * (valor.length - i)); } } var resto = suma % 11; if (resto == 1) { resto = 11; } if (resto + (valor.charAt(valor.length - 1) - 0) == 11) { return true; } } else if (valor.length == 11) { var suma = 0; var x = 6; for (var i = 0; i < valor.length - 1; i++) { if (i == 4) { x = 8; } var digito = valor.charAt(i) - 0; x--; if (i == 0) { suma += (digito * x); } else { suma += (digito * x); } } var resto = suma % 11; resto = 11 - resto; if (resto >= 10) { resto = resto - 10; } if (resto == valor.charAt(valor.length - 1) - 0) { return true; } } } return false; }; SystemApiService.prototype.esnumero = function (campo) { return (!(isNaN(campo))); }; SystemApiService.prototype.determinateValuesVarPreRegister = function (nameCompany, emailCompany, dni) { this.preName = nameCompany; this.preEmail = emailCompany; this.preRut = dni; this.preRuc = dni; this.preDni = dni; }; SystemApiService.prototype.checkValidationPreRegister = function (preParams) { return this.http.post(this.endpoints.supplierCheckDataPreRegister, preParams, { headers: new _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpHeaders"]({ 'Content-Type': 'application/json' }), observe: 'response' }).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["map"])(function (data) { return data; })); }; SystemApiService.prototype.getCommunes = function () { return this.http.get(this.endpoints.communes).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_4__["catchError"])(this.handleError)); }; SystemApiService.prototype.valnitExpReg = function (nit) { var expreg = new RegExp(/^\d{1,3}(?:\.\d{3}){2,5}\-[Kk0-9]$/); if (expreg.test(nit)) { return true; } else { return false; } }; SystemApiService.prototype.valnit = function (nit) { var series = [0, 3, 7, 13, 17, 19, 23, 29, 37, 41, 43, 47, 53, 59, 67, 71]; var nit = nit.replace(/[-.,[\]()\s]+/g, ""); var valor = nit.trim(); var valorDv = valor.slice(0, -1); if (this.esnumero(valor)) { if (valor.length >= 6 && valor.length <= 15) { var suma = 0; for (var i = 0; i < valorDv.length; i++) { var digito = valorDv.substr(i, 1); suma += digito * series[valorDv.length - i]; } var resto = suma % 11; var dv = (resto > 1) ? 11 - resto : resto; if (dv == (valor.charAt(valor.length - 1) - 0)) { return true; } } } return false; }; SystemApiService.ctorParameters = function () { return [ { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_2__["HttpClient"] } ]; }; SystemApiService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({ providedIn: 'root' }) ], SystemApiService); return SystemApiService; }()); /***/ }), /***/ "./src/app/services/vali-rut.service.ts": /*!**********************************************!*\ !*** ./src/app/services/vali-rut.service.ts ***! \**********************************************/ /*! exports provided: ValiRutService */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValiRutService", function() { return ValiRutService; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); var ValiRutService = /** @class */ (function () { function ValiRutService() { // script externo pendiente por optimizacion this.valiRut = function (texto) { var tmpstr = ""; var i; var largo; var cnt; var j; for (i = 0; i < texto.length; i++) { if (texto.charAt(i) != ' ' && texto.charAt(i) != '.' && texto.charAt(i) != '-') { tmpstr = tmpstr + texto.charAt(i); } } texto = tmpstr; largo = texto.length; //alert(texto+" / "+largo); // if (largo < 2) { return false; } for (i = 0; i < largo; i++) { if (texto.charAt(i) != "0" && texto.charAt(i) != "1" && texto.charAt(i) != "2" && texto.charAt(i) != "3" && texto.charAt(i) != "4" && texto.charAt(i) != "5" && texto.charAt(i) != "6" && texto.charAt(i) != "7" && texto.charAt(i) != "8" && texto.charAt(i) != "9" && texto.charAt(i) != "k" && texto.charAt(i) != "K") { return false; } } var invertido = ""; for (i = (largo - 1), j = 0; i >= 0; i--, j++) { invertido = invertido + texto.charAt(i); } var dtexto = ""; dtexto = dtexto + invertido.charAt(0); dtexto = dtexto + '-'; cnt = 0; for (i = 1, j = 2; i < largo; i++, j++) { if (cnt == 3) { dtexto = dtexto + '.'; j++; dtexto = dtexto + invertido.charAt(i); cnt = 1; } else { dtexto = dtexto + invertido.charAt(i); cnt++; } } invertido = ""; for (i = (dtexto.length - 1), j = 0; i >= 0; i--, j++) { invertido = invertido + dtexto.charAt(i); } if (this.revisarDigito(texto)) { return true; } status = "invalido"; return false; }; this.revisarDigito = function (componente) { var crut = componente; var rut; var largo; var dv; var suma; var mul; var res; var i; var dvi; largo = crut.length; if (largo < 2) { return false; } if (largo > 2) rut = crut.substring(0, largo - 1); else rut = crut.charAt(0); dv = crut.charAt(largo - 1); if (dv != '0' && dv != '1' && dv != '2' && dv != '3' && dv != '4' && dv != '5' && dv != '6' && dv != '7' && dv != '8' && dv != '9' && dv != 'k' && dv != 'K') { return false; } if (rut == null || dv == null) return 0; var dvr = '0'; suma = 0; mul = 2; for (i = rut.length - 1; i >= 0; i--) { suma = suma + rut.charAt(i) * mul; if (mul == 7) mul = 2; else mul++; } res = suma % 11; if (res == 1) dvr = 'k'; else if (res == 0) dvr = '0'; else { dvi = 11 - res; dvr = dvi + ""; } if (dvr != dv.toLowerCase()) { return false; } return true; }; } ValiRutService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({ providedIn: 'root' }) ], ValiRutService); return ValiRutService; }()); /***/ }), /***/ "./src/app/services/wordpress-api.service.ts": /*!***************************************************!*\ !*** ./src/app/services/wordpress-api.service.ts ***! \***************************************************/ /*! exports provided: WordpressApiService */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WordpressApiService", function() { return WordpressApiService; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* 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 _angular_common_http__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/common/http */ "./node_modules/@angular/common/fesm5/http.js"); /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rxjs */ "./node_modules/rxjs/_esm5/index.js"); /* harmony import */ var rxjs_operators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! rxjs/operators */ "./node_modules/rxjs/_esm5/operators/index.js"); /* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../environments/environment */ "./src/environments/environment.ts"); var WordpressApiService = /** @class */ (function () { function WordpressApiService(http, router, urlSerializer) { this.http = http; this.router = router; this.urlSerializer = urlSerializer; this.wordpressApiUrl = _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].wordpressUrl + _environments_environment__WEBPACK_IMPORTED_MODULE_6__["environment"].wordpressApiPath; this.endpoints = { posts: '/posts', categories: '/categories', }; } WordpressApiService.prototype.getArticleBySlug = function (slug) { var queryParams = { slug: slug, _embed: true }; var urlTree = this.router.createUrlTree([this.endpoints.posts], { queryParams: queryParams }); var url = this.urlSerializer.serialize(urlTree); return this.http.get(this.wordpressApiUrl + url).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(this.handleError)); }; WordpressApiService.prototype.getCategories = function () { return this.http.get(this.wordpressApiUrl + this.endpoints.categories).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(this.handleError)); }; WordpressApiService.prototype.getArticles = function (filters, orders, limit, page) { if (filters === void 0) { filters = null; } if (orders === void 0) { orders = null; } if (limit === void 0) { limit = 4; } if (page === void 0) { page = 1; } var queryParams = tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"]({}, filters, orders, { per_page: limit, page: page, _embed: true }); var urlTree = this.router.createUrlTree([this.endpoints.posts], { queryParams: queryParams }); var url = this.urlSerializer.serialize(urlTree); return this.http.get(this.wordpressApiUrl + url).pipe(Object(rxjs_operators__WEBPACK_IMPORTED_MODULE_5__["catchError"])(this.handleError)); }; WordpressApiService.prototype.handleError = function (error) { if (error.error instanceof ErrorEvent) { console.error('An error occurred:', error.error.message); } else { console.error("Backend returned code " + error.status); } return Object(rxjs__WEBPACK_IMPORTED_MODULE_4__["throwError"])('Something bad happened; please try again later.'); }; WordpressApiService.ctorParameters = function () { return [ { type: _angular_common_http__WEBPACK_IMPORTED_MODULE_3__["HttpClient"] }, { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["Router"] }, { type: _angular_router__WEBPACK_IMPORTED_MODULE_2__["UrlSerializer"] } ]; }; WordpressApiService = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Injectable"])({ providedIn: 'root' }) ], WordpressApiService); return WordpressApiService; }()); /***/ }), /***/ "./src/app/suppliers-register/suppliers-register.component.ts": /*!********************************************************************!*\ !*** ./src/app/suppliers-register/suppliers-register.component.ts ***! \********************************************************************/ /*! exports provided: SuppliersRegisterComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SuppliersRegisterComponent", function() { return SuppliersRegisterComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var jstree__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! jstree */ "./node_modules/jstree/dist/jstree.js"); /* harmony import */ var jstree__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(jstree__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _services_system_api_service__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../services/system-api.service */ "./src/app/services/system-api.service.ts"); /* harmony import */ var _services_vali_rut_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../services/vali-rut.service */ "./src/app/services/vali-rut.service.ts"); /* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../environments/environment */ "./src/environments/environment.ts"); /* harmony import */ var _ngx_translate_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ngx-translate/core */ "./node_modules/@ngx-translate/core/fesm5/ngx-translate-core.js"); /* harmony import */ var _services_phone_input_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../services/phone-input.service */ "./src/app/services/phone-input.service.ts"); //import * as amplitude from 'amplitude-js'; var rutExist = 'El Rut ingresado ya se encuentra registrado en el sistema. Se notificará al administrador de la empresa, mediante email, para que pueda crear la cuenta.'; //amplitude function registerPageVisit() { amplitude.getInstance().logEvent('webRegisterPageVisit'); } function registerFormStage2ok(companyName, userName) { var customProperties = { signupCompanyName: companyName, signupName: userName }; amplitude.getInstance().logEvent('webRegisterFormStage2ok', customProperties); } function registerSupplierUser(companyName, companyRut, userName, userEmail) { var customProperties = { signupCompanyName: companyName, signupCompanyRut: companyRut, signupName: userName, signupEmail: userEmail }; amplitude.getInstance().logEvent('webRegisterSupplierUserDomainExist', customProperties); } function fail2registerSupplierUser(companyName, companyRut, userName, userEmail) { var customProperties = { signupCompanyName: companyName, signupCompanyRut: companyRut, signupName: userName, signupEmail: userEmail }; amplitude.getInstance().logEvent('webRegisterSupplierUserDomainNotExist', customProperties); } function registerFormSent(companyName, userName) { var customProperties = { signupCompanyName: companyName, signupName: userName }; amplitude.getInstance().logEvent('webRegisterFormSent', customProperties); } function registerFormFailed2(companyName, userName) { var customProperties = { signupCompanyName: companyName, signupName: userName }; amplitude.getInstance().logEvent('webRegisterFormFailed2', customProperties); } var SuppliersRegisterComponent = /** @class */ (function () { function SuppliersRegisterComponent(appService, valRut, translate, phoneNumberService) { var _this_1 = this; this.appService = appService; this.valRut = valRut; this.translate = translate; this.phoneNumberService = phoneNumberService; // EVENTOS Y ESTADOS this.isLoading = true; this.isLoadingProducts = true; this.isLoadingServices = true; // CONTROL DE PASOS DEL FORMULARIO this.steep = 1; // INFORMACIÓN UTILIZADA EN LOS FORMULARIOS this.products = []; this.services = []; this.countries = []; this.regions = []; this.cities = []; this.communes = []; this.statusRuc = false; this.statusRfc = false; this.statusNitExpReg = null; this.statusNit = null; this.statusNitDuplicate = null; this.statusSend = 0; this.isSubmittedError = false; this.statusEmail = false; this.statusPhone = false; this.statusBillingPhone = false; this.statusBillingEmail = false; this.chileCountryID = 1; this.colombiaCountryID = 82; this.mexicoCountryID = 43; this.peruCountryID = 89; this.companyExists = false; this.CompanyPresalesExists = false; this.userSupplierRegistered = false; //VARIABLES PARA REGISTRO EN MULTIPLES PAISES this.activeCountries = { 1: 'CL', 82: 'CO', 43: 'MX', 89: 'PE' }; // INFORMACIÓN PARA ENVIAR AL SYSTEM this.company = {}; this.user = {}; this.nodes = []; this.reCaptchaResponse = ''; // GOOGLE RE-CAPTCHA this.reCaptcha = { siteKey: _environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].recaptchav2SiteKey }; this.wherexPayLandingUrl = _environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].wherexPayLanding; this.wherexPayInfoUrl = _environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].wherexPayInfoUrl; this.setVarInitialFormPreRegister = function () { _this_1.company.name = _this_1.appService.preName; _this_1.user.email = _this_1.appService.preEmail; _this_1.company.rut = _this_1.appService.preRut; _this_1.company.uci = _this_1.appService.preDni; }; // DEVUELVE SI EL RUC PERUANO ES VALIDO O NO this.validateRuc = function (ruc) { _this_1.statusRuc = _this_1.appService.validateInput(ruc); }; // DEVUELVE SI EL RFC MEXICANo ES VALIDO O NO this.validateRfc = function (ruc) { _this_1.statusRfc = _this_1.appService.validateInputRfc(ruc); }; // DEVUELVE SI EL NIT COLOMBIANO ES VALIDO O NO this.validateNit = function (nit) { _this_1.statusNitExpReg = _this_1.appService.valnitExpReg(nit); _this_1.statusNit = _this_1.appService.valnit(nit); }; this.checkStatusEmail = function () { var regOnlyEmail = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,8})+$/; _this_1.statusEmail = regOnlyEmail.test(_this_1.user.email); }; this.checkStatusPhone = function () { var regOnlyPhone = /^([0-9\+\s\+\-])+$/; _this_1.statusPhone = regOnlyPhone.test(_this_1.user.phone); }; this.checkStatusBillingEmail = function () { var regOnlyEmail = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,6})+$/; _this_1.statusBillingEmail = regOnlyEmail.test(_this_1.user.billingEmail); }; this.checkStatusBillingPhone = function () { var regOnlyPhone = /^([0-9\+\s\+\-])+$/; _this_1.statusBillingPhone = regOnlyPhone.test(_this_1.user.billingPhone); }; this.hideError = function () { _this_1.isSubmittedError = false; _this_1.errors = []; }; this.cancelRegister = function () { location.reload(); _this_1.goTop(); }; this.registerSupplier = function (event) { _this_1.statusSend = 1; var buttonText = event.srcElement.innerHTML; event.srcElement.innerHTML = 'VALIDANDO!'; if (_this_1.isNotARobot === true) { var params = {}; params = { company: _this_1.company, user: _this_1.user, nodes: _this_1.nodes, re_captcha_response: _this_1.reCaptchaResponse }; // SEND DATA TO SYSTEM _this_1.appService.supplierRegistration(params).subscribe(function (result) { _this_1.isSubmittedError = false; _this_1.msgFinalRegister = 'Registro Exitoso'; _this_1.setNextStep(); _this_1.goTop(); //amplitude registerFormSent(_this_1.company.name, _this_1.user.name); }, function (error) { _this_1.isSubmittedError = true; _this_1.errors = error.error; _this_1.goTop(); }); } else { _this_1.statusSend = 2; event.srcElement.innerHTML = buttonText; } }; // Google Analytics events. this.gtmRegisterStep2 = function () { dataLayer.push({ 'event': 'event-push', 'category': 'Registro-Proveedores', 'action': 'Step 2 - Datos de usuario', 'label': document.referrer, 'ga4event': 'register_step_2' }); }; this.gtmRegisterStep3 = function () { dataLayer.push({ 'event': 'event-push', 'category': 'Registro-Proveedores', 'action': 'Step 3 - Categorías', 'label': document.referrer, 'ga4event': 'register_step_3' }); }; this.gtmRegisterStep4 = function () { dataLayer.push({ 'event': 'event-push', 'category': 'Registro-Proveedores', 'action': 'Step 4 - Registro exitoso', 'label': document.referrer, 'ga4event': 'register_step_4' }); }; this.gtmRegisterUserSupplierStep4 = function () { dataLayer.push({ 'event': 'event-push', 'category': 'Registro-Proveedores-UserDomainExists', 'action': 'Step 4 - Registro exitoso de Usuario', 'label': document.referrer, 'ga4event': 'register_step_4_flowUserDomainExists' }); }; this.setNextStep = function () { var currentStep = _this_1.steep; // Triger analytics events. if (currentStep == 1) _this_1.gtmRegisterStep2(); if (currentStep == 2) _this_1.gtmRegisterStep3(); if (currentStep == 3) _this_1.gtmRegisterStep4(); _this_1.steep++; }; this.setStep = function (step) { if (step == 4) { _this_1.gtmRegisterUserSupplierStep4(); _this_1.steep = step; } }; this.nextSteep = function (event, actualSteep) { _this_1.goTop(); _this_1.rewindSend(); event.preventDefault(); _this_1.statusSend = 1; _this_1.hideError(); switch (actualSteep) { case 1: _this_1.errors = []; // VALIDACION CAMPOS VACIOS POR ID DE PAIS -> CHILE if (parseInt(_this_1.company.country) === 1) { var buttonText_1 = event.srcElement.innerHTML; event.srcElement.innerHTML = 'VALIDANDO!'; var paramsun = { 'Direccion Comercial': _this_1.company.address, 'Razon Social': _this_1.company.name, Region: _this_1.company.region, Ciudad: _this_1.company.city, Giro: _this_1.company.lineOfBusiness, Rut: _this_1.company.rut, Comuna: _this_1.company.locality }; setTimeout(function () { event.srcElement.innerHTML = buttonText_1; }, 1000); for (var campo in paramsun) { if (paramsun[campo] === '' || paramsun[campo] === undefined) { _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_1']; _this_1.isSubmittedError = true; _this_1.goTop(); break; } else { if (campo === 'Rut') { if (_this_1.valRut.valiRut(_this_1.company.rut) === true) { var params = { company: _this_1.company }; _this_1.appService.companyCheckDataCompany(params).subscribe(function (result) { _this_1.companyExists = result.companyExists; _this_1.CompanyPresalesExists = result.CompanyPresalesExists; event.srcElement.innerHTML = buttonText_1; _this_1.isSubmittedError = false; _this_1.setNextStep(); _this_1.statusSend = 0; _this_1.goTop(); }, function (error) { if (error.error === undefined || error.error === null || error.error === '') { event.srcElement.innerHTML = buttonText_1; _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_2']; _this_1.isSubmittedError = true; _this_1.goTop(); } else { event.srcElement.innerHTML = buttonText_1; error.error = error.error.map(function (e) { return e == 'La Razón Social ya se encuentra registrada en el sistema.' ? _this_1.translate.instant('SUPPLIER_REGISTER.SR_BUSINESS_NAME_REGISTERED') : e; }); _this_1.errors = error.error; _this_1.isSubmittedError = true; _this_1.goTop(); } }); } else { _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_3']; _this_1.isSubmittedError = true; } } } } } else if (parseInt(_this_1.company.country) === 89) { var buttonText_2 = event.srcElement.innerHTML; event.srcElement.innerHTML = 'VALIDANDO!'; var paramStep = { 'Direccion Comercial': _this_1.company.address, 'Razon Social': _this_1.company.name, Region: _this_1.company.region, ciudad: _this_1.company.city, Giro: _this_1.company.lineOfBusiness, RUC: _this_1.company.rut, }; for (var campo in paramStep) { if (paramStep[campo] == '' || paramStep[campo] == undefined) { event.srcElement.innerHTML = buttonText_2; _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_1']; _this_1.isSubmittedError = true; _this_1.goTop(); break; } else { if (campo == 'RUC') { if (_this_1.statusRuc == false) { setTimeout(function () { event.srcElement.innerHTML = buttonText_2; }, 1000); _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_4']; _this_1.isSubmittedError = true; _this_1.goTop(); } else { var params = { company: _this_1.company }; _this_1.appService.companyCheckDataCompany(params).subscribe(function (result) { _this_1.companyExists = result.companyExists; _this_1.CompanyPresalesExists = result.CompanyPresalesExists; event.srcElement.innerHTML = buttonText_2; _this_1.isSubmittedError = false; _this_1.setNextStep(); _this_1.statusSend = 0; _this_1.goTop(); }, function (error) { if (error.error == undefined || error.error == null || error.error == '') { event.srcElement.innerHTML = buttonText_2; _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_2']; _this_1.isSubmittedError = true; _this_1.goTop(); } else { event.srcElement.innerHTML = buttonText_2; error.error = error.error.map(function (e) { return e == 'La Razón Social ya se encuentra registrada en el sistema.' ? _this_1.translate.instant('SUPPLIER_REGISTER.SR_BUSINESS_NAME_REGISTERED') : e; }); _this_1.errors = error.error; _this_1.isSubmittedError = true; _this_1.goTop(); } }); } } } } } else if (parseInt(_this_1.company.country) === 82) { //Colombia var buttonText_3 = event.srcElement.innerHTML; event.srcElement.innerHTML = 'VALIDANDO!'; var paramStep = { 'Direccion Comercial': _this_1.company.address, 'Razon Social': _this_1.company.name, Region: _this_1.company.region, ciudad: _this_1.company.city, Giro: _this_1.company.lineOfBusiness, NIT: _this_1.company.rut, }; for (var campo in paramStep) { if (paramStep[campo] == '' || paramStep[campo] == undefined) { event.srcElement.innerHTML = buttonText_3; _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_1']; _this_1.isSubmittedError = true; _this_1.goTop(); break; } else { if (campo == 'NIT') { if (_this_1.statusNit == false) { setTimeout(function () { event.srcElement.innerHTML = buttonText_3; }, 1000); _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_5']; _this_1.isSubmittedError = true; _this_1.goTop(); } else if (_this_1.statusNitExpReg == false) { setTimeout(function () { event.srcElement.innerHTML = buttonText_3; }, 1000); _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_6']; _this_1.isSubmittedError = true; _this_1.goTop(); } else { var params = { company: _this_1.company }; _this_1.appService.companyCheckDataCompany(params).subscribe(function (result) { _this_1.companyExists = result.companyExists; _this_1.CompanyPresalesExists = result.CompanyPresalesExists; event.srcElement.innerHTML = buttonText_3; _this_1.isSubmittedError = false; _this_1.setNextStep(); _this_1.statusSend = 0; _this_1.goTop(); }, function (error) { if (error.error == undefined || error.error == null || error.error == '') { event.srcElement.innerHTML = buttonText_3; _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_2']; _this_1.isSubmittedError = true; _this_1.goTop(); } else { event.srcElement.innerHTML = buttonText_3; error.error = error.error.map(function (e) { return e == 'La Razón Social ya se encuentra registrada en el sistema.' ? _this_1.translate.instant('SUPPLIER_REGISTER.SR_BUSINESS_NAME_REGISTERED') : e; }); if (error.error == "Nit ya esta registrado.") { _this_1.statusNit = false; _this_1.statusNitDuplicate = true; } _this_1.errors = error.error; _this_1.isSubmittedError = true; _this_1.goTop(); } }); } } } } } else if (parseInt(_this_1.company.country) === 43) { //mexico var buttonText_4 = event.srcElement.innerHTML; event.srcElement.innerHTML = 'VALIDANDO!'; var paramStep = { 'Direccion Comercial': _this_1.company.address, 'Razon Social': _this_1.company.name, Region: _this_1.company.region, ciudad: _this_1.company.city, Giro: _this_1.company.lineOfBusiness, RFC: _this_1.company.rut, }; for (var campo in paramStep) { if (paramStep[campo] == '' || paramStep[campo] == undefined) { event.srcElement.innerHTML = buttonText_4; _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_1']; _this_1.isSubmittedError = true; _this_1.goTop(); break; } else { if (campo == 'RFC') { if (_this_1.statusRfc == false) { setTimeout(function () { event.srcElement.innerHTML = buttonText_4; }, 1000); _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_7']; _this_1.isSubmittedError = true; _this_1.goTop(); } else if (_this_1.statusNitExpReg == false) { setTimeout(function () { event.srcElement.innerHTML = buttonText_4; }, 1000); _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_6']; _this_1.isSubmittedError = true; _this_1.goTop(); } else { var params = { company: _this_1.company }; _this_1.appService.companyCheckDataCompany(params).subscribe(function (result) { _this_1.companyExists = result.companyExists; _this_1.CompanyPresalesExists = result.CompanyPresalesExists; event.srcElement.innerHTML = buttonText_4; _this_1.isSubmittedError = false; _this_1.setNextStep(); _this_1.statusSend = 0; _this_1.goTop(); }, function (error) { if (error.error == undefined || error.error == null || error.error == '') { event.srcElement.innerHTML = buttonText_4; _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_2']; _this_1.isSubmittedError = true; _this_1.goTop(); } else { event.srcElement.innerHTML = buttonText_4; error.error = error.error.map(function (e) { return e == 'La Razón Social ya se encuentra registrada en el sistema.' ? _this_1.translate.instant('SUPPLIER_REGISTER.SR_BUSINESS_NAME_REGISTERED') : e; }); if (error.error == "Nit ya esta registrado.") { _this_1.statusNit = false; _this_1.statusNitDuplicate = true; } _this_1.errors = error.error; _this_1.isSubmittedError = true; _this_1.goTop(); } }); } } } } } else if (_this_1.isRequiredForCoutry(_this_1.company.country)) { var buttonText_5 = event.srcElement.innerHTML; event.srcElement.innerHTML = 'VALIDANDO!'; var paramStep = { 'Direccion Comercial': _this_1.company.address, 'Razon Social': _this_1.company.name, Region: _this_1.company.region, ciudad: _this_1.company.city, Giro: _this_1.company.lineOfBusiness, 'Numero de Identificacion': _this_1.company.rut, }; setTimeout(function () { event.srcElement.innerHTML = buttonText_5; }, 1000); for (var campo in paramStep) { if (paramStep[campo] == '' || paramStep[campo] == undefined) { _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_1']; _this_1.isSubmittedError = true; _this_1.goTop(); break; } else { if (campo == 'Numero de Identificacion') { if (_this_1.company.rut !== undefined && _this_1.company.rut !== '') { // this.company.rut = this.company.uci; var params = { company: _this_1.company }; if (typeof _this_1.company.region != 'undefined' && _this_1.company.region != '' && typeof _this_1.company.city != 'undefined' && _this_1.company.city != '') { _this_1.isSubmittedError = false; } else { _this_1.isSubmittedError = true; return; } _this_1.statusRuc = true; _this_1.appService.companyCheckDataCompany(params).subscribe(function (result) { event.srcElement.innerHTML = buttonText_5; _this_1.isSubmittedError = false; _this_1.setNextStep(); _this_1.statusSend = 0; _this_1.goTop(); }, function (error) { if (error.error == undefined || error.error == null || error.error == '') { event.srcElement.innerHTML = buttonText_5; _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_2']; _this_1.isSubmittedError = true; _this_1.goTop(); } else { event.srcElement.innerHTML = buttonText_5; error.error = error.error.map(function (e) { return e == 'La Razón Social ya se encuentra registrada en el sistema.' ? _this_1.translate.instant('SUPPLIER_REGISTER.SR_BUSINESS_NAME_REGISTERED') : e; }); _this_1.errors = error.error; _this_1.isSubmittedError = true; _this_1.goTop(); } }); } } } } } else { // VALIDACION CAMPOS VACIOS POR ID DE PAIS DISTINTOS A CHILE Y PERU var buttonText_6 = event.srcElement.innerHTML; event.srcElement.innerHTML = 'VALIDANDO!'; var paramStep = { 'Direccion Comercial': _this_1.company.address, 'Razon Social': _this_1.company.name, Giro: _this_1.company.lineOfBusiness, 'Numero de Identificacion': _this_1.company.uci, }; setTimeout(function () { event.srcElement.innerHTML = buttonText_6; }, 1000); for (var campo in paramStep) { if (paramStep[campo] == '' || paramStep[campo] == undefined) { _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_1']; _this_1.isSubmittedError = true; _this_1.goTop(); break; } else { if (campo == 'Numero de Identificacion') { if (_this_1.company.uci !== undefined && _this_1.company.uci !== '') { var params = { company: _this_1.company }; if (_this_1.company.country == 1 || _this_1.company.country == 89) { delete params.company.uci; } else { delete params.company.rut; _this_1.statusNitExpReg = null; _this_1.statusNit = null; _this_1.statusNitDuplicate = null; } _this_1.appService.companyCheckDataCompany(params).subscribe(function (result) { event.srcElement.innerHTML = buttonText_6; _this_1.isSubmittedError = false; _this_1.setNextStep(); _this_1.statusSend = 0; _this_1.goTop(); }, function (error) { if (error.error == undefined || error.error == null || error.error == '') { event.srcElement.innerHTML = buttonText_6; _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_2']; _this_1.isSubmittedError = true; _this_1.goTop(); } else { event.srcElement.innerHTML = buttonText_6; error.error = error.error.map(function (e) { return e == 'La Razón Social ya se encuentra registrada en el sistema.' ? _this_1.translate.instant('SUPPLIER_REGISTER.SR_BUSINESS_NAME_REGISTERED') : e; }); _this_1.errors = error.error; _this_1.isSubmittedError = true; _this_1.goTop(); } }); } } } } } break; case 2: _this_1.phoneNumberInput = _this_1.generatePhoneNumberInput(_this_1.cellphoneDialCode, _this_1.phoneNumberService.prefixPhone); _this_1.cellphoneNumberInput = _this_1.generatePhoneNumberInput(_this_1.phoneDialCode, _this_1.phoneNumberService.prefixCellphone); _this_1.billingPhoneNumberInput = _this_1.generatePhoneNumberInput(_this_1.billingPhoneDialCode, _this_1.phoneNumberService.prefixBillingPhone); _this_1.statusSend = 1; _this_1.phoneNumberService.sendValues = 1; var regOnlyPhone = /^([0-9\+\s\+\-])+$/; var regOnlyEmail = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,6})+$/; var validateEmail = regOnlyEmail.test(_this_1.user.email); _this_1.user.phone = _this_1.cellphoneNumberInput; _this_1.user.cellphone = _this_1.phoneNumberInput; _this_1.user.billingPhone = _this_1.billingPhoneNumberInput; var buttonText_7 = event.srcElement.innerHTML; event.srcElement.innerHTML = 'VALIDANDO!'; var allParametersUser = { nombre: _this_1.user.name, email: _this_1.user.email, telefono: _this_1.phoneNumberInput, }; if (validateEmail == false) { _this_1.isSubmittedError = true; _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_1']; setTimeout(function () { event.srcElement.innerHTML = buttonText_7; }, 1000); _this_1.goTop(); } else if (!_this_1.phoneNumberService.validatePhone) { registerFormFailed2(_this_1.company.name, _this_1.user.name); _this_1.isSubmittedError = true; _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_1']; setTimeout(function () { event.srcElement.innerHTML = buttonText_7; }, 1000); _this_1.goTop(); } else if (!_this_1.phoneNumberService.validateCellphone && _this_1.cellphoneNumberInput != '') { _this_1.isSubmittedError = true; _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_1']; setTimeout(function () { event.srcElement.innerHTML = buttonText_7; }, 1000); _this_1.goTop(); } else if (!_this_1.phoneNumberService.validateBillingPhone && _this_1.billingPhoneNumberInput != '') { _this_1.isSubmittedError = true; _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_1']; setTimeout(function () { event.srcElement.innerHTML = buttonText_7; }, 1000); _this_1.goTop(); } else { for (var campo in allParametersUser) { if (allParametersUser[campo] == '' || allParametersUser[campo] == undefined) { _this_1.isSubmittedError = true; _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_1']; setTimeout(function () { event.srcElement.innerHTML = buttonText_7; }, 1000); _this_1.goTop(); break; } else { if (String(campo) == 'telefono') { var params = { company: _this_1.company, user: _this_1.user }; _this_1.appService.companyCheckDataUser(params).subscribe(function (result) { event.srcElement.innerHTML = buttonText_7; _this_1.isSubmittedError = false; if (result.userSupplierRegistered) { _this_1.userSupplierRegistered = true; _this_1.setStep(4); registerSupplierUser(_this_1.company.name, _this_1.company.rut, _this_1.user.name, _this_1.user.email); } else { _this_1.setNextStep(); } _this_1.goTop(); //amplitude registerFormStage2ok(_this_1.company.name, _this_1.user.name); }, function (error) { if (error.error == undefined || error.error == null || error.error == '') { _this_1.isSubmittedError = true; event.srcElement.innerHTML = buttonText_7; _this_1.errors = ['SUPPLIER_REGISTER.SR_ALERT_2']; _this_1.goTop(); } else { if (error.error[0] == rutExist) { fail2registerSupplierUser(_this_1.company.name, _this_1.company.rut, _this_1.user.name, _this_1.user.email); } _this_1.isSubmittedError = true; event.srcElement.innerHTML = buttonText_7; _this_1.errors = error.error; _this_1.goTop(); } }); } } } _this_1.statusSend = 0; } break; } }; this.clickOnActivateWherexPayBtn = function () { var customProperties = { signupCompanyName: _this_1.company.name, signupName: _this_1.user.name }; amplitude.getInstance().logEvent('webRegisterActivateWherexPayButton', customProperties); }; this.clickOnWherexPayInfoBtn = function () { var customProperties = { signupCompanyName: _this_1.company.name, signupName: _this_1.user.name }; amplitude.getInstance().logEvent('webRegisterWherexPayInfoButton', customProperties); }; this.rewindSend = function () { _this_1.statusSend = 0; }; this.compareNameCountry = function (a, b) { if (a.name < b.name) { return -1; } if (a.name > b.name) { return 1; } return 0; }; this.translateCountries = function (countries) { countries.forEach(function (element) { element.name = _this_1.translate.instant('COUNTRY.' + element.name); }); }; this.determinateCountries = function (countries) { _this_1.countries = tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"](countries); _this_1.translateCountries(countries); _this_1.activeCountriesArray = countries.filter(function (c) { return typeof _this_1.activeCountries[c.id] !== 'undefined'; }); _this_1.activeCountriesArray.sort(_this_1.compareNameCountry); countries.splice(countries.findIndex(function (c) { return typeof _this_1.activeCountries[c.id] !== 'undefined'; }), _this_1.activeCountriesArray.length); _this_1.inactiveCountries = countries; _this_1.inactiveCountries.sort(_this_1.compareNameCountry); }; // MUESTRA FORMULARIO SEGUN PAIS Y SUS REGIONES this.changeCountry = function (countryId) { _this_1.setLanguage(); _this_1.getProducts(); _this_1.getServices(); _this_1.regions = []; _this_1.cities = []; delete _this_1.company.region; delete _this_1.company.city; delete _this_1.company.locality; delete _this_1.company.rut; delete _this_1.company.uci; for (var j = 0; j < _this_1.countries.length; j++) { if (_this_1.countries[j].id === parseInt(countryId)) { _this_1.regions = _this_1.countries[j].regions; if (countryId != 1 && _this_1.regions) { _this_1.regions.sort(function (a, b) { return a.name.localeCompare(b.name); }); } break; } } _this_1.communes = []; }; this.isRequiredForCoutry = function (countryId) { return typeof _this_1.activeCountries[countryId] != 'undefined'; }; this.changeRegions = function (_regionId) { delete _this_1.company.city; delete _this_1.company.locality; for (var z = 0; z < _this_1.regions.length; z++) { if (_this_1.regions[z].id == _regionId) { if (_this_1.regions[z].cities) { _this_1.cities = _this_1.regions[z].cities; break; } } } _this_1.regionId = _regionId; _this_1.communes = []; }; this.changeCities = function (_cityId) { delete _this_1.company.locality; _this_1.appService.getCommunes().subscribe(function (result) { _this_1.determinateCcommunes(result, _cityId); }); }; this.determinateCcommunes = function (communes, cityId) { if (typeof communes[_this_1.regionId] !== 'undefined') { _this_1.communes = communes[_this_1.regionId]["cities"][cityId].communes; } else { _this_1.communes = []; } }; //traslate event translate.setDefaultLang('es_ES'); this.translate.onLangChange.subscribe(function (event) { _this_1.languageActive = event.lang; _this_1.getCountries(); _this_1.getProducts(); _this_1.getServices(); }); } // SE TRAEN LOS DATOS DESDE LA WEBSITEAPI DEL SYSTEM SuppliersRegisterComponent.prototype.ngOnInit = function () { this.setLanguage(); this.getCountries(); this.getProducts(); this.getServices(); this.isLoading = false; this.setVarInitialFormPreRegister(); //amplitude registerPageVisit(); }; SuppliersRegisterComponent.prototype.setLanguage = function () { this.labelRegion = 'SUPPLIER_REGISTER.SR_REGION'; this.labelCounty = 'SUPPLIER_REGISTER.SR_COUNTY'; this.labelCommercialName = 'SUPPLIER_REGISTER.SR_FANTASY'; this.labelLineOfBusiness = 'SUPPLIER_REGISTER.SR_LINE'; // Verificamos si el país seleccionado está activo y el lenguaje seleccionado es español if (typeof this.activeCountries[this.company.country] !== 'undefined' && (typeof this.languageActive == 'undefined' || this.languageActive == 'es_ES')) { this.labelRegion = this.labelRegion + '_' + this.activeCountries[this.company.country]; this.labelCounty = this.labelCounty + '_' + this.activeCountries[this.company.country]; this.labelCommercialName = this.labelCommercialName + '_' + this.activeCountries[this.company.country]; this.labelLineOfBusiness = this.labelLineOfBusiness + '_' + this.activeCountries[this.company.country]; } else if (typeof this.activeCountries[this.company.country] !== 'undefined' && (typeof this.languageActive == 'undefined' || this.languageActive == 'en_GB')) { this.labelRegion = this.labelRegion + '_' + this.activeCountries[this.company.country]; this.labelCounty = this.labelCounty + '_' + this.activeCountries[this.company.country]; this.labelCommercialName = this.labelCommercialName; this.labelLineOfBusiness = this.labelLineOfBusiness + '_' + this.activeCountries[this.company.country]; } }; // GOOGLE RE CAPTCHA RESOLVED SuppliersRegisterComponent.prototype.reCaptchaResolved = function (reCaptchaResponse) { this.reCaptchaResponse = reCaptchaResponse; this.isNotARobot = true; }; // SIMPLEMENTE AL OCURRIR UN ERROR ACTIVA UN EVENTO DE SCROLLTOP PARA PODER LEERLO SuppliersRegisterComponent.prototype.goTop = function () { $(document).ready(function () { $('html, body').animate({ scrollTop: 0 }, 'slow'); }); }; SuppliersRegisterComponent.prototype.onCountryChange = function (countryCode, inputType) { if (inputType === 'phone') { this.phoneDialCode = countryCode; } else if (inputType === 'cellphone') { this.cellphoneDialCode = countryCode; } else if (inputType === 'billingPhone') { this.billingPhoneDialCode = countryCode; } }; SuppliersRegisterComponent.prototype.generatePhoneNumberInput = function (dialCode, prefix) { var prefixClean = prefix.replace(/[\s-]/g, ""); var prefixLength = prefixClean.length; if (prefixLength < 1) { return ''; } if (dialCode !== undefined && dialCode !== '') { return "+" + dialCode + prefixClean; } else { return prefixClean; } }; SuppliersRegisterComponent.prototype.prevSteep = function (event) { this.hideError(); event.preventDefault(); this.steep--; this.goTop(); }; // METODO PARA OBTENER LOS PAISES DESDE LA WEBSITEAPI DE SYSTEM SuppliersRegisterComponent.prototype.getCountries = function () { var _this_1 = this; this.appService.getCountries().subscribe(function (result) { _this_1.determinateCountries(result); }); }; // METODO PARA OBTENER LOS PRODUCTOS DESDE LA WEBSITEAPI DE SYSTEM SuppliersRegisterComponent.prototype.getProducts = function () { var _this_1 = this; var country = parseInt(this.company.country); var language = this.translate.currentLang.split("_")[0]; this.appService.getNodes(false, language, country).subscribe(function (result) { $('#nodes-products').jstree("destroy"); _this_1.setTree('#nodes-products', result); _this_1.products = result; _this_1.isLoadingProducts = false; }); }; // METODO PARA OBTENER LOS SERVICIOS DESDE LA WEBSITEAPI DE SYSTEM SuppliersRegisterComponent.prototype.getServices = function () { var _this_1 = this; var country = parseInt(this.company.country); var language = this.translate.currentLang.split("_")[0]; this.appService.getNodes(true, language, country).subscribe(function (result) { $('#nodes-services').jstree("destroy"); _this_1.setTree('#nodes-services', result); _this_1.services = result; _this_1.isLoadingServices = false; }); }; // SE AÑADE UN NODO PARA SER ENVIADO AL SYSTEM SuppliersRegisterComponent.prototype.addNode = function (id) { var index = this.nodes.indexOf(id); if (-1 == index) { this.nodes.push(id); } }; // SE REMUEVE UN NODO PREVIAMENTE SELECCIONADO PARA NO SER ENVIADO AL SYSTEM SuppliersRegisterComponent.prototype.removeNode = function (id) { var index = this.nodes.indexOf(id); if (-1 < index) { this.nodes.splice(index, 1); } }; // METODO QUE GENERA EL ARBOL DE (PRODUCTOS|SERVICIOS) // DENTRO DE ESTE MÉTODO SE AGRUPAN TODOS LOS METODOS CORRESPONDIENTES AL FUNCIONAMIENTO DEL ARBOL DE (PRODUCTOS|SERVICIOS) SuppliersRegisterComponent.prototype.setTree = function (container, data) { var $nodesContainer = $(container); var $selectedsContainer = $('#selecteds'); var $search = $('#search'); var _this = this; $nodesContainer.jstree({ plugins: ['search', 'checkbox'], core: { data: data, themes: { icons: false } }, search: { case_insensitive: true, 'checkbox.visible': true, show_only_matches_children: true, fuzzy: true, search_callback: function (searchString, node) { var defaultDiacriticsRemovalMap = [ { 'base': 'A', 'letters': /[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g }, { 'base': 'AA', 'letters': /[\uA732]/g }, { 'base': 'AE', 'letters': /[\u00C6\u01FC\u01E2]/g }, { 'base': 'AO', 'letters': /[\uA734]/g }, { 'base': 'AU', 'letters': /[\uA736]/g }, { 'base': 'AV', 'letters': /[\uA738\uA73A]/g }, { 'base': 'AY', 'letters': /[\uA73C]/g }, { 'base': 'B', 'letters': /[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g }, { 'base': 'C', 'letters': /[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g }, { 'base': 'D', 'letters': /[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g }, { 'base': 'DZ', 'letters': /[\u01F1\u01C4]/g }, { 'base': 'Dz', 'letters': /[\u01F2\u01C5]/g }, { 'base': 'E', 'letters': /[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g }, { 'base': 'F', 'letters': /[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g }, { 'base': 'G', 'letters': /[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g }, { 'base': 'H', 'letters': /[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g }, { 'base': 'I', 'letters': /[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g }, { 'base': 'J', 'letters': /[\u004A\u24BF\uFF2A\u0134\u0248]/g }, { 'base': 'K', 'letters': /[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g }, { 'base': 'L', 'letters': /[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g }, { 'base': 'LJ', 'letters': /[\u01C7]/g }, { 'base': 'Lj', 'letters': /[\u01C8]/g }, { 'base': 'M', 'letters': /[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g }, { 'base': 'N', 'letters': /[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g }, { 'base': 'NJ', 'letters': /[\u01CA]/g }, { 'base': 'Nj', 'letters': /[\u01CB]/g }, { 'base': 'O', 'letters': /[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g }, { 'base': 'OI', 'letters': /[\u01A2]/g }, { 'base': 'OO', 'letters': /[\uA74E]/g }, { 'base': 'OU', 'letters': /[\u0222]/g }, { 'base': 'P', 'letters': /[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g }, { 'base': 'Q', 'letters': /[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g }, { 'base': 'R', 'letters': /[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g }, { 'base': 'S', 'letters': /[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g }, { 'base': 'T', 'letters': /[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g }, { 'base': 'TZ', 'letters': /[\uA728]/g }, { 'base': 'U', 'letters': /[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g }, { 'base': 'V', 'letters': /[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g }, { 'base': 'VY', 'letters': /[\uA760]/g }, { 'base': 'W', 'letters': /[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g }, { 'base': 'X', 'letters': /[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g }, { 'base': 'Y', 'letters': /[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g }, { 'base': 'Z', 'letters': /[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g }, { 'base': 'a', 'letters': /[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g }, { 'base': 'aa', 'letters': /[\uA733]/g }, { 'base': 'ae', 'letters': /[\u00E6\u01FD\u01E3]/g }, { 'base': 'ao', 'letters': /[\uA735]/g }, { 'base': 'au', 'letters': /[\uA737]/g }, { 'base': 'av', 'letters': /[\uA739\uA73B]/g }, { 'base': 'ay', 'letters': /[\uA73D]/g }, { 'base': 'b', 'letters': /[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g }, { 'base': 'c', 'letters': /[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g }, { 'base': 'd', 'letters': /[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g }, { 'base': 'dz', 'letters': /[\u01F3\u01C6]/g }, { 'base': 'e', 'letters': /[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g }, { 'base': 'f', 'letters': /[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g }, { 'base': 'g', 'letters': /[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g }, { 'base': 'h', 'letters': /[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g }, { 'base': 'hv', 'letters': /[\u0195]/g }, { 'base': 'i', 'letters': /[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g }, { 'base': 'j', 'letters': /[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g }, { 'base': 'k', 'letters': /[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g }, { 'base': 'l', 'letters': /[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g }, { 'base': 'lj', 'letters': /[\u01C9]/g }, { 'base': 'm', 'letters': /[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g }, { 'base': 'n', 'letters': /[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g }, { 'base': 'nj', 'letters': /[\u01CC]/g }, { 'base': 'o', 'letters': /[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g }, { 'base': 'oi', 'letters': /[\u01A3]/g }, { 'base': 'ou', 'letters': /[\u0223]/g }, { 'base': 'oo', 'letters': /[\uA74F]/g }, { 'base': 'p', 'letters': /[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g }, { 'base': 'q', 'letters': /[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g }, { 'base': 'r', 'letters': /[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g }, { 'base': 's', 'letters': /[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g }, { 'base': 't', 'letters': /[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g }, { 'base': 'tz', 'letters': /[\uA729]/g }, { 'base': 'u', 'letters': /[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g }, { 'base': 'v', 'letters': /[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g }, { 'base': 'vy', 'letters': /[\uA761]/g }, { 'base': 'w', 'letters': /[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g }, { 'base': 'x', 'letters': /[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g }, { 'base': 'y', 'letters': /[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g }, { 'base': 'z', 'letters': /[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g } ]; var tempSearchString = searchString.toLowerCase(); for (var i = 0; i < defaultDiacriticsRemovalMap.length; i++) { tempSearchString = tempSearchString.replace(defaultDiacriticsRemovalMap[i].letters, defaultDiacriticsRemovalMap[i].base); } var text = (node.text || '').toLowerCase(); for (var i = 0; i < defaultDiacriticsRemovalMap.length; i++) { text = text.replace(defaultDiacriticsRemovalMap[i].letters, defaultDiacriticsRemovalMap[i].base); } return text.indexOf(tempSearchString) != -1; } }, }); var addNode = function (id, text) { $selectedsContainer.append('
' + text + ' ' + ' ' + ' ' + '
'); }; var removeNode = function (id) { $selectedsContainer.find('#node-' + id).remove(); }; var removeNodeSearching = function (_childsLi) { var searchingCoincidenses = $(_childsLi).find('.jstree-search'); if (searchingCoincidenses.length == 0) { return false; } else { return true; } }; var addSelectable = function (node) { $('#nothing-selected').attr('class', 'invisibleMessage'); if (node.children.length) { $(node.children).each(function (index, id) { var node = $nodesContainer.jstree('get_node', id); addSelectable(node); }); return; } if (0 === $selectedsContainer.find('#node-' + node.id).length) { addNode(node.id, node.text); _this.addNode(node.id); } }; var newRemoveNode = function (id) { var index = _this.nodes.indexOf(id); if (-1 < index) { _this.nodes.splice(index, 1); } }; var removeSelectable = function (node) { if (node.children.length) { $(node.children).each(function (index, id) { var node = $nodesContainer.jstree('get_node', id); removeSelectable(node); }); return; } if (0 !== $selectedsContainer.find('#node-' + node.id).length) { removeNode(node.id); _this.removeNode(node.id); } }; var enableEnableableNodes = function (node) { if ($nodesContainer.jstree('is_disabled', node.id)) { var enable_1 = true; $(node.children).each(function (index, id) { if ($nodesContainer.jstree('is_disabled', id)) { enable_1 = false; return false; } }); if (enable_1) { $nodesContainer.jstree('enable_node', node.id); } } }; var openOpenableNodes = function ($nodes) { var openable = false; $nodes.each(function (index, element) { var id = $(element).attr('id'); if (!$nodesContainer.jstree('is_open', id)) { openable = true; $nodesContainer.jstree('open_node', id); } }); return openable; }; var closeCloseableNodes = function ($nodes) { var closenable = false; $nodes.each(function (index, element) { var id = $(element).attr('id'); if ($nodesContainer.jstree('is_open', id)) { closenable = true; $nodesContainer.jstree('close_node', id); } }); return closenable; }; // EVENT WHEN A NODE IS SELECTED $nodesContainer.on('select_node.jstree', function (event, data) { addSelectable(data.node); }); // EVENT WHEN A NODE IS DESELECTED $nodesContainer.on('deselect_node.jstree', function (event, data) { removeSelectable(data.node); var findElementsVlild = $('ul.jstree-children').children(); if (findElementsVlild.find('[aria-selected = "true"]').length == 0) { $('#nothing-selected').attr('class', 'alert alert-warning'); } }); $nodesContainer.on('close_node.jstree', function (event, data) { $nodesContainer.jstree('disable_node', data.node.id); $nodesContainer.jstree('disable_node', data.node.parent); }); // EVENT WHEN A NODE IS OPEN $nodesContainer.on('open_node.jstree', function (event, data) { enableEnableableNodes(data.node); }); // EVENT WHEN A NODE IS ENABLED $nodesContainer.on('enable_node.jstree', function (event, data) { var node = $nodesContainer.jstree('get_node', data.node.parent); enableEnableableNodes(node); }); // OPEN BUTTON $('.btn-jstree-open').on('click', function () { var target = $(this).data('target'); var $nodesContainer = $(target); var $nodesLevel1 = $nodesContainer.find('[aria-level="1"]'); if (!openOpenableNodes($nodesLevel1)) { var $nodesLevel2 = $nodesContainer.find('[aria-level="2"]'); openOpenableNodes($nodesLevel2); } }); // CLOSE BUTTON $('.btn-jstree-close').on('click', function () { var target = $(this).data('target'); var $nodesContainer = $(target); var $nodesLevel2 = $nodesContainer.find('[aria-level="2"]'); if (!closeCloseableNodes($nodesLevel2)) { var $nodesLevel1 = $nodesContainer.find('[aria-level="1"]'); closeCloseableNodes($nodesLevel1); } }); $selectedsContainer.on('click', '.close-badge', function (event) { event.preventDefault(); var $link = $(this); var $parent = $link.parent(); var id = $link.data('id'); newRemoveNode('' + id + ''); $parent.remove(); $nodesContainer.jstree('deselect_node', id); var findElementsVlild = $('ul.jstree-children').children(); if (findElementsVlild.find('[aria-selected = "true"]').length == 0) { $('#nothing-selected').attr('class', 'alert alert-warning'); } }); $search.on('keyup', function (event) { event.preventDefault(); var valSearch = String($search.val()); var firstLetterU = valSearch.charAt(0).toUpperCase(); var firstLetter = valSearch.charAt(0); var textFinal = valSearch.replace(firstLetter, firstLetterU).trim(); var dataSearching = $nodesContainer.jstree('search', textFinal); var totalFinding = $(dataSearching).find('.jstree-search'); if (event.keyCode == 8 || event.keyCode == 46) { if ($('#search').val() == '') { $nodesContainer.jstree('refresh'); setTimeout(function () { var ulTestSearchingNodesProducts = $('ul.jstree-container-ul.jstree-children.jstree-no-icons').children(); $(ulTestSearchingNodesProducts).each(function (key, value) { var areaStatus = $('#' + value.id + '').attr('aria-expanded'); if (areaStatus == 'true') { var child2forclose = $('#' + value.id + '').children(); child2forclose.click(); } $nodesContainer.jstree('refresh'); }); }, 1000); } else { $nodesContainer.jstree('redraw', 'true'); } } $(totalFinding).each(function (key, value) { if ($('#' + totalFinding[key].id + '').parent().attr('aria-expanded') == 'false') { $('#' + totalFinding[key].id + '').prev().click(); if ($('#' + totalFinding[key].id + '').next().children()) { $('#' + totalFinding[key].id + '').next().children().each(function (key, value) { $('#' + value.id + '').first().children().first().click(); }); } } }); if ($(dataSearching).find('.jstree-search').length != 0) { $('.countPro').html('

(' + $('#nodes-products').find('.jstree-search').length + ')

'); $('.countServ').html('

(' + $('#nodes-services').find('.jstree-search').length + ')

'); } else { if ($('#search').val() != '') { $('.countPro').html('

(' + $('#nodes-products').find('.jstree-search').length + ')

'); $('.countServ').html('

(' + $('#nodes-services').find('.jstree-search').length + ')

'); } else { $('.countPro').html('

'); $('.countServ').html('

'); } } $(dataSearching).each(function (key, value) { var ulTestSearching = $('#' + value.id + '').children(); var liUlTestSearching = ulTestSearching.children(); $(liUlTestSearching).each(function (key, value) { var attributesChild = $('#' + value.id + '').children(); var validateClass = attributesChild[1].className; var ulChildrenLi = attributesChild[2]; if (validateClass.indexOf('jstree-search') == -1) { if (ulChildrenLi) { var responseDelete = removeNodeSearching(ulChildrenLi); if (responseDelete == false) { $('#' + value.id + '').css('display', 'none'); } else { $nodesContainer.jstree('disable_node', value.id); } var ulChildrenLi2 = $(ulChildrenLi).children(); ulChildrenLi2.each(function (key2, value2) { var openSecondsArea = $(value2).find('.jstree-icon.jstree-ocl'); $(openSecondsArea).each(function (key4, value4) { var newParentAttribute = value4.parentElement.getAttribute('id'); var childOfTheSecondLevel = $('#' + newParentAttribute + '').children(); var ariaLevel2 = $('#' + newParentAttribute + '').attr('aria-expanded'); if (ariaLevel2 == 'false') { childOfTheSecondLevel[0].click(); } var validateSecondClass = $(childOfTheSecondLevel[1]).attr('class'); if (validateSecondClass.indexOf('jstree-search') == -1) { if (childOfTheSecondLevel[2]) { var responseDelete2 = removeNodeSearching(childOfTheSecondLevel[2]); if (responseDelete2 == false) { $('#' + newParentAttribute + '').css('display', 'none'); } else { $nodesContainer.jstree('disable_node', newParentAttribute); } var thirdLevelsChilds = $(childOfTheSecondLevel[2]).children(); $(thirdLevelsChilds).each(function (key6, value6) { var thirdCHildsBody = $('#' + value6.id + '').children(); var thirdClassName = $(thirdCHildsBody[1]).attr('class'); if (thirdClassName.indexOf('jstree-search') == -1) { $('#' + value6.id + '').css('display', 'none'); } }); } } }); }); } else { $('#' + value.id + '').css('display', 'none'); } } else { var ulChildrenLi2 = $(ulChildrenLi).children(); ulChildrenLi2.each(function (key2, value2) { var openSecondsArea = $(value2).find('.jstree-icon.jstree-ocl'); $(openSecondsArea).each(function (key4, value4) { var newParentAttribute = value4.parentElement.getAttribute('id'); var childOfTheSecondLevel = $('#' + newParentAttribute + '').children(); var ariaLevel2 = $('#' + newParentAttribute + '').attr('aria-expanded'); if (ariaLevel2 == 'false') { childOfTheSecondLevel[0].click(); } }); }); } }); }); }); }; SuppliersRegisterComponent.ctorParameters = function () { return [ { type: _services_system_api_service__WEBPACK_IMPORTED_MODULE_3__["SystemApiService"] }, { type: _services_vali_rut_service__WEBPACK_IMPORTED_MODULE_4__["ValiRutService"] }, { type: _ngx_translate_core__WEBPACK_IMPORTED_MODULE_6__["TranslateService"] }, { type: _services_phone_input_service__WEBPACK_IMPORTED_MODULE_7__["PhoneService"] } ]; }; tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Input"])() ], SuppliersRegisterComponent.prototype, "estado", void 0); SuppliersRegisterComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_2__["Component"])({ selector: 'app-suppliers-register', template: __webpack_require__(/*! raw-loader!./suppliers-register.component.html */ "./node_modules/raw-loader/index.js!./src/app/suppliers-register/suppliers-register.component.html") }) ], SuppliersRegisterComponent); return SuppliersRegisterComponent; }()); /***/ }), /***/ "./src/app/suppliers/suppliers.component.ts": /*!**************************************************!*\ !*** ./src/app/suppliers/suppliers.component.ts ***! \**************************************************/ /*! exports provided: SuppliersComponent */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SuppliersComponent", function() { return SuppliersComponent; }); /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js"); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _services_system_api_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../services/system-api.service */ "./src/app/services/system-api.service.ts"); /* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ "./node_modules/@angular/router/fesm5/router.js"); //import * as amplitude from 'amplitude-js'; //amplitude function supplierPageVisit() { amplitude.getInstance().logEvent('webSupplierPageVisit'); } function preRegister() { amplitude.getInstance().logEvent('webPreRegister'); } var SuppliersComponent = /** @class */ (function () { function SuppliersComponent(appService, systemApiService, route) { var _this = this; this.appService = appService; this.systemApiService = systemApiService; this.route = route; this.loading = true; //api statistics this.statisticsBar = { totalSuppliers: 0, totalBuyers: 0, totalProposals: 0, totalRequirements: 0 }; this.company = {}; this.user = {}; this.statusEmail = true; this.errors = []; this.statusHttp = 0; this.validateEmail = function (email) { var regOnlyEmail = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/; _this.statusEmail = regOnlyEmail.test(email); }; } SuppliersComponent.prototype.format2 = function (value) { var number = Math.floor(value / 100) * 100; return number.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.'); }; SuppliersComponent.prototype.ngOnInit = function () { //amplitude supplierPageVisit(); //api statistics this.getStatistics(); }; //api statistics SuppliersComponent.prototype.getStatistics = function () { var _this = this; this.systemApiService.getStatisticsBar() .subscribe(function (result) { _this.statisticsBar = result; _this.loading = false; }); }; SuppliersComponent.prototype.changeStatusHttp = function (numError) { this.statusHttp = numError; }; SuppliersComponent.prototype.resetValidRut = function () { this.errors = []; this.statusHttp = 200; }; SuppliersComponent.prototype.sendPreData = function () { var _this = this; this.errors = []; this.appService.determinateValuesVarPreRegister(this.company.name, this.user.email, this.company.rut.trim()); var preParams = { data: { "name": this.company.name, "email": this.user.email, "rut": this.company.rut } }; //amplitude preRegister(); this.appService.checkValidationPreRegister(preParams).subscribe(function (result) { _this.route.navigate(['proveedores/registro']); }, function (error) { _this.changeStatusHttp(error.status); if (error.status === 400) { _this.errors = error.error; setTimeout(function () { _this.resetValidRut(); }, 200000); } else { _this.errors = ['Lo sentimos experimentamos problemas, comuniquese con nosotros para mayor información Telf :(+56) 9 4003 0866 ,(+56) 2 3251 2550.']; } }); }; SuppliersComponent.ctorParameters = function () { return [ { type: _services_system_api_service__WEBPACK_IMPORTED_MODULE_2__["SystemApiService"] }, { type: _services_system_api_service__WEBPACK_IMPORTED_MODULE_2__["SystemApiService"] }, { type: _angular_router__WEBPACK_IMPORTED_MODULE_3__["Router"] } ]; }; SuppliersComponent = tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"]([ Object(_angular_core__WEBPACK_IMPORTED_MODULE_1__["Component"])({ selector: 'app-suppliers', template: __webpack_require__(/*! raw-loader!./suppliers.component.html */ "./node_modules/raw-loader/index.js!./src/app/suppliers/suppliers.component.html") }) ], SuppliersComponent); return SuppliersComponent; }()); /***/ }), /***/ "./src/environments/environment.ts": /*!*****************************************!*\ !*** ./src/environments/environment.ts ***! \*****************************************/ /*! exports provided: environment */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "environment", function() { return environment; }); var environment = { production: false, systemUrl: 'https://system.wherex.com', systemApiPath: '/website/api/1', wordpressUrl: 'https://blog.aqmarket.com', wordpressApiPath: '/wp-json/wp/v2', recaptchav2SiteKey: '6LdzNHQUAAAAAIK5gM7CmOsTaEuYF0ehs6raUFGS', recaptchav2SiteSecret: '6LdzNHQUAAAAADu3r-IV6PDB4jUTBeWzckcDo8L2', wherexPayLanding: 'https://pay.wherex.com/onboarding/cliente-nuevo/registro-nuevo?utm_source=Onboarding&utm_medium=Cliente-Nuevo&utm_campaign=Termina%20tu%20registro&utm_term=UTM_source', wherexPayInfoUrl: 'https://wherex.cl/wherex-pay-proveedores/' }; /***/ }), /***/ "./src/main.ts": /*!*********************!*\ !*** ./src/main.ts ***! \*********************/ /*! no exports provided */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ "./node_modules/@angular/core/fesm5/core.js"); /* harmony import */ var _angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/platform-browser-dynamic */ "./node_modules/@angular/platform-browser-dynamic/fesm5/platform-browser-dynamic.js"); /* harmony import */ var _app_app_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./app/app.module */ "./src/app/app.module.ts"); /* harmony import */ var _environments_environment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./environments/environment */ "./src/environments/environment.ts"); if (_environments_environment__WEBPACK_IMPORTED_MODULE_3__["environment"].production) { Object(_angular_core__WEBPACK_IMPORTED_MODULE_0__["enableProdMode"])(); } Object(_angular_platform_browser_dynamic__WEBPACK_IMPORTED_MODULE_1__["platformBrowserDynamic"])().bootstrapModule(_app_app_module__WEBPACK_IMPORTED_MODULE_2__["AppModule"]) .catch(function (err) { return console.error(err); }); /***/ }), /***/ 0: /*!***************************!*\ !*** multi ./src/main.ts ***! \***************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(/*! /opt/atlassian/pipelines/agent/build/src/main.ts */"./src/main.ts"); /***/ }) },[[0,"runtime","vendor"]]]); //# sourceMappingURL=main-es5.js.map