-
Notifications
You must be signed in to change notification settings - Fork 1
/
3.efdddb8dca5e9315f62b.js
4386 lines (3751 loc) · 434 KB
/
3.efdddb8dca5e9315f62b.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(this["webpackJsonp"] = this["webpackJsonp"] || []).push([[3],{
/***/ 2713:
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {// Expose `IntlPolyfill` as global to add locale data into runtime later on.
global.IntlPolyfill = __webpack_require__(2714);
// Require all locale data for `Intl`. This module will be
// ignored when bundling for the browser with Browserify/Webpack.
__webpack_require__(2715);
// hack to export the polyfill as global Intl if needed
if (!global.Intl) {
global.Intl = global.IntlPolyfill;
global.IntlPolyfill.__applyLocaleSensitivePrototypes();
}
// providing an idiomatic api for the nodejs version of this module
module.exports = global.IntlPolyfill;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(9)))
/***/ }),
/***/ 2714:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
};
var jsx = function () {
var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7;
return function createRawReactElement(type, props, key, children) {
var defaultProps = type && type.defaultProps;
var childrenLength = arguments.length - 3;
if (!props && childrenLength !== 0) {
props = {};
}
if (props && defaultProps) {
for (var propName in defaultProps) {
if (props[propName] === void 0) {
props[propName] = defaultProps[propName];
}
}
} else if (!props) {
props = defaultProps || {};
}
if (childrenLength === 1) {
props.children = children;
} else if (childrenLength > 1) {
var childArray = Array(childrenLength);
for (var i = 0; i < childrenLength; i++) {
childArray[i] = arguments[i + 3];
}
props.children = childArray;
}
return {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key === undefined ? null : '' + key,
ref: null,
props: props,
_owner: null
};
};
}();
var asyncToGenerator = function (fn) {
return function () {
var gen = fn.apply(this, arguments);
return new Promise(function (resolve, reject) {
function step(key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
return Promise.resolve(value).then(function (value) {
return step("next", value);
}, function (err) {
return step("throw", err);
});
}
}
return step("next");
});
};
};
var classCallCheck = function (instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
};
var createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}();
var defineEnumerableProperties = function (obj, descs) {
for (var key in descs) {
var desc = descs[key];
desc.configurable = desc.enumerable = true;
if ("value" in desc) desc.writable = true;
Object.defineProperty(obj, key, desc);
}
return obj;
};
var defaults = function (obj, defaults) {
var keys = Object.getOwnPropertyNames(defaults);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var value = Object.getOwnPropertyDescriptor(defaults, key);
if (value && value.configurable && obj[key] === undefined) {
Object.defineProperty(obj, key, value);
}
}
return obj;
};
var defineProperty$1 = function (obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
};
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
var get = function get(object, property, receiver) {
if (object === null) object = Function.prototype;
var desc = Object.getOwnPropertyDescriptor(object, property);
if (desc === undefined) {
var parent = Object.getPrototypeOf(object);
if (parent === null) {
return undefined;
} else {
return get(parent, property, receiver);
}
} else if ("value" in desc) {
return desc.value;
} else {
var getter = desc.get;
if (getter === undefined) {
return undefined;
}
return getter.call(receiver);
}
};
var inherits = function (subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
};
var _instanceof = function (left, right) {
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
return right[Symbol.hasInstance](left);
} else {
return left instanceof right;
}
};
var interopRequireDefault = function (obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
};
var interopRequireWildcard = function (obj) {
if (obj && obj.__esModule) {
return obj;
} else {
var newObj = {};
if (obj != null) {
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
}
}
newObj.default = obj;
return newObj;
}
};
var newArrowCheck = function (innerThis, boundThis) {
if (innerThis !== boundThis) {
throw new TypeError("Cannot instantiate an arrow function");
}
};
var objectDestructuringEmpty = function (obj) {
if (obj == null) throw new TypeError("Cannot destructure undefined");
};
var objectWithoutProperties = function (obj, keys) {
var target = {};
for (var i in obj) {
if (keys.indexOf(i) >= 0) continue;
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
target[i] = obj[i];
}
return target;
};
var possibleConstructorReturn = function (self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
};
var selfGlobal = typeof global === "undefined" ? self : global;
var set = function set(object, property, value, receiver) {
var desc = Object.getOwnPropertyDescriptor(object, property);
if (desc === undefined) {
var parent = Object.getPrototypeOf(object);
if (parent !== null) {
set(parent, property, value, receiver);
}
} else if ("value" in desc && desc.writable) {
desc.value = value;
} else {
var setter = desc.set;
if (setter !== undefined) {
setter.call(receiver, value);
}
}
return value;
};
var slicedToArray = function () {
function sliceIterator(arr, i) {
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"]) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
return function (arr, i) {
if (Array.isArray(arr)) {
return arr;
} else if (Symbol.iterator in Object(arr)) {
return sliceIterator(arr, i);
} else {
throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
};
}();
var slicedToArrayLoose = function (arr, i) {
if (Array.isArray(arr)) {
return arr;
} else if (Symbol.iterator in Object(arr)) {
var _arr = [];
for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {
_arr.push(_step.value);
if (i && _arr.length === i) break;
}
return _arr;
} else {
throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
};
var taggedTemplateLiteral = function (strings, raw) {
return Object.freeze(Object.defineProperties(strings, {
raw: {
value: Object.freeze(raw)
}
}));
};
var taggedTemplateLiteralLoose = function (strings, raw) {
strings.raw = raw;
return strings;
};
var temporalRef = function (val, name, undef) {
if (val === undef) {
throw new ReferenceError(name + " is not defined - temporal dead zone");
} else {
return val;
}
};
var temporalUndefined = {};
var toArray = function (arr) {
return Array.isArray(arr) ? arr : Array.from(arr);
};
var toConsumableArray = function (arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
return arr2;
} else {
return Array.from(arr);
}
};
var babelHelpers$1 = Object.freeze({
jsx: jsx,
asyncToGenerator: asyncToGenerator,
classCallCheck: classCallCheck,
createClass: createClass,
defineEnumerableProperties: defineEnumerableProperties,
defaults: defaults,
defineProperty: defineProperty$1,
get: get,
inherits: inherits,
interopRequireDefault: interopRequireDefault,
interopRequireWildcard: interopRequireWildcard,
newArrowCheck: newArrowCheck,
objectDestructuringEmpty: objectDestructuringEmpty,
objectWithoutProperties: objectWithoutProperties,
possibleConstructorReturn: possibleConstructorReturn,
selfGlobal: selfGlobal,
set: set,
slicedToArray: slicedToArray,
slicedToArrayLoose: slicedToArrayLoose,
taggedTemplateLiteral: taggedTemplateLiteral,
taggedTemplateLiteralLoose: taggedTemplateLiteralLoose,
temporalRef: temporalRef,
temporalUndefined: temporalUndefined,
toArray: toArray,
toConsumableArray: toConsumableArray,
typeof: _typeof,
extends: _extends,
instanceof: _instanceof
});
var realDefineProp = function () {
var sentinel = function sentinel() {};
try {
Object.defineProperty(sentinel, 'a', {
get: function get() {
return 1;
}
});
Object.defineProperty(sentinel, 'prototype', { writable: false });
return sentinel.a === 1 && sentinel.prototype instanceof Object;
} catch (e) {
return false;
}
}();
// Need a workaround for getters in ES3
var es3 = !realDefineProp && !Object.prototype.__defineGetter__;
// We use this a lot (and need it for proto-less objects)
var hop = Object.prototype.hasOwnProperty;
// Naive defineProperty for compatibility
var defineProperty = realDefineProp ? Object.defineProperty : function (obj, name, desc) {
if ('get' in desc && obj.__defineGetter__) obj.__defineGetter__(name, desc.get);else if (!hop.call(obj, name) || 'value' in desc) obj[name] = desc.value;
};
// Array.prototype.indexOf, as good as we need it to be
var arrIndexOf = Array.prototype.indexOf || function (search) {
/*jshint validthis:true */
var t = this;
if (!t.length) return -1;
for (var i = arguments[1] || 0, max = t.length; i < max; i++) {
if (t[i] === search) return i;
}
return -1;
};
// Create an object with the specified prototype (2nd arg required for Record)
var objCreate = Object.create || function (proto, props) {
var obj = void 0;
function F() {}
F.prototype = proto;
obj = new F();
for (var k in props) {
if (hop.call(props, k)) defineProperty(obj, k, props[k]);
}
return obj;
};
// Snapshot some (hopefully still) native built-ins
var arrSlice = Array.prototype.slice;
var arrConcat = Array.prototype.concat;
var arrPush = Array.prototype.push;
var arrJoin = Array.prototype.join;
var arrShift = Array.prototype.shift;
// Naive Function.prototype.bind for compatibility
var fnBind = Function.prototype.bind || function (thisObj) {
var fn = this,
args = arrSlice.call(arguments, 1);
// All our (presently) bound functions have either 1 or 0 arguments. By returning
// different function signatures, we can pass some tests in ES3 environments
if (fn.length === 1) {
return function () {
return fn.apply(thisObj, arrConcat.call(args, arrSlice.call(arguments)));
};
}
return function () {
return fn.apply(thisObj, arrConcat.call(args, arrSlice.call(arguments)));
};
};
// Object housing internal properties for constructors
var internals = objCreate(null);
// Keep internal properties internal
var secret = Math.random();
// Helper functions
// ================
/**
* A function to deal with the inaccuracy of calculating log10 in pre-ES6
* JavaScript environments. Math.log(num) / Math.LN10 was responsible for
* causing issue #62.
*/
function log10Floor(n) {
// ES6 provides the more accurate Math.log10
if (typeof Math.log10 === 'function') return Math.floor(Math.log10(n));
var x = Math.round(Math.log(n) * Math.LOG10E);
return x - (Number('1e' + x) > n);
}
/**
* A map that doesn't contain Object in its prototype chain
*/
function Record(obj) {
// Copy only own properties over unless this object is already a Record instance
for (var k in obj) {
if (obj instanceof Record || hop.call(obj, k)) defineProperty(this, k, { value: obj[k], enumerable: true, writable: true, configurable: true });
}
}
Record.prototype = objCreate(null);
/**
* An ordered list
*/
function List() {
defineProperty(this, 'length', { writable: true, value: 0 });
if (arguments.length) arrPush.apply(this, arrSlice.call(arguments));
}
List.prototype = objCreate(null);
/**
* Constructs a regular expression to restore tainted RegExp properties
*/
function createRegExpRestore() {
if (internals.disableRegExpRestore) {
return function () {/* no-op */};
}
var regExpCache = {
lastMatch: RegExp.lastMatch || '',
leftContext: RegExp.leftContext,
multiline: RegExp.multiline,
input: RegExp.input
},
has = false;
// Create a snapshot of all the 'captured' properties
for (var i = 1; i <= 9; i++) {
has = (regExpCache['$' + i] = RegExp['$' + i]) || has;
}return function () {
// Now we've snapshotted some properties, escape the lastMatch string
var esc = /[.?*+^$[\]\\(){}|-]/g,
lm = regExpCache.lastMatch.replace(esc, '\\$&'),
reg = new List();
// If any of the captured strings were non-empty, iterate over them all
if (has) {
for (var _i = 1; _i <= 9; _i++) {
var m = regExpCache['$' + _i];
// If it's empty, add an empty capturing group
if (!m) lm = '()' + lm;
// Else find the string in lm and escape & wrap it to capture it
else {
m = m.replace(esc, '\\$&');
lm = lm.replace(m, '(' + m + ')');
}
// Push it to the reg and chop lm to make sure further groups come after
arrPush.call(reg, lm.slice(0, lm.indexOf('(') + 1));
lm = lm.slice(lm.indexOf('(') + 1);
}
}
var exprStr = arrJoin.call(reg, '') + lm;
// Shorten the regex by replacing each part of the expression with a match
// for a string of that exact length. This is safe for the type of
// expressions generated above, because the expression matches the whole
// match string, so we know each group and each segment between capturing
// groups can be matched by its length alone.
exprStr = exprStr.replace(/(\\\(|\\\)|[^()])+/g, function (match) {
return '[\\s\\S]{' + match.replace('\\', '').length + '}';
});
// Create the regular expression that will reconstruct the RegExp properties
var expr = new RegExp(exprStr, regExpCache.multiline ? 'gm' : 'g');
// Set the lastIndex of the generated expression to ensure that the match
// is found in the correct index.
expr.lastIndex = regExpCache.leftContext.length;
expr.exec(regExpCache.input);
};
}
/**
* Mimics ES5's abstract ToObject() function
*/
function toObject(arg) {
if (arg === null) throw new TypeError('Cannot convert null or undefined to object');
if ((typeof arg === 'undefined' ? 'undefined' : babelHelpers$1['typeof'](arg)) === 'object') return arg;
return Object(arg);
}
function toNumber(arg) {
if (typeof arg === 'number') return arg;
return Number(arg);
}
function toInteger(arg) {
var number = toNumber(arg);
if (isNaN(number)) return 0;
if (number === +0 || number === -0 || number === +Infinity || number === -Infinity) return number;
if (number < 0) return Math.floor(Math.abs(number)) * -1;
return Math.floor(Math.abs(number));
}
function toLength(arg) {
var len = toInteger(arg);
if (len <= 0) return 0;
if (len === Infinity) return Math.pow(2, 53) - 1;
return Math.min(len, Math.pow(2, 53) - 1);
}
/**
* Returns "internal" properties for an object
*/
function getInternalProperties(obj) {
if (hop.call(obj, '__getInternalProperties')) return obj.__getInternalProperties(secret);
return objCreate(null);
}
/**
* Defines regular expressions for various operations related to the BCP 47 syntax,
* as defined at http://tools.ietf.org/html/bcp47#section-2.1
*/
// extlang = 3ALPHA ; selected ISO 639 codes
// *2("-" 3ALPHA) ; permanently reserved
var extlang = '[a-z]{3}(?:-[a-z]{3}){0,2}';
// language = 2*3ALPHA ; shortest ISO 639 code
// ["-" extlang] ; sometimes followed by
// ; extended language subtags
// / 4ALPHA ; or reserved for future use
// / 5*8ALPHA ; or registered language subtag
var language = '(?:[a-z]{2,3}(?:-' + extlang + ')?|[a-z]{4}|[a-z]{5,8})';
// script = 4ALPHA ; ISO 15924 code
var script = '[a-z]{4}';
// region = 2ALPHA ; ISO 3166-1 code
// / 3DIGIT ; UN M.49 code
var region = '(?:[a-z]{2}|\\d{3})';
// variant = 5*8alphanum ; registered variants
// / (DIGIT 3alphanum)
var variant = '(?:[a-z0-9]{5,8}|\\d[a-z0-9]{3})';
// ; Single alphanumerics
// ; "x" reserved for private use
// singleton = DIGIT ; 0 - 9
// / %x41-57 ; A - W
// / %x59-5A ; Y - Z
// / %x61-77 ; a - w
// / %x79-7A ; y - z
var singleton = '[0-9a-wy-z]';
// extension = singleton 1*("-" (2*8alphanum))
var extension = singleton + '(?:-[a-z0-9]{2,8})+';
// privateuse = "x" 1*("-" (1*8alphanum))
var privateuse = 'x(?:-[a-z0-9]{1,8})+';
// irregular = "en-GB-oed" ; irregular tags do not match
// / "i-ami" ; the 'langtag' production and
// / "i-bnn" ; would not otherwise be
// / "i-default" ; considered 'well-formed'
// / "i-enochian" ; These tags are all valid,
// / "i-hak" ; but most are deprecated
// / "i-klingon" ; in favor of more modern
// / "i-lux" ; subtags or subtag
// / "i-mingo" ; combination
// / "i-navajo"
// / "i-pwn"
// / "i-tao"
// / "i-tay"
// / "i-tsu"
// / "sgn-BE-FR"
// / "sgn-BE-NL"
// / "sgn-CH-DE"
var irregular = '(?:en-GB-oed' + '|i-(?:ami|bnn|default|enochian|hak|klingon|lux|mingo|navajo|pwn|tao|tay|tsu)' + '|sgn-(?:BE-FR|BE-NL|CH-DE))';
// regular = "art-lojban" ; these tags match the 'langtag'
// / "cel-gaulish" ; production, but their subtags
// / "no-bok" ; are not extended language
// / "no-nyn" ; or variant subtags: their meaning
// / "zh-guoyu" ; is defined by their registration
// / "zh-hakka" ; and all of these are deprecated
// / "zh-min" ; in favor of a more modern
// / "zh-min-nan" ; subtag or sequence of subtags
// / "zh-xiang"
var regular = '(?:art-lojban|cel-gaulish|no-bok|no-nyn' + '|zh-(?:guoyu|hakka|min|min-nan|xiang))';
// grandfathered = irregular ; non-redundant tags registered
// / regular ; during the RFC 3066 era
var grandfathered = '(?:' + irregular + '|' + regular + ')';
// langtag = language
// ["-" script]
// ["-" region]
// *("-" variant)
// *("-" extension)
// ["-" privateuse]
var langtag = language + '(?:-' + script + ')?(?:-' + region + ')?(?:-' + variant + ')*(?:-' + extension + ')*(?:-' + privateuse + ')?';
// Language-Tag = langtag ; normal language tags
// / privateuse ; private use tag
// / grandfathered ; grandfathered tags
var expBCP47Syntax = RegExp('^(?:' + langtag + '|' + privateuse + '|' + grandfathered + ')$', 'i');
// Match duplicate variants in a language tag
var expVariantDupes = RegExp('^(?!x).*?-(' + variant + ')-(?:\\w{4,8}-(?!x-))*\\1\\b', 'i');
// Match duplicate singletons in a language tag (except in private use)
var expSingletonDupes = RegExp('^(?!x).*?-(' + singleton + ')-(?:\\w+-(?!x-))*\\1\\b', 'i');
// Match all extension sequences
var expExtSequences = RegExp('-' + extension, 'ig');
// Default locale is the first-added locale data for us
var defaultLocale = void 0;
function setDefaultLocale(locale) {
defaultLocale = locale;
}
// IANA Subtag Registry redundant tag and subtag maps
var redundantTags = {
tags: {
"art-lojban": "jbo",
"i-ami": "ami",
"i-bnn": "bnn",
"i-hak": "hak",
"i-klingon": "tlh",
"i-lux": "lb",
"i-navajo": "nv",
"i-pwn": "pwn",
"i-tao": "tao",
"i-tay": "tay",
"i-tsu": "tsu",
"no-bok": "nb",
"no-nyn": "nn",
"sgn-BE-FR": "sfb",
"sgn-BE-NL": "vgt",
"sgn-CH-DE": "sgg",
"zh-guoyu": "cmn",
"zh-hakka": "hak",
"zh-min-nan": "nan",
"zh-xiang": "hsn",
"sgn-BR": "bzs",
"sgn-CO": "csn",
"sgn-DE": "gsg",
"sgn-DK": "dsl",
"sgn-ES": "ssp",
"sgn-FR": "fsl",
"sgn-GB": "bfi",
"sgn-GR": "gss",
"sgn-IE": "isg",
"sgn-IT": "ise",
"sgn-JP": "jsl",
"sgn-MX": "mfs",
"sgn-NI": "ncs",
"sgn-NL": "dse",
"sgn-NO": "nsl",
"sgn-PT": "psr",
"sgn-SE": "swl",
"sgn-US": "ase",
"sgn-ZA": "sfs",
"zh-cmn": "cmn",
"zh-cmn-Hans": "cmn-Hans",
"zh-cmn-Hant": "cmn-Hant",
"zh-gan": "gan",
"zh-wuu": "wuu",
"zh-yue": "yue"
},
subtags: {
BU: "MM",
DD: "DE",
FX: "FR",
TP: "TL",
YD: "YE",
ZR: "CD",
heploc: "alalc97",
'in': "id",
iw: "he",
ji: "yi",
jw: "jv",
mo: "ro",
ayx: "nun",
bjd: "drl",
ccq: "rki",
cjr: "mom",
cka: "cmr",
cmk: "xch",
drh: "khk",
drw: "prs",
gav: "dev",
hrr: "jal",
ibi: "opa",
kgh: "kml",
lcq: "ppr",
mst: "mry",
myt: "mry",
sca: "hle",
tie: "ras",
tkk: "twm",
tlw: "weo",
tnf: "prs",
ybd: "rki",
yma: "lrr"
},
extLang: {
aao: ["aao", "ar"],
abh: ["abh", "ar"],
abv: ["abv", "ar"],
acm: ["acm", "ar"],
acq: ["acq", "ar"],
acw: ["acw", "ar"],
acx: ["acx", "ar"],
acy: ["acy", "ar"],
adf: ["adf", "ar"],
ads: ["ads", "sgn"],
aeb: ["aeb", "ar"],
aec: ["aec", "ar"],
aed: ["aed", "sgn"],
aen: ["aen", "sgn"],
afb: ["afb", "ar"],
afg: ["afg", "sgn"],
ajp: ["ajp", "ar"],
apc: ["apc", "ar"],
apd: ["apd", "ar"],
arb: ["arb", "ar"],
arq: ["arq", "ar"],
ars: ["ars", "ar"],
ary: ["ary", "ar"],
arz: ["arz", "ar"],
ase: ["ase", "sgn"],
asf: ["asf", "sgn"],
asp: ["asp", "sgn"],
asq: ["asq", "sgn"],
asw: ["asw", "sgn"],
auz: ["auz", "ar"],
avl: ["avl", "ar"],
ayh: ["ayh", "ar"],
ayl: ["ayl", "ar"],
ayn: ["ayn", "ar"],
ayp: ["ayp", "ar"],
bbz: ["bbz", "ar"],
bfi: ["bfi", "sgn"],
bfk: ["bfk", "sgn"],
bjn: ["bjn", "ms"],
bog: ["bog", "sgn"],
bqn: ["bqn", "sgn"],
bqy: ["bqy", "sgn"],
btj: ["btj", "ms"],
bve: ["bve", "ms"],
bvl: ["bvl", "sgn"],
bvu: ["bvu", "ms"],
bzs: ["bzs", "sgn"],
cdo: ["cdo", "zh"],
cds: ["cds", "sgn"],
cjy: ["cjy", "zh"],
cmn: ["cmn", "zh"],
coa: ["coa", "ms"],
cpx: ["cpx", "zh"],
csc: ["csc", "sgn"],
csd: ["csd", "sgn"],
cse: ["cse", "sgn"],
csf: ["csf", "sgn"],
csg: ["csg", "sgn"],
csl: ["csl", "sgn"],
csn: ["csn", "sgn"],
csq: ["csq", "sgn"],
csr: ["csr", "sgn"],
czh: ["czh", "zh"],
czo: ["czo", "zh"],
doq: ["doq", "sgn"],
dse: ["dse", "sgn"],
dsl: ["dsl", "sgn"],
dup: ["dup", "ms"],
ecs: ["ecs", "sgn"],
esl: ["esl", "sgn"],
esn: ["esn", "sgn"],
eso: ["eso", "sgn"],
eth: ["eth", "sgn"],
fcs: ["fcs", "sgn"],
fse: ["fse", "sgn"],
fsl: ["fsl", "sgn"],
fss: ["fss", "sgn"],
gan: ["gan", "zh"],
gds: ["gds", "sgn"],
gom: ["gom", "kok"],
gse: ["gse", "sgn"],
gsg: ["gsg", "sgn"],
gsm: ["gsm", "sgn"],
gss: ["gss", "sgn"],
gus: ["gus", "sgn"],
hab: ["hab", "sgn"],
haf: ["haf", "sgn"],
hak: ["hak", "zh"],
hds: ["hds", "sgn"],
hji: ["hji", "ms"],
hks: ["hks", "sgn"],
hos: ["hos", "sgn"],
hps: ["hps", "sgn"],
hsh: ["hsh", "sgn"],
hsl: ["hsl", "sgn"],
hsn: ["hsn", "zh"],
icl: ["icl", "sgn"],
ils: ["ils", "sgn"],
inl: ["inl", "sgn"],
ins: ["ins", "sgn"],
ise: ["ise", "sgn"],
isg: ["isg", "sgn"],
isr: ["isr", "sgn"],
jak: ["jak", "ms"],
jax: ["jax", "ms"],
jcs: ["jcs", "sgn"],
jhs: ["jhs", "sgn"],
jls: ["jls", "sgn"],
jos: ["jos", "sgn"],
jsl: ["jsl", "sgn"],
jus: ["jus", "sgn"],
kgi: ["kgi", "sgn"],
knn: ["knn", "kok"],
kvb: ["kvb", "ms"],
kvk: ["kvk", "sgn"],
kvr: ["kvr", "ms"],
kxd: ["kxd", "ms"],
lbs: ["lbs", "sgn"],
lce: ["lce", "ms"],
lcf: ["lcf", "ms"],
liw: ["liw", "ms"],
lls: ["lls", "sgn"],
lsg: ["lsg", "sgn"],
lsl: ["lsl", "sgn"],
lso: ["lso", "sgn"],
lsp: ["lsp", "sgn"],
lst: ["lst", "sgn"],
lsy: ["lsy", "sgn"],
ltg: ["ltg", "lv"],
lvs: ["lvs", "lv"],
lzh: ["lzh", "zh"],
max: ["max", "ms"],
mdl: ["mdl", "sgn"],
meo: ["meo", "ms"],
mfa: ["mfa", "ms"],
mfb: ["mfb", "ms"],
mfs: ["mfs", "sgn"],
min: ["min", "ms"],
mnp: ["mnp", "zh"],
mqg: ["mqg", "ms"],
mre: ["mre", "sgn"],
msd: ["msd", "sgn"],
msi: ["msi", "ms"],