6 lines
1.2 KiB
JavaScript
6 lines
1.2 KiB
JavaScript
|
|
/*!
|
||
|
|
* CLDR JavaScript Library v0.5.1 2019-01-21T13:43Z MIT license © Rafael Xavier
|
||
|
|
* http://git.io/h4lmVg
|
||
|
|
*/
|
||
|
|
!function(e){"function"==typeof define&&define.amd?define(["../cldr"],e):"object"==typeof module&&"object"==typeof module.exports?module.exports=e(require("../cldr")):e(Cldr)}(function(e){var t=e._coreLoad,r=e._jsonMerge,o=e._pathNormalize,n=e._resourceGet,a=e._validatePresence,i=e._validateTypePath,u=function(e,t){var r,a;if("root"!==t)return r=o(["supplemental/parentLocales/parentLocale",t]),(a=n(e._resolved,r)||n(e._raw,r))?a:(a=t.substr(0,t.lastIndexOf(e.localeSep)),a?a:"root")},d=function(e,t,r){var o,n=e,a=t.length;for(o=0;o<a-1;o++)n[t[o]]||(n[t[o]]={}),n=n[t[o]];n[t[o]]=r},l=function(){var e;return e=function(t,a,i,l,f){var c,s,p;if("undefined"!=typeof a&&a!==f)return c=o(i,l),p=n(t._resolved,c),void 0!==p&&"object"!=typeof p?p:(p=n(t._raw,c),void 0===p&&(s=u(t,a),p=e(t,s,i,r(l,{bundle:s}),a)),void 0!==p&&d(t._resolved,c,p),p)}}();return e._raw={},e.load=function(){e._raw=t(e,e._raw,arguments)},e.prototype.get=function(t){return a(t,"path"),i(t,"path"),l(e,this.attributes&&this.attributes.bundle||"",t,this.attributes)},e._eventInit&&e._eventInit(),e});
|