@cuemath/web-utils 1.0.29-beta.9 → 1.0.29
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/cjs/ab-experiment/utils/experiments.js +11 -3
- package/dist/cjs/ab-experiment/utils/experiments.js.map +1 -1
- package/dist/cjs/analytics/index.d.ts +0 -1
- package/dist/cjs/analytics/index.js +0 -1
- package/dist/cjs/analytics/index.js.map +1 -1
- package/dist/cjs/constants/index.d.ts +0 -1
- package/dist/cjs/constants/index.js +0 -1
- package/dist/cjs/constants/index.js.map +1 -1
- package/dist/cjs/growth-source/index.d.ts +3 -8
- package/dist/cjs/growth-source/index.js +104 -47
- package/dist/cjs/growth-source/index.js.map +1 -1
- package/dist/cjs/growth-source/types.d.ts +2 -14
- package/dist/cjs/website-category/constants/index.d.ts +1 -1
- package/dist/cjs/website-category/constants/index.js +28 -40
- package/dist/cjs/website-category/constants/index.js.map +1 -1
- package/dist/cjs/website-category/index.d.ts +1 -2
- package/dist/cjs/website-category/index.js +2 -4
- package/dist/cjs/website-category/index.js.map +1 -1
- package/dist/cjs/website-category/utils/index.d.ts +1 -1
- package/dist/cjs/website-category/utils/index.js +15 -6
- package/dist/cjs/website-category/utils/index.js.map +1 -1
- package/dist/esm/ab-experiment/utils/experiments.js +12 -4
- package/dist/esm/ab-experiment/utils/experiments.js.map +1 -1
- package/dist/esm/analytics/index.d.ts +0 -1
- package/dist/esm/analytics/index.js +0 -1
- package/dist/esm/analytics/index.js.map +1 -1
- package/dist/esm/constants/index.d.ts +0 -1
- package/dist/esm/constants/index.js +0 -1
- package/dist/esm/constants/index.js.map +1 -1
- package/dist/esm/growth-source/index.d.ts +3 -8
- package/dist/esm/growth-source/index.js +94 -45
- package/dist/esm/growth-source/index.js.map +1 -1
- package/dist/esm/growth-source/types.d.ts +2 -14
- package/dist/esm/website-category/constants/index.d.ts +1 -1
- package/dist/esm/website-category/constants/index.js +28 -40
- package/dist/esm/website-category/constants/index.js.map +1 -1
- package/dist/esm/website-category/index.d.ts +1 -2
- package/dist/esm/website-category/index.js +1 -2
- package/dist/esm/website-category/index.js.map +1 -1
- package/dist/esm/website-category/utils/index.d.ts +1 -1
- package/dist/esm/website-category/utils/index.js +13 -4
- package/dist/esm/website-category/utils/index.js.map +1 -1
- package/package.json +2 -5
- package/dist/cjs/analytics/data-props.d.ts +0 -3
- package/dist/cjs/analytics/data-props.js +0 -20
- package/dist/cjs/analytics/data-props.js.map +0 -1
- package/dist/cjs/constants/instrumentation/index.d.ts +0 -5
- package/dist/cjs/constants/instrumentation/index.js +0 -9
- package/dist/cjs/constants/instrumentation/index.js.map +0 -1
- package/dist/cjs/data/utm-source.json +0 -52
- package/dist/cjs/growth-source/scripts/source-channel.d.ts +0 -1
- package/dist/cjs/growth-source/scripts/source-channel.js +0 -44
- package/dist/cjs/growth-source/scripts/source-channel.js.map +0 -1
- package/dist/cjs/website-category/constants/instrumentation.d.ts +0 -138
- package/dist/cjs/website-category/constants/instrumentation.js +0 -142
- package/dist/cjs/website-category/constants/instrumentation.js.map +0 -1
- package/dist/cjs/website-category/utils/instrumentation.d.ts +0 -2
- package/dist/cjs/website-category/utils/instrumentation.js +0 -61
- package/dist/cjs/website-category/utils/instrumentation.js.map +0 -1
- package/dist/esm/analytics/data-props.d.ts +0 -3
- package/dist/esm/analytics/data-props.js +0 -17
- package/dist/esm/analytics/data-props.js.map +0 -1
- package/dist/esm/constants/instrumentation/index.d.ts +0 -5
- package/dist/esm/constants/instrumentation/index.js +0 -6
- package/dist/esm/constants/instrumentation/index.js.map +0 -1
- package/dist/esm/data/utm-source.json +0 -52
- package/dist/esm/growth-source/scripts/source-channel.d.ts +0 -1
- package/dist/esm/growth-source/scripts/source-channel.js +0 -44
- package/dist/esm/growth-source/scripts/source-channel.js.map +0 -1
- package/dist/esm/website-category/constants/instrumentation.d.ts +0 -138
- package/dist/esm/website-category/constants/instrumentation.js +0 -139
- package/dist/esm/website-category/constants/instrumentation.js.map +0 -1
- package/dist/esm/website-category/utils/instrumentation.d.ts +0 -2
- package/dist/esm/website-category/utils/instrumentation.js +0 -56
- package/dist/esm/website-category/utils/instrumentation.js.map +0 -1
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getDataProps = void 0;
|
|
4
|
-
const analytics_1 = require("../constants/analytics");
|
|
5
|
-
const getDataProps = (entryPoint = '', entrySection = '', topic = '', isCustomTracking) => {
|
|
6
|
-
const dataProps = {
|
|
7
|
-
[analytics_1.DATA_VARIABLES.ENTRY_POINT]: entryPoint,
|
|
8
|
-
[analytics_1.DATA_VARIABLES.ENTRY_SECTION]: entrySection,
|
|
9
|
-
[analytics_1.DATA_VARIABLES.TOPIC]: topic,
|
|
10
|
-
[analytics_1.DATA_VARIABLES.CUSTOM_TRACKING]: isCustomTracking,
|
|
11
|
-
};
|
|
12
|
-
Object.keys(dataProps)?.forEach(key => {
|
|
13
|
-
if (!dataProps[key]) {
|
|
14
|
-
delete dataProps[key];
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
return dataProps;
|
|
18
|
-
};
|
|
19
|
-
exports.getDataProps = getDataProps;
|
|
20
|
-
//# sourceMappingURL=data-props.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data-props.js","sourceRoot":"","sources":["../../../src/analytics/data-props.ts"],"names":[],"mappings":";;;AAAA,sDAAwD;AAEjD,MAAM,YAAY,GAAG,CAC1B,UAAU,GAAG,EAAE,EACf,YAAY,GAAG,EAAE,EACjB,KAAK,GAAG,EAAE,EACV,gBAAyB,EACY,EAAE;IACvC,MAAM,SAAS,GAAG;QAChB,CAAC,0BAAc,CAAC,WAAW,CAAC,EAAE,UAAU;QACxC,CAAC,0BAAc,CAAC,aAAa,CAAC,EAAE,YAAY;QAC5C,CAAC,0BAAc,CAAC,KAAK,CAAC,EAAE,KAAK;QAC7B,CAAC,0BAAc,CAAC,eAAe,CAAC,EAAE,gBAAgB;KACnD,CAAC;IAEF,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,EAAE;QACpC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE;YACnB,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;SACvB;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AApBW,QAAA,YAAY,gBAoBvB"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.REVENUE_CHANNEL = exports.REFERRAL_PAGE_PATH = void 0;
|
|
4
|
-
exports.REFERRAL_PAGE_PATH = ['gift/invite/', 'gift/referral/'];
|
|
5
|
-
exports.REVENUE_CHANNEL = {
|
|
6
|
-
REFERRAL: 'referral',
|
|
7
|
-
ORGANIC: 'organic',
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/constants/instrumentation/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;AAExD,QAAA,eAAe,GAAG;IAC7B,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;CACnB,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"Affiliate": "paid_affiliate_others",
|
|
3
|
-
"D_g": "paid_ad_google",
|
|
4
|
-
"d_fb_m": "paid_ad_fb",
|
|
5
|
-
"d_sem_m": "paid_ad_google",
|
|
6
|
-
"D_s": "paid_ad_google",
|
|
7
|
-
"dr_fb_m": "paid_ad_fb",
|
|
8
|
-
"system": "referral_others",
|
|
9
|
-
"dc_fb_m": "paid_ad_fb",
|
|
10
|
-
"dr_sem_m": "paid_ad_google",
|
|
11
|
-
"dc_sem_m": "paid_ad_google",
|
|
12
|
-
"CUEMATHAPP": "organic",
|
|
13
|
-
"CUETEACHERAPP": "organic",
|
|
14
|
-
"IM": "paid_affiliate_bp_influencer",
|
|
15
|
-
"la": "referral_parent",
|
|
16
|
-
"social": "organic_social",
|
|
17
|
-
"website": "Organic",
|
|
18
|
-
"google": "paid_ad_biddables",
|
|
19
|
-
"CUEMATH": "organic",
|
|
20
|
-
"SocialMedia": "Organic_social",
|
|
21
|
-
"d_apex": "paid_affiliate_others",
|
|
22
|
-
"D-Social": "Organic_social",
|
|
23
|
-
"ORM": "paid_affiliate_bp_influencer",
|
|
24
|
-
"d_disc_m": "paid_ad_google",
|
|
25
|
-
"Facebook": "organic_facebook",
|
|
26
|
-
"gbl": "organic_gbl",
|
|
27
|
-
"youtube": "organic_social",
|
|
28
|
-
"offline_community": "offline_events",
|
|
29
|
-
"cj": "paid_affiliate_others",
|
|
30
|
-
"D_email": "organic_email",
|
|
31
|
-
"dc_disc_m": "paid_ad_google",
|
|
32
|
-
"affiliate-brainly": "paid_affiliate_others",
|
|
33
|
-
"Offline_Event_UAE_Local": "offline_events",
|
|
34
|
-
"CE-Messenger": "organic_Messenger",
|
|
35
|
-
"CE-Inbound": "organic_inbound",
|
|
36
|
-
"CE-Instagram": "organic_insta",
|
|
37
|
-
"referral": "referral_others",
|
|
38
|
-
"d_momentus": "paid_affiliate_others",
|
|
39
|
-
"promotion_mushrif_mall_QR_Code": "offline_events",
|
|
40
|
-
"affiliate-bark": "paid_affiliate_others",
|
|
41
|
-
"PAID-EXP": "paid_ad_biddables",
|
|
42
|
-
"utm_source": "test",
|
|
43
|
-
"email": "organic_email",
|
|
44
|
-
"PAID-EXP-AUS": "paid_ad_biddables",
|
|
45
|
-
"d_opicle": "paid_affiliate_others",
|
|
46
|
-
"REFERRAL": "referral_others",
|
|
47
|
-
"Old Leads": "others",
|
|
48
|
-
"Outbound Phone call": "organic_outbound",
|
|
49
|
-
"chatbot": "organic",
|
|
50
|
-
"d_magixengage": "paid_affiliate_others",
|
|
51
|
-
"CE-Info": "organic_info"
|
|
52
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
3
|
-
const fs = require('fs');
|
|
4
|
-
const path = require('path');
|
|
5
|
-
const csv = require('papaparse');
|
|
6
|
-
const ClusterMetaInfoFileName = 'utm-source';
|
|
7
|
-
(function csvFileToJSON() {
|
|
8
|
-
const INPUT_FILE_PATH = path.resolve(__dirname, '.', `../../data/${ClusterMetaInfoFileName}.csv`);
|
|
9
|
-
const OUTPUT_FILE_PATH = path.resolve(__dirname, '.', `../../data/${ClusterMetaInfoFileName}.json`);
|
|
10
|
-
try {
|
|
11
|
-
fs.readFile(INPUT_FILE_PATH, 'utf-8', (err, data) => {
|
|
12
|
-
if (err)
|
|
13
|
-
throw err;
|
|
14
|
-
const options = {
|
|
15
|
-
header: true,
|
|
16
|
-
delimiter: ',',
|
|
17
|
-
quoteChar: '"',
|
|
18
|
-
escapeChar: '\\',
|
|
19
|
-
};
|
|
20
|
-
const jsonObj = csv.parse(data, options).data;
|
|
21
|
-
let sourceChannelData = {};
|
|
22
|
-
jsonObj.forEach(utmSourceChannelObject => {
|
|
23
|
-
const { utm_source: utmSource, source_channel: sourceChannel } = utmSourceChannelObject || {};
|
|
24
|
-
if (sourceChannelData[utmSource]) {
|
|
25
|
-
throw new Error(`Duplicate utm_source Found ${utmSource}`);
|
|
26
|
-
}
|
|
27
|
-
sourceChannelData[utmSource] = sourceChannel;
|
|
28
|
-
});
|
|
29
|
-
const jsonString = JSON.stringify(sourceChannelData, null, 2);
|
|
30
|
-
fs.writeFile(OUTPUT_FILE_PATH, jsonString, e => {
|
|
31
|
-
if (e)
|
|
32
|
-
throw e;
|
|
33
|
-
// eslint-disable-next-line no-console
|
|
34
|
-
console.log('CSV file converted to JSON');
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
catch (err) {
|
|
39
|
-
// eslint-disable-next-line no-console
|
|
40
|
-
console.log(err);
|
|
41
|
-
process.exit(1);
|
|
42
|
-
}
|
|
43
|
-
})();
|
|
44
|
-
//# sourceMappingURL=source-channel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"source-channel.js","sourceRoot":"","sources":["../../../../src/growth-source/scripts/source-channel.js"],"names":[],"mappings":";AAAA,uDAAuD;AACvD,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAE7B,MAAM,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAEjC,MAAM,uBAAuB,GAAG,YAAY,CAAC;AAE7C,CAAC,SAAS,aAAa;IACrB,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAClC,SAAS,EACT,GAAG,EACH,cAAc,uBAAuB,MAAM,CAC5C,CAAC;IACF,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,CACnC,SAAS,EACT,GAAG,EACH,cAAc,uBAAuB,OAAO,CAC7C,CAAC;IAEF,IAAI;QACF,EAAE,CAAC,QAAQ,CAAC,eAAe,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YAClD,IAAI,GAAG;gBAAE,MAAM,GAAG,CAAC;YAEnB,MAAM,OAAO,GAAG;gBACd,MAAM,EAAE,IAAI;gBACZ,SAAS,EAAE,GAAG;gBACd,SAAS,EAAE,GAAG;gBACd,UAAU,EAAE,IAAI;aACjB,CAAC;YACF,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;YAE9C,IAAI,iBAAiB,GAAG,EAAE,CAAC;YAE3B,OAAO,CAAC,OAAO,CAAC,sBAAsB,CAAC,EAAE;gBACvC,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,aAAa,EAAE,GAC5D,sBAAsB,IAAI,EAAE,CAAC;gBAE/B,IAAI,iBAAiB,CAAC,SAAS,CAAC,EAAE;oBAChC,MAAM,IAAI,KAAK,CAAC,8BAA8B,SAAS,EAAE,CAAC,CAAC;iBAC5D;gBAED,iBAAiB,CAAC,SAAS,CAAC,GAAG,aAAa,CAAC;YAC/C,CAAC,CAAC,CAAC;YACH,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YAE9D,EAAE,CAAC,SAAS,CAAC,gBAAgB,EAAE,UAAU,EAAE,CAAC,CAAC,EAAE;gBAC7C,IAAI,CAAC;oBAAE,MAAM,CAAC,CAAC;gBACf,sCAAsC;gBACtC,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;YAC5C,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;KACJ;IAAC,OAAO,GAAG,EAAE;QACZ,sCAAsC;QACtC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACjB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;AACH,CAAC,CAAC,EAAE,CAAC"}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
export declare const seoPageNames: {
|
|
2
|
-
numbers: {
|
|
3
|
-
title: string;
|
|
4
|
-
route: string;
|
|
5
|
-
};
|
|
6
|
-
algebra: {
|
|
7
|
-
title: string;
|
|
8
|
-
route: string;
|
|
9
|
-
};
|
|
10
|
-
geometry: {
|
|
11
|
-
title: string;
|
|
12
|
-
route: string;
|
|
13
|
-
};
|
|
14
|
-
data: {
|
|
15
|
-
title: string;
|
|
16
|
-
route: string;
|
|
17
|
-
};
|
|
18
|
-
measurement: {
|
|
19
|
-
title: string;
|
|
20
|
-
route: string;
|
|
21
|
-
};
|
|
22
|
-
'commercial-math': {
|
|
23
|
-
title: string;
|
|
24
|
-
route: string;
|
|
25
|
-
};
|
|
26
|
-
trigonometry: {
|
|
27
|
-
title: string;
|
|
28
|
-
route: string;
|
|
29
|
-
};
|
|
30
|
-
calculus: {
|
|
31
|
-
title: string;
|
|
32
|
-
route: string;
|
|
33
|
-
};
|
|
34
|
-
learn: {
|
|
35
|
-
title: string;
|
|
36
|
-
route: string;
|
|
37
|
-
};
|
|
38
|
-
learning: {
|
|
39
|
-
title: string;
|
|
40
|
-
route: string;
|
|
41
|
-
};
|
|
42
|
-
'multiplication-tables': {
|
|
43
|
-
title: string;
|
|
44
|
-
route: string;
|
|
45
|
-
};
|
|
46
|
-
calculators: {
|
|
47
|
-
title: string;
|
|
48
|
-
route: string;
|
|
49
|
-
};
|
|
50
|
-
'math-formulas': {
|
|
51
|
-
title: string;
|
|
52
|
-
route: string;
|
|
53
|
-
};
|
|
54
|
-
'ncert-solutions': {
|
|
55
|
-
title: string;
|
|
56
|
-
route: string;
|
|
57
|
-
};
|
|
58
|
-
'math-olympiad': {
|
|
59
|
-
title: string;
|
|
60
|
-
route: string;
|
|
61
|
-
};
|
|
62
|
-
questions: {
|
|
63
|
-
title: string;
|
|
64
|
-
route: string;
|
|
65
|
-
};
|
|
66
|
-
worksheets: {
|
|
67
|
-
title: string;
|
|
68
|
-
route: string;
|
|
69
|
-
};
|
|
70
|
-
worksheet: {
|
|
71
|
-
title: string;
|
|
72
|
-
route: string;
|
|
73
|
-
};
|
|
74
|
-
'math-puzzles': {
|
|
75
|
-
title: string;
|
|
76
|
-
route: string;
|
|
77
|
-
};
|
|
78
|
-
'math-games': {
|
|
79
|
-
title: string;
|
|
80
|
-
route: string;
|
|
81
|
-
};
|
|
82
|
-
formula: {
|
|
83
|
-
title: string;
|
|
84
|
-
route: string;
|
|
85
|
-
};
|
|
86
|
-
multiplication: {
|
|
87
|
-
title: string;
|
|
88
|
-
route: string;
|
|
89
|
-
};
|
|
90
|
-
teach: {
|
|
91
|
-
title: string;
|
|
92
|
-
route: string;
|
|
93
|
-
};
|
|
94
|
-
ncert: {
|
|
95
|
-
title: string;
|
|
96
|
-
route: string;
|
|
97
|
-
};
|
|
98
|
-
ncert2: {
|
|
99
|
-
title: string;
|
|
100
|
-
route: string;
|
|
101
|
-
};
|
|
102
|
-
'stories-for-kids': {
|
|
103
|
-
title: string;
|
|
104
|
-
route: string;
|
|
105
|
-
};
|
|
106
|
-
pdf: {
|
|
107
|
-
title: string;
|
|
108
|
-
route: string;
|
|
109
|
-
};
|
|
110
|
-
download: {
|
|
111
|
-
title: string;
|
|
112
|
-
route: string;
|
|
113
|
-
};
|
|
114
|
-
'cuemath-olympiad': {
|
|
115
|
-
title: string;
|
|
116
|
-
route: string;
|
|
117
|
-
};
|
|
118
|
-
Maths: {
|
|
119
|
-
title: string;
|
|
120
|
-
route: string;
|
|
121
|
-
};
|
|
122
|
-
Grades: {
|
|
123
|
-
title: string;
|
|
124
|
-
route: string;
|
|
125
|
-
};
|
|
126
|
-
Concept: {
|
|
127
|
-
title: string;
|
|
128
|
-
route: string;
|
|
129
|
-
};
|
|
130
|
-
Properties: {
|
|
131
|
-
title: string;
|
|
132
|
-
route: string;
|
|
133
|
-
};
|
|
134
|
-
'Complex-numbers': {
|
|
135
|
-
title: string;
|
|
136
|
-
route: string;
|
|
137
|
-
};
|
|
138
|
-
};
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.seoPageNames = void 0;
|
|
4
|
-
exports.seoPageNames = {
|
|
5
|
-
'numbers': {
|
|
6
|
-
title: 'Numbers',
|
|
7
|
-
route: '/numbers/',
|
|
8
|
-
},
|
|
9
|
-
'algebra': {
|
|
10
|
-
title: 'Algebra',
|
|
11
|
-
route: '/algebra',
|
|
12
|
-
},
|
|
13
|
-
'geometry': {
|
|
14
|
-
title: 'Geometry',
|
|
15
|
-
route: '/geometry/',
|
|
16
|
-
},
|
|
17
|
-
'data': {
|
|
18
|
-
title: 'Data',
|
|
19
|
-
route: '/data/',
|
|
20
|
-
},
|
|
21
|
-
'measurement': {
|
|
22
|
-
title: 'Measurement',
|
|
23
|
-
route: '/measurement/',
|
|
24
|
-
},
|
|
25
|
-
'commercial-math': {
|
|
26
|
-
title: 'Commercial Math',
|
|
27
|
-
route: '/commercial-math/',
|
|
28
|
-
},
|
|
29
|
-
'trigonometry': {
|
|
30
|
-
title: 'Trigonometry',
|
|
31
|
-
route: '/trigonometry/',
|
|
32
|
-
},
|
|
33
|
-
'calculus': {
|
|
34
|
-
title: 'Calculus',
|
|
35
|
-
route: '/calculus/',
|
|
36
|
-
},
|
|
37
|
-
'learn': {
|
|
38
|
-
title: 'Blog',
|
|
39
|
-
route: '/learn/',
|
|
40
|
-
},
|
|
41
|
-
'learning': {
|
|
42
|
-
title: 'Learning',
|
|
43
|
-
route: '/learning/',
|
|
44
|
-
},
|
|
45
|
-
'multiplication-tables': {
|
|
46
|
-
title: 'Multiplication Tables',
|
|
47
|
-
route: '/multiplication-tables/',
|
|
48
|
-
},
|
|
49
|
-
'calculators': {
|
|
50
|
-
title: 'Calculators',
|
|
51
|
-
route: '/calculators/',
|
|
52
|
-
},
|
|
53
|
-
'math-formulas': {
|
|
54
|
-
title: 'Math Formulas',
|
|
55
|
-
route: '/math-formulas/',
|
|
56
|
-
},
|
|
57
|
-
'ncert-solutions': {
|
|
58
|
-
title: 'NCERT Solutions',
|
|
59
|
-
route: '/ncert-solutions/',
|
|
60
|
-
},
|
|
61
|
-
'math-olympiad': {
|
|
62
|
-
title: 'Math Olympiad',
|
|
63
|
-
route: '/math-olympiad/',
|
|
64
|
-
},
|
|
65
|
-
'questions': {
|
|
66
|
-
title: 'Math Questions',
|
|
67
|
-
route: '/questions/',
|
|
68
|
-
},
|
|
69
|
-
'worksheets': {
|
|
70
|
-
title: 'Math Worksheets',
|
|
71
|
-
route: '/worksheets/',
|
|
72
|
-
},
|
|
73
|
-
'worksheet': {
|
|
74
|
-
title: 'Math Worksheet',
|
|
75
|
-
route: 'worksheet',
|
|
76
|
-
},
|
|
77
|
-
'math-puzzles': {
|
|
78
|
-
title: 'Math Puzzles',
|
|
79
|
-
route: '/math-puzzles/',
|
|
80
|
-
},
|
|
81
|
-
'math-games': {
|
|
82
|
-
title: 'Math Games',
|
|
83
|
-
route: '/math-games/',
|
|
84
|
-
},
|
|
85
|
-
'formula': {
|
|
86
|
-
title: 'Math formula',
|
|
87
|
-
route: '-formula',
|
|
88
|
-
},
|
|
89
|
-
'multiplication': {
|
|
90
|
-
title: 'Multiplication',
|
|
91
|
-
route: '/multiplication/',
|
|
92
|
-
},
|
|
93
|
-
'teach': {
|
|
94
|
-
title: 'Teach',
|
|
95
|
-
route: '/teach/',
|
|
96
|
-
},
|
|
97
|
-
'ncert': {
|
|
98
|
-
title: 'NCERT',
|
|
99
|
-
route: '/ncert',
|
|
100
|
-
},
|
|
101
|
-
'ncert2': {
|
|
102
|
-
title: 'NCERT',
|
|
103
|
-
route: '/NCERT',
|
|
104
|
-
},
|
|
105
|
-
'stories-for-kids': {
|
|
106
|
-
title: 'Stories for Kids',
|
|
107
|
-
route: '/stories-for-kids',
|
|
108
|
-
},
|
|
109
|
-
'pdf': {
|
|
110
|
-
title: 'Pdf',
|
|
111
|
-
route: 'pdf',
|
|
112
|
-
},
|
|
113
|
-
'download': {
|
|
114
|
-
title: 'Download',
|
|
115
|
-
route: 'download',
|
|
116
|
-
},
|
|
117
|
-
'cuemath-olympiad': {
|
|
118
|
-
title: 'Cuemath Olympiad',
|
|
119
|
-
route: 'cuemath-olympiad',
|
|
120
|
-
},
|
|
121
|
-
'Maths': {
|
|
122
|
-
title: 'Maths',
|
|
123
|
-
route: '/maths/',
|
|
124
|
-
},
|
|
125
|
-
'Grades': {
|
|
126
|
-
title: 'Grades',
|
|
127
|
-
route: '/grades/',
|
|
128
|
-
},
|
|
129
|
-
'Concept': {
|
|
130
|
-
title: 'Concept',
|
|
131
|
-
route: 'concept',
|
|
132
|
-
},
|
|
133
|
-
'Properties': {
|
|
134
|
-
title: 'Properties',
|
|
135
|
-
route: 'properties',
|
|
136
|
-
},
|
|
137
|
-
'Complex-numbers': {
|
|
138
|
-
title: 'Complex numbers',
|
|
139
|
-
route: 'complex-numbers',
|
|
140
|
-
},
|
|
141
|
-
};
|
|
142
|
-
//# sourceMappingURL=instrumentation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.js","sourceRoot":"","sources":["../../../../src/website-category/constants/instrumentation.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;IAC1B,SAAS,EAAE;QACT,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,WAAW;KACnB;IACD,SAAS,EAAE;QACT,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,UAAU;KAClB;IACD,UAAU,EAAE;QACV,KAAK,EAAE,UAAU;QACjB,KAAK,EAAE,YAAY;KACpB;IACD,MAAM,EAAE;QACN,KAAK,EAAE,MAAM;QACb,KAAK,EAAE,QAAQ;KAChB;IACD,aAAa,EAAE;QACb,KAAK,EAAE,aAAa;QACpB,KAAK,EAAE,eAAe;KACvB;IACD,iBAAiB,EAAE;QACjB,KAAK,EAAE,iBAAiB;QACxB,KAAK,EAAE,mBAAmB;KAC3B;IACD,cAAc,EAAE;QACd,KAAK,EAAE,cAAc;QACrB,KAAK,EAAE,gBAAgB;KACxB;IACD,UAAU,EAAE;QACV,KAAK,EAAE,UAAU;QACjB,KAAK,EAAE,YAAY;KACpB;IACD,OAAO,EAAE;QACP,KAAK,EAAE,MAAM;QACb,KAAK,EAAE,SAAS;KACjB;IACD,UAAU,EAAE;QACV,KAAK,EAAE,UAAU;QACjB,KAAK,EAAE,YAAY;KACpB;IACD,uBAAuB,EAAE;QACvB,KAAK,EAAE,uBAAuB;QAC9B,KAAK,EAAE,yBAAyB;KACjC;IACD,aAAa,EAAE;QACb,KAAK,EAAE,aAAa;QACpB,KAAK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KAAK,EAAE,kBAAkB;KAC1B;IACD,OAAO,EAAE;QACP,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,SAAS;KACjB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,UAAU;KAClB;IACD,SAAS,EAAE;QACT,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,SAAS;KACjB;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,YAAY;KACpB;IACD,iBAAiB,EAAE;QACjB,KAAK,EAAE,iBAAiB;QACxB,KAAK,EAAE,iBAAiB;KACzB;CACF,CAAC"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getSubRevenueChannel = exports.getTopicName = void 0;
|
|
4
|
-
const url_parser_1 = require("../../url-parser");
|
|
5
|
-
const constants_1 = require("../constants");
|
|
6
|
-
const instrumentation_1 = require("../constants/instrumentation");
|
|
7
|
-
const getTopicName = (path) => {
|
|
8
|
-
const pagePath = (0, url_parser_1.removeQueryStringFromPath)(path);
|
|
9
|
-
const topic = pagePath?.split('/').filter((name) => name)[1] || '';
|
|
10
|
-
return topic === '#' ? '' : topic;
|
|
11
|
-
};
|
|
12
|
-
exports.getTopicName = getTopicName;
|
|
13
|
-
const isSEO = (path) => {
|
|
14
|
-
const pageNames = Object.values(instrumentation_1.seoPageNames);
|
|
15
|
-
let currentPageName = '';
|
|
16
|
-
const topic = (0, exports.getTopicName)(path);
|
|
17
|
-
const isSEOPage = !!pageNames.filter(({ title, route }) => {
|
|
18
|
-
const hasRoute = path.includes(route);
|
|
19
|
-
if (hasRoute) {
|
|
20
|
-
currentPageName = title;
|
|
21
|
-
}
|
|
22
|
-
return hasRoute;
|
|
23
|
-
})[0];
|
|
24
|
-
return {
|
|
25
|
-
isSEOPage,
|
|
26
|
-
currentPageName,
|
|
27
|
-
topic,
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
const isRegex = (value) => {
|
|
31
|
-
return value instanceof RegExp;
|
|
32
|
-
};
|
|
33
|
-
function getSubRevenueChannel(pathname = '') {
|
|
34
|
-
const pagePathWithoutAdditionParams = (0, url_parser_1.removeHrefLangFromPath)((0, url_parser_1.removeQueryStringFromPath)(pathname));
|
|
35
|
-
// brand pages
|
|
36
|
-
if (constants_1.BRAND_PAGES.includes(pagePathWithoutAdditionParams)) {
|
|
37
|
-
return 'Brand';
|
|
38
|
-
}
|
|
39
|
-
// intent pages
|
|
40
|
-
if (constants_1.INTENT_PAGES.some(pagePath => isRegex(pagePath)
|
|
41
|
-
? pagePath.test(pagePathWithoutAdditionParams)
|
|
42
|
-
: pagePathWithoutAdditionParams.includes(pagePath))) {
|
|
43
|
-
return 'Intent';
|
|
44
|
-
}
|
|
45
|
-
// supply pages
|
|
46
|
-
if (constants_1.SUPPLY_PAGES.some(pagePath => pagePathWithoutAdditionParams.includes(pagePath))) {
|
|
47
|
-
return 'Supply';
|
|
48
|
-
}
|
|
49
|
-
// referral pages
|
|
50
|
-
if (constants_1.REFERRAL_PAGES.some(pagePath => pagePathWithoutAdditionParams.includes(pagePath))) {
|
|
51
|
-
return 'Referral';
|
|
52
|
-
}
|
|
53
|
-
// content pages
|
|
54
|
-
const { isSEOPage = false } = isSEO(pagePathWithoutAdditionParams);
|
|
55
|
-
if (isSEOPage) {
|
|
56
|
-
return 'Content';
|
|
57
|
-
}
|
|
58
|
-
return 'Others';
|
|
59
|
-
}
|
|
60
|
-
exports.getSubRevenueChannel = getSubRevenueChannel;
|
|
61
|
-
//# sourceMappingURL=instrumentation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.js","sourceRoot":"","sources":["../../../../src/website-category/utils/instrumentation.ts"],"names":[],"mappings":";;;AAAA,iDAAqF;AACrF,4CAAuF;AACvF,kEAA4D;AAErD,MAAM,YAAY,GAAG,CAAC,IAAY,EAAE,EAAE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,CAAC,6BAA6B,CAAC,EAAE;QACvD,OAAO,OAAO,CAAC;KAChB;IAED,eAAe;IACf,IACE,wBAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAC3B,OAAO,CAAC,QAAQ,CAAC;QACf,CAAC,CAAE,QAAmB,CAAC,IAAI,CAAC,6BAA6B,CAAC;QAC1D,CAAC,CAAC,6BAA6B,CAAC,QAAQ,CAAC,QAAkB,CAAC,CAC/D,EACD;QACA,OAAO,QAAQ,CAAC;KACjB;IAED,eAAe;IACf,IAAI,wBAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,6BAA6B,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE;QACnF,OAAO,QAAQ,CAAC;KACjB;IAED,iBAAiB;IACjB,IAAI,0BAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,6BAA6B,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE;QACrF,OAAO,UAAU,CAAC;KACnB;IAED,gBAAgB;IAChB,MAAM,EAAE,SAAS,GAAG,KAAK,EAAE,GAAG,KAAK,CAAC,6BAA6B,CAAC,CAAC;IAEnE,IAAI,SAAS,EAAE;QACb,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAvCD,oDAuCC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { DATA_VARIABLES } from '../constants/analytics';
|
|
2
|
-
export const getDataProps = (entryPoint = '', entrySection = '', topic = '', isCustomTracking) => {
|
|
3
|
-
var _a;
|
|
4
|
-
const dataProps = {
|
|
5
|
-
[DATA_VARIABLES.ENTRY_POINT]: entryPoint,
|
|
6
|
-
[DATA_VARIABLES.ENTRY_SECTION]: entrySection,
|
|
7
|
-
[DATA_VARIABLES.TOPIC]: topic,
|
|
8
|
-
[DATA_VARIABLES.CUSTOM_TRACKING]: isCustomTracking,
|
|
9
|
-
};
|
|
10
|
-
(_a = Object.keys(dataProps)) === null || _a === void 0 ? void 0 : _a.forEach(key => {
|
|
11
|
-
if (!dataProps[key]) {
|
|
12
|
-
delete dataProps[key];
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
return dataProps;
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=data-props.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"data-props.js","sourceRoot":"","sources":["../../../src/analytics/data-props.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,UAAU,GAAG,EAAE,EACf,YAAY,GAAG,EAAE,EACjB,KAAK,GAAG,EAAE,EACV,gBAAyB,EACY,EAAE;;IACvC,MAAM,SAAS,GAAG;QAChB,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU;QACxC,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,YAAY;QAC5C,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,KAAK;QAC7B,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,gBAAgB;KACnD,CAAC;IAEF,MAAA,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,0CAAE,OAAO,CAAC,GAAG,CAAC,EAAE;QACpC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE;YACnB,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC;SACvB;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/constants/instrumentation/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;AAErE,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;CACnB,CAAC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"Affiliate": "paid_affiliate_others",
|
|
3
|
-
"D_g": "paid_ad_google",
|
|
4
|
-
"d_fb_m": "paid_ad_fb",
|
|
5
|
-
"d_sem_m": "paid_ad_google",
|
|
6
|
-
"D_s": "paid_ad_google",
|
|
7
|
-
"dr_fb_m": "paid_ad_fb",
|
|
8
|
-
"system": "referral_others",
|
|
9
|
-
"dc_fb_m": "paid_ad_fb",
|
|
10
|
-
"dr_sem_m": "paid_ad_google",
|
|
11
|
-
"dc_sem_m": "paid_ad_google",
|
|
12
|
-
"CUEMATHAPP": "organic",
|
|
13
|
-
"CUETEACHERAPP": "organic",
|
|
14
|
-
"IM": "paid_affiliate_bp_influencer",
|
|
15
|
-
"la": "referral_parent",
|
|
16
|
-
"social": "organic_social",
|
|
17
|
-
"website": "Organic",
|
|
18
|
-
"google": "paid_ad_biddables",
|
|
19
|
-
"CUEMATH": "organic",
|
|
20
|
-
"SocialMedia": "Organic_social",
|
|
21
|
-
"d_apex": "paid_affiliate_others",
|
|
22
|
-
"D-Social": "Organic_social",
|
|
23
|
-
"ORM": "paid_affiliate_bp_influencer",
|
|
24
|
-
"d_disc_m": "paid_ad_google",
|
|
25
|
-
"Facebook": "organic_facebook",
|
|
26
|
-
"gbl": "organic_gbl",
|
|
27
|
-
"youtube": "organic_social",
|
|
28
|
-
"offline_community": "offline_events",
|
|
29
|
-
"cj": "paid_affiliate_others",
|
|
30
|
-
"D_email": "organic_email",
|
|
31
|
-
"dc_disc_m": "paid_ad_google",
|
|
32
|
-
"affiliate-brainly": "paid_affiliate_others",
|
|
33
|
-
"Offline_Event_UAE_Local": "offline_events",
|
|
34
|
-
"CE-Messenger": "organic_Messenger",
|
|
35
|
-
"CE-Inbound": "organic_inbound",
|
|
36
|
-
"CE-Instagram": "organic_insta",
|
|
37
|
-
"referral": "referral_others",
|
|
38
|
-
"d_momentus": "paid_affiliate_others",
|
|
39
|
-
"promotion_mushrif_mall_QR_Code": "offline_events",
|
|
40
|
-
"affiliate-bark": "paid_affiliate_others",
|
|
41
|
-
"PAID-EXP": "paid_ad_biddables",
|
|
42
|
-
"utm_source": "test",
|
|
43
|
-
"email": "organic_email",
|
|
44
|
-
"PAID-EXP-AUS": "paid_ad_biddables",
|
|
45
|
-
"d_opicle": "paid_affiliate_others",
|
|
46
|
-
"REFERRAL": "referral_others",
|
|
47
|
-
"Old Leads": "others",
|
|
48
|
-
"Outbound Phone call": "organic_outbound",
|
|
49
|
-
"chatbot": "organic",
|
|
50
|
-
"d_magixengage": "paid_affiliate_others",
|
|
51
|
-
"CE-Info": "organic_info"
|
|
52
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
3
|
-
const fs = require('fs');
|
|
4
|
-
const path = require('path');
|
|
5
|
-
const csv = require('papaparse');
|
|
6
|
-
const ClusterMetaInfoFileName = 'utm-source';
|
|
7
|
-
(function csvFileToJSON() {
|
|
8
|
-
const INPUT_FILE_PATH = path.resolve(__dirname, '.', `../../data/${ClusterMetaInfoFileName}.csv`);
|
|
9
|
-
const OUTPUT_FILE_PATH = path.resolve(__dirname, '.', `../../data/${ClusterMetaInfoFileName}.json`);
|
|
10
|
-
try {
|
|
11
|
-
fs.readFile(INPUT_FILE_PATH, 'utf-8', (err, data) => {
|
|
12
|
-
if (err)
|
|
13
|
-
throw err;
|
|
14
|
-
const options = {
|
|
15
|
-
header: true,
|
|
16
|
-
delimiter: ',',
|
|
17
|
-
quoteChar: '"',
|
|
18
|
-
escapeChar: '\\',
|
|
19
|
-
};
|
|
20
|
-
const jsonObj = csv.parse(data, options).data;
|
|
21
|
-
let sourceChannelData = {};
|
|
22
|
-
jsonObj.forEach(utmSourceChannelObject => {
|
|
23
|
-
const { utm_source: utmSource, source_channel: sourceChannel } = utmSourceChannelObject || {};
|
|
24
|
-
if (sourceChannelData[utmSource]) {
|
|
25
|
-
throw new Error(`Duplicate utm_source Found ${utmSource}`);
|
|
26
|
-
}
|
|
27
|
-
sourceChannelData[utmSource] = sourceChannel;
|
|
28
|
-
});
|
|
29
|
-
const jsonString = JSON.stringify(sourceChannelData, null, 2);
|
|
30
|
-
fs.writeFile(OUTPUT_FILE_PATH, jsonString, e => {
|
|
31
|
-
if (e)
|
|
32
|
-
throw e;
|
|
33
|
-
// eslint-disable-next-line no-console
|
|
34
|
-
console.log('CSV file converted to JSON');
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
catch (err) {
|
|
39
|
-
// eslint-disable-next-line no-console
|
|
40
|
-
console.log(err);
|
|
41
|
-
process.exit(1);
|
|
42
|
-
}
|
|
43
|
-
})();
|
|
44
|
-
//# sourceMappingURL=source-channel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"source-channel.js","sourceRoot":"","sources":["../../../../src/growth-source/scripts/source-channel.js"],"names":[],"mappings":";AAAA,uDAAuD;AACvD,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAE7B,MAAM,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAEjC,MAAM,uBAAuB,GAAG,YAAY,CAAC;AAE7C,CAAC,SAAS,aAAa;IACrB,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,CAClC,SAAS,EACT,GAAG,EACH,cAAc,uBAAuB,MAAM,CAC5C,CAAC;IACF,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,CACnC,SAAS,EACT,GAAG,EACH,cAAc,uBAAuB,OAAO,CAC7C,CAAC;IAEF,IAAI;QACF,EAAE,CAAC,QAAQ,CAAC,eAAe,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YAClD,IAAI,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