@wikicasa-dev/utilities 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/ArrayUtils.cjs +1 -0
  2. package/dist/ArrayUtils.js +4 -0
  3. package/dist/ColorUtils.cjs +1 -0
  4. package/dist/ColorUtils.js +8 -0
  5. package/dist/Control.Geocoder-Dyvby5gX.cjs +1 -0
  6. package/dist/Control.Geocoder-l0sNRNKZ.js +1 -0
  7. package/dist/CookieUtils.cjs +1 -0
  8. package/dist/CookieUtils.js +32 -0
  9. package/dist/CurrencyUtils.cjs +1 -0
  10. package/dist/CurrencyUtils.js +14 -0
  11. package/dist/DOMUtils.cjs +1 -0
  12. package/dist/DOMUtils.js +18 -0
  13. package/dist/DateUtils.cjs +1 -0
  14. package/dist/DateUtils.js +7 -0
  15. package/dist/DeviceDetectionUtils.cjs +1 -0
  16. package/dist/DeviceDetectionUtils.js +8 -0
  17. package/dist/EmailUtils.cjs +1 -0
  18. package/dist/EmailUtils.js +27 -0
  19. package/dist/FavoriteUtils.cjs +1 -0
  20. package/dist/FavoriteUtils.js +13 -0
  21. package/dist/FunctionUtils.cjs +1 -0
  22. package/dist/FunctionUtils.js +21 -0
  23. package/dist/GAutocompleteUtils.cjs +1 -0
  24. package/dist/GAutocompleteUtils.js +23 -0
  25. package/dist/GenericUtils.cjs +1 -0
  26. package/dist/GenericUtils.js +25 -0
  27. package/dist/LazyLoadingBg.cjs +1 -0
  28. package/dist/LazyLoadingBg.js +13 -0
  29. package/dist/Leaflet-BKkoCsyw.js +6436 -0
  30. package/dist/Leaflet-CHOsN941.cjs +1 -0
  31. package/dist/MapUtils.cjs +1 -0
  32. package/dist/MapUtils.js +79 -0
  33. package/dist/NumberUtils.cjs +1 -0
  34. package/dist/NumberUtils.js +50 -0
  35. package/dist/ObjectUtils.cjs +1 -0
  36. package/dist/ObjectUtils.js +23 -0
  37. package/dist/ObserverUtils.cjs +1 -0
  38. package/dist/ObserverUtils.js +20 -0
  39. package/dist/PermissionUtils.cjs +1 -0
  40. package/dist/PermissionUtils.js +18 -0
  41. package/dist/RESB_UrlBuilder.cjs +1 -0
  42. package/dist/RESB_UrlBuilder.js +30 -0
  43. package/dist/RequestUtils.cjs +1 -0
  44. package/dist/RequestUtils.js +13 -0
  45. package/dist/StringUtils.cjs +1 -0
  46. package/dist/StringUtils.js +40 -0
  47. package/dist/URLBuilderUtils.cjs +1 -0
  48. package/dist/URLBuilderUtils.js +11 -0
  49. package/dist/URLPagesFactory.cjs +1 -0
  50. package/dist/URLPagesFactory.js +12 -0
  51. package/dist/agencyAPI.cjs +1 -0
  52. package/dist/agencyAPI.js +61 -0
  53. package/dist/constants.cjs +1 -0
  54. package/dist/constants.js +5 -0
  55. package/dist/geographyAPI.cjs +1 -0
  56. package/dist/geographyAPI.js +73 -0
  57. package/dist/icons.cjs +1 -0
  58. package/dist/icons.js +32 -0
  59. package/dist/index.cjs +1 -0
  60. package/dist/index.d.ts +33 -33
  61. package/dist/index.js +142 -0
  62. package/dist/insightsAPI.cjs +1 -0
  63. package/dist/insightsAPI.js +15 -0
  64. package/dist/leaflet-Dyvby5gX.cjs +1 -0
  65. package/dist/leaflet-freedraw.esm-D8SxeKC1.js +26934 -0
  66. package/dist/leaflet-freedraw.esm-DSDVLXDC.cjs +7 -0
  67. package/dist/leaflet-l0sNRNKZ.js +1 -0
  68. package/dist/leaflet.draw-Dyvby5gX.cjs +1 -0
  69. package/dist/leaflet.draw-l0sNRNKZ.js +1 -0
  70. package/dist/leaflet_map.cjs +1 -0
  71. package/dist/leaflet_map.js +454 -0
  72. package/dist/mailAPI.cjs +1 -0
  73. package/dist/mailAPI.js +51 -0
  74. package/dist/main.cjs +1 -0
  75. package/dist/placesAPI.cjs +1 -0
  76. package/dist/placesAPI.js +47 -0
  77. package/dist/portfolioCustomerAPI.cjs +1 -0
  78. package/dist/portfolioCustomerAPI.js +14 -0
  79. package/dist/publicUserAPI.cjs +1 -0
  80. package/dist/publicUserAPI.js +142 -0
  81. package/dist/realEstateAPI.cjs +1 -0
  82. package/dist/realEstateAPI.js +67 -0
  83. package/dist/requestAPI.cjs +1 -0
  84. package/dist/requestAPI.js +17 -0
  85. package/dist/services/wikicasaPro.d.ts +1 -1
  86. package/dist/servicesUtils.cjs +3 -0
  87. package/dist/servicesUtils.js +12 -0
  88. package/dist/statisticsAPI.cjs +1 -0
  89. package/dist/statisticsAPI.js +58 -0
  90. package/dist/style.css +1 -0
  91. package/dist/types-BaBnqzzG.js +85 -0
  92. package/dist/types-CwWBrQCP.cjs +1 -0
  93. package/dist/valuationAPI.cjs +1 -0
  94. package/dist/valuationAPI.js +21 -0
  95. package/dist/vite-env.cjs +1 -0
  96. package/dist/vite-env.js +1 -0
  97. package/dist/wikicasaPro.cjs +1 -0
  98. package/dist/wikicasaPro.js +14 -0
  99. package/package.json +17 -13
  100. package/dist/utilities.cjs +0 -5
  101. package/dist/utilities.iife.js +0 -5
  102. package/dist/utilities.mjs +0 -2437
  103. package/index.html +0 -13
  104. package/src/custom/constants.ts +0 -3
  105. package/src/custom/icons.ts +0 -63
  106. package/src/custom/leaflet_map.ts +0 -946
  107. package/src/index.ts +0 -171
  108. package/src/services/agencyAPI.ts +0 -105
  109. package/src/services/geographyAPI.ts +0 -129
  110. package/src/services/insightsAPI.ts +0 -20
  111. package/src/services/mailAPI.ts +0 -89
  112. package/src/services/placesAPI.ts +0 -72
  113. package/src/services/portfolioCustomerAPI.ts +0 -16
  114. package/src/services/publicUserAPI.ts +0 -216
  115. package/src/services/realEstateAPI.ts +0 -133
  116. package/src/services/requestAPI.ts +0 -40
  117. package/src/services/servicesUtils.ts +0 -27
  118. package/src/services/statisticsAPI.ts +0 -84
  119. package/src/services/valuationAPI.ts +0 -45
  120. package/src/services/wikicasaPro.ts +0 -25
  121. package/src/utils/ArrayUtils.ts +0 -2
  122. package/src/utils/ColorUtils.ts +0 -11
  123. package/src/utils/CookieUtils.ts +0 -43
  124. package/src/utils/CurrencyUtils.ts +0 -18
  125. package/src/utils/DOMUtils.ts +0 -28
  126. package/src/utils/DateUtils.ts +0 -9
  127. package/src/utils/DeviceDetectionUtils.ts +0 -17
  128. package/src/utils/EmailUtils.ts +0 -45
  129. package/src/utils/FavoriteUtils.ts +0 -19
  130. package/src/utils/FunctionUtils.ts +0 -29
  131. package/src/utils/GAutocompleteUtils.ts +0 -70
  132. package/src/utils/GenericUtils.ts +0 -37
  133. package/src/utils/LazyLoadingBg.ts +0 -18
  134. package/src/utils/MapUtils.ts +0 -118
  135. package/src/utils/NumberUtils.ts +0 -90
  136. package/src/utils/ObjectUtils.ts +0 -34
  137. package/src/utils/ObserverUtils.ts +0 -32
  138. package/src/utils/PermissionUtils.ts +0 -41
  139. package/src/utils/RESB_UrlBuilder.ts +0 -99
  140. package/src/utils/RequestUtils.ts +0 -20
  141. package/src/utils/StringUtils.ts +0 -75
  142. package/src/utils/URLBuilderUtils.ts +0 -21
  143. package/src/utils/URLPagesFactory.ts +0 -20
  144. package/src/vite-env.d.ts +0 -1
  145. package/tsconfig.json +0 -38
  146. package/vite.config.ts +0 -42
  147. /package/{src/main.ts → dist/main.js} +0 -0
@@ -1,2437 +0,0 @@
1
- const v = window._baseURLIt, h = (e) => {
2
- const t = `errorMessage: ${e.message}
3
- `;
4
- e.response ? console.error(
5
- `${t} errorCode: ${e.response.status} \\n ${e.request.data}`
6
- ) : e.request ? console.error(`${t}
7
- ${e.request}`) : console.error(t);
8
- };
9
- function _e(e, t) {
10
- return function() {
11
- return e.apply(t, arguments);
12
- };
13
- }
14
- const { toString: it } = Object.prototype, { getPrototypeOf: ye } = Object, Q = ((e) => (t) => {
15
- const n = it.call(t);
16
- return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
17
- })(/* @__PURE__ */ Object.create(null)), C = (e) => (e = e.toLowerCase(), (t) => Q(t) === e), X = (e) => (t) => typeof t === e, { isArray: _ } = Array, B = X("undefined");
18
- function at(e) {
19
- return e !== null && !B(e) && e.constructor !== null && !B(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
20
- }
21
- const De = C("ArrayBuffer");
22
- function ct(e) {
23
- let t;
24
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && De(e.buffer), t;
25
- }
26
- const ut = X("string"), A = X("function"), Ie = X("number"), Z = (e) => e !== null && typeof e == "object", lt = (e) => e === !0 || e === !1, J = (e) => {
27
- if (Q(e) !== "object")
28
- return !1;
29
- const t = ye(e);
30
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
31
- }, dt = C("Date"), ft = C("File"), pt = C("Blob"), ht = C("FileList"), mt = (e) => Z(e) && A(e.pipe), yt = (e) => {
32
- let t;
33
- return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = Q(e)) === "formdata" || // detect form-data instance
34
- t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
35
- }, wt = C("URLSearchParams"), gt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
36
- function k(e, t, { allOwnKeys: n = !1 } = {}) {
37
- if (e === null || typeof e > "u")
38
- return;
39
- let r, s;
40
- if (typeof e != "object" && (e = [e]), _(e))
41
- for (r = 0, s = e.length; r < s; r++)
42
- t.call(null, e[r], r, e);
43
- else {
44
- const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
45
- let c;
46
- for (r = 0; r < i; r++)
47
- c = o[r], t.call(null, e[c], c, e);
48
- }
49
- }
50
- function Be(e, t) {
51
- t = t.toLowerCase();
52
- const n = Object.keys(e);
53
- let r = n.length, s;
54
- for (; r-- > 0; )
55
- if (s = n[r], t === s.toLowerCase())
56
- return s;
57
- return null;
58
- }
59
- const ve = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), ke = (e) => !B(e) && e !== ve;
60
- function le() {
61
- const { caseless: e } = ke(this) && this || {}, t = {}, n = (r, s) => {
62
- const o = e && Be(t, s) || s;
63
- J(t[o]) && J(r) ? t[o] = le(t[o], r) : J(r) ? t[o] = le({}, r) : _(r) ? t[o] = r.slice() : t[o] = r;
64
- };
65
- for (let r = 0, s = arguments.length; r < s; r++)
66
- arguments[r] && k(arguments[r], n);
67
- return t;
68
- }
69
- const bt = (e, t, n, { allOwnKeys: r } = {}) => (k(t, (s, o) => {
70
- n && A(s) ? e[o] = _e(s, n) : e[o] = s;
71
- }, { allOwnKeys: r }), e), Et = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), St = (e, t, n, r) => {
72
- e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
73
- value: t.prototype
74
- }), n && Object.assign(e.prototype, n);
75
- }, Rt = (e, t, n, r) => {
76
- let s, o, i;
77
- const c = {};
78
- if (t = t || {}, e == null)
79
- return t;
80
- do {
81
- for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
82
- i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
83
- e = n !== !1 && ye(e);
84
- } while (e && (!n || n(e, t)) && e !== Object.prototype);
85
- return t;
86
- }, At = (e, t, n) => {
87
- e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
88
- const r = e.indexOf(t, n);
89
- return r !== -1 && r === n;
90
- }, $t = (e) => {
91
- if (!e)
92
- return null;
93
- if (_(e))
94
- return e;
95
- let t = e.length;
96
- if (!Ie(t))
97
- return null;
98
- const n = new Array(t);
99
- for (; t-- > 0; )
100
- n[t] = e[t];
101
- return n;
102
- }, Ot = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ye(Uint8Array)), Ct = (e, t) => {
103
- const r = (e && e[Symbol.iterator]).call(e);
104
- let s;
105
- for (; (s = r.next()) && !s.done; ) {
106
- const o = s.value;
107
- t.call(e, o[0], o[1]);
108
- }
109
- }, Pt = (e, t) => {
110
- let n;
111
- const r = [];
112
- for (; (n = e.exec(t)) !== null; )
113
- r.push(n);
114
- return r;
115
- }, Tt = C("HTMLFormElement"), Ut = (e) => e.toLowerCase().replace(
116
- /[-_\s]([a-z\d])(\w*)/g,
117
- function(n, r, s) {
118
- return r.toUpperCase() + s;
119
- }
120
- ), Se = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Nt = C("RegExp"), Me = (e, t) => {
121
- const n = Object.getOwnPropertyDescriptors(e), r = {};
122
- k(n, (s, o) => {
123
- t(s, o, e) !== !1 && (r[o] = s);
124
- }), Object.defineProperties(e, r);
125
- }, xt = (e) => {
126
- Me(e, (t, n) => {
127
- if (A(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
128
- return !1;
129
- const r = e[n];
130
- if (A(r)) {
131
- if (t.enumerable = !1, "writable" in t) {
132
- t.writable = !1;
133
- return;
134
- }
135
- t.set || (t.set = () => {
136
- throw Error("Can not rewrite read-only method '" + n + "'");
137
- });
138
- }
139
- });
140
- }, Lt = (e, t) => {
141
- const n = {}, r = (s) => {
142
- s.forEach((o) => {
143
- n[o] = !0;
144
- });
145
- };
146
- return _(e) ? r(e) : r(String(e).split(t)), n;
147
- }, Ft = () => {
148
- }, _t = (e, t) => (e = +e, Number.isFinite(e) ? e : t), oe = "abcdefghijklmnopqrstuvwxyz", Re = "0123456789", je = {
149
- DIGIT: Re,
150
- ALPHA: oe,
151
- ALPHA_DIGIT: oe + oe.toUpperCase() + Re
152
- }, Dt = (e = 16, t = je.ALPHA_DIGIT) => {
153
- let n = "";
154
- const { length: r } = t;
155
- for (; e--; )
156
- n += t[Math.random() * r | 0];
157
- return n;
158
- };
159
- function It(e) {
160
- return !!(e && A(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
161
- }
162
- const Bt = (e) => {
163
- const t = new Array(10), n = (r, s) => {
164
- if (Z(r)) {
165
- if (t.indexOf(r) >= 0)
166
- return;
167
- if (!("toJSON" in r)) {
168
- t[s] = r;
169
- const o = _(r) ? [] : {};
170
- return k(r, (i, c) => {
171
- const d = n(i, s + 1);
172
- !B(d) && (o[c] = d);
173
- }), t[s] = void 0, o;
174
- }
175
- }
176
- return r;
177
- };
178
- return n(e, 0);
179
- }, vt = C("AsyncFunction"), kt = (e) => e && (Z(e) || A(e)) && A(e.then) && A(e.catch), a = {
180
- isArray: _,
181
- isArrayBuffer: De,
182
- isBuffer: at,
183
- isFormData: yt,
184
- isArrayBufferView: ct,
185
- isString: ut,
186
- isNumber: Ie,
187
- isBoolean: lt,
188
- isObject: Z,
189
- isPlainObject: J,
190
- isUndefined: B,
191
- isDate: dt,
192
- isFile: ft,
193
- isBlob: pt,
194
- isRegExp: Nt,
195
- isFunction: A,
196
- isStream: mt,
197
- isURLSearchParams: wt,
198
- isTypedArray: Ot,
199
- isFileList: ht,
200
- forEach: k,
201
- merge: le,
202
- extend: bt,
203
- trim: gt,
204
- stripBOM: Et,
205
- inherits: St,
206
- toFlatObject: Rt,
207
- kindOf: Q,
208
- kindOfTest: C,
209
- endsWith: At,
210
- toArray: $t,
211
- forEachEntry: Ct,
212
- matchAll: Pt,
213
- isHTMLForm: Tt,
214
- hasOwnProperty: Se,
215
- hasOwnProp: Se,
216
- // an alias to avoid ESLint no-prototype-builtins detection
217
- reduceDescriptors: Me,
218
- freezeMethods: xt,
219
- toObjectSet: Lt,
220
- toCamelCase: Ut,
221
- noop: Ft,
222
- toFiniteNumber: _t,
223
- findKey: Be,
224
- global: ve,
225
- isContextDefined: ke,
226
- ALPHABET: je,
227
- generateString: Dt,
228
- isSpecCompliantForm: It,
229
- toJSONObject: Bt,
230
- isAsyncFn: vt,
231
- isThenable: kt
232
- };
233
- function w(e, t, n, r, s) {
234
- Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s);
235
- }
236
- a.inherits(w, Error, {
237
- toJSON: function() {
238
- return {
239
- // Standard
240
- message: this.message,
241
- name: this.name,
242
- // Microsoft
243
- description: this.description,
244
- number: this.number,
245
- // Mozilla
246
- fileName: this.fileName,
247
- lineNumber: this.lineNumber,
248
- columnNumber: this.columnNumber,
249
- stack: this.stack,
250
- // Axios
251
- config: a.toJSONObject(this.config),
252
- code: this.code,
253
- status: this.response && this.response.status ? this.response.status : null
254
- };
255
- }
256
- });
257
- const qe = w.prototype, ze = {};
258
- [
259
- "ERR_BAD_OPTION_VALUE",
260
- "ERR_BAD_OPTION",
261
- "ECONNABORTED",
262
- "ETIMEDOUT",
263
- "ERR_NETWORK",
264
- "ERR_FR_TOO_MANY_REDIRECTS",
265
- "ERR_DEPRECATED",
266
- "ERR_BAD_RESPONSE",
267
- "ERR_BAD_REQUEST",
268
- "ERR_CANCELED",
269
- "ERR_NOT_SUPPORT",
270
- "ERR_INVALID_URL"
271
- // eslint-disable-next-line func-names
272
- ].forEach((e) => {
273
- ze[e] = { value: e };
274
- });
275
- Object.defineProperties(w, ze);
276
- Object.defineProperty(qe, "isAxiosError", { value: !0 });
277
- w.from = (e, t, n, r, s, o) => {
278
- const i = Object.create(qe);
279
- return a.toFlatObject(e, i, function(d) {
280
- return d !== Error.prototype;
281
- }, (c) => c !== "isAxiosError"), w.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
282
- };
283
- const Mt = null;
284
- function de(e) {
285
- return a.isPlainObject(e) || a.isArray(e);
286
- }
287
- function He(e) {
288
- return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
289
- }
290
- function Ae(e, t, n) {
291
- return e ? e.concat(t).map(function(s, o) {
292
- return s = He(s), !n && o ? "[" + s + "]" : s;
293
- }).join(n ? "." : "") : t;
294
- }
295
- function jt(e) {
296
- return a.isArray(e) && !e.some(de);
297
- }
298
- const qt = a.toFlatObject(a, {}, null, function(t) {
299
- return /^is[A-Z]/.test(t);
300
- });
301
- function Y(e, t, n) {
302
- if (!a.isObject(e))
303
- throw new TypeError("target must be an object");
304
- t = t || new FormData(), n = a.toFlatObject(n, {
305
- metaTokens: !0,
306
- dots: !1,
307
- indexes: !1
308
- }, !1, function(y, P) {
309
- return !a.isUndefined(P[y]);
310
- });
311
- const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
312
- if (!a.isFunction(s))
313
- throw new TypeError("visitor must be a function");
314
- function u(p) {
315
- if (p === null)
316
- return "";
317
- if (a.isDate(p))
318
- return p.toISOString();
319
- if (!d && a.isBlob(p))
320
- throw new w("Blob is not supported. Use a Buffer instead.");
321
- return a.isArrayBuffer(p) || a.isTypedArray(p) ? d && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
322
- }
323
- function l(p, y, P) {
324
- let $ = p;
325
- if (p && !P && typeof p == "object") {
326
- if (a.endsWith(y, "{}"))
327
- y = r ? y : y.slice(0, -2), p = JSON.stringify(p);
328
- else if (a.isArray(p) && jt(p) || (a.isFileList(p) || a.endsWith(y, "[]")) && ($ = a.toArray(p)))
329
- return y = He(y), $.forEach(function(q, ot) {
330
- !(a.isUndefined(q) || q === null) && t.append(
331
- // eslint-disable-next-line no-nested-ternary
332
- i === !0 ? Ae([y], ot, o) : i === null ? y : y + "[]",
333
- u(q)
334
- );
335
- }), !1;
336
- }
337
- return de(p) ? !0 : (t.append(Ae(P, y, o), u(p)), !1);
338
- }
339
- const m = [], E = Object.assign(qt, {
340
- defaultVisitor: l,
341
- convertValue: u,
342
- isVisitable: de
343
- });
344
- function g(p, y) {
345
- if (!a.isUndefined(p)) {
346
- if (m.indexOf(p) !== -1)
347
- throw Error("Circular reference detected in " + y.join("."));
348
- m.push(p), a.forEach(p, function($, x) {
349
- (!(a.isUndefined($) || $ === null) && s.call(
350
- t,
351
- $,
352
- a.isString(x) ? x.trim() : x,
353
- y,
354
- E
355
- )) === !0 && g($, y ? y.concat(x) : [x]);
356
- }), m.pop();
357
- }
358
- }
359
- if (!a.isObject(e))
360
- throw new TypeError("data must be an object");
361
- return g(e), t;
362
- }
363
- function $e(e) {
364
- const t = {
365
- "!": "%21",
366
- "'": "%27",
367
- "(": "%28",
368
- ")": "%29",
369
- "~": "%7E",
370
- "%20": "+",
371
- "%00": "\0"
372
- };
373
- return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
374
- return t[r];
375
- });
376
- }
377
- function we(e, t) {
378
- this._pairs = [], e && Y(e, this, t);
379
- }
380
- const Je = we.prototype;
381
- Je.append = function(t, n) {
382
- this._pairs.push([t, n]);
383
- };
384
- Je.toString = function(t) {
385
- const n = t ? function(r) {
386
- return t.call(this, r, $e);
387
- } : $e;
388
- return this._pairs.map(function(s) {
389
- return n(s[0]) + "=" + n(s[1]);
390
- }, "").join("&");
391
- };
392
- function zt(e) {
393
- return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
394
- }
395
- function Ve(e, t, n) {
396
- if (!t)
397
- return e;
398
- const r = n && n.encode || zt, s = n && n.serialize;
399
- let o;
400
- if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new we(t, n).toString(r), o) {
401
- const i = e.indexOf("#");
402
- i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
403
- }
404
- return e;
405
- }
406
- class Ht {
407
- constructor() {
408
- this.handlers = [];
409
- }
410
- /**
411
- * Add a new interceptor to the stack
412
- *
413
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
414
- * @param {Function} rejected The function to handle `reject` for a `Promise`
415
- *
416
- * @return {Number} An ID used to remove interceptor later
417
- */
418
- use(t, n, r) {
419
- return this.handlers.push({
420
- fulfilled: t,
421
- rejected: n,
422
- synchronous: r ? r.synchronous : !1,
423
- runWhen: r ? r.runWhen : null
424
- }), this.handlers.length - 1;
425
- }
426
- /**
427
- * Remove an interceptor from the stack
428
- *
429
- * @param {Number} id The ID that was returned by `use`
430
- *
431
- * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
432
- */
433
- eject(t) {
434
- this.handlers[t] && (this.handlers[t] = null);
435
- }
436
- /**
437
- * Clear all interceptors from the stack
438
- *
439
- * @returns {void}
440
- */
441
- clear() {
442
- this.handlers && (this.handlers = []);
443
- }
444
- /**
445
- * Iterate over all the registered interceptors
446
- *
447
- * This method is particularly useful for skipping over any
448
- * interceptors that may have become `null` calling `eject`.
449
- *
450
- * @param {Function} fn The function to call for each interceptor
451
- *
452
- * @returns {void}
453
- */
454
- forEach(t) {
455
- a.forEach(this.handlers, function(r) {
456
- r !== null && t(r);
457
- });
458
- }
459
- }
460
- const Oe = Ht, We = {
461
- silentJSONParsing: !0,
462
- forcedJSONParsing: !0,
463
- clarifyTimeoutError: !1
464
- }, Jt = typeof URLSearchParams < "u" ? URLSearchParams : we, Vt = typeof FormData < "u" ? FormData : null, Wt = typeof Blob < "u" ? Blob : null, Gt = (() => {
465
- let e;
466
- return typeof navigator < "u" && ((e = navigator.product) === "ReactNative" || e === "NativeScript" || e === "NS") ? !1 : typeof window < "u" && typeof document < "u";
467
- })(), Kt = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
468
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), O = {
469
- isBrowser: !0,
470
- classes: {
471
- URLSearchParams: Jt,
472
- FormData: Vt,
473
- Blob: Wt
474
- },
475
- isStandardBrowserEnv: Gt,
476
- isStandardBrowserWebWorkerEnv: Kt,
477
- protocols: ["http", "https", "file", "blob", "url", "data"]
478
- };
479
- function Qt(e, t) {
480
- return Y(e, new O.classes.URLSearchParams(), Object.assign({
481
- visitor: function(n, r, s, o) {
482
- return O.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
483
- }
484
- }, t));
485
- }
486
- function Xt(e) {
487
- return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
488
- }
489
- function Zt(e) {
490
- const t = {}, n = Object.keys(e);
491
- let r;
492
- const s = n.length;
493
- let o;
494
- for (r = 0; r < s; r++)
495
- o = n[r], t[o] = e[o];
496
- return t;
497
- }
498
- function Ge(e) {
499
- function t(n, r, s, o) {
500
- let i = n[o++];
501
- const c = Number.isFinite(+i), d = o >= n.length;
502
- return i = !i && a.isArray(s) ? s.length : i, d ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = Zt(s[i])), !c);
503
- }
504
- if (a.isFormData(e) && a.isFunction(e.entries)) {
505
- const n = {};
506
- return a.forEachEntry(e, (r, s) => {
507
- t(Xt(r), s, n, 0);
508
- }), n;
509
- }
510
- return null;
511
- }
512
- const Yt = {
513
- "Content-Type": void 0
514
- };
515
- function en(e, t, n) {
516
- if (a.isString(e))
517
- try {
518
- return (t || JSON.parse)(e), a.trim(e);
519
- } catch (r) {
520
- if (r.name !== "SyntaxError")
521
- throw r;
522
- }
523
- return (n || JSON.stringify)(e);
524
- }
525
- const ee = {
526
- transitional: We,
527
- adapter: ["xhr", "http"],
528
- transformRequest: [function(t, n) {
529
- const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
530
- if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
531
- return s && s ? JSON.stringify(Ge(t)) : t;
532
- if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
533
- return t;
534
- if (a.isArrayBufferView(t))
535
- return t.buffer;
536
- if (a.isURLSearchParams(t))
537
- return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
538
- let c;
539
- if (o) {
540
- if (r.indexOf("application/x-www-form-urlencoded") > -1)
541
- return Qt(t, this.formSerializer).toString();
542
- if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
543
- const d = this.env && this.env.FormData;
544
- return Y(
545
- c ? { "files[]": t } : t,
546
- d && new d(),
547
- this.formSerializer
548
- );
549
- }
550
- }
551
- return o || s ? (n.setContentType("application/json", !1), en(t)) : t;
552
- }],
553
- transformResponse: [function(t) {
554
- const n = this.transitional || ee.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
555
- if (t && a.isString(t) && (r && !this.responseType || s)) {
556
- const i = !(n && n.silentJSONParsing) && s;
557
- try {
558
- return JSON.parse(t);
559
- } catch (c) {
560
- if (i)
561
- throw c.name === "SyntaxError" ? w.from(c, w.ERR_BAD_RESPONSE, this, null, this.response) : c;
562
- }
563
- }
564
- return t;
565
- }],
566
- /**
567
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
568
- * timeout is not created.
569
- */
570
- timeout: 0,
571
- xsrfCookieName: "XSRF-TOKEN",
572
- xsrfHeaderName: "X-XSRF-TOKEN",
573
- maxContentLength: -1,
574
- maxBodyLength: -1,
575
- env: {
576
- FormData: O.classes.FormData,
577
- Blob: O.classes.Blob
578
- },
579
- validateStatus: function(t) {
580
- return t >= 200 && t < 300;
581
- },
582
- headers: {
583
- common: {
584
- Accept: "application/json, text/plain, */*"
585
- }
586
- }
587
- };
588
- a.forEach(["delete", "get", "head"], function(t) {
589
- ee.headers[t] = {};
590
- });
591
- a.forEach(["post", "put", "patch"], function(t) {
592
- ee.headers[t] = a.merge(Yt);
593
- });
594
- const ge = ee, tn = a.toObjectSet([
595
- "age",
596
- "authorization",
597
- "content-length",
598
- "content-type",
599
- "etag",
600
- "expires",
601
- "from",
602
- "host",
603
- "if-modified-since",
604
- "if-unmodified-since",
605
- "last-modified",
606
- "location",
607
- "max-forwards",
608
- "proxy-authorization",
609
- "referer",
610
- "retry-after",
611
- "user-agent"
612
- ]), nn = (e) => {
613
- const t = {};
614
- let n, r, s;
615
- return e && e.split(`
616
- `).forEach(function(i) {
617
- s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && tn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
618
- }), t;
619
- }, Ce = Symbol("internals");
620
- function D(e) {
621
- return e && String(e).trim().toLowerCase();
622
- }
623
- function V(e) {
624
- return e === !1 || e == null ? e : a.isArray(e) ? e.map(V) : String(e);
625
- }
626
- function rn(e) {
627
- const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
628
- let r;
629
- for (; r = n.exec(e); )
630
- t[r[1]] = r[2];
631
- return t;
632
- }
633
- const sn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
634
- function ie(e, t, n, r, s) {
635
- if (a.isFunction(r))
636
- return r.call(this, t, n);
637
- if (s && (t = n), !!a.isString(t)) {
638
- if (a.isString(r))
639
- return t.indexOf(r) !== -1;
640
- if (a.isRegExp(r))
641
- return r.test(t);
642
- }
643
- }
644
- function on(e) {
645
- return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
646
- }
647
- function an(e, t) {
648
- const n = a.toCamelCase(" " + t);
649
- ["get", "set", "has"].forEach((r) => {
650
- Object.defineProperty(e, r + n, {
651
- value: function(s, o, i) {
652
- return this[r].call(this, t, s, o, i);
653
- },
654
- configurable: !0
655
- });
656
- });
657
- }
658
- class te {
659
- constructor(t) {
660
- t && this.set(t);
661
- }
662
- set(t, n, r) {
663
- const s = this;
664
- function o(c, d, u) {
665
- const l = D(d);
666
- if (!l)
667
- throw new Error("header name must be a non-empty string");
668
- const m = a.findKey(s, l);
669
- (!m || s[m] === void 0 || u === !0 || u === void 0 && s[m] !== !1) && (s[m || d] = V(c));
670
- }
671
- const i = (c, d) => a.forEach(c, (u, l) => o(u, l, d));
672
- return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !sn(t) ? i(nn(t), n) : t != null && o(n, t, r), this;
673
- }
674
- get(t, n) {
675
- if (t = D(t), t) {
676
- const r = a.findKey(this, t);
677
- if (r) {
678
- const s = this[r];
679
- if (!n)
680
- return s;
681
- if (n === !0)
682
- return rn(s);
683
- if (a.isFunction(n))
684
- return n.call(this, s, r);
685
- if (a.isRegExp(n))
686
- return n.exec(s);
687
- throw new TypeError("parser must be boolean|regexp|function");
688
- }
689
- }
690
- }
691
- has(t, n) {
692
- if (t = D(t), t) {
693
- const r = a.findKey(this, t);
694
- return !!(r && this[r] !== void 0 && (!n || ie(this, this[r], r, n)));
695
- }
696
- return !1;
697
- }
698
- delete(t, n) {
699
- const r = this;
700
- let s = !1;
701
- function o(i) {
702
- if (i = D(i), i) {
703
- const c = a.findKey(r, i);
704
- c && (!n || ie(r, r[c], c, n)) && (delete r[c], s = !0);
705
- }
706
- }
707
- return a.isArray(t) ? t.forEach(o) : o(t), s;
708
- }
709
- clear(t) {
710
- const n = Object.keys(this);
711
- let r = n.length, s = !1;
712
- for (; r--; ) {
713
- const o = n[r];
714
- (!t || ie(this, this[o], o, t, !0)) && (delete this[o], s = !0);
715
- }
716
- return s;
717
- }
718
- normalize(t) {
719
- const n = this, r = {};
720
- return a.forEach(this, (s, o) => {
721
- const i = a.findKey(r, o);
722
- if (i) {
723
- n[i] = V(s), delete n[o];
724
- return;
725
- }
726
- const c = t ? on(o) : String(o).trim();
727
- c !== o && delete n[o], n[c] = V(s), r[c] = !0;
728
- }), this;
729
- }
730
- concat(...t) {
731
- return this.constructor.concat(this, ...t);
732
- }
733
- toJSON(t) {
734
- const n = /* @__PURE__ */ Object.create(null);
735
- return a.forEach(this, (r, s) => {
736
- r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
737
- }), n;
738
- }
739
- [Symbol.iterator]() {
740
- return Object.entries(this.toJSON())[Symbol.iterator]();
741
- }
742
- toString() {
743
- return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
744
- `);
745
- }
746
- get [Symbol.toStringTag]() {
747
- return "AxiosHeaders";
748
- }
749
- static from(t) {
750
- return t instanceof this ? t : new this(t);
751
- }
752
- static concat(t, ...n) {
753
- const r = new this(t);
754
- return n.forEach((s) => r.set(s)), r;
755
- }
756
- static accessor(t) {
757
- const r = (this[Ce] = this[Ce] = {
758
- accessors: {}
759
- }).accessors, s = this.prototype;
760
- function o(i) {
761
- const c = D(i);
762
- r[c] || (an(s, i), r[c] = !0);
763
- }
764
- return a.isArray(t) ? t.forEach(o) : o(t), this;
765
- }
766
- }
767
- te.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
768
- a.freezeMethods(te.prototype);
769
- a.freezeMethods(te);
770
- const T = te;
771
- function ae(e, t) {
772
- const n = this || ge, r = t || n, s = T.from(r.headers);
773
- let o = r.data;
774
- return a.forEach(e, function(c) {
775
- o = c.call(n, o, s.normalize(), t ? t.status : void 0);
776
- }), s.normalize(), o;
777
- }
778
- function Ke(e) {
779
- return !!(e && e.__CANCEL__);
780
- }
781
- function M(e, t, n) {
782
- w.call(this, e ?? "canceled", w.ERR_CANCELED, t, n), this.name = "CanceledError";
783
- }
784
- a.inherits(M, w, {
785
- __CANCEL__: !0
786
- });
787
- function cn(e, t, n) {
788
- const r = n.config.validateStatus;
789
- !n.status || !r || r(n.status) ? e(n) : t(new w(
790
- "Request failed with status code " + n.status,
791
- [w.ERR_BAD_REQUEST, w.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
792
- n.config,
793
- n.request,
794
- n
795
- ));
796
- }
797
- const un = O.isStandardBrowserEnv ? (
798
- // Standard browser envs support document.cookie
799
- function() {
800
- return {
801
- write: function(n, r, s, o, i, c) {
802
- const d = [];
803
- d.push(n + "=" + encodeURIComponent(r)), a.isNumber(s) && d.push("expires=" + new Date(s).toGMTString()), a.isString(o) && d.push("path=" + o), a.isString(i) && d.push("domain=" + i), c === !0 && d.push("secure"), document.cookie = d.join("; ");
804
- },
805
- read: function(n) {
806
- const r = document.cookie.match(new RegExp("(^|;\\s*)(" + n + ")=([^;]*)"));
807
- return r ? decodeURIComponent(r[3]) : null;
808
- },
809
- remove: function(n) {
810
- this.write(n, "", Date.now() - 864e5);
811
- }
812
- };
813
- }()
814
- ) : (
815
- // Non standard browser env (web workers, react-native) lack needed support.
816
- function() {
817
- return {
818
- write: function() {
819
- },
820
- read: function() {
821
- return null;
822
- },
823
- remove: function() {
824
- }
825
- };
826
- }()
827
- );
828
- function ln(e) {
829
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
830
- }
831
- function dn(e, t) {
832
- return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
833
- }
834
- function Qe(e, t) {
835
- return e && !ln(t) ? dn(e, t) : t;
836
- }
837
- const fn = O.isStandardBrowserEnv ? (
838
- // Standard browser envs have full support of the APIs needed to test
839
- // whether the request URL is of the same origin as current location.
840
- function() {
841
- const t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
842
- let r;
843
- function s(o) {
844
- let i = o;
845
- return t && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
846
- href: n.href,
847
- protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
848
- host: n.host,
849
- search: n.search ? n.search.replace(/^\?/, "") : "",
850
- hash: n.hash ? n.hash.replace(/^#/, "") : "",
851
- hostname: n.hostname,
852
- port: n.port,
853
- pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
854
- };
855
- }
856
- return r = s(window.location.href), function(i) {
857
- const c = a.isString(i) ? s(i) : i;
858
- return c.protocol === r.protocol && c.host === r.host;
859
- };
860
- }()
861
- ) : (
862
- // Non standard browser envs (web workers, react-native) lack needed support.
863
- function() {
864
- return function() {
865
- return !0;
866
- };
867
- }()
868
- );
869
- function pn(e) {
870
- const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
871
- return t && t[1] || "";
872
- }
873
- function hn(e, t) {
874
- e = e || 10;
875
- const n = new Array(e), r = new Array(e);
876
- let s = 0, o = 0, i;
877
- return t = t !== void 0 ? t : 1e3, function(d) {
878
- const u = Date.now(), l = r[o];
879
- i || (i = u), n[s] = d, r[s] = u;
880
- let m = o, E = 0;
881
- for (; m !== s; )
882
- E += n[m++], m = m % e;
883
- if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
884
- return;
885
- const g = l && u - l;
886
- return g ? Math.round(E * 1e3 / g) : void 0;
887
- };
888
- }
889
- function Pe(e, t) {
890
- let n = 0;
891
- const r = hn(50, 250);
892
- return (s) => {
893
- const o = s.loaded, i = s.lengthComputable ? s.total : void 0, c = o - n, d = r(c), u = o <= i;
894
- n = o;
895
- const l = {
896
- loaded: o,
897
- total: i,
898
- progress: i ? o / i : void 0,
899
- bytes: c,
900
- rate: d || void 0,
901
- estimated: d && i && u ? (i - o) / d : void 0,
902
- event: s
903
- };
904
- l[t ? "download" : "upload"] = !0, e(l);
905
- };
906
- }
907
- const mn = typeof XMLHttpRequest < "u", yn = mn && function(e) {
908
- return new Promise(function(n, r) {
909
- let s = e.data;
910
- const o = T.from(e.headers).normalize(), i = e.responseType;
911
- let c;
912
- function d() {
913
- e.cancelToken && e.cancelToken.unsubscribe(c), e.signal && e.signal.removeEventListener("abort", c);
914
- }
915
- a.isFormData(s) && (O.isStandardBrowserEnv || O.isStandardBrowserWebWorkerEnv ? o.setContentType(!1) : o.setContentType("multipart/form-data;", !1));
916
- let u = new XMLHttpRequest();
917
- if (e.auth) {
918
- const g = e.auth.username || "", p = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
919
- o.set("Authorization", "Basic " + btoa(g + ":" + p));
920
- }
921
- const l = Qe(e.baseURL, e.url);
922
- u.open(e.method.toUpperCase(), Ve(l, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
923
- function m() {
924
- if (!u)
925
- return;
926
- const g = T.from(
927
- "getAllResponseHeaders" in u && u.getAllResponseHeaders()
928
- ), y = {
929
- data: !i || i === "text" || i === "json" ? u.responseText : u.response,
930
- status: u.status,
931
- statusText: u.statusText,
932
- headers: g,
933
- config: e,
934
- request: u
935
- };
936
- cn(function($) {
937
- n($), d();
938
- }, function($) {
939
- r($), d();
940
- }, y), u = null;
941
- }
942
- if ("onloadend" in u ? u.onloadend = m : u.onreadystatechange = function() {
943
- !u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(m);
944
- }, u.onabort = function() {
945
- u && (r(new w("Request aborted", w.ECONNABORTED, e, u)), u = null);
946
- }, u.onerror = function() {
947
- r(new w("Network Error", w.ERR_NETWORK, e, u)), u = null;
948
- }, u.ontimeout = function() {
949
- let p = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
950
- const y = e.transitional || We;
951
- e.timeoutErrorMessage && (p = e.timeoutErrorMessage), r(new w(
952
- p,
953
- y.clarifyTimeoutError ? w.ETIMEDOUT : w.ECONNABORTED,
954
- e,
955
- u
956
- )), u = null;
957
- }, O.isStandardBrowserEnv) {
958
- const g = (e.withCredentials || fn(l)) && e.xsrfCookieName && un.read(e.xsrfCookieName);
959
- g && o.set(e.xsrfHeaderName, g);
960
- }
961
- s === void 0 && o.setContentType(null), "setRequestHeader" in u && a.forEach(o.toJSON(), function(p, y) {
962
- u.setRequestHeader(y, p);
963
- }), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), i && i !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", Pe(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Pe(e.onUploadProgress)), (e.cancelToken || e.signal) && (c = (g) => {
964
- u && (r(!g || g.type ? new M(null, e, u) : g), u.abort(), u = null);
965
- }, e.cancelToken && e.cancelToken.subscribe(c), e.signal && (e.signal.aborted ? c() : e.signal.addEventListener("abort", c)));
966
- const E = pn(l);
967
- if (E && O.protocols.indexOf(E) === -1) {
968
- r(new w("Unsupported protocol " + E + ":", w.ERR_BAD_REQUEST, e));
969
- return;
970
- }
971
- u.send(s || null);
972
- });
973
- }, W = {
974
- http: Mt,
975
- xhr: yn
976
- };
977
- a.forEach(W, (e, t) => {
978
- if (e) {
979
- try {
980
- Object.defineProperty(e, "name", { value: t });
981
- } catch {
982
- }
983
- Object.defineProperty(e, "adapterName", { value: t });
984
- }
985
- });
986
- const wn = {
987
- getAdapter: (e) => {
988
- e = a.isArray(e) ? e : [e];
989
- const { length: t } = e;
990
- let n, r;
991
- for (let s = 0; s < t && (n = e[s], !(r = a.isString(n) ? W[n.toLowerCase()] : n)); s++)
992
- ;
993
- if (!r)
994
- throw r === !1 ? new w(
995
- `Adapter ${n} is not supported by the environment`,
996
- "ERR_NOT_SUPPORT"
997
- ) : new Error(
998
- a.hasOwnProp(W, n) ? `Adapter '${n}' is not available in the build` : `Unknown adapter '${n}'`
999
- );
1000
- if (!a.isFunction(r))
1001
- throw new TypeError("adapter is not a function");
1002
- return r;
1003
- },
1004
- adapters: W
1005
- };
1006
- function ce(e) {
1007
- if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
1008
- throw new M(null, e);
1009
- }
1010
- function Te(e) {
1011
- return ce(e), e.headers = T.from(e.headers), e.data = ae.call(
1012
- e,
1013
- e.transformRequest
1014
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), wn.getAdapter(e.adapter || ge.adapter)(e).then(function(r) {
1015
- return ce(e), r.data = ae.call(
1016
- e,
1017
- e.transformResponse,
1018
- r
1019
- ), r.headers = T.from(r.headers), r;
1020
- }, function(r) {
1021
- return Ke(r) || (ce(e), r && r.response && (r.response.data = ae.call(
1022
- e,
1023
- e.transformResponse,
1024
- r.response
1025
- ), r.response.headers = T.from(r.response.headers))), Promise.reject(r);
1026
- });
1027
- }
1028
- const Ue = (e) => e instanceof T ? e.toJSON() : e;
1029
- function L(e, t) {
1030
- t = t || {};
1031
- const n = {};
1032
- function r(u, l, m) {
1033
- return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: m }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
1034
- }
1035
- function s(u, l, m) {
1036
- if (a.isUndefined(l)) {
1037
- if (!a.isUndefined(u))
1038
- return r(void 0, u, m);
1039
- } else
1040
- return r(u, l, m);
1041
- }
1042
- function o(u, l) {
1043
- if (!a.isUndefined(l))
1044
- return r(void 0, l);
1045
- }
1046
- function i(u, l) {
1047
- if (a.isUndefined(l)) {
1048
- if (!a.isUndefined(u))
1049
- return r(void 0, u);
1050
- } else
1051
- return r(void 0, l);
1052
- }
1053
- function c(u, l, m) {
1054
- if (m in t)
1055
- return r(u, l);
1056
- if (m in e)
1057
- return r(void 0, u);
1058
- }
1059
- const d = {
1060
- url: o,
1061
- method: o,
1062
- data: o,
1063
- baseURL: i,
1064
- transformRequest: i,
1065
- transformResponse: i,
1066
- paramsSerializer: i,
1067
- timeout: i,
1068
- timeoutMessage: i,
1069
- withCredentials: i,
1070
- adapter: i,
1071
- responseType: i,
1072
- xsrfCookieName: i,
1073
- xsrfHeaderName: i,
1074
- onUploadProgress: i,
1075
- onDownloadProgress: i,
1076
- decompress: i,
1077
- maxContentLength: i,
1078
- maxBodyLength: i,
1079
- beforeRedirect: i,
1080
- transport: i,
1081
- httpAgent: i,
1082
- httpsAgent: i,
1083
- cancelToken: i,
1084
- socketPath: i,
1085
- responseEncoding: i,
1086
- validateStatus: c,
1087
- headers: (u, l) => s(Ue(u), Ue(l), !0)
1088
- };
1089
- return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
1090
- const m = d[l] || s, E = m(e[l], t[l], l);
1091
- a.isUndefined(E) && m !== c || (n[l] = E);
1092
- }), n;
1093
- }
1094
- const Xe = "1.4.0", be = {};
1095
- ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
1096
- be[e] = function(r) {
1097
- return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
1098
- };
1099
- });
1100
- const Ne = {};
1101
- be.transitional = function(t, n, r) {
1102
- function s(o, i) {
1103
- return "[Axios v" + Xe + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1104
- }
1105
- return (o, i, c) => {
1106
- if (t === !1)
1107
- throw new w(
1108
- s(i, " has been removed" + (n ? " in " + n : "")),
1109
- w.ERR_DEPRECATED
1110
- );
1111
- return n && !Ne[i] && (Ne[i] = !0, console.warn(
1112
- s(
1113
- i,
1114
- " has been deprecated since v" + n + " and will be removed in the near future"
1115
- )
1116
- )), t ? t(o, i, c) : !0;
1117
- };
1118
- };
1119
- function gn(e, t, n) {
1120
- if (typeof e != "object")
1121
- throw new w("options must be an object", w.ERR_BAD_OPTION_VALUE);
1122
- const r = Object.keys(e);
1123
- let s = r.length;
1124
- for (; s-- > 0; ) {
1125
- const o = r[s], i = t[o];
1126
- if (i) {
1127
- const c = e[o], d = c === void 0 || i(c, o, e);
1128
- if (d !== !0)
1129
- throw new w("option " + o + " must be " + d, w.ERR_BAD_OPTION_VALUE);
1130
- continue;
1131
- }
1132
- if (n !== !0)
1133
- throw new w("Unknown option " + o, w.ERR_BAD_OPTION);
1134
- }
1135
- }
1136
- const fe = {
1137
- assertOptions: gn,
1138
- validators: be
1139
- }, U = fe.validators;
1140
- class K {
1141
- constructor(t) {
1142
- this.defaults = t, this.interceptors = {
1143
- request: new Oe(),
1144
- response: new Oe()
1145
- };
1146
- }
1147
- /**
1148
- * Dispatch a request
1149
- *
1150
- * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1151
- * @param {?Object} config
1152
- *
1153
- * @returns {Promise} The Promise to be fulfilled
1154
- */
1155
- request(t, n) {
1156
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = L(this.defaults, n);
1157
- const { transitional: r, paramsSerializer: s, headers: o } = n;
1158
- r !== void 0 && fe.assertOptions(r, {
1159
- silentJSONParsing: U.transitional(U.boolean),
1160
- forcedJSONParsing: U.transitional(U.boolean),
1161
- clarifyTimeoutError: U.transitional(U.boolean)
1162
- }, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
1163
- serialize: s
1164
- } : fe.assertOptions(s, {
1165
- encode: U.function,
1166
- serialize: U.function
1167
- }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1168
- let i;
1169
- i = o && a.merge(
1170
- o.common,
1171
- o[n.method]
1172
- ), i && a.forEach(
1173
- ["delete", "get", "head", "post", "put", "patch", "common"],
1174
- (p) => {
1175
- delete o[p];
1176
- }
1177
- ), n.headers = T.concat(i, o);
1178
- const c = [];
1179
- let d = !0;
1180
- this.interceptors.request.forEach(function(y) {
1181
- typeof y.runWhen == "function" && y.runWhen(n) === !1 || (d = d && y.synchronous, c.unshift(y.fulfilled, y.rejected));
1182
- });
1183
- const u = [];
1184
- this.interceptors.response.forEach(function(y) {
1185
- u.push(y.fulfilled, y.rejected);
1186
- });
1187
- let l, m = 0, E;
1188
- if (!d) {
1189
- const p = [Te.bind(this), void 0];
1190
- for (p.unshift.apply(p, c), p.push.apply(p, u), E = p.length, l = Promise.resolve(n); m < E; )
1191
- l = l.then(p[m++], p[m++]);
1192
- return l;
1193
- }
1194
- E = c.length;
1195
- let g = n;
1196
- for (m = 0; m < E; ) {
1197
- const p = c[m++], y = c[m++];
1198
- try {
1199
- g = p(g);
1200
- } catch (P) {
1201
- y.call(this, P);
1202
- break;
1203
- }
1204
- }
1205
- try {
1206
- l = Te.call(this, g);
1207
- } catch (p) {
1208
- return Promise.reject(p);
1209
- }
1210
- for (m = 0, E = u.length; m < E; )
1211
- l = l.then(u[m++], u[m++]);
1212
- return l;
1213
- }
1214
- getUri(t) {
1215
- t = L(this.defaults, t);
1216
- const n = Qe(t.baseURL, t.url);
1217
- return Ve(n, t.params, t.paramsSerializer);
1218
- }
1219
- }
1220
- a.forEach(["delete", "get", "head", "options"], function(t) {
1221
- K.prototype[t] = function(n, r) {
1222
- return this.request(L(r || {}, {
1223
- method: t,
1224
- url: n,
1225
- data: (r || {}).data
1226
- }));
1227
- };
1228
- });
1229
- a.forEach(["post", "put", "patch"], function(t) {
1230
- function n(r) {
1231
- return function(o, i, c) {
1232
- return this.request(L(c || {}, {
1233
- method: t,
1234
- headers: r ? {
1235
- "Content-Type": "multipart/form-data"
1236
- } : {},
1237
- url: o,
1238
- data: i
1239
- }));
1240
- };
1241
- }
1242
- K.prototype[t] = n(), K.prototype[t + "Form"] = n(!0);
1243
- });
1244
- const G = K;
1245
- class Ee {
1246
- constructor(t) {
1247
- if (typeof t != "function")
1248
- throw new TypeError("executor must be a function.");
1249
- let n;
1250
- this.promise = new Promise(function(o) {
1251
- n = o;
1252
- });
1253
- const r = this;
1254
- this.promise.then((s) => {
1255
- if (!r._listeners)
1256
- return;
1257
- let o = r._listeners.length;
1258
- for (; o-- > 0; )
1259
- r._listeners[o](s);
1260
- r._listeners = null;
1261
- }), this.promise.then = (s) => {
1262
- let o;
1263
- const i = new Promise((c) => {
1264
- r.subscribe(c), o = c;
1265
- }).then(s);
1266
- return i.cancel = function() {
1267
- r.unsubscribe(o);
1268
- }, i;
1269
- }, t(function(o, i, c) {
1270
- r.reason || (r.reason = new M(o, i, c), n(r.reason));
1271
- });
1272
- }
1273
- /**
1274
- * Throws a `CanceledError` if cancellation has been requested.
1275
- */
1276
- throwIfRequested() {
1277
- if (this.reason)
1278
- throw this.reason;
1279
- }
1280
- /**
1281
- * Subscribe to the cancel signal
1282
- */
1283
- subscribe(t) {
1284
- if (this.reason) {
1285
- t(this.reason);
1286
- return;
1287
- }
1288
- this._listeners ? this._listeners.push(t) : this._listeners = [t];
1289
- }
1290
- /**
1291
- * Unsubscribe from the cancel signal
1292
- */
1293
- unsubscribe(t) {
1294
- if (!this._listeners)
1295
- return;
1296
- const n = this._listeners.indexOf(t);
1297
- n !== -1 && this._listeners.splice(n, 1);
1298
- }
1299
- /**
1300
- * Returns an object that contains a new `CancelToken` and a function that, when called,
1301
- * cancels the `CancelToken`.
1302
- */
1303
- static source() {
1304
- let t;
1305
- return {
1306
- token: new Ee(function(s) {
1307
- t = s;
1308
- }),
1309
- cancel: t
1310
- };
1311
- }
1312
- }
1313
- const bn = Ee;
1314
- function En(e) {
1315
- return function(n) {
1316
- return e.apply(null, n);
1317
- };
1318
- }
1319
- function Sn(e) {
1320
- return a.isObject(e) && e.isAxiosError === !0;
1321
- }
1322
- const pe = {
1323
- Continue: 100,
1324
- SwitchingProtocols: 101,
1325
- Processing: 102,
1326
- EarlyHints: 103,
1327
- Ok: 200,
1328
- Created: 201,
1329
- Accepted: 202,
1330
- NonAuthoritativeInformation: 203,
1331
- NoContent: 204,
1332
- ResetContent: 205,
1333
- PartialContent: 206,
1334
- MultiStatus: 207,
1335
- AlreadyReported: 208,
1336
- ImUsed: 226,
1337
- MultipleChoices: 300,
1338
- MovedPermanently: 301,
1339
- Found: 302,
1340
- SeeOther: 303,
1341
- NotModified: 304,
1342
- UseProxy: 305,
1343
- Unused: 306,
1344
- TemporaryRedirect: 307,
1345
- PermanentRedirect: 308,
1346
- BadRequest: 400,
1347
- Unauthorized: 401,
1348
- PaymentRequired: 402,
1349
- Forbidden: 403,
1350
- NotFound: 404,
1351
- MethodNotAllowed: 405,
1352
- NotAcceptable: 406,
1353
- ProxyAuthenticationRequired: 407,
1354
- RequestTimeout: 408,
1355
- Conflict: 409,
1356
- Gone: 410,
1357
- LengthRequired: 411,
1358
- PreconditionFailed: 412,
1359
- PayloadTooLarge: 413,
1360
- UriTooLong: 414,
1361
- UnsupportedMediaType: 415,
1362
- RangeNotSatisfiable: 416,
1363
- ExpectationFailed: 417,
1364
- ImATeapot: 418,
1365
- MisdirectedRequest: 421,
1366
- UnprocessableEntity: 422,
1367
- Locked: 423,
1368
- FailedDependency: 424,
1369
- TooEarly: 425,
1370
- UpgradeRequired: 426,
1371
- PreconditionRequired: 428,
1372
- TooManyRequests: 429,
1373
- RequestHeaderFieldsTooLarge: 431,
1374
- UnavailableForLegalReasons: 451,
1375
- InternalServerError: 500,
1376
- NotImplemented: 501,
1377
- BadGateway: 502,
1378
- ServiceUnavailable: 503,
1379
- GatewayTimeout: 504,
1380
- HttpVersionNotSupported: 505,
1381
- VariantAlsoNegotiates: 506,
1382
- InsufficientStorage: 507,
1383
- LoopDetected: 508,
1384
- NotExtended: 510,
1385
- NetworkAuthenticationRequired: 511
1386
- };
1387
- Object.entries(pe).forEach(([e, t]) => {
1388
- pe[t] = e;
1389
- });
1390
- const Rn = pe;
1391
- function Ze(e) {
1392
- const t = new G(e), n = _e(G.prototype.request, t);
1393
- return a.extend(n, G.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
1394
- return Ze(L(e, s));
1395
- }, n;
1396
- }
1397
- const b = Ze(ge);
1398
- b.Axios = G;
1399
- b.CanceledError = M;
1400
- b.CancelToken = bn;
1401
- b.isCancel = Ke;
1402
- b.VERSION = Xe;
1403
- b.toFormData = Y;
1404
- b.AxiosError = w;
1405
- b.Cancel = b.CanceledError;
1406
- b.all = function(t) {
1407
- return Promise.all(t);
1408
- };
1409
- b.spread = En;
1410
- b.isAxiosError = Sn;
1411
- b.mergeConfig = L;
1412
- b.AxiosHeaders = T;
1413
- b.formToJSON = (e) => Ge(a.isHTMLForm(e) ? new FormData(e) : e);
1414
- b.HttpStatusCode = Rn;
1415
- b.default = b;
1416
- const f = b;
1417
- function An(e, t) {
1418
- if (e)
1419
- for (const n in e)
1420
- t[n] = e[n];
1421
- }
1422
- function Kn(e) {
1423
- return !e || !Object.keys(e).length;
1424
- }
1425
- function Ye(e) {
1426
- if (!e)
1427
- return null;
1428
- for (const t in e) {
1429
- const n = e[t];
1430
- if (n && (Array.isArray(n) || Object.keys(n).length > 0))
1431
- return JSON.parse(JSON.stringify(e));
1432
- }
1433
- return { ...e };
1434
- }
1435
- const et = `${v}/rest/agency`, Qn = async (e) => {
1436
- try {
1437
- return (await f.post(`${et}/agencyContacts`, e)).data;
1438
- } catch (t) {
1439
- throw h(t), t;
1440
- }
1441
- }, Xn = async (e, t) => {
1442
- try {
1443
- return (await f.get(
1444
- `/rest/agency/getAgencyByIDLang/${e}/${t}`
1445
- )).data;
1446
- } catch (n) {
1447
- throw h(n), n;
1448
- }
1449
- }, Zn = async (e) => {
1450
- try {
1451
- return (await f.post("/rest/agency/sendMutuo", e)).data;
1452
- } catch (t) {
1453
- throw h(t), t;
1454
- }
1455
- }, Yn = async (e) => {
1456
- try {
1457
- return (await f.post(
1458
- `${et}/getAgencyListForInfoWindow`,
1459
- e
1460
- )).data;
1461
- } catch (t) {
1462
- throw h(t), t;
1463
- }
1464
- };
1465
- let z;
1466
- const $n = new Uint8Array(16);
1467
- function On() {
1468
- if (!z && (z = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !z))
1469
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1470
- return z($n);
1471
- }
1472
- const S = [];
1473
- for (let e = 0; e < 256; ++e)
1474
- S.push((e + 256).toString(16).slice(1));
1475
- function Cn(e, t = 0) {
1476
- return (S[e[t + 0]] + S[e[t + 1]] + S[e[t + 2]] + S[e[t + 3]] + "-" + S[e[t + 4]] + S[e[t + 5]] + "-" + S[e[t + 6]] + S[e[t + 7]] + "-" + S[e[t + 8]] + S[e[t + 9]] + "-" + S[e[t + 10]] + S[e[t + 11]] + S[e[t + 12]] + S[e[t + 13]] + S[e[t + 14]] + S[e[t + 15]]).toLowerCase();
1477
- }
1478
- const Pn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), xe = {
1479
- randomUUID: Pn
1480
- };
1481
- function tt(e, t, n) {
1482
- if (xe.randomUUID && !t && !e)
1483
- return xe.randomUUID();
1484
- e = e || {};
1485
- const r = e.random || (e.rng || On)();
1486
- if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
1487
- n = n || 0;
1488
- for (let s = 0; s < 16; ++s)
1489
- t[n + s] = r[s];
1490
- return t;
1491
- }
1492
- return Cn(r);
1493
- }
1494
- const ne = (e, t = {}) => {
1495
- if (Object.keys(t).length === 0)
1496
- throw "The params object can't be empty";
1497
- const n = new URL(e);
1498
- for (const r in t)
1499
- n.searchParams.append(r, `${t[r]}`);
1500
- return n;
1501
- }, N = `${v}/rest/geography`;
1502
- let I = tt();
1503
- const er = async (e, t, n = []) => {
1504
- I || (I = tt());
1505
- const r = new URL(`${N}/placesAddressAutocomplete`), s = n.length, o = n.reduce((d, u, l) => s === 1 ? u : l === s - 1 ? d : d += `${u}|`, ""), i = ne(r, {
1506
- query: e,
1507
- radius: t,
1508
- sessionToken: I,
1509
- types: o
1510
- }), c = await f.get(i.toString());
1511
- if (c.data.status !== "OK")
1512
- throw new Error("There was an error in the request");
1513
- return c.data.predictions;
1514
- }, Tn = async (e) => {
1515
- const t = new URL(`${N}/getPlacesDetails`), n = ne(t, {
1516
- placeId: e,
1517
- sessionToken: I
1518
- }), r = await f.get(n.toString());
1519
- if (I = "", r.data.status !== "OK")
1520
- throw new Error("There was an error in the request");
1521
- return r.data.result;
1522
- }, Un = async (e, t) => {
1523
- const n = new URL(
1524
- `${N}/guessCityPlace/${e}/${t}`
1525
- );
1526
- return (await f.get(n.toString())).data;
1527
- }, tr = async (e) => {
1528
- if (e == null)
1529
- throw new Error("The id can't be null");
1530
- return (await f.get(`${N}/getPlaceFromPlaceID/${e}`)).data;
1531
- }, nr = async (e) => {
1532
- try {
1533
- return (await f.get(
1534
- `${N}/getCountryPolygonJson/${e}`
1535
- )).data;
1536
- } catch (t) {
1537
- throw h(t), t;
1538
- }
1539
- }, rr = async (e) => {
1540
- try {
1541
- return (await f.get(`${N}/getRegionPolygonJson/${e}`)).data;
1542
- } catch (t) {
1543
- throw h(t), t;
1544
- }
1545
- }, sr = async (e) => {
1546
- try {
1547
- return (await f.get(`${N}/getCityPolygonJson/${e}`)).data;
1548
- } catch (t) {
1549
- throw h(t), t;
1550
- }
1551
- }, or = async (e) => {
1552
- try {
1553
- return (await f.get(
1554
- `${N}/getProvincePolygonJson/${e}`
1555
- )).data;
1556
- } catch (t) {
1557
- throw h(t), t;
1558
- }
1559
- }, Nn = "/rest/insights", ir = async (e) => {
1560
- try {
1561
- return (await f.post(
1562
- `${Nn}/getTransactionsGraphData`,
1563
- e
1564
- )).data;
1565
- } catch (t) {
1566
- throw h(t), t;
1567
- }
1568
- }, j = `${v}/rest/mail`, ar = async (e) => {
1569
- try {
1570
- return (await f.post(`${j}/infoPremium`, e)).data;
1571
- } catch (t) {
1572
- throw h(t), t;
1573
- }
1574
- }, cr = async (e) => {
1575
- try {
1576
- return (await f.post(`${j}/sendBrochurePremium`, e)).data;
1577
- } catch (t) {
1578
- throw h(t), t;
1579
- }
1580
- }, ur = async (e) => {
1581
- try {
1582
- return (await f.post(
1583
- `${j}/submitJobApplication`,
1584
- e,
1585
- {
1586
- headers: {
1587
- "Content-Type": "multipart/form-data"
1588
- }
1589
- }
1590
- )).data;
1591
- } catch (t) {
1592
- throw h(t), t;
1593
- }
1594
- }, lr = async (e) => {
1595
- try {
1596
- return (await f.post(
1597
- `${j}/sendBrochureMR`,
1598
- e
1599
- )).data;
1600
- } catch (t) {
1601
- throw h(t), t;
1602
- }
1603
- }, dr = async (e) => {
1604
- try {
1605
- return (await f.post(`${j}/infoMR`, e)).data;
1606
- } catch (t) {
1607
- throw h(t), t;
1608
- }
1609
- }, xn = window._baseURLIt, re = "/ws", fr = async (e, t = [], n = "") => {
1610
- try {
1611
- return n || (n = ""), (await f.get(
1612
- `${re}/places?query=${e}&type=${t.join(",")}${n ? `&provinceID=${n}` : ""}`
1613
- )).data;
1614
- } catch (r) {
1615
- throw h(r), r;
1616
- }
1617
- };
1618
- function pr(e, t = "C,P,Z,L,I,R,A") {
1619
- return new Promise((n) => {
1620
- f.get(`${re}/places?query=${e}&type=${t}`).then((r) => {
1621
- r != null && r.data || n([]), n(r == null ? void 0 : r.data);
1622
- });
1623
- });
1624
- }
1625
- function hr(e) {
1626
- return new Promise((t) => {
1627
- f.get(`${re}/zones?cityID=${e}`).then((n) => {
1628
- if (!(n != null && n.data)) {
1629
- t([]);
1630
- return;
1631
- }
1632
- t(n == null ? void 0 : n.data);
1633
- });
1634
- });
1635
- }
1636
- const mr = async (e) => {
1637
- try {
1638
- return (await f.get(
1639
- ne(new URL(`${xn}${re}/districts`), {
1640
- zoneID: e
1641
- }).toString()
1642
- )).data;
1643
- } catch (t) {
1644
- throw h(t), t;
1645
- }
1646
- }, yr = async (e) => {
1647
- try {
1648
- return (await f.post(
1649
- `/rest/portfolioCustomer/updateNewsletterConsent/?email=${e}`
1650
- )).data;
1651
- } catch (t) {
1652
- throw h(t), t;
1653
- }
1654
- };
1655
- var he = /* @__PURE__ */ ((e) => (e[e.SELLING = 0] = "SELLING", e[e.SALE = 1] = "SALE", e[e.RENT = 2] = "RENT", e[e.AUCTION = 3] = "AUCTION", e))(he || {});
1656
- const Le = {
1657
- priceFrom: "PrezzoMinimo",
1658
- priceTo: "PrezzoMassimo",
1659
- sqMfrom: "SuperficieMinima",
1660
- sqMto: "SuperficieMassima",
1661
- roomsFrom: "NumeroMinimoLocali",
1662
- roomsTo: "NumeroMassimoLocali",
1663
- bathroomsFrom: "NumeroMinimoBagni",
1664
- bathroomsTo: "NumeroMassimoBagni",
1665
- conditionType: "StatoImmobile",
1666
- energyClassFilter: "ClasseEnergetica",
1667
- floor: "Piano",
1668
- excludeAuctions: "EscludiAste",
1669
- shortRentOnly: "SoloAffittiBrevi",
1670
- excludeBareOwnership: "EscludiNudaProprieta",
1671
- onlyPublicUser: "DaPrivato",
1672
- balcony: "Balcone",
1673
- terrace: "Terrazzo",
1674
- balconyTerrace: "BalconeTerrazzo",
1675
- boxCarSpot: "BoxPostoAuto",
1676
- carSpot: "PostoAuto",
1677
- box: "Box",
1678
- lift: "Ascensore",
1679
- privateGarden: "GiardinoPrivato",
1680
- publicGarden: "GiardinoPubblico",
1681
- cellar: "Cantina",
1682
- airConditioning: "AriaCondizionata",
1683
- furnished: "Arredato",
1684
- publicTransport: "Trasporti",
1685
- school: "Istruzione",
1686
- market: "Supermercati",
1687
- hospital: "Ospedali",
1688
- pharmacy: "Farmacie",
1689
- charging: "Ricarica",
1690
- post: "UfficioPostale",
1691
- bank: "Banche",
1692
- swimmingPoolPrivate: "PiscinaPrivata",
1693
- swimmingPoolPublic: "PiscinaCondominiale",
1694
- luxury: "Lusso",
1695
- discounted: "Sconto",
1696
- /* Don't consider this prop in the filters counter */
1697
- filterOrderId: "Ordinamento"
1698
- }, ue = {
1699
- sale: "Vendita",
1700
- rent: "Affitto",
1701
- auctionType: "Asta",
1702
- bareOwnershipType: "NudaProprieta",
1703
- typologyIdList: "Tipologia",
1704
- filterOrderId: "Ordinamento"
1705
- };
1706
- function Ln() {
1707
- return {
1708
- sale: !0,
1709
- rent: !1,
1710
- contractType: window._contractDefault,
1711
- excludeAuctions: !1,
1712
- shortRentOnly: !1,
1713
- excludeBareOwnership: !1,
1714
- macroTypologyId: window._macroTypologyDefault,
1715
- listingTypologyId: 0,
1716
- listingTypologyURL: window._listingTypologyURLDefault,
1717
- listingTypologyIdList: [0],
1718
- typologyIdList: window._typologyIdListDefault,
1719
- onlyVisible: !0,
1720
- subscriptionTypes: window._subscriptionTypesDefault
1721
- };
1722
- }
1723
- function Fn() {
1724
- return {
1725
- active: !0,
1726
- hourly: !1,
1727
- latitude: 0,
1728
- longitude: 0,
1729
- saveSearchParameterId: null,
1730
- searchBean: Ln(),
1731
- title: ""
1732
- };
1733
- }
1734
- const _n = window._baseURLIt, R = `${_n}/rest/publicUser`, wr = async () => {
1735
- try {
1736
- return (await f.get(`${R}/getMenuInfo`)).data;
1737
- } catch (e) {
1738
- throw h(e), null;
1739
- }
1740
- }, gr = async () => {
1741
- try {
1742
- return (await f.get(`${R}/getUser`)).data;
1743
- } catch (e) {
1744
- throw h(e), null;
1745
- }
1746
- }, br = async (e) => {
1747
- try {
1748
- return (await f.get(
1749
- `${R}/getMarketingConsent?email=${e}`
1750
- )).data;
1751
- } catch (t) {
1752
- return h(t), !1;
1753
- }
1754
- }, Er = async () => {
1755
- try {
1756
- return (await f.post(`${R}/deleteAllUserSaveSearch`)).data;
1757
- } catch (e) {
1758
- throw h(e), null;
1759
- }
1760
- }, Sr = async (e) => {
1761
- try {
1762
- return (await f.post(
1763
- `${R}/deleteUserSaveSearchParam/${e}`
1764
- )).data;
1765
- } catch (t) {
1766
- throw h(t), null;
1767
- }
1768
- }, Rr = async () => {
1769
- try {
1770
- return (await f.get(`${R}/getFavouriteIdList`)).data;
1771
- } catch (e) {
1772
- return h(e), [];
1773
- }
1774
- }, Ar = async (e) => {
1775
- try {
1776
- return (await f.post(`${R}/addUserFavourite/${e}`)).data;
1777
- } catch (t) {
1778
- return h(t), !1;
1779
- }
1780
- }, $r = async (e) => {
1781
- try {
1782
- return (await f.post(`${R}/deleteUserFavourite/${e}`)).data;
1783
- } catch (t) {
1784
- return h(t), !1;
1785
- }
1786
- }, Or = async (e, t) => {
1787
- if (t === " " || t === " ")
1788
- return !1;
1789
- try {
1790
- return (await f.post(`${R}/updateFavouriteNote`, {
1791
- realEstateId: e,
1792
- note: t
1793
- })).data;
1794
- } catch (n) {
1795
- return h(n), !1;
1796
- }
1797
- }, Cr = async () => {
1798
- try {
1799
- return (await f.post(`${R}/deleteAllUserFavourite`)).data;
1800
- } catch (e) {
1801
- return h(e), !1;
1802
- }
1803
- }, Pr = async (e) => {
1804
- try {
1805
- return e ? (await f.post(
1806
- `${R}/refreshUserFirebaseToken?token=${e}`
1807
- ), !0) : !1;
1808
- } catch {
1809
- return !1;
1810
- }
1811
- }, Tr = async (e) => {
1812
- try {
1813
- return await f.delete(
1814
- `${R}/deleteUserFirebaseToken?token=${e}`
1815
- ), !0;
1816
- } catch {
1817
- return !1;
1818
- }
1819
- }, Ur = async (e) => {
1820
- const { email: t, marketingConsent: n } = e;
1821
- try {
1822
- return await f.post(
1823
- `${R}/updateMarketingConsent?email=${t}&marketingConsent=${n}`,
1824
- e
1825
- ), !0;
1826
- } catch (r) {
1827
- return h(r), !1;
1828
- }
1829
- }, Nr = async (e = 0, t = 10) => {
1830
- try {
1831
- return (await f.get(
1832
- `${R}/getPublicUserSavedSearchBeanList/${e}/${t}`
1833
- )).data;
1834
- } catch (n) {
1835
- return h(n), [];
1836
- }
1837
- }, xr = async (e) => {
1838
- try {
1839
- return (await f.post(
1840
- `${R}/updatePublicUserSavedSearchBean/`,
1841
- e
1842
- )).data;
1843
- } catch (t) {
1844
- return h(t), Fn();
1845
- }
1846
- }, Lr = async () => {
1847
- try {
1848
- return (await f.get(
1849
- `${R}/getPublicUserSaveSearchCount`
1850
- )).data;
1851
- } catch (e) {
1852
- return h(e), 0;
1853
- }
1854
- }, se = window._baseURLIt, nt = `${se}/rest/realEstate`, Fr = async (e) => {
1855
- try {
1856
- return (await f.post(
1857
- `${se}/rest/publicUser/getRealEstateNotes/${e}`
1858
- )).data;
1859
- } catch (t) {
1860
- return h(t), "";
1861
- }
1862
- }, _r = async (e, t, n, r, s = !1) => {
1863
- if (!e || !r)
1864
- throw `Email or resb are not valid, ${e}, ${r}`;
1865
- return await f.post(
1866
- `${nt}/saveSearch?email=${e}&title=${t}&hourly=${n}&pushNotifications=${s}`,
1867
- r
1868
- );
1869
- }, Dr = async (e, t, n = !1) => {
1870
- try {
1871
- const r = "Ricerca salvata";
1872
- return (await f.post(
1873
- `${nt}/saveSearch?email=${e}&title=${r}&pushNotifications=${n}`,
1874
- t
1875
- )).data;
1876
- } catch (r) {
1877
- throw h(r), r;
1878
- }
1879
- }, Ir = async (e) => {
1880
- var r;
1881
- const t = Ye(e);
1882
- return t.polygonForDB && (t.polygonFromMap = t.polygonForDB || ""), (r = t == null ? void 0 : t.listingTypologyIdList) != null && r.includes(15) && (t.conditionType = 5), await (await f.post("/rest/realEstate/countRealEstateES", t)).data;
1883
- }, Br = async (e) => {
1884
- try {
1885
- return (await f.post(
1886
- `${se}/rest/realEstate/getRealEstateListForInfoWindow/${window._locale}`,
1887
- e
1888
- )).data;
1889
- } catch (t) {
1890
- return h(t), null;
1891
- }
1892
- }, vr = async () => {
1893
- if (!window._serializedSearchBean)
1894
- return [];
1895
- const e = Ye(JSON.parse(window._serializedSearchBean));
1896
- delete e.latitude, delete e.longitude;
1897
- try {
1898
- return (await f.post(
1899
- `${se}/rest/realEstate/getMapMarkers`,
1900
- e,
1901
- {
1902
- headers: {
1903
- "Content-Type": "application/json",
1904
- Accept: "application/json"
1905
- }
1906
- }
1907
- )).data;
1908
- } catch (t) {
1909
- throw h(t), [];
1910
- }
1911
- }, rt = `${v}/rest/request`, kr = async (e) => (await f.post(`${rt}/sendSuggestion`, e)).data, Mr = async (e) => {
1912
- try {
1913
- return (await f.post("/rest/request/addRequestGeneric", e)).data;
1914
- } catch (t) {
1915
- throw h(t), t;
1916
- }
1917
- }, jr = async (e) => (await f.post(
1918
- `${rt}/sendWidgetRequest`,
1919
- e
1920
- )).data, F = "/rest/statistics", qr = async (e) => {
1921
- try {
1922
- return await f.post(`${F}/updateViewListing/W`, e), !0;
1923
- } catch (t) {
1924
- return h(t), !1;
1925
- }
1926
- }, zr = async (e) => {
1927
- try {
1928
- return f.post(
1929
- `${F}/updateRealEstateSearch`,
1930
- e
1931
- ), !0;
1932
- } catch (t) {
1933
- return h(t), !1;
1934
- }
1935
- }, Hr = async (e, t) => {
1936
- try {
1937
- return (await f.post(
1938
- t ? `${F}/updatePhoneView/${e}/${t}/W` : `/rest/statistics/updatePhoneView/${e}/W`
1939
- )).data;
1940
- } catch (n) {
1941
- throw h(n), n;
1942
- }
1943
- }, Jr = async (e) => {
1944
- try {
1945
- const t = await f.post(
1946
- `${F}/getPlaceTrendData?sale=${!0}`,
1947
- e
1948
- ), n = await f.post(
1949
- `${F}/getPlaceTrendData?sale=${!1}`,
1950
- e
1951
- );
1952
- return Promise.all([t, n]);
1953
- } catch (t) {
1954
- throw h(t), t;
1955
- }
1956
- }, Vr = async (e, t = {
1957
- contract: "sale",
1958
- macroTypologyId: 1
1959
- }) => {
1960
- try {
1961
- return (await f.post(
1962
- `${F}/getAveragePriceGraphData/${t.contract}/${t.macroTypologyId}`,
1963
- e
1964
- )).data;
1965
- } catch (n) {
1966
- throw h(n), n;
1967
- }
1968
- }, Dn = "/rest/wikicasaPro", Wr = async (e, t, n = void 0, r = void 0) => {
1969
- if (!t)
1970
- throw new Error("The token can't be null");
1971
- try {
1972
- let s = { token: t };
1973
- n && (s = { ...s, conditionTypeId: n }), r != null && (s = { ...s, floor: r });
1974
- const o = ne(
1975
- new URL(`${v}${Dn}/evaluateRealEstateWidget`),
1976
- s
1977
- ), i = await f.post(o.toString(), e);
1978
- return i.data.valid = !!i.data.valid, i.data;
1979
- } catch (s) {
1980
- throw h(s), s;
1981
- }
1982
- }, In = "/rest/wikicasaPro", Gr = async (e, t, n, r = 0) => {
1983
- try {
1984
- return (await f.post(
1985
- `${In}/userValuationWithPhotoFeedback/?email=${e}&token=${t}&feedback=${n}${r > 0 ? "&userFeedbackValue=" + r : ""}`
1986
- )).data;
1987
- } catch (s) {
1988
- throw h(s), s;
1989
- }
1990
- }, Kr = (e) => !(e != null && e.length);
1991
- function Qr(e, t) {
1992
- e = e.replace("#", "");
1993
- const n = parseInt(e.substring(0, 2), 16), r = parseInt(e.substring(2, 4), 16), s = parseInt(e.substring(4, 6), 16);
1994
- return `rgba(${n}, ${r}, ${s}, ${t})`;
1995
- }
1996
- /*! js-cookie v3.0.5 | MIT */
1997
- function H(e) {
1998
- for (var t = 1; t < arguments.length; t++) {
1999
- var n = arguments[t];
2000
- for (var r in n)
2001
- e[r] = n[r];
2002
- }
2003
- return e;
2004
- }
2005
- var Bn = {
2006
- read: function(e) {
2007
- return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
2008
- },
2009
- write: function(e) {
2010
- return encodeURIComponent(e).replace(
2011
- /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
2012
- decodeURIComponent
2013
- );
2014
- }
2015
- };
2016
- function me(e, t) {
2017
- function n(s, o, i) {
2018
- if (!(typeof document > "u")) {
2019
- i = H({}, t, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires && (i.expires = i.expires.toUTCString()), s = encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
2020
- var c = "";
2021
- for (var d in i)
2022
- i[d] && (c += "; " + d, i[d] !== !0 && (c += "=" + i[d].split(";")[0]));
2023
- return document.cookie = s + "=" + e.write(o, s) + c;
2024
- }
2025
- }
2026
- function r(s) {
2027
- if (!(typeof document > "u" || arguments.length && !s)) {
2028
- for (var o = document.cookie ? document.cookie.split("; ") : [], i = {}, c = 0; c < o.length; c++) {
2029
- var d = o[c].split("="), u = d.slice(1).join("=");
2030
- try {
2031
- var l = decodeURIComponent(d[0]);
2032
- if (i[l] = e.read(u, l), s === l)
2033
- break;
2034
- } catch {
2035
- }
2036
- }
2037
- return s ? i[s] : i;
2038
- }
2039
- }
2040
- return Object.create(
2041
- {
2042
- set: n,
2043
- get: r,
2044
- remove: function(s, o) {
2045
- n(
2046
- s,
2047
- "",
2048
- H({}, o, {
2049
- expires: -1
2050
- })
2051
- );
2052
- },
2053
- withAttributes: function(s) {
2054
- return me(this.converter, H({}, this.attributes, s));
2055
- },
2056
- withConverter: function(s) {
2057
- return me(H({}, this.converter, s), this.attributes);
2058
- }
2059
- },
2060
- {
2061
- attributes: { value: Object.freeze(t) },
2062
- converter: { value: Object.freeze(e) }
2063
- }
2064
- );
2065
- }
2066
- me(Bn, { path: "/" });
2067
- function Xr(e, t, n = 30, r = !0) {
2068
- const s = /* @__PURE__ */ new Date();
2069
- s.setTime(s.getTime() + 24 * 60 * 60 * 1e3 * n);
2070
- const o = typeof t != "string" ? JSON.stringify(t) : t, i = r ? btoa(encodeURIComponent(o)) : o;
2071
- document.cookie = e + "=" + i + ";path=/;expires=" + s.toUTCString();
2072
- }
2073
- function Zr(e) {
2074
- try {
2075
- const t = document.cookie.match("(^|;) ?" + e + "=([^;]*)(;|$)");
2076
- return t ? t[2] : null;
2077
- } catch (t) {
2078
- return console.error(t), null;
2079
- }
2080
- }
2081
- function Yr(e) {
2082
- try {
2083
- const t = document.cookie.match("(^|;) ?" + e + "=([^;]*)(;|$)");
2084
- return t ? JSON.parse(decodeURIComponent(atob(t[2]))) : null;
2085
- } catch (t) {
2086
- return console.error(t), vn(e), null;
2087
- }
2088
- }
2089
- function vn(e) {
2090
- (void 0)(e);
2091
- }
2092
- const es = (e, t, n = "it-IT") => {
2093
- if (e === void 0)
2094
- return "0";
2095
- const r = {
2096
- style: "currency",
2097
- currency: "EUR",
2098
- maximumFractionDigits: 0
2099
- };
2100
- return An(t, r), new Intl.NumberFormat(n, r).format(e);
2101
- };
2102
- function ts(e, t = !1) {
2103
- const n = e.getDate(), r = e.getMonth() + 1, s = e.getFullYear();
2104
- return t ? `${("0" + n).slice(-2)}-${("0" + r).slice(-2)}-${s}` : `${s}-${("0" + r).slice(-2)}-${("0" + n).slice(-2)}`;
2105
- }
2106
- const ns = () => /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, rs = () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
2107
- navigator.userAgent
2108
- ), ss = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent), kn = (e) => {
2109
- const t = document.querySelector(e);
2110
- if (!t)
2111
- throw new Error(`No element found with the id: ${e}`);
2112
- return t;
2113
- }, os = (e) => {
2114
- typeof e == "string" ? kn(e).textContent = "" : e.textContent = "";
2115
- }, is = (e, t = "block") => {
2116
- e && (e.style.display = t);
2117
- }, as = (e) => {
2118
- e && (e.style.display = "none");
2119
- }, Mn = (e) => e.includes("@gmail");
2120
- async function jn(e) {
2121
- const t = new TextEncoder().encode(e), n = await crypto.subtle.digest("SHA-256", t);
2122
- return Array.from(new Uint8Array(n)).map((o) => o.toString(16).padStart(2, "0")).join("");
2123
- }
2124
- const qn = (e) => {
2125
- const t = e.split("@");
2126
- if (t.length < 2)
2127
- throw new Error("The email has nothing before the '@' symbol");
2128
- const n = t[0];
2129
- let r = "";
2130
- for (const s of n)
2131
- if (s !== ".") {
2132
- if (s === "+")
2133
- break;
2134
- r += s;
2135
- }
2136
- return `${r}@${t[1]}`;
2137
- }, cs = (e) => {
2138
- if (!e || !e.trim())
2139
- throw new Error("The email in null or empty");
2140
- let t = e;
2141
- return Mn(t) && (t = qn(e)), jn(t);
2142
- };
2143
- function us(e, t) {
2144
- return (...n) => new Promise((r, s) => {
2145
- e.id && clearTimeout(e.id), e.id = setTimeout(() => {
2146
- try {
2147
- const o = t(...n);
2148
- r(o);
2149
- } catch (o) {
2150
- s(o);
2151
- }
2152
- }, e.delay);
2153
- });
2154
- }
2155
- const ls = (e) => {
2156
- document.querySelectorAll(`a[class^=fav][data-id='${e}']`).forEach((n) => {
2157
- n.classList.contains("fav-save") ? n.style.display = "none" : n.classList.contains("fav-remove") && (n.style.display = "block");
2158
- });
2159
- }, ds = (e) => {
2160
- document.querySelectorAll(`a[class^=fav][data-id='${e}']`).forEach((n) => {
2161
- n.classList.contains("fav-save") ? n.style.display = "block" : n.classList.contains("fav-remove") && (n.style.display = "none");
2162
- });
2163
- };
2164
- function fs(e, t, n) {
2165
- return e.replace(new RegExp(t, "g"), n);
2166
- }
2167
- function zn(e) {
2168
- return e.charAt(0).toUpperCase() + e.slice(1);
2169
- }
2170
- function Hn(e, t, n, r) {
2171
- const s = [];
2172
- e && e !== "ND" && (t && t !== "ND" && t !== "0" ? s.push(`${e} ${t}`) : s.push(e)), n && r ? s.push(`${n} (${r})`) : s.push(n);
2173
- const o = s.filter((i) => !!i).join(", ");
2174
- return zn(o);
2175
- }
2176
- function ps(e) {
2177
- if (!e)
2178
- return "";
2179
- const t = document.createElement("span");
2180
- return t.innerHTML = e, t.textContent || "";
2181
- }
2182
- function hs(e, t) {
2183
- const n = new RegExp(
2184
- Object.keys(t).map((r) => r.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&")).join("|"),
2185
- "gi"
2186
- );
2187
- return e.replace(n, function(r) {
2188
- return t[r.toLowerCase()];
2189
- });
2190
- }
2191
- function Jn(e) {
2192
- return e.replace(/[\uA78C\uA78B]/g, "'").replace(/[^\x00-\x7F]/g, "");
2193
- }
2194
- const ms = (e = "") => !e || !e.trim() ? "" : (e = e.trim(), e.replace(" ", "-").toLowerCase()), Vn = async (e, t) => {
2195
- const n = {};
2196
- for (let s = 0; s < e.address_components.length; s++)
2197
- e.address_components[s].types.indexOf(
2198
- "administrative_area_level_3"
2199
- ) !== -1 ? n.city = e.address_components[s].long_name : e.address_components[s].types.indexOf("locality") !== -1 ? n.locality = e.address_components[s].long_name : e.address_components[s].types.indexOf("route") !== -1 ? n.streetName = e.address_components[s].long_name : e.address_components[s].types.indexOf("street_number") !== -1 ? n.streetNumber = e.address_components[s].long_name : e.address_components[s].types.indexOf("postal_code") !== -1 && (n.zip = e.address_components[s].long_name);
2200
- n.latitude = e.geometry.location.lat, n.longitude = e.geometry.location.lng, n.address = Jn(t), typeof n.streetNumber > "u" && (n.streetNumber = null);
2201
- let r = await Un(n.latitude, n.longitude);
2202
- if (delete r.city, delete r.locality, r = { ...r, ...n }, !r.streetNumber) {
2203
- const s = parseInt(r.address.split(",")[1]), o = parseInt(r.zip);
2204
- s && s !== o && (r.streetNumber = s.toString());
2205
- }
2206
- return r;
2207
- }, ys = async (e, t) => {
2208
- const n = await Tn(e), r = await Vn(n, t), s = r.streetName ? Hn(r.streetName, r.streetNumber || "", r.cityName) : r.address;
2209
- return { place: r, address: s };
2210
- }, ws = (e, t) => new Promise((n, r) => {
2211
- setTimeout(() => {
2212
- try {
2213
- e && e(), n();
2214
- } catch {
2215
- r();
2216
- }
2217
- }, t);
2218
- }), Wn = (e, t) => {
2219
- t || (t = navigator.language);
2220
- const n = Intl.NumberFormat(t).format(1111).replace(/\p{Number}/gu, ""), r = Intl.NumberFormat(t).format(1.1).replace(/\p{Number}/gu, ""), s = parseFloat(
2221
- `${e}`.replace(new RegExp("\\" + n, "g"), "").replace(new RegExp("\\" + r), ".")
2222
- );
2223
- return isNaN(s) ? "" : s;
2224
- }, Gn = (e, t) => {
2225
- if (e == null)
2226
- return;
2227
- if (e = parseFloat(`${e}`), isNaN(e))
2228
- return "";
2229
- const n = {
2230
- style: "currency",
2231
- currency: "EUR"
2232
- };
2233
- let s = { ...{
2234
- maximumFractionDigits: 0
2235
- } };
2236
- return t != null && t.currency && (s = { ...s, ...n }), new Intl.NumberFormat(navigator.language, {
2237
- ...s
2238
- }).format(e);
2239
- };
2240
- function gs(e, t = !1) {
2241
- return e == null ? "" : st(t ? Math.round(e) : Math.floor(e), 0);
2242
- }
2243
- function st(e, t) {
2244
- return !e && e !== 0 ? "" : e.toLocaleString(
2245
- "it-IT",
2246
- // usare una stringa tipo 'en-US' per sovrascrivere la lingua del browser
2247
- {
2248
- minimumFractionDigits: t,
2249
- maximumFractionDigits: t
2250
- }
2251
- );
2252
- }
2253
- function bs(e, t = 2) {
2254
- return st(e, t);
2255
- }
2256
- const Es = {
2257
- formatFn: Gn,
2258
- unFormatFn: Wn
2259
- };
2260
- function Ss(e, t, n) {
2261
- const r = [].slice.call(document.querySelectorAll(e)), s = new IntersectionObserver(
2262
- (o, i) => {
2263
- for (let c = 0; c < o.length; c++) {
2264
- const d = o[c];
2265
- if (d.isIntersecting) {
2266
- const u = d.target;
2267
- t(u, i), i.unobserve(u);
2268
- }
2269
- }
2270
- },
2271
- n
2272
- );
2273
- r.forEach((o) => {
2274
- s.observe(o);
2275
- });
2276
- }
2277
- let Fe = !1;
2278
- const Rs = (e) => {
2279
- document.addEventListener("notification-permission-changed", e);
2280
- }, As = () => {
2281
- !navigator.permissions || !navigator.permissions.query || (!Fe && navigator.permissions.query({ name: "notifications" }).then(function(e) {
2282
- e.onchange = function() {
2283
- document.dispatchEvent(
2284
- new CustomEvent("notification-permission-changed", {
2285
- detail: { permissionState: this.state }
2286
- })
2287
- );
2288
- };
2289
- }), Fe = !0);
2290
- };
2291
- function $s(e) {
2292
- return new Promise(
2293
- (t, n) => f.post("/rest/request/addRequestGenericValuation", e, {
2294
- headers: { "Content-Type": "application/json", dataType: "json" }
2295
- }).then(() => {
2296
- t();
2297
- }).catch((r) => n(r))
2298
- );
2299
- }
2300
- function Os(e, t, n, r, s, o, i) {
2301
- let c = "/";
2302
- return n && (c += (n == he.AUCTION ? window._auctionLabel : n == he.RENT ? window._rentLabel : window._saleLabel) + "-"), c += `${t}/`, o && (c += `${o}/`), e && (c += `${e.replace(/^-+|-+$/g, "")}/`), r && (c += `${r.replace(/^_+|_+$/g, "")}/`), !r && i && (c += `${i.replace(/^_+|_+$/g, "")}/`), s && (c += `${s.replace(/^_+|_+$/g, "")}/`), c;
2303
- }
2304
- function Cs(e) {
2305
- const t = Object.keys(Le).map((n) => e[n] ? encodeURIComponent(Le[n]) + "=" + encodeURIComponent(e[n]) : null).filter((n) => n !== null);
2306
- return t.length ? `?${t.join("&")}` : "";
2307
- }
2308
- function Ps(e) {
2309
- const t = Object.keys(ue).map((n) => {
2310
- if (e[n])
2311
- if (Array.isArray(e[n])) {
2312
- const r = e[n], s = ue[n];
2313
- let o = "";
2314
- for (let i = 0; i < r.length; i++)
2315
- o += encodeURIComponent(s) + "=" + encodeURIComponent(r[i]), o += i < r.length - 1 ? "&" : "";
2316
- return o;
2317
- } else
2318
- return encodeURIComponent(ue[n]) + "=" + encodeURIComponent(e[n]);
2319
- else
2320
- return null;
2321
- }).filter((n) => n !== null);
2322
- return t.length ? `?${t.join("&")}` : "";
2323
- }
2324
- const Ts = (e) => {
2325
- const t = `${window._baseURL}`;
2326
- switch (e) {
2327
- case "SAVED_SEARCHES":
2328
- return `${t}/${window._privateURL}/${window._saveSearchesURL}`;
2329
- default:
2330
- throw new Error(`There is no matching URL for ${e}`);
2331
- }
2332
- };
2333
- export {
2334
- Mr as addGenericRequest,
2335
- As as addPermissionStateListener,
2336
- Ar as addUserFavorite,
2337
- ne as appendQueryString,
2338
- ws as awaitableSetTimeout,
2339
- Cs as buildParams,
2340
- Ps as buildParamsForAgency,
2341
- Os as buildURL,
2342
- zn as capitalizeFirstLetter,
2343
- Jn as cleanASCII,
2344
- us as debounce,
2345
- Yr as decodeCookie,
2346
- ps as decodeTextWithEntities,
2347
- Ye as deepCopy,
2348
- Er as deleteAllSaveSearch,
2349
- Sr as deleteSaveSearch,
2350
- $r as deleteUserFavorite,
2351
- Tr as deleteUserFirebaseToken,
2352
- os as emptyElem,
2353
- Xr as encodeCookie,
2354
- Wr as evaluateRealEstateWidget,
2355
- Hn as formatAddress,
2356
- es as formatCurrency,
2357
- ts as formatDate,
2358
- bs as formatFloat,
2359
- gs as formatInteger,
2360
- Gn as formatLocaleNumber,
2361
- st as formatNumber,
2362
- Es as formatterNumberObj,
2363
- Yn as getAgenciesData,
2364
- Xn as getAgencyById,
2365
- sr as getCityPolygonJSON,
2366
- Zr as getCookie,
2367
- nr as getCountryPolygonJSON,
2368
- mr as getDistrictsByZoneId,
2369
- Rr as getFavourites,
2370
- vr as getMapMarkers,
2371
- br as getMarketingConsent,
2372
- wr as getMenuInfo,
2373
- pr as getPlace,
2374
- ys as getPlaceFromGAutocomplete,
2375
- tr as getPlaceFromPlaceID,
2376
- Jr as getPlaceTrendData,
2377
- er as getPlacesAddressAutocomplete,
2378
- fr as getPlacesByQuery,
2379
- Tn as getPlacesDetails,
2380
- or as getProvincePolygonJSON,
2381
- gr as getPublicUser,
2382
- Nr as getPublicUserSaveSearchList,
2383
- Ir as getRealEstateCounter,
2384
- Fr as getRealEstateNotes,
2385
- Br as getRealEstatesData,
2386
- rr as getRegionPolygonJSON,
2387
- Vr as getSaleGraphData,
2388
- Lr as getSavedSearchesCount,
2389
- kn as getSingleElement,
2390
- ir as getTransactionGraphData,
2391
- Ts as getURLPage,
2392
- hr as getZones,
2393
- Vn as googlePlaceConverter,
2394
- Un as guessPlace,
2395
- h as handleAxiosError,
2396
- cs as hashEmail,
2397
- as as hideElem,
2398
- Kr as isArrNullOrEmpty,
2399
- Kn as isEmptyObject,
2400
- rs as isMobile,
2401
- ss as isSafari,
2402
- ns as isiOSDevice,
2403
- Ss as observeOnce,
2404
- Rs as onNotificationsPermissionChange,
2405
- Wn as parseLocaleNumber,
2406
- vn as removeCookie,
2407
- Cr as removeFavourites,
2408
- fs as replaceAll,
2409
- hs as replaceAllTokens,
2410
- Qr as rgba,
2411
- _r as saveSearch,
2412
- Dr as saveSearchFromRequest,
2413
- Pr as saveUserFirebaseToken,
2414
- Qn as sendAgencyContactAsync,
2415
- lr as sendBrochureMR,
2416
- cr as sendBrochureRequest,
2417
- dr as sendInfoMR,
2418
- ar as sendInfoPremium,
2419
- ur as sendJobApplicationForm,
2420
- Zn as sendMortgage,
2421
- $s as sendRequestGeneric,
2422
- kr as sendSuggestion,
2423
- jr as sendWidgetRequest,
2424
- An as shallowCopyObjectTo,
2425
- ds as showAddFavoritesIcon,
2426
- is as showElem,
2427
- ls as showRemoveFavoritesIcons,
2428
- ms as stringToHyphened,
2429
- Ur as updateMarketingConsent,
2430
- yr as updateNewsletterConsent,
2431
- Or as updateNote,
2432
- Hr as updatePhoneView,
2433
- xr as updatePublicUserSavedSearchBean,
2434
- zr as updateRealEstateSearch,
2435
- qr as updateViewListing,
2436
- Gr as userValuationWithPhotoFeedback
2437
- };