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