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ACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,KAAK;AACLC,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AGjrC;AACvB;AAEF,IACyC,WAAWiqC,GAASA;AAE/D;AAEH;AAaA,IAAIoB,IAAuB,SAASC,GAA4B7Z;AAC/D,IAKImY,GAAUK,GALVsB,IAAW9Z,EAAK,IAChB+Z,IAAc/Z,EAAK,IACnBga,IAAUha,EAAK,IAGIz1C,IAAI;AAC3B,IAAGuvD,EAASpyB,MAAK,SAAS73B;AAAM,OAA+B,MAAxB0pD,EAAgB1pD;AAAW,KAAI;AACrE,KAAIsoD,KAAY4B,GACZ9B,EAAoBjpC,EAAE+qC,GAAa5B,OACrCF,EAAoB1sC,EAAE4sC,KAAY4B,EAAY5B;AAGhD,IAAG6B,GAAsBA,EAAQ/B;AAClC;AAEA,KADG4B,KAA4BA,EAA2B7Z,IACrDz1C,IAAIuvD,EAAStvD,QAAQD,KACzBiuD,IAAUsB,EAASvvD,IAChB0tD,EAAoBjpC,EAAEuqC,GAAiBf,MAAYe,EAAgBf,MACrEe,EAAgBf,GAAS,MAE1Be,EAAgBf,KAAW;AAG7B,GAEIyB,IAAqB3mC,KAAoC,gCAAIA,KAAoC,iCAAK;AAC1G2mC,EAAmB9pD,QAAQypD,EAAqB9/C,KAAK,MAAM,KAC3DmgD,EAAmBpvD,OAAO+uD,EAAqB9/C,KAAK,MAAMmgD,EAAmBpvD,KAAKiP,KAAKmgD;;;OCtFvFtxD,EAAQ,OAGR5B,EAAQqP,QAAQ,EAAhBrP,OAEA4B,EAAQ,OAER5B,EAAQmzD,eAAe,EAAvBnzD,MACA4B,EAAQ,OACRA,EAAQ;AACRA,EAAQ,OACRA,EAAQ,OACRA,EAAQ,OACRA,EAAQ,OACRA,EAAQ,OACRA,EAAQ,OAIRA,EAAAA,MAAAA,QAEAA,EAAAA,MAAAA;AAEAA,EAAQ,OACRA,EAAQ,OACRA,EAAQ,OACRA,EAAQ","sources":["webpack://wp/webpack/runtime/load script","webpack://wp/./modules/adjustWeekRange.js","webpack://wp/./modules/client/config.js","webpack://wp/./modules/client/dateTime/dateExceptElement.js","webpack://wp/./modules/client/dateTime/dateLocalElement.js","webpack://wp/./modules/client/dateTime/getTimeZoneName.js","webpack://wp/./modules/client/dateTime/weekRangeElement.js","webpack://wp/./modules/client/delegate.js","webpack://wp/./modules/client/disqus.js","webpack://wp/./modules/client/dom/getDocumentHeight.js","webpack://wp/./modules/client/dom/getScrollbarHeight.js","webpack://wp/./modules/client/head/bannerBottom.js","webpack://wp/./modules/client/head/hover.js","webpack://wp/./modules/client/head/layout.js","webpack://wp/./modules/client/head/login.js","webpack://wp/./modules/client/head/logout.js","webpack://wp/./modules/client/head/navigationArrows.js","webpack://wp/./modules/client/head/resizeOnload/iframeResize.js","webpack://wp/./modules/client/head/resizeOnload/index.js","webpack://wp/./modules/client/head/siteSearch.js","webpack://wp/./modules/client/head/sitetoolbar.js","webpack://wp/./modules/client/head/spoiler.js","webpack://wp/./modules/client/head/trackLinks.js","webpack://wp/./modules/client/notification/index.js","webpack://wp/./modules/client/onSwipe.js","webpack://wp/./modules/client/polyfill/customEvent.js","webpack://wp/./modules/client/polyfill/dataset.js","webpack://wp/./modules/client/polyfill/dom.js","webpack://wp/./modules/client/polyfill/hidden.js","webpack://wp/./modules/client/polyfill/index.js","webpack://wp/./modules/client/polyfill/requestAnimationFrame.js","webpack://wp/./modules/client/polyfill/string.js","webpack://wp/./modules/client/price/priceCurrencyElement.js","webpack://wp/./modules/client/recaptcha/index.js","webpack://wp/./modules/client/recaptcha/initForms.js","webpack://wp/./modules/client/recaptcha/loadScript.js","webpack://wp/./modules/client/recaptcha/recaptcha.js","webpack://wp/./modules/client/spinner.js","webpack://wp/./modules/engine/moment-with-locale/index.js","webpack://wp/./modules/engine/sidebar/client/index.js","webpack://wp/./modules/gaHitCallback.js","webpack://wp/./modules/lib/throttle.js","webpack://wp/ts_src/Patch/Native.ts","webpack://wp/ts_src/Utilities.ts","webpack://wp/ts_src/CustomElementInternals.ts","webpack://wp/ts_src/custom-elements.ts","webpack://wp/ts_src/CustomElementState.ts","webpack://wp/ts_src/Deferred.ts","webpack://wp/ts_src/DocumentConstructionObserver.ts","webpack://wp/ts_src/CustomElementRegistry.ts","webpack://wp/ts_src/Patch/Interface/ParentNode.ts","webpack://wp/ts_src/Patch/Element.ts","webpack://wp/ts_src/Patch/Interface/ChildNode.ts","webpack://wp/ts_src/AlreadyConstructedMarker.ts","webpack://wp/ts_src/Patch/HTMLElement.ts","webpack://wp/ts_src/Patch/Document.ts","webpack://wp/ts_src/Patch/DocumentFragment.ts","webpack://wp/ts_src/Patch/Node.ts","webpack://wp/./node_modules/core-js/fn/string/match-all.js","webpack://wp/./node_modules/core-js/modules/_a-function.js","webpack://wp/./node_modules/core-js/modules/_an-object.js","webpack://wp/./node_modules/core-js/modules/_array-includes.js","webpack://wp/./node_modules/core-js/modules/_cof.js","webpack://wp/./node_modules/core-js/modules/_core.js","webpack://wp/./node_modules/core-js/modules/_ctx.js","webpack://wp/./node_modules/core-js/modules/_defined.js","webpack://wp/./node_modules/core-js/modules/_descriptors.js","webpack://wp/./node_modules/core-js/modules/_dom-create.js","webpack://wp/./node_modules/core-js/modules/_enum-bug-keys.js","webpack://wp/./node_modules/core-js/modules/_export.js","webpack://wp/./node_modules/core-js/modules/_fails.js","webpack://wp/./node_modules/core-js/modules/_flags.js","webpack://wp/./node_modules/core-js/modules/_function-to-string.js","webpack://wp/./node_modules/core-js/modules/_global.js","webpack://wp/./node_modules/core-js/modules/_has.js","webpack://wp/./node_modules/core-js/modules/_hide.js","webpack://wp/./node_modules/core-js/modules/_html.js","webpack://wp/./node_modules/core-js/modules/_ie8-dom-define.js","webpack://wp/./node_modules/core-js/modules/_iobject.js","webpack://wp/./node_modules/core-js/modules/_is-object.js","webpack://wp/./node_modules/core-js/modules/_is-regexp.js","webpack://wp/./node_modules/core-js/modules/_iter-create.js","webpack://wp/./node_modules/core-js/modules/_library.js","webpack://wp/./node_modules/core-js/modules/_object-create.js","webpack://wp/./node_modules/core-js/modules/_object-dp.js","webpack://wp/./node_modules/core-js/modules/_object-dps.js","webpack://wp/./node_modules/core-js/modules/_object-keys-internal.js","webpack://wp/./node_modules/core-js/modules/_object-keys.js","webpack://wp/./node_modules/core-js/modules/_property-desc.js","webpack://wp/./node_modules/core-js/modules/_redefine.js","webpack://wp/./node_modules/core-js/modules/_set-to-string-tag.js","webpack://wp/./node_modules/core-js/modules/_shared-key.js","webpack://wp/./node_modules/core-js/modules/_shared.js","webpack://wp/./node_modules/core-js/modules/_to-absolute-index.js","webpack://wp/./node_modules/core-js/modules/_to-integer.js","webpack://wp/./node_modules/core-js/modules/_to-iobject.js","webpack://wp/./node_modules/core-js/modules/_to-length.js","webpack://wp/./node_modules/core-js/modules/_to-primitive.js","webpack://wp/./node_modules/core-js/modules/_uid.js","webpack://wp/./node_modules/core-js/modules/_wks.js","webpack://wp/./node_modules/core-js/modules/es7.string.match-all.js","webpack://wp/./node_modules/currency-symbol-map/currency-symbol-map.js","webpack://wp/./node_modules/currency-symbol-map/map.js","webpack://wp/./node_modules/moment/locale/it-ch.js","webpack://wp/./node_modules/moment/locale/it.js","webpack://wp/./node_modules/moment/locale/ru.js","webpack://wp/./node_modules/moment/locale/zh-cn.js","webpack://wp/./node_modules/moment/moment.js","webpack://wp/./node_modules/moment/locale/ sync ^\\.\\/.*$","webpack://wp/webpack/bootstrap","webpack://wp/webpack/runtime/define property getters","webpack://wp/webpack/runtime/ensure chunk","webpack://wp/webpack/runtime/get javascript chunk filename","webpack://wp/webpack/runtime/get mini-css chunk filename","webpack://wp/webpack/runtime/hasOwnProperty shorthand","webpack://wp/webpack/runtime/make namespace object","webpack://wp/webpack/runtime/node module decorator","webpack://wp/webpack/runtime/publicPath","webpack://wp/webpack/runtime/jsonp chunk loading","webpack://wp/./modules/client/head/index.js"],"sourcesContent":["var inProgress = {};\nvar dataWebpackPrefix = \"javascript-nodejs:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","\n// assuming weekdays, from, to are UTC\n// shift them to given timezone offset\nfunction adjustWeekRange(weekDays, from, to, offset) {\n\n offset = +offset;\n\n if (from.split) from = from.split(':').map(Number);\n if (to.split) to = to.split(':').map(Number);\n // apply timezone shift\n\n // convert to minutes to shift fractional (04:30) zones\n from = from[0] * 60 + from[1] + offset;\n to = to[0] * 60 + to[1] + offset;\n\n // go day back\n if (from < 0) {\n from += 24 * 60;\n to += 24 * 60;\n weekDays = weekDays.map(weekDay => weekDay === 1 ? 7 : (weekDay - 1)); // decrease day\n } else if (from >= 24 * 60) {\n from -= 24 * 60;\n to -= 24 * 60;\n weekDays = weekDays.map(weekDay => weekDay === 7 ? 1 : (weekDay + 1)); // increase day\n }\n\n // from is adjusted above, but to is not\n if (to > 24 * 60) to -= 24 * 60;\n if (to < 0) to += 24 * 60;\n\n\n let pad = num =>\n num === 0 ? '00' :\n num < 10 ? ('0' + num) :\n num;\n\n from = [Math.floor(from / 60), from % 60].map(pad).join(':');\n to = [Math.floor(to / 60), to % 60].map(pad).join(':');\n\n return [weekDays, from, to];\n\n}\n\nmodule.exports = adjustWeekRange;","module.exports = {\n lang: LANG,\n localCurrency: localCurrency,\n shopCurrency: shopCurrency,\n env: NODE_ENV,\n rateShopTo: rateShopTo,\n countryCode: countryCode,\n ordersMail: ordersMail,\n providers: providers,\n stripeKey: stripeKey,\n paypalClientId: paypalClientId,\n lookatCodeUrlBase: lookatCodeUrlBase\n};\n","let moment = require('engine/moment-with-locale');\n\nlet getTimeZoneName = require('./getTimeZoneName');\n\nclass DateExceptElement extends HTMLElement {\n\n constructor() {\n super();\n\n this.render();\n }\n\n connectedCallback() {\n this.render();\n }\n\n static get observedAttributes() {\n return ['except'];\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n this.render();\n }\n\n format(date, format, withZone) {\n\n let formatted = moment(date).utcOffset(-new Date().getTimezoneOffset()).format(format);\n\n if (withZone) {\n formatted += ' ' + getTimeZoneName();\n }\n\n return formatted;\n }\n\n\n // from=\"...\" to=\"...\"\n render() {\n // firefox throws error with infinite recursion otherwise\n let params = ['except'].map(f => this.getAttribute(f)).join(':');\n if (this.lastParams === params) {\n return;\n }\n this.lastParams = params;\n\n if (this.getAttribute('except')[0] === '{') return; // Angular\n\n if (!this.getAttribute('except')) { // no dates to skip\n return;\n }\n\n // dates in browser-local timezone\n let datesExcept = this.getAttribute('except').split(',').map(d => new Date(d));\n\n // (кроме 1, 2 дек, 4 янв)\n let output = [];\n for (let i = 0; i < datesExcept.length; i++) {\n let date = datesExcept[i];\n let nextDate = datesExcept[i+1];\n let needsMonth = !nextDate || nextDate.getMonth() != date.getMonth();\n let outputDate = moment(date).utcOffset(-new Date().getTimezoneOffset()).format(needsMonth ? 'D MMM' : 'D');\n output.push(outputDate);\n }\n\n this.innerHTML = `(кроме ${output.join(', ')})`;\n }\n\n}\n\nwindow.DateExceptElement = DateExceptElement;\n\nwindow.customElements.define('date-except', DateExceptElement);\n","let moment = require('engine/moment-with-locale');\n\nlet getTimeZoneName = require('./getTimeZoneName');\n\nclass DateLocalElement extends HTMLElement {\n\n\n constructor() {\n super();\n\n this.render();\n }\n\n connectedCallback() {\n this.render();\n }\n\n static get observedAttributes() {\n return ['timestamp', 'format', 'with-zone', 'to', 'from'];\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n this.render();\n }\n\n format(date, format, withZone) {\n\n let formatted = moment(date).utcOffset(-new Date().getTimezoneOffset()).format(format);\n\n if (withZone) {\n formatted += ' ' + getTimeZoneName();\n }\n\n return formatted;\n }\n\n\n // from=\"...\" to=\"...\"\n render() {\n\n // firefox throws error with infinite recursion otherwise\n let params = ['timestamp', 'from', 'to', 'format'].map(f => this.getAttribute(f)).join(':');\n if (this.lastParams === params) {\n return;\n }\n this.lastParams = params;\n\n if (this.hasAttribute('with-zone')) {\n let zone = getTimeZoneName();\n this.setAttribute('data-tooltip', \"Время в вашем часовом поясе,
по данным браузера это \" + zone + \".\");\n }\n\n if (this.getAttribute('timestamp')) {\n // console.log(this.getAttribute('timestamp'));\n if (this.getAttribute('timestamp')[0] === '{') return; // Angular\n this.innerHTML = this.format(this.getAttribute('timestamp'), this.getAttribute('format'), this.hasAttribute('with-zone'));\n return;\n }\n\n let fromTo = [];\n\n if (this.getAttribute('from')[0] === '{' || this.getAttribute('to')[0] === '{') return; // Angular\n\n let from = new Date(this.getAttribute('from'));\n let to = new Date(this.getAttribute('to'));\n\n let fromFormat = this.getAttribute('format');\n let toFormat = this.getAttribute('format');\n\n if (from.getFullYear() === to.getFullYear()) {\n fromFormat = fromFormat.replace(/ YY(YY)?$/g, '');\n }\n\n // if day is not the same we display range\n if (from.getFullYear() !== to.getFullYear() || from.getMonth() !== to.getMonth() || from.getDate() !== to.getDate())\n fromTo.push(this.format(from, fromFormat));\n\n fromTo.push(this.format(to, toFormat, this.hasAttribute('with-zone')));\n\n this.innerHTML = fromTo.join(' – ');\n }\n\n}\n\nwindow.DateLocalElement = DateLocalElement;\n\nwindow.customElements.define('date-local', DateLocalElement);\n","\n\nlet hasFormatToParts = new Intl.DateTimeFormat([], { timeZoneName: 'short'}).formatToParts;\n\nmodule.exports = function() {\n\n // from https://github.com/moment/luxon/blob/e77f74f27fae1237a5b59b1df15e4114215f665c/src/impl/util.js\n if (hasFormatToParts) { // Edge doesn't have it\n return new Intl.DateTimeFormat([], { timeZoneName: 'short'}).formatToParts(new Date()).find(t => t.type == 'timeZoneName').value;\n }\n\n let browserUtcOffset = -new Date().getTimezoneOffset();\n\n let timeZoneShort = new Date().toLocaleTimeString([], {timeZoneName: 'short'}).split(' ');\n\n if (timeZoneShort[0].match(/[+-]/)) { // can be \"GMT+3 xiayu13:00\"\n timeZoneShort = timeZoneShort[0];\n } else if (timeZoneShort[timeZoneShort.length-1].match(/[+-]/)) { // or \"12.23.32 GMT+3\"\n timeZoneShort = timeZoneShort[timeZoneShort.length-1];\n } else if (timeZoneShort[timeZoneShort.length-1].match(/[A-Z]{2,}/)) {\n timeZoneShort = timeZoneShort[timeZoneShort.length - 1]; // or \"12:32 PDT\"\n } else {\n timeZoneShort = 'GMT';\n if (browserUtcOffset > 0) timeZoneShort += '+' + browserUtcOffset/60;\n if (browserUtcOffset < 0) timeZoneShort += '-' + -browserUtcOffset/60;\n }\n\n return timeZoneShort;\n};\n","let moment = require('engine/moment-with-locale');\n\nlet getTimeZoneName = require('./getTimeZoneName');\nlet adjustWeekRange = require('adjustWeekRange');\n\nconst LANG = require('config').lang;\n\nclass WeekRangeElement extends HTMLElement {\n\n constructor() {\n super();\n\n this.render();\n }\n\n static get observedAttributes() {\n return ['weekdays', 'format', 'with-zone', 'to', 'from'];\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n this.render();\n }\n\n connectedCallback() {\n this.render();\n }\n\n format(date, format, withZone) {\n\n let formatted = moment(date).utcOffset(-new Date().getTimezoneOffset()).format(format);\n\n if (withZone) {\n formatted += ' ' + getTimeZoneName();\n }\n\n return formatted;\n }\n\n\n // from=\"...\" to=\"...\"\n render() {\n\n if (this.getAttribute('weekdays')[0] === '{') return; // Angular\n\n // firefox throws error with infinite recursion otherwise\n let params = ['weekdays', 'with-zone', 'from', 'to'].map(f => this.getAttribute(f)).join(':');\n\n if (this.lastParams === params) {\n return;\n }\n this.lastParams = params;\n\n let weekDays = this.getAttribute('weekdays').split(',').map(Number);\n\n let from = this.getAttribute('from');\n let to = this.getAttribute('to');\n\n // apply timezone shift\n [weekDays, from, to] = adjustWeekRange(weekDays, from, to, - new Date().getTimezoneOffset());\n\n let shortDays;\n if (LANG === 'ru') {\n shortDays = ['', \"пн\", \"вт\", \"ср\", \"чт\", \"пт\", \"сб\", \"вс\"];\n } else {\n shortDays = ['', \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"];\n }\n\n weekDays = weekDays.map(day => shortDays[day]);\n\n if (LANG === 'ru') {\n weekDays = weekDays.join('/');\n } else {\n weekDays = weekDays.join(', ');\n }\n\n if (this.hasAttribute('with-zone')) {\n let zone = getTimeZoneName();\n this.setAttribute('data-tooltip', \"Время указано в вашем часовом поясе,
по данным браузера это \" + zone);\n }\n\n this.innerHTML = weekDays + ' ' + from + ' – ' + to;\n\n }\n\n}\n\nwindow.WeekRangeElement = WeekRangeElement;\n\nwindow.customElements.define('week-range', WeekRangeElement);\n","\nfunction findDelegateTarget(event, selector) {\n let currentNode = event.target;\n while (currentNode) {\n if (currentNode.matches(selector)) {\n return currentNode;\n }\n\n if (currentNode == event.currentTarget) {\n break;\n }\n currentNode = currentNode.parentElement;\n }\n return null;\n}\n\n// delegate(table, 'th', click, handler)\n// table\n// thead\n// th ^*\n// code <--\nfunction delegate(topElement, selector, eventName, handler, context) {\n /* jshint -W040 */\n topElement.addEventListener(eventName, function(event) {\n let found = findDelegateTarget(event, selector);\n\n // .currentTarget is read only, I can not overwrite it to the \"found\" element\n // Object.create wrapper would break event.preventDefault()\n // so, keep in mind:\n // --> event.currentTarget is always the top-level (delegating) element!\n // use \"this\" to get the found target\n\n event.delegateTarget = found; // use instead of \"this\" in object methods\n\n if (found) {\n // if in context of object, use object as this,\n handler.call(context || this, event);\n }\n });\n}\n\ndelegate.delegateMixin = function(obj) {\n obj.delegate = function(selector, eventName, handler) {\n delegate(this.elem, selector, eventName, handler, this);\n };\n};\n\nmodule.exports = delegate;\n\n","const disqusEmbedUrl = '//' + window.disqus_shortname + '.disqus.com/embed.js';\nconst disqusCountUrl = '//' + window.disqus_shortname + '.disqus.com/count.js';\n\nfunction loadDisqus() {\n const disqusElem = document.getElementById('disqus_thread');\n\n if (disqusElem.classList.contains('disqus-loading')) {\n return;\n }\n\n disqusElem.classList.add('disqus-loading');\n const spinner = new Spinner({\n size: 'large'\n });\n disqusElem.append(spinner.elem);\n spinner.start();\n\n const s = document.createElement('script');\n s.src = disqusEmbedUrl;\n s.setAttribute('data-timestamp', +new Date());\n document.head.appendChild(s);\n s.onload = () => {\n spinner.stop();\n spinner.elem.remove();\n };\n}\n\nfunction loadDisqusIfVisible() {\n if (!window.disqus_enabled) return;\n\n const disqusElem = document.getElementById('disqus_thread');\n\n // remove ads\n let observer = new MutationObserver(mutationRecords => {\n for(let record of mutationRecords) {\n if (record.type !== 'childList') {\n return;\n }\n if (!record.addedNodes) {\n return;\n }\n record.addedNodes.forEach(node => {\n if (node.tagName === 'IFRAME' && !node.src.includes('embed/comments')) {\n node.remove();\n }\n });\n }\n });\n\n observer.observe(disqusElem, {\n childList: true,\n });\n\n\n if (document.querySelector(`script[src=\"${disqusEmbedUrl}\"]`)) {\n // already loaded or loading\n return;\n }\n\n if (disqusElem.hasChildNodes()) return;\n\n const coords = disqusElem.getBoundingClientRect();\n\n if (coords.top > document.documentElement.clientHeight + 150 || coords.bottom < -150) {\n // not visible +-150 px\n return;\n }\n\n loadDisqus();\n}\n\nfunction loadDisqusComments() {\n const disqusElem = document.getElementById('disqus_comments');\n if (!disqusElem) return;\n\n window.disqus_config();\n disqusElem.dataset.disqusIdentifier = window.page.identifier;\n\n let s = document.createElement('script');\n s.id = \"dsq-count-scr\";\n s.src = disqusCountUrl;\n s.setAttribute('data-timestamp', +new Date());\n document.head.appendChild(s);\n}\n\nexports.loadDisqus = loadDisqus;\nexports.loadDisqusComments = loadDisqusComments;\nexports.loadDisqusIfVisible = loadDisqusIfVisible;\n","let getScrollbarHeight = require('./getScrollbarHeight');\nlet scrollbarHeight;\n\nfunction getDocumentHeight(doc) {\n doc = doc || document;\n\n let height = Math.max(\n doc.body.scrollHeight, doc.documentElement.scrollHeight,\n doc.body.offsetHeight, doc.documentElement.offsetHeight,\n doc.body.clientHeight, doc.documentElement.clientHeight\n );\n\n if (doc.documentElement.scrollWidth > doc.documentElement.clientWidth) {\n // got a horiz scroll, let's add it\n if (!scrollbarHeight) scrollbarHeight = getScrollbarHeight();\n height += scrollbarHeight;\n }\n\n return height;\n}\n\nmodule.exports = getDocumentHeight;\n\n","function getScrollbarHeight() {\n let outer = document.createElement(\"div\");\n outer.style.cssText = \"visibility:hidden;height:100px\";\n if (!document.body) {\n throw new Error(\"getScrollbarHeight called to early: no document.body\");\n }\n document.body.appendChild(outer);\n\n let widthNoScroll = outer.offsetWidth;\n // force scrollbars\n outer.style.overflow = \"scroll\";\n\n // add innerdiv\n let inner = document.createElement(\"div\");\n inner.style.width = \"100%\";\n outer.appendChild(inner);\n\n let widthWithScroll = inner.offsetWidth;\n\n // remove divs\n outer.parentNode.removeChild(outer);\n\n return widthNoScroll - widthWithScroll;\n}\n\nmodule.exports = getScrollbarHeight;\n","let notification = require('client/notification');\n\ndocument.addEventListener(\"click\", function(event) {\n let target = event.target.closest('[data-banner-close]');\n if (!target) {\n return;\n }\n\n localStorage[\"hideBanner\" + target.dataset.bannerClose] = Date.now();\n new notification.Success(target.dataset.bannerCloseMessage);\n\n target.parentNode.remove();\n\n});\n","// add/remove .hover onmouseenter/leave\n// for mobile devices (:hover sticks)\n\nlet currentHoverElem;\n\n/*\nfunction log(e) {\n console.log(Date.now() % 1e4, e.type);\n}\n\ndocument.addEventListener(\"focusin\", log, false);\ndocument.addEventListener(\"focus\", log, false);\ndocument.addEventListener(\"touchstart\", log, false);\ndocument.addEventListener(\"touchend\", log, false);\ndocument.addEventListener(\"touchcancel\", log, false);\ndocument.addEventListener(\"touchleave\", log, false);\ndocument.addEventListener(\"touchmove\", log, false);\ndocument.addEventListener(\"touch\", log, false);\n\ndocument.addEventListener(\"pointerup\", log, false);\ndocument.addEventListener(\"pointerdown\", log, false);\ndocument.addEventListener(\"pointermove\", log, false);\ndocument.addEventListener(\"pointercancel\", log, false);\ndocument.addEventListener(\"mouseover\", log, false);\n*/\ndocument.addEventListener('mouseover', function(event) {\n if (!event.target.closest) return;\n\n let target = event.target.closest('[data-add-class-on-hover]') || event.target.closest('.button');\n if (target) {\n currentHoverElem = target;\n target.classList.add('hover');\n }\n});\n\ndocument.addEventListener('touchend', function(event) {\n setTimeout(function() {\n if (currentHoverElem) {\n currentHoverElem.classList.remove('hover');\n currentHoverElem = null;\n }\n }, 500); // touchstart -> tourchend -> (delay up to 300ms) -> mouseover\n});\n\ndocument.addEventListener('mouseout', function(event) {\n if (!currentHoverElem) return;\n\n if (currentHoverElem.contains(event.relatedTarget)) {\n return;\n }\n\n currentHoverElem.classList.remove('hover');\n currentHoverElem = null;\n});\n\nif (!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)) {\n document.documentElement.classList.add('working-hover');\n}\n\n","const loadDisqus = require('client/disqus').loadDisqus;\nconst loadDisqusComments = require('client/disqus').loadDisqusComments;\nconst loadDisqusIfVisible = require('client/disqus').loadDisqusIfVisible;\n\nlet requestAnimationFrameId;\n\nlet DEBUG = false;\nfunction log() {\n if (DEBUG) {\n console.log.apply(console, arguments);\n }\n}\n\nlet TABLET_WIDTH = 840;\n\n// don't handle onscroll more often than animation\nfunction onWindowScrollAndResizeThrottled() {\n log('onWindowScrollAndResizeThrottled', requestAnimationFrameId);\n if (requestAnimationFrameId) return;\n\n requestAnimationFrameId = window.requestAnimationFrame(function() {\n onWindowScrollAndResize();\n requestAnimationFrameId = null;\n });\n}\n\nwindow.addEventListener('resize-internal', onWindowScrollAndResizeThrottled);\nwindow.addEventListener('scroll', onWindowScrollAndResizeThrottled);\nwindow.addEventListener('resize', onWindowScrollAndResizeThrottled);\n\nif (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', onDOMContentLoaded);\n} else {\n onDOMContentLoaded();\n}\n\nfunction onDOMContentLoaded() {\n initThemeToggler();\n\n if (window.location.hash.match(/#comment-/)) {\n loadDisqus();\n }\n loadDisqusComments();\n\n onWindowScrollAndResizeThrottled();\n if (LANG === 'zh') {\n document.addEventListener('click', (event) => {\n let link = event.target;\n let wechatqq = link.closest('.wechat-qq');\n\n if (!wechatqq) return;\n\n event.preventDefault();\n\n let modal = new Modal();\n modal.setContent(`
\n WeChat\n QQ\n
`);\n });\n }\n}\n\nfunction compactifySidebar() {\n log('compactifySidebar');\n let sidebar = document.querySelector('.sidebar');\n\n if (!sidebar.observer) {\n // watch for ads\n let observer = (sidebar.observer = new MutationObserver(\n (mutationRecords) => {\n // console.log(mutationRecords);\n for (let record of mutationRecords) {\n if (record.type !== 'childList') {\n return;\n }\n // console.log('resize');\n onWindowScrollAndResizeThrottled();\n }\n }\n ));\n observer.observe(sidebar, {\n childList: true,\n subtree: true,\n });\n }\n\n let sidebarContent = sidebar.querySelector('.sidebar__content');\n let sidebarInner = sidebar.querySelector('.sidebar__inner');\n\n let hasStickyFooter = sidebar.classList.contains('sidebar_sticky-footer');\n let isCompact = sidebar.classList.contains('sidebar_compact');\n\n if (isCompact) {\n let emptySpaceSize;\n if (hasStickyFooter) {\n emptySpaceSize =\n sidebarContent.lastElementChild.getBoundingClientRect().top -\n sidebarContent.lastElementChild.previousElementSibling.getBoundingClientRect()\n .bottom;\n } else {\n emptySpaceSize =\n sidebarContent.getBoundingClientRect().bottom -\n sidebarContent.lastElementChild.getBoundingClientRect().bottom;\n }\n\n log('decompact?', emptySpaceSize);\n\n // enough space to occupy the full height in decompacted form without scrollbar\n if (emptySpaceSize > 150) {\n sidebar.classList.remove('sidebar_compact');\n }\n } else {\n log(sidebarInner.scrollHeight, sidebarInner.clientHeight);\n if (sidebarInner.scrollHeight > sidebarInner.clientHeight) {\n log('compact!');\n sidebar.classList.add('sidebar_compact');\n }\n }\n}\n\nfunction onWindowScrollAndResize() {\n let toolbarSelector = '.sitetoolbar';\n let sitetoolbar = document.querySelector(toolbarSelector);\n\n if (!sitetoolbar) {\n log('no sitetoolbar');\n return; // page in a no-top-nav layout\n }\n\n let sidebar = document.querySelector('.sidebar');\n\n if (sidebar) {\n const page = document.querySelector('.page');\n const sidebarTop =\n // checking if it is a profile page and window has tablet size\n page.classList.contains('page_profile') &&\n getComputedStyle(page).display === 'flex'\n ? 0\n : Math.max(sitetoolbar.getBoundingClientRect().bottom, 0) + 'px';\n sidebar.style.top = sidebarTop;\n compactifySidebar();\n }\n\n setUserScaleIfTablet();\n\n loadDisqusIfVisible();\n}\n\nfunction setUserScaleIfTablet() {\n let isTablet = document.documentElement.clientWidth <= TABLET_WIDTH;\n let content = document.querySelector('meta[name=\"viewport\"]').content;\n content = content.replace(\n /user-scalable=\\w+/,\n 'user-scalable=' + (isTablet ? 'yes' : 'no')\n );\n document.querySelector('meta[name=\"viewport\"]').content = content;\n}\n\nfunction initThemeToggler() {\n let themeTogglers = [...document.querySelectorAll('input[data-theme-changer]')];\n for(let themeToggler of themeTogglers) {\n themeToggler.onchange = () => {\n const newThemeIsDark = themeToggler.checked;\n const oldTheme = newThemeIsDark ? 'light' : 'dark';\n const newTheme = newThemeIsDark ? 'dark' : 'light';\n changeTheme(oldTheme, newTheme);\n };\n\n themeToggler.checked = document.documentElement.dataset.theme == 'dark';\n }\n}\n\nfunction changeTheme(oldTheme, newTheme) {\n // console.info(\"Theme change\", oldTheme, newTheme);\n\n document.documentElement.dataset.theme = newTheme;\n localStorage.setItem('theme', newTheme);\n\n for(let elem of document.querySelectorAll('[data-use-theme]')) {\n if (elem.tagName == 'OBJECT') {\n window.themeSvg(elem, oldTheme, newTheme);\n }\n }\n\n if (window.DISQUS) {\n DISQUS.reset({ reload: true, config: disqus_config });\n }\n}\n","let Spinner = require('client/spinner');\n\nfor(let elem of document.querySelectorAll('[data-action-login]')) {\n for(let cls of elem.classList) {\n if (cls.endsWith('_unready')) {\n elem.classList.remove(cls);\n }\n }\n}\n\n\ndocument.addEventListener(\"click\", function(event) {\n if (!event.target.hasAttribute('data-action-login')) {\n return;\n }\n\n let options = { email: event.target.getAttribute('data-action-login') };\n\n event.preventDefault();\n login(options);\n\n});\n\nfunction login(options) {\n let modal = new Modal({ hasClose: false, mixClass: 'login-modal' });\n let spinner = new Spinner();\n modal.setContent(spinner.elem);\n\n spinner.start();\n\n require.ensure('auth/client/authModal', function() {\n modal.remove();\n let AuthModal = require('auth/client/authModal');\n new AuthModal(options);\n }, 'authClient');\n\n}\n\nmodule.exports = login;\n","\n\ndocument.addEventListener('click', function(e) {\n if (e.target.hasAttribute('data-action-user-logout')) {\n e.preventDefault();\n logout();\n }\n});\n\n\nfunction logout() {\n let form = document.createElement('form');\n form.method = 'POST';\n form.action = '/auth/logout?_csrf=' + document.cookie.match(/XSRF-TOKEN=([\\w-]+)/)[1];\n document.body.appendChild(form);\n form.submit();\n}\n\n\nmodule.exports = logout;\n","// navigation starts to work right now\nlet onSwipe = require('client/onSwipe');\n\nfunction onKeyDown(event) {\n // don't react on Ctrl-> <- if in text\n if (document.activeElement) {\n if (~['INPUT', 'TEXTAREA', 'SELECT'].indexOf(document.activeElement.tagName)) return;\n }\n\n if (!event.ctrlKey) return;\n\n let rel = null;\n switch (event.keyCode) {\n case 0x25:\n rel = 'prev';\n break;\n case 0x27:\n rel = 'next';\n break;\n default:\n return;\n }\n\n let link = document.querySelector('link[rel=\"' + rel + '\"]');\n if (!link) return;\n\n document.location = link.href;\n event.preventDefault();\n\n}\n\nfunction showHotKeys() {\n let shortcut;\n\n let next = document.querySelector('link[rel=\"next\"]');\n if (next) {\n shortcut = document.querySelector('a[href=\"' + next.getAttribute('href') + '\"] .page__nav-text-shortcut');\n shortcut.innerHTML = 'Ctrl + ';\n }\n\n let prev = document.querySelector('link[rel=\"prev\"]');\n if (prev) {\n shortcut = document.querySelector('a[href=\"' + prev.getAttribute('href') + '\"] .page__nav-text-shortcut');\n shortcut.innerHTML = 'Ctrl + ';\n }\n\n}\n\nonSwipe(document, {\n onRight: function() {\n let link = document.querySelector('link[rel=\"prev\"]');\n if (link) document.location = link.href;\n },\n onLeft: function() {\n let link = document.querySelector('link[rel=\"next\"]');\n if (link) document.location = link.href;\n }\n});\n\ndocument.addEventListener('keydown', onKeyDown);\n\nif (document.readyState == 'loading') {\n document.addEventListener('DOMContentLoaded', showHotKeys);\n} else {\n showHotKeys();\n}\n\n","let getDocumentHeight = require('client/dom/getDocumentHeight');\n\nfunction iframeResize(ifrElem, callback) {\n try {\n // throws if cross-domain\n (ifrElem.contentDocument || ifrElem.contentWindow.document).body;\n } catch (e) {\n return;\n // not implemented crossdomain resize\n // iframeResizeCrossDomain(ifrElem, done);\n }\n\n let timeoutTimer = setTimeout(function() {\n // default height\n callback(new Error(\"timeout\"));\n }, 500);\n\n function done(err, height) {\n clearTimeout(timeoutTimer);\n\n callback(err, height);\n }\n\n // HINT: I shoulnd't move iframe in DOM, because it will reload it's contents when appended/inserted anywhere!\n // so I create a clone and work on it\n if (!ifrElem.offsetWidth) {\n // clone iframe at another place to see the size\n let cloneIframe = ifrElem.cloneNode(true);\n cloneIframe.name = \"\";\n\n cloneIframe.style.height = '50px';\n cloneIframe.style.position = 'absolute';\n cloneIframe.style.display = 'block';\n cloneIframe.style.top = '10000px';\n\n cloneIframe.onload = function() {\n let height = getDocumentHeight(this.contentDocument);\n ifrElem.style.display = 'block';\n cloneIframe.remove();\n done(null, height);\n };\n\n document.body.appendChild(cloneIframe);\n return;\n }\n\n ifrElem.style.display = 'block';\n ifrElem.style.height = '1px';\n\n let height = getDocumentHeight(ifrElem.contentDocument);\n\n ifrElem.style.height = '';\n done(null, height);\n}\n\niframeResize.async = function iframeResizeAsync(iframe, callback) {\n // delay to let the code inside the iframe finish\n setTimeout(function() {\n iframeResize(iframe, callback);\n }, 0);\n};\n\n\nfunction iframeResizeCrossDomain(ifrElem, callback) {\n throw new Error(\"Not implemented yet\");\n}\n\nmodule.exports = iframeResize;\n\n\n/*\n window.onmessage = function(e) {\n if (e.origin != \"http://ru.lookatcode.com\") return;\n let data = JSON.parse(e.data);\n if (!data || data.cmd != \"resize-iframe\") return;\n let elem = document.getElementsByName(data.name)[0];\n\n elem.style.height = +data.height + 10 + \"px\";\n let deferred = iframeResizeCrossDomain.deferreds[data.id];\n deferred.resolve();\n };\n\n function iframeResizeCrossDomain(ifrElem, callback) {\n\n setTimeout(function() {\n callback(new Error(\"timeout\"));\n }, 500);\n\n try {\n // try to see if resizer can work on this iframe\n ifrElem.contentWindow.postMessage(\"test\", \"http://ru.lookatcode.com\");\n } catch(e) {\n // iframe from another domain, sorry\n callback(new Error(\"the resizer must be from ru.lookatcode.com\"));\n return;\n }\n\n if (!ifrElem.offsetWidth) {\n // move iframe to another place to resize there\n let placeholder = document.createElement('span');\n ifrElem.parentNode.insertBefore(placeholder, ifrElem);\n document.body.appendChild(ifrElem);\n }\n\n ifrElem.style.display = 'none';\n\n let id = \"\" + Math.random();\n let message = { cmd: 'resize-iframe', name: ifrElem[0].name, id: id };\n // TODO\n iframeResizeCrossDomain.deferreds[id] = deferred;\n deferred.always(function() {\n delete iframeResizeCrossDomain.deferreds[id];\n });\n\n let frame = iframeResizeCrossDomain.iframe;\n if (frame.loaded) {\n frame.contentWindow.postMessage(JSON.stringify(message), \"http://ru.lookatcode.com\");\n } else {\n frame.on('load', function() {\n frame.contentWindow.postMessage(JSON.stringify(message), \"http://ru.lookatcode.com\");\n });\n }\n\n if (placeholder) {\n setTimeout(function() {\n placeholder.replaceWith(ifrElem);\n }, 20);\n }\n\n return deferred;\n }\n\n iframeResizeCrossDomain.deferreds = {};\n iframeResizeCrossDomain.iframe = $('').prependTo('body');\n iframeResizeCrossDomain.iframe.on('load', function() {\n this.loaded = true;\n });\n */\n","let iframeResize = require('./iframeResize');\nlet throttle = require('lib/throttle');\n// track resized iframes in window.onresize\n\nlet onResizeQueue = [];\n\nexports.iframe = function(iframe) {\n\n function resize() {\n iframeResize.async(iframe, function(err, height) {\n if (err) console.error(err);\n if (height) iframe.style.height = height + 'px';\n });\n }\n\n resize();\n};\n\nexports.codeTabs = function(iframe) {\n function hideShowArrows() {\n\n // add arrows if needed\n let elem = iframe.closest('.code-tabs');\n let contentElem = iframe.closest('[data-code-tabs-content]');\n let switchesElem = elem.querySelector('[data-code-tabs-switches]');\n let switchesElemItems = switchesElem.firstElementChild;\n\n if (switchesElemItems.offsetWidth > switchesElem.offsetWidth) {\n elem.classList.add('code-tabs_scroll');\n } else {\n elem.classList.remove('code-tabs_scroll');\n }\n\n }\n\n hideShowArrows();\n onResizeQueue.push(hideShowArrows);\n};\n\n\n\nwindow.addEventListener('resize', throttle(function() {\n onResizeQueue.forEach(onResize => onResize());\n}, 200));\n","module.exports = class SiteSearch {\n constructor({elem}) {\n this.elem = elem;\n\n this.formElem = this.elem.querySelector('.sitetoolbar__search');\n this.toggleElem = this.elem.querySelector('.sitetoolbar__search-toggle');\n this.searchInput = this.elem.querySelector('.sitetoolbar__search-input input');\n this.findButton = this.elem.querySelector('.sitetoolbar__find');\n\n this.toggleElem.onclick = this.onToggleClick.bind(this);\n this.searchInput.onkeydown = this.onSearchInputKeydown.bind(this);\n this.searchInput.onblur = this.onSearchInputBlur.bind(this);\n //this.formElem.onsubmit = this.onFormSubmit.bind(this);\n this.findButton.onpointerdown = this.onFindPointerDown.bind(this);\n }\n\n onToggleClick() {\n this.show();\n }\n\n onSearchInputKeydown(event) {\n if (event.keyCode == 27) {\n this.searchInput.value = \"\";\n this.searchInput.blur();\n }\n };\n\n onFindPointerDown() {\n if (this.searchInput.value) {\n this.formElem.submit();\n }\n }\n\n onSearchInputBlur() {\n this.hide();\n }\n\n show() {\n console.log('show');\n\n if (!this.formElem.parentNode) {\n this.elem.append(this.formElem);\n }\n\n let sitetoolbar = document.querySelector('.sitetoolbar');\n\n // zero-delay needed for the input left animation to start after the form is appended\n setTimeout(() => sitetoolbar.classList.add('sitetoolbar_search_open'));\n\n this.searchInput.focus();\n\n let paranja = document.createElement('div');\n paranja.className = 'search-paranja';\n paranja.style.top = sitetoolbar.offsetHeight + 'px';\n\n document.body.appendChild(paranja);\n document.body.classList.add('paranja-open');\n }\n\n hide() {\n console.log('hide');\n let paranja = document.querySelector('.search-paranja');\n paranja.remove();\n\n let sitetoolbar = document.querySelector('.sitetoolbar');\n\n sitetoolbar.classList.remove('sitetoolbar_search_open');\n\n document.body.classList.remove('paranja-open');\n this.formElem.remove();\n }\n};","\nconst SiteSearch = require('./siteSearch');\n\ndocument.addEventListener('click', onSearchClick);\ndocument.addEventListener('click', onDropdownTogglerClick);\ndocument.addEventListener('click', onNavToggle);\n\nlet searchInitialized = false;\n\n// let sitetoolbarClassName = document.documentElement.lang === 'ru' ? 'sitetoolbar' : 'sitetoolbar-light';\nlet sitetoolbarClassName = 'sitetoolbar';\nlet sitetoolbarSelector = '.' + sitetoolbarClassName;\n\nlet siteSearch;\n\nfunction onDropdownTogglerClick(event) {\n if (!event.target.closest) return; // svg\n let toggler = event.target.closest('[data-dropdown-toggler]');\n if (!toggler) return;\n toggler.nextElementSibling.style.display = toggler.nextElementSibling.offsetWidth ? 'none' : 'block';\n}\n\nfunction onNavToggle(event) {\n if (!event.target.closest) return; // svg\n let toggler = event.target.closest('.sitetoolbar__nav-toggle');\n if (!toggler) return;\n event.target.classList.toggle('sitetoolbar__nav-toggle_active');\n document.querySelector('.sitetoolbar').classList.toggle('sitetoolbar_menu_open');\n}\n\n// toggle search on/off, autofocus on input when \"on\"\nfunction onSearchClick(event) {\n if (!event.target.closest) return; // svg\n\n if (!event.target.closest('.sitetoolbar__search-toggle')) {\n return;\n }\n\n let searchElem = document.querySelector('.sitetoolbar__search-content');\n\n if (!siteSearch) {\n siteSearch = new SiteSearch({ elem: searchElem });\n siteSearch.show();\n }\n}\n","document.addEventListener('click', e => {\n if (e.target.classList.contains('spoiler__button')) {\n let spoilerElem = e.target.closest('.spoiler');\n spoilerElem.classList.toggle('open');\n spoilerElem.classList.toggle('closed');\n }\n});","// current page host\nlet baseURI = window.location.host;\nlet gaHitCallback = require('gaHitCallback');\n\ndocument.addEventListener('click', function(e) {\n\n if (e.which != 1) return; // track only left-mouse clicks\n if (e.defaultPrevented) return;\n\n // abandon if no active link or link within domain\n let link = e.target.closest && e.target.closest(\"a\");\n if (!link || (baseURI == link.host && !link.hasAttribute('data-track-outbound'))) return;\n\n // invalid or blank target\n if (!~[\"_self\", \"_top\", \"_parent\"].indexOf(link.target)) return;\n\n if (e.shiftKey || e.ctrlKey || e.altKey) return;\n\n // cancel event and record outbound link\n e.preventDefault();\n let href = link.href;\n\n // GA4\n // window.ga('send', 'event', {\n // eventCategory: 'outbound',\n // eventAction: 'click',\n // eventLabel: href,\n // hitCallback: gaHitCallback(loadPage)\n // });\n\n // redirect to outbound page\n function loadPage() {\n document.location = href;\n }\n\n});\n","/**\n * For new notification types extend Notification\n */\n\nlet delegate = require('client/delegate');\n\n/**\n * Calculates translateY positions when notifications are added/removed\n */\nclass NotificationManager {\n\n constructor(options = {}) {\n this.notifications = [];\n this.verticalSpace = options.verticalSpace || 8;\n }\n\n register(notification) {\n this.notifications.unshift(notification);\n setTimeout(() => this.recalculate(), 20);\n }\n\n unregister(notification) {\n let idx = this.notifications.indexOf(notification);\n this.notifications.splice(idx, 1);\n this.recalculate();\n }\n\n recalculate() {\n let top = this.verticalSpace;\n this.notifications.forEach(notification => {\n notification.top = top;\n top += notification.height + this.verticalSpace;\n });\n }\n\n}\n\n// if this module is included into different webpack builds,\n// ensure they share the same manager object\nexport function init(options) {\n if (!window.notificationManager) {\n window.notificationManager = new NotificationManager(options);\n }\n}\n\n\nclass Notification {\n\n constructor(html, type, timeout) {\n let elemHtml = `
\n
${html}
\n
`;\n\n document.body.insertAdjacentHTML(\"beforeEnd\", elemHtml);\n\n this.elem = document.body.lastElementChild;\n\n switch(timeout) {\n case undefined:\n this.timeout = this.TIMEOUT_DEFAULT;\n break;\n case 'slow':\n this.timeout = this.TIMEOUT_SLOW;\n break;\n case 'fast':\n this.timeout = this.TIMEOUT_FAST;\n break;\n default:\n this.timeout = timeout;\n }\n\n\n window.notificationManager.register(this);\n this.setupCloseHandler();\n this.setupCloseTimeout();\n }\n\n get TIMEOUT_DEFAULT() {\n return 3000;\n }\n\n get TIMEOUT_SLOW() {\n return 5000;\n }\n\n get TIMEOUT_FAST() {\n return 1500;\n }\n\n\n close() {\n if (!this.elem.parentNode) return; // already closed (by user click?)\n this.elem.remove();\n window.notificationManager.unregister(this);\n }\n\n setupCloseHandler() {\n this.delegate('.notification__close', 'click', () => this.close());\n }\n\n setupCloseTimeout() {\n if (this.timeout) {\n setTimeout(() => this.close(), this.timeout);\n }\n }\n\n get height() {\n return this.elem.offsetHeight;\n }\n\n set top(value) {\n this.elem.style.transform = 'translateY(' + value + 'px)';\n }\n\n}\n\ndelegate.delegateMixin(Notification.prototype);\n\n\nexport class Info extends Notification {\n\n constructor(html, timeout) {\n super(html, 'info', timeout);\n }\n\n}\n\nexport class Warning extends Notification {\n\n constructor(html, timeout) {\n super(html, 'warning', timeout);\n }\n}\n\nexport class Success extends Notification {\n\n constructor(html, timeout) {\n super(html, 'success', timeout);\n }\n\n}\n\nexport class Error extends Notification {\n\n constructor(html, timeout) {\n super(html, 'error', timeout);\n }\n\n\n get TIMEOUT_DEFAULT() {\n return 5000;\n }\n\n\n}\n\n/*\nexport class Test extends Notification {\n\n constructor(html) {\n super(html, 'error');\n }\n\n\n get TIMEOUT_DEFAULT() {\n return null;\n }\n\n\n}\n\nexports.Test = Test;\n*/\n","function onSwipe(elem, options) {\n\n options = options || {};\n\n let startX,\n startY,\n dist,\n onRight = options.onRight || function() {},\n onLeft = options.onLeft || function(){},\n tolerance = options.tolerance || 50, // maximum vertical distance\n threshold = options.threshold || 150, //required min distance traveled to be considered swipe\n allowedTime = options.allowedTime || 500, // maximum time allowed to travel that distance\n elapsedTime,\n startTime;\n\n elem.addEventListener('touchstart', function(e) {\n let touchobj = e.changedTouches[0];\n dist = 0;\n startX = touchobj.pageX;\n startY = touchobj.pageY;\n //console.log(\"start\", startX, startY);\n startTime = Date.now(); // record time when finger first makes contact with surface\n });\n\n elem.addEventListener('touchend', function(e) {\n let touchobj = e.changedTouches[0];\n dist = touchobj.pageX - startX; // get total dist traveled by finger while in contact with surface\n elapsedTime = Date.now() - startTime; // get time elapsed\n\n //console.log(\"end\", touchobj.pageX, touchobj.pageY);\n\n // too much up/down\n if (Math.abs(touchobj.pageY - startY) > tolerance) return;\n\n //console.log(\"time\", elapsedTime, allowedTime);\n\n // too slow\n if (elapsedTime > allowedTime) return;\n\n let insideScrollable = false;\n let elem = e.target;\n while(elem != document.body) {\n if (elem.scrollWidth > elem.clientWidth) {\n insideScrollable = true;\n break;\n }\n elem = elem.parentElement;\n }\n\n if (insideScrollable) return;\n\n //console.log(\"threshold\", dist, threshold);\n\n if (dist > threshold) {\n //console.log(\"right\");\n onRight(e);\n }\n\n if (dist < -threshold) {\n //console.log(\"left\");\n onLeft(e);\n }\n });\n\n}\n\nmodule.exports = onSwipe;\n","\ntry {\n new CustomEvent(\"IE has CustomEvent, but doesn't support constructor\");\n} catch (e) {\n\n window.CustomEvent = function(event, params) {\n let evt;\n params = params || {\n bubbles: false,\n cancelable: false,\n detail: undefined\n };\n evt = document.createEvent(\"CustomEvent\");\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n };\n\n CustomEvent.prototype = Object.create(window.Event.prototype);\n}\n\n","// dataset for IE10\n\nif (!document.documentElement.dataset &&\n // FF is empty while IE gives empty object\n (!Object.getOwnPropertyDescriptor(Element.prototype, 'dataset') ||\n !Object.getOwnPropertyDescriptor(Element.prototype, 'dataset').get)\n) {\n let propDescriptor = {\n enumerable: true,\n get: function () {\n 'use strict';\n let i,\n that = this,\n HTML5_DOMStringMap,\n attrVal, attrName, propName,\n attribute,\n attributes = this.attributes,\n attsLength = attributes.length,\n toUpperCase = function (n0) {\n return n0.charAt(1).toUpperCase();\n },\n getter = function () {\n return this;\n },\n setter = function (attrName, value) {\n return (typeof value !== 'undefined') ?\n this.setAttribute(attrName, value) :\n this.removeAttribute(attrName);\n };\n try { // Simulate DOMStringMap w/accessor support\n // Test setting accessor on normal object\n ({}).__defineGetter__('test', function () {});\n HTML5_DOMStringMap = {};\n }\n catch (e1) { // Use a DOM object for IE8\n HTML5_DOMStringMap = document.createElement('div');\n }\n for (i = 0; i < attsLength; i++) {\n attribute = attributes[i];\n // Fix: This test really should allow any XML Name without\n // colons (and non-uppercase for XHTML)\n if (attribute && attribute.name &&\n (/^data-\\w[\\w\\-]*$/).test(attribute.name)) {\n attrVal = attribute.value;\n attrName = attribute.name;\n // Change to CamelCase\n propName = attrName.substr(5).replace(/-./g, toUpperCase);\n try {\n Object.defineProperty(HTML5_DOMStringMap, propName, {\n enumerable: this.enumerable,\n get: getter.bind(attrVal || ''),\n set: setter.bind(that, attrName)\n });\n }\n catch (e2) { // if accessors are not working\n HTML5_DOMStringMap[propName] = attrVal;\n }\n }\n }\n return HTML5_DOMStringMap;\n }\n };\n try {\n // FF enumerates over element's dataset, but not\n // Element.prototype.dataset; IE9 iterates over both\n Object.defineProperty(Element.prototype, 'dataset', propDescriptor);\n } catch (e) {\n propDescriptor.enumerable = false; // IE8 does not allow setting to true\n Object.defineProperty(Element.prototype, 'dataset', propDescriptor);\n }\n}","//require('./casperjs');\n\n// http://dom.spec.whatwg.org/#mutation-method-macro\nfunction mutation(nodes) {\n if (!nodes.length) {\n throw new Error('DOM Exception 8');\n } else if (nodes.length === 1) {\n return typeof nodes[0] === 'string' ? document.createTextNode(nodes[0]) : nodes[0];\n } else {\n let\n fragment = document.createDocumentFragment(),\n length = nodes.length,\n index = -1,\n node;\n\n while (++index < length) {\n node = nodes[index];\n\n fragment.appendChild(typeof node === 'string' ? document.createTextNode(node) : node);\n }\n\n return fragment;\n }\n}\n\nlet methods = {\n // safari = webkitMatchesSelector\n matches: Element.prototype.matchesSelector || Element.prototype.webkitMatchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector,\n replace() {\n if (this.parentNode) {\n this.parentNode.replaceChild(mutation(arguments), this);\n }\n },\n prepend() {\n this.insertBefore(mutation(arguments), this.firstChild);\n },\n append() {\n this.appendChild(mutation(arguments));\n },\n remove() {\n let parentNode = this.parentNode;\n if (parentNode) {\n return parentNode.removeChild(this);\n }\n },\n before: function before() {\n if (this.parentNode) {\n this.parentNode.insertBefore(mutation(arguments), this);\n }\n },\n\n after: function after() {\n if (this.parentNode) {\n this.parentNode.insertBefore(mutation(arguments), this.nextSibling);\n }\n },\n closest: function(selector) {\n let node = this;\n\n while (node) {\n if (node.matches && node.matches(selector)) return node;\n else node = node.parentElement;\n }\n return null;\n }\n};\n\nfor (let methodName in methods) {\n if (!Element.prototype[methodName]) {\n Element.prototype[methodName] = methods[methodName];\n }\n}\n\nrequire('./customEvent');\nrequire('./dataset');\nrequire('./hidden');\nrequire('./requestAnimationFrame');\nrequire('@webcomponents/custom-elements');","if (document.documentElement.hidden === undefined) {\n document.head.insertAdjacentHTML('beforeEnd', '');\n Object.defineProperty(Element.prototype, \"hidden\", {\n set: function(value) {\n this.setAttribute('hidden', value);\n },\n get: function() {\n return this.getAttribute('hidden');\n }\n });\n}\n","require('./dom');\nrequire('./string');\n\nif (typeof globalThis == 'undefined') {\n window.globalThis = window;\n}\n","// polyfill for old Android\n(function() {\n let lastTime = 0;\n\n if (!window.requestAnimationFrame)\n window.requestAnimationFrame = function(callback, element) {\n let currTime = new Date().getTime();\n let timeToCall = Math.max(0, 16 - (currTime - lastTime));\n let id = window.setTimeout(function() { callback(currTime + timeToCall); },\n timeToCall);\n lastTime = currTime + timeToCall;\n return id;\n };\n\n if (!window.cancelAnimationFrame)\n window.cancelAnimationFrame = function(id) {\n clearTimeout(id);\n };\n}());","require('core-js/fn/string/match-all');\n\nif (!String.prototype.startsWith) {\n String.prototype.startsWith = function(string) {\n let index = arguments.length < 2 ? 0 : arguments[1];\n\n return this.slice(index).indexOf(string) === 0;\n };\n}\n\nif (!String.prototype.endsWith) {\n String.prototype.endsWith = function(string) {\n let index = arguments.length < 2 ? this.length : arguments[1];\n let foundIndex = this.lastIndexOf(string);\n return foundIndex !== -1 && foundIndex === index - string.length;\n };\n}\n\nif (!String.prototype.includes) {\n String.prototype.includes = function(string, index) {\n if (typeof string === 'object' && string instanceof RegExp) throw new TypeError(\"First argument to String.prototype.includes must not be a regular expression\");\n return this.indexOf(string, index) !== -1;\n };\n}\n\n\nif (!String.prototype.padStart) {\n String.prototype.padStart = function padStart(targetLength, padString) {\n targetLength = targetLength >> 0; //truncate if number, or convert non-number to 0;\n padString = String(typeof padString !== 'undefined' ? padString : ' ');\n if (this.length >= targetLength) {\n return String(this);\n } else {\n targetLength = targetLength - this.length;\n if (targetLength > padString.length) {\n padString += padString.repeat(targetLength / padString.length); //append to original to ensure we are longer than needed\n }\n return padString.slice(0, targetLength) + String(this);\n }\n };\n}\n","let moment = require('engine/moment-with-locale');\nconst getSymbolFromCurrency = require('currency-symbol-map');\n\nclass PriceCurrencyElem extends HTMLElement {\n\n constructor() {\n super();\n\n this.render();\n }\n\n connectedCallback() {\n this.render();\n }\n\n static get observedAttributes() {\n return ['amount', 'convert-to', 'only'];\n }\n\n attributeChangedCallback(name, oldValue, newValue) {\n this.render();\n }\n\n addCurrencySign(amount, currency) {\n if (['CNY'].includes(currency)) {\n return amount + getSymbolFromCurrency(currency);\n } else {\n return getSymbolFromCurrency(currency) + amount;\n }\n }\n\n // from=\"...\" to=\"...\"\n render() {\n // firefox throws error with infinite recursion otherwise\n let params = PriceCurrencyElem.observedAttributes.map(f => this.getAttribute(f)).join(':');\n if (this.lastParams === params) {\n return;\n }\n this.lastParams = params;\n\n let amount = +this.getAttribute('amount');\n\n let output = {};\n\n if (window.countryCode == 'am') { // armenia\n output.amount = '֏' + Math.round(amount * window.rateShopTo.AMD);\n\n output.convertTo = this.addCurrencySign(amount, window.shopCurrency);\n } else {\n if (window.shopCurrency == 'RUB') {\n output.amount = amount + 'р';\n if (this.getAttribute('convert-to')) {\n let convertToCurrency = this.getAttribute('convert-to');\n output.convertTo = this.addCurrencySign(Math.round(amount * window.rateShopTo[convertToCurrency]), convertToCurrency);\n }\n } else {\n output.amount = this.addCurrencySign(amount, window.shopCurrency);\n output.convertTo = this.addCurrencySign(Math.round(amount * window.rateShopTo[window.localCurrency]), window.localCurrency);\n }\n }\n\n this.innerHTML = this.getAttribute('only') == 'amount' ? output.amount :\n this.getAttribute('only') == 'convert-to' ? output.convertTo :\n (\n output.amount + (output.convertTo ? ` (≈${output.convertTo})` : '')\n );\n\n }\n\n}\n\nwindow.PriceCurrencyElem = PriceCurrencyElem;\n\nwindow.customElements.define('price-currency', PriceCurrencyElem);\n","// @see https://stackoverflow.com/questions/48224799/test-invisible-recaptcha hot to test captcha\n\nasync function init() {\n if (!window.RECAPTCHA_ID) return;\n\n if (init.promise) return init.promise;\n\n init.promise = new Promise((resolve, reject) => {\n window.recaptchaCallback = resolve;\n let script = document.createElement('script');\n script.src = `https://www.google.com/recaptcha/api.js?onload=recaptchaCallback&render=explicit`;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n\n return init.promise;\n}\n\nexports.Recaptcha = require('./recaptcha');\n\nexports.initForms = require('./initForms');","let loadScript = require('./loadScript');\nlet Recaptcha = require('./recaptcha');\n\nmodule.exports = async function() {\n let submitButtons = document.querySelectorAll('[data-recaptcha-submit]');\n if (!submitButtons.length) return;\n\n for(let button of submitButtons) {\n button.disabled = true;\n }\n\n await loadScript();\n\n for(let button of submitButtons) {\n let form = button.form;\n \n let recaptcha = new Recaptcha(form);\n \n form.onsubmit = async (event) => {\n event.preventDefault();\n await recaptcha.validateForm(form);\n \n if (form.checkValidity()) {\n form.submit();\n } else {\n form.reportValidity();\n }\n }\n\n button.disabled = false;\n }\n\n}","let promise;\n\nmodule.exports = async function loadScript() {\n if (!window.RECAPTCHA_ID) return;\n\n if (promise) return promise;\n\n promise = new Promise((resolve, reject) => {\n window.recaptchaCallback = resolve;\n let script = document.createElement('script');\n script.src = `https://www.google.com/recaptcha/api.js?onload=recaptchaCallback&render=explicit`;\n script.onerror = reject;\n document.head.appendChild(script);\n });\n\n return promise;\n}\n\n","let loadScript = require('./loadScript');\n\nmodule.exports = class Recaptcha {\n constructor(elem) {\n this.elem = elem;\n\n this.renderPromise = new Promise((resolve, reject) => {\n this.renderPromiseResolve = resolve;\n this.renderPromiseReject = reject;\n });\n\n this.render();\n }\n\n async render() {\n if (!window.RECAPTCHA_ID) return;\n\n // console.log('RENDER');\n \n if (this.widgetId !== undefined) return; // already rendered\n\n await loadScript();\n\n let container = document.createElement('div');\n this.elem.append(container);\n this.widgetId = grecaptcha.render(container, {\n sitekey: window.RECAPTCHA_ID,\n size: 'invisible',\n callback: this.renderPromiseResolve,\n });\n\n // console.log('RENDERED', this.widgetId);\n }\n\n async execute() {\n if (!window.RECAPTCHA_ID) return '';\n await this.render();\n\n let token = grecaptcha.getResponse(this.widgetId);\n\n // console.log(\"TOKEN\", token);\n if (token) {\n // already resolved\n return token;\n }\n\n // prevent body scroll while modal captcha is open\n // document.body.classList.add('overflow-hidden');\n // this.renderPromise.then(() => document.body.classList.remove('overflow-hidden'));\n\n grecaptcha.execute(this.widgetId);\n\n // console.log('EXECUTED', this.widgetId);\n return this.renderPromise;\n }\n\n async validateForm(form) {\n if (!window.RECAPTCHA_ID) return;\n\n let token = await this.execute();\n\n // console.log(\"VALIDATE TOKEN\", token);\n let input = form.elements['g-recaptcha-response'];\n if (!input) {\n input = document.createElement('input');\n input.name = 'g-recaptcha-response';\n input.type = 'hidden';\n form.append(input);\n }\n\n input.value = token;\n }\n};\n","// Usage:\n// 1) new Spinner({ elem: elem}) -> start/stop()\n// 2) new Spinner() -> somewhere.append(spinner.elem) -> start/stop\nfunction Spinner(options) {\n options = options || {};\n this.elem = options.elem;\n\n this.size = options.size || 'medium';\n // any class to add to spinner (make spinner special here)\n this.class = options.class ? (' ' + options.class) : '';\n\n // any class to add to element (to hide it's content for instance)\n this.elemClass = options.elemClass;\n\n if (this.size != 'medium' && this.size != 'small' && this.size != 'large') {\n throw new Error(\"Unsupported size: \" + this.size);\n }\n\n if (!this.elem) {\n this.elem = document.createElement('div');\n }\n}\n\nSpinner.prototype.start = function() {\n if (this.elemClass) {\n this.elem.classList.toggle(this.elemClass);\n }\n\n this.elem.insertAdjacentHTML('beforeend', '');\n};\n\nSpinner.prototype.stop = function() {\n let spinnerElem = this.elem.querySelector('.spinner');\n if (!spinnerElem) return; // already stopped or never started\n\n spinnerElem.remove();\n\n if (this.elemClass) {\n this.elem.classList.toggle(this.elemClass);\n }\n};\n\nwindow.Spinner = Spinner;\n\nmodule.exports = Spinner;\n","const config = require('config');\n\nconst lang = config.lang;\n\nlet moment = require('moment');\n\nif (lang === 'ru') {\n require('moment/locale/ru');\n\n moment.updateLocale('ru', {\n monthsShort: {\n // по CLDR именно \"июл.\" и \"июн.\", но какой смысл менять букву на точку ?\n format: 'янв_фев_мар_апр_мая_июня_июля_авг_сен_окт_ноя_дек'.split('_'),\n standalone: 'янв_фев_мар_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_')\n }\n });\n\n} else if (lang === 'zh') {\n require('moment/locale/zh-cn');\n} else if (lang !== 'en') { // for \"en\" no need to require, it's built-in (require would fail)\n require('moment/locale/' + lang);\n}\n\n\nmodule.exports = moment;\n","\ndocument.addEventListener('click', onClick);\n\ndocument.addEventListener('keydown', onKeyDown);\n\ninitSidebarHighlight();\n\nfunction toggle() {\n\n let pageWrapper = document.querySelector('.page-wrapper');\n\n document.querySelector('.page').classList.toggle('page_sidebar_on');\n\n pageWrapper && pageWrapper.classList.toggle('page-wrapper_sidebar_on');\n\n if (document.querySelector('.page').classList.contains('page_sidebar_on')) {\n delete localStorage.noSidebar;\n } else {\n localStorage.noSidebar = 1;\n }\n\n}\n\nfunction onClick(event) {\n\n if (!event.target.hasAttribute('data-sidebar-toggle')) return;\n\n toggle();\n}\n\n\nfunction onKeyDown(event) {\n // don't react on Ctrl-> <- if in text\n if (document.activeElement) {\n if (~['INPUT', 'TEXTAREA', 'SELECT'].indexOf(document.activeElement.tagName)) return;\n }\n\n if (event.keyCode != \"S\".charCodeAt(0)) return;\n\n if (~navigator.userAgent.toLowerCase().indexOf(\"mac os x\")) {\n if (!event.metaKey || !event.altKey) return;\n } else {\n if (!event.altKey) return;\n }\n\n toggle();\n event.preventDefault();\n\n}\n\nfunction initSidebarHighlight() {\n\n function highlight() {\n\n let current = document.getElementsByClassName('sidebar__navigation-link_active');\n if (current[0]) current[0].classList.remove('sidebar__navigation-link_active');\n\n //debugger;\n let h2s = document.getElementsByTagName('h2');\n let i;\n for (i = 0; i < h2s.length; i++) {\n let h2 = h2s[i];\n // first in-page header\n // >1, because when visiting http://javascript.local/native-prototypes#native-prototype-change,\n // top may be 0.375 or kind of...\n if (h2.getBoundingClientRect().top > 1) break;\n }\n i--; // we need the one before it (currently reading)\n\n if (i >= 0) {\n let href = h2s[i].firstElementChild && h2s[i].firstElementChild.getAttribute('href');\n let li = document.querySelector('.sidebar__navigation-link a[href=\"' + href + '\"]');\n if (href && li) {\n li.classList.add('sidebar__navigation-link_active');\n }\n }\n\n }\n\n document.addEventListener('DOMContentLoaded', function() {\n highlight();\n\n window.addEventListener('scroll', highlight);\n });\n\n}\n\n\n/*\ndocument.addEventListener('DOMContentLoaded', function() {\n\n if (window._bsa) {\n initCarbon();\n } else {\n let script = document.querySelector('script[src*=\"buysellads.com\"]');\n script.onload = () => setTimeout(initCarbon);\n }\n\n function initCarbon() {\n\n _bsa.init('custom', 'CKYDEK3U', 'placement:javascriptinfo',\n {\n target: '#carbon',\n template: `\n \n
##company## — ##description##
\n
\n Ads via Carbon\n `\n }\n );\n }\n});\n*/\n","\n// gaCallback(f) will return a wrapper that works only once\n// autocalled after 500ms\nmodule.exports = function(f) {\n function callback() {\n if (callback.wasCalled) return;\n callback.wasCalled = true;\n f();\n }\n setTimeout(callback, 500);\n return callback;\n};\n","\nfunction throttle(func, ms) {\n\n let isThrottled = false,\n savedArgs,\n savedThis;\n\n function wrapper() {\n\n if (isThrottled) {\n savedArgs = arguments;\n savedThis = this;\n return;\n }\n\n func.apply(this, arguments);\n\n isThrottled = true;\n\n setTimeout(() => {\n isThrottled = false;\n if (savedArgs) {\n wrapper.apply(savedThis, savedArgs);\n savedArgs = savedThis = null;\n }\n }, ms);\n }\n\n return wrapper;\n}\n\nmodule.exports = throttle;\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nexport const Document_createElement = window.Document.prototype.createElement;\nexport const Document_createElementNS =\n window.Document.prototype.createElementNS;\nexport const Document_importNode = window.Document.prototype.importNode;\n\nexport const Document_prepend = window.Document.prototype['prepend'];\nexport const Document_append = window.Document.prototype['append'];\nexport const DocumentFragment_prepend =\n window.DocumentFragment.prototype['prepend'];\nexport const DocumentFragment_append =\n window.DocumentFragment.prototype['append'];\nexport const Node_cloneNode = window.Node.prototype.cloneNode;\nexport const Node_appendChild = window.Node.prototype.appendChild;\nexport const Node_insertBefore = window.Node.prototype.insertBefore;\nexport const Node_removeChild = window.Node.prototype.removeChild;\nexport const Node_replaceChild = window.Node.prototype.replaceChild;\nexport const Node_textContent = Object.getOwnPropertyDescriptor(\n window.Node.prototype,\n 'textContent'\n);\nexport const Element_attachShadow = window.Element.prototype['attachShadow'];\nexport const Element_innerHTML = Object.getOwnPropertyDescriptor(\n window.Element.prototype,\n 'innerHTML'\n);\nexport const Element_getAttribute = window.Element.prototype.getAttribute;\nexport const Element_setAttribute = window.Element.prototype.setAttribute;\nexport const Element_removeAttribute = window.Element.prototype.removeAttribute;\nexport const Element_toggleAttribute = window.Element.prototype.toggleAttribute;\nexport const Element_getAttributeNS = window.Element.prototype.getAttributeNS;\nexport const Element_setAttributeNS = window.Element.prototype.setAttributeNS;\nexport const Element_removeAttributeNS =\n window.Element.prototype.removeAttributeNS;\nexport const Element_insertAdjacentElement =\n window.Element.prototype['insertAdjacentElement'];\nexport const Element_insertAdjacentHTML =\n window.Element.prototype['insertAdjacentHTML'];\nexport const Element_prepend = window.Element.prototype['prepend'];\nexport const Element_append = window.Element.prototype['append'];\nexport const Element_before = window.Element.prototype['before'];\nexport const Element_after = window.Element.prototype['after'];\nexport const Element_replaceWith = window.Element.prototype['replaceWith'];\nexport const Element_remove = window.Element.prototype['remove'];\nexport const HTMLElement = window.HTMLElement;\nexport const HTMLElement_innerHTML = Object.getOwnPropertyDescriptor(\n window.HTMLElement.prototype,\n 'innerHTML'\n);\nexport const HTMLElement_insertAdjacentElement =\n window.HTMLElement.prototype['insertAdjacentElement'];\nexport const HTMLElement_insertAdjacentHTML =\n window.HTMLElement.prototype['insertAdjacentHTML'];\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nconst reservedElementNameSet = new Set();\n// IE11 does not support constructing a set using an iterable.\n[\n 'annotation-xml',\n 'color-profile',\n 'font-face',\n 'font-face-src',\n 'font-face-uri',\n 'font-face-format',\n 'font-face-name',\n 'missing-glyph',\n].forEach((item) => reservedElementNameSet.add(item));\n\nexport function isValidCustomElementName(localName: string) {\n const reserved = reservedElementNameSet.has(localName);\n const validForm = /^[a-z][.0-9_a-z]*-[-.0-9_a-z]*$/.test(localName);\n return !reserved && validForm;\n}\n\n// Note, IE11 doesn't have `document.contains`.\nconst nativeContains = document.contains\n ? document.contains.bind(document)\n : document.documentElement.contains.bind(document.documentElement);\n\nexport function isConnected(node: Node) {\n // Use `Node#isConnected`, if defined.\n const nativeValue = node.isConnected;\n if (nativeValue !== undefined) {\n return nativeValue;\n }\n // Optimization: It's significantly faster here to try to use `contains`,\n // especially on Edge/IE/\n if (nativeContains(node)) {\n return true;\n }\n\n let current: Node | undefined = node;\n while (\n current &&\n !(current.__CE_isImportDocument || current instanceof Document)\n ) {\n current =\n current.parentNode ||\n (window.ShadowRoot && current instanceof ShadowRoot\n ? current.host\n : undefined);\n }\n return !!(\n current &&\n (current.__CE_isImportDocument || current instanceof Document)\n );\n}\n\nexport function childrenFromFragment(\n fragment: DocumentFragment\n): Array {\n // Note, IE doesn't have `children` on document fragments.\n const nativeChildren = fragment.children;\n if (nativeChildren) {\n return Array.prototype.slice.call(nativeChildren);\n }\n const children: Array = [];\n for (let n = fragment.firstChild; n; n = n.nextSibling) {\n if (n.nodeType === Node.ELEMENT_NODE) {\n children.push(n as Element);\n }\n }\n return children;\n}\n\nfunction nextSiblingOrAncestorSibling(root: Node, start: Node) {\n let node: Node | null = start;\n while (node && node !== root && !node.nextSibling) {\n node = node.parentNode;\n }\n return !node || node === root ? null : node.nextSibling;\n}\n\nfunction nextNode(root: Node, start: Node) {\n return start.firstChild\n ? start.firstChild\n : nextSiblingOrAncestorSibling(root, start);\n}\n\nexport function walkDeepDescendantElements(\n root: Node,\n callback: (elem: Element) => void,\n visitedImports?: Set\n) {\n let node: Node | null = root;\n while (node) {\n if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node as Element;\n\n callback(element);\n\n const localName = element.localName;\n if (localName === 'link' && element.getAttribute('rel') === 'import') {\n // If this import (polyfilled or not) has its root node available,\n // walk it.\n const importNode = (element as HTMLLinkElement).import;\n if (visitedImports === undefined) {\n visitedImports = new Set();\n }\n if (importNode instanceof Node && !visitedImports.has(importNode)) {\n // Prevent multiple walks of the same import root.\n visitedImports.add(importNode);\n\n for (\n let child = importNode.firstChild;\n child;\n child = child.nextSibling\n ) {\n walkDeepDescendantElements(child, callback, visitedImports);\n }\n }\n\n // Ignore descendants of import links to prevent attempting to walk the\n // elements created by the HTML Imports polyfill that we just walked\n // above.\n node = nextSiblingOrAncestorSibling(root, element);\n continue;\n } else if (localName === 'template') {\n // Ignore descendants of templates. There shouldn't be any descendants\n // because they will be moved into `.content` during construction in\n // browsers that support template but, in case they exist and are still\n // waiting to be moved by a polyfill, they will be ignored.\n node = nextSiblingOrAncestorSibling(root, element);\n continue;\n }\n\n // Walk shadow roots.\n const shadowRoot = element.__CE_shadowRoot;\n if (shadowRoot) {\n for (\n let child = shadowRoot.firstChild;\n child;\n child = child.nextSibling\n ) {\n walkDeepDescendantElements(child, callback, visitedImports);\n }\n }\n }\n\n node = nextNode(root, node);\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementRegistry from './CustomElementRegistry.js';\nimport {CustomElementState as CEState} from './CustomElementState.js';\nimport * as Native from './Patch/Native.js';\nimport * as Utilities from './Utilities.js';\n\nconst NS_HTML = 'http://www.w3.org/1999/xhtml';\n\nexport default class CustomElementInternals {\n private readonly _patchesNode: Array<(node: Node) => void> = [];\n private readonly _patchesElement: Array<(elem: Element) => void> = [];\n private _hasPatches = false;\n public readonly shadyDomFastWalk: boolean;\n public readonly useDocumentConstructionObserver: boolean;\n\n constructor(options: {\n shadyDomFastWalk: boolean;\n noDocumentConstructionObserver: boolean;\n }) {\n this.shadyDomFastWalk = options.shadyDomFastWalk;\n this.useDocumentConstructionObserver = !options.noDocumentConstructionObserver;\n }\n\n forEachElement(\n node: Node,\n callback: (elem: Element) => void,\n visitedImports?: Set\n ) {\n const sd = window['ShadyDOM'];\n if (this.shadyDomFastWalk && sd && sd['inUse']) {\n if (node.nodeType === Node.ELEMENT_NODE) {\n const element = node as Element;\n callback(element);\n }\n // most easily gets to document, element, documentFragment\n if ((node as Element).querySelectorAll!) {\n const elements = sd['nativeMethods'].querySelectorAll.call(node, '*');\n for (let i = 0; i < elements.length; i++) {\n callback(elements[i]);\n }\n }\n } else {\n Utilities.walkDeepDescendantElements(node, callback, visitedImports);\n }\n }\n\n addNodePatch(patch: (node: Node) => void) {\n this._hasPatches = true;\n this._patchesNode.push(patch);\n }\n\n addElementPatch(patch: (element: Element) => void) {\n this._hasPatches = true;\n this._patchesElement.push(patch);\n }\n\n patchTree(node: Node) {\n if (!this._hasPatches) {\n return;\n }\n\n this.forEachElement(node, (element) => this.patchElement(element));\n }\n\n patchNode(node: Node) {\n if (!this._hasPatches) {\n return;\n }\n\n if (node.__CE_patched) {\n return;\n }\n node.__CE_patched = true;\n\n for (let i = 0; i < this._patchesNode.length; i++) {\n this._patchesNode[i](node);\n }\n }\n\n patchElement(element: Element) {\n if (!this._hasPatches) {\n return;\n }\n\n if (element.__CE_patched) {\n return;\n }\n element.__CE_patched = true;\n\n for (let i = 0; i < this._patchesNode.length; i++) {\n this._patchesNode[i](element);\n }\n\n for (let i = 0; i < this._patchesElement.length; i++) {\n this._patchesElement[i](element);\n }\n }\n\n connectTree(root: Node) {\n const elements: Array = [];\n\n this.forEachElement(root, (element) => elements.push(element));\n\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n if (element.__CE_state === CEState.custom) {\n this.connectedCallback(element);\n } else {\n this.upgradeReaction(element as HTMLElement);\n }\n }\n }\n\n disconnectTree(root: Node) {\n const elements: Array = [];\n\n this.forEachElement(root, (element) => elements.push(element));\n\n for (let i = 0; i < elements.length; i++) {\n const element = elements[i];\n if (element.__CE_state === CEState.custom) {\n this.disconnectedCallback(element);\n }\n }\n }\n\n /**\n * Upgrades all uncustomized custom elements at and below a root node for\n * which there is a definition. When custom element reaction callbacks are\n * assumed to be called synchronously (which, by the current DOM / HTML spec\n * definitions, they are *not*), callbacks for both elements customized\n * synchronously by the parser and elements being upgraded occur in the same\n * relative order.\n *\n * NOTE: This function, when used to simulate the construction of a tree\n * that is already created but not customized (i.e. by the parser), does\n * *not* prevent the element from reading the 'final' (true) state of the\n * tree. For example, the element, during truly synchronous parsing /\n * construction would see that it contains no children as they have not yet\n * been inserted. However, this function does not modify the tree, the\n * element will (incorrectly) have children. Additionally, self-modification\n * restrictions for custom element constructors imposed by the DOM spec are\n * *not* enforced.\n *\n *\n * The following nested list shows the steps extending down from the HTML\n * spec's parsing section that cause elements to be synchronously created\n * and upgraded:\n *\n * The \"in body\" insertion mode:\n * https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody\n * - Switch on token:\n * .. other cases ..\n * -> Any other start tag\n * - [Insert an HTML element](below) for the token.\n *\n * Insert an HTML element:\n * https://html.spec.whatwg.org/multipage/syntax.html#insert-an-html-element\n * - Insert a foreign element for the token in the HTML namespace:\n * https://html.spec.whatwg.org/multipage/syntax.html#insert-a-foreign-element\n * - Create an element for a token:\n * https://html.spec.whatwg.org/multipage/syntax.html#create-an-element-for-the-token\n * - Will execute script flag is true?\n * - (Element queue pushed to the custom element reactions stack.)\n * - Create an element:\n * https://dom.spec.whatwg.org/#concept-create-element\n * - Sync CE flag is true?\n * - Constructor called.\n * - Self-modification restrictions enforced.\n * - Sync CE flag is false?\n * - (Upgrade reaction enqueued.)\n * - Attributes appended to element.\n * (`attributeChangedCallback` reactions enqueued.)\n * - Will execute script flag is true?\n * - (Element queue popped from the custom element reactions stack.\n * Reactions in the popped stack are invoked.)\n * - (Element queue pushed to the custom element reactions stack.)\n * - Insert the element:\n * https://dom.spec.whatwg.org/#concept-node-insert\n * - Shadow-including descendants are connected. During parsing\n * construction, there are no shadow-*excluding* descendants.\n * However, the constructor may have validly attached a shadow\n * tree to itself and added descendants to that shadow tree.\n * (`connectedCallback` reactions enqueued.)\n * - (Element queue popped from the custom element reactions stack.\n * Reactions in the popped stack are invoked.)\n */\n patchAndUpgradeTree(\n root: Node,\n options: {\n visitedImports?: Set;\n upgrade?: (elem: HTMLElement) => void;\n } = {}\n ) {\n const visitedImports = options.visitedImports;\n const upgrade =\n options.upgrade || ((element) => this.upgradeReaction(element));\n\n const elements: Array = [];\n\n const gatherElements = (element: Element) => {\n if (this._hasPatches) {\n this.patchElement(element);\n }\n if (\n element.localName === 'link' &&\n element.getAttribute('rel') === 'import'\n ) {\n const importElem = element as HTMLLinkElement;\n // The HTML Imports polyfill sets a descendant element of the link to\n // the `import` property, specifically this is *not* a Document.\n const importNode = importElem.import;\n\n if (importNode instanceof Node) {\n importNode.__CE_isImportDocument = true;\n // Connected links are associated with the global registry.\n importNode.__CE_registry = document.__CE_registry;\n }\n\n if (importNode && importNode.readyState === 'complete') {\n importNode.__CE_documentLoadHandled = true;\n } else {\n // If this link's import root is not available, its contents can't\n // be walked. Wait for 'load' and walk it when it's ready.\n element.addEventListener('load', () => {\n const importNode = importElem.import!;\n\n if (importNode.__CE_documentLoadHandled) {\n return;\n }\n importNode.__CE_documentLoadHandled = true;\n\n // Clone the `visitedImports` set that was populated sync during\n // the `patchAndUpgradeTree` call that caused this 'load' handler\n // to be added. Then, remove *this* link's import node so that we\n // can walk that import again, even if it was partially walked\n // later during the same `patchAndUpgradeTree` call.\n const clonedVisitedImports = new Set();\n if (visitedImports) {\n // IE11 does not support constructing a set using an iterable.\n visitedImports.forEach((item) => clonedVisitedImports.add(item));\n clonedVisitedImports.delete(importNode);\n }\n this.patchAndUpgradeTree(importNode, {\n visitedImports: clonedVisitedImports,\n upgrade,\n });\n });\n }\n } else {\n elements.push(element);\n }\n };\n\n // `forEachElement` populates (and internally checks against)\n // `visitedImports` when traversing a loaded import.\n this.forEachElement(root, gatherElements, visitedImports);\n\n for (let i = 0; i < elements.length; i++) {\n upgrade(elements[i] as HTMLElement);\n }\n }\n\n upgradeReaction(element: HTMLElement) {\n try {\n const definition = this._lookupACustomElementDefinition(\n element.ownerDocument!,\n element.localName\n );\n if (definition) {\n this._upgradeAnElement(element, definition);\n }\n } catch (e: unknown) {\n this.reportTheException(e);\n }\n }\n\n /**\n * @see https://html.spec.whatwg.org/multipage/custom-elements.html#concept-upgrade-an-element\n */\n private _upgradeAnElement(\n element: HTMLElement,\n definition: CustomElementDefinition\n ) {\n const currentState = element.__CE_state;\n if (currentState !== undefined) {\n return;\n }\n\n definition.constructionStack.push(element);\n\n try {\n try {\n const result = new definition.constructorFunction();\n if (result !== element) {\n throw new Error(\n 'The custom element constructor did not produce the element being upgraded.'\n );\n }\n } finally {\n definition.constructionStack.pop();\n }\n } catch (e) {\n element.__CE_state = CEState.failed;\n throw e;\n }\n\n element.__CE_state = CEState.custom;\n element.__CE_definition = definition;\n\n // Check `hasAttributes` here to avoid iterating when it's not necessary.\n if (definition.attributeChangedCallback && element.hasAttributes()) {\n const observedAttributes = definition.observedAttributes;\n for (let i = 0; i < observedAttributes.length; i++) {\n const name = observedAttributes[i];\n const value = element.getAttribute(name);\n if (value !== null) {\n this.attributeChangedCallback(element, name, null, value, null);\n }\n }\n }\n\n if (Utilities.isConnected(element)) {\n this.connectedCallback(element);\n }\n }\n\n connectedCallback(element: Element) {\n const definition = element.__CE_definition!;\n if (definition.connectedCallback) {\n try {\n definition.connectedCallback.call(element);\n } catch (e: unknown) {\n this.reportTheException(e);\n }\n }\n }\n\n disconnectedCallback(element: Element) {\n const definition = element.__CE_definition!;\n if (definition.disconnectedCallback) {\n try {\n definition.disconnectedCallback.call(element);\n } catch (e: unknown) {\n this.reportTheException(e);\n }\n }\n }\n\n attributeChangedCallback(\n element: Element,\n name: string,\n oldValue?: string | null,\n newValue?: string | null,\n namespace?: string | null\n ) {\n const definition = element.__CE_definition!;\n if (\n definition.attributeChangedCallback &&\n definition.observedAttributes.indexOf(name) > -1\n ) {\n try {\n definition.attributeChangedCallback.call(\n element,\n name,\n oldValue,\n newValue,\n namespace\n );\n } catch (e: unknown) {\n this.reportTheException(e);\n }\n }\n }\n\n /**\n * Runs HTML's 'look up a custom element definition', excluding the namespace\n * check.\n *\n * @see https://html.spec.whatwg.org/multipage/custom-elements.html#look-up-a-custom-element-definition\n */\n private _lookupACustomElementDefinition(\n doc: Document,\n localName: string\n ): CustomElementDefinition | undefined {\n // The document must be associated with a registry.\n const registry = doc.__CE_registry;\n if (!registry) {\n return;\n }\n\n // Prevent elements created in documents without a browsing context from\n // upgrading.\n //\n // https://html.spec.whatwg.org/multipage/custom-elements.html#look-up-a-custom-element-definition\n // \"If document does not have a browsing context, return null.\"\n //\n // https://html.spec.whatwg.org/multipage/window-object.html#dom-document-defaultview\n // \"The defaultView IDL attribute of the Document interface, on getting,\n // must return this Document's browsing context's WindowProxy object, if\n // this Document has an associated browsing context, or null otherwise.\"\n if (!doc.defaultView && !doc.__CE_isImportDocument) {\n return;\n }\n\n return registry.internal_localNameToDefinition(localName);\n }\n\n /**\n * Runs the DOM's 'create an element'. If namespace is not null, then the\n * native `createElementNS` is used. Otherwise, `createElement` is used.\n *\n * Note, the template polyfill only wraps `createElement`, preventing this\n * function from using `createElementNS` in all cases.\n *\n * @see https://dom.spec.whatwg.org/#concept-create-element\n */\n createAnElement(\n doc: Document,\n localName: string,\n namespace: string | null\n ): Element {\n const registry = doc.__CE_registry;\n // Only create custom elements if the document is associated with a\n // registry.\n if (registry && (namespace === null || namespace === NS_HTML)) {\n const definition = ((registry as unknown) as CustomElementRegistry).internal_localNameToDefinition(\n localName\n );\n if (definition) {\n try {\n const result = new definition.constructorFunction();\n\n // These conformance checks can't be performed when the user calls\n // the element's constructor themselves. However, this also true in\n // native implementations.\n\n if (\n result.__CE_state === undefined ||\n result.__CE_definition === undefined\n ) {\n throw new Error(\n `Failed to construct '${localName}': ` +\n 'The returned value was not constructed with the HTMLElement ' +\n 'constructor.'\n );\n }\n\n if (result.namespaceURI !== NS_HTML) {\n throw new Error(\n `Failed to construct '${localName}': ` +\n \"The constructed element's namespace must be the HTML \" +\n 'namespace.'\n );\n }\n\n // The following Errors should be DOMExceptions but DOMException\n // isn't constructible in all browsers.\n\n if (result.hasAttributes()) {\n throw new Error(\n `Failed to construct '${localName}': ` +\n 'The constructed element must not have any attributes.'\n );\n }\n\n // ShadyDOM doesn't wrap `#hasChildNodes`, so we check `#firstChild`\n // instead.\n if (result.firstChild !== null) {\n throw new Error(\n `Failed to construct '${localName}': ` +\n 'The constructed element must not have any children.'\n );\n }\n\n if (result.parentNode !== null) {\n throw new Error(\n `Failed to construct '${localName}': ` +\n 'The constructed element must not have a parent node.'\n );\n }\n\n if (result.ownerDocument !== doc) {\n throw new Error(\n `Failed to construct '${localName}': ` +\n \"The constructed element's owner document is incorrect.\"\n );\n }\n\n if (result.localName !== localName) {\n throw new Error(\n `Failed to construct '${localName}': ` +\n \"The constructed element's local name is incorrect.\"\n );\n }\n\n return result;\n } catch (e: unknown) {\n this.reportTheException(e);\n\n // When construction fails, a new HTMLUnknownElement is produced.\n // However, there's no direct way to create one, so we create a\n // regular HTMLElement and replace its prototype.\n const result =\n namespace === null\n ? Native.Document_createElement.call(doc, localName)\n : Native.Document_createElementNS.call(doc, namespace, localName);\n Object.setPrototypeOf(result, HTMLUnknownElement.prototype);\n result.__CE_state = CEState.failed;\n result.__CE_definition = undefined;\n this.patchElement(result);\n return result;\n }\n }\n }\n\n const result =\n namespace === null\n ? Native.Document_createElement.call(doc, localName)\n : Native.Document_createElementNS.call(doc, namespace, localName);\n this.patchElement(result);\n return result;\n }\n\n /**\n * Runs the DOM's 'report the exception' algorithm.\n *\n * @see https://html.spec.whatwg.org/multipage/webappapis.html#report-the-exception\n */\n reportTheException(arg: unknown) {\n interface ExtendedError extends Error {\n // Non-standard Safari properties.\n sourceURL?: string;\n line?: number;\n column?: number;\n\n // Non-standard Firefox properties.\n fileName?: string;\n lineNumber?: number;\n columnNumber?: number;\n }\n\n let message = '';\n let filename = '';\n let lineno = 0;\n let colno = 0;\n\n if (arg instanceof Error) {\n const error = arg as ExtendedError;\n message = error.message;\n filename = error.sourceURL || error.fileName || '';\n lineno = error.line || error.lineNumber || 0;\n colno = error.column || error.columnNumber || 0;\n } else {\n message = `Uncaught ${String(arg)}`;\n }\n\n let event: ErrorEvent | undefined = undefined;\n if (ErrorEvent.prototype.initErrorEvent === undefined) {\n event = new ErrorEvent('error', {\n cancelable: true,\n message,\n filename,\n lineno,\n colno,\n error: arg,\n });\n } else {\n event = document.createEvent('ErrorEvent') as ErrorEvent;\n // initErrorEvent(type, bubbles, cancelable, message, filename, line)\n event.initErrorEvent!('error', false, true, message, filename, lineno);\n // Hack for IE, where ErrorEvent#preventDefault does not set\n // #defaultPrevented to true.\n event.preventDefault = function (this: ErrorEvent) {\n Object.defineProperty(this, 'defaultPrevented', {\n configurable: true,\n get: function (this: ErrorEvent) {\n return true;\n },\n });\n };\n }\n\n if (event.error === undefined) {\n Object.defineProperty(event, 'error', {\n configurable: true,\n enumerable: true,\n get: function () {\n return arg;\n },\n });\n }\n\n window.dispatchEvent(event);\n if (!event.defaultPrevented) {\n // In 'report the exception', UAs may optionally write errors to the\n // console if their associated ErrorEvent isn't handled during dispatch\n // (indicated by calling `preventDefault`). In practice, these errors are\n // always displayed.\n console.error(arg);\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from './CustomElementInternals.js';\nimport CustomElementRegistry from './CustomElementRegistry.js';\nimport PatchDocument from './Patch/Document.js';\nimport PatchDocumentFragment from './Patch/DocumentFragment.js';\nimport PatchElement from './Patch/Element.js';\nimport PatchHTMLElement from './Patch/HTMLElement.js';\nimport PatchNode from './Patch/Node.js';\n\nconst priorCustomElements = window['customElements'];\n\nfunction installPolyfill() {\n const noDocumentConstructionObserver = !!priorCustomElements?.[\n 'noDocumentConstructionObserver'\n ];\n const shadyDomFastWalk = !!priorCustomElements?.['shadyDomFastWalk'];\n\n const internals = new CustomElementInternals({\n noDocumentConstructionObserver,\n shadyDomFastWalk,\n });\n\n PatchHTMLElement(internals);\n PatchDocument(internals);\n PatchDocumentFragment(internals);\n PatchNode(internals);\n PatchElement(internals);\n\n window[\n 'CustomElementRegistry'\n ] = (CustomElementRegistry as unknown) as typeof window['CustomElementRegistry'];\n\n const customElements = new CustomElementRegistry(internals);\n\n // The main document is associated with the global registry.\n document.__CE_registry = customElements;\n\n Object.defineProperty(window, 'customElements', {\n configurable: true,\n enumerable: true,\n value: customElements,\n });\n}\n\nif (\n !priorCustomElements ||\n priorCustomElements['forcePolyfill'] ||\n typeof priorCustomElements['define'] != 'function' ||\n typeof priorCustomElements['get'] != 'function'\n) {\n installPolyfill();\n}\n\n// This is NOT public API and is only meant to work around a GC bug in older\n// versions of Safari that randomly removes the polyfill during tests.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n(window as any)['__CE_installPolyfill'] = installPolyfill;\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nexport const CustomElementState = {\n custom: 1,\n failed: 2,\n} as const;\nexport type CustomElementState =\n | typeof CustomElementState.custom\n | typeof CustomElementState.failed;\n\nexport default CustomElementState;\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nexport default class Deferred {\n private _value: T | undefined = undefined;\n\n private _resolve!: (val: T) => void;\n\n private readonly _promise: Promise;\n constructor() {\n this._promise = new Promise((resolve) => {\n this._resolve = resolve;\n });\n }\n\n resolve(value: T) {\n if (this._value) {\n throw new Error('Already resolved.');\n }\n\n this._value = value;\n this._resolve(value);\n }\n\n toPromise() {\n return this._promise;\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from './CustomElementInternals.js';\n\nexport default class DocumentConstructionObserver {\n private readonly _internals: CustomElementInternals;\n private readonly _document: Document;\n private _observer: MutationObserver | undefined = undefined;\n constructor(internals: CustomElementInternals, doc: Document) {\n this._internals = internals;\n this._document = doc;\n\n // Simulate tree construction for all currently accessible nodes in the\n // document.\n this._internals.patchAndUpgradeTree(this._document);\n\n if (this._document.readyState === 'loading') {\n this._observer = new MutationObserver(this._handleMutations.bind(this));\n\n // Nodes created by the parser are given to the observer *before* the next\n // task runs. Inline scripts are run in a new task. This means that the\n // observer will be able to handle the newly parsed nodes before the\n // inline script is run.\n this._observer.observe(this._document, {\n childList: true,\n subtree: true,\n });\n }\n }\n\n disconnect() {\n if (this._observer) {\n this._observer.disconnect();\n }\n }\n\n private _handleMutations(mutations: ReadonlyArray) {\n // Once the document's `readyState` is 'interactive' or 'complete', all new\n // nodes created within that document will be the result of script and\n // should be handled by patching.\n const readyState = this._document.readyState;\n if (readyState === 'interactive' || readyState === 'complete') {\n this.disconnect();\n }\n\n for (let i = 0; i < mutations.length; i++) {\n const addedNodes = mutations[i].addedNodes;\n for (let j = 0; j < addedNodes.length; j++) {\n const node = addedNodes[j];\n this._internals.patchAndUpgradeTree(node);\n }\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport {AlreadyConstructedMarkerType} from './AlreadyConstructedMarker.js';\nimport CustomElementInternals from './CustomElementInternals.js';\nimport Deferred from './Deferred.js';\nimport DocumentConstructionObserver from './DocumentConstructionObserver.js';\nimport * as Utilities from './Utilities.js';\n\ninterface ElementConstructor {\n new (): HTMLElement;\n observedAttributes?: Array;\n}\ntype ConstructorGetter = () => ElementConstructor;\n\n/**\n * @unrestricted\n */\nexport default class CustomElementRegistry {\n private readonly _localNameToConstructorGetter = new Map<\n string,\n ConstructorGetter\n >();\n private readonly _localNameToDefinition = new Map<\n string,\n CustomElementDefinition\n >();\n private readonly _constructorToDefinition = new Map<\n ElementConstructor,\n CustomElementDefinition\n >();\n private _elementDefinitionIsRunning = false;\n private readonly _internals: CustomElementInternals;\n private readonly _whenDefinedDeferred = new Map<\n string,\n Deferred\n >();\n\n /**\n * The default flush callback triggers the document walk synchronously.\n */\n private _flushCallback: (fn: () => void) => void = (fn) => fn();\n private _flushPending = false;\n\n /**\n * A map from `localName`s of definitions that were defined *after* the\n * last flush to unupgraded elements matching that definition, in document\n * order. Entries are added to this map when a definition is registered,\n * but the list of elements is only populated during a flush after which\n * all of the entries are removed. DO NOT edit outside of `#_flush`.\n */\n private readonly _unflushedLocalNames: Array = [];\n\n private readonly _documentConstructionObserver:\n | DocumentConstructionObserver\n | undefined;\n\n constructor(internals: CustomElementInternals) {\n this._internals = internals;\n this._documentConstructionObserver = internals.useDocumentConstructionObserver\n ? new DocumentConstructionObserver(internals, document)\n : undefined;\n }\n\n polyfillDefineLazy(localName: string, constructorGetter: ConstructorGetter) {\n if (!(constructorGetter instanceof Function)) {\n throw new TypeError(\n 'Custom element constructor getters must be functions.'\n );\n }\n this.internal_assertCanDefineLocalName(localName);\n this._localNameToConstructorGetter.set(localName, constructorGetter);\n this._unflushedLocalNames.push(localName);\n // If we've already called the flush callback and it hasn't called back\n // yet, don't call it again.\n if (!this._flushPending) {\n this._flushPending = true;\n this._flushCallback(() => this._flush());\n }\n }\n\n define(localName: string, constructor: Function) {\n if (!(constructor instanceof Function)) {\n throw new TypeError('Custom element constructors must be functions.');\n }\n\n this.internal_assertCanDefineLocalName(localName);\n\n this.internal_reifyDefinition(localName, constructor as ElementConstructor);\n this._unflushedLocalNames.push(localName);\n // If we've already called the flush callback and it hasn't called back\n // yet, don't call it again.\n if (!this._flushPending) {\n this._flushPending = true;\n this._flushCallback(() => this._flush());\n }\n }\n\n internal_assertCanDefineLocalName(localName: string) {\n if (!Utilities.isValidCustomElementName(localName)) {\n throw new SyntaxError(`The element name '${localName}' is not valid.`);\n }\n\n if (this.internal_localNameToDefinition(localName)) {\n throw new Error(\n `A custom element with name ` +\n `'${localName}' has already been defined.`\n );\n }\n\n if (this._elementDefinitionIsRunning) {\n throw new Error('A custom element is already being defined.');\n }\n }\n\n internal_reifyDefinition(localName: string, constructor: ElementConstructor) {\n this._elementDefinitionIsRunning = true;\n\n let connectedCallback: CustomElementDefinition['connectedCallback'];\n let disconnectedCallback: CustomElementDefinition['disconnectedCallback'];\n let adoptedCallback: CustomElementDefinition['adoptedCallback'];\n let attributeChangedCallback: CustomElementDefinition['attributeChangedCallback'];\n let observedAttributes: CustomElementDefinition['observedAttributes'];\n try {\n const prototype = constructor.prototype;\n if (!(prototype instanceof Object)) {\n throw new TypeError(\n \"The custom element constructor's prototype is not an object.\"\n );\n }\n\n type CEReactionCallback =\n | 'connectedCallback'\n | 'disconnectedCallback'\n | 'adoptedCallback'\n | 'attributeChangedCallback';\n const getCallback = function getCallback(name: CEReactionCallback) {\n const callbackValue = prototype[name];\n if (\n callbackValue !== undefined &&\n !(callbackValue instanceof Function)\n ) {\n throw new Error(`The '${name}' callback must be a function.`);\n }\n return callbackValue;\n };\n\n connectedCallback = getCallback('connectedCallback');\n disconnectedCallback = getCallback('disconnectedCallback');\n adoptedCallback = getCallback('adoptedCallback');\n attributeChangedCallback = getCallback('attributeChangedCallback');\n // `observedAttributes` should not be read unless an\n // `attributesChangedCallback` exists\n observedAttributes =\n (attributeChangedCallback && constructor['observedAttributes']) || [];\n // eslint-disable-next-line no-useless-catch\n } catch (e) {\n throw e;\n } finally {\n this._elementDefinitionIsRunning = false;\n }\n\n const definition = {\n localName,\n constructorFunction: constructor,\n connectedCallback,\n disconnectedCallback,\n adoptedCallback,\n attributeChangedCallback,\n observedAttributes,\n constructionStack: [] as Array<\n HTMLElement | AlreadyConstructedMarkerType\n >,\n };\n\n this._localNameToDefinition.set(localName, definition);\n this._constructorToDefinition.set(\n definition.constructorFunction,\n definition\n );\n\n return definition;\n }\n\n upgrade(node: Node): void {\n this._internals.patchAndUpgradeTree(node);\n }\n\n private _flush() {\n // If no new definitions were defined, don't attempt to flush. This could\n // happen if a flush callback keeps the function it is given and calls it\n // multiple times.\n if (this._flushPending === false) {\n return;\n }\n this._flushPending = false;\n\n /**\n * Unupgraded elements with definitions that were defined *before* the last\n * flush, in document order.\n */\n const elementsWithStableDefinitions: Array = [];\n\n const unflushedLocalNames = this._unflushedLocalNames;\n const elementsWithPendingDefinitions = new Map<\n string,\n Array\n >();\n for (let i = 0; i < unflushedLocalNames.length; i++) {\n elementsWithPendingDefinitions.set(unflushedLocalNames[i], []);\n }\n\n this._internals.patchAndUpgradeTree(document, {\n upgrade: (element) => {\n // Ignore the element if it has already upgraded or failed to upgrade.\n if (element.__CE_state !== undefined) {\n return;\n }\n\n const localName = element.localName;\n\n // If there is an applicable pending definition for the element, add the\n // element to the list of elements to be upgraded with that definition.\n const pendingElements = elementsWithPendingDefinitions.get(localName);\n if (pendingElements) {\n pendingElements.push(element);\n // If there is *any other* applicable definition for the element, add\n // it to the list of elements with stable definitions that need to be\n // upgraded.\n } else if (this._localNameToDefinition.has(localName)) {\n elementsWithStableDefinitions.push(element);\n }\n },\n });\n\n // Upgrade elements with 'stable' definitions first.\n for (let i = 0; i < elementsWithStableDefinitions.length; i++) {\n this._internals.upgradeReaction(elementsWithStableDefinitions[i]);\n }\n\n // Upgrade elements with 'pending' definitions in the order they were\n // defined.\n for (let i = 0; i < unflushedLocalNames.length; i++) {\n const localName = unflushedLocalNames[i];\n const pendingUpgradableElements = elementsWithPendingDefinitions.get(\n localName\n )!;\n\n // Attempt to upgrade all applicable elements.\n for (let i = 0; i < pendingUpgradableElements.length; i++) {\n this._internals.upgradeReaction(pendingUpgradableElements[i]);\n }\n\n // Resolve any promises created by `whenDefined` for the definition.\n const deferred = this._whenDefinedDeferred.get(localName);\n if (deferred) {\n deferred.resolve(undefined);\n }\n }\n\n unflushedLocalNames.length = 0;\n }\n\n get(localName: string): undefined | {new (): HTMLElement} {\n const definition = this.internal_localNameToDefinition(localName);\n if (definition) {\n return definition.constructorFunction;\n }\n\n return undefined;\n }\n\n whenDefined(localName: string): Promise {\n if (!Utilities.isValidCustomElementName(localName)) {\n return Promise.reject(\n new SyntaxError(`'${localName}' is not a valid custom element name.`)\n );\n }\n\n const prior = this._whenDefinedDeferred.get(localName);\n if (prior) {\n return prior.toPromise();\n }\n\n const deferred = new Deferred();\n this._whenDefinedDeferred.set(localName, deferred);\n\n // Resolve immediately if the given local name has a regular or lazy\n // definition *and* the full document walk to upgrade elements with that\n // local name has already happened.\n //\n // The behavior of the returned promise differs between the lazy and the\n // non-lazy cases if the definition fails. Normally, the definition would\n // fail synchronously and no pending promises would resolve. However, if\n // the definition is lazy but has not yet been reified, the promise is\n // resolved early here even though it might fail later when reified.\n const anyDefinitionExists =\n this._localNameToDefinition.has(localName) ||\n this._localNameToConstructorGetter.has(localName);\n const definitionHasFlushed =\n this._unflushedLocalNames.indexOf(localName) === -1;\n if (anyDefinitionExists && definitionHasFlushed) {\n deferred.resolve(undefined);\n }\n\n return deferred.toPromise();\n }\n\n polyfillWrapFlushCallback(outer: (fn: () => void) => void) {\n if (this._documentConstructionObserver) {\n this._documentConstructionObserver.disconnect();\n }\n const inner = this._flushCallback;\n this._flushCallback = (flush) => outer(() => inner(flush));\n }\n\n internal_localNameToDefinition(\n localName: string\n ): CustomElementDefinition | undefined {\n const existingDefinition = this._localNameToDefinition.get(localName);\n if (existingDefinition) {\n return existingDefinition;\n }\n\n const constructorGetter = this._localNameToConstructorGetter.get(localName);\n if (constructorGetter) {\n this._localNameToConstructorGetter.delete(localName);\n try {\n return this.internal_reifyDefinition(localName, constructorGetter());\n } catch (e: unknown) {\n this._internals.reportTheException(e);\n }\n }\n\n return undefined;\n }\n\n internal_constructorToDefinition(\n constructor: ElementConstructor\n ): CustomElementDefinition | undefined {\n return this._constructorToDefinition.get(constructor);\n }\n}\n\n// Closure compiler exports.\n/* eslint-disable no-self-assign */\nCustomElementRegistry.prototype['define'] =\n CustomElementRegistry.prototype.define;\nCustomElementRegistry.prototype['upgrade'] =\n CustomElementRegistry.prototype.upgrade;\nCustomElementRegistry.prototype['get'] = CustomElementRegistry.prototype.get;\nCustomElementRegistry.prototype['whenDefined'] =\n CustomElementRegistry.prototype.whenDefined;\nCustomElementRegistry.prototype['polyfillDefineLazy'] =\n CustomElementRegistry.prototype.polyfillDefineLazy;\nCustomElementRegistry.prototype['polyfillWrapFlushCallback'] =\n CustomElementRegistry.prototype.polyfillWrapFlushCallback;\n/* eslint-enable no-self-assign */\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from '../../CustomElementInternals.js';\nimport * as Utilities from '../../Utilities.js';\n\ntype NativeMethod = (this: Node, ...args: Array) => void;\n\ninterface ParentNodeNativeMethods {\n prepend: NativeMethod;\n append: NativeMethod;\n}\n\nexport default function (\n internals: CustomElementInternals,\n destination: ParentNode,\n builtIn: ParentNodeNativeMethods\n) {\n function appendPrependPatch(builtInMethod: NativeMethod): NativeMethod {\n return function (this: Node, ...nodes) {\n /**\n * A copy of `nodes`, with any DocumentFragment replaced by its children.\n */\n const flattenedNodes: Array = [];\n\n /**\n * Elements in `nodes` that were connected before this call.\n */\n const connectedElements: Array = [];\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (node instanceof Element && Utilities.isConnected(node)) {\n connectedElements.push(node);\n }\n\n if (node instanceof DocumentFragment) {\n for (let child = node.firstChild; child; child = child.nextSibling) {\n flattenedNodes.push(child);\n }\n } else {\n flattenedNodes.push(node);\n }\n }\n\n builtInMethod.apply(this, nodes);\n\n for (let i = 0; i < connectedElements.length; i++) {\n internals.disconnectTree(connectedElements[i]);\n }\n\n if (Utilities.isConnected(this)) {\n for (let i = 0; i < flattenedNodes.length; i++) {\n const node = flattenedNodes[i];\n if (node instanceof Element) {\n internals.connectTree(node);\n }\n }\n }\n };\n }\n\n if (builtIn.prepend !== undefined) {\n destination.prepend = appendPrependPatch(builtIn.prepend);\n }\n\n if (builtIn.append !== undefined) {\n destination.append = appendPrependPatch(builtIn.append);\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from '../CustomElementInternals.js';\nimport CEState from '../CustomElementState.js';\nimport * as Utilities from '../Utilities.js';\n\nimport PatchChildNode from './Interface/ChildNode.js';\nimport PatchParentNode from './Interface/ParentNode.js';\nimport * as Native from './Native.js';\n\nexport default function (internals: CustomElementInternals) {\n if (Native.Element_attachShadow) {\n Element.prototype.attachShadow = function (\n this: Element,\n init: ShadowRootInit\n ) {\n const shadowRoot = Native.Element_attachShadow.call(this, init);\n internals.patchNode(shadowRoot);\n this.__CE_shadowRoot = shadowRoot;\n return shadowRoot;\n };\n }\n\n function patch_innerHTML(\n destination: Element,\n baseDescriptor: PropertyDescriptor\n ) {\n Object.defineProperty(destination, 'innerHTML', {\n enumerable: baseDescriptor.enumerable,\n configurable: true,\n get: baseDescriptor.get,\n set: function (this: Element, htmlString) {\n const isConnected = Utilities.isConnected(this);\n\n // NOTE: In IE11, when using the native `innerHTML` setter, all nodes\n // that were previously descendants of the context element have all of\n // their children removed as part of the set - the entire subtree is\n // 'disassembled'. This work around walks the subtree *before* using the\n // native setter.\n let removedElements: undefined | Array = undefined;\n if (isConnected) {\n removedElements = [];\n internals.forEachElement(this, (element) => {\n if (element !== this) {\n removedElements!.push(element);\n }\n });\n }\n\n baseDescriptor.set!.call(this, htmlString);\n\n if (removedElements) {\n for (let i = 0; i < removedElements.length; i++) {\n const element = removedElements[i];\n if (element.__CE_state === CEState.custom) {\n internals.disconnectedCallback(element);\n }\n }\n }\n\n // Only create custom elements if this element's owner document is\n // associated with the registry.\n if (!this.ownerDocument!.__CE_registry) {\n internals.patchTree(this);\n } else {\n internals.patchAndUpgradeTree(this);\n }\n return htmlString;\n },\n });\n }\n\n if (Native.Element_innerHTML && Native.Element_innerHTML.get) {\n patch_innerHTML(Element.prototype, Native.Element_innerHTML);\n } else if (Native.HTMLElement_innerHTML && Native.HTMLElement_innerHTML.get) {\n patch_innerHTML(HTMLElement.prototype, Native.HTMLElement_innerHTML);\n } else {\n internals.addElementPatch(function (element) {\n patch_innerHTML(element, {\n enumerable: true,\n configurable: true,\n // Implements getting `innerHTML` by performing an unpatched `cloneNode`\n // of the element and returning the resulting element's `innerHTML`.\n // TODO: Is this too expensive?\n get: function (this: Element) {\n return (Native.Node_cloneNode.call(this, true) as Element).innerHTML;\n },\n // Implements setting `innerHTML` by creating an unpatched element,\n // setting `innerHTML` of that element and replacing the target\n // element's children with those of the unpatched element.\n set: function (this: Element, assignedValue) {\n // NOTE: re-route to `content` for `template` elements.\n // We need to do this because `template.appendChild` does not\n // route into `template.content`.\n const isTemplate = this.localName === 'template';\n const content = isTemplate\n ? (this as HTMLTemplateElement).content\n : this;\n const rawElement = Native.Document_createElementNS.call(\n document,\n this.namespaceURI,\n this.localName\n );\n rawElement.innerHTML = assignedValue;\n\n while (content.childNodes.length > 0) {\n Native.Node_removeChild.call(content, content.childNodes[0]);\n }\n const container = isTemplate\n ? (rawElement as HTMLTemplateElement).content\n : rawElement;\n while (container.childNodes.length > 0) {\n Native.Node_appendChild.call(content, container.childNodes[0]);\n }\n },\n });\n });\n }\n\n Element.prototype.setAttribute = function (this: Element, name, newValue) {\n // Fast path for non-custom elements.\n if (this.__CE_state !== CEState.custom) {\n return Native.Element_setAttribute.call(this, name, newValue);\n }\n\n const oldValue = Native.Element_getAttribute.call(this, name);\n Native.Element_setAttribute.call(this, name, newValue);\n newValue = Native.Element_getAttribute.call(this, name)!;\n internals.attributeChangedCallback(this, name, oldValue, newValue, null);\n };\n\n Element.prototype.setAttributeNS = function (\n this: Element,\n namespace,\n name,\n newValue\n ) {\n // Fast path for non-custom elements.\n if (this.__CE_state !== CEState.custom) {\n return Native.Element_setAttributeNS.call(\n this,\n namespace,\n name,\n newValue\n );\n }\n\n const oldValue = Native.Element_getAttributeNS.call(this, namespace, name);\n Native.Element_setAttributeNS.call(this, namespace, name, newValue);\n newValue = Native.Element_getAttributeNS.call(this, namespace, name)!;\n internals.attributeChangedCallback(\n this,\n name,\n oldValue,\n newValue,\n namespace\n );\n };\n\n Element.prototype.removeAttribute = function (this: Element, name) {\n // Fast path for non-custom elements.\n if (this.__CE_state !== CEState.custom) {\n return Native.Element_removeAttribute.call(this, name);\n }\n\n const oldValue = Native.Element_getAttribute.call(this, name);\n Native.Element_removeAttribute.call(this, name);\n if (oldValue !== null) {\n internals.attributeChangedCallback(this, name, oldValue, null, null);\n }\n };\n\n if (Native.Element_toggleAttribute) {\n Element.prototype.toggleAttribute = function (\n this: Element,\n name,\n force?: boolean | undefined\n ) {\n // Fast path for non-custom elements.\n if (this.__CE_state !== CEState.custom) {\n return Native.Element_toggleAttribute.call(this, name, force);\n }\n\n const oldValue = Native.Element_getAttribute.call(this, name);\n const hadAttribute = oldValue !== null;\n const hasAttribute = Native.Element_toggleAttribute.call(\n this,\n name,\n force\n );\n if (hadAttribute !== hasAttribute) {\n internals.attributeChangedCallback(\n this,\n name,\n oldValue,\n hasAttribute ? '' : null,\n null\n );\n }\n return hasAttribute;\n };\n }\n\n Element.prototype.removeAttributeNS = function (\n this: Element,\n namespace,\n name\n ) {\n // Fast path for non-custom elements.\n if (this.__CE_state !== CEState.custom) {\n return Native.Element_removeAttributeNS.call(this, namespace, name);\n }\n\n const oldValue = Native.Element_getAttributeNS.call(this, namespace, name);\n Native.Element_removeAttributeNS.call(this, namespace, name);\n // In older browsers, `Element#getAttributeNS` may return the empty string\n // instead of null if the attribute does not exist. For details, see;\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttributeNS#Notes\n const newValue = Native.Element_getAttributeNS.call(this, namespace, name);\n if (oldValue !== newValue) {\n internals.attributeChangedCallback(\n this,\n name,\n oldValue,\n newValue,\n namespace\n );\n }\n };\n\n function patch_insertAdjacentElement(\n destination: Element,\n baseMethod: Element['insertAdjacentElement']\n ) {\n destination.insertAdjacentElement = function (\n this: Element,\n position,\n element\n ) {\n const wasConnected = Utilities.isConnected(element);\n const insertedElement = baseMethod.call(this, position, element)!;\n\n if (wasConnected) {\n internals.disconnectTree(element);\n }\n\n if (Utilities.isConnected(insertedElement)) {\n internals.connectTree(element);\n }\n return insertedElement;\n };\n }\n\n if (Native.HTMLElement_insertAdjacentElement) {\n patch_insertAdjacentElement(\n HTMLElement.prototype,\n Native.HTMLElement_insertAdjacentElement\n );\n } else if (Native.Element_insertAdjacentElement) {\n patch_insertAdjacentElement(\n Element.prototype,\n Native.Element_insertAdjacentElement\n );\n }\n\n function patch_insertAdjacentHTML(\n destination: Element,\n baseMethod: Element['insertAdjacentHTML']\n ) {\n /**\n * Patches and upgrades all nodes which are siblings between `start`\n * (inclusive) and `end` (exclusive). If `end` is `null`, then all siblings\n * following `start` will be patched and upgraded.\n */\n function upgradeNodesInRange(start: Node, end: Node | null) {\n const nodes = [];\n for (let node: Node = start; node !== end; node = node.nextSibling!) {\n nodes.push(node);\n }\n for (let i = 0; i < nodes.length; i++) {\n internals.patchAndUpgradeTree(nodes[i]);\n }\n }\n\n destination.insertAdjacentHTML = function (this: Element, position, text) {\n const strPosition = position.toLowerCase();\n\n if (strPosition === 'beforebegin') {\n const marker = this.previousSibling;\n baseMethod.call(this, strPosition, text);\n upgradeNodesInRange(marker || this.parentNode!.firstChild!, this);\n } else if (strPosition === 'afterbegin') {\n const marker = this.firstChild;\n baseMethod.call(this, strPosition, text);\n upgradeNodesInRange(this.firstChild!, marker);\n } else if (strPosition === 'beforeend') {\n const marker = this.lastChild;\n baseMethod.call(this, strPosition, text);\n upgradeNodesInRange(marker || this.firstChild!, null);\n } else if (strPosition === 'afterend') {\n const marker = this.nextSibling;\n baseMethod.call(this, strPosition, text);\n upgradeNodesInRange(this.nextSibling!, marker);\n } else {\n throw new SyntaxError(\n `The value provided (${String(strPosition)}) is ` +\n \"not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.\"\n );\n }\n };\n }\n\n if (Native.HTMLElement_insertAdjacentHTML) {\n patch_insertAdjacentHTML(\n HTMLElement.prototype,\n Native.HTMLElement_insertAdjacentHTML\n );\n } else if (Native.Element_insertAdjacentHTML) {\n patch_insertAdjacentHTML(\n Element.prototype,\n Native.Element_insertAdjacentHTML\n );\n }\n\n PatchParentNode(internals, Element.prototype, {\n prepend: Native.Element_prepend,\n append: Native.Element_append,\n });\n\n PatchChildNode(internals, Element.prototype, {\n before: Native.Element_before,\n after: Native.Element_after,\n replaceWith: Native.Element_replaceWith,\n remove: Native.Element_remove,\n });\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from '../../CustomElementInternals.js';\nimport * as Utilities from '../../Utilities.js';\n\ntype NativeMethod = (this: ChildNode, ...args: Array) => void;\n\ninterface ChildNodeNativeMethods {\n before: NativeMethod;\n after: NativeMethod;\n replaceWith: NativeMethod;\n remove: (this: ChildNode) => void;\n}\n\nexport default function (\n internals: CustomElementInternals,\n destination: ChildNode,\n builtIn: ChildNodeNativeMethods\n) {\n function beforeAfterPatch(builtInMethod: NativeMethod): NativeMethod {\n return function (this: ChildNode, ...nodes) {\n const flattenedNodes: Array = [];\n const connectedElements: Array = [];\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (node instanceof Element && Utilities.isConnected(node)) {\n connectedElements.push(node);\n }\n\n if (node instanceof DocumentFragment) {\n for (let child = node.firstChild; child; child = child.nextSibling) {\n flattenedNodes.push(child);\n }\n } else {\n flattenedNodes.push(node);\n }\n }\n\n builtInMethod.apply(this, nodes);\n\n for (let i = 0; i < connectedElements.length; i++) {\n internals.disconnectTree(connectedElements[i]);\n }\n\n if (Utilities.isConnected(this)) {\n for (let i = 0; i < flattenedNodes.length; i++) {\n const node = flattenedNodes[i];\n if (node instanceof Element) {\n internals.connectTree(node);\n }\n }\n }\n };\n }\n\n if (builtIn.before !== undefined) {\n destination.before = beforeAfterPatch(builtIn.before);\n }\n\n if (builtIn.after !== undefined) {\n destination.after = beforeAfterPatch(builtIn.after);\n }\n\n if (builtIn.replaceWith !== undefined) {\n destination.replaceWith = function (\n this: ChildNode,\n ...nodes: Array\n ) {\n /**\n * A copy of `nodes`, with any DocumentFragment replaced by its children.\n */\n const flattenedNodes: Array = [];\n\n /**\n * Elements in `nodes` that were connected before this call.\n */\n const connectedElements: Array = [];\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n if (node instanceof Element && Utilities.isConnected(node)) {\n connectedElements.push(node);\n }\n\n if (node instanceof DocumentFragment) {\n for (let child = node.firstChild; child; child = child.nextSibling) {\n flattenedNodes.push(child);\n }\n } else {\n flattenedNodes.push(node);\n }\n }\n\n const wasConnected = Utilities.isConnected(this);\n\n builtIn.replaceWith.apply(this, nodes);\n\n for (let i = 0; i < connectedElements.length; i++) {\n internals.disconnectTree(connectedElements[i]);\n }\n\n if (wasConnected) {\n internals.disconnectTree(this);\n for (let i = 0; i < flattenedNodes.length; i++) {\n const node = flattenedNodes[i];\n if (node instanceof Element) {\n internals.connectTree(node);\n }\n }\n }\n };\n }\n\n if (builtIn.remove !== undefined) {\n destination.remove = function (this: ChildNode) {\n const wasConnected = Utilities.isConnected(this);\n\n builtIn.remove.call(this);\n\n if (wasConnected) {\n internals.disconnectTree(this);\n }\n };\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * Represents the 'already constructed marker' used in custom\n * element construction stacks.\n *\n * https://html.spec.whatwg.org/#concept-already-constructed-marker\n */\nconst alreadyConstructedMarker = {} as {_alreadyConstructedMarker: never};\n\nexport default alreadyConstructedMarker;\nexport type AlreadyConstructedMarkerType = typeof alreadyConstructedMarker;\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport AlreadyConstructedMarker from '../AlreadyConstructedMarker.js';\nimport CustomElementInternals from '../CustomElementInternals.js';\nimport CEState from '../CustomElementState.js';\nimport * as Native from './Native.js';\n\nexport default function (internals: CustomElementInternals) {\n const PatchedHTMLElement = function HTMLElement(this: HTMLElement) {\n // This should really be `new.target` but `new.target` can't be\n // emulated in ES5. Assuming the user keeps the default value of the\n // constructor's prototype's `constructor` property, this is\n // equivalent.\n const constructor = this.constructor as {new (): HTMLElement};\n\n // Always look up the definition from the global registry.\n const registry = document.__CE_registry!;\n const definition = registry.internal_constructorToDefinition(constructor);\n if (!definition) {\n throw new Error(\n 'Failed to construct a custom element: ' +\n 'The constructor was not registered with `customElements`.'\n );\n }\n\n const constructionStack = definition.constructionStack;\n\n if (constructionStack.length === 0) {\n const element = Native.Document_createElement.call(\n document,\n definition.localName\n ) as HTMLElement;\n Object.setPrototypeOf(element, constructor.prototype as typeof element);\n element.__CE_state = CEState.custom;\n element.__CE_definition = definition;\n internals.patchElement(element);\n return element;\n }\n\n const lastIndex = constructionStack.length - 1;\n const element = constructionStack[lastIndex];\n if (element === AlreadyConstructedMarker) {\n const localName = definition.localName;\n throw new Error(\n `Failed to construct '${localName}': ` +\n 'This element was already constructed.'\n );\n }\n const toConstructElement = element as HTMLElement;\n constructionStack[lastIndex] = AlreadyConstructedMarker;\n\n Object.setPrototypeOf(\n toConstructElement,\n constructor.prototype as typeof toConstructElement\n );\n internals.patchElement(toConstructElement);\n\n return toConstructElement;\n };\n\n PatchedHTMLElement.prototype = Native.HTMLElement.prototype;\n // Safari 9 has `writable: false` on the propertyDescriptor\n // Make it writable so that TypeScript can patch up the\n // constructor in the ES5 compiled code.\n Object.defineProperty(HTMLElement.prototype, 'constructor', {\n writable: true,\n configurable: true,\n enumerable: false,\n value: PatchedHTMLElement,\n });\n\n window['HTMLElement'] = (PatchedHTMLElement as unknown) as typeof HTMLElement;\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from '../CustomElementInternals.js';\n\nimport PatchParentNode from './Interface/ParentNode.js';\nimport * as Native from './Native.js';\n\nexport default function (internals: CustomElementInternals) {\n Document.prototype.createElement = function (\n this: Document,\n localName: string\n ) {\n return internals.createAnElement(this, localName, null);\n } as typeof Document.prototype.createElement;\n\n Document.prototype.importNode = function (\n this: Document,\n node: T,\n deep?: boolean\n ): T {\n const clone = Native.Document_importNode.call(this, node, !!deep) as T;\n // Only create custom elements if this document is associated with the\n // registry.\n if (!this.__CE_registry) {\n internals.patchTree(clone);\n } else {\n internals.patchAndUpgradeTree(clone);\n }\n return clone;\n };\n\n Document.prototype.createElementNS = function (\n this: Document,\n namespace: string | null,\n localName: string\n ) {\n return internals.createAnElement(this, localName, namespace);\n } as typeof Document.prototype.createElementNS;\n\n PatchParentNode(internals, Document.prototype, {\n prepend: Native.Document_prepend,\n append: Native.Document_append,\n });\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from '../CustomElementInternals.js';\n\nimport PatchParentNode from './Interface/ParentNode.js';\nimport * as Native from './Native.js';\n\nexport default function (internals: CustomElementInternals) {\n PatchParentNode(internals, DocumentFragment.prototype, {\n prepend: Native.DocumentFragment_prepend,\n append: Native.DocumentFragment_append,\n });\n}\n","/**\n * @license\n * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport CustomElementInternals from '../CustomElementInternals.js';\nimport * as Utilities from '../Utilities.js';\n\nimport * as Native from './Native.js';\n\nexport default function (internals: CustomElementInternals) {\n // `Node#nodeValue` is implemented on `Attr`.\n // `Node#textContent` is implemented on `Attr`, `Element`.\n\n Node.prototype.insertBefore = function (\n this: Node,\n node: T,\n refNode: Node | null\n ) {\n if (node instanceof DocumentFragment) {\n const insertedNodes = Utilities.childrenFromFragment(node);\n const nativeResult = Native.Node_insertBefore.call(this, node, refNode);\n\n // DocumentFragments can't be connected, so `disconnectTree` will never\n // need to be called on a DocumentFragment's children after inserting it.\n\n if (Utilities.isConnected(this)) {\n for (let i = 0; i < insertedNodes.length; i++) {\n internals.connectTree(insertedNodes[i]);\n }\n }\n\n return nativeResult as T;\n }\n\n const nodeWasConnectedElement =\n node instanceof Element && Utilities.isConnected(node);\n const nativeResult = Native.Node_insertBefore.call(\n this,\n node,\n refNode\n ) as T;\n\n if (nodeWasConnectedElement) {\n internals.disconnectTree(node);\n }\n\n if (Utilities.isConnected(this)) {\n internals.connectTree(node);\n }\n\n return nativeResult;\n };\n\n Node.prototype.appendChild = function (this: Node, node: T) {\n if (node instanceof DocumentFragment) {\n const insertedNodes = Utilities.childrenFromFragment(node);\n const nativeResult = Native.Node_appendChild.call(this, node) as T;\n\n // DocumentFragments can't be connected, so `disconnectTree` will never\n // need to be called on a DocumentFragment's children after inserting it.\n\n if (Utilities.isConnected(this)) {\n for (let i = 0; i < insertedNodes.length; i++) {\n internals.connectTree(insertedNodes[i]);\n }\n }\n\n return nativeResult;\n }\n\n const nodeWasConnectedElement =\n node instanceof Element && Utilities.isConnected(node);\n const nativeResult = Native.Node_appendChild.call(this, node) as T;\n\n if (nodeWasConnectedElement) {\n internals.disconnectTree(node);\n }\n\n if (Utilities.isConnected(this)) {\n internals.connectTree(node);\n }\n\n return nativeResult;\n };\n\n Node.prototype.cloneNode = function (this: Node, deep) {\n const clone = Native.Node_cloneNode.call(this, !!deep);\n // Only create custom elements if this element's owner document is\n // associated with the registry.\n if (!this.ownerDocument!.__CE_registry) {\n internals.patchTree(clone);\n } else {\n internals.patchAndUpgradeTree(clone);\n }\n return clone;\n };\n\n Node.prototype.removeChild = function (this: Node, node: T) {\n const nodeWasConnectedElement =\n node instanceof Element && Utilities.isConnected(node);\n const nativeResult = Native.Node_removeChild.call(this, node) as T;\n\n if (nodeWasConnectedElement) {\n internals.disconnectTree(node);\n }\n\n return nativeResult;\n };\n\n Node.prototype.replaceChild = function (\n this: Node,\n nodeToInsert: Node,\n nodeToRemove: T\n ) {\n if (nodeToInsert instanceof DocumentFragment) {\n const insertedNodes = Utilities.childrenFromFragment(nodeToInsert);\n const nativeResult = Native.Node_replaceChild.call(\n this,\n nodeToInsert,\n nodeToRemove\n ) as T;\n\n // DocumentFragments can't be connected, so `disconnectTree` will never\n // need to be called on a DocumentFragment's children after inserting it.\n\n if (Utilities.isConnected(this)) {\n internals.disconnectTree(nodeToRemove);\n for (let i = 0; i < insertedNodes.length; i++) {\n internals.connectTree(insertedNodes[i]);\n }\n }\n\n return nativeResult;\n }\n\n const nodeToInsertWasConnectedElement =\n nodeToInsert instanceof Element && Utilities.isConnected(nodeToInsert);\n const nativeResult = Native.Node_replaceChild.call(\n this,\n nodeToInsert,\n nodeToRemove\n ) as T;\n const thisIsConnected = Utilities.isConnected(this);\n\n if (thisIsConnected) {\n internals.disconnectTree(nodeToRemove);\n }\n\n if (nodeToInsertWasConnectedElement) {\n internals.disconnectTree(nodeToInsert);\n }\n\n if (thisIsConnected) {\n internals.connectTree(nodeToInsert);\n }\n\n return nativeResult;\n };\n\n function patch_textContent(\n destination: Node,\n baseDescriptor: PropertyDescriptor\n ) {\n Object.defineProperty(destination, 'textContent', {\n enumerable: baseDescriptor.enumerable,\n configurable: true,\n get: baseDescriptor.get,\n set: function (this: Node, assignedValue) {\n // If this is a text node then there are no nodes to disconnect.\n if (this.nodeType === Node.TEXT_NODE) {\n baseDescriptor.set!.call(this, assignedValue);\n return;\n }\n\n let removedNodes = undefined;\n // Checking for `firstChild` is faster than reading `childNodes.length`\n // to compare with 0.\n if (this.firstChild) {\n // Using `childNodes` is faster than `children`, even though we only\n // care about elements.\n const childNodes = this.childNodes;\n const childNodesLength = childNodes.length;\n if (childNodesLength > 0 && Utilities.isConnected(this)) {\n // Copying an array by iterating is faster than using slice.\n removedNodes = new Array(childNodesLength);\n for (let i = 0; i < childNodesLength; i++) {\n removedNodes[i] = childNodes[i];\n }\n }\n }\n\n baseDescriptor.set!.call(this, assignedValue);\n\n if (removedNodes) {\n for (let i = 0; i < removedNodes.length; i++) {\n internals.disconnectTree(removedNodes[i]);\n }\n }\n },\n });\n }\n\n if (Native.Node_textContent && Native.Node_textContent.get) {\n patch_textContent(Node.prototype, Native.Node_textContent);\n } else {\n internals.addNodePatch(function (element) {\n patch_textContent(element, {\n enumerable: true,\n configurable: true,\n // NOTE: This implementation of the `textContent` getter assumes that\n // text nodes' `textContent` getter will not be patched.\n get: function (this: Node) {\n const parts: Array = [];\n\n for (let n = this.firstChild; n; n = n.nextSibling) {\n if (n.nodeType === Node.COMMENT_NODE) {\n continue;\n }\n parts.push(n.textContent);\n }\n\n return parts.join('');\n },\n set: function (this: Node, assignedValue) {\n while (this.firstChild) {\n Native.Node_removeChild.call(this, this.firstChild);\n }\n // `textContent = null | undefined | ''` does not result in\n // a TextNode childNode\n if (assignedValue != null && assignedValue !== '') {\n Native.Node_appendChild.call(\n this,\n document.createTextNode(assignedValue)\n );\n }\n },\n });\n });\n }\n}\n","require('../../modules/es7.string.match-all');\nmodule.exports = require('../../modules/_core').String.matchAll;\n","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var core = module.exports = { version: '2.6.12' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n","var global = require('./_global');\nvar core = require('./_core');\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar ctx = require('./_ctx');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if (target) redefine(target, key, out, type & $export.U);\n // export\n if (exports[key] != out) hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","'use strict';\n// 21.2.5.3 get RegExp.prototype.flags\nvar anObject = require('./_an-object');\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n","module.exports = require('./_shared')('native-function-to-string', Function.toString);\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","// 7.2.8 IsRegExp(argument)\nvar isObject = require('./_is-object');\nvar cof = require('./_cof');\nvar MATCH = require('./_wks')('match');\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');\n};\n","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n","module.exports = false;\n","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var global = require('./_global');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar SRC = require('./_uid')('src');\nvar $toString = require('./_function-to-string');\nvar TO_STRING = 'toString';\nvar TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./_core').inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n","var core = require('./_core');\nvar global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: require('./_library') ? 'pure' : 'global',\n copyright: '© 2020 Denis Pushkarev (zloirock.ru)'\n});\n","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n","'use strict';\n// https://tc39.github.io/String.prototype.matchAll/\nvar $export = require('./_export');\nvar defined = require('./_defined');\nvar toLength = require('./_to-length');\nvar isRegExp = require('./_is-regexp');\nvar getFlags = require('./_flags');\nvar RegExpProto = RegExp.prototype;\n\nvar $RegExpStringIterator = function (regexp, string) {\n this._r = regexp;\n this._s = string;\n};\n\nrequire('./_iter-create')($RegExpStringIterator, 'RegExp String', function next() {\n var match = this._r.exec(this._s);\n return { value: match, done: match === null };\n});\n\n$export($export.P, 'String', {\n matchAll: function matchAll(regexp) {\n defined(this);\n if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!');\n var S = String(this);\n var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp);\n var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags);\n rx.lastIndex = toLength(regexp.lastIndex);\n return new $RegExpStringIterator(rx, S);\n }\n});\n","const currencySymbolMap = require('./map')\n\nmodule.exports = function getSymbolFromCurrency (currencyCode) {\n if (typeof currencyCode !== 'string') {\n return undefined\n }\n\n const code = currencyCode.toUpperCase()\n\n if (!Object.prototype.hasOwnProperty.call(currencySymbolMap, code)) {\n return undefined\n }\n\n return currencySymbolMap[code]\n}\n\nmodule.exports.currencySymbolMap = currencySymbolMap\n","module.exports = {\n AED: 'د.إ',\n AFN: '؋',\n ALL: 'L',\n AMD: '֏',\n ANG: 'ƒ',\n AOA: 'Kz',\n ARS: '$',\n AUD: '$',\n AWG: 'ƒ',\n AZN: '₼',\n BAM: 'KM',\n BBD: '$',\n BDT: '৳',\n BGN: 'лв',\n BHD: '.د.ب',\n BIF: 'FBu',\n BMD: '$',\n BND: '$',\n BOB: '$b',\n BOV: 'BOV',\n BRL: 'R$',\n BSD: '$',\n BTC: '₿',\n BTN: 'Nu.',\n BWP: 'P',\n BYN: 'Br',\n BYR: 'Br',\n BZD: 'BZ$',\n CAD: '$',\n CDF: 'FC',\n CHE: 'CHE',\n CHF: 'CHF',\n CHW: 'CHW',\n CLF: 'CLF',\n CLP: '$',\n CNY: '元',\n COP: '$',\n COU: 'COU',\n CRC: '₡',\n CUC: '$',\n CUP: '₱',\n CVE: '$',\n CZK: 'Kč',\n DJF: 'Fdj',\n DKK: 'kr',\n DOP: 'RD$',\n DZD: 'دج',\n EEK: 'kr',\n EGP: '£',\n ERN: 'Nfk',\n ETB: 'Br',\n ETH: 'Ξ',\n EUR: '€',\n FJD: '$',\n FKP: '£',\n GBP: '£',\n GEL: '₾',\n GGP: '£',\n GHC: '₵',\n GHS: 'GH₵',\n GIP: '£',\n GMD: 'D',\n GNF: 'FG',\n GTQ: 'Q',\n GYD: '$',\n HKD: '$',\n HNL: 'L',\n HRK: 'kn',\n HTG: 'G',\n HUF: 'Ft',\n IDR: 'Rp',\n ILS: '₪',\n IMP: '£',\n INR: '₹',\n IQD: 'ع.د',\n IRR: '﷼',\n ISK: 'kr',\n JEP: '£',\n JMD: 'J$',\n JOD: 'JD',\n JPY: '¥',\n KES: 'KSh',\n KGS: 'лв',\n KHR: '៛',\n KMF: 'CF',\n KPW: '₩',\n KRW: '₩',\n KWD: 'KD',\n KYD: '$',\n KZT: '₸',\n LAK: '₭',\n LBP: '£',\n LKR: '₨',\n LRD: '$',\n LSL: 'M',\n LTC: 'Ł',\n LTL: 'Lt',\n LVL: 'Ls',\n LYD: 'LD',\n MAD: 'MAD',\n MDL: 'lei',\n MGA: 'Ar',\n MKD: 'ден',\n MMK: 'K',\n MNT: '₮',\n MOP: 'MOP$',\n MRO: 'UM',\n MRU: 'UM',\n MUR: '₨',\n MVR: 'Rf',\n MWK: 'MK',\n MXN: '$',\n MXV: 'MXV',\n MYR: 'RM',\n MZN: 'MT',\n NAD: '$',\n NGN: '₦',\n NIO: 'C$',\n NOK: 'kr',\n NPR: '₨',\n NZD: '$',\n OMR: '﷼',\n PAB: 'B/.',\n PEN: 'S/.',\n PGK: 'K',\n PHP: '₱',\n PKR: '₨',\n PLN: 'zł',\n PYG: 'Gs',\n QAR: '﷼',\n RMB: '元',\n RON: 'lei',\n RSD: 'Дин.',\n RUB: '₽',\n RWF: 'R₣',\n SAR: '﷼',\n SBD: '$',\n SCR: '₨',\n SDG: 'ج.س.',\n SEK: 'kr',\n SGD: 'S$',\n SHP: '£',\n SLL: 'Le',\n SOS: 'S',\n SRD: '$',\n SSP: '£',\n STD: 'Db',\n STN: 'Db',\n SVC: '$',\n SYP: '£',\n SZL: 'E',\n THB: '฿',\n TJS: 'SM',\n TMT: 'T',\n TND: 'د.ت',\n TOP: 'T$',\n TRL: '₤',\n TRY: '₺',\n TTD: 'TT$',\n TVD: '$',\n TWD: 'NT$',\n TZS: 'TSh',\n UAH: '₴',\n UGX: 'USh',\n USD: '$',\n UYI: 'UYI',\n UYU: '$U',\n UYW: 'UYW',\n UZS: 'лв',\n VEF: 'Bs',\n VES: 'Bs.S',\n VND: '₫',\n VUV: 'VT',\n WST: 'WS$',\n XAF: 'FCFA',\n XBT: 'Ƀ',\n XCD: '$',\n XOF: 'CFA',\n XPF: '₣',\n XSU: 'Sucre',\n XUA: 'XUA',\n YER: '﷼',\n ZAR: 'R',\n ZMW: 'ZK',\n ZWD: 'Z$',\n ZWL: '$'\n}\n","//! moment.js locale configuration\n//! locale : Italian (Switzerland) [it-ch]\n//! author : xfh : https://github.com/xfh\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var itCh = moment.defineLocale('it-ch', {\n months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n '_'\n ),\n monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n '_'\n ),\n weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Oggi alle] LT',\n nextDay: '[Domani alle] LT',\n nextWeek: 'dddd [alle] LT',\n lastDay: '[Ieri alle] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[la scorsa] dddd [alle] LT';\n default:\n return '[lo scorso] dddd [alle] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: function (s) {\n return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;\n },\n past: '%s fa',\n s: 'alcuni secondi',\n ss: '%d secondi',\n m: 'un minuto',\n mm: '%d minuti',\n h: \"un'ora\",\n hh: '%d ore',\n d: 'un giorno',\n dd: '%d giorni',\n M: 'un mese',\n MM: '%d mesi',\n y: 'un anno',\n yy: '%d anni',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return itCh;\n\n})));\n","//! moment.js locale configuration\n//! locale : Italian [it]\n//! author : Lorenzo : https://github.com/aliem\n//! author: Mattia Larentis: https://github.com/nostalgiaz\n//! author: Marco : https://github.com/Manfre98\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var it = moment.defineLocale('it', {\n months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n '_'\n ),\n monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n '_'\n ),\n weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: function () {\n return (\n '[Oggi a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n nextDay: function () {\n return (\n '[Domani a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n nextWeek: function () {\n return (\n 'dddd [a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n lastDay: function () {\n return (\n '[Ieri a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return (\n '[La scorsa] dddd [a' +\n (this.hours() > 1\n ? 'lle '\n : this.hours() === 0\n ? ' '\n : \"ll'\") +\n ']LT'\n );\n default:\n return (\n '[Lo scorso] dddd [a' +\n (this.hours() > 1\n ? 'lle '\n : this.hours() === 0\n ? ' '\n : \"ll'\") +\n ']LT'\n );\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'tra %s',\n past: '%s fa',\n s: 'alcuni secondi',\n ss: '%d secondi',\n m: 'un minuto',\n mm: '%d minuti',\n h: \"un'ora\",\n hh: '%d ore',\n d: 'un giorno',\n dd: '%d giorni',\n w: 'una settimana',\n ww: '%d settimane',\n M: 'un mese',\n MM: '%d mesi',\n y: 'un anno',\n yy: '%d anni',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return it;\n\n})));\n","//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11\n ? forms[0]\n : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n ? forms[1]\n : forms[2];\n }\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',\n hh: 'час_часа_часов',\n dd: 'день_дня_дней',\n ww: 'неделя_недели_недель',\n MM: 'месяц_месяца_месяцев',\n yy: 'год_года_лет',\n };\n if (key === 'm') {\n return withoutSuffix ? 'минута' : 'минуту';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n var monthsParse = [\n /^янв/i,\n /^фев/i,\n /^мар/i,\n /^апр/i,\n /^ма[йя]/i,\n /^июн/i,\n /^июл/i,\n /^авг/i,\n /^сен/i,\n /^окт/i,\n /^ноя/i,\n /^дек/i,\n ];\n\n // http://new.gramota.ru/spravka/rules/139-prop : § 103\n // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637\n // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753\n var ru = moment.defineLocale('ru', {\n months: {\n format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(\n '_'\n ),\n standalone:\n 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(\n '_'\n ),\n },\n monthsShort: {\n // по CLDR именно \"июл.\" и \"июн.\", но какой смысл менять букву на точку?\n format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(\n '_'\n ),\n standalone:\n 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(\n '_'\n ),\n },\n weekdays: {\n standalone:\n 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(\n '_'\n ),\n format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(\n '_'\n ),\n isFormat: /\\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,\n },\n weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n\n // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки\n monthsRegex:\n /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n // копия предыдущего\n monthsShortRegex:\n /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n // полные названия с падежами\n monthsStrictRegex:\n /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,\n\n // Выражение, которое соответствует только сокращённым формам\n monthsShortStrictRegex:\n /^(янв\\.|февр?\\.|мар[т.]|апр\\.|ма[яй]|июн[ья.]|июл[ья.]|авг\\.|сент?\\.|окт\\.|нояб?\\.|дек\\.)/i,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY г.',\n LLL: 'D MMMM YYYY г., H:mm',\n LLLL: 'dddd, D MMMM YYYY г., H:mm',\n },\n calendar: {\n sameDay: '[Сегодня, в] LT',\n nextDay: '[Завтра, в] LT',\n lastDay: '[Вчера, в] LT',\n nextWeek: function (now) {\n if (now.week() !== this.week()) {\n switch (this.day()) {\n case 0:\n return '[В следующее] dddd, [в] LT';\n case 1:\n case 2:\n case 4:\n return '[В следующий] dddd, [в] LT';\n case 3:\n case 5:\n case 6:\n return '[В следующую] dddd, [в] LT';\n }\n } else {\n if (this.day() === 2) {\n return '[Во] dddd, [в] LT';\n } else {\n return '[В] dddd, [в] LT';\n }\n }\n },\n lastWeek: function (now) {\n if (now.week() !== this.week()) {\n switch (this.day()) {\n case 0:\n return '[В прошлое] dddd, [в] LT';\n case 1:\n case 2:\n case 4:\n return '[В прошлый] dddd, [в] LT';\n case 3:\n case 5:\n case 6:\n return '[В прошлую] dddd, [в] LT';\n }\n } else {\n if (this.day() === 2) {\n return '[Во] dddd, [в] LT';\n } else {\n return '[В] dddd, [в] LT';\n }\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'через %s',\n past: '%s назад',\n s: 'несколько секунд',\n ss: relativeTimeWithPlural,\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: 'час',\n hh: relativeTimeWithPlural,\n d: 'день',\n dd: relativeTimeWithPlural,\n w: 'неделя',\n ww: relativeTimeWithPlural,\n M: 'месяц',\n MM: relativeTimeWithPlural,\n y: 'год',\n yy: relativeTimeWithPlural,\n },\n meridiemParse: /ночи|утра|дня|вечера/i,\n isPM: function (input) {\n return /^(дня|вечера)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ночи';\n } else if (hour < 12) {\n return 'утра';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечера';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(й|го|я)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n return number + '-й';\n case 'D':\n return number + '-го';\n case 'w':\n case 'W':\n return number + '-я';\n default:\n return number;\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ru;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (China) [zh-cn]\n//! author : suupic : https://github.com/suupic\n//! author : Zeno Zeng : https://github.com/zenozeng\n//! author : uu109 : https://github.com/uu109\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var zhCn = moment.defineLocale('zh-cn', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n '_'\n ),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日Ah点mm分',\n LLLL: 'YYYY年M月D日ddddAh点mm分',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm',\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n } else {\n // '中午'\n return hour >= 11 ? hour : hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天]LT',\n nextDay: '[明天]LT',\n nextWeek: function (now) {\n if (now.week() !== this.week()) {\n return '[下]dddLT';\n } else {\n return '[本]dddLT';\n }\n },\n lastDay: '[昨天]LT',\n lastWeek: function (now) {\n if (this.week() !== now.week()) {\n return '[上]dddLT';\n } else {\n return '[本]dddLT';\n }\n },\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|周)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '周';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s后',\n past: '%s前',\n s: '几秒',\n ss: '%d 秒',\n m: '1 分钟',\n mm: '%d 分钟',\n h: '1 小时',\n hh: '%d 小时',\n d: '1 天',\n dd: '%d 天',\n w: '1 周',\n ww: '%d 周',\n M: '1 个月',\n MM: '%d 个月',\n y: '1 年',\n yy: '%d 年',\n },\n week: {\n // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return zhCn;\n\n})));\n","//! moment.js\n//! version : 2.30.1\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.moment = factory()\n}(this, (function () { 'use strict';\n\n var hookCallback;\n\n function hooks() {\n return hookCallback.apply(null, arguments);\n }\n\n // This is done to register the method called with moment()\n // without creating circular dependencies.\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n }\n\n function isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n }\n\n function map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n }\n\n var some;\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n var flags = null,\n parsedParts = false,\n isNowValid = m._d && !isNaN(m._d.getTime());\n if (isNowValid) {\n flags = getParsingFlags(m);\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n });\n isNowValid =\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n }\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n return m._isValid;\n }\n\n function createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n }\n\n // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n var momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\n function copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n // Moment prototype object\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n }\n\n function warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n }\n\n function set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n };\n\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n }\n\n var formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n function addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n }\n\n // format date using native date object\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n };\n\n function longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n };\n\n function relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n }\n\n function pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {\n D: 'date',\n dates: 'date',\n date: 'date',\n d: 'day',\n days: 'day',\n day: 'day',\n e: 'weekday',\n weekdays: 'weekday',\n weekday: 'weekday',\n E: 'isoWeekday',\n isoweekdays: 'isoWeekday',\n isoweekday: 'isoWeekday',\n DDD: 'dayOfYear',\n dayofyears: 'dayOfYear',\n dayofyear: 'dayOfYear',\n h: 'hour',\n hours: 'hour',\n hour: 'hour',\n ms: 'millisecond',\n milliseconds: 'millisecond',\n millisecond: 'millisecond',\n m: 'minute',\n minutes: 'minute',\n minute: 'minute',\n M: 'month',\n months: 'month',\n month: 'month',\n Q: 'quarter',\n quarters: 'quarter',\n quarter: 'quarter',\n s: 'second',\n seconds: 'second',\n second: 'second',\n gg: 'weekYear',\n weekyears: 'weekYear',\n weekyear: 'weekYear',\n GG: 'isoWeekYear',\n isoweekyears: 'isoWeekYear',\n isoweekyear: 'isoWeekYear',\n w: 'week',\n weeks: 'week',\n week: 'week',\n W: 'isoWeek',\n isoweeks: 'isoWeek',\n isoweek: 'isoWeek',\n y: 'year',\n years: 'year',\n year: 'year',\n };\n\n function normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {\n date: 9,\n day: 11,\n weekday: 11,\n isoWeekday: 11,\n dayOfYear: 4,\n hour: 13,\n millisecond: 16,\n minute: 14,\n month: 8,\n quarter: 7,\n second: 15,\n weekYear: 1,\n isoWeekYear: 1,\n week: 5,\n isoWeek: 5,\n year: 1,\n };\n\n function getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n var match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n match1to2NoLeadingZero = /^[1-9]\\d?/, // 1-99\n match1to2HasZero = /^([1-9]\\d|\\d)/, // 0-99\n regexes;\n\n regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n }\n\n // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n function unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n function absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n }\n\n var tokens = {};\n\n function addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n function isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n }\n\n var YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\n // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n });\n\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n });\n\n // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n // HOOKS\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n };\n\n // MOMENTS\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get(mom, unit) {\n if (!mom.isValid()) {\n return NaN;\n }\n\n var d = mom._d,\n isUTC = mom._isUTC;\n\n switch (unit) {\n case 'Milliseconds':\n return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();\n case 'Seconds':\n return isUTC ? d.getUTCSeconds() : d.getSeconds();\n case 'Minutes':\n return isUTC ? d.getUTCMinutes() : d.getMinutes();\n case 'Hours':\n return isUTC ? d.getUTCHours() : d.getHours();\n case 'Date':\n return isUTC ? d.getUTCDate() : d.getDate();\n case 'Day':\n return isUTC ? d.getUTCDay() : d.getDay();\n case 'Month':\n return isUTC ? d.getUTCMonth() : d.getMonth();\n case 'FullYear':\n return isUTC ? d.getUTCFullYear() : d.getFullYear();\n default:\n return NaN; // Just in case\n }\n }\n\n function set$1(mom, unit, value) {\n var d, isUTC, year, month, date;\n\n if (!mom.isValid() || isNaN(value)) {\n return;\n }\n\n d = mom._d;\n isUTC = mom._isUTC;\n\n switch (unit) {\n case 'Milliseconds':\n return void (isUTC\n ? d.setUTCMilliseconds(value)\n : d.setMilliseconds(value));\n case 'Seconds':\n return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value));\n case 'Minutes':\n return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value));\n case 'Hours':\n return void (isUTC ? d.setUTCHours(value) : d.setHours(value));\n case 'Date':\n return void (isUTC ? d.setUTCDate(value) : d.setDate(value));\n // case 'Day': // Not real\n // return void (isUTC ? d.setUTCDay(value) : d.setDay(value));\n // case 'Month': // Not used because we need to pass two variables\n // return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));\n case 'FullYear':\n break; // See below ...\n default:\n return; // Just in case\n }\n\n year = value;\n month = mom.month();\n date = mom.date();\n date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date;\n void (isUTC\n ? d.setUTCFullYear(year, month, date)\n : d.setFullYear(year, month, date));\n }\n\n // MOMENTS\n\n function stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n }\n\n function stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n }\n\n function mod(n, x) {\n return ((n % x) + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n }\n\n // FORMATTING\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n });\n\n // PARSING\n\n addRegexToken('M', match1to2, match1to2NoLeadingZero);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n });\n\n // LOCALES\n\n var defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\n function localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n }\n\n function localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function setMonth(mom, value) {\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n var month = value,\n date = mom.date();\n\n date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month));\n void (mom._isUTC\n ? mom._d.setUTCMonth(month, date)\n : mom._d.setMonth(month, date));\n return mom;\n }\n\n function getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n function monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n }\n\n function monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n }\n\n function computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n shortP,\n longP;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortP = regexEscape(this.monthsShort(mom, ''));\n longP = regexEscape(this.months(mom, ''));\n shortPieces.push(shortP);\n longPieces.push(longP);\n mixedPieces.push(longP);\n mixedPieces.push(shortP);\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n }\n\n function createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n }\n\n // start-of-first-week - start-of-year\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n }\n\n // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n }\n\n // FORMATTING\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n // PARSING\n\n addRegexToken('w', match1to2, match1to2NoLeadingZero);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2, match1to2NoLeadingZero);\n addRegexToken('WW', match1to2, match2);\n\n addWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n );\n\n // HELPERS\n\n // LOCALES\n\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n };\n\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n }\n\n // MOMENTS\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('d', 0, 'do', 'day');\n\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday');\n\n // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n });\n\n // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n }\n\n // LOCALES\n function shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\n function localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n }\n\n function localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n }\n\n function localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n var day = get(this, 'Day');\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n function weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n }\n\n function weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n }\n\n function weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n }\n\n function computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n });\n\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n });\n\n function meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n }\n\n meridiem('a', true);\n meridiem('A', false);\n\n // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2, match1to2HasZero);\n addRegexToken('h', match1to2, match1to2NoLeadingZero);\n addRegexToken('k', match1to2, match1to2NoLeadingZero);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n });\n\n // LOCALES\n\n function localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n }\n\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n };\n\n // internal storage for locale config files\n var locales = {},\n localeFamilies = {},\n globalLocale;\n\n function commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n }\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n }\n\n // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n function chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n }\n\n function isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n // Ensure name is available and function returns boolean\n return !!(name && name.match('^[^/\\\\\\\\]*$'));\n }\n\n function loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n }\n\n // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n }\n\n // returns locale data\n function getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n }\n\n // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n var extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n // date from iso format\n function configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }\n\n function extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n ) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n }\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n }\n\n // date and time from ref 2822 format\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n }\n\n // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n }\n\n hooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n );\n\n // Pick the first defined of two or three arguments.\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n }\n\n // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n }\n\n // constant that refers to the ISO standard\n hooks.ISO_8601 = function () {};\n\n // constant that refers to the RFC 2822 form\n hooks.RFC_2822 = function () {};\n\n // date from string and format string\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n }\n\n function meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n }\n\n // date from string and array of format strings\n function configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n }\n\n function createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n }\n\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }\n\n // TODO: Use [].sort instead?\n function min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n ];\n\n function isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n }\n\n // compare two arrays, return the number of differences\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }\n\n // FORMATTING\n\n function offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n }\n\n offset('Z', ':');\n offset('ZZ', '');\n\n // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n });\n\n // HELPERS\n\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n }\n\n // Return a moment from input, that is local/utc/zone equivalent to model.\n function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n }\n\n // HOOKS\n\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n hooks.updateOffset = function () {};\n\n // MOMENTS\n\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n function getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n }\n\n function setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n }\n\n function hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n }\n\n function isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n }\n\n // ASP.NET json date format regex\n var aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n }\n\n // TODO: remove 'name' arg after deprecation is removed\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\n function isString(input) {\n return typeof input === 'string' || input instanceof String;\n }\n\n // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\n function isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n }\n\n function isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n }\n\n function isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n }\n\n function calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n }\n\n function clone() {\n return new Moment(this);\n }\n\n function isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n }\n\n function isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n }\n\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n function inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n }\n\n // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n function locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n }\n\n var lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n );\n\n function localeData() {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n // actual modulo - handles negative numbers (for dates before 1970):\n function mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n }\n\n function toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n }\n\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n }\n\n addFormatToken('N', 0, 0, 'eraAbbr');\n addFormatToken('NN', 0, 0, 'eraAbbr');\n addFormatToken('NNN', 0, 0, 'eraAbbr');\n addFormatToken('NNNN', 0, 0, 'eraName');\n addFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\n addFormatToken('y', ['y', 1], 'yo', 'eraYear');\n addFormatToken('y', ['yy', 2], 0, 'eraYear');\n addFormatToken('y', ['yyy', 3], 0, 'eraYear');\n addFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\n addRegexToken('N', matchEraAbbr);\n addRegexToken('NN', matchEraAbbr);\n addRegexToken('NNN', matchEraAbbr);\n addRegexToken('NNNN', matchEraName);\n addRegexToken('NNNNN', matchEraNarrow);\n\n addParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n );\n\n addRegexToken('y', matchUnsigned);\n addRegexToken('yy', matchUnsigned);\n addRegexToken('yyy', matchUnsigned);\n addRegexToken('yyyy', matchUnsigned);\n addRegexToken('yo', matchEraYearOrdinal);\n\n addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\n addParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n });\n\n function localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n }\n\n function localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n }\n\n function localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n }\n\n function getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n }\n\n function getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n }\n\n function getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n }\n\n function getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n }\n\n function erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n }\n\n function erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n }\n\n function erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n }\n\n function matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n }\n\n function matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n }\n\n function matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n }\n\n function matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n }\n\n function computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n erasName,\n erasAbbr,\n erasNarrow,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n erasName = regexEscape(eras[i].name);\n erasAbbr = regexEscape(eras[i].abbr);\n erasNarrow = regexEscape(eras[i].narrow);\n\n namePieces.push(erasName);\n abbrPieces.push(erasAbbr);\n narrowPieces.push(erasNarrow);\n mixedPieces.push(erasName);\n mixedPieces.push(erasAbbr);\n mixedPieces.push(erasNarrow);\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n // ALIASES\n\n // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n\n addWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n );\n\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n });\n\n // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday() + this.localeData()._week.dow,\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n }\n\n // FORMATTING\n\n addFormatToken('Q', 0, 'Qo', 'quarter');\n\n // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n });\n\n // MOMENTS\n\n function getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n }\n\n // FORMATTING\n\n addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n // PARSING\n\n addRegexToken('D', match1to2, match1to2NoLeadingZero);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n });\n\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n });\n\n // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true);\n\n // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n });\n\n // HELPERS\n\n // MOMENTS\n\n function getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('m', ['mm', 2], 0, 'minute');\n\n // PARSING\n\n addRegexToken('m', match1to2, match1to2HasZero);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE);\n\n // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false);\n\n // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second');\n\n // PARSING\n\n addRegexToken('s', match1to2, match1to2HasZero);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND);\n\n // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false);\n\n // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n });\n\n // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n\n var token, getSetMillisecond;\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n }\n\n getSetMillisecond = makeGetSet('Milliseconds', false);\n\n // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName');\n\n // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n if (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n }\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.eraName = getEraName;\n proto.eraNarrow = getEraNarrow;\n proto.eraAbbr = getEraAbbr;\n proto.eraYear = getEraYear;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.weeksInWeekYear = getWeeksInWeekYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n );\n proto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n );\n proto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n );\n proto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n );\n proto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n );\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n proto$1.eras = localeEras;\n proto$1.erasParse = localeErasParse;\n proto$1.erasConvertYear = localeErasConvertYear;\n proto$1.erasAbbrRegex = erasAbbrRegex;\n proto$1.erasNameRegex = erasNameRegex;\n proto$1.erasNarrowRegex = erasNarrowRegex;\n\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n }\n\n // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n function listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n }\n\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n });\n\n // Side effect imports\n\n hooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n );\n hooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n );\n\n var mathAbs = Math.abs;\n\n function abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n }\n\n function addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n }\n\n // supports only 2.0-style add(1, 's') or add(duration)\n function add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n }\n\n // supports only 2.0-style subtract(1, 's') or subtract(duration)\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n }\n\n function daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n }\n\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n }\n\n function as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n }\n\n function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y'),\n valueOf$1 = asMilliseconds;\n\n function clone$1() {\n return createDuration(this);\n }\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n }\n\n // This function allows you to set the rounding function for relative time strings\n function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }\n\n // This function allows you to set a threshold for relative time strings\n function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }\n\n function humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return (x > 0) - (x < 0) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n }\n\n var proto$2 = Duration.prototype;\n\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n\n proto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n );\n proto$2.lang = lang;\n\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf');\n\n // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n });\n\n //! moment.js\n\n hooks.version = '2.30.1';\n\n setHookCallback(createLocal);\n\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto;\n\n // currently HTML5 input type only supports 24-hour formats\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n };\n\n return hooks;\n\n})));\n","var map = {\n\t\"./it\": 4265,\n\t\"./it-ch\": 6773,\n\t\"./it-ch.js\": 6773,\n\t\"./it.js\": 4265\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 5358;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"\" + (chunkId === 616 ? \"authClient\" : chunkId) + \"-\" + chunkId + \".\" + {\"616\":\"e54aec615ec5db597029\",\"908\":\"c5681d2306101e9420af\"}[chunkId] + \".js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = function(chunkId) {\n\t// return url for filenames based on template\n\treturn undefined;\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"/pack/\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t577: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkjavascript_nodejs\"] = self[\"webpackChunkjavascript_nodejs\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// require('client/trackjs');\nrequire('client/polyfill');\n\n//exports.init = require('./init');\nexports.login = require('./login');\n\nrequire('./logout');\n\nexports.resizeOnload = require('./resizeOnload');\nrequire('./layout');\nrequire('./sitetoolbar');\nrequire('engine/sidebar/client');\nrequire('./navigationArrows');\nrequire('./hover');\nrequire('./trackLinks');\nrequire('./spoiler');\nrequire('./bannerBottom');\n\n// must use CommonsChunkPlugin\n// to ensure that other modules use exactly this (initialized) client/notify\nrequire('client/notification').init();\n\nrequire('client/recaptcha').initForms();\n\nrequire('client/dateTime/dateLocalElement');\nrequire('client/dateTime/dateExceptElement');\nrequire('client/dateTime/weekRangeElement');\nrequire('client/price/priceCurrencyElement');\n"],"names":["inProgress","dataWebpackPrefix","module","exports","weekDays","from","to","offset","split","map","Number","weekDay","pad","num","Math","floor","join","lang","LANG","localCurrency","shopCurrency","env","NODE_ENV","rateShopTo","countryCode","ordersMail","providers","stripeKey","paypalClientId","lookatCodeUrlBase","moment","require","getTimeZoneName","DateExceptElement","HTMLElement","constructor","super","this","render","connectedCallback","observedAttributes","attributeChangedCallback","name","oldValue","newValue","format","date","withZone","formatted","utcOffset","Date","getTimezoneOffset","params","f","getAttribute","lastParams","datesExcept","d","output","i","length","nextDate","needsMonth","getMonth","outputDate","push","innerHTML","window","customElements","define","DateLocalElement","hasAttribute","zone","setAttribute","fromTo","fromFormat","toFormat","getFullYear","replace","getDate","hasFormatToParts","Intl","DateTimeFormat","timeZoneName","formatToParts","find","t","type","value","browserUtcOffset","timeZoneShort","toLocaleTimeString","match","adjustWeekRange","WeekRangeElement","shortDays","day","delegate","topElement","selector","eventName","handler","context","addEventListener","event","found","currentNode","target","matches","currentTarget","parentElement","findDelegateTarget","delegateTarget","call","delegateMixin","obj","elem","disqusEmbedUrl","disqus_shortname","disqusCountUrl","loadDisqus","disqusElem","document","getElementById","classList","contains","add","spinner","Spinner","size","append","start","s","createElement","src","head","appendChild","onload","stop","remove","disqus_config","dataset","disqusIdentifier","page","identifier","id","disqus_enabled","MutationObserver","mutationRecords","record","addedNodes","forEach","node","tagName","includes","observe","childList","querySelector","hasChildNodes","coords","getBoundingClientRect","top","documentElement","clientHeight","bottom","scrollbarHeight","getScrollbarHeight","doc","height","max","body","scrollHeight","offsetHeight","scrollWidth","clientWidth","outer","style","cssText","Error","widthNoScroll","offsetWidth","overflow","inner","width","widthWithScroll","parentNode","removeChild","notification","closest","localStorage","bannerClose","now","Success","bannerCloseMessage","currentHoverElem","setTimeout","relatedTarget","navigator","userAgent","loadDisqusComments","loadDisqusIfVisible","requestAnimationFrameId","log","onWindowScrollAndResizeThrottled","requestAnimationFrame","toolbarSelector","sitetoolbar","sidebar","sidebarTop","getComputedStyle","display","observer","subtree","sidebarContent","sidebarInner","hasStickyFooter","isCompact","emptySpaceSize","lastElementChild","previousElementSibling","compactifySidebar","isTablet","content","setUserScaleIfTablet","onWindowScrollAndResize","onDOMContentLoaded","themeTogglers","querySelectorAll","themeToggler","onchange","newThemeIsDark","checked","changeTheme","theme","initThemeToggler","location","hash","oldTheme","newTheme","setItem","themeSvg","DISQUS","reset","reload","config","readyState","cls","endsWith","login","options","modal","Modal","hasClose","mixClass","setContent","email","preventDefault","logout","form","method","action","cookie","submit","e","showHotKeys","shortcut","next","prev","onSwipe","onRight","link","href","onLeft","activeElement","indexOf","ctrlKey","rel","keyCode","getDocumentHeight","iframeResize","ifrElem","callback","contentDocument","contentWindow","timeoutTimer","done","err","clearTimeout","cloneIframe","cloneNode","position","async","iframe","throttle","onResizeQueue","codeTabs","hideShowArrows","switchesElem","firstElementChild","onResize","formElem","toggleElem","searchInput","findButton","onclick","onToggleClick","bind","onkeydown","onSearchInputKeydown","onblur","onSearchInputBlur","onpointerdown","onFindPointerDown","show","blur","hide","focus","paranja","className","SiteSearch","searchElem","siteSearch","toggler","nextElementSibling","toggle","spoilerElem","baseURI","host","which","defaultPrevented","shiftKey","altKey","NotificationManager","notifications","verticalSpace","register","unshift","recalculate","unregister","idx","splice","init","notificationManager","Notification","html","timeout","elemHtml","insertAdjacentHTML","undefined","TIMEOUT_DEFAULT","TIMEOUT_SLOW","TIMEOUT_FAST","setupCloseHandler","setupCloseTimeout","close","transform","prototype","Info","Warning","startX","startY","dist","elapsedTime","startTime","tolerance","threshold","allowedTime","touchobj","changedTouches","pageX","pageY","abs","insideScrollable","CustomEvent","evt","bubbles","cancelable","detail","createEvent","initCustomEvent","Object","create","Event","getOwnPropertyDescriptor","Element","get","propDescriptor","enumerable","HTML5_DOMStringMap","attrVal","attrName","propName","attribute","that","attributes","attsLength","toUpperCase","n0","charAt","getter","setter","removeAttribute","__defineGetter__","e1","test","substr","defineProperty","set","e2","mutation","nodes","createTextNode","fragment","createDocumentFragment","index","methods","matchesSelector","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","replaceChild","arguments","prepend","insertBefore","firstChild","before","after","nextSibling","methodName","hidden","globalThis","lastTime","element","currTime","getTime","timeToCall","cancelAnimationFrame","String","startsWith","string","slice","foundIndex","lastIndexOf","RegExp","TypeError","padStart","targetLength","padString","repeat","getSymbolFromCurrency","PriceCurrencyElem","addCurrencySign","amount","currency","round","AMD","convertTo","convertToCurrency","Recaptcha","initForms","loadScript","submitButtons","button","disabled","recaptcha","onsubmit","validateForm","checkValidity","reportValidity","promise","RECAPTCHA_ID","Promise","resolve","reject","recaptchaCallback","script","onerror","renderPromise","renderPromiseResolve","renderPromiseReject","widgetId","container","grecaptcha","sitekey","execute","token","getResponse","input","elements","class","elemClass","spinnerElem","updateLocale","monthsShort","standalone","pageWrapper","noSidebar","charCodeAt","toLowerCase","metaKey","highlight","current","getElementsByClassName","h2s","getElementsByTagName","li","initSidebarHighlight","wasCalled","func","ms","savedArgs","savedThis","isThrottled","wrapper","apply","n","Document","p","createElementNS","aa","importNode","ba","ca","da","DocumentFragment","ea","q","Node","r","u","v","w","y","attachShadow","z","A","B","C","D","toggleAttribute","E","getAttributeNS","F","setAttributeNS","G","removeAttributeNS","H","insertAdjacentElement","fa","ha","ia","ja","ka","la","replaceWith","ma","na","I","oa","pa","qa","Set","ra","a","b","has","sa","J","isConnected","__CE_isImportDocument","ShadowRoot","K","children","Array","nodeType","ELEMENT_NODE","L","M","c","localName","import","__CE_shadowRoot","N","O","noDocumentConstructionObserver","shadyDomFastWalk","m","g","j","P","ShadyDOM","inUse","nativeMethods","Q","R","__CE_patched","S","__CE_state","T","U","disconnectedCallback","V","upgrade","h","__CE_registry","__CE_documentLoadHandled","k","l","delete","ownerDocument","defaultView","W","constructionStack","constructorFunction","pop","__CE_definition","hasAttributes","X","va","namespaceURI","setPrototypeOf","HTMLUnknownElement","message","sourceURL","fileName","line","lineNumber","column","columnNumber","ErrorEvent","initErrorEvent","filename","lineno","colno","error","configurable","dispatchEvent","wa","xa","ya","disconnect","Y","Map","o","za","SyntaxError","Ba","x","Function","adoptedCallback","Aa","Z","Ea","previousSibling","lastChild","ua","childNodes","Da","whenDefined","polyfillWrapFlushCallback","polyfillDefineLazy","Fa","Ia","writable","Ga","Ca","TEXT_NODE","ta","COMMENT_NODE","textContent","Ha","CustomElementRegistry","forcePolyfill","__CE_installPolyfill","it","isObject","toIObject","toLength","toAbsoluteIndex","IS_INCLUDES","$this","el","fromIndex","toString","core","version","__e","aFunction","fn","is","global","redefine","ctx","PROTOTYPE","$export","source","key","own","out","exp","IS_FORCED","IS_GLOBAL","IS_STATIC","IS_PROTO","IS_BIND","expProto","exec","anObject","result","ignoreCase","multiline","unicode","sticky","self","__g","hasOwnProperty","dP","createDesc","object","cof","propertyIsEnumerable","MATCH","isRegExp","descriptor","setToStringTag","IteratorPrototype","Constructor","NAME","dPs","enumBugKeys","IE_PROTO","Empty","createDict","iframeDocument","open","write","lt","Properties","IE8_DOM_DEFINE","toPrimitive","Attributes","getKeys","defineProperties","keys","arrayIndexOf","names","$keys","bitmap","SRC","$toString","TO_STRING","TPL","val","safe","isFunction","def","TAG","tag","stat","shared","uid","SHARED","store","mode","copyright","toInteger","min","ceil","isNaN","IObject","defined","valueOf","px","random","concat","Symbol","USE_SYMBOL","getFlags","RegExpProto","$RegExpStringIterator","regexp","_r","_s","matchAll","flags","rx","lastIndex","currencySymbolMap","currencyCode","code","AED","AFN","ALL","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTC","BTN","BWP","BYN","BYR","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EEK","EGP","ERN","ETB","ETH","EUR","FJD","FKP","GBP","GEL","GGP","GHC","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","IMP","INR","IQD","IRR","ISK","JEP","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LTC","LTL","LVL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRO","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RMB","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STD","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRL","TRY","TTD","TVD","TWD","TZS","UAH","UGX","USD","UYI","UYU","UYW","UZS","VEF","VES","VND","VUV","WST","XAF","XBT","XCD","XOF","XPF","XSU","XUA","YER","ZAR","ZMW","ZWD","ZWL","defineLocale","months","weekdays","weekdaysShort","weekdaysMin","longDateFormat","LT","LTS","LL","LLL","LLLL","calendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","relativeTime","future","past","ss","mm","hh","dd","MM","yy","dayOfMonthOrdinalParse","ordinal","week","dow","doy","factory","hours","ww","plural","word","forms","relativeTimeWithPlural","number","withoutSuffix","monthsParse","isFormat","longMonthsParse","shortMonthsParse","monthsRegex","monthsShortRegex","monthsStrictRegex","monthsShortStrictRegex","meridiemParse","isPM","meridiem","hour","minute","isLower","period","ll","lll","llll","meridiemHour","hm","hookCallback","some","hooks","setHookCallback","isArray","hasOwnProp","isObjectEmpty","getOwnPropertyNames","isUndefined","isNumber","isDate","arr","res","arrLen","extend","createUTC","locale","strict","createLocalOrUTC","utc","defaultParsingFlags","empty","unusedTokens","unusedInput","charsLeftOver","nullInput","invalidEra","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","era","rfc2822","weekdayMismatch","getParsingFlags","_pf","isValid","parsedParts","isNowValid","_d","invalidWeekday","_strict","bigHour","isFrozen","_isValid","createInvalid","NaN","fun","len","momentProperties","updateInProgress","copyConfig","prop","momentPropertiesLen","_isAMomentObject","_i","_f","_l","_tzm","_isUTC","_offset","_locale","Moment","updateOffset","isMoment","warn","msg","suppressDeprecationWarnings","console","deprecate","firstTime","deprecationHandler","arg","args","argLen","stack","deprecations","deprecateSimple","_config","_dayOfMonthOrdinalParseLenient","_dayOfMonthOrdinalParse","_ordinalParse","mergeConfigs","parentConfig","childConfig","Locale","defaultCalendar","mom","_calendar","zeroFill","forceSign","absNumber","zerosToFill","pow","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","padded","localeData","removeFormattingTokens","makeFormatFunction","array","formatMoment","expandFormat","invalidDate","replaceLongDateFormatTokens","defaultLongDateFormat","_longDateFormat","formatUpper","tok","defaultInvalidDate","_invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","_ordinal","defaultRelativeTime","isFuture","_relativeTime","pastFuture","diff","aliases","dates","days","weekday","isoweekdays","isoweekday","DDD","dayofyears","dayofyear","milliseconds","millisecond","minutes","month","quarters","quarter","seconds","second","gg","weekyears","weekyear","GG","isoweekyears","isoweekyear","weeks","isoweeks","isoweek","years","year","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","priorities","isoWeekday","dayOfYear","weekYear","isoWeekYear","isoWeek","getPrioritizedUnits","unitsObj","unit","priority","sort","regexes","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","match1to2NoLeadingZero","match1to2HasZero","addRegexToken","regex","strictRegex","isStrict","getParseRegexForToken","unescapeFormat","regexEscape","matched","p1","p2","p3","p4","absFloor","toInt","argumentForCoercion","coercedNumber","isFinite","tokens","addParseToken","tokenLen","addWeekParseToken","_w","addTimeToArrayFromToken","_a","isLeapYear","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","daysInYear","parseTwoDigitYear","parseInt","getSetYear","makeGetSet","getIsLeapYear","keepTime","set$1","isUTC","getUTCMilliseconds","getMilliseconds","getUTCSeconds","getSeconds","getUTCMinutes","getMinutes","getUTCHours","getHours","getUTCDate","getUTCDay","getDay","getUTCMonth","getUTCFullYear","setUTCMilliseconds","setMilliseconds","setUTCSeconds","setSeconds","setUTCMinutes","setMinutes","setUTCHours","setHours","setUTCDate","setDate","setUTCFullYear","setFullYear","stringGet","stringSet","prioritized","prioritizedLen","mod","daysInMonth","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","_months","localeMonthsShort","_monthsShort","handleStrictParse","monthName","ii","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","localeMonthsParse","_monthsParseExact","setMonth","setUTCMonth","getSetMonth","getDaysInMonth","computeMonthsParse","_monthsShortStrictRegex","_monthsShortRegex","_monthsStrictRegex","_monthsRegex","cmpLenRev","shortP","longP","shortPieces","longPieces","mixedPieces","createDate","createUTCDate","UTC","firstWeekOffset","fwd","dayOfYearFromWeeks","resYear","resDayOfYear","weekOfYear","resWeek","weekOffset","weeksInYear","weekOffsetNext","localeWeek","_week","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","weekdaysParse","parseIsoWeekday","shiftWeekdays","ws","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","_weekdays","localeWeekdaysShort","_weekdaysShort","localeWeekdaysMin","_weekdaysMin","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","localeWeekdaysParse","_weekdaysParseExact","_fullWeekdaysParse","getSetDayOfWeek","getSetLocaleDayOfWeek","getSetISODayOfWeek","computeWeekdaysParse","_weekdaysStrictRegex","_weekdaysRegex","_weekdaysShortStrictRegex","_weekdaysShortRegex","_weekdaysMinStrictRegex","_weekdaysMinRegex","minp","shortp","longp","minPieces","hFormat","kFormat","lowercase","matchMeridiem","_meridiemParse","localeIsPM","kInput","_isPm","_meridiem","pos","pos1","pos2","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","globalLocale","baseConfig","locales","localeFamilies","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","loadLocale","isLocaleNameSane","oldLocale","_abbr","aliasedRequire","getSetGlobalLocale","values","data","getLocale","abbr","parentLocale","tmpLocale","listLocales","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","obsOffsets","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","calculateOffset","obsOffset","militaryOffset","numOffset","configFromRFC2822","parsedArray","configFromString","createFromInputFallback","defaults","currentDateArray","nowValue","_useUTC","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","_dayOfYear","_nextDay","temp","weekdayOverflow","curWeek","createLocal","ISO_8601","RFC_2822","skipped","stringLength","totalParsedInputLength","meridiemFixWrap","erasConvertYear","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","score","configFromObject","dayOrDate","createFromConfig","prepareConfig","preparse","configFromInput","prototypeMin","other","prototypeMax","pickBy","moments","ordering","isDurationValid","unitHasDecimal","orderLen","parseFloat","isValid$1","createInvalid$1","createDuration","Duration","duration","_milliseconds","_days","_data","_bubble","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","separator","sign","offsetFromString","chunkOffset","matcher","parts","cloneWithOffset","model","clone","setTime","local","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","subtract","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","_isDSTShifted","toArray","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","ret","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","base","isAfter","isBefore","createAdder","direction","tmp","isAdding","invalid","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","property","objectTest","propertyTest","properties","propertyLen","arrayTest","dataTypeTest","filter","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","time","formats","sod","startOf","calendarFormat","localInput","endOf","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","zoneDelta","monthDiff","wholeMonthDiff","anchor","toISOString","keepOffset","toDate","inspect","prefix","datetime","suffix","inputString","defaultFormatUtc","defaultFormat","postformat","humanize","fromNow","toNow","newLocaleData","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOfDate","unix","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","localeEras","eras","_eras","since","until","localeErasParse","eraName","narrow","localeErasConvertYear","dir","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","_erasNameRegex","_erasRegex","erasAbbrRegex","_erasAbbrRegex","erasNarrowRegex","_erasNarrowRegex","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","_eraYearOrdinalRegex","erasName","erasAbbr","erasNarrow","abbrPieces","namePieces","narrowPieces","addWeekYearFormatToken","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","erasParse","eraYearOrdinalParse","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetMillisecond","getSetSecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","parseZone","preParsePostFormat","for","eraNarrow","eraAbbr","eraYear","isoWeeks","weeksInWeekYear","isoWeeksInYear","isoWeeksInISOWeekYear","isDST","zoneAbbr","zoneName","isDSTShifted","proto$1","get$1","field","listMonthsImpl","listWeekdaysImpl","localeSorted","shift","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","firstDayOfYear","firstDayOfWeek","langData","mathAbs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","valueOf$1","clone$1","get$2","makeGetter","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","limit","argWithSuffix","argThresholds","withSuffix","th","assign","abs$1","toISOString$1","totalSign","ymSign","daysSign","hmsSign","total","toFixed","proto$2","toIsoString","relativeTimeRounding","relativeTimeThreshold","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","TIME","TIME_SECONDS","TIME_MS","webpackContext","req","webpackContextResolve","__webpack_require__","__webpack_module_cache__","moduleId","cachedModule","loaded","__webpack_modules__","definition","chunkId","all","reduce","promises","miniCssF","url","needAttach","scripts","charset","nc","onScriptComplete","doneFns","toStringTag","nmd","paths","installedChunks","installedChunkData","errorType","realSrc","request","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","runtime","chunkLoadingGlobal","resizeOnload"],"sourceRoot":""}