WordPress/wp-includes/js/dist/date.min.js

21 lines
915 KiB
JavaScript
Raw Normal View History

this.wp=this.wp||{},this.wp.date=function(M){var b={};function z(p){if(b[p])return b[p].exports;var O=b[p]={i:p,l:!1,exports:{}};return M[p].call(O.exports,O,O.exports,z),O.l=!0,O.exports}return z.m=M,z.c=b,z.d=function(M,b,p){z.o(M,b)||Object.defineProperty(M,b,{enumerable:!0,get:p})},z.r=function(M){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(M,"__esModule",{value:!0})},z.t=function(M,b){if(1&b&&(M=z(M)),8&b)return M;if(4&b&&"object"==typeof M&&M&&M.__esModule)return M;var p=Object.create(null);if(z.r(p),Object.defineProperty(p,"default",{enumerable:!0,value:M}),2&b&&"string"!=typeof M)for(var O in M)z.d(p,O,function(b){return M[b]}.bind(null,O));return p},z.n=function(M){var b=M&&M.__esModule?function(){return M.default}:function(){return M};return z.d(b,"a",b),b},z.o=function(M,b){return Object.prototype.hasOwnProperty.call(M,b)},z.p="",z(z.s=263)}({172:function(M,b,z){(M.exports=z(264)).tz.load(z(265))},26:function(M,b){!function(){M.exports=this.moment}()},263:function(M,b,z){"use strict";z.r(b),z.d(b,"setSettings",function(){return c}),z.d(b,"__experimentalGetSettings",function(){return W}),z.d(b,"getSettings",function(){return d}),z.d(b,"moment",function(){return X}),z.d(b,"format",function(){return L}),z.d(b,"date",function(){return f}),z.d(b,"gmdate",function(){return a}),z.d(b,"dateI18n",function(){return N});var p=z(26),O=z.n(p),A=(z(172),z(266),z(30)),q=z.n(A),o={l10n:{locale:"en_US",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],meridiem:{am:"am",pm:"pm",AM:"AM",PM:"PM"},relative:{future:" % s from now",past:"% s ago"}},formats:{time:"g: i a",date:"F j, Y",datetime:"F j, Y g: i a",datetimeAbbreviated:"M j, Y g: i a"},timezone:{offset:"0",string:""}};function c(M){o=M;var b=O.a.locale();O.a.updateLocale(M.l10n.locale,{parentLocale:b,months:M.l10n.months,monthsShort:M.l10n.monthsShort,weekdays:M.l10n.weekdays,weekdaysShort:M.l10n.weekdaysShort,meridiem:function(b,z,p){return b<12?p?M.l10n.meridiem.am:M.l10n.meridiem.AM:p?M.l10n.meridiem.pm:M.l10n.meridiem.PM},longDateFormat:{LT:M.formats.time,LTS:null,L:null,LL:M.formats.date,LLL:M.formats.datetime,LLLL:null},relativeTime:{future:M.l10n.relative.future,past:M.l10n.relative.past,s:"seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}}),O.a.locale(b),R()}function W(){return o}function d(){return q()("wp.date.getSettings",{version:"4.4",alternative:"wp.date.__experimentalGetSettings",plugin:"Gutenberg",hint:"Unstable APIs are strongly discouraged to be used, and are subject to removal without notice."}),o}function R(){O.a.tz.add(O.a.tz.pack({name:"WP",abbrs:["WP"],untils:[null],offsets:[60*-o.timezone.offset||0]}))}var X=function(){for(var M=arguments.length,b=new Array(M),z=0;z<M;z++)b[z]=arguments[z];return O.a.tz.apply(O.a,b.concat(["WP"]))},B=60,n={d:"DD",D:"ddd",j:"D",l:"dddd",N:"E",S:function(M){var b=M.format("D");return M.format("Do").replace(b,"")},w:"d",z:function(M){return""+parseInt(M.format("DDD"),10)-1},W:"W",F:"MMMM",m:"MM",M:"MMM",n:"M",t:function(M){return M.daysInMonth()},L:function(M){return M.isLeapYear()?"1":"0"},o:"GGGG",Y:"YYYY",y:"YY",a:"a",A:"A",B:function(M){var b=O()(M).utcOffset(60),z=parseInt(b.format("s"),10),p=parseInt(b.format("m"),10),A=parseInt(b.format("H"),10);return parseInt((z+60*p+3600*A)/86.4,10)},g:"h",G:"H",h:"hh",H:"HH",i:"mm",s:"ss",u:"SSSSSS",v:"SSS",e:"zz",I:function(M){return M.isDST()?"1":"0"},O:"ZZ",P:"Z",T:"z",Z:function(M){var b=M.format("Z"),z="-"===b[0]?-1:1,p=b.substring(1).split(":");return z*(p[0]*B+p[1])*60},c:"YYYY-MM-DDTHH:mm:ssZ",r:"ddd, D MMM YYYY HH:mm:ss ZZ",U:"X"};function L(M){var b,z,p=arguments.length>1&&void 0!==arguments[1]?argume
//! version : 0.5.23
//! Copyright (c) JS Foundation and other contributors
//! license : MIT
//! github.com/moment/moment-timezone
//! moment-timezone.js
//! version : 0.5.23
//! Copyright (c) JS Foundation and other contributors
//! license : MIT
//! github.com/moment/moment-timezone
!function(q,o){"use strict";M.exports?M.exports=o(z(26)):(O=[z(26)],void 0===(A="function"==typeof(p=o)?p.apply(b,O):p)||(M.exports=A))}(0,function(M){"use strict";var b,z={},p={},O={},A={};M&&"string"==typeof M.version||t("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");var q=M.version.split("."),o=+q[0],c=+q[1];function W(M){return M>96?M-87:M>64?M-29:M-48}function d(M){var b=0,z=M.split("."),p=z[0],O=z[1]||"",A=1,q=0,o=1;for(45===M.charCodeAt(0)&&(b=1,o=-1);b<p.length;b++)q=60*q+W(p.charCodeAt(b));for(b=0;b<O.length;b++)A/=60,q+=W(O.charCodeAt(b))*A;return q*o}function R(M){for(var b=0;b<M.length;b++)M[b]=d(M[b])}function X(M,b){var z,p=[];for(z=0;z<b.length;z++)p[z]=M[b[z]];return p}function B(M){var b=M.split("|"),z=b[2].split(" "),p=b[3].split(""),O=b[4].split(" ");return R(z),R(p),R(O),function(M,b){for(var z=0;z<b;z++)M[z]=Math.round((M[z-1]||0)+6e4*M[z]);M[b-1]=1/0}(O,p.length),{name:b[0],abbrs:X(b[1].split(" "),p),offsets:X(z,p),untils:O,population:0|b[5]}}function n(M){M&&this._set(B(M))}function L(M){var b=M.toTimeString(),z=b.match(/\([a-z ]+\)/i);"GMT"===(z=z&&z[0]?(z=z[0].match(/[A-Z]/g))?z.join(""):void 0:(z=b.match(/[A-Z]{3,5}/g))?z[0]:void 0)&&(z=void 0),this.at=+M,this.abbr=z,this.offset=M.getTimezoneOffset()}function f(M){this.zone=M,this.offsetScore=0,this.abbrScore=0}function a(M,b){for(var z,p;p=6e4*((b.at-M.at)/12e4|0);)(z=new L(new Date(M.at+p))).offset===M.offset?M=z:b=z;return M}function N(M,b){return M.offsetScore!==b.offsetScore?M.offsetScore-b.offsetScore:M.abbrScore!==b.abbrScore?M.abbrScore-b.abbrScore:b.zone.population-M.zone.population}function l(M,b){var z,p;for(R(b),z=0;z<b.length;z++)p=b[z],A[p]=A[p]||{},A[p][M]=!0}function u(M){var b,z,p,q=M.length,o={},c=[];for(b=0;b<q;b++)for(z in p=A[M[b].offset]||{})p.hasOwnProperty(z)&&(o[z]=!0);for(b in o)o.hasOwnProperty(b)&&c.push(O[b]);return c}function i(){try{var M=Intl.DateTimeFormat().resolvedOptions().timeZone;if(M&&M.length>3){var b=O[e(M)];if(b)return b;t("Moment Timezone found "+M+" from the Intl api, but did not have that data loaded.")}}catch(M){}var z,p,A,q=function(){var M,b,z,p=(new Date).getFullYear()-2,O=new L(new Date(p,0,1)),A=[O];for(z=1;z<48;z++)(b=new L(new Date(p,z,1))).offset!==O.offset&&(M=a(O,b),A.push(M),A.push(new L(new Date(M.at+6e4)))),O=b;for(z=0;z<4;z++)A.push(new L(new Date(p+z,0,1))),A.push(new L(new Date(p+z,6,1)));return A}(),o=q.length,c=u(q),W=[];for(p=0;p<c.length;p++){for(z=new f(H(c[p]),o),A=0;A<o;A++)z.scoreOffsetAt(q[A]);W.push(z)}return W.sort(N),W.length>0?W[0].zone.name:void 0}function e(M){return(M||"").toLowerCase().replace(/\//g,"_")}function r(M){var b,p,A,q;for("string"==typeof M&&(M=[M]),b=0;b<M.length;b++)q=e(p=(A=M[b].split("|"))[0]),z[q]=M[b],O[q]=p,l(q,A[2].split(" "))}function H(M,b){M=e(M);var A,q=z[M];return q instanceof n?q:"string"==typeof q?(q=new n(q),z[M]=q,q):p[M]&&b!==H&&(A=H(p[M],H))?((q=z[M]=new n)._set(A),q.name=O[M],q):null}function F(M){var b,z,A,q;for("string"==typeof M&&(M=[M]),b=0;b<M.length;b++)A=e((z=M[b].split("|"))[0]),q=e(z[1]),p[A]=q,O[A]=z[0],p[q]=A,O[q]=z[1]}function T(M){var b="X"===M._f||"x"===M._f;return!(!M._a||void 0!==M._tzm||b)}function t(M){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(M)}function s(b){var z=Array.prototype.slice.call(arguments,0,-1),p=arguments[arguments.length-1],O=H(p),A=M.utc.apply(null,z);return O&&!M.isMoment(b)&&T(A)&&A.add(O.parse(A),"minutes"),A.tz(p),A}(o<2||2===o&&c<6)&&t("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js "+M.version+". See momentjs.com"),n.prototype={_set:function(M){this.name=M.name,this.abbrs=M.abbrs,this.untils=M.untils,this.offsets=M.offsets,this.population=M.population},_index:function(M){var b,z=+M,p=this.untils;for(b=0;b<p.length;b++)if(z<p[b])return b},parse:function(M){var b,z,p,O,A=+M,q=this.offsets,o=this.untils,c=o.length-1;for(O=0;O<c;O++)if(b=q[O],z=q[O+1],p=q[O?O-1:O],b<z&&s.moveAmbiguousForward?b=z:b>p&&s.moveInvalidForward&&(b=p),A<o[O]-6e4*b)return q[O];return q[c]},abbr:function(M){return this.a
//! version : 0.5.23
//! Copyright (c) JS Foundation and other contributors
//! license : MIT
//! github.com/moment/moment-timezone
//! moment-timezone-utils.js
//! version : 0.5.23
//! Copyright (c) JS Foundation and other contributors
//! license : MIT
//! github.com/moment/moment-timezone
!function(q,o){"use strict";M.exports?M.exports=o(z(172)):(O=[z(26)],void 0===(A="function"==typeof(p=o)?p.apply(b,O):p)||(M.exports=A))}(0,function(M){"use strict";if(!M.tz)throw new Error("moment-timezone-utils.js must be loaded after moment-timezone.js");var b="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX",z=1e-6;function p(M,p){for(var O="",A=Math.abs(M),q=Math.floor(A),o=function(M,p){for(var O,A=".",q="";p>0;)p-=1,M*=60,O=Math.floor(M+z),A+=b[O],M-=O,O&&(q+=A,A="");return q}(A-q,Math.min(~~p,10));q>0;)O=b[q%60]+O,q=Math.floor(q/60);return M<0&&(O="-"+O),O&&o?O+o:(o||"-"!==O)&&(O||o)||"0"}function O(M){var b,z=[],O=0;for(b=0;b<M.length-1;b++)z[b]=p(Math.round((M[b]-O)/1e3)/60,1),O=M[b];return z.join(" ")}function A(M){var b,z,O=0,A=[],q=[],o=[],c={};for(b=0;b<M.abbrs.length;b++)void 0===c[z=M.abbrs[b]+"|"+M.offsets[b]]&&(c[z]=O,A[O]=M.abbrs[b],q[O]=p(Math.round(60*M.offsets[b])/60,1),O++),o[b]=p(c[z],0);return A.join(" ")+"|"+q.join(" ")+"|"+o.join("")}function q(M){if(!M)return"";if(M<1e3)return"|"+M;var b=String(0|M).length-2;return"|"+Math.round(M/Math.pow(10,b))+"e"+b}function o(M){return function(M){if(!M.name)throw new Error("Missing name");if(!M.abbrs)throw new Error("Missing abbrs");if(!M.untils)throw new Error("Missing untils");if(!M.offsets)throw new Error("Missing offsets");if(M.offsets.length!==M.untils.length||M.offsets.length!==M.abbrs.length)throw new Error("Mismatched array lengths")}(M),[M.name,A(M),O(M.untils)+q(M.population)].join("|")}function c(M,b){var z;if(M.length!==b.length)return!1;for(z=0;z<M.length;z++)if(M[z]!==b[z])return!1;return!0}function W(M,b){return c(M.offsets,b.offsets)&&c(M.abbrs,b.abbrs)&&c(M.untils,b.untils)}function d(M,b){var z=[],p=[];return M.links&&(p=M.links.slice()),function(M,b,z,p){var O,A,q,o,c,d,R=[];for(O=0;O<M.length;O++){for(d=!1,q=M[O],A=0;A<R.length;A++)W(q,o=(c=R[A])[0])&&(q.population>o.population?c.unshift(q):q.population===o.population&&p&&p[q.name]?c.unshift(q):c.push(q),d=!0);d||R.push([q])}for(O=0;O<R.length;O++)for(c=R[O],b.push(c[0]),A=1;A<c.length;A++)z.push(c[0].name+"|"+c[A].name)}(M.zones,z,p,b),{version:M.version,zones:z,links:p.sort()}}function R(M,b,z){var p=Array.prototype.slice,O=function(M,b,z){var p,O,A=0,q=M.length+1;for(z||(z=b),b>z&&(O=b,b=z,z=O),O=0;O<M.length;O++)null!=M[O]&&((p=new Date(M[O]).getUTCFullYear())<b&&(A=O+1),p>z&&(q=Math.min(q,O+1)));return[A,q]}(M.untils,b,z),A=p.apply(M.untils,O);return A[A.length-1]=null,{name:M.name,abbrs:p.apply(M.abbrs,O),untils:A,offsets:p.apply(M.offsets,O),population:M.population}}return M.tz.pack=o,M.tz.packBase60=p,M.tz.createLinks=d,M.tz.filterYears=R,M.tz.filterLinkPack=function(M,b,z,p){var O,A,q=M.zones,c=[];for(O=0;O<q.length;O++)c[O]=R(q[O],b,z);for(A=d({zones:c,links:M.links.slice(),version:M.version},p),O=0;O<A.zones.length;O++)A.zones[O]=o(A.zones[O]);return A},M})},30:function(M,b){!function(){M.exports=this.wp.deprecated}()}});