{ "version": 3, "sources": ["../../../node_modules/flowbite/dist/webpack:/webpack/universalModuleDefinition", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/enums.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getWindow.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/modifiers/applyStyles.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/getBasePlacement.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/math.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/userAgent.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/contains.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/within.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/expandToHashMap.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/modifiers/arrow.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/getVariation.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/modifiers/computeStyles.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/modifiers/eventListeners.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/rectToClientRect.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/computeOffsets.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/detectOverflow.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/modifiers/flip.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/modifiers/hide.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/modifiers/offset.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/getAltAxis.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/modifiers/index.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/orderModifiers.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/debounce.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/utils/mergeByName.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/createPopper.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/popper.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/popper-lite.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/@popperjs/core/lib/index.js", "../../../node_modules/flowbite/dist/webpack:/node_modules/flowbite-datepicker/dist/main.cjs.js", "../../../node_modules/flowbite/dist/webpack:/src/components/accordion/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/carousel/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/clipboard/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/collapse/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/datepicker/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/dial/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/dismiss/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/drawer/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/dropdown/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/input-counter/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/modal/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/popover/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/tabs/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/components/tooltip/index.ts", "../../../node_modules/flowbite/dist/webpack:/src/dom/events.ts", "../../../node_modules/flowbite/dist/webpack:/src/dom/instances.ts", "../../../node_modules/flowbite/dist/webpack:/webpack/bootstrap", "../../../node_modules/flowbite/dist/webpack:/webpack/runtime/define property getters", "../../../node_modules/flowbite/dist/webpack:/webpack/runtime/hasOwnProperty shorthand", "../../../node_modules/flowbite/dist/webpack:/webpack/runtime/make namespace object", "../../../node_modules/flowbite/dist/webpack:/src/index.turbo.ts", "../../../node_modules/lodash/isFunction.js", "../../../node_modules/lodash/_coreJsData.js", "../../../node_modules/lodash/_isMasked.js", "../../../node_modules/lodash/_toSource.js", "../../../node_modules/lodash/_baseIsNative.js", "../../../node_modules/lodash/_getValue.js", "../../../node_modules/lodash/_getNative.js", "../../../node_modules/lodash/_nativeCreate.js", "../../../node_modules/lodash/_hashClear.js", "../../../node_modules/lodash/_hashDelete.js", "../../../node_modules/lodash/_hashGet.js", "../../../node_modules/lodash/_hashHas.js", "../../../node_modules/lodash/_hashSet.js", "../../../node_modules/lodash/_Hash.js", "../../../node_modules/lodash/_listCacheClear.js", "../../../node_modules/lodash/eq.js", "../../../node_modules/lodash/_assocIndexOf.js", "../../../node_modules/lodash/_listCacheDelete.js", "../../../node_modules/lodash/_listCacheGet.js", "../../../node_modules/lodash/_listCacheHas.js", "../../../node_modules/lodash/_listCacheSet.js", "../../../node_modules/lodash/_ListCache.js", "../../../node_modules/lodash/_Map.js", "../../../node_modules/lodash/_mapCacheClear.js", "../../../node_modules/lodash/_isKeyable.js", "../../../node_modules/lodash/_getMapData.js", "../../../node_modules/lodash/_mapCacheDelete.js", "../../../node_modules/lodash/_mapCacheGet.js", "../../../node_modules/lodash/_mapCacheHas.js", "../../../node_modules/lodash/_mapCacheSet.js", "../../../node_modules/lodash/_MapCache.js", "../../../node_modules/lodash/_setCacheAdd.js", "../../../node_modules/lodash/_setCacheHas.js", "../../../node_modules/lodash/_SetCache.js", "../../../node_modules/lodash/_baseFindIndex.js", "../../../node_modules/lodash/_baseIsNaN.js", "../../../node_modules/lodash/_strictIndexOf.js", "../../../node_modules/lodash/_baseIndexOf.js", "../../../node_modules/lodash/_arrayIncludes.js", "../../../node_modules/lodash/_arrayIncludesWith.js", "../../../node_modules/lodash/_cacheHas.js", "../../../node_modules/lodash/_Set.js", "../../../node_modules/lodash/noop.js", "../../../node_modules/lodash/_setToArray.js", "../../../node_modules/lodash/_createSet.js", "../../../node_modules/lodash/_baseUniq.js", "../../../node_modules/lodash/uniq.js", "../../../node_modules/lodash/throttle.js", "../../../node_modules/lodash/_arrayMap.js", "../../../node_modules/lodash/isArray.js", "../../../node_modules/lodash/_baseToString.js", "../../../node_modules/lodash/toString.js", "../../../node_modules/lodash/_baseSlice.js", "../../../node_modules/lodash/_castSlice.js", "../../../node_modules/lodash/_hasUnicode.js", "../../../node_modules/lodash/_asciiToArray.js", "../../../node_modules/lodash/_unicodeToArray.js", "../../../node_modules/lodash/_stringToArray.js", "../../../node_modules/lodash/_createCaseFirst.js", "../../../node_modules/lodash/upperFirst.js", "../../../node_modules/lodash/capitalize.js", "../../../node_modules/lodash/_arrayReduce.js", "../../../node_modules/lodash/_basePropertyOf.js", "../../../node_modules/lodash/_deburrLetter.js", "../../../node_modules/lodash/deburr.js", "../../../node_modules/lodash/_asciiWords.js", "../../../node_modules/lodash/_hasUnicodeWord.js", "../../../node_modules/lodash/_unicodeWords.js", "../../../node_modules/lodash/words.js", "../../../node_modules/lodash/_createCompounder.js", "../../../node_modules/lodash/camelCase.js", "../../../node_modules/flatpickr/dist/l10n/sk.js", "../../../node_modules/flatpickr/dist/l10n/cs.js", "../../../node_modules/moment/moment.js", "../../../node_modules/glightbox/dist/js/glightbox.min.js", "../../../node_modules/headroom.js/dist/headroom.js", "../../../node_modules/money/money.js", "../../../node_modules/@uppy/utils/lib/hasProperty.js", "../../../node_modules/@uppy/utils/lib/Translator.js", "../../../node_modules/namespace-emitter/index.js", "../../../node_modules/nanoid/non-secure/index.cjs", "../../../node_modules/lodash.throttle/index.js", "../../../node_modules/@transloadit/prettier-bytes/prettierBytes.js", "../../../node_modules/wildcard/index.js", "../../../node_modules/mime-match/index.js", "../../../node_modules/@uppy/store-default/lib/index.js", "../../../node_modules/@uppy/utils/lib/getFileNameAndExtension.js", "../../../node_modules/@uppy/utils/lib/mimeTypes.js", "../../../node_modules/@uppy/utils/lib/getFileType.js", "../../../node_modules/@uppy/utils/lib/generateFileID.js", "../../../node_modules/@uppy/core/lib/supportsUploadProgress.js", "../../../node_modules/@uppy/core/lib/getFileName.js", "../../../node_modules/@uppy/utils/lib/getTimeStamp.js", "../../../node_modules/@uppy/core/lib/loggers.js", "../../../node_modules/@uppy/core/lib/locale.js", "../../../node_modules/@uppy/core/lib/Uppy.js", "../../../node_modules/preact/src/constants.js", "../../../node_modules/preact/src/util.js", "../../../node_modules/preact/src/options.js", "../../../node_modules/preact/src/create-element.js", "../../../node_modules/preact/src/component.js", "../../../node_modules/preact/src/create-context.js", "../../../node_modules/preact/src/diff/children.js", "../../../node_modules/preact/src/diff/props.js", "../../../node_modules/preact/src/diff/index.js", "../../../node_modules/preact/src/render.js", "../../../node_modules/preact/src/clone-element.js", "../../../node_modules/preact/src/diff/catch-error.js", "../../../node_modules/@uppy/utils/lib/isDOMElement.js", "../../../node_modules/@uppy/utils/lib/findDOMElement.js", "../../../node_modules/@uppy/core/lib/BasePlugin.js", "../../../node_modules/@uppy/core/lib/UIPlugin.js", "../../../node_modules/@uppy/core/lib/index.js", "../../../node_modules/@uppy/utils/lib/getSpeed.js", "../../../node_modules/@uppy/utils/lib/getBytesRemaining.js", "../../../node_modules/@uppy/utils/lib/getTextDirection.js", "../../../node_modules/@uppy/dashboard/node_modules/@uppy/status-bar/lib/StatusBarStates.js", "../../../node_modules/classnames/index.js", "../../../node_modules/@uppy/dashboard/node_modules/@uppy/status-bar/lib/calculateProcessingProgress.js", "../../../node_modules/@uppy/utils/lib/secondsToTime.js", "../../../node_modules/@uppy/utils/lib/prettyETA.js", "../../../node_modules/@uppy/dashboard/node_modules/@uppy/status-bar/lib/Components.js", "../../../node_modules/@uppy/dashboard/node_modules/@uppy/status-bar/lib/StatusBar.js", "../../../node_modules/@uppy/dashboard/node_modules/@uppy/status-bar/lib/locale.js", "../../../node_modules/@uppy/dashboard/node_modules/@uppy/status-bar/lib/index.js", "../../../node_modules/@uppy/informer/lib/FadeIn.js", "../../../node_modules/@uppy/informer/lib/TransitionGroup.js", "../../../node_modules/@uppy/informer/lib/index.js", "../../../node_modules/@uppy/utils/lib/dataURItoBlob.js", "../../../node_modules/@uppy/utils/lib/isObjectURL.js", "../../../node_modules/@uppy/utils/lib/isPreviewSupported.js", "../../../node_modules/exifr/dist/mini.legacy.umd.js", "../../../node_modules/@uppy/thumbnail-generator/lib/locale.js", "../../../node_modules/@uppy/thumbnail-generator/lib/index.js", "../../../node_modules/@uppy/utils/lib/findAllDOMElements.js", "../../../node_modules/@uppy/utils/lib/toArray.js", "../../../node_modules/@uppy/utils/lib/getDroppedFiles/utils/webkitGetAsEntryApi/getRelativePath.js", "../../../node_modules/@uppy/utils/lib/getDroppedFiles/utils/webkitGetAsEntryApi/getFilesAndDirectoriesFromDirectory.js", "../../../node_modules/@uppy/utils/lib/getDroppedFiles/utils/webkitGetAsEntryApi/index.js", "../../../node_modules/@uppy/utils/lib/getDroppedFiles/utils/fallbackApi.js", "../../../node_modules/@uppy/utils/lib/getDroppedFiles/index.js", "../../../node_modules/@uppy/utils/lib/FOCUSABLE_ELEMENTS.js", "../../../node_modules/@uppy/dashboard/lib/utils/getActiveOverlayEl.js", "../../../node_modules/@uppy/dashboard/lib/utils/trapFocus.js", "../../../node_modules/lodash.debounce/index.js", "../../../node_modules/@uppy/dashboard/lib/utils/createSuperFocus.js", "../../../node_modules/memoize-one/dist/memoize-one.cjs.js", "../../../node_modules/@uppy/utils/lib/isDragDropSupported.js", "../../../node_modules/is-shallow-equal/index.js", "../../../node_modules/@uppy/dashboard/lib/utils/getFileTypeIcon.js", "../../../node_modules/@uppy/dashboard/lib/components/FilePreview.js", "../../../node_modules/@uppy/dashboard/lib/components/FileItem/MetaErrorMessage.js", "../../../node_modules/@uppy/dashboard/lib/components/FileItem/FilePreviewAndLink/index.js", "../../../node_modules/@uppy/dashboard/lib/components/FileItem/FileProgress/index.js", "../../../node_modules/@uppy/utils/lib/truncateString.js", "../../../node_modules/@uppy/dashboard/lib/components/FileItem/FileInfo/index.js", "../../../node_modules/@uppy/dashboard/lib/utils/copyToClipboard.js", "../../../node_modules/@uppy/dashboard/lib/components/FileItem/Buttons/index.js", "../../../node_modules/@uppy/dashboard/lib/components/FileItem/index.js", "../../../node_modules/@uppy/dashboard/lib/components/VirtualList.js", "../../../node_modules/@uppy/dashboard/lib/components/FileList.js", "../../../node_modules/@uppy/dashboard/lib/components/AddFiles.js", "../../../node_modules/@uppy/dashboard/lib/components/AddFilesPanel.js", "../../../node_modules/@uppy/dashboard/lib/utils/ignoreEvent.js", "../../../node_modules/@uppy/dashboard/lib/components/PickerPanelContent.js", "../../../node_modules/@uppy/dashboard/lib/components/EditorPanel.js", "../../../node_modules/@uppy/dashboard/lib/components/PickerPanelTopBar.js", "../../../node_modules/@uppy/dashboard/lib/components/FileCard/index.js", "../../../node_modules/@uppy/dashboard/lib/components/Slide.js", "../../../node_modules/@uppy/dashboard/lib/components/Dashboard.js", "../../../node_modules/@uppy/dashboard/lib/locale.js", "../../../node_modules/@uppy/dashboard/lib/index.js", "../../../node_modules/js-base64/base64.js", "../../../node_modules/requires-port/index.js", "../../../node_modules/querystringify/index.js", "../../../node_modules/url-parse/index.js", "../../../node_modules/tus-js-client/lib.es5/error.js", "../../../node_modules/tus-js-client/lib.es5/logger.js", "../../../node_modules/tus-js-client/lib.es5/uuid.js", "../../../node_modules/tus-js-client/lib.es5/upload.js", "../../../node_modules/tus-js-client/lib.es5/noopUrlStorage.js", "../../../node_modules/tus-js-client/lib.es5/browser/urlStorage.js", "../../../node_modules/tus-js-client/lib.es5/browser/httpStack.js", "../../../node_modules/tus-js-client/lib.es5/browser/isReactNative.js", "../../../node_modules/tus-js-client/lib.es5/browser/uriToBlob.js", "../../../node_modules/tus-js-client/lib.es5/browser/isCordova.js", "../../../node_modules/tus-js-client/lib.es5/browser/readAsByteArray.js", "../../../node_modules/tus-js-client/lib.es5/browser/fileReader.js", "../../../node_modules/tus-js-client/lib.es5/browser/fingerprint.js", "../../../node_modules/tus-js-client/lib.es5/browser/index.js", "../../../node_modules/@uppy/utils/lib/NetworkError.js", "../../../node_modules/@uppy/utils/lib/fetchWithNetworkError.js", "../../../node_modules/@uppy/companion-client/lib/AuthError.js", "../../../node_modules/@uppy/companion-client/lib/RequestClient.js", "../../../node_modules/@uppy/companion-client/lib/tokenStorage.js", "../../../node_modules/@uppy/companion-client/lib/Provider.js", "../../../node_modules/@uppy/companion-client/lib/SearchProvider.js", "../../../node_modules/@uppy/companion-client/lib/Socket.js", "../../../node_modules/@uppy/companion-client/lib/index.js", "../../../node_modules/@uppy/utils/lib/emitSocketProgress.js", "../../../node_modules/@uppy/utils/lib/getSocketHost.js", "../../../node_modules/@uppy/utils/lib/settle.js", "../../../node_modules/@uppy/utils/lib/EventTracker.js", "../../../node_modules/@uppy/utils/lib/isNetworkError.js", "../../../node_modules/@uppy/utils/lib/RateLimitedQueue.js", "../../../node_modules/@uppy/tus/lib/getFingerprint.js", "../../../node_modules/@uppy/tus/lib/index.js", "../../../node_modules/@uppy/golden-retriever/lib/ServiceWorkerStore.js", "../../../node_modules/@uppy/golden-retriever/lib/IndexedDBStore.js", "../../../node_modules/@uppy/golden-retriever/lib/MetaDataStore.js", "../../../node_modules/@uppy/golden-retriever/lib/index.js", "../../../node_modules/@uppy/locales/lib/cs_CZ.js", "../../../node_modules/@uppy/locales/lib/sk_SK.js", "../../../node_modules/global/window.js", "../../../node_modules/min-document/index.js", "../../../node_modules/global/document.js", "../../../node_modules/@babel/runtime/helpers/extends.js", "../../../node_modules/is-function/index.js", "../../../node_modules/video.js/node_modules/@videojs/xhr/lib/interceptors.js", "../../../node_modules/video.js/node_modules/@videojs/xhr/lib/retry.js", "../../../node_modules/video.js/node_modules/@videojs/xhr/lib/http-handler.js", "../../../node_modules/video.js/node_modules/@videojs/xhr/lib/index.js", "../../../node_modules/videojs-vtt.js/lib/vtt.js", "../../../node_modules/videojs-vtt.js/lib/vttcue.js", "../../../node_modules/videojs-vtt.js/lib/vttregion.js", "../../../node_modules/videojs-vtt.js/lib/browser-index.js", "../../../node_modules/url-toolkit/src/url-toolkit.js", "../../../node_modules/@xmldom/xmldom/lib/conventions.js", "../../../node_modules/@xmldom/xmldom/lib/dom.js", "../../../node_modules/@xmldom/xmldom/lib/entities.js", "../../../node_modules/@xmldom/xmldom/lib/sax.js", "../../../node_modules/@xmldom/xmldom/lib/dom-parser.js", "../../../node_modules/@xmldom/xmldom/lib/index.js", "../../../node_modules/mux.js/lib/utils/numbers.js", "../../../node_modules/mux.js/lib/tools/parse-sidx.js", "../../../node_modules/mux.js/lib/utils/clock.js", "../../../node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/cjs/stream.js", "../../../node_modules/@babel/runtime/helpers/interopRequireDefault.js", "../../../node_modules/m3u8-parser/node_modules/@videojs/vhs-utils/cjs/decode-b64-to-uint8-array.js", "../../../node_modules/m3u8-parser/dist/m3u8-parser.cjs.js", "../../../node_modules/@videojs/http-streaming/node_modules/mux.js/lib/utils/numbers.js", "../../../node_modules/@videojs/http-streaming/node_modules/mux.js/lib/tools/parse-sidx.js", "../../../node_modules/@videojs/http-streaming/node_modules/mux.js/lib/utils/clock.js", "../../../node_modules/keycode/index.js", "../../../node_modules/safe-json-parse/tuple.js", "../../../node_modules/@videojs/xhr/lib/http-handler.js", "../../../node_modules/@videojs/xhr/lib/index.js", "../../../node_modules/@videojs/vhs-utils/cjs/resolve-url.js", "../../../node_modules/@videojs/vhs-utils/cjs/codecs.js", "../../../node_modules/@videojs/vhs-utils/cjs/media-types.js", "../../../node_modules/@videojs/vhs-utils/cjs/byte-helpers.js", "../../../node_modules/@videojs/vhs-utils/cjs/media-groups.js", "../../../node_modules/@videojs/vhs-utils/cjs/decode-b64-to-uint8-array.js", "../../../node_modules/jb-videojs-hls-quality-selector/node_modules/mpd-parser/dist/mpd-parser.cjs.js", "../../../node_modules/@videojs/vhs-utils/cjs/id3-helpers.js", "../../../node_modules/@videojs/vhs-utils/cjs/codec-helpers.js", "../../../node_modules/@videojs/vhs-utils/cjs/opus-helpers.js", "../../../node_modules/@videojs/vhs-utils/cjs/mp4-helpers.js", "../../../node_modules/@videojs/vhs-utils/cjs/ebml-helpers.js", "../../../node_modules/@videojs/vhs-utils/cjs/nal-helpers.js", "../../../node_modules/@videojs/vhs-utils/cjs/containers.js", "../../../node_modules/jb-videojs-hls-quality-selector/node_modules/video.js/dist/video.cjs.js", "../../../node_modules/jb-videojs-hls-quality-selector/dist/jb-videojs-hls-quality-selector.js", "../../../node_modules/@rails/actiontext/app/assets/javascripts/actiontext.js", "../../../node_modules/@rails/activestorage/app/assets/javascripts/activestorage.esm.js", "../../javascript/application.js", "../../../node_modules/@sentry/utils/src/is.ts", "../../../node_modules/@sentry/utils/src/string.ts", "../../../node_modules/@sentry/utils/src/aggregate-errors.ts", "../../../node_modules/@sentry/utils/src/breadcrumb-log-level.ts", "../../../node_modules/@sentry/utils/src/version.ts", "../../../node_modules/@sentry/utils/src/worldwide.ts", "../../../node_modules/@sentry/utils/src/browser.ts", "../../../node_modules/@sentry/utils/src/debug-build.ts", "../../../node_modules/@sentry/utils/src/logger.ts", "../../../node_modules/@sentry/utils/src/dsn.ts", "../../../node_modules/@sentry/utils/src/error.ts", "../../../node_modules/@sentry/utils/src/object.ts", "../../../node_modules/@sentry/utils/src/stacktrace.ts", "../../../node_modules/@sentry/utils/src/instrument/handlers.ts", "../../../node_modules/@sentry/utils/src/instrument/console.ts", "../../../node_modules/@sentry/utils/src/supports.ts", "../../../node_modules/@sentry/utils/src/time.ts", "../../../node_modules/@sentry/utils/src/instrument/fetch.ts", "../../../node_modules/@sentry/utils/src/instrument/globalError.ts", "../../../node_modules/@sentry/utils/src/instrument/globalUnhandledRejection.ts", "../../../node_modules/@sentry/utils/src/env.ts", "../../../node_modules/@sentry/utils/src/node.ts", "../../../node_modules/@sentry/utils/src/isBrowser.ts", "../../../node_modules/@sentry/utils/src/memo.ts", "../../../node_modules/@sentry/utils/src/misc.ts", "../../../node_modules/@sentry/utils/src/normalize.ts", "../../../node_modules/@sentry/utils/src/syncpromise.ts", "../../../node_modules/@sentry/utils/src/promisebuffer.ts", "../../../node_modules/@sentry/utils/src/url.ts", "../../../node_modules/@sentry/utils/src/severity.ts", "../../../node_modules/@sentry/utils/src/baggage.ts", "../../../node_modules/@sentry/utils/src/envelope.ts", "../../../node_modules/@sentry/utils/src/clientreport.ts", "../../../node_modules/@sentry/utils/src/ratelimit.ts", "../../../node_modules/@sentry/utils/src/buildPolyfills/_nullishCoalesce.ts", "../../../node_modules/@sentry/utils/src/buildPolyfills/_optionalChain.ts", "../../../node_modules/@sentry/utils/src/propagationContext.ts", "../../../node_modules/@sentry/utils/src/vendor/supportsHistory.ts", "../../../node_modules/@sentry/core/src/debug-build.ts", "../../../node_modules/@sentry/core/src/carrier.ts", "../../../node_modules/@sentry/core/src/session.ts", "../../../node_modules/@sentry/core/src/utils/spanOnScope.ts", "../../../node_modules/@sentry/core/src/scope.ts", "../../../node_modules/@sentry/core/src/defaultScopes.ts", "../../../node_modules/@sentry/core/src/asyncContext/stackStrategy.ts", "../../../node_modules/@sentry/core/src/asyncContext/index.ts", "../../../node_modules/@sentry/core/src/currentScopes.ts", "../../../node_modules/@sentry/core/src/metrics/metric-summary.ts", "../../../node_modules/@sentry/core/src/semanticAttributes.ts", "../../../node_modules/@sentry/core/src/tracing/spanstatus.ts", "../../../node_modules/@sentry/core/src/utils/spanUtils.ts", "../../../node_modules/@sentry/core/src/utils/hasTracingEnabled.ts", "../../../node_modules/@sentry/core/src/constants.ts", "../../../node_modules/@sentry/core/src/tracing/dynamicSamplingContext.ts", "../../../node_modules/@sentry/core/src/utils/parseSampleRate.ts", "../../../node_modules/@sentry/core/src/envelope.ts", "../../../node_modules/@sentry/core/src/eventProcessors.ts", "../../../node_modules/@sentry/core/src/utils/applyScopeDataToEvent.ts", "../../../node_modules/@sentry/core/src/utils/prepareEvent.ts", "../../../node_modules/@sentry/core/src/exports.ts", "../../../node_modules/@sentry/core/src/api.ts", "../../../node_modules/@sentry/core/src/integration.ts", "../../../node_modules/@sentry/core/src/baseclient.ts", "../../../node_modules/@sentry/core/src/sdk.ts", "../../../node_modules/@sentry/core/src/transports/base.ts", "../../../node_modules/@sentry/core/src/utils/isSentryRequestUrl.ts", "../../../node_modules/@sentry/core/src/utils/sdkMetadata.ts", "../../../node_modules/@sentry/core/src/breadcrumbs.ts", "../../../node_modules/@sentry/core/src/integrations/functiontostring.ts", "../../../node_modules/@sentry/core/src/integrations/inboundfilters.ts", "../../../node_modules/@sentry/core/src/integrations/dedupe.ts", "../../../node_modules/@sentry/browser/src/helpers.ts", "../../../node_modules/@sentry/browser/src/debug-build.ts", "../../../node_modules/@sentry/browser/src/eventbuilder.ts", "../../../node_modules/@sentry/browser/src/userfeedback.ts", "../../../node_modules/@sentry/browser/src/client.ts", "../../../node_modules/@sentry-internal/browser-utils/src/debug-build.ts", "../../../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/bindReporter.ts", "../../../node_modules/@sentry-internal/browser-utils/src/types.ts", "../../../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/generateUniqueID.ts", "../../../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/getNavigationEntry.ts", "../../../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/getActivationStart.ts", "../../../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/initMetric.ts", "../../../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/observe.ts", "../../../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/onHidden.ts", "../../../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/runOnce.ts", "../../../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/getVisibilityWatcher.ts", "../../../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/whenActivated.ts", "../../../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/onFCP.ts", "../../../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/getCLS.ts", "../../../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/getFID.ts", "../../../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.ts", "../../../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/getINP.ts", "../../../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/getLCP.ts", "../../../node_modules/@sentry-internal/browser-utils/src/metrics/instrument.ts", "../../../node_modules/@sentry-internal/browser-utils/src/instrument/dom.ts", "../../../node_modules/@sentry-internal/browser-utils/src/instrument/history.ts", "../../../node_modules/@sentry-internal/browser-utils/src/getNativeImplementation.ts", "../../../node_modules/@sentry-internal/browser-utils/src/instrument/xhr.ts", "../../../node_modules/@sentry/browser/src/transports/fetch.ts", "../../../node_modules/@sentry/browser/src/stack-parsers.ts", "../../../node_modules/@sentry/browser/src/integrations/breadcrumbs.ts", "../../../node_modules/@sentry/browser/src/integrations/browserapierrors.ts", "../../../node_modules/@sentry/browser/src/integrations/globalhandlers.ts", "../../../node_modules/@sentry/browser/src/integrations/httpcontext.ts", "../../../node_modules/@sentry/browser/src/integrations/linkederrors.ts", "../../../node_modules/@sentry/browser/src/sdk.ts", "../../../node_modules/@sentry-internal/replay/src/constants.ts", "../../../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb-snapshot/es/rrweb-snapshot.js", "../../../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/utils.js", "../../../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/types/dist/rrweb-types.js", "../../../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/record/mutation.js", "../../../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/record/error-handler.js", "../../../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/record/observer.js", "../../../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/record/cross-origin-iframe-mirror.js", "../../../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/record/iframe-manager.js", "../../../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/record/shadow-dom-manager.js", "../../../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas-manager.js", "../../../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/record/stylesheet-manager.js", "../../../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/record/processed-node-manager.js", "../../../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/record/index.js", "../../../node_modules/@sentry-internal/replay/src/debug-build.ts", "../../../node_modules/@sentry-internal/replay/src/util/logger.ts", "../../../node_modules/@sentry-internal/replay/src/types/rrweb.ts", "../../../node_modules/@sentry-internal/replay/src/util/timestamp.ts", "../../../node_modules/@sentry-internal/replay/src/coreHandlers/util/addBreadcrumbEvent.ts", "../../../node_modules/@sentry-internal/replay/src/coreHandlers/util/domUtils.ts", "../../../node_modules/@sentry-internal/replay/src/coreHandlers/util/onWindowOpen.ts", "../../../node_modules/@sentry-internal/replay/src/coreHandlers/handleClick.ts", "../../../node_modules/@sentry-internal/replay/src/util/createBreadcrumb.ts", "../../../node_modules/node_modules/@sentry-internal/rrweb-snapshot/es/rrweb-snapshot.js", "../../../node_modules/@sentry-internal/replay/src/coreHandlers/util/getAttributesToRecord.ts", "../../../node_modules/@sentry-internal/replay/src/coreHandlers/handleDom.ts", "../../../node_modules/@sentry-internal/replay/src/coreHandlers/handleKeyboardEvent.ts", "../../../node_modules/@sentry-internal/replay/src/util/createPerformanceEntries.ts", "../../../node_modules/@sentry-internal/replay/src/coreHandlers/performanceObserver.ts", "../../../node_modules/@sentry-internal/replay-worker/build/esm/worker.ts", "../../../node_modules/@sentry-internal/replay-worker/build/esm/index.js", "../../../node_modules/@sentry-internal/replay/src/eventBuffer/error.ts", "../../../node_modules/@sentry-internal/replay/src/eventBuffer/EventBufferArray.ts", "../../../node_modules/@sentry-internal/replay/src/eventBuffer/WorkerHandler.ts", "../../../node_modules/@sentry-internal/replay/src/eventBuffer/EventBufferCompressionWorker.ts", "../../../node_modules/@sentry-internal/replay/src/eventBuffer/EventBufferProxy.ts", "../../../node_modules/@sentry-internal/replay/src/eventBuffer/index.ts", "../../../node_modules/@sentry-internal/replay/src/util/hasSessionStorage.ts", "../../../node_modules/@sentry-internal/replay/src/session/clearSession.ts", "../../../node_modules/@sentry-internal/replay/src/util/isSampled.ts", "../../../node_modules/@sentry-internal/replay/src/session/Session.ts", "../../../node_modules/@sentry-internal/replay/src/session/saveSession.ts", "../../../node_modules/@sentry-internal/replay/src/session/createSession.ts", "../../../node_modules/@sentry-internal/replay/src/session/fetchSession.ts", "../../../node_modules/@sentry-internal/replay/src/util/isExpired.ts", "../../../node_modules/@sentry-internal/replay/src/util/isSessionExpired.ts", "../../../node_modules/@sentry-internal/replay/src/session/shouldRefreshSession.ts", "../../../node_modules/@sentry-internal/replay/src/session/loadOrCreateSession.ts", "../../../node_modules/@sentry-internal/replay/src/util/addEvent.ts", "../../../node_modules/@sentry-internal/replay/src/util/eventUtils.ts", "../../../node_modules/@sentry-internal/replay/src/coreHandlers/handleAfterSendEvent.ts", "../../../node_modules/@sentry-internal/replay/src/coreHandlers/handleBeforeSendEvent.ts", "../../../node_modules/@sentry-internal/replay/src/coreHandlers/handleBreadcrumbs.ts", "../../../node_modules/@sentry-internal/replay/src/util/isRrwebError.ts", "../../../node_modules/@sentry-internal/replay/src/coreHandlers/util/addFeedbackBreadcrumb.ts", "../../../node_modules/@sentry-internal/replay/src/coreHandlers/util/shouldSampleForBufferEvent.ts", "../../../node_modules/@sentry-internal/replay/src/coreHandlers/handleGlobalEvent.ts", "../../../node_modules/@sentry-internal/replay/src/util/createPerformanceSpans.ts", "../../../node_modules/@sentry-internal/replay/src/coreHandlers/handleHistory.ts", "../../../node_modules/@sentry-internal/replay/src/util/shouldFilterRequest.ts", "../../../node_modules/@sentry-internal/replay/src/coreHandlers/util/addNetworkBreadcrumb.ts", "../../../node_modules/@sentry-internal/replay/src/coreHandlers/util/networkUtils.ts", "../../../node_modules/@sentry-internal/replay/src/coreHandlers/util/fetchUtils.ts", "../../../node_modules/@sentry-internal/replay/src/coreHandlers/util/xhrUtils.ts", "../../../node_modules/@sentry-internal/replay/src/coreHandlers/handleNetworkBreadcrumbs.ts", "../../../node_modules/@sentry-internal/replay/src/util/addGlobalListeners.ts", "../../../node_modules/@sentry-internal/replay/src/util/addMemoryEntry.ts", "../../../node_modules/@sentry-internal/replay/src/util/debounce.ts", "../../../node_modules/@sentry-internal/replay/src/util/handleRecordingEmit.ts", "../../../node_modules/@sentry-internal/replay/src/util/createReplayEnvelope.ts", "../../../node_modules/@sentry-internal/replay/src/util/prepareRecordingData.ts", "../../../node_modules/@sentry-internal/replay/src/util/prepareReplayEvent.ts", "../../../node_modules/@sentry-internal/replay/src/util/sendReplayRequest.ts", "../../../node_modules/@sentry-internal/replay/src/util/sendReplay.ts", "../../../node_modules/@sentry-internal/replay/src/util/throttle.ts", "../../../node_modules/@sentry-internal/replay/src/replay.ts", "../../../node_modules/@sentry-internal/replay/src/util/getPrivacyOptions.ts", "../../../node_modules/@sentry-internal/replay/src/util/maskAttribute.ts", "../../../node_modules/@sentry-internal/replay/src/integration.ts", "../../../node_modules/@sentry-internal/replay/src/util/getReplay.ts", "../../../node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/snakeize.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable_stream_source_element.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/fetch_requests.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/index.js", "../../../node_modules/@hotwired/stimulus/dist/stimulus.js", "../../../node_modules/stimulus-autocomplete/src/autocomplete.js", "../../../node_modules/@stimulus-components/dialog/dist/stimulus-dialog.mjs", "../../../node_modules/stimulus-textarea-autogrow/dist/stimulus-textarea-autogrow.mjs", "../../javascript/controllers/application.js", "../../javascript/controllers/admin/filter_controller.js", "../../javascript/controllers/admin/localized_attributes_controller.js", "../../javascript/controllers/analytics_controller.js", "../../javascript/controllers/autoplay_form_controller.js", "../../../node_modules/@rails/request.js/src/fetch_response.js", "../../../node_modules/@rails/request.js/src/request_interceptor.js", "../../../node_modules/@rails/request.js/src/lib/utils.js", "../../../node_modules/@rails/request.js/src/fetch_request.js", "../../../node_modules/@rails/request.js/src/verbs.js", "../../javascript/controllers/autoplay_toggler_controller.js", "../../javascript/controllers/b2b/enrollments_wizard_controller.js", "../../javascript/controllers/b2b/invitation_form_controller.js", "../../javascript/controllers/b2b/widgets_controller.js", "../../javascript/controllers/banner_controller.js", "../../javascript/controllers/carousel_controller.js", "../../javascript/controllers/chapter_controller.js", "../../javascript/controllers/chapters_search_controller.js", "../../javascript/controllers/chart_controller.js", "../../javascript/controllers/checkbox_select_all_controller.js", "../../javascript/controllers/checkout/payment_form_controller.js", "../../javascript/controllers/checkout/purchase_as_gift_controller.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/enums.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getWindow.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/applyStyles.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/getBasePlacement.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/math.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/userAgent.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/contains.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/within.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/expandToHashMap.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/arrow.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/getVariation.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/computeStyles.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/eventListeners.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/rectToClientRect.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/computeOffsets.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/detectOverflow.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/flip.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/hide.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/offset.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/getAltAxis.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/orderModifiers.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/debounce.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/format.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/validateModifiers.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/uniqueBy.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/utils/mergeByName.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/createPopper.js", "../../../node_modules/tippy.js/node_modules/@popperjs/core/lib/popper.js", "../../../node_modules/tippy.js/src/constants.ts", "../../../node_modules/tippy.js/src/utils.ts", "../../../node_modules/tippy.js/src/dom-utils.ts", "../../../node_modules/tippy.js/src/bindGlobalEventListeners.ts", "../../../node_modules/tippy.js/src/browser.ts", "../../../node_modules/tippy.js/src/validation.ts", "../../../node_modules/tippy.js/src/props.ts", "../../../node_modules/tippy.js/src/template.ts", "../../../node_modules/tippy.js/src/createTippy.ts", "../../../node_modules/tippy.js/src/index.ts", "../../../node_modules/tippy.js/src/addons/createSingleton.ts", "../../../node_modules/tippy.js/src/addons/delegate.ts", "../../../node_modules/tippy.js/src/plugins/animateFill.ts", "../../../node_modules/tippy.js/src/plugins/followCursor.ts", "../../../node_modules/tippy.js/src/plugins/inlinePositioning.ts", "../../../node_modules/tippy.js/src/plugins/sticky.ts", "../../../node_modules/tippy.js/build/base.js", "../../javascript/controllers/clipboard_controller.js", "../../javascript/controllers/cloak_controller.js", "../../javascript/controllers/collapse_controller.js", "../../javascript/controllers/combo_box_controller.js", "../../javascript/controllers/company/available_seats_form_controller.js", "../../javascript/controllers/countdown_timer_controller.js", "../../javascript/controllers/counter_controller.js", "../../javascript/controllers/courses/filter_controller.js", "../../javascript/controllers/dialog_controller.js", "../../../node_modules/flatpickr/dist/esm/types/options.js", "../../../node_modules/flatpickr/dist/esm/l10n/default.js", "../../../node_modules/flatpickr/dist/esm/utils/index.js", "../../../node_modules/flatpickr/dist/esm/utils/dom.js", "../../../node_modules/flatpickr/dist/esm/utils/formatting.js", "../../../node_modules/flatpickr/dist/esm/utils/dates.js", "../../../node_modules/flatpickr/dist/esm/utils/polyfills.js", "../../../node_modules/flatpickr/dist/esm/index.js", "../../javascript/controllers/flatpickr_controller.js", "../../javascript/plugins/flatpickr-predefined-ranges.js", "../../javascript/controllers/form_submission_controller.js", "../../javascript/controllers/glightbox_controller.js", "../../javascript/controllers/global_search_controller.js", "../../javascript/controllers/gopay_controller.js", "../../javascript/controllers/headroom_controller.js", "../../javascript/controllers/image_attachments_controller.js", "../../javascript/controllers/index_table_controller.js", "../../javascript/controllers/invite_users_controller.js", "../../javascript/controllers/items_filter_controller.js", "../../javascript/controllers/nested_field_controller.js", "../../javascript/controllers/nested_fields_controller.js", "../../javascript/controllers/notifications_controller.js", "../../javascript/controllers/other_field_controller.js", "../../javascript/controllers/parallax_controller.js", "../../../node_modules/gsap/gsap-core.js", "../../../node_modules/gsap/CSSPlugin.js", "../../../node_modules/gsap/index.js", "../../javascript/controllers/price_field_controller.js", "../../javascript/controllers/product_row_controller.js", "../../javascript/controllers/range_input_controller.js", "../../../node_modules/@stimulus-components/read-more/dist/stimulus-read-more.mjs", "../../javascript/controllers/read_more_controller.js", "../../javascript/controllers/scroll_into_view_controller.js", "../../javascript/controllers/scroll_to_bottom_controller.js", "../../javascript/controllers/search_in_controller.js", "../../javascript/controllers/service_worker_controller.js", "../../javascript/controllers/services/finstat_controller.js", "../../javascript/controllers/show_more_controller.js", "../../../node_modules/sortablejs/modular/sortable.esm.js", "../../javascript/controllers/sortable_controller.js", "../../javascript/controllers/stop_enter_controller.js", "../../javascript/controllers/student/chapter_navigation_controller.js", "../../javascript/controllers/student/chapters_filter_controller.js", "../../javascript/controllers/tab_section_controller.js", "../../javascript/controllers/teacher/course_prices_controller.js", "../../javascript/controllers/teacher/courses_controller.js", "../../javascript/controllers/teacher_channel/course_attachment_controller.js", "../../javascript/controllers/timeout_redirect_controller.js", "../../javascript/controllers/tippy_controller.js", "../../javascript/controllers/turbo_modal_controller.js", "../../javascript/controllers/turbo_stream_controller.js", "../../javascript/controllers/video_uploads_controller.js", "../../javascript/plugins/uppy-vimeo-plugin.js", "../../../node_modules/video.js/dist/video.es.js", "../../../node_modules/@babel/runtime/helpers/esm/extends.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/resolve-url.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/stream.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js", "../../../node_modules/video.js/node_modules/m3u8-parser/dist/m3u8-parser.es.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/codecs.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/media-types.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/byte-helpers.js", "../../../node_modules/video.js/node_modules/mpd-parser/node_modules/@videojs/vhs-utils/es/resolve-url.js", "../../../node_modules/video.js/node_modules/mpd-parser/dist/mpd-parser.es.js", "../../../node_modules/video.js/node_modules/mpd-parser/node_modules/@videojs/vhs-utils/es/media-groups.js", "../../../node_modules/video.js/node_modules/mpd-parser/node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/id3-helpers.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/opus-helpers.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/mp4-helpers.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/ebml-helpers.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/nal-helpers.js", "../../../node_modules/video.js/node_modules/@videojs/vhs-utils/es/containers.js", "../../../node_modules/@videojs/http-streaming/dist/videojs-http-streaming.es.js", "../../../node_modules/@videojs/vhs-utils/es/resolve-url.js", "../../../node_modules/@videojs/vhs-utils/es/codecs.js", "../../../node_modules/@videojs/vhs-utils/es/media-types.js", "../../../node_modules/@videojs/vhs-utils/es/byte-helpers.js", "../../../node_modules/@videojs/http-streaming/node_modules/mpd-parser/dist/mpd-parser.es.js", "../../../node_modules/@videojs/vhs-utils/es/media-groups.js", "../../../node_modules/@videojs/vhs-utils/es/decode-b64-to-uint8-array.js", "../../../node_modules/@videojs/vhs-utils/es/id3-helpers.js", "../../../node_modules/@videojs/vhs-utils/es/opus-helpers.js", "../../../node_modules/@videojs/vhs-utils/es/mp4-helpers.js", "../../../node_modules/@videojs/vhs-utils/es/ebml-helpers.js", "../../../node_modules/@videojs/vhs-utils/es/nal-helpers.js", "../../../node_modules/@videojs/vhs-utils/es/containers.js", "../../javascript/controllers/videojs_player_controller.js", "../../../node_modules/@vimeo/player/dist/player.es.js", "../../javascript/controllers/vimeo_player_controller.js", "../../javascript/controllers/vimeo_upload_controller.js", "../../javascript/controllers/index.js", "../../../node_modules/animejs/lib/anime.es.js", "../../../node_modules/alpinejs/dist/module.esm.js", "../../../node_modules/@alpinejs/intersect/dist/module.esm.js", "../../../node_modules/@alpinejs/persist/dist/module.esm.js", "../../../node_modules/@alpinejs/focus/dist/module.esm.js", "../../../node_modules/@alpinejs/collapse/dist/module.esm.js", "../../../node_modules/@ryangjchandler/alpine-clipboard/src/index.js", "../../../node_modules/trix/src/trix/config/attachments.js", "../../../node_modules/trix/src/trix/config/block_attributes.js", "../../../node_modules/trix/src/trix/config/browser.js", "../../../node_modules/trix/src/trix/config/lang.js", "../../../node_modules/trix/src/trix/config/file_size_formatting.js", "../../../node_modules/trix/src/trix/constants.js", "../../../node_modules/trix/src/trix/core/helpers/extend.js", "../../../node_modules/trix/src/trix/core/helpers/dom.js", "../../../node_modules/trix/src/trix/config/input.js", "../../../node_modules/trix/src/trix/config/key_names.js", "../../../node_modules/trix/src/trix/config/parser.js", "../../../node_modules/trix/src/trix/config/text_attributes.js", "../../../node_modules/trix/src/trix/config/toolbar.js", "../../../node_modules/trix/src/trix/config/undo.js", "../../../node_modules/trix/src/trix/config/css.js", "../../../node_modules/trix/src/trix/core/basic_object.js", "../../../node_modules/trix/src/trix/core/utilities/utf16_string.js", "../../../node_modules/trix/src/trix/core/object.js", "../../../node_modules/trix/src/trix/core/helpers/arrays.js", "../../../node_modules/trix/src/trix/core/helpers/bidi.js", "../../../node_modules/trix/src/trix/core/helpers/config.js", "../../../node_modules/trix/src/trix/core/helpers/custom_elements.js", "../../../node_modules/trix/src/trix/core/helpers/events.js", "../../../node_modules/trix/src/trix/core/helpers/functions.js", "../../../node_modules/trix/src/trix/core/helpers/objects.js", "../../../node_modules/trix/src/trix/core/helpers/ranges.js", "../../../node_modules/trix/src/trix/observers/selection_change_observer.js", "../../../node_modules/trix/src/trix/core/helpers/strings.js", "../../../node_modules/trix/src/trix/core/collections/hash.js", "../../../node_modules/trix/src/trix/core/collections/object_group.js", "../../../node_modules/trix/src/trix/core/collections/object_map.js", "../../../node_modules/trix/src/trix/core/collections/element_store.js", "../../../node_modules/trix/src/trix/core/utilities/operation.js", "../../../node_modules/trix/src/trix/views/object_view.js", "../../../node_modules/trix/src/trix/models/html_sanitizer.js", "../../../node_modules/trix/src/trix/views/attachment_view.js", "../../../node_modules/trix/src/trix/views/previewable_attachment_view.js", "../../../node_modules/trix/src/trix/views/piece_view.js", "../../../node_modules/trix/src/trix/views/text_view.js", "../../../node_modules/trix/src/trix/views/block_view.js", "../../../node_modules/trix/src/trix/views/document_view.js", "../../../node_modules/trix/src/trix/models/piece.js", "../../../node_modules/trix/src/trix/operations/image_preload_operation.js", "../../../node_modules/trix/src/trix/models/attachment.js", "../../../node_modules/trix/src/trix/models/attachment_piece.js", "../../../node_modules/trix/src/trix/models/string_piece.js", "../../../node_modules/trix/src/trix/models/splittable_list.js", "../../../node_modules/trix/src/trix/models/text.js", "../../../node_modules/trix/src/trix/models/block.js", "../../../node_modules/trix/src/trix/models/document.js", "../../../node_modules/trix/src/trix/models/html_parser.js", "../../../node_modules/trix/src/trix/core/serialization.js", "../../../node_modules/trix/src/trix/models/managed_attachment.js", "../../../node_modules/trix/src/trix/models/attachment_manager.js", "../../../node_modules/trix/src/trix/models/line_break_insertion.js", "../../../node_modules/trix/src/trix/models/composition.js", "../../../node_modules/trix/src/trix/models/undo_manager.js", "../../../node_modules/trix/src/trix/filters/filter.js", "../../../node_modules/trix/src/trix/filters/attachment_gallery_filter.js", "../../../node_modules/trix/src/trix/models/editor.js", "../../../node_modules/trix/src/trix/models/location_mapper.js", "../../../node_modules/trix/src/trix/models/point_mapper.js", "../../../node_modules/trix/src/trix/models/selection_manager.js", "../../../node_modules/trix/src/trix/controllers/attachment_editor_controller.js", "../../../node_modules/trix/src/trix/controllers/composition_controller.js", "../../../node_modules/trix/src/trix/controllers/controller.js", "../../../node_modules/trix/src/trix/observers/mutation_observer.js", "../../../node_modules/trix/src/trix/operations/file_verification_operation.js", "../../../node_modules/trix/src/trix/models/flaky_android_keyboard_detector.js", "../../../node_modules/trix/src/trix/controllers/input_controller.js", "../../../node_modules/trix/src/trix/controllers/level_0_input_controller.js", "../../../node_modules/trix/src/trix/controllers/level_2_input_controller.js", "../../../node_modules/trix/src/trix/controllers/toolbar_controller.js", "../../../node_modules/trix/src/trix/controllers/editor_controller.js", "../../../node_modules/trix/src/trix/elements/trix_toolbar_element.js", "../../../node_modules/trix/src/trix/elements/trix_editor_element.js", "../../../node_modules/trix/src/trix/trix.js"], "sourcesContent": ["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Flowbite\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Flowbite\"] = factory();\n\telse\n\t\troot[\"Flowbite\"] = factory();\n})(self, function() {\nreturn ", "export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];", "export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}", "export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}", "import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };", "import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};", "import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}", "export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;", "export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}", "import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}", "import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}", "import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}", "import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}", "import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}", "import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}", "import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}", "export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}", "import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}", "export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}", "import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}", "export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}", "import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};", "export default function getVariation(placement) {\n return placement.split('-')[1];\n}", "import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};", "import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};", "var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}", "var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}", "import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}", "import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}", "import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}", "import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}", "import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}", "export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}", "import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}", "import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}", "import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}", "import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}", "import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases \u2013 research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};", "import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};", "import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};", "import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};", "export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}", "import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};", "export { default as applyStyles } from \"./applyStyles.js\";\nexport { default as arrow } from \"./arrow.js\";\nexport { default as computeStyles } from \"./computeStyles.js\";\nexport { default as eventListeners } from \"./eventListeners.js\";\nexport { default as flip } from \"./flip.js\";\nexport { default as hide } from \"./hide.js\";\nexport { default as offset } from \"./offset.js\";\nexport { default as popperOffsets } from \"./popperOffsets.js\";\nexport { default as preventOverflow } from \"./preventOverflow.js\";", "export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}", "import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}", "export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}", "export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}", "import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update \u2013 it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update \u2013 it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };", "import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";", "import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };", "export * from \"./enums.js\";\nexport * from \"./modifiers/index.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { popperGenerator, detectOverflow, createPopper as createPopperBase } from \"./createPopper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper } from \"./popper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\";", "'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n}\nfunction _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n}\nfunction _arrayWithoutHoles(r) {\n if (Array.isArray(r)) return _arrayLikeToArray(r);\n}\nfunction _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nfunction _callSuper(t, o, e) {\n return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e));\n}\nfunction _classCallCheck(a, n) {\n if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n}\nfunction _defineProperties(e, r) {\n for (var t = 0; t < r.length; t++) {\n var o = r[t];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);\n }\n}\nfunction _createClass(e, r, t) {\n return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n writable: !1\n }), e;\n}\nfunction _get() {\n return _get = \"undefined\" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) {\n var p = _superPropBase(e, t);\n if (p) {\n var n = Object.getOwnPropertyDescriptor(p, t);\n return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value;\n }\n }, _get.apply(null, arguments);\n}\nfunction _getPrototypeOf(t) {\n return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {\n return t.__proto__ || Object.getPrototypeOf(t);\n }, _getPrototypeOf(t);\n}\nfunction _inherits(t, e) {\n if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n t.prototype = Object.create(e && e.prototype, {\n constructor: {\n value: t,\n writable: !0,\n configurable: !0\n }\n }), Object.defineProperty(t, \"prototype\", {\n writable: !1\n }), e && _setPrototypeOf(t, e);\n}\nfunction _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function () {\n return !!t;\n })();\n}\nfunction _iterableToArray(r) {\n if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n}\nfunction _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\nfunction _possibleConstructorReturn(t, e) {\n if (e && (\"object\" == typeof e || \"function\" == typeof e)) return e;\n if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");\n return _assertThisInitialized(t);\n}\nfunction _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nfunction _slicedToArray(r, e) {\n return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\n}\nfunction _superPropBase(t, o) {\n for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t)););\n return t;\n}\nfunction _toConsumableArray(r) {\n return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();\n}\nfunction _toPrimitive(t, r) {\n if (\"object\" != typeof t || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != typeof i) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nfunction _toPropertyKey(t) {\n var i = _toPrimitive(t, \"string\");\n return \"symbol\" == typeof i ? i : i + \"\";\n}\nfunction _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nfunction _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n }\n}\n\nfunction hasProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\nfunction lastItemOf(arr) {\n return arr[arr.length - 1];\n}\n\n// push only the items not included in the array\nfunction pushUnique(arr) {\n for (var _len = arguments.length, items = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n items[_key - 1] = arguments[_key];\n }\n items.forEach(function (item) {\n if (arr.includes(item)) {\n return;\n }\n arr.push(item);\n });\n return arr;\n}\nfunction stringToArray(str, separator) {\n // convert empty string to an empty array\n return str ? str.split(separator) : [];\n}\nfunction isInRange(testVal, min, max) {\n var minOK = min === undefined || testVal >= min;\n var maxOK = max === undefined || testVal <= max;\n return minOK && maxOK;\n}\nfunction limitToRange(val, min, max) {\n if (val < min) {\n return min;\n }\n if (val > max) {\n return max;\n }\n return val;\n}\nfunction createTagRepeat(tagName, repeat) {\n var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var html = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '';\n var openTagSrc = Object.keys(attributes).reduce(function (src, attr) {\n var val = attributes[attr];\n if (typeof val === 'function') {\n val = val(index);\n }\n return \"\".concat(src, \" \").concat(attr, \"=\\\"\").concat(val, \"\\\"\");\n }, tagName);\n html += \"<\".concat(openTagSrc, \">\");\n var next = index + 1;\n return next < repeat ? createTagRepeat(tagName, repeat, attributes, next, html) : html;\n}\n\n// Remove the spacing surrounding tags for HTML parser not to create text nodes\n// before/after elements\nfunction optimizeTemplateHTML(html) {\n return html.replace(/>\\s+/g, '>').replace(/\\s+ 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var baseDay = new Date(baseDate).getDay();\n return addDays(baseDate, dayDiff(dayOfWeek, weekStart) - dayDiff(baseDay, weekStart));\n}\n\n// Get the ISO week of a date\nfunction getWeek(date) {\n // start of ISO week is Monday\n var thuOfTheWeek = dayOfTheWeekOf(date, 4, 1);\n // 1st week == the week where the 4th of January is in\n var firstThu = dayOfTheWeekOf(new Date(thuOfTheWeek).setMonth(0, 4), 4, 1);\n return Math.round((thuOfTheWeek - firstThu) / 604800000) + 1;\n}\n\n// Get the start year of the period of years that includes given date\n// years: length of the year period\nfunction startOfYearPeriod(date, years) {\n /* @see https://en.wikipedia.org/wiki/Year_zero#ISO_8601 */\n var year = new Date(date).getFullYear();\n return Math.floor(year / years) * years;\n}\n\n// pattern for format parts\nvar reFormatTokens = /dd?|DD?|mm?|MM?|yy?(?:yy)?/;\n// pattern for non date parts\nvar reNonDateParts = /[\\s!-/:-@[-`{-~\u5E74\u6708\u65E5]+/;\n// cache for persed formats\nvar knownFormats = {};\n// parse funtions for date parts\nvar parseFns = {\n y: function y(date, year) {\n return new Date(date).setFullYear(parseInt(year, 10));\n },\n m: function m(date, month, locale) {\n var newDate = new Date(date);\n var monthIndex = parseInt(month, 10) - 1;\n if (isNaN(monthIndex)) {\n if (!month) {\n return NaN;\n }\n var monthName = month.toLowerCase();\n var compareNames = function compareNames(name) {\n return name.toLowerCase().startsWith(monthName);\n };\n // compare with both short and full names because some locales have periods\n // in the short names (not equal to the first X letters of the full names)\n monthIndex = locale.monthsShort.findIndex(compareNames);\n if (monthIndex < 0) {\n monthIndex = locale.months.findIndex(compareNames);\n }\n if (monthIndex < 0) {\n return NaN;\n }\n }\n newDate.setMonth(monthIndex);\n return newDate.getMonth() !== normalizeMonth(monthIndex) ? newDate.setDate(0) : newDate.getTime();\n },\n d: function d(date, day) {\n return new Date(date).setDate(parseInt(day, 10));\n }\n};\n// format functions for date parts\nvar formatFns = {\n d: function d(date) {\n return date.getDate();\n },\n dd: function dd(date) {\n return padZero(date.getDate(), 2);\n },\n D: function D(date, locale) {\n return locale.daysShort[date.getDay()];\n },\n DD: function DD(date, locale) {\n return locale.days[date.getDay()];\n },\n m: function m(date) {\n return date.getMonth() + 1;\n },\n mm: function mm(date) {\n return padZero(date.getMonth() + 1, 2);\n },\n M: function M(date, locale) {\n return locale.monthsShort[date.getMonth()];\n },\n MM: function MM(date, locale) {\n return locale.months[date.getMonth()];\n },\n y: function y(date) {\n return date.getFullYear();\n },\n yy: function yy(date) {\n return padZero(date.getFullYear(), 2).slice(-2);\n },\n yyyy: function yyyy(date) {\n return padZero(date.getFullYear(), 4);\n }\n};\n\n// get month index in normal range (0 - 11) from any number\nfunction normalizeMonth(monthIndex) {\n return monthIndex > -1 ? monthIndex % 12 : normalizeMonth(monthIndex + 12);\n}\nfunction padZero(num, length) {\n return num.toString().padStart(length, '0');\n}\nfunction parseFormatString(format) {\n if (typeof format !== 'string') {\n throw new Error(\"Invalid date format.\");\n }\n if (format in knownFormats) {\n return knownFormats[format];\n }\n\n // sprit the format string into parts and seprators\n var separators = format.split(reFormatTokens);\n var parts = format.match(new RegExp(reFormatTokens, 'g'));\n if (separators.length === 0 || !parts) {\n throw new Error(\"Invalid date format.\");\n }\n\n // collect format functions used in the format\n var partFormatters = parts.map(function (token) {\n return formatFns[token];\n });\n\n // collect parse function keys used in the format\n // iterate over parseFns' keys in order to keep the order of the keys.\n var partParserKeys = Object.keys(parseFns).reduce(function (keys, key) {\n var token = parts.find(function (part) {\n return part[0] !== 'D' && part[0].toLowerCase() === key;\n });\n if (token) {\n keys.push(key);\n }\n return keys;\n }, []);\n return knownFormats[format] = {\n parser: function parser(dateStr, locale) {\n var dateParts = dateStr.split(reNonDateParts).reduce(function (dtParts, part, index) {\n if (part.length > 0 && parts[index]) {\n var token = parts[index][0];\n if (token === 'M') {\n dtParts.m = part;\n } else if (token !== 'D') {\n dtParts[token] = part;\n }\n }\n return dtParts;\n }, {});\n\n // iterate over partParserkeys so that the parsing is made in the oder\n // of year, month and day to prevent the day parser from correcting last\n // day of month wrongly\n return partParserKeys.reduce(function (origDate, key) {\n var newDate = parseFns[key](origDate, dateParts[key], locale);\n // ingnore the part failed to parse\n return isNaN(newDate) ? origDate : newDate;\n }, today());\n },\n formatter: function formatter(date, locale) {\n var dateStr = partFormatters.reduce(function (str, fn, index) {\n return str += \"\".concat(separators[index]).concat(fn(date, locale));\n }, '');\n // separators' length is always parts' length + 1,\n return dateStr += lastItemOf(separators);\n }\n };\n}\nfunction parseDate(dateStr, format, locale) {\n if (dateStr instanceof Date || typeof dateStr === 'number') {\n var date = stripTime(dateStr);\n return isNaN(date) ? undefined : date;\n }\n if (!dateStr) {\n return undefined;\n }\n if (dateStr === 'today') {\n return today();\n }\n if (format && format.toValue) {\n var _date = format.toValue(dateStr, format, locale);\n return isNaN(_date) ? undefined : stripTime(_date);\n }\n return parseFormatString(format).parser(dateStr, locale);\n}\nfunction formatDate(date, format, locale) {\n if (isNaN(date) || !date && date !== 0) {\n return '';\n }\n var dateObj = typeof date === 'number' ? new Date(date) : date;\n if (format.toDisplay) {\n return format.toDisplay(dateObj, format, locale);\n }\n return parseFormatString(format).formatter(dateObj, locale);\n}\n\nvar listenerRegistry = new WeakMap();\nvar _EventTarget$prototyp = EventTarget.prototype,\n addEventListener = _EventTarget$prototyp.addEventListener,\n removeEventListener = _EventTarget$prototyp.removeEventListener;\n\n// Register event listeners to a key object\n// listeners: array of listener definitions;\n// - each definition must be a flat array of event target and the arguments\n// used to call addEventListener() on the target\nfunction registerListeners(keyObj, listeners) {\n var registered = listenerRegistry.get(keyObj);\n if (!registered) {\n registered = [];\n listenerRegistry.set(keyObj, registered);\n }\n listeners.forEach(function (listener) {\n addEventListener.call.apply(addEventListener, _toConsumableArray(listener));\n registered.push(listener);\n });\n}\nfunction unregisterListeners(keyObj) {\n var listeners = listenerRegistry.get(keyObj);\n if (!listeners) {\n return;\n }\n listeners.forEach(function (listener) {\n removeEventListener.call.apply(removeEventListener, _toConsumableArray(listener));\n });\n listenerRegistry[\"delete\"](keyObj);\n}\n\n// Event.composedPath() polyfill for Edge\n// based on https://gist.github.com/kleinfreund/e9787d73776c0e3750dcfcdc89f100ec\nif (!Event.prototype.composedPath) {\n var getComposedPath = function getComposedPath(node) {\n var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n path.push(node);\n var parent;\n if (node.parentNode) {\n parent = node.parentNode;\n } else if (node.host) {\n // ShadowRoot\n parent = node.host;\n } else if (node.defaultView) {\n // Document\n parent = node.defaultView;\n }\n return parent ? getComposedPath(parent, path) : path;\n };\n Event.prototype.composedPath = function () {\n return getComposedPath(this.target);\n };\n}\nfunction findFromPath(path, criteria, currentTarget) {\n var index = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var el = path[index];\n if (criteria(el)) {\n return el;\n } else if (el === currentTarget || !el.parentElement) {\n // stop when reaching currentTarget or \n return;\n }\n return findFromPath(path, criteria, currentTarget, index + 1);\n}\n\n// Search for the actual target of a delegated event\nfunction findElementInEventPath(ev, selector) {\n var criteria = typeof selector === 'function' ? selector : function (el) {\n return el.matches(selector);\n };\n return findFromPath(ev.composedPath(), criteria, ev.currentTarget);\n}\n\n// default locales\nvar locales = {\n en: {\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n daysShort: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n daysMin: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n monthsShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n today: \"Today\",\n clear: \"Clear\",\n titleFormat: \"MM y\"\n }\n};\n\n// config options updatable by setOptions() and their default values\nvar defaultOptions = {\n autohide: false,\n beforeShowDay: null,\n beforeShowDecade: null,\n beforeShowMonth: null,\n beforeShowYear: null,\n calendarWeeks: false,\n clearBtn: false,\n dateDelimiter: ',',\n datesDisabled: [],\n daysOfWeekDisabled: [],\n daysOfWeekHighlighted: [],\n defaultViewDate: undefined,\n // placeholder, defaults to today() by the program\n disableTouchKeyboard: false,\n format: 'mm/dd/yyyy',\n language: 'en',\n maxDate: null,\n maxNumberOfDates: 1,\n maxView: 3,\n minDate: null,\n nextArrow: '',\n orientation: 'auto',\n pickLevel: 0,\n prevArrow: '',\n showDaysOfWeek: true,\n showOnClick: true,\n showOnFocus: true,\n startView: 0,\n title: '',\n todayBtn: false,\n todayBtnMode: 0,\n todayHighlight: false,\n updateOnBlur: true,\n weekStart: 0\n};\n\nvar range = null;\nfunction parseHTML(html) {\n if (range == null) {\n range = document.createRange();\n }\n return range.createContextualFragment(html);\n}\nfunction hideElement(el) {\n if (el.style.display === 'none') {\n return;\n }\n // back up the existing display setting in data-style-display\n if (el.style.display) {\n el.dataset.styleDisplay = el.style.display;\n }\n el.style.display = 'none';\n}\nfunction showElement(el) {\n if (el.style.display !== 'none') {\n return;\n }\n if (el.dataset.styleDisplay) {\n // restore backed-up dispay property\n el.style.display = el.dataset.styleDisplay;\n delete el.dataset.styleDisplay;\n } else {\n el.style.display = '';\n }\n}\nfunction emptyChildNodes(el) {\n if (el.firstChild) {\n el.removeChild(el.firstChild);\n emptyChildNodes(el);\n }\n}\nfunction replaceChildNodes(el, newChildNodes) {\n emptyChildNodes(el);\n if (newChildNodes instanceof DocumentFragment) {\n el.appendChild(newChildNodes);\n } else if (typeof newChildNodes === 'string') {\n el.appendChild(parseHTML(newChildNodes));\n } else if (typeof newChildNodes.forEach === 'function') {\n newChildNodes.forEach(function (node) {\n el.appendChild(node);\n });\n }\n}\n\nvar defaultLang = defaultOptions.language,\n defaultFormat = defaultOptions.format,\n defaultWeekStart = defaultOptions.weekStart;\n\n// Reducer function to filter out invalid day-of-week from the input\nfunction sanitizeDOW(dow, day) {\n return dow.length < 6 && day >= 0 && day < 7 ? pushUnique(dow, day) : dow;\n}\nfunction calcEndOfWeek(startOfWeek) {\n return (startOfWeek + 6) % 7;\n}\n\n// validate input date. if invalid, fallback to the original value\nfunction validateDate(value, format, locale, origValue) {\n var date = parseDate(value, format, locale);\n return date !== undefined ? date : origValue;\n}\n\n// Validate viewId. if invalid, fallback to the original value\nfunction validateViewId(value, origValue) {\n var max = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;\n var viewId = parseInt(value, 10);\n return viewId >= 0 && viewId <= max ? viewId : origValue;\n}\n\n// Create Datepicker configuration to set\nfunction processOptions(options, datepicker) {\n var inOpts = Object.assign({}, options);\n var config = {};\n var locales = datepicker.constructor.locales;\n var _ref = datepicker.config || {},\n format = _ref.format,\n language = _ref.language,\n locale = _ref.locale,\n maxDate = _ref.maxDate,\n maxView = _ref.maxView,\n minDate = _ref.minDate,\n pickLevel = _ref.pickLevel,\n startView = _ref.startView,\n weekStart = _ref.weekStart;\n if (inOpts.language) {\n var lang;\n if (inOpts.language !== language) {\n if (locales[inOpts.language]) {\n lang = inOpts.language;\n } else {\n // Check if langauge + region tag can fallback to the one without\n // region (e.g. fr-CA \u2192 fr)\n lang = inOpts.language.split('-')[0];\n if (locales[lang] === undefined) {\n lang = false;\n }\n }\n }\n delete inOpts.language;\n if (lang) {\n language = config.language = lang;\n\n // update locale as well when updating language\n var origLocale = locale || locales[defaultLang];\n // use default language's properties for the fallback\n locale = Object.assign({\n format: defaultFormat,\n weekStart: defaultWeekStart\n }, locales[defaultLang]);\n if (language !== defaultLang) {\n Object.assign(locale, locales[language]);\n }\n config.locale = locale;\n // if format and/or weekStart are the same as old locale's defaults,\n // update them to new locale's defaults\n if (format === origLocale.format) {\n format = config.format = locale.format;\n }\n if (weekStart === origLocale.weekStart) {\n weekStart = config.weekStart = locale.weekStart;\n config.weekEnd = calcEndOfWeek(locale.weekStart);\n }\n }\n }\n if (inOpts.format) {\n var hasToDisplay = typeof inOpts.format.toDisplay === 'function';\n var hasToValue = typeof inOpts.format.toValue === 'function';\n var validFormatString = reFormatTokens.test(inOpts.format);\n if (hasToDisplay && hasToValue || validFormatString) {\n format = config.format = inOpts.format;\n }\n delete inOpts.format;\n }\n\n //*** dates ***//\n // while min and maxDate for \"no limit\" in the options are better to be null\n // (especially when updating), the ones in the config have to be undefined\n // because null is treated as 0 (= unix epoch) when comparing with time value\n var minDt = minDate;\n var maxDt = maxDate;\n if (inOpts.minDate !== undefined) {\n minDt = inOpts.minDate === null ? dateValue(0, 0, 1) // set 0000-01-01 to prevent negative values for year\n : validateDate(inOpts.minDate, format, locale, minDt);\n delete inOpts.minDate;\n }\n if (inOpts.maxDate !== undefined) {\n maxDt = inOpts.maxDate === null ? undefined : validateDate(inOpts.maxDate, format, locale, maxDt);\n delete inOpts.maxDate;\n }\n if (maxDt < minDt) {\n minDate = config.minDate = maxDt;\n maxDate = config.maxDate = minDt;\n } else {\n if (minDate !== minDt) {\n minDate = config.minDate = minDt;\n }\n if (maxDate !== maxDt) {\n maxDate = config.maxDate = maxDt;\n }\n }\n if (inOpts.datesDisabled) {\n config.datesDisabled = inOpts.datesDisabled.reduce(function (dates, dt) {\n var date = parseDate(dt, format, locale);\n return date !== undefined ? pushUnique(dates, date) : dates;\n }, []);\n delete inOpts.datesDisabled;\n }\n if (inOpts.defaultViewDate !== undefined) {\n var viewDate = parseDate(inOpts.defaultViewDate, format, locale);\n if (viewDate !== undefined) {\n config.defaultViewDate = viewDate;\n }\n delete inOpts.defaultViewDate;\n }\n\n //*** days of week ***//\n if (inOpts.weekStart !== undefined) {\n var wkStart = Number(inOpts.weekStart) % 7;\n if (!isNaN(wkStart)) {\n weekStart = config.weekStart = wkStart;\n config.weekEnd = calcEndOfWeek(wkStart);\n }\n delete inOpts.weekStart;\n }\n if (inOpts.daysOfWeekDisabled) {\n config.daysOfWeekDisabled = inOpts.daysOfWeekDisabled.reduce(sanitizeDOW, []);\n delete inOpts.daysOfWeekDisabled;\n }\n if (inOpts.daysOfWeekHighlighted) {\n config.daysOfWeekHighlighted = inOpts.daysOfWeekHighlighted.reduce(sanitizeDOW, []);\n delete inOpts.daysOfWeekHighlighted;\n }\n\n //*** multi date ***//\n if (inOpts.maxNumberOfDates !== undefined) {\n var maxNumberOfDates = parseInt(inOpts.maxNumberOfDates, 10);\n if (maxNumberOfDates >= 0) {\n config.maxNumberOfDates = maxNumberOfDates;\n config.multidate = maxNumberOfDates !== 1;\n }\n delete inOpts.maxNumberOfDates;\n }\n if (inOpts.dateDelimiter) {\n config.dateDelimiter = String(inOpts.dateDelimiter);\n delete inOpts.dateDelimiter;\n }\n\n //*** pick level & view ***//\n var newPickLevel = pickLevel;\n if (inOpts.pickLevel !== undefined) {\n newPickLevel = validateViewId(inOpts.pickLevel, 2);\n delete inOpts.pickLevel;\n }\n if (newPickLevel !== pickLevel) {\n pickLevel = config.pickLevel = newPickLevel;\n }\n var newMaxView = maxView;\n if (inOpts.maxView !== undefined) {\n newMaxView = validateViewId(inOpts.maxView, maxView);\n delete inOpts.maxView;\n }\n // ensure max view >= pick level\n newMaxView = pickLevel > newMaxView ? pickLevel : newMaxView;\n if (newMaxView !== maxView) {\n maxView = config.maxView = newMaxView;\n }\n var newStartView = startView;\n if (inOpts.startView !== undefined) {\n newStartView = validateViewId(inOpts.startView, newStartView);\n delete inOpts.startView;\n }\n // ensure pick level <= start view <= max view\n if (newStartView < pickLevel) {\n newStartView = pickLevel;\n } else if (newStartView > maxView) {\n newStartView = maxView;\n }\n if (newStartView !== startView) {\n config.startView = newStartView;\n }\n\n //*** template ***//\n if (inOpts.prevArrow) {\n var prevArrow = parseHTML(inOpts.prevArrow);\n if (prevArrow.childNodes.length > 0) {\n config.prevArrow = prevArrow.childNodes;\n }\n delete inOpts.prevArrow;\n }\n if (inOpts.nextArrow) {\n var nextArrow = parseHTML(inOpts.nextArrow);\n if (nextArrow.childNodes.length > 0) {\n config.nextArrow = nextArrow.childNodes;\n }\n delete inOpts.nextArrow;\n }\n\n //*** misc ***//\n if (inOpts.disableTouchKeyboard !== undefined) {\n config.disableTouchKeyboard = 'ontouchstart' in document && !!inOpts.disableTouchKeyboard;\n delete inOpts.disableTouchKeyboard;\n }\n if (inOpts.orientation) {\n var orientation = inOpts.orientation.toLowerCase().split(/\\s+/g);\n config.orientation = {\n x: orientation.find(function (x) {\n return x === 'left' || x === 'right';\n }) || 'auto',\n y: orientation.find(function (y) {\n return y === 'top' || y === 'bottom';\n }) || 'auto'\n };\n delete inOpts.orientation;\n }\n if (inOpts.todayBtnMode !== undefined) {\n switch (inOpts.todayBtnMode) {\n case 0:\n case 1:\n config.todayBtnMode = inOpts.todayBtnMode;\n }\n delete inOpts.todayBtnMode;\n }\n\n //*** copy the rest ***//\n Object.keys(inOpts).forEach(function (key) {\n if (inOpts[key] !== undefined && hasProperty(defaultOptions, key)) {\n config[key] = inOpts[key];\n }\n });\n return config;\n}\n\nvar pickerTemplate = optimizeTemplateHTML(\"
\\n
\\n
\\n
\\n
\\n \\n \\n \\n
\\n
\\n
\\n
\\n
\\n \\n \\n
\\n
\\n
\\n
\");\n\nvar daysTemplate = optimizeTemplateHTML(\"
\\n
\".concat(createTagRepeat('span', 7, {\n \"class\": 'dow block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'\n}), \"
\\n
\").concat(createTagRepeat('span', 42, {\n \"class\": 'block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400'\n}), \"
\\n
\"));\n\nvar calendarWeeksTemplate = optimizeTemplateHTML(\"
\\n
\\n
\".concat(createTagRepeat('span', 6, {\n \"class\": 'week block flex-1 leading-9 border-0 rounded-lg cursor-default text-center text-gray-900 font-semibold text-sm'\n}), \"
\\n
\"));\n\n// Base class of the view classes\nvar View = /*#__PURE__*/function () {\n function View(picker, config) {\n _classCallCheck(this, View);\n Object.assign(this, config, {\n picker: picker,\n element: parseHTML(\"
\").firstChild,\n selected: []\n });\n this.init(this.picker.datepicker.config);\n }\n return _createClass(View, [{\n key: \"init\",\n value: function init(options) {\n if (options.pickLevel !== undefined) {\n this.isMinView = this.id === options.pickLevel;\n }\n this.setOptions(options);\n this.updateFocus();\n this.updateSelection();\n }\n\n // Execute beforeShow() callback and apply the result to the element\n // args:\n // - current - current value on the iteration on view rendering\n // - timeValue - time value of the date to pass to beforeShow()\n }, {\n key: \"performBeforeHook\",\n value: function performBeforeHook(el, current, timeValue) {\n var result = this.beforeShow(new Date(timeValue));\n switch (_typeof(result)) {\n case 'boolean':\n result = {\n enabled: result\n };\n break;\n case 'string':\n result = {\n classes: result\n };\n }\n if (result) {\n if (result.enabled === false) {\n el.classList.add('disabled');\n pushUnique(this.disabled, current);\n }\n if (result.classes) {\n var _el$classList;\n var extraClasses = result.classes.split(/\\s+/);\n (_el$classList = el.classList).add.apply(_el$classList, _toConsumableArray(extraClasses));\n if (extraClasses.includes('disabled')) {\n pushUnique(this.disabled, current);\n }\n }\n if (result.content) {\n replaceChildNodes(el, result.content);\n }\n }\n }\n }]);\n}();\n\nvar DaysView = /*#__PURE__*/function (_View) {\n function DaysView(picker) {\n _classCallCheck(this, DaysView);\n return _callSuper(this, DaysView, [picker, {\n id: 0,\n name: 'days',\n cellClass: 'day'\n }]);\n }\n _inherits(DaysView, _View);\n return _createClass(DaysView, [{\n key: \"init\",\n value: function init(options) {\n var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (onConstruction) {\n var inner = parseHTML(daysTemplate).firstChild;\n this.dow = inner.firstChild;\n this.grid = inner.lastChild;\n this.element.appendChild(inner);\n }\n _get(_getPrototypeOf(DaysView.prototype), \"init\", this).call(this, options);\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n var _this = this;\n var updateDOW;\n if (hasProperty(options, 'minDate')) {\n this.minDate = options.minDate;\n }\n if (hasProperty(options, 'maxDate')) {\n this.maxDate = options.maxDate;\n }\n if (options.datesDisabled) {\n this.datesDisabled = options.datesDisabled;\n }\n if (options.daysOfWeekDisabled) {\n this.daysOfWeekDisabled = options.daysOfWeekDisabled;\n updateDOW = true;\n }\n if (options.daysOfWeekHighlighted) {\n this.daysOfWeekHighlighted = options.daysOfWeekHighlighted;\n }\n if (options.todayHighlight !== undefined) {\n this.todayHighlight = options.todayHighlight;\n }\n if (options.weekStart !== undefined) {\n this.weekStart = options.weekStart;\n this.weekEnd = options.weekEnd;\n updateDOW = true;\n }\n if (options.locale) {\n var locale = this.locale = options.locale;\n this.dayNames = locale.daysMin;\n this.switchLabelFormat = locale.titleFormat;\n updateDOW = true;\n }\n if (options.beforeShowDay !== undefined) {\n this.beforeShow = typeof options.beforeShowDay === 'function' ? options.beforeShowDay : undefined;\n }\n if (options.calendarWeeks !== undefined) {\n if (options.calendarWeeks && !this.calendarWeeks) {\n var weeksElem = parseHTML(calendarWeeksTemplate).firstChild;\n this.calendarWeeks = {\n element: weeksElem,\n dow: weeksElem.firstChild,\n weeks: weeksElem.lastChild\n };\n this.element.insertBefore(weeksElem, this.element.firstChild);\n } else if (this.calendarWeeks && !options.calendarWeeks) {\n this.element.removeChild(this.calendarWeeks.element);\n this.calendarWeeks = null;\n }\n }\n if (options.showDaysOfWeek !== undefined) {\n if (options.showDaysOfWeek) {\n showElement(this.dow);\n if (this.calendarWeeks) {\n showElement(this.calendarWeeks.dow);\n }\n } else {\n hideElement(this.dow);\n if (this.calendarWeeks) {\n hideElement(this.calendarWeeks.dow);\n }\n }\n }\n\n // update days-of-week when locale, daysOfweekDisabled or weekStart is changed\n if (updateDOW) {\n Array.from(this.dow.children).forEach(function (el, index) {\n var dow = (_this.weekStart + index) % 7;\n el.textContent = _this.dayNames[dow];\n el.className = _this.daysOfWeekDisabled.includes(dow) ? 'dow disabled text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400 cursor-not-allowed' : 'dow text-center h-6 leading-6 text-sm font-medium text-gray-500 dark:text-gray-400';\n });\n }\n }\n\n // Apply update on the focused date to view's settings\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var viewDate = new Date(this.picker.viewDate);\n var viewYear = viewDate.getFullYear();\n var viewMonth = viewDate.getMonth();\n var firstOfMonth = dateValue(viewYear, viewMonth, 1);\n var start = dayOfTheWeekOf(firstOfMonth, this.weekStart, this.weekStart);\n this.first = firstOfMonth;\n this.last = dateValue(viewYear, viewMonth + 1, 0);\n this.start = start;\n this.focused = this.picker.viewDate;\n }\n\n // Apply update on the selected dates to view's settings\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n var _this$picker$datepick = this.picker.datepicker,\n dates = _this$picker$datepick.dates,\n rangepicker = _this$picker$datepick.rangepicker;\n this.selected = dates;\n if (rangepicker) {\n this.range = rangepicker.dates;\n }\n }\n\n // Update the entire view UI\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n // update today marker on ever render\n this.today = this.todayHighlight ? today() : undefined;\n // refresh disabled dates on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = _toConsumableArray(this.datesDisabled);\n var switchLabel = formatDate(this.focused, this.switchLabelFormat, this.locale);\n this.picker.setViewSwitchLabel(switchLabel);\n this.picker.setPrevBtnDisabled(this.first <= this.minDate);\n this.picker.setNextBtnDisabled(this.last >= this.maxDate);\n if (this.calendarWeeks) {\n // start of the UTC week (Monday) of the 1st of the month\n var startOfWeek = dayOfTheWeekOf(this.first, 1, 1);\n Array.from(this.calendarWeeks.weeks.children).forEach(function (el, index) {\n el.textContent = getWeek(addWeeks(startOfWeek, index));\n });\n }\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n var current = addDays(_this2.start, index);\n var date = new Date(current);\n var day = date.getDay();\n el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this2.cellClass);\n el.dataset.date = current;\n el.textContent = date.getDate();\n if (current < _this2.first) {\n classList.add('prev', 'text-gray-500', 'dark:text-white');\n } else if (current > _this2.last) {\n classList.add('next', 'text-gray-500', 'dark:text-white');\n }\n if (_this2.today === current) {\n classList.add('today', 'bg-gray-100', 'dark:bg-gray-600');\n }\n if (current < _this2.minDate || current > _this2.maxDate || _this2.disabled.includes(current)) {\n classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500');\n classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer');\n }\n if (_this2.daysOfWeekDisabled.includes(day)) {\n classList.add('disabled', 'cursor-not-allowed', 'text-gray-400', 'dark:text-gray-500');\n classList.remove('hover:bg-gray-100', 'dark:hover:bg-gray-600', 'text-gray-900', 'dark:text-white', 'cursor-pointer');\n pushUnique(_this2.disabled, current);\n }\n if (_this2.daysOfWeekHighlighted.includes(day)) {\n classList.add('highlighted');\n }\n if (_this2.range) {\n var _this2$range = _slicedToArray(_this2.range, 2),\n rangeStart = _this2$range[0],\n rangeEnd = _this2$range[1];\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n classList.remove('rounded-lg', 'rounded-l-lg', 'rounded-r-lg');\n }\n if (current === rangeStart) {\n classList.add('range-start', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-l-lg');\n classList.remove('rounded-lg', 'rounded-r-lg');\n }\n if (current === rangeEnd) {\n classList.add('range-end', 'bg-gray-100', 'dark:bg-gray-600', 'rounded-r-lg');\n classList.remove('rounded-lg', 'rounded-l-lg');\n }\n }\n if (_this2.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'text-gray-500', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'dark:bg-gray-600', 'bg-gray-100', 'bg-gray-200');\n }\n if (current === _this2.focused) {\n classList.add('focused');\n }\n if (_this2.beforeShow) {\n _this2.performBeforeHook(el, current, current);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this3 = this;\n var _ref = this.range || [],\n _ref2 = _slicedToArray(_ref, 2),\n rangeStart = _ref2[0],\n rangeEnd = _ref2[1];\n this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white', 'focused');\n el.classList.add('text-gray-900', 'rounded-lg', 'dark:text-white');\n });\n Array.from(this.grid.children).forEach(function (el) {\n var current = Number(el.dataset.date);\n var classList = el.classList;\n classList.remove('bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg', 'rounded-r-lg');\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range', 'bg-gray-200', 'dark:bg-gray-600');\n classList.remove('rounded-lg');\n }\n if (current === rangeStart) {\n classList.add('range-start', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-l-lg');\n classList.remove('rounded-lg');\n }\n if (current === rangeEnd) {\n classList.add('range-end', 'bg-gray-200', 'dark:bg-gray-600', 'rounded-r-lg');\n classList.remove('rounded-lg');\n }\n if (_this3.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600', 'bg-gray-100', 'bg-gray-200', 'dark:bg-gray-600');\n }\n if (current === _this3.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n }, {\n key: \"refreshFocus\",\n value: function refreshFocus() {\n var index = Math.round((this.focused - this.start) / 86400000);\n this.grid.querySelectorAll('.focused').forEach(function (el) {\n el.classList.remove('focused');\n });\n this.grid.children[index].classList.add('focused');\n }\n }]);\n}(View);\n\nfunction computeMonthRange(range, thisYear) {\n if (!range || !range[0] || !range[1]) {\n return;\n }\n var _range = _slicedToArray(range, 2),\n _range$ = _slicedToArray(_range[0], 2),\n startY = _range$[0],\n startM = _range$[1],\n _range$2 = _slicedToArray(_range[1], 2),\n endY = _range$2[0],\n endM = _range$2[1];\n if (startY > thisYear || endY < thisYear) {\n return;\n }\n return [startY === thisYear ? startM : -1, endY === thisYear ? endM : 12];\n}\nvar MonthsView = /*#__PURE__*/function (_View) {\n function MonthsView(picker) {\n _classCallCheck(this, MonthsView);\n return _callSuper(this, MonthsView, [picker, {\n id: 1,\n name: 'months',\n cellClass: 'month'\n }]);\n }\n _inherits(MonthsView, _View);\n return _createClass(MonthsView, [{\n key: \"init\",\n value: function init(options) {\n var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (onConstruction) {\n this.grid = this.element;\n this.element.classList.add('months', 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n this.grid.appendChild(parseHTML(createTagRepeat('span', 12, {\n 'data-month': function dataMonth(ix) {\n return ix;\n }\n })));\n }\n _get(_getPrototypeOf(MonthsView.prototype), \"init\", this).call(this, options);\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n if (options.locale) {\n this.monthNames = options.locale.monthsShort;\n }\n if (hasProperty(options, 'minDate')) {\n if (options.minDate === undefined) {\n this.minYear = this.minMonth = this.minDate = undefined;\n } else {\n var minDateObj = new Date(options.minDate);\n this.minYear = minDateObj.getFullYear();\n this.minMonth = minDateObj.getMonth();\n this.minDate = minDateObj.setDate(1);\n }\n }\n if (hasProperty(options, 'maxDate')) {\n if (options.maxDate === undefined) {\n this.maxYear = this.maxMonth = this.maxDate = undefined;\n } else {\n var maxDateObj = new Date(options.maxDate);\n this.maxYear = maxDateObj.getFullYear();\n this.maxMonth = maxDateObj.getMonth();\n this.maxDate = dateValue(this.maxYear, this.maxMonth + 1, 0);\n }\n }\n if (options.beforeShowMonth !== undefined) {\n this.beforeShow = typeof options.beforeShowMonth === 'function' ? options.beforeShowMonth : undefined;\n }\n }\n\n // Update view's settings to reflect the viewDate set on the picker\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var viewDate = new Date(this.picker.viewDate);\n this.year = viewDate.getFullYear();\n this.focused = viewDate.getMonth();\n }\n\n // Update view's settings to reflect the selected dates\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n var _this$picker$datepick = this.picker.datepicker,\n dates = _this$picker$datepick.dates,\n rangepicker = _this$picker$datepick.rangepicker;\n this.selected = dates.reduce(function (selected, timeValue) {\n var date = new Date(timeValue);\n var year = date.getFullYear();\n var month = date.getMonth();\n if (selected[year] === undefined) {\n selected[year] = [month];\n } else {\n pushUnique(selected[year], month);\n }\n return selected;\n }, {});\n if (rangepicker && rangepicker.dates) {\n this.range = rangepicker.dates.map(function (timeValue) {\n var date = new Date(timeValue);\n return isNaN(date) ? undefined : [date.getFullYear(), date.getMonth()];\n });\n }\n }\n\n // Update the entire view UI\n }, {\n key: \"render\",\n value: function render() {\n var _this = this;\n // refresh disabled months on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = [];\n this.picker.setViewSwitchLabel(this.year);\n this.picker.setPrevBtnDisabled(this.year <= this.minYear);\n this.picker.setNextBtnDisabled(this.year >= this.maxYear);\n var selected = this.selected[this.year] || [];\n var yrOutOfRange = this.year < this.minYear || this.year > this.maxYear;\n var isMinYear = this.year === this.minYear;\n var isMaxYear = this.year === this.maxYear;\n var range = computeMonthRange(this.range, this.year);\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n var date = dateValue(_this.year, index, 1);\n el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this.cellClass);\n if (_this.isMinView) {\n el.dataset.date = date;\n }\n // reset text on every render to clear the custom content set\n // by beforeShow hook at previous render\n el.textContent = _this.monthNames[index];\n if (yrOutOfRange || isMinYear && index < _this.minMonth || isMaxYear && index > _this.maxMonth) {\n classList.add('disabled');\n }\n if (range) {\n var _range2 = _slicedToArray(range, 2),\n rangeStart = _range2[0],\n rangeEnd = _range2[1];\n if (index > rangeStart && index < rangeEnd) {\n classList.add('range');\n }\n if (index === rangeStart) {\n classList.add('range-start');\n }\n if (index === rangeEnd) {\n classList.add('range-end');\n }\n }\n if (selected.includes(index)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (index === _this.focused) {\n classList.add('focused');\n }\n if (_this.beforeShow) {\n _this.performBeforeHook(el, index, date);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this2 = this;\n var selected = this.selected[this.year] || [];\n var _ref = computeMonthRange(this.range, this.year) || [],\n _ref2 = _slicedToArray(_ref, 2),\n rangeStart = _ref2[0],\n rangeEnd = _ref2[1];\n this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'dark:bg-blue-600', 'dark:!bg-primary-700', 'dark:text-white', 'text-white', 'focused');\n el.classList.add('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n });\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n if (index > rangeStart && index < rangeEnd) {\n classList.add('range');\n }\n if (index === rangeStart) {\n classList.add('range-start');\n }\n if (index === rangeEnd) {\n classList.add('range-end');\n }\n if (selected.includes(index)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (index === _this2.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n }, {\n key: \"refreshFocus\",\n value: function refreshFocus() {\n this.grid.querySelectorAll('.focused').forEach(function (el) {\n el.classList.remove('focused');\n });\n this.grid.children[this.focused].classList.add('focused');\n }\n }]);\n}(View);\n\nfunction toTitleCase(word) {\n return _toConsumableArray(word).reduce(function (str, ch, ix) {\n return str += ix ? ch : ch.toUpperCase();\n }, '');\n}\n\n// Class representing the years and decades view elements\nvar YearsView = /*#__PURE__*/function (_View) {\n function YearsView(picker, config) {\n _classCallCheck(this, YearsView);\n return _callSuper(this, YearsView, [picker, config]);\n }\n _inherits(YearsView, _View);\n return _createClass(YearsView, [{\n key: \"init\",\n value: function init(options) {\n var onConstruction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (onConstruction) {\n this.navStep = this.step * 10;\n this.beforeShowOption = \"beforeShow\".concat(toTitleCase(this.cellClass));\n this.grid = this.element;\n this.element.classList.add(this.name, 'datepicker-grid', 'w-64', 'grid', 'grid-cols-4');\n this.grid.appendChild(parseHTML(createTagRepeat('span', 12)));\n }\n _get(_getPrototypeOf(YearsView.prototype), \"init\", this).call(this, options);\n }\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n if (hasProperty(options, 'minDate')) {\n if (options.minDate === undefined) {\n this.minYear = this.minDate = undefined;\n } else {\n this.minYear = startOfYearPeriod(options.minDate, this.step);\n this.minDate = dateValue(this.minYear, 0, 1);\n }\n }\n if (hasProperty(options, 'maxDate')) {\n if (options.maxDate === undefined) {\n this.maxYear = this.maxDate = undefined;\n } else {\n this.maxYear = startOfYearPeriod(options.maxDate, this.step);\n this.maxDate = dateValue(this.maxYear, 11, 31);\n }\n }\n if (options[this.beforeShowOption] !== undefined) {\n var beforeShow = options[this.beforeShowOption];\n this.beforeShow = typeof beforeShow === 'function' ? beforeShow : undefined;\n }\n }\n\n // Update view's settings to reflect the viewDate set on the picker\n }, {\n key: \"updateFocus\",\n value: function updateFocus() {\n var viewDate = new Date(this.picker.viewDate);\n var first = startOfYearPeriod(viewDate, this.navStep);\n var last = first + 9 * this.step;\n this.first = first;\n this.last = last;\n this.start = first - this.step;\n this.focused = startOfYearPeriod(viewDate, this.step);\n }\n\n // Update view's settings to reflect the selected dates\n }, {\n key: \"updateSelection\",\n value: function updateSelection() {\n var _this = this;\n var _this$picker$datepick = this.picker.datepicker,\n dates = _this$picker$datepick.dates,\n rangepicker = _this$picker$datepick.rangepicker;\n this.selected = dates.reduce(function (years, timeValue) {\n return pushUnique(years, startOfYearPeriod(timeValue, _this.step));\n }, []);\n if (rangepicker && rangepicker.dates) {\n this.range = rangepicker.dates.map(function (timeValue) {\n if (timeValue !== undefined) {\n return startOfYearPeriod(timeValue, _this.step);\n }\n });\n }\n }\n\n // Update the entire view UI\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n // refresh disabled years on every render in order to clear the ones added\n // by beforeShow hook at previous render\n this.disabled = [];\n this.picker.setViewSwitchLabel(\"\".concat(this.first, \"-\").concat(this.last));\n this.picker.setPrevBtnDisabled(this.first <= this.minYear);\n this.picker.setNextBtnDisabled(this.last >= this.maxYear);\n Array.from(this.grid.children).forEach(function (el, index) {\n var classList = el.classList;\n var current = _this2.start + index * _this2.step;\n var date = dateValue(current, 0, 1);\n el.className = \"datepicker-cell hover:bg-gray-100 dark:hover:bg-gray-600 block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center text-gray-900 dark:text-white font-semibold text-sm \".concat(_this2.cellClass);\n if (_this2.isMinView) {\n el.dataset.date = date;\n }\n el.textContent = el.dataset.year = current;\n if (index === 0) {\n classList.add('prev');\n } else if (index === 11) {\n classList.add('next');\n }\n if (current < _this2.minYear || current > _this2.maxYear) {\n classList.add('disabled');\n }\n if (_this2.range) {\n var _this2$range = _slicedToArray(_this2.range, 2),\n rangeStart = _this2$range[0],\n rangeEnd = _this2$range[1];\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range');\n }\n if (current === rangeStart) {\n classList.add('range-start');\n }\n if (current === rangeEnd) {\n classList.add('range-end');\n }\n }\n if (_this2.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (current === _this2.focused) {\n classList.add('focused');\n }\n if (_this2.beforeShow) {\n _this2.performBeforeHook(el, current, date);\n }\n });\n }\n\n // Update the view UI by applying the changes of selected and focused items\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this3 = this;\n var _ref = this.range || [],\n _ref2 = _slicedToArray(_ref, 2),\n rangeStart = _ref2[0],\n rangeEnd = _ref2[1];\n this.grid.querySelectorAll('.range, .range-start, .range-end, .selected, .focused').forEach(function (el) {\n el.classList.remove('range', 'range-start', 'range-end', 'selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark!bg-primary-600', 'dark:text-white', 'focused');\n });\n Array.from(this.grid.children).forEach(function (el) {\n var current = Number(el.textContent);\n var classList = el.classList;\n if (current > rangeStart && current < rangeEnd) {\n classList.add('range');\n }\n if (current === rangeStart) {\n classList.add('range-start');\n }\n if (current === rangeEnd) {\n classList.add('range-end');\n }\n if (_this3.selected.includes(current)) {\n classList.add('selected', 'bg-blue-700', '!bg-primary-700', 'text-white', 'dark:bg-blue-600', 'dark:!bg-primary-600', 'dark:text-white');\n classList.remove('text-gray-900', 'hover:bg-gray-100', 'dark:text-white', 'dark:hover:bg-gray-600');\n }\n if (current === _this3.focused) {\n classList.add('focused');\n }\n });\n }\n\n // Update the view UI by applying the change of focused item\n }, {\n key: \"refreshFocus\",\n value: function refreshFocus() {\n var index = Math.round((this.focused - this.start) / this.step);\n this.grid.querySelectorAll('.focused').forEach(function (el) {\n el.classList.remove('focused');\n });\n this.grid.children[index].classList.add('focused');\n }\n }]);\n}(View);\n\nfunction triggerDatepickerEvent(datepicker, type) {\n var detail = {\n date: datepicker.getDate(),\n viewDate: new Date(datepicker.picker.viewDate),\n viewId: datepicker.picker.currentView.id,\n datepicker: datepicker\n };\n datepicker.element.dispatchEvent(new CustomEvent(type, {\n detail: detail\n }));\n}\n\n// direction: -1 (to previous), 1 (to next)\nfunction goToPrevOrNext(datepicker, direction) {\n var _datepicker$config = datepicker.config,\n minDate = _datepicker$config.minDate,\n maxDate = _datepicker$config.maxDate;\n var _datepicker$picker = datepicker.picker,\n currentView = _datepicker$picker.currentView,\n viewDate = _datepicker$picker.viewDate;\n var newViewDate;\n switch (currentView.id) {\n case 0:\n newViewDate = addMonths(viewDate, direction);\n break;\n case 1:\n newViewDate = addYears(viewDate, direction);\n break;\n default:\n newViewDate = addYears(viewDate, direction * currentView.navStep);\n }\n newViewDate = limitToRange(newViewDate, minDate, maxDate);\n datepicker.picker.changeFocus(newViewDate).render();\n}\nfunction switchView(datepicker) {\n var viewId = datepicker.picker.currentView.id;\n if (viewId === datepicker.config.maxView) {\n return;\n }\n datepicker.picker.changeView(viewId + 1).render();\n}\nfunction unfocus(datepicker) {\n if (datepicker.config.updateOnBlur) {\n datepicker.update({\n autohide: true\n });\n } else {\n datepicker.refresh('input');\n datepicker.hide();\n }\n}\n\nfunction goToSelectedMonthOrYear(datepicker, selection) {\n var picker = datepicker.picker;\n var viewDate = new Date(picker.viewDate);\n var viewId = picker.currentView.id;\n var newDate = viewId === 1 ? addMonths(viewDate, selection - viewDate.getMonth()) : addYears(viewDate, selection - viewDate.getFullYear());\n picker.changeFocus(newDate).changeView(viewId - 1).render();\n}\nfunction onClickTodayBtn(datepicker) {\n var picker = datepicker.picker;\n var currentDate = today();\n if (datepicker.config.todayBtnMode === 1) {\n if (datepicker.config.autohide) {\n datepicker.setDate(currentDate);\n return;\n }\n datepicker.setDate(currentDate, {\n render: false\n });\n picker.update();\n }\n if (picker.viewDate !== currentDate) {\n picker.changeFocus(currentDate);\n }\n picker.changeView(0).render();\n}\nfunction onClickClearBtn(datepicker) {\n datepicker.setDate({\n clear: true\n });\n}\nfunction onClickViewSwitch(datepicker) {\n switchView(datepicker);\n}\nfunction onClickPrevBtn(datepicker) {\n goToPrevOrNext(datepicker, -1);\n}\nfunction onClickNextBtn(datepicker) {\n goToPrevOrNext(datepicker, 1);\n}\n\n// For the picker's main block to delegete the events from `datepicker-cell`s\nfunction onClickView(datepicker, ev) {\n var target = findElementInEventPath(ev, '.datepicker-cell');\n if (!target || target.classList.contains('disabled')) {\n return;\n }\n var _datepicker$picker$cu = datepicker.picker.currentView,\n id = _datepicker$picker$cu.id,\n isMinView = _datepicker$picker$cu.isMinView;\n if (isMinView) {\n datepicker.setDate(Number(target.dataset.date));\n } else if (id === 1) {\n goToSelectedMonthOrYear(datepicker, Number(target.dataset.month));\n } else {\n goToSelectedMonthOrYear(datepicker, Number(target.dataset.year));\n }\n}\nfunction onClickPicker(datepicker) {\n if (!datepicker.inline && !datepicker.config.disableTouchKeyboard) {\n datepicker.inputField.focus();\n }\n}\n\nfunction processPickerOptions(picker, options) {\n if (options.title !== undefined) {\n if (options.title) {\n picker.controls.title.textContent = options.title;\n showElement(picker.controls.title);\n } else {\n picker.controls.title.textContent = '';\n hideElement(picker.controls.title);\n }\n }\n if (options.prevArrow) {\n var prevBtn = picker.controls.prevBtn;\n emptyChildNodes(prevBtn);\n options.prevArrow.forEach(function (node) {\n prevBtn.appendChild(node.cloneNode(true));\n });\n }\n if (options.nextArrow) {\n var nextBtn = picker.controls.nextBtn;\n emptyChildNodes(nextBtn);\n options.nextArrow.forEach(function (node) {\n nextBtn.appendChild(node.cloneNode(true));\n });\n }\n if (options.locale) {\n picker.controls.todayBtn.textContent = options.locale.today;\n picker.controls.clearBtn.textContent = options.locale.clear;\n }\n if (options.todayBtn !== undefined) {\n if (options.todayBtn) {\n showElement(picker.controls.todayBtn);\n } else {\n hideElement(picker.controls.todayBtn);\n }\n }\n if (hasProperty(options, 'minDate') || hasProperty(options, 'maxDate')) {\n var _picker$datepicker$co = picker.datepicker.config,\n minDate = _picker$datepicker$co.minDate,\n maxDate = _picker$datepicker$co.maxDate;\n picker.controls.todayBtn.disabled = !isInRange(today(), minDate, maxDate);\n }\n if (options.clearBtn !== undefined) {\n if (options.clearBtn) {\n showElement(picker.controls.clearBtn);\n } else {\n hideElement(picker.controls.clearBtn);\n }\n }\n}\n\n// Compute view date to reset, which will be...\n// - the last item of the selected dates or defaultViewDate if no selection\n// - limitted to minDate or maxDate if it exceeds the range\nfunction computeResetViewDate(datepicker) {\n var dates = datepicker.dates,\n config = datepicker.config;\n var viewDate = dates.length > 0 ? lastItemOf(dates) : config.defaultViewDate;\n return limitToRange(viewDate, config.minDate, config.maxDate);\n}\n\n// Change current view's view date\nfunction setViewDate(picker, newDate) {\n var oldViewDate = new Date(picker.viewDate);\n var newViewDate = new Date(newDate);\n var _picker$currentView = picker.currentView,\n id = _picker$currentView.id,\n year = _picker$currentView.year,\n first = _picker$currentView.first,\n last = _picker$currentView.last;\n var viewYear = newViewDate.getFullYear();\n picker.viewDate = newDate;\n if (viewYear !== oldViewDate.getFullYear()) {\n triggerDatepickerEvent(picker.datepicker, 'changeYear');\n }\n if (newViewDate.getMonth() !== oldViewDate.getMonth()) {\n triggerDatepickerEvent(picker.datepicker, 'changeMonth');\n }\n\n // return whether the new date is in different period on time from the one\n // displayed in the current view\n // when true, the view needs to be re-rendered on the next UI refresh.\n switch (id) {\n case 0:\n return newDate < first || newDate > last;\n case 1:\n return viewYear !== year;\n default:\n return viewYear < first || viewYear > last;\n }\n}\nfunction getTextDirection(el) {\n return window.getComputedStyle(el).direction;\n}\n\n// Class representing the picker UI\nvar Picker = /*#__PURE__*/function () {\n function Picker(datepicker) {\n _classCallCheck(this, Picker);\n this.datepicker = datepicker;\n var template = pickerTemplate.replace(/%buttonClass%/g, datepicker.config.buttonClass);\n var element = this.element = parseHTML(template).firstChild;\n var _element$firstChild$c = _slicedToArray(element.firstChild.children, 3),\n header = _element$firstChild$c[0],\n main = _element$firstChild$c[1],\n footer = _element$firstChild$c[2];\n var title = header.firstElementChild;\n var _header$lastElementCh = _slicedToArray(header.lastElementChild.children, 3),\n prevBtn = _header$lastElementCh[0],\n viewSwitch = _header$lastElementCh[1],\n nextBtn = _header$lastElementCh[2];\n var _footer$firstChild$ch = _slicedToArray(footer.firstChild.children, 2),\n todayBtn = _footer$firstChild$ch[0],\n clearBtn = _footer$firstChild$ch[1];\n var controls = {\n title: title,\n prevBtn: prevBtn,\n viewSwitch: viewSwitch,\n nextBtn: nextBtn,\n todayBtn: todayBtn,\n clearBtn: clearBtn\n };\n this.main = main;\n this.controls = controls;\n var elementClass = datepicker.inline ? 'inline' : 'dropdown';\n element.classList.add(\"datepicker-\".concat(elementClass));\n elementClass === 'dropdown' ? element.classList.add('dropdown', 'absolute', 'top-0', 'left-0', 'z-50', 'pt-2') : null;\n processPickerOptions(this, datepicker.config);\n this.viewDate = computeResetViewDate(datepicker);\n\n // set up event listeners\n registerListeners(datepicker, [[element, 'click', onClickPicker.bind(null, datepicker), {\n capture: true\n }], [main, 'click', onClickView.bind(null, datepicker)], [controls.viewSwitch, 'click', onClickViewSwitch.bind(null, datepicker)], [controls.prevBtn, 'click', onClickPrevBtn.bind(null, datepicker)], [controls.nextBtn, 'click', onClickNextBtn.bind(null, datepicker)], [controls.todayBtn, 'click', onClickTodayBtn.bind(null, datepicker)], [controls.clearBtn, 'click', onClickClearBtn.bind(null, datepicker)]]);\n\n // set up views\n this.views = [new DaysView(this), new MonthsView(this), new YearsView(this, {\n id: 2,\n name: 'years',\n cellClass: 'year',\n step: 1\n }), new YearsView(this, {\n id: 3,\n name: 'decades',\n cellClass: 'decade',\n step: 10\n })];\n this.currentView = this.views[datepicker.config.startView];\n this.currentView.render();\n this.main.appendChild(this.currentView.element);\n datepicker.config.container.appendChild(this.element);\n }\n return _createClass(Picker, [{\n key: \"setOptions\",\n value: function setOptions(options) {\n processPickerOptions(this, options);\n this.views.forEach(function (view) {\n view.init(options, false);\n });\n this.currentView.render();\n }\n }, {\n key: \"detach\",\n value: function detach() {\n this.datepicker.config.container.removeChild(this.element);\n }\n }, {\n key: \"show\",\n value: function show() {\n if (this.active) {\n return;\n }\n this.element.classList.add('active', 'block');\n this.element.classList.remove('hidden');\n this.active = true;\n var datepicker = this.datepicker;\n if (!datepicker.inline) {\n // ensure picker's direction matches input's\n var inputDirection = getTextDirection(datepicker.inputField);\n if (inputDirection !== getTextDirection(datepicker.config.container)) {\n this.element.dir = inputDirection;\n } else if (this.element.dir) {\n this.element.removeAttribute('dir');\n }\n this.place();\n if (datepicker.config.disableTouchKeyboard) {\n datepicker.inputField.blur();\n }\n }\n triggerDatepickerEvent(datepicker, 'show');\n }\n }, {\n key: \"hide\",\n value: function hide() {\n if (!this.active) {\n return;\n }\n this.datepicker.exitEditMode();\n this.element.classList.remove('active', 'block');\n this.element.classList.add('active', 'block', 'hidden');\n this.active = false;\n triggerDatepickerEvent(this.datepicker, 'hide');\n }\n }, {\n key: \"place\",\n value: function place() {\n var _this$element = this.element,\n classList = _this$element.classList,\n style = _this$element.style;\n var _this$datepicker = this.datepicker,\n config = _this$datepicker.config,\n inputField = _this$datepicker.inputField;\n var container = config.container;\n var _this$element$getBoun = this.element.getBoundingClientRect(),\n calendarWidth = _this$element$getBoun.width,\n calendarHeight = _this$element$getBoun.height;\n var _container$getBoundin = container.getBoundingClientRect(),\n containerLeft = _container$getBoundin.left,\n containerTop = _container$getBoundin.top,\n containerWidth = _container$getBoundin.width;\n var _inputField$getBoundi = inputField.getBoundingClientRect(),\n inputLeft = _inputField$getBoundi.left,\n inputTop = _inputField$getBoundi.top,\n inputWidth = _inputField$getBoundi.width,\n inputHeight = _inputField$getBoundi.height;\n var _config$orientation = config.orientation,\n orientX = _config$orientation.x,\n orientY = _config$orientation.y;\n var scrollTop;\n var left;\n var top;\n if (container === document.body) {\n scrollTop = window.scrollY;\n left = inputLeft + window.scrollX;\n top = inputTop + scrollTop;\n } else {\n scrollTop = container.scrollTop;\n left = inputLeft - containerLeft;\n top = inputTop - containerTop + scrollTop;\n }\n if (orientX === 'auto') {\n if (left < 0) {\n // align to the left and move into visible area if input's left edge < window's\n orientX = 'left';\n left = 10;\n } else if (left + calendarWidth > containerWidth) {\n // align to the right if canlendar's right edge > container's\n orientX = 'right';\n } else {\n orientX = getTextDirection(inputField) === 'rtl' ? 'right' : 'left';\n }\n }\n if (orientX === 'right') {\n left -= calendarWidth - inputWidth;\n }\n if (orientY === 'auto') {\n orientY = top - calendarHeight < scrollTop ? 'bottom' : 'top';\n }\n if (orientY === 'top') {\n top -= calendarHeight;\n } else {\n top += inputHeight;\n }\n classList.remove('datepicker-orient-top', 'datepicker-orient-bottom', 'datepicker-orient-right', 'datepicker-orient-left');\n classList.add(\"datepicker-orient-\".concat(orientY), \"datepicker-orient-\".concat(orientX));\n style.top = top ? \"\".concat(top, \"px\") : top;\n style.left = left ? \"\".concat(left, \"px\") : left;\n }\n }, {\n key: \"setViewSwitchLabel\",\n value: function setViewSwitchLabel(labelText) {\n this.controls.viewSwitch.textContent = labelText;\n }\n }, {\n key: \"setPrevBtnDisabled\",\n value: function setPrevBtnDisabled(disabled) {\n this.controls.prevBtn.disabled = disabled;\n }\n }, {\n key: \"setNextBtnDisabled\",\n value: function setNextBtnDisabled(disabled) {\n this.controls.nextBtn.disabled = disabled;\n }\n }, {\n key: \"changeView\",\n value: function changeView(viewId) {\n var oldView = this.currentView;\n var newView = this.views[viewId];\n if (newView.id !== oldView.id) {\n this.currentView = newView;\n this._renderMethod = 'render';\n triggerDatepickerEvent(this.datepicker, 'changeView');\n this.main.replaceChild(newView.element, oldView.element);\n }\n return this;\n }\n\n // Change the focused date (view date)\n }, {\n key: \"changeFocus\",\n value: function changeFocus(newViewDate) {\n this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refreshFocus';\n this.views.forEach(function (view) {\n view.updateFocus();\n });\n return this;\n }\n\n // Apply the change of the selected dates\n }, {\n key: \"update\",\n value: function update() {\n var newViewDate = computeResetViewDate(this.datepicker);\n this._renderMethod = setViewDate(this, newViewDate) ? 'render' : 'refresh';\n this.views.forEach(function (view) {\n view.updateFocus();\n view.updateSelection();\n });\n return this;\n }\n\n // Refresh the picker UI\n }, {\n key: \"render\",\n value: function render() {\n var quickRender = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var renderMethod = quickRender && this._renderMethod || 'render';\n delete this._renderMethod;\n this.currentView[renderMethod]();\n }\n }]);\n}();\n\n// Find the closest date that doesn't meet the condition for unavailable date\n// Returns undefined if no available date is found\n// addFn: function to calculate the next date\n// - args: time value, amount\n// increase: amount to pass to addFn\n// testFn: function to test the unavailablity of the date\n// - args: time value; retun: true if unavailable\nfunction findNextAvailableOne(date, addFn, increase, testFn, min, max) {\n if (!isInRange(date, min, max)) {\n return;\n }\n if (testFn(date)) {\n var newDate = addFn(date, increase);\n return findNextAvailableOne(newDate, addFn, increase, testFn, min, max);\n }\n return date;\n}\n\n// direction: -1 (left/up), 1 (right/down)\n// vertical: true for up/down, false for left/right\nfunction moveByArrowKey(datepicker, ev, direction, vertical) {\n var picker = datepicker.picker;\n var currentView = picker.currentView;\n var step = currentView.step || 1;\n var viewDate = picker.viewDate;\n var addFn;\n var testFn;\n switch (currentView.id) {\n case 0:\n if (vertical) {\n viewDate = addDays(viewDate, direction * 7);\n } else if (ev.ctrlKey || ev.metaKey) {\n viewDate = addYears(viewDate, direction);\n } else {\n viewDate = addDays(viewDate, direction);\n }\n addFn = addDays;\n testFn = function testFn(date) {\n return currentView.disabled.includes(date);\n };\n break;\n case 1:\n viewDate = addMonths(viewDate, vertical ? direction * 4 : direction);\n addFn = addMonths;\n testFn = function testFn(date) {\n var dt = new Date(date);\n var year = currentView.year,\n disabled = currentView.disabled;\n return dt.getFullYear() === year && disabled.includes(dt.getMonth());\n };\n break;\n default:\n viewDate = addYears(viewDate, direction * (vertical ? 4 : 1) * step);\n addFn = addYears;\n testFn = function testFn(date) {\n return currentView.disabled.includes(startOfYearPeriod(date, step));\n };\n }\n viewDate = findNextAvailableOne(viewDate, addFn, direction < 0 ? -step : step, testFn, currentView.minDate, currentView.maxDate);\n if (viewDate !== undefined) {\n picker.changeFocus(viewDate).render();\n }\n}\nfunction onKeydown(datepicker, ev) {\n if (ev.key === 'Tab') {\n unfocus(datepicker);\n return;\n }\n var picker = datepicker.picker;\n var _picker$currentView = picker.currentView,\n id = _picker$currentView.id,\n isMinView = _picker$currentView.isMinView;\n if (!picker.active) {\n switch (ev.key) {\n case 'ArrowDown':\n case 'Escape':\n picker.show();\n break;\n case 'Enter':\n datepicker.update();\n break;\n default:\n return;\n }\n } else if (datepicker.editMode) {\n switch (ev.key) {\n case 'Escape':\n picker.hide();\n break;\n case 'Enter':\n datepicker.exitEditMode({\n update: true,\n autohide: datepicker.config.autohide\n });\n break;\n default:\n return;\n }\n } else {\n switch (ev.key) {\n case 'Escape':\n picker.hide();\n break;\n case 'ArrowLeft':\n if (ev.ctrlKey || ev.metaKey) {\n goToPrevOrNext(datepicker, -1);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, -1, false);\n }\n break;\n case 'ArrowRight':\n if (ev.ctrlKey || ev.metaKey) {\n goToPrevOrNext(datepicker, 1);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, 1, false);\n }\n break;\n case 'ArrowUp':\n if (ev.ctrlKey || ev.metaKey) {\n switchView(datepicker);\n } else if (ev.shiftKey) {\n datepicker.enterEditMode();\n return;\n } else {\n moveByArrowKey(datepicker, ev, -1, true);\n }\n break;\n case 'ArrowDown':\n if (ev.shiftKey && !ev.ctrlKey && !ev.metaKey) {\n datepicker.enterEditMode();\n return;\n }\n moveByArrowKey(datepicker, ev, 1, true);\n break;\n case 'Enter':\n if (isMinView) {\n datepicker.setDate(picker.viewDate);\n } else {\n picker.changeView(id - 1).render();\n }\n break;\n case 'Backspace':\n case 'Delete':\n datepicker.enterEditMode();\n return;\n default:\n if (ev.key.length === 1 && !ev.ctrlKey && !ev.metaKey) {\n datepicker.enterEditMode();\n }\n return;\n }\n }\n ev.preventDefault();\n ev.stopPropagation();\n}\nfunction onFocus(datepicker) {\n if (datepicker.config.showOnFocus && !datepicker._showing) {\n datepicker.show();\n }\n}\n\n// for the prevention for entering edit mode while getting focus on click\nfunction onMousedown(datepicker, ev) {\n var el = ev.target;\n if (datepicker.picker.active || datepicker.config.showOnClick) {\n el._active = el === document.activeElement;\n el._clicking = setTimeout(function () {\n delete el._active;\n delete el._clicking;\n }, 2000);\n }\n}\nfunction onClickInput(datepicker, ev) {\n var el = ev.target;\n if (!el._clicking) {\n return;\n }\n clearTimeout(el._clicking);\n delete el._clicking;\n if (el._active) {\n datepicker.enterEditMode();\n }\n delete el._active;\n if (datepicker.config.showOnClick) {\n datepicker.show();\n }\n}\nfunction onPaste(datepicker, ev) {\n if (ev.clipboardData.types.includes('text/plain')) {\n datepicker.enterEditMode();\n }\n}\n\n// for the `document` to delegate the events from outside the picker/input field\nfunction onClickOutside(datepicker, ev) {\n var element = datepicker.element;\n if (element !== document.activeElement) {\n return;\n }\n var pickerElem = datepicker.picker.element;\n if (findElementInEventPath(ev, function (el) {\n return el === element || el === pickerElem;\n })) {\n return;\n }\n unfocus(datepicker);\n}\n\nfunction stringifyDates(dates, config) {\n return dates.map(function (dt) {\n return formatDate(dt, config.format, config.locale);\n }).join(config.dateDelimiter);\n}\n\n// parse input dates and create an array of time values for selection\n// returns undefined if there are no valid dates in inputDates\n// when origDates (current selection) is passed, the function works to mix\n// the input dates into the current selection\nfunction processInputDates(datepicker, inputDates) {\n var clear = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var config = datepicker.config,\n origDates = datepicker.dates,\n rangepicker = datepicker.rangepicker;\n if (inputDates.length === 0) {\n // empty input is considered valid unless origiDates is passed\n return clear ? [] : undefined;\n }\n var rangeEnd = rangepicker && datepicker === rangepicker.datepickers[1];\n var newDates = inputDates.reduce(function (dates, dt) {\n var date = parseDate(dt, config.format, config.locale);\n if (date === undefined) {\n return dates;\n }\n if (config.pickLevel > 0) {\n // adjust to 1st of the month/Jan 1st of the year\n // or to the last day of the monh/Dec 31st of the year if the datepicker\n // is the range-end picker of a rangepicker\n var _dt = new Date(date);\n if (config.pickLevel === 1) {\n date = rangeEnd ? _dt.setMonth(_dt.getMonth() + 1, 0) : _dt.setDate(1);\n } else {\n date = rangeEnd ? _dt.setFullYear(_dt.getFullYear() + 1, 0, 0) : _dt.setMonth(0, 1);\n }\n }\n if (isInRange(date, config.minDate, config.maxDate) && !dates.includes(date) && !config.datesDisabled.includes(date) && !config.daysOfWeekDisabled.includes(new Date(date).getDay())) {\n dates.push(date);\n }\n return dates;\n }, []);\n if (newDates.length === 0) {\n return;\n }\n if (config.multidate && !clear) {\n // get the synmetric difference between origDates and newDates\n newDates = newDates.reduce(function (dates, date) {\n if (!origDates.includes(date)) {\n dates.push(date);\n }\n return dates;\n }, origDates.filter(function (date) {\n return !newDates.includes(date);\n }));\n }\n // do length check always because user can input multiple dates regardless of the mode\n return config.maxNumberOfDates && newDates.length > config.maxNumberOfDates ? newDates.slice(config.maxNumberOfDates * -1) : newDates;\n}\n\n// refresh the UI elements\n// modes: 1: input only, 2, picker only, 3 both\nfunction refreshUI(datepicker) {\n var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 3;\n var quickRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var config = datepicker.config,\n picker = datepicker.picker,\n inputField = datepicker.inputField;\n if (mode & 2) {\n var newView = picker.active ? config.pickLevel : config.startView;\n picker.update().changeView(newView).render(quickRender);\n }\n if (mode & 1 && inputField) {\n inputField.value = stringifyDates(datepicker.dates, config);\n }\n}\nfunction _setDate(datepicker, inputDates, options) {\n var clear = options.clear,\n render = options.render,\n autohide = options.autohide;\n if (render === undefined) {\n render = true;\n }\n if (!render) {\n autohide = false;\n } else if (autohide === undefined) {\n autohide = datepicker.config.autohide;\n }\n var newDates = processInputDates(datepicker, inputDates, clear);\n if (!newDates) {\n return;\n }\n if (newDates.toString() !== datepicker.dates.toString()) {\n datepicker.dates = newDates;\n refreshUI(datepicker, render ? 3 : 1);\n triggerDatepickerEvent(datepicker, 'changeDate');\n } else {\n refreshUI(datepicker, 1);\n }\n if (autohide) {\n datepicker.hide();\n }\n}\n\n/**\r\n * Class representing a date picker\r\n */\nvar Datepicker = /*#__PURE__*/function () {\n /**\r\n * Create a date picker\r\n * @param {Element} element - element to bind a date picker\r\n * @param {Object} [options] - config options\r\n * @param {DateRangePicker} [rangepicker] - DateRangePicker instance the\r\n * date picker belongs to. Use this only when creating date picker as a part\r\n * of date range picker\r\n */\n function Datepicker(element) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var rangepicker = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;\n _classCallCheck(this, Datepicker);\n element.datepicker = this;\n this.element = element;\n\n // set up config\n var config = this.config = Object.assign({\n buttonClass: options.buttonClass && String(options.buttonClass) || 'button',\n container: document.body,\n defaultViewDate: today(),\n maxDate: undefined,\n minDate: undefined\n }, processOptions(defaultOptions, this));\n this._options = options;\n Object.assign(config, processOptions(options, this));\n\n // configure by type\n var inline = this.inline = element.tagName !== 'INPUT';\n var inputField;\n var initialDates;\n if (inline) {\n config.container = element;\n initialDates = stringToArray(element.dataset.date, config.dateDelimiter);\n delete element.dataset.date;\n } else {\n var container = options.container ? document.querySelector(options.container) : null;\n if (container) {\n config.container = container;\n }\n inputField = this.inputField = element;\n inputField.classList.add('datepicker-input');\n initialDates = stringToArray(inputField.value, config.dateDelimiter);\n }\n if (rangepicker) {\n // check validiry\n var index = rangepicker.inputs.indexOf(inputField);\n var datepickers = rangepicker.datepickers;\n if (index < 0 || index > 1 || !Array.isArray(datepickers)) {\n throw Error('Invalid rangepicker object.');\n }\n // attach itaelf to the rangepicker here so that processInputDates() can\n // determine if this is the range-end picker of the rangepicker while\n // setting inital values when pickLevel > 0\n datepickers[index] = this;\n // add getter for rangepicker\n Object.defineProperty(this, 'rangepicker', {\n get: function get() {\n return rangepicker;\n }\n });\n }\n\n // set initial dates\n this.dates = [];\n // process initial value\n var inputDateValues = processInputDates(this, initialDates);\n if (inputDateValues && inputDateValues.length > 0) {\n this.dates = inputDateValues;\n }\n if (inputField) {\n inputField.value = stringifyDates(this.dates, config);\n }\n var picker = this.picker = new Picker(this);\n if (inline) {\n this.show();\n } else {\n // set up event listeners in other modes\n var onMousedownDocument = onClickOutside.bind(null, this);\n var listeners = [[inputField, 'keydown', onKeydown.bind(null, this)], [inputField, 'focus', onFocus.bind(null, this)], [inputField, 'mousedown', onMousedown.bind(null, this)], [inputField, 'click', onClickInput.bind(null, this)], [inputField, 'paste', onPaste.bind(null, this)], [document, 'mousedown', onMousedownDocument], [document, 'touchstart', onMousedownDocument], [window, 'resize', picker.place.bind(picker)]];\n registerListeners(this, listeners);\n }\n }\n\n /**\r\n * Format Date object or time value in given format and language\r\n * @param {Date|Number} date - date or time value to format\r\n * @param {String|Object} format - format string or object that contains\r\n * toDisplay() custom formatter, whose signature is\r\n * - args:\r\n * - date: {Date} - Date instance of the date passed to the method\r\n * - format: {Object} - the format object passed to the method\r\n * - locale: {Object} - locale for the language specified by `lang`\r\n * - return:\r\n * {String} formatted date\r\n * @param {String} [lang=en] - language code for the locale to use\r\n * @return {String} formatted date\r\n */\n return _createClass(Datepicker, [{\n key: \"active\",\n get:\n /**\r\n * @type {Boolean} - Whether the picker element is shown. `true` whne shown\r\n */\n function get() {\n return !!(this.picker && this.picker.active);\n }\n\n /**\r\n * @type {HTMLDivElement} - DOM object of picker element\r\n */\n }, {\n key: \"pickerElement\",\n get: function get() {\n return this.picker ? this.picker.element : undefined;\n }\n\n /**\r\n * Set new values to the config options\r\n * @param {Object} options - config options to update\r\n */\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n var picker = this.picker;\n var newOptions = processOptions(options, this);\n Object.assign(this._options, options);\n Object.assign(this.config, newOptions);\n picker.setOptions(newOptions);\n refreshUI(this, 3);\n }\n\n /**\r\n * Show the picker element\r\n */\n }, {\n key: \"show\",\n value: function show() {\n if (this.inputField) {\n if (this.inputField.disabled) {\n return;\n }\n if (this.inputField !== document.activeElement) {\n this._showing = true;\n this.inputField.focus();\n delete this._showing;\n }\n }\n this.picker.show();\n }\n\n /**\r\n * Hide the picker element\r\n * Not available on inline picker\r\n */\n }, {\n key: \"hide\",\n value: function hide() {\n if (this.inline) {\n return;\n }\n this.picker.hide();\n this.picker.update().changeView(this.config.startView).render();\n }\n\n /**\r\n * Destroy the Datepicker instance\r\n * @return {Detepicker} - the instance destroyed\r\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.hide();\n unregisterListeners(this);\n this.picker.detach();\n if (!this.inline) {\n this.inputField.classList.remove('datepicker-input');\n }\n delete this.element.datepicker;\n return this;\n }\n\n /**\r\n * Get the selected date(s)\r\n *\r\n * The method returns a Date object of selected date by default, and returns\r\n * an array of selected dates in multidate mode. If format string is passed,\r\n * it returns date string(s) formatted in given format.\r\n *\r\n * @param {String} [format] - Format string to stringify the date(s)\r\n * @return {Date|String|Date[]|String[]} - selected date(s), or if none is\r\n * selected, empty array in multidate mode and untitled in sigledate mode\r\n */\n }, {\n key: \"getDate\",\n value: function getDate() {\n var _this = this;\n var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n var callback = format ? function (date) {\n return formatDate(date, format, _this.config.locale);\n } : function (date) {\n return new Date(date);\n };\n if (this.config.multidate) {\n return this.dates.map(callback);\n }\n if (this.dates.length > 0) {\n return callback(this.dates[0]);\n }\n }\n\n /**\r\n * Set selected date(s)\r\n *\r\n * In multidate mode, you can pass multiple dates as a series of arguments\r\n * or an array. (Since each date is parsed individually, the type of the\r\n * dates doesn't have to be the same.)\r\n * The given dates are used to toggle the select status of each date. The\r\n * number of selected dates is kept from exceeding the length set to\r\n * maxNumberOfDates.\r\n *\r\n * With clear: true option, the method can be used to clear the selection\r\n * and to replace the selection instead of toggling in multidate mode.\r\n * If the option is passed with no date arguments or an empty dates array,\r\n * it works as \"clear\" (clear the selection then set nothing), and if the\r\n * option is passed with new dates to select, it works as \"replace\" (clear\r\n * the selection then set the given dates)\r\n *\r\n * When render: false option is used, the method omits re-rendering the\r\n * picker element. In this case, you need to call refresh() method later in\r\n * order for the picker element to reflect the changes. The input field is\r\n * refreshed always regardless of this option.\r\n *\r\n * When invalid (unparsable, repeated, disabled or out-of-range) dates are\r\n * passed, the method ignores them and applies only valid ones. In the case\r\n * that all the given dates are invalid, which is distinguished from passing\r\n * no dates, the method considers it as an error and leaves the selection\r\n * untouched.\r\n *\r\n * @param {...(Date|Number|String)|Array} [dates] - Date strings, Date\r\n * objects, time values or mix of those for new selection\r\n * @param {Object} [options] - function options\r\n * - clear: {boolean} - Whether to clear the existing selection\r\n * defualt: false\r\n * - render: {boolean} - Whether to re-render the picker element\r\n * default: true\r\n * - autohide: {boolean} - Whether to hide the picker element after re-render\r\n * Ignored when used with render: false\r\n * default: config.autohide\r\n */\n }, {\n key: \"setDate\",\n value: function setDate() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var dates = [].concat(args);\n var opts = {};\n var lastArg = lastItemOf(args);\n if (_typeof(lastArg) === 'object' && !Array.isArray(lastArg) && !(lastArg instanceof Date) && lastArg) {\n Object.assign(opts, dates.pop());\n }\n var inputDates = Array.isArray(dates[0]) ? dates[0] : dates;\n _setDate(this, inputDates, opts);\n }\n\n /**\r\n * Update the selected date(s) with input field's value\r\n * Not available on inline picker\r\n *\r\n * The input field will be refreshed with properly formatted date string.\r\n *\r\n * @param {Object} [options] - function options\r\n * - autohide: {boolean} - whether to hide the picker element after refresh\r\n * default: false\r\n */\n }, {\n key: \"update\",\n value: function update() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n if (this.inline) {\n return;\n }\n var opts = {\n clear: true,\n autohide: !!(options && options.autohide)\n };\n var inputDates = stringToArray(this.inputField.value, this.config.dateDelimiter);\n _setDate(this, inputDates, opts);\n }\n\n /**\r\n * Refresh the picker element and the associated input field\r\n * @param {String} [target] - target item when refreshing one item only\r\n * 'picker' or 'input'\r\n * @param {Boolean} [forceRender] - whether to re-render the picker element\r\n * regardless of its state instead of optimized refresh\r\n */\n }, {\n key: \"refresh\",\n value: function refresh() {\n var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n var forceRender = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (target && typeof target !== 'string') {\n forceRender = target;\n target = undefined;\n }\n var mode;\n if (target === 'picker') {\n mode = 2;\n } else if (target === 'input') {\n mode = 1;\n } else {\n mode = 3;\n }\n refreshUI(this, mode, !forceRender);\n }\n\n /**\r\n * Enter edit mode\r\n * Not available on inline picker or when the picker element is hidden\r\n */\n }, {\n key: \"enterEditMode\",\n value: function enterEditMode() {\n if (this.inline || !this.picker.active || this.editMode) {\n return;\n }\n this.editMode = true;\n this.inputField.classList.add('in-edit', 'border-blue-700', '!border-primary-700');\n }\n\n /**\r\n * Exit from edit mode\r\n * Not available on inline picker\r\n * @param {Object} [options] - function options\r\n * - update: {boolean} - whether to call update() after exiting\r\n * If false, input field is revert to the existing selection\r\n * default: false\r\n */\n }, {\n key: \"exitEditMode\",\n value: function exitEditMode() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n if (this.inline || !this.editMode) {\n return;\n }\n var opts = Object.assign({\n update: false\n }, options);\n delete this.editMode;\n this.inputField.classList.remove('in-edit', 'border-blue-700', '!border-primary-700');\n if (opts.update) {\n this.update(opts);\n }\n }\n }], [{\n key: \"formatDate\",\n value: function formatDate$1(date, format, lang) {\n return formatDate(date, format, lang && locales[lang] || locales.en);\n }\n\n /**\r\n * Parse date string\r\n * @param {String|Date|Number} dateStr - date string, Date object or time\r\n * value to parse\r\n * @param {String|Object} format - format string or object that contains\r\n * toValue() custom parser, whose signature is\r\n * - args:\r\n * - dateStr: {String|Date|Number} - the dateStr passed to the method\r\n * - format: {Object} - the format object passed to the method\r\n * - locale: {Object} - locale for the language specified by `lang`\r\n * - return:\r\n * {Date|Number} parsed date or its time value\r\n * @param {String} [lang=en] - language code for the locale to use\r\n * @return {Number} time value of parsed date\r\n */\n }, {\n key: \"parseDate\",\n value: function parseDate$1(dateStr, format, lang) {\n return parseDate(dateStr, format, lang && locales[lang] || locales.en);\n }\n\n /**\r\n * @type {Object} - Installed locales in `[languageCode]: localeObject` format\r\n * en`:_English (US)_ is pre-installed.\r\n */\n }, {\n key: \"locales\",\n get: function get() {\n return locales;\n }\n }]);\n}();\n\n// filter out the config options inapproprite to pass to Datepicker\nfunction filterOptions(options) {\n var newOpts = Object.assign({}, options);\n delete newOpts.inputs;\n delete newOpts.allowOneSidedRange;\n delete newOpts.maxNumberOfDates; // to ensure each datepicker handles a single date\n\n return newOpts;\n}\nfunction setupDatepicker(rangepicker, changeDateListener, el, options) {\n registerListeners(rangepicker, [[el, 'changeDate', changeDateListener]]);\n new Datepicker(el, options, rangepicker);\n}\nfunction onChangeDate(rangepicker, ev) {\n // to prevent both datepickers trigger the other side's update each other\n if (rangepicker._updating) {\n return;\n }\n rangepicker._updating = true;\n var target = ev.target;\n if (target.datepicker === undefined) {\n return;\n }\n var datepickers = rangepicker.datepickers;\n var setDateOptions = {\n render: false\n };\n var changedSide = rangepicker.inputs.indexOf(target);\n var otherSide = changedSide === 0 ? 1 : 0;\n var changedDate = datepickers[changedSide].dates[0];\n var otherDate = datepickers[otherSide].dates[0];\n if (changedDate !== undefined && otherDate !== undefined) {\n // if the start of the range > the end, swap them\n if (changedSide === 0 && changedDate > otherDate) {\n datepickers[0].setDate(otherDate, setDateOptions);\n datepickers[1].setDate(changedDate, setDateOptions);\n } else if (changedSide === 1 && changedDate < otherDate) {\n datepickers[0].setDate(changedDate, setDateOptions);\n datepickers[1].setDate(otherDate, setDateOptions);\n }\n } else if (!rangepicker.allowOneSidedRange) {\n // to prevent the range from becoming one-sided, copy changed side's\n // selection (no matter if it's empty) to the other side\n if (changedDate !== undefined || otherDate !== undefined) {\n setDateOptions.clear = true;\n datepickers[otherSide].setDate(datepickers[changedSide].dates, setDateOptions);\n }\n }\n datepickers[0].picker.update().render();\n datepickers[1].picker.update().render();\n delete rangepicker._updating;\n}\n\n/**\r\n * Class representing a date range picker\r\n */\nvar DateRangePicker = /*#__PURE__*/function () {\n /**\r\n * Create a date range picker\r\n * @param {Element} element - element to bind a date range picker\r\n * @param {Object} [options] - config options\r\n */\n function DateRangePicker(element) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, DateRangePicker);\n var inputs = Array.isArray(options.inputs) ? options.inputs : Array.from(element.querySelectorAll('input'));\n if (inputs.length < 2) {\n return;\n }\n element.rangepicker = this;\n this.element = element;\n this.inputs = inputs.slice(0, 2);\n this.allowOneSidedRange = !!options.allowOneSidedRange;\n var changeDateListener = onChangeDate.bind(null, this);\n var cleanOptions = filterOptions(options);\n // in order for initial date setup to work right when pcicLvel > 0,\n // let Datepicker constructor add the instance to the rangepicker\n var datepickers = [];\n Object.defineProperty(this, 'datepickers', {\n get: function get() {\n return datepickers;\n }\n });\n setupDatepicker(this, changeDateListener, this.inputs[0], cleanOptions);\n setupDatepicker(this, changeDateListener, this.inputs[1], cleanOptions);\n Object.freeze(datepickers);\n // normalize the range if inital dates are given\n if (datepickers[0].dates.length > 0) {\n onChangeDate(this, {\n target: this.inputs[0]\n });\n } else if (datepickers[1].dates.length > 0) {\n onChangeDate(this, {\n target: this.inputs[1]\n });\n }\n }\n\n /**\r\n * @type {Array} - selected date of the linked date pickers\r\n */\n return _createClass(DateRangePicker, [{\n key: \"dates\",\n get: function get() {\n return this.datepickers.length === 2 ? [this.datepickers[0].dates[0], this.datepickers[1].dates[0]] : undefined;\n }\n\n /**\r\n * Set new values to the config options\r\n * @param {Object} options - config options to update\r\n */\n }, {\n key: \"setOptions\",\n value: function setOptions(options) {\n this.allowOneSidedRange = !!options.allowOneSidedRange;\n var cleanOptions = filterOptions(options);\n this.datepickers[0].setOptions(cleanOptions);\n this.datepickers[1].setOptions(cleanOptions);\n }\n\n /**\r\n * Destroy the DateRangePicker instance\r\n * @return {DateRangePicker} - the instance destroyed\r\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.datepickers[0].destroy();\n this.datepickers[1].destroy();\n unregisterListeners(this);\n delete this.element.rangepicker;\n }\n\n /**\r\n * Get the start and end dates of the date range\r\n *\r\n * The method returns Date objects by default. If format string is passed,\r\n * it returns date strings formatted in given format.\r\n * The result array always contains 2 items (start date/end date) and\r\n * undefined is used for unselected side. (e.g. If none is selected,\r\n * the result will be [undefined, undefined]. If only the end date is set\r\n * when allowOneSidedRange config option is true, [undefined, endDate] will\r\n * be returned.)\r\n *\r\n * @param {String} [format] - Format string to stringify the dates\r\n * @return {Array} - Start and end dates\r\n */\n }, {\n key: \"getDates\",\n value: function getDates() {\n var _this = this;\n var format = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n var callback = format ? function (date) {\n return formatDate(date, format, _this.datepickers[0].config.locale);\n } : function (date) {\n return new Date(date);\n };\n return this.dates.map(function (date) {\n return date === undefined ? date : callback(date);\n });\n }\n\n /**\r\n * Set the start and end dates of the date range\r\n *\r\n * The method calls datepicker.setDate() internally using each of the\r\n * arguments in start\u2192end order.\r\n *\r\n * When a clear: true option object is passed instead of a date, the method\r\n * clears the date.\r\n *\r\n * If an invalid date, the same date as the current one or an option object\r\n * without clear: true is passed, the method considers that argument as an\r\n * \"ineffective\" argument because calling datepicker.setDate() with those\r\n * values makes no changes to the date selection.\r\n *\r\n * When the allowOneSidedRange config option is false, passing {clear: true}\r\n * to clear the range works only when it is done to the last effective\r\n * argument (in other words, passed to rangeEnd or to rangeStart along with\r\n * ineffective rangeEnd). This is because when the date range is changed,\r\n * it gets normalized based on the last change at the end of the changing\r\n * process.\r\n *\r\n * @param {Date|Number|String|Object} rangeStart - Start date of the range\r\n * or {clear: true} to clear the date\r\n * @param {Date|Number|String|Object} rangeEnd - End date of the range\r\n * or {clear: true} to clear the date\r\n */\n }, {\n key: \"setDates\",\n value: function setDates(rangeStart, rangeEnd) {\n var _this$datepickers = _slicedToArray(this.datepickers, 2),\n datepicker0 = _this$datepickers[0],\n datepicker1 = _this$datepickers[1];\n var origDates = this.dates;\n\n // If range normalization runs on every change, we can't set a new range\n // that starts after the end of the current range correctly because the\n // normalization process swaps start\u2194\uFE0Eend right after setting the new start\n // date. To prevent this, the normalization process needs to run once after\n // both of the new dates are set.\n this._updating = true;\n datepicker0.setDate(rangeStart);\n datepicker1.setDate(rangeEnd);\n delete this._updating;\n if (datepicker1.dates[0] !== origDates[1]) {\n onChangeDate(this, {\n target: this.inputs[1]\n });\n } else if (datepicker0.dates[0] !== origDates[0]) {\n onChangeDate(this, {\n target: this.inputs[0]\n });\n }\n }\n }]);\n}();\n\nexports.DateRangePicker = DateRangePicker;\nexports.Datepicker = Datepicker;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { AccordionItem, AccordionOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { AccordionInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: AccordionOptions = {\n alwaysOpen: false,\n activeClasses: 'bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white',\n inactiveClasses: 'text-gray-500 dark:text-gray-400',\n onOpen: () => {},\n onClose: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Accordion implements AccordionInterface {\n _instanceId: string;\n _accordionEl: HTMLElement;\n _items: AccordionItem[];\n _options: AccordionOptions;\n _clickHandler: EventListenerOrEventListenerObject;\n _initialized: boolean;\n\n constructor(\n accordionEl: HTMLElement | null = null,\n items: AccordionItem[] = [],\n options: AccordionOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : accordionEl.id;\n this._accordionEl = accordionEl;\n this._items = items;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Accordion',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._items.length && !this._initialized) {\n // show accordion item based on click\n this._items.forEach((item) => {\n if (item.active) {\n this.open(item.id);\n }\n\n const clickHandler = () => {\n this.toggle(item.id);\n };\n\n item.triggerEl.addEventListener('click', clickHandler);\n\n // Store the clickHandler in a property of the item for removal later\n item.clickHandler = clickHandler;\n });\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._items.length && this._initialized) {\n this._items.forEach((item) => {\n item.triggerEl.removeEventListener('click', item.clickHandler);\n\n // Clean up by deleting the clickHandler property from the item\n delete item.clickHandler;\n });\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Accordion', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getItem(id: string) {\n return this._items.filter((item) => item.id === id)[0];\n }\n\n open(id: string) {\n const item = this.getItem(id);\n\n // don't hide other accordions if always open\n if (!this._options.alwaysOpen) {\n this._items.map((i) => {\n if (i !== item) {\n i.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n i.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n i.targetEl.classList.add('hidden');\n i.triggerEl.setAttribute('aria-expanded', 'false');\n i.active = false;\n\n // rotate icon if set\n if (i.iconEl) {\n i.iconEl.classList.add('rotate-180');\n }\n }\n });\n }\n\n // show active item\n item.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n item.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n item.triggerEl.setAttribute('aria-expanded', 'true');\n item.targetEl.classList.remove('hidden');\n item.active = true;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.remove('rotate-180');\n }\n\n // callback function\n this._options.onOpen(this, item);\n }\n\n toggle(id: string) {\n const item = this.getItem(id);\n\n if (item.active) {\n this.close(id);\n } else {\n this.open(id);\n }\n\n // callback function\n this._options.onToggle(this, item);\n }\n\n close(id: string) {\n const item = this.getItem(id);\n\n item.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n item.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n item.targetEl.classList.add('hidden');\n item.triggerEl.setAttribute('aria-expanded', 'false');\n item.active = false;\n\n // rotate icon if set\n if (item.iconEl) {\n item.iconEl.classList.add('rotate-180');\n }\n\n // callback function\n this._options.onClose(this, item);\n }\n\n updateOnOpen(callback: () => void) {\n this._options.onOpen = callback;\n }\n\n updateOnClose(callback: () => void) {\n this._options.onClose = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initAccordions() {\n document.querySelectorAll('[data-accordion]').forEach(($accordionEl) => {\n const alwaysOpen = $accordionEl.getAttribute('data-accordion');\n const activeClasses = $accordionEl.getAttribute('data-active-classes');\n const inactiveClasses = $accordionEl.getAttribute(\n 'data-inactive-classes'\n );\n\n const items = [] as AccordionItem[];\n $accordionEl\n .querySelectorAll('[data-accordion-target]')\n .forEach(($triggerEl) => {\n // Consider only items that directly belong to $accordionEl\n // (to make nested accordions work).\n if ($triggerEl.closest('[data-accordion]') === $accordionEl) {\n const item = {\n id: $triggerEl.getAttribute('data-accordion-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-accordion-target')\n ),\n iconEl: $triggerEl.querySelector(\n '[data-accordion-icon]'\n ),\n active:\n $triggerEl.getAttribute('aria-expanded') === 'true'\n ? true\n : false,\n } as AccordionItem;\n items.push(item);\n }\n });\n\n new Accordion($accordionEl as HTMLElement, items, {\n alwaysOpen: alwaysOpen === 'open' ? true : false,\n activeClasses: activeClasses\n ? activeClasses\n : Default.activeClasses,\n inactiveClasses: inactiveClasses\n ? inactiveClasses\n : Default.inactiveClasses,\n } as AccordionOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Accordion = Accordion;\n window.initAccordions = initAccordions;\n}\n\nexport default Accordion;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport type {\n CarouselOptions,\n CarouselItem,\n IndicatorItem,\n RotationItems,\n} from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CarouselInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CarouselOptions = {\n defaultPosition: 0,\n indicators: {\n items: [],\n activeClasses: 'bg-white dark:bg-gray-800',\n inactiveClasses:\n 'bg-white/50 dark:bg-gray-800/50 hover:bg-white dark:hover:bg-gray-800',\n },\n interval: 3000,\n onNext: () => {},\n onPrev: () => {},\n onChange: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Carousel implements CarouselInterface {\n _instanceId: string;\n _carouselEl: HTMLElement;\n _items: CarouselItem[];\n _indicators: IndicatorItem[];\n _activeItem: CarouselItem;\n _intervalDuration: number;\n _intervalInstance: number;\n _options: CarouselOptions;\n _initialized: boolean;\n\n constructor(\n carouselEl: HTMLElement | null = null,\n items: CarouselItem[] = [],\n options: CarouselOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : carouselEl.id;\n this._carouselEl = carouselEl;\n this._items = items;\n this._options = {\n ...Default,\n ...options,\n indicators: { ...Default.indicators, ...options.indicators },\n };\n this._activeItem = this.getItem(this._options.defaultPosition);\n this._indicators = this._options.indicators.items;\n this._intervalDuration = this._options.interval;\n this._intervalInstance = null;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Carousel',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n /**\n * initialize carousel and items based on active one\n */\n init() {\n if (this._items.length && !this._initialized) {\n this._items.map((item: CarouselItem) => {\n item.el.classList.add(\n 'absolute',\n 'inset-0',\n 'transition-transform',\n 'transform'\n );\n });\n\n // if no active item is set then first position is default\n if (this.getActiveItem()) {\n this.slideTo(this.getActiveItem().position);\n } else {\n this.slideTo(0);\n }\n\n this._indicators.map((indicator, position) => {\n indicator.el.addEventListener('click', () => {\n this.slideTo(position);\n });\n });\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Carousel', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getItem(position: number) {\n return this._items[position];\n }\n\n /**\n * Slide to the element based on id\n * @param {*} position\n */\n slideTo(position: number) {\n const nextItem: CarouselItem = this._items[position];\n const rotationItems: RotationItems = {\n left:\n nextItem.position === 0\n ? this._items[this._items.length - 1]\n : this._items[nextItem.position - 1],\n middle: nextItem,\n right:\n nextItem.position === this._items.length - 1\n ? this._items[0]\n : this._items[nextItem.position + 1],\n };\n this._rotate(rotationItems);\n this._setActiveItem(nextItem);\n if (this._intervalInstance) {\n this.pause();\n this.cycle();\n }\n\n this._options.onChange(this);\n }\n\n /**\n * Based on the currently active item it will go to the next position\n */\n next() {\n const activeItem = this.getActiveItem();\n let nextItem = null;\n\n // check if last item\n if (activeItem.position === this._items.length - 1) {\n nextItem = this._items[0];\n } else {\n nextItem = this._items[activeItem.position + 1];\n }\n\n this.slideTo(nextItem.position);\n\n // callback function\n this._options.onNext(this);\n }\n\n /**\n * Based on the currently active item it will go to the previous position\n */\n prev() {\n const activeItem = this.getActiveItem();\n let prevItem = null;\n\n // check if first item\n if (activeItem.position === 0) {\n prevItem = this._items[this._items.length - 1];\n } else {\n prevItem = this._items[activeItem.position - 1];\n }\n\n this.slideTo(prevItem.position);\n\n // callback function\n this._options.onPrev(this);\n }\n\n /**\n * This method applies the transform classes based on the left, middle, and right rotation carousel items\n * @param {*} rotationItems\n */\n _rotate(rotationItems: RotationItems) {\n // reset\n this._items.map((item: CarouselItem) => {\n item.el.classList.add('hidden');\n });\n\n // Handling the case when there is only one item\n if (this._items.length === 1) {\n rotationItems.middle.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-10'\n );\n rotationItems.middle.el.classList.add('translate-x-0', 'z-20');\n return;\n }\n\n // left item (previously active)\n rotationItems.left.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-20'\n );\n\n rotationItems.left.el.classList.add('-translate-x-full', 'z-10');\n\n // currently active item\n rotationItems.middle.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-10'\n );\n rotationItems.middle.el.classList.add('translate-x-0', 'z-30');\n\n // right item (upcoming active)\n rotationItems.right.el.classList.remove(\n '-translate-x-full',\n 'translate-x-full',\n 'translate-x-0',\n 'hidden',\n 'z-30'\n );\n rotationItems.right.el.classList.add('translate-x-full', 'z-20');\n }\n\n /**\n * Set an interval to cycle through the carousel items\n */\n cycle() {\n if (typeof window !== 'undefined') {\n this._intervalInstance = window.setInterval(() => {\n this.next();\n }, this._intervalDuration);\n }\n }\n\n /**\n * Clears the cycling interval\n */\n pause() {\n clearInterval(this._intervalInstance);\n }\n\n /**\n * Get the currently active item\n */\n getActiveItem() {\n return this._activeItem;\n }\n\n /**\n * Set the currently active item and data attribute\n * @param {*} position\n */\n _setActiveItem(item: CarouselItem) {\n this._activeItem = item;\n const position = item.position;\n\n // update the indicators if available\n if (this._indicators.length) {\n this._indicators.map((indicator) => {\n indicator.el.setAttribute('aria-current', 'false');\n indicator.el.classList.remove(\n ...this._options.indicators.activeClasses.split(' ')\n );\n indicator.el.classList.add(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n });\n this._indicators[position].el.classList.add(\n ...this._options.indicators.activeClasses.split(' ')\n );\n this._indicators[position].el.classList.remove(\n ...this._options.indicators.inactiveClasses.split(' ')\n );\n this._indicators[position].el.setAttribute('aria-current', 'true');\n }\n }\n\n updateOnNext(callback: () => void) {\n this._options.onNext = callback;\n }\n\n updateOnPrev(callback: () => void) {\n this._options.onPrev = callback;\n }\n\n updateOnChange(callback: () => void) {\n this._options.onChange = callback;\n }\n}\n\nexport function initCarousels() {\n document.querySelectorAll('[data-carousel]').forEach(($carouselEl) => {\n const interval = $carouselEl.getAttribute('data-carousel-interval');\n const slide =\n $carouselEl.getAttribute('data-carousel') === 'slide'\n ? true\n : false;\n\n const items: CarouselItem[] = [];\n let defaultPosition = 0;\n if ($carouselEl.querySelectorAll('[data-carousel-item]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-item]')\n ).map(($carouselItemEl: HTMLElement, position: number) => {\n items.push({\n position: position,\n el: $carouselItemEl,\n });\n\n if (\n $carouselItemEl.getAttribute('data-carousel-item') ===\n 'active'\n ) {\n defaultPosition = position;\n }\n });\n }\n\n const indicators: IndicatorItem[] = [];\n if ($carouselEl.querySelectorAll('[data-carousel-slide-to]').length) {\n Array.from(\n $carouselEl.querySelectorAll('[data-carousel-slide-to]')\n ).map(($indicatorEl: HTMLElement) => {\n indicators.push({\n position: parseInt(\n $indicatorEl.getAttribute('data-carousel-slide-to')\n ),\n el: $indicatorEl,\n });\n });\n }\n\n const carousel = new Carousel($carouselEl as HTMLElement, items, {\n defaultPosition: defaultPosition,\n indicators: {\n items: indicators,\n },\n interval: interval ? interval : Default.interval,\n } as CarouselOptions);\n\n if (slide) {\n carousel.cycle();\n }\n\n // check for controls\n const carouselNextEl = $carouselEl.querySelector(\n '[data-carousel-next]'\n );\n const carouselPrevEl = $carouselEl.querySelector(\n '[data-carousel-prev]'\n );\n\n if (carouselNextEl) {\n carouselNextEl.addEventListener('click', () => {\n carousel.next();\n });\n }\n\n if (carouselPrevEl) {\n carouselPrevEl.addEventListener('click', () => {\n carousel.prev();\n });\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Carousel = Carousel;\n window.initCarousels = initCarousels;\n}\n\nexport default Carousel;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CopyClipboardOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CopyClipboardInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CopyClipboardOptions = {\n htmlEntities: false,\n contentType: 'input',\n onCopy: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass CopyClipboard implements CopyClipboardInterface {\n _instanceId: string;\n _triggerEl: HTMLElement | null;\n _targetEl: HTMLInputElement | null;\n _options: CopyClipboardOptions;\n _initialized: boolean;\n _triggerElClickHandler: EventListenerOrEventListenerObject;\n _inputHandler: EventListenerOrEventListenerObject;\n\n constructor(\n triggerEl: HTMLElement | null = null,\n targetEl: HTMLInputElement | null = null,\n options: CopyClipboardOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n\n this._triggerEl = triggerEl;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._initialized = false;\n\n this.init();\n instances.addInstance(\n 'CopyClipboard',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._targetEl && this._triggerEl && !this._initialized) {\n this._triggerElClickHandler = () => {\n this.copy();\n };\n\n // clicking on the trigger element should copy the value of the target element\n if (this._triggerEl) {\n this._triggerEl.addEventListener(\n 'click',\n this._triggerElClickHandler\n );\n }\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._triggerEl && this._targetEl && this._initialized) {\n if (this._triggerEl) {\n this._triggerEl.removeEventListener(\n 'click',\n this._triggerElClickHandler\n );\n }\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('CopyClipboard', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getTargetValue() {\n if (this._options.contentType === 'input') {\n return this._targetEl.value;\n }\n\n if (this._options.contentType === 'innerHTML') {\n return this._targetEl.innerHTML;\n }\n\n if (this._options.contentType === 'textContent') {\n return this._targetEl.textContent.replace(/\\s+/g, ' ').trim();\n }\n }\n\n copy() {\n let textToCopy = this.getTargetValue();\n\n // Check if HTMLEntities option is enabled\n if (this._options.htmlEntities) {\n // Encode the text using HTML entities\n textToCopy = this.decodeHTML(textToCopy);\n }\n\n // Create a temporary textarea element\n const tempTextArea = document.createElement('textarea');\n tempTextArea.value = textToCopy;\n document.body.appendChild(tempTextArea);\n\n // Select the text inside the textarea and copy it to the clipboard\n tempTextArea.select();\n document.execCommand('copy');\n\n // Remove the temporary textarea\n document.body.removeChild(tempTextArea);\n\n // Callback function\n this._options.onCopy(this);\n\n return textToCopy;\n }\n\n // Function to encode text into HTML entities\n decodeHTML(html: string) {\n const textarea = document.createElement('textarea');\n textarea.innerHTML = html;\n return textarea.textContent;\n }\n\n updateOnCopyCallback(callback: () => void) {\n this._options.onCopy = callback;\n }\n}\n\nexport function initCopyClipboards() {\n document\n .querySelectorAll('[data-copy-to-clipboard-target]')\n .forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute(\n 'data-copy-to-clipboard-target'\n );\n const $targetEl = document.getElementById(targetId);\n const contentType = $triggerEl.getAttribute(\n 'data-copy-to-clipboard-content-type'\n );\n const htmlEntities = $triggerEl.getAttribute(\n 'data-copy-to-clipboard-html-entities'\n );\n\n // check if the target element exists\n if ($targetEl) {\n if (\n !instances.instanceExists(\n 'CopyClipboard',\n $targetEl.getAttribute('id')\n )\n ) {\n new CopyClipboard(\n $triggerEl as HTMLElement,\n $targetEl as HTMLInputElement,\n {\n htmlEntities:\n htmlEntities && htmlEntities === 'true'\n ? true\n : Default.htmlEntities,\n contentType: contentType\n ? contentType\n : Default.contentType,\n } as CopyClipboardOptions\n );\n }\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-copy-to-clipboard-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.CopyClipboard = CopyClipboard;\n window.initClipboards = initCopyClipboards;\n}\n\nexport default CopyClipboard;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { CollapseOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { CollapseInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: CollapseOptions = {\n onCollapse: () => {},\n onExpand: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Collapse implements CollapseInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: CollapseOptions;\n _visible: boolean;\n _initialized: boolean;\n _clickHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: CollapseOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Collapse',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n if (this._triggerEl.hasAttribute('aria-expanded')) {\n this._visible =\n this._triggerEl.getAttribute('aria-expanded') === 'true';\n } else {\n // fix until v2 not to break previous single collapses which became dismiss\n this._visible = !this._targetEl.classList.contains('hidden');\n }\n\n this._clickHandler = () => {\n this.toggle();\n };\n\n this._triggerEl.addEventListener('click', this._clickHandler);\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._triggerEl && this._initialized) {\n this._triggerEl.removeEventListener('click', this._clickHandler);\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Collapse', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n collapse() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onCollapse(this);\n }\n\n expand() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onExpand(this);\n }\n\n toggle() {\n if (this._visible) {\n this.collapse();\n } else {\n this.expand();\n }\n // callback function\n this._options.onToggle(this);\n }\n\n updateOnCollapse(callback: () => void) {\n this._options.onCollapse = callback;\n }\n\n updateOnExpand(callback: () => void) {\n this._options.onExpand = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initCollapses() {\n document\n .querySelectorAll('[data-collapse-toggle]')\n .forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-collapse-toggle');\n const $targetEl = document.getElementById(targetId);\n\n // check if the target element exists\n if ($targetEl) {\n if (\n !instances.instanceExists(\n 'Collapse',\n $targetEl.getAttribute('id')\n )\n ) {\n new Collapse(\n $targetEl as HTMLElement,\n $triggerEl as HTMLElement\n );\n } else {\n // if instance exists already for the same target element then create a new one with a different trigger element\n new Collapse(\n $targetEl as HTMLElement,\n $triggerEl as HTMLElement,\n {},\n {\n id:\n $targetEl.getAttribute('id') +\n '_' +\n instances._generateRandomId(),\n }\n );\n }\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-collapse-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Collapse = Collapse;\n window.initCollapses = initCollapses;\n}\n\nexport default Collapse;\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DatepickerOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DatepickerInterface } from './interface';\nimport instances from '../../dom/instances';\n\nimport {\n Datepicker as FlowbiteDatepicker,\n DateRangePicker as FlowbiteDateRangePicker,\n} from 'flowbite-datepicker';\n\nconst Default: DatepickerOptions = {\n defaultDatepickerId: null,\n autohide: false,\n format: 'mm/dd/yyyy',\n maxDate: null,\n minDate: null,\n orientation: 'bottom',\n buttons: false,\n autoSelectToday: 0,\n title: null,\n language: 'en',\n rangePicker: false,\n onShow: () => {},\n onHide: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Datepicker implements DatepickerInterface {\n _instanceId: string;\n _datepickerEl: HTMLElement;\n _datepickerInstance: FlowbiteDatepicker | FlowbiteDateRangePicker | null;\n _options: DatepickerOptions;\n _initialized: boolean;\n\n constructor(\n datepickerEl: HTMLElement | null = null,\n options: DatepickerOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : datepickerEl.id;\n this._datepickerEl = datepickerEl;\n this._datepickerInstance = null;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Datepicker',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._datepickerEl && !this._initialized) {\n if (this._options.rangePicker) {\n this._datepickerInstance = new FlowbiteDateRangePicker(\n this._datepickerEl,\n this._getDatepickerOptions(this._options)\n );\n } else {\n this._datepickerInstance = new FlowbiteDatepicker(\n this._datepickerEl,\n this._getDatepickerOptions(this._options)\n );\n }\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this._initialized = false;\n this._datepickerInstance.destroy();\n }\n }\n\n removeInstance() {\n this.destroy();\n instances.removeInstance('Datepicker', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getDatepickerInstance() {\n return this._datepickerInstance;\n }\n\n getDate() {\n if (\n this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDateRangePicker\n ) {\n return this._datepickerInstance.getDates();\n }\n\n if (\n !this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDatepicker\n ) {\n return this._datepickerInstance.getDate();\n }\n }\n\n setDate(date: any) {\n if (\n this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDateRangePicker\n ) {\n return this._datepickerInstance.setDates(date);\n }\n\n if (\n !this._options.rangePicker &&\n this._datepickerInstance instanceof FlowbiteDatepicker\n ) {\n return this._datepickerInstance.setDate(date);\n }\n }\n\n show() {\n this._datepickerInstance.show();\n this._options.onShow(this);\n }\n\n hide() {\n this._datepickerInstance.hide();\n this._options.onHide(this);\n }\n\n _getDatepickerOptions(options: DatepickerOptions) {\n const datepickerOptions = {} as any;\n\n if (options.buttons) {\n datepickerOptions.todayBtn = true;\n datepickerOptions.clearBtn = true;\n\n if (options.autoSelectToday) {\n datepickerOptions.todayBtnMode = 1;\n }\n }\n\n if (options.autohide) {\n datepickerOptions.autohide = true;\n }\n\n if (options.format) {\n datepickerOptions.format = options.format;\n }\n\n if (options.maxDate) {\n datepickerOptions.maxDate = options.maxDate;\n }\n\n if (options.minDate) {\n datepickerOptions.minDate = options.minDate;\n }\n\n if (options.orientation) {\n datepickerOptions.orientation = options.orientation;\n }\n\n if (options.title) {\n datepickerOptions.title = options.title;\n }\n\n if (options.language) {\n datepickerOptions.language = options.language;\n }\n\n return datepickerOptions;\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n}\n\nexport function initDatepickers() {\n document\n .querySelectorAll(\n '[datepicker], [inline-datepicker], [date-rangepicker]'\n )\n .forEach(($datepickerEl) => {\n if ($datepickerEl) {\n const buttons =\n $datepickerEl.hasAttribute('datepicker-buttons');\n const autoselectToday = $datepickerEl.hasAttribute(\n 'datepicker-autoselect-today'\n );\n const autohide = $datepickerEl.hasAttribute(\n 'datepicker-autohide'\n );\n const format = $datepickerEl.getAttribute('datepicker-format');\n const maxDate = $datepickerEl.getAttribute(\n 'datepicker-max-date'\n );\n const minDate = $datepickerEl.getAttribute(\n 'datepicker-min-date'\n );\n const orientation = $datepickerEl.getAttribute(\n 'datepicker-orientation'\n );\n const title = $datepickerEl.getAttribute('datepicker-title');\n const language = $datepickerEl.getAttribute(\n 'datepicker-language'\n );\n const rangePicker =\n $datepickerEl.hasAttribute('date-rangepicker');\n new Datepicker(\n $datepickerEl as HTMLElement,\n {\n buttons: buttons ? buttons : Default.buttons,\n autoSelectToday: autoselectToday\n ? autoselectToday\n : Default.autoSelectToday,\n autohide: autohide ? autohide : Default.autohide,\n format: format ? format : Default.format,\n maxDate: maxDate ? maxDate : Default.maxDate,\n minDate: minDate ? minDate : Default.minDate,\n orientation: orientation\n ? orientation\n : Default.orientation,\n title: title ? title : Default.title,\n language: language ? language : Default.language,\n rangePicker: rangePicker\n ? rangePicker\n : Default.rangePicker,\n } as DatepickerOptions\n );\n } else {\n console.error(\n `The datepicker element does not exist. Please check the datepicker attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Datepicker = Datepicker;\n window.initDatepickers = initDatepickers;\n}\n\nexport default Datepicker;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DialOptions, DialTriggerType } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DialInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DialOptions = {\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Dial implements DialInterface {\n _instanceId: string;\n _parentEl: HTMLElement;\n _triggerEl: HTMLElement;\n _targetEl: HTMLElement;\n _options: DialOptions;\n _visible: boolean;\n _initialized: boolean;\n _showEventHandler: EventListenerOrEventListenerObject;\n _hideEventHandler: EventListenerOrEventListenerObject;\n\n constructor(\n parentEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n targetEl: HTMLElement | null = null,\n options: DialOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._parentEl = parentEl;\n this._triggerEl = triggerEl;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Dial',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n const triggerEventTypes = this._getTriggerEventTypes(\n this._options.triggerType\n );\n\n this._showEventHandler = () => {\n this.show();\n };\n\n triggerEventTypes.showEvents.forEach((ev: string) => {\n this._triggerEl.addEventListener(ev, this._showEventHandler);\n this._targetEl.addEventListener(ev, this._showEventHandler);\n });\n\n this._hideEventHandler = () => {\n if (!this._parentEl.matches(':hover')) {\n this.hide();\n }\n };\n\n triggerEventTypes.hideEvents.forEach((ev: string) => {\n this._parentEl.addEventListener(ev, this._hideEventHandler);\n });\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n const triggerEventTypes = this._getTriggerEventTypes(\n this._options.triggerType\n );\n\n triggerEventTypes.showEvents.forEach((ev: string) => {\n this._triggerEl.removeEventListener(ev, this._showEventHandler);\n this._targetEl.removeEventListener(ev, this._showEventHandler);\n });\n\n triggerEventTypes.hideEvents.forEach((ev: string) => {\n this._parentEl.removeEventListener(ev, this._hideEventHandler);\n });\n\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Dial', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n hide() {\n this._targetEl.classList.add('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'false');\n }\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n if (this._triggerEl) {\n this._triggerEl.setAttribute('aria-expanded', 'true');\n }\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this._visible) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n\n _getTriggerEventTypes(triggerType: DialTriggerType) {\n switch (triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initDials() {\n document.querySelectorAll('[data-dial-init]').forEach(($parentEl) => {\n const $triggerEl = $parentEl.querySelector('[data-dial-toggle]');\n\n if ($triggerEl) {\n const dialId = $triggerEl.getAttribute('data-dial-toggle');\n const $dialEl = document.getElementById(dialId);\n\n if ($dialEl) {\n const triggerType =\n $triggerEl.getAttribute('data-dial-trigger');\n new Dial(\n $parentEl as HTMLElement,\n $triggerEl as HTMLElement,\n $dialEl as HTMLElement,\n {\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as DialOptions\n );\n } else {\n console.error(\n `Dial with id ${dialId} does not exist. Are you sure that the data-dial-toggle attribute points to the correct modal id?`\n );\n }\n } else {\n console.error(\n `Dial with id ${$parentEl.id} does not have a trigger element. Are you sure that the data-dial-toggle attribute exists?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dial = Dial;\n window.initDials = initDials;\n}\n\nexport default Dial;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DismissOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DismissInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DismissOptions = {\n transition: 'transition-opacity',\n duration: 300,\n timing: 'ease-out',\n onHide: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Dismiss implements DismissInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: DismissOptions;\n _initialized: boolean;\n _clickHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: DismissOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Dismiss',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._clickHandler = () => {\n this.hide();\n };\n this._triggerEl.addEventListener('click', this._clickHandler);\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._triggerEl && this._initialized) {\n this._triggerEl.removeEventListener('click', this._clickHandler);\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Dismiss', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n hide() {\n this._targetEl.classList.add(\n this._options.transition,\n `duration-${this._options.duration}`,\n this._options.timing,\n 'opacity-0'\n );\n setTimeout(() => {\n this._targetEl.classList.add('hidden');\n }, this._options.duration);\n\n // callback function\n this._options.onHide(this, this._targetEl);\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n}\n\nexport function initDismisses() {\n document.querySelectorAll('[data-dismiss-target]').forEach(($triggerEl) => {\n const targetId = $triggerEl.getAttribute('data-dismiss-target');\n const $dismissEl = document.querySelector(targetId);\n\n if ($dismissEl) {\n new Dismiss($dismissEl as HTMLElement, $triggerEl as HTMLElement);\n } else {\n console.error(\n `The dismiss element with id \"${targetId}\" does not exist. Please check the data-dismiss-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dismiss = Dismiss;\n window.initDismisses = initDismisses;\n}\n\nexport default Dismiss;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { DrawerOptions, PlacementClasses } from './types';\nimport type { InstanceOptions, EventListenerInstance } from '../../dom/types';\nimport { DrawerInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DrawerOptions = {\n placement: 'left',\n bodyScrolling: false,\n backdrop: true,\n edge: false,\n edgeOffset: 'bottom-[60px]',\n backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-30',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Drawer implements DrawerInterface {\n _instanceId: string;\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DrawerOptions;\n _visible: boolean;\n _eventListenerInstances: EventListenerInstance[] = [];\n _handleEscapeKey: EventListenerOrEventListenerObject;\n _initialized: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: DrawerOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Drawer',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n // set initial accessibility attributes\n if (this._targetEl && !this._initialized) {\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.classList.add('transition-transform');\n\n // set base placement classes\n this._getPlacementClasses(this._options.placement).base.map((c) => {\n this._targetEl.classList.add(c);\n });\n\n this._handleEscapeKey = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n // if 'Escape' key is pressed\n if (this.isVisible()) {\n // if the Drawer is visible\n this.hide(); // hide the Drawer\n }\n }\n };\n\n // add keyboard event listener to document\n document.addEventListener('keydown', this._handleEscapeKey);\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this.removeAllEventListenerInstances();\n this._destroyBackdropEl();\n\n // Remove the keyboard event listener\n document.removeEventListener('keydown', this._handleEscapeKey);\n\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Drawer', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n hide() {\n // based on the edge option show placement classes\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.remove(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.add(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n\n // enable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.remove('overflow-hidden');\n }\n\n // destroy backdrop\n if (this._options.backdrop) {\n this._destroyBackdropEl();\n }\n\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n show() {\n if (this._options.edge) {\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).active.map((c) => {\n this._targetEl.classList.add(c);\n });\n this._getPlacementClasses(\n this._options.placement + '-edge'\n ).inactive.map((c) => {\n this._targetEl.classList.remove(c);\n });\n } else {\n this._getPlacementClasses(this._options.placement).active.map(\n (c) => {\n this._targetEl.classList.add(c);\n }\n );\n this._getPlacementClasses(this._options.placement).inactive.map(\n (c) => {\n this._targetEl.classList.remove(c);\n }\n );\n }\n\n // set accessibility attributes\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n\n // disable body scroll\n if (!this._options.bodyScrolling) {\n document.body.classList.add('overflow-hidden');\n }\n\n // show backdrop\n if (this._options.backdrop) {\n this._createBackdrop();\n }\n\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n _createBackdrop() {\n if (!this._visible) {\n const backdropEl = document.createElement('div');\n backdropEl.setAttribute('drawer-backdrop', '');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n backdropEl.addEventListener('click', () => {\n this.hide();\n });\n }\n }\n\n _destroyBackdropEl() {\n if (\n this._visible &&\n document.querySelector('[drawer-backdrop]') !== null\n ) {\n document.querySelector('[drawer-backdrop]').remove();\n }\n }\n\n _getPlacementClasses(placement: string): PlacementClasses {\n switch (placement) {\n case 'top':\n return {\n base: ['top-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['-translate-y-full'],\n };\n case 'right':\n return {\n base: ['right-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-x-full'],\n };\n case 'bottom':\n return {\n base: ['bottom-0', 'left-0', 'right-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full'],\n };\n case 'left':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n case 'bottom-edge':\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['translate-y-full', this._options.edgeOffset],\n };\n default:\n return {\n base: ['left-0', 'top-0'],\n active: ['transform-none'],\n inactive: ['-translate-x-full'],\n };\n }\n }\n\n isHidden() {\n return !this._visible;\n }\n\n isVisible() {\n return this._visible;\n }\n\n addEventListenerInstance(\n element: HTMLElement,\n type: string,\n handler: EventListenerOrEventListenerObject\n ) {\n this._eventListenerInstances.push({\n element: element,\n type: type,\n handler: handler,\n });\n }\n\n removeAllEventListenerInstances() {\n this._eventListenerInstances.map((eventListenerInstance) => {\n eventListenerInstance.element.removeEventListener(\n eventListenerInstance.type,\n eventListenerInstance.handler\n );\n });\n this._eventListenerInstances = [];\n }\n\n getAllEventListenerInstances() {\n return this._eventListenerInstances;\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initDrawers() {\n document.querySelectorAll('[data-drawer-target]').forEach(($triggerEl) => {\n // mandatory\n const drawerId = $triggerEl.getAttribute('data-drawer-target');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const placement = $triggerEl.getAttribute('data-drawer-placement');\n const bodyScrolling = $triggerEl.getAttribute(\n 'data-drawer-body-scrolling'\n );\n const backdrop = $triggerEl.getAttribute('data-drawer-backdrop');\n const edge = $triggerEl.getAttribute('data-drawer-edge');\n const edgeOffset = $triggerEl.getAttribute(\n 'data-drawer-edge-offset'\n );\n\n new Drawer($drawerEl, {\n placement: placement ? placement : Default.placement,\n bodyScrolling: bodyScrolling\n ? bodyScrolling === 'true'\n ? true\n : false\n : Default.bodyScrolling,\n backdrop: backdrop\n ? backdrop === 'true'\n ? true\n : false\n : Default.backdrop,\n edge: edge ? (edge === 'true' ? true : false) : Default.edge,\n edgeOffset: edgeOffset ? edgeOffset : Default.edgeOffset,\n } as DrawerOptions);\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-toggle]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-toggle');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInterface = instances.getInstance(\n 'Drawer',\n drawerId\n );\n\n if (drawer) {\n const toggleDrawer = () => {\n drawer.toggle();\n };\n $triggerEl.addEventListener('click', toggleDrawer);\n drawer.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n toggleDrawer\n );\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n\n document\n .querySelectorAll('[data-drawer-dismiss], [data-drawer-hide]')\n .forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-dismiss')\n ? $triggerEl.getAttribute('data-drawer-dismiss')\n : $triggerEl.getAttribute('data-drawer-hide');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInterface = instances.getInstance(\n 'Drawer',\n drawerId\n );\n\n if (drawer) {\n const hideDrawer = () => {\n drawer.hide();\n };\n $triggerEl.addEventListener('click', hideDrawer);\n drawer.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n hideDrawer\n );\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id`\n );\n }\n });\n\n document.querySelectorAll('[data-drawer-show]').forEach(($triggerEl) => {\n const drawerId = $triggerEl.getAttribute('data-drawer-show');\n const $drawerEl = document.getElementById(drawerId);\n\n if ($drawerEl) {\n const drawer: DrawerInterface = instances.getInstance(\n 'Drawer',\n drawerId\n );\n\n if (drawer) {\n const showDrawer = () => {\n drawer.show();\n };\n $triggerEl.addEventListener('click', showDrawer);\n drawer.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n showDrawer\n );\n } else {\n console.error(\n `Drawer with id ${drawerId} has not been initialized. Please initialize it using the data-drawer-target attribute.`\n );\n }\n } else {\n console.error(\n `Drawer with id ${drawerId} not found. Are you sure that the data-drawer-target attribute points to the correct drawer id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Drawer = Drawer;\n window.initDrawers = initDrawers;\n}\n\nexport default Drawer;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { DropdownOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { DropdownInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: DropdownOptions = {\n placement: 'bottom',\n triggerType: 'click',\n offsetSkidding: 0,\n offsetDistance: 10,\n delay: 300,\n ignoreClickOutsideClass: false,\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Dropdown implements DropdownInterface {\n _instanceId: string;\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: DropdownOptions;\n _visible: boolean;\n _popperInstance: PopperInstance;\n _initialized: boolean;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _hoverShowTriggerElHandler: EventListenerOrEventListenerObject;\n _hoverShowTargetElHandler: EventListenerOrEventListenerObject;\n _hoverHideHandler: EventListenerOrEventListenerObject;\n _clickHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetElement: HTMLElement | null = null,\n triggerElement: HTMLElement | null = null,\n options: DropdownOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetElement.id;\n this._targetEl = targetElement;\n this._triggerEl = triggerElement;\n this._options = { ...Default, ...options };\n this._popperInstance = null;\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Dropdown',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._popperInstance = this._createPopperInstance();\n this._setupEventListeners();\n this._initialized = true;\n }\n }\n\n destroy() {\n const triggerEvents = this._getTriggerEvents();\n\n // Remove click event listeners for trigger element\n if (this._options.triggerType === 'click') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._clickHandler);\n });\n }\n\n // Remove hover event listeners for trigger and target elements\n if (this._options.triggerType === 'hover') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(\n ev,\n this._hoverShowTriggerElHandler\n );\n this._targetEl.removeEventListener(\n ev,\n this._hoverShowTargetElHandler\n );\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._hoverHideHandler);\n this._targetEl.removeEventListener(ev, this._hoverHideHandler);\n });\n }\n\n this._popperInstance.destroy();\n this._initialized = false;\n }\n\n removeInstance() {\n instances.removeInstance('Dropdown', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n this._clickHandler = () => {\n this.toggle();\n };\n\n // click event handling for trigger element\n if (this._options.triggerType === 'click') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._clickHandler);\n });\n }\n\n this._hoverShowTriggerElHandler = (ev) => {\n if (ev.type === 'click') {\n this.toggle();\n } else {\n setTimeout(() => {\n this.show();\n }, this._options.delay);\n }\n };\n this._hoverShowTargetElHandler = () => {\n this.show();\n };\n\n this._hoverHideHandler = () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, this._options.delay);\n };\n\n // hover event handling for trigger element\n if (this._options.triggerType === 'hover') {\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(\n ev,\n this._hoverShowTriggerElHandler\n );\n this._targetEl.addEventListener(\n ev,\n this._hoverShowTargetElHandler\n );\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._hoverHideHandler);\n this._targetEl.addEventListener(ev, this._hoverHideHandler);\n });\n }\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [\n this._options.offsetSkidding,\n this._options.offsetDistance,\n ],\n },\n },\n ],\n });\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n\n // Ignore clicks on the trigger element (ie. a datepicker input)\n const ignoreClickOutsideClass = this._options.ignoreClickOutsideClass;\n\n let isIgnored = false;\n if (ignoreClickOutsideClass) {\n const ignoredClickOutsideEls = document.querySelectorAll(\n `.${ignoreClickOutsideClass}`\n );\n ignoredClickOutsideEls.forEach((el) => {\n if (el.contains(clickedEl)) {\n isIgnored = true;\n return;\n }\n });\n }\n\n // Ignore clicks on the target element (ie. dropdown itself)\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n !isIgnored &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'click'],\n hideEvents: ['mouseleave'],\n };\n case 'click':\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['click'],\n hideEvents: [],\n };\n }\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n isVisible() {\n return this._visible;\n }\n\n show() {\n this._targetEl.classList.remove('hidden');\n this._targetEl.classList.add('block');\n this._targetEl.removeAttribute('aria-hidden');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n this._setupClickOutsideListener();\n\n // Update its position\n this._popperInstance.update();\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('block');\n this._targetEl.classList.add('hidden');\n this._targetEl.setAttribute('aria-hidden', 'true');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n this._visible = false;\n\n this._removeClickOutsideListener();\n\n // callback function\n this._options.onHide(this);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initDropdowns() {\n document\n .querySelectorAll('[data-dropdown-toggle]')\n .forEach(($triggerEl) => {\n const dropdownId = $triggerEl.getAttribute('data-dropdown-toggle');\n const $dropdownEl = document.getElementById(dropdownId);\n\n if ($dropdownEl) {\n const placement = $triggerEl.getAttribute(\n 'data-dropdown-placement'\n );\n const offsetSkidding = $triggerEl.getAttribute(\n 'data-dropdown-offset-skidding'\n );\n const offsetDistance = $triggerEl.getAttribute(\n 'data-dropdown-offset-distance'\n );\n const triggerType = $triggerEl.getAttribute(\n 'data-dropdown-trigger'\n );\n const delay = $triggerEl.getAttribute('data-dropdown-delay');\n const ignoreClickOutsideClass = $triggerEl.getAttribute(\n 'data-dropdown-ignore-click-outside-class'\n );\n\n new Dropdown(\n $dropdownEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n offsetSkidding: offsetSkidding\n ? parseInt(offsetSkidding)\n : Default.offsetSkidding,\n offsetDistance: offsetDistance\n ? parseInt(offsetDistance)\n : Default.offsetDistance,\n delay: delay ? parseInt(delay) : Default.delay,\n ignoreClickOutsideClass: ignoreClickOutsideClass\n ? ignoreClickOutsideClass\n : Default.ignoreClickOutsideClass,\n } as DropdownOptions\n );\n } else {\n console.error(\n `The dropdown element with id \"${dropdownId}\" does not exist. Please check the data-dropdown-toggle attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Dropdown = Dropdown;\n window.initDropdowns = initDropdowns;\n}\n\nexport default Dropdown;\n", "import { initAccordions } from './accordion';\nimport { initCarousels } from './carousel';\nimport { initCopyClipboards } from './clipboard';\nimport { initCollapses } from './collapse';\nimport { initDials } from './dial';\nimport { initDismisses } from './dismiss';\nimport { initDrawers } from './drawer';\nimport { initDropdowns } from './dropdown';\nimport { initInputCounters } from './input-counter';\nimport { initModals } from './modal';\nimport { initPopovers } from './popover';\nimport { initTabs } from './tabs';\nimport { initTooltips } from './tooltip';\nimport { initDatepickers } from './datepicker';\n\nexport function initFlowbite() {\n initAccordions();\n initCollapses();\n initCarousels();\n initDismisses();\n initDropdowns();\n initModals();\n initDrawers();\n initTabs();\n initTooltips();\n initPopovers();\n initDials();\n initInputCounters();\n initCopyClipboards();\n initDatepickers();\n}\n\nif (typeof window !== 'undefined') {\n window.initFlowbite = initFlowbite;\n}\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { InputCounterOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { InputCounterInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: InputCounterOptions = {\n minValue: null,\n maxValue: null,\n onIncrement: () => {},\n onDecrement: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass InputCounter implements InputCounterInterface {\n _instanceId: string;\n _targetEl: HTMLInputElement | null;\n _incrementEl: HTMLElement | null;\n _decrementEl: HTMLElement | null;\n _options: InputCounterOptions;\n _initialized: boolean;\n _incrementClickHandler: EventListenerOrEventListenerObject;\n _decrementClickHandler: EventListenerOrEventListenerObject;\n _inputHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLInputElement | null = null,\n incrementEl: HTMLElement | null = null,\n decrementEl: HTMLElement | null = null,\n options: InputCounterOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n\n this._targetEl = targetEl;\n this._incrementEl = incrementEl;\n this._decrementEl = decrementEl;\n this._options = { ...Default, ...options };\n this._initialized = false;\n\n this.init();\n instances.addInstance(\n 'InputCounter',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._targetEl && !this._initialized) {\n this._inputHandler = (event) => {\n {\n const target = event.target as HTMLInputElement;\n\n // check if the value is numeric\n if (!/^\\d*$/.test(target.value)) {\n // Regex to check if the value is numeric\n target.value = target.value.replace(/[^\\d]/g, ''); // Remove non-numeric characters\n }\n\n // check for max value\n if (\n this._options.maxValue !== null &&\n parseInt(target.value) > this._options.maxValue\n ) {\n target.value = this._options.maxValue.toString();\n }\n\n // check for min value\n if (\n this._options.minValue !== null &&\n parseInt(target.value) < this._options.minValue\n ) {\n target.value = this._options.minValue.toString();\n }\n }\n };\n\n this._incrementClickHandler = () => {\n this.increment();\n };\n\n this._decrementClickHandler = () => {\n this.decrement();\n };\n\n // Add event listener to restrict input to numeric values only\n this._targetEl.addEventListener('input', this._inputHandler);\n\n if (this._incrementEl) {\n this._incrementEl.addEventListener(\n 'click',\n this._incrementClickHandler\n );\n }\n\n if (this._decrementEl) {\n this._decrementEl.addEventListener(\n 'click',\n this._decrementClickHandler\n );\n }\n\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._targetEl && this._initialized) {\n this._targetEl.removeEventListener('input', this._inputHandler);\n\n if (this._incrementEl) {\n this._incrementEl.removeEventListener(\n 'click',\n this._incrementClickHandler\n );\n }\n if (this._decrementEl) {\n this._decrementEl.removeEventListener(\n 'click',\n this._decrementClickHandler\n );\n }\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('InputCounter', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getCurrentValue() {\n return parseInt(this._targetEl.value) || 0;\n }\n\n increment() {\n // don't increment if the value is already at the maximum value\n if (\n this._options.maxValue !== null &&\n this.getCurrentValue() >= this._options.maxValue\n ) {\n return;\n }\n\n this._targetEl.value = (this.getCurrentValue() + 1).toString();\n this._options.onIncrement(this);\n }\n\n decrement() {\n // don't decrement if the value is already at the minimum value\n if (\n this._options.minValue !== null &&\n this.getCurrentValue() <= this._options.minValue\n ) {\n return;\n }\n\n this._targetEl.value = (this.getCurrentValue() - 1).toString();\n this._options.onDecrement(this);\n }\n\n updateOnIncrement(callback: () => void) {\n this._options.onIncrement = callback;\n }\n\n updateOnDecrement(callback: () => void) {\n this._options.onDecrement = callback;\n }\n}\n\nexport function initInputCounters() {\n document.querySelectorAll('[data-input-counter]').forEach(($targetEl) => {\n const targetId = $targetEl.id;\n\n const $incrementEl = document.querySelector(\n '[data-input-counter-increment=\"' + targetId + '\"]'\n );\n\n const $decrementEl = document.querySelector(\n '[data-input-counter-decrement=\"' + targetId + '\"]'\n );\n\n const minValue = $targetEl.getAttribute('data-input-counter-min');\n const maxValue = $targetEl.getAttribute('data-input-counter-max');\n\n // check if the target element exists\n if ($targetEl) {\n if (\n !instances.instanceExists(\n 'InputCounter',\n $targetEl.getAttribute('id')\n )\n ) {\n new InputCounter(\n $targetEl as HTMLInputElement,\n $incrementEl ? ($incrementEl as HTMLElement) : null,\n $decrementEl ? ($decrementEl as HTMLElement) : null,\n {\n minValue: minValue ? parseInt(minValue) : null,\n maxValue: maxValue ? parseInt(maxValue) : null,\n } as InputCounterOptions\n );\n }\n } else {\n console.error(\n `The target element with id \"${targetId}\" does not exist. Please check the data-input-counter attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.InputCounter = InputCounter;\n window.initInputCounters = initInputCounters;\n}\n\nexport default InputCounter;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { ModalOptions } from './types';\nimport type { InstanceOptions, EventListenerInstance } from '../../dom/types';\nimport { ModalInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: ModalOptions = {\n placement: 'center',\n backdropClasses: 'bg-gray-900/50 dark:bg-gray-900/80 fixed inset-0 z-40',\n backdrop: 'dynamic',\n closable: true,\n onHide: () => {},\n onShow: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Modal implements ModalInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _options: ModalOptions;\n _isHidden: boolean;\n _backdropEl: HTMLElement | null;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _eventListenerInstances: EventListenerInstance[] = [];\n _initialized: boolean;\n\n constructor(\n targetEl: HTMLElement | null = null,\n options: ModalOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._options = { ...Default, ...options };\n this._isHidden = true;\n this._backdropEl = null;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Modal',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._targetEl && !this._initialized) {\n this._getPlacementClasses().map((c) => {\n this._targetEl.classList.add(c);\n });\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n this.removeAllEventListenerInstances();\n this._destroyBackdropEl();\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Modal', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _createBackdrop() {\n if (this._isHidden) {\n const backdropEl = document.createElement('div');\n backdropEl.classList.add(\n ...this._options.backdropClasses.split(' ')\n );\n document.querySelector('body').append(backdropEl);\n this._backdropEl = backdropEl;\n }\n }\n\n _destroyBackdropEl() {\n if (!this._isHidden && this._backdropEl) {\n this._backdropEl.remove();\n this._backdropEl = null;\n }\n }\n\n _setupModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleOutsideClick(ev.target);\n };\n this._targetEl.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeModalCloseEventListeners() {\n if (this._options.backdrop === 'dynamic') {\n this._targetEl.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _handleOutsideClick(target: EventTarget) {\n if (\n target === this._targetEl ||\n (target === this._backdropEl && this.isVisible())\n ) {\n this.hide();\n }\n }\n\n _getPlacementClasses() {\n switch (this._options.placement) {\n // top\n case 'top-left':\n return ['justify-start', 'items-start'];\n case 'top-center':\n return ['justify-center', 'items-start'];\n case 'top-right':\n return ['justify-end', 'items-start'];\n\n // center\n case 'center-left':\n return ['justify-start', 'items-center'];\n case 'center':\n return ['justify-center', 'items-center'];\n case 'center-right':\n return ['justify-end', 'items-center'];\n\n // bottom\n case 'bottom-left':\n return ['justify-start', 'items-end'];\n case 'bottom-center':\n return ['justify-center', 'items-end'];\n case 'bottom-right':\n return ['justify-end', 'items-end'];\n\n default:\n return ['justify-center', 'items-center'];\n }\n }\n\n toggle() {\n if (this._isHidden) {\n this.show();\n } else {\n this.hide();\n }\n\n // callback function\n this._options.onToggle(this);\n }\n\n show() {\n if (this.isHidden) {\n this._targetEl.classList.add('flex');\n this._targetEl.classList.remove('hidden');\n this._targetEl.setAttribute('aria-modal', 'true');\n this._targetEl.setAttribute('role', 'dialog');\n this._targetEl.removeAttribute('aria-hidden');\n this._createBackdrop();\n this._isHidden = false;\n\n // Add keyboard event listener to the document\n if (this._options.closable) {\n this._setupModalCloseEventListeners();\n }\n\n // prevent body scroll\n document.body.classList.add('overflow-hidden');\n\n // callback function\n this._options.onShow(this);\n }\n }\n\n hide() {\n if (this.isVisible) {\n this._targetEl.classList.add('hidden');\n this._targetEl.classList.remove('flex');\n this._targetEl.setAttribute('aria-hidden', 'true');\n this._targetEl.removeAttribute('aria-modal');\n this._targetEl.removeAttribute('role');\n this._destroyBackdropEl();\n this._isHidden = true;\n\n // re-apply body scroll\n document.body.classList.remove('overflow-hidden');\n\n if (this._options.closable) {\n this._removeModalCloseEventListeners();\n }\n\n // callback function\n this._options.onHide(this);\n }\n }\n\n isVisible() {\n return !this._isHidden;\n }\n\n isHidden() {\n return this._isHidden;\n }\n\n addEventListenerInstance(\n element: HTMLElement,\n type: string,\n handler: EventListenerOrEventListenerObject\n ) {\n this._eventListenerInstances.push({\n element: element,\n type: type,\n handler: handler,\n });\n }\n\n removeAllEventListenerInstances() {\n this._eventListenerInstances.map((eventListenerInstance) => {\n eventListenerInstance.element.removeEventListener(\n eventListenerInstance.type,\n eventListenerInstance.handler\n );\n });\n this._eventListenerInstances = [];\n }\n\n getAllEventListenerInstances() {\n return this._eventListenerInstances;\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initModals() {\n // initiate modal based on data-modal-target\n document.querySelectorAll('[data-modal-target]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-target');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const placement = $modalEl.getAttribute('data-modal-placement');\n const backdrop = $modalEl.getAttribute('data-modal-backdrop');\n new Modal(\n $modalEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n backdrop: backdrop ? backdrop : Default.backdrop,\n } as ModalOptions\n );\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-target attribute points to the correct modal id?.`\n );\n }\n });\n\n // toggle modal visibility\n document.querySelectorAll('[data-modal-toggle]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-toggle');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInterface = instances.getInstance(\n 'Modal',\n modalId\n );\n\n if (modal) {\n const toggleModal = () => {\n modal.toggle();\n };\n $triggerEl.addEventListener('click', toggleModal);\n modal.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n toggleModal\n );\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-toggle attribute points to the correct modal id?`\n );\n }\n });\n\n // show modal on click if exists based on id\n document.querySelectorAll('[data-modal-show]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-show');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInterface = instances.getInstance(\n 'Modal',\n modalId\n );\n\n if (modal) {\n const showModal = () => {\n modal.show();\n };\n $triggerEl.addEventListener('click', showModal);\n modal.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n showModal\n );\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-show attribute points to the correct modal id?`\n );\n }\n });\n\n // hide modal on click if exists based on id\n document.querySelectorAll('[data-modal-hide]').forEach(($triggerEl) => {\n const modalId = $triggerEl.getAttribute('data-modal-hide');\n const $modalEl = document.getElementById(modalId);\n\n if ($modalEl) {\n const modal: ModalInterface = instances.getInstance(\n 'Modal',\n modalId\n );\n\n if (modal) {\n const hideModal = () => {\n modal.hide();\n };\n $triggerEl.addEventListener('click', hideModal);\n modal.addEventListenerInstance(\n $triggerEl as HTMLElement,\n 'click',\n hideModal\n );\n } else {\n console.error(\n `Modal with id ${modalId} has not been initialized. Please initialize it using the data-modal-target attribute.`\n );\n }\n } else {\n console.error(\n `Modal with id ${modalId} does not exist. Are you sure that the data-modal-hide attribute points to the correct modal id?`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Modal = Modal;\n window.initModals = initModals;\n}\n\nexport default Modal;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { PopoverOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { PopoverInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: PopoverOptions = {\n placement: 'top',\n offset: 10,\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Popover implements PopoverInterface {\n _instanceId: string;\n _targetEl: HTMLElement;\n _triggerEl: HTMLElement;\n _options: PopoverOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n _initialized: boolean;\n _showHandler: EventListenerOrEventListenerObject;\n _hideHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: PopoverOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = null;\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Popover',\n this,\n instanceOptions.id ? instanceOptions.id : this._targetEl.id,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._setupEventListeners();\n this._popperInstance = this._createPopperInstance();\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n // remove event listeners associated with the trigger element and target element\n const triggerEvents = this._getTriggerEvents();\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._showHandler);\n this._targetEl.removeEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._hideHandler);\n this._targetEl.removeEventListener(ev, this._hideHandler);\n });\n\n // remove event listeners for keydown\n this._removeKeydownListener();\n\n // remove event listeners for click outside\n this._removeClickOutsideListener();\n\n // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance)\n if (this._popperInstance) {\n this._popperInstance.destroy();\n }\n\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Popover', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n this._showHandler = () => {\n this.show();\n };\n\n this._hideHandler = () => {\n setTimeout(() => {\n if (!this._targetEl.matches(':hover')) {\n this.hide();\n }\n }, 100);\n };\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._showHandler);\n this._targetEl.addEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._hideHandler);\n this._targetEl.addEventListener(ev, this._hideHandler);\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, this._options.offset],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n this._options.onToggle(this);\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility to true\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility to false\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initPopovers() {\n document.querySelectorAll('[data-popover-target]').forEach(($triggerEl) => {\n const popoverID = $triggerEl.getAttribute('data-popover-target');\n const $popoverEl = document.getElementById(popoverID);\n\n if ($popoverEl) {\n const triggerType = $triggerEl.getAttribute('data-popover-trigger');\n const placement = $triggerEl.getAttribute('data-popover-placement');\n const offset = $triggerEl.getAttribute('data-popover-offset');\n\n new Popover(\n $popoverEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n offset: offset ? parseInt(offset) : Default.offset,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as PopoverOptions\n );\n } else {\n console.error(\n `The popover element with id \"${popoverID}\" does not exist. Please check the data-popover-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Popover = Popover;\n window.initPopovers = initPopovers;\n}\n\nexport default Popover;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport type { TabItem, TabsOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { TabsInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: TabsOptions = {\n defaultTabId: null,\n activeClasses:\n 'text-blue-600 hover:text-blue-600 dark:text-blue-500 dark:hover:text-blue-500 border-blue-600 dark:border-blue-500',\n inactiveClasses:\n 'dark:border-transparent text-gray-500 hover:text-gray-600 dark:text-gray-400 border-gray-100 hover:border-gray-300 dark:border-gray-700 dark:hover:text-gray-300',\n onShow: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Tabs implements TabsInterface {\n _instanceId: string;\n _tabsEl: HTMLElement;\n _items: TabItem[];\n _activeTab: TabItem;\n _options: TabsOptions;\n _initialized: boolean;\n\n constructor(\n tabsEl: HTMLElement | null = null,\n items: TabItem[] = [],\n options: TabsOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id ? instanceOptions.id : tabsEl.id;\n this._tabsEl = tabsEl;\n this._items = items;\n this._activeTab = options ? this.getTab(options.defaultTabId) : null;\n this._options = { ...Default, ...options };\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Tabs',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._items.length && !this._initialized) {\n // set the first tab as active if not set by explicitly\n if (!this._activeTab) {\n this.setActiveTab(this._items[0]);\n }\n\n // force show the first default tab\n this.show(this._activeTab.id, true);\n\n // show tab content based on click\n this._items.map((tab) => {\n tab.triggerEl.addEventListener('click', (event) => {\n event.preventDefault();\n this.show(tab.id);\n });\n });\n }\n }\n\n destroy() {\n if (this._initialized) {\n this._initialized = false;\n }\n }\n\n removeInstance() {\n this.destroy();\n instances.removeInstance('Tabs', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n getActiveTab() {\n return this._activeTab;\n }\n\n setActiveTab(tab: TabItem) {\n this._activeTab = tab;\n }\n\n getTab(id: string) {\n return this._items.filter((t) => t.id === id)[0];\n }\n\n show(id: string, forceShow = false) {\n const tab = this.getTab(id);\n\n // don't do anything if already active\n if (tab === this._activeTab && !forceShow) {\n return;\n }\n\n // hide other tabs\n this._items.map((t: TabItem) => {\n if (t !== tab) {\n t.triggerEl.classList.remove(\n ...this._options.activeClasses.split(' ')\n );\n t.triggerEl.classList.add(\n ...this._options.inactiveClasses.split(' ')\n );\n t.targetEl.classList.add('hidden');\n t.triggerEl.setAttribute('aria-selected', 'false');\n }\n });\n\n // show active tab\n tab.triggerEl.classList.add(...this._options.activeClasses.split(' '));\n tab.triggerEl.classList.remove(\n ...this._options.inactiveClasses.split(' ')\n );\n tab.triggerEl.setAttribute('aria-selected', 'true');\n tab.targetEl.classList.remove('hidden');\n\n this.setActiveTab(tab);\n\n // callback function\n this._options.onShow(this, tab);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n}\n\nexport function initTabs() {\n document.querySelectorAll('[data-tabs-toggle]').forEach(($parentEl) => {\n const tabItems: TabItem[] = [];\n const activeClasses = $parentEl.getAttribute(\n 'data-tabs-active-classes'\n );\n const inactiveClasses = $parentEl.getAttribute(\n 'data-tabs-inactive-classes'\n );\n let defaultTabId = null;\n $parentEl\n .querySelectorAll('[role=\"tab\"]')\n .forEach(($triggerEl: HTMLElement) => {\n const isActive =\n $triggerEl.getAttribute('aria-selected') === 'true';\n const tab: TabItem = {\n id: $triggerEl.getAttribute('data-tabs-target'),\n triggerEl: $triggerEl,\n targetEl: document.querySelector(\n $triggerEl.getAttribute('data-tabs-target')\n ),\n };\n tabItems.push(tab);\n\n if (isActive) {\n defaultTabId = tab.id;\n }\n });\n\n new Tabs($parentEl as HTMLElement, tabItems, {\n defaultTabId: defaultTabId,\n activeClasses: activeClasses\n ? activeClasses\n : Default.activeClasses,\n inactiveClasses: inactiveClasses\n ? inactiveClasses\n : Default.inactiveClasses,\n } as TabsOptions);\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tabs = Tabs;\n window.initTabs = initTabs;\n}\n\nexport default Tabs;\n", "/* eslint-disable @typescript-eslint/no-empty-function */\nimport { createPopper } from '@popperjs/core';\nimport type {\n Options as PopperOptions,\n Instance as PopperInstance,\n} from '@popperjs/core';\nimport type { TooltipOptions } from './types';\nimport type { InstanceOptions } from '../../dom/types';\nimport { TooltipInterface } from './interface';\nimport instances from '../../dom/instances';\n\nconst Default: TooltipOptions = {\n placement: 'top',\n triggerType: 'hover',\n onShow: () => {},\n onHide: () => {},\n onToggle: () => {},\n};\n\nconst DefaultInstanceOptions: InstanceOptions = {\n id: null,\n override: true,\n};\n\nclass Tooltip implements TooltipInterface {\n _instanceId: string;\n _targetEl: HTMLElement | null;\n _triggerEl: HTMLElement | null;\n _options: TooltipOptions;\n _popperInstance: PopperInstance;\n _clickOutsideEventListener: EventListenerOrEventListenerObject;\n _keydownEventListener: EventListenerOrEventListenerObject;\n _visible: boolean;\n _initialized: boolean;\n _showHandler: EventListenerOrEventListenerObject;\n _hideHandler: EventListenerOrEventListenerObject;\n\n constructor(\n targetEl: HTMLElement | null = null,\n triggerEl: HTMLElement | null = null,\n options: TooltipOptions = Default,\n instanceOptions: InstanceOptions = DefaultInstanceOptions\n ) {\n this._instanceId = instanceOptions.id\n ? instanceOptions.id\n : targetEl.id;\n this._targetEl = targetEl;\n this._triggerEl = triggerEl;\n this._options = { ...Default, ...options };\n this._popperInstance = null;\n this._visible = false;\n this._initialized = false;\n this.init();\n instances.addInstance(\n 'Tooltip',\n this,\n this._instanceId,\n instanceOptions.override\n );\n }\n\n init() {\n if (this._triggerEl && this._targetEl && !this._initialized) {\n this._setupEventListeners();\n this._popperInstance = this._createPopperInstance();\n this._initialized = true;\n }\n }\n\n destroy() {\n if (this._initialized) {\n // remove event listeners associated with the trigger element\n const triggerEvents = this._getTriggerEvents();\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.removeEventListener(ev, this._hideHandler);\n });\n\n // remove event listeners for keydown\n this._removeKeydownListener();\n\n // remove event listeners for click outside\n this._removeClickOutsideListener();\n\n // destroy the Popper instance if you have one (assuming this._popperInstance is the Popper instance)\n if (this._popperInstance) {\n this._popperInstance.destroy();\n }\n this._initialized = false;\n }\n }\n\n removeInstance() {\n instances.removeInstance('Tooltip', this._instanceId);\n }\n\n destroyAndRemoveInstance() {\n this.destroy();\n this.removeInstance();\n }\n\n _setupEventListeners() {\n const triggerEvents = this._getTriggerEvents();\n\n this._showHandler = () => {\n this.show();\n };\n\n this._hideHandler = () => {\n this.hide();\n };\n\n triggerEvents.showEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._showHandler);\n });\n\n triggerEvents.hideEvents.forEach((ev) => {\n this._triggerEl.addEventListener(ev, this._hideHandler);\n });\n }\n\n _createPopperInstance() {\n return createPopper(this._triggerEl, this._targetEl, {\n placement: this._options.placement,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: [0, 8],\n },\n },\n ],\n });\n }\n\n _getTriggerEvents() {\n switch (this._options.triggerType) {\n case 'hover':\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n case 'click':\n return {\n showEvents: ['click', 'focus'],\n hideEvents: ['focusout', 'blur'],\n };\n case 'none':\n return {\n showEvents: [],\n hideEvents: [],\n };\n default:\n return {\n showEvents: ['mouseenter', 'focus'],\n hideEvents: ['mouseleave', 'blur'],\n };\n }\n }\n\n _setupKeydownListener() {\n this._keydownEventListener = (ev: KeyboardEvent) => {\n if (ev.key === 'Escape') {\n this.hide();\n }\n };\n document.body.addEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _removeKeydownListener() {\n document.body.removeEventListener(\n 'keydown',\n this._keydownEventListener,\n true\n );\n }\n\n _setupClickOutsideListener() {\n this._clickOutsideEventListener = (ev: MouseEvent) => {\n this._handleClickOutside(ev, this._targetEl);\n };\n document.body.addEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _removeClickOutsideListener() {\n document.body.removeEventListener(\n 'click',\n this._clickOutsideEventListener,\n true\n );\n }\n\n _handleClickOutside(ev: Event, targetEl: HTMLElement) {\n const clickedEl = ev.target as Node;\n if (\n clickedEl !== targetEl &&\n !targetEl.contains(clickedEl) &&\n !this._triggerEl.contains(clickedEl) &&\n this.isVisible()\n ) {\n this.hide();\n }\n }\n\n isVisible() {\n return this._visible;\n }\n\n toggle() {\n if (this.isVisible()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n show() {\n this._targetEl.classList.remove('opacity-0', 'invisible');\n this._targetEl.classList.add('opacity-100', 'visible');\n\n // Enable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: true },\n ],\n }));\n\n // handle click outside\n this._setupClickOutsideListener();\n\n // handle esc keydown\n this._setupKeydownListener();\n\n // Update its position\n this._popperInstance.update();\n\n // set visibility\n this._visible = true;\n\n // callback function\n this._options.onShow(this);\n }\n\n hide() {\n this._targetEl.classList.remove('opacity-100', 'visible');\n this._targetEl.classList.add('opacity-0', 'invisible');\n\n // Disable the event listeners\n this._popperInstance.setOptions((options: PopperOptions) => ({\n ...options,\n modifiers: [\n ...options.modifiers,\n { name: 'eventListeners', enabled: false },\n ],\n }));\n\n // handle click outside\n this._removeClickOutsideListener();\n\n // handle esc keydown\n this._removeKeydownListener();\n\n // set visibility\n this._visible = false;\n\n // callback function\n this._options.onHide(this);\n }\n\n updateOnShow(callback: () => void) {\n this._options.onShow = callback;\n }\n\n updateOnHide(callback: () => void) {\n this._options.onHide = callback;\n }\n\n updateOnToggle(callback: () => void) {\n this._options.onToggle = callback;\n }\n}\n\nexport function initTooltips() {\n document.querySelectorAll('[data-tooltip-target]').forEach(($triggerEl) => {\n const tooltipId = $triggerEl.getAttribute('data-tooltip-target');\n const $tooltipEl = document.getElementById(tooltipId);\n\n if ($tooltipEl) {\n const triggerType = $triggerEl.getAttribute('data-tooltip-trigger');\n const placement = $triggerEl.getAttribute('data-tooltip-placement');\n\n new Tooltip(\n $tooltipEl as HTMLElement,\n $triggerEl as HTMLElement,\n {\n placement: placement ? placement : Default.placement,\n triggerType: triggerType\n ? triggerType\n : Default.triggerType,\n } as TooltipOptions\n );\n } else {\n console.error(\n `The tooltip element with id \"${tooltipId}\" does not exist. Please check the data-tooltip-target attribute.`\n );\n }\n });\n}\n\nif (typeof window !== 'undefined') {\n window.Tooltip = Tooltip;\n window.initTooltips = initTooltips;\n}\n\nexport default Tooltip;\n", "class Events {\n private _eventType: string;\n private _eventFunctions: EventListener[];\n\n constructor(eventType: string, eventFunctions: EventListener[] = []) {\n this._eventType = eventType;\n this._eventFunctions = eventFunctions;\n }\n\n init() {\n this._eventFunctions.forEach((eventFunction) => {\n if (typeof window !== 'undefined') {\n window.addEventListener(this._eventType, eventFunction);\n }\n });\n }\n}\n\nexport default Events;\n", "import { AccordionInterface } from '../components/accordion/interface';\nimport { CarouselInterface } from '../components/carousel/interface';\nimport { CollapseInterface } from '../components/collapse/interface';\nimport { DialInterface } from '../components/dial/interface';\nimport { DismissInterface } from '../components/dismiss/interface';\nimport { DrawerInterface } from '../components/drawer/interface';\nimport { DropdownInterface } from '../components/dropdown/interface';\nimport { ModalInterface } from '../components/modal/interface';\nimport { PopoverInterface } from '../components/popover/interface';\nimport { TabsInterface } from '../components/tabs/interface';\nimport { TooltipInterface } from '../components/tooltip/interface';\nimport { InputCounterInterface } from '../components/input-counter/interface';\nimport { CopyClipboardInterface } from '../components/clipboard/interface';\nimport { DatepickerInterface } from '../components/datepicker/interface';\n\nclass Instances {\n private _instances: {\n Accordion: { [id: string]: AccordionInterface };\n Carousel: { [id: string]: CarouselInterface };\n Collapse: { [id: string]: CollapseInterface };\n Dial: { [id: string]: DialInterface };\n Dismiss: { [id: string]: DismissInterface };\n Drawer: { [id: string]: DrawerInterface };\n Dropdown: { [id: string]: DropdownInterface };\n Modal: { [id: string]: ModalInterface };\n Popover: { [id: string]: PopoverInterface };\n Tabs: { [id: string]: TabsInterface };\n Tooltip: { [id: string]: TooltipInterface };\n InputCounter: { [id: string]: InputCounterInterface };\n CopyClipboard: { [id: string]: CopyClipboardInterface };\n Datepicker: { [id: string]: DatepickerInterface };\n };\n\n constructor() {\n this._instances = {\n Accordion: {},\n Carousel: {},\n Collapse: {},\n Dial: {},\n Dismiss: {},\n Drawer: {},\n Dropdown: {},\n Modal: {},\n Popover: {},\n Tabs: {},\n Tooltip: {},\n InputCounter: {},\n CopyClipboard: {},\n Datepicker: {},\n };\n }\n\n addInstance(\n component: keyof Instances['_instances'],\n instance: any,\n id?: string,\n override = false\n ) {\n if (!this._instances[component]) {\n console.warn(`Flowbite: Component ${component} does not exist.`);\n return false;\n }\n\n if (this._instances[component][id] && !override) {\n console.warn(`Flowbite: Instance with ID ${id} already exists.`);\n return;\n }\n\n if (override && this._instances[component][id]) {\n this._instances[component][id].destroyAndRemoveInstance();\n }\n\n this._instances[component][id ? id : this._generateRandomId()] =\n instance;\n }\n\n getAllInstances() {\n return this._instances;\n }\n\n getInstances(component: keyof Instances['_instances']) {\n if (!this._instances[component]) {\n console.warn(`Flowbite: Component ${component} does not exist.`);\n return false;\n }\n return this._instances[component];\n }\n\n getInstance(component: keyof Instances['_instances'], id: string) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n\n if (!this._instances[component][id]) {\n console.warn(`Flowbite: Instance with ID ${id} does not exist.`);\n return;\n }\n return this._instances[component][id] as any;\n }\n\n destroyAndRemoveInstance(\n component: keyof Instances['_instances'],\n id: string\n ) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n this.destroyInstanceObject(component, id);\n this.removeInstance(component, id);\n }\n\n removeInstance(component: keyof Instances['_instances'], id: string) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n delete this._instances[component][id];\n }\n\n destroyInstanceObject(\n component: keyof Instances['_instances'],\n id: string\n ) {\n if (!this._componentAndInstanceCheck(component, id)) {\n return;\n }\n this._instances[component][id].destroy();\n }\n\n instanceExists(component: keyof Instances['_instances'], id: string) {\n if (!this._instances[component]) {\n return false;\n }\n\n if (!this._instances[component][id]) {\n return false;\n }\n\n return true;\n }\n\n _generateRandomId() {\n return Math.random().toString(36).substr(2, 9);\n }\n\n private _componentAndInstanceCheck(\n component: keyof Instances['_instances'],\n id: string\n ) {\n if (!this._instances[component]) {\n console.warn(`Flowbite: Component ${component} does not exist.`);\n return false;\n }\n\n if (!this._instances[component][id]) {\n console.warn(`Flowbite: Instance with ID ${id} does not exist.`);\n return false;\n }\n\n return true;\n }\n}\n\nconst instances = new Instances();\n\nexport default instances;\n\nif (typeof window !== 'undefined') {\n window.FlowbiteInstances = instances;\n}\n", "// 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\t// no module.id needed\n\t\t// no module.loaded needed\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// Return the exports of the module\n\treturn module.exports;\n}\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__.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};", "// core components\nimport Accordion from './components/accordion';\nimport Carousel from './components/carousel';\nimport Collapse from './components/collapse';\nimport Dial from './components/dial';\nimport Dismiss from './components/dismiss';\nimport Drawer from './components/drawer';\nimport Dropdown from './components/dropdown';\nimport Modal from './components/modal';\nimport Popover from './components/popover';\nimport Tabs from './components/tabs';\nimport Tooltip from './components/tooltip';\nimport InputCounter from './components/input-counter';\nimport CopyClipboard from './components/clipboard';\nimport Datepicker from './components/datepicker';\nimport { initFlowbite } from './components/index';\nimport Events from './dom/events';\n\n// Since turbo maintainers refuse to add this event, we'll add it ourselves\n// https://discuss.hotwired.dev/t/event-to-know-a-turbo-stream-has-been-rendered/1554/10\nconst afterRenderEvent = new Event('turbo:after-stream-render');\naddEventListener('turbo:before-stream-render', (event: CustomEvent) => {\n const originalRender = event.detail.render;\n\n event.detail.render = function (streamElement: Element) {\n originalRender(streamElement);\n window.dispatchEvent(afterRenderEvent);\n };\n});\n\nconst turboLoadEvents = new Events('turbo:load', [initFlowbite]);\nturboLoadEvents.init();\n\nconst turboFrameLoadEvents = new Events('turbo:frame-load', [initFlowbite]);\nturboFrameLoadEvents.init();\n\nconst turboStreamLoadEvents = new Events('turbo:after-stream-render', [\n initFlowbite,\n]);\nturboStreamLoadEvents.init();\n\nexport default {\n Accordion,\n Carousel,\n Collapse,\n Dial,\n Drawer,\n Dismiss,\n Dropdown,\n Modal,\n Popover,\n Tabs,\n Tooltip,\n InputCounter,\n CopyClipboard,\n Datepicker,\n Events,\n};\n", "var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n", "var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n", "var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n", "/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n", "var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n", "/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n", "var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n", "var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n", "var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n", "/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n", "var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n", "var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n", "/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n", "/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n", "var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n", "var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n", "var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n", "var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n", "/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n", "var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n", "var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n", "var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n", "/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n", "/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n", "var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n", "/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n", "/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n", "/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n", "var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n", "var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n", "/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n", "/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n", "var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n", "/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n", "/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n", "var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n", "var SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n cacheHas = require('./_cacheHas'),\n createSet = require('./_createSet'),\n setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n", "var baseUniq = require('./_baseUniq');\n\n/**\n * Creates a duplicate-free version of an array, using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons, in which only the first occurrence of each element\n * is kept. The order of result values is determined by the order they occur\n * in the array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniq([2, 1, 2]);\n * // => [2, 1]\n */\nfunction uniq(array) {\n return (array && array.length) ? baseUniq(array) : [];\n}\n\nmodule.exports = uniq;\n", "var debounce = require('./debounce'),\n isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\n", "/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n", "/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n", "var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n", "var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n", "/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nmodule.exports = baseSlice;\n", "var baseSlice = require('./_baseSlice');\n\n/**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\nfunction castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n}\n\nmodule.exports = castSlice;\n", "/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\n\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\nfunction hasUnicode(string) {\n return reHasUnicode.test(string);\n}\n\nmodule.exports = hasUnicode;\n", "/**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction asciiToArray(string) {\n return string.split('');\n}\n\nmodule.exports = asciiToArray;\n", "/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction unicodeToArray(string) {\n return string.match(reUnicode) || [];\n}\n\nmodule.exports = unicodeToArray;\n", "var asciiToArray = require('./_asciiToArray'),\n hasUnicode = require('./_hasUnicode'),\n unicodeToArray = require('./_unicodeToArray');\n\n/**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n}\n\nmodule.exports = stringToArray;\n", "var castSlice = require('./_castSlice'),\n hasUnicode = require('./_hasUnicode'),\n stringToArray = require('./_stringToArray'),\n toString = require('./toString');\n\n/**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\nfunction createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n}\n\nmodule.exports = createCaseFirst;\n", "var createCaseFirst = require('./_createCaseFirst');\n\n/**\n * Converts the first character of `string` to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.upperFirst('fred');\n * // => 'Fred'\n *\n * _.upperFirst('FRED');\n * // => 'FRED'\n */\nvar upperFirst = createCaseFirst('toUpperCase');\n\nmodule.exports = upperFirst;\n", "var toString = require('./toString'),\n upperFirst = require('./upperFirst');\n\n/**\n * Converts the first character of `string` to upper case and the remaining\n * to lower case.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to capitalize.\n * @returns {string} Returns the capitalized string.\n * @example\n *\n * _.capitalize('FRED');\n * // => 'Fred'\n */\nfunction capitalize(string) {\n return upperFirst(toString(string).toLowerCase());\n}\n\nmodule.exports = capitalize;\n", "/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n}\n\nmodule.exports = arrayReduce;\n", "/**\n * The base implementation of `_.propertyOf` without support for deep paths.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyOf(object) {\n return function(key) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = basePropertyOf;\n", "var basePropertyOf = require('./_basePropertyOf');\n\n/** Used to map Latin Unicode letters to basic Latin letters. */\nvar deburredLetters = {\n // Latin-1 Supplement block.\n '\\xc0': 'A', '\\xc1': 'A', '\\xc2': 'A', '\\xc3': 'A', '\\xc4': 'A', '\\xc5': 'A',\n '\\xe0': 'a', '\\xe1': 'a', '\\xe2': 'a', '\\xe3': 'a', '\\xe4': 'a', '\\xe5': 'a',\n '\\xc7': 'C', '\\xe7': 'c',\n '\\xd0': 'D', '\\xf0': 'd',\n '\\xc8': 'E', '\\xc9': 'E', '\\xca': 'E', '\\xcb': 'E',\n '\\xe8': 'e', '\\xe9': 'e', '\\xea': 'e', '\\xeb': 'e',\n '\\xcc': 'I', '\\xcd': 'I', '\\xce': 'I', '\\xcf': 'I',\n '\\xec': 'i', '\\xed': 'i', '\\xee': 'i', '\\xef': 'i',\n '\\xd1': 'N', '\\xf1': 'n',\n '\\xd2': 'O', '\\xd3': 'O', '\\xd4': 'O', '\\xd5': 'O', '\\xd6': 'O', '\\xd8': 'O',\n '\\xf2': 'o', '\\xf3': 'o', '\\xf4': 'o', '\\xf5': 'o', '\\xf6': 'o', '\\xf8': 'o',\n '\\xd9': 'U', '\\xda': 'U', '\\xdb': 'U', '\\xdc': 'U',\n '\\xf9': 'u', '\\xfa': 'u', '\\xfb': 'u', '\\xfc': 'u',\n '\\xdd': 'Y', '\\xfd': 'y', '\\xff': 'y',\n '\\xc6': 'Ae', '\\xe6': 'ae',\n '\\xde': 'Th', '\\xfe': 'th',\n '\\xdf': 'ss',\n // Latin Extended-A block.\n '\\u0100': 'A', '\\u0102': 'A', '\\u0104': 'A',\n '\\u0101': 'a', '\\u0103': 'a', '\\u0105': 'a',\n '\\u0106': 'C', '\\u0108': 'C', '\\u010a': 'C', '\\u010c': 'C',\n '\\u0107': 'c', '\\u0109': 'c', '\\u010b': 'c', '\\u010d': 'c',\n '\\u010e': 'D', '\\u0110': 'D', '\\u010f': 'd', '\\u0111': 'd',\n '\\u0112': 'E', '\\u0114': 'E', '\\u0116': 'E', '\\u0118': 'E', '\\u011a': 'E',\n '\\u0113': 'e', '\\u0115': 'e', '\\u0117': 'e', '\\u0119': 'e', '\\u011b': 'e',\n '\\u011c': 'G', '\\u011e': 'G', '\\u0120': 'G', '\\u0122': 'G',\n '\\u011d': 'g', '\\u011f': 'g', '\\u0121': 'g', '\\u0123': 'g',\n '\\u0124': 'H', '\\u0126': 'H', '\\u0125': 'h', '\\u0127': 'h',\n '\\u0128': 'I', '\\u012a': 'I', '\\u012c': 'I', '\\u012e': 'I', '\\u0130': 'I',\n '\\u0129': 'i', '\\u012b': 'i', '\\u012d': 'i', '\\u012f': 'i', '\\u0131': 'i',\n '\\u0134': 'J', '\\u0135': 'j',\n '\\u0136': 'K', '\\u0137': 'k', '\\u0138': 'k',\n '\\u0139': 'L', '\\u013b': 'L', '\\u013d': 'L', '\\u013f': 'L', '\\u0141': 'L',\n '\\u013a': 'l', '\\u013c': 'l', '\\u013e': 'l', '\\u0140': 'l', '\\u0142': 'l',\n '\\u0143': 'N', '\\u0145': 'N', '\\u0147': 'N', '\\u014a': 'N',\n '\\u0144': 'n', '\\u0146': 'n', '\\u0148': 'n', '\\u014b': 'n',\n '\\u014c': 'O', '\\u014e': 'O', '\\u0150': 'O',\n '\\u014d': 'o', '\\u014f': 'o', '\\u0151': 'o',\n '\\u0154': 'R', '\\u0156': 'R', '\\u0158': 'R',\n '\\u0155': 'r', '\\u0157': 'r', '\\u0159': 'r',\n '\\u015a': 'S', '\\u015c': 'S', '\\u015e': 'S', '\\u0160': 'S',\n '\\u015b': 's', '\\u015d': 's', '\\u015f': 's', '\\u0161': 's',\n '\\u0162': 'T', '\\u0164': 'T', '\\u0166': 'T',\n '\\u0163': 't', '\\u0165': 't', '\\u0167': 't',\n '\\u0168': 'U', '\\u016a': 'U', '\\u016c': 'U', '\\u016e': 'U', '\\u0170': 'U', '\\u0172': 'U',\n '\\u0169': 'u', '\\u016b': 'u', '\\u016d': 'u', '\\u016f': 'u', '\\u0171': 'u', '\\u0173': 'u',\n '\\u0174': 'W', '\\u0175': 'w',\n '\\u0176': 'Y', '\\u0177': 'y', '\\u0178': 'Y',\n '\\u0179': 'Z', '\\u017b': 'Z', '\\u017d': 'Z',\n '\\u017a': 'z', '\\u017c': 'z', '\\u017e': 'z',\n '\\u0132': 'IJ', '\\u0133': 'ij',\n '\\u0152': 'Oe', '\\u0153': 'oe',\n '\\u0149': \"'n\", '\\u017f': 's'\n};\n\n/**\n * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A\n * letters to basic Latin letters.\n *\n * @private\n * @param {string} letter The matched letter to deburr.\n * @returns {string} Returns the deburred letter.\n */\nvar deburrLetter = basePropertyOf(deburredLetters);\n\nmodule.exports = deburrLetter;\n", "var deburrLetter = require('./_deburrLetter'),\n toString = require('./toString');\n\n/** Used to match Latin Unicode letters (excluding mathematical operators). */\nvar reLatin = /[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g;\n\n/** Used to compose unicode character classes. */\nvar rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;\n\n/** Used to compose unicode capture groups. */\nvar rsCombo = '[' + rsComboRange + ']';\n\n/**\n * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and\n * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).\n */\nvar reComboMark = RegExp(rsCombo, 'g');\n\n/**\n * Deburrs `string` by converting\n * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)\n * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)\n * letters to basic Latin letters and removing\n * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to deburr.\n * @returns {string} Returns the deburred string.\n * @example\n *\n * _.deburr('d\u00E9j\u00E0 vu');\n * // => 'deja vu'\n */\nfunction deburr(string) {\n string = toString(string);\n return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');\n}\n\nmodule.exports = deburr;\n", "/** Used to match words composed of alphanumeric characters. */\nvar reAsciiWord = /[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;\n\n/**\n * Splits an ASCII `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction asciiWords(string) {\n return string.match(reAsciiWord) || [];\n}\n\nmodule.exports = asciiWords;\n", "/** Used to detect strings that need a more robust regexp to match words. */\nvar reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;\n\n/**\n * Checks if `string` contains a word composed of Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a word is found, else `false`.\n */\nfunction hasUnicodeWord(string) {\n return reHasUnicodeWord.test(string);\n}\n\nmodule.exports = hasUnicodeWord;\n", "/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsDingbatRange = '\\\\u2700-\\\\u27bf',\n rsLowerRange = 'a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff',\n rsMathOpRange = '\\\\xac\\\\xb1\\\\xd7\\\\xf7',\n rsNonCharRange = '\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf',\n rsPunctuationRange = '\\\\u2000-\\\\u206f',\n rsSpaceRange = ' \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000',\n rsUpperRange = 'A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde',\n rsVarRange = '\\\\ufe0e\\\\ufe0f',\n rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\",\n rsBreak = '[' + rsBreakRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsDigits = '\\\\d+',\n rsDingbat = '[' + rsDingbatRange + ']',\n rsLower = '[' + rsLowerRange + ']',\n rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsUpper = '[' + rsUpperRange + ']',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',\n rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',\n rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',\n rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',\n reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsOrdLower = '\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])',\n rsOrdUpper = '\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;\n\n/** Used to match complex or compound words. */\nvar reUnicodeWord = RegExp([\n rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',\n rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',\n rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,\n rsUpper + '+' + rsOptContrUpper,\n rsOrdUpper,\n rsOrdLower,\n rsDigits,\n rsEmoji\n].join('|'), 'g');\n\n/**\n * Splits a Unicode `string` into an array of its words.\n *\n * @private\n * @param {string} The string to inspect.\n * @returns {Array} Returns the words of `string`.\n */\nfunction unicodeWords(string) {\n return string.match(reUnicodeWord) || [];\n}\n\nmodule.exports = unicodeWords;\n", "var asciiWords = require('./_asciiWords'),\n hasUnicodeWord = require('./_hasUnicodeWord'),\n toString = require('./toString'),\n unicodeWords = require('./_unicodeWords');\n\n/**\n * Splits `string` into an array of its words.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to inspect.\n * @param {RegExp|string} [pattern] The pattern to match words.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the words of `string`.\n * @example\n *\n * _.words('fred, barney, & pebbles');\n * // => ['fred', 'barney', 'pebbles']\n *\n * _.words('fred, barney, & pebbles', /[^, ]+/g);\n * // => ['fred', 'barney', '&', 'pebbles']\n */\nfunction words(string, pattern, guard) {\n string = toString(string);\n pattern = guard ? undefined : pattern;\n\n if (pattern === undefined) {\n return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);\n }\n return string.match(pattern) || [];\n}\n\nmodule.exports = words;\n", "var arrayReduce = require('./_arrayReduce'),\n deburr = require('./deburr'),\n words = require('./words');\n\n/** Used to compose unicode capture groups. */\nvar rsApos = \"['\\u2019]\";\n\n/** Used to match apostrophes. */\nvar reApos = RegExp(rsApos, 'g');\n\n/**\n * Creates a function like `_.camelCase`.\n *\n * @private\n * @param {Function} callback The function to combine each word.\n * @returns {Function} Returns the new compounder function.\n */\nfunction createCompounder(callback) {\n return function(string) {\n return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');\n };\n}\n\nmodule.exports = createCompounder;\n", "var capitalize = require('./capitalize'),\n createCompounder = require('./_createCompounder');\n\n/**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\nvar camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n});\n\nmodule.exports = camelCase;\n", "(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.sk = {}));\n}(this, (function (exports) { 'use strict';\n\n var fp = typeof window !== \"undefined\" && window.flatpickr !== undefined\n ? window.flatpickr\n : {\n l10ns: {},\n };\n var Slovak = {\n weekdays: {\n shorthand: [\"Ned\", \"Pon\", \"Ut\", \"Str\", \"\u0160tv\", \"Pia\", \"Sob\"],\n longhand: [\n \"Nede\u013Ea\",\n \"Pondelok\",\n \"Utorok\",\n \"Streda\",\n \"\u0160tvrtok\",\n \"Piatok\",\n \"Sobota\",\n ],\n },\n months: {\n shorthand: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"M\u00E1j\",\n \"J\u00FAn\",\n \"J\u00FAl\",\n \"Aug\",\n \"Sep\",\n \"Okt\",\n \"Nov\",\n \"Dec\",\n ],\n longhand: [\n \"Janu\u00E1r\",\n \"Febru\u00E1r\",\n \"Marec\",\n \"Apr\u00EDl\",\n \"M\u00E1j\",\n \"J\u00FAn\",\n \"J\u00FAl\",\n \"August\",\n \"September\",\n \"Okt\u00F3ber\",\n \"November\",\n \"December\",\n ],\n },\n firstDayOfWeek: 1,\n rangeSeparator: \" do \",\n time_24hr: true,\n ordinal: function () {\n return \".\";\n },\n };\n fp.l10ns.sk = Slovak;\n var sk = fp.l10ns;\n\n exports.Slovak = Slovak;\n exports.default = sk;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n", "(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.cs = {}));\n}(this, (function (exports) { 'use strict';\n\n var fp = typeof window !== \"undefined\" && window.flatpickr !== undefined\n ? window.flatpickr\n : {\n l10ns: {},\n };\n var Czech = {\n weekdays: {\n shorthand: [\"Ne\", \"Po\", \"\u00DAt\", \"St\", \"\u010Ct\", \"P\u00E1\", \"So\"],\n longhand: [\n \"Ned\u011Ble\",\n \"Pond\u011Bl\u00ED\",\n \"\u00DAter\u00FD\",\n \"St\u0159eda\",\n \"\u010Ctvrtek\",\n \"P\u00E1tek\",\n \"Sobota\",\n ],\n },\n months: {\n shorthand: [\n \"Led\",\n \"\u00DAn\",\n \"B\u0159e\",\n \"Dub\",\n \"Kv\u011B\",\n \"\u010Cer\",\n \"\u010Cvc\",\n \"Srp\",\n \"Z\u00E1\u0159\",\n \"\u0158\u00EDj\",\n \"Lis\",\n \"Pro\",\n ],\n longhand: [\n \"Leden\",\n \"\u00DAnor\",\n \"B\u0159ezen\",\n \"Duben\",\n \"Kv\u011Bten\",\n \"\u010Cerven\",\n \"\u010Cervenec\",\n \"Srpen\",\n \"Z\u00E1\u0159\u00ED\",\n \"\u0158\u00EDjen\",\n \"Listopad\",\n \"Prosinec\",\n ],\n },\n firstDayOfWeek: 1,\n ordinal: function () {\n return \".\";\n },\n rangeSeparator: \" do \",\n weekAbbreviation: \"T\u00FDd.\",\n scrollTitle: \"Rolujte pro zm\u011Bnu\",\n toggleTitle: \"P\u0159epnout dopoledne/odpoledne\",\n amPM: [\"dop.\", \"odp.\"],\n yearAriaLabel: \"Rok\",\n time_24hr: true,\n };\n fp.l10ns.cs = Czech;\n var cs = fp.l10ns;\n\n exports.Czech = Czech;\n exports.default = cs;\n\n Object.defineProperty(exports, '__esModule', { value: true });\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", "!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=e||self).GLightbox=t()}(this,(function(){\"use strict\";function e(e){var t=function(e,t){if(\"object\"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||\"default\");if(\"object\"!=typeof n)return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===t?String:Number)(e)}(e,\"string\");return\"symbol\"==typeof t?t:t+\"\"}function t(e){return(t=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}function n(t,i){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=e[l]=e[l]||[],s={all:n,evt:null,found:null};return t&&i&&M(n)>0&&r(n,(function(e,n){if(e.eventName==t&&e.fn.toString()==i.toString())return s.found=!0,s.evt=n,!1})),s}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.onElement,n=t.withCallback,s=t.avoidDuplicate,l=void 0===s||s,o=t.once,h=void 0!==o&&o,d=t.useCapture,c=void 0!==d&&d,u=arguments.length>2?arguments[2]:void 0,g=i||[];function v(e){C(n)&&n.call(u,e,this),h&&v.destroy()}return k(g)&&(g=document.querySelectorAll(g)),v.destroy=function(){r(g,(function(t){var i=a(t,e,v);i.found&&i.all.splice(i.evt,1),t.removeEventListener&&t.removeEventListener(e,v,c)}))},r(g,(function(t){var i=a(t,e,v);(t.addEventListener&&l&&!i.found||!l)&&(t.addEventListener(e,v,c),i.all.push({eventName:e,fn:v}))})),v}function d(e,t){r(t.split(\" \"),(function(t){return e.classList.add(t)}))}function c(e,t){r(t.split(\" \"),(function(t){return e.classList.remove(t)}))}function u(e,t){return e.classList.contains(t)}function g(e,t){for(;e!==document.body;){if(!(e=e.parentElement))return!1;if(\"function\"==typeof e.matches?e.matches(t):e.msMatchesSelector(t))return e}}function v(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"\",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||\"\"===t)return!1;if(\"none\"===t)return C(i)&&i(),!1;var n=b(),s=t.split(\" \");r(s,(function(t){d(e,\"g\"+t)})),h(n,{onElement:e,avoidDuplicate:!1,once:!0,withCallback:function(e,t){r(s,(function(e){c(t,\"g\"+e)})),C(i)&&i()}})}function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"\";if(\"\"===t)return e.style.webkitTransform=\"\",e.style.MozTransform=\"\",e.style.msTransform=\"\",e.style.OTransform=\"\",e.style.transform=\"\",!1;e.style.webkitTransform=t,e.style.MozTransform=t,e.style.msTransform=t,e.style.OTransform=t,e.style.transform=t}function p(e){e.style.display=\"block\"}function m(e){e.style.display=\"none\"}function y(e){var t=document.createDocumentFragment(),i=document.createElement(\"div\");for(i.innerHTML=e;i.firstChild;)t.appendChild(i.firstChild);return t}function x(){return{width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}}function b(){var e,t=document.createElement(\"fakeelement\"),i={animation:\"animationend\",OAnimation:\"oAnimationEnd\",MozAnimation:\"animationend\",WebkitAnimation:\"webkitAnimationEnd\"};for(e in i)if(void 0!==t.style[e])return i[e]}function S(e,t,i,n){if(e())t();else{var s;i||(i=100);var l=setInterval((function(){e()&&(clearInterval(l),s&&clearTimeout(s),t())}),i);n&&(s=setTimeout((function(){clearInterval(l)}),n))}}function w(e,t,i){if(O(e))console.error(\"Inject assets error\");else if(C(t)&&(i=t,t=!1),k(t)&&t in window)C(i)&&i();else{var n;if(-1!==e.indexOf(\".css\")){if((n=document.querySelectorAll('link[href=\"'+e+'\"]'))&&n.length>0)return void(C(i)&&i());var s=document.getElementsByTagName(\"head\")[0],l=s.querySelectorAll('link[rel=\"stylesheet\"]'),o=document.createElement(\"link\");return o.rel=\"stylesheet\",o.type=\"text/css\",o.href=e,o.media=\"all\",l?s.insertBefore(o,l[0]):s.appendChild(o),void(C(i)&&i())}if((n=document.querySelectorAll('script[src=\"'+e+'\"]'))&&n.length>0){if(C(i)){if(k(t))return S((function(){return void 0!==window[t]}),(function(){i()})),!1;i()}}else{var r=document.createElement(\"script\");r.type=\"text/javascript\",r.src=e,r.onload=function(){if(C(i)){if(k(t))return S((function(){return void 0!==window[t]}),(function(){i()})),!1;i()}},document.body.appendChild(r)}}}function T(){return\"navigator\"in window&&window.navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i)}function C(e){return\"function\"==typeof e}function k(e){return\"string\"==typeof e}function E(e){return!(!e||!e.nodeType||1!=e.nodeType)}function A(e){return Array.isArray(e)}function L(e){return e&&e.length&&isFinite(e.length)}function I(e){return\"object\"===t(e)&&null!=e&&!C(e)&&!A(e)}function O(e){return null==e}function P(e,t){return null!==e&&hasOwnProperty.call(e,t)}function M(e){if(I(e)){if(e.keys)return e.keys().length;var t=0;for(var i in e)P(e,i)&&t++;return t}return e.length}function z(e){return!isNaN(parseFloat(e))&&isFinite(e)}function X(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,t=document.querySelectorAll(\".gbtn[data-taborder]:not(.disabled)\");if(!t.length)return!1;if(1==t.length)return t[0];\"string\"==typeof e&&(e=parseInt(e));var i=[];r(t,(function(e){i.push(e.getAttribute(\"data-taborder\"))}));var n=Math.max.apply(Math,i.map((function(e){return parseInt(e)}))),s=e<0?1:e+1;s>n&&(s=\"1\");var l=i.filter((function(e){return e>=parseInt(s)})),o=l.sort()[0];return document.querySelector('.gbtn[data-taborder=\"'.concat(o,'\"]'))}function Y(e){if(e.events.hasOwnProperty(\"keyboard\"))return!1;e.events.keyboard=h(\"keydown\",{onElement:window,withCallback:function(t,i){var n=(t=t||window.event).keyCode;if(9==n){var s=document.querySelector(\".gbtn.focused\");if(!s){var l=!(!document.activeElement||!document.activeElement.nodeName)&&document.activeElement.nodeName.toLocaleLowerCase();if(\"input\"==l||\"textarea\"==l||\"button\"==l)return}t.preventDefault();var o=document.querySelectorAll(\".gbtn[data-taborder]\");if(!o||o.length<=0)return;if(!s){var r=X();return void(r&&(r.focus(),d(r,\"focused\")))}var a=X(s.getAttribute(\"data-taborder\"));c(s,\"focused\"),a&&(a.focus(),d(a,\"focused\"))}39==n&&e.nextSlide(),37==n&&e.prevSlide(),27==n&&e.close()}})}var q=s((function e(t,n){var s=this,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(i(this,e),this.img=t,this.slide=n,this.onclose=l,this.img.setZoomEvents)return!1;this.active=!1,this.zoomedIn=!1,this.dragging=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.img.addEventListener(\"mousedown\",(function(e){return s.dragStart(e)}),!1),this.img.addEventListener(\"mouseup\",(function(e){return s.dragEnd(e)}),!1),this.img.addEventListener(\"mousemove\",(function(e){return s.drag(e)}),!1),this.img.addEventListener(\"click\",(function(e){return s.slide.classList.contains(\"dragging-nav\")?(s.zoomOut(),!1):s.zoomedIn?void(s.zoomedIn&&!s.dragging&&s.zoomOut()):s.zoomIn()}),!1),this.img.setZoomEvents=!0}),[{key:\"zoomIn\",value:function(){var e=this.widowWidth();if(!(this.zoomedIn||e<=768)){var t=this.img;if(t.setAttribute(\"data-style\",t.getAttribute(\"style\")),t.style.maxWidth=t.naturalWidth+\"px\",t.style.maxHeight=t.naturalHeight+\"px\",t.naturalWidth>e){var i=e/2-t.naturalWidth/2;this.setTranslate(this.img.parentNode,i,0)}this.slide.classList.add(\"zoomed\"),this.zoomedIn=!0}}},{key:\"zoomOut\",value:function(){this.img.parentNode.setAttribute(\"style\",\"\"),this.img.setAttribute(\"style\",this.img.getAttribute(\"data-style\")),this.slide.classList.remove(\"zoomed\"),this.zoomedIn=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.onclose&&\"function\"==typeof this.onclose&&this.onclose()}},{key:\"dragStart\",value:function(e){e.preventDefault(),this.zoomedIn?(\"touchstart\"===e.type?(this.initialX=e.touches[0].clientX-this.xOffset,this.initialY=e.touches[0].clientY-this.yOffset):(this.initialX=e.clientX-this.xOffset,this.initialY=e.clientY-this.yOffset),e.target===this.img&&(this.active=!0,this.img.classList.add(\"dragging\"))):this.active=!1}},{key:\"dragEnd\",value:function(e){var t=this;e.preventDefault(),this.initialX=this.currentX,this.initialY=this.currentY,this.active=!1,setTimeout((function(){t.dragging=!1,t.img.isDragging=!1,t.img.classList.remove(\"dragging\")}),100)}},{key:\"drag\",value:function(e){this.active&&(e.preventDefault(),\"touchmove\"===e.type?(this.currentX=e.touches[0].clientX-this.initialX,this.currentY=e.touches[0].clientY-this.initialY):(this.currentX=e.clientX-this.initialX,this.currentY=e.clientY-this.initialY),this.xOffset=this.currentX,this.yOffset=this.currentY,this.img.isDragging=!0,this.dragging=!0,this.setTranslate(this.img,this.currentX,this.currentY))}},{key:\"onMove\",value:function(e){if(this.zoomedIn){var t=e.clientX-this.img.naturalWidth/2,i=e.clientY-this.img.naturalHeight/2;this.setTranslate(this.img,t,i)}}},{key:\"setTranslate\",value:function(e,t,i){e.style.transform=\"translate3d(\"+t+\"px, \"+i+\"px, 0)\"}},{key:\"widowWidth\",value:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}}]),N=s((function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var s=n.dragEl,l=n.toleranceX,o=void 0===l?40:l,r=n.toleranceY,a=void 0===r?65:r,h=n.slide,d=void 0===h?null:h,c=n.instance,u=void 0===c?null:c;this.el=s,this.active=!1,this.dragging=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.direction=null,this.lastDirection=null,this.toleranceX=o,this.toleranceY=a,this.toleranceReached=!1,this.dragContainer=this.el,this.slide=d,this.instance=u,this.el.addEventListener(\"mousedown\",(function(e){return t.dragStart(e)}),!1),this.el.addEventListener(\"mouseup\",(function(e){return t.dragEnd(e)}),!1),this.el.addEventListener(\"mousemove\",(function(e){return t.drag(e)}),!1)}),[{key:\"dragStart\",value:function(e){if(this.slide.classList.contains(\"zoomed\"))this.active=!1;else{\"touchstart\"===e.type?(this.initialX=e.touches[0].clientX-this.xOffset,this.initialY=e.touches[0].clientY-this.yOffset):(this.initialX=e.clientX-this.xOffset,this.initialY=e.clientY-this.yOffset);var t=e.target.nodeName.toLowerCase();e.target.classList.contains(\"nodrag\")||g(e.target,\".nodrag\")||-1!==[\"input\",\"select\",\"textarea\",\"button\",\"a\"].indexOf(t)?this.active=!1:(e.preventDefault(),(e.target===this.el||\"img\"!==t&&g(e.target,\".gslide-inline\"))&&(this.active=!0,this.el.classList.add(\"dragging\"),this.dragContainer=g(e.target,\".ginner-container\")))}}},{key:\"dragEnd\",value:function(e){var t=this;e&&e.preventDefault(),this.initialX=0,this.initialY=0,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.active=!1,this.doSlideChange&&(this.instance.preventOutsideClick=!0,\"right\"==this.doSlideChange&&this.instance.prevSlide(),\"left\"==this.doSlideChange&&this.instance.nextSlide()),this.doSlideClose&&this.instance.close(),this.toleranceReached||this.setTranslate(this.dragContainer,0,0,!0),setTimeout((function(){t.instance.preventOutsideClick=!1,t.toleranceReached=!1,t.lastDirection=null,t.dragging=!1,t.el.isDragging=!1,t.el.classList.remove(\"dragging\"),t.slide.classList.remove(\"dragging-nav\"),t.dragContainer.style.transform=\"\",t.dragContainer.style.transition=\"\"}),100)}},{key:\"drag\",value:function(e){if(this.active){e.preventDefault(),this.slide.classList.add(\"dragging-nav\"),\"touchmove\"===e.type?(this.currentX=e.touches[0].clientX-this.initialX,this.currentY=e.touches[0].clientY-this.initialY):(this.currentX=e.clientX-this.initialX,this.currentY=e.clientY-this.initialY),this.xOffset=this.currentX,this.yOffset=this.currentY,this.el.isDragging=!0,this.dragging=!0,this.doSlideChange=!1,this.doSlideClose=!1;var t=Math.abs(this.currentX),i=Math.abs(this.currentY);if(t>0&&t>=Math.abs(this.currentY)&&(!this.lastDirection||\"x\"==this.lastDirection)){this.yOffset=0,this.lastDirection=\"x\",this.setTranslate(this.dragContainer,this.currentX,0);var n=this.shouldChange();if(!this.instance.settings.dragAutoSnap&&n&&(this.doSlideChange=n),this.instance.settings.dragAutoSnap&&n)return this.instance.preventOutsideClick=!0,this.toleranceReached=!0,this.active=!1,this.instance.preventOutsideClick=!0,this.dragEnd(null),\"right\"==n&&this.instance.prevSlide(),void(\"left\"==n&&this.instance.nextSlide())}if(this.toleranceY>0&&i>0&&i>=t&&(!this.lastDirection||\"y\"==this.lastDirection)){this.xOffset=0,this.lastDirection=\"y\",this.setTranslate(this.dragContainer,0,this.currentY);var s=this.shouldClose();return!this.instance.settings.dragAutoSnap&&s&&(this.doSlideClose=!0),void(this.instance.settings.dragAutoSnap&&s&&this.instance.close())}}}},{key:\"shouldChange\",value:function(){var e=!1;if(Math.abs(this.currentX)>=this.toleranceX){var t=this.currentX>0?\"right\":\"left\";(\"left\"==t&&this.slide!==this.slide.parentNode.lastChild||\"right\"==t&&this.slide!==this.slide.parentNode.firstChild)&&(e=t)}return e}},{key:\"shouldClose\",value:function(){var e=!1;return Math.abs(this.currentY)>=this.toleranceY&&(e=!0),e}},{key:\"setTranslate\",value:function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.style.transition=n?\"all .2s ease\":\"\",e.style.transform=\"translate3d(\".concat(t,\"px, \").concat(i,\"px, 0)\")}}]);function D(e,t,i,n){var s=e.querySelector(\".gslide-media\"),l=new Image,o=\"gSlideTitle_\"+i,r=\"gSlideDesc_\"+i;l.addEventListener(\"load\",(function(){C(n)&&n()}),!1),l.src=t.href,\"\"!=t.sizes&&\"\"!=t.srcset&&(l.sizes=t.sizes,l.srcset=t.srcset),l.alt=\"\",O(t.alt)||\"\"===t.alt||(l.alt=t.alt),\"\"!==t.title&&l.setAttribute(\"aria-labelledby\",o),\"\"!==t.description&&l.setAttribute(\"aria-describedby\",r),t.hasOwnProperty(\"_hasCustomWidth\")&&t._hasCustomWidth&&(l.style.width=t.width),t.hasOwnProperty(\"_hasCustomHeight\")&&t._hasCustomHeight&&(l.style.height=t.height),s.insertBefore(l,s.firstChild)}function _(e,t,i,n){var s=this,l=e.querySelector(\".ginner-container\"),o=\"gvideo\"+i,r=e.querySelector(\".gslide-media\"),a=this.getAllPlayers();d(l,\"gvideo-container\"),r.insertBefore(y('
'),r.firstChild);var h=e.querySelector(\".gvideo-wrapper\");w(this.settings.plyr.css,\"Plyr\");var c=t.href,u=null==t?void 0:t.videoProvider,g=!1;r.style.maxWidth=t.width,w(this.settings.plyr.js,\"Plyr\",(function(){if(!u&&c.match(/vimeo\\.com\\/([0-9]*)/)&&(u=\"vimeo\"),!u&&(c.match(/(youtube\\.com|youtube-nocookie\\.com)\\/watch\\?v=([a-zA-Z0-9\\-_]+)/)||c.match(/youtu\\.be\\/([a-zA-Z0-9\\-_]+)/)||c.match(/(youtube\\.com|youtube-nocookie\\.com)\\/embed\\/([a-zA-Z0-9\\-_]+)/)||c.match(/(youtube\\.com|youtube-nocookie\\.com)\\/shorts\\/([a-zA-Z0-9\\-_]+)/))&&(u=\"youtube\"),\"local\"===u||!u){u=\"local\";var l='\")}var r=g||y('
'));d(h,\"\".concat(u,\"-video gvideo\")),h.appendChild(r),h.setAttribute(\"data-id\",o),h.setAttribute(\"data-index\",i);var v=P(s.settings.plyr,\"config\")?s.settings.plyr.config:{},f=new Plyr(\"#\"+o,v);f.on(\"ready\",(function(e){a[o]=e.detail.plyr,C(n)&&n()})),S((function(){return e.querySelector(\"iframe\")&&\"true\"==e.querySelector(\"iframe\").dataset.ready}),(function(){s.resize(e)})),f.on(\"enterfullscreen\",W),f.on(\"exitfullscreen\",W)}))}function W(e){var t=g(e.target,\".gslide-media\");\"enterfullscreen\"===e.type&&d(t,\"fullscreen\"),\"exitfullscreen\"===e.type&&c(t,\"fullscreen\")}function B(e,t,i,n){var s,l=this,o=e.querySelector(\".gslide-media\"),r=!(!P(t,\"href\")||!t.href)&&t.href.split(\"#\").pop().trim(),a=!(!P(t,\"content\")||!t.content)&&t.content;if(a&&(k(a)&&(s=y('
'.concat(a,\"
\"))),E(a))){\"none\"==a.style.display&&(a.style.display=\"block\");var c=document.createElement(\"div\");c.className=\"ginlined-content\",c.appendChild(a),s=c}if(r){var u=document.getElementById(r);if(!u)return!1;var g=u.cloneNode(!0);g.style.height=t.height,g.style.maxWidth=t.width,d(g,\"ginlined-content\"),s=g}if(!s)return console.error(\"Unable to append inline slide content\",t),!1;o.style.height=t.height,o.style.width=t.width,o.appendChild(s),this.events[\"inlineclose\"+r]=h(\"click\",{onElement:o.querySelectorAll(\".gtrigger-close\"),withCallback:function(e){e.preventDefault(),l.close()}}),C(n)&&n()}function H(e,t,i,n){var s=e.querySelector(\".gslide-media\"),l=function(e){var t=e.url,i=e.allow,n=e.callback,s=e.appendTo,l=document.createElement(\"iframe\");return l.className=\"vimeo-video gvideo\",l.src=t,l.style.width=\"100%\",l.style.height=\"100%\",i&&l.setAttribute(\"allow\",i),l.onload=function(){l.onload=null,d(l,\"node-ready\"),C(n)&&n()},s&&s.appendChild(l),l}({url:t.href,callback:n});s.parentNode.style.maxWidth=t.width,s.parentNode.style.height=t.height,s.appendChild(l)}var j=s((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.defaults={href:\"\",sizes:\"\",srcset:\"\",title:\"\",type:\"\",videoProvider:\"\",description:\"\",alt:\"\",descPosition:\"bottom\",effect:\"\",width:\"\",height:\"\",content:!1,zoomable:!0,draggable:!0},I(t)&&(this.defaults=o(this.defaults,t))}),[{key:\"sourceType\",value:function(e){var t=e;return null!==(e=e.toLowerCase()).match(/\\.(jpeg|jpg|jpe|gif|png|apn|webp|avif|svg)/)?\"image\":e.match(/(youtube\\.com|youtube-nocookie\\.com)\\/watch\\?v=([a-zA-Z0-9\\-_]+)/)||e.match(/youtu\\.be\\/([a-zA-Z0-9\\-_]+)/)||e.match(/(youtube\\.com|youtube-nocookie\\.com)\\/embed\\/([a-zA-Z0-9\\-_]+)/)||e.match(/(youtube\\.com|youtube-nocookie\\.com)\\/shorts\\/([a-zA-Z0-9\\-_]+)/)||e.match(/vimeo\\.com\\/([0-9]*)/)||null!==e.match(/\\.(mp4|ogg|webm|mov)/)?\"video\":null!==e.match(/\\.(mp3|wav|wma|aac|ogg)/)?\"audio\":e.indexOf(\"#\")>-1&&\"\"!==t.split(\"#\").pop().trim()?\"inline\":e.indexOf(\"goajax=true\")>-1?\"ajax\":\"external\"}},{key:\"parseConfig\",value:function(e,t){var i=this,n=o({descPosition:t.descPosition},this.defaults);if(I(e)&&!E(e)){P(e,\"type\")||(P(e,\"content\")&&e.content?e.type=\"inline\":P(e,\"href\")&&(e.type=this.sourceType(e.href)));var s=o(n,e);return this.setSize(s,t),s}var l=\"\",a=e.getAttribute(\"data-glightbox\"),h=e.nodeName.toLowerCase();if(\"a\"===h&&(l=e.href),\"img\"===h&&(l=e.src,n.alt=e.alt),n.href=l,r(n,(function(s,l){P(t,l)&&\"width\"!==l&&(n[l]=t[l]);var o=e.dataset[l];O(o)||(n[l]=i.sanitizeValue(o))})),n.content&&(n.type=\"inline\"),!n.type&&l&&(n.type=this.sourceType(l)),O(a)){if(!n.title&&\"a\"==h){var d=e.title;O(d)||\"\"===d||(n.title=d)}if(!n.title&&\"img\"==h){var c=e.alt;O(c)||\"\"===c||(n.title=c)}}else{var u=[];r(n,(function(e,t){u.push(\";\\\\s?\"+t)})),u=u.join(\"\\\\s?:|\"),\"\"!==a.trim()&&r(n,(function(e,t){var s=a,l=new RegExp(\"s?\"+t+\"s?:s?(.*?)(\"+u+\"s?:|$)\"),o=s.match(l);if(o&&o.length&&o[1]){var r=o[1].trim().replace(/;\\s*$/,\"\");n[t]=i.sanitizeValue(r)}}))}if(n.description&&\".\"===n.description.substring(0,1)){var g;try{g=document.querySelector(n.description).innerHTML}catch(e){if(!(e instanceof DOMException))throw e}g&&(n.description=g)}if(!n.description){var v=e.querySelector(\".glightbox-desc\");v&&(n.description=v.innerHTML)}return this.setSize(n,t,e),this.slideConfig=n,n}},{key:\"setSize\",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=\"video\"==e.type?this.checkSize(t.videosWidth):this.checkSize(t.width),s=this.checkSize(t.height);return e.width=P(e,\"width\")&&\"\"!==e.width?this.checkSize(e.width):n,e.height=P(e,\"height\")&&\"\"!==e.height?this.checkSize(e.height):s,i&&\"image\"==e.type&&(e._hasCustomWidth=!!i.dataset.width,e._hasCustomHeight=!!i.dataset.height),e}},{key:\"checkSize\",value:function(e){return z(e)?\"\".concat(e,\"px\"):e}},{key:\"sanitizeValue\",value:function(e){return\"true\"!==e&&\"false\"!==e?e:\"true\"===e}}]),V=s((function e(t,n,s){i(this,e),this.element=t,this.instance=n,this.index=s}),[{key:\"setContent\",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(u(t,\"loaded\"))return!1;var n=this.instance.settings,s=this.slideConfig,l=T();C(n.beforeSlideLoad)&&n.beforeSlideLoad({index:this.index,slide:t,player:!1});var o=s.type,r=s.descPosition,a=t.querySelector(\".gslide-media\"),h=t.querySelector(\".gslide-title\"),c=t.querySelector(\".gslide-desc\"),g=t.querySelector(\".gdesc-inner\"),v=i,f=\"gSlideTitle_\"+this.index,p=\"gSlideDesc_\"+this.index;if(C(n.afterSlideLoad)&&(v=function(){C(i)&&i(),n.afterSlideLoad({index:e.index,slide:t,player:e.instance.getSlidePlayerInstance(e.index)})}),\"\"==s.title&&\"\"==s.description?g&&g.parentNode.parentNode.removeChild(g.parentNode):(h&&\"\"!==s.title?(h.id=f,h.innerHTML=s.title):h.parentNode.removeChild(h),c&&\"\"!==s.description?(c.id=p,l&&n.moreLength>0?(s.smallDescription=this.slideShortDesc(s.description,n.moreLength,n.moreText),c.innerHTML=s.smallDescription,this.descriptionEvents(c,s)):c.innerHTML=s.description):c.parentNode.removeChild(c),d(a.parentNode,\"desc-\".concat(r)),d(g.parentNode,\"description-\".concat(r))),d(a,\"gslide-\".concat(o)),d(t,\"loaded\"),\"video\"!==o){if(\"external\"!==o)return\"inline\"===o?(B.apply(this.instance,[t,s,this.index,v]),void(s.draggable&&new N({dragEl:t.querySelector(\".gslide-inline\"),toleranceX:n.dragToleranceX,toleranceY:n.dragToleranceY,slide:t,instance:this.instance}))):void(\"image\"!==o?C(v)&&v():D(t,s,this.index,(function(){var i=t.querySelector(\"img\");s.draggable&&new N({dragEl:i,toleranceX:n.dragToleranceX,toleranceY:n.dragToleranceY,slide:t,instance:e.instance}),s.zoomable&&i.naturalWidth>i.offsetWidth&&(d(i,\"zoomable\"),new q(i,t,(function(){e.instance.resize()}))),C(v)&&v()})));H.apply(this,[t,s,this.index,v])}else _.apply(this.instance,[t,s,this.index,v])}},{key:\"slideShortDesc\",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=document.createElement(\"div\");n.innerHTML=e;var s=n.innerText,l=i;if((e=s.trim()).length<=t)return e;var o=e.substr(0,t-1);return l?(n=null,o+'... '+i+\"\"):o}},{key:\"descriptionEvents\",value:function(e,t){var i=this,n=e.querySelector(\".desc-more\");if(!n)return!1;h(\"click\",{onElement:n,withCallback:function(e,n){e.preventDefault();var s=document.body,l=g(n,\".gslide-desc\");if(!l)return!1;l.innerHTML=t.description,d(s,\"gdesc-open\");var o=h(\"click\",{onElement:[s,g(l,\".gslide-description\")],withCallback:function(e,n){\"a\"!==e.target.nodeName.toLowerCase()&&(c(s,\"gdesc-open\"),d(s,\"gdesc-closed\"),l.innerHTML=t.smallDescription,i.descriptionEvents(l,t),setTimeout((function(){c(s,\"gdesc-closed\")}),400),o.destroy())}})}})}},{key:\"create\",value:function(){return y(this.instance.settings.slideHTML)}},{key:\"getConfig\",value:function(){E(this.element)||this.element.hasOwnProperty(\"draggable\")||(this.element.draggable=this.instance.settings.draggable);var e=new j(this.instance.settings.slideExtraAttributes);return this.slideConfig=e.parseConfig(this.element,this.instance.settings),this.slideConfig}}]);function F(e){return Math.sqrt(e.x*e.x+e.y*e.y)}function R(e,t){var i=function(e,t){var i=F(e)*F(t);if(0===i)return 0;var n=function(e,t){return e.x*t.x+e.y*t.y}(e,t)/i;return n>1&&(n=1),Math.acos(n)}(e,t);return function(e,t){return e.x*t.y-t.x*e.y}(e,t)>0&&(i*=-1),180*i/Math.PI}var G=s((function e(t){i(this,e),this.handlers=[],this.el=t}),[{key:\"add\",value:function(e){this.handlers.push(e)}},{key:\"del\",value:function(e){e||(this.handlers=[]);for(var t=this.handlers.length;t>=0;t--)this.handlers[t]===e&&this.handlers.splice(t,1)}},{key:\"dispatch\",value:function(){for(var e=0,t=this.handlers.length;e=0)console.log(\"ignore drag for this touched element\",e.target.nodeName.toLowerCase());else{this.now=Date.now(),this.x1=e.touches[0].pageX,this.y1=e.touches[0].pageY,this.delta=this.now-(this.last||this.now),this.touchStart.dispatch(e,this.element),null!==this.preTapPosition.x&&(this.isDoubleTap=this.delta>0&&this.delta<=250&&Math.abs(this.preTapPosition.x-this.x1)<30&&Math.abs(this.preTapPosition.y-this.y1)<30,this.isDoubleTap&&clearTimeout(this.singleTapTimeout)),this.preTapPosition.x=this.x1,this.preTapPosition.y=this.y1,this.last=this.now;var t=this.preV;if(e.touches.length>1){this._cancelLongTap(),this._cancelSingleTap();var i={x:e.touches[1].pageX-this.x1,y:e.touches[1].pageY-this.y1};t.x=i.x,t.y=i.y,this.pinchStartLen=F(t),this.multipointStart.dispatch(e,this.element)}this._preventTap=!1,this.longTapTimeout=setTimeout(function(){this.longTap.dispatch(e,this.element),this._preventTap=!0}.bind(this),750)}}},{key:\"move\",value:function(e){if(e.touches){var t=this.preV,i=e.touches.length,n=e.touches[0].pageX,s=e.touches[0].pageY;if(this.isDoubleTap=!1,i>1){var l=e.touches[1].pageX,o=e.touches[1].pageY,r={x:e.touches[1].pageX-n,y:e.touches[1].pageY-s};null!==t.x&&(this.pinchStartLen>0&&(e.zoom=F(r)/this.pinchStartLen,this.pinch.dispatch(e,this.element)),e.angle=R(r,t),this.rotate.dispatch(e,this.element)),t.x=r.x,t.y=r.y,null!==this.x2&&null!==this.sx2?(e.deltaX=(n-this.x2+l-this.sx2)/2,e.deltaY=(s-this.y2+o-this.sy2)/2):(e.deltaX=0,e.deltaY=0),this.twoFingerPressMove.dispatch(e,this.element),this.sx2=l,this.sy2=o}else{if(null!==this.x2){e.deltaX=n-this.x2,e.deltaY=s-this.y2;var a=Math.abs(this.x1-this.x2),h=Math.abs(this.y1-this.y2);(a>10||h>10)&&(this._preventTap=!0)}else e.deltaX=0,e.deltaY=0;this.pressMove.dispatch(e,this.element)}this.touchMove.dispatch(e,this.element),this._cancelLongTap(),this.x2=n,this.y2=s,i>1&&e.preventDefault()}}},{key:\"end\",value:function(e){if(e.changedTouches){this._cancelLongTap();var t=this;e.touches.length<2&&(this.multipointEnd.dispatch(e,this.element),this.sx2=this.sy2=null),this.x2&&Math.abs(this.x1-this.x2)>30||this.y2&&Math.abs(this.y1-this.y2)>30?(e.direction=this._swipeDirection(this.x1,this.x2,this.y1,this.y2),this.swipeTimeout=setTimeout((function(){t.swipe.dispatch(e,t.element)}),0)):(this.tapTimeout=setTimeout((function(){t._preventTap||t.tap.dispatch(e,t.element),t.isDoubleTap&&(t.doubleTap.dispatch(e,t.element),t.isDoubleTap=!1)}),0),t.isDoubleTap||(t.singleTapTimeout=setTimeout((function(){t.singleTap.dispatch(e,t.element)}),250))),this.touchEnd.dispatch(e,this.element),this.preV.x=0,this.preV.y=0,this.zoom=1,this.pinchStartLen=null,this.x1=this.x2=this.y1=this.y2=null}}},{key:\"cancelAll\",value:function(){this._preventTap=!0,clearTimeout(this.singleTapTimeout),clearTimeout(this.tapTimeout),clearTimeout(this.longTapTimeout),clearTimeout(this.swipeTimeout)}},{key:\"cancel\",value:function(e){this.cancelAll(),this.touchCancel.dispatch(e,this.element)}},{key:\"_cancelLongTap\",value:function(){clearTimeout(this.longTapTimeout)}},{key:\"_cancelSingleTap\",value:function(){clearTimeout(this.singleTapTimeout)}},{key:\"_swipeDirection\",value:function(e,t,i,n){return Math.abs(e-t)>=Math.abs(i-n)?e-t>0?\"Left\":\"Right\":i-n>0?\"Up\":\"Down\"}},{key:\"on\",value:function(e,t){this[e]&&this[e].add(t)}},{key:\"off\",value:function(e,t){this[e]&&this[e].del(t)}},{key:\"destroy\",value:function(){return this.singleTapTimeout&&clearTimeout(this.singleTapTimeout),this.tapTimeout&&clearTimeout(this.tapTimeout),this.longTapTimeout&&clearTimeout(this.longTapTimeout),this.swipeTimeout&&clearTimeout(this.swipeTimeout),this.element.removeEventListener(\"touchstart\",this.start),this.element.removeEventListener(\"touchmove\",this.move),this.element.removeEventListener(\"touchend\",this.end),this.element.removeEventListener(\"touchcancel\",this.cancel),this.rotate.del(),this.touchStart.del(),this.multipointStart.del(),this.multipointEnd.del(),this.pinch.del(),this.swipe.del(),this.tap.del(),this.doubleTap.del(),this.longTap.del(),this.singleTap.del(),this.pressMove.del(),this.twoFingerPressMove.del(),this.touchMove.del(),this.touchEnd.del(),this.touchCancel.del(),this.preV=this.pinchStartLen=this.zoom=this.isDoubleTap=this.delta=this.last=this.now=this.tapTimeout=this.singleTapTimeout=this.longTapTimeout=this.swipeTimeout=this.x1=this.x2=this.y1=this.y2=this.preTapPosition=this.rotate=this.touchStart=this.multipointStart=this.multipointEnd=this.pinch=this.swipe=this.tap=this.doubleTap=this.longTap=this.singleTap=this.pressMove=this.touchMove=this.touchEnd=this.touchCancel=this.twoFingerPressMove=null,window.removeEventListener(\"scroll\",this._cancelAllHandler),null}}]);function $(e){var t=function(){var e,t=document.createElement(\"fakeelement\"),i={transition:\"transitionend\",OTransition:\"oTransitionEnd\",MozTransition:\"transitionend\",WebkitTransition:\"webkitTransitionEnd\"};for(e in i)if(void 0!==t.style[e])return i[e]}(),i=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,n=u(e,\"gslide-media\")?e:e.querySelector(\".gslide-media\"),s=g(n,\".ginner-container\"),l=e.querySelector(\".gslide-description\");i>769&&(n=s),d(n,\"greset\"),f(n,\"translate3d(0, 0, 0)\"),h(t,{onElement:n,once:!0,withCallback:function(e,t){c(n,\"greset\")}}),n.style.opacity=\"\",l&&(l.style.opacity=\"\")}function J(e){if(e.events.hasOwnProperty(\"touch\"))return!1;var t,i,n,s=x(),l=s.width,o=s.height,r=!1,a=null,h=null,v=null,p=!1,m=1,y=1,b=!1,S=!1,w=null,T=null,C=null,k=null,E=0,A=0,L=!1,I=!1,O={},P={},M=0,z=0,X=document.getElementById(\"glightbox-slider\"),Y=document.querySelector(\".goverlay\"),q=new U(X,{touchStart:function(t){if(r=!0,(u(t.targetTouches[0].target,\"ginner-container\")||g(t.targetTouches[0].target,\".gslide-desc\")||\"a\"==t.targetTouches[0].target.nodeName.toLowerCase())&&(r=!1),g(t.targetTouches[0].target,\".gslide-inline\")&&!u(t.targetTouches[0].target.parentNode,\"gslide-inline\")&&(r=!1),r){if(P=t.targetTouches[0],O.pageX=t.targetTouches[0].pageX,O.pageY=t.targetTouches[0].pageY,M=t.targetTouches[0].clientX,z=t.targetTouches[0].clientY,a=e.activeSlide,h=a.querySelector(\".gslide-media\"),n=a.querySelector(\".gslide-inline\"),v=null,u(h,\"gslide-image\")&&(v=h.querySelector(\"img\")),(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)>769&&(h=a.querySelector(\".ginner-container\")),c(Y,\"greset\"),t.pageX>20&&t.pageXo){var a=O.pageX-P.pageX;if(Math.abs(a)<=13)return!1}p=!0;var d,c=s.targetTouches[0].clientX,u=s.targetTouches[0].clientY,g=M-c,m=z-u;if(Math.abs(g)>Math.abs(m)?(L=!1,I=!0):(I=!1,L=!0),t=P.pageX-O.pageX,E=100*t/l,i=P.pageY-O.pageY,A=100*i/o,L&&v&&(d=1-Math.abs(i)/o,Y.style.opacity=d,e.settings.touchFollowAxis&&(E=0)),I&&(d=1-Math.abs(t)/l,h.style.opacity=d,e.settings.touchFollowAxis&&(A=0)),!v)return f(h,\"translate3d(\".concat(E,\"%, 0, 0)\"));f(h,\"translate3d(\".concat(E,\"%, \").concat(A,\"%, 0)\"))}},touchEnd:function(){if(r){if(p=!1,S||b)return C=w,void(k=T);var t=Math.abs(parseInt(A)),i=Math.abs(parseInt(E));if(!(t>29&&v))return t<29&&i<25?(d(Y,\"greset\"),Y.style.opacity=1,$(h)):void 0;e.close()}},multipointEnd:function(){setTimeout((function(){b=!1}),50)},multipointStart:function(){b=!0,m=y||1},pinch:function(e){if(!v||p)return!1;b=!0,v.scaleX=v.scaleY=m*e.zoom;var t=m*e.zoom;if(S=!0,t<=1)return S=!1,t=1,k=null,C=null,w=null,T=null,void v.setAttribute(\"style\",\"\");t>4.5&&(t=4.5),v.style.transform=\"scale3d(\".concat(t,\", \").concat(t,\", 1)\"),y=t},pressMove:function(e){if(S&&!b){var t=P.pageX-O.pageX,i=P.pageY-O.pageY;C&&(t+=C),k&&(i+=k),w=t,T=i;var n=\"translate3d(\".concat(t,\"px, \").concat(i,\"px, 0)\");y&&(n+=\" scale3d(\".concat(y,\", \").concat(y,\", 1)\")),f(v,n)}},swipe:function(t){if(!S)if(b)b=!1;else{if(\"Left\"==t.direction){if(e.index==e.elements.length-1)return $(h);e.nextSlide()}if(\"Right\"==t.direction){if(0==e.index)return $(h);e.prevSlide()}}}});e.events.touch=q}var K=T(),Q=null!==T()||void 0!==document.createTouch||\"ontouchstart\"in window||\"onmsgesturechange\"in window||navigator.msMaxTouchPoints,ee=document.getElementsByTagName(\"html\")[0],te={selector:\".glightbox\",elements:null,skin:\"clean\",theme:\"clean\",closeButton:!0,startAt:null,autoplayVideos:!0,autofocusVideos:!0,descPosition:\"bottom\",width:\"900px\",height:\"506px\",videosWidth:\"960px\",beforeSlideChange:null,afterSlideChange:null,beforeSlideLoad:null,afterSlideLoad:null,slideInserted:null,slideRemoved:null,slideExtraAttributes:null,onOpen:null,onClose:null,loop:!1,zoomable:!0,draggable:!0,dragAutoSnap:!1,dragToleranceX:40,dragToleranceY:65,preload:!0,oneSlidePerOpen:!1,touchNavigation:!0,touchFollowAxis:!0,keyboardNavigation:!0,closeOnOutsideClick:!0,plugins:!1,plyr:{css:\"https://cdn.plyr.io/3.6.12/plyr.css\",js:\"https://cdn.plyr.io/3.6.12/plyr.js\",config:{ratio:\"16:9\",fullscreen:{enabled:!0,iosNative:!0},youtube:{noCookie:!0,rel:0,showinfo:0,iv_load_policy:3},vimeo:{byline:!1,portrait:!1,title:!1,transparent:!1}}},openEffect:\"zoom\",closeEffect:\"zoom\",slideEffect:\"slide\",moreText:\"See more\",moreLength:60,cssEfects:{fade:{in:\"fadeIn\",out:\"fadeOut\"},zoom:{in:\"zoomIn\",out:\"zoomOut\"},slide:{in:\"slideInRight\",out:\"slideOutLeft\"},slideBack:{in:\"slideInLeft\",out:\"slideOutRight\"},none:{in:\"none\",out:\"none\"}},svg:{close:'',next:' ',prev:''},slideHTML:'
\\n
\\n
\\n
\\n
\\n
\\n
\\n

\\n
\\n
\\n
\\n
\\n
\\n
',lightboxHTML:'
\\n
\\n
\\n
\\n
\\n \\n \\n \\n
\\n
'},ie=s((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.customOptions=t,this.settings=o(te,t),this.effectsClasses=this.getAnimationClasses(),this.videoPlayers={},this.apiEvents=[],this.fullElementsList=!1}),[{key:\"init\",value:function(){var e=this,t=this.getSelector();t&&(this.baseEvents=h(\"click\",{onElement:t,withCallback:function(t,i){t.preventDefault(),e.open(i)}})),this.elements=this.getElements()}},{key:\"open\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(0===this.elements.length)return!1;this.activeSlide=null,this.prevActiveSlideIndex=null,this.prevActiveSlide=null;var i=z(t)?t:this.settings.startAt;if(E(e)){var n=e.getAttribute(\"data-gallery\");n&&(this.fullElementsList=this.elements,this.elements=this.getGalleryElements(this.elements,n)),O(i)&&(i=this.getElementIndex(e))<0&&(i=0)}z(i)||(i=0),this.build(),v(this.overlay,\"none\"===this.settings.openEffect?\"none\":this.settings.cssEfects.fade.in);var s=document.body,l=window.innerWidth-document.documentElement.clientWidth;if(l>0){var o=document.createElement(\"style\");o.type=\"text/css\",o.className=\"gcss-styles\",o.innerText=\".gscrollbar-fixer {margin-right: \".concat(l,\"px}\"),document.head.appendChild(o),d(s,\"gscrollbar-fixer\")}d(s,\"glightbox-open\"),d(ee,\"glightbox-open\"),K&&(d(document.body,\"glightbox-mobile\"),this.settings.slideEffect=\"slide\"),this.showSlide(i,!0),1===this.elements.length?(d(this.prevButton,\"glightbox-button-hidden\"),d(this.nextButton,\"glightbox-button-hidden\")):(c(this.prevButton,\"glightbox-button-hidden\"),c(this.nextButton,\"glightbox-button-hidden\")),this.lightboxOpen=!0,this.trigger(\"open\"),C(this.settings.onOpen)&&this.settings.onOpen(),Q&&this.settings.touchNavigation&&J(this),this.settings.keyboardNavigation&&Y(this)}},{key:\"openAt\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.open(null,e)}},{key:\"showSlide\",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];p(this.loader),this.index=parseInt(t);var n=this.slidesContainer.querySelector(\".current\");n&&c(n,\"current\"),this.slideAnimateOut();var s=this.slidesContainer.querySelectorAll(\".gslide\")[t];if(u(s,\"loaded\"))this.slideAnimateIn(s,i),m(this.loader);else{p(this.loader);var l=this.elements[t],o={index:this.index,slide:s,slideNode:s,slideConfig:l.slideConfig,slideIndex:this.index,trigger:l.node,player:null};this.trigger(\"slide_before_load\",o),l.instance.setContent(s,(function(){m(e.loader),e.resize(),e.slideAnimateIn(s,i),e.trigger(\"slide_after_load\",o)}))}this.slideDescription=s.querySelector(\".gslide-description\"),this.slideDescriptionContained=this.slideDescription&&u(this.slideDescription.parentNode,\"gslide-media\"),this.settings.preload&&(this.preloadSlide(t+1),this.preloadSlide(t-1)),this.updateNavigationClasses(),this.activeSlide=s}},{key:\"preloadSlide\",value:function(e){var t=this;if(e<0||e>this.elements.length-1)return!1;if(O(this.elements[e]))return!1;var i=this.slidesContainer.querySelectorAll(\".gslide\")[e];if(u(i,\"loaded\"))return!1;var n=this.elements[e],s=n.type,l={index:e,slide:i,slideNode:i,slideConfig:n.slideConfig,slideIndex:e,trigger:n.node,player:null};this.trigger(\"slide_before_load\",l),\"video\"===s||\"external\"===s?setTimeout((function(){n.instance.setContent(i,(function(){t.trigger(\"slide_after_load\",l)}))}),200):n.instance.setContent(i,(function(){t.trigger(\"slide_after_load\",l)}))}},{key:\"prevSlide\",value:function(){this.goToSlide(this.index-1)}},{key:\"nextSlide\",value:function(){this.goToSlide(this.index+1)}},{key:\"goToSlide\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.prevActiveSlide=this.activeSlide,this.prevActiveSlideIndex=this.index,!this.loop()&&(e<0||e>this.elements.length-1))return!1;e<0?e=this.elements.length-1:e>=this.elements.length&&(e=0),this.showSlide(e)}},{key:\"insertSlide\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;t<0&&(t=this.elements.length);var i=new V(e,this,t),n=i.getConfig(),s=o({},n),l=i.create(),r=this.elements.length-1;s.index=t,s.node=!1,s.instance=i,s.slideConfig=n,this.elements.splice(t,0,s);var a=null,h=null;if(this.slidesContainer){if(t>r)this.slidesContainer.appendChild(l);else{var d=this.slidesContainer.querySelectorAll(\".gslide\")[t];this.slidesContainer.insertBefore(l,d)}(this.settings.preload&&0==this.index&&0==t||this.index-1==t||this.index+1==t)&&this.preloadSlide(t),0===this.index&&0===t&&(this.index=1),this.updateNavigationClasses(),a=this.slidesContainer.querySelectorAll(\".gslide\")[t],h=this.getSlidePlayerInstance(t),s.slideNode=a}this.trigger(\"slide_inserted\",{index:t,slide:a,slideNode:a,slideConfig:n,slideIndex:t,trigger:null,player:h}),C(this.settings.slideInserted)&&this.settings.slideInserted({index:t,slide:a,player:h})}},{key:\"removeSlide\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(e<0||e>this.elements.length-1)return!1;var t=this.slidesContainer&&this.slidesContainer.querySelectorAll(\".gslide\")[e];t&&(this.getActiveSlideIndex()==e&&(e==this.elements.length-1?this.prevSlide():this.nextSlide()),t.parentNode.removeChild(t)),this.elements.splice(e,1),this.trigger(\"slide_removed\",e),C(this.settings.slideRemoved)&&this.settings.slideRemoved(e)}},{key:\"slideAnimateIn\",value:function(e,t){var i=this,n=e.querySelector(\".gslide-media\"),s=e.querySelector(\".gslide-description\"),l={index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,slideNode:this.prevActiveSlide,slideIndex:this.prevActiveSlide,slideConfig:O(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].slideConfig,trigger:O(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].node,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},o={index:this.index,slide:this.activeSlide,slideNode:this.activeSlide,slideConfig:this.elements[this.index].slideConfig,slideIndex:this.index,trigger:this.elements[this.index].node,player:this.getSlidePlayerInstance(this.index)};if(n.offsetWidth>0&&s&&(m(s),s.style.display=\"\"),c(e,this.effectsClasses),t)v(e,this.settings.cssEfects[this.settings.openEffect].in,(function(){i.settings.autoplayVideos&&i.slidePlayerPlay(e),i.trigger(\"slide_changed\",{prev:l,current:o}),C(i.settings.afterSlideChange)&&i.settings.afterSlideChange.apply(i,[l,o])}));else{var r=this.settings.slideEffect,a=\"none\"!==r?this.settings.cssEfects[r].in:r;this.prevActiveSlideIndex>this.index&&\"slide\"==this.settings.slideEffect&&(a=this.settings.cssEfects.slideBack.in),v(e,a,(function(){i.settings.autoplayVideos&&i.slidePlayerPlay(e),i.trigger(\"slide_changed\",{prev:l,current:o}),C(i.settings.afterSlideChange)&&i.settings.afterSlideChange.apply(i,[l,o])}))}setTimeout((function(){i.resize(e)}),100),d(e,\"current\")}},{key:\"slideAnimateOut\",value:function(){if(!this.prevActiveSlide)return!1;var e=this.prevActiveSlide;c(e,this.effectsClasses),d(e,\"prev\");var t=this.settings.slideEffect,i=\"none\"!==t?this.settings.cssEfects[t].out:t;this.slidePlayerPause(e),this.trigger(\"slide_before_change\",{prev:{index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,slideNode:this.prevActiveSlide,slideIndex:this.prevActiveSlideIndex,slideConfig:O(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].slideConfig,trigger:O(this.prevActiveSlideIndex)?null:this.elements[this.prevActiveSlideIndex].node,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},current:{index:this.index,slide:this.activeSlide,slideNode:this.activeSlide,slideIndex:this.index,slideConfig:this.elements[this.index].slideConfig,trigger:this.elements[this.index].node,player:this.getSlidePlayerInstance(this.index)}}),C(this.settings.beforeSlideChange)&&this.settings.beforeSlideChange.apply(this,[{index:this.prevActiveSlideIndex,slide:this.prevActiveSlide,player:this.getSlidePlayerInstance(this.prevActiveSlideIndex)},{index:this.index,slide:this.activeSlide,player:this.getSlidePlayerInstance(this.index)}]),this.prevActiveSlideIndex>this.index&&\"slide\"==this.settings.slideEffect&&(i=this.settings.cssEfects.slideBack.out),v(e,i,(function(){var t=e.querySelector(\".ginner-container\"),i=e.querySelector(\".gslide-media\"),n=e.querySelector(\".gslide-description\");t.style.transform=\"\",i.style.transform=\"\",c(i,\"greset\"),i.style.opacity=\"\",n&&(n.style.opacity=\"\"),c(e,\"prev\")}))}},{key:\"getAllPlayers\",value:function(){return this.videoPlayers}},{key:\"getSlidePlayerInstance\",value:function(e){var t=\"gvideo\"+e,i=this.getAllPlayers();return!(!P(i,t)||!i[t])&&i[t]}},{key:\"stopSlideVideo\",value:function(e){if(E(e)){var t=e.querySelector(\".gvideo-wrapper\");t&&(e=t.getAttribute(\"data-index\"))}console.log(\"stopSlideVideo is deprecated, use slidePlayerPause\");var i=this.getSlidePlayerInstance(e);i&&i.playing&&i.pause()}},{key:\"slidePlayerPause\",value:function(e){if(E(e)){var t=e.querySelector(\".gvideo-wrapper\");t&&(e=t.getAttribute(\"data-index\"))}var i=this.getSlidePlayerInstance(e);i&&i.playing&&i.pause()}},{key:\"playSlideVideo\",value:function(e){if(E(e)){var t=e.querySelector(\".gvideo-wrapper\");t&&(e=t.getAttribute(\"data-index\"))}console.log(\"playSlideVideo is deprecated, use slidePlayerPlay\");var i=this.getSlidePlayerInstance(e);i&&!i.playing&&i.play()}},{key:\"slidePlayerPlay\",value:function(e){var t;if(!K||null!==(t=this.settings.plyr.config)&&void 0!==t&&t.muted){if(E(e)){var i=e.querySelector(\".gvideo-wrapper\");i&&(e=i.getAttribute(\"data-index\"))}var n=this.getSlidePlayerInstance(e);n&&!n.playing&&(n.play(),this.settings.autofocusVideos&&n.elements.container.focus())}}},{key:\"setElements\",value:function(e){var t=this;this.settings.elements=!1;var i=[];e&&e.length&&r(e,(function(e,n){var s=new V(e,t,n),l=s.getConfig(),r=o({},l);r.slideConfig=l,r.instance=s,r.index=n,i.push(r)})),this.elements=i,this.lightboxOpen&&(this.slidesContainer.innerHTML=\"\",this.elements.length&&(r(this.elements,(function(){var e=y(t.settings.slideHTML);t.slidesContainer.appendChild(e)})),this.showSlide(0,!0)))}},{key:\"getElementIndex\",value:function(e){var t=!1;return r(this.elements,(function(i,n){if(P(i,\"node\")&&i.node==e)return t=n,!0})),t}},{key:\"getElements\",value:function(){var e=this,t=[];this.elements=this.elements?this.elements:[],!O(this.settings.elements)&&A(this.settings.elements)&&this.settings.elements.length&&r(this.settings.elements,(function(i,n){var s=new V(i,e,n),l=s.getConfig(),r=o({},l);r.node=!1,r.index=n,r.instance=s,r.slideConfig=l,t.push(r)}));var i=!1;return this.getSelector()&&(i=document.querySelectorAll(this.getSelector())),i?(r(i,(function(i,n){var s=new V(i,e,n),l=s.getConfig(),r=o({},l);r.node=i,r.index=n,r.instance=s,r.slideConfig=l,r.gallery=i.getAttribute(\"data-gallery\"),t.push(r)})),t):t}},{key:\"getGalleryElements\",value:function(e,t){return e.filter((function(e){return e.gallery==t}))}},{key:\"getSelector\",value:function(){return!this.settings.elements&&(this.settings.selector&&\"data-\"==this.settings.selector.substring(0,5)?\"*[\".concat(this.settings.selector,\"]\"):this.settings.selector)}},{key:\"getActiveSlide\",value:function(){return this.slidesContainer.querySelectorAll(\".gslide\")[this.index]}},{key:\"getActiveSlideIndex\",value:function(){return this.index}},{key:\"getAnimationClasses\",value:function(){var e=[];for(var t in this.settings.cssEfects)if(this.settings.cssEfects.hasOwnProperty(t)){var i=this.settings.cssEfects[t];e.push(\"g\".concat(i.in)),e.push(\"g\".concat(i.out))}return e.join(\" \")}},{key:\"build\",value:function(){var e=this;if(this.built)return!1;var t=document.body.childNodes,i=[];r(t,(function(e){e.parentNode==document.body&&\"#\"!==e.nodeName.charAt(0)&&e.hasAttribute&&!e.hasAttribute(\"aria-hidden\")&&(i.push(e),e.setAttribute(\"aria-hidden\",\"true\"))}));var n=P(this.settings.svg,\"next\")?this.settings.svg.next:\"\",s=P(this.settings.svg,\"prev\")?this.settings.svg.prev:\"\",l=P(this.settings.svg,\"close\")?this.settings.svg.close:\"\",o=this.settings.lightboxHTML;o=y(o=(o=(o=o.replace(/{nextSVG}/g,n)).replace(/{prevSVG}/g,s)).replace(/{closeSVG}/g,l)),document.body.appendChild(o);var a=document.getElementById(\"glightbox-body\");this.modal=a;var c=a.querySelector(\".gclose\");this.prevButton=a.querySelector(\".gprev\"),this.nextButton=a.querySelector(\".gnext\"),this.overlay=a.querySelector(\".goverlay\"),this.loader=a.querySelector(\".gloader\"),this.slidesContainer=document.getElementById(\"glightbox-slider\"),this.bodyHiddenChildElms=i,this.events={},d(this.modal,\"glightbox-\"+this.settings.skin),this.settings.closeButton&&c&&(this.events.close=h(\"click\",{onElement:c,withCallback:function(t,i){t.preventDefault(),e.close()}})),c&&!this.settings.closeButton&&c.parentNode.removeChild(c),this.nextButton&&(this.events.next=h(\"click\",{onElement:this.nextButton,withCallback:function(t,i){t.preventDefault(),e.nextSlide()}})),this.prevButton&&(this.events.prev=h(\"click\",{onElement:this.prevButton,withCallback:function(t,i){t.preventDefault(),e.prevSlide()}})),this.settings.closeOnOutsideClick&&(this.events.outClose=h(\"click\",{onElement:a,withCallback:function(t,i){e.preventOutsideClick||u(document.body,\"glightbox-mobile\")||g(t.target,\".ginner-container\")||g(t.target,\".gbtn\")||u(t.target,\"gnext\")||u(t.target,\"gprev\")||e.close()}})),r(this.elements,(function(t,i){e.slidesContainer.appendChild(t.instance.create()),t.slideNode=e.slidesContainer.querySelectorAll(\".gslide\")[i]})),Q&&d(document.body,\"glightbox-touch\"),this.events.resize=h(\"resize\",{onElement:window,withCallback:function(){e.resize()}}),this.built=!0}},{key:\"resize\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if((e=e||this.activeSlide)&&!u(e,\"zoomed\")){var t=x(),i=e.querySelector(\".gvideo-wrapper\"),n=e.querySelector(\".gslide-image\"),s=this.slideDescription,l=t.width,o=t.height;if(l<=768?d(document.body,\"glightbox-mobile\"):c(document.body,\"glightbox-mobile\"),i||n){var r=!1;if(s&&(u(s,\"description-bottom\")||u(s,\"description-top\"))&&!u(s,\"gabsolute\")&&(r=!0),n)if(l<=768)n.querySelector(\"img\");else if(r){var a,h=s.offsetHeight,g=n.querySelector(\"img\"),v=this.elements[this.index].node,f=null!==(a=v.getAttribute(\"data-height\"))&&void 0!==a?a:\"100vh\";g.setAttribute(\"style\",\"max-height: calc(\".concat(f,\" - \").concat(h,\"px)\")),s.setAttribute(\"style\",\"max-width: \".concat(g.offsetWidth,\"px;\"))}if(i){var p=P(this.settings.plyr.config,\"ratio\")?this.settings.plyr.config.ratio:\"\";if(!p){var m=i.clientWidth,y=i.clientHeight,b=m/y;p=\"\".concat(m/b,\":\").concat(y/b)}var S=p.split(\":\"),w=this.settings.videosWidth,T=this.settings.videosWidth,C=(T=z(w)||-1!==w.indexOf(\"px\")?parseInt(w):-1!==w.indexOf(\"vw\")?l*parseInt(w)/100:-1!==w.indexOf(\"vh\")?o*parseInt(w)/100:-1!==w.indexOf(\"%\")?l*parseInt(w)/100:parseInt(i.clientWidth))/(parseInt(S[0])/parseInt(S[1]));if(C=Math.floor(C),r&&(o-=s.offsetHeight),T>l||C>o||oT){var k=i.offsetWidth,E=i.offsetHeight,A=o/E,L={width:k*A,height:E*A};i.parentNode.setAttribute(\"style\",\"max-width: \".concat(L.width,\"px\")),r&&s.setAttribute(\"style\",\"max-width: \".concat(L.width,\"px;\"))}else i.parentNode.style.maxWidth=\"\".concat(w),r&&s.setAttribute(\"style\",\"max-width: \".concat(w,\";\"))}}}}},{key:\"reload\",value:function(){this.init()}},{key:\"updateNavigationClasses\",value:function(){var e=this.loop();c(this.nextButton,\"disabled\"),c(this.prevButton,\"disabled\"),0==this.index&&this.elements.length-1==0?(d(this.prevButton,\"disabled\"),d(this.nextButton,\"disabled\")):0!==this.index||e?this.index!==this.elements.length-1||e||d(this.nextButton,\"disabled\"):d(this.prevButton,\"disabled\")}},{key:\"loop\",value:function(){var e=P(this.settings,\"loopAtEnd\")?this.settings.loopAtEnd:null;return e=P(this.settings,\"loop\")?this.settings.loop:e,e}},{key:\"close\",value:function(){var e=this;if(!this.lightboxOpen){if(this.events){for(var t in this.events)this.events.hasOwnProperty(t)&&this.events[t].destroy();this.events=null}return!1}if(this.closing)return!1;this.closing=!0,this.slidePlayerPause(this.activeSlide),this.fullElementsList&&(this.elements=this.fullElementsList),this.bodyHiddenChildElms.length&&r(this.bodyHiddenChildElms,(function(e){e.removeAttribute(\"aria-hidden\")})),d(this.modal,\"glightbox-closing\"),v(this.overlay,\"none\"==this.settings.openEffect?\"none\":this.settings.cssEfects.fade.out),v(this.activeSlide,this.settings.cssEfects[this.settings.closeEffect].out,(function(){if(e.activeSlide=null,e.prevActiveSlideIndex=null,e.prevActiveSlide=null,e.built=!1,e.events){for(var t in e.events)e.events.hasOwnProperty(t)&&e.events[t].destroy();e.events=null}var i=document.body;c(ee,\"glightbox-open\"),c(i,\"glightbox-open touching gdesc-open glightbox-touch glightbox-mobile gscrollbar-fixer\"),e.modal.parentNode.removeChild(e.modal),e.trigger(\"close\"),C(e.settings.onClose)&&e.settings.onClose();var n=document.querySelector(\".gcss-styles\");n&&n.parentNode.removeChild(n),e.lightboxOpen=!1,e.closing=null}))}},{key:\"destroy\",value:function(){this.close(),this.clearAllEvents(),this.baseEvents&&this.baseEvents.destroy()}},{key:\"on\",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||!C(t))throw new TypeError(\"Event name and callback must be defined\");this.apiEvents.push({evt:e,once:i,callback:t})}},{key:\"once\",value:function(e,t){this.on(e,t,!0)}},{key:\"trigger\",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=[];r(this.apiEvents,(function(t,s){var l=t.evt,o=t.once,r=t.callback;l==e&&(r(i),o&&n.push(s))})),n.length&&r(n,(function(e){return t.apiEvents.splice(e,1)}))}},{key:\"clearAllEvents\",value:function(){this.apiEvents.splice(0,this.apiEvents.length)}},{key:\"version\",value:function(){return\"3.3.0\"}}]);return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new ie(e);return t.init(),t}}));", "/*!\n * headroom.js v0.12.0 - Give your page some headroom. Hide your header until you need it\n * Copyright (c) 2020 Nick Williams - http://wicky.nillia.ms/headroom.js\n * License: MIT\n */\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 = global || self, global.Headroom = factory());\n}(this, function () { 'use strict';\n\n function isBrowser() {\n return typeof window !== \"undefined\";\n }\n\n /**\n * Used to detect browser support for adding an event listener with options\n * Credit: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener\n */\n function passiveEventsSupported() {\n var supported = false;\n\n try {\n var options = {\n // eslint-disable-next-line getter-return\n get passive() {\n supported = true;\n }\n };\n window.addEventListener(\"test\", options, options);\n window.removeEventListener(\"test\", options, options);\n } catch (err) {\n supported = false;\n }\n\n return supported;\n }\n\n function isSupported() {\n return !!(\n isBrowser() &&\n function() {}.bind &&\n \"classList\" in document.documentElement &&\n Object.assign &&\n Object.keys &&\n requestAnimationFrame\n );\n }\n\n function isDocument(obj) {\n return obj.nodeType === 9; // Node.DOCUMENT_NODE === 9\n }\n\n function isWindow(obj) {\n // `obj === window` or `obj instanceof Window` is not sufficient,\n // as the obj may be the window of an iframe.\n return obj && obj.document && isDocument(obj.document);\n }\n\n function windowScroller(win) {\n var doc = win.document;\n var body = doc.body;\n var html = doc.documentElement;\n\n return {\n /**\n * @see http://james.padolsey.com/javascript/get-document-height-cross-browser/\n * @return {Number} the scroll height of the document in pixels\n */\n scrollHeight: function() {\n return Math.max(\n body.scrollHeight,\n html.scrollHeight,\n body.offsetHeight,\n html.offsetHeight,\n body.clientHeight,\n html.clientHeight\n );\n },\n\n /**\n * @see http://andylangton.co.uk/blog/development/get-viewport-size-width-and-height-javascript\n * @return {Number} the height of the viewport in pixels\n */\n height: function() {\n return win.innerHeight || html.clientHeight || body.clientHeight;\n },\n\n /**\n * Gets the Y scroll position\n * @return {Number} pixels the page has scrolled along the Y-axis\n */\n scrollY: function() {\n if (win.pageYOffset !== undefined) {\n return win.pageYOffset;\n }\n\n return (html || body.parentNode || body).scrollTop;\n }\n };\n }\n\n function elementScroller(element) {\n return {\n /**\n * @return {Number} the scroll height of the element in pixels\n */\n scrollHeight: function() {\n return Math.max(\n element.scrollHeight,\n element.offsetHeight,\n element.clientHeight\n );\n },\n\n /**\n * @return {Number} the height of the element in pixels\n */\n height: function() {\n return Math.max(element.offsetHeight, element.clientHeight);\n },\n\n /**\n * Gets the Y scroll position\n * @return {Number} pixels the element has scrolled along the Y-axis\n */\n scrollY: function() {\n return element.scrollTop;\n }\n };\n }\n\n function createScroller(element) {\n return isWindow(element) ? windowScroller(element) : elementScroller(element);\n }\n\n /**\n * @param element EventTarget\n */\n function trackScroll(element, options, callback) {\n var isPassiveSupported = passiveEventsSupported();\n var rafId;\n var scrolled = false;\n var scroller = createScroller(element);\n var lastScrollY = scroller.scrollY();\n var details = {};\n\n function update() {\n var scrollY = Math.round(scroller.scrollY());\n var height = scroller.height();\n var scrollHeight = scroller.scrollHeight();\n\n // reuse object for less memory churn\n details.scrollY = scrollY;\n details.lastScrollY = lastScrollY;\n details.direction = scrollY > lastScrollY ? \"down\" : \"up\";\n details.distance = Math.abs(scrollY - lastScrollY);\n details.isOutOfBounds = scrollY < 0 || scrollY + height > scrollHeight;\n details.top = scrollY <= options.offset[details.direction];\n details.bottom = scrollY + height >= scrollHeight;\n details.toleranceExceeded =\n details.distance > options.tolerance[details.direction];\n\n callback(details);\n\n lastScrollY = scrollY;\n scrolled = false;\n }\n\n function handleScroll() {\n if (!scrolled) {\n scrolled = true;\n rafId = requestAnimationFrame(update);\n }\n }\n\n var eventOptions = isPassiveSupported\n ? { passive: true, capture: false }\n : false;\n\n element.addEventListener(\"scroll\", handleScroll, eventOptions);\n update();\n\n return {\n destroy: function() {\n cancelAnimationFrame(rafId);\n element.removeEventListener(\"scroll\", handleScroll, eventOptions);\n }\n };\n }\n\n function normalizeUpDown(t) {\n return t === Object(t) ? t : { down: t, up: t };\n }\n\n /**\n * UI enhancement for fixed headers.\n * Hides header when scrolling down\n * Shows header when scrolling up\n * @constructor\n * @param {DOMElement} elem the header element\n * @param {Object} options options for the widget\n */\n function Headroom(elem, options) {\n options = options || {};\n Object.assign(this, Headroom.options, options);\n this.classes = Object.assign({}, Headroom.options.classes, options.classes);\n\n this.elem = elem;\n this.tolerance = normalizeUpDown(this.tolerance);\n this.offset = normalizeUpDown(this.offset);\n this.initialised = false;\n this.frozen = false;\n }\n Headroom.prototype = {\n constructor: Headroom,\n\n /**\n * Start listening to scrolling\n * @public\n */\n init: function() {\n if (Headroom.cutsTheMustard && !this.initialised) {\n this.addClass(\"initial\");\n this.initialised = true;\n\n // defer event registration to handle browser\n // potentially restoring previous scroll position\n setTimeout(\n function(self) {\n self.scrollTracker = trackScroll(\n self.scroller,\n { offset: self.offset, tolerance: self.tolerance },\n self.update.bind(self)\n );\n },\n 100,\n this\n );\n }\n\n return this;\n },\n\n /**\n * Destroy the widget, clearing up after itself\n * @public\n */\n destroy: function() {\n this.initialised = false;\n Object.keys(this.classes).forEach(this.removeClass, this);\n this.scrollTracker.destroy();\n },\n\n /**\n * Unpin the element\n * @public\n */\n unpin: function() {\n if (this.hasClass(\"pinned\") || !this.hasClass(\"unpinned\")) {\n this.addClass(\"unpinned\");\n this.removeClass(\"pinned\");\n\n if (this.onUnpin) {\n this.onUnpin.call(this);\n }\n }\n },\n\n /**\n * Pin the element\n * @public\n */\n pin: function() {\n if (this.hasClass(\"unpinned\")) {\n this.addClass(\"pinned\");\n this.removeClass(\"unpinned\");\n\n if (this.onPin) {\n this.onPin.call(this);\n }\n }\n },\n\n /**\n * Freezes the current state of the widget\n * @public\n */\n freeze: function() {\n this.frozen = true;\n this.addClass(\"frozen\");\n },\n\n /**\n * Re-enables the default behaviour of the widget\n * @public\n */\n unfreeze: function() {\n this.frozen = false;\n this.removeClass(\"frozen\");\n },\n\n top: function() {\n if (!this.hasClass(\"top\")) {\n this.addClass(\"top\");\n this.removeClass(\"notTop\");\n\n if (this.onTop) {\n this.onTop.call(this);\n }\n }\n },\n\n notTop: function() {\n if (!this.hasClass(\"notTop\")) {\n this.addClass(\"notTop\");\n this.removeClass(\"top\");\n\n if (this.onNotTop) {\n this.onNotTop.call(this);\n }\n }\n },\n\n bottom: function() {\n if (!this.hasClass(\"bottom\")) {\n this.addClass(\"bottom\");\n this.removeClass(\"notBottom\");\n\n if (this.onBottom) {\n this.onBottom.call(this);\n }\n }\n },\n\n notBottom: function() {\n if (!this.hasClass(\"notBottom\")) {\n this.addClass(\"notBottom\");\n this.removeClass(\"bottom\");\n\n if (this.onNotBottom) {\n this.onNotBottom.call(this);\n }\n }\n },\n\n shouldUnpin: function(details) {\n var scrollingDown = details.direction === \"down\";\n\n return scrollingDown && !details.top && details.toleranceExceeded;\n },\n\n shouldPin: function(details) {\n var scrollingUp = details.direction === \"up\";\n\n return (scrollingUp && details.toleranceExceeded) || details.top;\n },\n\n addClass: function(className) {\n this.elem.classList.add.apply(\n this.elem.classList,\n this.classes[className].split(\" \")\n );\n },\n\n removeClass: function(className) {\n this.elem.classList.remove.apply(\n this.elem.classList,\n this.classes[className].split(\" \")\n );\n },\n\n hasClass: function(className) {\n return this.classes[className].split(\" \").every(function(cls) {\n return this.classList.contains(cls);\n }, this.elem);\n },\n\n update: function(details) {\n if (details.isOutOfBounds) {\n // Ignore bouncy scrolling in OSX\n return;\n }\n\n if (this.frozen === true) {\n return;\n }\n\n if (details.top) {\n this.top();\n } else {\n this.notTop();\n }\n\n if (details.bottom) {\n this.bottom();\n } else {\n this.notBottom();\n }\n\n if (this.shouldUnpin(details)) {\n this.unpin();\n } else if (this.shouldPin(details)) {\n this.pin();\n }\n }\n };\n\n /**\n * Default options\n * @type {Object}\n */\n Headroom.options = {\n tolerance: {\n up: 0,\n down: 0\n },\n offset: 0,\n scroller: isBrowser() ? window : null,\n classes: {\n frozen: \"headroom--frozen\",\n pinned: \"headroom--pinned\",\n unpinned: \"headroom--unpinned\",\n top: \"headroom--top\",\n notTop: \"headroom--not-top\",\n bottom: \"headroom--bottom\",\n notBottom: \"headroom--not-bottom\",\n initial: \"headroom\"\n }\n };\n\n Headroom.cutsTheMustard = isSupported();\n\n return Headroom;\n\n}));\n", "/*!\n * money.js / fx() v0.2\n * Copyright 2014 Open Exchange Rates\n *\n * JavaScript library for realtime currency conversion and exchange rate calculation.\n *\n * Freely distributable under the MIT license.\n * Portions of money.js are inspired by or borrowed from underscore.js\n *\n * For details, examples and documentation:\n * http://openexchangerates.github.io/money.js/\n */\n(function(root, undefined) {\n\n\t// Create a safe reference to the money.js object for use below.\n\tvar fx = function(obj) {\n\t\treturn new fxWrapper(obj);\n\t};\n\n\t// Current version.\n\tfx.version = '0.2';\n\n\n\t/* --- Setup --- */\n\n\t// fxSetup can be defined before loading money.js, to set the exchange rates and the base\n\t// (and default from/to) currencies - or the rates can be loaded in later if needed.\n\tvar fxSetup = root.fxSetup || {\n\t\trates : {},\n\t\tbase : \"\"\n\t};\n\n\t// Object containing exchange rates relative to the fx.base currency, eg { \"GBP\" : \"0.64\" }\n\tfx.rates = fxSetup.rates;\n\n\t// Default exchange rate base currency (eg \"USD\"), which all the exchange rates are relative to\n\tfx.base = fxSetup.base;\n\n\t// Default from / to currencies for conversion via fx.convert():\n\tfx.settings = {\n\t\tfrom : fxSetup.from || fx.base,\n\t\tto : fxSetup.to || fx.base\n\t};\n\n\n\t/* --- Conversion --- */\n\n\t// The base function of the library: converts a value from one currency to another\n\tvar convert = fx.convert = function(val, opts) {\n\t\t// Convert arrays recursively\n\t\tif (typeof val === 'object' && val.length) {\n\t\t\tfor (var i = 0; i< val.length; i++ ) {\n\t\t\t\tval[i] = convert(val[i], opts);\n\t\t\t}\n\t\t\treturn val;\n\t\t}\n\n\t\t// Make sure we gots some opts\n\t\topts = opts || {};\n\n\t\t// We need to know the `from` and `to` currencies\n\t\tif( !opts.from ) opts.from = fx.settings.from;\n\t\tif( !opts.to ) opts.to = fx.settings.to;\n\n\t\t// Multiple the value by the exchange rate\n\t\treturn val * getRate( opts.to, opts.from );\n\t};\n\n\t// Returns the exchange rate to `target` currency from `base` currency\n\tvar getRate = function(to, from) {\n\t\t// Save bytes in minified version\n\t\tvar rates = fx.rates;\n\n\t\t// Make sure the base rate is in the rates object:\n\t\trates[fx.base] = 1;\n\n\t\t// Throw an error if either rate isn't in the rates array\n\t\tif ( !rates[to] || !rates[from] ) throw \"fx error\";\n\n\t\t// If `from` currency === fx.base, return the basic exchange rate for the `to` currency\n\t\tif ( from === fx.base ) {\n\t\t\treturn rates[to];\n\t\t}\n\n\t\t// If `to` currency === fx.base, return the basic inverse rate of the `from` currency\n\t\tif ( to === fx.base ) {\n\t\t\treturn 1 / rates[from];\n\t\t}\n\n\t\t// Otherwise, return the `to` rate multipled by the inverse of the `from` rate to get the\n\t\t// relative exchange rate between the two currencies\n\t\treturn rates[to] * (1 / rates[from]);\n\t};\n\n\n\t/* --- OOP wrapper and chaining --- */\n\n\t// If fx(val) is called as a function, it returns a wrapped object that can be used OO-style\n\tvar fxWrapper = function(val) {\n\t\t// Experimental: parse strings to pull out currency code and value:\n\t\tif ( typeof\tval === \"string\" ) {\n\t\t\tthis._v = parseFloat(val.replace(/[^0-9-.]/g, \"\"));\n\t\t\tthis._fx = val.replace(/([^A-Za-z])/g, \"\");\n\t\t} else {\n\t\t\tthis._v = val;\n\t\t}\n\t};\n\n\t// Expose `wrapper.prototype` as `fx.prototype`\n\tvar fxProto = fx.prototype = fxWrapper.prototype;\n\n\t// fx(val).convert(opts) does the same thing as fx.convert(val, opts)\n\tfxProto.convert = function() {\n\t\tvar args = Array.prototype.slice.call(arguments);\n\t\targs.unshift(this._v);\n\t\treturn convert.apply(fx, args);\n\t};\n\n\t// fx(val).from(currency) returns a wrapped `fx` where the value has been converted from\n\t// `currency` to the `fx.base` currency. Should be followed by `.to(otherCurrency)`\n\tfxProto.from = function(currency) {\n\t\tvar wrapped = fx(convert(this._v, {from: currency, to: fx.base}));\n\t\twrapped._fx = fx.base;\n\t\treturn wrapped;\n\t};\n\n\t// fx(val).to(currency) returns the value, converted from `fx.base` to `currency`\n\tfxProto.to = function(currency) {\n\t\treturn convert(this._v, {from: this._fx ? this._fx : fx.settings.from, to: currency});\n\t};\n\n\n\t/* --- Module Definition --- */\n\n\t// Export the fx object for CommonJS. If being loaded as an AMD module, define it as such.\n\t// Otherwise, just add `fx` to the global object\n\tif (typeof exports !== 'undefined') {\n\t\tif (typeof module !== 'undefined' && module.exports) {\n\t\t\texports = module.exports = fx;\n\t\t}\n\t\texports.fx = fx;\n\t} else if (typeof define === 'function' && define.amd) {\n\t\t// Return the library as an AMD module:\n\t\tdefine([], function() {\n\t\t\treturn fx;\n\t\t});\n\t} else {\n\t\t// Use fx.noConflict to restore `fx` back to its original value before money.js loaded.\n\t\t// Returns a reference to the library's `fx` object; e.g. `var money = fx.noConflict();`\n\t\tfx.noConflict = (function(previousFx) {\n\t\t\treturn function() {\n\t\t\t\t// Reset the value of the root's `fx` variable:\n\t\t\t\troot.fx = previousFx;\n\t\t\t\t// Delete the noConflict function:\n\t\t\t\tfx.noConflict = undefined;\n\t\t\t\t// Return reference to the library to re-assign it:\n\t\t\t\treturn fx;\n\t\t\t};\n\t\t})(root.fx);\n\n\t\t// Declare `fx` on the root (global/window) object:\n\t\troot['fx'] = fx;\n\t}\n\n\t// Root will be `window` in browser or `global` on the server:\n}(this));\n", "\"use strict\";\n\nmodule.exports = function has(object, key) {\n return Object.prototype.hasOwnProperty.call(object, key);\n};", "\"use strict\";\n\nvar _apply;\n\nfunction _classPrivateFieldLooseBase(receiver, privateKey) { if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) { throw new TypeError(\"attempted to use private field on non-instance\"); } return receiver; }\n\nvar id = 0;\n\nfunction _classPrivateFieldLooseKey(name) { return \"__private_\" + id++ + \"_\" + name; }\n\nconst has = require('./hasProperty');\n\nfunction insertReplacement(source, rx, replacement) {\n const newParts = [];\n source.forEach(chunk => {\n // When the source contains multiple placeholders for interpolation,\n // we should ignore chunks that are not strings, because those\n // can be JSX objects and will be otherwise incorrectly turned into strings.\n // Without this condition we\u2019d get this: [object Object] hello [object Object] my