@cuemath/web-utils 2.0.0-beta.0 → 2.1.10-beta.20
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/.eslintignore +2 -0
- package/.eslintrc.json +9 -0
- package/.husky/pre-commit +5 -0
- package/.huskyrc +5 -0
- package/.lintstagedrc.yml +5 -0
- package/.nvmrc +1 -0
- package/.prettierrc.json +1 -0
- package/.vscode/settings.json +1 -0
- package/README.md +1 -334
- package/dist/constants/country/index.d.ts +2 -0
- package/dist/constants/country/index.js +7 -0
- package/dist/constants/country/index.js.map +1 -0
- package/dist/constants/country/iso-country-code.d.ts +248 -0
- package/dist/constants/country/iso-country-code.js +252 -0
- package/dist/constants/country/iso-country-code.js.map +1 -0
- package/dist/constants/date-time/index.d.ts +17 -0
- package/dist/constants/date-time/index.js +42 -0
- package/dist/constants/date-time/index.js.map +1 -0
- package/dist/constants/date-time/international-timezones.d.ts +7 -0
- package/dist/constants/date-time/international-timezones.js +155 -0
- package/dist/constants/date-time/international-timezones.js.map +1 -0
- package/dist/constants/e-cna/index.d.ts +41 -0
- package/dist/constants/e-cna/index.js +45 -0
- package/dist/constants/e-cna/index.js.map +1 -0
- package/dist/constants/index.d.ts +2 -0
- package/dist/constants/index.js +19 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/cookie/index.d.ts +4 -0
- package/dist/cookie/index.js +46 -0
- package/dist/cookie/index.js.map +1 -0
- package/dist/country/index.d.ts +1 -0
- package/dist/country/index.js +13 -0
- package/dist/country/index.js.map +1 -0
- package/dist/date-time-helper/e-cna.d.ts +32 -0
- package/dist/date-time-helper/e-cna.js +153 -0
- package/dist/date-time-helper/e-cna.js.map +1 -0
- package/dist/date-time-helper/index.d.ts +54 -0
- package/dist/date-time-helper/index.js +290 -0
- package/dist/date-time-helper/index.js.map +1 -0
- package/dist/e-cna/flow/aggregator.d.ts +473 -0
- package/dist/e-cna/flow/aggregator.js +17 -0
- package/dist/e-cna/flow/aggregator.js.map +1 -0
- package/dist/e-cna/flow/index.d.ts +1 -0
- package/dist/e-cna/flow/index.js +18 -0
- package/dist/e-cna/flow/index.js.map +1 -0
- package/dist/e-cna/flow/variants/default.d.ts +734 -0
- package/dist/e-cna/flow/variants/default.js +94 -0
- package/dist/e-cna/flow/variants/default.js.map +1 -0
- package/dist/e-cna/flow/variants/index.d.ts +1 -0
- package/dist/e-cna/flow/variants/index.js +18 -0
- package/dist/e-cna/flow/variants/index.js.map +1 -0
- package/dist/e-cna/index.d.ts +43 -0
- package/dist/e-cna/index.js +221 -0
- package/dist/e-cna/index.js.map +1 -0
- package/dist/e-cna/slides/child_hobbies/index.d.ts +1 -0
- package/dist/e-cna/slides/child_hobbies/index.js +18 -0
- package/dist/e-cna/slides/child_hobbies/index.js.map +1 -0
- package/dist/e-cna/slides/child_hobbies/variants.d.ts +22 -0
- package/dist/e-cna/slides/child_hobbies/variants.js +26 -0
- package/dist/e-cna/slides/child_hobbies/variants.js.map +1 -0
- package/dist/e-cna/slides/child_info/index.d.ts +1 -0
- package/dist/e-cna/slides/child_info/index.js +18 -0
- package/dist/e-cna/slides/child_info/index.js.map +1 -0
- package/dist/e-cna/slides/child_info/variants.d.ts +17 -0
- package/dist/e-cna/slides/child_info/variants.js +22 -0
- package/dist/e-cna/slides/child_info/variants.js.map +1 -0
- package/dist/e-cna/slides/child_personality/index.d.ts +1 -0
- package/dist/e-cna/slides/child_personality/index.js +18 -0
- package/dist/e-cna/slides/child_personality/index.js.map +1 -0
- package/dist/e-cna/slides/child_personality/variants.d.ts +12 -0
- package/dist/e-cna/slides/child_personality/variants.js +16 -0
- package/dist/e-cna/slides/child_personality/variants.js.map +1 -0
- package/dist/e-cna/slides/curriculum/index.d.ts +1 -0
- package/dist/e-cna/slides/curriculum/index.js +18 -0
- package/dist/e-cna/slides/curriculum/index.js.map +1 -0
- package/dist/e-cna/slides/curriculum/variants.d.ts +12 -0
- package/dist/e-cna/slides/curriculum/variants.js +17 -0
- package/dist/e-cna/slides/curriculum/variants.js.map +1 -0
- package/dist/e-cna/slides/grade/index.d.ts +1 -0
- package/dist/e-cna/slides/grade/index.js +18 -0
- package/dist/e-cna/slides/grade/index.js.map +1 -0
- package/dist/e-cna/slides/grade/variants.d.ts +25 -0
- package/dist/e-cna/slides/grade/variants.js +54 -0
- package/dist/e-cna/slides/grade/variants.js.map +1 -0
- package/dist/e-cna/slides/index.d.ts +19 -0
- package/dist/e-cna/slides/index.js +36 -0
- package/dist/e-cna/slides/index.js.map +1 -0
- package/dist/e-cna/slides/intro/index.d.ts +1 -0
- package/dist/e-cna/slides/intro/index.js +18 -0
- package/dist/e-cna/slides/intro/index.js.map +1 -0
- package/dist/e-cna/slides/intro/variants.d.ts +7 -0
- package/dist/e-cna/slides/intro/variants.js +11 -0
- package/dist/e-cna/slides/intro/variants.js.map +1 -0
- package/dist/e-cna/slides/key_need_l1/index.d.ts +1 -0
- package/dist/e-cna/slides/key_need_l1/index.js +18 -0
- package/dist/e-cna/slides/key_need_l1/index.js.map +1 -0
- package/dist/e-cna/slides/key_need_l1/variants.d.ts +26 -0
- package/dist/e-cna/slides/key_need_l1/variants.js +57 -0
- package/dist/e-cna/slides/key_need_l1/variants.js.map +1 -0
- package/dist/e-cna/slides/key_need_l2/index.d.ts +1 -0
- package/dist/e-cna/slides/key_need_l2/index.js +18 -0
- package/dist/e-cna/slides/key_need_l2/index.js.map +1 -0
- package/dist/e-cna/slides/key_need_l2/variants.d.ts +67 -0
- package/dist/e-cna/slides/key_need_l2/variants.js +139 -0
- package/dist/e-cna/slides/key_need_l2/variants.js.map +1 -0
- package/dist/e-cna/slides/key_need_l3/index.d.ts +1 -0
- package/dist/e-cna/slides/key_need_l3/index.js +18 -0
- package/dist/e-cna/slides/key_need_l3/index.js.map +1 -0
- package/dist/e-cna/slides/key_need_l3/variants.d.ts +11 -0
- package/dist/e-cna/slides/key_need_l3/variants.js +15 -0
- package/dist/e-cna/slides/key_need_l3/variants.js.map +1 -0
- package/dist/e-cna/slides/math-perception/index.d.ts +1 -0
- package/dist/e-cna/slides/math-perception/index.js +18 -0
- package/dist/e-cna/slides/math-perception/index.js.map +1 -0
- package/dist/e-cna/slides/math-perception/variants.d.ts +15 -0
- package/dist/e-cna/slides/math-perception/variants.js +32 -0
- package/dist/e-cna/slides/math-perception/variants.js.map +1 -0
- package/dist/e-cna/slides/other_curriculum/index.d.ts +1 -0
- package/dist/e-cna/slides/other_curriculum/index.js +18 -0
- package/dist/e-cna/slides/other_curriculum/index.js.map +1 -0
- package/dist/e-cna/slides/other_curriculum/variants.d.ts +12 -0
- package/dist/e-cna/slides/other_curriculum/variants.js +17 -0
- package/dist/e-cna/slides/other_curriculum/variants.js.map +1 -0
- package/dist/e-cna/slides/school_performance_5_12/index.d.ts +1 -0
- package/dist/e-cna/slides/school_performance_5_12/index.js +18 -0
- package/dist/e-cna/slides/school_performance_5_12/index.js.map +1 -0
- package/dist/e-cna/slides/school_performance_5_12/variants.d.ts +15 -0
- package/dist/e-cna/slides/school_performance_5_12/variants.js +26 -0
- package/dist/e-cna/slides/school_performance_5_12/variants.js.map +1 -0
- package/dist/e-cna/slides/school_performance_kg_4/index.d.ts +1 -0
- package/dist/e-cna/slides/school_performance_kg_4/index.js +18 -0
- package/dist/e-cna/slides/school_performance_kg_4/index.js.map +1 -0
- package/dist/e-cna/slides/school_performance_kg_4/variants.d.ts +14 -0
- package/dist/e-cna/slides/school_performance_kg_4/variants.js +28 -0
- package/dist/e-cna/slides/school_performance_kg_4/variants.js.map +1 -0
- package/dist/e-cna/slides/secondary_needs/index.d.ts +1 -0
- package/dist/e-cna/slides/secondary_needs/index.js +18 -0
- package/dist/e-cna/slides/secondary_needs/index.js.map +1 -0
- package/dist/e-cna/slides/secondary_needs/variants.d.ts +14 -0
- package/dist/e-cna/slides/secondary_needs/variants.js +28 -0
- package/dist/e-cna/slides/secondary_needs/variants.js.map +1 -0
- package/dist/e-cna/slides/signup/index.d.ts +1 -0
- package/dist/e-cna/slides/signup/index.js +18 -0
- package/dist/e-cna/slides/signup/index.js.map +1 -0
- package/dist/e-cna/slides/signup/variants.d.ts +7 -0
- package/dist/e-cna/slides/signup/variants.js +11 -0
- package/dist/e-cna/slides/signup/variants.js.map +1 -0
- package/dist/e-cna/slides/signup_refer/index.d.ts +1 -0
- package/dist/e-cna/slides/signup_refer/index.js +18 -0
- package/dist/e-cna/slides/signup_refer/index.js.map +1 -0
- package/dist/e-cna/slides/signup_refer/variants.d.ts +22 -0
- package/dist/e-cna/slides/signup_refer/variants.js +34 -0
- package/dist/e-cna/slides/signup_refer/variants.js.map +1 -0
- package/dist/e-cna/slides/slot_pick/index.d.ts +1 -0
- package/dist/e-cna/slides/slot_pick/index.js +18 -0
- package/dist/e-cna/slides/slot_pick/index.js.map +1 -0
- package/dist/e-cna/slides/slot_pick/variants.d.ts +12 -0
- package/dist/e-cna/slides/slot_pick/variants.js +16 -0
- package/dist/e-cna/slides/slot_pick/variants.js.map +1 -0
- package/dist/e-cna/slides/teacher_intro/index.d.ts +1 -0
- package/dist/e-cna/slides/teacher_intro/index.js +18 -0
- package/dist/e-cna/slides/teacher_intro/index.js.map +1 -0
- package/dist/e-cna/slides/teacher_intro/variants.d.ts +78 -0
- package/dist/e-cna/slides/teacher_intro/variants.js +114 -0
- package/dist/e-cna/slides/teacher_intro/variants.js.map +1 -0
- package/dist/e-cna/utils/index.d.ts +4 -0
- package/dist/e-cna/utils/index.js +28 -0
- package/dist/e-cna/utils/index.js.map +1 -0
- package/dist/index.d.ts +7 -313
- package/dist/index.js +23 -3
- package/dist/index.js.map +1 -1
- package/dist/local-storage/index.d.ts +13 -0
- package/dist/local-storage/index.js +172 -0
- package/dist/local-storage/index.js.map +1 -0
- package/dist/object/index.d.ts +6 -0
- package/dist/object/index.js +24 -0
- package/dist/object/index.js.map +1 -0
- package/package.json +11 -52
- package/src/constants/country/index.ts +2 -0
- package/src/constants/country/iso-country-code.ts +248 -0
- package/src/constants/date-time/index.ts +43 -0
- package/src/constants/date-time/international-timezones.ts +157 -0
- package/src/constants/e-cna/index.ts +55 -0
- package/src/constants/index.ts +2 -0
- package/src/cookie/index.ts +51 -0
- package/src/country/index.ts +9 -0
- package/src/date-time-helper/e-cna.ts +205 -0
- package/src/date-time-helper/index.ts +365 -0
- package/src/e-cna/flow/aggregator.ts +12 -0
- package/src/e-cna/flow/index.ts +1 -0
- package/src/e-cna/flow/variants/default.ts +112 -0
- package/src/e-cna/flow/variants/index.ts +1 -0
- package/src/e-cna/index.ts +249 -0
- package/src/e-cna/slides/child_hobbies/index.ts +1 -0
- package/src/e-cna/slides/child_hobbies/variants.ts +24 -0
- package/src/e-cna/slides/child_info/index.ts +1 -0
- package/src/e-cna/slides/child_info/variants.ts +18 -0
- package/src/e-cna/slides/child_personality/index.ts +1 -0
- package/src/e-cna/slides/child_personality/variants.ts +12 -0
- package/src/e-cna/slides/curriculum/index.ts +1 -0
- package/src/e-cna/slides/curriculum/variants.ts +14 -0
- package/src/e-cna/slides/grade/index.ts +1 -0
- package/src/e-cna/slides/grade/variants.ts +53 -0
- package/src/e-cna/slides/index.ts +19 -0
- package/src/e-cna/slides/intro/index.ts +1 -0
- package/src/e-cna/slides/intro/variants.ts +7 -0
- package/src/e-cna/slides/key_need_l1/index.ts +1 -0
- package/src/e-cna/slides/key_need_l1/variants.ts +57 -0
- package/src/e-cna/slides/key_need_l2/index.ts +1 -0
- package/src/e-cna/slides/key_need_l2/variants.ts +143 -0
- package/src/e-cna/slides/key_need_l3/index.ts +1 -0
- package/src/e-cna/slides/key_need_l3/variants.ts +13 -0
- package/src/e-cna/slides/math-perception/index.ts +1 -0
- package/src/e-cna/slides/math-perception/variants.ts +30 -0
- package/src/e-cna/slides/other_curriculum/index.ts +1 -0
- package/src/e-cna/slides/other_curriculum/variants.ts +14 -0
- package/src/e-cna/slides/school_performance_5_12/index.ts +1 -0
- package/src/e-cna/slides/school_performance_5_12/variants.ts +23 -0
- package/src/e-cna/slides/school_performance_kg_4/index.ts +1 -0
- package/src/e-cna/slides/school_performance_kg_4/variants.ts +25 -0
- package/src/e-cna/slides/secondary_needs/index.ts +1 -0
- package/src/e-cna/slides/secondary_needs/variants.ts +26 -0
- package/src/e-cna/slides/signup/index.ts +1 -0
- package/src/e-cna/slides/signup/variants.ts +7 -0
- package/src/e-cna/slides/signup_refer/index.ts +1 -0
- package/src/e-cna/slides/signup_refer/variants.ts +30 -0
- package/src/e-cna/slides/slot_pick/index.ts +1 -0
- package/src/e-cna/slides/slot_pick/variants.ts +12 -0
- package/src/e-cna/slides/teacher_intro/index.ts +1 -0
- package/src/e-cna/slides/teacher_intro/variants.ts +112 -0
- package/src/e-cna/utils/index.ts +32 -0
- package/src/index.ts +7 -0
- package/src/local-storage/index.ts +186 -0
- package/src/object/index.ts +26 -0
- package/tsconfig.json +8 -0
- package/dist/browser.d.mts +0 -15
- package/dist/browser.d.ts +0 -15
- package/dist/browser.js +0 -2
- package/dist/browser.js.map +0 -1
- package/dist/browser.mjs +0 -2
- package/dist/browser.mjs.map +0 -1
- package/dist/chunk-5X4UT2UI.js +0 -3
- package/dist/chunk-5X4UT2UI.js.map +0 -1
- package/dist/chunk-CVZIO6BX.mjs +0 -4
- package/dist/chunk-CVZIO6BX.mjs.map +0 -1
- package/dist/chunk-LUUB665J.mjs +0 -3
- package/dist/chunk-LUUB665J.mjs.map +0 -1
- package/dist/chunk-OBXSX4MO.js +0 -3
- package/dist/chunk-OBXSX4MO.js.map +0 -1
- package/dist/chunk-SMWXEBQ2.js +0 -4
- package/dist/chunk-SMWXEBQ2.js.map +0 -1
- package/dist/chunk-TG7DRTM7.mjs +0 -3
- package/dist/chunk-TG7DRTM7.mjs.map +0 -1
- package/dist/cloudfront-DRTOCXPV.d.mts +0 -758
- package/dist/cloudfront-DRTOCXPV.d.ts +0 -758
- package/dist/cloudfront.d.mts +0 -2
- package/dist/cloudfront.d.ts +0 -2
- package/dist/cloudfront.js +0 -2
- package/dist/cloudfront.js.map +0 -1
- package/dist/cloudfront.mjs +0 -2
- package/dist/cloudfront.mjs.map +0 -1
- package/dist/data-props-RvZdA60G.d.mts +0 -157
- package/dist/data-props-RvZdA60G.d.ts +0 -157
- package/dist/date-time-helper/timezone.d.mts +0 -61
- package/dist/date-time-helper/timezone.d.ts +0 -61
- package/dist/date-time-helper/timezone.js +0 -2
- package/dist/date-time-helper/timezone.js.map +0 -1
- package/dist/date-time-helper/timezone.mjs +0 -2
- package/dist/date-time-helper/timezone.mjs.map +0 -1
- package/dist/index.d.mts +0 -313
- package/dist/index.mjs +0 -4
- package/dist/index.mjs.map +0 -1
- package/dist/metafile-cjs.json +0 -1
- package/dist/metafile-esm.json +0 -1
package/.eslintignore
ADDED
package/.eslintrc.json
ADDED
package/.huskyrc
ADDED
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
v18.12.1
|
package/.prettierrc.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"@cuemath/prettier-config"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
package/README.md
CHANGED
|
@@ -1,334 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Shared web utilities package optimized for Lambda@Edge, CloudFront, and browser environments.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- 🚀 **Lambda@Edge Ready** - Optimized bundles for AWS CloudFront edge computing
|
|
8
|
-
- 📦 **Tree-Shakeable** - Import only what you need with ESM
|
|
9
|
-
- ⚡ **Tiny Bundles** - CloudFront entry: 18KB gzipped (800KB limit)
|
|
10
|
-
- 🔧 **Dual Formats** - ESM (primary) + CJS (legacy) support
|
|
11
|
-
- 🎯 **TypeScript** - Full type definitions included
|
|
12
|
-
- 🌐 **Universal** - Works in Node.js, browsers, and edge runtimes
|
|
13
|
-
|
|
14
|
-
## Installation
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
yarn add @cuemath/web-utils
|
|
18
|
-
# or
|
|
19
|
-
npm install @cuemath/web-utils
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Entry Points
|
|
23
|
-
|
|
24
|
-
### Main Entry (Universal)
|
|
25
|
-
```typescript
|
|
26
|
-
import { formatDateTime, getCurrentTimestamp } from '@cuemath/web-utils';
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
### CloudFront/Lambda@Edge (Server-Optimized)
|
|
30
|
-
```typescript
|
|
31
|
-
import {
|
|
32
|
-
parseCloudFrontCookies,
|
|
33
|
-
getABVariantFromCookies,
|
|
34
|
-
getABExperimentCacheKey
|
|
35
|
-
} from '@cuemath/web-utils/cloudfront';
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### Browser (DOM APIs)
|
|
39
|
-
```typescript
|
|
40
|
-
import {
|
|
41
|
-
getABVariant,
|
|
42
|
-
localStorageSet,
|
|
43
|
-
getAttributes
|
|
44
|
-
} from '@cuemath/web-utils/browser';
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Timezone Functions (Optional)
|
|
48
|
-
```typescript
|
|
49
|
-
import {
|
|
50
|
-
dateByTimezone,
|
|
51
|
-
getTimezone
|
|
52
|
-
} from '@cuemath/web-utils/date-time-helper/timezone';
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## CloudFront Lambda@Edge Usage
|
|
56
|
-
|
|
57
|
-
### Origin Request Handler Example
|
|
58
|
-
|
|
59
|
-
```typescript
|
|
60
|
-
import {
|
|
61
|
-
parseCloudFrontCookies,
|
|
62
|
-
getABVariantFromCookies,
|
|
63
|
-
getABExperimentCacheKey,
|
|
64
|
-
ISO_COUNTRY_CODE,
|
|
65
|
-
EXPERIMENT_KEYS,
|
|
66
|
-
VARIANTS,
|
|
67
|
-
AB_IDENTIFIER_KEY
|
|
68
|
-
} from '@cuemath/web-utils/cloudfront';
|
|
69
|
-
|
|
70
|
-
export const handler = async (event) => {
|
|
71
|
-
const request = event.Records[0].cf.request;
|
|
72
|
-
const headers = request.headers;
|
|
73
|
-
|
|
74
|
-
// Parse CloudFront cookies (handles multiple Cookie headers)
|
|
75
|
-
const cookies = parseCloudFrontCookies(headers.cookie || []);
|
|
76
|
-
|
|
77
|
-
// Get country from CloudFront-Viewer-Country header
|
|
78
|
-
const country = headers['cloudfront-viewer-country']?.[0]?.value || 'US';
|
|
79
|
-
|
|
80
|
-
// Parse current A/B variants from cookie
|
|
81
|
-
const currentVariants = cookies[AB_IDENTIFIER_KEY]
|
|
82
|
-
? JSON.parse(decodeURIComponent(cookies[AB_IDENTIFIER_KEY]))
|
|
83
|
-
: {};
|
|
84
|
-
|
|
85
|
-
// Parse last landing page cookie
|
|
86
|
-
const lastLandingPage = cookies['lastLandingPage']
|
|
87
|
-
? JSON.parse(cookies['lastLandingPage'])
|
|
88
|
-
: { value: '', createdAt: '' };
|
|
89
|
-
|
|
90
|
-
// Get A/B variant assignments (Lambda@Edge optimized)
|
|
91
|
-
const { isABExperimentsUpdated, abExperiment } = getABVariantFromCookies(
|
|
92
|
-
request.uri,
|
|
93
|
-
country,
|
|
94
|
-
currentVariants,
|
|
95
|
-
lastLandingPage,
|
|
96
|
-
cookies, // Pre-parsed cookies
|
|
97
|
-
'debug_ab' // Debug cookie name
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
// Generate cache key for CloudFront
|
|
101
|
-
const cacheKey = getABExperimentCacheKey(abExperiment);
|
|
102
|
-
|
|
103
|
-
// Add cache key to custom header for CloudFront caching
|
|
104
|
-
request.headers['x-ab-experiments'] = [{
|
|
105
|
-
key: 'X-AB-Experiments',
|
|
106
|
-
value: cacheKey
|
|
107
|
-
}];
|
|
108
|
-
|
|
109
|
-
// Set cookie if experiments were updated
|
|
110
|
-
if (isABExperimentsUpdated) {
|
|
111
|
-
const cookieValue = encodeURIComponent(JSON.stringify(abExperiment));
|
|
112
|
-
request.headers['cookie'] = request.headers['cookie'] || [];
|
|
113
|
-
request.headers['cookie'].push({
|
|
114
|
-
key: 'Cookie',
|
|
115
|
-
value: `${AB_IDENTIFIER_KEY}=${cookieValue}`
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
return request;
|
|
120
|
-
};
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### Viewer Response Handler (Set Cookies)
|
|
124
|
-
|
|
125
|
-
```typescript
|
|
126
|
-
export const handler = async (event) => {
|
|
127
|
-
const response = event.Records[0].cf.response;
|
|
128
|
-
const request = event.Records[0].cf.request;
|
|
129
|
-
|
|
130
|
-
// Get A/B experiments from request header
|
|
131
|
-
const abHeader = request.headers['x-ab-experiments']?.[0]?.value;
|
|
132
|
-
|
|
133
|
-
if (abHeader) {
|
|
134
|
-
// Set cookie with A/B variants
|
|
135
|
-
response.headers['set-cookie'] = [{
|
|
136
|
-
key: 'Set-Cookie',
|
|
137
|
-
value: `${AB_IDENTIFIER_KEY}=${abHeader}; Path=/; Max-Age=31536000; Secure; SameSite=Lax`
|
|
138
|
-
}];
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
return response;
|
|
142
|
-
};
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
## Migration from Cloudflare Workers
|
|
146
|
-
|
|
147
|
-
### Before (Cloudflare Workers)
|
|
148
|
-
```typescript
|
|
149
|
-
import { getABVariant } from '@cuemath/web-utils';
|
|
150
|
-
|
|
151
|
-
const result = getABVariant(
|
|
152
|
-
request.url,
|
|
153
|
-
'US',
|
|
154
|
-
currentVariants,
|
|
155
|
-
lastLanding,
|
|
156
|
-
'debug_ab',
|
|
157
|
-
request.headers.get('Cookie') // String
|
|
158
|
-
);
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### After (CloudFront Lambda@Edge)
|
|
162
|
-
```typescript
|
|
163
|
-
import {
|
|
164
|
-
parseCloudFrontCookies,
|
|
165
|
-
getABVariantFromCookies
|
|
166
|
-
} from '@cuemath/web-utils/cloudfront';
|
|
167
|
-
|
|
168
|
-
// CloudFront provides cookies as header array
|
|
169
|
-
const cookies = parseCloudFrontCookies(
|
|
170
|
-
event.Records[0].cf.request.headers.cookie
|
|
171
|
-
);
|
|
172
|
-
|
|
173
|
-
const result = getABVariantFromCookies(
|
|
174
|
-
request.uri,
|
|
175
|
-
'US',
|
|
176
|
-
currentVariants,
|
|
177
|
-
lastLanding,
|
|
178
|
-
cookies, // Object
|
|
179
|
-
'debug_ab'
|
|
180
|
-
);
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
**Key Differences:**
|
|
184
|
-
1. CloudFront cookies are header arrays, not strings
|
|
185
|
-
2. Use `parseCloudFrontCookies()` to convert to object
|
|
186
|
-
3. Use `getABVariantFromCookies()` instead of `getABVariant()`
|
|
187
|
-
4. CloudFront request URI instead of full URL
|
|
188
|
-
5. Country from `cloudfront-viewer-country` header
|
|
189
|
-
|
|
190
|
-
## Bundle Sizes
|
|
191
|
-
|
|
192
|
-
| Entry Point | Gzipped | Uncompressed | Lambda@Edge Limit |
|
|
193
|
-
|-------------|---------|--------------|-------------------|
|
|
194
|
-
| CloudFront | 18 KB | ~60 KB | 1 MB (1.8% used) |
|
|
195
|
-
| Browser | 22 KB | ~90 KB | N/A |
|
|
196
|
-
| Main | 24 KB | ~95 KB | N/A |
|
|
197
|
-
| Timezone | 4 KB | ~12 KB | N/A |
|
|
198
|
-
|
|
199
|
-
All entry points are **well within Lambda@Edge limits** for origin-request handlers!
|
|
200
|
-
|
|
201
|
-
## Breaking Changes (v2.0.0)
|
|
202
|
-
|
|
203
|
-
### 1. Node.js 18+ Required
|
|
204
|
-
```json
|
|
205
|
-
{
|
|
206
|
-
"engines": {
|
|
207
|
-
"node": ">=18.0.0"
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
### 2. Timezone Functions Separated
|
|
213
|
-
```typescript
|
|
214
|
-
// ❌ Old (v1.x)
|
|
215
|
-
import { dateByTimezone } from '@cuemath/web-utils';
|
|
216
|
-
|
|
217
|
-
// ✅ New (v2.x)
|
|
218
|
-
import { dateByTimezone } from '@cuemath/web-utils/date-time-helper/timezone';
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
### 3. New CloudFront Entry Point
|
|
222
|
-
```typescript
|
|
223
|
-
// ✅ New in v2.0
|
|
224
|
-
import { parseCloudFrontCookies, getABVariantFromCookies } from '@cuemath/web-utils/cloudfront';
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
### 4. Export Paths Changed
|
|
228
|
-
```typescript
|
|
229
|
-
// ❌ Old (v1.x)
|
|
230
|
-
import utils from '@cuemath/web-utils';
|
|
231
|
-
|
|
232
|
-
// ✅ New (v2.x) - Named imports only
|
|
233
|
-
import { formatDateTime } from '@cuemath/web-utils';
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
## API Reference
|
|
237
|
-
|
|
238
|
-
### Cookie Utilities
|
|
239
|
-
|
|
240
|
-
#### `parseCookieString(cookieString: string): Record<string, string>`
|
|
241
|
-
Parse a cookie string into key-value object. Works with Cloudflare Workers and browser `document.cookie`.
|
|
242
|
-
|
|
243
|
-
#### `parseCloudFrontCookies(headers: Array<{key: string, value: string}>): Record<string, string>`
|
|
244
|
-
Parse CloudFront cookie headers (handles multiple Cookie headers). **First occurrence takes priority.**
|
|
245
|
-
|
|
246
|
-
#### `getCookie(name: string, cookie?: string): string`
|
|
247
|
-
Get a specific cookie value. Works in both browser and server contexts.
|
|
248
|
-
|
|
249
|
-
### A/B Testing
|
|
250
|
-
|
|
251
|
-
#### `getABVariantFromCookies(...): { isABExperimentsUpdated: boolean, abExperiment: Record<string, string> }`
|
|
252
|
-
Lambda@Edge optimized A/B variant assignment. Accepts pre-parsed cookies.
|
|
253
|
-
|
|
254
|
-
**Parameters:**
|
|
255
|
-
- `url: string` - Request URL/path
|
|
256
|
-
- `countryCode: string` - ISO country code
|
|
257
|
-
- `currentABVariant: Record<string, string>` - Current assignments
|
|
258
|
-
- `lastLandingPageCookies: { value: string, createdAt: string }` - Landing page data
|
|
259
|
-
- `parsedCookies: Record<string, string>` - Pre-parsed cookie object
|
|
260
|
-
- `debugABCookieName: string` - Debug cookie name
|
|
261
|
-
|
|
262
|
-
#### `getABExperimentCacheKey(experiments: Record<string, string>): string`
|
|
263
|
-
Generate CloudFront cache key from A/B experiments. Returns sorted `key=value&key=value` string.
|
|
264
|
-
|
|
265
|
-
### Date/Time Helpers (Core)
|
|
266
|
-
|
|
267
|
-
#### `formatDateTime(dateTime, format): string`
|
|
268
|
-
Format dates using dayjs format strings.
|
|
269
|
-
|
|
270
|
-
#### `getCurrentTimestamp(): number`
|
|
271
|
-
Get current Unix timestamp in seconds.
|
|
272
|
-
|
|
273
|
-
#### `convertTimeStampToSeconds(timestamp): number`
|
|
274
|
-
Normalize millisecond timestamps to seconds.
|
|
275
|
-
|
|
276
|
-
### Date/Time Helpers (Timezone - Optional)
|
|
277
|
-
|
|
278
|
-
#### `dateByTimezone(timestamp, timezone, format): string`
|
|
279
|
-
Format timestamp with IANA timezone support.
|
|
280
|
-
|
|
281
|
-
#### `getTimezone(): string`
|
|
282
|
-
Get browser's IANA timezone identifier.
|
|
283
|
-
|
|
284
|
-
## Performance Tips
|
|
285
|
-
|
|
286
|
-
### 1. Import from Specific Entry Points
|
|
287
|
-
```typescript
|
|
288
|
-
// ✅ Good - Only CloudFront bundle (18KB)
|
|
289
|
-
import { parseCloudFrontCookies } from '@cuemath/web-utils/cloudfront';
|
|
290
|
-
|
|
291
|
-
// ❌ Avoid - Pulls in entire package
|
|
292
|
-
import { parseCloudFrontCookies } from '@cuemath/web-utils';
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
### 2. Avoid Timezone Functions in Lambda@Edge
|
|
296
|
-
```typescript
|
|
297
|
-
// ✅ Good - No timezone dependencies (saves ~7KB)
|
|
298
|
-
import { formatDateTime } from '@cuemath/web-utils/cloudfront';
|
|
299
|
-
|
|
300
|
-
// ❌ Avoid - Adds timezone data bundle
|
|
301
|
-
import { dateByTimezone } from '@cuemath/web-utils/date-time-helper/timezone';
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
### 3. Use Tree-Shaking
|
|
305
|
-
```typescript
|
|
306
|
-
// ✅ Good - Only imports what you use
|
|
307
|
-
import { ISO_COUNTRY_CODE } from '@cuemath/web-utils/cloudfront';
|
|
308
|
-
|
|
309
|
-
// ❌ Avoid - Imports everything
|
|
310
|
-
import * as utils from '@cuemath/web-utils';
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
## Development
|
|
314
|
-
|
|
315
|
-
```bash
|
|
316
|
-
# Install dependencies
|
|
317
|
-
yarn install
|
|
318
|
-
|
|
319
|
-
# Build all entry points
|
|
320
|
-
yarn build
|
|
321
|
-
|
|
322
|
-
# Watch mode
|
|
323
|
-
yarn build:watch
|
|
324
|
-
|
|
325
|
-
# Check bundle sizes
|
|
326
|
-
yarn size
|
|
327
|
-
|
|
328
|
-
# Analyze bundles
|
|
329
|
-
yarn build:analyze
|
|
330
|
-
```
|
|
331
|
-
|
|
332
|
-
## License
|
|
333
|
-
|
|
334
|
-
ISC
|
|
1
|
+
### Shared UI utils package
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CUE_COUNTRY_CODE_KEY = exports.ISO_COUNTRY_CODE = void 0;
|
|
4
|
+
var iso_country_code_1 = require("./iso-country-code");
|
|
5
|
+
Object.defineProperty(exports, "ISO_COUNTRY_CODE", { enumerable: true, get: function () { return iso_country_code_1.COUNTRY_NAME_COUNTRY_CODE_MAP; } });
|
|
6
|
+
exports.CUE_COUNTRY_CODE_KEY = 'cue_country_code';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/country/index.ts"],"names":[],"mappings":";;;AAAA,uDAAuF;AAA9E,oHAAA,6BAA6B,OAAoB;AAC7C,QAAA,oBAAoB,GAAG,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
export declare const COUNTRY_NAME_COUNTRY_CODE_MAP: {
|
|
2
|
+
AFGHANISTAN: string;
|
|
3
|
+
'ALAND ISLANDS': string;
|
|
4
|
+
ALBANIA: string;
|
|
5
|
+
ALGERIA: string;
|
|
6
|
+
'AMERICAN SAMOA': string;
|
|
7
|
+
ANDORRA: string;
|
|
8
|
+
ANGOLA: string;
|
|
9
|
+
ANGUILLA: string;
|
|
10
|
+
ANTARCTICA: string;
|
|
11
|
+
'ANTIGUA AND BARBUDA': string;
|
|
12
|
+
ARGENTINA: string;
|
|
13
|
+
ARMENIA: string;
|
|
14
|
+
ARUBA: string;
|
|
15
|
+
AUSTRALIA: string;
|
|
16
|
+
AUSTRIA: string;
|
|
17
|
+
AZERBAIJAN: string;
|
|
18
|
+
BAHAMAS: string;
|
|
19
|
+
BAHRAIN: string;
|
|
20
|
+
BANGLADESH: string;
|
|
21
|
+
BARBADOS: string;
|
|
22
|
+
BELARUS: string;
|
|
23
|
+
BELGIUM: string;
|
|
24
|
+
BELIZE: string;
|
|
25
|
+
BENIN: string;
|
|
26
|
+
BERMUDA: string;
|
|
27
|
+
BHUTAN: string;
|
|
28
|
+
BOLIVIA: string;
|
|
29
|
+
'BOSNIA AND HERZEGOVINA': string;
|
|
30
|
+
BOTSWANA: string;
|
|
31
|
+
'BOUVET ISLAND': string;
|
|
32
|
+
BRAZIL: string;
|
|
33
|
+
'BRITISH INDIAN OCEAN TERRITORY': string;
|
|
34
|
+
'BRUNEI DARUSSALAM': string;
|
|
35
|
+
BULGARIA: string;
|
|
36
|
+
'BURKINA FASO': string;
|
|
37
|
+
BURUNDI: string;
|
|
38
|
+
CAMBODIA: string;
|
|
39
|
+
CAMEROON: string;
|
|
40
|
+
CANADA: string;
|
|
41
|
+
'CAPE VERDE': string;
|
|
42
|
+
'CAYMAN ISLANDS': string;
|
|
43
|
+
'CENTRAL AFRICAN REPUBLIC': string;
|
|
44
|
+
CHAD: string;
|
|
45
|
+
CHILE: string;
|
|
46
|
+
CHINA: string;
|
|
47
|
+
'CHRISTMAS ISLAND': string;
|
|
48
|
+
'COCOS (KEELING) ISLANDS': string;
|
|
49
|
+
COLOMBIA: string;
|
|
50
|
+
COMOROS: string;
|
|
51
|
+
CONGO: string;
|
|
52
|
+
'CONGO, DEMOCRATIC REPUBLIC': string;
|
|
53
|
+
'COOK ISLANDS': string;
|
|
54
|
+
'COSTA RICA': string;
|
|
55
|
+
'COTE D"IVOIRE': string;
|
|
56
|
+
CROATIA: string;
|
|
57
|
+
CUBA: string;
|
|
58
|
+
CYPRUS: string;
|
|
59
|
+
'CZECH REPUBLIC': string;
|
|
60
|
+
DENMARK: string;
|
|
61
|
+
DJIBOUTI: string;
|
|
62
|
+
DOMINICA: string;
|
|
63
|
+
'DOMINICAN REPUBLIC': string;
|
|
64
|
+
ECUADOR: string;
|
|
65
|
+
EGYPT: string;
|
|
66
|
+
'EL SALVADOR': string;
|
|
67
|
+
'EQUATORIAL GUINEA': string;
|
|
68
|
+
ERITREA: string;
|
|
69
|
+
ESTONIA: string;
|
|
70
|
+
ETHIOPIA: string;
|
|
71
|
+
'FALKLAND ISLANDS (MALVINAS)': string;
|
|
72
|
+
'FAROE ISLANDS': string;
|
|
73
|
+
FIJI: string;
|
|
74
|
+
FINLAND: string;
|
|
75
|
+
FRANCE: string;
|
|
76
|
+
'FRENCH GUIANA': string;
|
|
77
|
+
'FRENCH POLYNESIA': string;
|
|
78
|
+
'FRENCH SOUTHERN TERRITORIES': string;
|
|
79
|
+
GABON: string;
|
|
80
|
+
GAMBIA: string;
|
|
81
|
+
GEORGIA: string;
|
|
82
|
+
GERMANY: string;
|
|
83
|
+
GHANA: string;
|
|
84
|
+
GIBRALTAR: string;
|
|
85
|
+
GREECE: string;
|
|
86
|
+
GREENLAND: string;
|
|
87
|
+
GRENADA: string;
|
|
88
|
+
GUADELOUPE: string;
|
|
89
|
+
GUAM: string;
|
|
90
|
+
GUATEMALA: string;
|
|
91
|
+
GUERNSEY: string;
|
|
92
|
+
GUINEA: string;
|
|
93
|
+
'GUINEA-BISSAU': string;
|
|
94
|
+
GUYANA: string;
|
|
95
|
+
HAITI: string;
|
|
96
|
+
'HEARD ISLAND & MCDONALD ISLANDS': string;
|
|
97
|
+
'HOLY SEE (VATICAN CITY STATE)': string;
|
|
98
|
+
HONDURAS: string;
|
|
99
|
+
'HONG KONG': string;
|
|
100
|
+
HUNGARY: string;
|
|
101
|
+
ICELAND: string;
|
|
102
|
+
INDIA: string;
|
|
103
|
+
INDONESIA: string;
|
|
104
|
+
'IRAN, ISLAMIC REPUBLIC OF': string;
|
|
105
|
+
IRAQ: string;
|
|
106
|
+
IRELAND: string;
|
|
107
|
+
'ISLE OF MAN': string;
|
|
108
|
+
ISRAEL: string;
|
|
109
|
+
ITALY: string;
|
|
110
|
+
JAMAICA: string;
|
|
111
|
+
JAPAN: string;
|
|
112
|
+
JERSEY: string;
|
|
113
|
+
JORDAN: string;
|
|
114
|
+
KAZAKHSTAN: string;
|
|
115
|
+
KENYA: string;
|
|
116
|
+
KIRIBATI: string;
|
|
117
|
+
KOREA: string;
|
|
118
|
+
'NORTH KOREA': string;
|
|
119
|
+
KUWAIT: string;
|
|
120
|
+
KYRGYZSTAN: string;
|
|
121
|
+
'LAO PEOPLE"S DEMOCRATIC REPUBLIC': string;
|
|
122
|
+
LATVIA: string;
|
|
123
|
+
LEBANON: string;
|
|
124
|
+
LESOTHO: string;
|
|
125
|
+
LIBERIA: string;
|
|
126
|
+
'LIBYAN ARAB JAMAHIRIYA': string;
|
|
127
|
+
LIECHTENSTEIN: string;
|
|
128
|
+
LITHUANIA: string;
|
|
129
|
+
LUXEMBOURG: string;
|
|
130
|
+
MACAO: string;
|
|
131
|
+
MACEDONIA: string;
|
|
132
|
+
MADAGASCAR: string;
|
|
133
|
+
MALAWI: string;
|
|
134
|
+
MALAYSIA: string;
|
|
135
|
+
MALDIVES: string;
|
|
136
|
+
MALI: string;
|
|
137
|
+
MALTA: string;
|
|
138
|
+
'MARSHALL ISLANDS': string;
|
|
139
|
+
MARTINIQUE: string;
|
|
140
|
+
MAURITANIA: string;
|
|
141
|
+
MAURITIUS: string;
|
|
142
|
+
MAYOTTE: string;
|
|
143
|
+
MEXICO: string;
|
|
144
|
+
'MICRONESIA, FEDERATED STATES OF': string;
|
|
145
|
+
MOLDOVA: string;
|
|
146
|
+
MONACO: string;
|
|
147
|
+
MONGOLIA: string;
|
|
148
|
+
MONTENEGRO: string;
|
|
149
|
+
MONTSERRAT: string;
|
|
150
|
+
MOROCCO: string;
|
|
151
|
+
MOZAMBIQUE: string;
|
|
152
|
+
MYANMAR: string;
|
|
153
|
+
NAMIBIA: string;
|
|
154
|
+
NAURU: string;
|
|
155
|
+
NEPAL: string;
|
|
156
|
+
NETHERLANDS: string;
|
|
157
|
+
'NETHERLANDS ANTILLES': string;
|
|
158
|
+
'NEW CALEDONIA': string;
|
|
159
|
+
'NEW ZEALAND': string;
|
|
160
|
+
NICARAGUA: string;
|
|
161
|
+
NIGER: string;
|
|
162
|
+
NIGERIA: string;
|
|
163
|
+
NIUE: string;
|
|
164
|
+
'NORFOLK ISLAND': string;
|
|
165
|
+
'NORTHERN MARIANA ISLANDS': string;
|
|
166
|
+
NORWAY: string;
|
|
167
|
+
OMAN: string;
|
|
168
|
+
PAKISTAN: string;
|
|
169
|
+
PALAU: string;
|
|
170
|
+
'PALESTINIAN TERRITORY, OCCUPIED': string;
|
|
171
|
+
PANAMA: string;
|
|
172
|
+
'PAPUA NEW GUINEA': string;
|
|
173
|
+
PARAGUAY: string;
|
|
174
|
+
PERU: string;
|
|
175
|
+
PHILIPPINES: string;
|
|
176
|
+
PITCAIRN: string;
|
|
177
|
+
POLAND: string;
|
|
178
|
+
PORTUGAL: string;
|
|
179
|
+
'PUERTO RICO': string;
|
|
180
|
+
QATAR: string;
|
|
181
|
+
REUNION: string;
|
|
182
|
+
ROMANIA: string;
|
|
183
|
+
'RUSSIAN FEDERATION': string;
|
|
184
|
+
RWANDA: string;
|
|
185
|
+
'SAINT BARTHELEMY': string;
|
|
186
|
+
'SAINT HELENA': string;
|
|
187
|
+
'SAINT KITTS AND NEVIS': string;
|
|
188
|
+
'SAINT LUCIA': string;
|
|
189
|
+
'SAINT MARTIN': string;
|
|
190
|
+
'SAINT PIERRE AND MIQUELON': string;
|
|
191
|
+
'SAINT VINCENT AND GRENADINES': string;
|
|
192
|
+
SAMOA: string;
|
|
193
|
+
'SAN MARINO': string;
|
|
194
|
+
'SAO TOME AND PRINCIPE': string;
|
|
195
|
+
'SAUDI ARABIA': string;
|
|
196
|
+
SENEGAL: string;
|
|
197
|
+
SERBIA: string;
|
|
198
|
+
SEYCHELLES: string;
|
|
199
|
+
'SIERRA LEONE': string;
|
|
200
|
+
SINGAPORE: string;
|
|
201
|
+
SLOVAKIA: string;
|
|
202
|
+
SLOVENIA: string;
|
|
203
|
+
'SOLOMON ISLANDS': string;
|
|
204
|
+
SOMALIA: string;
|
|
205
|
+
'SOUTH AFRICA': string;
|
|
206
|
+
'SOUTH GEORGIA AND SANDWICH ISL.': string;
|
|
207
|
+
SPAIN: string;
|
|
208
|
+
'SRI LANKA': string;
|
|
209
|
+
SUDAN: string;
|
|
210
|
+
SURINAME: string;
|
|
211
|
+
'SVALBARD AND JAN MAYEN': string;
|
|
212
|
+
SWAZILAND: string;
|
|
213
|
+
SWEDEN: string;
|
|
214
|
+
SWITZERLAND: string;
|
|
215
|
+
'SYRIAN ARAB REPUBLIC': string;
|
|
216
|
+
TAIWAN: string;
|
|
217
|
+
TAJIKISTAN: string;
|
|
218
|
+
TANZANIA: string;
|
|
219
|
+
THAILAND: string;
|
|
220
|
+
'TIMOR-LESTE': string;
|
|
221
|
+
TOGO: string;
|
|
222
|
+
TOKELAU: string;
|
|
223
|
+
TONGA: string;
|
|
224
|
+
'TRINIDAD AND TOBAGO': string;
|
|
225
|
+
TUNISIA: string;
|
|
226
|
+
TURKEY: string;
|
|
227
|
+
TURKMENISTAN: string;
|
|
228
|
+
'TURKS AND CAICOS ISLANDS': string;
|
|
229
|
+
TUVALU: string;
|
|
230
|
+
UGANDA: string;
|
|
231
|
+
UKRAINE: string;
|
|
232
|
+
'UNITED ARAB EMIRATES': string;
|
|
233
|
+
'UNITED KINGDOM': string;
|
|
234
|
+
'UNITED STATES': string;
|
|
235
|
+
'UNITED STATES OUTLYING ISLANDS': string;
|
|
236
|
+
URUGUAY: string;
|
|
237
|
+
UZBEKISTAN: string;
|
|
238
|
+
VANUATU: string;
|
|
239
|
+
VENEZUELA: string;
|
|
240
|
+
VIETNAM: string;
|
|
241
|
+
'VIRGIN ISLANDS, BRITISH': string;
|
|
242
|
+
'VIRGIN ISLANDS, U.S.': string;
|
|
243
|
+
'WALLIS AND FUTUNA': string;
|
|
244
|
+
'WESTERN SAHARA': string;
|
|
245
|
+
YEMEN: string;
|
|
246
|
+
ZAMBIA: string;
|
|
247
|
+
ZIMBABWE: string;
|
|
248
|
+
};
|