13 lines
68 KiB
JavaScript
13 lines
68 KiB
JavaScript
|
|
!function(t,e){for(var n in e)t[n]=e[n]}(window,function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=377)}({10:function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},100:function(t,e,n){var r=n(66),i=n(96);function o(t){if(!(this instanceof o))return new o(t);"number"==typeof t&&(t={max:t}),t||(t={}),r.EventEmitter.call(this),this.cache={},this.head=this.tail=null,this.length=0,this.max=t.max||1e3,this.maxAge=t.maxAge||0}t.exports=o,i(o,r.EventEmitter),Object.defineProperty(o.prototype,"keys",{get:function(){return Object.keys(this.cache)}}),o.prototype.clear=function(){this.cache={},this.head=this.tail=null,this.length=0},o.prototype.remove=function(t){if("string"!=typeof t&&(t=""+t),this.cache.hasOwnProperty(t)){var e=this.cache[t];return delete this.cache[t],this._unlink(t,e.prev,e.next),e.value}},o.prototype._unlink=function(t,e,n){this.length--,0===this.length?this.head=this.tail=null:this.head===t?(this.head=e,this.cache[this.head].next=null):this.tail===t?(this.tail=n,this.cache[this.tail].prev=null):(this.cache[e].next=n,this.cache[n].prev=e)},o.prototype.peek=function(t){if(this.cache.hasOwnProperty(t)){var e=this.cache[t];if(this._checkAge(t,e))return e.value}},o.prototype.set=function(t,e){var n;if("string"!=typeof t&&(t=""+t),this.cache.hasOwnProperty(t)){if((n=this.cache[t]).value=e,this.maxAge&&(n.modified=Date.now()),t===this.head)return e;this._unlink(t,n.prev,n.next)}else n={value:e,modified:0,next:null,prev:null},this.maxAge&&(n.modified=Date.now()),this.cache[t]=n,this.length===this.max&&this.evict();return this.length++,n.next=null,n.prev=this.head,this.head&&(this.cache[this.head].next=t),this.head=t,this.tail||(this.tail=t),e},o.prototype._checkAge=function(t,e){return!(this.maxAge&&Date.now()-e.modified>this.maxAge)||(this.remove(t),this.emit("evict",{key:t,value:e.value}),!1)},o.prototype.get=function(t){if("string"!=typeof t&&(t=""+t),this.cache.hasOwnProperty(t)){var e=this.cache[t];if(this._checkAge(t,e))return this.head!==t&&(t===this.tail?(this.tail=e.next,this.cache[this.tail].prev=null):this.cache[e.prev].next=e.next,this.cache[e.next].prev=e.prev,this.cache[this.head].next=t,e.prev=this.head,e.next=null,this.head=t),e.value}},o.prototype.evict=function(){if(this.tail){var t=this.tail,e=this.remove(this.tail);this.emit("evict",{key:t,value:e})}}},101:function(t,e,n){"use strict";var r=n(80),i=n(168),o=n(169),s=r.rotl32,a=r.sum32,c=r.sum32_5,l=o.ft_1,u=i.BlockHash,p=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(h,u),t.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r<n.length;r++)n[r]=s(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],o=this.h[1],u=this.h[2],h=this.h[3],f=this.h[4];for(r=0;r<n.length;r++){var m=~~(r/20),g=c(s(i,5),l(m,o,u,h),f,n[r],p[m]);f=h,h=u,u=s(o,30),o=i,i=g}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],u),this.h[3]=a(this.h[3],h),this.h[4]=a(this.h[4],f)},h.prototype._digest=fun
|
||
|
|
/*
|
||
|
|
* Exposes number format capability
|
||
|
|
*
|
||
|
|
* @copyright Copyright (c) 2013 Kevin van Zonneveld (http://kvz.io) and Contributors (http://phpjs.org/authors).
|
||
|
|
* @license See CREDITS.md
|
||
|
|
* @see https://github.com/kvz/phpjs/blob/ffe1356af23a6f2512c84c954dd4e828e92579fa/functions/strings/number_format.js
|
||
|
|
*/
|
||
|
|
function(t,e){var n=Math.pow(10,e);return""+(Math.round(t*n)/n).toFixed(e)}(i,o):""+Math.round(i)).split("."))[0].length>3&&(c[0]=c[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,s)),(c[1]||"").length<o&&(c[1]=c[1]||"",c[1]+=new Array(o-c[1].length+1).join("0")),c.join(a)}var v=s()("i18n-calypso"),_=[function(t){return t}],w={};function x(){E.throwErrors&&"undefined"!=typeof window&&window.console&&window.console.warn&&window.console.warn.apply(window.console,arguments)}function C(t){return Array.prototype.slice.call(t)}function S(t){var e=t[0];("string"!=typeof e||t.length>3||t.length>2&&"object"==typeof t[1]&&"object"==typeof t[2])&&x("Deprecated Invocation: `translate()` accepts ( string, [string], [object] ). These arguments passed:",C(t),". See https://github.com/Automattic/i18n-calypso#translate-method"),2===t.length&&"string"==typeof e&&"string"==typeof t[1]&&x("Invalid Invocation: `translate()` requires an options object for plural translations, but passed:",C(t));for(var n={},r=0;r<t.length;r++)"object"==typeof t[r]&&(n=t[r]);if("string"==typeof e?n.original=e:"object"==typeof n.original&&(n.plural=n.original.plural,n.count=n.original.count,n.original=n.original.single),"string"==typeof t[1]&&(n.plural=t[1]),void 0===n.original)throw new Error("Translate called without a `string` value as first argument.");return n}function F(t,e){var n="gettext";e.context&&(n="p"+n),"string"==typeof e.original&&"string"==typeof e.plural&&(n="n"+n);var r=function(t,e){switch(t){case"gettext":return[e.original];case"ngettext":return[e.original,e.plural,e.count];case"npgettext":return[e.context,e.original,e.plural,e.count];case"pgettext":return[e.context,e.original]}return[]}(n,e);return t[n].apply(t,r)}function k(t,e){for(var n=_.length-1;n>=0;n--){var r=_[n](Object.assign({},e));if(t.state.locale[r.original])return F(t.state.jed,r)}return null}function E(){if(!(this instanceof E))return new E;this.defaultLocaleSlug="en",this.state={numberFormatSettings:{},jed:void 0,locale:void 0,localeSlug:void 0,translations:h()({max:100})},this.componentUpdateHooks=[],this.translateHooks=[],this.stateObserver=new y.EventEmitter,this.stateObserver.setMaxListeners(0),this.configure()}E.throwErrors=!1,E.prototype.moment=m.a,E.prototype.on=function(){var t;(t=this.stateObserver).on.apply(t,arguments)},E.prototype.off=function(){var t;(t=this.stateObserver).off.apply(t,arguments)},E.prototype.emit=function(){var t;(t=this.stateObserver).emit.apply(t,arguments)},E.prototype.numberFormat=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="number"==typeof e?e:e.decimals||0,r=e.decPoint||this.state.numberFormatSettings.decimal_point||".",i=e.thousandsSep||this.state.numberFormatSettings.thousands_sep||",";return b(t,n,r,i)},E.prototype.configure=function(t){Object.assign(this,t||{}),this.setLocale()},E.prototype.setLocale=function(t){if(t&&t[""]&&t[""]["key-hash"]){var e=t[""]["key-hash"],n=function(t,e){var n=!1===e?"":String(e);if(void 0!==w[n+t])return w[n+t];var r=d()().update(t).digest("hex");return w[n+t]=e?r.substr(0,e):r},r=function(t){return function(e){return e.context?(e.original=n(e.context+String.fromCharCode(4)+e.original,t),delete e.context):e.original=n(e.original,t),e}};if("sha1"===e.substr(0,4))if(4===e.length)_.push(r(!1));else{var i=e.substr(5).indexOf("-");if(i<0){var o=Number(e.substr(5));_.push(r(o))}else for(var s=Number(e.substr(5,i)),a=Number(e.substr(6+i)),c=s;c<=a;c++)_.push(r(c))}}if(t&&t[""].localeSlug)if(t[""].localeSlug===this.state.localeSlug){if(t===this.state.locale)return;Object.assign(this.state.locale,t)}else this.state.locale=Object.assign({},t);else this.state.locale={"":{localeSlug:this.defaultLocaleSlug}};this.state.localeSlug=this.state.locale[""].localeSlug,this.state.jed=new u.a({locale_data:{messages:this.state.locale}}),m.a.locale(this.state.localeSlug),this.state.numberFormatSettings.decimal_point=F(this.state.jed,S(["number_format_decimals"])),this.state.numberFormatSettings.thousands_sep=F(this.state.jed,S(["number_format_thousands_sep"])),"number_format_decimals"===this.state.numberF
|
||
|
|
/**
|
||
|
|
* @preserve jed.js https://github.com/SlexAxton/Jed
|
||
|
|
*/
|
||
|
|
!function(n,r){var i=Array.prototype,o=Object.prototype,s=i.slice,a=o.hasOwnProperty,c=i.forEach,l={},u={forEach:function(t,e,n){var r,i,o;if(null!==t)if(c&&t.forEach===c)t.forEach(e,n);else if(t.length===+t.length){for(r=0,i=t.length;r<i;r++)if(r in t&&e.call(n,t[r],r,t)===l)return}else for(o in t)if(a.call(t,o)&&e.call(n,t[o],o,t)===l)return},extend:function(t){return this.forEach(s.call(arguments,1),(function(e){for(var n in e)t[n]=e[n]})),t}},p=function(t){if(this.defaults={locale_data:{messages:{"":{domain:"messages",lang:"en",plural_forms:"nplurals=2; plural=(n != 1);"}}},domain:"messages",debug:!1},this.options=u.extend({},this.defaults,t),this.textdomain(this.options.domain),t.domain&&!this.options.locale_data[this.options.domain])throw new Error("Text domain set to non-existent domain: `"+t.domain+"`")};function h(t){return p.PF.compile(t||"nplurals=2; plural=(n != 1);")}function f(t,e){this._key=t,this._i18n=e}p.context_delimiter=String.fromCharCode(4),u.extend(f.prototype,{onDomain:function(t){return this._domain=t,this},withContext:function(t){return this._context=t,this},ifPlural:function(t,e){return this._val=t,this._pkey=e,this},fetch:function(t){return"[object Array]"!={}.toString.call(t)&&(t=[].slice.call(arguments,0)),(t&&t.length?p.sprintf:function(t){return t})(this._i18n.dcnpgettext(this._domain,this._context,this._key,this._pkey,this._val),t)}}),u.extend(p.prototype,{translate:function(t){return new f(t,this)},textdomain:function(t){if(!t)return this._textdomain;this._textdomain=t},gettext:function(t){return this.dcnpgettext.call(this,void 0,void 0,t)},dgettext:function(t,e){return this.dcnpgettext.call(this,t,void 0,e)},dcgettext:function(t,e){return this.dcnpgettext.call(this,t,void 0,e)},ngettext:function(t,e,n){return this.dcnpgettext.call(this,void 0,void 0,t,e,n)},dngettext:function(t,e,n,r){return this.dcnpgettext.call(this,t,void 0,e,n,r)},dcngettext:function(t,e,n,r){return this.dcnpgettext.call(this,t,void 0,e,n,r)},pgettext:function(t,e){return this.dcnpgettext.call(this,void 0,t,e)},dpgettext:function(t,e,n){return this.dcnpgettext.call(this,t,e,n)},dcpgettext:function(t,e,n){return this.dcnpgettext.call(this,t,e,n)},npgettext:function(t,e,n,r){return this.dcnpgettext.call(this,void 0,t,e,n,r)},dnpgettext:function(t,e,n,r,i){return this.dcnpgettext.call(this,t,e,n,r,i)},dcnpgettext:function(t,e,n,r,i){var o;if(r=r||n,t=t||this._textdomain,!this.options)return(o=new p).dcnpgettext.call(o,void 0,void 0,n,r,i);if(!this.options.locale_data)throw new Error("No locale data provided.");if(!this.options.locale_data[t])throw new Error("Domain `"+t+"` was not found.");if(!this.options.locale_data[t][""])throw new Error("No locale meta information provided.");if(!n)throw new Error("No translation key found.");var s,a,c,l=e?e+p.context_delimiter+n:n,u=this.options.locale_data,f=u[t],m=(u.messages||this.defaults.locale_data.messages)[""],g=f[""].plural_forms||f[""]["Plural-Forms"]||f[""]["plural-forms"]||m.plural_forms||m["Plural-Forms"]||m["plural-forms"];if(void 0===i)c=0;else{if("number"!=typeof i&&(i=parseInt(i,10),isNaN(i)))throw new Error("The number that was passed in is not a number.");c=h(g)(i)}if(!f)throw new Error("No domain named `"+t+"` could be found.");return!(s=f[l])||c>s.length?(this.options.missing_key_callback&&this.options.missing_key_callback(l,t),a=[n,r],!0===this.options.debug&&console.log(a[h(g)(i)]),a[h()(i)]):(a=s[c])||(a=[n,r])[h()(i)]}});var m,g,d=function(){function t(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function e(t,e){for(var n=[];e>0;n[--e]=t);return n.join("")}var n=function(){return n.cache.hasOwnProperty(arguments[0])||(n.cache[arguments[0]]=n.parse(arguments[0])),n.format.call(null,n.cache[arguments[0]],arguments)};return n.format=function(n,r){var i,o,s,a,c,l,u,p=1,h=n.length,f="",m=[];for(o=0;o<h;o++)if("string"===(f=t(n[o])))m.push(n[o]);else if("array"===f){if((a=n[o])[2])for(i=r[p],s=0;s<a[2].length;s++){if(!i.hasOwnProperty(a[2][s]))throw d('[sprintf] property "%s" does not exist',a[2][s]);i=i[a[2][s]]}else i=a[1]?r[a[1]]:r[p
|