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

21 lines
188 KiB
JavaScript
Raw Normal View History

this.wp=this.wp||{},this.wp.date=function(c){var M={};function z(o){if(M[o])return M[o].exports;var A=M[o]={i:o,l:!1,exports:{}};return c[o].call(A.exports,A,A.exports,z),A.l=!0,A.exports}return z.m=c,z.c=M,z.d=function(c,M,o){z.o(c,M)||Object.defineProperty(c,M,{enumerable:!0,get:o})},z.r=function(c){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})},z.t=function(c,M){if(1&M&&(c=z(c)),8&M)return c;if(4&M&&"object"==typeof c&&c&&c.__esModule)return c;var o=Object.create(null);if(z.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:c}),2&M&&"string"!=typeof c)for(var A in c)z.d(o,A,function(M){return c[M]}.bind(null,A));return o},z.n=function(c){var M=c&&c.__esModule?function(){return c.default}:function(){return c};return z.d(M,"a",M),M},z.o=function(c,M){return Object.prototype.hasOwnProperty.call(c,M)},z.p="",z(z.s=338)}({154:function(c,M,z){(c.exports=z(339)).tz.load(z(340))},28:function(c,M){!function(){c.exports=this.moment}()},338:function(c,M,z){"use strict";z.r(M),z.d(M,"setSettings",function(){return p}),z.d(M,"getSettings",function(){return n}),z.d(M,"moment",function(){return L}),z.d(M,"format",function(){return i}),z.d(M,"date",function(){return e}),z.d(M,"gmdate",function(){return N}),z.d(M,"dateI18n",function(){return d});var o=z(28),A=z.n(o),b=(z(154),z(341),{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"},timezone:{offset:"0",string:""}});function p(c){b=c;var M=A.a.locale();A.a.updateLocale(c.l10n.locale,{parentLocale:M,months:c.l10n.months,monthsShort:c.l10n.monthsShort,weekdays:c.l10n.weekdays,weekdaysShort:c.l10n.weekdaysShort,meridiem:function(M,z,o){return M<12?o?c.l10n.meridiem.am:c.l10n.meridiem.AM:o?c.l10n.meridiem.pm:c.l10n.meridiem.PM},longDateFormat:{LT:c.formats.time,LTS:null,L:null,LL:c.formats.date,LLL:c.formats.datetime,LLLL:null},relativeTime:{future:c.l10n.relative.future,past:c.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"}}),A.a.locale(M),a()}function n(){return b}function a(){A.a.tz.add(A.a.tz.pack({name:"WP",abbrs:["WP"],untils:[null],offsets:[60*-b.timezone.offset||0]}))}var L=function(){for(var c=arguments.length,M=new Array(c),z=0;z<c;z++)M[z]=arguments[z];return A.a.tz.apply(A.a,M.concat(["WP"]))},O=60,q={d:"DD",D:"ddd",j:"D",l:"dddd",N:"E",S:function(c){var M=c.format("D");return c.format("Do").replace(M,"")},w:"d",z:function(c){return""+parseInt(c.format("DDD"),10)-1},W:"W",F:"MMMM",m:"MM",M:"MMM",n:"M",t:function(c){return c.daysInMonth()},L:function(c){return c.isLeapYear()?"1":"0"},o:"GGGG",Y:"YYYY",y:"YY",a:"a",A:"A",B:function(c){var M=A()(c).utcOffset(60),z=parseInt(M.format("s"),10),o=parseInt(M.format("m"),10),b=parseInt(M.format("H"),10);return parseInt((z+60*o+3600*b)/86.4,10)},g:"h",G:"H",h:"hh",H:"HH",i:"mm",s:"ss",u:"SSSSSS",v:"SSS",e:"zz",I:function(c){return c.isDST()?"1":"0"},O:"ZZ",P:"Z",T:"z",Z:function(c){var M=c.format("Z"),z="-"===M[0]?-1:1,o=M.substring(1).split(":");return z*(o[0]*O+o[1])*60},c:"YYYY-MM-DDTHH:mm:ssZ",r:"ddd, D MMM YYYY HH:mm:ss ZZ",U:"X"};function i(c){var M,z,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,b=[],p=A()(o);for(M=0;M<c.length;M++)"\\"!==(z=c[M])?z in q?"string"!=typeof q[z]?b.push("["+q[z](p)+"]"):b.push(q[z]):b.push("["+z+"]"):(M++,b.push("["+c[M]+"]"));return b=b.join("[]"),p.format(b)}function e(c){var M=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,z=b.timezone.offset*O;return i(c,A()(M).utcO
//! version : 0.5.21
//! Copyright (c) JS Foundation and other contributors
//! license : MIT
//! github.com/moment/moment-timezone
//! moment-timezone.js
//! version : 0.5.21
//! Copyright (c) JS Foundation and other contributors
//! license : MIT
//! github.com/moment/moment-timezone
!function(p,n){"use strict";"object"==typeof c&&c.exports?c.exports=n(z(28)):(A=[z(28)],void 0===(b="function"==typeof(o=n)?o.apply(M,A):o)||(c.exports=b))}(0,function(c){"use strict";var M,z={},o={},A={},b={};c&&"string"==typeof c.version||C("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");var p=c.version.split("."),n=+p[0],a=+p[1];function L(c){return c>96?c-87:c>64?c-29:c-48}function O(c){var M=0,z=c.split("."),o=z[0],A=z[1]||"",b=1,p=0,n=1;for(45===c.charCodeAt(0)&&(M=1,n=-1);M<o.length;M++)p=60*p+L(o.charCodeAt(M));for(M=0;M<A.length;M++)b/=60,p+=L(A.charCodeAt(M))*b;return p*n}function q(c){for(var M=0;M<c.length;M++)c[M]=O(c[M])}function i(c,M){var z,o=[];for(z=0;z<M.length;z++)o[z]=c[M[z]];return o}function e(c){var M=c.split("|"),z=M[2].split(" "),o=M[3].split(""),A=M[4].split(" ");return q(z),q(o),q(A),function(c,M){for(var z=0;z<M;z++)c[z]=Math.round((c[z-1]||0)+6e4*c[z]);c[M-1]=1/0}(A,o.length),{name:M[0],abbrs:i(M[1].split(" "),o),offsets:i(z,o),untils:A,population:0|M[5]}}function N(c){c&&this._set(e(c))}function d(c){var M=c.toTimeString(),z=M.match(/\([a-z ]+\)/i);"GMT"===(z=z&&z[0]?(z=z[0].match(/[A-Z]/g))?z.join(""):void 0:(z=M.match(/[A-Z]{3,5}/g))?z[0]:void 0)&&(z=void 0),this.at=+c,this.abbr=z,this.offset=c.getTimezoneOffset()}function W(c){this.zone=c,this.offsetScore=0,this.abbrScore=0}function f(c,M){for(var z,o;o=6e4*((M.at-c.at)/12e4|0);)(z=new d(new Date(c.at+o))).offset===c.offset?c=z:M=z;return c}function r(c,M){return c.offsetScore!==M.offsetScore?c.offsetScore-M.offsetScore:c.abbrScore!==M.abbrScore?c.abbrScore-M.abbrScore:M.zone.population-c.zone.population}function X(c,M){var z,o;for(q(M),z=0;z<M.length;z++)o=M[z],b[o]=b[o]||{},b[o][c]=!0}function B(c){var M,z,o,p=c.length,n={},a=[];for(M=0;M<p;M++)for(z in o=b[c[M].offset]||{})o.hasOwnProperty(z)&&(n[z]=!0);for(M in n)n.hasOwnProperty(M)&&a.push(A[M]);return a}function t(){try{var c=Intl.DateTimeFormat().resolvedOptions().timeZone;if(c&&c.length>3){var M=A[l(c)];if(M)return M;C("Moment Timezone found "+c+" from the Intl api, but did not have that data loaded.")}}catch(c){}var z,o,b,p=function(){var c,M,z,o=(new Date).getFullYear()-2,A=new d(new Date(o,0,1)),b=[A];for(z=1;z<48;z++)(M=new d(new Date(o,z,1))).offset!==A.offset&&(c=f(A,M),b.push(c),b.push(new d(new Date(c.at+6e4)))),A=M;for(z=0;z<4;z++)b.push(new d(new Date(o+z,0,1))),b.push(new d(new Date(o+z,6,1)));return b}(),n=p.length,a=B(p),L=[];for(o=0;o<a.length;o++){for(z=new W(T(a[o]),n),b=0;b<n;b++)z.scoreOffsetAt(p[b]);L.push(z)}return L.sort(r),L.length>0?L[0].zone.name:void 0}function l(c){return(c||"").toLowerCase().replace(/\//g,"_")}function u(c){var M,o,b,p;for("string"==typeof c&&(c=[c]),M=0;M<c.length;M++)p=l(o=(b=c[M].split("|"))[0]),z[p]=c[M],A[p]=o,X(p,b[2].split(" "))}function T(c,M){c=l(c);var b,p=z[c];return p instanceof N?p:"string"==typeof p?(p=new N(p),z[c]=p,p):o[c]&&M!==T&&(b=T(o[c],T))?((p=z[c]=new N)._set(b),p.name=A[c],p):null}function s(c){var M,z,b,p;for("string"==typeof c&&(c=[c]),M=0;M<c.length;M++)b=l((z=c[M].split("|"))[0]),p=l(z[1]),o[b]=p,A[b]=z[0],o[p]=b,A[p]=z[1]}function E(c){var M="X"===c._f||"x"===c._f;return!(!c._a||void 0!==c._tzm||M)}function C(c){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(c)}function S(M){var z=Array.prototype.slice.call(arguments,0,-1),o=arguments[arguments.length-1],A=T(o),b=c.utc.apply(null,z);return A&&!c.isMoment(M)&&E(b)&&b.add(A.parse(b),"minutes"),b.tz(o),b}(n<2||2===n&&a<6)&&C("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js "+c.version+". See momentjs.com"),N.prototype={_set:function(c){this.name=c.name,this.abbrs=c.abbrs,this.untils=c.untils,this.offsets=c.offsets,this.population=c.population},_index:function(c){var M,z=+c,o=this.untils;for(M=0;M<o.length;M++)if(z<o[M])return M},parse:function(c){var M,z,o,A,b=+c,p=this.offsets,n=this.untils,a=n.length-1;for(A=0;A<a;A++)if(M=p[A],z=p[A+1],o=p[A?A-1:A],M<z&&S.moveAmbiguousForward?M=z:M>o&&S.moveInvalidForward&&(M=o),b<n[A]-6e4*M)return p[A];return p[a]},abbr:funct
//! version : 0.5.21
//! Copyright (c) JS Foundation and other contributors
//! license : MIT
//! github.com/moment/moment-timezone
//! moment-timezone-utils.js
//! version : 0.5.21
//! Copyright (c) JS Foundation and other contributors
//! license : MIT
//! github.com/moment/moment-timezone
!function(p,n){"use strict";"object"==typeof c&&c.exports?c.exports=n(z(154)):(A=[z(28)],void 0===(b="function"==typeof(o=n)?o.apply(M,A):o)||(c.exports=b))}(0,function(c){"use strict";if(!c.tz)throw new Error("moment-timezone-utils.js must be loaded after moment-timezone.js");var M="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX",z=1e-6;function o(c,o){for(var A="",b=Math.abs(c),p=Math.floor(b),n=function(c,o){for(var A,b=".",p="";o>0;)o-=1,c*=60,A=Math.floor(c+z),b+=M[A],c-=A,A&&(p+=b,b="");return p}(b-p,Math.min(~~o,10));p>0;)A=M[p%60]+A,p=Math.floor(p/60);return c<0&&(A="-"+A),A&&n?A+n:(n||"-"!==A)&&(A||n)||"0"}function A(c){return function(c){if(!c.name)throw new Error("Missing name");if(!c.abbrs)throw new Error("Missing abbrs");if(!c.untils)throw new Error("Missing untils");if(!c.offsets)throw new Error("Missing offsets");if(c.offsets.length!==c.untils.length||c.offsets.length!==c.abbrs.length)throw new Error("Mismatched array lengths")}(c),[c.name,function(c){var M,z,A=0,b=[],p=[],n=[],a={};for(M=0;M<c.abbrs.length;M++)void 0===a[z=c.abbrs[M]+"|"+c.offsets[M]]&&(a[z]=A,b[A]=c.abbrs[M],p[A]=o(Math.round(60*c.offsets[M])/60,1),A++),n[M]=o(a[z],0);return b.join(" ")+"|"+p.join(" ")+"|"+n.join("")}(c),function(c){var M,z=[],A=0;for(M=0;M<c.length-1;M++)z[M]=o(Math.round((c[M]-A)/1e3)/60,1),A=c[M];return z.join(" ")}(c.untils)+function(c){if(!c)return"";if(c<1e3)return"|"+c;var M=String(0|c).length-2;return"|"+Math.round(c/Math.pow(10,M))+"e"+M}(c.population)].join("|")}function b(c,M){var z;if(c.length!==M.length)return!1;for(z=0;z<c.length;z++)if(c[z]!==M[z])return!1;return!0}function p(c,M){return b(c.offsets,M.offsets)&&b(c.abbrs,M.abbrs)&&b(c.untils,M.untils)}function n(c,M){var z=[],o=[];return c.links&&(o=c.links.slice()),function(c,M,z,o){var A,b,n,a,L,O,q=[];for(A=0;A<c.length;A++){for(O=!1,n=c[A],b=0;b<q.length;b++)p(n,a=(L=q[b])[0])&&(n.population>a.population?L.unshift(n):n.population===a.population&&o&&o[n.name]?L.unshift(n):L.push(n),O=!0);O||q.push([n])}for(A=0;A<q.length;A++)for(L=q[A],M.push(L[0]),b=1;b<L.length;b++)z.push(L[0].name+"|"+L[b].name)}(c.zones,z,o,M),{version:c.version,zones:z,links:o.sort()}}function a(c,M,z){var o=Array.prototype.slice,A=function(c,M,z){var o,A,b=0,p=c.length+1;for(z||(z=M),M>z&&(A=M,M=z,z=A),A=0;A<c.length;A++)null!=c[A]&&((o=new Date(c[A]).getUTCFullYear())<M&&(b=A+1),o>z&&(p=Math.min(p,A+1)));return[b,p]}(c.untils,M,z),b=o.apply(c.untils,A);return b[b.length-1]=null,{name:c.name,abbrs:o.apply(c.abbrs,A),untils:b,offsets:o.apply(c.offsets,A),population:c.population}}return c.tz.pack=A,c.tz.packBase60=o,c.tz.createLinks=n,c.tz.filterYears=a,c.tz.filterLinkPack=function(c,M,z,o){var b,p,L=c.zones,O=[];for(b=0;b<L.length;b++)O[b]=a(L[b],M,z);for(p=n({zones:O,links:c.links.slice(),version:c.version},o),b=0;b<p.zones.length;b++)p.zones[b]=A(p.zones[b]);return p},c})}});