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AAO,GAAG,GAAU,YAC1C,OAAO,EAAO,GAAG,EAAQ,EAAQ,GAAU,KAC5C,CAsBS,CAAgC,EAAQ,GAIzC,EAA+B,EAAQ,EAC/C,EAOA,EAAO,GAAG,SAAW,WAEpB,OA1EqB,SAAS,GAC9B,IAAI,EAAO,EAAQ,EA1BA,MA2BnB,GAAI,EAAM,EAAG,CACZ,MAAM,EAAO,EAAM,KAAK,MAAM,GACjB,IAAT,IACH,EAAM,KAAK,KAAK,GAAO,EAAO,EAEhC,CACA,OAAO,CACR,CAiEQ,CADc,KAAK,UAE3B,EAGO,CACR","file":"/npm/moment-msdate@2.0.4/moment-msdate.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/moment-msdate@2.0.4/moment-msdate.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\r\n\r\n(function(root, factory) {\r\n\t/*global define*/\r\n\tif (typeof define === 'function' && define.amd) {\r\n\t\tdefine(['moment', 'moment-timezone'], factory); // AMD\r\n\t} else if (typeof module === 'object' && module.exports) {\r\n\t\tmodule.exports = factory(require('moment'), require('moment-timezone')); // Node\r\n\t} else {\r\n\t\tfactory(root.moment, root.moment.tz); // Browser\r\n\t}\r\n}(this, function(moment, momentTimezone) {\r\n\tvar MINUTE_MILLISECONDS = 60 * 1000;\r\n\tvar DAY_MILLISECONDS = 86400000;\r\n\tvar MS_DAY_OFFSET = 25569;\r\n\r\n\tconst momentVersion = moment.version.split('.');\r\n\tconst major = +momentVersion[0];\r\n\tconst minor = +momentVersion[1];\r\n\r\n\tif (major < 2 || (major === 2 && minor < 6)) {\r\n\t\tthrow new Error('moment-msdate requires Moment.js >= 2.6.0. You are using Moment.js ' + moment.version + '. See momentjs.com');\r\n\t}\r\n\r\n\tif (!momentTimezone || !moment.tz) {\r\n\t\tthrow new Error('moment-msdate requires moment-timezone.js. see momentjs.com/timezone');\r\n\t}\r\n\r\n\tconst oaDateToTicks = function(oaDate) {\r\n\t\tvar ticks = ((oaDate - MS_DAY_OFFSET) * DAY_MILLISECONDS);\r\n\t\tif (oaDate < 0) {\r\n\t\t\tconst frac = (oaDate - Math.trunc(oaDate)) * DAY_MILLISECONDS;\r\n\t\t\tif (frac !== 0) {\r\n\t\t\t\tticks -= frac * 2;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ticks;\r\n\t};\r\n\r\n\tconst ticksToOADate = function(ticks) {\r\n\t\tvar oad = (ticks / DAY_MILLISECONDS) + MS_DAY_OFFSET;\r\n\t\tif (oad < 0) {\r\n\t\t\tconst frac = oad - Math.trunc(oad);\r\n\t\t\tif (frac !== 0) {\r\n\t\t\t\toad = Math.ceil(oad) - frac - 2;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn oad;\r\n\t};\r\n\r\n\t/**\r\n\t * @description takes an oaDate that is not in utc and converts it to a utc moment offset by a number of minutes\r\n\t *\r\n\t * @param {double} oaDate\r\n\t * @param {string} offsetToUtcInMinutes\r\n\t * @returns moment\r\n\t */\r\n\tconst fromOADateOffsetToUtcByMinutes = function(oaDate, offsetToUtcInMinutes) {\r\n\t\tconst offsetInTicks = offsetToUtcInMinutes * MINUTE_MILLISECONDS;\r\n\t\tconst ticks = oaDateToTicks(oaDate);\r\n\t\treturn moment(ticks + offsetInTicks).utc();\r\n\t};\r\n\r\n\t/**\r\n\t * @description takes an oaDate that is not in utc and converts it to a utc moment offset by the specified timezone\r\n\t *\r\n\t * @param {double} oaDate\r\n\t * @param {string} timezone\r\n\t * @returns moment\r\n\t */\r\n\tconst fromOADateOffsetToUtcByTimezone = function(oaDate, timezone) {\r\n\t\tif (!moment.tz.zone(timezone)) {\r\n\t\t\tthrow new Error('timezone provided is not available in moment-timezone.js', 'moment-msdate.js', 59);\r\n\t\t}\r\n\t\tconst ticks = oaDateToTicks(oaDate);\r\n\t\tconst offset = moment(ticks).tz(timezone).utcOffset() * MINUTE_MILLISECONDS;\r\n\t\treturn moment.tz(ticks - offset, timezone).utc();\r\n\t};\r\n\r\n\t/**\r\n\t * @description takes an oaDate that is in utc and converts it to a utc moment or takes an oaDate and an offset to utc and converts it to a utc moment. The offset can be an int representing the offset to utc in minutes or a string indicating the timezone of the oaDate.\r\n\t *\r\n\t * @param {double} oaDate\r\n\t * @param {string=} {int=} offset\r\n\t * @returns moment\r\n\t */\r\n\tmoment.fromOADate = function(oaDate, offset) {\r\n\t\tif (Number.isNaN(parseInt(oaDate, 10))) {\r\n\t\t\tthrow new TypeError('fromOADate requires an oaDate that is not null or undefined', 'moment-msdate.js', 72);\r\n\t\t}\r\n\r\n\t\t/* no offset */\r\n\t\tif (!offset) {\r\n\t\t\treturn fromOADateOffsetToUtcByMinutes(oaDate, 0);\r\n\t\t}\r\n\r\n\t\t/* timezone */\r\n\t\tconst parsedOffset = parseInt(offset, 10);\r\n\t\tif (Number.isNaN(parsedOffset)) {\r\n\t\t\treturn fromOADateOffsetToUtcByTimezone(oaDate, offset);\r\n\t\t}\r\n\r\n\t\t/* minutes */\r\n\t\treturn fromOADateOffsetToUtcByMinutes(oaDate, parsedOffset);\r\n\t};\r\n\r\n\t/**\r\n\t * @description converts a moment to a UTC OLE automation date represented as a double\r\n\t *\r\n\t * @returns {double}\r\n\t */\r\n\tmoment.fn.toOADate = function() {\r\n\t\tconst milliseconds = this.valueOf();\r\n\t\treturn ticksToOADate(milliseconds);\r\n\t};\r\n\r\n\r\n\treturn moment;\r\n}));\r\n"]}