PageSourceSearch

https://micuenta.viva.com.do/_next/static/chunks/pages/Main/ConsumptionHistory-972eba79a2cf74ac.js

js viva.com.do collected 2026-10-01 16:35:44 UTC 54,664 bytes, 1,125 lines download raw bytes

1(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([[9762],{
2
3/***/ 9552:
4/***/ (function(module) {
5
6var exports = module.exports = function (doc) {
7    if (!doc) doc = {};
8    if (typeof doc === 'string') doc = { cookie: doc };
9    if (doc.cookie === undefined) doc.cookie = '';
10    
11    var self = {};
12    self.get = function (key) {
13        var splat = doc.cookie.split(/;\s*/);
14        for (var i = 0; i < splat.length; i++) {
15            var ps = splat[i].split('=');
16            var k = unescape(ps[0]);
17            if (k === key) return unescape(ps[1]);
18        }
19        return undefined;
20    };
21    
22    self.set = function (key, value, opts) {
23        if (!opts) opts = {};
24        var s = escape(key) + '=' + escape(value);
25        if (opts.expires) s += '; expires=' + opts.expires;
26        if (opts.path) s += '; path=' + escape(opts.path);
27        if (opts.domain) s += '; domain=' + escape(opts.domain);
28        if (opts.secure) s += '; secure';
29        doc.cookie = s;
30        return s;
31    };
32    return self;
33};
34
35if (typeof document !== 'undefined') {
36    var cookie = exports(document);
37    exports.get = cookie.get;
38    exports.set = cookie.set;
39}
40
41
42/***/ }),
43
44/***/ 271:
45/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
46
47
48    (window.__NEXT_P = window.__NEXT_P || []).push([
49      "/Main/ConsumptionHistory",
50      function () {
51        return __webpack_require__(4341);
52      }
53    ]);
54    if(false) {}
55  
56
57/***/ }),
58
59/***/ 7254:
60/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
61
62"use strict";
63/* harmony export */ __webpack_require__.d(__webpack_exports__, {
64/* harmony export */   "P": function() { return /* binding */ useUserInfo; }
65/* harmony export */ });
66/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7294);
67/* harmony import */ var _context_HomeContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7056);
68
69
70const useUserInfo = (response)=>{
71    const { saveServiceAndPos , contextUserData , position  } = react__WEBPACK_IMPORTED_MODULE_0__.useContext(_context_HomeContext__WEBPACK_IMPORTED_MODULE_1__/* .HomeContext */ .Q);
72    const contextAArray = [];
73    react__WEBPACK_IMPORTED_MODULE_0__.useEffect(()=>{
74        response === null || response === void 0 ? void 0 : response.customer_info.map((element, position)=>{
75            const x = {
76                userData: element,
77                pos: position
78            };
79            contextAArray.push(x);
80        });
81        saveServiceAndPos(contextAArray);
82    // eslint-disable-next-line react-hooks/exhaustive-deps
83    }, [
84        response
85    ]);
86    return {
87        contextUserData,
88        position
89    };
90};
91
92
93/***/ }),
94
95/***/ 450:
96/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
97
98"use strict";
99/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5893);
100/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7294);
101/* harmony import */ var _BackButton_stylesBackButton_module_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6983);
102/* harmony import */ var _BackButton_stylesBackButton_module_css__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_BackButton_stylesBackButton_module_css__WEBPACK_IMPORTED_MODULE_4__);
103/* harmony import */ var _mui_icons_material_ArrowBackIosNew__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8298);
104/* harmony import */ var _context_HomeContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7056);
105/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1163);
106/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_3__);
107
108
109
110
111
112
113function BackButton(props) {
114    const router = (0,next_router__WEBPACK_IMPORTED_MODULE_3__.useRouter)();
115    const { saveStep , step , popPath , popAll , breadcrumbPath  } = react__WEBPACK_IMPORTED_MODULE_1__.useContext(_context_HomeContext__WEBPACK_IMPORTED_MODULE_2__/* .HomeContext */ .Q);
116    return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
117        className: (_BackButton_stylesBackButton_module_css__WEBPACK_IMPORTED_MODULE_4___default().contBack),
118        children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("a", {
119            onClick: ()=>{
120                if (props.isOnSteper && step !== 0) {
121                    saveStep("-");
122                    return;
123                }
124                if (breadcrumbPath.length === 1) {
125                    router.push("/Main/Home");
126                    popAll();
127                    return;
128                }
129                if (router.isReady) {
130                    router.back();
131                    popPath();
132                }
133            },
134            children: [
135                /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mui_icons_material_ArrowBackIosNew__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {}),
136                "Atr\xe1s"
137            ]
138        })
139    });
140}
141/* harmony default export */ __webpack_exports__["Z"] = (BackButton);
142
143
144/***/ }),
145
146/***/ 1665:
147/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
148
149"use strict";
150/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5893);
151/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7294);
152/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3408);
153/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8456);
154/* harmony import */ var _stylesGlobalButton_module_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5427);
155/* harmony import */ var _stylesGlobalButton_module_css__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_stylesGlobalButton_module_css__WEBPACK_IMPORTED_MODULE_4__);
156
157
158
159
160
161const GlobalButton = (param)=>{
162    let { textButton , iconText , onClick , loading , ...props } = param;
163    const handleClick = (e)=>{
164        onClick === null || onClick === void 0 ? void 0 : onClick(e);
165    };
166    if (loading) {
167        return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(GlobalButton, {
168            ...props,
169            shouldBeActive: true,
170            iconText: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mui_material__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, {
171                size: 35,
172                sx: {
173                    color: "white",
174                    marginBottom: "10px",
175                    marginTop: "10px"
176                },
177                style: {
178                    width: 25,
179                    height: 25
180                }
181            })
182        });
183    }
184    return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_mui_material_Button__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, {
185        onClick: handleClick,
186        disabled: props === null || props === void 0 ? void 0 : props.shouldBeActive,
187        sx: {
188            backgroundColor: (props === null || props === void 0 ? void 0 : props.shouldBeActive) ? "#BAE46B !important" : "#93D500",
189            color: "white !important",
190            marginTop: (props === null || props === void 0 ? void 0 : props.marginTop) ? "20px !important" : "",
191            marginBottom: (props === null || props === void 0 ? void 0 : props.marginBottom) ? "20px !important" : null
192        },
193        className: (_stylesGlobalButton_module_css__WEBPACK_IMPORTED_MODULE_4___default().btnAcept),
194        children: [
195            iconText,
196            textButton
197        ]
198    });
199};
200/* harmony default export */ __webpack_exports__["Z"] = (GlobalButton);
201
202
203/***/ }),
204
205/***/ 1251:
206/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
207
208"use strict";
209/* harmony export */ __webpack_require__.d(__webpack_exports__, {
210/* harmony export */   "GZ": function() { return /* binding */ stringAvatar; }
211/* harmony export */ });
212/* unused harmony export stringToColor */
213/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5893);
214/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7294);
215/* harmony import */ var react_icons_md__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(80);
216/* harmony import */ var _Header_module_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3335);
217/* harmony import */ var _Header_module_css__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_Header_module_css__WEBPACK_IMPORTED_MODULE_5__);
218/* harmony import */ var _utils_utils_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5109);
219/* harmony import */ var _mui_material_Avatar__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(9661);
220/* harmony import */ var _mui_material_Stack__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6170);
221/* harmony import */ var _context_HomeContext__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7056);
222/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1163);
223/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_4__);
224
225
226
227
228
229
230
231
232
233function stringToColor(string) {
234    let hash = 0;
235    let i;
236    /* eslint-disable no-bitwise */ for(i = 0; i < string.length; i += 1){
237        hash = string.charCodeAt(i) + ((hash << 5) - hash);
238    }
239    let color = "#";
240    for(i = 0; i < 3; i += 1){
241        const value = hash >> i * 8 & 0xff;
242        color += "00".concat(value.toString(16)).slice(-2);
243    }
244    /* eslint-enable no-bitwise */ return color;
245}
246function stringAvatar(name) {
247    return {
248        sx: {
249            bgcolor: stringToColor(name)
250        },
251        children: "".concat(name === null || name === void 0 ? void 0 : name.split(" ")[0][0]).concat(name.split(" ")[1] ? name === null || name === void 0 ? void 0 : name.split(" ")[1][0] : "")
252    };
253}
254function Header(props) {
255    const { popAll  } = react__WEBPACK_IMPORTED_MODULE_1__.useContext(_context_HomeContext__WEBPACK_IMPORTED_MODULE_3__/* .HomeContext */ .Q);
256    const router = (0,next_router__WEBPACK_IMPORTED_MODULE_4__.useRouter)();
257    const goToService = ()=>{
258        router.replace({
259            pathname: "/Main/ServiceDetailed",
260            query: {
261                selected: props.selected
262            }
263        });
264        popAll();
265    };
266    return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
267        className: (_Header_module_css__WEBPACK_IMPORTED_MODULE_5___default().container),
268        children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
269            className: (_Header_module_css__WEBPACK_IMPORTED_MODULE_5___default().contHeader),
270            children: [
271                /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
272                    className: (_Header_module_css__WEBPACK_IMPORTED_MODULE_5___default().contTopHeader),
273                    children: [
274                        /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
275                            className: (_Header_module_css__WEBPACK_IMPORTED_MODULE_5___default().contInfoTitle),
276                            onClick: goToService,
277                            children: [
278                                /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
279                                    className: (_Header_module_css__WEBPACK_IMPORTED_MODULE_5___default().contIcon),
280                                    children: props.planCode === "HIBESPXS" || props.planCode === "INTERPRE" ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_icons_md__WEBPACK_IMPORTED_MODULE_6__/* .MdRouter */ .wt4, {
281                                        style: {
282                                            marginRight: 4,
283                                            marginTop: 2
284                                        }
285                                    }) : props.planCode === "PREPAG_4G" ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_icons_md__WEBPACK_IMPORTED_MODULE_6__/* .MdPhoneAndroid */ .uuN, {
286                                        style: {
287                                            marginTop: 5
288                                        }
289                                    }) : props.planCode === "VMCP" ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_icons_md__WEBPACK_IMPORTED_MODULE_6__/* .MdPhone */ .IXo, {
290                                        style: {
291                                            marginRight: 4,
292                                            marginTop: 2
293                                        }
294                                    }) : /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_icons_md__WEBPACK_IMPORTED_MODULE_6__/* .MdPhoneAndroid */ .uuN, {})
295                                }),
296                                /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
297                                    children: [
298                                        /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
299                                            className: (_Header_module_css__WEBPACK_IMPORTED_MODULE_5___default().contTitle),
300                                            children: props.planDescription ? (0,_utils_utils_utils__WEBPACK_IMPORTED_MODULE_2__/* .formatToLowerCaseText */ .gr)(props.planDescription).map((Element)=>"".concat(Element, " ")) : null
301                                        }),
302                                        /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
303                                            className: (_Header_module_css__WEBPACK_IMPORTED_MODULE_5___default().contNumber),
304                                            children: (0,_utils_utils_utils__WEBPACK_IMPORTED_MODULE_2__/* .formatNumber */ .uf)(props.number)
305                                        })
306                                    ]
307                                })
308                            ]
309                        }),
310                        /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
311                            className: (_Header_module_css__WEBPACK_IMPORTED_MODULE_5___default().contHeaderImg),
312                            children: [
313                                /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
314                                    className: (_Header_module_css__WEBPACK_IMPORTED_MODULE_5___default().contName),
315                                    children: props.name ? (0,_utils_utils_utils__WEBPACK_IMPORTED_MODULE_2__/* .formatToLowerCaseText */ .gr)(props.name).map((Element)=>"".concat(Element, " ")) : null
316                                }),
317                                /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mui_material_Stack__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z, {
318                                    direction: "row",
319                                    spacing: 2,
320                                    sx: {
321                                        marginLeft: 2
322                                    },
323                                    children: props.name ? /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_mui_material_Avatar__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z, {
324                                        style: {
325                                            background: "#9164CC"
326                                        },
327                                        ...stringAvatar("".concat(props.name))
328                                    }) : null
329                                })
330                            ]
331                        })
332                    ]
333                }),
334                /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
335                    className: (_Header_module_css__WEBPACK_IMPORTED_MODULE_5___default().contBottonHeader),
336                    children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("p", {
337                        children: [
338                            "".concat(props.planType !== "CCOPRE" ? "Balance a la fecha" : "Balance", ":"),
339                            " ",
340                            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
341                                children: props.planType !== "CCOPRE" ? (0,_utils_utils_utils__WEBPACK_IMPORTED_MODULE_2__/* .formatBalance */ .az)(props.debtAmount) : (0,_utils_utils_utils__WEBPACK_IMPORTED_MODULE_2__/* .formatBalance */ .az)(props.balance, true)
342                            }),
343                            " \xa0 | \xa0 ",
344                            props.planType !== "CCOPRE" ? "Fecha de corte: ".concat(props.fechaCorte) : "Vence: ".concat(props.fechaExpiracion),
345                            " \xa0 | \xa0 Estado: ",
346                            props.estado ? (0,_utils_utils_utils__WEBPACK_IMPORTED_MODULE_2__/* .formatToLowerCaseText */ .gr)(props.estado) : null
347                        ]
348                    })
349                })
350            ]
351        })
352    });
353}
354/* harmony default export */ __webpack_exports__["ZP"] = (Header);
355
356
357/***/ }),
358
359/***/ 8933:
360/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
361
362"use strict";
363/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5893);
364/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7294);
365/* harmony import */ var _MssgPaymentMethod_MssgPaymentMethod_module_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(791);
366/* harmony import */ var _MssgPaymentMethod_MssgPaymentMethod_module_css__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_MssgPaymentMethod_MssgPaymentMethod_module_css__WEBPACK_IMPORTED_MODULE_2__);
367
368
369
370function MssgPaymentMethod(param) {
371    let { iconImg , mjsPaymentMethod  } = param;
372    return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, {
373        children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
374            className: (_MssgPaymentMethod_MssgPaymentMethod_module_css__WEBPACK_IMPORTED_MODULE_2___default().contInfoMssgPayment),
375            children: [
376                /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", {
377                    children: iconImg
378                }),
379                /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", {
380                    children: mjsPaymentMethod
381                })
382            ]
383        })
384    });
385}
386/* harmony default export */ __webpack_exports__["Z"] = (MssgPaymentMethod);
387
388
389/***/ }),
390
391/***/ 9601:
392/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
393
394"use strict";
395/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5893);
396/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7294);
397/* harmony import */ var _NavBar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4122);
398/* harmony import */ var _NavResponsive_NavResponsive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9651);
399/* harmony import */ var _Header__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1251);
400/* harmony import */ var _styleMainServiceDetailed_module_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(124);
401/* harmony import */ var _styleMainServiceDetailed_module_css__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_styleMainServiceDetailed_module_css__WEBPACK_IMPORTED_MODULE_7__);
402/* harmony import */ var _BreadcrumbsComponent_BreadcrumbsComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9151);
403/* harmony import */ var _Main_global_BreadcrumbsComponent_styleBreadCrumbs_module_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(4094);
404/* harmony import */ var _Main_global_BreadcrumbsComponent_styleBreadCrumbs_module_css__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_Main_global_BreadcrumbsComponent_styleBreadCrumbs_module_css__WEBPACK_IMPORTED_MODULE_8__);
405/* harmony import */ var _Hooks_useBalanceInfo__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1449);
406//@ts-nocheck
407
408
409
410
411
412
413
414
415
416const BasicHeaderPageComponent = (param)=>{
417    let { children  } = param;
418    var _userInfoS_customer_info_selected, _userInfoS_customer_info_selected1, _userInfoS_customer_info_selected2, _userInfoS_customer_info_selected3, _balanceInfo_balance, _balanceInfo_balance1, _userInfoS_customer_info_selected4, _userInfoS_customer_info_selected5, _userInfoS_customer_info_selected6, _userInfoS_customer_info_selected7;
419    const { balanceInfo , userInfoS , selected  } = (0,_Hooks_useBalanceInfo__WEBPACK_IMPORTED_MODULE_6__/* .useBalanceInfo */ .R)();
420    return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
421        children: [
422            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_NavResponsive_NavResponsive__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, {}),
423            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
424                className: (_styleMainServiceDetailed_module_css__WEBPACK_IMPORTED_MODULE_7___default().styContHomeyNav),
425                children: [
426                    /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_NavBar__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, {}),
427                    /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
428                        className: (_styleMainServiceDetailed_module_css__WEBPACK_IMPORTED_MODULE_7___default().contServiceDitailed),
429                        children: [
430                            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Header__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .ZP, {
431                                selected: selected,
432                                planDescription: (_userInfoS_customer_info_selected = userInfoS === null || userInfoS === void 0 ? void 0 : userInfoS.customer_info[selected]) === null || _userInfoS_customer_info_selected === void 0 ? void 0 : _userInfoS_customer_info_selected.plan_descripcion,
433                                planCode: (_userInfoS_customer_info_selected1 = userInfoS === null || userInfoS === void 0 ? void 0 : userInfoS.customer_info[selected]) === null || _userInfoS_customer_info_selected1 === void 0 ? void 0 : _userInfoS_customer_info_selected1.plan_code,
434                                name: (_userInfoS_customer_info_selected2 = userInfoS === null || userInfoS === void 0 ? void 0 : userInfoS.customer_info[selected]) === null || _userInfoS_customer_info_selected2 === void 0 ? void 0 : _userInfoS_customer_info_selected2.full_name,
435                                number: (_userInfoS_customer_info_selected3 = userInfoS === null || userInfoS === void 0 ? void 0 : userInfoS.customer_info[selected]) === null || _userInfoS_customer_info_selected3 === void 0 ? void 0 : _userInfoS_customer_info_selected3.msisdn,
436                                fechaExpiracion: balanceInfo === null || balanceInfo === void 0 ? void 0 : (_balanceInfo_balance = balanceInfo.balance) === null || _balanceInfo_balance === void 0 ? void 0 : _balanceInfo_balance.supervisionExpiryDate,
437                                balance: balanceInfo === null || balanceInfo === void 0 ? void 0 : (_balanceInfo_balance1 = balanceInfo.balance) === null || _balanceInfo_balance1 === void 0 ? void 0 : _balanceInfo_balance1.mainAccountValue,
438                                estado: (_userInfoS_customer_info_selected4 = userInfoS === null || userInfoS === void 0 ? void 0 : userInfoS.customer_info[selected]) === null || _userInfoS_customer_info_selected4 === void 0 ? void 0 : _userInfoS_customer_info_selected4.status_descripcion,
439                                planType: (_userInfoS_customer_info_selected5 = userInfoS === null || userInfoS === void 0 ? void 0 : userInfoS.customer_info[selected]) === null || _userInfoS_customer_info_selected5 === void 0 ? void 0 : _userInfoS_customer_info_selected5.plan_type,
440                                debtAmount: ((_userInfoS_customer_info_selected6 = userInfoS === null || userInfoS === void 0 ? void 0 : userInfoS.customer_info[selected]) === null || _userInfoS_customer_info_selected6 === void 0 ? void 0 : _userInfoS_customer_info_selected6.debt_amount) || "",
441                                fechaCorte: (_userInfoS_customer_info_selected7 = userInfoS === null || userInfoS === void 0 ? void 0 : userInfoS.customer_info[selected]) === null || _userInfoS_customer_info_selected7 === void 0 ? void 0 : _userInfoS_customer_info_selected7.bill_date
442                            }),
443                            /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", {
444                                className: (_styleMainServiceDetailed_module_css__WEBPACK_IMPORTED_MODULE_7___default().continfoGlobal),
445                                children: [
446                                    /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", {
447                                        className: (_Main_global_BreadcrumbsComponent_styleBreadCrumbs_module_css__WEBPACK_IMPORTED_MODULE_8___default().contBreadCrumbs),
448                                        children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_BreadcrumbsComponent_BreadcrumbsComponent__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {})
449                                    }),
450                                    children
451                                ]
452                            })
453                        ]
454                    })
455                ]
456            })
457        ]
458    });
459};
460/* harmony default export */ __webpack_exports__["Z"] = (BasicHeaderPageComponent);
461
462
463/***/ }),
464
465/***/ 4341:
466/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
467
468"use strict";
469// ESM COMPAT FLAG
470__webpack_require__.r(__webpack_exports__);
471
472// EXPORTS
473__webpack_require__.d(__webpack_exports__, {
474  "__N_SSP": function() { return /* binding */ __N_SSP; },
475  "default": function() { return /* binding */ Main_ConsumptionHistory; }
476});
477
478// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js
479var jsx_runtime = __webpack_require__(5893);
480// EXTERNAL MODULE: ./node_modules/react/index.js
481var react = __webpack_require__(7294);
482// EXTERNAL MODULE: ./components/Main/global/basicHeaderPage.tsx
483var basicHeaderPage = __webpack_require__(9601);
484// EXTERNAL MODULE: ./components/Main/ConsumptionHistory/styleConsumptionHistory.module.css
485var styleConsumptionHistory_module = __webpack_require__(8370);
486var styleConsumptionHistory_module_default = /*#__PURE__*/__webpack_require__.n(styleConsumptionHistory_module);
487// EXTERNAL MODULE: ./components/Main/global/BackButton/BackButton.tsx
488var BackButton = __webpack_require__(450);
489// EXTERNAL MODULE: ./utils/utils.utils.js
490var utils_utils = __webpack_require__(5109);
491// EXTERNAL MODULE: ./components/Main/global/MssgPaymentMethod/MssgPaymentMethod.tsx
492var MssgPaymentMethod = __webpack_require__(8933);
493// EXTERNAL MODULE: ./components/Main/ConsumptionDitail/styleConsumptionDitailComponent.module.css
494var styleConsumptionDitailComponent_module = __webpack_require__(2485);
495var styleConsumptionDitailComponent_module_default = /*#__PURE__*/__webpack_require__.n(styleConsumptionDitailComponent_module);
496// EXTERNAL MODULE: ./components/Main/global/GlobalButton/GlobalButton.tsx
497var GlobalButton = __webpack_require__(1665);
498;// CONCATENATED MODULE: ./components/Main/ConsumptionDitail/ConsumptionDitailComponent.tsx
499
500
501
502
503
504function ConsumptionDitail(param) {
505    let { concept , date , origen , closeIsDetail  } = param;
506    let fecha = date.split(" ");
507    return /*#__PURE__*/ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
508        children: [
509            /*#__PURE__*/ (0,jsx_runtime.jsx)("p", {
510                className: (styleConsumptionDitailComponent_module_default()).titleHead,
511                children: "Detalle de consumo"
512            }),
513            /*#__PURE__*/ (0,jsx_runtime.jsxs)("div", {
514                className: (styleConsumptionDitailComponent_module_default()).contInfoData,
515                children: [
516                    /*#__PURE__*/ (0,jsx_runtime.jsxs)("p", {
517                        children: [
518                            /*#__PURE__*/ (0,jsx_runtime.jsx)("span", {
519                                children: "Tipo de Paquete"
520                            }),
521                            concept
522                        ]
523                    }),
524                    /*#__PURE__*/ (0,jsx_runtime.jsxs)("p", {
525                        children: [
526                            /*#__PURE__*/ (0,jsx_runtime.jsx)("span", {
527                                children: "Origen"
528                            }),
529                            origen
530                        ]
531                    }),
532                    /*#__PURE__*/ (0,jsx_runtime.jsxs)("p", {
533                        children: [
534                            /*#__PURE__*/ (0,jsx_runtime.jsx)("span", {
535                                children: "Fecha"
536                            }),
537                            "".concat((0,utils_utils/* formatDate */.p6)(fecha[0]).concat(" a las ")).concat(fecha[1])
538                        ]
539                    })
540                ]
541            }),
542            /*#__PURE__*/ (0,jsx_runtime.jsx)(GlobalButton/* default */.Z, {
543                iconText: "",
544                marginTop: true,
545                onClick: ()=>closeIsDetail(),
546                shouldBeActive: false,
547                textButton: "Cerrar"
548            })
549        ]
550    });
551}
552/* harmony default export */ var ConsumptionDitailComponent = (ConsumptionDitail);
553
554;// CONCATENATED MODULE: ./components/Main/ConsumptionHistory/ConsumptionHistoryComponent.tsx
555
556
557
558
559
560
561
562
563const HistoryCard = (param)=>{
564    let { concept , date , price , active , activeIsDetail , arrPos  } = param;
565    return /*#__PURE__*/ (0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
566        children: /*#__PURE__*/ (0,jsx_runtime.jsxs)("div", {
567            onClick: ()=>activeIsDetail(arrPos),
568            className: (styleConsumptionHistory_module_default()).constHistory,
569            children: [
570                /*#__PURE__*/ (0,jsx_runtime.jsx)("div", {
571                    children: /*#__PURE__*/ (0,jsx_runtime.jsx)("p", {
572                        children: (0,utils_utils/* formatToLowerCaseText */.gr)(concept).join(" ")
573                    })
574                }),
575                /*#__PURE__*/ (0,jsx_runtime.jsxs)("div", {
576                    children: [
577                        /*#__PURE__*/ (0,jsx_runtime.jsx)("p", {
578                            children: (0,utils_utils/* formatDate */.p6)(date)
579                        }),
580                        /*#__PURE__*/ (0,jsx_runtime.jsx)("p", {
581                            className: active ? (styleConsumptionHistory_module_default()).constActive : "",
582                            children: (0,utils_utils/* formatBalance */.az)(price)
583                        })
584                    ]
585                })
586            ]
587        })
588    });
589};
590function ConsumptionHistoryComp(param) {
591    let { adjustment  } = param;
592    const [isDetail, setIsDetail] = react.useState(-1);
593    const activeIsDetail = (n)=>setIsDetail(n);
594    const closeIsDetail = ()=>setIsDetail(-1);
595    return /*#__PURE__*/ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
596        children: [
597            /*#__PURE__*/ (0,jsx_runtime.jsx)(BackButton/* default */.Z, {}),
598            /*#__PURE__*/ (0,jsx_runtime.jsx)("div", {
599                className: (styleConsumptionHistory_module_default()).contConsumptionHistory,
600                children: adjustment && (adjustment === null || adjustment === void 0 ? void 0 : adjustment.length) !== 0 ? isDetail === -1 ? /*#__PURE__*/ (0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
601                    children: [
602                        /*#__PURE__*/ (0,jsx_runtime.jsx)("p", {
603                            className: (styleConsumptionHistory_module_default()).titleHead,
604                            children: "Historial de consumo"
605                        }),
606                        /*#__PURE__*/ (0,jsx_runtime.jsxs)("div", {
607                            className: (styleConsumptionHistory_module_default()).contInfoGlobal,
608                            children: [
609                                /*#__PURE__*/ (0,jsx_runtime.jsxs)("div", {
610                                    className: (styleConsumptionHistory_module_default()).constHistoryHead,
611                                    children: [
612                                        /*#__PURE__*/ (0,jsx_runtime.jsx)("div", {
613                                            children: /*#__PURE__*/ (0,jsx_runtime.jsx)("p", {
614                                                children: "TIPO DE PAQUETE"
615                                            })
616                                        }),
617                                        /*#__PURE__*/ (0,jsx_runtime.jsxs)("div", {
618                                            children: [
619                                                /*#__PURE__*/ (0,jsx_runtime.jsx)("p", {
620                                                    children: "FECHA"
621                                                }),
622                                                /*#__PURE__*/ (0,jsx_runtime.jsx)("p", {
623                                                    children: "MONTO"
624                                                })
625                                            ]
626                                        })
627                                    ]
628                                }),
629                                /*#__PURE__*/ (0,jsx_runtime.jsx)("div", {
630                                    className: (styleConsumptionHistory_module_default()).constHistoryScroll,
631                                    children: adjustment ? adjustment.map((value, index)=>/*#__PURE__*/ (0,jsx_runtime.jsx)(HistoryCard, {
632                                            activeIsDetail: activeIsDetail,
633                                            arrPos: index,
634                                            concept: value.concepto,
635                                            date: value.fecha,
636                                            price: value.monto,
637                                            active: +value.monto > 0 ? true : false
638                                        }, index)) : null
639                                })
640                            ]
641                        })
642                    ]
643                }) : /*#__PURE__*/ (0,jsx_runtime.jsx)(ConsumptionDitailComponent, {
644                    closeIsDetail: closeIsDetail,
645                    arrPos: 0,
646                    activeIsDetail: activeIsDetail,
647                    origen: adjustment[isDetail].suplidor || "",
648                    concept: adjustment[isDetail].concepto,
649                    date: adjustment[isDetail].fecha
650                }) : /*#__PURE__*/ (0,jsx_runtime.jsx)(MssgPaymentMethod/* default */.Z, {
651                    iconImg: "",
652                    mjsPaymentMethod: "Actualmente su historial no presenta transacciones recientes"
653                })
654            })
655        ]
656    });
657}
658/* harmony default export */ var ConsumptionHistoryComponent = (ConsumptionHistoryComp);
659
660// EXTERNAL MODULE: ./components/Main/Hooks/useBreadCrumbs.tsx
661var useBreadCrumbs = __webpack_require__(7325);
662// EXTERNAL MODULE: ./components/Main/Hooks/useUserInfo.tsx
663var useUserInfo = __webpack_require__(7254);
664// EXTERNAL MODULE: ./node_modules/next/head.js
665var head = __webpack_require__(9008);
666var head_default = /*#__PURE__*/__webpack_require__.n(head);
667// EXTERNAL MODULE: ./node_modules/next/router.js
668var next_router = __webpack_require__(1163);
669;// CONCATENATED MODULE: ./pages/Main/ConsumptionHistory.tsx
670//@ts-nocheck
671
672
673
674
675
676
677
678
679const ConsumptionHistory = (param)=>{
680    let { responseJson  } = param;
681    (0,useBreadCrumbs/* useBreadCrumbs */.Z)();
682    const router = (0,next_router.useRouter)();
683    const { contextUserData , position  } = (0,useUserInfo/* useUserInfo */.P)(responseJson);
684    const [adjustment, setAdjustent] = react.useState();
685    react.useEffect(()=>{
686        var _contextUserData_position;
687        if (contextUserData && position !== undefined && contextUserData[position].userData.plan_type !== "CCOPRE") {
688            router.replace("Forbiden");
689        }
690        if (!contextUserData || position === -1) {
691            return;
692        }
693        fetch("/api/getAdjustment", {
694            method: "POST",
695            body: JSON.stringify({
696                consumer_entity_id: (_contextUserData_position = contextUserData[position]) === null || _contextUserData_position === void 0 ? void 0 : _contextUserData_position.userData.consumer_entity_id
697            })
698        }).then((res)=>res.json()).then((resJson)=>{
699            if (resJson.error) {
700                setAdjustent({});
701                return;
702            }
703            setAdjustent(resJson);
704        });
705    // eslint-disable-next-line react-hooks/exhaustive-deps
706    }, [
707        contextUserData,
708        position
709    ]);
710    return /*#__PURE__*/ (0,jsx_runtime.jsxs)(basicHeaderPage/* default */.Z, {
711        children: [
712            /*#__PURE__*/ (0,jsx_runtime.jsx)((head_default()), {
713                children: /*#__PURE__*/ (0,jsx_runtime.jsx)("title", {
714                    children: "Web Channel - Historial de consumo"
715                })
716            }),
717            /*#__PURE__*/ (0,jsx_runtime.jsx)(ConsumptionHistoryComponent, {
718                adjustment: adjustment === null || adjustment === void 0 ? void 0 : adjustment.adjustments
719            })
720        ]
721    });
722};
723var __N_SSP = true;
724/* harmony default export */ var Main_ConsumptionHistory = (ConsumptionHistory);
725
726
727/***/ }),
728
729/***/ 5109:
730/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
731
732"use strict";
733/* harmony export */ __webpack_require__.d(__webpack_exports__, {
734/* harmony export */   "BL": function() { return /* binding */ pointToNumber; },
735/* harmony export */   "CC": function() { return /* binding */ cleanMask; },
736/* harmony export */   "E6": function() { return /* binding */ convertByte; },
737/* harmony export */   "Jz": function() { return /* binding */ customerInfoFetch; },
738/* harmony export */   "Mb": function() { return /* binding */ formattedCedula; },
739/* harmony export */   "W0": function() { return /* binding */ getAfinidadFavNumber; },
740/* harmony export */   "az": function() { return /* binding */ formatBalance; },
741/* harmony export */   "gr": function() { return /* binding */ formatToLowerCaseText; },
742/* harmony export */   "gs": function() { return /* binding */ ModifyFavNumber; },
743/* harmony export */   "if": function() { return /* binding */ avoidNotSpace; },
744/* harmony export */   "jf": function() { return /* binding */ avoidNotLetters; },
745/* harmony export */   "ln": function() { return /* binding */ returnTheFixedArrayFromRechargeArray; },
746/* harmony export */   "ni": function() { return /* binding */ logOut; },
747/* harmony export */   "oM": function() { return /* binding */ cleanCedula; },
748/* harmony export */   "p6": function() { return /* binding */ formatDate; },
749/* harmony export */   "rJ": function() { return /* binding */ convertTime; },
750/* harmony export */   "sb": function() { return /* binding */ getBalance; },
751/* harmony export */   "uf": function() { return /* binding */ formatNumber; }
752/* harmony export */ });
753/* unused harmony exports encoder, serverSideProps, getBalances, getOffers, downloadReceipt */
754/* provided dependency */ var process = __webpack_require__(3454);
755/* provided dependency */ var Buffer = __webpack_require__(1876)["Buffer"];
756const customerInfoFetch = async (userID, jwt)=>{
757    try {
758        const response = await fetch("/api/getUserInfo", {
759            method: "POST",
760            body: JSON.stringify({
761                user_id: userID,
762                token: jwt
763            })
764        });
765        const responseJson = await response.json();
766        return responseJson;
767    } catch (e) {
768        console.log(e);
769    }
770};
771const logOut = async ()=>{
772    await fetch("/api/LogOut");
773};
774const getBalance = async (pcs, userID, jwt)=>{
775    const response = await fetch("/api/getServiceInfo", {
776        method: "POST",
777        body: JSON.stringify({
778            pcs: pcs,
779            user_id: userID,
780            token: jwt
781        })
782    });
783    const responseJson = await response.json();
784    return responseJson;
785};
786const encoder = ()=>{
787    const userPassString = "".concat(process.env.USERDB, ":").concat(process.env.PASSDB);
788    const bufferEncode = Buffer.from(userPassString);
789    const userPassEncode = bufferEncode.toString("base64");
790    return userPassEncode;
791};
792const formatBalance = function() {
793    let balance = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", isMainBalance = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
794    const balanceTransformed = isMainBalance ? +balance / 100 : +balance;
795    const header = "RD$";
796    const options = {
797        style: "currency",
798        currency: "RUB"
799    };
800    const number = new Intl.NumberFormat("en-US", options);
801    const formated = number.format(balanceTransformed);
802    const numberFormated = formated.split("B");
803    return "".concat(header).concat(numberFormated[1]);
804};
805const formatNumber = function() {
806    let number = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
807    const headerNumber = "(".concat(number.substring(0, 3), ")");
808    const firstPartNumber = number.substring(3, 6);
809    const secondPartNumber = number.substring(6, 10);
810    const finalNumber = "".concat(headerNumber, " ").concat(firstPartNumber, "-").concat(secondPartNumber);
811    return finalNumber;
812};
813const formatToLowerCaseText = function() {
814    let text = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
815    const words = text.split(" ");
816    const finalTextArr = [];
817    for(let x = 0; x < words.length; x++){
818        const firstLetter = words[x][0];
819        const textComplete = words[x].toLowerCase();
820        const finalWordText = textComplete.replace(firstLetter === null || firstLetter === void 0 ? void 0 : firstLetter.toLowerCase(), firstLetter);
821        finalTextArr.push(finalWordText);
822    }
823    return finalTextArr;
824};
825const returnTheFixedArrayFromRechargeArray = (arr)=>{
826    let finalArray = [];
827    const regex = /\s\(|\)/g;
828    const regex2 = /y Voz|-/g;
829    const regex3 = /Recupera Velocidad|Recarga WhatsApp|Recarga de |IG|FB|\(s|\+/g;
830    const regex4 = /a(s)?/;
831    const regex5 = /B{1}?/;
832    const regex6 = /horas/;
833    const regex7 = /1 dias/;
834    let semiFinalArray = [];
835    arr.map((element)=>{
836        var _element__getAvailableRechargeByPackage;
837        (_element__getAvailableRechargeByPackage = element[1].getAvailableRechargeByPackage) === null || _element__getAvailableRechargeByPackage === void 0 ? void 0 : _element__getAvailableRechargeByPackage.map((subElement)=>{
838            const description = subElement.recharge_description;
839            const price = subElement.price;
840            const descriptionSubStr = description.replace(regex, " ");
841            const descriptionSubStr2 = descriptionSubStr.replace(regex2, " ");
842            const descriptionSubStr3 = descriptionSubStr2.replace(regex3, " ");
843            const descriptionSubStr4 = descriptionSubStr3.replace(regex4, "as | ");
844            const descriptionSubStr5 = descriptionSubStr4.replace(regex5, "B |");
845            const descriptionSubStr6 = descriptionSubStr5.replace(regex6, "hora");
846            const descriptionSubStr7 = descriptionSubStr6.replace(regex7, "1 dia");
847            let finalSTR = " ".concat(descriptionSubStr7, " RD$").concat(price);
848            if (element[0].cod_tipo_servicio === "PSRRSS") {
849                finalSTR = " ".concat(subElement.recharge_description, " | RD$").concat(price);
850            }
851            semiFinalArray.push(finalSTR);
852        });
853        finalArray.push([
854            element[0],
855            [
856                ...semiFinalArray
857            ]
858        ]);
859        semiFinalArray = [];
860    });
861    return finalArray;
862};
863async function serverSideProps(context) {
864    const jwtRegex = /jwt=/g;
865    const userRegex = /user_id=/g;
866    const jwt = context.req.headers.cookie.split(";").find((e)=>e.match(jwtRegex)).trim().slice(4);
867    const userID = context.req.headers.cookie.split(";").find((e)=>e.match(userRegex)).trim().slice(8);
868    const response = await fetch("".concat(process.env.BASEIP, "/api/getUserInfo"), {
869        method: "POST",
870        body: JSON.stringify({
871            user_id: userID,
872            token: jwt
873        })
874    });
875    const responseJson = await response.json();
876    if (response.newToken !== undefined) {
877        serverSideProps(context);
878        return;
879    }
880    return {
881        props: {
882            responseJson
883        }
884    };
885}
886const byteConversion = [
887    "Bytes",
888    "KB",
889    "MB",
890    "GB",
891    "TB"
892];
893const convertByte = (bytes, times)=>{
894    if (isNaN(bytes) || bytes === undefined) {
895        return;
896    }
897    if (bytes < 1) {
898        return "".concat((bytes * 1024).toFixed(2), " ").concat(byteConversion[times - 1] || "");
899    }
900    return convertByte(bytes / 1024, times + 1);
901};
902const pointToNumber = function() {
903    let number = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
904    if (number.length === 10) {
905        const firts = number.substring(0, 3).split("");
906        const second = number.substring(3, 6).split("");
907        const final = number.substring(6);
908        firts.push(".");
909        second.push(".");
910        const finalNumber = [
911            ...firts,
912            ...second,
913            ...final
914        ].join("");
915        return finalNumber;
916    }
917    return "";
918};
919const formatDate = (date)=>{
920    return date.split(" ")[0].replaceAll("-", "/").split("/").reverse().join("/");
921};
922const ModifyFavNumber = async (action, prevNumber, newNumber, consumer_id, faf_type)=>{
923    let isFullFilled = false;
924    const response = await fetch("/api/updateFavNumber", {
925        method: "POST",
926        body: JSON.stringify({
927            consumer_entity_id: consumer_id,
928            faf_type: faf_type,
929            faf_number: newNumber,
930            action_type: action,
931            faf_number_old: prevNumber
932        })
933    });
934    const resJson = await response.json();
935    isFullFilled = resJson.code === "OK";
936    return isFullFilled;
937};
938const getAfinidadFavNumber = async function() {
939    let idEntidadConsumo = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
940    const res = await fetch("/api/genericRequest", {
941        method: "POST",
942        body: JSON.stringify({
943            url: "getFafServices",
944            consumer_entity_id: idEntidadConsumo
945        })
946    });
947    const resJson = await res.json();
948    return resJson;
949};
950const getBalances = (balances)=>{
951    let balanceBalances = {};
952    let main = {};
953    balances.DAList.forEach((key)=>{
954        let res = {
955            balance: null,
956            expiryDate: null,
957            type: null
958        };
959        if (parseInt(key.id) === 100 || parseInt(key.id) === 101) {
960            delete balances.DAList[key];
961        }
962        res.balance = parseInt(key.balance);
963        res.expiryDate = key.expiryDate;
964        res.type = key.type;
965        if (key.bonusStartAt) {
966            res.bonusStartAt = key.bonusStartAt;
967        }
968        balanceBalances[key.id] = res;
969    });
970    main.balance = parseInt(balances.mainAccountValue);
971    main.expiryDate = balances.supervisionExpiryDate;
972    balanceBalances.CORE_BALANCE = main;
973    // We proceed to return the balances formatted
974    return balanceBalances;
975};
976const getOffers = (offers)=>{
977    let counters = {};
978    offers.balance.counterList.forEach((key)=>{
979        let res = {
980            usageCounterValue: null,
981            usageThresholdValue: null
982        };
983        res.usageCounterValue = parseInt(key.usageCounterValue);
984        res.usageThresholdValue = parseInt(key.usageThresholdValue);
985        counters[key.usageCounterID] = res;
986    });
987    // We proceed to return the offers formatted
988    return counters;
989};
990const convertTime = function() {
991    let seconds = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
992    if (!seconds) {
993        return "";
994    }
995    try {
996        let minutes = Math.floor(seconds / 60);
997        const seconds1 = seconds % 60;
998        const hours = Math.floor(minutes / 60);
999        minutes = minutes % 60;
1000        return "".concat(hours, " Hora ").concat(minutes, " mins ").concat(seconds1, " secs ");
1001    } catch (e) {
1002        return "Error: ".concat(e);
1003    }
1004};
1005// Funcion para descargar/abrir factura
1006function downloadReceipt(codPeriodo, codCicloFacturacion, comunityId) {
1007    if (true) {
1008        const url = "https://omega.viva.com.do/supreme/_files/pdf/".concat(codPeriodo, "_").concat(codCicloFacturacion, "_").concat(comunityId, ".pdf");
1009        // Crear una ventana emergente con un enlace de descarga
1010        const popup = window.open("", "_blank", "width=1,height=1,left=-1000,top=-1000"); // Abrir ventana emergente oculta
1011        const link = document.createElement("a");
1012        link.href = url;
1013        link.setAttribute("download", "".concat(codPeriodo, "_").concat(codCicloFacturacion, "_").concat(comunityId, ".pdf")); // Nombre del archivo
1014        // Añadir el enlace al DOM y simular el click para descargar
1015        popup.document.body.appendChild(link);
1016        link.click();
1017        // Eliminar el enlace después de descargar
1018        popup.document.body.removeChild(link);
1019        popup.close();
1020    }
1021}
1022//Texto sin espacios ni caracteres especiales
1023const avoidNotSpace = (text)=>{
1024    const newText = text.replace(/[^a-zA-Z0-9@_-]/g, "").slice(0, 24);
1025    return newText;
1026};
1027//Texto sin letras
1028const avoidNotLetters = (text)=>{
1029    const newText = text.replace(/[^0-9]/g, "");
1030    return newText;
1031};
1032//Formato de cedulas con guiones
1033const formattedCedula = (text)=>{
1034    const cleanedValue = text.replace(/\D/g, "");
1035    const match = cleanedValue.match(/^(\d{0,3})(\d{0,7})(\d{0,1})$/);
1036    if (match) {
1037        let formattedNumber = "";
1038        if (match[1]) {
1039            formattedNumber += "".concat(match[1]);
1040        }
1041        if (match[1].length === 3 && match[2]) {
1042            formattedNumber += "-".concat(match[2]);
1043        }
1044        if (match[2].length === 7 && match[3]) {
1045            formattedNumber += "-".concat(match[3]);
1046        }
1047        return formattedNumber;
1048    }
1049    return text;
1050};
1051const cleanMask = (text)=>{
1052    if (!text) return "";
1053    return text.replace(/\D/g, "");
1054};
1055const cleanCedula = (text)=>{
1056    return text === null || text === void 0 ? void 0 : text.replace(/-/g, "");
1057};
1058
1059
1060/***/ }),
1061
1062/***/ 2485:
1063/***/ (function(module) {
1064
1065// extracted by mini-css-extract-plugin
1066module.exports = {"contConsumtionDitail":"styleConsumptionDitailComponent_contConsumtionDitail__5d1Xs","titleHead":"styleConsumptionDitailComponent_titleHead__nNJxY","contInfoData":"styleConsumptionDitailComponent_contInfoData__KpWmz","btnAcept":"styleConsumptionDitailComponent_btnAcept__NQYMJ"};
1067
1068/***/ }),
1069
1070/***/ 8370:
1071/***/ (function(module) {
1072
1073// extracted by mini-css-extract-plugin
1074module.exports = {"contConsumptionHistory":"styleConsumptionHistory_contConsumptionHistory__wqAZU","titleHead":"styleConsumptionHistory_titleHead__6XQwV","constHistoryHead":"styleConsumptionHistory_constHistoryHead__Ehb3n","constHistory":"styleConsumptionHistory_constHistory__wZVxp","constActive":"styleConsumptionHistory_constActive__sjH3R","contInfoGlobal":"styleConsumptionHistory_contInfoGlobal__nkyTb","constHistoryScroll":"styleConsumptionHistory_constHistoryScroll__UdvyN"};
1075
1076/***/ }),
1077
1078/***/ 6983:
1079/***/ (function(module) {
1080
1081// extracted by mini-css-extract-plugin
1082module.exports = {"contBack":"stylesBackButton_contBack__blKzl"};
1083
1084/***/ }),
1085
1086/***/ 5427:
1087/***/ (function(module) {
1088
1089// extracted by mini-css-extract-plugin
1090module.exports = {"btnAcept":"stylesGlobalButton_btnAcept__3BY33"};
1091
1092/***/ }),
1093
1094/***/ 3335:
1095/***/ (function(module) {
1096
1097// extracted by mini-css-extract-plugin
1098module.exports = {"container":"Header_container__8KVbA","contHeader":"Header_contHeader__qJ3Ws","contTopHeader":"Header_contTopHeader__emVqk","contHeaderImg":"Header_contHeaderImg__s3vOo","headerImg":"Header_headerImg__csWCY","contInfoTitle":"Header_contInfoTitle__umOWn","contIcon":"Header_contIcon__9zzjj","contTitle":"Header_contTitle__1J3Ck","contNumber":"Header_contNumber__xoaJJ","contName":"Header_contName__izyWi","contBottonHeader":"Header_contBottonHeader__le03t"};
1099
1100/***/ }),
1101
1102/***/ 791:
1103/***/ (function(module) {
1104
1105// extracted by mini-css-extract-plugin
1106module.exports = {"contInfoMssgPayment":"MssgPaymentMethod_contInfoMssgPayment__UDmxN"};
1107
1108/***/ }),
1109
1110/***/ 124:
1111/***/ (function(module) {
1112
1113// extracted by mini-css-extract-plugin
1114module.exports = {"styContHomeyNav":"styleMainServiceDetailed_styContHomeyNav__l9ohX","logoVivaBlanco":"styleMainServiceDetailed_logoVivaBlanco__Nqucj","contGlobal":"styleMainServiceDetailed_contGlobal__06EVt","contServiceDitailed":"styleMainServiceDetailed_contServiceDitailed__so2__","continfoGlobal":"styleMainServiceDetailed_continfoGlobal__iwlz_","css-12i7wg6-MuiPaper-root-MuiDrawer-paper":"styleMainServiceDetailed_css-12i7wg6-MuiPaper-root-MuiDrawer-paper__rzkQa","contNavResponsive":"styleMainServiceDetailed_contNavResponsive__KiS_p"};
1115
1116/***/ })
1117
1118},
1119/******/ function(__webpack_require__) { // webpackRuntimeModules
1120/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
1121/******/ __webpack_require__.O(0, [3365,4976,2510,594,4838,908,5221,9378,1664,287,6170,5518,3700,9774,2888,179], function() { return __webpack_exec__(271); });
1122/******/ var __webpack_exports__ = __webpack_require__.O();
1123/******/ _N_E = __webpack_exports__;
1124/******/ }
1125]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.