laipower/wp-content/plugins/easy-digital-downloads/assets/js/vendor/moment-timezone.min.js

1 line
6.1 KiB
JavaScript
Raw Normal View History

!function(t,e){"use strict";"object"==typeof module&&module.exports?module.exports=e(require("moment")):"function"==typeof define&&define.amd?define(["moment"],e):e(t.moment)}(this,(function(t){"use strict";var e,n={},o={},r={},s={};t&&"string"==typeof t.version||A("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");var i=t.version.split("."),f=+i[0],a=+i[1];function u(t){return t>96?t-87:t>64?t-29:t-48}function c(t){var e=0,n=t.split("."),o=n[0],r=n[1]||"",s=1,i=0,f=1;for(45===t.charCodeAt(0)&&(e=1,f=-1);e<o.length;e++)i=60*i+u(o.charCodeAt(e));for(e=0;e<r.length;e++)s/=60,i+=u(r.charCodeAt(e))*s;return i*f}function h(t){for(var e=0;e<t.length;e++)t[e]=c(t[e])}function l(t,e){var n,o=[];for(n=0;n<e.length;n++)o[n]=t[e[n]];return o}function m(t){var e=t.split("|"),n=e[2].split(" "),o=e[3].split(""),r=e[4].split(" ");return h(n),h(o),h(r),function(t,e){for(var n=0;n<e;n++)t[n]=Math.round((t[n-1]||0)+6e4*t[n]);t[e-1]=1/0}(r,o.length),{name:e[0],abbrs:l(e[1].split(" "),o),offsets:l(n,o),untils:r,population:0|e[5]}}function p(t){t&&this._set(m(t))}function d(t){var e=t.toTimeString(),n=e.match(/\([a-z ]+\)/i);"GMT"===(n=n&&n[0]?(n=n[0].match(/[A-Z]/g))?n.join(""):void 0:(n=e.match(/[A-Z]{3,5}/g))?n[0]:void 0)&&(n=void 0),this.at=+t,this.abbr=n,this.offset=t.getTimezoneOffset()}function v(t){this.zone=t,this.offsetScore=0,this.abbrScore=0}function z(t,e){for(var n,o;o=6e4*((e.at-t.at)/12e4|0);)(n=new d(new Date(t.at+o))).offset===t.offset?t=n:e=n;return t}function b(t,e){return t.offsetScore!==e.offsetScore?t.offsetScore-e.offsetScore:t.abbrScore!==e.abbrScore?t.abbrScore-e.abbrScore:e.zone.population-t.zone.population}function g(t,e){var n,o;for(h(e),n=0;n<e.length;n++)o=e[n],s[o]=s[o]||{},s[o][t]=!0}function _(t){var e,n,o,i=t.length,f={},a=[];for(e=0;e<i;e++)for(n in o=s[t[e].offset]||{})o.hasOwnProperty(n)&&(f[n]=!0);for(e in f)f.hasOwnProperty(e)&&a.push(r[e]);return a}function w(t){return(t||"").toLowerCase().replace(/\//g,"_")}function y(t){var e,o,s,i;for("string"==typeof t&&(t=[t]),e=0;e<t.length;e++)i=w(o=(s=t[e].split("|"))[0]),n[i]=t[e],r[i]=o,g(i,s[2].split(" "))}function S(t,e){t=w(t);var s,i=n[t];return i instanceof p?i:"string"==typeof i?(i=new p(i),n[t]=i,i):o[t]&&e!==S&&(s=S(o[t],S))?((i=n[t]=new p)._set(s),i.name=r[t],i):null}function O(t){var e,n,s,i;for("string"==typeof t&&(t=[t]),e=0;e<t.length;e++)s=w((n=t[e].split("|"))[0]),i=w(n[1]),o[s]=i,r[s]=n[0],o[i]=s,r[i]=n[1]}function M(t){var e="X"===t._f||"x"===t._f;return!(!t._a||void 0!==t._tzm||e)}function A(t){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(t)}function j(e){var n=Array.prototype.slice.call(arguments,0,-1),o=arguments[arguments.length-1],r=S(o),s=t.utc.apply(null,n);return r&&!t.isMoment(e)&&M(s)&&s.add(r.parse(s),"minutes"),s.tz(o),s}(f<2||2===f&&a<6)&&A("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js "+t.version+". See momentjs.com"),p.prototype={_set:function(t){this.name=t.name,this.abbrs=t.abbrs,this.untils=t.untils,this.offsets=t.offsets,this.population=t.population},_index:function(t){var e,n=+t,o=this.untils;for(e=0;e<o.length;e++)if(n<o[e])return e},parse:function(t){var e,n,o,r,s=+t,i=this.offsets,f=this.untils,a=f.length-1;for(r=0;r<a;r++)if(e=i[r],n=i[r+1],o=i[r?r-1:r],e<n&&j.moveAmbiguousForward?e=n:e>o&&j.moveInvalidForward&&(e=o),s<f[r]-6e4*e)return i[r];return i[a]},abbr:function(t){return this.abbrs[this._index(t)]},offset:function(t){return A("zone.offset has been deprecated in favor of zone.utcOffset"),this.offsets[this._index(t)]},utcOffset:function(t){return this.offsets[this._index(t)]}},v.prototype.scoreOffsetAt=function(t){this.offsetScore+=Math.abs(this.zone.utcOffset(t.at)-t.offset),this.zone.abbr(t.at).replace(/[^A-Z]/g,"")!==t.abbr&&this.abbrScore++},j.version="0.5.23",j.dataVersion="",j._zones=n,j._links=o,j._names=r,j.add=y,j.link=O,j.load=function(t){y(t.zones),O(t.links),j.dataVersion=t.version},j.zone=S,j.zoneExists=function t(e){return t.didShowError||(t.didShowError=!0,A("moment.tz.zoneExists('"+e+"') has been