prometheus/web/ui/static/vendor/moment/moment-timezone-with-data.min.js

7 lines
180 KiB
JavaScript
Raw Normal View History

//! moment-timezone.js
//! version : 0.5.17
//! Copyright (c) JS Foundation and other contributors
//! license : MIT
//! github.com/moment/moment-timezone
!function(c,M){"use strict";"function"==typeof define&&define.amd?define(["moment"],M):"object"==typeof module&&module.exports?module.exports=M(require("moment")):M(c.moment)}(this,function(o){"use strict";var M,p={},n={},L={},q={},c=o.version.split("."),z=+c[0],A=+c[1];function a(c){return 96<c?c-87:64<c?c-29:c-48}function b(c){var M=0,z=c.split("."),A=z[0],b=z[1]||"",o=1,p=0,n=1;for(45===c.charCodeAt(0)&&(n=-(M=1));M<A.length;M++)p=60*p+a(A.charCodeAt(M));for(M=0;M<b.length;M++)o/=60,p+=a(b.charCodeAt(M))*o;return p*n}function O(c){for(var M=0;M<c.length;M++)c[M]=b(c[M])}function N(c,M){var z,A=[];for(z=0;z<M.length;z++)A[z]=c[M[z]];return A}function i(c){var M=c.split("|"),z=M[2].split(" "),A=M[3].split(""),b=M[4].split(" ");return O(z),O(A),O(b),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}(b,A.length),{name:M[0],abbrs:N(M[1].split(" "),A),offsets:N(z,A),untils:b,population:0|M[5]}}function W(c){c&&this._set(i(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 e(c){this.zone=c,this.offsetScore=0,this.abbrScore=0}function X(c,M){for(var z,A;A=6e4*((M.at-c.at)/12e4|0);)(z=new d(new Date(c.at+A))).offset===c.offset?c=z:M=z;return c}function f(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 B(c,M){var z,A;for(O(M),z=0;z<M.length;z++)A=M[z],q[A]=q[A]||{},q[A][c]=!0}function r(){try{var c=Intl.DateTimeFormat().resolvedOptions().timeZone;if(c&&3<c.length){var M=L[T(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,A,b,o=function(){var c,M,z,A=(new Date).getFullYear()-2,b=new d(new Date(A,0,1)),o=[b];for(z=1;z<48;z++)(M=new d(new Date(A,z,1))).offset!==b.offset&&(c=X(b,M),o.push(c),o.push(new d(new Date(c.at+6e4)))),b=M;for(z=0;z<4;z++)o.push(new d(new Date(A+z,0,1))),o.push(new d(new Date(A+z,6,1)));return o}(),p=o.length,n=function(c){var M,z,A,b=c.length,o={},p=[];for(M=0;M<b;M++)for(z in A=q[c[M].offset]||{})A.hasOwnProperty(z)&&(o[z]=!0);for(M in o)o.hasOwnProperty(M)&&p.push(L[M]);return p}(o),a=[];for(A=0;A<n.length;A++){for(z=new e(u(n[A]),p),b=0;b<p;b++)z.scoreOffsetAt(o[b]);a.push(z)}return a.sort(f),0<a.length?a[0].zone.name:void 0}function T(c){return(c||"").toLowerCase().replace(/\//g,"_")}function l(c){var M,z,A,b;for("string"==typeof c&&(c=[c]),M=0;M<c.length;M++)b=T(z=(A=c[M].split("|"))[0]),p[b]=c[M],L[b]=z,B(b,A[2].split(" "))}function u(c,M){c=T(c);var z,A=p[c];return A instanceof W?A:"string"==typeof A?(A=new W(A),p[c]=A):n[c]&&M!==u&&(z=u(n[c],u))?((A=p[c]=new W)._set(z),A.name=L[c],A):null}function t(c){var M,z,A,b;for("string"==typeof c&&(c=[c]),M=0;M<c.length;M++)A=T((z=c[M].split("|"))[0]),b=T(z[1]),n[A]=b,L[A]=z[0],n[b]=A,L[b]=z[1]}function s(c){l(c.zones),t(c.links),R.dataVersion=c.version}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 R(c){var M=Array.prototype.slice.call(arguments,0,-1),z=arguments[arguments.length-1],A=u(z),b=o.utc.apply(null,M);return A&&!o.isMoment(c)&&E(b)&&b.add(A.parse(b),"minutes"),b.tz(z),b}(z<2||2===z&&A<6)&&C("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js "+o.version+". See momentjs.com"),W.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,A=this.untils;for(M=0;M<A.length;M++)if(z<A[M])return M},parse:function(c){var M,z,A,b,o=+c,p=this.offsets,n=this.untils,a=n.length-1;for(b=0;b<a;b++)if(M=p[b],z=p[b+1],A=p[b?b-1:b],M<z&&R.moveAmbiguousForward?M=z:A<M&&R.moveInvalidForward&&(M=A),o<n[b]-6e4*M)return p[b];return p[a]},abbr:function(c){return this.abbrs[this._index(c)]},offset:functio