Bug:Fix file validation issue
[vnfsdk/refrepo.git] / vnfmarket / src / main / webapp / vnfmarket / node_modules / uglify-js / tmp / uglify-hangs2.js
1 jsworld.Locale = function(properties) {
2         
3         // LC_NUMERIC
4
5         
6         this.frac_digits = properties.frac_digits;
7         
8         
9         // may be empty string/null for currencies with no fractional part
10         if (properties.mon_decimal_point === null || properties.mon_decimal_point == "") {
11         
12                 if (this.frac_digits > 0)
13                         throw "Error: Undefined mon_decimal_point property";
14                 else
15                         properties.mon_decimal_point = "";
16         }
17         
18         if (typeof properties.mon_decimal_point != "string")
19                 throw "Error: Invalid/missing mon_decimal_point property";
20         
21         this.mon_decimal_point = properties.mon_decimal_point;
22         
23         
24         if (typeof properties.mon_thousands_sep != "string")
25                 throw "Error: Invalid/missing mon_thousands_sep property";
26         
27         this.mon_thousands_sep = properties.mon_thousands_sep;
28         
29         
30         if (typeof properties.mon_grouping != "string")
31                 throw "Error: Invalid/missing mon_grouping property";
32         
33         this.mon_grouping = properties.mon_grouping;
34         
35         
36         if (typeof properties.positive_sign != "string")
37                 throw "Error: Invalid/missing positive_sign property";
38         
39         this.positive_sign = properties.positive_sign;
40         
41         
42         if (typeof properties.negative_sign != "string")
43                 throw "Error: Invalid/missing negative_sign property";
44         
45         this.negative_sign = properties.negative_sign;
46         
47         
48         if (properties.p_cs_precedes !== 0 && properties.p_cs_precedes !== 1)
49                 throw "Error: Invalid/missing p_cs_precedes property, must be 0 or 1";
50         
51         this.p_cs_precedes = properties.p_cs_precedes;
52         
53         
54         if (properties.n_cs_precedes !== 0 && properties.n_cs_precedes !== 1)
55                 throw "Error: Invalid/missing n_cs_precedes, must be 0 or 1";
56         
57         this.n_cs_precedes = properties.n_cs_precedes;
58         
59
60         if (properties.p_sep_by_space !== 0 &&
61             properties.p_sep_by_space !== 1 &&
62             properties.p_sep_by_space !== 2)
63                 throw "Error: Invalid/missing p_sep_by_space property, must be 0, 1 or 2";
64         
65         this.p_sep_by_space = properties.p_sep_by_space;
66         
67
68         if (properties.n_sep_by_space !== 0 &&
69             properties.n_sep_by_space !== 1 &&
70             properties.n_sep_by_space !== 2)
71                 throw "Error: Invalid/missing n_sep_by_space property, must be 0, 1, or 2";
72         
73         this.n_sep_by_space = properties.n_sep_by_space;
74         
75
76         if (properties.p_sign_posn !== 0 &&
77             properties.p_sign_posn !== 1 &&
78             properties.p_sign_posn !== 2 &&
79             properties.p_sign_posn !== 3 &&
80             properties.p_sign_posn !== 4)
81                 throw "Error: Invalid/missing p_sign_posn property, must be 0, 1, 2, 3 or 4";
82         
83         this.p_sign_posn = properties.p_sign_posn;
84
85
86         if (properties.n_sign_posn !== 0 &&
87             properties.n_sign_posn !== 1 &&
88             properties.n_sign_posn !== 2 &&
89             properties.n_sign_posn !== 3 &&
90             properties.n_sign_posn !== 4)
91                 throw "Error: Invalid/missing n_sign_posn property, must be 0, 1, 2, 3 or 4";
92         
93         this.n_sign_posn = properties.n_sign_posn;
94
95
96         if (typeof properties.int_frac_digits != "number" && properties.int_frac_digits < 0)
97                 throw "Error: Invalid/missing int_frac_digits property";
98
99         this.int_frac_digits = properties.int_frac_digits;
100         
101         
102         if (properties.int_p_cs_precedes !== 0 && properties.int_p_cs_precedes !== 1)
103                 throw "Error: Invalid/missing int_p_cs_precedes property, must be 0 or 1";
104         
105         this.int_p_cs_precedes = properties.int_p_cs_precedes;
106         
107         
108         if (properties.int_n_cs_precedes !== 0 && properties.int_n_cs_precedes !== 1)
109                 throw "Error: Invalid/missing int_n_cs_precedes property, must be 0 or 1";
110         
111         this.int_n_cs_precedes = properties.int_n_cs_precedes;
112         
113
114         if (properties.int_p_sep_by_space !== 0 &&
115             properties.int_p_sep_by_space !== 1 &&
116             properties.int_p_sep_by_space !== 2)
117                 throw "Error: Invalid/missing int_p_sep_by_spacev, must be 0, 1 or 2";
118                 
119         this.int_p_sep_by_space = properties.int_p_sep_by_space;
120
121
122         if (properties.int_n_sep_by_space !== 0 &&
123             properties.int_n_sep_by_space !== 1 &&
124             properties.int_n_sep_by_space !== 2)
125                 throw "Error: Invalid/missing int_n_sep_by_space property, must be 0, 1, or 2";
126         
127         this.int_n_sep_by_space = properties.int_n_sep_by_space;
128         
129
130         if (properties.int_p_sign_posn !== 0 &&
131             properties.int_p_sign_posn !== 1 &&
132             properties.int_p_sign_posn !== 2 &&
133             properties.int_p_sign_posn !== 3 &&
134             properties.int_p_sign_posn !== 4)
135                 throw "Error: Invalid/missing int_p_sign_posn property, must be 0, 1, 2, 3 or 4";
136         
137         this.int_p_sign_posn = properties.int_p_sign_posn;
138         
139         
140         if (properties.int_n_sign_posn !== 0 &&
141             properties.int_n_sign_posn !== 1 &&
142             properties.int_n_sign_posn !== 2 &&
143             properties.int_n_sign_posn !== 3 &&
144             properties.int_n_sign_posn !== 4)
145                 throw "Error: Invalid/missing int_n_sign_posn property, must be 0, 1, 2, 3 or 4";
146
147         this.int_n_sign_posn = properties.int_n_sign_posn;
148         
149         
150         // LC_TIME
151         
152         if (properties == null || typeof properties != "object")
153                 throw "Error: Invalid/missing time locale properties";
154         
155         
156         // parse the supported POSIX LC_TIME properties
157         
158         // abday
159         try  {
160                 this.abday = this._parseList(properties.abday, 7);
161         }
162         catch (error) {
163                 throw "Error: Invalid abday property: " + error;
164         }
165         
166 }