/*! * Globalize Runtime v1.1.0-rc.1 2015-08-23T14:55Z Released under the MIT license * http://git.io/TrdQbw */ (function(a,b){if(typeof define==="function"&&define.amd){define(b)}else{if(typeof exports==="object"){module.exports=b()}else{a.Globalize=b()}}}(this,function(){var b=function(n){return typeof n==="string"?n:(typeof n==="number"?""+n:JSON.stringify(n))};var c=function(n,o){n=n.replace(/{[0-9a-zA-Z-_. ]+}/g,function(p){p=p.replace(/^{([^}]*)}$/,"$1");return b(o[p])});return n};var l=function(){var n=arguments[0],o=[].slice.call(arguments,1);o.forEach(function(p){var q;for(q in p){n[q]=p[q]}});return n};var d=function(q,p,n){var o;p=q+(p?": "+c(p,n):"");o=new Error(p);o.code=q;l(o,n);return o};var f=function(n){return[].reduce.call(n,function(q,o){var p=o.charCodeAt(0);q=((q<<5)-q)+p;return q|0},0)};var k=function(r,o,p,n){var q;n=n||JSON.stringify(p);q=f(r+o+n);return q>0?"a"+q:"b"+Math.abs(q)};var i=function(q,p,n,o){if(!n){throw d(q,p,o)}};var e=function(o,n){i("E_MISSING_PARAMETER","Missing required parameter `{name}`.",o!==undefined,{name:n})};var m=function(q,o,n,p){i("E_INVALID_PAR_TYPE","Invalid `{name}` parameter ({value}). {expected} expected.",n,{expected:p,name:o,value:q})};var j=function(o,n){m(o,n,o===undefined||typeof o==="string","a string")};var h=function(n){return n.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")};var g=function(q,p,n){var o;if(typeof q!=="string"){q=String(q)}for(o=q.length;o