hexo/node_modules/moment-timezone/builds/moment-timezone-with-data-1...

1 line
41 KiB
JavaScript
Raw Normal View History

2023-09-25 15:58:56 +08:00
!function(a,i){"use strict";"object"==typeof module&&module.exports?module.exports=i(require("moment")):"function"==typeof define&&define.amd?define(["moment"],i):i(a.moment)}(this,function(o){"use strict";void 0===o.version&&o.default&&(o=o.default);var i,s={},c={},A={},u={},m={},a=(o&&"string"==typeof o.version||D("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/"),o.version.split(".")),r=+a[0],e=+a[1];function n(a){return 96<a?a-87:64<a?a-29:a-48}function t(a){var i=0,r=a.split("."),e=r[0],o=r[1]||"",c=1,A=0,r=1;for(45===a.charCodeAt(0)&&(r=-(i=1));i<e.length;i++)A=60*A+n(e.charCodeAt(i));for(i=0;i<o.length;i++)c/=60,A+=n(o.charCodeAt(i))*c;return A*r}function l(a){for(var i=0;i<a.length;i++)a[i]=t(a[i])}function f(a,i){for(var r=[],e=0;e<i.length;e++)r[e]=a[i[e]];return r}function p(a){for(var a=a.split("|"),i=a[2].split(" "),r=a[3].split(""),e=a[4].split(" "),o=(l(i),l(r),l(e),e),c=r.length,A=0;A<c;A++)o[A]=Math.round((o[A-1]||0)+6e4*o[A]);return o[c-1]=1/0,{name:a[0],abbrs:f(a[1].split(" "),r),offsets:f(i,r),untils:e,population:0|a[5]}}function b(a){a&&this._set(p(a))}function M(a,i){this.name=a,this.zones=i}function h(a){var i=a.toTimeString(),r=i.match(/\([a-z ]+\)/i);"GMT"===(r=r&&r[0]?(r=r[0].match(/[A-Z]/g))?r.join(""):void 0:(r=i.match(/[A-Z]{3,5}/g))?r[0]:void 0)&&(r=void 0),this.at=+a,this.abbr=r,this.offset=a.getTimezoneOffset()}function d(a){this.zone=a,this.offsetScore=0,this.abbrScore=0}function E(){for(var a,i,r=(new Date).getFullYear()-2,e=new h(new Date(r,0,1)),o=[e],c=1;c<48;c++)(i=new h(new Date(r,c,1))).offset!==e.offset&&(a=function(a,i){for(var r;r=6e4*((i.at-a.at)/12e4|0);)(r=new h(new Date(a.at+r))).offset===a.offset?a=r:i=r;return a}(e,i),o.push(a),o.push(new h(new Date(a.at+6e4)))),e=i;for(c=0;c<4;c++)o.push(new h(new Date(r+c,0,1))),o.push(new h(new Date(r+c,6,1)));return o}function g(a,i){return a.offsetScore!==i.offsetScore?a.offsetScore-i.offsetScore:a.abbrScore!==i.abbrScore?a.abbrScore-i.abbrScore:a.zone.population!==i.zone.population?i.zone.population-a.zone.population:i.zone.name.localeCompare(a.zone.name)}function z(){try{var a=Intl.DateTimeFormat().resolvedOptions().timeZone;if(a&&3<a.length){var i=u[P(a)];if(i)return i;D("Moment Timezone found "+a+" from the Intl api, but did not have that data loaded.")}}catch(a){}for(var r,e,o=E(),c=o.length,A=function(a){for(var i,r,e=a.length,o={},c=[],A=0;A<e;A++)for(i in r=m[a[A].offset]||{})r.hasOwnProperty(i)&&(o[i]=!0);for(A in o)o.hasOwnProperty(A)&&c.push(u[A]);return c}(o),n=[],t=0;t<A.length;t++){for(r=new d(T(A[t])),e=0;e<c;e++)r.scoreOffsetAt(o[e]);n.push(r)}return n.sort(g),0<n.length?n[0].zone.name:void 0}function P(a){return(a||"").toLowerCase().replace(/\//g,"_")}function k(a){var i,r,e,o;for("string"==typeof a&&(a=[a]),i=0;i<a.length;i++){o=P(r=(e=a[i].split("|"))[0]),s[o]=a[i],u[o]=r,A=c=t=n=void 0;var c,A,n=o,t=e[2].split(" ");for(l(t),c=0;c<t.length;c++)A=t[c],m[A]=m[A]||{},m[A][n]=!0}}function T(a,i){a=P(a);var r=s[a];return r instanceof b?r:"string"==typeof r?(r=new b(r),s[a]=r):c[a]&&i!==T&&(i=T(c[a],T))?((r=s[a]=new b)._set(i),r.name=u[a],r):null}function S(a){var i,r,e,o;for("string"==typeof a&&(a=[a]),i=0;i<a.length;i++)e=P((r=a[i].split("|"))[0]),o=P(r[1]),c[e]=o,u[e]=r[0],c[o]=e,u[o]=r[1]}function _(a){k(a.zones),S(a.links);var i,r,e,o=a.countries;if(o&&o.length)for(i=0;i<o.length;i++)r=(e=o[i].split("|"))[0].toUpperCase(),e=e[1].split(" "),A[r]=new M(r,e);y.dataVersion=a.version}function C(a){return C.didShowError||(C.didShowError=!0,D("moment.tz.zoneExists('"+a+"') has been deprecated in favor of !moment.tz.zone('"+a+"')")),!!T(a)}function B(a){var i="X"===a._f||"x"===a._f;return!(!a._a||void 0!==a._tzm||i)}function D(a){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(a)}function y(a){var i=Array.prototype.slice.call(arguments,0,-1),r=arguments[arguments.length-1],e=T(r),i=o.utc.apply(null,i);return e&&!o.isMoment(a)&&B(i)&&i.add(e.parse(i),"minutes"),i.tz(r),i}(r<2||2==r&&e<6)&&D("Moment Timezone requires Moment.js >= 2.6.0. You are using Mo