@cuemath/web-utils 1.0.12-beta.1 → 1.0.12-beta.2
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/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.js +2 -3
- package/dist/cjs/growth-source/index.js.map +1 -1
- package/dist/cjs/growth-source/types.d.ts +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.js +2 -3
- package/dist/esm/growth-source/index.js.map +1 -1
- package/dist/esm/growth-source/types.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/constants/url-map/index.d.ts +0 -96
- package/dist/cjs/constants/url-map/index.js +0 -136
- package/dist/cjs/constants/url-map/index.js.map +0 -1
- package/dist/cjs/url-format/index.d.ts +0 -5
- package/dist/cjs/url-format/index.js +0 -49
- package/dist/cjs/url-format/index.js.map +0 -1
- package/dist/esm/constants/url-map/index.d.ts +0 -96
- package/dist/esm/constants/url-map/index.js +0 -133
- package/dist/esm/constants/url-map/index.js.map +0 -1
- package/dist/esm/url-format/index.d.ts +0 -5
- package/dist/esm/url-format/index.js +0 -41
- package/dist/esm/url-format/index.js.map +0 -1
|
@@ -16,5 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./country"), exports);
|
|
18
18
|
__exportStar(require("./date-time"), exports);
|
|
19
|
-
__exportStar(require("./url-map"), exports);
|
|
20
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,8CAA4B
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,8CAA4B"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.setOrganicChannel = exports.setFlow = exports.setFlowEntryPoint = exports.setLastPage = exports.initSourceDetails = exports.isSourcePresent = exports.readSourceCookie = void 0;
|
|
4
4
|
const cookie_1 = require("../cookie");
|
|
5
|
-
const url_format_1 = require("../url-format");
|
|
6
5
|
const SOURCE_DETAILS_COOKIE = 'source_details';
|
|
7
6
|
const UTM_PARAMS = [
|
|
8
7
|
'utm_source',
|
|
@@ -138,7 +137,7 @@ flow, affiliateChannel, offlineChannel, organicChannel, performanceChannel, reve
|
|
|
138
137
|
offlineChannel = offlineChannel || leadChannel;
|
|
139
138
|
break;
|
|
140
139
|
case 'organic':
|
|
141
|
-
organicChannel = organicChannel || leadChannel
|
|
140
|
+
organicChannel = organicChannel || leadChannel;
|
|
142
141
|
break;
|
|
143
142
|
case 'performance':
|
|
144
143
|
performanceChannel = performanceChannel || leadChannel;
|
|
@@ -155,7 +154,7 @@ flow, affiliateChannel, offlineChannel, organicChannel, performanceChannel, reve
|
|
|
155
154
|
flow: flow || getFlow(platform, experiments),
|
|
156
155
|
affiliate_channel: affiliateChannel,
|
|
157
156
|
offline_channel: offlineChannel,
|
|
158
|
-
organic_channel: organicChannel
|
|
157
|
+
organic_channel: organicChannel,
|
|
159
158
|
performance_channel: performanceChannel,
|
|
160
159
|
revenue_channel: revenueChannel,
|
|
161
160
|
first_page: getFirstPage(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/growth-source/index.ts"],"names":[],"mappings":";;;AAYA,sCAAkE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/growth-source/index.ts"],"names":[],"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,WAAW,CAAC;YAC5C,QAAQ,EAAE,OAAO;SAClB,CAAC;QAEF,IAAI,SAAS,EAAE;YACb,aAAa,GAAG;gBACd,GAAG,aAAa;gBAChB,UAAU,EAAE,SAAS;gBACrB,iBAAiB,EAAE,gBAAgB;gBACnC,eAAe,EAAE,cAAc;gBAC/B,eAAe,EAAE,cAAc;gBAC/B,mBAAmB,EAAE,kBAAkB;gBACvC,eAAe,EAAE,cAAc;aAChC,CAAC;SACH;QAED,kBAAkB,CAAC,aAAa,CAAC,CAAC;KACnC;AACH,CAAC,CAAC;AA/EW,QAAA,iBAAiB,qBA+E5B;AAEF,6CAA6C;AACtC,MAAM,WAAW,GAAG,KAAK,EAAE,QAAgB,EAAiB,EAAE;IACnE,kBAAkB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC;AAC9C,CAAC,CAAC;AAFW,QAAA,WAAW,eAEtB;AAEF,+CAA+C;AACxC,MAAM,iBAAiB,GAAG,KAAK,EAAE,SAAiB,EAAiB,EAAE;IAC1E,kBAAkB,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC;AAChD,CAAC,CAAC;AAFW,QAAA,iBAAiB,qBAE5B;AAEF,+CAA+C;AACxC,MAAM,OAAO,GAAG,KAAK,EAAE,IAAgB,EAAiB,EAAE;IAC/D,kBAAkB,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;AAC/B,CAAC,CAAC;AAFW,QAAA,OAAO,WAElB;AAEK,MAAM,iBAAiB,GAAG,KAAK,EACpC,cAA8B,EACf,EAAE;IACjB,kBAAkB,CAAC,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC,CAAC;AAC1D,CAAC,CAAC;AAJW,QAAA,iBAAiB,qBAI5B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type Platform = 'website' | 'app' | 'astro' | 'leap-teacher' | 'leap-admin';
|
|
2
2
|
export type RevenueChannel = 'organic' | 'performance' | 'affiliate' | 'offline' | 'referral' | 'unknown';
|
|
3
3
|
export type SignupFlow = 'regular' | 'e-cna' | 'e-sales' | 'e-cna-exit';
|
|
4
|
-
export type OrganicChannel = 'seo-content' | 'seo-intent' | 'brand';
|
|
4
|
+
export type OrganicChannel = 'seo-content' | 'seo-intent' | 'brand' | '';
|
|
5
5
|
export type FlowEntry = 'chatbot' | 'sidebar-cta' | 'menu-cta' | 'onpage-banner' | 'pdf-download-cta' | 'bottom-static-cta';
|
|
6
6
|
export type Experiments = Record<string, unknown>;
|
|
7
7
|
export type UTMParams = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
|
|
@@ -8,7 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { createCookie, getCookie, removeCookie } from '../cookie';
|
|
11
|
-
import { getOrganicChannel } from '../url-format';
|
|
12
11
|
const SOURCE_DETAILS_COOKIE = 'source_details';
|
|
13
12
|
const UTM_PARAMS = [
|
|
14
13
|
'utm_source',
|
|
@@ -139,7 +138,7 @@ flow, affiliateChannel, offlineChannel, organicChannel, performanceChannel, reve
|
|
|
139
138
|
offlineChannel = offlineChannel || leadChannel;
|
|
140
139
|
break;
|
|
141
140
|
case 'organic':
|
|
142
|
-
organicChannel = organicChannel || leadChannel
|
|
141
|
+
organicChannel = organicChannel || leadChannel;
|
|
143
142
|
break;
|
|
144
143
|
case 'performance':
|
|
145
144
|
performanceChannel = performanceChannel || leadChannel;
|
|
@@ -156,7 +155,7 @@ flow, affiliateChannel, offlineChannel, organicChannel, performanceChannel, reve
|
|
|
156
155
|
flow: flow || getFlow(platform, experiments),
|
|
157
156
|
affiliate_channel: affiliateChannel,
|
|
158
157
|
offline_channel: offlineChannel,
|
|
159
|
-
organic_channel: organicChannel
|
|
158
|
+
organic_channel: organicChannel,
|
|
160
159
|
performance_channel: performanceChannel,
|
|
161
160
|
revenue_channel: revenueChannel,
|
|
162
161
|
first_page: getFirstPage(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/growth-source/index.ts"],"names":[],"mappings":";;;;;;;;;AAYA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/growth-source/index.ts"],"names":[],"mappings":";;;;;;;;;AAYA,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAElE,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAC/C,MAAM,UAAU,GAAoB;IAClC,YAAY;IACZ,YAAY;IACZ,cAAc;IACd,UAAU;CACX,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAwB,EAAE;IACxD,MAAM,aAAa,GAAG,SAAS,CAAC,qBAAqB,CAAC,CAAC;IAEvD,OAAO,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACnF,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,aAAkC,EAAQ,EAAE;IACrE,YAAY,CAAC,qBAAqB,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,EAAE,GAAG,CAAC,CAAC;AAC1E,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAY,EAAE;IAC3C,OAAO,CAAC,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC;AAC5C,CAAC,CAA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AE,IAAI,EAAE,CAAC,CAAC;AAC/B,CAAC,CAAA,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,cAA8B,EACf,EAAE;IACjB,kBAAkB,CAAC,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC,CAAC;AAC1D,CAAC,CAAA,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type Platform = 'website' | 'app' | 'astro' | 'leap-teacher' | 'leap-admin';
|
|
2
2
|
export type RevenueChannel = 'organic' | 'performance' | 'affiliate' | 'offline' | 'referral' | 'unknown';
|
|
3
3
|
export type SignupFlow = 'regular' | 'e-cna' | 'e-sales' | 'e-cna-exit';
|
|
4
|
-
export type OrganicChannel = 'seo-content' | 'seo-intent' | 'brand';
|
|
4
|
+
export type OrganicChannel = 'seo-content' | 'seo-intent' | 'brand' | '';
|
|
5
5
|
export type FlowEntry = 'chatbot' | 'sidebar-cta' | 'menu-cta' | 'onpage-banner' | 'pdf-download-cta' | 'bottom-static-cta';
|
|
6
6
|
export type Experiments = Record<string, unknown>;
|
|
7
7
|
export type UTMParams = {
|
package/package.json
CHANGED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
export declare const URL_PATH_MAP: {
|
|
2
|
-
HOMEPAGE: string;
|
|
3
|
-
WHY_CHOOSE_US: string;
|
|
4
|
-
ABOUT_US: string;
|
|
5
|
-
TUTORING_SERVICES: string;
|
|
6
|
-
HOME_TUTION: string;
|
|
7
|
-
HOME_TUTOR: string;
|
|
8
|
-
HOME_TUTORING: string;
|
|
9
|
-
HYBRID_TEACHER_PROFILE: string;
|
|
10
|
-
MATH_TUITION: string;
|
|
11
|
-
CENTRES: string;
|
|
12
|
-
MATHS: string;
|
|
13
|
-
ONLINE_TUITIONS: string;
|
|
14
|
-
GRADE_MATH: string;
|
|
15
|
-
ONLINE_MATH_COURSES: string;
|
|
16
|
-
TUITION_TUTORS: string;
|
|
17
|
-
TEACH: string;
|
|
18
|
-
TEACHER_PROFILE: string;
|
|
19
|
-
};
|
|
20
|
-
export declare const BRAND_PAGES: string[];
|
|
21
|
-
export declare const INTENT_PAGES: string[];
|
|
22
|
-
export declare const INTERNATIONAL_LINKS: string[];
|
|
23
|
-
export declare const CONTENT_PAGES: {
|
|
24
|
-
numbers: {
|
|
25
|
-
title: string;
|
|
26
|
-
route: string;
|
|
27
|
-
};
|
|
28
|
-
algebra: {
|
|
29
|
-
title: string;
|
|
30
|
-
route: string;
|
|
31
|
-
};
|
|
32
|
-
geometry: {
|
|
33
|
-
title: string;
|
|
34
|
-
route: string;
|
|
35
|
-
};
|
|
36
|
-
data: {
|
|
37
|
-
title: string;
|
|
38
|
-
route: string;
|
|
39
|
-
};
|
|
40
|
-
measurement: {
|
|
41
|
-
title: string;
|
|
42
|
-
route: string;
|
|
43
|
-
};
|
|
44
|
-
'commercial-math': {
|
|
45
|
-
title: string;
|
|
46
|
-
route: string;
|
|
47
|
-
};
|
|
48
|
-
trigonometry: {
|
|
49
|
-
title: string;
|
|
50
|
-
route: string;
|
|
51
|
-
};
|
|
52
|
-
calculus: {
|
|
53
|
-
title: string;
|
|
54
|
-
route: string;
|
|
55
|
-
};
|
|
56
|
-
learn: {
|
|
57
|
-
title: string;
|
|
58
|
-
route: string;
|
|
59
|
-
};
|
|
60
|
-
'multiplication-tables': {
|
|
61
|
-
title: string;
|
|
62
|
-
route: string;
|
|
63
|
-
};
|
|
64
|
-
calculators: {
|
|
65
|
-
title: string;
|
|
66
|
-
route: string;
|
|
67
|
-
};
|
|
68
|
-
'math-formulas': {
|
|
69
|
-
title: string;
|
|
70
|
-
route: string;
|
|
71
|
-
};
|
|
72
|
-
'ncert-solutions': {
|
|
73
|
-
title: string;
|
|
74
|
-
route: string;
|
|
75
|
-
};
|
|
76
|
-
'math-olympiad': {
|
|
77
|
-
title: string;
|
|
78
|
-
route: string;
|
|
79
|
-
};
|
|
80
|
-
questions: {
|
|
81
|
-
title: string;
|
|
82
|
-
route: string;
|
|
83
|
-
};
|
|
84
|
-
worksheets: {
|
|
85
|
-
title: string;
|
|
86
|
-
route: string;
|
|
87
|
-
};
|
|
88
|
-
'math-puzzles': {
|
|
89
|
-
title: string;
|
|
90
|
-
route: string;
|
|
91
|
-
};
|
|
92
|
-
'math-games': {
|
|
93
|
-
title: string;
|
|
94
|
-
route: string;
|
|
95
|
-
};
|
|
96
|
-
};
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CONTENT_PAGES = exports.INTERNATIONAL_LINKS = exports.INTENT_PAGES = exports.BRAND_PAGES = exports.URL_PATH_MAP = void 0;
|
|
4
|
-
exports.URL_PATH_MAP = {
|
|
5
|
-
HOMEPAGE: '/',
|
|
6
|
-
WHY_CHOOSE_US: '/math-online-classes',
|
|
7
|
-
ABOUT_US: '/about-us',
|
|
8
|
-
TUTORING_SERVICES: '/tutoring-services',
|
|
9
|
-
HOME_TUTION: '/home-tuition-in',
|
|
10
|
-
HOME_TUTOR: '/home-tutor',
|
|
11
|
-
HOME_TUTORING: '/home-tutoring',
|
|
12
|
-
HYBRID_TEACHER_PROFILE: '/hybrid-teacher-profile/',
|
|
13
|
-
MATH_TUITION: '/math-tuition',
|
|
14
|
-
CENTRES: '/centres/',
|
|
15
|
-
MATHS: '/maths/',
|
|
16
|
-
ONLINE_TUITIONS: '/online-tuitions',
|
|
17
|
-
GRADE_MATH: '-grade-math',
|
|
18
|
-
ONLINE_MATH_COURSES: '/online-math-courses',
|
|
19
|
-
TUITION_TUTORS: '/tuition-tutors',
|
|
20
|
-
TEACH: '/teach',
|
|
21
|
-
TEACHER_PROFILE: 'teacher-profile',
|
|
22
|
-
};
|
|
23
|
-
exports.BRAND_PAGES = [exports.URL_PATH_MAP.HOMEPAGE, exports.URL_PATH_MAP.ABOUT_US];
|
|
24
|
-
exports.INTENT_PAGES = [
|
|
25
|
-
exports.URL_PATH_MAP.WHY_CHOOSE_US,
|
|
26
|
-
exports.URL_PATH_MAP.TUTORING_SERVICES,
|
|
27
|
-
exports.URL_PATH_MAP.HOME_TUTION,
|
|
28
|
-
exports.URL_PATH_MAP.HOME_TUTOR,
|
|
29
|
-
exports.URL_PATH_MAP.HOME_TUTORING,
|
|
30
|
-
exports.URL_PATH_MAP.HYBRID_TEACHER_PROFILE,
|
|
31
|
-
exports.URL_PATH_MAP.MATH_TUITION,
|
|
32
|
-
exports.URL_PATH_MAP.CENTRES,
|
|
33
|
-
exports.URL_PATH_MAP.MATHS,
|
|
34
|
-
exports.URL_PATH_MAP.ONLINE_TUITIONS,
|
|
35
|
-
exports.URL_PATH_MAP.GRADE_MATH,
|
|
36
|
-
exports.URL_PATH_MAP.ONLINE_MATH_COURSES,
|
|
37
|
-
exports.URL_PATH_MAP.TUITION_TUTORS,
|
|
38
|
-
exports.URL_PATH_MAP.TEACH,
|
|
39
|
-
exports.URL_PATH_MAP.TEACHER_PROFILE,
|
|
40
|
-
];
|
|
41
|
-
exports.INTERNATIONAL_LINKS = [
|
|
42
|
-
'/en-us',
|
|
43
|
-
'/en-gb',
|
|
44
|
-
'/en-ca',
|
|
45
|
-
'/en-ae',
|
|
46
|
-
'/en-au',
|
|
47
|
-
'/en-fr',
|
|
48
|
-
'/en-de',
|
|
49
|
-
'/en-id',
|
|
50
|
-
'/en-it',
|
|
51
|
-
'/en-nl',
|
|
52
|
-
'/en-lk',
|
|
53
|
-
'/en-sg',
|
|
54
|
-
'/en-sa',
|
|
55
|
-
'/en-om',
|
|
56
|
-
'/en-bh',
|
|
57
|
-
'/en-qa',
|
|
58
|
-
'/en-no',
|
|
59
|
-
'/en-se',
|
|
60
|
-
'/en-ie',
|
|
61
|
-
];
|
|
62
|
-
exports.CONTENT_PAGES = {
|
|
63
|
-
'numbers': {
|
|
64
|
-
title: 'Numbers',
|
|
65
|
-
route: '/numbers/',
|
|
66
|
-
},
|
|
67
|
-
'algebra': {
|
|
68
|
-
title: 'Algebra',
|
|
69
|
-
route: '/algebra/',
|
|
70
|
-
},
|
|
71
|
-
'geometry': {
|
|
72
|
-
title: 'Geometry',
|
|
73
|
-
route: '/geometry/',
|
|
74
|
-
},
|
|
75
|
-
'data': {
|
|
76
|
-
title: 'Data',
|
|
77
|
-
route: '/data/',
|
|
78
|
-
},
|
|
79
|
-
'measurement': {
|
|
80
|
-
title: 'Measurement',
|
|
81
|
-
route: '/measurement/',
|
|
82
|
-
},
|
|
83
|
-
'commercial-math': {
|
|
84
|
-
title: 'Commercial Math',
|
|
85
|
-
route: '/commercial-math/',
|
|
86
|
-
},
|
|
87
|
-
'trigonometry': {
|
|
88
|
-
title: 'Trigonometry',
|
|
89
|
-
route: '/trigonometry/',
|
|
90
|
-
},
|
|
91
|
-
'calculus': {
|
|
92
|
-
title: 'Calculus',
|
|
93
|
-
route: '/calculus/',
|
|
94
|
-
},
|
|
95
|
-
'learn': {
|
|
96
|
-
title: 'Blog',
|
|
97
|
-
route: '/learn/',
|
|
98
|
-
},
|
|
99
|
-
'multiplication-tables': {
|
|
100
|
-
title: 'Multiplication Tables',
|
|
101
|
-
route: '/multiplication-tables/',
|
|
102
|
-
},
|
|
103
|
-
'calculators': {
|
|
104
|
-
title: 'Calculators',
|
|
105
|
-
route: '/calculators/',
|
|
106
|
-
},
|
|
107
|
-
'math-formulas': {
|
|
108
|
-
title: 'Math Formulas',
|
|
109
|
-
route: '/math-formulas/',
|
|
110
|
-
},
|
|
111
|
-
'ncert-solutions': {
|
|
112
|
-
title: 'NCERT Solutions',
|
|
113
|
-
route: '/ncert-solutions/',
|
|
114
|
-
},
|
|
115
|
-
'math-olympiad': {
|
|
116
|
-
title: 'Math Olympiad',
|
|
117
|
-
route: '/math-olympiad/',
|
|
118
|
-
},
|
|
119
|
-
'questions': {
|
|
120
|
-
title: 'Math Questions',
|
|
121
|
-
route: '/questions/',
|
|
122
|
-
},
|
|
123
|
-
'worksheets': {
|
|
124
|
-
title: 'Math Worksheets',
|
|
125
|
-
route: '/worksheets/',
|
|
126
|
-
},
|
|
127
|
-
'math-puzzles': {
|
|
128
|
-
title: 'Math Puzzles',
|
|
129
|
-
route: '/math-puzzles/',
|
|
130
|
-
},
|
|
131
|
-
'math-games': {
|
|
132
|
-
title: 'Math Games',
|
|
133
|
-
route: '/math-games/',
|
|
134
|
-
},
|
|
135
|
-
};
|
|
136
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/constants/url-map/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;IAC1B,QAAQ,EAAE,GAAG;IACb,aAAa,EAAE,sBAAsB;IACrC,QAAQ,EAAE,WAAW;IACrB,iBAAiB,EAAE,oBAAoB;IACvC,WAAW,EAAE,kBAAkB;IAC/B,UAAU,EAAE,aAAa;IACzB,aAAa,EAAE,gBAAgB;IAC/B,sBAAsB,EAAE,0BAA0B;IAClD,YAAY,EAAE,eAAe;IAC7B,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,SAAS;IAChB,eAAe,EAAE,kBAAkB;IACnC,UAAU,EAAE,aAAa;IACzB,mBAAmB,EAAE,sBAAsB;IAC3C,cAAc,EAAE,iBAAiB;IACjC,KAAK,EAAE,QAAQ;IACf,eAAe,EAAE,iBAAiB;CACnC,CAAC;AAEW,QAAA,WAAW,GAAG,CAAC,oBAAY,CAAC,QAAQ,EAAE,oBAAY,CAAC,QAAQ,CAAC,CAAC;AAE7D,QAAA,YAAY,GAAG;IAC1B,oBAAY,CAAC,aAAa;IAC1B,oBAAY,CAAC,iBAAiB;IAC9B,oBAAY,CAAC,WAAW;IACxB,oBAAY,CAAC,UAAU;IACvB,oBAAY,CAAC,aAAa;IAC1B,oBAAY,CAAC,sBAAsB;IACnC,oBAAY,CAAC,YAAY;IACzB,oBAAY,CAAC,OAAO;IACpB,oBAAY,CAAC,KAAK;IAClB,oBAAY,CAAC,eAAe;IAC5B,oBAAY,CAAC,UAAU;IACvB,oBAA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B,KAAK,EAAE,iBAAiB;KACzB;IACD,iBAAiB,EAAE;QACjB,KAAK,EAAE,iBAAiB;QACxB,KAAK,EAAE,mBAAmB;KAC3B;IACD,eAAe,EAAE;QACf,KAAK,EAAE,eAAe;QACtB,KAAK,EAAE,iBAAiB;KACzB;IACD,WAAW,EAAE;QACX,KAAK,EAAE,gBAAgB;QACvB,KAAK,EAAE,aAAa;KACrB;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,iBAAiB;QACxB,KAAK,EAAE,cAAc;KACtB;IACD,cAAc,EAAE;QACd,KAAK,EAAE,cAAc;QACrB,KAAK,EAAE,gBAAgB;KACxB;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,cAAc;KACtB;CACF,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function removeQueryParams(path: string): string;
|
|
2
|
-
export declare const getTopicName: (path: string) => string;
|
|
3
|
-
export declare function removeCountryPathFromUrl(path?: string): string;
|
|
4
|
-
export declare function getOrganicChannel(): string;
|
|
5
|
-
export declare const isSEO: (path: string) => boolean;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isSEO = exports.getOrganicChannel = exports.removeCountryPathFromUrl = exports.getTopicName = exports.removeQueryParams = void 0;
|
|
4
|
-
const constants_1 = require("../constants");
|
|
5
|
-
function removeQueryParams(path) {
|
|
6
|
-
return path ? path.split('?')[0] : '';
|
|
7
|
-
}
|
|
8
|
-
exports.removeQueryParams = removeQueryParams;
|
|
9
|
-
const getTopicName = (path) => {
|
|
10
|
-
const pagePath = removeQueryParams(path);
|
|
11
|
-
const topic = pagePath?.split('/').filter(name => name)[1] || '';
|
|
12
|
-
return topic === '#' ? '' : topic;
|
|
13
|
-
};
|
|
14
|
-
exports.getTopicName = getTopicName;
|
|
15
|
-
function removeCountryPathFromUrl(path = '') {
|
|
16
|
-
const herfLang = constants_1.INTERNATIONAL_LINKS.filter(lang => path.includes(lang));
|
|
17
|
-
let updatedPath = path;
|
|
18
|
-
if (herfLang.length) {
|
|
19
|
-
[, updatedPath] = path.split(herfLang[0]);
|
|
20
|
-
}
|
|
21
|
-
return updatedPath;
|
|
22
|
-
}
|
|
23
|
-
exports.removeCountryPathFromUrl = removeCountryPathFromUrl;
|
|
24
|
-
function getOrganicChannel() {
|
|
25
|
-
if (typeof window === undefined)
|
|
26
|
-
return '';
|
|
27
|
-
const pagePathWithAdditionParams = removeCountryPathFromUrl(removeQueryParams(window.location.pathname));
|
|
28
|
-
//brand pages
|
|
29
|
-
if (constants_1.BRAND_PAGES.includes(pagePathWithAdditionParams)) {
|
|
30
|
-
return 'brand';
|
|
31
|
-
}
|
|
32
|
-
// seo-intent pages
|
|
33
|
-
if (constants_1.INTENT_PAGES.some(pagePath => pagePathWithAdditionParams.includes(pagePath))) {
|
|
34
|
-
return 'seo-intent';
|
|
35
|
-
}
|
|
36
|
-
// seo-content pages
|
|
37
|
-
if ((0, exports.isSEO)(pagePathWithAdditionParams)) {
|
|
38
|
-
return 'seo-content';
|
|
39
|
-
}
|
|
40
|
-
return '';
|
|
41
|
-
}
|
|
42
|
-
exports.getOrganicChannel = getOrganicChannel;
|
|
43
|
-
const isSEO = (path) => {
|
|
44
|
-
const pageNames = Object.values(constants_1.CONTENT_PAGES);
|
|
45
|
-
const matchingPage = pageNames.find(({ route }) => path.includes(route));
|
|
46
|
-
return !!matchingPage;
|
|
47
|
-
};
|
|
48
|
-
exports.isSEO = isSEO;
|
|
49
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/url-format/index.ts"],"names":[],"mappings":";;;AAAA,4CAKsB;AAEtB,SAAgB,iBAAiB,CAAC,IAAY;IAC5C,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,C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AC,QAAQ,CAAC,QAAQ,CAAC,CAAC,EAAE;QAChF,OAAO,YAAY,CAAC;KACrB;IAED,oBAAoB;IACpB,IAAI,IAAA,aAAK,EAAC,0BAA0B,CAAC,EAAE;QACrC,OAAO,aAAa,CAAC;KACtB;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAvBD,8CAuBC;AAEM,MAAM,KAAK,GAAG,CAAC,IAAY,EAAW,EAAE;IAC7C,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,yBAAa,CAAC,CAAC;IAC/C,MAAM,YAAY,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IAEzE,OAAO,CAAC,CAAC,YAAY,CAAC;AACxB,CAAC,CAAC;AALW,QAAA,KAAK,SAKhB"}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
export declare const URL_PATH_MAP: {
|
|
2
|
-
HOMEPAGE: string;
|
|
3
|
-
WHY_CHOOSE_US: string;
|
|
4
|
-
ABOUT_US: string;
|
|
5
|
-
TUTORING_SERVICES: string;
|
|
6
|
-
HOME_TUTION: string;
|
|
7
|
-
HOME_TUTOR: string;
|
|
8
|
-
HOME_TUTORING: string;
|
|
9
|
-
HYBRID_TEACHER_PROFILE: string;
|
|
10
|
-
MATH_TUITION: string;
|
|
11
|
-
CENTRES: string;
|
|
12
|
-
MATHS: string;
|
|
13
|
-
ONLINE_TUITIONS: string;
|
|
14
|
-
GRADE_MATH: string;
|
|
15
|
-
ONLINE_MATH_COURSES: string;
|
|
16
|
-
TUITION_TUTORS: string;
|
|
17
|
-
TEACH: string;
|
|
18
|
-
TEACHER_PROFILE: string;
|
|
19
|
-
};
|
|
20
|
-
export declare const BRAND_PAGES: string[];
|
|
21
|
-
export declare const INTENT_PAGES: string[];
|
|
22
|
-
export declare const INTERNATIONAL_LINKS: string[];
|
|
23
|
-
export declare const CONTENT_PAGES: {
|
|
24
|
-
numbers: {
|
|
25
|
-
title: string;
|
|
26
|
-
route: string;
|
|
27
|
-
};
|
|
28
|
-
algebra: {
|
|
29
|
-
title: string;
|
|
30
|
-
route: string;
|
|
31
|
-
};
|
|
32
|
-
geometry: {
|
|
33
|
-
title: string;
|
|
34
|
-
route: string;
|
|
35
|
-
};
|
|
36
|
-
data: {
|
|
37
|
-
title: string;
|
|
38
|
-
route: string;
|
|
39
|
-
};
|
|
40
|
-
measurement: {
|
|
41
|
-
title: string;
|
|
42
|
-
route: string;
|
|
43
|
-
};
|
|
44
|
-
'commercial-math': {
|
|
45
|
-
title: string;
|
|
46
|
-
route: string;
|
|
47
|
-
};
|
|
48
|
-
trigonometry: {
|
|
49
|
-
title: string;
|
|
50
|
-
route: string;
|
|
51
|
-
};
|
|
52
|
-
calculus: {
|
|
53
|
-
title: string;
|
|
54
|
-
route: string;
|
|
55
|
-
};
|
|
56
|
-
learn: {
|
|
57
|
-
title: string;
|
|
58
|
-
route: string;
|
|
59
|
-
};
|
|
60
|
-
'multiplication-tables': {
|
|
61
|
-
title: string;
|
|
62
|
-
route: string;
|
|
63
|
-
};
|
|
64
|
-
calculators: {
|
|
65
|
-
title: string;
|
|
66
|
-
route: string;
|
|
67
|
-
};
|
|
68
|
-
'math-formulas': {
|
|
69
|
-
title: string;
|
|
70
|
-
route: string;
|
|
71
|
-
};
|
|
72
|
-
'ncert-solutions': {
|
|
73
|
-
title: string;
|
|
74
|
-
route: string;
|
|
75
|
-
};
|
|
76
|
-
'math-olympiad': {
|
|
77
|
-
title: string;
|
|
78
|
-
route: string;
|
|
79
|
-
};
|
|
80
|
-
questions: {
|
|
81
|
-
title: string;
|
|
82
|
-
route: string;
|
|
83
|
-
};
|
|
84
|
-
worksheets: {
|
|
85
|
-
title: string;
|
|
86
|
-
route: string;
|
|
87
|
-
};
|
|
88
|
-
'math-puzzles': {
|
|
89
|
-
title: string;
|
|
90
|
-
route: string;
|
|
91
|
-
};
|
|
92
|
-
'math-games': {
|
|
93
|
-
title: string;
|
|
94
|
-
route: string;
|
|
95
|
-
};
|
|
96
|
-
};
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
export const URL_PATH_MAP = {
|
|
2
|
-
HOMEPAGE: '/',
|
|
3
|
-
WHY_CHOOSE_US: '/math-online-classes',
|
|
4
|
-
ABOUT_US: '/about-us',
|
|
5
|
-
TUTORING_SERVICES: '/tutoring-services',
|
|
6
|
-
HOME_TUTION: '/home-tuition-in',
|
|
7
|
-
HOME_TUTOR: '/home-tutor',
|
|
8
|
-
HOME_TUTORING: '/home-tutoring',
|
|
9
|
-
HYBRID_TEACHER_PROFILE: '/hybrid-teacher-profile/',
|
|
10
|
-
MATH_TUITION: '/math-tuition',
|
|
11
|
-
CENTRES: '/centres/',
|
|
12
|
-
MATHS: '/maths/',
|
|
13
|
-
ONLINE_TUITIONS: '/online-tuitions',
|
|
14
|
-
GRADE_MATH: '-grade-math',
|
|
15
|
-
ONLINE_MATH_COURSES: '/online-math-courses',
|
|
16
|
-
TUITION_TUTORS: '/tuition-tutors',
|
|
17
|
-
TEACH: '/teach',
|
|
18
|
-
TEACHER_PROFILE: 'teacher-profile',
|
|
19
|
-
};
|
|
20
|
-
export const BRAND_PAGES = [URL_PATH_MAP.HOMEPAGE, URL_PATH_MAP.ABOUT_US];
|
|
21
|
-
export const INTENT_PAGES = [
|
|
22
|
-
URL_PATH_MAP.WHY_CHOOSE_US,
|
|
23
|
-
URL_PATH_MAP.TUTORING_SERVICES,
|
|
24
|
-
URL_PATH_MAP.HOME_TUTION,
|
|
25
|
-
URL_PATH_MAP.HOME_TUTOR,
|
|
26
|
-
URL_PATH_MAP.HOME_TUTORING,
|
|
27
|
-
URL_PATH_MAP.HYBRID_TEACHER_PROFILE,
|
|
28
|
-
URL_PATH_MAP.MATH_TUITION,
|
|
29
|
-
URL_PATH_MAP.CENTRES,
|
|
30
|
-
URL_PATH_MAP.MATHS,
|
|
31
|
-
URL_PATH_MAP.ONLINE_TUITIONS,
|
|
32
|
-
URL_PATH_MAP.GRADE_MATH,
|
|
33
|
-
URL_PATH_MAP.ONLINE_MATH_COURSES,
|
|
34
|
-
URL_PATH_MAP.TUITION_TUTORS,
|
|
35
|
-
URL_PATH_MAP.TEACH,
|
|
36
|
-
URL_PATH_MAP.TEACHER_PROFILE,
|
|
37
|
-
];
|
|
38
|
-
export const INTERNATIONAL_LINKS = [
|
|
39
|
-
'/en-us',
|
|
40
|
-
'/en-gb',
|
|
41
|
-
'/en-ca',
|
|
42
|
-
'/en-ae',
|
|
43
|
-
'/en-au',
|
|
44
|
-
'/en-fr',
|
|
45
|
-
'/en-de',
|
|
46
|
-
'/en-id',
|
|
47
|
-
'/en-it',
|
|
48
|
-
'/en-nl',
|
|
49
|
-
'/en-lk',
|
|
50
|
-
'/en-sg',
|
|
51
|
-
'/en-sa',
|
|
52
|
-
'/en-om',
|
|
53
|
-
'/en-bh',
|
|
54
|
-
'/en-qa',
|
|
55
|
-
'/en-no',
|
|
56
|
-
'/en-se',
|
|
57
|
-
'/en-ie',
|
|
58
|
-
];
|
|
59
|
-
export const CONTENT_PAGES = {
|
|
60
|
-
'numbers': {
|
|
61
|
-
title: 'Numbers',
|
|
62
|
-
route: '/numbers/',
|
|
63
|
-
},
|
|
64
|
-
'algebra': {
|
|
65
|
-
title: 'Algebra',
|
|
66
|
-
route: '/algebra/',
|
|
67
|
-
},
|
|
68
|
-
'geometry': {
|
|
69
|
-
title: 'Geometry',
|
|
70
|
-
route: '/geometry/',
|
|
71
|
-
},
|
|
72
|
-
'data': {
|
|
73
|
-
title: 'Data',
|
|
74
|
-
route: '/data/',
|
|
75
|
-
},
|
|
76
|
-
'measurement': {
|
|
77
|
-
title: 'Measurement',
|
|
78
|
-
route: '/measurement/',
|
|
79
|
-
},
|
|
80
|
-
'commercial-math': {
|
|
81
|
-
title: 'Commercial Math',
|
|
82
|
-
route: '/commercial-math/',
|
|
83
|
-
},
|
|
84
|
-
'trigonometry': {
|
|
85
|
-
title: 'Trigonometry',
|
|
86
|
-
route: '/trigonometry/',
|
|
87
|
-
},
|
|
88
|
-
'calculus': {
|
|
89
|
-
title: 'Calculus',
|
|
90
|
-
route: '/calculus/',
|
|
91
|
-
},
|
|
92
|
-
'learn': {
|
|
93
|
-
title: 'Blog',
|
|
94
|
-
route: '/learn/',
|
|
95
|
-
},
|
|
96
|
-
'multiplication-tables': {
|
|
97
|
-
title: 'Multiplication Tables',
|
|
98
|
-
route: '/multiplication-tables/',
|
|
99
|
-
},
|
|
100
|
-
'calculators': {
|
|
101
|
-
title: 'Calculators',
|
|
102
|
-
route: '/calculators/',
|
|
103
|
-
},
|
|
104
|
-
'math-formulas': {
|
|
105
|
-
title: 'Math Formulas',
|
|
106
|
-
route: '/math-formulas/',
|
|
107
|
-
},
|
|
108
|
-
'ncert-solutions': {
|
|
109
|
-
title: 'NCERT Solutions',
|
|
110
|
-
route: '/ncert-solutions/',
|
|
111
|
-
},
|
|
112
|
-
'math-olympiad': {
|
|
113
|
-
title: 'Math Olympiad',
|
|
114
|
-
route: '/math-olympiad/',
|
|
115
|
-
},
|
|
116
|
-
'questions': {
|
|
117
|
-
title: 'Math Questions',
|
|
118
|
-
route: '/questions/',
|
|
119
|
-
},
|
|
120
|
-
'worksheets': {
|
|
121
|
-
title: 'Math Worksheets',
|
|
122
|
-
route: '/worksheets/',
|
|
123
|
-
},
|
|
124
|
-
'math-puzzles': {
|
|
125
|
-
title: 'Math Puzzles',
|
|
126
|
-
route: '/math-puzzles/',
|
|
127
|
-
},
|
|
128
|
-
'math-games': {
|
|
129
|
-
title: 'Math Games',
|
|
130
|
-
route: '/math-games/',
|
|
131
|
-
},
|
|
132
|
-
};
|
|
133
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/constants/url-map/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,QAA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ACd,KAAK,EAAE,cAAc;QACrB,KAAK,EAAE,gBAAgB;KACxB;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,cAAc;KACtB;CACF,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function removeQueryParams(path: string): string;
|
|
2
|
-
export declare const getTopicName: (path: string) => string;
|
|
3
|
-
export declare function removeCountryPathFromUrl(path?: string): string;
|
|
4
|
-
export declare function getOrganicChannel(): string;
|
|
5
|
-
export declare const isSEO: (path: string) => boolean;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { INTERNATIONAL_LINKS, INTENT_PAGES, BRAND_PAGES, CONTENT_PAGES, } from '../constants';
|
|
2
|
-
export function removeQueryParams(path) {
|
|
3
|
-
return path ? path.split('?')[0] : '';
|
|
4
|
-
}
|
|
5
|
-
export const getTopicName = (path) => {
|
|
6
|
-
const pagePath = removeQueryParams(path);
|
|
7
|
-
const topic = (pagePath === null || pagePath === void 0 ? void 0 : pagePath.split('/').filter(name => name)[1]) || '';
|
|
8
|
-
return topic === '#' ? '' : topic;
|
|
9
|
-
};
|
|
10
|
-
export function removeCountryPathFromUrl(path = '') {
|
|
11
|
-
const herfLang = INTERNATIONAL_LINKS.filter(lang => path.includes(lang));
|
|
12
|
-
let updatedPath = path;
|
|
13
|
-
if (herfLang.length) {
|
|
14
|
-
[, updatedPath] = path.split(herfLang[0]);
|
|
15
|
-
}
|
|
16
|
-
return updatedPath;
|
|
17
|
-
}
|
|
18
|
-
export function getOrganicChannel() {
|
|
19
|
-
if (typeof window === undefined)
|
|
20
|
-
return '';
|
|
21
|
-
const pagePathWithAdditionParams = removeCountryPathFromUrl(removeQueryParams(window.location.pathname));
|
|
22
|
-
//brand pages
|
|
23
|
-
if (BRAND_PAGES.includes(pagePathWithAdditionParams)) {
|
|
24
|
-
return 'brand';
|
|
25
|
-
}
|
|
26
|
-
// seo-intent pages
|
|
27
|
-
if (INTENT_PAGES.some(pagePath => pagePathWithAdditionParams.includes(pagePath))) {
|
|
28
|
-
return 'seo-intent';
|
|
29
|
-
}
|
|
30
|
-
// seo-content pages
|
|
31
|
-
if (isSEO(pagePathWithAdditionParams)) {
|
|
32
|
-
return 'seo-content';
|
|
33
|
-
}
|
|
34
|
-
return '';
|
|
35
|
-
}
|
|
36
|
-
export const isSEO = (path) => {
|
|
37
|
-
const pageNames = Object.values(CONTENT_PAGES);
|
|
38
|
-
const matchingPage = pageNames.find(({ route }) => path.includes(route));
|
|
39
|
-
return !!matchingPage;
|
|
40
|
-
};
|
|
41
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/url-format/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,WAAW,EACX,aAAa,GACd,MAAM,cAAc,CAAC;AAEtB,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACxC,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAY,EAAE,EAAE;IAC3C,MAAM,QAAQ,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACzC,MAAM,KAAK,GAAG,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,KAAI,EAAE,CAAC;IAEjE,OAAO,KAAK,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;AACpC,CAAC,CAAC;AAEF,MAAM,UAAU,wBAAwB,CAAC,IAAI,GAAG,EAAE;IAChD,MAAM,QAAQ,GAAG,mBAAmB,CAAC,MAAM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