favesalon-embed 1.0.16 → 1.0.17
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.
- package/dist/favesalon-embed/activate-form.entry.js +1 -1
- package/dist/favesalon-embed/buy-giftcard-form.entry.js +91 -64
- package/dist/favesalon-embed/buy-giftcard-verification.entry.js +3801 -17
- package/dist/favesalon-embed/change-password-form.entry.js +1 -1
- package/dist/favesalon-embed/chat-box.entry.js +1 -1
- package/dist/favesalon-embed/chat-button.entry.js +1 -1
- package/dist/favesalon-embed/chat-form.entry.js +1 -1
- package/dist/favesalon-embed/chat-messages.entry.js +1 -1
- package/dist/favesalon-embed/chat-rooms.entry.js +2 -2
- package/dist/favesalon-embed/favesalon-embed.css +20 -0
- package/dist/favesalon-embed/favesalon-embed.esm.js +1 -1
- package/dist/favesalon-embed/login-form.entry.js +1 -1
- package/dist/favesalon-embed/register-form.entry.js +1 -1
- package/dist/favesalon-embed/reset-password-form.entry.js +1 -1
- package/dist/favesalon-embed/salon-info.entry.js +1 -1
- package/dist/favesalon-embed/salon-latest-reviews.entry.js +2 -2
- package/dist/favesalon-embed/salon-latest-styles.entry.js +1 -1
- package/dist/favesalon-embed/salon-locations.entry.js +2 -2
- package/dist/favesalon-embed/salon-lookbook.entry.js +1 -1
- package/dist/favesalon-embed/salon-reviews.entry.js +1 -1
- package/dist/favesalon-embed/salon-schedules.entry.js +1 -1
- package/dist/favesalon-embed/salon-services.entry.js +1 -1
- package/dist/favesalon-embed/salon-stylists.entry.js +1 -1
- package/dist/favesalon-embed/{services-45c0e274.js → services-09264f42.js} +133 -123
- package/dist/favesalon-embed/services-1406013d.js +24132 -0
- package/dist/favesalon-embed/{services-935ba09f.js → services-82948efc.js} +135 -130
- package/dist/favesalon-embed/{services-baa3f112.js → services-c2c81c88.js} +9 -1
- package/dist/favesalon-embed/{services-3dd9f820.js → services-ef32efdc.js} +151 -123
- package/dist/favesalon-embed/style-detail.entry.js +1 -1
- package/dist/favesalon-embed/utils-00e4ed17.js +33 -0
- package/dist/favesalon-embed/utils-359c37f7.js +33 -0
- package/dist/favesalon-embed/utils-daaa9ecc.js +34 -0
- package/dist/favesalon-embed/utils-e6e3f132.js +33 -0
- package/dist/favesalon-embed/wizard-existing-user.entry.js +10 -10
- package/dist/favesalon-embed/wizard-new-user.entry.js +10 -10
- package/dist/types/components/buy-giftcard-form/buy-giftcard-form.d.ts +2 -1
- package/dist/types/components/buy-giftcard-verification/buy-giftcard-verification.d.ts +2 -0
- package/dist/types/services/services.d.ts +3 -3
- package/package.json +2 -1
- package/dist/favesalon-embed/services-65861516.js +0 -24095
|
@@ -6,36 +6,31 @@ var dayjs_min = createCommonjsModule(function (module, exports) {
|
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Checks if `value` is
|
|
10
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
11
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
9
|
+
* Checks if `value` is classified as an `Array` object.
|
|
12
10
|
*
|
|
13
11
|
* @static
|
|
14
12
|
* @memberOf _
|
|
15
13
|
* @since 0.1.0
|
|
16
14
|
* @category Lang
|
|
17
15
|
* @param {*} value The value to check.
|
|
18
|
-
* @returns {boolean} Returns `true` if `value` is an
|
|
16
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
19
17
|
* @example
|
|
20
18
|
*
|
|
21
|
-
* _.
|
|
19
|
+
* _.isArray([1, 2, 3]);
|
|
22
20
|
* // => true
|
|
23
21
|
*
|
|
24
|
-
* _.
|
|
25
|
-
* // =>
|
|
22
|
+
* _.isArray(document.body.children);
|
|
23
|
+
* // => false
|
|
26
24
|
*
|
|
27
|
-
* _.
|
|
28
|
-
* // =>
|
|
25
|
+
* _.isArray('abc');
|
|
26
|
+
* // => false
|
|
29
27
|
*
|
|
30
|
-
* _.
|
|
28
|
+
* _.isArray(_.noop);
|
|
31
29
|
* // => false
|
|
32
30
|
*/
|
|
33
|
-
|
|
34
|
-
var type = typeof value;
|
|
35
|
-
return value != null && (type == 'object' || type == 'function');
|
|
36
|
-
}
|
|
31
|
+
var isArray$1 = Array.isArray;
|
|
37
32
|
|
|
38
|
-
var
|
|
33
|
+
var isArray_1 = isArray$1;
|
|
39
34
|
|
|
40
35
|
/** Detect free variable `global` from Node.js. */
|
|
41
36
|
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
@@ -205,113 +200,6 @@ function isSymbol(value) {
|
|
|
205
200
|
|
|
206
201
|
var isSymbol_1 = isSymbol;
|
|
207
202
|
|
|
208
|
-
const timeFormat = 'HH:mm:ss';
|
|
209
|
-
const timeFormatAmPm = 'hh:mm A';
|
|
210
|
-
const dateName = 'dddd';
|
|
211
|
-
const dateFormat = 'YYYY-MM-DD';
|
|
212
|
-
const dateTimeFormat = 'YYYY-MM-DD HH:mm:ss';
|
|
213
|
-
const dateTimeFormatAmPm = 'YYYY-MM-DD hh:mm A';
|
|
214
|
-
const shortDateFormat = 'ddd, MMM DD';
|
|
215
|
-
const shortDateYearFormat = 'ddd, MMM DD YYYY';
|
|
216
|
-
const apiV1Prefix = 'api';
|
|
217
|
-
const apiV2Prefix$1 = 'api-ver2';
|
|
218
|
-
const defaultImage = 'https://res.cloudinary.com/reckon-mini-sites/image/upload/v1636477599/FaveSalon%20Social%20Website/default/default--picture_w3jvfh.png';
|
|
219
|
-
|
|
220
|
-
var BusinessHourStatus;
|
|
221
|
-
(function (BusinessHourStatus) {
|
|
222
|
-
BusinessHourStatus[BusinessHourStatus["Open"] = 0] = "Open";
|
|
223
|
-
BusinessHourStatus[BusinessHourStatus["Close"] = 1] = "Close";
|
|
224
|
-
BusinessHourStatus[BusinessHourStatus["ByAppointment"] = 2] = "ByAppointment";
|
|
225
|
-
})(BusinessHourStatus || (BusinessHourStatus = {}));
|
|
226
|
-
function createSalon(blob) {
|
|
227
|
-
const geoLocations = blob.salon_geolocation || [];
|
|
228
|
-
let salonImages = [];
|
|
229
|
-
if (blob.salon_miniwebsite) {
|
|
230
|
-
const activeSite = Array.isArray(blob.salon_miniwebsite) ? blob.salon_miniwebsite[0] : (blob.salon_miniwebsite || {});
|
|
231
|
-
salonImages = [
|
|
232
|
-
activeSite.full_small_slider_img1,
|
|
233
|
-
activeSite.full_small_slider_img2,
|
|
234
|
-
activeSite.full_small_slider_img3,
|
|
235
|
-
].filter(image => !!image);
|
|
236
|
-
}
|
|
237
|
-
return {
|
|
238
|
-
id: blob.id,
|
|
239
|
-
about: blob.about,
|
|
240
|
-
email: blob.email,
|
|
241
|
-
ownerName: blob.owner_name,
|
|
242
|
-
fullProfileImage: blob.full_profile_image,
|
|
243
|
-
fullCoverImage: blob.full_cover_image,
|
|
244
|
-
subdomain: blob.subdomain,
|
|
245
|
-
website: blob.website,
|
|
246
|
-
businessName: blob.business_name,
|
|
247
|
-
businessPhone: blob.business_phone,
|
|
248
|
-
businessAddress: blob.business_address,
|
|
249
|
-
businessLocationLat: geoLocations.length > 0 ? geoLocations[0].location_lat : null,
|
|
250
|
-
businessLocationLng: geoLocations.length > 0 ? geoLocations[0].location_lng : null,
|
|
251
|
-
city: blob.city,
|
|
252
|
-
state: blob.state,
|
|
253
|
-
zipcode: blob.zipcode ? Number(blob.zipcode) : null,
|
|
254
|
-
businessHours: (blob.business_hours || blob.salon_working_time || []).map(bh => {
|
|
255
|
-
return {
|
|
256
|
-
dayName: bh.day_name,
|
|
257
|
-
openTime: bh.open_time,
|
|
258
|
-
closeTime: bh.close_time,
|
|
259
|
-
status: bh.status,
|
|
260
|
-
};
|
|
261
|
-
}),
|
|
262
|
-
rating: Number(blob.rating_point),
|
|
263
|
-
primaryColor: blob.primary_color || Colors.Primary,
|
|
264
|
-
salonImages,
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
function getSalonImage({ salonImages, fullProfileImage }) {
|
|
268
|
-
if (salonImages && salonImages.length > 0) {
|
|
269
|
-
return salonImages[0];
|
|
270
|
-
}
|
|
271
|
-
if (fullProfileImage) {
|
|
272
|
-
return fullProfileImage;
|
|
273
|
-
}
|
|
274
|
-
return defaultImage;
|
|
275
|
-
}
|
|
276
|
-
function getSalonAddress(salon) {
|
|
277
|
-
const { businessAddress, businessCity, businessState, zipcode, } = salon || {};
|
|
278
|
-
const stateFields = [businessState, zipcode].filter(field => !!field);
|
|
279
|
-
if (businessAddress) {
|
|
280
|
-
return [businessAddress, businessCity]
|
|
281
|
-
.filter(field => !!field)
|
|
282
|
-
.concat(stateFields.length > 0 ? [stateFields.join(' ')] : [])
|
|
283
|
-
.join(', ');
|
|
284
|
-
}
|
|
285
|
-
return null;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
/**
|
|
289
|
-
* Checks if `value` is classified as an `Array` object.
|
|
290
|
-
*
|
|
291
|
-
* @static
|
|
292
|
-
* @memberOf _
|
|
293
|
-
* @since 0.1.0
|
|
294
|
-
* @category Lang
|
|
295
|
-
* @param {*} value The value to check.
|
|
296
|
-
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
297
|
-
* @example
|
|
298
|
-
*
|
|
299
|
-
* _.isArray([1, 2, 3]);
|
|
300
|
-
* // => true
|
|
301
|
-
*
|
|
302
|
-
* _.isArray(document.body.children);
|
|
303
|
-
* // => false
|
|
304
|
-
*
|
|
305
|
-
* _.isArray('abc');
|
|
306
|
-
* // => false
|
|
307
|
-
*
|
|
308
|
-
* _.isArray(_.noop);
|
|
309
|
-
* // => false
|
|
310
|
-
*/
|
|
311
|
-
var isArray$1 = Array.isArray;
|
|
312
|
-
|
|
313
|
-
var isArray_1 = isArray$1;
|
|
314
|
-
|
|
315
203
|
/** Used to match property names within property paths. */
|
|
316
204
|
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
317
205
|
reIsPlainProp = /^\w*$/;
|
|
@@ -339,6 +227,38 @@ function isKey(value, object) {
|
|
|
339
227
|
|
|
340
228
|
var _isKey = isKey;
|
|
341
229
|
|
|
230
|
+
/**
|
|
231
|
+
* Checks if `value` is the
|
|
232
|
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
233
|
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
234
|
+
*
|
|
235
|
+
* @static
|
|
236
|
+
* @memberOf _
|
|
237
|
+
* @since 0.1.0
|
|
238
|
+
* @category Lang
|
|
239
|
+
* @param {*} value The value to check.
|
|
240
|
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
241
|
+
* @example
|
|
242
|
+
*
|
|
243
|
+
* _.isObject({});
|
|
244
|
+
* // => true
|
|
245
|
+
*
|
|
246
|
+
* _.isObject([1, 2, 3]);
|
|
247
|
+
* // => true
|
|
248
|
+
*
|
|
249
|
+
* _.isObject(_.noop);
|
|
250
|
+
* // => true
|
|
251
|
+
*
|
|
252
|
+
* _.isObject(null);
|
|
253
|
+
* // => false
|
|
254
|
+
*/
|
|
255
|
+
function isObject$2(value) {
|
|
256
|
+
var type = typeof value;
|
|
257
|
+
return value != null && (type == 'object' || type == 'function');
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
var isObject_1 = isObject$2;
|
|
261
|
+
|
|
342
262
|
/** `Object#toString` result references. */
|
|
343
263
|
var asyncTag = '[object AsyncFunction]',
|
|
344
264
|
funcTag$1 = '[object Function]',
|
|
@@ -1272,6 +1192,86 @@ function get$1(object, path, defaultValue) {
|
|
|
1272
1192
|
|
|
1273
1193
|
var get_1 = get$1;
|
|
1274
1194
|
|
|
1195
|
+
const timeFormat = 'HH:mm:ss';
|
|
1196
|
+
const timeFormatAmPm = 'hh:mm A';
|
|
1197
|
+
const dateName = 'dddd';
|
|
1198
|
+
const dateFormat = 'YYYY-MM-DD';
|
|
1199
|
+
const dateTimeFormat = 'YYYY-MM-DD HH:mm:ss';
|
|
1200
|
+
const dateTimeFormatAmPm = 'YYYY-MM-DD hh:mm A';
|
|
1201
|
+
const shortDateFormat = 'ddd, MMM DD';
|
|
1202
|
+
const shortDateYearFormat = 'ddd, MMM DD YYYY';
|
|
1203
|
+
const apiV1Prefix = 'api';
|
|
1204
|
+
const apiV2Prefix$1 = 'api-ver2';
|
|
1205
|
+
const defaultImage = 'https://res.cloudinary.com/reckon-mini-sites/image/upload/v1636477599/FaveSalon%20Social%20Website/default/default--picture_w3jvfh.png';
|
|
1206
|
+
|
|
1207
|
+
var BusinessHourStatus;
|
|
1208
|
+
(function (BusinessHourStatus) {
|
|
1209
|
+
BusinessHourStatus[BusinessHourStatus["Open"] = 0] = "Open";
|
|
1210
|
+
BusinessHourStatus[BusinessHourStatus["Close"] = 1] = "Close";
|
|
1211
|
+
BusinessHourStatus[BusinessHourStatus["ByAppointment"] = 2] = "ByAppointment";
|
|
1212
|
+
})(BusinessHourStatus || (BusinessHourStatus = {}));
|
|
1213
|
+
function createSalon(blob) {
|
|
1214
|
+
const geoLocations = blob.salon_geolocation || [];
|
|
1215
|
+
let salonImages = [];
|
|
1216
|
+
if (blob.salon_miniwebsite) {
|
|
1217
|
+
const activeSite = Array.isArray(blob.salon_miniwebsite) ? blob.salon_miniwebsite[0] : (blob.salon_miniwebsite || {});
|
|
1218
|
+
salonImages = [
|
|
1219
|
+
activeSite.full_small_slider_img1,
|
|
1220
|
+
activeSite.full_small_slider_img2,
|
|
1221
|
+
activeSite.full_small_slider_img3,
|
|
1222
|
+
].filter(image => !!image);
|
|
1223
|
+
}
|
|
1224
|
+
return {
|
|
1225
|
+
id: blob.id,
|
|
1226
|
+
about: blob.about,
|
|
1227
|
+
email: blob.email,
|
|
1228
|
+
ownerName: blob.owner_name,
|
|
1229
|
+
fullProfileImage: blob.full_profile_image,
|
|
1230
|
+
fullCoverImage: blob.full_cover_image,
|
|
1231
|
+
subdomain: blob.subdomain,
|
|
1232
|
+
website: blob.website,
|
|
1233
|
+
businessName: blob.business_name,
|
|
1234
|
+
businessPhone: blob.business_phone,
|
|
1235
|
+
businessAddress: blob.business_address,
|
|
1236
|
+
businessLocationLat: geoLocations.length > 0 ? geoLocations[0].location_lat : null,
|
|
1237
|
+
businessLocationLng: geoLocations.length > 0 ? geoLocations[0].location_lng : null,
|
|
1238
|
+
city: blob.city,
|
|
1239
|
+
state: blob.state,
|
|
1240
|
+
zipcode: blob.zipcode ? Number(blob.zipcode) : null,
|
|
1241
|
+
businessHours: (blob.business_hours || blob.salon_working_time || []).map(bh => {
|
|
1242
|
+
return {
|
|
1243
|
+
dayName: bh.day_name,
|
|
1244
|
+
openTime: bh.open_time,
|
|
1245
|
+
closeTime: bh.close_time,
|
|
1246
|
+
status: bh.status,
|
|
1247
|
+
};
|
|
1248
|
+
}),
|
|
1249
|
+
rating: Number(blob.rating_point),
|
|
1250
|
+
primaryColor: blob.primary_color || Colors.Primary,
|
|
1251
|
+
salonImages,
|
|
1252
|
+
};
|
|
1253
|
+
}
|
|
1254
|
+
function getSalonImage({ salonImages, fullProfileImage }) {
|
|
1255
|
+
if (salonImages && salonImages.length > 0) {
|
|
1256
|
+
return salonImages[0];
|
|
1257
|
+
}
|
|
1258
|
+
if (fullProfileImage) {
|
|
1259
|
+
return fullProfileImage;
|
|
1260
|
+
}
|
|
1261
|
+
return defaultImage;
|
|
1262
|
+
}
|
|
1263
|
+
function getSalonAddress(salon) {
|
|
1264
|
+
const { businessAddress, businessCity, businessState, zipcode, } = salon || {};
|
|
1265
|
+
const stateFields = [businessState, zipcode].filter(field => !!field);
|
|
1266
|
+
if (businessAddress) {
|
|
1267
|
+
return [businessAddress, businessCity]
|
|
1268
|
+
.filter(field => !!field)
|
|
1269
|
+
.concat(stateFields.length > 0 ? [stateFields.join(' ')] : [])
|
|
1270
|
+
.join(', ');
|
|
1271
|
+
}
|
|
1272
|
+
return null;
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
1275
|
/**
|
|
1276
1276
|
* A specialized version of `_.forEach` for arrays without support for
|
|
1277
1277
|
* iteratee shorthands.
|
|
@@ -24067,6 +24067,10 @@ class HttpService {
|
|
|
24067
24067
|
const url = `${apiV2Prefix}/login-verify?phone_number=${phone}&type=login-by-sms${salonId ? `&salon_id=${salonId}` : ''}`;
|
|
24068
24068
|
return this.http.get(url);
|
|
24069
24069
|
}
|
|
24070
|
+
onBuyGiftCard(salonId, options) {
|
|
24071
|
+
const url = `salon/giftcard/request/buy/${salonId}`;
|
|
24072
|
+
return this.http.post(url, options);
|
|
24073
|
+
}
|
|
24070
24074
|
fetchGiftCardSettings(salonId) {
|
|
24071
24075
|
const url = `${apiV1Prefix}/salon/giftcard/setting/${salonId}`;
|
|
24072
24076
|
return this.http.get(url)
|
|
@@ -24091,15 +24095,16 @@ class HttpService {
|
|
|
24091
24095
|
}
|
|
24092
24096
|
fetchMagensaCredentials(salonId) {
|
|
24093
24097
|
return Promise.resolve(salonId ? {
|
|
24094
|
-
|
|
24095
|
-
|
|
24096
|
-
|
|
24097
|
-
|
|
24098
|
-
|
|
24098
|
+
customerCode: 'SK90173281',
|
|
24099
|
+
username: 'MAG437582692',
|
|
24100
|
+
password: `y^5OxmbSnP7Th7`,
|
|
24101
|
+
// TEC credentials
|
|
24102
|
+
processorName: 'TSYS - Production',
|
|
24103
|
+
token: `WEcyNjgxNDM5MS9NQUc1NTU2OTUxODM6WTR0REFaRiQ=`,
|
|
24099
24104
|
} : {});
|
|
24100
24105
|
}
|
|
24101
|
-
magensaProcessToken(options) {
|
|
24102
|
-
const url = `${apiV2Prefix}/magensa/process-token`;
|
|
24106
|
+
magensaProcessToken(salonId, options) {
|
|
24107
|
+
const url = `${apiV2Prefix}/magensa/${salonId}/process-token`;
|
|
24103
24108
|
return this.http.post(url, options)
|
|
24104
24109
|
.then(response => {
|
|
24105
24110
|
return Promise.resolve((response.data || [])[0] || {});
|
|
@@ -24115,4 +24120,4 @@ class HttpService {
|
|
|
24115
24120
|
}
|
|
24116
24121
|
const HttpService$1 = () => new HttpService();
|
|
24117
24122
|
|
|
24118
|
-
export { BusinessHourStatus as B, HttpService$1 as H, _root as _, isObject_1 as a,
|
|
24123
|
+
export { BusinessHourStatus as B, HttpService$1 as H, _root as _, isObject_1 as a, dateFormat as b, getSalonImage as c, dayjs_min as d, getSalonAddress as e, shortDateYearFormat as f, get_1 as g, sortBy_1 as h, isSymbol_1 as i, isVideoMedia as j, shortDateFormat as s, timeFormatAmPm as t };
|
|
@@ -24078,7 +24078,6 @@ class HttpService {
|
|
|
24078
24078
|
const blob = get_1(response, 'data.data', {});
|
|
24079
24079
|
return {
|
|
24080
24080
|
...createGiftCardSettings(blob),
|
|
24081
|
-
acceptPaymentOnline: false,
|
|
24082
24081
|
isMagensaPayment: salonId === 49989,
|
|
24083
24082
|
};
|
|
24084
24083
|
})
|
|
@@ -24095,6 +24094,15 @@ class HttpService {
|
|
|
24095
24094
|
.catch(() => ({}));
|
|
24096
24095
|
}
|
|
24097
24096
|
fetchMagensaCredentials(salonId) {
|
|
24097
|
+
if (2 > 1) {
|
|
24098
|
+
return Promise.resolve(salonId ? {
|
|
24099
|
+
customerCode: 'SK90173281',
|
|
24100
|
+
username: 'MAG437582692',
|
|
24101
|
+
password: `y^5OxmbSnP7Th7`,
|
|
24102
|
+
processorName: 'TSYS - Production',
|
|
24103
|
+
token: `WEcyNjgxNDM5MS9NQUc1NTU2OTUxODM6WTR0REFaRiQ=`,
|
|
24104
|
+
} : {});
|
|
24105
|
+
}
|
|
24098
24106
|
return Promise.resolve(salonId ? {
|
|
24099
24107
|
processorName: 'TSYS - Pilot',
|
|
24100
24108
|
customerCode: 'AI51036407',
|
|
@@ -6,36 +6,31 @@ var dayjs_min = createCommonjsModule(function (module, exports) {
|
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Checks if `value` is
|
|
10
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
11
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
9
|
+
* Checks if `value` is classified as an `Array` object.
|
|
12
10
|
*
|
|
13
11
|
* @static
|
|
14
12
|
* @memberOf _
|
|
15
13
|
* @since 0.1.0
|
|
16
14
|
* @category Lang
|
|
17
15
|
* @param {*} value The value to check.
|
|
18
|
-
* @returns {boolean} Returns `true` if `value` is an
|
|
16
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
19
17
|
* @example
|
|
20
18
|
*
|
|
21
|
-
* _.
|
|
19
|
+
* _.isArray([1, 2, 3]);
|
|
22
20
|
* // => true
|
|
23
21
|
*
|
|
24
|
-
* _.
|
|
25
|
-
* // =>
|
|
22
|
+
* _.isArray(document.body.children);
|
|
23
|
+
* // => false
|
|
26
24
|
*
|
|
27
|
-
* _.
|
|
28
|
-
* // =>
|
|
25
|
+
* _.isArray('abc');
|
|
26
|
+
* // => false
|
|
29
27
|
*
|
|
30
|
-
* _.
|
|
28
|
+
* _.isArray(_.noop);
|
|
31
29
|
* // => false
|
|
32
30
|
*/
|
|
33
|
-
|
|
34
|
-
var type = typeof value;
|
|
35
|
-
return value != null && (type == 'object' || type == 'function');
|
|
36
|
-
}
|
|
31
|
+
var isArray$1 = Array.isArray;
|
|
37
32
|
|
|
38
|
-
var
|
|
33
|
+
var isArray_1 = isArray$1;
|
|
39
34
|
|
|
40
35
|
/** Detect free variable `global` from Node.js. */
|
|
41
36
|
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
@@ -205,113 +200,6 @@ function isSymbol(value) {
|
|
|
205
200
|
|
|
206
201
|
var isSymbol_1 = isSymbol;
|
|
207
202
|
|
|
208
|
-
const timeFormat = 'HH:mm:ss';
|
|
209
|
-
const timeFormatAmPm = 'hh:mm A';
|
|
210
|
-
const dateName = 'dddd';
|
|
211
|
-
const dateFormat = 'YYYY-MM-DD';
|
|
212
|
-
const dateTimeFormat = 'YYYY-MM-DD HH:mm:ss';
|
|
213
|
-
const dateTimeFormatAmPm = 'YYYY-MM-DD hh:mm A';
|
|
214
|
-
const shortDateFormat = 'ddd, MMM DD';
|
|
215
|
-
const shortDateYearFormat = 'ddd, MMM DD YYYY';
|
|
216
|
-
const apiV1Prefix = 'api';
|
|
217
|
-
const apiV2Prefix$1 = 'api-ver2';
|
|
218
|
-
const defaultImage = 'https://res.cloudinary.com/reckon-mini-sites/image/upload/v1636477599/FaveSalon%20Social%20Website/default/default--picture_w3jvfh.png';
|
|
219
|
-
|
|
220
|
-
var BusinessHourStatus;
|
|
221
|
-
(function (BusinessHourStatus) {
|
|
222
|
-
BusinessHourStatus[BusinessHourStatus["Open"] = 0] = "Open";
|
|
223
|
-
BusinessHourStatus[BusinessHourStatus["Close"] = 1] = "Close";
|
|
224
|
-
BusinessHourStatus[BusinessHourStatus["ByAppointment"] = 2] = "ByAppointment";
|
|
225
|
-
})(BusinessHourStatus || (BusinessHourStatus = {}));
|
|
226
|
-
function createSalon(blob) {
|
|
227
|
-
const geoLocations = blob.salon_geolocation || [];
|
|
228
|
-
let salonImages = [];
|
|
229
|
-
if (blob.salon_miniwebsite) {
|
|
230
|
-
const activeSite = Array.isArray(blob.salon_miniwebsite) ? blob.salon_miniwebsite[0] : (blob.salon_miniwebsite || {});
|
|
231
|
-
salonImages = [
|
|
232
|
-
activeSite.full_small_slider_img1,
|
|
233
|
-
activeSite.full_small_slider_img2,
|
|
234
|
-
activeSite.full_small_slider_img3,
|
|
235
|
-
].filter(image => !!image);
|
|
236
|
-
}
|
|
237
|
-
return {
|
|
238
|
-
id: blob.id,
|
|
239
|
-
about: blob.about,
|
|
240
|
-
email: blob.email,
|
|
241
|
-
ownerName: blob.owner_name,
|
|
242
|
-
fullProfileImage: blob.full_profile_image,
|
|
243
|
-
fullCoverImage: blob.full_cover_image,
|
|
244
|
-
subdomain: blob.subdomain,
|
|
245
|
-
website: blob.website,
|
|
246
|
-
businessName: blob.business_name,
|
|
247
|
-
businessPhone: blob.business_phone,
|
|
248
|
-
businessAddress: blob.business_address,
|
|
249
|
-
businessLocationLat: geoLocations.length > 0 ? geoLocations[0].location_lat : null,
|
|
250
|
-
businessLocationLng: geoLocations.length > 0 ? geoLocations[0].location_lng : null,
|
|
251
|
-
city: blob.city,
|
|
252
|
-
state: blob.state,
|
|
253
|
-
zipcode: blob.zipcode ? Number(blob.zipcode) : null,
|
|
254
|
-
businessHours: (blob.business_hours || blob.salon_working_time || []).map(bh => {
|
|
255
|
-
return {
|
|
256
|
-
dayName: bh.day_name,
|
|
257
|
-
openTime: bh.open_time,
|
|
258
|
-
closeTime: bh.close_time,
|
|
259
|
-
status: bh.status,
|
|
260
|
-
};
|
|
261
|
-
}),
|
|
262
|
-
rating: Number(blob.rating_point),
|
|
263
|
-
primaryColor: blob.primary_color || Colors.Primary,
|
|
264
|
-
salonImages,
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
function getSalonImage({ salonImages, fullProfileImage }) {
|
|
268
|
-
if (salonImages && salonImages.length > 0) {
|
|
269
|
-
return salonImages[0];
|
|
270
|
-
}
|
|
271
|
-
if (fullProfileImage) {
|
|
272
|
-
return fullProfileImage;
|
|
273
|
-
}
|
|
274
|
-
return defaultImage;
|
|
275
|
-
}
|
|
276
|
-
function getSalonAddress(salon) {
|
|
277
|
-
const { businessAddress, businessCity, businessState, zipcode, } = salon || {};
|
|
278
|
-
const stateFields = [businessState, zipcode].filter(field => !!field);
|
|
279
|
-
if (businessAddress) {
|
|
280
|
-
return [businessAddress, businessCity]
|
|
281
|
-
.filter(field => !!field)
|
|
282
|
-
.concat(stateFields.length > 0 ? [stateFields.join(' ')] : [])
|
|
283
|
-
.join(', ');
|
|
284
|
-
}
|
|
285
|
-
return null;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
/**
|
|
289
|
-
* Checks if `value` is classified as an `Array` object.
|
|
290
|
-
*
|
|
291
|
-
* @static
|
|
292
|
-
* @memberOf _
|
|
293
|
-
* @since 0.1.0
|
|
294
|
-
* @category Lang
|
|
295
|
-
* @param {*} value The value to check.
|
|
296
|
-
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
297
|
-
* @example
|
|
298
|
-
*
|
|
299
|
-
* _.isArray([1, 2, 3]);
|
|
300
|
-
* // => true
|
|
301
|
-
*
|
|
302
|
-
* _.isArray(document.body.children);
|
|
303
|
-
* // => false
|
|
304
|
-
*
|
|
305
|
-
* _.isArray('abc');
|
|
306
|
-
* // => false
|
|
307
|
-
*
|
|
308
|
-
* _.isArray(_.noop);
|
|
309
|
-
* // => false
|
|
310
|
-
*/
|
|
311
|
-
var isArray$1 = Array.isArray;
|
|
312
|
-
|
|
313
|
-
var isArray_1 = isArray$1;
|
|
314
|
-
|
|
315
203
|
/** Used to match property names within property paths. */
|
|
316
204
|
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
317
205
|
reIsPlainProp = /^\w*$/;
|
|
@@ -339,6 +227,38 @@ function isKey(value, object) {
|
|
|
339
227
|
|
|
340
228
|
var _isKey = isKey;
|
|
341
229
|
|
|
230
|
+
/**
|
|
231
|
+
* Checks if `value` is the
|
|
232
|
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
233
|
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
234
|
+
*
|
|
235
|
+
* @static
|
|
236
|
+
* @memberOf _
|
|
237
|
+
* @since 0.1.0
|
|
238
|
+
* @category Lang
|
|
239
|
+
* @param {*} value The value to check.
|
|
240
|
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
241
|
+
* @example
|
|
242
|
+
*
|
|
243
|
+
* _.isObject({});
|
|
244
|
+
* // => true
|
|
245
|
+
*
|
|
246
|
+
* _.isObject([1, 2, 3]);
|
|
247
|
+
* // => true
|
|
248
|
+
*
|
|
249
|
+
* _.isObject(_.noop);
|
|
250
|
+
* // => true
|
|
251
|
+
*
|
|
252
|
+
* _.isObject(null);
|
|
253
|
+
* // => false
|
|
254
|
+
*/
|
|
255
|
+
function isObject$2(value) {
|
|
256
|
+
var type = typeof value;
|
|
257
|
+
return value != null && (type == 'object' || type == 'function');
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
var isObject_1 = isObject$2;
|
|
261
|
+
|
|
342
262
|
/** `Object#toString` result references. */
|
|
343
263
|
var asyncTag = '[object AsyncFunction]',
|
|
344
264
|
funcTag$1 = '[object Function]',
|
|
@@ -1272,6 +1192,86 @@ function get$1(object, path, defaultValue) {
|
|
|
1272
1192
|
|
|
1273
1193
|
var get_1 = get$1;
|
|
1274
1194
|
|
|
1195
|
+
const timeFormat = 'HH:mm:ss';
|
|
1196
|
+
const timeFormatAmPm = 'hh:mm A';
|
|
1197
|
+
const dateName = 'dddd';
|
|
1198
|
+
const dateFormat = 'YYYY-MM-DD';
|
|
1199
|
+
const dateTimeFormat = 'YYYY-MM-DD HH:mm:ss';
|
|
1200
|
+
const dateTimeFormatAmPm = 'YYYY-MM-DD hh:mm A';
|
|
1201
|
+
const shortDateFormat = 'ddd, MMM DD';
|
|
1202
|
+
const shortDateYearFormat = 'ddd, MMM DD YYYY';
|
|
1203
|
+
const apiV1Prefix = 'api';
|
|
1204
|
+
const apiV2Prefix$1 = 'api-ver2';
|
|
1205
|
+
const defaultImage = 'https://res.cloudinary.com/reckon-mini-sites/image/upload/v1636477599/FaveSalon%20Social%20Website/default/default--picture_w3jvfh.png';
|
|
1206
|
+
|
|
1207
|
+
var BusinessHourStatus;
|
|
1208
|
+
(function (BusinessHourStatus) {
|
|
1209
|
+
BusinessHourStatus[BusinessHourStatus["Open"] = 0] = "Open";
|
|
1210
|
+
BusinessHourStatus[BusinessHourStatus["Close"] = 1] = "Close";
|
|
1211
|
+
BusinessHourStatus[BusinessHourStatus["ByAppointment"] = 2] = "ByAppointment";
|
|
1212
|
+
})(BusinessHourStatus || (BusinessHourStatus = {}));
|
|
1213
|
+
function createSalon(blob) {
|
|
1214
|
+
const geoLocations = blob.salon_geolocation || [];
|
|
1215
|
+
let salonImages = [];
|
|
1216
|
+
if (blob.salon_miniwebsite) {
|
|
1217
|
+
const activeSite = Array.isArray(blob.salon_miniwebsite) ? blob.salon_miniwebsite[0] : (blob.salon_miniwebsite || {});
|
|
1218
|
+
salonImages = [
|
|
1219
|
+
activeSite.full_small_slider_img1,
|
|
1220
|
+
activeSite.full_small_slider_img2,
|
|
1221
|
+
activeSite.full_small_slider_img3,
|
|
1222
|
+
].filter(image => !!image);
|
|
1223
|
+
}
|
|
1224
|
+
return {
|
|
1225
|
+
id: blob.id,
|
|
1226
|
+
about: blob.about,
|
|
1227
|
+
email: blob.email,
|
|
1228
|
+
ownerName: blob.owner_name,
|
|
1229
|
+
fullProfileImage: blob.full_profile_image,
|
|
1230
|
+
fullCoverImage: blob.full_cover_image,
|
|
1231
|
+
subdomain: blob.subdomain,
|
|
1232
|
+
website: blob.website,
|
|
1233
|
+
businessName: blob.business_name,
|
|
1234
|
+
businessPhone: blob.business_phone,
|
|
1235
|
+
businessAddress: blob.business_address,
|
|
1236
|
+
businessLocationLat: geoLocations.length > 0 ? geoLocations[0].location_lat : null,
|
|
1237
|
+
businessLocationLng: geoLocations.length > 0 ? geoLocations[0].location_lng : null,
|
|
1238
|
+
city: blob.city,
|
|
1239
|
+
state: blob.state,
|
|
1240
|
+
zipcode: blob.zipcode ? Number(blob.zipcode) : null,
|
|
1241
|
+
businessHours: (blob.business_hours || blob.salon_working_time || []).map(bh => {
|
|
1242
|
+
return {
|
|
1243
|
+
dayName: bh.day_name,
|
|
1244
|
+
openTime: bh.open_time,
|
|
1245
|
+
closeTime: bh.close_time,
|
|
1246
|
+
status: bh.status,
|
|
1247
|
+
};
|
|
1248
|
+
}),
|
|
1249
|
+
rating: Number(blob.rating_point),
|
|
1250
|
+
primaryColor: blob.primary_color || Colors.Primary,
|
|
1251
|
+
salonImages,
|
|
1252
|
+
};
|
|
1253
|
+
}
|
|
1254
|
+
function getSalonImage({ salonImages, fullProfileImage }) {
|
|
1255
|
+
if (salonImages && salonImages.length > 0) {
|
|
1256
|
+
return salonImages[0];
|
|
1257
|
+
}
|
|
1258
|
+
if (fullProfileImage) {
|
|
1259
|
+
return fullProfileImage;
|
|
1260
|
+
}
|
|
1261
|
+
return defaultImage;
|
|
1262
|
+
}
|
|
1263
|
+
function getSalonAddress(salon) {
|
|
1264
|
+
const { businessAddress, businessCity, businessState, zipcode, } = salon || {};
|
|
1265
|
+
const stateFields = [businessState, zipcode].filter(field => !!field);
|
|
1266
|
+
if (businessAddress) {
|
|
1267
|
+
return [businessAddress, businessCity]
|
|
1268
|
+
.filter(field => !!field)
|
|
1269
|
+
.concat(stateFields.length > 0 ? [stateFields.join(' ')] : [])
|
|
1270
|
+
.join(', ');
|
|
1271
|
+
}
|
|
1272
|
+
return null;
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
1275
|
/**
|
|
1276
1276
|
* A specialized version of `_.forEach` for arrays without support for
|
|
1277
1277
|
* iteratee shorthands.
|
|
@@ -24067,6 +24067,10 @@ class HttpService {
|
|
|
24067
24067
|
const url = `${apiV2Prefix}/login-verify?phone_number=${phone}&type=login-by-sms${salonId ? `&salon_id=${salonId}` : ''}`;
|
|
24068
24068
|
return this.http.get(url);
|
|
24069
24069
|
}
|
|
24070
|
+
onBuyGiftCard(salonId, options) {
|
|
24071
|
+
const url = `salon/giftcard/request/buy/${salonId}`;
|
|
24072
|
+
return this.http.post(url, options);
|
|
24073
|
+
}
|
|
24070
24074
|
fetchGiftCardSettings(salonId) {
|
|
24071
24075
|
const url = `${apiV1Prefix}/salon/giftcard/setting/${salonId}`;
|
|
24072
24076
|
return this.http.get(url)
|
|
@@ -24090,6 +24094,16 @@ class HttpService {
|
|
|
24090
24094
|
.catch(() => ({}));
|
|
24091
24095
|
}
|
|
24092
24096
|
fetchMagensaCredentials(salonId) {
|
|
24097
|
+
if (2 > 1) {
|
|
24098
|
+
return Promise.resolve(salonId ? {
|
|
24099
|
+
customerCode: 'SK90173281',
|
|
24100
|
+
username: 'MAG437582692',
|
|
24101
|
+
password: `y^5OxmbSnP7Th7`,
|
|
24102
|
+
// TEC credentials
|
|
24103
|
+
processorName: 'TSYS - Production',
|
|
24104
|
+
token: `WEcyNjgxNDM5MS9NQUc1NTU2OTUxODM6WTR0REFaRiQ=`,
|
|
24105
|
+
} : {});
|
|
24106
|
+
}
|
|
24093
24107
|
return Promise.resolve(salonId ? {
|
|
24094
24108
|
processorName: 'TSYS - Pilot',
|
|
24095
24109
|
customerCode: 'AI51036407',
|
|
@@ -24098,7 +24112,21 @@ class HttpService {
|
|
|
24098
24112
|
token: `Tk40OTQ0MzU2Ni9NQUcxMjc3MjQ2NjI6NVBMfisjSDUhcjF6SF4=`,
|
|
24099
24113
|
} : {});
|
|
24100
24114
|
}
|
|
24115
|
+
magensaProcessToken(salonId, options) {
|
|
24116
|
+
const url = `${apiV2Prefix}/magensa/${salonId}/process-token`;
|
|
24117
|
+
return this.http.post(url, options)
|
|
24118
|
+
.then(response => {
|
|
24119
|
+
return Promise.resolve((response.data || [])[0] || {});
|
|
24120
|
+
});
|
|
24121
|
+
}
|
|
24122
|
+
magensaConfirmTransaction(options) {
|
|
24123
|
+
const url = `${apiV2Prefix}/magensa/process-referenceid`;
|
|
24124
|
+
return this.http.post(url, options)
|
|
24125
|
+
.then(response => {
|
|
24126
|
+
return Promise.resolve((response.data || [])[0] || {});
|
|
24127
|
+
});
|
|
24128
|
+
}
|
|
24101
24129
|
}
|
|
24102
24130
|
const HttpService$1 = () => new HttpService();
|
|
24103
24131
|
|
|
24104
|
-
export { BusinessHourStatus as B, HttpService$1 as H, _root as _, isObject_1 as a,
|
|
24132
|
+
export { BusinessHourStatus as B, HttpService$1 as H, _root as _, isObject_1 as a, dateFormat as b, getSalonImage as c, dayjs_min as d, getSalonAddress as e, shortDateYearFormat as f, get_1 as g, sortBy_1 as h, isSymbol_1 as i, isVideoMedia as j, shortDateFormat as s, timeFormatAmPm as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h } from './index-888e99e3.js';
|
|
2
|
-
import { d as dayjs_min, H as HttpService, j as isVideoMedia, c as getSalonImage, f as shortDateYearFormat } from './services-
|
|
2
|
+
import { d as dayjs_min, H as HttpService, j as isVideoMedia, c as getSalonImage, f as shortDateYearFormat } from './services-82948efc.js';
|
|
3
3
|
import { r as relativeTime } from './relativeTime-15477f02.js';
|
|
4
4
|
import { C as Colors } from './colors-ea36347a.js';
|
|
5
5
|
import './_commonjsHelpers-9bc404fc.js';
|