mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-23 00:13:21 +03:00
2 lines
909 KiB
JavaScript
2 lines
909 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(A){"use strict";var z,q={},o={},W={},d={};A&&"string"==typeof A.version||s("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");var M=A.version.split("."),b=+M[0],p=+M[1];function c(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,q=0,o=1;for(45===M.charCodeAt(0)&&(o=-(z=1));z<p.length;z++)q=60*q+c(p.charCodeAt(z));for(z=0;z<O.length;z++)A/=60,q+=c(O.charCodeAt(z))*A;return q*o}function X(M){for(var z=0;z<M.length;z++)M[z]=O(M[z])}function B(M,z){var b,p=[];for(b=0;b<z.length;b++)p[b]=M[z[b]];return p}function R(M){var z=M.split("|"),b=z[2].split(" "),p=z[3].split(""),O=z[4].split(" ");return X(b),X(p),X(O),function(M,z){for(var b=0;b<z;b++)M[b]=Math.round((M[b-1]||0)+6e4*M[b]);M[z-1]=1/0}(O,p.length),{name:z[0],abbrs:B(z[1].split(" "),p),offsets:B(b,p),untils:O,population:0|z[5]}}function n(M){M&&this._set(R(M))}function L(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 f(M){this.zone=M,this.offsetScore=0,this.abbrScore=0}function a(M,z){for(var b,p;p=6e4*((z.at-M.at)/12e4|0);)(b=new L(new Date(M.at+p))).offset===M.offset?M=b:z=b;return M}function N(M,z){return M.offsetScore!==z.offsetScore?M.offsetScore-z.offsetScore:M.abbrScore!==z.abbrScore?M.abbrScore-z.abbrScore:z.zone.population-M.zone.population}function l(M,z){var b,p;for(X(z),b=0;b<z.length;b++)p=z[b],d[p]=d[p]||{},d[p][M]=!0}function u(){try{var M=Intl.DateTimeFormat().resolvedOptions().timeZone;if(M&&3<M.length){var z=W[i(M)];if(z)return z;s("Moment Timezone found "+M+" from the Intl api, but did not have that data loaded.")}}catch(M){}var b,p,O,A=function(){var M,z,b,p=(new Date).getFullYear()-2,O=new L(new Date(p,0,1)),A=[O];for(b=1;b<48;b++)(z=new L(new Date(p,b,1))).offset!==O.offset&&(M=a(O,z),A.push(M),A.push(new L(new Date(M.at+6e4)))),O=z;for(b=0;b<4;b++)A.push(new L(new Date(p+b,0,1))),A.push(new L(new Date(p+b,6,1)));return A}(),q=A.length,o=function(M){var z,b,p,O=M.length,A={},q=[];for(z=0;z<O;z++)for(b in p=d[M[z].offset]||{})p.hasOwnProperty(b)&&(A[b]=!0);for(z in A)A.hasOwnProperty(z)&&q.push(W[z]);return q}(A),c=[];for(p=0;p<o.length;p++){for(b=new f(e(o[p]),q),O=0;O<q;O++)b.scoreOffsetAt(A[O]);c.push(b)}return c.sort(N),0<c.length?c[0].zone.name:void 0}function i(M){return(M||"").toLowerCase().replace(/\//g,"_")}function H(M){var z,b,p,O;for("string"==typeof M&&(M=[M]),z=0;z<M.length;z++)O=i(b=(p=M[z].split("|"))[0]),q[O]=M[z],W[O]=b,l(O,p[2].split(" "))}function e(M,z){M=i(M);var b,p=q[M];return p instanceof n?p:"string"==typeof p?(p=new n(p),q[M]=p):o[M]&&z!==e&&(b=e(o[M],e))?((p=q[M]=new n)._set(b),p.name=W[M],p):null}function r(M){var z,b,p,O;for("string"==typeof M&&(M=[M]),z=0;z<M.length;z++)p=i((b=M[z].split("|"))[0]),O=i(b[1]),o[p]=O,W[p]=b[0],o[O]=p,W[O]=b[1]}function F(M){H(M.zones),r(M.links),t.dataVersion=M.version}function T(M){var z="X"===M._f||"x"===M._f;return!(!M._a||void 0!==M._tzm||z)}function s(M){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(M)}function t(M){var z=Array.prototype.slice.call(arguments,0,-1),b=arguments[arguments.length-1],p=e(b),O=A.utc.apply(null,z);return p&&!A.isMoment(M)&&T(O)&&O.add(p.parse(O),"minutes"),O.tz(b),O}(b<2||2==b&&p<6)&&s("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js "+A.version+". See momentjs.com"),n.prototype={_set:function(M){this.name=M.name,this.abbrs=M.abbrs,this.untils=M.untils,this.offsets=M.offsets,this.population=M.population},_index:function(M){var z,b=+M,p=this.untils;for(z=0;z<p.length;z++)if(b<p[z])return z},parse:function(M){var z,b,p,O,A=+M,q=this.offsets,o=this.untils,c=o.length-1;for(O=0;O<c;O++)if(z=q[O],b=q[O+1],p=q[O?O-1:O],z<b&&t.moveAmbiguousForward?z=b:p<z&&
|