@everymatrix/player-bonus-history 1.44.0 → 1.45.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +0,0 @@
1
- {"version":3,"file":"player-bonus-history.js","sources":["../../../node_modules/svelte/internal/index.mjs","../../../node_modules/whatwg-fetch/fetch.js","../../../node_modules/isomorphic-fetch/fetch-npm-browserify.js","../../../node_modules/rvhelper/node_modules/rxjs/node_modules/tslib/tslib.es6.js","../../../node_modules/rvhelper/node_modules/rxjs/dist/esm5/internal/util/isFunction.js","../../../node_modules/rvhelper/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js","../../../node_modules/rvhelper/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js","../../../node_modules/rvhelper/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js","../../../node_modules/rvhelper/node_modules/rxjs/dist/esm5/internal/Subscription.js","../../../node_modules/rvhelper/node_modules/rxjs/dist/esm5/internal/config.js","../../../node_modules/rvhelper/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js","../../../node_modules/rvhelper/node_modules/rxjs/dist/esm5/internal/util/noop.js","../../../node_modules/rvhelper/node_modules/rxjs/dist/esm5/internal/util/errorContext.js","../../../node_modules/rvhelper/node_modules/rxjs/dist/esm5/internal/Subscriber.js","../../../node_modules/rvhelper/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js","../../../node_modules/rvhelper/node_modules/rxjs/dist/esm5/internal/symbol/observable.js","../../../node_modules/rvhelper/node_modules/rxjs/dist/esm5/internal/Observable.js","../../../node_modules/rvhelper/node_modules/rxjs/dist/esm5/internal/util/pipe.js","../../../node_modules/rvhelper/node_modules/rxjs/dist/esm5/internal/util/identity.js","../../../node_modules/rvhelper/node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js","../../../node_modules/rvhelper/node_modules/rxjs/dist/esm5/internal/ReplaySubject.js","../../../node_modules/rvhelper/node_modules/rxjs/dist/esm5/internal/Subject.js","../../../node_modules/rvhelper/node_modules/rxjs/dist/esm5/internal/scheduler/dateTimestampProvider.js","../../../node_modules/rvhelper/communication.js","../../../node_modules/svelte/store/index.mjs","../../../node_modules/deepmerge/dist/cjs.js","../../../node_modules/tslib/tslib.es6.js","../../../node_modules/@formatjs/icu-messageformat-parser/lib/error.js","../../../node_modules/@formatjs/icu-messageformat-parser/lib/types.js","../../../node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js","../../../node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js","../../../node_modules/@formatjs/icu-skeleton-parser/lib/regex.generated.js","../../../node_modules/@formatjs/icu-skeleton-parser/lib/number.js","../../../node_modules/@formatjs/icu-messageformat-parser/lib/parser.js","../../../node_modules/@formatjs/icu-messageformat-parser/lib/time-data.generated.js","../../../node_modules/@formatjs/icu-messageformat-parser/lib/date-time-pattern-generator.js","../../../node_modules/@formatjs/icu-messageformat-parser/lib/index.js","../../../node_modules/@formatjs/fast-memoize/lib/index.js","../../../node_modules/intl-messageformat/lib/src/error.js","../../../node_modules/intl-messageformat/lib/src/formatters.js","../../../node_modules/intl-messageformat/lib/src/core.js","../../../node_modules/svelte-i18n/dist/runtime.esm.js","../../../node_modules/rvhelper/index.js","../../../node_modules/moment/moment.js","../../player-bonus-card/src/i18n.js","../../player-bonus-card/src/translations.js","../../player-bonus-card/src/PlayerBonusCard.svelte","../../../node_modules/@vaadin/component-base/src/define.js","../../../node_modules/@everymatrix/player-bonus-card/src/index.ts","../../../node_modules/@vaadin/vaadin-lumo-styles/version.js","../../../node_modules/@lit/reactive-element/css-tag.js","../../../node_modules/@lit/reactive-element/reactive-element.js","../../../node_modules/lit-html/lit-html.js","../../../node_modules/lit-element/lit-element.js","../../../node_modules/@vaadin/vaadin-themable-mixin/vaadin-theme-property-mixin.js","../../../node_modules/@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js","../../../node_modules/@vaadin/vaadin-lumo-styles/global.js","../../../node_modules/@vaadin/vaadin-themable-mixin/register-styles.js","../../../node_modules/@vaadin/vaadin-lumo-styles/color.js","../../../node_modules/@vaadin/vaadin-lumo-styles/sizing.js","../../../node_modules/@vaadin/vaadin-lumo-styles/style.js","../../../node_modules/@vaadin/vaadin-lumo-styles/typography.js","../../../node_modules/@vaadin/input-container/theme/lumo/vaadin-input-container-styles.js","../../../node_modules/@polymer/polymer/lib/utils/boot.js","../../../node_modules/@polymer/polymer/lib/utils/resolve-url.js","../../../node_modules/@polymer/polymer/lib/utils/settings.js","../../../node_modules/@polymer/polymer/lib/utils/mixin.js","../../../node_modules/@polymer/polymer/lib/elements/dom-module.js","../../../node_modules/@polymer/polymer/lib/utils/style-gather.js","../../../node_modules/@polymer/polymer/lib/utils/wrap.js","../../../node_modules/@polymer/polymer/lib/utils/path.js","../../../node_modules/@polymer/polymer/lib/utils/case-map.js","../../../node_modules/@polymer/polymer/lib/utils/async.js","../../../node_modules/@polymer/polymer/lib/mixins/properties-changed.js","../../../node_modules/@polymer/polymer/lib/mixins/property-accessors.js","../../../node_modules/@polymer/polymer/lib/mixins/template-stamp.js","../../../node_modules/@polymer/polymer/lib/mixins/property-effects.js","../../../node_modules/@polymer/polymer/lib/mixins/properties-mixin.js","../../../node_modules/@polymer/polymer/lib/mixins/element-mixin.js","../../../node_modules/@polymer/polymer/lib/utils/html-tag.js","../../../node_modules/@polymer/polymer/polymer-element.js","../../../node_modules/@vaadin/component-base/src/dir-mixin.js","../../../node_modules/@vaadin/input-container/src/vaadin-input-container.js","../../../node_modules/@vaadin/vaadin-lumo-styles/spacing.js","../../../node_modules/@vaadin/vaadin-lumo-styles/mixins/overlay.js","../../../node_modules/@vaadin/vaadin-lumo-styles/mixins/menu-overlay.js","../../../node_modules/@vaadin/date-picker/theme/lumo/vaadin-date-picker-overlay-styles.js","../../../node_modules/@vaadin/button/theme/lumo/vaadin-button-styles.js","../../../node_modules/@vaadin/component-base/src/controller-mixin.js","../../../node_modules/@vaadin/vaadin-development-mode-detector/vaadin-development-mode-detector.js","../../../node_modules/@vaadin/vaadin-usage-statistics/vaadin-usage-statistics-collect.js","../../../node_modules/@vaadin/component-base/src/async.js","../../../node_modules/@vaadin/component-base/src/debounce.js","../../../node_modules/@vaadin/component-base/src/element-mixin.js","../../../node_modules/@vaadin/component-base/src/dom-utils.js","../../../node_modules/@vaadin/component-base/src/slot-observer.js","../../../node_modules/@vaadin/component-base/src/unique-id-utils.js","../../../node_modules/@vaadin/component-base/src/slot-controller.js","../../../node_modules/@vaadin/component-base/src/tooltip-controller.js","../../../node_modules/@vaadin/button/src/vaadin-button-base.js","../../../node_modules/@vaadin/component-base/src/gestures.js","../../../node_modules/@vaadin/a11y-base/src/disabled-mixin.js","../../../node_modules/@vaadin/a11y-base/src/keyboard-mixin.js","../../../node_modules/@vaadin/a11y-base/src/focus-utils.js","../../../node_modules/@vaadin/a11y-base/src/focus-mixin.js","../../../node_modules/@vaadin/a11y-base/src/tabindex-mixin.js","../../../node_modules/@vaadin/button/src/vaadin-button-mixin.js","../../../node_modules/@vaadin/a11y-base/src/active-mixin.js","../../../node_modules/@vaadin/button/src/vaadin-button.js","../../../node_modules/@vaadin/date-picker/theme/lumo/vaadin-date-picker-year-styles.js","../../../node_modules/@vaadin/date-picker/theme/lumo/vaadin-date-picker-overlay-content-styles.js","../../../node_modules/@vaadin/date-picker/theme/lumo/vaadin-month-calendar-styles.js","../../../node_modules/@vaadin/vaadin-lumo-styles/font-icons.js","../../../node_modules/@vaadin/vaadin-lumo-styles/mixins/field-button.js","../../../node_modules/@vaadin/vaadin-lumo-styles/mixins/helper.js","../../../node_modules/@vaadin/vaadin-lumo-styles/mixins/required-field.js","../../../node_modules/@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js","../../../node_modules/@vaadin/date-picker/theme/lumo/vaadin-date-picker-styles.js","../../../node_modules/@polymer/polymer/lib/utils/render-status.js","../../../node_modules/@vaadin/component-base/src/browser-utils.js","../../../node_modules/@vaadin/a11y-base/src/aria-hidden.js","../../../node_modules/@vaadin/a11y-base/src/aria-modal-controller.js","../../../node_modules/@vaadin/a11y-base/src/focus-restoration-controller.js","../../../node_modules/@vaadin/a11y-base/src/focus-trap-controller.js","../../../node_modules/@vaadin/overlay/src/vaadin-overlay-focus-mixin.js","../../../node_modules/@vaadin/overlay/src/vaadin-overlay-stack-mixin.js","../../../node_modules/@vaadin/overlay/src/vaadin-overlay-mixin.js","../../../node_modules/@vaadin/overlay/src/vaadin-overlay-position-mixin.js","../../../node_modules/@vaadin/date-picker/src/vaadin-date-picker-overlay.js","../../../node_modules/@vaadin/overlay/src/vaadin-overlay-styles.js","../../../node_modules/@vaadin/date-picker/src/vaadin-date-picker-overlay-styles.js","../../../node_modules/@vaadin/date-picker/src/vaadin-date-picker-helper.js","../../../node_modules/@vaadin/date-picker/src/vaadin-infinite-scroller.js","../../../node_modules/@vaadin/date-picker/src/vaadin-date-picker-month-scroller.js","../../../node_modules/@vaadin/date-picker/src/vaadin-date-picker-year-scroller.js","../../../node_modules/@vaadin/date-picker/src/vaadin-date-picker-year.js","../../../node_modules/@polymer/polymer/lib/mixins/mutable-data.js","../../../node_modules/@polymer/polymer/lib/utils/templatize.js","../../../node_modules/@polymer/polymer/lib/utils/debounce.js","../../../node_modules/@polymer/polymer/lib/utils/flush.js","../../../node_modules/@polymer/polymer/lib/utils/hide-template-controls.js","../../../node_modules/@polymer/polymer/lib/elements/dom-repeat.js","../../../node_modules/@vaadin/date-picker/src/vaadin-month-calendar-mixin.js","../../../node_modules/@vaadin/date-picker/src/vaadin-month-calendar.js","../../../node_modules/@vaadin/date-picker/src/vaadin-month-calendar-styles.js","../../../node_modules/@vaadin/component-base/src/media-query-controller.js","../../../node_modules/@vaadin/date-picker/src/vaadin-date-picker-overlay-content-mixin.js","../../../node_modules/@vaadin/date-picker/src/vaadin-date-picker-overlay-content.js","../../../node_modules/@vaadin/date-picker/src/vaadin-date-picker-overlay-content-styles.js","../../../node_modules/@vaadin/a11y-base/src/delegate-focus-mixin.js","../../../node_modules/@vaadin/component-base/src/slot-styles-mixin.js","../../../node_modules/@vaadin/field-base/src/input-mixin.js","../../../node_modules/@vaadin/field-base/src/clear-button-mixin.js","../../../node_modules/@vaadin/a11y-base/src/aria-id-reference.js","../../../node_modules/@vaadin/a11y-base/src/field-aria-controller.js","../../../node_modules/@vaadin/component-base/src/slot-child-observe-controller.js","../../../node_modules/@vaadin/field-base/src/error-controller.js","../../../node_modules/@vaadin/field-base/src/helper-controller.js","../../../node_modules/@vaadin/field-base/src/label-controller.js","../../../node_modules/@vaadin/field-base/src/label-mixin.js","../../../node_modules/@vaadin/field-base/src/validate-mixin.js","../../../node_modules/@vaadin/component-base/src/delegate-state-mixin.js","../../../node_modules/@vaadin/field-base/src/input-constraints-mixin.js","../../../node_modules/@vaadin/field-base/src/input-control-mixin.js","../../../node_modules/@vaadin/field-base/src/field-mixin.js","../../../node_modules/@vaadin/field-base/src/input-controller.js","../../../node_modules/@vaadin/field-base/src/labelled-input-controller.js","../../../node_modules/@vaadin/field-base/src/styles/clear-button-styles.js","../../../node_modules/@vaadin/field-base/src/styles/input-field-shared-styles.js","../../../node_modules/@vaadin/field-base/src/styles/field-shared-styles.js","../../../node_modules/@vaadin/field-base/src/styles/input-field-container-styles.js","../../../node_modules/@vaadin/field-base/src/virtual-keyboard-controller.js","../../../node_modules/@vaadin/date-picker/src/vaadin-date-picker-mixin.js","../src/index.ts","../../../node_modules/@vaadin/component-base/src/overlay-class-mixin.js","../../../node_modules/@vaadin/date-picker/src/vaadin-date-picker.js","../../../node_modules/@vaadin/date-picker/src/vaadin-date-picker-styles.js","../src/i18n.js","../src/translations.js","../src/PlayerBonusHistory.svelte"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\n// Adapted from https://github.com/then/is-promise/blob/master/index.js\n// Distributed under MIT License https://github.com/then/is-promise/blob/master/LICENSE\nfunction is_promise(value) {\n return !!value && (typeof value === 'object' || typeof value === 'function') && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nlet src_url_equal_anchor;\nfunction src_url_equal(element_src, url) {\n if (!src_url_equal_anchor) {\n src_url_equal_anchor = document.createElement('a');\n }\n src_url_equal_anchor.href = url;\n return element_src === src_url_equal_anchor.href;\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction is_empty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction validate_store(store, name) {\n if (store != null && typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, ...callbacks) {\n if (store == null) {\n return noop;\n }\n const unsub = store.subscribe(...callbacks);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if ($$scope.dirty === undefined) {\n return lets;\n }\n if (typeof lets === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn) {\n if (slot_changes) {\n const slot_context = get_slot_context(slot_definition, ctx, $$scope, get_slot_context_fn);\n slot.p(slot_context, slot_changes);\n }\n}\nfunction update_slot(slot, slot_definition, ctx, $$scope, dirty, get_slot_changes_fn, get_slot_context_fn) {\n const slot_changes = get_slot_changes(slot_definition, $$scope, dirty, get_slot_changes_fn);\n update_slot_base(slot, slot_definition, ctx, $$scope, slot_changes, get_slot_context_fn);\n}\nfunction get_all_dirty_from_scope($$scope) {\n if ($$scope.ctx.length > 32) {\n const dirty = [];\n const length = $$scope.ctx.length / 32;\n for (let i = 0; i < length; i++) {\n dirty[i] = -1;\n }\n return dirty;\n }\n return -1;\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction compute_rest_props(props, keys) {\n const rest = {};\n keys = new Set(keys);\n for (const k in props)\n if (!keys.has(k) && k[0] !== '$')\n rest[k] = props[k];\n return rest;\n}\nfunction compute_slots(slots) {\n const result = {};\n for (const key in slots) {\n result[key] = true;\n }\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\nfunction action_destroyer(action_result) {\n return action_result && is_function(action_result.destroy) ? action_result.destroy : noop;\n}\nfunction split_css_unit(value) {\n const split = typeof value === 'string' && value.match(/^\\s*(-?[\\d.]+)([^\\s]*)\\s*$/);\n return split ? [parseFloat(split[1]), split[2] || 'px'] : [value, 'px'];\n}\nconst contenteditable_truthy_values = ['', true, 1, 'true', 'contenteditable'];\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\nconst globals = (typeof window !== 'undefined'\n ? window\n : typeof globalThis !== 'undefined'\n ? globalThis\n : global);\n\n/**\n * Resize observer singleton.\n * One listener per element only!\n * https://groups.google.com/a/chromium.org/g/blink-dev/c/z6ienONUb5A/m/F5-VcUZtBAAJ\n */\nclass ResizeObserverSingleton {\n constructor(options) {\n this.options = options;\n this._listeners = 'WeakMap' in globals ? new WeakMap() : undefined;\n }\n observe(element, listener) {\n this._listeners.set(element, listener);\n this._getObserver().observe(element, this.options);\n return () => {\n this._listeners.delete(element);\n this._observer.unobserve(element); // this line can probably be removed\n };\n }\n _getObserver() {\n var _a;\n return (_a = this._observer) !== null && _a !== void 0 ? _a : (this._observer = new ResizeObserver((entries) => {\n var _a;\n for (const entry of entries) {\n ResizeObserverSingleton.entries.set(entry.target, entry);\n (_a = this._listeners.get(entry.target)) === null || _a === void 0 ? void 0 : _a(entry);\n }\n }));\n }\n}\n// Needs to be written like this to pass the tree-shake-test\nResizeObserverSingleton.entries = 'WeakMap' in globals ? new WeakMap() : undefined;\n\n// Track which nodes are claimed during hydration. Unclaimed nodes can then be removed from the DOM\n// at the end of hydration without touching the remaining nodes.\nlet is_hydrating = false;\nfunction start_hydrating() {\n is_hydrating = true;\n}\nfunction end_hydrating() {\n is_hydrating = false;\n}\nfunction upper_bound(low, high, key, value) {\n // Return first index of value larger than input value in the range [low, high)\n while (low < high) {\n const mid = low + ((high - low) >> 1);\n if (key(mid) <= value) {\n low = mid + 1;\n }\n else {\n high = mid;\n }\n }\n return low;\n}\nfunction init_hydrate(target) {\n if (target.hydrate_init)\n return;\n target.hydrate_init = true;\n // We know that all children have claim_order values since the unclaimed have been detached if target is not <head>\n let children = target.childNodes;\n // If target is <head>, there may be children without claim_order\n if (target.nodeName === 'HEAD') {\n const myChildren = [];\n for (let i = 0; i < children.length; i++) {\n const node = children[i];\n if (node.claim_order !== undefined) {\n myChildren.push(node);\n }\n }\n children = myChildren;\n }\n /*\n * Reorder claimed children optimally.\n * We can reorder claimed children optimally by finding the longest subsequence of\n * nodes that are already claimed in order and only moving the rest. The longest\n * subsequence of nodes that are claimed in order can be found by\n * computing the longest increasing subsequence of .claim_order values.\n *\n * This algorithm is optimal in generating the least amount of reorder operations\n * possible.\n *\n * Proof:\n * We know that, given a set of reordering operations, the nodes that do not move\n * always form an increasing subsequence, since they do not move among each other\n * meaning that they must be already ordered among each other. Thus, the maximal\n * set of nodes that do not move form a longest increasing subsequence.\n */\n // Compute longest increasing subsequence\n // m: subsequence length j => index k of smallest value that ends an increasing subsequence of length j\n const m = new Int32Array(children.length + 1);\n // Predecessor indices + 1\n const p = new Int32Array(children.length);\n m[0] = -1;\n let longest = 0;\n for (let i = 0; i < children.length; i++) {\n const current = children[i].claim_order;\n // Find the largest subsequence length such that it ends in a value less than our current value\n // upper_bound returns first greater value, so we subtract one\n // with fast path for when we are on the current longest subsequence\n const seqLen = ((longest > 0 && children[m[longest]].claim_order <= current) ? longest + 1 : upper_bound(1, longest, idx => children[m[idx]].claim_order, current)) - 1;\n p[i] = m[seqLen] + 1;\n const newLen = seqLen + 1;\n // We can guarantee that current is the smallest value. Otherwise, we would have generated a longer sequence.\n m[newLen] = i;\n longest = Math.max(newLen, longest);\n }\n // The longest increasing subsequence of nodes (initially reversed)\n const lis = [];\n // The rest of the nodes, nodes that will be moved\n const toMove = [];\n let last = children.length - 1;\n for (let cur = m[longest] + 1; cur != 0; cur = p[cur - 1]) {\n lis.push(children[cur - 1]);\n for (; last >= cur; last--) {\n toMove.push(children[last]);\n }\n last--;\n }\n for (; last >= 0; last--) {\n toMove.push(children[last]);\n }\n lis.reverse();\n // We sort the nodes being moved to guarantee that their insertion order matches the claim order\n toMove.sort((a, b) => a.claim_order - b.claim_order);\n // Finally, we move the nodes\n for (let i = 0, j = 0; i < toMove.length; i++) {\n while (j < lis.length && toMove[i].claim_order >= lis[j].claim_order) {\n j++;\n }\n const anchor = j < lis.length ? lis[j] : null;\n target.insertBefore(toMove[i], anchor);\n }\n}\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction append_styles(target, style_sheet_id, styles) {\n const append_styles_to = get_root_for_style(target);\n if (!append_styles_to.getElementById(style_sheet_id)) {\n const style = element('style');\n style.id = style_sheet_id;\n style.textContent = styles;\n append_stylesheet(append_styles_to, style);\n }\n}\nfunction get_root_for_style(node) {\n if (!node)\n return document;\n const root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n if (root && root.host) {\n return root;\n }\n return node.ownerDocument;\n}\nfunction append_empty_stylesheet(node) {\n const style_element = element('style');\n append_stylesheet(get_root_for_style(node), style_element);\n return style_element.sheet;\n}\nfunction append_stylesheet(node, style) {\n append(node.head || node, style);\n return style.sheet;\n}\nfunction append_hydration(target, node) {\n if (is_hydrating) {\n init_hydrate(target);\n if ((target.actual_end_child === undefined) || ((target.actual_end_child !== null) && (target.actual_end_child.parentNode !== target))) {\n target.actual_end_child = target.firstChild;\n }\n // Skip nodes of undefined ordering\n while ((target.actual_end_child !== null) && (target.actual_end_child.claim_order === undefined)) {\n target.actual_end_child = target.actual_end_child.nextSibling;\n }\n if (node !== target.actual_end_child) {\n // We only insert if the ordering of this node should be modified or the parent node is not target\n if (node.claim_order !== undefined || node.parentNode !== target) {\n target.insertBefore(node, target.actual_end_child);\n }\n }\n else {\n target.actual_end_child = node.nextSibling;\n }\n }\n else if (node.parentNode !== target || node.nextSibling !== null) {\n target.appendChild(node);\n }\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction insert_hydration(target, node, anchor) {\n if (is_hydrating && !anchor) {\n append_hydration(target, node);\n }\n else if (node.parentNode !== target || node.nextSibling != anchor) {\n target.insertBefore(node, anchor || null);\n }\n}\nfunction detach(node) {\n if (node.parentNode) {\n node.parentNode.removeChild(node);\n }\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction comment(content) {\n return document.createComment(content);\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_immediate_propagation(fn) {\n return function (event) {\n event.stopImmediatePropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction trusted(fn) {\n return function (event) {\n // @ts-ignore\n if (event.isTrusted)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\n/**\n * List of attributes that should always be set through the attr method,\n * because updating them through the property setter doesn't work reliably.\n * In the example of `width`/`height`, the problem is that the setter only\n * accepts numeric values, but the attribute can also be set to a string like `50%`.\n * If this list becomes too big, rethink this approach.\n */\nconst always_set_through_set_attribute = ['width', 'height'];\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (key === '__value') {\n node.value = node[key] = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set && always_set_through_set_attribute.indexOf(key) === -1) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data_map(node, data_map) {\n Object.keys(data_map).forEach((key) => {\n set_custom_element_data(node, key, data_map[key]);\n });\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = typeof node[prop] === 'boolean' && value === '' ? true : value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction set_dynamic_element_data(tag) {\n return (/-/.test(tag)) ? set_custom_element_data_map : set_attributes;\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group, __value, checked) {\n const value = new Set();\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.add(group[i].__value);\n }\n if (!checked) {\n value.delete(__value);\n }\n return Array.from(value);\n}\nfunction init_binding_group(group) {\n let _inputs;\n return {\n /* push */ p(...inputs) {\n _inputs = inputs;\n _inputs.forEach(input => group.push(input));\n },\n /* remove */ r() {\n _inputs.forEach(input => group.splice(group.indexOf(input), 1));\n }\n };\n}\nfunction init_binding_group_dynamic(group, indexes) {\n let _group = get_binding_group(group);\n let _inputs;\n function get_binding_group(group) {\n for (let i = 0; i < indexes.length; i++) {\n group = group[indexes[i]] = group[indexes[i]] || [];\n }\n return group;\n }\n function push() {\n _inputs.forEach(input => _group.push(input));\n }\n function remove() {\n _inputs.forEach(input => _group.splice(_group.indexOf(input), 1));\n }\n return {\n /* update */ u(new_indexes) {\n indexes = new_indexes;\n const new_group = get_binding_group(group);\n if (new_group !== _group) {\n remove();\n _group = new_group;\n push();\n }\n },\n /* push */ p(...inputs) {\n _inputs = inputs;\n push();\n },\n /* remove */ r: remove\n };\n}\nfunction to_number(value) {\n return value === '' ? null : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction init_claim_info(nodes) {\n if (nodes.claim_info === undefined) {\n nodes.claim_info = { last_index: 0, total_claimed: 0 };\n }\n}\nfunction claim_node(nodes, predicate, processNode, createNode, dontUpdateLastIndex = false) {\n // Try to find nodes in an order such that we lengthen the longest increasing subsequence\n init_claim_info(nodes);\n const resultNode = (() => {\n // We first try to find an element after the previous one\n for (let i = nodes.claim_info.last_index; i < nodes.length; i++) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n return node;\n }\n }\n // Otherwise, we try to find one before\n // We iterate in reverse so that we don't go too far back\n for (let i = nodes.claim_info.last_index - 1; i >= 0; i--) {\n const node = nodes[i];\n if (predicate(node)) {\n const replacement = processNode(node);\n if (replacement === undefined) {\n nodes.splice(i, 1);\n }\n else {\n nodes[i] = replacement;\n }\n if (!dontUpdateLastIndex) {\n nodes.claim_info.last_index = i;\n }\n else if (replacement === undefined) {\n // Since we spliced before the last_index, we decrease it\n nodes.claim_info.last_index--;\n }\n return node;\n }\n }\n // If we can't find any matching node, we create a new one\n return createNode();\n })();\n resultNode.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n return resultNode;\n}\nfunction claim_element_base(nodes, name, attributes, create_element) {\n return claim_node(nodes, (node) => node.nodeName === name, (node) => {\n const remove = [];\n for (let j = 0; j < node.attributes.length; j++) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name]) {\n remove.push(attribute.name);\n }\n }\n remove.forEach(v => node.removeAttribute(v));\n return undefined;\n }, () => create_element(name));\n}\nfunction claim_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, element);\n}\nfunction claim_svg_element(nodes, name, attributes) {\n return claim_element_base(nodes, name, attributes, svg_element);\n}\nfunction claim_text(nodes, data) {\n return claim_node(nodes, (node) => node.nodeType === 3, (node) => {\n const dataStr = '' + data;\n if (node.data.startsWith(dataStr)) {\n if (node.data.length !== dataStr.length) {\n return node.splitText(dataStr.length);\n }\n }\n else {\n node.data = dataStr;\n }\n }, () => text(data), true // Text nodes should not update last index since it is likely not worth it to eliminate an increasing subsequence of actual elements\n );\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction claim_comment(nodes, data) {\n return claim_node(nodes, (node) => node.nodeType === 8, (node) => {\n node.data = '' + data;\n return undefined;\n }, () => comment(data), true);\n}\nfunction find_comment(nodes, text, start) {\n for (let i = start; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 8 /* comment node */ && node.textContent.trim() === text) {\n return i;\n }\n }\n return nodes.length;\n}\nfunction claim_html_tag(nodes, is_svg) {\n // find html opening tag\n const start_index = find_comment(nodes, 'HTML_TAG_START', 0);\n const end_index = find_comment(nodes, 'HTML_TAG_END', start_index);\n if (start_index === end_index) {\n return new HtmlTagHydration(undefined, is_svg);\n }\n init_claim_info(nodes);\n const html_tag_nodes = nodes.splice(start_index, end_index - start_index + 1);\n detach(html_tag_nodes[0]);\n detach(html_tag_nodes[html_tag_nodes.length - 1]);\n const claimed_nodes = html_tag_nodes.slice(1, html_tag_nodes.length - 1);\n for (const n of claimed_nodes) {\n n.claim_order = nodes.claim_info.total_claimed;\n nodes.claim_info.total_claimed += 1;\n }\n return new HtmlTagHydration(claimed_nodes, is_svg);\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.data === data)\n return;\n text.data = data;\n}\nfunction set_data_contenteditable(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n text.data = data;\n}\nfunction set_data_maybe_contenteditable(text, data, attr_value) {\n if (~contenteditable_truthy_values.indexOf(attr_value)) {\n set_data_contenteditable(text, data);\n }\n else {\n set_data(text, data);\n }\n}\nfunction set_input_value(input, value) {\n input.value = value == null ? '' : value;\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n if (value == null) {\n node.style.removeProperty(key);\n }\n else {\n node.style.setProperty(key, value, important ? 'important' : '');\n }\n}\nfunction select_option(select, value, mounting) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n if (!mounting || value !== undefined) {\n select.selectedIndex = -1; // no option should be selected\n }\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked');\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\n// unfortunately this can't be a constant as that wouldn't be tree-shakeable\n// so we cache the result instead\nlet crossorigin;\nfunction is_crossorigin() {\n if (crossorigin === undefined) {\n crossorigin = false;\n try {\n if (typeof window !== 'undefined' && window.parent) {\n void window.parent.document;\n }\n }\n catch (error) {\n crossorigin = true;\n }\n }\n return crossorigin;\n}\nfunction add_iframe_resize_listener(node, fn) {\n const computed_style = getComputedStyle(node);\n if (computed_style.position === 'static') {\n node.style.position = 'relative';\n }\n const iframe = element('iframe');\n iframe.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ' +\n 'overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;');\n iframe.setAttribute('aria-hidden', 'true');\n iframe.tabIndex = -1;\n const crossorigin = is_crossorigin();\n let unsubscribe;\n if (crossorigin) {\n iframe.src = \"data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}</script>\";\n unsubscribe = listen(window, 'message', (event) => {\n if (event.source === iframe.contentWindow)\n fn();\n });\n }\n else {\n iframe.src = 'about:blank';\n iframe.onload = () => {\n unsubscribe = listen(iframe.contentWindow, 'resize', fn);\n // make sure an initial resize event is fired _after_ the iframe is loaded (which is asynchronous)\n // see https://github.com/sveltejs/svelte/issues/4233\n fn();\n };\n }\n append(node, iframe);\n return () => {\n if (crossorigin) {\n unsubscribe();\n }\n else if (unsubscribe && iframe.contentWindow) {\n unsubscribe();\n }\n detach(iframe);\n };\n}\nconst resize_observer_content_box = /* @__PURE__ */ new ResizeObserverSingleton({ box: 'content-box' });\nconst resize_observer_border_box = /* @__PURE__ */ new ResizeObserverSingleton({ box: 'border-box' });\nconst resize_observer_device_pixel_content_box = /* @__PURE__ */ new ResizeObserverSingleton({ box: 'device-pixel-content-box' });\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail, { bubbles = false, cancelable = false } = {}) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, bubbles, cancelable, detail);\n return e;\n}\nfunction query_selector_all(selector, parent = document.body) {\n return Array.from(parent.querySelectorAll(selector));\n}\nfunction head_selector(nodeId, head) {\n const result = [];\n let started = 0;\n for (const node of head.childNodes) {\n if (node.nodeType === 8 /* comment node */) {\n const comment = node.textContent.trim();\n if (comment === `HEAD_${nodeId}_END`) {\n started -= 1;\n result.push(node);\n }\n else if (comment === `HEAD_${nodeId}_START`) {\n started += 1;\n result.push(node);\n }\n }\n else if (started > 0) {\n result.push(node);\n }\n }\n return result;\n}\nclass HtmlTag {\n constructor(is_svg = false) {\n this.is_svg = false;\n this.is_svg = is_svg;\n this.e = this.n = null;\n }\n c(html) {\n this.h(html);\n }\n m(html, target, anchor = null) {\n if (!this.e) {\n if (this.is_svg)\n this.e = svg_element(target.nodeName);\n /** #7364 target for <template> may be provided as #document-fragment(11) */\n else\n this.e = element((target.nodeType === 11 ? 'TEMPLATE' : target.nodeName));\n this.t = target.tagName !== 'TEMPLATE' ? target : target.content;\n this.c(html);\n }\n this.i(anchor);\n }\n h(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.nodeName === 'TEMPLATE' ? this.e.content.childNodes : this.e.childNodes);\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(this.t, this.n[i], anchor);\n }\n }\n p(html) {\n this.d();\n this.h(html);\n this.i(this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\nclass HtmlTagHydration extends HtmlTag {\n constructor(claimed_nodes, is_svg = false) {\n super(is_svg);\n this.e = this.n = null;\n this.l = claimed_nodes;\n }\n c(html) {\n if (this.l) {\n this.n = this.l;\n }\n else {\n super.c(html);\n }\n }\n i(anchor) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert_hydration(this.t, this.n[i], anchor);\n }\n }\n}\nfunction attribute_to_object(attributes) {\n const result = {};\n for (const attribute of attributes) {\n result[attribute.name] = attribute.value;\n }\n return result;\n}\nfunction get_custom_elements_slots(element) {\n const result = {};\n element.childNodes.forEach((node) => {\n result[node.slot || 'default'] = true;\n });\n return result;\n}\nfunction construct_svelte_component(component, props) {\n return new component(props);\n}\n\n// we need to store the information for multiple documents because a Svelte application could also contain iframes\n// https://github.com/sveltejs/svelte/issues/3624\nconst managed_styles = new Map();\nlet active = 0;\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_style_information(doc, node) {\n const info = { stylesheet: append_empty_stylesheet(node), rules: {} };\n managed_styles.set(doc, info);\n return info;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n const doc = get_root_for_style(node);\n const { stylesheet, rules } = managed_styles.get(doc) || create_style_information(doc, node);\n if (!rules[name]) {\n rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ''}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n const previous = (node.style.animation || '').split(', ');\n const next = previous.filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n );\n const deleted = previous.length - next.length;\n if (deleted) {\n node.style.animation = next.join(', ');\n active -= deleted;\n if (!active)\n clear_rules();\n }\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n managed_styles.forEach(info => {\n const { ownerNode } = info.stylesheet;\n // there is no ownerNode if it runs on jsdom.\n if (ownerNode)\n detach(ownerNode);\n });\n managed_styles.clear();\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error('Function called outside component initialization');\n return current_component;\n}\n/**\n * Schedules a callback to run immediately before the component is updated after any state change.\n *\n * The first time the callback runs will be before the initial `onMount`\n *\n * https://svelte.dev/docs#run-time-svelte-beforeupdate\n */\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\n/**\n * The `onMount` function schedules a callback to run as soon as the component has been mounted to the DOM.\n * It must be called during the component's initialisation (but doesn't need to live *inside* the component;\n * it can be called from an external module).\n *\n * `onMount` does not run inside a [server-side component](/docs#run-time-server-side-component-api).\n *\n * https://svelte.dev/docs#run-time-svelte-onmount\n */\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\n/**\n * Schedules a callback to run immediately after the component has been updated.\n *\n * The first time the callback runs will be after the initial `onMount`\n */\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\n/**\n * Schedules a callback to run immediately before the component is unmounted.\n *\n * Out of `onMount`, `beforeUpdate`, `afterUpdate` and `onDestroy`, this is the\n * only one that runs inside a server-side component.\n *\n * https://svelte.dev/docs#run-time-svelte-ondestroy\n */\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\n/**\n * Creates an event dispatcher that can be used to dispatch [component events](/docs#template-syntax-component-directives-on-eventname).\n * Event dispatchers are functions that can take two arguments: `name` and `detail`.\n *\n * Component events created with `createEventDispatcher` create a\n * [CustomEvent](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent).\n * These events do not [bubble](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Events#Event_bubbling_and_capture).\n * The `detail` argument corresponds to the [CustomEvent.detail](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail)\n * property and can contain any type of data.\n *\n * https://svelte.dev/docs#run-time-svelte-createeventdispatcher\n */\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail, { cancelable = false } = {}) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail, { cancelable });\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n return !event.defaultPrevented;\n }\n return true;\n };\n}\n/**\n * Associates an arbitrary `context` object with the current component and the specified `key`\n * and returns that object. The context is then available to children of the component\n * (including slotted content) with `getContext`.\n *\n * Like lifecycle functions, this must be called during component initialisation.\n *\n * https://svelte.dev/docs#run-time-svelte-setcontext\n */\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n return context;\n}\n/**\n * Retrieves the context that belongs to the closest parent component with the specified `key`.\n * Must be called during component initialisation.\n *\n * https://svelte.dev/docs#run-time-svelte-getcontext\n */\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\n/**\n * Retrieves the whole context map that belongs to the closest parent component.\n * Must be called during component initialisation. Useful, for example, if you\n * programmatically create a component and want to pass the existing context to it.\n *\n * https://svelte.dev/docs#run-time-svelte-getallcontexts\n */\nfunction getAllContexts() {\n return get_current_component().$$.context;\n}\n/**\n * Checks whether a given `key` has been set in the context of a parent component.\n * Must be called during component initialisation.\n *\n * https://svelte.dev/docs#run-time-svelte-hascontext\n */\nfunction hasContext(key) {\n return get_current_component().$$.context.has(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n // @ts-ignore\n callbacks.slice().forEach(fn => fn.call(this, event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nlet render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = /* @__PURE__ */ Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\n// flush() calls callbacks in this order:\n// 1. All beforeUpdate callbacks, in order: parents before children\n// 2. All bind:this callbacks, in reverse order: children before parents.\n// 3. All afterUpdate callbacks, in order: parents before children. EXCEPT\n// for afterUpdates called during the initial onMount, which are called in\n// reverse order: children before parents.\n// Since callbacks might update component values, which could trigger another\n// call to flush(), the following steps guard against this:\n// 1. During beforeUpdate, any updated components will be added to the\n// dirty_components array and will cause a reentrant call to flush(). Because\n// the flush index is kept outside the function, the reentrant call will pick\n// up where the earlier call left off and go through all dirty components. The\n// current_component value is saved and restored so that the reentrant call will\n// not interfere with the \"parent\" flush() call.\n// 2. bind:this callbacks cannot trigger new flush() calls.\n// 3. During afterUpdate, any updated components will NOT have their afterUpdate\n// callback called a second time; the seen_callbacks set, outside the flush()\n// function, guarantees this behavior.\nconst seen_callbacks = new Set();\nlet flushidx = 0; // Do *not* move this inside the flush() function\nfunction flush() {\n // Do not reenter flush while dirty components are updated, as this can\n // result in an infinite loop. Instead, let the inner flush handle it.\n // Reentrancy is ok afterwards for bindings etc.\n if (flushidx !== 0) {\n return;\n }\n const saved_component = current_component;\n do {\n // first, call beforeUpdate functions\n // and update components\n try {\n while (flushidx < dirty_components.length) {\n const component = dirty_components[flushidx];\n flushidx++;\n set_current_component(component);\n update(component.$$);\n }\n }\n catch (e) {\n // reset dirty state to not end up in a deadlocked state and then rethrow\n dirty_components.length = 0;\n flushidx = 0;\n throw e;\n }\n set_current_component(null);\n dirty_components.length = 0;\n flushidx = 0;\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n callback();\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n seen_callbacks.clear();\n set_current_component(saved_component);\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n/**\n * Useful for example to execute remaining `afterUpdate` callbacks before executing `destroy`.\n */\nfunction flush_render_callbacks(fns) {\n const filtered = [];\n const targets = [];\n render_callbacks.forEach((c) => fns.indexOf(c) === -1 ? filtered.push(c) : targets.push(c));\n targets.forEach((c) => c());\n render_callbacks = filtered;\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n else if (callback) {\n callback();\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n const options = { direction: 'in' };\n let config = fn(node, params, options);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n started = true;\n delete_rule(node);\n if (is_function(config)) {\n config = config(options);\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n const options = { direction: 'out' };\n let config = fn(node, params, options);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config(options);\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n const options = { direction: 'both' };\n let config = fn(node, params, options);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = (program.b - t);\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program || pending_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config(options);\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n if (info.blocks[i] === block) {\n info.blocks[i] = null;\n }\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n if (!info.hasCatch) {\n throw error;\n }\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\nfunction update_await_block_branch(info, ctx, dirty) {\n const child_ctx = ctx.slice();\n const { resolved } = info;\n if (info.current === info.then) {\n child_ctx[info.value] = resolved;\n }\n if (info.current === info.catch) {\n child_ctx[info.error] = resolved;\n }\n info.block.p(child_ctx, dirty);\n}\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n const updates = [];\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n // defer updates until all the DOM shuffling is done\n updates.push(() => block.p(child_ctx, dirty));\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n run_all(updates);\n return new_blocks;\n}\nfunction validate_each_keys(ctx, list, get_context, get_key) {\n const keys = new Set();\n for (let i = 0; i < list.length; i++) {\n const key = get_key(get_context(ctx, list, i));\n if (keys.has(key)) {\n throw new Error('Cannot have duplicate keys in a keyed each');\n }\n keys.add(key);\n }\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\nconst _boolean_attributes = [\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'inert',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n];\n/**\n * List of HTML boolean attributes (e.g. `<input disabled>`).\n * Source: https://html.spec.whatwg.org/multipage/indices.html\n */\nconst boolean_attributes = new Set([..._boolean_attributes]);\n\n/** regex of all html void element names */\nconst void_element_names = /^(?:area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/;\nfunction is_void(name) {\n return void_element_names.test(name) || name.toLowerCase() === '!doctype';\n}\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, attrs_to_add) {\n const attributes = Object.assign({}, ...args);\n if (attrs_to_add) {\n const classes_to_add = attrs_to_add.classes;\n const styles_to_add = attrs_to_add.styles;\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n if (styles_to_add) {\n if (attributes.style == null) {\n attributes.style = style_object_to_string(styles_to_add);\n }\n else {\n attributes.style = style_object_to_string(merge_ssr_styles(attributes.style, styles_to_add));\n }\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += ' ' + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += ' ' + name;\n }\n else if (value != null) {\n str += ` ${name}=\"${value}\"`;\n }\n });\n return str;\n}\nfunction merge_ssr_styles(style_attribute, style_directive) {\n const style_object = {};\n for (const individual_style of style_attribute.split(';')) {\n const colon_index = individual_style.indexOf(':');\n const name = individual_style.slice(0, colon_index).trim();\n const value = individual_style.slice(colon_index + 1).trim();\n if (!name)\n continue;\n style_object[name] = value;\n }\n for (const name in style_directive) {\n const value = style_directive[name];\n if (value) {\n style_object[name] = value;\n }\n else {\n delete style_object[name];\n }\n }\n return style_object;\n}\nconst ATTR_REGEX = /[&\"]/g;\nconst CONTENT_REGEX = /[&<]/g;\n/**\n * Note: this method is performance sensitive and has been optimized\n * https://github.com/sveltejs/svelte/pull/5701\n */\nfunction escape(value, is_attr = false) {\n const str = String(value);\n const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX;\n pattern.lastIndex = 0;\n let escaped = '';\n let last = 0;\n while (pattern.test(str)) {\n const i = pattern.lastIndex - 1;\n const ch = str[i];\n escaped += str.substring(last, i) + (ch === '&' ? '&amp;' : (ch === '\"' ? '&quot;' : '&lt;'));\n last = i + 1;\n }\n return escaped + str.substring(last);\n}\nfunction escape_attribute_value(value) {\n // keep booleans, null, and undefined for the sake of `spread`\n const should_escape = typeof value === 'string' || (value && typeof value === 'object');\n return should_escape ? escape(value, true) : value;\n}\nfunction escape_object(obj) {\n const result = {};\n for (const key in obj) {\n result[key] = escape_attribute_value(obj[key]);\n }\n return result;\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules. Otherwise you may need to fix a <${name}>.`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots, context) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(context || (parent_component ? parent_component.$$.context : [])),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, { $$slots = {}, context = new Map() } = {}) => {\n on_destroy = [];\n const result = { title: '', head: '', css: new Set() };\n const html = $$render(result, props, {}, $$slots, context);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.title + result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n const assignment = (boolean && value === true) ? '' : `=\"${escape(value, true)}\"`;\n return ` ${name}${assignment}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : '';\n}\nfunction style_object_to_string(style_object) {\n return Object.keys(style_object)\n .filter(key => style_object[key])\n .map(key => `${key}: ${escape_attribute_value(style_object[key])};`)\n .join(' ');\n}\nfunction add_styles(style_object) {\n const styles = style_object_to_string(style_object);\n return styles ? ` style=\"${styles}\"` : '';\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor, customElement) {\n const { fragment, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n if (!customElement) {\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = component.$$.on_mount.map(run).filter(is_function);\n // if the component was destroyed immediately\n // it will update the `$$.on_destroy` reference to `null`.\n // the destructured on_destroy may still reference to the old array\n if (component.$$.on_destroy) {\n component.$$.on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n }\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n flush_render_callbacks($$.after_update);\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, append_styles, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const $$ = component.$$ = {\n fragment: null,\n ctx: [],\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n on_disconnect: [],\n before_update: [],\n after_update: [],\n context: new Map(options.context || (parent_component ? parent_component.$$.context : [])),\n // everything else\n callbacks: blank_object(),\n dirty,\n skip_bound: false,\n root: options.target || parent_component.$$.root\n };\n append_styles && append_styles($$.root);\n let ready = false;\n $$.ctx = instance\n ? instance(component, options.props || {}, (i, ret, ...rest) => {\n const value = rest.length ? rest[0] : ret;\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if (!$$.skip_bound && $$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n start_hydrating();\n const nodes = children(options.target);\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(nodes);\n nodes.forEach(detach);\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor, options.customElement);\n end_hydrating();\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n const { on_mount } = this.$$;\n this.$$.on_disconnect = on_mount.map(run).filter(is_function);\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n disconnectedCallback() {\n run_all(this.$$.on_disconnect);\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n if (!is_function(callback)) {\n return noop;\n }\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n };\n}\n/**\n * Base class for Svelte components. Used when dev=false.\n */\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n if (!is_function(callback)) {\n return noop;\n }\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set($$props) {\n if (this.$$set && !is_empty($$props)) {\n this.$$.skip_bound = true;\n this.$$set($$props);\n this.$$.skip_bound = false;\n }\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, Object.assign({ version: '3.59.2' }, detail), { bubbles: true }));\n}\nfunction append_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append(target, node);\n}\nfunction append_hydration_dev(target, node) {\n dispatch_dev('SvelteDOMInsert', { target, node });\n append_hydration(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction insert_hydration_dev(target, node, anchor) {\n dispatch_dev('SvelteDOMInsert', { target, node, anchor });\n insert_hydration(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev('SvelteDOMRemove', { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation, has_stop_immediate_propagation) {\n const modifiers = options === true ? ['capture'] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n if (has_stop_immediate_propagation)\n modifiers.push('stopImmediatePropagation');\n dispatch_dev('SvelteDOMAddEventListener', { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev('SvelteDOMRemoveEventListener', { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev('SvelteDOMRemoveAttribute', { node, attribute });\n else\n dispatch_dev('SvelteDOMSetAttribute', { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev('SvelteDOMSetProperty', { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev('SvelteDOMSetDataset', { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.data === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction set_data_contenteditable_dev(text, data) {\n data = '' + data;\n if (text.wholeText === data)\n return;\n dispatch_dev('SvelteDOMSetData', { node: text, data });\n text.data = data;\n}\nfunction set_data_maybe_contenteditable_dev(text, data, attr_value) {\n if (~contenteditable_truthy_values.indexOf(attr_value)) {\n set_data_contenteditable_dev(text, data);\n }\n else {\n set_data_dev(text, data);\n }\n}\nfunction validate_each_argument(arg) {\n if (typeof arg !== 'string' && !(arg && typeof arg === 'object' && 'length' in arg)) {\n let msg = '{#each} only iterates over array-like objects.';\n if (typeof Symbol === 'function' && arg && Symbol.iterator in arg) {\n msg += ' You can use a spread to convert this iterable into an array.';\n }\n throw new Error(msg);\n }\n}\nfunction validate_slots(name, slot, keys) {\n for (const slot_key of Object.keys(slot)) {\n if (!~keys.indexOf(slot_key)) {\n console.warn(`<${name}> received an unexpected slot \"${slot_key}\".`);\n }\n }\n}\nfunction validate_dynamic_element(tag) {\n const is_string = typeof tag === 'string';\n if (tag && !is_string) {\n throw new Error('<svelte:element> expects \"this\" attribute to be a string.');\n }\n}\nfunction validate_void_dynamic_element(tag) {\n if (tag && is_void(tag)) {\n console.warn(`<svelte:element this=\"${tag}\"> is self-closing and cannot have content.`);\n }\n}\nfunction construct_svelte_component_dev(component, props) {\n const error_message = 'this={...} of <svelte:component> should specify a Svelte component.';\n try {\n const instance = new component(props);\n if (!instance.$$ || !instance.$set || !instance.$on || !instance.$destroy) {\n throw new Error(error_message);\n }\n return instance;\n }\n catch (err) {\n const { message } = err;\n if (typeof message === 'string' && message.indexOf('is not a constructor') !== -1) {\n throw new Error(error_message);\n }\n else {\n throw err;\n }\n }\n}\n/**\n * Base class for Svelte components with some minor dev-enhancements. Used when dev=true.\n */\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(\"'target' is a required option\");\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn('Component was already destroyed'); // eslint-disable-line no-console\n };\n }\n $capture_state() { }\n $inject_state() { }\n}\n/**\n * Base class to create strongly typed Svelte components.\n * This only exists for typing purposes and should be used in `.d.ts` files.\n *\n * ### Example:\n *\n * You have component library on npm called `component-library`, from which\n * you export a component called `MyComponent`. For Svelte+TypeScript users,\n * you want to provide typings. Therefore you create a `index.d.ts`:\n * ```ts\n * import { SvelteComponentTyped } from \"svelte\";\n * export class MyComponent extends SvelteComponentTyped<{foo: string}> {}\n * ```\n * Typing this makes it possible for IDEs like VS Code with the Svelte extension\n * to provide intellisense and to use the component like this in a Svelte file\n * with TypeScript:\n * ```svelte\n * <script lang=\"ts\">\n * \timport { MyComponent } from \"component-library\";\n * </script>\n * <MyComponent foo={'bar'} />\n * ```\n *\n * #### Why not make this part of `SvelteComponent(Dev)`?\n * Because\n * ```ts\n * class ASubclassOfSvelteComponent extends SvelteComponent<{foo: string}> {}\n * const component: typeof SvelteComponent = ASubclassOfSvelteComponent;\n * ```\n * will throw a type error, so we need to separate the more strictly typed class.\n */\nclass SvelteComponentTyped extends SvelteComponentDev {\n constructor(options) {\n super(options);\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error('Infinite loop detected');\n }\n };\n}\n\nexport { HtmlTag, HtmlTagHydration, ResizeObserverSingleton, SvelteComponent, SvelteComponentDev, SvelteComponentTyped, SvelteElement, action_destroyer, add_attribute, add_classes, add_flush_callback, add_iframe_resize_listener, add_location, add_render_callback, add_styles, add_transform, afterUpdate, append, append_dev, append_empty_stylesheet, append_hydration, append_hydration_dev, append_styles, assign, attr, attr_dev, attribute_to_object, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_comment, claim_component, claim_element, claim_html_tag, claim_space, claim_svg_element, claim_text, clear_loops, comment, component_subscribe, compute_rest_props, compute_slots, construct_svelte_component, construct_svelte_component_dev, contenteditable_truthy_values, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, end_hydrating, escape, escape_attribute_value, escape_object, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, flush_render_callbacks, getAllContexts, getContext, get_all_dirty_from_scope, get_binding_group_value, get_current_component, get_custom_elements_slots, get_root_for_style, get_slot_changes, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, hasContext, has_prop, head_selector, identity, init, init_binding_group, init_binding_group_dynamic, insert, insert_dev, insert_hydration, insert_hydration_dev, intros, invalid_attribute_name_character, is_client, is_crossorigin, is_empty, is_function, is_promise, is_void, listen, listen_dev, loop, loop_guard, merge_ssr_styles, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, query_selector_all, raf, resize_observer_border_box, resize_observer_content_box, resize_observer_device_pixel_content_box, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_custom_element_data_map, set_data, set_data_contenteditable, set_data_contenteditable_dev, set_data_dev, set_data_maybe_contenteditable, set_data_maybe_contenteditable_dev, set_dynamic_element_data, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, split_css_unit, spread, src_url_equal, start_hydrating, stop_immediate_propagation, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, trusted, update_await_block_branch, update_keyed_each, update_slot, update_slot_base, validate_component, validate_dynamic_element, validate_each_argument, validate_each_keys, validate_slots, validate_store, validate_void_dynamic_element, xlink_attr };\n","/* eslint-disable no-prototype-builtins */\nvar g =\n (typeof globalThis !== 'undefined' && globalThis) ||\n (typeof self !== 'undefined' && self) ||\n // eslint-disable-next-line no-undef\n (typeof global !== 'undefined' && global) ||\n {}\n\nvar support = {\n searchParams: 'URLSearchParams' in g,\n iterable: 'Symbol' in g && 'iterator' in Symbol,\n blob:\n 'FileReader' in g &&\n 'Blob' in g &&\n (function() {\n try {\n new Blob()\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in g,\n arrayBuffer: 'ArrayBuffer' in g\n}\n\nfunction isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n}\n\nif (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n}\n\nfunction normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~!]/i.test(name) || name === '') {\n throw new TypeError('Invalid character in header field name: \"' + name + '\"')\n }\n return name.toLowerCase()\n}\n\nfunction normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n}\n\n// Build a destructive iterator for the value list\nfunction iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n}\n\nexport function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n if (header.length != 2) {\n throw new TypeError('Headers constructor: expected name/value pair to be length 2, found' + header.length)\n }\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n}\n\nHeaders.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue + ', ' + value : value\n}\n\nHeaders.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n}\n\nHeaders.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n}\n\nHeaders.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n}\n\nHeaders.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n}\n\nHeaders.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n}\n\nHeaders.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push(name)\n })\n return iteratorFor(items)\n}\n\nHeaders.prototype.values = function() {\n var items = []\n this.forEach(function(value) {\n items.push(value)\n })\n return iteratorFor(items)\n}\n\nHeaders.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) {\n items.push([name, value])\n })\n return iteratorFor(items)\n}\n\nif (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n}\n\nfunction consumed(body) {\n if (body._noBody) return\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n}\n\nfunction fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n}\n\nfunction readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n}\n\nfunction readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type)\n var encoding = match ? match[1] : 'utf-8'\n reader.readAsText(blob, encoding)\n return promise\n}\n\nfunction readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n}\n\nfunction bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n}\n\nfunction Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n /*\n fetch-mock wraps the Response object in an ES6 Proxy to\n provide useful test harness features such as flush. However, on\n ES5 browsers without fetch or Proxy support pollyfills must be used;\n the proxy-pollyfill is unable to proxy an attribute unless it exists\n on the object before the Proxy is created. This change ensures\n Response.bodyUsed exists on the instance, while maintaining the\n semantic of setting Request.bodyUsed in the constructor before\n _initBody is called.\n */\n // eslint-disable-next-line no-self-assign\n this.bodyUsed = this.bodyUsed\n this._bodyInit = body\n if (!body) {\n this._noBody = true;\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n this._bodyText = body = Object.prototype.toString.call(body)\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n var isConsumed = consumed(this)\n if (isConsumed) {\n return isConsumed\n } else if (ArrayBuffer.isView(this._bodyArrayBuffer)) {\n return Promise.resolve(\n this._bodyArrayBuffer.buffer.slice(\n this._bodyArrayBuffer.byteOffset,\n this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength\n )\n )\n } else {\n return Promise.resolve(this._bodyArrayBuffer)\n }\n } else if (support.blob) {\n return this.blob().then(readBlobAsArrayBuffer)\n } else {\n throw new Error('could not read as ArrayBuffer')\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n}\n\n// HTTP methods whose capitalization should be normalized\nvar methods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE']\n\nfunction normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return methods.indexOf(upcased) > -1 ? upcased : method\n}\n\nexport function Request(input, options) {\n if (!(this instanceof Request)) {\n throw new TypeError('Please use the \"new\" operator, this DOM object constructor cannot be called as a function.')\n }\n\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n this.signal = input.signal\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.signal = options.signal || this.signal || (function () {\n if ('AbortController' in g) {\n var ctrl = new AbortController();\n return ctrl.signal;\n }\n }());\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n\n if (this.method === 'GET' || this.method === 'HEAD') {\n if (options.cache === 'no-store' || options.cache === 'no-cache') {\n // Search for a '_' parameter in the query string\n var reParamSearch = /([?&])_=[^&]*/\n if (reParamSearch.test(this.url)) {\n // If it already exists then set the value with the current time\n this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime())\n } else {\n // Otherwise add a new '_' parameter to the end with the current time\n var reQueryString = /\\?/\n this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime()\n }\n }\n }\n}\n\nRequest.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n}\n\nfunction decode(body) {\n var form = new FormData()\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n}\n\nfunction parseHeaders(rawHeaders) {\n var headers = new Headers()\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ')\n // Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill\n // https://github.com/github/fetch/issues/748\n // https://github.com/zloirock/core-js/issues/751\n preProcessedHeaders\n .split('\\r')\n .map(function(header) {\n return header.indexOf('\\n') === 0 ? header.substr(1, header.length) : header\n })\n .forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n try {\n headers.append(key, value)\n } catch (error) {\n console.warn('Response ' + error.message)\n }\n }\n })\n return headers\n}\n\nBody.call(Request.prototype)\n\nexport function Response(bodyInit, options) {\n if (!(this instanceof Response)) {\n throw new TypeError('Please use the \"new\" operator, this DOM object constructor cannot be called as a function.')\n }\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = options.status === undefined ? 200 : options.status\n if (this.status < 200 || this.status > 599) {\n throw new RangeError(\"Failed to construct 'Response': The status provided (0) is outside the range [200, 599].\")\n }\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = options.statusText === undefined ? '' : '' + options.statusText\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n}\n\nBody.call(Response.prototype)\n\nResponse.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n}\n\nResponse.error = function() {\n var response = new Response(null, {status: 200, statusText: ''})\n response.ok = false\n response.status = 0\n response.type = 'error'\n return response\n}\n\nvar redirectStatuses = [301, 302, 303, 307, 308]\n\nResponse.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n}\n\nexport var DOMException = g.DOMException\ntry {\n new DOMException()\n} catch (err) {\n DOMException = function(message, name) {\n this.message = message\n this.name = name\n var error = Error(message)\n this.stack = error.stack\n }\n DOMException.prototype = Object.create(Error.prototype)\n DOMException.prototype.constructor = DOMException\n}\n\nexport function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n\n if (request.signal && request.signal.aborted) {\n return reject(new DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest()\n\n function abortXhr() {\n xhr.abort()\n }\n\n xhr.onload = function() {\n var options = {\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n // This check if specifically for when a user fetches a file locally from the file system\n // Only if the status is out of a normal range\n if (request.url.indexOf('file://') === 0 && (xhr.status < 200 || xhr.status > 599)) {\n options.status = 200;\n } else {\n options.status = xhr.status;\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n setTimeout(function() {\n resolve(new Response(body, options))\n }, 0)\n }\n\n xhr.onerror = function() {\n setTimeout(function() {\n reject(new TypeError('Network request failed'))\n }, 0)\n }\n\n xhr.ontimeout = function() {\n setTimeout(function() {\n reject(new TypeError('Network request timed out'))\n }, 0)\n }\n\n xhr.onabort = function() {\n setTimeout(function() {\n reject(new DOMException('Aborted', 'AbortError'))\n }, 0)\n }\n\n function fixUrl(url) {\n try {\n return url === '' && g.location.href ? g.location.href : url\n } catch (e) {\n return url\n }\n }\n\n xhr.open(request.method, fixUrl(request.url), true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false\n }\n\n if ('responseType' in xhr) {\n if (support.blob) {\n xhr.responseType = 'blob'\n } else if (\n support.arrayBuffer\n ) {\n xhr.responseType = 'arraybuffer'\n }\n }\n\n if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers || (g.Headers && init.headers instanceof g.Headers))) {\n var names = [];\n Object.getOwnPropertyNames(init.headers).forEach(function(name) {\n names.push(normalizeName(name))\n xhr.setRequestHeader(name, normalizeValue(init.headers[name]))\n })\n request.headers.forEach(function(value, name) {\n if (names.indexOf(name) === -1) {\n xhr.setRequestHeader(name, value)\n }\n })\n } else {\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n }\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr)\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr)\n }\n }\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n}\n\nfetch.polyfill = true\n\nif (!g.fetch) {\n g.fetch = fetch\n g.Headers = Headers\n g.Request = Request\n g.Response = Response\n}\n","// the whatwg-fetch polyfill installs the fetch() function\n// on the global object (window or self)\n//\n// Return that as the export for use in Webpack, Browserify etc.\nrequire('whatwg-fetch');\nmodule.exports = self.fetch.bind(self);\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","export function isFunction(value) {\n return typeof value === 'function';\n}\n//# sourceMappingURL=isFunction.js.map","export function createErrorClass(createImpl) {\n var _super = function (instance) {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n var ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n//# sourceMappingURL=createErrorClass.js.map","import { createErrorClass } from './createErrorClass';\nexport var UnsubscriptionError = createErrorClass(function (_super) {\n return function UnsubscriptionErrorImpl(errors) {\n _super(this);\n this.message = errors\n ? errors.length + \" errors occurred during unsubscription:\\n\" + errors.map(function (err, i) { return i + 1 + \") \" + err.toString(); }).join('\\n ')\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n };\n});\n//# sourceMappingURL=UnsubscriptionError.js.map","export function arrRemove(arr, item) {\n if (arr) {\n var index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n//# sourceMappingURL=arrRemove.js.map","import { __read, __spreadArray, __values } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nvar Subscription = (function () {\n function Subscription(initialTeardown) {\n this.initialTeardown = initialTeardown;\n this.closed = false;\n this._parentage = null;\n this._finalizers = null;\n }\n Subscription.prototype.unsubscribe = function () {\n var e_1, _a, e_2, _b;\n var errors;\n if (!this.closed) {\n this.closed = true;\n var _parentage = this._parentage;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n try {\n for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {\n var parent_1 = _parentage_1_1.value;\n parent_1.remove(this);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n else {\n _parentage.remove(this);\n }\n }\n var initialFinalizer = this.initialTeardown;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n }\n catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n var _finalizers = this._finalizers;\n if (_finalizers) {\n this._finalizers = null;\n try {\n for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) {\n var finalizer = _finalizers_1_1.value;\n try {\n execFinalizer(finalizer);\n }\n catch (err) {\n errors = errors !== null && errors !== void 0 ? errors : [];\n if (err instanceof UnsubscriptionError) {\n errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));\n }\n else {\n errors.push(err);\n }\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n };\n Subscription.prototype.add = function (teardown) {\n var _a;\n if (teardown && teardown !== this) {\n if (this.closed) {\n execFinalizer(teardown);\n }\n else {\n if (teardown instanceof Subscription) {\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);\n }\n }\n };\n Subscription.prototype._hasParent = function (parent) {\n var _parentage = this._parentage;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n };\n Subscription.prototype._addParent = function (parent) {\n var _parentage = this._parentage;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n };\n Subscription.prototype._removeParent = function (parent) {\n var _parentage = this._parentage;\n if (_parentage === parent) {\n this._parentage = null;\n }\n else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n };\n Subscription.prototype.remove = function (teardown) {\n var _finalizers = this._finalizers;\n _finalizers && arrRemove(_finalizers, teardown);\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n };\n Subscription.EMPTY = (function () {\n var empty = new Subscription();\n empty.closed = true;\n return empty;\n })();\n return Subscription;\n}());\nexport { Subscription };\nexport var EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n return (value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));\n}\nfunction execFinalizer(finalizer) {\n if (isFunction(finalizer)) {\n finalizer();\n }\n else {\n finalizer.unsubscribe();\n }\n}\n//# sourceMappingURL=Subscription.js.map","export var config = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n//# sourceMappingURL=config.js.map","import { __read, __spreadArray } from \"tslib\";\nexport var timeoutProvider = {\n setTimeout: function (handler, timeout) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n var delegate = timeoutProvider.delegate;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {\n return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args)));\n }\n return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args)));\n },\n clearTimeout: function (handle) {\n var delegate = timeoutProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=timeoutProvider.js.map","export function noop() { }\n//# sourceMappingURL=noop.js.map","import { config } from '../config';\nvar context = null;\nexport function errorContext(cb) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n var isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n var _a = context, errorThrown = _a.errorThrown, error = _a.error;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n }\n else {\n cb();\n }\n}\nexport function captureError(err) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n//# sourceMappingURL=errorContext.js.map","import { __extends } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nvar Subscriber = (function (_super) {\n __extends(Subscriber, _super);\n function Subscriber(destination) {\n var _this = _super.call(this) || this;\n _this.isStopped = false;\n if (destination) {\n _this.destination = destination;\n if (isSubscription(destination)) {\n destination.add(_this);\n }\n }\n else {\n _this.destination = EMPTY_OBSERVER;\n }\n return _this;\n }\n Subscriber.create = function (next, error, complete) {\n return new SafeSubscriber(next, error, complete);\n };\n Subscriber.prototype.next = function (value) {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n }\n else {\n this._next(value);\n }\n };\n Subscriber.prototype.error = function (err) {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n }\n else {\n this.isStopped = true;\n this._error(err);\n }\n };\n Subscriber.prototype.complete = function () {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n }\n else {\n this.isStopped = true;\n this._complete();\n }\n };\n Subscriber.prototype.unsubscribe = function () {\n if (!this.closed) {\n this.isStopped = true;\n _super.prototype.unsubscribe.call(this);\n this.destination = null;\n }\n };\n Subscriber.prototype._next = function (value) {\n this.destination.next(value);\n };\n Subscriber.prototype._error = function (err) {\n try {\n this.destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n };\n Subscriber.prototype._complete = function () {\n try {\n this.destination.complete();\n }\n finally {\n this.unsubscribe();\n }\n };\n return Subscriber;\n}(Subscription));\nexport { Subscriber };\nvar _bind = Function.prototype.bind;\nfunction bind(fn, thisArg) {\n return _bind.call(fn, thisArg);\n}\nvar ConsumerObserver = (function () {\n function ConsumerObserver(partialObserver) {\n this.partialObserver = partialObserver;\n }\n ConsumerObserver.prototype.next = function (value) {\n var partialObserver = this.partialObserver;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n };\n ConsumerObserver.prototype.error = function (err) {\n var partialObserver = this.partialObserver;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n else {\n handleUnhandledError(err);\n }\n };\n ConsumerObserver.prototype.complete = function () {\n var partialObserver = this.partialObserver;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n };\n return ConsumerObserver;\n}());\nvar SafeSubscriber = (function (_super) {\n __extends(SafeSubscriber, _super);\n function SafeSubscriber(observerOrNext, error, complete) {\n var _this = _super.call(this) || this;\n var partialObserver;\n if (isFunction(observerOrNext) || !observerOrNext) {\n partialObserver = {\n next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined),\n error: error !== null && error !== void 0 ? error : undefined,\n complete: complete !== null && complete !== void 0 ? complete : undefined,\n };\n }\n else {\n var context_1;\n if (_this && config.useDeprecatedNextContext) {\n context_1 = Object.create(observerOrNext);\n context_1.unsubscribe = function () { return _this.unsubscribe(); };\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context_1),\n error: observerOrNext.error && bind(observerOrNext.error, context_1),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context_1),\n };\n }\n else {\n partialObserver = observerOrNext;\n }\n }\n _this.destination = new ConsumerObserver(partialObserver);\n return _this;\n }\n return SafeSubscriber;\n}(Subscriber));\nexport { SafeSubscriber };\nfunction handleUnhandledError(error) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n }\n else {\n reportUnhandledError(error);\n }\n}\nfunction defaultErrorHandler(err) {\n throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n var onStoppedNotification = config.onStoppedNotification;\n onStoppedNotification && timeoutProvider.setTimeout(function () { return onStoppedNotification(notification, subscriber); });\n}\nexport var EMPTY_OBSERVER = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n//# sourceMappingURL=Subscriber.js.map","import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n timeoutProvider.setTimeout(function () {\n var onUnhandledError = config.onUnhandledError;\n if (onUnhandledError) {\n onUnhandledError(err);\n }\n else {\n throw err;\n }\n });\n}\n//# sourceMappingURL=reportUnhandledError.js.map","export var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })();\n//# sourceMappingURL=observable.js.map","import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nvar Observable = (function () {\n function Observable(subscribe) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n Observable.prototype.lift = function (operator) {\n var observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n };\n Observable.prototype.subscribe = function (observerOrNext, error, complete) {\n var _this = this;\n var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n errorContext(function () {\n var _a = _this, operator = _a.operator, source = _a.source;\n subscriber.add(operator\n ?\n operator.call(subscriber, source)\n : source\n ?\n _this._subscribe(subscriber)\n :\n _this._trySubscribe(subscriber));\n });\n return subscriber;\n };\n Observable.prototype._trySubscribe = function (sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n sink.error(err);\n }\n };\n Observable.prototype.forEach = function (next, promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var subscriber = new SafeSubscriber({\n next: function (value) {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n _this.subscribe(subscriber);\n });\n };\n Observable.prototype._subscribe = function (subscriber) {\n var _a;\n return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n };\n Observable.prototype[Symbol_observable] = function () {\n return this;\n };\n Observable.prototype.pipe = function () {\n var operations = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n operations[_i] = arguments[_i];\n }\n return pipeFromArray(operations)(this);\n };\n Observable.prototype.toPromise = function (promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var value;\n _this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); });\n });\n };\n Observable.create = function (subscribe) {\n return new Observable(subscribe);\n };\n return Observable;\n}());\nexport { Observable };\nfunction getPromiseCtor(promiseCtor) {\n var _a;\n return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n//# sourceMappingURL=Observable.js.map","import { identity } from './identity';\nexport function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n if (fns.length === 0) {\n return identity;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce(function (prev, fn) { return fn(prev); }, input);\n };\n}\n//# sourceMappingURL=pipe.js.map","export function identity(x) {\n return x;\n}\n//# sourceMappingURL=identity.js.map","import { createErrorClass } from './createErrorClass';\nexport var ObjectUnsubscribedError = createErrorClass(function (_super) {\n return function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n };\n});\n//# sourceMappingURL=ObjectUnsubscribedError.js.map","import { __extends } from \"tslib\";\nimport { Subject } from './Subject';\nimport { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nvar ReplaySubject = (function (_super) {\n __extends(ReplaySubject, _super);\n function ReplaySubject(_bufferSize, _windowTime, _timestampProvider) {\n if (_bufferSize === void 0) { _bufferSize = Infinity; }\n if (_windowTime === void 0) { _windowTime = Infinity; }\n if (_timestampProvider === void 0) { _timestampProvider = dateTimestampProvider; }\n var _this = _super.call(this) || this;\n _this._bufferSize = _bufferSize;\n _this._windowTime = _windowTime;\n _this._timestampProvider = _timestampProvider;\n _this._buffer = [];\n _this._infiniteTimeWindow = true;\n _this._infiniteTimeWindow = _windowTime === Infinity;\n _this._bufferSize = Math.max(1, _bufferSize);\n _this._windowTime = Math.max(1, _windowTime);\n return _this;\n }\n ReplaySubject.prototype.next = function (value) {\n var _a = this, isStopped = _a.isStopped, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow, _timestampProvider = _a._timestampProvider, _windowTime = _a._windowTime;\n if (!isStopped) {\n _buffer.push(value);\n !_infiniteTimeWindow && _buffer.push(_timestampProvider.now() + _windowTime);\n }\n this._trimBuffer();\n _super.prototype.next.call(this, value);\n };\n ReplaySubject.prototype._subscribe = function (subscriber) {\n this._throwIfClosed();\n this._trimBuffer();\n var subscription = this._innerSubscribe(subscriber);\n var _a = this, _infiniteTimeWindow = _a._infiniteTimeWindow, _buffer = _a._buffer;\n var copy = _buffer.slice();\n for (var i = 0; i < copy.length && !subscriber.closed; i += _infiniteTimeWindow ? 1 : 2) {\n subscriber.next(copy[i]);\n }\n this._checkFinalizedStatuses(subscriber);\n return subscription;\n };\n ReplaySubject.prototype._trimBuffer = function () {\n var _a = this, _bufferSize = _a._bufferSize, _timestampProvider = _a._timestampProvider, _buffer = _a._buffer, _infiniteTimeWindow = _a._infiniteTimeWindow;\n var adjustedBufferSize = (_infiniteTimeWindow ? 1 : 2) * _bufferSize;\n _bufferSize < Infinity && adjustedBufferSize < _buffer.length && _buffer.splice(0, _buffer.length - adjustedBufferSize);\n if (!_infiniteTimeWindow) {\n var now = _timestampProvider.now();\n var last = 0;\n for (var i = 1; i < _buffer.length && _buffer[i] <= now; i += 2) {\n last = i;\n }\n last && _buffer.splice(0, last + 1);\n }\n };\n return ReplaySubject;\n}(Subject));\nexport { ReplaySubject };\n//# sourceMappingURL=ReplaySubject.js.map","import { __extends, __values } from \"tslib\";\nimport { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nvar Subject = (function (_super) {\n __extends(Subject, _super);\n function Subject() {\n var _this = _super.call(this) || this;\n _this.closed = false;\n _this.currentObservers = null;\n _this.observers = [];\n _this.isStopped = false;\n _this.hasError = false;\n _this.thrownError = null;\n return _this;\n }\n Subject.prototype.lift = function (operator) {\n var subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n };\n Subject.prototype._throwIfClosed = function () {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n };\n Subject.prototype.next = function (value) {\n var _this = this;\n errorContext(function () {\n var e_1, _a;\n _this._throwIfClosed();\n if (!_this.isStopped) {\n if (!_this.currentObservers) {\n _this.currentObservers = Array.from(_this.observers);\n }\n try {\n for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) {\n var observer = _c.value;\n observer.next(value);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n });\n };\n Subject.prototype.error = function (err) {\n var _this = this;\n errorContext(function () {\n _this._throwIfClosed();\n if (!_this.isStopped) {\n _this.hasError = _this.isStopped = true;\n _this.thrownError = err;\n var observers = _this.observers;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n };\n Subject.prototype.complete = function () {\n var _this = this;\n errorContext(function () {\n _this._throwIfClosed();\n if (!_this.isStopped) {\n _this.isStopped = true;\n var observers = _this.observers;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n };\n Subject.prototype.unsubscribe = function () {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null;\n };\n Object.defineProperty(Subject.prototype, \"observed\", {\n get: function () {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n },\n enumerable: false,\n configurable: true\n });\n Subject.prototype._trySubscribe = function (subscriber) {\n this._throwIfClosed();\n return _super.prototype._trySubscribe.call(this, subscriber);\n };\n Subject.prototype._subscribe = function (subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n };\n Subject.prototype._innerSubscribe = function (subscriber) {\n var _this = this;\n var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(function () {\n _this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n };\n Subject.prototype._checkFinalizedStatuses = function (subscriber) {\n var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped) {\n subscriber.complete();\n }\n };\n Subject.prototype.asObservable = function () {\n var observable = new Observable();\n observable.source = this;\n return observable;\n };\n Subject.create = function (destination, source) {\n return new AnonymousSubject(destination, source);\n };\n return Subject;\n}(Observable));\nexport { Subject };\nvar AnonymousSubject = (function (_super) {\n __extends(AnonymousSubject, _super);\n function AnonymousSubject(destination, source) {\n var _this = _super.call(this) || this;\n _this.destination = destination;\n _this.source = source;\n return _this;\n }\n AnonymousSubject.prototype.next = function (value) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n };\n AnonymousSubject.prototype.error = function (err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n };\n AnonymousSubject.prototype.complete = function () {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n };\n AnonymousSubject.prototype._subscribe = function (subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n };\n return AnonymousSubject;\n}(Subject));\nexport { AnonymousSubject };\n//# sourceMappingURL=Subject.js.map","export var dateTimestampProvider = {\n now: function () {\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n//# sourceMappingURL=dateTimestampProvider.js.map","import { ReplaySubject } from 'rxjs';\n\nlet topics = [];\nlet subjects = {};\n\n/**\n * @name topic\n * @description A small wrapper over the rxjs to offer the topic method on top of it\n * @param event [String] Event name\n * @param step [String] How many values to be buffed for new subscribers - default 0\n * @returns ReplaySubject\n */\n\nconst topic = (event, step = 0) => {\n if (topics.indexOf(event) == -1) {\n let replaySubject = new ReplaySubject(step);\n\n subjects[event] = replaySubject;\n\n topics.push(event);\n }\n\n return subjects[event];\n}\n\nconst usePostMessageForTopics = (events = [], target) => {\n for (let index in events) {\n subjects[events[index]].subscribe((data) => {\n window.postMessage({ type: events[index], data });\n });\n }\n}\n\nexport { topic }\n","import { noop, safe_not_equal, subscribe, run_all, is_function } from '../internal/index.mjs';\nexport { get_store_value as get } from '../internal/index.mjs';\n\nconst subscriber_queue = [];\n/**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier} [start]\n */\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe\n };\n}\n/**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=} start\n */\nfunction writable(value, start = noop) {\n let stop;\n const subscribers = new Set();\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) { // store is ready\n const run_queue = !subscriber_queue.length;\n for (const subscriber of subscribers) {\n subscriber[1]();\n subscriber_queue.push(subscriber, value);\n }\n if (run_queue) {\n for (let i = 0; i < subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(value));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.add(subscriber);\n if (subscribers.size === 1) {\n stop = start(set) || noop;\n }\n run(value);\n return () => {\n subscribers.delete(subscriber);\n if (subscribers.size === 0 && stop) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\nfunction derived(stores, fn, initial_value) {\n const single = !Array.isArray(stores);\n const stores_array = single\n ? [stores]\n : stores;\n const auto = fn.length < 2;\n return readable(initial_value, (set) => {\n let started = false;\n const values = [];\n let pending = 0;\n let cleanup = noop;\n const sync = () => {\n if (pending) {\n return;\n }\n cleanup();\n const result = fn(single ? values[0] : values, set);\n if (auto) {\n set(result);\n }\n else {\n cleanup = is_function(result) ? result : noop;\n }\n };\n const unsubscribers = stores_array.map((store, i) => subscribe(store, (value) => {\n values[i] = value;\n pending &= ~(1 << i);\n if (started) {\n sync();\n }\n }, () => {\n pending |= (1 << i);\n }));\n started = true;\n sync();\n return function stop() {\n run_all(unsubscribers);\n cleanup();\n // We need to set this to false because callbacks can still happen despite having unsubscribed:\n // Callbacks might already be placed in the queue which doesn't know it should no longer\n // invoke this derived store.\n started = false;\n };\n });\n}\n/**\n * Takes a store and returns a new one derived from the old one that is readable.\n *\n * @param store - store to make readonly\n */\nfunction readonly(store) {\n return {\n subscribe: store.subscribe.bind(store)\n };\n}\n\nexport { derived, readable, readonly, writable };\n","'use strict';\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn Object.propertyIsEnumerable.call(target, symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n};\r\n","export var ErrorKind;\n(function (ErrorKind) {\n /** Argument is unclosed (e.g. `{0`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_CLOSING_BRACE\"] = 1] = \"EXPECT_ARGUMENT_CLOSING_BRACE\";\n /** Argument is empty (e.g. `{}`). */\n ErrorKind[ErrorKind[\"EMPTY_ARGUMENT\"] = 2] = \"EMPTY_ARGUMENT\";\n /** Argument is malformed (e.g. `{foo!}``) */\n ErrorKind[ErrorKind[\"MALFORMED_ARGUMENT\"] = 3] = \"MALFORMED_ARGUMENT\";\n /** Expect an argument type (e.g. `{foo,}`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_TYPE\"] = 4] = \"EXPECT_ARGUMENT_TYPE\";\n /** Unsupported argument type (e.g. `{foo,foo}`) */\n ErrorKind[ErrorKind[\"INVALID_ARGUMENT_TYPE\"] = 5] = \"INVALID_ARGUMENT_TYPE\";\n /** Expect an argument style (e.g. `{foo, number, }`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_STYLE\"] = 6] = \"EXPECT_ARGUMENT_STYLE\";\n /** The number skeleton is invalid. */\n ErrorKind[ErrorKind[\"INVALID_NUMBER_SKELETON\"] = 7] = \"INVALID_NUMBER_SKELETON\";\n /** The date time skeleton is invalid. */\n ErrorKind[ErrorKind[\"INVALID_DATE_TIME_SKELETON\"] = 8] = \"INVALID_DATE_TIME_SKELETON\";\n /** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */\n ErrorKind[ErrorKind[\"EXPECT_NUMBER_SKELETON\"] = 9] = \"EXPECT_NUMBER_SKELETON\";\n /** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */\n ErrorKind[ErrorKind[\"EXPECT_DATE_TIME_SKELETON\"] = 10] = \"EXPECT_DATE_TIME_SKELETON\";\n /** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */\n ErrorKind[ErrorKind[\"UNCLOSED_QUOTE_IN_ARGUMENT_STYLE\"] = 11] = \"UNCLOSED_QUOTE_IN_ARGUMENT_STYLE\";\n /** Missing select argument options (e.g. `{foo, select}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_OPTIONS\"] = 12] = \"EXPECT_SELECT_ARGUMENT_OPTIONS\";\n /** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE\"] = 13] = \"EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE\";\n /** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */\n ErrorKind[ErrorKind[\"INVALID_PLURAL_ARGUMENT_OFFSET_VALUE\"] = 14] = \"INVALID_PLURAL_ARGUMENT_OFFSET_VALUE\";\n /** Expecting a selector in `select` argument (e.g `{foo, select}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_SELECTOR\"] = 15] = \"EXPECT_SELECT_ARGUMENT_SELECTOR\";\n /** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_SELECTOR\"] = 16] = \"EXPECT_PLURAL_ARGUMENT_SELECTOR\";\n /** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\"] = 17] = \"EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\";\n /**\n * Expecting a message fragment after the `plural` or `selectordinal` selector\n * (e.g. `{foo, plural, one}`)\n */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT\"] = 18] = \"EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT\";\n /** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */\n ErrorKind[ErrorKind[\"INVALID_PLURAL_ARGUMENT_SELECTOR\"] = 19] = \"INVALID_PLURAL_ARGUMENT_SELECTOR\";\n /**\n * Duplicate selectors in `plural` or `selectordinal` argument.\n * (e.g. {foo, plural, one {#} one {#}})\n */\n ErrorKind[ErrorKind[\"DUPLICATE_PLURAL_ARGUMENT_SELECTOR\"] = 20] = \"DUPLICATE_PLURAL_ARGUMENT_SELECTOR\";\n /** Duplicate selectors in `select` argument.\n * (e.g. {foo, select, apple {apple} apple {apple}})\n */\n ErrorKind[ErrorKind[\"DUPLICATE_SELECT_ARGUMENT_SELECTOR\"] = 21] = \"DUPLICATE_SELECT_ARGUMENT_SELECTOR\";\n /** Plural or select argument option must have `other` clause. */\n ErrorKind[ErrorKind[\"MISSING_OTHER_CLAUSE\"] = 22] = \"MISSING_OTHER_CLAUSE\";\n /** The tag is malformed. (e.g. `<bold!>foo</bold!>) */\n ErrorKind[ErrorKind[\"INVALID_TAG\"] = 23] = \"INVALID_TAG\";\n /** The tag name is invalid. (e.g. `<123>foo</123>`) */\n ErrorKind[ErrorKind[\"INVALID_TAG_NAME\"] = 25] = \"INVALID_TAG_NAME\";\n /** The closing tag does not match the opening tag. (e.g. `<bold>foo</italic>`) */\n ErrorKind[ErrorKind[\"UNMATCHED_CLOSING_TAG\"] = 26] = \"UNMATCHED_CLOSING_TAG\";\n /** The opening tag has unmatched closing tag. (e.g. `<bold>foo`) */\n ErrorKind[ErrorKind[\"UNCLOSED_TAG\"] = 27] = \"UNCLOSED_TAG\";\n})(ErrorKind || (ErrorKind = {}));\n","export var TYPE;\n(function (TYPE) {\n /**\n * Raw text\n */\n TYPE[TYPE[\"literal\"] = 0] = \"literal\";\n /**\n * Variable w/o any format, e.g `var` in `this is a {var}`\n */\n TYPE[TYPE[\"argument\"] = 1] = \"argument\";\n /**\n * Variable w/ number format\n */\n TYPE[TYPE[\"number\"] = 2] = \"number\";\n /**\n * Variable w/ date format\n */\n TYPE[TYPE[\"date\"] = 3] = \"date\";\n /**\n * Variable w/ time format\n */\n TYPE[TYPE[\"time\"] = 4] = \"time\";\n /**\n * Variable w/ select format\n */\n TYPE[TYPE[\"select\"] = 5] = \"select\";\n /**\n * Variable w/ plural format\n */\n TYPE[TYPE[\"plural\"] = 6] = \"plural\";\n /**\n * Only possible within plural argument.\n * This is the `#` symbol that will be substituted with the count.\n */\n TYPE[TYPE[\"pound\"] = 7] = \"pound\";\n /**\n * XML-like tag\n */\n TYPE[TYPE[\"tag\"] = 8] = \"tag\";\n})(TYPE || (TYPE = {}));\nexport var SKELETON_TYPE;\n(function (SKELETON_TYPE) {\n SKELETON_TYPE[SKELETON_TYPE[\"number\"] = 0] = \"number\";\n SKELETON_TYPE[SKELETON_TYPE[\"dateTime\"] = 1] = \"dateTime\";\n})(SKELETON_TYPE || (SKELETON_TYPE = {}));\n/**\n * Type Guards\n */\nexport function isLiteralElement(el) {\n return el.type === TYPE.literal;\n}\nexport function isArgumentElement(el) {\n return el.type === TYPE.argument;\n}\nexport function isNumberElement(el) {\n return el.type === TYPE.number;\n}\nexport function isDateElement(el) {\n return el.type === TYPE.date;\n}\nexport function isTimeElement(el) {\n return el.type === TYPE.time;\n}\nexport function isSelectElement(el) {\n return el.type === TYPE.select;\n}\nexport function isPluralElement(el) {\n return el.type === TYPE.plural;\n}\nexport function isPoundElement(el) {\n return el.type === TYPE.pound;\n}\nexport function isTagElement(el) {\n return el.type === TYPE.tag;\n}\nexport function isNumberSkeleton(el) {\n return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.number);\n}\nexport function isDateTimeSkeleton(el) {\n return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.dateTime);\n}\nexport function createLiteralElement(value) {\n return {\n type: TYPE.literal,\n value: value,\n };\n}\nexport function createNumberElement(value, style) {\n return {\n type: TYPE.number,\n value: value,\n style: style,\n };\n}\n","// @generated from regex-gen.ts\nexport var SPACE_SEPARATOR_REGEX = /[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/;\nexport var WHITE_SPACE_REGEX = /[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/;\n","/**\n * https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js\n * with some tweaks\n */\nvar DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;\n/**\n * Parse Date time skeleton into Intl.DateTimeFormatOptions\n * Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * @public\n * @param skeleton skeleton string\n */\nexport function parseDateTimeSkeleton(skeleton) {\n var result = {};\n skeleton.replace(DATE_TIME_REGEX, function (match) {\n var len = match.length;\n switch (match[0]) {\n // Era\n case 'G':\n result.era = len === 4 ? 'long' : len === 5 ? 'narrow' : 'short';\n break;\n // Year\n case 'y':\n result.year = len === 2 ? '2-digit' : 'numeric';\n break;\n case 'Y':\n case 'u':\n case 'U':\n case 'r':\n throw new RangeError('`Y/u/U/r` (year) patterns are not supported, use `y` instead');\n // Quarter\n case 'q':\n case 'Q':\n throw new RangeError('`q/Q` (quarter) patterns are not supported');\n // Month\n case 'M':\n case 'L':\n result.month = ['numeric', '2-digit', 'short', 'long', 'narrow'][len - 1];\n break;\n // Week\n case 'w':\n case 'W':\n throw new RangeError('`w/W` (week) patterns are not supported');\n case 'd':\n result.day = ['numeric', '2-digit'][len - 1];\n break;\n case 'D':\n case 'F':\n case 'g':\n throw new RangeError('`D/F/g` (day) patterns are not supported, use `d` instead');\n // Weekday\n case 'E':\n result.weekday = len === 4 ? 'short' : len === 5 ? 'narrow' : 'short';\n break;\n case 'e':\n if (len < 4) {\n throw new RangeError('`e..eee` (weekday) patterns are not supported');\n }\n result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n break;\n case 'c':\n if (len < 4) {\n throw new RangeError('`c..ccc` (weekday) patterns are not supported');\n }\n result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n break;\n // Period\n case 'a': // AM, PM\n result.hour12 = true;\n break;\n case 'b': // am, pm, noon, midnight\n case 'B': // flexible day periods\n throw new RangeError('`b/B` (period) patterns are not supported, use `a` instead');\n // Hour\n case 'h':\n result.hourCycle = 'h12';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'H':\n result.hourCycle = 'h23';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'K':\n result.hourCycle = 'h11';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'k':\n result.hourCycle = 'h24';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'j':\n case 'J':\n case 'C':\n throw new RangeError('`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead');\n // Minute\n case 'm':\n result.minute = ['numeric', '2-digit'][len - 1];\n break;\n // Second\n case 's':\n result.second = ['numeric', '2-digit'][len - 1];\n break;\n case 'S':\n case 'A':\n throw new RangeError('`S/A` (second) patterns are not supported, use `s` instead');\n // Zone\n case 'z': // 1..3, 4: specific non-location format\n result.timeZoneName = len < 4 ? 'short' : 'long';\n break;\n case 'Z': // 1..3, 4, 5: The ISO8601 varios formats\n case 'O': // 1, 4: miliseconds in day short, long\n case 'v': // 1, 4: generic non-location format\n case 'V': // 1, 2, 3, 4: time zone ID or city\n case 'X': // 1, 2, 3, 4: The ISO8601 varios formats\n case 'x': // 1, 2, 3, 4: The ISO8601 varios formats\n throw new RangeError('`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead');\n }\n return '';\n });\n return result;\n}\n","// @generated from regex-gen.ts\nexport var WHITE_SPACE_REGEX = /[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/i;\n","import { __assign } from \"tslib\";\nimport { WHITE_SPACE_REGEX } from './regex.generated';\nexport function parseNumberSkeletonFromString(skeleton) {\n if (skeleton.length === 0) {\n throw new Error('Number skeleton cannot be empty');\n }\n // Parse the skeleton\n var stringTokens = skeleton\n .split(WHITE_SPACE_REGEX)\n .filter(function (x) { return x.length > 0; });\n var tokens = [];\n for (var _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) {\n var stringToken = stringTokens_1[_i];\n var stemAndOptions = stringToken.split('/');\n if (stemAndOptions.length === 0) {\n throw new Error('Invalid number skeleton');\n }\n var stem = stemAndOptions[0], options = stemAndOptions.slice(1);\n for (var _a = 0, options_1 = options; _a < options_1.length; _a++) {\n var option = options_1[_a];\n if (option.length === 0) {\n throw new Error('Invalid number skeleton');\n }\n }\n tokens.push({ stem: stem, options: options });\n }\n return tokens;\n}\nfunction icuUnitToEcma(unit) {\n return unit.replace(/^(.*?)-/, '');\n}\nvar FRACTION_PRECISION_REGEX = /^\\.(?:(0+)(\\*)?|(#+)|(0+)(#+))$/g;\nvar SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\\+|#+)?[rs]?$/g;\nvar INTEGER_WIDTH_REGEX = /(\\*)(0+)|(#+)(0+)|(0+)/g;\nvar CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;\nfunction parseSignificantPrecision(str) {\n var result = {};\n if (str[str.length - 1] === 'r') {\n result.roundingPriority = 'morePrecision';\n }\n else if (str[str.length - 1] === 's') {\n result.roundingPriority = 'lessPrecision';\n }\n str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {\n // @@@ case\n if (typeof g2 !== 'string') {\n result.minimumSignificantDigits = g1.length;\n result.maximumSignificantDigits = g1.length;\n }\n // @@@+ case\n else if (g2 === '+') {\n result.minimumSignificantDigits = g1.length;\n }\n // .### case\n else if (g1[0] === '#') {\n result.maximumSignificantDigits = g1.length;\n }\n // .@@## or .@@@ case\n else {\n result.minimumSignificantDigits = g1.length;\n result.maximumSignificantDigits =\n g1.length + (typeof g2 === 'string' ? g2.length : 0);\n }\n return '';\n });\n return result;\n}\nfunction parseSign(str) {\n switch (str) {\n case 'sign-auto':\n return {\n signDisplay: 'auto',\n };\n case 'sign-accounting':\n case '()':\n return {\n currencySign: 'accounting',\n };\n case 'sign-always':\n case '+!':\n return {\n signDisplay: 'always',\n };\n case 'sign-accounting-always':\n case '()!':\n return {\n signDisplay: 'always',\n currencySign: 'accounting',\n };\n case 'sign-except-zero':\n case '+?':\n return {\n signDisplay: 'exceptZero',\n };\n case 'sign-accounting-except-zero':\n case '()?':\n return {\n signDisplay: 'exceptZero',\n currencySign: 'accounting',\n };\n case 'sign-never':\n case '+_':\n return {\n signDisplay: 'never',\n };\n }\n}\nfunction parseConciseScientificAndEngineeringStem(stem) {\n // Engineering\n var result;\n if (stem[0] === 'E' && stem[1] === 'E') {\n result = {\n notation: 'engineering',\n };\n stem = stem.slice(2);\n }\n else if (stem[0] === 'E') {\n result = {\n notation: 'scientific',\n };\n stem = stem.slice(1);\n }\n if (result) {\n var signDisplay = stem.slice(0, 2);\n if (signDisplay === '+!') {\n result.signDisplay = 'always';\n stem = stem.slice(2);\n }\n else if (signDisplay === '+?') {\n result.signDisplay = 'exceptZero';\n stem = stem.slice(2);\n }\n if (!CONCISE_INTEGER_WIDTH_REGEX.test(stem)) {\n throw new Error('Malformed concise eng/scientific notation');\n }\n result.minimumIntegerDigits = stem.length;\n }\n return result;\n}\nfunction parseNotationOptions(opt) {\n var result = {};\n var signOpts = parseSign(opt);\n if (signOpts) {\n return signOpts;\n }\n return result;\n}\n/**\n * https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options\n */\nexport function parseNumberSkeleton(tokens) {\n var result = {};\n for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {\n var token = tokens_1[_i];\n switch (token.stem) {\n case 'percent':\n case '%':\n result.style = 'percent';\n continue;\n case '%x100':\n result.style = 'percent';\n result.scale = 100;\n continue;\n case 'currency':\n result.style = 'currency';\n result.currency = token.options[0];\n continue;\n case 'group-off':\n case ',_':\n result.useGrouping = false;\n continue;\n case 'precision-integer':\n case '.':\n result.maximumFractionDigits = 0;\n continue;\n case 'measure-unit':\n case 'unit':\n result.style = 'unit';\n result.unit = icuUnitToEcma(token.options[0]);\n continue;\n case 'compact-short':\n case 'K':\n result.notation = 'compact';\n result.compactDisplay = 'short';\n continue;\n case 'compact-long':\n case 'KK':\n result.notation = 'compact';\n result.compactDisplay = 'long';\n continue;\n case 'scientific':\n result = __assign(__assign(__assign({}, result), { notation: 'scientific' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n continue;\n case 'engineering':\n result = __assign(__assign(__assign({}, result), { notation: 'engineering' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n continue;\n case 'notation-simple':\n result.notation = 'standard';\n continue;\n // https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h\n case 'unit-width-narrow':\n result.currencyDisplay = 'narrowSymbol';\n result.unitDisplay = 'narrow';\n continue;\n case 'unit-width-short':\n result.currencyDisplay = 'code';\n result.unitDisplay = 'short';\n continue;\n case 'unit-width-full-name':\n result.currencyDisplay = 'name';\n result.unitDisplay = 'long';\n continue;\n case 'unit-width-iso-code':\n result.currencyDisplay = 'symbol';\n continue;\n case 'scale':\n result.scale = parseFloat(token.options[0]);\n continue;\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width\n case 'integer-width':\n if (token.options.length > 1) {\n throw new RangeError('integer-width stems only accept a single optional option');\n }\n token.options[0].replace(INTEGER_WIDTH_REGEX, function (_, g1, g2, g3, g4, g5) {\n if (g1) {\n result.minimumIntegerDigits = g2.length;\n }\n else if (g3 && g4) {\n throw new Error('We currently do not support maximum integer digits');\n }\n else if (g5) {\n throw new Error('We currently do not support exact integer digits');\n }\n return '';\n });\n continue;\n }\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width\n if (CONCISE_INTEGER_WIDTH_REGEX.test(token.stem)) {\n result.minimumIntegerDigits = token.stem.length;\n continue;\n }\n if (FRACTION_PRECISION_REGEX.test(token.stem)) {\n // Precision\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision\n // precision-integer case\n if (token.options.length > 1) {\n throw new RangeError('Fraction-precision stems only accept a single optional option');\n }\n token.stem.replace(FRACTION_PRECISION_REGEX, function (_, g1, g2, g3, g4, g5) {\n // .000* case (before ICU67 it was .000+)\n if (g2 === '*') {\n result.minimumFractionDigits = g1.length;\n }\n // .### case\n else if (g3 && g3[0] === '#') {\n result.maximumFractionDigits = g3.length;\n }\n // .00## case\n else if (g4 && g5) {\n result.minimumFractionDigits = g4.length;\n result.maximumFractionDigits = g4.length + g5.length;\n }\n else {\n result.minimumFractionDigits = g1.length;\n result.maximumFractionDigits = g1.length;\n }\n return '';\n });\n var opt = token.options[0];\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display\n if (opt === 'w') {\n result = __assign(__assign({}, result), { trailingZeroDisplay: 'stripIfInteger' });\n }\n else if (opt) {\n result = __assign(__assign({}, result), parseSignificantPrecision(opt));\n }\n continue;\n }\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision\n if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {\n result = __assign(__assign({}, result), parseSignificantPrecision(token.stem));\n continue;\n }\n var signOpts = parseSign(token.stem);\n if (signOpts) {\n result = __assign(__assign({}, result), signOpts);\n }\n var conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem);\n if (conciseScientificAndEngineeringOpts) {\n result = __assign(__assign({}, result), conciseScientificAndEngineeringOpts);\n }\n }\n return result;\n}\n","var _a;\nimport { __assign } from \"tslib\";\nimport { ErrorKind } from './error';\nimport { SKELETON_TYPE, TYPE, } from './types';\nimport { SPACE_SEPARATOR_REGEX } from './regex.generated';\nimport { parseNumberSkeleton, parseNumberSkeletonFromString, parseDateTimeSkeleton, } from '@formatjs/icu-skeleton-parser';\nimport { getBestPattern } from './date-time-pattern-generator';\nvar SPACE_SEPARATOR_START_REGEX = new RegExp(\"^\".concat(SPACE_SEPARATOR_REGEX.source, \"*\"));\nvar SPACE_SEPARATOR_END_REGEX = new RegExp(\"\".concat(SPACE_SEPARATOR_REGEX.source, \"*$\"));\nfunction createLocation(start, end) {\n return { start: start, end: end };\n}\n// #region Ponyfills\n// Consolidate these variables up top for easier toggling during debugging\nvar hasNativeStartsWith = !!String.prototype.startsWith;\nvar hasNativeFromCodePoint = !!String.fromCodePoint;\nvar hasNativeFromEntries = !!Object.fromEntries;\nvar hasNativeCodePointAt = !!String.prototype.codePointAt;\nvar hasTrimStart = !!String.prototype.trimStart;\nvar hasTrimEnd = !!String.prototype.trimEnd;\nvar hasNativeIsSafeInteger = !!Number.isSafeInteger;\nvar isSafeInteger = hasNativeIsSafeInteger\n ? Number.isSafeInteger\n : function (n) {\n return (typeof n === 'number' &&\n isFinite(n) &&\n Math.floor(n) === n &&\n Math.abs(n) <= 0x1fffffffffffff);\n };\n// IE11 does not support y and u.\nvar REGEX_SUPPORTS_U_AND_Y = true;\ntry {\n var re = RE('([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)', 'yu');\n /**\n * legacy Edge or Xbox One browser\n * Unicode flag support: supported\n * Pattern_Syntax support: not supported\n * See https://github.com/formatjs/formatjs/issues/2822\n */\n REGEX_SUPPORTS_U_AND_Y = ((_a = re.exec('a')) === null || _a === void 0 ? void 0 : _a[0]) === 'a';\n}\ncatch (_) {\n REGEX_SUPPORTS_U_AND_Y = false;\n}\nvar startsWith = hasNativeStartsWith\n ? // Native\n function startsWith(s, search, position) {\n return s.startsWith(search, position);\n }\n : // For IE11\n function startsWith(s, search, position) {\n return s.slice(position, position + search.length) === search;\n };\nvar fromCodePoint = hasNativeFromCodePoint\n ? String.fromCodePoint\n : // IE11\n function fromCodePoint() {\n var codePoints = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n codePoints[_i] = arguments[_i];\n }\n var elements = '';\n var length = codePoints.length;\n var i = 0;\n var code;\n while (length > i) {\n code = codePoints[i++];\n if (code > 0x10ffff)\n throw RangeError(code + ' is not a valid code point');\n elements +=\n code < 0x10000\n ? String.fromCharCode(code)\n : String.fromCharCode(((code -= 0x10000) >> 10) + 0xd800, (code % 0x400) + 0xdc00);\n }\n return elements;\n };\nvar fromEntries = \n// native\nhasNativeFromEntries\n ? Object.fromEntries\n : // Ponyfill\n function fromEntries(entries) {\n var obj = {};\n for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {\n var _a = entries_1[_i], k = _a[0], v = _a[1];\n obj[k] = v;\n }\n return obj;\n };\nvar codePointAt = hasNativeCodePointAt\n ? // Native\n function codePointAt(s, index) {\n return s.codePointAt(index);\n }\n : // IE 11\n function codePointAt(s, index) {\n var size = s.length;\n if (index < 0 || index >= size) {\n return undefined;\n }\n var first = s.charCodeAt(index);\n var second;\n return first < 0xd800 ||\n first > 0xdbff ||\n index + 1 === size ||\n (second = s.charCodeAt(index + 1)) < 0xdc00 ||\n second > 0xdfff\n ? first\n : ((first - 0xd800) << 10) + (second - 0xdc00) + 0x10000;\n };\nvar trimStart = hasTrimStart\n ? // Native\n function trimStart(s) {\n return s.trimStart();\n }\n : // Ponyfill\n function trimStart(s) {\n return s.replace(SPACE_SEPARATOR_START_REGEX, '');\n };\nvar trimEnd = hasTrimEnd\n ? // Native\n function trimEnd(s) {\n return s.trimEnd();\n }\n : // Ponyfill\n function trimEnd(s) {\n return s.replace(SPACE_SEPARATOR_END_REGEX, '');\n };\n// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.\nfunction RE(s, flag) {\n return new RegExp(s, flag);\n}\n// #endregion\nvar matchIdentifierAtIndex;\nif (REGEX_SUPPORTS_U_AND_Y) {\n // Native\n var IDENTIFIER_PREFIX_RE_1 = RE('([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)', 'yu');\n matchIdentifierAtIndex = function matchIdentifierAtIndex(s, index) {\n var _a;\n IDENTIFIER_PREFIX_RE_1.lastIndex = index;\n var match = IDENTIFIER_PREFIX_RE_1.exec(s);\n return (_a = match[1]) !== null && _a !== void 0 ? _a : '';\n };\n}\nelse {\n // IE11\n matchIdentifierAtIndex = function matchIdentifierAtIndex(s, index) {\n var match = [];\n while (true) {\n var c = codePointAt(s, index);\n if (c === undefined || _isWhiteSpace(c) || _isPatternSyntax(c)) {\n break;\n }\n match.push(c);\n index += c >= 0x10000 ? 2 : 1;\n }\n return fromCodePoint.apply(void 0, match);\n };\n}\nvar Parser = /** @class */ (function () {\n function Parser(message, options) {\n if (options === void 0) { options = {}; }\n this.message = message;\n this.position = { offset: 0, line: 1, column: 1 };\n this.ignoreTag = !!options.ignoreTag;\n this.locale = options.locale;\n this.requiresOtherClause = !!options.requiresOtherClause;\n this.shouldParseSkeletons = !!options.shouldParseSkeletons;\n }\n Parser.prototype.parse = function () {\n if (this.offset() !== 0) {\n throw Error('parser can only be used once');\n }\n return this.parseMessage(0, '', false);\n };\n Parser.prototype.parseMessage = function (nestingLevel, parentArgType, expectingCloseTag) {\n var elements = [];\n while (!this.isEOF()) {\n var char = this.char();\n if (char === 123 /* `{` */) {\n var result = this.parseArgument(nestingLevel, expectingCloseTag);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n else if (char === 125 /* `}` */ && nestingLevel > 0) {\n break;\n }\n else if (char === 35 /* `#` */ &&\n (parentArgType === 'plural' || parentArgType === 'selectordinal')) {\n var position = this.clonePosition();\n this.bump();\n elements.push({\n type: TYPE.pound,\n location: createLocation(position, this.clonePosition()),\n });\n }\n else if (char === 60 /* `<` */ &&\n !this.ignoreTag &&\n this.peek() === 47 // char code for '/'\n ) {\n if (expectingCloseTag) {\n break;\n }\n else {\n return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(this.clonePosition(), this.clonePosition()));\n }\n }\n else if (char === 60 /* `<` */ &&\n !this.ignoreTag &&\n _isAlpha(this.peek() || 0)) {\n var result = this.parseTag(nestingLevel, parentArgType);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n else {\n var result = this.parseLiteral(nestingLevel, parentArgType);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n }\n return { val: elements, err: null };\n };\n /**\n * A tag name must start with an ASCII lower/upper case letter. The grammar is based on the\n * [custom element name][] except that a dash is NOT always mandatory and uppercase letters\n * are accepted:\n *\n * ```\n * tag ::= \"<\" tagName (whitespace)* \"/>\" | \"<\" tagName (whitespace)* \">\" message \"</\" tagName (whitespace)* \">\"\n * tagName ::= [a-z] (PENChar)*\n * PENChar ::=\n * \"-\" | \".\" | [0-9] | \"_\" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |\n * [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |\n * [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\n * ```\n *\n * [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name\n * NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do\n * since other tag-based engines like React allow it\n */\n Parser.prototype.parseTag = function (nestingLevel, parentArgType) {\n var startPosition = this.clonePosition();\n this.bump(); // `<`\n var tagName = this.parseTagName();\n this.bumpSpace();\n if (this.bumpIf('/>')) {\n // Self closing tag\n return {\n val: {\n type: TYPE.literal,\n value: \"<\".concat(tagName, \"/>\"),\n location: createLocation(startPosition, this.clonePosition()),\n },\n err: null,\n };\n }\n else if (this.bumpIf('>')) {\n var childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);\n if (childrenResult.err) {\n return childrenResult;\n }\n var children = childrenResult.val;\n // Expecting a close tag\n var endTagStartPosition = this.clonePosition();\n if (this.bumpIf('</')) {\n if (this.isEOF() || !_isAlpha(this.char())) {\n return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));\n }\n var closingTagNameStartPosition = this.clonePosition();\n var closingTagName = this.parseTagName();\n if (tagName !== closingTagName) {\n return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(closingTagNameStartPosition, this.clonePosition()));\n }\n this.bumpSpace();\n if (!this.bumpIf('>')) {\n return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));\n }\n return {\n val: {\n type: TYPE.tag,\n value: tagName,\n children: children,\n location: createLocation(startPosition, this.clonePosition()),\n },\n err: null,\n };\n }\n else {\n return this.error(ErrorKind.UNCLOSED_TAG, createLocation(startPosition, this.clonePosition()));\n }\n }\n else {\n return this.error(ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition()));\n }\n };\n /**\n * This method assumes that the caller has peeked ahead for the first tag character.\n */\n Parser.prototype.parseTagName = function () {\n var startOffset = this.offset();\n this.bump(); // the first tag name character\n while (!this.isEOF() && _isPotentialElementNameChar(this.char())) {\n this.bump();\n }\n return this.message.slice(startOffset, this.offset());\n };\n Parser.prototype.parseLiteral = function (nestingLevel, parentArgType) {\n var start = this.clonePosition();\n var value = '';\n while (true) {\n var parseQuoteResult = this.tryParseQuote(parentArgType);\n if (parseQuoteResult) {\n value += parseQuoteResult;\n continue;\n }\n var parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);\n if (parseUnquotedResult) {\n value += parseUnquotedResult;\n continue;\n }\n var parseLeftAngleResult = this.tryParseLeftAngleBracket();\n if (parseLeftAngleResult) {\n value += parseLeftAngleResult;\n continue;\n }\n break;\n }\n var location = createLocation(start, this.clonePosition());\n return {\n val: { type: TYPE.literal, value: value, location: location },\n err: null,\n };\n };\n Parser.prototype.tryParseLeftAngleBracket = function () {\n if (!this.isEOF() &&\n this.char() === 60 /* `<` */ &&\n (this.ignoreTag ||\n // If at the opening tag or closing tag position, bail.\n !_isAlphaOrSlash(this.peek() || 0))) {\n this.bump(); // `<`\n return '<';\n }\n return null;\n };\n /**\n * Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes\n * a character that requires quoting (that is, \"only where needed\"), and works the same in\n * nested messages as on the top level of the pattern. The new behavior is otherwise compatible.\n */\n Parser.prototype.tryParseQuote = function (parentArgType) {\n if (this.isEOF() || this.char() !== 39 /* `'` */) {\n return null;\n }\n // Parse escaped char following the apostrophe, or early return if there is no escaped char.\n // Check if is valid escaped character\n switch (this.peek()) {\n case 39 /* `'` */:\n // double quote, should return as a single quote.\n this.bump();\n this.bump();\n return \"'\";\n // '{', '<', '>', '}'\n case 123:\n case 60:\n case 62:\n case 125:\n break;\n case 35: // '#'\n if (parentArgType === 'plural' || parentArgType === 'selectordinal') {\n break;\n }\n return null;\n default:\n return null;\n }\n this.bump(); // apostrophe\n var codePoints = [this.char()]; // escaped char\n this.bump();\n // read chars until the optional closing apostrophe is found\n while (!this.isEOF()) {\n var ch = this.char();\n if (ch === 39 /* `'` */) {\n if (this.peek() === 39 /* `'` */) {\n codePoints.push(39);\n // Bump one more time because we need to skip 2 characters.\n this.bump();\n }\n else {\n // Optional closing apostrophe.\n this.bump();\n break;\n }\n }\n else {\n codePoints.push(ch);\n }\n this.bump();\n }\n return fromCodePoint.apply(void 0, codePoints);\n };\n Parser.prototype.tryParseUnquoted = function (nestingLevel, parentArgType) {\n if (this.isEOF()) {\n return null;\n }\n var ch = this.char();\n if (ch === 60 /* `<` */ ||\n ch === 123 /* `{` */ ||\n (ch === 35 /* `#` */ &&\n (parentArgType === 'plural' || parentArgType === 'selectordinal')) ||\n (ch === 125 /* `}` */ && nestingLevel > 0)) {\n return null;\n }\n else {\n this.bump();\n return fromCodePoint(ch);\n }\n };\n Parser.prototype.parseArgument = function (nestingLevel, expectingCloseTag) {\n var openingBracePosition = this.clonePosition();\n this.bump(); // `{`\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n if (this.char() === 125 /* `}` */) {\n this.bump();\n return this.error(ErrorKind.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n // argument name\n var value = this.parseIdentifierIfPossible().value;\n if (!value) {\n return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n switch (this.char()) {\n // Simple argument: `{name}`\n case 125 /* `}` */: {\n this.bump(); // `}`\n return {\n val: {\n type: TYPE.argument,\n // value does not include the opening and closing braces.\n value: value,\n location: createLocation(openingBracePosition, this.clonePosition()),\n },\n err: null,\n };\n }\n // Argument with options: `{name, format, ...}`\n case 44 /* `,` */: {\n this.bump(); // `,`\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n return this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition);\n }\n default:\n return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n };\n /**\n * Advance the parser until the end of the identifier, if it is currently on\n * an identifier character. Return an empty string otherwise.\n */\n Parser.prototype.parseIdentifierIfPossible = function () {\n var startingPosition = this.clonePosition();\n var startOffset = this.offset();\n var value = matchIdentifierAtIndex(this.message, startOffset);\n var endOffset = startOffset + value.length;\n this.bumpTo(endOffset);\n var endPosition = this.clonePosition();\n var location = createLocation(startingPosition, endPosition);\n return { value: value, location: location };\n };\n Parser.prototype.parseArgumentOptions = function (nestingLevel, expectingCloseTag, value, openingBracePosition) {\n var _a;\n // Parse this range:\n // {name, type, style}\n // ^---^\n var typeStartPosition = this.clonePosition();\n var argType = this.parseIdentifierIfPossible().value;\n var typeEndPosition = this.clonePosition();\n switch (argType) {\n case '':\n // Expecting a style string number, date, time, plural, selectordinal, or select.\n return this.error(ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));\n case 'number':\n case 'date':\n case 'time': {\n // Parse this range:\n // {name, number, style}\n // ^-------^\n this.bumpSpace();\n var styleAndLocation = null;\n if (this.bumpIf(',')) {\n this.bumpSpace();\n var styleStartPosition = this.clonePosition();\n var result = this.parseSimpleArgStyleIfPossible();\n if (result.err) {\n return result;\n }\n var style = trimEnd(result.val);\n if (style.length === 0) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n var styleLocation = createLocation(styleStartPosition, this.clonePosition());\n styleAndLocation = { style: style, styleLocation: styleLocation };\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n var location_1 = createLocation(openingBracePosition, this.clonePosition());\n // Extract style or skeleton\n if (styleAndLocation && startsWith(styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style, '::', 0)) {\n // Skeleton starts with `::`.\n var skeleton = trimStart(styleAndLocation.style.slice(2));\n if (argType === 'number') {\n var result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);\n if (result.err) {\n return result;\n }\n return {\n val: { type: TYPE.number, value: value, location: location_1, style: result.val },\n err: null,\n };\n }\n else {\n if (skeleton.length === 0) {\n return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1);\n }\n var dateTimePattern = skeleton;\n // Get \"best match\" pattern only if locale is passed, if not, let it\n // pass as-is where `parseDateTimeSkeleton()` will throw an error\n // for unsupported patterns.\n if (this.locale) {\n dateTimePattern = getBestPattern(skeleton, this.locale);\n }\n var style = {\n type: SKELETON_TYPE.dateTime,\n pattern: dateTimePattern,\n location: styleAndLocation.styleLocation,\n parsedOptions: this.shouldParseSkeletons\n ? parseDateTimeSkeleton(dateTimePattern)\n : {},\n };\n var type = argType === 'date' ? TYPE.date : TYPE.time;\n return {\n val: { type: type, value: value, location: location_1, style: style },\n err: null,\n };\n }\n }\n // Regular style or no style.\n return {\n val: {\n type: argType === 'number'\n ? TYPE.number\n : argType === 'date'\n ? TYPE.date\n : TYPE.time,\n value: value,\n location: location_1,\n style: (_a = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a !== void 0 ? _a : null,\n },\n err: null,\n };\n }\n case 'plural':\n case 'selectordinal':\n case 'select': {\n // Parse this range:\n // {name, plural, options}\n // ^---------^\n var typeEndPosition_1 = this.clonePosition();\n this.bumpSpace();\n if (!this.bumpIf(',')) {\n return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition_1, __assign({}, typeEndPosition_1)));\n }\n this.bumpSpace();\n // Parse offset:\n // {name, plural, offset:1, options}\n // ^-----^\n //\n // or the first option:\n //\n // {name, plural, one {...} other {...}}\n // ^--^\n var identifierAndLocation = this.parseIdentifierIfPossible();\n var pluralOffset = 0;\n if (argType !== 'select' && identifierAndLocation.value === 'offset') {\n if (!this.bumpIf(':')) {\n return this.error(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n this.bumpSpace();\n var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);\n if (result.err) {\n return result;\n }\n // Parse another identifier for option parsing\n this.bumpSpace();\n identifierAndLocation = this.parseIdentifierIfPossible();\n pluralOffset = result.val;\n }\n var optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);\n if (optionsResult.err) {\n return optionsResult;\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n var location_2 = createLocation(openingBracePosition, this.clonePosition());\n if (argType === 'select') {\n return {\n val: {\n type: TYPE.select,\n value: value,\n options: fromEntries(optionsResult.val),\n location: location_2,\n },\n err: null,\n };\n }\n else {\n return {\n val: {\n type: TYPE.plural,\n value: value,\n options: fromEntries(optionsResult.val),\n offset: pluralOffset,\n pluralType: argType === 'plural' ? 'cardinal' : 'ordinal',\n location: location_2,\n },\n err: null,\n };\n }\n }\n default:\n return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));\n }\n };\n Parser.prototype.tryParseArgumentClose = function (openingBracePosition) {\n // Parse: {value, number, ::currency/GBP }\n //\n if (this.isEOF() || this.char() !== 125 /* `}` */) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n this.bump(); // `}`\n return { val: true, err: null };\n };\n /**\n * See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659\n */\n Parser.prototype.parseSimpleArgStyleIfPossible = function () {\n var nestedBraces = 0;\n var startPosition = this.clonePosition();\n while (!this.isEOF()) {\n var ch = this.char();\n switch (ch) {\n case 39 /* `'` */: {\n // Treat apostrophe as quoting but include it in the style part.\n // Find the end of the quoted literal text.\n this.bump();\n var apostrophePosition = this.clonePosition();\n if (!this.bumpUntil(\"'\")) {\n return this.error(ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition()));\n }\n this.bump();\n break;\n }\n case 123 /* `{` */: {\n nestedBraces += 1;\n this.bump();\n break;\n }\n case 125 /* `}` */: {\n if (nestedBraces > 0) {\n nestedBraces -= 1;\n }\n else {\n return {\n val: this.message.slice(startPosition.offset, this.offset()),\n err: null,\n };\n }\n break;\n }\n default:\n this.bump();\n break;\n }\n }\n return {\n val: this.message.slice(startPosition.offset, this.offset()),\n err: null,\n };\n };\n Parser.prototype.parseNumberSkeletonFromString = function (skeleton, location) {\n var tokens = [];\n try {\n tokens = parseNumberSkeletonFromString(skeleton);\n }\n catch (e) {\n return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location);\n }\n return {\n val: {\n type: SKELETON_TYPE.number,\n tokens: tokens,\n location: location,\n parsedOptions: this.shouldParseSkeletons\n ? parseNumberSkeleton(tokens)\n : {},\n },\n err: null,\n };\n };\n /**\n * @param nesting_level The current nesting level of messages.\n * This can be positive when parsing message fragment in select or plural argument options.\n * @param parent_arg_type The parent argument's type.\n * @param parsed_first_identifier If provided, this is the first identifier-like selector of\n * the argument. It is a by-product of a previous parsing attempt.\n * @param expecting_close_tag If true, this message is directly or indirectly nested inside\n * between a pair of opening and closing tags. The nested message will not parse beyond\n * the closing tag boundary.\n */\n Parser.prototype.tryParsePluralOrSelectOptions = function (nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {\n var _a;\n var hasOtherClause = false;\n var options = [];\n var parsedSelectors = new Set();\n var selector = parsedFirstIdentifier.value, selectorLocation = parsedFirstIdentifier.location;\n // Parse:\n // one {one apple}\n // ^--^\n while (true) {\n if (selector.length === 0) {\n var startPosition = this.clonePosition();\n if (parentArgType !== 'select' && this.bumpIf('=')) {\n // Try parse `={number}` selector\n var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);\n if (result.err) {\n return result;\n }\n selectorLocation = createLocation(startPosition, this.clonePosition());\n selector = this.message.slice(startPosition.offset, this.offset());\n }\n else {\n break;\n }\n }\n // Duplicate selector clauses\n if (parsedSelectors.has(selector)) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR\n : ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation);\n }\n if (selector === 'other') {\n hasOtherClause = true;\n }\n // Parse:\n // one {one apple}\n // ^----------^\n this.bumpSpace();\n var openingBracePosition = this.clonePosition();\n if (!this.bumpIf('{')) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\n : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation(this.clonePosition(), this.clonePosition()));\n }\n var fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);\n if (fragmentResult.err) {\n return fragmentResult;\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n options.push([\n selector,\n {\n value: fragmentResult.val,\n location: createLocation(openingBracePosition, this.clonePosition()),\n },\n ]);\n // Keep track of the existing selectors\n parsedSelectors.add(selector);\n // Prep next selector clause.\n this.bumpSpace();\n (_a = this.parseIdentifierIfPossible(), selector = _a.value, selectorLocation = _a.location);\n }\n if (options.length === 0) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR\n : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition()));\n }\n if (this.requiresOtherClause && !hasOtherClause) {\n return this.error(ErrorKind.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n return { val: options, err: null };\n };\n Parser.prototype.tryParseDecimalInteger = function (expectNumberError, invalidNumberError) {\n var sign = 1;\n var startingPosition = this.clonePosition();\n if (this.bumpIf('+')) {\n }\n else if (this.bumpIf('-')) {\n sign = -1;\n }\n var hasDigits = false;\n var decimal = 0;\n while (!this.isEOF()) {\n var ch = this.char();\n if (ch >= 48 /* `0` */ && ch <= 57 /* `9` */) {\n hasDigits = true;\n decimal = decimal * 10 + (ch - 48);\n this.bump();\n }\n else {\n break;\n }\n }\n var location = createLocation(startingPosition, this.clonePosition());\n if (!hasDigits) {\n return this.error(expectNumberError, location);\n }\n decimal *= sign;\n if (!isSafeInteger(decimal)) {\n return this.error(invalidNumberError, location);\n }\n return { val: decimal, err: null };\n };\n Parser.prototype.offset = function () {\n return this.position.offset;\n };\n Parser.prototype.isEOF = function () {\n return this.offset() === this.message.length;\n };\n Parser.prototype.clonePosition = function () {\n // This is much faster than `Object.assign` or spread.\n return {\n offset: this.position.offset,\n line: this.position.line,\n column: this.position.column,\n };\n };\n /**\n * Return the code point at the current position of the parser.\n * Throws if the index is out of bound.\n */\n Parser.prototype.char = function () {\n var offset = this.position.offset;\n if (offset >= this.message.length) {\n throw Error('out of bound');\n }\n var code = codePointAt(this.message, offset);\n if (code === undefined) {\n throw Error(\"Offset \".concat(offset, \" is at invalid UTF-16 code unit boundary\"));\n }\n return code;\n };\n Parser.prototype.error = function (kind, location) {\n return {\n val: null,\n err: {\n kind: kind,\n message: this.message,\n location: location,\n },\n };\n };\n /** Bump the parser to the next UTF-16 code unit. */\n Parser.prototype.bump = function () {\n if (this.isEOF()) {\n return;\n }\n var code = this.char();\n if (code === 10 /* '\\n' */) {\n this.position.line += 1;\n this.position.column = 1;\n this.position.offset += 1;\n }\n else {\n this.position.column += 1;\n // 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.\n this.position.offset += code < 0x10000 ? 1 : 2;\n }\n };\n /**\n * If the substring starting at the current position of the parser has\n * the given prefix, then bump the parser to the character immediately\n * following the prefix and return true. Otherwise, don't bump the parser\n * and return false.\n */\n Parser.prototype.bumpIf = function (prefix) {\n if (startsWith(this.message, prefix, this.offset())) {\n for (var i = 0; i < prefix.length; i++) {\n this.bump();\n }\n return true;\n }\n return false;\n };\n /**\n * Bump the parser until the pattern character is found and return `true`.\n * Otherwise bump to the end of the file and return `false`.\n */\n Parser.prototype.bumpUntil = function (pattern) {\n var currentOffset = this.offset();\n var index = this.message.indexOf(pattern, currentOffset);\n if (index >= 0) {\n this.bumpTo(index);\n return true;\n }\n else {\n this.bumpTo(this.message.length);\n return false;\n }\n };\n /**\n * Bump the parser to the target offset.\n * If target offset is beyond the end of the input, bump the parser to the end of the input.\n */\n Parser.prototype.bumpTo = function (targetOffset) {\n if (this.offset() > targetOffset) {\n throw Error(\"targetOffset \".concat(targetOffset, \" must be greater than or equal to the current offset \").concat(this.offset()));\n }\n targetOffset = Math.min(targetOffset, this.message.length);\n while (true) {\n var offset = this.offset();\n if (offset === targetOffset) {\n break;\n }\n if (offset > targetOffset) {\n throw Error(\"targetOffset \".concat(targetOffset, \" is at invalid UTF-16 code unit boundary\"));\n }\n this.bump();\n if (this.isEOF()) {\n break;\n }\n }\n };\n /** advance the parser through all whitespace to the next non-whitespace code unit. */\n Parser.prototype.bumpSpace = function () {\n while (!this.isEOF() && _isWhiteSpace(this.char())) {\n this.bump();\n }\n };\n /**\n * Peek at the *next* Unicode codepoint in the input without advancing the parser.\n * If the input has been exhausted, then this returns null.\n */\n Parser.prototype.peek = function () {\n if (this.isEOF()) {\n return null;\n }\n var code = this.char();\n var offset = this.offset();\n var nextCode = this.message.charCodeAt(offset + (code >= 0x10000 ? 2 : 1));\n return nextCode !== null && nextCode !== void 0 ? nextCode : null;\n };\n return Parser;\n}());\nexport { Parser };\n/**\n * This check if codepoint is alphabet (lower & uppercase)\n * @param codepoint\n * @returns\n */\nfunction _isAlpha(codepoint) {\n return ((codepoint >= 97 && codepoint <= 122) ||\n (codepoint >= 65 && codepoint <= 90));\n}\nfunction _isAlphaOrSlash(codepoint) {\n return _isAlpha(codepoint) || codepoint === 47; /* '/' */\n}\n/** See `parseTag` function docs. */\nfunction _isPotentialElementNameChar(c) {\n return (c === 45 /* '-' */ ||\n c === 46 /* '.' */ ||\n (c >= 48 && c <= 57) /* 0..9 */ ||\n c === 95 /* '_' */ ||\n (c >= 97 && c <= 122) /** a..z */ ||\n (c >= 65 && c <= 90) /* A..Z */ ||\n c == 0xb7 ||\n (c >= 0xc0 && c <= 0xd6) ||\n (c >= 0xd8 && c <= 0xf6) ||\n (c >= 0xf8 && c <= 0x37d) ||\n (c >= 0x37f && c <= 0x1fff) ||\n (c >= 0x200c && c <= 0x200d) ||\n (c >= 0x203f && c <= 0x2040) ||\n (c >= 0x2070 && c <= 0x218f) ||\n (c >= 0x2c00 && c <= 0x2fef) ||\n (c >= 0x3001 && c <= 0xd7ff) ||\n (c >= 0xf900 && c <= 0xfdcf) ||\n (c >= 0xfdf0 && c <= 0xfffd) ||\n (c >= 0x10000 && c <= 0xeffff));\n}\n/**\n * Code point equivalent of regex `\\p{White_Space}`.\n * From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt\n */\nfunction _isWhiteSpace(c) {\n return ((c >= 0x0009 && c <= 0x000d) ||\n c === 0x0020 ||\n c === 0x0085 ||\n (c >= 0x200e && c <= 0x200f) ||\n c === 0x2028 ||\n c === 0x2029);\n}\n/**\n * Code point equivalent of regex `\\p{Pattern_Syntax}`.\n * See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt\n */\nfunction _isPatternSyntax(c) {\n return ((c >= 0x0021 && c <= 0x0023) ||\n c === 0x0024 ||\n (c >= 0x0025 && c <= 0x0027) ||\n c === 0x0028 ||\n c === 0x0029 ||\n c === 0x002a ||\n c === 0x002b ||\n c === 0x002c ||\n c === 0x002d ||\n (c >= 0x002e && c <= 0x002f) ||\n (c >= 0x003a && c <= 0x003b) ||\n (c >= 0x003c && c <= 0x003e) ||\n (c >= 0x003f && c <= 0x0040) ||\n c === 0x005b ||\n c === 0x005c ||\n c === 0x005d ||\n c === 0x005e ||\n c === 0x0060 ||\n c === 0x007b ||\n c === 0x007c ||\n c === 0x007d ||\n c === 0x007e ||\n c === 0x00a1 ||\n (c >= 0x00a2 && c <= 0x00a5) ||\n c === 0x00a6 ||\n c === 0x00a7 ||\n c === 0x00a9 ||\n c === 0x00ab ||\n c === 0x00ac ||\n c === 0x00ae ||\n c === 0x00b0 ||\n c === 0x00b1 ||\n c === 0x00b6 ||\n c === 0x00bb ||\n c === 0x00bf ||\n c === 0x00d7 ||\n c === 0x00f7 ||\n (c >= 0x2010 && c <= 0x2015) ||\n (c >= 0x2016 && c <= 0x2017) ||\n c === 0x2018 ||\n c === 0x2019 ||\n c === 0x201a ||\n (c >= 0x201b && c <= 0x201c) ||\n c === 0x201d ||\n c === 0x201e ||\n c === 0x201f ||\n (c >= 0x2020 && c <= 0x2027) ||\n (c >= 0x2030 && c <= 0x2038) ||\n c === 0x2039 ||\n c === 0x203a ||\n (c >= 0x203b && c <= 0x203e) ||\n (c >= 0x2041 && c <= 0x2043) ||\n c === 0x2044 ||\n c === 0x2045 ||\n c === 0x2046 ||\n (c >= 0x2047 && c <= 0x2051) ||\n c === 0x2052 ||\n c === 0x2053 ||\n (c >= 0x2055 && c <= 0x205e) ||\n (c >= 0x2190 && c <= 0x2194) ||\n (c >= 0x2195 && c <= 0x2199) ||\n (c >= 0x219a && c <= 0x219b) ||\n (c >= 0x219c && c <= 0x219f) ||\n c === 0x21a0 ||\n (c >= 0x21a1 && c <= 0x21a2) ||\n c === 0x21a3 ||\n (c >= 0x21a4 && c <= 0x21a5) ||\n c === 0x21a6 ||\n (c >= 0x21a7 && c <= 0x21ad) ||\n c === 0x21ae ||\n (c >= 0x21af && c <= 0x21cd) ||\n (c >= 0x21ce && c <= 0x21cf) ||\n (c >= 0x21d0 && c <= 0x21d1) ||\n c === 0x21d2 ||\n c === 0x21d3 ||\n c === 0x21d4 ||\n (c >= 0x21d5 && c <= 0x21f3) ||\n (c >= 0x21f4 && c <= 0x22ff) ||\n (c >= 0x2300 && c <= 0x2307) ||\n c === 0x2308 ||\n c === 0x2309 ||\n c === 0x230a ||\n c === 0x230b ||\n (c >= 0x230c && c <= 0x231f) ||\n (c >= 0x2320 && c <= 0x2321) ||\n (c >= 0x2322 && c <= 0x2328) ||\n c === 0x2329 ||\n c === 0x232a ||\n (c >= 0x232b && c <= 0x237b) ||\n c === 0x237c ||\n (c >= 0x237d && c <= 0x239a) ||\n (c >= 0x239b && c <= 0x23b3) ||\n (c >= 0x23b4 && c <= 0x23db) ||\n (c >= 0x23dc && c <= 0x23e1) ||\n (c >= 0x23e2 && c <= 0x2426) ||\n (c >= 0x2427 && c <= 0x243f) ||\n (c >= 0x2440 && c <= 0x244a) ||\n (c >= 0x244b && c <= 0x245f) ||\n (c >= 0x2500 && c <= 0x25b6) ||\n c === 0x25b7 ||\n (c >= 0x25b8 && c <= 0x25c0) ||\n c === 0x25c1 ||\n (c >= 0x25c2 && c <= 0x25f7) ||\n (c >= 0x25f8 && c <= 0x25ff) ||\n (c >= 0x2600 && c <= 0x266e) ||\n c === 0x266f ||\n (c >= 0x2670 && c <= 0x2767) ||\n c === 0x2768 ||\n c === 0x2769 ||\n c === 0x276a ||\n c === 0x276b ||\n c === 0x276c ||\n c === 0x276d ||\n c === 0x276e ||\n c === 0x276f ||\n c === 0x2770 ||\n c === 0x2771 ||\n c === 0x2772 ||\n c === 0x2773 ||\n c === 0x2774 ||\n c === 0x2775 ||\n (c >= 0x2794 && c <= 0x27bf) ||\n (c >= 0x27c0 && c <= 0x27c4) ||\n c === 0x27c5 ||\n c === 0x27c6 ||\n (c >= 0x27c7 && c <= 0x27e5) ||\n c === 0x27e6 ||\n c === 0x27e7 ||\n c === 0x27e8 ||\n c === 0x27e9 ||\n c === 0x27ea ||\n c === 0x27eb ||\n c === 0x27ec ||\n c === 0x27ed ||\n c === 0x27ee ||\n c === 0x27ef ||\n (c >= 0x27f0 && c <= 0x27ff) ||\n (c >= 0x2800 && c <= 0x28ff) ||\n (c >= 0x2900 && c <= 0x2982) ||\n c === 0x2983 ||\n c === 0x2984 ||\n c === 0x2985 ||\n c === 0x2986 ||\n c === 0x2987 ||\n c === 0x2988 ||\n c === 0x2989 ||\n c === 0x298a ||\n c === 0x298b ||\n c === 0x298c ||\n c === 0x298d ||\n c === 0x298e ||\n c === 0x298f ||\n c === 0x2990 ||\n c === 0x2991 ||\n c === 0x2992 ||\n c === 0x2993 ||\n c === 0x2994 ||\n c === 0x2995 ||\n c === 0x2996 ||\n c === 0x2997 ||\n c === 0x2998 ||\n (c >= 0x2999 && c <= 0x29d7) ||\n c === 0x29d8 ||\n c === 0x29d9 ||\n c === 0x29da ||\n c === 0x29db ||\n (c >= 0x29dc && c <= 0x29fb) ||\n c === 0x29fc ||\n c === 0x29fd ||\n (c >= 0x29fe && c <= 0x2aff) ||\n (c >= 0x2b00 && c <= 0x2b2f) ||\n (c >= 0x2b30 && c <= 0x2b44) ||\n (c >= 0x2b45 && c <= 0x2b46) ||\n (c >= 0x2b47 && c <= 0x2b4c) ||\n (c >= 0x2b4d && c <= 0x2b73) ||\n (c >= 0x2b74 && c <= 0x2b75) ||\n (c >= 0x2b76 && c <= 0x2b95) ||\n c === 0x2b96 ||\n (c >= 0x2b97 && c <= 0x2bff) ||\n (c >= 0x2e00 && c <= 0x2e01) ||\n c === 0x2e02 ||\n c === 0x2e03 ||\n c === 0x2e04 ||\n c === 0x2e05 ||\n (c >= 0x2e06 && c <= 0x2e08) ||\n c === 0x2e09 ||\n c === 0x2e0a ||\n c === 0x2e0b ||\n c === 0x2e0c ||\n c === 0x2e0d ||\n (c >= 0x2e0e && c <= 0x2e16) ||\n c === 0x2e17 ||\n (c >= 0x2e18 && c <= 0x2e19) ||\n c === 0x2e1a ||\n c === 0x2e1b ||\n c === 0x2e1c ||\n c === 0x2e1d ||\n (c >= 0x2e1e && c <= 0x2e1f) ||\n c === 0x2e20 ||\n c === 0x2e21 ||\n c === 0x2e22 ||\n c === 0x2e23 ||\n c === 0x2e24 ||\n c === 0x2e25 ||\n c === 0x2e26 ||\n c === 0x2e27 ||\n c === 0x2e28 ||\n c === 0x2e29 ||\n (c >= 0x2e2a && c <= 0x2e2e) ||\n c === 0x2e2f ||\n (c >= 0x2e30 && c <= 0x2e39) ||\n (c >= 0x2e3a && c <= 0x2e3b) ||\n (c >= 0x2e3c && c <= 0x2e3f) ||\n c === 0x2e40 ||\n c === 0x2e41 ||\n c === 0x2e42 ||\n (c >= 0x2e43 && c <= 0x2e4f) ||\n (c >= 0x2e50 && c <= 0x2e51) ||\n c === 0x2e52 ||\n (c >= 0x2e53 && c <= 0x2e7f) ||\n (c >= 0x3001 && c <= 0x3003) ||\n c === 0x3008 ||\n c === 0x3009 ||\n c === 0x300a ||\n c === 0x300b ||\n c === 0x300c ||\n c === 0x300d ||\n c === 0x300e ||\n c === 0x300f ||\n c === 0x3010 ||\n c === 0x3011 ||\n (c >= 0x3012 && c <= 0x3013) ||\n c === 0x3014 ||\n c === 0x3015 ||\n c === 0x3016 ||\n c === 0x3017 ||\n c === 0x3018 ||\n c === 0x3019 ||\n c === 0x301a ||\n c === 0x301b ||\n c === 0x301c ||\n c === 0x301d ||\n (c >= 0x301e && c <= 0x301f) ||\n c === 0x3020 ||\n c === 0x3030 ||\n c === 0xfd3e ||\n c === 0xfd3f ||\n (c >= 0xfe45 && c <= 0xfe46));\n}\n","// @generated from time-data-gen.ts\n// prettier-ignore \nexport var timeData = {\n \"AX\": [\n \"H\"\n ],\n \"BQ\": [\n \"H\"\n ],\n \"CP\": [\n \"H\"\n ],\n \"CZ\": [\n \"H\"\n ],\n \"DK\": [\n \"H\"\n ],\n \"FI\": [\n \"H\"\n ],\n \"ID\": [\n \"H\"\n ],\n \"IS\": [\n \"H\"\n ],\n \"ML\": [\n \"H\"\n ],\n \"NE\": [\n \"H\"\n ],\n \"RU\": [\n \"H\"\n ],\n \"SE\": [\n \"H\"\n ],\n \"SJ\": [\n \"H\"\n ],\n \"SK\": [\n \"H\"\n ],\n \"AS\": [\n \"h\",\n \"H\"\n ],\n \"BT\": [\n \"h\",\n \"H\"\n ],\n \"DJ\": [\n \"h\",\n \"H\"\n ],\n \"ER\": [\n \"h\",\n \"H\"\n ],\n \"GH\": [\n \"h\",\n \"H\"\n ],\n \"IN\": [\n \"h\",\n \"H\"\n ],\n \"LS\": [\n \"h\",\n \"H\"\n ],\n \"PG\": [\n \"h\",\n \"H\"\n ],\n \"PW\": [\n \"h\",\n \"H\"\n ],\n \"SO\": [\n \"h\",\n \"H\"\n ],\n \"TO\": [\n \"h\",\n \"H\"\n ],\n \"VU\": [\n \"h\",\n \"H\"\n ],\n \"WS\": [\n \"h\",\n \"H\"\n ],\n \"001\": [\n \"H\",\n \"h\"\n ],\n \"AL\": [\n \"h\",\n \"H\",\n \"hB\"\n ],\n \"TD\": [\n \"h\",\n \"H\",\n \"hB\"\n ],\n \"ca-ES\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"CF\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"CM\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"fr-CA\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"gl-ES\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"it-CH\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"it-IT\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"LU\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"NP\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"PF\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"SC\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"SM\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"SN\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"TF\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"VA\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"CY\": [\n \"h\",\n \"H\",\n \"hb\",\n \"hB\"\n ],\n \"GR\": [\n \"h\",\n \"H\",\n \"hb\",\n \"hB\"\n ],\n \"CO\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"DO\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"KP\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"KR\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"NA\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"PA\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"PR\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"VE\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"AC\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"AI\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"BW\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"BZ\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"CC\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"CK\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"CX\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"DG\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"FK\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"GB\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"GG\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"GI\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"IE\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"IM\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"IO\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"JE\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"LT\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"MK\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"MN\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"MS\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"NF\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"NG\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"NR\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"NU\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"PN\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"SH\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"SX\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"TA\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"ZA\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"af-ZA\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"AR\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"CL\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"CR\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"CU\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"EA\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"es-BO\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"es-BR\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"es-EC\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"es-ES\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"es-GQ\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"es-PE\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"GT\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"HN\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"IC\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"KG\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"KM\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"LK\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"MA\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"MX\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"NI\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"PY\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"SV\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"UY\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"JP\": [\n \"H\",\n \"h\",\n \"K\"\n ],\n \"AD\": [\n \"H\",\n \"hB\"\n ],\n \"AM\": [\n \"H\",\n \"hB\"\n ],\n \"AO\": [\n \"H\",\n \"hB\"\n ],\n \"AT\": [\n \"H\",\n \"hB\"\n ],\n \"AW\": [\n \"H\",\n \"hB\"\n ],\n \"BE\": [\n \"H\",\n \"hB\"\n ],\n \"BF\": [\n \"H\",\n \"hB\"\n ],\n \"BJ\": [\n \"H\",\n \"hB\"\n ],\n \"BL\": [\n \"H\",\n \"hB\"\n ],\n \"BR\": [\n \"H\",\n \"hB\"\n ],\n \"CG\": [\n \"H\",\n \"hB\"\n ],\n \"CI\": [\n \"H\",\n \"hB\"\n ],\n \"CV\": [\n \"H\",\n \"hB\"\n ],\n \"DE\": [\n \"H\",\n \"hB\"\n ],\n \"EE\": [\n \"H\",\n \"hB\"\n ],\n \"FR\": [\n \"H\",\n \"hB\"\n ],\n \"GA\": [\n \"H\",\n \"hB\"\n ],\n \"GF\": [\n \"H\",\n \"hB\"\n ],\n \"GN\": [\n \"H\",\n \"hB\"\n ],\n \"GP\": [\n \"H\",\n \"hB\"\n ],\n \"GW\": [\n \"H\",\n \"hB\"\n ],\n \"HR\": [\n \"H\",\n \"hB\"\n ],\n \"IL\": [\n \"H\",\n \"hB\"\n ],\n \"IT\": [\n \"H\",\n \"hB\"\n ],\n \"KZ\": [\n \"H\",\n \"hB\"\n ],\n \"MC\": [\n \"H\",\n \"hB\"\n ],\n \"MD\": [\n \"H\",\n \"hB\"\n ],\n \"MF\": [\n \"H\",\n \"hB\"\n ],\n \"MQ\": [\n \"H\",\n \"hB\"\n ],\n \"MZ\": [\n \"H\",\n \"hB\"\n ],\n \"NC\": [\n \"H\",\n \"hB\"\n ],\n \"NL\": [\n \"H\",\n \"hB\"\n ],\n \"PM\": [\n \"H\",\n \"hB\"\n ],\n \"PT\": [\n \"H\",\n \"hB\"\n ],\n \"RE\": [\n \"H\",\n \"hB\"\n ],\n \"RO\": [\n \"H\",\n \"hB\"\n ],\n \"SI\": [\n \"H\",\n \"hB\"\n ],\n \"SR\": [\n \"H\",\n \"hB\"\n ],\n \"ST\": [\n \"H\",\n \"hB\"\n ],\n \"TG\": [\n \"H\",\n \"hB\"\n ],\n \"TR\": [\n \"H\",\n \"hB\"\n ],\n \"WF\": [\n \"H\",\n \"hB\"\n ],\n \"YT\": [\n \"H\",\n \"hB\"\n ],\n \"BD\": [\n \"h\",\n \"hB\",\n \"H\"\n ],\n \"PK\": [\n \"h\",\n \"hB\",\n \"H\"\n ],\n \"AZ\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"BA\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"BG\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"CH\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"GE\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"LI\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"ME\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"RS\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"UA\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"UZ\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"XK\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"AG\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"AU\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"BB\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"BM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"BS\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"CA\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"DM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"en-001\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"FJ\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"FM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"GD\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"GM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"GU\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"GY\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"JM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"KI\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"KN\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"KY\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"LC\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"LR\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"MH\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"MP\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"MW\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"NZ\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"SB\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"SG\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"SL\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"SS\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"SZ\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"TC\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"TT\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"UM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"US\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"VC\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"VG\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"VI\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"ZM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"BO\": [\n \"H\",\n \"hB\",\n \"h\",\n \"hb\"\n ],\n \"EC\": [\n \"H\",\n \"hB\",\n \"h\",\n \"hb\"\n ],\n \"ES\": [\n \"H\",\n \"hB\",\n \"h\",\n \"hb\"\n ],\n \"GQ\": [\n \"H\",\n \"hB\",\n \"h\",\n \"hb\"\n ],\n \"PE\": [\n \"H\",\n \"hB\",\n \"h\",\n \"hb\"\n ],\n \"AE\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"ar-001\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"BH\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"DZ\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"EG\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"EH\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"HK\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"IQ\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"JO\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"KW\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"LB\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"LY\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"MO\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"MR\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"OM\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"PH\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"PS\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"QA\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"SA\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"SD\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"SY\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"TN\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"YE\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"AF\": [\n \"H\",\n \"hb\",\n \"hB\",\n \"h\"\n ],\n \"LA\": [\n \"H\",\n \"hb\",\n \"hB\",\n \"h\"\n ],\n \"CN\": [\n \"H\",\n \"hB\",\n \"hb\",\n \"h\"\n ],\n \"LV\": [\n \"H\",\n \"hB\",\n \"hb\",\n \"h\"\n ],\n \"TL\": [\n \"H\",\n \"hB\",\n \"hb\",\n \"h\"\n ],\n \"zu-ZA\": [\n \"H\",\n \"hB\",\n \"hb\",\n \"h\"\n ],\n \"CD\": [\n \"hB\",\n \"H\"\n ],\n \"IR\": [\n \"hB\",\n \"H\"\n ],\n \"hi-IN\": [\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"kn-IN\": [\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"ml-IN\": [\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"te-IN\": [\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"KH\": [\n \"hB\",\n \"h\",\n \"H\",\n \"hb\"\n ],\n \"ta-IN\": [\n \"hB\",\n \"h\",\n \"hb\",\n \"H\"\n ],\n \"BN\": [\n \"hb\",\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"MY\": [\n \"hb\",\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"ET\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"gu-IN\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"mr-IN\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"pa-IN\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"TW\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"KE\": [\n \"hB\",\n \"hb\",\n \"H\",\n \"h\"\n ],\n \"MM\": [\n \"hB\",\n \"hb\",\n \"H\",\n \"h\"\n ],\n \"TZ\": [\n \"hB\",\n \"hb\",\n \"H\",\n \"h\"\n ],\n \"UG\": [\n \"hB\",\n \"hb\",\n \"H\",\n \"h\"\n ]\n};\n","import { timeData } from './time-data.generated';\n/**\n * Returns the best matching date time pattern if a date time skeleton\n * pattern is provided with a locale. Follows the Unicode specification:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns\n * @param skeleton date time skeleton pattern that possibly includes j, J or C\n * @param locale\n */\nexport function getBestPattern(skeleton, locale) {\n var skeletonCopy = '';\n for (var patternPos = 0; patternPos < skeleton.length; patternPos++) {\n var patternChar = skeleton.charAt(patternPos);\n if (patternChar === 'j') {\n var extraLength = 0;\n while (patternPos + 1 < skeleton.length &&\n skeleton.charAt(patternPos + 1) === patternChar) {\n extraLength++;\n patternPos++;\n }\n var hourLen = 1 + (extraLength & 1);\n var dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1);\n var dayPeriodChar = 'a';\n var hourChar = getDefaultHourSymbolFromLocale(locale);\n if (hourChar == 'H' || hourChar == 'k') {\n dayPeriodLen = 0;\n }\n while (dayPeriodLen-- > 0) {\n skeletonCopy += dayPeriodChar;\n }\n while (hourLen-- > 0) {\n skeletonCopy = hourChar + skeletonCopy;\n }\n }\n else if (patternChar === 'J') {\n skeletonCopy += 'H';\n }\n else {\n skeletonCopy += patternChar;\n }\n }\n return skeletonCopy;\n}\n/**\n * Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)\n * of the given `locale` to the corresponding time pattern.\n * @param locale\n */\nfunction getDefaultHourSymbolFromLocale(locale) {\n var hourCycle = locale.hourCycle;\n if (hourCycle === undefined &&\n // @ts-ignore hourCycle(s) is not identified yet\n locale.hourCycles &&\n // @ts-ignore\n locale.hourCycles.length) {\n // @ts-ignore\n hourCycle = locale.hourCycles[0];\n }\n if (hourCycle) {\n switch (hourCycle) {\n case 'h24':\n return 'k';\n case 'h23':\n return 'H';\n case 'h12':\n return 'h';\n case 'h11':\n return 'K';\n default:\n throw new Error('Invalid hourCycle');\n }\n }\n // TODO: Once hourCycle is fully supported remove the following with data generation\n var languageTag = locale.language;\n var regionTag;\n if (languageTag !== 'root') {\n regionTag = locale.maximize().region;\n }\n var hourCycles = timeData[regionTag || ''] ||\n timeData[languageTag || ''] ||\n timeData[\"\".concat(languageTag, \"-001\")] ||\n timeData['001'];\n return hourCycles[0];\n}\n","import { __assign } from \"tslib\";\nimport { ErrorKind } from './error';\nimport { Parser } from './parser';\nimport { isDateElement, isDateTimeSkeleton, isNumberElement, isNumberSkeleton, isPluralElement, isSelectElement, isTagElement, isTimeElement, } from './types';\nfunction pruneLocation(els) {\n els.forEach(function (el) {\n delete el.location;\n if (isSelectElement(el) || isPluralElement(el)) {\n for (var k in el.options) {\n delete el.options[k].location;\n pruneLocation(el.options[k].value);\n }\n }\n else if (isNumberElement(el) && isNumberSkeleton(el.style)) {\n delete el.style.location;\n }\n else if ((isDateElement(el) || isTimeElement(el)) &&\n isDateTimeSkeleton(el.style)) {\n delete el.style.location;\n }\n else if (isTagElement(el)) {\n pruneLocation(el.children);\n }\n });\n}\nexport function parse(message, opts) {\n if (opts === void 0) { opts = {}; }\n opts = __assign({ shouldParseSkeletons: true, requiresOtherClause: true }, opts);\n var result = new Parser(message, opts).parse();\n if (result.err) {\n var error = SyntaxError(ErrorKind[result.err.kind]);\n // @ts-expect-error Assign to error object\n error.location = result.err.location;\n // @ts-expect-error Assign to error object\n error.originalMessage = result.err.message;\n throw error;\n }\n if (!(opts === null || opts === void 0 ? void 0 : opts.captureLocation)) {\n pruneLocation(result.val);\n }\n return result.val;\n}\nexport * from './types';\n","//\n// Main\n//\nexport default function memoize(fn, options) {\n var cache = options && options.cache ? options.cache : cacheDefault;\n var serializer = options && options.serializer ? options.serializer : serializerDefault;\n var strategy = options && options.strategy ? options.strategy : strategyDefault;\n return strategy(fn, {\n cache: cache,\n serializer: serializer,\n });\n}\n//\n// Strategy\n//\nfunction isPrimitive(value) {\n return (value == null || typeof value === 'number' || typeof value === 'boolean'); // || typeof value === \"string\" 'unsafe' primitive for our needs\n}\nfunction monadic(fn, cache, serializer, arg) {\n var cacheKey = isPrimitive(arg) ? arg : serializer(arg);\n var computedValue = cache.get(cacheKey);\n if (typeof computedValue === 'undefined') {\n computedValue = fn.call(this, arg);\n cache.set(cacheKey, computedValue);\n }\n return computedValue;\n}\nfunction variadic(fn, cache, serializer) {\n var args = Array.prototype.slice.call(arguments, 3);\n var cacheKey = serializer(args);\n var computedValue = cache.get(cacheKey);\n if (typeof computedValue === 'undefined') {\n computedValue = fn.apply(this, args);\n cache.set(cacheKey, computedValue);\n }\n return computedValue;\n}\nfunction assemble(fn, context, strategy, cache, serialize) {\n return strategy.bind(context, fn, cache, serialize);\n}\nfunction strategyDefault(fn, options) {\n var strategy = fn.length === 1 ? monadic : variadic;\n return assemble(fn, this, strategy, options.cache.create(), options.serializer);\n}\nfunction strategyVariadic(fn, options) {\n return assemble(fn, this, variadic, options.cache.create(), options.serializer);\n}\nfunction strategyMonadic(fn, options) {\n return assemble(fn, this, monadic, options.cache.create(), options.serializer);\n}\n//\n// Serializer\n//\nvar serializerDefault = function () {\n return JSON.stringify(arguments);\n};\n//\n// Cache\n//\nfunction ObjectWithoutPrototypeCache() {\n this.cache = Object.create(null);\n}\nObjectWithoutPrototypeCache.prototype.get = function (key) {\n return this.cache[key];\n};\nObjectWithoutPrototypeCache.prototype.set = function (key, value) {\n this.cache[key] = value;\n};\nvar cacheDefault = {\n create: function create() {\n // @ts-ignore\n return new ObjectWithoutPrototypeCache();\n },\n};\nexport var strategies = {\n variadic: strategyVariadic,\n monadic: strategyMonadic,\n};\n","import { __extends } from \"tslib\";\nexport var ErrorCode;\n(function (ErrorCode) {\n // When we have a placeholder but no value to format\n ErrorCode[\"MISSING_VALUE\"] = \"MISSING_VALUE\";\n // When value supplied is invalid\n ErrorCode[\"INVALID_VALUE\"] = \"INVALID_VALUE\";\n // When we need specific Intl API but it's not available\n ErrorCode[\"MISSING_INTL_API\"] = \"MISSING_INTL_API\";\n})(ErrorCode || (ErrorCode = {}));\nvar FormatError = /** @class */ (function (_super) {\n __extends(FormatError, _super);\n function FormatError(msg, code, originalMessage) {\n var _this = _super.call(this, msg) || this;\n _this.code = code;\n _this.originalMessage = originalMessage;\n return _this;\n }\n FormatError.prototype.toString = function () {\n return \"[formatjs Error: \".concat(this.code, \"] \").concat(this.message);\n };\n return FormatError;\n}(Error));\nexport { FormatError };\nvar InvalidValueError = /** @class */ (function (_super) {\n __extends(InvalidValueError, _super);\n function InvalidValueError(variableId, value, options, originalMessage) {\n return _super.call(this, \"Invalid values for \\\"\".concat(variableId, \"\\\": \\\"\").concat(value, \"\\\". Options are \\\"\").concat(Object.keys(options).join('\", \"'), \"\\\"\"), ErrorCode.INVALID_VALUE, originalMessage) || this;\n }\n return InvalidValueError;\n}(FormatError));\nexport { InvalidValueError };\nvar InvalidValueTypeError = /** @class */ (function (_super) {\n __extends(InvalidValueTypeError, _super);\n function InvalidValueTypeError(value, type, originalMessage) {\n return _super.call(this, \"Value for \\\"\".concat(value, \"\\\" must be of type \").concat(type), ErrorCode.INVALID_VALUE, originalMessage) || this;\n }\n return InvalidValueTypeError;\n}(FormatError));\nexport { InvalidValueTypeError };\nvar MissingValueError = /** @class */ (function (_super) {\n __extends(MissingValueError, _super);\n function MissingValueError(variableId, originalMessage) {\n return _super.call(this, \"The intl string context variable \\\"\".concat(variableId, \"\\\" was not provided to the string \\\"\").concat(originalMessage, \"\\\"\"), ErrorCode.MISSING_VALUE, originalMessage) || this;\n }\n return MissingValueError;\n}(FormatError));\nexport { MissingValueError };\n","import { isArgumentElement, isDateElement, isDateTimeSkeleton, isLiteralElement, isNumberElement, isNumberSkeleton, isPluralElement, isPoundElement, isSelectElement, isTimeElement, isTagElement, } from '@formatjs/icu-messageformat-parser';\nimport { MissingValueError, InvalidValueError, ErrorCode, FormatError, InvalidValueTypeError, } from './error';\nexport var PART_TYPE;\n(function (PART_TYPE) {\n PART_TYPE[PART_TYPE[\"literal\"] = 0] = \"literal\";\n PART_TYPE[PART_TYPE[\"object\"] = 1] = \"object\";\n})(PART_TYPE || (PART_TYPE = {}));\nfunction mergeLiteral(parts) {\n if (parts.length < 2) {\n return parts;\n }\n return parts.reduce(function (all, part) {\n var lastPart = all[all.length - 1];\n if (!lastPart ||\n lastPart.type !== PART_TYPE.literal ||\n part.type !== PART_TYPE.literal) {\n all.push(part);\n }\n else {\n lastPart.value += part.value;\n }\n return all;\n }, []);\n}\nexport function isFormatXMLElementFn(el) {\n return typeof el === 'function';\n}\n// TODO(skeleton): add skeleton support\nexport function formatToParts(els, locales, formatters, formats, values, currentPluralValue, \n// For debugging\noriginalMessage) {\n // Hot path for straight simple msg translations\n if (els.length === 1 && isLiteralElement(els[0])) {\n return [\n {\n type: PART_TYPE.literal,\n value: els[0].value,\n },\n ];\n }\n var result = [];\n for (var _i = 0, els_1 = els; _i < els_1.length; _i++) {\n var el = els_1[_i];\n // Exit early for string parts.\n if (isLiteralElement(el)) {\n result.push({\n type: PART_TYPE.literal,\n value: el.value,\n });\n continue;\n }\n // TODO: should this part be literal type?\n // Replace `#` in plural rules with the actual numeric value.\n if (isPoundElement(el)) {\n if (typeof currentPluralValue === 'number') {\n result.push({\n type: PART_TYPE.literal,\n value: formatters.getNumberFormat(locales).format(currentPluralValue),\n });\n }\n continue;\n }\n var varName = el.value;\n // Enforce that all required values are provided by the caller.\n if (!(values && varName in values)) {\n throw new MissingValueError(varName, originalMessage);\n }\n var value = values[varName];\n if (isArgumentElement(el)) {\n if (!value || typeof value === 'string' || typeof value === 'number') {\n value =\n typeof value === 'string' || typeof value === 'number'\n ? String(value)\n : '';\n }\n result.push({\n type: typeof value === 'string' ? PART_TYPE.literal : PART_TYPE.object,\n value: value,\n });\n continue;\n }\n // Recursively format plural and select parts' option — which can be a\n // nested pattern structure. The choosing of the option to use is\n // abstracted-by and delegated-to the part helper object.\n if (isDateElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.date[el.style]\n : isDateTimeSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getDateTimeFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isTimeElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.time[el.style]\n : isDateTimeSkeleton(el.style)\n ? el.style.parsedOptions\n : formats.time.medium;\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getDateTimeFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isNumberElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.number[el.style]\n : isNumberSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n if (style && style.scale) {\n value =\n value *\n (style.scale || 1);\n }\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getNumberFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isTagElement(el)) {\n var children = el.children, value_1 = el.value;\n var formatFn = values[value_1];\n if (!isFormatXMLElementFn(formatFn)) {\n throw new InvalidValueTypeError(value_1, 'function', originalMessage);\n }\n var parts = formatToParts(children, locales, formatters, formats, values, currentPluralValue);\n var chunks = formatFn(parts.map(function (p) { return p.value; }));\n if (!Array.isArray(chunks)) {\n chunks = [chunks];\n }\n result.push.apply(result, chunks.map(function (c) {\n return {\n type: typeof c === 'string' ? PART_TYPE.literal : PART_TYPE.object,\n value: c,\n };\n }));\n }\n if (isSelectElement(el)) {\n var opt = el.options[value] || el.options.other;\n if (!opt) {\n throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n }\n result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values));\n continue;\n }\n if (isPluralElement(el)) {\n var opt = el.options[\"=\".concat(value)];\n if (!opt) {\n if (!Intl.PluralRules) {\n throw new FormatError(\"Intl.PluralRules is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-pluralrules\\\"\\n\", ErrorCode.MISSING_INTL_API, originalMessage);\n }\n var rule = formatters\n .getPluralRules(locales, { type: el.pluralType })\n .select(value - (el.offset || 0));\n opt = el.options[rule] || el.options.other;\n }\n if (!opt) {\n throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n }\n result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values, value - (el.offset || 0)));\n continue;\n }\n }\n return mergeLiteral(result);\n}\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\nimport { __assign, __spreadArray } from \"tslib\";\nimport { parse } from '@formatjs/icu-messageformat-parser';\nimport memoize, { strategies } from '@formatjs/fast-memoize';\nimport { formatToParts, PART_TYPE, } from './formatters';\n// -- MessageFormat --------------------------------------------------------\nfunction mergeConfig(c1, c2) {\n if (!c2) {\n return c1;\n }\n return __assign(__assign(__assign({}, (c1 || {})), (c2 || {})), Object.keys(c1).reduce(function (all, k) {\n all[k] = __assign(__assign({}, c1[k]), (c2[k] || {}));\n return all;\n }, {}));\n}\nfunction mergeConfigs(defaultConfig, configs) {\n if (!configs) {\n return defaultConfig;\n }\n return Object.keys(defaultConfig).reduce(function (all, k) {\n all[k] = mergeConfig(defaultConfig[k], configs[k]);\n return all;\n }, __assign({}, defaultConfig));\n}\nfunction createFastMemoizeCache(store) {\n return {\n create: function () {\n return {\n get: function (key) {\n return store[key];\n },\n set: function (key, value) {\n store[key] = value;\n },\n };\n },\n };\n}\nfunction createDefaultFormatters(cache) {\n if (cache === void 0) { cache = {\n number: {},\n dateTime: {},\n pluralRules: {},\n }; }\n return {\n getNumberFormat: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.number),\n strategy: strategies.variadic,\n }),\n getDateTimeFormat: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.dateTime),\n strategy: strategies.variadic,\n }),\n getPluralRules: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.pluralRules),\n strategy: strategies.variadic,\n }),\n };\n}\nvar IntlMessageFormat = /** @class */ (function () {\n function IntlMessageFormat(message, locales, overrideFormats, opts) {\n var _this = this;\n if (locales === void 0) { locales = IntlMessageFormat.defaultLocale; }\n this.formatterCache = {\n number: {},\n dateTime: {},\n pluralRules: {},\n };\n this.format = function (values) {\n var parts = _this.formatToParts(values);\n // Hot path for straight simple msg translations\n if (parts.length === 1) {\n return parts[0].value;\n }\n var result = parts.reduce(function (all, part) {\n if (!all.length ||\n part.type !== PART_TYPE.literal ||\n typeof all[all.length - 1] !== 'string') {\n all.push(part.value);\n }\n else {\n all[all.length - 1] += part.value;\n }\n return all;\n }, []);\n if (result.length <= 1) {\n return result[0] || '';\n }\n return result;\n };\n this.formatToParts = function (values) {\n return formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, undefined, _this.message);\n };\n this.resolvedOptions = function () { return ({\n locale: _this.resolvedLocale.toString(),\n }); };\n this.getAst = function () { return _this.ast; };\n // Defined first because it's used to build the format pattern.\n this.locales = locales;\n this.resolvedLocale = IntlMessageFormat.resolveLocale(locales);\n if (typeof message === 'string') {\n this.message = message;\n if (!IntlMessageFormat.__parse) {\n throw new TypeError('IntlMessageFormat.__parse must be set to process `message` of type `string`');\n }\n // Parse string messages into an AST.\n this.ast = IntlMessageFormat.__parse(message, {\n ignoreTag: opts === null || opts === void 0 ? void 0 : opts.ignoreTag,\n locale: this.resolvedLocale,\n });\n }\n else {\n this.ast = message;\n }\n if (!Array.isArray(this.ast)) {\n throw new TypeError('A message must be provided as a String or AST.');\n }\n // Creates a new object with the specified `formats` merged with the default\n // formats.\n this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);\n this.formatters =\n (opts && opts.formatters) || createDefaultFormatters(this.formatterCache);\n }\n Object.defineProperty(IntlMessageFormat, \"defaultLocale\", {\n get: function () {\n if (!IntlMessageFormat.memoizedDefaultLocale) {\n IntlMessageFormat.memoizedDefaultLocale =\n new Intl.NumberFormat().resolvedOptions().locale;\n }\n return IntlMessageFormat.memoizedDefaultLocale;\n },\n enumerable: false,\n configurable: true\n });\n IntlMessageFormat.memoizedDefaultLocale = null;\n IntlMessageFormat.resolveLocale = function (locales) {\n var supportedLocales = Intl.NumberFormat.supportedLocalesOf(locales);\n if (supportedLocales.length > 0) {\n return new Intl.Locale(supportedLocales[0]);\n }\n return new Intl.Locale(typeof locales === 'string' ? locales : locales[0]);\n };\n IntlMessageFormat.__parse = parse;\n // Default format options used as the prototype of the `formats` provided to the\n // constructor. These are used when constructing the internal Intl.NumberFormat\n // and Intl.DateTimeFormat instances.\n IntlMessageFormat.formats = {\n number: {\n integer: {\n maximumFractionDigits: 0,\n },\n currency: {\n style: 'currency',\n },\n percent: {\n style: 'percent',\n },\n },\n date: {\n short: {\n month: 'numeric',\n day: 'numeric',\n year: '2-digit',\n },\n medium: {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n },\n long: {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n full: {\n weekday: 'long',\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n },\n time: {\n short: {\n hour: 'numeric',\n minute: 'numeric',\n },\n medium: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n },\n long: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short',\n },\n full: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short',\n },\n },\n };\n return IntlMessageFormat;\n}());\nexport { IntlMessageFormat };\n","import { writable, derived } from 'svelte/store';\nimport deepmerge from 'deepmerge';\nimport { IntlMessageFormat } from 'intl-messageformat';\n\nfunction delve(obj, fullKey) {\n if (fullKey == null)\n return void 0;\n if (fullKey in obj) {\n return obj[fullKey];\n }\n const keys = fullKey.split(\".\");\n let result = obj;\n for (let p = 0; p < keys.length; p++) {\n if (typeof result === \"object\") {\n if (p > 0) {\n const partialKey = keys.slice(p, keys.length).join(\".\");\n if (partialKey in result) {\n result = result[partialKey];\n break;\n }\n }\n result = result[keys[p]];\n } else {\n result = void 0;\n }\n }\n return result;\n}\n\nconst lookupCache = {};\nconst addToCache = (path, locale, message) => {\n if (!message)\n return message;\n if (!(locale in lookupCache))\n lookupCache[locale] = {};\n if (!(path in lookupCache[locale]))\n lookupCache[locale][path] = message;\n return message;\n};\nconst lookup = (path, refLocale) => {\n if (refLocale == null)\n return void 0;\n if (refLocale in lookupCache && path in lookupCache[refLocale]) {\n return lookupCache[refLocale][path];\n }\n const locales = getPossibleLocales(refLocale);\n for (let i = 0; i < locales.length; i++) {\n const locale = locales[i];\n const message = getMessageFromDictionary(locale, path);\n if (message) {\n return addToCache(path, refLocale, message);\n }\n }\n return void 0;\n};\n\nlet dictionary;\nconst $dictionary = writable({});\nfunction getLocaleDictionary(locale) {\n return dictionary[locale] || null;\n}\nfunction hasLocaleDictionary(locale) {\n return locale in dictionary;\n}\nfunction getMessageFromDictionary(locale, id) {\n if (!hasLocaleDictionary(locale)) {\n return null;\n }\n const localeDictionary = getLocaleDictionary(locale);\n const match = delve(localeDictionary, id);\n return match;\n}\nfunction getClosestAvailableLocale(refLocale) {\n if (refLocale == null)\n return void 0;\n const relatedLocales = getPossibleLocales(refLocale);\n for (let i = 0; i < relatedLocales.length; i++) {\n const locale = relatedLocales[i];\n if (hasLocaleDictionary(locale)) {\n return locale;\n }\n }\n return void 0;\n}\nfunction addMessages(locale, ...partials) {\n delete lookupCache[locale];\n $dictionary.update((d) => {\n d[locale] = deepmerge.all([d[locale] || {}, ...partials]);\n return d;\n });\n}\nconst $locales = derived(\n [$dictionary],\n ([dictionary2]) => Object.keys(dictionary2)\n);\n$dictionary.subscribe((newDictionary) => dictionary = newDictionary);\n\nconst queue = {};\nfunction createLocaleQueue(locale) {\n queue[locale] = /* @__PURE__ */ new Set();\n}\nfunction removeLoaderFromQueue(locale, loader) {\n queue[locale].delete(loader);\n if (queue[locale].size === 0) {\n delete queue[locale];\n }\n}\nfunction getLocaleQueue(locale) {\n return queue[locale];\n}\nfunction getLocalesQueues(locale) {\n return getPossibleLocales(locale).map((localeItem) => {\n const localeQueue = getLocaleQueue(localeItem);\n return [localeItem, localeQueue ? [...localeQueue] : []];\n }).filter(([, localeQueue]) => localeQueue.length > 0);\n}\nfunction hasLocaleQueue(locale) {\n if (locale == null)\n return false;\n return getPossibleLocales(locale).some(\n (localeQueue) => {\n var _a;\n return (_a = getLocaleQueue(localeQueue)) == null ? void 0 : _a.size;\n }\n );\n}\nfunction loadLocaleQueue(locale, localeQueue) {\n const allLoadersPromise = Promise.all(\n localeQueue.map((loader) => {\n removeLoaderFromQueue(locale, loader);\n return loader().then((partial) => partial.default || partial);\n })\n );\n return allLoadersPromise.then((partials) => addMessages(locale, ...partials));\n}\nconst activeFlushes = {};\nfunction flush(locale) {\n if (!hasLocaleQueue(locale)) {\n if (locale in activeFlushes) {\n return activeFlushes[locale];\n }\n return Promise.resolve();\n }\n const queues = getLocalesQueues(locale);\n activeFlushes[locale] = Promise.all(\n queues.map(\n ([localeName, localeQueue]) => loadLocaleQueue(localeName, localeQueue)\n )\n ).then(() => {\n if (hasLocaleQueue(locale)) {\n return flush(locale);\n }\n delete activeFlushes[locale];\n });\n return activeFlushes[locale];\n}\nfunction registerLocaleLoader(locale, loader) {\n if (!getLocaleQueue(locale))\n createLocaleQueue(locale);\n const localeQueue = getLocaleQueue(locale);\n if (getLocaleQueue(locale).has(loader))\n return;\n if (!hasLocaleDictionary(locale)) {\n $dictionary.update((d) => {\n d[locale] = {};\n return d;\n });\n }\n localeQueue.add(loader);\n}\n\nvar __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$2 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$2 = Object.prototype.propertyIsEnumerable;\nvar __objRest$1 = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp$2.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols$2)\n for (var prop of __getOwnPropSymbols$2(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum$2.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nconst defaultFormats = {\n number: {\n scientific: { notation: \"scientific\" },\n engineering: { notation: \"engineering\" },\n compactLong: { notation: \"compact\", compactDisplay: \"long\" },\n compactShort: { notation: \"compact\", compactDisplay: \"short\" }\n },\n date: {\n short: { month: \"numeric\", day: \"numeric\", year: \"2-digit\" },\n medium: { month: \"short\", day: \"numeric\", year: \"numeric\" },\n long: { month: \"long\", day: \"numeric\", year: \"numeric\" },\n full: { weekday: \"long\", month: \"long\", day: \"numeric\", year: \"numeric\" }\n },\n time: {\n short: { hour: \"numeric\", minute: \"numeric\" },\n medium: { hour: \"numeric\", minute: \"numeric\", second: \"numeric\" },\n long: {\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\",\n timeZoneName: \"short\"\n },\n full: {\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\",\n timeZoneName: \"short\"\n }\n }\n};\nfunction defaultMissingKeyHandler({ locale, id }) {\n console.warn(\n `[svelte-i18n] The message \"${id}\" was not found in \"${getPossibleLocales(\n locale\n ).join('\", \"')}\".${hasLocaleQueue(getCurrentLocale()) ? `\n\nNote: there are at least one loader still registered to this locale that wasn't executed.` : \"\"}`\n );\n}\nconst defaultOptions = {\n fallbackLocale: null,\n loadingDelay: 200,\n formats: defaultFormats,\n warnOnMissingMessages: true,\n handleMissingMessage: void 0,\n ignoreTag: true\n};\nconst options = defaultOptions;\nfunction getOptions() {\n return options;\n}\nfunction init(opts) {\n const _a = opts, { formats } = _a, rest = __objRest$1(_a, [\"formats\"]);\n let initialLocale = opts.fallbackLocale;\n if (opts.initialLocale) {\n try {\n if (IntlMessageFormat.resolveLocale(opts.initialLocale)) {\n initialLocale = opts.initialLocale;\n }\n } catch (e) {\n console.warn(\n `[svelte-i18n] The initial locale \"${opts.initialLocale}\" is not a valid locale.`\n );\n }\n }\n if (rest.warnOnMissingMessages) {\n delete rest.warnOnMissingMessages;\n if (rest.handleMissingMessage == null) {\n rest.handleMissingMessage = defaultMissingKeyHandler;\n } else {\n console.warn(\n '[svelte-i18n] The \"warnOnMissingMessages\" option is deprecated. Please use the \"handleMissingMessage\" option instead.'\n );\n }\n }\n Object.assign(options, rest, { initialLocale });\n if (formats) {\n if (\"number\" in formats) {\n Object.assign(options.formats.number, formats.number);\n }\n if (\"date\" in formats) {\n Object.assign(options.formats.date, formats.date);\n }\n if (\"time\" in formats) {\n Object.assign(options.formats.time, formats.time);\n }\n }\n return $locale.set(initialLocale);\n}\n\nconst $isLoading = writable(false);\n\nvar __defProp$1 = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;\nvar __hasOwnProp$1 = Object.prototype.hasOwnProperty;\nvar __propIsEnum$1 = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues$1 = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n if (__getOwnPropSymbols$1)\n for (var prop of __getOwnPropSymbols$1(b)) {\n if (__propIsEnum$1.call(b, prop))\n __defNormalProp$1(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nlet current;\nconst internalLocale = writable(null);\nfunction getSubLocales(refLocale) {\n return refLocale.split(\"-\").map((_, i, arr) => arr.slice(0, i + 1).join(\"-\")).reverse();\n}\nfunction getPossibleLocales(refLocale, fallbackLocale = getOptions().fallbackLocale) {\n const locales = getSubLocales(refLocale);\n if (fallbackLocale) {\n return [.../* @__PURE__ */ new Set([...locales, ...getSubLocales(fallbackLocale)])];\n }\n return locales;\n}\nfunction getCurrentLocale() {\n return current != null ? current : void 0;\n}\ninternalLocale.subscribe((newLocale) => {\n current = newLocale != null ? newLocale : void 0;\n if (typeof window !== \"undefined\" && newLocale != null) {\n document.documentElement.setAttribute(\"lang\", newLocale);\n }\n});\nconst set = (newLocale) => {\n if (newLocale && getClosestAvailableLocale(newLocale) && hasLocaleQueue(newLocale)) {\n const { loadingDelay } = getOptions();\n let loadingTimer;\n if (typeof window !== \"undefined\" && getCurrentLocale() != null && loadingDelay) {\n loadingTimer = window.setTimeout(\n () => $isLoading.set(true),\n loadingDelay\n );\n } else {\n $isLoading.set(true);\n }\n return flush(newLocale).then(() => {\n internalLocale.set(newLocale);\n }).finally(() => {\n clearTimeout(loadingTimer);\n $isLoading.set(false);\n });\n }\n return internalLocale.set(newLocale);\n};\nconst $locale = __spreadProps(__spreadValues$1({}, internalLocale), {\n set\n});\n\nconst getFromQueryString = (queryString, key) => {\n const keyVal = queryString.split(\"&\").find((i) => i.indexOf(`${key}=`) === 0);\n if (keyVal) {\n return keyVal.split(\"=\").pop();\n }\n return null;\n};\nconst getFirstMatch = (base, pattern) => {\n const match = pattern.exec(base);\n if (!match)\n return null;\n return match[1] || null;\n};\nconst getLocaleFromHostname = (hostname) => {\n if (typeof window === \"undefined\")\n return null;\n return getFirstMatch(window.location.hostname, hostname);\n};\nconst getLocaleFromPathname = (pathname) => {\n if (typeof window === \"undefined\")\n return null;\n return getFirstMatch(window.location.pathname, pathname);\n};\nconst getLocaleFromNavigator = () => {\n if (typeof window === \"undefined\")\n return null;\n return window.navigator.language || window.navigator.languages[0];\n};\nconst getLocaleFromQueryString = (search) => {\n if (typeof window === \"undefined\")\n return null;\n return getFromQueryString(window.location.search.substr(1), search);\n};\nconst getLocaleFromHash = (hash) => {\n if (typeof window === \"undefined\")\n return null;\n return getFromQueryString(window.location.hash.substr(1), hash);\n};\n\nconst monadicMemoize = (fn) => {\n const cache = /* @__PURE__ */ Object.create(null);\n const memoizedFn = (arg) => {\n const cacheKey = JSON.stringify(arg);\n if (cacheKey in cache) {\n return cache[cacheKey];\n }\n return cache[cacheKey] = fn(arg);\n };\n return memoizedFn;\n};\n\nvar __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nconst getIntlFormatterOptions = (type, name) => {\n const { formats } = getOptions();\n if (type in formats && name in formats[type]) {\n return formats[type][name];\n }\n throw new Error(`[svelte-i18n] Unknown \"${name}\" ${type} format.`);\n};\nconst createNumberFormatter = monadicMemoize(\n (_a) => {\n var _b = _a, { locale, format } = _b, options = __objRest(_b, [\"locale\", \"format\"]);\n if (locale == null) {\n throw new Error('[svelte-i18n] A \"locale\" must be set to format numbers');\n }\n if (format) {\n options = getIntlFormatterOptions(\"number\", format);\n }\n return new Intl.NumberFormat(locale, options);\n }\n);\nconst createDateFormatter = monadicMemoize(\n (_c) => {\n var _d = _c, { locale, format } = _d, options = __objRest(_d, [\"locale\", \"format\"]);\n if (locale == null) {\n throw new Error('[svelte-i18n] A \"locale\" must be set to format dates');\n }\n if (format) {\n options = getIntlFormatterOptions(\"date\", format);\n } else if (Object.keys(options).length === 0) {\n options = getIntlFormatterOptions(\"date\", \"short\");\n }\n return new Intl.DateTimeFormat(locale, options);\n }\n);\nconst createTimeFormatter = monadicMemoize(\n (_e) => {\n var _f = _e, { locale, format } = _f, options = __objRest(_f, [\"locale\", \"format\"]);\n if (locale == null) {\n throw new Error(\n '[svelte-i18n] A \"locale\" must be set to format time values'\n );\n }\n if (format) {\n options = getIntlFormatterOptions(\"time\", format);\n } else if (Object.keys(options).length === 0) {\n options = getIntlFormatterOptions(\"time\", \"short\");\n }\n return new Intl.DateTimeFormat(locale, options);\n }\n);\nconst getNumberFormatter = (_g = {}) => {\n var _h = _g, {\n locale = getCurrentLocale()\n } = _h, args = __objRest(_h, [\n \"locale\"\n ]);\n return createNumberFormatter(__spreadValues({ locale }, args));\n};\nconst getDateFormatter = (_i = {}) => {\n var _j = _i, {\n locale = getCurrentLocale()\n } = _j, args = __objRest(_j, [\n \"locale\"\n ]);\n return createDateFormatter(__spreadValues({ locale }, args));\n};\nconst getTimeFormatter = (_k = {}) => {\n var _l = _k, {\n locale = getCurrentLocale()\n } = _l, args = __objRest(_l, [\n \"locale\"\n ]);\n return createTimeFormatter(__spreadValues({ locale }, args));\n};\nconst getMessageFormatter = monadicMemoize(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n (message, locale = getCurrentLocale()) => new IntlMessageFormat(message, locale, getOptions().formats, {\n ignoreTag: getOptions().ignoreTag\n })\n);\n\nconst formatMessage = (id, options = {}) => {\n var _a, _b, _c, _d;\n let messageObj = options;\n if (typeof id === \"object\") {\n messageObj = id;\n id = messageObj.id;\n }\n const {\n values,\n locale = getCurrentLocale(),\n default: defaultValue\n } = messageObj;\n if (locale == null) {\n throw new Error(\n \"[svelte-i18n] Cannot format a message without first setting the initial locale.\"\n );\n }\n let message = lookup(id, locale);\n if (!message) {\n message = (_d = (_c = (_b = (_a = getOptions()).handleMissingMessage) == null ? void 0 : _b.call(_a, { locale, id, defaultValue })) != null ? _c : defaultValue) != null ? _d : id;\n } else if (typeof message !== \"string\") {\n console.warn(\n `[svelte-i18n] Message with id \"${id}\" must be of type \"string\", found: \"${typeof message}\". Gettin its value through the \"$format\" method is deprecated; use the \"json\" method instead.`\n );\n return message;\n }\n if (!values) {\n return message;\n }\n let result = message;\n try {\n result = getMessageFormatter(message, locale).format(values);\n } catch (e) {\n if (e instanceof Error) {\n console.warn(\n `[svelte-i18n] Message \"${id}\" has syntax error:`,\n e.message\n );\n }\n }\n return result;\n};\nconst formatTime = (t, options) => {\n return getTimeFormatter(options).format(t);\n};\nconst formatDate = (d, options) => {\n return getDateFormatter(options).format(d);\n};\nconst formatNumber = (n, options) => {\n return getNumberFormatter(options).format(n);\n};\nconst getJSON = (id, locale = getCurrentLocale()) => {\n return lookup(id, locale);\n};\nconst $format = derived([$locale, $dictionary], () => formatMessage);\nconst $formatTime = derived([$locale], () => formatTime);\nconst $formatDate = derived([$locale], () => formatDate);\nconst $formatNumber = derived([$locale], () => formatNumber);\nconst $getJSON = derived([$locale, $dictionary], () => getJSON);\n\nfunction unwrapFunctionStore(store) {\n let localReference;\n const cancel = store.subscribe((value) => localReference = value);\n const fn = (...args) => localReference(...args);\n fn.freeze = cancel;\n return fn;\n}\n\nfunction defineMessages(i) {\n return i;\n}\nfunction waitLocale(locale) {\n return flush(locale || getCurrentLocale() || getOptions().initialLocale);\n}\n\nexport { $format as _, addMessages, $formatDate as date, defineMessages, $dictionary as dictionary, $format as format, getDateFormatter, getLocaleFromHash, getLocaleFromHostname, getLocaleFromNavigator, getLocaleFromPathname, getLocaleFromQueryString, getMessageFormatter, getNumberFormatter, getTimeFormatter, init, $isLoading as isLoading, $getJSON as json, $locale as locale, $locales as locales, $formatNumber as number, registerLocaleLoader as register, $format as t, $formatTime as time, unwrapFunctionStore, waitLocale };\n","'use strict';\n\nimport fetch from 'isomorphic-fetch';\nimport { topic } from './communication';\nexport { _, setupI18n } from './i18n';\n\nconst REQUEST_STATUS_SUCCESS = 'success';\nconst REQUEST_STATUS_ERROR = 'error';\n\nconst outgoingRequests = {};\nconst cacheStore = {};\nconst outgoingRequestsParsedBody = {};\n\nwindow.emWidgets = { topic };\n\nconst resType = 'json';\n\nconst getResponseFromCache = (cacheKey) => {\n return new Promise((resolve, reject) => {\n if (cacheStore[cacheKey] && cacheStore[cacheKey].response) {\n return resolve(cacheStore[cacheKey].response);\n }\n\n return reject(new Error(`Unable to access cache for: ${cacheStore[cacheKey]}`));\n });\n}\n\nconst checkStatus = (response) => {\n if (response.status < 200 || response.status >= 400) {\n // TODO we need a global error handler here\n throw new Error(`Error on request \"${response.url}\" (${response.status}: ${response.statusText})`);\n }\n\n return response;\n}\n\nconst storeResponseInCache = (res, cacheKey) => {\n delete outgoingRequestsParsedBody[cacheKey];\n\n cacheStore[cacheKey] = {\n response: res\n };\n\n return cacheStore[cacheKey].response;\n}\n\n// Internal use only\nconst validateFields = (config, required_fields, optional_fields, null_valid, zero_valid, empty_valid) => {\n let invalid_fields = [];\n let isOptional = false;\n\n required_fields.forEach((field) => {\n if (optional_fields.includes(field)) {\n isOptional = true;\n }\n\n if (field in config) {\n switch (config[field]) {\n case undefined:\n if (isOptional) {\n console.warn(field + ' exists but is undefined!');\n } else {\n console.error(field + ' exists but is undefined!');\n\n invalid_fields.push(field);\n }\n\n break;\n\n case '':\n if (isOptional) {\n console.warn(field + ' exists but is empty!');\n } else {\n console.error(field + ' exists but is empty!');\n\n if (empty_valid) {\n invalid_fields.push(field);\n }\n }\n\n break;\n\n case null:\n if (isOptional) {\n console.warn(field + ' exists but is null');\n } else {\n console.error(field + ' exists but is null');\n\n if (null_valid) {\n invalid_fields.push(field);\n }\n }\n\n break;\n\n case 0:\n if (isOptional) {\n console.warn(field + ' exists and the value is 0');\n } else {\n console.error(field + ' exists and the value is 0');\n\n if (zero_valid) {\n invalid_fields.push(field);\n }\n }\n\n break;\n\n default:\n // Nothing to do here :)\n break;\n }\n } else {\n console.error(field + \" doesn't exist in ConfigObject\");\n\n invalid_fields.push(field);\n }\n });\n\n return invalid_fields;\n}\n\n// start update section - recursively update customOperator object with data provided by client\nconst updateCustomOperatorObj = (targetObj, updateObj) => {\n for (let [key,value] of Object.entries(updateObj)) {\n // if targetObj has the relevant key and the type in targetObj and updateObj is the same\n if (targetObj.hasOwnProperty(key) && typeof(value) === typeof(targetObj[key])) {\n // update value if string,number or boolean\n if (['string','number','boolean'].includes(typeof value) || Array.isArray(value)) {\n targetObj[key] = value;\n } else {\n // if type is object then go one level deeper\n if (typeof value === 'object') {\n updateCustomOperatorObj(targetObj[key], value);\n }\n }\n }\n }\n}\n\n/**\n * @name xhrFetch\n * @description An overlay over fetch method to allow caching\n * @param url String - The URL you want to query\n * @param options Object -\n method(String): GET/POST/PUT/DELETE\n headers(Object): Request header params\n body(Object): Request body params\n @param cache Boolean - Variable to tell XHRFetch to cache or not the request\n*/\nexport const xhrFetch = (url, options = {}, cache = true) => {\n const cacheKey = `${url}`;\n const {\n method = 'GET',\n headers = {},\n body = {}\n } = options;\n const reqHeaders = new Headers();\n\n Object.keys(headers).forEach((item) => {\n reqHeaders.append(item, headers[item]);\n });\n\n reqHeaders.append('accept', 'application/json');\n reqHeaders.append('Content-Type', 'application/json');\n\n const reqOpts = {\n method,\n headers: reqHeaders\n };\n\n if (method === 'POST' || method === 'PUT') {\n reqOpts.body = JSON.stringify(body);\n }\n\n const request = new Request(url, reqOpts);\n\n let fetchPromise;\n\n if (cache === true && cacheStore[cacheKey]) {\n return getResponseFromCache(cacheKey);\n }\n\n if (outgoingRequests[cacheKey]) {\n fetchPromise = outgoingRequests[cacheKey];\n } else {\n fetchPromise = fetch(request);\n\n outgoingRequests[cacheKey] = fetchPromise;\n }\n\n return fetchPromise\n .then(checkStatus)\n .catch((err) => {\n return Promise.reject(err);\n })\n .then((res) => {\n delete outgoingRequests[cacheKey];\n\n if (!res.bodyUsed) {\n outgoingRequestsParsedBody[cacheKey] = res[resType]();\n }\n\n return outgoingRequestsParsedBody[cacheKey];\n })\n .then((res) => {\n return storeResponseInCache(res, cacheKey);\n });\n}\n\n/**\n * @name isMobile\n * @description A method that returns if the browser used to access the app is from a mobile device or not\n * @param {String} userAgent window.navigator.userAgent\n * @returns {Boolean} true or false\n */\nexport const isMobile = (userAgent) => {\n return !!(\n userAgent.toLowerCase().match(/android/i) ||\n userAgent.toLowerCase().match(/blackberry|bb/i) ||\n userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||\n userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)\n );\n}\n\n/**\n * @name getDevice\n * @description A method that returns the type of the device\n * @param {String} userAgent window.navigator.userAgent\n * @returns {String} Android/iPhone/iPad/PC\n */\nexport const getDevice = (userAgent) => {\n if (userAgent.toLowerCase().match(/android/i)) {\n return 'Android';\n }\n\n if (userAgent.toLowerCase().match(/iphone/i)) {\n return 'iPhone';\n }\n\n if (userAgent.toLowerCase().match(/ipad|ipod/i)) {\n return 'iPad';\n }\n\n return 'PC';\n}\n\n/**\n * @name checkConfig\n * @description\n * @param\n * @returns {Boolean} true or false\n */\nexport const checkConfig = (config) => {\n // fields to validate\n let fields = ['endpointURL', 'dataSource'];\n let optional = ['dataSource'];\n let invalid = validateFields(config, fields, optional, true, true, true);\n\n if (invalid.length > 0) {\n return false;\n }\n\n return true;\n}\n\n/**\n * @name getCustomOperatorData\n * @description This should be deprecated\n * @param\n * @returns {Object}\n */\nexport const getCustomOperatorData = () => {\n updateCustomOperatorObj(customOperator, window.widgetConfig);\n\n return customOperator;\n}\n\n// separate favorites array into mobile and desktop favorites\nexport function platformFavorite(initialArray, updatedArray) {\n let userAgent = window.navigator.userAgent;\n // make sure to display favored games specific to the platform used\n if (isMobile(userAgent)) {\n updatedArray = initialArray.filter(favItem => {\n if (favItem.gameModel) {\n if (favItem.gameModel.platform.includes(\"iPad\") || favItem.gameModel.platform.includes(\"iPhone\") || favItem.gameModel.platform.includes(\"Android\")) {\n return favItem;\n }\n }\n });\n } else {\n updatedArray = initialArray.filter(favItem => {\n if (favItem.gameModel) {\n if (favItem.gameModel.platform.includes(\"PC\")) {\n return favItem;\n }\n }\n });\n }\n return updatedArray;\n}\n\nexport function checkSession(endpoint, session) {\n return new Promise((resolve, reject) => {\n let reqHeaders = new Headers();\n\n reqHeaders.append('X-SessionID', session);\n\n let options = {\n method: 'GET',\n headers: reqHeaders\n };\n\n fetch(`${endpoint}/v1/player/session/player`, options)\n .then((res) => res.json())\n .then((data) => resolve(data))\n .catch((err) => reject(err));\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', // <input type=\"datetime-local\" />\n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type=\"datetime-local\" step=\"1\" />\n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type=\"datetime-local\" step=\"0.001\" />\n DATE: 'YYYY-MM-DD', // <input type=\"date\" />\n TIME: 'HH:mm', // <input type=\"time\" />\n TIME_SECONDS: 'HH:mm:ss', // <input type=\"time\" step=\"1\" />\n TIME_MS: 'HH:mm:ss.SSS', // <input type=\"time\" step=\"0.001\" />\n WEEK: 'GGGG-[W]WW', // <input type=\"week\" />\n MONTH: 'YYYY-MM', // <input type=\"month\" />\n };\n\n return hooks;\n\n})));\n","import {\n dictionary,\n locale,\n addMessages,\n _\n} from 'svelte-i18n';\n\nfunction setupI18n({ withLocale: _locale, translations }) {\n locale.subscribe((data) => {\n if (data == null) {\n dictionary.set(translations);\n locale.set(_locale);\n }\n }); // maybe we will need this to make sure that the i18n is set up only once\n /*dictionary.set(translations);\n locale.set(_locale);*/\n}\n\nfunction addNewMessages(lang, dict) {\n addMessages(lang, dict);\n}\n\nfunction setLocale(_locale) {\n locale.set(_locale);\n}\n\nexport { _, setupI18n, addNewMessages, setLocale };\n","export const TRANSLATIONS = {\n \"en\": {\n \"date\": \"Granted date:\",\n \"bonusName\": \"Bonus Name\",\n \"bonusType\": \"Bonus Type\",\n \"bonusAmount\": \"Bonus Amount\",\n \"wageringAmount\": \"Wagering Progress (Rollover)\",\n \"remainingBonus\": \"Current Bonus Balance\",\n \"forfeitBonus\": \"Forfeit Bonus\",\n \"active\": \"active\",\n \"released\": \"released\",\n \"expired\": \"expired\",\n \"forfeited\": \"forfeited\",\n \"closed\": \"closed\"\n },\n \"zh-hk\": {\n \"date\": \"授予日期:\",\n \"bonusName\": \"獎金名稱\",\n \"bonusType\": \"獎金類型\",\n \"bonusAmount\": \"獎金金額\",\n \"wageringAmount\": \"投注進展\",\n \"remainingBonus\": \"剩餘紅利金額\",\n \"forfeitBonus\": \"沒收獎金\",\n \"active\": \"active\",\n \"released\": \"released\",\n \"expired\": \"expired\",\n \"forfeited\": \"forfeited\",\n \"closed\": \"closed\"\n },\n \"fr\": {\n \"date\": \"Date d'attribution:\",\n \"bonusName\": \"Nom du bonus\",\n \"bonusType\": \"Type de bonus\",\n \"bonusAmount\": \"Montant du bonus\",\n \"wageringAmount\": \"Changer les progrès\",\n \"remainingBonus\": \"Montant du bonus restant\",\n \"forfeitBonus\": \"Supprimer le bonus\",\n \"active\": \"active\",\n \"released\": \"released\",\n \"expired\": \"expired\",\n \"forfeited\": \"forfeited\",\n \"closed\": \"fermé\"\n },\n \"ro\": {\n \"date\": \"Dată Alocare:\",\n \"bonusName\": \"Nume bonus\",\n \"bonusType\": \"Tip de bonus\",\n \"bonusAmount\": \"Sumă\",\n \"wageringAmount\": \"Progresul de pariere\",\n \"remainingBonus\": \"Bonus rămas\",\n \"forfeitBonus\": \"Anulează bonusul\",\n \"active\": \"active\",\n \"released\": \"released\",\n \"expired\": \"expired\",\n \"forfeited\": \"forfeited\",\n \"closed\": \"închis\"\n },\n \"es\": {\n \"date\": \"Fecha de Canje\",\n \"bonusName\": \"Nombre de Bono\",\n \"bonusType\": \"Tipo de Bono\",\n \"bonusAmount\": \"Monto de Bono\",\n \"wageringAmount\": \"Progreso ( Rollover)\",\n \"remainingBonus\": \"Saldo Actual de Bono\",\n \"forfeitBonus\": \"cancelar bono\",\n \"active\": \"Activo\",\n \"released\": \"released\",\n \"expired\": \"expired\",\n \"forfeited\": \"forfeited\",\n \"closed\": \"cerrado\" \n },\n \"pt\": {\n \"date\": \"Data de atribuição do bônus:\",\n \"bonusName\": \"Nome do bônus\",\n \"bonusType\": \"Tipo de bônus\",\n \"bonusAmount\": \"Valor do bônus\",\n \"wageringAmount\": \"Progresso de apostas\",\n \"remainingBonus\": \"Valor do bônus restante\",\n \"forfeitBonus\": \"Bônus de Perda\",\n \"active\": \"active\",\n \"released\": \"released\",\n \"expired\": \"expired\",\n \"forfeited\": \"forfeited\",\n \"closed\": \"fechado\"\n },\n \"hr\": {\n \"date\": \"Datum:\",\n \"bonusName\": \"Ime bonusa\",\n \"bonusType\": \"Vrsta bonusa\",\n \"bonusAmount\": \"Iznos bonusa\",\n \"wageringAmount\": \"Odigravanje\",\n \"remainingBonus\": \"Trenutno stanje bonusa\",\n \"forfeitBonus\": \"Otkaži bonus\",\n \"active\": \"aktivan\",\n \"released\": \"razriješen\",\n \"expired\": \"Istekao\",\n \"forfeited\": \"otkazan\",\n \"closed\": \"Zatvoren\"\n },\n \"pt-br\": {\n \"date\": \"Data concedida:\",\n \"bonusName\": \"Nome do bônus:\",\n \"bonusType\": \"Tipo de bônus:\",\n \"bonusAmount\": \"Valor do bônus:\",\n \"wageringAmount\": \"Progresso da Quantidade de Apostas (Rollover)\",\n \"remainingBonus\": \"Saldo atual de bônus:\",\n \"forfeitBonus\": \"Recusar bônus\",\n \"active\": \"Ativo\",\n \"released\": \"Lançado\",\n \"expired\": \"Expirado\",\n \"forfeited\": \"Perdido\",\n \"closed\": \"fechado\"\n },\n \"es-mx\": {\n \"date\": \"Fecha concedida:\",\n \"bonusName\": \"Nombre de bono:\",\n \"bonusType\": \"Tipo de Bono:\",\n \"bonusAmount\": \"valor de Bono:\",\n \"wageringAmount\": \"Progreso de monto de apuestas (Rollover)\",\n \"remainingBonus\": \"Saldo de bono actual:\",\n \"forfeitBonus\": \"Declinar bono\",\n \"active\": \"Activo\",\n \"released\": \"Liberado\",\n \"expired\": \"Expirado\",\n \"forfeited\": \"Perdido\",\n \"closed\": \"cerrado\"\n },\n \"tr\": {\n \"date\": \"Verilen tarih:\",\n \"bonusName\": \"Bonus Adı\",\n \"bonusType\": \"Bonus Türü\",\n \"bonusAmount\": \"Bonus Tutarı\",\n \"wageringAmount\": \"Bahis İlerlemesi (Rollover)\",\n \"remainingBonus\": \"Mevcut Bonus Bakiyesi\",\n \"forfeitBonus\": \"Fesih Bonusu\",\n \"active\": \"aktif\",\n \"released\": \"piyasaya sürülmüş\",\n \"expired\": \"günü geçmiş\",\n \"forfeited\": \"kaybedilen\",\n \"closed\": \"kapalı\"\n }\n}","<svelte:options tag={null} />\n<script lang=\"ts\">\n import { getDevice } from 'rvhelper';\n import { _, addNewMessages, setLocale } from './i18n';\n import { TRANSLATIONS } from './translations';\n\n import moment from 'moment';\n\n export let bonuswalletid:string = '';\n export let bonusdate:string = '';\n export let bonusstatus:string = '';\n export let bonusname:string = '';\n export let bonustype:string = '';\n export let bonusamount:string = '';\n export let bonuswageringamount:string = '';\n export let bonusremainingamount:string = '';\n export let bonuscurrency:string = '';\n export let lang:string = 'en';\n export let clientstyling:string = '';\n export let clientstylingurl:string = '';\n export let translationurl:string = '';\n\n let customStylingContainer:HTMLElement;\n let userAgent:string = window.navigator.userAgent;\n let isMobile:boolean = (getDevice(userAgent) === 'PC') ? false : true;\n\n let bonusTypeText:string = '';\n\n const setTranslationUrl = ():void => {\n let url:string = translationurl;\n\n fetch(url).then((res:any) => res.json())\n .then((res) => {\n Object.keys(res).forEach((item:any):void => {\n addNewMessages(item, res[item]);\n });\n }).catch((err:any) => {\n console.log(err);\n });\n }\n\n\n Object.keys(TRANSLATIONS).forEach((item:any) => {\n addNewMessages(item, TRANSLATIONS[item]);\n });\n\n const bonusTypeRewrite = () => {\n bonusTypeText = bonustype;\n\n if (bonusTypeText === 'freeRound') {\n bonusTypeText = 'Free Spins';\n } else if (bonusTypeText === 'freeBet') {\n bonusTypeText = 'Free Bet';\n }\n }\n\n const deleteBonus = () => {\n window.postMessage({ type: 'DisableScroll'}, window.location.href);\n window.postMessage({ type: 'DeleteActiveBonus', bonuswalletid }, window.location.href);\n }\n\n const initialLoad = () => {\n setLocale(lang);\n }\n\n const setClientStyling = ():void => {\n let sheet:HTMLElement = document.createElement('style');\n sheet.innerHTML = clientstyling;\n customStylingContainer.appendChild(sheet);\n }\n\n const setClientStylingURL = ():void => {\n let url:URL = new URL(clientstylingurl);\n let cssFile:HTMLElement = document.createElement('style');\n\n fetch(url.href)\n .then((res:any) => res.text())\n .then((data:any) => {\n cssFile.innerHTML = data\n\n setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);\n });\n }\n\n $: lang && initialLoad();\n $: bonustype && bonusTypeRewrite();\n $: clientstylingurl && customStylingContainer && setClientStylingURL();\n $: clientstyling && customStylingContainer && setClientStyling();\n $: translationurl && setTranslationUrl();\n</script>\n\n<div class=\"BonusCard\" bind:this={customStylingContainer}>\n <div class=\"BonusCardInfo\">\n <div class=\"BonusCardRow\">\n <p class=\"BonusCardRowTitle\">{$_('date')} <span>{moment(bonusdate).format('DD/MM/YYYY h:mm A')}</span></p>\n <p class=\"BonusCardRowText BonusCardStatus TextCapitalize {bonusstatus === 'active' || bonusstatus === 'released' ? 'StatusActive' : ''} {bonusstatus === 'expired' ? 'StatusExpired' : ''} {bonusstatus === 'forfeited' ? 'StatusForfeited' : ''}\">{$_(`${bonusstatus}`)}</p>\n </div>\n <div class=\"BonusCardRow\">\n <p class=\"BonusCardRowTitle\">{$_('bonusName')}</p>\n <p class=\"BonusCardRowText\">{bonusname}</p>\n </div>\n <div class=\"BonusCardRow\">\n <p class=\"BonusCardRowTitle\">{$_('bonusType')}</p>\n <p class=\"BonusCardRowText TextCapitalize\">{bonusTypeText}</p>\n </div>\n {#if bonusamount}\n <div class=\"BonusCardRow\">\n <p class=\"BonusCardRowTitle\">{$_('bonusAmount')}</p>\n <p class=\"BonusCardRowText\">{bonusamount} {bonuscurrency}</p>\n </div>\n {/if}\n {#if bonuswageringamount}\n <div class=\"BonusCardRow\">\n <p class=\"BonusCardRowTitle\">{$_('wageringAmount')}</p>\n <p class=\"BonusCardRowText\">{bonuswageringamount} {bonuscurrency}</p>\n </div>\n {/if}\n {#if bonusremainingamount}\n <div class=\"BonusCardRow\">\n <p class=\"BonusCardRowTitle\">{$_('remainingBonus')}</p>\n <p class=\"BonusCardRowText\">{bonusremainingamount} {bonuscurrency}</p>\n </div>\n {/if}\n </div>\n {#if bonusstatus === 'active'}\n <button class=\"DeleteBonus {isMobile ? 'DeleteBonusMobile' : ''}\" on:click={deleteBonus}>{$_('forfeitBonus')}</button>\n {/if}\n</div>\n\n<style lang=\"scss\">\n\n\n\n .BonusCard {\n background-color: var(--emw--color-white, #FFFFFF);\n padding: 10px 20px 20px;\n border-radius: var(--emw--border-radius-large, 20px);\n box-shadow: 0px 5px 12px 5px var(--emw--color-gray-100, #E6E6E6);\n }\n\n .BonusCardRow {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 2px 10px;\n font-size: var(--emw--font-size-small, 14px);\n .BonusCardRowTitle {\n color: var(--emw--color-typography-cotrast, #444444);\n font-weight: var(--emw--font-weight-bold, 700);\n span {\n font-weight: var(--emw--font-weigh-normal, 400);\n color: var(--emw--color-gray-300, #58586B);\n }\n }\n .BonusCardRowText {\n color: var(--emw--color-gray-300, #58586B);\n &.BonusCardStatus {\n font-weight: var(--emw--font-weight-bold, 700);\n color: vvar(--emw--color-typography-cotrast, #444444);\n }\n &.StatusActive {\n color: var(--emw--color-valid, #48952a);\n }\n &.StatusExpired {\n color: var(--emw--color-error, #FD2839);\n }\n &.StatusForfeited {\n color: #fd8c2d;\n }\n &.TextCapitalize {\n text-transform: capitalize;\n }\n }\n &:nth-child(even) {\n background-color: var(--emw--color-gray-50, #F9F8F8);\n border-radius: var(--emw--border-radius-small, 5px);\n }\n }\n\n .DeleteBonus {\n background: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n border: 1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n color: var(--emw--button-typography, var(--emw--color-white, #FFFFFF));\n cursor: pointer;\n border-radius: var(--emw--border-radius-small, 5px);\n width: 50%;\n height: 44px;\n font-size: var(--emw--font-size-medium, 15px);\n text-transform: uppercase;\n text-align: center;\n transition-duration: 0.3s;\n box-sizing: border-box;\n padding: 10px;\n margin-top: 10px;\n &.DeleteBonusMobile {\n width: 100%;\n }\n &:active {\n background: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n }\n }\n</style>\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nexport function defineCustomElement(CustomElement) {\n const defined = customElements.get(CustomElement.is);\n if (!defined) {\n customElements.define(CustomElement.is, CustomElement);\n } else {\n const definedVersion = defined.version;\n if (definedVersion && CustomElement.version && definedVersion === CustomElement.version) {\n // Just loading the same thing again\n console.warn(`The component ${CustomElement.is} has been loaded twice`);\n } else {\n console.error(\n `Tried to define ${CustomElement.is} version ${CustomElement.version} when version ${defined.version} is already in use. Something will probably break.`,\n );\n }\n }\n}\n","import PlayerBonusCard from './PlayerBonusCard.svelte';\n\n!customElements.get('player-bonus-card') && customElements.define('player-bonus-card', PlayerBonusCard);\nexport default PlayerBonusCard;\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\n\n/**\n * Dummy custom element used for collecting\n * development time usage statistics.\n *\n * @private\n */\nclass Lumo extends HTMLElement {\n static get is() {\n return 'vaadin-lumo-styles';\n }\n\n static get version() {\n return '24.2.9';\n }\n}\n\ndefineCustomElement(Lumo);\n\nexport { Lumo };\n","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=window,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),n=new WeakMap;class o{constructor(t,e,n){if(this._$cssResult$=!0,n!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=n.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&n.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new o(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,s,n)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[n+1]),t[0]);return new o(n,t,s)},S=(s,n)=>{e?s.adoptedStyleSheets=n.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):n.forEach((e=>{const n=document.createElement(\"style\"),o=t.litNonce;void 0!==o&&n.setAttribute(\"nonce\",o),n.textContent=e.cssText,s.appendChild(n)}))},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{o as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as i}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var s;const e=window,r=e.trustedTypes,h=r?r.emptyScript:\"\",o=e.reactiveElementPolyfillSupport,n={toAttribute(t,i){switch(i){case Boolean:t=t?h:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,i){let s=t;switch(i){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},a=(t,i)=>i!==t&&(i==i||t==t),l={attribute:!0,type:String,converter:n,reflect:!1,hasChanged:a},d=\"finalized\";class u extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var i;this.finalize(),(null!==(i=this.h)&&void 0!==i?i:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((i,s)=>{const e=this._$Ep(s,i);void 0!==e&&(this._$Ev.set(e,s),t.push(e))})),t}static createProperty(t,i=l){if(i.state&&(i.attribute=!1),this.finalize(),this.elementProperties.set(t,i),!i.noAccessor&&!this.prototype.hasOwnProperty(t)){const s=\"symbol\"==typeof t?Symbol():\"__\"+t,e=this.getPropertyDescriptor(t,s,i);void 0!==e&&Object.defineProperty(this.prototype,t,e)}}static getPropertyDescriptor(t,i,s){return{get(){return this[i]},set(e){const r=this[t];this[i]=e,this.requestUpdate(t,r,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||l}static finalize(){if(this.hasOwnProperty(d))return!1;this[d]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty(\"properties\")){const t=this.properties,i=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of i)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(i){const s=[];if(Array.isArray(i)){const e=new Set(i.flat(1/0).reverse());for(const i of e)s.unshift(t(i))}else void 0!==i&&s.push(t(i));return s}static _$Ep(t,i){const s=i.attribute;return!1===s?void 0:\"string\"==typeof s?s:\"string\"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var i,s;(null!==(i=this._$ES)&&void 0!==i?i:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(s=t.hostConnected)||void 0===s||s.call(t))}removeController(t){var i;null===(i=this._$ES)||void 0===i||i.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,i)=>{this.hasOwnProperty(i)&&(this._$Ei.set(i,this[i]),delete this[i])}))}createRenderRoot(){var t;const s=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return i(s,this.constructor.elementStyles),s}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostConnected)||void 0===i?void 0:i.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostDisconnected)||void 0===i?void 0:i.call(t)}))}attributeChangedCallback(t,i,s){this._$AK(t,s)}_$EO(t,i,s=l){var e;const r=this.constructor._$Ep(t,s);if(void 0!==r&&!0===s.reflect){const h=(void 0!==(null===(e=s.converter)||void 0===e?void 0:e.toAttribute)?s.converter:n).toAttribute(i,s.type);this._$El=t,null==h?this.removeAttribute(r):this.setAttribute(r,h),this._$El=null}}_$AK(t,i){var s;const e=this.constructor,r=e._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=e.getPropertyOptions(r),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(s=t.converter)||void 0===s?void 0:s.fromAttribute)?t.converter:n;this._$El=r,this[r]=h.fromAttribute(i,t.type),this._$El=null}}requestUpdate(t,i,s){let e=!0;void 0!==t&&(((s=s||this.constructor.getPropertyOptions(t)).hasChanged||a)(this[t],i)?(this._$AL.has(t)||this._$AL.set(t,i),!0===s.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,s))):e=!1),!this.isUpdatePending&&e&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,i)=>this[i]=t)),this._$Ei=void 0);let i=!1;const s=this._$AL;try{i=this.shouldUpdate(s),i?(this.willUpdate(s),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var i;return null===(i=t.hostUpdate)||void 0===i?void 0:i.call(t)})),this.update(s)):this._$Ek()}catch(t){throw i=!1,this._$Ek(),t}i&&this._$AE(s)}willUpdate(t){}_$AE(t){var i;null===(i=this._$ES)||void 0===i||i.forEach((t=>{var i;return null===(i=t.hostUpdated)||void 0===i?void 0:i.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,i)=>this._$EO(i,this[i],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}u[d]=!0,u.elementProperties=new Map,u.elementStyles=[],u.shadowRootOptions={mode:\"open\"},null==o||o({ReactiveElement:u}),(null!==(s=e.reactiveElementVersions)&&void 0!==s?s:e.reactiveElementVersions=[]).push(\"1.6.3\");export{u as ReactiveElement,n as defaultConverter,a as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nvar t;const i=window,s=i.trustedTypes,e=s?s.createPolicy(\"lit-html\",{createHTML:t=>t}):void 0,o=\"$lit$\",n=`lit$${(Math.random()+\"\").slice(9)}$`,l=\"?\"+n,h=`<${l}>`,r=document,u=()=>r.createComment(\"\"),d=t=>null===t||\"object\"!=typeof t&&\"function\"!=typeof t,c=Array.isArray,v=t=>c(t)||\"function\"==typeof(null==t?void 0:t[Symbol.iterator]),a=\"[ \\t\\n\\f\\r]\",f=/<(?:(!--|\\/[^a-zA-Z])|(\\/?[a-zA-Z][^>\\s]*)|(\\/?$))/g,_=/-->/g,m=/>/g,p=RegExp(`>|${a}(?:([^\\\\s\"'>=/]+)(${a}*=${a}*(?:[^ \\t\\n\\f\\r\"'\\`<>=]|(\"|')|))|$)`,\"g\"),g=/'/g,$=/\"/g,y=/^(?:script|style|textarea|title)$/i,w=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=w(1),b=w(2),T=Symbol.for(\"lit-noChange\"),A=Symbol.for(\"lit-nothing\"),E=new WeakMap,C=r.createTreeWalker(r,129,null,!1);function P(t,i){if(!Array.isArray(t)||!t.hasOwnProperty(\"raw\"))throw Error(\"invalid template strings array\");return void 0!==e?e.createHTML(i):i}const V=(t,i)=>{const s=t.length-1,e=[];let l,r=2===i?\"<svg>\":\"\",u=f;for(let i=0;i<s;i++){const s=t[i];let d,c,v=-1,a=0;for(;a<s.length&&(u.lastIndex=a,c=u.exec(s),null!==c);)a=u.lastIndex,u===f?\"!--\"===c[1]?u=_:void 0!==c[1]?u=m:void 0!==c[2]?(y.test(c[2])&&(l=RegExp(\"</\"+c[2],\"g\")),u=p):void 0!==c[3]&&(u=p):u===p?\">\"===c[0]?(u=null!=l?l:f,v=-1):void 0===c[1]?v=-2:(v=u.lastIndex-c[2].length,d=c[1],u=void 0===c[3]?p:'\"'===c[3]?$:g):u===$||u===g?u=p:u===_||u===m?u=f:(u=p,l=void 0);const w=u===p&&t[i+1].startsWith(\"/>\")?\" \":\"\";r+=u===f?s+h:v>=0?(e.push(d),s.slice(0,v)+o+s.slice(v)+n+w):s+n+(-2===v?(e.push(void 0),i):w)}return[P(t,r+(t[s]||\"<?>\")+(2===i?\"</svg>\":\"\")),e]};class N{constructor({strings:t,_$litType$:i},e){let h;this.parts=[];let r=0,d=0;const c=t.length-1,v=this.parts,[a,f]=V(t,i);if(this.el=N.createElement(a,e),C.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(h=C.nextNode())&&v.length<c;){if(1===h.nodeType){if(h.hasAttributes()){const t=[];for(const i of h.getAttributeNames())if(i.endsWith(o)||i.startsWith(n)){const s=f[d++];if(t.push(i),void 0!==s){const t=h.getAttribute(s.toLowerCase()+o).split(n),i=/([.?@])?(.*)/.exec(s);v.push({type:1,index:r,name:i[2],strings:t,ctor:\".\"===i[1]?H:\"?\"===i[1]?L:\"@\"===i[1]?z:k})}else v.push({type:6,index:r})}for(const i of t)h.removeAttribute(i)}if(y.test(h.tagName)){const t=h.textContent.split(n),i=t.length-1;if(i>0){h.textContent=s?s.emptyScript:\"\";for(let s=0;s<i;s++)h.append(t[s],u()),C.nextNode(),v.push({type:2,index:++r});h.append(t[i],u())}}}else if(8===h.nodeType)if(h.data===l)v.push({type:2,index:r});else{let t=-1;for(;-1!==(t=h.data.indexOf(n,t+1));)v.push({type:7,index:r}),t+=n.length-1}r++}}static createElement(t,i){const s=r.createElement(\"template\");return s.innerHTML=t,s}}function S(t,i,s=t,e){var o,n,l,h;if(i===T)return i;let r=void 0!==e?null===(o=s._$Co)||void 0===o?void 0:o[e]:s._$Cl;const u=d(i)?void 0:i._$litDirective$;return(null==r?void 0:r.constructor)!==u&&(null===(n=null==r?void 0:r._$AO)||void 0===n||n.call(r,!1),void 0===u?r=void 0:(r=new u(t),r._$AT(t,s,e)),void 0!==e?(null!==(l=(h=s)._$Co)&&void 0!==l?l:h._$Co=[])[e]=r:s._$Cl=r),void 0!==r&&(i=S(t,r._$AS(t,i.values),r,e)),i}class M{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:s},parts:e}=this._$AD,o=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:r).importNode(s,!0);C.currentNode=o;let n=C.nextNode(),l=0,h=0,u=e[0];for(;void 0!==u;){if(l===u.index){let i;2===u.type?i=new R(n,n.nextSibling,this,t):1===u.type?i=new u.ctor(n,u.name,u.strings,this,t):6===u.type&&(i=new Z(n,this,t)),this._$AV.push(i),u=e[++h]}l!==(null==u?void 0:u.index)&&(n=C.nextNode(),l++)}return C.currentNode=r,o}v(t){let i=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,i),i+=s.strings.length-2):s._$AI(t[i])),i++}}class R{constructor(t,i,s,e){var o;this.type=2,this._$AH=A,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=s,this.options=e,this._$Cp=null===(o=null==e?void 0:e.isConnected)||void 0===o||o}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=S(this,t,i),d(t)?t===A||null==t||\"\"===t?(this._$AH!==A&&this._$AR(),this._$AH=A):t!==this._$AH&&t!==T&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):v(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==A&&d(this._$AH)?this._$AA.nextSibling.data=t:this.$(r.createTextNode(t)),this._$AH=t}g(t){var i;const{values:s,_$litType$:e}=t,o=\"number\"==typeof e?this._$AC(t):(void 0===e.el&&(e.el=N.createElement(P(e.h,e.h[0]),this.options)),e);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===o)this._$AH.v(s);else{const t=new M(o,this),i=t.u(this.options);t.v(s),this.$(i),this._$AH=t}}_$AC(t){let i=E.get(t.strings);return void 0===i&&E.set(t.strings,i=new N(t)),i}T(t){c(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let s,e=0;for(const o of t)e===i.length?i.push(s=new R(this.k(u()),this.k(u()),this,this.options)):s=i[e],s._$AI(o),e++;e<i.length&&(this._$AR(s&&s._$AB.nextSibling,e),i.length=e)}_$AR(t=this._$AA.nextSibling,i){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class k{constructor(t,i,s,e,o){this.type=1,this._$AH=A,this._$AN=void 0,this.element=t,this.name=i,this._$AM=e,this.options=o,s.length>2||\"\"!==s[0]||\"\"!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=A}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,s,e){const o=this.strings;let n=!1;if(void 0===o)t=S(this,t,i,0),n=!d(t)||t!==this._$AH&&t!==T,n&&(this._$AH=t);else{const e=t;let l,h;for(t=o[0],l=0;l<o.length-1;l++)h=S(this,e[s+l],i,l),h===T&&(h=this._$AH[l]),n||(n=!d(h)||h!==this._$AH[l]),h===A?t=A:t!==A&&(t+=(null!=h?h:\"\")+o[l+1]),this._$AH[l]=h}n&&!e&&this.j(t)}j(t){t===A?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:\"\")}}class H extends k{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===A?void 0:t}}const I=s?s.emptyScript:\"\";class L extends k{constructor(){super(...arguments),this.type=4}j(t){t&&t!==A?this.element.setAttribute(this.name,I):this.element.removeAttribute(this.name)}}class z extends k{constructor(t,i,s,e,o){super(t,i,s,e,o),this.type=5}_$AI(t,i=this){var s;if((t=null!==(s=S(this,t,i,0))&&void 0!==s?s:A)===T)return;const e=this._$AH,o=t===A&&e!==A||t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive,n=t!==A&&(e===A||o);o&&this.element.removeEventListener(this.name,this,e),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,s;\"function\"==typeof this._$AH?this._$AH.call(null!==(s=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==s?s:this.element,t):this._$AH.handleEvent(t)}}class Z{constructor(t,i,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}}const j={O:o,P:n,A:l,C:1,M:V,L:M,R:v,D:S,I:R,V:k,H:L,N:z,U:H,F:Z},B=i.litHtmlPolyfillSupport;null==B||B(N,R),(null!==(t=i.litHtmlVersions)&&void 0!==t?t:i.litHtmlVersions=[]).push(\"2.8.0\");const D=(t,i,s)=>{var e,o;const n=null!==(e=null==s?void 0:s.renderBefore)&&void 0!==e?e:i;let l=n._$litPart$;if(void 0===l){const t=null!==(o=null==s?void 0:s.renderBefore)&&void 0!==o?o:null;n._$litPart$=l=new R(i.insertBefore(u(),t),t,void 0,null!=s?s:{})}return l._$AI(t),l};export{j as _$LH,x as html,T as noChange,A as nothing,D as render,b as svg};\n//# sourceMappingURL=lit-html.js.map\n","import{ReactiveElement as t}from\"@lit/reactive-element\";export*from\"@lit/reactive-element\";import{render as e,noChange as i}from\"lit-html\";export*from\"lit-html\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */var l,o;const r=t;class s extends t{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const i=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=e(i,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return i}}s.finalized=!0,s._$litElement$=!0,null===(l=globalThis.litElementHydrateSupport)||void 0===l||l.call(globalThis,{LitElement:s});const n=globalThis.litElementPolyfillSupport;null==n||n({LitElement:s});const h={_$AK:(t,e,i)=>{t._$AK(e,i)},_$AL:t=>t._$AL};(null!==(o=globalThis.litElementVersions)&&void 0!==o?o:globalThis.litElementVersions=[]).push(\"3.3.3\");export{s as LitElement,r as UpdatingElement,h as _$LE};\n//# sourceMappingURL=lit-element.js.map\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n/**\n * @polymerMixin\n */\nexport const ThemePropertyMixin = (superClass) =>\n class VaadinThemePropertyMixin extends superClass {\n static get properties() {\n return {\n /**\n * Helper property with theme attribute value facilitating propagation\n * in shadow DOM.\n *\n * Enables the component implementation to propagate the `theme`\n * attribute value to the sub-components in Shadow DOM by binding\n * the sub-component's \"theme\" attribute to the `theme` property of\n * the host.\n *\n * **NOTE:** Extending the mixin only provides the property for binding,\n * and does not make the propagation alone.\n *\n * See [Styling Components: Sub-components](https://vaadin.com/docs/latest/styling/styling-components/#sub-components).\n * page for more information.\n *\n * @protected\n */\n _theme: {\n type: String,\n readOnly: true,\n },\n };\n }\n\n static get observedAttributes() {\n return [...super.observedAttributes, 'theme'];\n }\n\n /** @protected */\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback(name, oldValue, newValue);\n\n if (name === 'theme') {\n this._set_theme(newValue);\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css, CSSResult, unsafeCSS } from 'lit';\nimport { ThemePropertyMixin } from './vaadin-theme-property-mixin.js';\n\nexport { css, unsafeCSS };\n\n/**\n * @typedef {Object} Theme\n * @property {string} themeFor\n * @property {CSSResult[]} styles\n * @property {string | string[]} [include]\n * @property {string} [moduleId]\n *\n * @typedef {CSSResult[] | CSSResult} CSSResultGroup\n */\n\n/**\n * @type {Theme[]}\n */\nconst themeRegistry = [];\n\n/**\n * Check if the custom element type has themes applied.\n * @param {Function} elementClass\n * @returns {boolean}\n */\nfunction classHasThemes(elementClass) {\n return elementClass && Object.prototype.hasOwnProperty.call(elementClass, '__themes');\n}\n\n/**\n * Check if the custom element type has themes applied.\n * @param {string} tagName\n * @returns {boolean}\n */\nfunction hasThemes(tagName) {\n return classHasThemes(customElements.get(tagName));\n}\n\n/**\n * Flattens the styles into a single array of styles.\n * @param {CSSResultGroup} styles\n * @param {CSSResult[]} result\n * @returns {CSSResult[]}\n */\nfunction flattenStyles(styles = []) {\n return [styles].flat(Infinity).filter((style) => {\n if (style instanceof CSSResult) {\n return true;\n }\n console.warn('An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`.');\n return false;\n });\n}\n\n/**\n * Registers CSS styles for a component type. Make sure to register the styles before\n * the first instance of a component of the type is attached to DOM.\n *\n * @param {string} themeFor The local/tag name of the component type to register the styles for\n * @param {CSSResultGroup} styles The CSS style rules to be registered for the component type\n * matching themeFor and included in the local scope of each component instance\n * @param {{moduleId?: string, include?: string | string[]}} options Additional options\n * @return {void}\n */\nexport function registerStyles(themeFor, styles, options = {}) {\n if (themeFor) {\n if (hasThemes(themeFor)) {\n console.warn(`The custom element definition for \"${themeFor}\"\n was finalized before a style module was registered.\n Make sure to add component specific style modules before\n importing the corresponding custom element.`);\n }\n }\n\n styles = flattenStyles(styles);\n\n if (window.Vaadin && window.Vaadin.styleModules) {\n window.Vaadin.styleModules.registerStyles(themeFor, styles, options);\n } else {\n themeRegistry.push({\n themeFor,\n styles,\n include: options.include,\n moduleId: options.moduleId,\n });\n }\n}\n\n/**\n * Returns all registered themes. By default the themeRegistry is returned as is.\n * In case the style-modules adapter is imported, the themes are obtained from there instead\n * @returns {Theme[]}\n */\nfunction getAllThemes() {\n if (window.Vaadin && window.Vaadin.styleModules) {\n return window.Vaadin.styleModules.getAllThemes();\n }\n return themeRegistry;\n}\n\n/**\n * Returns true if the themeFor string matches the tag name\n * @param {string} themeFor\n * @param {string} tagName\n * @returns {boolean}\n */\nfunction matchesThemeFor(themeFor, tagName) {\n return (themeFor || '').split(' ').some((themeForToken) => {\n return new RegExp(`^${themeForToken.split('*').join('.*')}$`, 'u').test(tagName);\n });\n}\n\n/**\n * Maps the moduleName to an include priority number which is used for\n * determining the order in which styles are applied.\n * @param {string} moduleName\n * @returns {number}\n */\nfunction getIncludePriority(moduleName = '') {\n let includePriority = 0;\n if (moduleName.startsWith('lumo-') || moduleName.startsWith('material-')) {\n includePriority = 1;\n } else if (moduleName.startsWith('vaadin-')) {\n includePriority = 2;\n }\n return includePriority;\n}\n\n/**\n * Gets an array of CSSResults matching the include property of the theme.\n * @param {Theme} theme\n * @returns {CSSResult[]}\n */\nfunction getIncludedStyles(theme) {\n const includedStyles = [];\n if (theme.include) {\n [].concat(theme.include).forEach((includeModuleId) => {\n const includedTheme = getAllThemes().find((s) => s.moduleId === includeModuleId);\n if (includedTheme) {\n includedStyles.push(...getIncludedStyles(includedTheme), ...includedTheme.styles);\n } else {\n console.warn(`Included moduleId ${includeModuleId} not found in style registry`);\n }\n }, theme.styles);\n }\n return includedStyles;\n}\n\n/**\n * Includes the styles to the template.\n * @param {CSSResult[]} styles\n * @param {HTMLTemplateElement} template\n */\nfunction addStylesToTemplate(styles, template) {\n const styleEl = document.createElement('style');\n styleEl.innerHTML = styles.map((style) => style.cssText).join('\\n');\n template.content.appendChild(styleEl);\n}\n\n/**\n * Returns an array of themes that should be used for styling a component matching\n * the tag name. The array is sorted by the include order.\n * @param {string} tagName\n * @returns {Theme[]}\n */\nfunction getThemes(tagName) {\n const defaultModuleName = `${tagName}-default-theme`;\n\n const themes = getAllThemes()\n // Filter by matching themeFor properties\n .filter((theme) => theme.moduleId !== defaultModuleName && matchesThemeFor(theme.themeFor, tagName))\n .map((theme) => ({\n ...theme,\n // Prepend styles from included themes\n styles: [...getIncludedStyles(theme), ...theme.styles],\n // Map moduleId to includePriority\n includePriority: getIncludePriority(theme.moduleId),\n }))\n // Sort by includePriority\n .sort((themeA, themeB) => themeB.includePriority - themeA.includePriority);\n\n if (themes.length > 0) {\n return themes;\n }\n // No theme modules found, return the default module if it exists\n return getAllThemes().filter((theme) => theme.moduleId === defaultModuleName);\n}\n\n/**\n * @polymerMixin\n * @mixes ThemePropertyMixin\n */\nexport const ThemableMixin = (superClass) =>\n class VaadinThemableMixin extends ThemePropertyMixin(superClass) {\n /**\n * Covers PolymerElement based component styling\n * @protected\n */\n static finalize() {\n super.finalize();\n\n // Make sure not to run the logic intended for PolymerElement when LitElement is used.\n if (this.elementStyles) {\n return;\n }\n\n const template = this.prototype._template;\n if (!template || classHasThemes(this)) {\n return;\n }\n\n addStylesToTemplate(this.getStylesForThis(), template);\n }\n\n /**\n * Covers LitElement based component styling\n *\n * @protected\n */\n static finalizeStyles(styles) {\n // The \"styles\" object originates from the \"static get styles()\" function of\n // a LitElement based component. The theme styles are added after it\n // so that they can override the component styles.\n const themeStyles = this.getStylesForThis();\n return styles ? [...super.finalizeStyles(styles), ...themeStyles] : themeStyles;\n }\n\n /**\n * Get styles for the component type\n *\n * @private\n */\n static getStylesForThis() {\n const parent = Object.getPrototypeOf(this.prototype);\n const inheritedThemes = (parent ? parent.constructor.__themes : []) || [];\n this.__themes = [...inheritedThemes, ...getThemes(this.is)];\n const themeStyles = this.__themes.flatMap((theme) => theme.styles);\n // Remove duplicates\n return themeStyles.filter((style, index) => index === themeStyles.lastIndexOf(style));\n }\n };\n\nexport { themeRegistry as __themeRegistry };\n","import { addGlobalThemeStyles } from '@vaadin/vaadin-themable-mixin/register-styles.js';\n\nexport const addLumoGlobalStyles = (id, ...styles) => {\n addGlobalThemeStyles(`lumo-${id}`, styles);\n};\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nexport { registerStyles, css, unsafeCSS } from './vaadin-themable-mixin.js';\n\n/**\n * This is for use internally by Lumo and Material styles.\n *\n * @param {string} id the id to set on the created element, only for informational purposes\n * @param {CSSResultGroup[]} styles the styles to add\n */\nexport const addGlobalThemeStyles = (id, ...styles) => {\n const styleTag = document.createElement('style');\n styleTag.id = id;\n styleTag.textContent = styles\n .map((style) => style.toString())\n .join('\\n')\n .replace(':host', 'html');\n\n document.head.insertAdjacentElement('afterbegin', styleTag);\n};\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './version.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { addLumoGlobalStyles } from './global.js';\n\nconst colorBase = css`\n :host {\n /* Base (background) */\n --lumo-base-color: #fff;\n\n /* Tint */\n --lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);\n --lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);\n --lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);\n --lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);\n --lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);\n --lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);\n --lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);\n --lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);\n --lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);\n --lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);\n --lumo-tint: #fff;\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);\n --lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);\n --lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);\n --lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);\n --lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);\n --lumo-shade-50pct: hsla(214, 45%, 20%, 0.52);\n --lumo-shade-60pct: hsla(214, 43%, 19%, 0.6);\n --lumo-shade-70pct: hsla(214, 42%, 18%, 0.69);\n --lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);\n --lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);\n --lumo-shade: hsl(214, 35%, 15%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-shade-5pct);\n --lumo-contrast-10pct: var(--lumo-shade-10pct);\n --lumo-contrast-20pct: var(--lumo-shade-20pct);\n --lumo-contrast-30pct: var(--lumo-shade-30pct);\n --lumo-contrast-40pct: var(--lumo-shade-40pct);\n --lumo-contrast-50pct: var(--lumo-shade-50pct);\n --lumo-contrast-60pct: var(--lumo-shade-60pct);\n --lumo-contrast-70pct: var(--lumo-shade-70pct);\n --lumo-contrast-80pct: var(--lumo-shade-80pct);\n --lumo-contrast-90pct: var(--lumo-shade-90pct);\n --lumo-contrast: var(--lumo-shade);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 100%, 48%);\n --lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76);\n --lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13);\n --lumo-primary-text-color: hsl(214, 100%, 43%);\n --lumo-primary-contrast-color: #fff;\n\n /* Error */\n --lumo-error-color: hsl(3, 85%, 48%);\n --lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5);\n --lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1);\n --lumo-error-text-color: hsl(3, 89%, 42%);\n --lumo-error-contrast-color: #fff;\n\n /* Success */\n --lumo-success-color: hsl(145, 72%, 30%);\n --lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5);\n --lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1);\n --lumo-success-text-color: hsl(145, 85%, 25%);\n --lumo-success-contrast-color: #fff;\n\n /* Warning */\n --lumo-warning-color: hsl(48, 100%, 50%);\n --lumo-warning-color-10pct: hsla(48, 100%, 50%, 0.25);\n --lumo-warning-text-color: hsl(32, 100%, 30%);\n --lumo-warning-contrast-color: var(--lumo-shade-90pct);\n }\n\n /* forced-colors mode adjustments */\n @media (forced-colors: active) {\n html {\n --lumo-disabled-text-color: GrayText;\n }\n }\n`;\n\naddLumoGlobalStyles('color-props', colorBase);\n\nconst color = css`\n [theme~='dark'] {\n /* Base (background) */\n --lumo-base-color: hsl(214, 35%, 21%);\n\n /* Tint */\n --lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);\n --lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);\n --lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);\n --lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);\n --lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);\n --lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);\n --lumo-tint-60pct: hsla(214, 82%, 90%, 0.58);\n --lumo-tint-70pct: hsla(214, 87%, 92%, 0.69);\n --lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);\n --lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);\n --lumo-tint: hsl(214, 100%, 98%);\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);\n --lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);\n --lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);\n --lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);\n --lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);\n --lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);\n --lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);\n --lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);\n --lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);\n --lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);\n --lumo-shade: hsl(214, 33%, 13%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-tint-5pct);\n --lumo-contrast-10pct: var(--lumo-tint-10pct);\n --lumo-contrast-20pct: var(--lumo-tint-20pct);\n --lumo-contrast-30pct: var(--lumo-tint-30pct);\n --lumo-contrast-40pct: var(--lumo-tint-40pct);\n --lumo-contrast-50pct: var(--lumo-tint-50pct);\n --lumo-contrast-60pct: var(--lumo-tint-60pct);\n --lumo-contrast-70pct: var(--lumo-tint-70pct);\n --lumo-contrast-80pct: var(--lumo-tint-80pct);\n --lumo-contrast-90pct: var(--lumo-tint-90pct);\n --lumo-contrast: var(--lumo-tint);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 90%, 48%);\n --lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69);\n --lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13);\n --lumo-primary-text-color: hsl(214, 90%, 77%);\n --lumo-primary-contrast-color: #fff;\n\n /* Error */\n --lumo-error-color: hsl(3, 79%, 49%);\n --lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5);\n --lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14);\n --lumo-error-text-color: hsl(3, 100%, 80%);\n\n /* Success */\n --lumo-success-color: hsl(145, 72%, 30%);\n --lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5);\n --lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1);\n --lumo-success-text-color: hsl(145, 85%, 46%);\n\n /* Warning */\n --lumo-warning-color: hsl(43, 100%, 48%);\n --lumo-warning-color-10pct: hsla(40, 100%, 50%, 0.2);\n --lumo-warning-text-color: hsl(45, 100%, 60%);\n --lumo-warning-contrast-color: var(--lumo-shade-90pct);\n }\n\n html {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n color-scheme: light;\n }\n\n [theme~='dark'] {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n color-scheme: dark;\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n color: var(--lumo-header-text-color);\n }\n\n a:where(:any-link) {\n color: var(--lumo-primary-text-color);\n }\n\n a:not(:any-link) {\n color: var(--lumo-disabled-text-color);\n }\n\n blockquote {\n color: var(--lumo-secondary-text-color);\n }\n\n code,\n pre {\n background-color: var(--lumo-contrast-10pct);\n border-radius: var(--lumo-border-radius-m);\n }\n`;\n\nregisterStyles('', color, { moduleId: 'lumo-color' });\n\nexport { colorBase, color };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './version.js';\nimport { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { addLumoGlobalStyles } from './global.js';\n\nconst sizing = css`\n :host {\n --lumo-size-xs: 1.625rem;\n --lumo-size-s: 1.875rem;\n --lumo-size-m: 2.25rem;\n --lumo-size-l: 2.75rem;\n --lumo-size-xl: 3.5rem;\n\n /* Icons */\n --lumo-icon-size-s: 1.25em;\n --lumo-icon-size-m: 1.5em;\n --lumo-icon-size-l: 2.25em;\n /* For backwards compatibility */\n --lumo-icon-size: var(--lumo-icon-size-m);\n }\n`;\n\naddLumoGlobalStyles('sizing-props', sizing);\n\nexport { sizing };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './version.js';\nimport { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { addLumoGlobalStyles } from './global.js';\n\nconst style = css`\n :host {\n /* Border radius */\n --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */\n --lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */\n --lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */\n\n /* Shadow */\n --lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);\n --lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);\n --lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);\n --lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);\n --lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);\n\n /* Clickable element cursor */\n --lumo-clickable-cursor: default;\n }\n`;\n\n/**\n * Default values for component-specific custom properties.\n */\nconst globals = css`\n html {\n --vaadin-checkbox-size: calc(var(--lumo-size-m) / 2);\n --vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);\n --vaadin-input-field-border-radius: var(--lumo-border-radius-m);\n }\n`;\n\naddLumoGlobalStyles('style-props', style);\n\nexport { globals, style };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './version.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { addLumoGlobalStyles } from './global.js';\n\nconst font = css`\n :host {\n /* prettier-ignore */\n --lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';\n\n /* Font sizes */\n --lumo-font-size-xxs: 0.75rem;\n --lumo-font-size-xs: 0.8125rem;\n --lumo-font-size-s: 0.875rem;\n --lumo-font-size-m: 1rem;\n --lumo-font-size-l: 1.125rem;\n --lumo-font-size-xl: 1.375rem;\n --lumo-font-size-xxl: 1.75rem;\n --lumo-font-size-xxxl: 2.5rem;\n\n /* Line heights */\n --lumo-line-height-xs: 1.25;\n --lumo-line-height-s: 1.375;\n --lumo-line-height-m: 1.625;\n }\n`;\n\nconst typography = css`\n body,\n :host {\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size-m);\n line-height: var(--lumo-line-height-m);\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n small,\n [theme~='font-size-s'] {\n font-size: var(--lumo-font-size-s);\n line-height: var(--lumo-line-height-s);\n }\n\n [theme~='font-size-xs'] {\n font-size: var(--lumo-font-size-xs);\n line-height: var(--lumo-line-height-xs);\n }\n\n :where(h1, h2, h3, h4, h5, h6) {\n font-weight: 600;\n line-height: var(--lumo-line-height-xs);\n margin-block: 0;\n }\n\n :where(h1) {\n font-size: var(--lumo-font-size-xxxl);\n }\n\n :where(h2) {\n font-size: var(--lumo-font-size-xxl);\n }\n\n :where(h3) {\n font-size: var(--lumo-font-size-xl);\n }\n\n :where(h4) {\n font-size: var(--lumo-font-size-l);\n }\n\n :where(h5) {\n font-size: var(--lumo-font-size-m);\n }\n\n :where(h6) {\n font-size: var(--lumo-font-size-xs);\n text-transform: uppercase;\n letter-spacing: 0.03em;\n }\n\n p,\n blockquote {\n margin-top: 0.5em;\n margin-bottom: 0.75em;\n }\n\n a {\n text-decoration: none;\n }\n\n a:where(:any-link):hover {\n text-decoration: underline;\n }\n\n hr {\n display: block;\n align-self: stretch;\n height: 1px;\n border: 0;\n padding: 0;\n margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);\n background-color: var(--lumo-contrast-10pct);\n }\n\n blockquote {\n border-left: 2px solid var(--lumo-contrast-30pct);\n }\n\n b,\n strong {\n font-weight: 600;\n }\n\n /* RTL specific styles */\n blockquote[dir='rtl'] {\n border-left: none;\n border-right: 2px solid var(--lumo-contrast-30pct);\n }\n`;\n\nregisterStyles('', typography, { moduleId: 'lumo-typography' });\naddLumoGlobalStyles('typography-props', font);\n\nexport { font, typography };\n","import '@vaadin/vaadin-lumo-styles/color.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport '@vaadin/vaadin-lumo-styles/style.js';\nimport '@vaadin/vaadin-lumo-styles/typography.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nregisterStyles(\n 'vaadin-input-container',\n css`\n :host {\n background-color: var(--lumo-contrast-10pct);\n padding: 0 calc(0.375em + var(--_input-container-radius) / 4 - 1px);\n font-weight: 500;\n line-height: 1;\n position: relative;\n cursor: text;\n box-sizing: border-box;\n border-radius:\n /* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius#syntax */\n var(--vaadin-input-field-top-start-radius, var(--_input-container-radius))\n var(--vaadin-input-field-top-end-radius, var(--_input-container-radius))\n var(--vaadin-input-field-bottom-end-radius, var(--_input-container-radius))\n var(--vaadin-input-field-bottom-start-radius, var(--_input-container-radius));\n /* Fallback */\n --_input-container-radius: var(--vaadin-input-field-border-radius, var(--lumo-border-radius-m));\n /* Default field border color */\n --_input-border-color: var(--vaadin-input-field-border-color, var(--lumo-contrast-50pct));\n }\n\n :host([dir='rtl']) {\n border-radius:\n /* Don't use logical props, see https://github.com/vaadin/vaadin-time-picker/issues/145 */\n var(--vaadin-input-field-top-end-radius, var(--_input-container-radius))\n var(--vaadin-input-field-top-start-radius, var(--_input-container-radius))\n var(--vaadin-input-field-bottom-start-radius, var(--_input-container-radius))\n var(--vaadin-input-field-bottom-end-radius, var(--_input-container-radius));\n }\n\n /* Used for hover and activation effects */\n :host::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n pointer-events: none;\n background-color: var(--lumo-contrast-50pct);\n opacity: 0;\n transition: transform 0.15s, opacity 0.2s;\n transform-origin: 100% 0;\n }\n\n ::slotted(:not([slot$='fix'])) {\n cursor: inherit;\n min-height: var(--lumo-text-field-size, var(--lumo-size-m));\n padding: 0 0.25em;\n --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);\n -webkit-mask-image: var(--_lumo-text-field-overflow-mask-image);\n mask-image: var(--_lumo-text-field-overflow-mask-image);\n }\n\n /* Read-only */\n :host([readonly]) {\n color: var(--lumo-secondary-text-color);\n background-color: transparent;\n cursor: default;\n }\n\n :host([readonly])::after {\n background-color: transparent;\n opacity: 1;\n border: 1px dashed var(--lumo-contrast-30pct);\n }\n\n /* Disabled */\n :host([disabled]) {\n background-color: var(--lumo-contrast-5pct);\n }\n\n :host([disabled]) ::slotted(*) {\n color: var(--lumo-disabled-text-color);\n -webkit-text-fill-color: var(--lumo-disabled-text-color);\n }\n\n /* Invalid */\n :host([invalid]) {\n background-color: var(--lumo-error-color-10pct);\n }\n\n :host([invalid])::after {\n background-color: var(--lumo-error-color-50pct);\n }\n\n /* Slotted icons */\n ::slotted(vaadin-icon) {\n color: var(--lumo-contrast-60pct);\n width: var(--lumo-icon-size-m);\n height: var(--lumo-icon-size-m);\n }\n\n /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */\n ::slotted(vaadin-icon[icon^='vaadin:']) {\n padding: 0.25em;\n box-sizing: border-box !important;\n }\n\n /* Text align */\n :host([dir='rtl']) ::slotted(:not([slot$='fix'])) {\n --_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent, #000 1.25em);\n }\n\n @-moz-document url-prefix() {\n :host([dir='rtl']) ::slotted(:not([slot$='fix'])) {\n mask-image: var(--_lumo-text-field-overflow-mask-image);\n }\n }\n\n :host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {\n text-align: start;\n --_lumo-text-field-overflow-mask-image: none;\n }\n\n :host([theme~='align-center']) ::slotted(:not([slot$='fix'])) {\n text-align: center;\n --_lumo-text-field-overflow-mask-image: none;\n }\n\n :host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {\n text-align: end;\n --_lumo-text-field-overflow-mask-image: none;\n }\n\n @-moz-document url-prefix() {\n /* Firefox is smart enough to align overflowing text to right */\n :host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {\n --_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);\n }\n }\n\n @-moz-document url-prefix() {\n /* Firefox is smart enough to align overflowing text to right */\n :host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {\n --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);\n }\n }\n\n /* RTL specific styles */\n :host([dir='rtl'])::after {\n transform-origin: 0% 0;\n }\n\n :host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {\n --_lumo-text-field-overflow-mask-image: none;\n }\n\n :host([theme~='align-center'][dir='rtl']) ::slotted(:not([slot$='fix'])) {\n --_lumo-text-field-overflow-mask-image: none;\n }\n\n :host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {\n --_lumo-text-field-overflow-mask-image: none;\n }\n\n @-moz-document url-prefix() {\n /* Firefox is smart enough to align overflowing text to right */\n :host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {\n --_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);\n }\n }\n\n @-moz-document url-prefix() {\n /* Firefox is smart enough to align overflowing text to right */\n :host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {\n --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);\n }\n }\n `,\n { moduleId: 'lumo-input-container' },\n);\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/* eslint-disable no-unused-vars */\n/**\n * When using Closure Compiler, JSCompiler_renameProperty(property, object) is replaced by the munged name for object[property]\n * We cannot alias this function, so we have to use a small shim that has the same behavior when not compiling.\n *\n * @param {?} prop Property name\n * @param {*} obj Reference object\n * @return {string} Potentially renamed property name\n */\nwindow.JSCompiler_renameProperty = function(prop, obj) {\n return prop;\n};\n/* eslint-enable */\n\nexport {};\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport './boot.js';\n\nlet CSS_URL_RX = /(url\\()([^)]*)(\\))/g;\nlet ABS_URL = /(^\\/[^\\/])|(^#)|(^[\\w-\\d]*:)/;\nlet workingURL;\nlet resolveDoc;\n/**\n * Resolves the given URL against the provided `baseUri'.\n *\n * Note that this function performs no resolution for URLs that start\n * with `/` (absolute URLs) or `#` (hash identifiers). For general purpose\n * URL resolution, use `window.URL`.\n *\n * @param {string} url Input URL to resolve\n * @param {?string=} baseURI Base URI to resolve the URL against\n * @return {string} resolved URL\n */\nexport function resolveUrl(url, baseURI) {\n if (url && ABS_URL.test(url)) {\n return url;\n }\n if (url === '//') {\n return url;\n }\n // Lazy feature detection.\n if (workingURL === undefined) {\n workingURL = false;\n try {\n const u = new URL('b', 'http://a');\n u.pathname = 'c%20d';\n workingURL = (u.href === 'http://a/c%20d');\n } catch (e) {\n // silently fail\n }\n }\n if (!baseURI) {\n baseURI = document.baseURI || window.location.href;\n }\n if (workingURL) {\n try {\n return (new URL(url, baseURI)).href;\n } catch (e) {\n // Bad url or baseURI structure. Do not attempt to resolve.\n return url;\n }\n }\n // Fallback to creating an anchor into a disconnected document.\n if (!resolveDoc) {\n resolveDoc = document.implementation.createHTMLDocument('temp');\n resolveDoc.base = resolveDoc.createElement('base');\n resolveDoc.head.appendChild(resolveDoc.base);\n resolveDoc.anchor = resolveDoc.createElement('a');\n resolveDoc.body.appendChild(resolveDoc.anchor);\n }\n resolveDoc.base.href = baseURI;\n resolveDoc.anchor.href = url;\n return resolveDoc.anchor.href || url;\n\n}\n\n/**\n * Resolves any relative URL's in the given CSS text against the provided\n * `ownerDocument`'s `baseURI`.\n *\n * @param {string} cssText CSS text to process\n * @param {string} baseURI Base URI to resolve the URL against\n * @return {string} Processed CSS text with resolved URL's\n */\nexport function resolveCss(cssText, baseURI) {\n return cssText.replace(CSS_URL_RX, function(m, pre, url, post) {\n return pre + '\\'' +\n resolveUrl(url.replace(/[\"']/g, ''), baseURI) +\n '\\'' + post;\n });\n}\n\n/**\n * Returns a path from a given `url`. The path includes the trailing\n * `/` from the url.\n *\n * @param {string} url Input URL to transform\n * @return {string} resolved path\n */\nexport function pathFromUrl(url) {\n return url.substring(0, url.lastIndexOf('/') + 1);\n}\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport './boot.js';\nimport { pathFromUrl } from './resolve-url.js';\nexport const useShadow = !(window.ShadyDOM) || !(window.ShadyDOM.inUse);\nexport const useNativeCSSProperties = Boolean(!window.ShadyCSS || window.ShadyCSS.nativeCss);\nexport const useNativeCustomElements = !(window.customElements.polyfillWrapFlushCallback);\nexport const supportsAdoptingStyleSheets = useShadow &&\n ('adoptedStyleSheets' in Document.prototype) &&\n ('replaceSync' in CSSStyleSheet.prototype) &&\n // Since spec may change, feature detect exact API we need\n (() => {\n try {\n const sheet = new CSSStyleSheet();\n sheet.replaceSync('');\n const host = document.createElement('div');\n host.attachShadow({mode: 'open'});\n host.shadowRoot.adoptedStyleSheets = [sheet];\n return (host.shadowRoot.adoptedStyleSheets[0] === sheet);\n } catch(e) {\n return false;\n }\n })();\n\n/**\n * Globally settable property that is automatically assigned to\n * `ElementMixin` instances, useful for binding in templates to\n * make URL's relative to an application's root. Defaults to the main\n * document URL, but can be overridden by users. It may be useful to set\n * `rootPath` to provide a stable application mount path when\n * using client side routing.\n */\nexport let rootPath = window.Polymer && window.Polymer.rootPath ||\n pathFromUrl(document.baseURI || window.location.href);\n\n/**\n * Sets the global rootPath property used by `ElementMixin` and\n * available via `rootPath`.\n *\n * @param {string} path The new root path\n * @return {void}\n */\nexport const setRootPath = function(path) {\n rootPath = path;\n};\n\n/**\n * A global callback used to sanitize any value before inserting it into the DOM.\n * The callback signature is:\n *\n * function sanitizeDOMValue(value, name, type, node) { ... }\n *\n * Where:\n *\n * `value` is the value to sanitize.\n * `name` is the name of an attribute or property (for example, href).\n * `type` indicates where the value is being inserted: one of property, attribute, or text.\n * `node` is the node where the value is being inserted.\n *\n * @type {(function(*,string,string,?Node):*)|undefined}\n */\nexport let sanitizeDOMValue =\n window.Polymer && window.Polymer.sanitizeDOMValue || undefined;\n\n/**\n * Sets the global sanitizeDOMValue available via this module's exported\n * `sanitizeDOMValue` variable.\n *\n * @param {(function(*,string,string,?Node):*)|undefined} newSanitizeDOMValue the global sanitizeDOMValue callback\n * @return {void}\n */\nexport const setSanitizeDOMValue = function(newSanitizeDOMValue) {\n sanitizeDOMValue = newSanitizeDOMValue;\n};\n\n/**\n * Gets sanitizeDOMValue, for environments that don't well support `export let`.\n *\n * @return {(function(*,string,string,?Node):*)|undefined} sanitizeDOMValue\n */\nexport const getSanitizeDOMValue = function() {\n return sanitizeDOMValue;\n};\n\n/**\n * Globally settable property to make Polymer Gestures use passive TouchEvent listeners when recognizing gestures.\n * When set to `true`, gestures made from touch will not be able to prevent scrolling, allowing for smoother\n * scrolling performance.\n * Defaults to `false` for backwards compatibility.\n */\nexport let passiveTouchGestures =\n window.Polymer && window.Polymer.setPassiveTouchGestures || false;\n\n/**\n * Sets `passiveTouchGestures` globally for all elements using Polymer Gestures.\n *\n * @param {boolean} usePassive enable or disable passive touch gestures globally\n * @return {void}\n */\nexport const setPassiveTouchGestures = function(usePassive) {\n passiveTouchGestures = usePassive;\n};\n\n/**\n * Setting to ensure Polymer template evaluation only occurs based on tempates\n * defined in trusted script. When true, `<dom-module>` re-registration is\n * disallowed, `<dom-bind>` is disabled, and `<dom-if>`/`<dom-repeat>`\n * templates will only evaluate in the context of a trusted element template.\n */\nexport let strictTemplatePolicy =\n window.Polymer && window.Polymer.strictTemplatePolicy || false;\n\n/**\n * Sets `strictTemplatePolicy` globally for all elements\n *\n * @param {boolean} useStrictPolicy enable or disable strict template policy\n * globally\n * @return {void}\n */\nexport const setStrictTemplatePolicy = function(useStrictPolicy) {\n strictTemplatePolicy = useStrictPolicy;\n};\n\n/**\n * Setting to enable dom-module lookup from Polymer.Element. By default,\n * templates must be defined in script using the `static get template()`\n * getter and the `html` tag function. To enable legacy loading of templates\n * via dom-module, set this flag to true.\n */\nexport let allowTemplateFromDomModule =\n window.Polymer && window.Polymer.allowTemplateFromDomModule || false;\n\n/**\n * Sets `lookupTemplateFromDomModule` globally for all elements\n *\n * @param {boolean} allowDomModule enable or disable template lookup\n * globally\n * @return {void}\n */\nexport const setAllowTemplateFromDomModule = function(allowDomModule) {\n allowTemplateFromDomModule = allowDomModule;\n};\n\n/**\n * Setting to skip processing style includes and re-writing urls in css styles.\n * Normally \"included\" styles are pulled into the element and all urls in styles\n * are re-written to be relative to the containing script url.\n * If no includes or relative urls are used in styles, these steps can be\n * skipped as an optimization.\n */\nexport let legacyOptimizations =\n window.Polymer && window.Polymer.legacyOptimizations || false;\n\n/**\n * Sets `legacyOptimizations` globally for all elements to enable optimizations\n * when only legacy based elements are used.\n *\n * @param {boolean} useLegacyOptimizations enable or disable legacy optimizations\n * includes and url rewriting\n * @return {void}\n */\nexport const setLegacyOptimizations = function(useLegacyOptimizations) {\n legacyOptimizations = useLegacyOptimizations;\n};\n\n/**\n * Setting to add warnings useful when migrating from Polymer 1.x to 2.x.\n */\nexport let legacyWarnings =\n window.Polymer && window.Polymer.legacyWarnings || false;\n\n/**\n * Sets `legacyWarnings` globally for all elements to migration warnings.\n *\n * @param {boolean} useLegacyWarnings enable or disable warnings\n * @return {void}\n */\nexport const setLegacyWarnings = function(useLegacyWarnings) {\n legacyWarnings = useLegacyWarnings;\n};\n\n/**\n * Setting to perform initial rendering synchronously when running under ShadyDOM.\n * This matches the behavior of Polymer 1.\n */\nexport let syncInitialRender =\n window.Polymer && window.Polymer.syncInitialRender || false;\n\n/**\n * Sets `syncInitialRender` globally for all elements to enable synchronous\n * initial rendering.\n *\n * @param {boolean} useSyncInitialRender enable or disable synchronous initial\n * rendering globally.\n * @return {void}\n */\nexport const setSyncInitialRender = function(useSyncInitialRender) {\n syncInitialRender = useSyncInitialRender;\n};\n\n/**\n * Setting to retain the legacy Polymer 1 behavior for multi-property\n * observers around undefined values. Observers and computed property methods\n * are not called until no argument is undefined.\n */\nexport let legacyUndefined =\n window.Polymer && window.Polymer.legacyUndefined || false;\n\n/**\n * Sets `legacyUndefined` globally for all elements to enable legacy\n * multi-property behavior for undefined values.\n *\n * @param {boolean} useLegacyUndefined enable or disable legacy\n * multi-property behavior for undefined.\n * @return {void}\n */\nexport const setLegacyUndefined = function(useLegacyUndefined) {\n legacyUndefined = useLegacyUndefined;\n};\n\n/**\n * Setting to ensure computed properties are computed in order to ensure\n * re-computation never occurs in a given turn.\n */\nexport let orderedComputed =\n window.Polymer && window.Polymer.orderedComputed || false;\n\n/**\n * Sets `orderedComputed` globally for all elements to enable ordered computed\n * property computation.\n *\n * @param {boolean} useOrderedComputed enable or disable ordered computed effects\n * @return {void}\n */\nexport const setOrderedComputed = function(useOrderedComputed) {\n orderedComputed = useOrderedComputed;\n};\n\n/**\n * Setting to cancel synthetic click events fired by older mobile browsers. Modern browsers\n * no longer fire synthetic click events, and the cancellation behavior can interfere\n * when programmatically clicking on elements.\n */\nexport let cancelSyntheticClickEvents = true;\n\n/**\n * Sets `setCancelSyntheticEvents` globally for all elements to cancel synthetic click events.\n *\n * @param {boolean} useCancelSyntheticClickEvents enable or disable cancelling synthetic\n * events\n * @return {void}\n */\nexport const setCancelSyntheticClickEvents = function(useCancelSyntheticClickEvents) {\n cancelSyntheticClickEvents = useCancelSyntheticClickEvents;\n};\n\n/**\n * Setting to remove nested templates inside `dom-if` and `dom-repeat` as\n * part of element template parsing. This is a performance optimization that\n * eliminates most of the tax of needing two elements due to the loss of\n * type-extended templates as a result of the V1 specification changes.\n */\nexport let removeNestedTemplates =\n window.Polymer && window.Polymer.removeNestedTemplates || false;\n\n/**\n * Sets `removeNestedTemplates` globally, to eliminate nested templates\n * inside `dom-if` and `dom-repeat` as part of template parsing.\n *\n * @param {boolean} useRemoveNestedTemplates enable or disable removing nested\n * templates during parsing\n * @return {void}\n */\nexport const setRemoveNestedTemplates = function(useRemoveNestedTemplates) {\n removeNestedTemplates = useRemoveNestedTemplates;\n};\n\n/**\n * Setting to place `dom-if` elements in a performance-optimized mode that takes\n * advantage of lighter-weight host runtime template stamping to eliminate the\n * need for an intermediate Templatizer `TemplateInstance` to mange the nodes\n * stamped by `dom-if`. Under this setting, any Templatizer-provided API's\n * such as `modelForElement` will not be available for nodes stamped by\n * `dom-if`.\n */\nexport let fastDomIf = window.Polymer && window.Polymer.fastDomIf || false;\n\n/**\n * Sets `fastDomIf` globally, to put `dom-if` in a performance-optimized mode.\n *\n * @param {boolean} useFastDomIf enable or disable `dom-if` fast-mode\n * @return {void}\n */\nexport const setFastDomIf = function(useFastDomIf) {\n fastDomIf = useFastDomIf;\n};\n\n/**\n * Setting to disable `dom-change` and `rendered-item-count` events from\n * `dom-if` and `dom-repeat`. Users can opt back into `dom-change` events by\n * setting the `notify-dom-change` attribute (`notifyDomChange: true` property)\n * to `dom-if`/`don-repeat` instances.\n */\nexport let suppressTemplateNotifications =\n window.Polymer && window.Polymer.suppressTemplateNotifications || false;\n\n/**\n * Sets `suppressTemplateNotifications` globally, to disable `dom-change` and\n * `rendered-item-count` events from `dom-if` and `dom-repeat`.\n *\n * @param {boolean} suppress enable or disable `suppressTemplateNotifications`\n * @return {void}\n */\nexport const setSuppressTemplateNotifications = function(suppress) {\n suppressTemplateNotifications = suppress;\n};\n\n/**\n * Setting to disable use of dynamic attributes. This is an optimization\n * to avoid setting `observedAttributes`. Instead attributes are read\n * once at create time and set/removeAttribute are patched.\n */\nexport let legacyNoObservedAttributes =\n window.Polymer && window.Polymer.legacyNoObservedAttributes || false;\n\n/**\n * Sets `legacyNoObservedAttributes` globally, to disable `observedAttributes`.\n *\n * @param {boolean} noObservedAttributes enable or disable `legacyNoObservedAttributes`\n * @return {void}\n */\nexport const setLegacyNoObservedAttributes = function(noObservedAttributes) {\n legacyNoObservedAttributes = noObservedAttributes;\n};\n\n/**\n * Setting to enable use of `adoptedStyleSheets` for sharing style sheets\n * between component instances' shadow roots, if the app uses built Shady CSS\n * styles.\n */\nexport let useAdoptedStyleSheetsWithBuiltCSS =\n window.Polymer && window.Polymer.useAdoptedStyleSheetsWithBuiltCSS || false;\n\n/**\n * Sets `useAdoptedStyleSheetsWithBuiltCSS` globally.\n *\n * @param {boolean} value enable or disable `useAdoptedStyleSheetsWithBuiltCSS`\n * @return {void}\n */\nexport const setUseAdoptedStyleSheetsWithBuiltCSS = function(value) {\n useAdoptedStyleSheetsWithBuiltCSS = value;\n};\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport './boot.js';\n\n// unique global id for deduping mixins.\nlet dedupeId = 0;\n\n/**\n * @constructor\n * @extends {Function}\n * @private\n */\nfunction MixinFunction(){}\n/** @type {(WeakMap | undefined)} */\nMixinFunction.prototype.__mixinApplications;\n/** @type {(Object | undefined)} */\nMixinFunction.prototype.__mixinSet;\n\n/* eslint-disable valid-jsdoc */\n/**\n * Wraps an ES6 class expression mixin such that the mixin is only applied\n * if it has not already been applied its base argument. Also memoizes mixin\n * applications.\n *\n * @template T\n * @param {T} mixin ES6 class expression mixin to wrap\n * @return {T}\n * @suppress {invalidCasts}\n */\nexport const dedupingMixin = function(mixin) {\n let mixinApplications = /** @type {!MixinFunction} */(mixin).__mixinApplications;\n if (!mixinApplications) {\n mixinApplications = new WeakMap();\n /** @type {!MixinFunction} */(mixin).__mixinApplications = mixinApplications;\n }\n // maintain a unique id for each mixin\n let mixinDedupeId = dedupeId++;\n function dedupingMixin(base) {\n let baseSet = /** @type {!MixinFunction} */(base).__mixinSet;\n if (baseSet && baseSet[mixinDedupeId]) {\n return base;\n }\n let map = mixinApplications;\n let extended = map.get(base);\n if (!extended) {\n extended = /** @type {!Function} */(mixin)(base);\n map.set(base, extended);\n // copy inherited mixin set from the extended class, or the base class\n // NOTE: we avoid use of Set here because some browser (IE11)\n // cannot extend a base Set via the constructor.\n let mixinSet = Object.create(/** @type {!MixinFunction} */(extended).__mixinSet || baseSet || null);\n mixinSet[mixinDedupeId] = true;\n /** @type {!MixinFunction} */(extended).__mixinSet = mixinSet;\n }\n return extended;\n }\n\n return dedupingMixin;\n};\n/* eslint-enable valid-jsdoc */\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport '../utils/boot.js';\n\nimport { resolveUrl, pathFromUrl } from '../utils/resolve-url.js';\nimport { strictTemplatePolicy } from '../utils/settings.js';\n\nlet modules = {};\nlet lcModules = {};\n/**\n * Sets a dom-module into the global registry by id.\n *\n * @param {string} id dom-module id\n * @param {DomModule} module dom-module instance\n * @return {void}\n */\nfunction setModule(id, module) {\n // store id separate from lowercased id so that\n // in all cases mixedCase id will stored distinctly\n // and lowercase version is a fallback\n modules[id] = lcModules[id.toLowerCase()] = module;\n}\n/**\n * Retrieves a dom-module from the global registry by id.\n *\n * @param {string} id dom-module id\n * @return {DomModule!} dom-module instance\n */\nfunction findModule(id) {\n return modules[id] || lcModules[id.toLowerCase()];\n}\n\nfunction styleOutsideTemplateCheck(inst) {\n if (inst.querySelector('style')) {\n console.warn('dom-module %s has style outside template', inst.id);\n }\n}\n\n/**\n * The `dom-module` element registers the dom it contains to the name given\n * by the module's id attribute. It provides a unified database of dom\n * accessible via its static `import` API.\n *\n * A key use case of `dom-module` is for providing custom element `<template>`s\n * via HTML imports that are parsed by the native HTML parser, that can be\n * relocated during a bundling pass and still looked up by `id`.\n *\n * Example:\n *\n * <dom-module id=\"foo\">\n * <img src=\"stuff.png\">\n * </dom-module>\n *\n * Then in code in some other location that cannot access the dom-module above\n *\n * let img = customElements.get('dom-module').import('foo', 'img');\n *\n * @customElement\n * @extends HTMLElement\n * @summary Custom element that provides a registry of relocatable DOM content\n * by `id` that is agnostic to bundling.\n * @unrestricted\n */\nexport class DomModule extends HTMLElement {\n\n /** @override */\n static get observedAttributes() { return ['id']; }\n\n /**\n * Retrieves the element specified by the css `selector` in the module\n * registered by `id`. For example, this.import('foo', 'img');\n * @param {string} id The id of the dom-module in which to search.\n * @param {string=} selector The css selector by which to find the element.\n * @return {Element} Returns the element which matches `selector` in the\n * module registered at the specified `id`.\n *\n * @export\n * @nocollapse Referred to indirectly in style-gather.js\n */\n static import(id, selector) {\n if (id) {\n let m = findModule(id);\n if (m && selector) {\n return m.querySelector(selector);\n }\n return m;\n }\n return null;\n }\n\n /* eslint-disable no-unused-vars */\n /**\n * @param {string} name Name of attribute.\n * @param {?string} old Old value of attribute.\n * @param {?string} value Current value of attribute.\n * @param {?string} namespace Attribute namespace.\n * @return {void}\n * @override\n */\n attributeChangedCallback(name, old, value, namespace) {\n if (old !== value) {\n this.register();\n }\n }\n /* eslint-enable no-unused-args */\n\n /**\n * The absolute URL of the original location of this `dom-module`.\n *\n * This value will differ from this element's `ownerDocument` in the\n * following ways:\n * - Takes into account any `assetpath` attribute added during bundling\n * to indicate the original location relative to the bundled location\n * - Uses the HTMLImports polyfill's `importForElement` API to ensure\n * the path is relative to the import document's location since\n * `ownerDocument` is not currently polyfilled\n */\n get assetpath() {\n // Don't override existing assetpath.\n if (!this.__assetpath) {\n // note: assetpath set via an attribute must be relative to this\n // element's location; accommodate polyfilled HTMLImports\n const owner = window.HTMLImports && HTMLImports.importForElement ?\n HTMLImports.importForElement(this) || document : this.ownerDocument;\n const url = resolveUrl(\n this.getAttribute('assetpath') || '', owner.baseURI);\n this.__assetpath = pathFromUrl(url);\n }\n return this.__assetpath;\n }\n\n /**\n * Registers the dom-module at a given id. This method should only be called\n * when a dom-module is imperatively created. For\n * example, `document.createElement('dom-module').register('foo')`.\n * @param {string=} id The id at which to register the dom-module.\n * @return {void}\n */\n register(id) {\n id = id || this.id;\n if (id) {\n // Under strictTemplatePolicy, reject and null out any re-registered\n // dom-module since it is ambiguous whether first-in or last-in is trusted\n if (strictTemplatePolicy && findModule(id) !== undefined) {\n setModule(id, null);\n throw new Error(`strictTemplatePolicy: dom-module ${id} re-registered`);\n }\n this.id = id;\n setModule(id, this);\n styleOutsideTemplateCheck(this);\n }\n }\n}\n\nDomModule.prototype['modules'] = modules;\n\ncustomElements.define('dom-module', DomModule);\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/**\n * Module with utilities for collection CSS text from `<templates>`, external\n * stylesheets, and `dom-module`s.\n *\n * @summary Module with utilities for collection CSS text from various sources.\n */\n\nimport { DomModule } from '../elements/dom-module.js';\nimport { resolveCss } from './resolve-url.js';\n\nconst MODULE_STYLE_LINK_SELECTOR = 'link[rel=import][type~=css]';\nconst INCLUDE_ATTR = 'include';\nconst SHADY_UNSCOPED_ATTR = 'shady-unscoped';\n\n/**\n * @param {string} moduleId .\n * @return {?DomModule} .\n */\nfunction importModule(moduleId) {\n return /** @type {?DomModule} */(DomModule.import(moduleId));\n}\n\nfunction styleForImport(importDoc) {\n // NOTE: polyfill affordance.\n // under the HTMLImports polyfill, there will be no 'body',\n // but the import pseudo-doc can be used directly.\n let container = importDoc.body ? importDoc.body : importDoc;\n const importCss = resolveCss(container.textContent,\n importDoc.baseURI);\n const style = document.createElement('style');\n style.textContent = importCss;\n return style;\n}\n\n/** @typedef {{assetpath: string}} */\nlet templateWithAssetPath; // eslint-disable-line no-unused-vars\n\n\n/**\n * Returns a list of <style> elements in a space-separated list of `dom-module`s.\n *\n * @function\n * @param {string} moduleIds List of dom-module id's within which to\n * search for css.\n * @return {!Array<!HTMLStyleElement>} Array of contained <style> elements\n */\nexport function stylesFromModules(moduleIds) {\n const modules = moduleIds.trim().split(/\\s+/);\n const styles = [];\n for (let i=0; i < modules.length; i++) {\n styles.push(...stylesFromModule(modules[i]));\n }\n return styles;\n}\n\n/**\n * Returns a list of <style> elements in a given `dom-module`.\n * Styles in a `dom-module` can come either from `<style>`s within the\n * first `<template>`, or else from one or more\n * `<link rel=\"import\" type=\"css\">` links outside the template.\n *\n * @param {string} moduleId dom-module id to gather styles from\n * @return {!Array<!HTMLStyleElement>} Array of contained styles.\n */\nexport function stylesFromModule(moduleId) {\n const m = importModule(moduleId);\n\n if (!m) {\n console.warn('Could not find style data in module named', moduleId);\n return [];\n }\n\n if (m._styles === undefined) {\n const styles = [];\n // module imports: <link rel=\"import\" type=\"css\">\n styles.push(..._stylesFromModuleImports(m));\n // include css from the first template in the module\n const template = /** @type {?HTMLTemplateElement} */(\n m.querySelector('template'));\n if (template) {\n styles.push(...stylesFromTemplate(template,\n /** @type {templateWithAssetPath} */(m).assetpath));\n }\n\n m._styles = styles;\n }\n\n return m._styles;\n}\n\n/**\n * Returns the `<style>` elements within a given template.\n *\n * @param {!HTMLTemplateElement} template Template to gather styles from\n * @param {string=} baseURI baseURI for style content\n * @return {!Array<!HTMLStyleElement>} Array of styles\n */\nexport function stylesFromTemplate(template, baseURI) {\n if (!template._styles) {\n const styles = [];\n // if element is a template, get content from its .content\n const e$ = template.content.querySelectorAll('style');\n for (let i=0; i < e$.length; i++) {\n let e = e$[i];\n // support style sharing by allowing styles to \"include\"\n // other dom-modules that contain styling\n let include = e.getAttribute(INCLUDE_ATTR);\n if (include) {\n styles.push(...stylesFromModules(include).filter(function(item, index, self) {\n return self.indexOf(item) === index;\n }));\n }\n if (baseURI) {\n e.textContent =\n resolveCss(e.textContent, /** @type {string} */ (baseURI));\n }\n styles.push(e);\n }\n template._styles = styles;\n }\n return template._styles;\n}\n\n/**\n * Returns a list of <style> elements from stylesheets loaded via `<link rel=\"import\" type=\"css\">` links within the specified `dom-module`.\n *\n * @param {string} moduleId Id of `dom-module` to gather CSS from\n * @return {!Array<!HTMLStyleElement>} Array of contained styles.\n */\nexport function stylesFromModuleImports(moduleId) {\n let m = importModule(moduleId);\n return m ? _stylesFromModuleImports(m) : [];\n}\n\n/**\n * @param {!HTMLElement} module dom-module element that could contain `<link rel=\"import\" type=\"css\">` styles\n * @return {!Array<!HTMLStyleElement>} Array of contained styles\n */\nfunction _stylesFromModuleImports(module) {\n const styles = [];\n const p$ = module.querySelectorAll(MODULE_STYLE_LINK_SELECTOR);\n for (let i=0; i < p$.length; i++) {\n let p = p$[i];\n if (p.import) {\n const importDoc = p.import;\n const unscoped = p.hasAttribute(SHADY_UNSCOPED_ATTR);\n if (unscoped && !importDoc._unscopedStyle) {\n const style = styleForImport(importDoc);\n style.setAttribute(SHADY_UNSCOPED_ATTR, '');\n importDoc._unscopedStyle = style;\n } else if (!importDoc._style) {\n importDoc._style = styleForImport(importDoc);\n }\n styles.push(unscoped ? importDoc._unscopedStyle : importDoc._style);\n }\n }\n return styles;\n}\n\n/**\n *\n * Returns CSS text of styles in a space-separated list of `dom-module`s.\n * Note: This method is deprecated, use `stylesFromModules` instead.\n *\n * @deprecated\n * @param {string} moduleIds List of dom-module id's within which to\n * search for css.\n * @return {string} Concatenated CSS content from specified `dom-module`s\n */\nexport function cssFromModules(moduleIds) {\n let modules = moduleIds.trim().split(/\\s+/);\n let cssText = '';\n for (let i=0; i < modules.length; i++) {\n cssText += cssFromModule(modules[i]);\n }\n return cssText;\n}\n\n/**\n * Returns CSS text of styles in a given `dom-module`. CSS in a `dom-module`\n * can come either from `<style>`s within the first `<template>`, or else\n * from one or more `<link rel=\"import\" type=\"css\">` links outside the\n * template.\n *\n * Any `<styles>` processed are removed from their original location.\n * Note: This method is deprecated, use `styleFromModule` instead.\n *\n * @deprecated\n * @param {string} moduleId dom-module id to gather styles from\n * @return {string} Concatenated CSS content from specified `dom-module`\n */\nexport function cssFromModule(moduleId) {\n let m = importModule(moduleId);\n if (m && m._cssText === undefined) {\n // module imports: <link rel=\"import\" type=\"css\">\n let cssText = _cssFromModuleImports(m);\n // include css from the first template in the module\n let t = /** @type {?HTMLTemplateElement} */(m.querySelector('template'));\n if (t) {\n cssText += cssFromTemplate(t,\n /** @type {templateWithAssetPath} */(m).assetpath);\n }\n m._cssText = cssText || null;\n }\n if (!m) {\n console.warn('Could not find style data in module named', moduleId);\n }\n return m && m._cssText || '';\n}\n\n/**\n * Returns CSS text of `<styles>` within a given template.\n *\n * Any `<styles>` processed are removed from their original location.\n * Note: This method is deprecated, use `styleFromTemplate` instead.\n *\n * @deprecated\n * @param {!HTMLTemplateElement} template Template to gather styles from\n * @param {string} baseURI Base URI to resolve the URL against\n * @return {string} Concatenated CSS content from specified template\n */\nexport function cssFromTemplate(template, baseURI) {\n let cssText = '';\n const e$ = stylesFromTemplate(template, baseURI);\n // if element is a template, get content from its .content\n for (let i=0; i < e$.length; i++) {\n let e = e$[i];\n if (e.parentNode) {\n e.parentNode.removeChild(e);\n }\n cssText += e.textContent;\n }\n return cssText;\n}\n\n/**\n * Returns CSS text from stylesheets loaded via `<link rel=\"import\" type=\"css\">`\n * links within the specified `dom-module`.\n *\n * Note: This method is deprecated, use `stylesFromModuleImports` instead.\n *\n * @deprecated\n *\n * @param {string} moduleId Id of `dom-module` to gather CSS from\n * @return {string} Concatenated CSS content from links in specified `dom-module`\n */\nexport function cssFromModuleImports(moduleId) {\n let m = importModule(moduleId);\n return m ? _cssFromModuleImports(m) : '';\n}\n\n/**\n * @deprecated\n * @param {!HTMLElement} module dom-module element that could contain `<link rel=\"import\" type=\"css\">` styles\n * @return {string} Concatenated CSS content from links in the dom-module\n */\nfunction _cssFromModuleImports(module) {\n let cssText = '';\n let styles = _stylesFromModuleImports(module);\n for (let i=0; i < styles.length; i++) {\n cssText += styles[i].textContent;\n }\n return cssText;\n}\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/* eslint-disable valid-jsdoc */\n/**\n * Node wrapper to ensure ShadowDOM safe operation regardless of polyfill\n * presence or mode. Note that with the introduction of `ShadyDOM.noPatch`,\n * a node wrapper must be used to access ShadowDOM API.\n * This is similar to using `Polymer.dom` but relies exclusively\n * on the presence of the ShadyDOM polyfill rather than requiring the loading\n * of legacy (Polymer.dom) API.\n * @type {function(Node):Node}\n */\nexport const wrap = (window['ShadyDOM'] && window['ShadyDOM']['noPatch'] && window['ShadyDOM']['wrap']) ?\n window['ShadyDOM']['wrap'] :\n (window['ShadyDOM'] ? (n) => ShadyDOM['patch'](n) : (n) => n);\n\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport './boot.js';\n\n/**\n * Module with utilities for manipulating structured data path strings.\n *\n * @summary Module with utilities for manipulating structured data path strings.\n */\n\n/**\n * Returns true if the given string is a structured data path (has dots).\n *\n * Example:\n *\n * ```\n * isPath('foo.bar.baz') // true\n * isPath('foo') // false\n * ```\n *\n * @param {string} path Path string\n * @return {boolean} True if the string contained one or more dots\n */\nexport function isPath(path) {\n return path.indexOf('.') >= 0;\n}\n\n/**\n * Returns the root property name for the given path.\n *\n * Example:\n *\n * ```\n * root('foo.bar.baz') // 'foo'\n * root('foo') // 'foo'\n * ```\n *\n * @param {string} path Path string\n * @return {string} Root property name\n */\nexport function root(path) {\n let dotIndex = path.indexOf('.');\n if (dotIndex === -1) {\n return path;\n }\n return path.slice(0, dotIndex);\n}\n\n/**\n * Given `base` is `foo.bar`, `foo` is an ancestor, `foo.bar` is not\n * Returns true if the given path is an ancestor of the base path.\n *\n * Example:\n *\n * ```\n * isAncestor('foo.bar', 'foo') // true\n * isAncestor('foo.bar', 'foo.bar') // false\n * isAncestor('foo.bar', 'foo.bar.baz') // false\n * ```\n *\n * @param {string} base Path string to test against.\n * @param {string} path Path string to test.\n * @return {boolean} True if `path` is an ancestor of `base`.\n */\nexport function isAncestor(base, path) {\n // base.startsWith(path + '.');\n return base.indexOf(path + '.') === 0;\n}\n\n/**\n * Given `base` is `foo.bar`, `foo.bar.baz` is an descendant\n *\n * Example:\n *\n * ```\n * isDescendant('foo.bar', 'foo.bar.baz') // true\n * isDescendant('foo.bar', 'foo.bar') // false\n * isDescendant('foo.bar', 'foo') // false\n * ```\n *\n * @param {string} base Path string to test against.\n * @param {string} path Path string to test.\n * @return {boolean} True if `path` is a descendant of `base`.\n */\nexport function isDescendant(base, path) {\n // path.startsWith(base + '.');\n return path.indexOf(base + '.') === 0;\n}\n\n/**\n * Replaces a previous base path with a new base path, preserving the\n * remainder of the path.\n *\n * User must ensure `path` has a prefix of `base`.\n *\n * Example:\n *\n * ```\n * translate('foo.bar', 'zot', 'foo.bar.baz') // 'zot.baz'\n * ```\n *\n * @param {string} base Current base string to remove\n * @param {string} newBase New base string to replace with\n * @param {string} path Path to translate\n * @return {string} Translated string\n */\nexport function translate(base, newBase, path) {\n return newBase + path.slice(base.length);\n}\n\n/**\n * @param {string} base Path string to test against\n * @param {string} path Path string to test\n * @return {boolean} True if `path` is equal to `base`\n */\nexport function matches(base, path) {\n return (base === path) ||\n isAncestor(base, path) ||\n isDescendant(base, path);\n}\n\n/**\n * Converts array-based paths to flattened path. String-based paths\n * are returned as-is.\n *\n * Example:\n *\n * ```\n * normalize(['foo.bar', 0, 'baz']) // 'foo.bar.0.baz'\n * normalize('foo.bar.0.baz') // 'foo.bar.0.baz'\n * ```\n *\n * @param {string | !Array<string|number>} path Input path\n * @return {string} Flattened path\n */\nexport function normalize(path) {\n if (Array.isArray(path)) {\n let parts = [];\n for (let i=0; i<path.length; i++) {\n let args = path[i].toString().split('.');\n for (let j=0; j<args.length; j++) {\n parts.push(args[j]);\n }\n }\n return parts.join('.');\n } else {\n return path;\n }\n}\n\n/**\n * Splits a path into an array of property names. Accepts either arrays\n * of path parts or strings.\n *\n * Example:\n *\n * ```\n * split(['foo.bar', 0, 'baz']) // ['foo', 'bar', '0', 'baz']\n * split('foo.bar.0.baz') // ['foo', 'bar', '0', 'baz']\n * ```\n *\n * @param {string | !Array<string|number>} path Input path\n * @return {!Array<string>} Array of path parts\n * @suppress {checkTypes}\n */\nexport function split(path) {\n if (Array.isArray(path)) {\n return normalize(path).split('.');\n }\n return path.toString().split('.');\n}\n\n/**\n * Reads a value from a path. If any sub-property in the path is `undefined`,\n * this method returns `undefined` (will never throw.\n *\n * @param {Object} root Object from which to dereference path from\n * @param {string | !Array<string|number>} path Path to read\n * @param {Object=} info If an object is provided to `info`, the normalized\n * (flattened) path will be set to `info.path`.\n * @return {*} Value at path, or `undefined` if the path could not be\n * fully dereferenced.\n */\nexport function get(root, path, info) {\n let prop = root;\n let parts = split(path);\n // Loop over path parts[0..n-1] and dereference\n for (let i=0; i<parts.length; i++) {\n if (!prop) {\n return;\n }\n let part = parts[i];\n prop = prop[part];\n }\n if (info) {\n info.path = parts.join('.');\n }\n return prop;\n}\n\n/**\n * Sets a value to a path. If any sub-property in the path is `undefined`,\n * this method will no-op.\n *\n * @param {Object} root Object from which to dereference path from\n * @param {string | !Array<string|number>} path Path to set\n * @param {*} value Value to set to path\n * @return {string | undefined} The normalized version of the input path\n */\nexport function set(root, path, value) {\n let prop = root;\n let parts = split(path);\n let last = parts[parts.length-1];\n if (parts.length > 1) {\n // Loop over path parts[0..n-2] and dereference\n for (let i=0; i<parts.length-1; i++) {\n let part = parts[i];\n prop = prop[part];\n if (!prop) {\n return;\n }\n }\n // Set value to object at end of path\n prop[last] = value;\n } else {\n // Simple property set\n prop[path] = value;\n }\n return parts.join('.');\n}\n\n/**\n * Returns true if the given string is a structured data path (has dots).\n *\n * This function is deprecated. Use `isPath` instead.\n *\n * Example:\n *\n * ```\n * isDeep('foo.bar.baz') // true\n * isDeep('foo') // false\n * ```\n *\n * @deprecated\n * @param {string} path Path string\n * @return {boolean} True if the string contained one or more dots\n */\nexport const isDeep = isPath;\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport './boot.js';\n\nconst caseMap = {};\nconst DASH_TO_CAMEL = /-[a-z]/g;\nconst CAMEL_TO_DASH = /([A-Z])/g;\n\n/**\n * @fileoverview Module with utilities for converting between \"dash-case\" and\n * \"camelCase\" identifiers.\n */\n\n/**\n * Converts \"dash-case\" identifier (e.g. `foo-bar-baz`) to \"camelCase\"\n * (e.g. `fooBarBaz`).\n *\n * @param {string} dash Dash-case identifier\n * @return {string} Camel-case representation of the identifier\n */\nexport function dashToCamelCase(dash) {\n return caseMap[dash] || (\n caseMap[dash] = dash.indexOf('-') < 0 ? dash : dash.replace(DASH_TO_CAMEL,\n (m) => m[1].toUpperCase()\n )\n );\n}\n\n/**\n * Converts \"camelCase\" identifier (e.g. `fooBarBaz`) to \"dash-case\"\n * (e.g. `foo-bar-baz`).\n *\n * @param {string} camel Camel-case identifier\n * @return {string} Dash-case representation of the identifier\n */\nexport function camelToDashCase(camel) {\n return caseMap[camel] || (\n caseMap[camel] = camel.replace(CAMEL_TO_DASH, '-$1').toLowerCase()\n );\n}\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/**\n * @fileoverview\n *\n * This module provides a number of strategies for enqueuing asynchronous\n * tasks. Each sub-module provides a standard `run(fn)` interface that returns a\n * handle, and a `cancel(handle)` interface for canceling async tasks before\n * they run.\n *\n * @summary Module that provides a number of strategies for enqueuing\n * asynchronous tasks.\n */\n\nimport './boot.js';\n\n// Microtask implemented using Mutation Observer\nlet microtaskCurrHandle = 0;\nlet microtaskLastHandle = 0;\nlet microtaskCallbacks = [];\nlet microtaskNodeContent = 0;\nlet microtaskScheduled = false;\nlet microtaskNode = document.createTextNode('');\nnew window.MutationObserver(microtaskFlush).observe(microtaskNode, {characterData: true});\n\nfunction microtaskFlush() {\n microtaskScheduled = false;\n const len = microtaskCallbacks.length;\n for (let i = 0; i < len; i++) {\n let cb = microtaskCallbacks[i];\n if (cb) {\n try {\n cb();\n } catch (e) {\n setTimeout(() => { throw e; });\n }\n }\n }\n microtaskCallbacks.splice(0, len);\n microtaskLastHandle += len;\n}\n\n/**\n * Async interface wrapper around `setTimeout`.\n *\n * @namespace\n * @summary Async interface wrapper around `setTimeout`.\n */\nconst timeOut = {\n /**\n * Returns a sub-module with the async interface providing the provided\n * delay.\n *\n * @memberof timeOut\n * @param {number=} delay Time to wait before calling callbacks in ms\n * @return {!AsyncInterface} An async timeout interface\n */\n after(delay) {\n return {\n run(fn) { return window.setTimeout(fn, delay); },\n cancel(handle) {\n window.clearTimeout(handle);\n }\n };\n },\n /**\n * Enqueues a function called in the next task.\n *\n * @memberof timeOut\n * @param {!Function} fn Callback to run\n * @param {number=} delay Delay in milliseconds\n * @return {number} Handle used for canceling task\n */\n run(fn, delay) {\n return window.setTimeout(fn, delay);\n },\n /**\n * Cancels a previously enqueued `timeOut` callback.\n *\n * @memberof timeOut\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n window.clearTimeout(handle);\n }\n};\nexport {timeOut};\n\n/**\n * Async interface wrapper around `requestAnimationFrame`.\n *\n * @namespace\n * @summary Async interface wrapper around `requestAnimationFrame`.\n */\nconst animationFrame = {\n /**\n * Enqueues a function called at `requestAnimationFrame` timing.\n *\n * @memberof animationFrame\n * @param {function(number):void} fn Callback to run\n * @return {number} Handle used for canceling task\n */\n run(fn) {\n return window.requestAnimationFrame(fn);\n },\n /**\n * Cancels a previously enqueued `animationFrame` callback.\n *\n * @memberof animationFrame\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n window.cancelAnimationFrame(handle);\n }\n};\nexport {animationFrame};\n\n/**\n * Async interface wrapper around `requestIdleCallback`. Falls back to\n * `setTimeout` on browsers that do not support `requestIdleCallback`.\n *\n * @namespace\n * @summary Async interface wrapper around `requestIdleCallback`.\n */\nconst idlePeriod = {\n /**\n * Enqueues a function called at `requestIdleCallback` timing.\n *\n * @memberof idlePeriod\n * @param {function(!IdleDeadline):void} fn Callback to run\n * @return {number} Handle used for canceling task\n */\n run(fn) {\n return window.requestIdleCallback ?\n window.requestIdleCallback(fn) :\n window.setTimeout(fn, 16);\n },\n /**\n * Cancels a previously enqueued `idlePeriod` callback.\n *\n * @memberof idlePeriod\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n window.cancelIdleCallback ?\n window.cancelIdleCallback(handle) :\n window.clearTimeout(handle);\n }\n};\nexport {idlePeriod};\n\n/**\n * Async interface for enqueuing callbacks that run at microtask timing.\n *\n * Note that microtask timing is achieved via a single `MutationObserver`,\n * and thus callbacks enqueued with this API will all run in a single\n * batch, and not interleaved with other microtasks such as promises.\n * Promises are avoided as an implementation choice for the time being\n * due to Safari bugs that cause Promises to lack microtask guarantees.\n *\n * @namespace\n * @summary Async interface for enqueuing callbacks that run at microtask\n * timing.\n */\nconst microTask = {\n\n /**\n * Enqueues a function called at microtask timing.\n *\n * @memberof microTask\n * @param {!Function=} callback Callback to run\n * @return {number} Handle used for canceling task\n */\n run(callback) {\n if (!microtaskScheduled) {\n microtaskScheduled = true;\n microtaskNode.textContent = microtaskNodeContent++;\n }\n microtaskCallbacks.push(callback);\n return microtaskCurrHandle++;\n },\n\n /**\n * Cancels a previously enqueued `microTask` callback.\n *\n * @memberof microTask\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n const idx = handle - microtaskLastHandle;\n if (idx >= 0) {\n if (!microtaskCallbacks[idx]) {\n throw new Error('invalid async handle: ' + handle);\n }\n microtaskCallbacks[idx] = null;\n }\n }\n\n};\nexport {microTask};\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport '../utils/boot.js';\n\nimport { dedupingMixin } from '../utils/mixin.js';\nimport { microTask } from '../utils/async.js';\nimport { wrap } from '../utils/wrap.js';\n\n/** @const {!AsyncInterface} */\nconst microtask = microTask;\n\n/**\n * Element class mixin that provides basic meta-programming for creating one\n * or more property accessors (getter/setter pair) that enqueue an async\n * (batched) `_propertiesChanged` callback.\n *\n * For basic usage of this mixin, call `MyClass.createProperties(props)`\n * once at class definition time to create property accessors for properties\n * named in props, implement `_propertiesChanged` to react as desired to\n * property changes, and implement `static get observedAttributes()` and\n * include lowercase versions of any property names that should be set from\n * attributes. Last, call `this._enableProperties()` in the element's\n * `connectedCallback` to enable the accessors.\n *\n * @mixinFunction\n * @polymer\n * @summary Element class mixin for reacting to property changes from\n * generated property accessors.\n * @template T\n * @param {function(new:T)} superClass Class to apply mixin to.\n * @return {function(new:T)} superClass with mixin applied.\n */\nexport const PropertiesChanged = dedupingMixin(\n /**\n * @template T\n * @param {function(new:T)} superClass Class to apply mixin to.\n * @return {function(new:T)} superClass with mixin applied.\n */\n (superClass) => {\n\n /**\n * @polymer\n * @mixinClass\n * @implements {Polymer_PropertiesChanged}\n * @unrestricted\n */\n class PropertiesChanged extends superClass {\n\n /**\n * Creates property accessors for the given property names.\n * @param {!Object} props Object whose keys are names of accessors.\n * @return {void}\n * @protected\n * @nocollapse\n */\n static createProperties(props) {\n const proto = this.prototype;\n for (let prop in props) {\n // don't stomp an existing accessor\n if (!(prop in proto)) {\n proto._createPropertyAccessor(prop);\n }\n }\n }\n\n /**\n * Returns an attribute name that corresponds to the given property.\n * The attribute name is the lowercased property name. Override to\n * customize this mapping.\n * @param {string} property Property to convert\n * @return {string} Attribute name corresponding to the given property.\n *\n * @protected\n * @nocollapse\n */\n static attributeNameForProperty(property) {\n return property.toLowerCase();\n }\n\n /**\n * Override point to provide a type to which to deserialize a value to\n * a given property.\n * @param {string} name Name of property\n *\n * @protected\n * @nocollapse\n */\n static typeForProperty(name) { } //eslint-disable-line no-unused-vars\n\n /**\n * Creates a setter/getter pair for the named property with its own\n * local storage. The getter returns the value in the local storage,\n * and the setter calls `_setProperty`, which updates the local storage\n * for the property and enqueues a `_propertiesChanged` callback.\n *\n * This method may be called on a prototype or an instance. Calling\n * this method may overwrite a property value that already exists on\n * the prototype/instance by creating the accessor.\n *\n * @param {string} property Name of the property\n * @param {boolean=} readOnly When true, no setter is created; the\n * protected `_setProperty` function must be used to set the property\n * @return {void}\n * @protected\n * @override\n */\n _createPropertyAccessor(property, readOnly) {\n this._addPropertyToAttributeMap(property);\n if (!this.hasOwnProperty(JSCompiler_renameProperty('__dataHasAccessor', this))) {\n this.__dataHasAccessor = Object.assign({}, this.__dataHasAccessor);\n }\n if (!this.__dataHasAccessor[property]) {\n this.__dataHasAccessor[property] = true;\n this._definePropertyAccessor(property, readOnly);\n }\n }\n\n /**\n * Adds the given `property` to a map matching attribute names\n * to property names, using `attributeNameForProperty`. This map is\n * used when deserializing attribute values to properties.\n *\n * @param {string} property Name of the property\n * @override\n */\n _addPropertyToAttributeMap(property) {\n if (!this.hasOwnProperty(JSCompiler_renameProperty('__dataAttributes', this))) {\n this.__dataAttributes = Object.assign({}, this.__dataAttributes);\n }\n // This check is technically not correct; it's an optimization that\n // assumes that if a _property_ name is already in the map (note this is\n // an attr->property map), the property mapped directly to the attribute\n // and it has already been mapped. This would fail if\n // `attributeNameForProperty` were overridden such that this was not the\n // case.\n let attr = this.__dataAttributes[property];\n if (!attr) {\n attr = this.constructor.attributeNameForProperty(property);\n this.__dataAttributes[attr] = property;\n }\n return attr;\n }\n\n /**\n * Defines a property accessor for the given property.\n * @param {string} property Name of the property\n * @param {boolean=} readOnly When true, no setter is created\n * @return {void}\n * @override\n */\n _definePropertyAccessor(property, readOnly) {\n Object.defineProperty(this, property, {\n /* eslint-disable valid-jsdoc */\n /** @this {PropertiesChanged} */\n get() {\n // Inline for perf instead of using `_getProperty`\n return this.__data[property];\n },\n /** @this {PropertiesChanged} */\n set: readOnly ? function () {} : function (value) {\n // Inline for perf instead of using `_setProperty`\n if (this._setPendingProperty(property, value, true)) {\n this._invalidateProperties();\n }\n }\n /* eslint-enable */\n });\n }\n\n constructor() {\n super();\n /** @type {boolean} */\n this.__dataEnabled = false;\n this.__dataReady = false;\n this.__dataInvalid = false;\n this.__data = {};\n this.__dataPending = null;\n this.__dataOld = null;\n this.__dataInstanceProps = null;\n /** @type {number} */\n // NOTE: used to track re-entrant calls to `_flushProperties`\n this.__dataCounter = 0;\n this.__serializing = false;\n this._initializeProperties();\n }\n\n /**\n * Lifecycle callback called when properties are enabled via\n * `_enableProperties`.\n *\n * Users may override this function to implement behavior that is\n * dependent on the element having its property data initialized, e.g.\n * from defaults (initialized from `constructor`, `_initializeProperties`),\n * `attributeChangedCallback`, or values propagated from host e.g. via\n * bindings. `super.ready()` must be called to ensure the data system\n * becomes enabled.\n *\n * @return {void}\n * @public\n * @override\n */\n ready() {\n this.__dataReady = true;\n this._flushProperties();\n }\n\n /**\n * Initializes the local storage for property accessors.\n *\n * Provided as an override point for performing any setup work prior\n * to initializing the property accessor system.\n *\n * @return {void}\n * @protected\n * @override\n */\n _initializeProperties() {\n // Capture instance properties; these will be set into accessors\n // during first flush. Don't set them here, since we want\n // these to overwrite defaults/constructor assignments\n for (let p in this.__dataHasAccessor) {\n if (this.hasOwnProperty(p)) {\n this.__dataInstanceProps = this.__dataInstanceProps || {};\n this.__dataInstanceProps[p] = this[p];\n delete this[p];\n }\n }\n }\n\n /**\n * Called at ready time with bag of instance properties that overwrote\n * accessors when the element upgraded.\n *\n * The default implementation sets these properties back into the\n * setter at ready time. This method is provided as an override\n * point for customizing or providing more efficient initialization.\n *\n * @param {Object} props Bag of property values that were overwritten\n * when creating property accessors.\n * @return {void}\n * @protected\n * @override\n */\n _initializeInstanceProperties(props) {\n Object.assign(this, props);\n }\n\n /**\n * Updates the local storage for a property (via `_setPendingProperty`)\n * and enqueues a `_proeprtiesChanged` callback.\n *\n * @param {string} property Name of the property\n * @param {*} value Value to set\n * @return {void}\n * @protected\n * @override\n */\n _setProperty(property, value) {\n if (this._setPendingProperty(property, value)) {\n this._invalidateProperties();\n }\n }\n\n /**\n * Returns the value for the given property.\n * @param {string} property Name of property\n * @return {*} Value for the given property\n * @protected\n * @override\n */\n _getProperty(property) {\n return this.__data[property];\n }\n\n /* eslint-disable no-unused-vars */\n /**\n * Updates the local storage for a property, records the previous value,\n * and adds it to the set of \"pending changes\" that will be passed to the\n * `_propertiesChanged` callback. This method does not enqueue the\n * `_propertiesChanged` callback.\n *\n * @param {string} property Name of the property\n * @param {*} value Value to set\n * @param {boolean=} ext Not used here; affordance for closure\n * @return {boolean} Returns true if the property changed\n * @protected\n * @override\n */\n _setPendingProperty(property, value, ext) {\n let old = this.__data[property];\n let changed = this._shouldPropertyChange(property, value, old);\n if (changed) {\n if (!this.__dataPending) {\n this.__dataPending = {};\n this.__dataOld = {};\n }\n // Ensure old is captured from the last turn\n if (this.__dataOld && !(property in this.__dataOld)) {\n this.__dataOld[property] = old;\n }\n this.__data[property] = value;\n this.__dataPending[property] = value;\n }\n return changed;\n }\n /* eslint-enable */\n\n /**\n * @param {string} property Name of the property\n * @return {boolean} Returns true if the property is pending.\n */\n _isPropertyPending(property) {\n return !!(this.__dataPending && this.__dataPending.hasOwnProperty(property));\n }\n\n /**\n * Marks the properties as invalid, and enqueues an async\n * `_propertiesChanged` callback.\n *\n * @return {void}\n * @protected\n * @override\n */\n _invalidateProperties() {\n if (!this.__dataInvalid && this.__dataReady) {\n this.__dataInvalid = true;\n microtask.run(() => {\n if (this.__dataInvalid) {\n this.__dataInvalid = false;\n this._flushProperties();\n }\n });\n }\n }\n\n /**\n * Call to enable property accessor processing. Before this method is\n * called accessor values will be set but side effects are\n * queued. When called, any pending side effects occur immediately.\n * For elements, generally `connectedCallback` is a normal spot to do so.\n * It is safe to call this method multiple times as it only turns on\n * property accessors once.\n *\n * @return {void}\n * @protected\n * @override\n */\n _enableProperties() {\n if (!this.__dataEnabled) {\n this.__dataEnabled = true;\n if (this.__dataInstanceProps) {\n this._initializeInstanceProperties(this.__dataInstanceProps);\n this.__dataInstanceProps = null;\n }\n this.ready();\n }\n }\n\n /**\n * Calls the `_propertiesChanged` callback with the current set of\n * pending changes (and old values recorded when pending changes were\n * set), and resets the pending set of changes. Generally, this method\n * should not be called in user code.\n *\n * @return {void}\n * @protected\n * @override\n */\n _flushProperties() {\n this.__dataCounter++;\n const props = this.__data;\n const changedProps = this.__dataPending;\n const old = this.__dataOld;\n if (this._shouldPropertiesChange(props, changedProps, old)) {\n this.__dataPending = null;\n this.__dataOld = null;\n this._propertiesChanged(props, changedProps, old);\n }\n this.__dataCounter--;\n }\n\n /**\n * Called in `_flushProperties` to determine if `_propertiesChanged`\n * should be called. The default implementation returns true if\n * properties are pending. Override to customize when\n * `_propertiesChanged` is called.\n * @param {!Object} currentProps Bag of all current accessor values\n * @param {?Object} changedProps Bag of properties changed since the last\n * call to `_propertiesChanged`\n * @param {?Object} oldProps Bag of previous values for each property\n * in `changedProps`\n * @return {boolean} true if changedProps is truthy\n * @override\n */\n _shouldPropertiesChange(currentProps, changedProps, oldProps) { // eslint-disable-line no-unused-vars\n return Boolean(changedProps);\n }\n\n /**\n * Callback called when any properties with accessors created via\n * `_createPropertyAccessor` have been set.\n *\n * @param {!Object} currentProps Bag of all current accessor values\n * @param {?Object} changedProps Bag of properties changed since the last\n * call to `_propertiesChanged`\n * @param {?Object} oldProps Bag of previous values for each property\n * in `changedProps`\n * @return {void}\n * @protected\n * @override\n */\n _propertiesChanged(currentProps, changedProps, oldProps) { // eslint-disable-line no-unused-vars\n }\n\n /**\n * Method called to determine whether a property value should be\n * considered as a change and cause the `_propertiesChanged` callback\n * to be enqueued.\n *\n * The default implementation returns `true` if a strict equality\n * check fails. The method always returns false for `NaN`.\n *\n * Override this method to e.g. provide stricter checking for\n * Objects/Arrays when using immutable patterns.\n *\n * @param {string} property Property name\n * @param {*} value New property value\n * @param {*} old Previous property value\n * @return {boolean} Whether the property should be considered a change\n * and enqueue a `_proeprtiesChanged` callback\n * @protected\n * @override\n */\n _shouldPropertyChange(property, value, old) {\n return (\n // Strict equality check\n (old !== value &&\n // This ensures (old==NaN, value==NaN) always returns false\n (old === old || value === value))\n );\n }\n\n /**\n * Implements native Custom Elements `attributeChangedCallback` to\n * set an attribute value to a property via `_attributeToProperty`.\n *\n * @param {string} name Name of attribute that changed\n * @param {?string} old Old attribute value\n * @param {?string} value New attribute value\n * @param {?string} namespace Attribute namespace.\n * @return {void}\n * @suppress {missingProperties} Super may or may not implement the callback\n * @override\n */\n attributeChangedCallback(name, old, value, namespace) {\n if (old !== value) {\n this._attributeToProperty(name, value);\n }\n if (super.attributeChangedCallback) {\n super.attributeChangedCallback(name, old, value, namespace);\n }\n }\n\n /**\n * Deserializes an attribute to its associated property.\n *\n * This method calls the `_deserializeValue` method to convert the string to\n * a typed value.\n *\n * @param {string} attribute Name of attribute to deserialize.\n * @param {?string} value of the attribute.\n * @param {*=} type type to deserialize to, defaults to the value\n * returned from `typeForProperty`\n * @return {void}\n * @override\n */\n _attributeToProperty(attribute, value, type) {\n if (!this.__serializing) {\n const map = this.__dataAttributes;\n const property = map && map[attribute] || attribute;\n this[property] = this._deserializeValue(value, type ||\n this.constructor.typeForProperty(property));\n }\n }\n\n /**\n * Serializes a property to its associated attribute.\n *\n * @suppress {invalidCasts} Closure can't figure out `this` is an element.\n *\n * @param {string} property Property name to reflect.\n * @param {string=} attribute Attribute name to reflect to.\n * @param {*=} value Property value to refect.\n * @return {void}\n * @override\n */\n _propertyToAttribute(property, attribute, value) {\n this.__serializing = true;\n value = (arguments.length < 3) ? this[property] : value;\n this._valueToNodeAttribute(/** @type {!HTMLElement} */(this), value,\n attribute || this.constructor.attributeNameForProperty(property));\n this.__serializing = false;\n }\n\n /**\n * Sets a typed value to an HTML attribute on a node.\n *\n * This method calls the `_serializeValue` method to convert the typed\n * value to a string. If the `_serializeValue` method returns `undefined`,\n * the attribute will be removed (this is the default for boolean\n * type `false`).\n *\n * @param {Element} node Element to set attribute to.\n * @param {*} value Value to serialize.\n * @param {string} attribute Attribute name to serialize to.\n * @return {void}\n * @override\n */\n _valueToNodeAttribute(node, value, attribute) {\n const str = this._serializeValue(value);\n if (attribute === 'class' || attribute === 'name' || attribute === 'slot') {\n node = /** @type {?Element} */(wrap(node));\n }\n if (str === undefined) {\n node.removeAttribute(attribute);\n } else {\n node.setAttribute(\n attribute,\n // Closure's type for `setAttribute`'s second parameter incorrectly\n // excludes `TrustedScript`.\n (str === '' && window.trustedTypes) ?\n /** @type {?} */ (window.trustedTypes.emptyScript) :\n str);\n }\n }\n\n /**\n * Converts a typed JavaScript value to a string.\n *\n * This method is called when setting JS property values to\n * HTML attributes. Users may override this method to provide\n * serialization for custom types.\n *\n * @param {*} value Property value to serialize.\n * @return {string | undefined} String serialized from the provided\n * property value.\n * @override\n */\n _serializeValue(value) {\n switch (typeof value) {\n case 'boolean':\n return value ? '' : undefined;\n default:\n return value != null ? value.toString() : undefined;\n }\n }\n\n /**\n * Converts a string to a typed JavaScript value.\n *\n * This method is called when reading HTML attribute values to\n * JS properties. Users may override this method to provide\n * deserialization for custom `type`s. Types for `Boolean`, `String`,\n * and `Number` convert attributes to the expected types.\n *\n * @param {?string} value Value to deserialize.\n * @param {*=} type Type to deserialize the string to.\n * @return {*} Typed value deserialized from the provided string.\n * @override\n */\n _deserializeValue(value, type) {\n switch (type) {\n case Boolean:\n return (value !== null);\n case Number:\n return Number(value);\n default:\n return value;\n }\n }\n\n }\n\n return PropertiesChanged;\n});\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport '../utils/boot.js';\n\nimport { dedupingMixin } from '../utils/mixin.js';\nimport { camelToDashCase, dashToCamelCase } from '../utils/case-map.js';\nimport { PropertiesChanged } from './properties-changed.js';\n\n// Save map of native properties; this forms a blacklist or properties\n// that won't have their values \"saved\" by `saveAccessorValue`, since\n// reading from an HTMLElement accessor from the context of a prototype throws\nconst nativeProperties = {};\nlet proto = HTMLElement.prototype;\nwhile (proto) {\n let props = Object.getOwnPropertyNames(proto);\n for (let i=0; i<props.length; i++) {\n nativeProperties[props[i]] = true;\n }\n proto = Object.getPrototypeOf(proto);\n}\n\nconst isTrustedType = (() => {\n if (!window.trustedTypes) {\n return () => false;\n }\n return (val) => trustedTypes.isHTML(val) ||\n trustedTypes.isScript(val) || trustedTypes.isScriptURL(val);\n})();\n\n/**\n * Used to save the value of a property that will be overridden with\n * an accessor. If the `model` is a prototype, the values will be saved\n * in `__dataProto`, and it's up to the user (or downstream mixin) to\n * decide how/when to set these values back into the accessors.\n * If `model` is already an instance (it has a `__data` property), then\n * the value will be set as a pending property, meaning the user should\n * call `_invalidateProperties` or `_flushProperties` to take effect\n *\n * @param {Object} model Prototype or instance\n * @param {string} property Name of property\n * @return {void}\n * @private\n */\nfunction saveAccessorValue(model, property) {\n // Don't read/store value for any native properties since they could throw\n if (!nativeProperties[property]) {\n let value = model[property];\n if (value !== undefined) {\n if (model.__data) {\n // Adding accessor to instance; update the property\n // It is the user's responsibility to call _flushProperties\n model._setPendingProperty(property, value);\n } else {\n // Adding accessor to proto; save proto's value for instance-time use\n if (!model.__dataProto) {\n model.__dataProto = {};\n } else if (!model.hasOwnProperty(JSCompiler_renameProperty('__dataProto', model))) {\n model.__dataProto = Object.create(model.__dataProto);\n }\n model.__dataProto[property] = value;\n }\n }\n }\n}\n\n/**\n * Element class mixin that provides basic meta-programming for creating one\n * or more property accessors (getter/setter pair) that enqueue an async\n * (batched) `_propertiesChanged` callback.\n *\n * For basic usage of this mixin:\n *\n * - Declare attributes to observe via the standard `static get\n * observedAttributes()`. Use `dash-case` attribute names to represent\n * `camelCase` property names.\n * - Implement the `_propertiesChanged` callback on the class.\n * - Call `MyClass.createPropertiesForAttributes()` **once** on the class to\n * generate property accessors for each observed attribute. This must be\n * called before the first instance is created, for example, by calling it\n * before calling `customElements.define`. It can also be called lazily from\n * the element's `constructor`, as long as it's guarded so that the call is\n * only made once, when the first instance is created.\n * - Call `this._enableProperties()` in the element's `connectedCallback` to\n * enable the accessors.\n *\n * Any `observedAttributes` will automatically be\n * deserialized via `attributeChangedCallback` and set to the associated\n * property using `dash-case`-to-`camelCase` convention.\n *\n * @mixinFunction\n * @polymer\n * @appliesMixin PropertiesChanged\n * @summary Element class mixin for reacting to property changes from\n * generated property accessors.\n * @template T\n * @param {function(new:T)} superClass Class to apply mixin to.\n * @return {function(new:T)} superClass with mixin applied.\n */\nexport const PropertyAccessors = dedupingMixin(superClass => {\n\n /**\n * @constructor\n * @implements {Polymer_PropertiesChanged}\n * @unrestricted\n * @private\n */\n const base = PropertiesChanged(superClass);\n\n /**\n * @polymer\n * @mixinClass\n * @implements {Polymer_PropertyAccessors}\n * @extends {base}\n * @unrestricted\n */\n class PropertyAccessors extends base {\n\n /**\n * Generates property accessors for all attributes in the standard\n * static `observedAttributes` array.\n *\n * Attribute names are mapped to property names using the `dash-case` to\n * `camelCase` convention\n *\n * @return {void}\n * @nocollapse\n */\n static createPropertiesForAttributes() {\n let a$ = /** @type {?} */ (this).observedAttributes;\n for (let i=0; i < a$.length; i++) {\n this.prototype._createPropertyAccessor(dashToCamelCase(a$[i]));\n }\n }\n\n /**\n * Returns an attribute name that corresponds to the given property.\n * By default, converts camel to dash case, e.g. `fooBar` to `foo-bar`.\n * @param {string} property Property to convert\n * @return {string} Attribute name corresponding to the given property.\n *\n * @protected\n * @nocollapse\n */\n static attributeNameForProperty(property) {\n return camelToDashCase(property);\n }\n\n /**\n * Overrides PropertiesChanged implementation to initialize values for\n * accessors created for values that already existed on the element\n * prototype.\n *\n * @return {void}\n * @protected\n * @override\n */\n _initializeProperties() {\n if (this.__dataProto) {\n this._initializeProtoProperties(this.__dataProto);\n this.__dataProto = null;\n }\n super._initializeProperties();\n }\n\n /**\n * Called at instance time with bag of properties that were overwritten\n * by accessors on the prototype when accessors were created.\n *\n * The default implementation sets these properties back into the\n * setter at instance time. This method is provided as an override\n * point for customizing or providing more efficient initialization.\n *\n * @param {Object} props Bag of property values that were overwritten\n * when creating property accessors.\n * @return {void}\n * @protected\n * @override\n */\n _initializeProtoProperties(props) {\n for (let p in props) {\n this._setProperty(p, props[p]);\n }\n }\n\n /**\n * Ensures the element has the given attribute. If it does not,\n * assigns the given value to the attribute.\n *\n * @suppress {invalidCasts} Closure can't figure out `this` is infact an\n * element\n *\n * @param {string} attribute Name of attribute to ensure is set.\n * @param {string} value of the attribute.\n * @return {void}\n * @override\n */\n _ensureAttribute(attribute, value) {\n const el = /** @type {!HTMLElement} */(this);\n if (!el.hasAttribute(attribute)) {\n this._valueToNodeAttribute(el, value, attribute);\n }\n }\n\n /**\n * Overrides PropertiesChanged implemention to serialize objects as JSON.\n *\n * @param {*} value Property value to serialize.\n * @return {string | undefined} String serialized from the provided property\n * value.\n * @override\n */\n _serializeValue(value) {\n /* eslint-disable no-fallthrough */\n switch (typeof value) {\n case 'object':\n if (value instanceof Date) {\n return value.toString();\n } else if (value) {\n if (isTrustedType(value)) {\n /**\n * Here `value` isn't actually a string, but it should be\n * passed into APIs that normally expect a string, like\n * elem.setAttribute.\n */\n return /** @type {?} */ (value);\n }\n try {\n return JSON.stringify(value);\n } catch(x) {\n return '';\n }\n }\n\n default:\n return super._serializeValue(value);\n }\n }\n\n /**\n * Converts a string to a typed JavaScript value.\n *\n * This method is called by Polymer when reading HTML attribute values to\n * JS properties. Users may override this method on Polymer element\n * prototypes to provide deserialization for custom `type`s. Note,\n * the `type` argument is the value of the `type` field provided in the\n * `properties` configuration object for a given property, and is\n * by convention the constructor for the type to deserialize.\n *\n *\n * @param {?string} value Attribute value to deserialize.\n * @param {*=} type Type to deserialize the string to.\n * @return {*} Typed value deserialized from the provided string.\n * @override\n */\n _deserializeValue(value, type) {\n /**\n * @type {*}\n */\n let outValue;\n switch (type) {\n case Object:\n try {\n outValue = JSON.parse(/** @type {string} */(value));\n } catch(x) {\n // allow non-JSON literals like Strings and Numbers\n outValue = value;\n }\n break;\n case Array:\n try {\n outValue = JSON.parse(/** @type {string} */(value));\n } catch(x) {\n outValue = null;\n console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${value}`);\n }\n break;\n case Date:\n outValue = isNaN(value) ? String(value) : Number(value);\n outValue = new Date(outValue);\n break;\n default:\n outValue = super._deserializeValue(value, type);\n break;\n }\n return outValue;\n }\n /* eslint-enable no-fallthrough */\n\n /**\n * Overrides PropertiesChanged implementation to save existing prototype\n * property value so that it can be reset.\n * @param {string} property Name of the property\n * @param {boolean=} readOnly When true, no setter is created\n *\n * When calling on a prototype, any overwritten values are saved in\n * `__dataProto`, and it is up to the subclasser to decide how/when\n * to set those properties back into the accessor. When calling on an\n * instance, the overwritten value is set via `_setPendingProperty`,\n * and the user should call `_invalidateProperties` or `_flushProperties`\n * for the values to take effect.\n * @protected\n * @return {void}\n * @override\n */\n _definePropertyAccessor(property, readOnly) {\n saveAccessorValue(this, property);\n super._definePropertyAccessor(property, readOnly);\n }\n\n /**\n * Returns true if this library created an accessor for the given property.\n *\n * @param {string} property Property name\n * @return {boolean} True if an accessor was created\n * @override\n */\n _hasAccessor(property) {\n return this.__dataHasAccessor && this.__dataHasAccessor[property];\n }\n\n /**\n * Returns true if the specified property has a pending change.\n *\n * @param {string} prop Property name\n * @return {boolean} True if property has a pending change\n * @protected\n * @override\n */\n _isPropertyPending(prop) {\n return Boolean(this.__dataPending && (prop in this.__dataPending));\n }\n\n }\n\n return PropertyAccessors;\n\n});\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport '../utils/boot.js';\n\nimport { dedupingMixin } from '../utils/mixin.js';\n\n// 1.x backwards-compatible auto-wrapper for template type extensions\n// This is a clear layering violation and gives favored-nation status to\n// dom-if and dom-repeat templates. This is a conceit we're choosing to keep\n// a.) to ease 1.x backwards-compatibility due to loss of `is`, and\n// b.) to maintain if/repeat capability in parser-constrained elements\n// (e.g. table, select) in lieu of native CE type extensions without\n// massive new invention in this space (e.g. directive system)\nconst templateExtensions = {\n 'dom-if': true,\n 'dom-repeat': true\n};\n\nlet placeholderBugDetect = false;\nlet placeholderBug = false;\n\nfunction hasPlaceholderBug() {\n if (!placeholderBugDetect) {\n placeholderBugDetect = true;\n const t = document.createElement('textarea');\n t.placeholder = 'a';\n placeholderBug = t.placeholder === t.textContent;\n }\n return placeholderBug;\n}\n\n/**\n * Some browsers have a bug with textarea, where placeholder text is copied as\n * a textnode child of the textarea.\n *\n * If the placeholder is a binding, this can break template stamping in two\n * ways.\n *\n * One issue is that when the `placeholder` attribute is removed when the\n * binding is processed, the textnode child of the textarea is deleted, and the\n * template info tries to bind into that node.\n *\n * With `legacyOptimizations` in use, when the template is stamped and the\n * `textarea.textContent` binding is processed, no corresponding node is found\n * because it was removed during parsing. An exception is generated when this\n * binding is updated.\n *\n * With `legacyOptimizations` not in use, the template is cloned before\n * processing and this changes the above behavior. The cloned template also has\n * a value property set to the placeholder and textContent. This prevents the\n * removal of the textContent when the placeholder attribute is removed.\n * Therefore the exception does not occur. However, there is an extra\n * unnecessary binding.\n *\n * @param {!Node} node Check node for placeholder bug\n * @return {void}\n */\nfunction fixPlaceholder(node) {\n if (hasPlaceholderBug() && node.localName === 'textarea' && node.placeholder\n && node.placeholder === node.textContent) {\n node.textContent = null;\n }\n}\n\n/**\n * Copies an attribute from one element to another, converting the value to a\n * `TrustedScript` if it is named like a Polymer template event listener.\n *\n * @param {!Element} dest The element to set the attribute on\n * @param {!Element} src The element to read the attribute from\n * @param {string} name The name of the attribute\n */\nconst copyAttributeWithTemplateEventPolicy = (() => {\n /**\n * This `TrustedTypePolicy` is used to work around a Chrome bug in the Trusted\n * Types API where any attribute that starts with `on` may only be set to a\n * `TrustedScript` value, even if that attribute would not cause an event\n * listener to be created. (See https://crbug.com/993268 for details.)\n *\n * Polymer's template system allows `<dom-if>` and `<dom-repeat>` to be\n * written using the `<template is=\"...\">` syntax, even if there is no UA\n * support for custom element extensions of built-in elements. In doing so, it\n * copies attributes from the original `<template>` to a newly created\n * `<dom-if>` or `<dom-repeat>`, which can trigger the bug mentioned above if\n * any of those attributes uses Polymer's `on-` syntax for event listeners.\n * (Note, the value of these `on-` listeners is not evaluated as script: it is\n * the name of a member function of a component that will be used as the event\n * listener.)\n *\n * @type {!TrustedTypePolicy|undefined}\n */\n const polymerTemplateEventAttributePolicy = window.trustedTypes &&\n window.trustedTypes.createPolicy(\n 'polymer-template-event-attribute-policy', {\n createScript: x => x,\n });\n\n return (dest, src, name) => {\n const value = src.getAttribute(name);\n\n if (polymerTemplateEventAttributePolicy && name.startsWith('on-')) {\n dest.setAttribute(\n name, polymerTemplateEventAttributePolicy.createScript(value, name));\n return;\n }\n\n dest.setAttribute(name, value);\n };\n})();\n\nfunction wrapTemplateExtension(node) {\n let is = node.getAttribute('is');\n if (is && templateExtensions[is]) {\n let t = node;\n t.removeAttribute('is');\n node = t.ownerDocument.createElement(is);\n t.parentNode.replaceChild(node, t);\n node.appendChild(t);\n while(t.attributes.length) {\n const {name} = t.attributes[0];\n copyAttributeWithTemplateEventPolicy(node, t, name);\n t.removeAttribute(name);\n }\n }\n return node;\n}\n\nfunction findTemplateNode(root, nodeInfo) {\n // recursively ascend tree until we hit root\n let parent = nodeInfo.parentInfo && findTemplateNode(root, nodeInfo.parentInfo);\n // unwind the stack, returning the indexed node at each level\n if (parent) {\n // note: marginally faster than indexing via childNodes\n // (http://jsperf.com/childnodes-lookup)\n for (let n=parent.firstChild, i=0; n; n=n.nextSibling) {\n if (nodeInfo.parentIndex === i++) {\n return n;\n }\n }\n } else {\n return root;\n }\n}\n\n// construct `$` map (from id annotations)\nfunction applyIdToMap(inst, map, node, nodeInfo) {\n if (nodeInfo.id) {\n map[nodeInfo.id] = node;\n }\n}\n\n// install event listeners (from event annotations)\nfunction applyEventListener(inst, node, nodeInfo) {\n if (nodeInfo.events && nodeInfo.events.length) {\n for (let j=0, e$=nodeInfo.events, e; (j<e$.length) && (e=e$[j]); j++) {\n inst._addMethodEventListenerToNode(node, e.name, e.value, inst);\n }\n }\n}\n\n// push configuration references at configure time\nfunction applyTemplateInfo(inst, node, nodeInfo, parentTemplateInfo) {\n if (nodeInfo.templateInfo) {\n // Give the node an instance of this templateInfo and set its parent\n node._templateInfo = nodeInfo.templateInfo;\n node._parentTemplateInfo = parentTemplateInfo;\n }\n}\n\nfunction createNodeEventHandler(context, eventName, methodName) {\n // Instances can optionally have a _methodHost which allows redirecting where\n // to find methods. Currently used by `templatize`.\n context = context._methodHost || context;\n let handler = function(e) {\n if (context[methodName]) {\n context[methodName](e, e.detail);\n } else {\n console.warn('listener method `' + methodName + '` not defined');\n }\n };\n return handler;\n}\n\n/**\n * Element mixin that provides basic template parsing and stamping, including\n * the following template-related features for stamped templates:\n *\n * - Declarative event listeners (`on-eventname=\"listener\"`)\n * - Map of node id's to stamped node instances (`this.$.id`)\n * - Nested template content caching/removal and re-installation (performance\n * optimization)\n *\n * @mixinFunction\n * @polymer\n * @summary Element class mixin that provides basic template parsing and stamping\n */\nexport const TemplateStamp = dedupingMixin(\n /**\n * @template T\n * @param {function(new:T)} superClass Class to apply mixin to.\n * @return {function(new:T)} superClass with mixin applied.\n */\n (superClass) => {\n\n /**\n * @polymer\n * @mixinClass\n * @implements {Polymer_TemplateStamp}\n */\n class TemplateStamp extends superClass {\n\n /**\n * Scans a template to produce template metadata.\n *\n * Template-specific metadata are stored in the object returned, and node-\n * specific metadata are stored in objects in its flattened `nodeInfoList`\n * array. Only nodes in the template that were parsed as nodes of\n * interest contain an object in `nodeInfoList`. Each `nodeInfo` object\n * contains an `index` (`childNodes` index in parent) and optionally\n * `parent`, which points to node info of its parent (including its index).\n *\n * The template metadata object returned from this method has the following\n * structure (many fields optional):\n *\n * ```js\n * {\n * // Flattened list of node metadata (for nodes that generated metadata)\n * nodeInfoList: [\n * {\n * // `id` attribute for any nodes with id's for generating `$` map\n * id: {string},\n * // `on-event=\"handler\"` metadata\n * events: [\n * {\n * name: {string}, // event name\n * value: {string}, // handler method name\n * }, ...\n * ],\n * // Notes when the template contained a `<slot>` for shady DOM\n * // optimization purposes\n * hasInsertionPoint: {boolean},\n * // For nested `<template>`` nodes, nested template metadata\n * templateInfo: {object}, // nested template metadata\n * // Metadata to allow efficient retrieval of instanced node\n * // corresponding to this metadata\n * parentInfo: {number}, // reference to parent nodeInfo>\n * parentIndex: {number}, // index in parent's `childNodes` collection\n * infoIndex: {number}, // index of this `nodeInfo` in `templateInfo.nodeInfoList`\n * },\n * ...\n * ],\n * // When true, the template had the `strip-whitespace` attribute\n * // or was nested in a template with that setting\n * stripWhitespace: {boolean},\n * // For nested templates, nested template content is moved into\n * // a document fragment stored here; this is an optimization to\n * // avoid the cost of nested template cloning\n * content: {DocumentFragment}\n * }\n * ```\n *\n * This method kicks off a recursive treewalk as follows:\n *\n * ```\n * _parseTemplate <---------------------+\n * _parseTemplateContent |\n * _parseTemplateNode <------------|--+\n * _parseTemplateNestedTemplate --+ |\n * _parseTemplateChildNodes ---------+\n * _parseTemplateNodeAttributes\n * _parseTemplateNodeAttribute\n *\n * ```\n *\n * These methods may be overridden to add custom metadata about templates\n * to either `templateInfo` or `nodeInfo`.\n *\n * Note that this method may be destructive to the template, in that\n * e.g. event annotations may be removed after being noted in the\n * template metadata.\n *\n * @param {!HTMLTemplateElement} template Template to parse\n * @param {TemplateInfo=} outerTemplateInfo Template metadata from the outer\n * template, for parsing nested templates\n * @return {!TemplateInfo} Parsed template metadata\n * @nocollapse\n */\n static _parseTemplate(template, outerTemplateInfo) {\n // since a template may be re-used, memo-ize metadata\n if (!template._templateInfo) {\n // TODO(rictic): fix typing\n let /** ? */ templateInfo = template._templateInfo = {};\n templateInfo.nodeInfoList = [];\n templateInfo.nestedTemplate = Boolean(outerTemplateInfo);\n templateInfo.stripWhiteSpace =\n (outerTemplateInfo && outerTemplateInfo.stripWhiteSpace) ||\n (template.hasAttribute && template.hasAttribute('strip-whitespace'));\n // TODO(rictic): fix typing\n this._parseTemplateContent(\n template, templateInfo, /** @type {?} */ ({parent: null}));\n }\n return template._templateInfo;\n }\n\n /**\n * See docs for _parseTemplateNode.\n *\n * @param {!HTMLTemplateElement} template .\n * @param {!TemplateInfo} templateInfo .\n * @param {!NodeInfo} nodeInfo .\n * @return {boolean} .\n * @nocollapse\n */\n static _parseTemplateContent(template, templateInfo, nodeInfo) {\n return this._parseTemplateNode(template.content, templateInfo, nodeInfo);\n }\n\n /**\n * Parses template node and adds template and node metadata based on\n * the current node, and its `childNodes` and `attributes`.\n *\n * This method may be overridden to add custom node or template specific\n * metadata based on this node.\n *\n * @param {Node} node Node to parse\n * @param {!TemplateInfo} templateInfo Template metadata for current template\n * @param {!NodeInfo} nodeInfo Node metadata for current template.\n * @return {boolean} `true` if the visited node added node-specific\n * metadata to `nodeInfo`\n * @nocollapse\n */\n static _parseTemplateNode(node, templateInfo, nodeInfo) {\n let noted = false;\n let element = /** @type {!HTMLTemplateElement} */ (node);\n if (element.localName == 'template' && !element.hasAttribute('preserve-content')) {\n noted = this._parseTemplateNestedTemplate(element, templateInfo, nodeInfo) || noted;\n } else if (element.localName === 'slot') {\n // For ShadyDom optimization, indicating there is an insertion point\n templateInfo.hasInsertionPoint = true;\n }\n fixPlaceholder(element);\n if (element.firstChild) {\n this._parseTemplateChildNodes(element, templateInfo, nodeInfo);\n }\n if (element.hasAttributes && element.hasAttributes()) {\n noted = this._parseTemplateNodeAttributes(element, templateInfo, nodeInfo) || noted;\n }\n // Checking `nodeInfo.noted` allows a child node of this node (who gets\n // access to `parentInfo`) to cause the parent to be noted, which\n // otherwise has no return path via `_parseTemplateChildNodes` (used by\n // some optimizations)\n return noted || nodeInfo.noted;\n }\n\n /**\n * Parses template child nodes for the given root node.\n *\n * This method also wraps whitelisted legacy template extensions\n * (`is=\"dom-if\"` and `is=\"dom-repeat\"`) with their equivalent element\n * wrappers, collapses text nodes, and strips whitespace from the template\n * if the `templateInfo.stripWhitespace` setting was provided.\n *\n * @param {Node} root Root node whose `childNodes` will be parsed\n * @param {!TemplateInfo} templateInfo Template metadata for current template\n * @param {!NodeInfo} nodeInfo Node metadata for current template.\n * @return {void}\n */\n static _parseTemplateChildNodes(root, templateInfo, nodeInfo) {\n if (root.localName === 'script' || root.localName === 'style') {\n return;\n }\n for (let node=root.firstChild, parentIndex=0, next; node; node=next) {\n // Wrap templates\n if (node.localName == 'template') {\n node = wrapTemplateExtension(node);\n }\n // collapse adjacent textNodes: fixes an IE issue that can cause\n // text nodes to be inexplicably split =(\n // note that root.normalize() should work but does not so we do this\n // manually.\n next = node.nextSibling;\n if (node.nodeType === Node.TEXT_NODE) {\n let /** Node */ n = next;\n while (n && (n.nodeType === Node.TEXT_NODE)) {\n node.textContent += n.textContent;\n next = n.nextSibling;\n root.removeChild(n);\n n = next;\n }\n // optionally strip whitespace\n if (templateInfo.stripWhiteSpace && !node.textContent.trim()) {\n root.removeChild(node);\n continue;\n }\n }\n let childInfo =\n /** @type {!NodeInfo} */ ({parentIndex, parentInfo: nodeInfo});\n if (this._parseTemplateNode(node, templateInfo, childInfo)) {\n childInfo.infoIndex = templateInfo.nodeInfoList.push(childInfo) - 1;\n }\n // Increment if not removed\n if (node.parentNode) {\n parentIndex++;\n }\n }\n }\n\n /**\n * Parses template content for the given nested `<template>`.\n *\n * Nested template info is stored as `templateInfo` in the current node's\n * `nodeInfo`. `template.content` is removed and stored in `templateInfo`.\n * It will then be the responsibility of the host to set it back to the\n * template and for users stamping nested templates to use the\n * `_contentForTemplate` method to retrieve the content for this template\n * (an optimization to avoid the cost of cloning nested template content).\n *\n * @param {HTMLTemplateElement} node Node to parse (a <template>)\n * @param {TemplateInfo} outerTemplateInfo Template metadata for current template\n * that includes the template `node`\n * @param {!NodeInfo} nodeInfo Node metadata for current template.\n * @return {boolean} `true` if the visited node added node-specific\n * metadata to `nodeInfo`\n * @nocollapse\n */\n static _parseTemplateNestedTemplate(node, outerTemplateInfo, nodeInfo) {\n // TODO(rictic): the type of node should be non-null\n let element = /** @type {!HTMLTemplateElement} */ (node);\n let templateInfo = this._parseTemplate(element, outerTemplateInfo);\n let content = templateInfo.content =\n element.content.ownerDocument.createDocumentFragment();\n content.appendChild(element.content);\n nodeInfo.templateInfo = templateInfo;\n return true;\n }\n\n /**\n * Parses template node attributes and adds node metadata to `nodeInfo`\n * for nodes of interest.\n *\n * @param {Element} node Node to parse\n * @param {!TemplateInfo} templateInfo Template metadata for current\n * template\n * @param {!NodeInfo} nodeInfo Node metadata for current template.\n * @return {boolean} `true` if the visited node added node-specific\n * metadata to `nodeInfo`\n * @nocollapse\n */\n static _parseTemplateNodeAttributes(node, templateInfo, nodeInfo) {\n // Make copy of original attribute list, since the order may change\n // as attributes are added and removed\n let noted = false;\n let attrs = Array.from(node.attributes);\n for (let i=attrs.length-1, a; (a=attrs[i]); i--) {\n noted = this._parseTemplateNodeAttribute(node, templateInfo, nodeInfo, a.name, a.value) || noted;\n }\n return noted;\n }\n\n /**\n * Parses a single template node attribute and adds node metadata to\n * `nodeInfo` for attributes of interest.\n *\n * This implementation adds metadata for `on-event=\"handler\"` attributes\n * and `id` attributes.\n *\n * @param {Element} node Node to parse\n * @param {!TemplateInfo} templateInfo Template metadata for current template\n * @param {!NodeInfo} nodeInfo Node metadata for current template.\n * @param {string} name Attribute name\n * @param {string} value Attribute value\n * @return {boolean} `true` if the visited node added node-specific\n * metadata to `nodeInfo`\n * @nocollapse\n */\n static _parseTemplateNodeAttribute(node, templateInfo, nodeInfo, name, value) {\n // events (on-*)\n if (name.slice(0, 3) === 'on-') {\n node.removeAttribute(name);\n nodeInfo.events = nodeInfo.events || [];\n nodeInfo.events.push({\n name: name.slice(3),\n value\n });\n return true;\n }\n // static id\n else if (name === 'id') {\n nodeInfo.id = value;\n return true;\n }\n return false;\n }\n\n /**\n * Returns the `content` document fragment for a given template.\n *\n * For nested templates, Polymer performs an optimization to cache nested\n * template content to avoid the cost of cloning deeply nested templates.\n * This method retrieves the cached content for a given template.\n *\n * @param {HTMLTemplateElement} template Template to retrieve `content` for\n * @return {DocumentFragment} Content fragment\n * @nocollapse\n */\n static _contentForTemplate(template) {\n let templateInfo = /** @type {HTMLTemplateElementWithInfo} */ (template)._templateInfo;\n return (templateInfo && templateInfo.content) || template.content;\n }\n\n /**\n * Clones the provided template content and returns a document fragment\n * containing the cloned dom.\n *\n * The template is parsed (once and memoized) using this library's\n * template parsing features, and provides the following value-added\n * features:\n * * Adds declarative event listeners for `on-event=\"handler\"` attributes\n * * Generates an \"id map\" for all nodes with id's under `$` on returned\n * document fragment\n * * Passes template info including `content` back to templates as\n * `_templateInfo` (a performance optimization to avoid deep template\n * cloning)\n *\n * Note that the memoized template parsing process is destructive to the\n * template: attributes for bindings and declarative event listeners are\n * removed after being noted in notes, and any nested `<template>.content`\n * is removed and stored in notes as well.\n *\n * @param {!HTMLTemplateElement} template Template to stamp\n * @param {TemplateInfo=} templateInfo Optional template info associated\n * with the template to be stamped; if omitted the template will be\n * automatically parsed.\n * @return {!StampedTemplate} Cloned template content\n * @override\n */\n _stampTemplate(template, templateInfo) {\n // Polyfill support: bootstrap the template if it has not already been\n if (template && !template.content &&\n window.HTMLTemplateElement && HTMLTemplateElement.decorate) {\n HTMLTemplateElement.decorate(template);\n }\n // Accepting the `templateInfo` via an argument allows for creating\n // instances of the `templateInfo` by the caller, useful for adding\n // instance-time information to the prototypical data\n templateInfo = templateInfo || this.constructor._parseTemplate(template);\n let nodeInfo = templateInfo.nodeInfoList;\n let content = templateInfo.content || template.content;\n let dom = /** @type {DocumentFragment} */ (document.importNode(content, true));\n // NOTE: ShadyDom optimization indicating there is an insertion point\n dom.__noInsertionPoint = !templateInfo.hasInsertionPoint;\n let nodes = dom.nodeList = new Array(nodeInfo.length);\n dom.$ = {};\n for (let i=0, l=nodeInfo.length, info; (i<l) && (info=nodeInfo[i]); i++) {\n let node = nodes[i] = findTemplateNode(dom, info);\n applyIdToMap(this, dom.$, node, info);\n applyTemplateInfo(this, node, info, templateInfo);\n applyEventListener(this, node, info);\n }\n dom = /** @type {!StampedTemplate} */(dom); // eslint-disable-line no-self-assign\n return dom;\n }\n\n /**\n * Adds an event listener by method name for the event provided.\n *\n * This method generates a handler function that looks up the method\n * name at handling time.\n *\n * @param {!EventTarget} node Node to add listener on\n * @param {string} eventName Name of event\n * @param {string} methodName Name of method\n * @param {*=} context Context the method will be called on (defaults\n * to `node`)\n * @return {Function} Generated handler function\n * @override\n */\n _addMethodEventListenerToNode(node, eventName, methodName, context) {\n context = context || node;\n let handler = createNodeEventHandler(context, eventName, methodName);\n this._addEventListenerToNode(node, eventName, handler);\n return handler;\n }\n\n /**\n * Override point for adding custom or simulated event handling.\n *\n * @param {!EventTarget} node Node to add event listener to\n * @param {string} eventName Name of event\n * @param {function(!Event):void} handler Listener function to add\n * @return {void}\n * @override\n */\n _addEventListenerToNode(node, eventName, handler) {\n node.addEventListener(eventName, handler);\n }\n\n /**\n * Override point for adding custom or simulated event handling.\n *\n * @param {!EventTarget} node Node to remove event listener from\n * @param {string} eventName Name of event\n * @param {function(!Event):void} handler Listener function to remove\n * @return {void}\n * @override\n */\n _removeEventListenerFromNode(node, eventName, handler) {\n node.removeEventListener(eventName, handler);\n }\n\n }\n\n return TemplateStamp;\n\n});\n","/**\n * @fileoverview\n * @suppress {checkPrototypalTypes}\n * @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\nimport '../utils/boot.js';\nimport { wrap } from '../utils/wrap.js';\nimport { dedupingMixin } from '../utils/mixin.js';\nimport { root, isAncestor, isDescendant, get, translate, isPath, set, normalize } from '../utils/path.js';\n/* for notify, reflect */\nimport { camelToDashCase, dashToCamelCase } from '../utils/case-map.js';\nimport { PropertyAccessors } from './property-accessors.js';\n/* for annotated effects */\nimport { TemplateStamp } from './template-stamp.js';\nimport { sanitizeDOMValue, legacyUndefined, orderedComputed, removeNestedTemplates, fastDomIf } from '../utils/settings.js';\n\n// Monotonically increasing unique ID used for de-duping effects triggered\n// from multiple properties in the same turn\nlet dedupeId = 0;\n\nconst NOOP = [];\n\n/**\n * Property effect types; effects are stored on the prototype using these keys\n * @enum {string}\n */\nconst TYPES = {\n COMPUTE: '__computeEffects',\n REFLECT: '__reflectEffects',\n NOTIFY: '__notifyEffects',\n PROPAGATE: '__propagateEffects',\n OBSERVE: '__observeEffects',\n READ_ONLY: '__readOnly'\n};\n\nconst COMPUTE_INFO = '__computeInfo';\n\n/** @const {!RegExp} */\nconst capitalAttributeRegex = /[A-Z]/;\n\n/**\n * @typedef {{\n * name: (string | undefined),\n * structured: (boolean | undefined),\n * wildcard: (boolean | undefined)\n * }}\n */\nlet DataTrigger; //eslint-disable-line no-unused-vars\n\n/**\n * @typedef {{\n * info: ?,\n * trigger: (!DataTrigger | undefined),\n * fn: (!Function | undefined)\n * }}\n */\nlet DataEffect; //eslint-disable-line no-unused-vars\n\n/**\n * Ensures that the model has an own-property map of effects for the given type.\n * The model may be a prototype or an instance.\n *\n * Property effects are stored as arrays of effects by property in a map,\n * by named type on the model. e.g.\n *\n * __computeEffects: {\n * foo: [ ... ],\n * bar: [ ... ]\n * }\n *\n * If the model does not yet have an effect map for the type, one is created\n * and returned. If it does, but it is not an own property (i.e. the\n * prototype had effects), the the map is deeply cloned and the copy is\n * set on the model and returned, ready for new effects to be added.\n *\n * @param {Object} model Prototype or instance\n * @param {string} type Property effect type\n * @param {boolean=} cloneArrays Clone any arrays assigned to the map when\n * extending a superclass map onto this subclass\n * @return {Object} The own-property map of effects for the given type\n * @private\n */\nfunction ensureOwnEffectMap(model, type, cloneArrays) {\n let effects = model[type];\n if (!effects) {\n effects = model[type] = {};\n } else if (!model.hasOwnProperty(type)) {\n effects = model[type] = Object.create(model[type]);\n if (cloneArrays) {\n for (let p in effects) {\n let protoFx = effects[p];\n // Perf optimization over Array.slice\n let instFx = effects[p] = Array(protoFx.length);\n for (let i=0; i<protoFx.length; i++) {\n instFx[i] = protoFx[i];\n }\n }\n }\n }\n return effects;\n}\n\n// -- effects ----------------------------------------------\n\n/**\n * Runs all effects of a given type for the given set of property changes\n * on an instance.\n *\n * @param {!Polymer_PropertyEffects} inst The instance with effects to run\n * @param {?Object} effects Object map of property-to-Array of effects\n * @param {?Object} props Bag of current property changes\n * @param {?Object=} oldProps Bag of previous values for changed properties\n * @param {boolean=} hasPaths True with `props` contains one or more paths\n * @param {*=} extraArgs Additional metadata to pass to effect function\n * @return {boolean} True if an effect ran for this property\n * @private\n */\nfunction runEffects(inst, effects, props, oldProps, hasPaths, extraArgs) {\n if (effects) {\n let ran = false;\n const id = dedupeId++;\n for (let prop in props) {\n // Inline `runEffectsForProperty` for perf.\n let rootProperty = hasPaths ? root(prop) : prop;\n let fxs = effects[rootProperty];\n if (fxs) {\n for (let i=0, l=fxs.length, fx; (i<l) && (fx=fxs[i]); i++) {\n if ((!fx.info || fx.info.lastRun !== id) &&\n (!hasPaths || pathMatchesTrigger(prop, fx.trigger))) {\n if (fx.info) {\n fx.info.lastRun = id;\n }\n fx.fn(inst, prop, props, oldProps, fx.info, hasPaths, extraArgs);\n ran = true;\n }\n }\n }\n }\n return ran;\n }\n return false;\n}\n\n/**\n * Runs a list of effects for a given property.\n *\n * @param {!Polymer_PropertyEffects} inst The instance with effects to run\n * @param {!Object} effects Object map of property-to-Array of effects\n * @param {number} dedupeId Counter used for de-duping effects\n * @param {string} prop Name of changed property\n * @param {*} props Changed properties\n * @param {*} oldProps Old properties\n * @param {boolean=} hasPaths True with `props` contains one or more paths\n * @param {*=} extraArgs Additional metadata to pass to effect function\n * @return {boolean} True if an effect ran for this property\n * @private\n */\nfunction runEffectsForProperty(inst, effects, dedupeId, prop, props, oldProps, hasPaths, extraArgs) {\n let ran = false;\n let rootProperty = hasPaths ? root(prop) : prop;\n let fxs = effects[rootProperty];\n if (fxs) {\n for (let i=0, l=fxs.length, fx; (i<l) && (fx=fxs[i]); i++) {\n if ((!fx.info || fx.info.lastRun !== dedupeId) &&\n (!hasPaths || pathMatchesTrigger(prop, fx.trigger))) {\n if (fx.info) {\n fx.info.lastRun = dedupeId;\n }\n fx.fn(inst, prop, props, oldProps, fx.info, hasPaths, extraArgs);\n ran = true;\n }\n }\n }\n return ran;\n}\n\n/**\n * Determines whether a property/path that has changed matches the trigger\n * criteria for an effect. A trigger is a descriptor with the following\n * structure, which matches the descriptors returned from `parseArg`.\n * e.g. for `foo.bar.*`:\n * ```\n * trigger: {\n * name: 'a.b',\n * structured: true,\n * wildcard: true\n * }\n * ```\n * If no trigger is given, the path is deemed to match.\n *\n * @param {string} path Path or property that changed\n * @param {?DataTrigger} trigger Descriptor\n * @return {boolean} Whether the path matched the trigger\n */\nfunction pathMatchesTrigger(path, trigger) {\n if (trigger) {\n let triggerPath = /** @type {string} */ (trigger.name);\n return (triggerPath == path) ||\n !!(trigger.structured && isAncestor(triggerPath, path)) ||\n !!(trigger.wildcard && isDescendant(triggerPath, path));\n } else {\n return true;\n }\n}\n\n/**\n * Implements the \"observer\" effect.\n *\n * Calls the method with `info.methodName` on the instance, passing the\n * new and old values.\n *\n * @param {!Polymer_PropertyEffects} inst The instance the effect will be run on\n * @param {string} property Name of property\n * @param {Object} props Bag of current property changes\n * @param {Object} oldProps Bag of previous values for changed properties\n * @param {?} info Effect metadata\n * @return {void}\n * @private\n */\nfunction runObserverEffect(inst, property, props, oldProps, info) {\n let fn = typeof info.method === \"string\" ? inst[info.method] : info.method;\n let changedProp = info.property;\n if (fn) {\n fn.call(inst, inst.__data[changedProp], oldProps[changedProp]);\n } else if (!info.dynamicFn) {\n console.warn('observer method `' + info.method + '` not defined');\n }\n}\n\n/**\n * Runs \"notify\" effects for a set of changed properties.\n *\n * This method differs from the generic `runEffects` method in that it\n * will dispatch path notification events in the case that the property\n * changed was a path and the root property for that path didn't have a\n * \"notify\" effect. This is to maintain 1.0 behavior that did not require\n * `notify: true` to ensure object sub-property notifications were\n * sent.\n *\n * @param {!Polymer_PropertyEffects} inst The instance with effects to run\n * @param {Object} notifyProps Bag of properties to notify\n * @param {Object} props Bag of current property changes\n * @param {Object} oldProps Bag of previous values for changed properties\n * @param {boolean} hasPaths True with `props` contains one or more paths\n * @return {void}\n * @private\n */\nfunction runNotifyEffects(inst, notifyProps, props, oldProps, hasPaths) {\n // Notify\n let fxs = inst[TYPES.NOTIFY];\n let notified;\n let id = dedupeId++;\n // Try normal notify effects; if none, fall back to try path notification\n for (let prop in notifyProps) {\n if (notifyProps[prop]) {\n if (fxs && runEffectsForProperty(inst, fxs, id, prop, props, oldProps, hasPaths)) {\n notified = true;\n } else if (hasPaths && notifyPath(inst, prop, props)) {\n notified = true;\n }\n }\n }\n // Flush host if we actually notified and host was batching\n // And the host has already initialized clients; this prevents\n // an issue with a host observing data changes before clients are ready.\n let host;\n if (notified && (host = inst.__dataHost) && host._invalidateProperties) {\n host._invalidateProperties();\n }\n}\n\n/**\n * Dispatches {property}-changed events with path information in the detail\n * object to indicate a sub-path of the property was changed.\n *\n * @param {!Polymer_PropertyEffects} inst The element from which to fire the\n * event\n * @param {string} path The path that was changed\n * @param {Object} props Bag of current property changes\n * @return {boolean} Returns true if the path was notified\n * @private\n */\nfunction notifyPath(inst, path, props) {\n let rootProperty = root(path);\n if (rootProperty !== path) {\n let eventName = camelToDashCase(rootProperty) + '-changed';\n dispatchNotifyEvent(inst, eventName, props[path], path);\n return true;\n }\n return false;\n}\n\n/**\n * Dispatches {property}-changed events to indicate a property (or path)\n * changed.\n *\n * @param {!Polymer_PropertyEffects} inst The element from which to fire the\n * event\n * @param {string} eventName The name of the event to send\n * ('{property}-changed')\n * @param {*} value The value of the changed property\n * @param {string | null | undefined} path If a sub-path of this property\n * changed, the path that changed (optional).\n * @return {void}\n * @private\n * @suppress {invalidCasts}\n */\nfunction dispatchNotifyEvent(inst, eventName, value, path) {\n let detail = {\n value: value,\n queueProperty: true\n };\n if (path) {\n detail.path = path;\n }\n // As a performance optimization, we could elide the wrap here since notifying\n // events are non-bubbling and shouldn't need retargeting. However, a very\n // small number of internal tests failed in obscure ways, which may indicate\n // user code relied on timing differences resulting from ShadyDOM flushing\n // as a result of the wrapped `dispatchEvent`.\n wrap(/** @type {!HTMLElement} */(inst)).dispatchEvent(new CustomEvent(eventName, { detail }));\n}\n\n/**\n * Implements the \"notify\" effect.\n *\n * Dispatches a non-bubbling event named `info.eventName` on the instance\n * with a detail object containing the new `value`.\n *\n * @param {!Polymer_PropertyEffects} inst The instance the effect will be run on\n * @param {string} property Name of property\n * @param {Object} props Bag of current property changes\n * @param {Object} oldProps Bag of previous values for changed properties\n * @param {?} info Effect metadata\n * @param {boolean} hasPaths True with `props` contains one or more paths\n * @return {void}\n * @private\n */\nfunction runNotifyEffect(inst, property, props, oldProps, info, hasPaths) {\n let rootProperty = hasPaths ? root(property) : property;\n let path = rootProperty != property ? property : null;\n let value = path ? get(inst, path) : inst.__data[property];\n if (path && value === undefined) {\n value = props[property]; // specifically for .splices\n }\n dispatchNotifyEvent(inst, info.eventName, value, path);\n}\n\n/**\n * Handler function for 2-way notification events. Receives context\n * information captured in the `addNotifyListener` closure from the\n * `__notifyListeners` metadata.\n *\n * Sets the value of the notified property to the host property or path. If\n * the event contained path information, translate that path to the host\n * scope's name for that path first.\n *\n * @param {CustomEvent} event Notification event (e.g. '<property>-changed')\n * @param {!Polymer_PropertyEffects} inst Host element instance handling the\n * notification event\n * @param {string} fromProp Child element property that was bound\n * @param {string} toPath Host property/path that was bound\n * @param {boolean} negate Whether the binding was negated\n * @return {void}\n * @private\n */\nfunction handleNotification(event, inst, fromProp, toPath, negate) {\n let value;\n let detail = /** @type {Object} */(event.detail);\n let fromPath = detail && detail.path;\n if (fromPath) {\n toPath = translate(fromProp, toPath, fromPath);\n value = detail && detail.value;\n } else {\n value = event.currentTarget[fromProp];\n }\n value = negate ? !value : value;\n if (!inst[TYPES.READ_ONLY] || !inst[TYPES.READ_ONLY][toPath]) {\n if (inst._setPendingPropertyOrPath(toPath, value, true, Boolean(fromPath))\n && (!detail || !detail.queueProperty)) {\n inst._invalidateProperties();\n }\n }\n}\n\n/**\n * Implements the \"reflect\" effect.\n *\n * Sets the attribute named `info.attrName` to the given property value.\n *\n * @param {!Polymer_PropertyEffects} inst The instance the effect will be run on\n * @param {string} property Name of property\n * @param {Object} props Bag of current property changes\n * @param {Object} oldProps Bag of previous values for changed properties\n * @param {?} info Effect metadata\n * @return {void}\n * @private\n */\nfunction runReflectEffect(inst, property, props, oldProps, info) {\n let value = inst.__data[property];\n if (sanitizeDOMValue) {\n value = sanitizeDOMValue(value, info.attrName, 'attribute', /** @type {Node} */(inst));\n }\n inst._propertyToAttribute(property, info.attrName, value);\n}\n\n/**\n * Runs \"computed\" effects for a set of changed properties.\n *\n * This method differs from the generic `runEffects` method in that it\n * continues to run computed effects based on the output of each pass until\n * there are no more newly computed properties. This ensures that all\n * properties that will be computed by the initial set of changes are\n * computed before other effects (binding propagation, observers, and notify)\n * run.\n *\n * @param {!Polymer_PropertyEffects} inst The instance the effect will be run on\n * @param {?Object} changedProps Bag of changed properties\n * @param {?Object} oldProps Bag of previous values for changed properties\n * @param {boolean} hasPaths True with `props` contains one or more paths\n * @return {void}\n * @private\n */\nfunction runComputedEffects(inst, changedProps, oldProps, hasPaths) {\n let computeEffects = inst[TYPES.COMPUTE];\n if (computeEffects) {\n if (orderedComputed) {\n // Runs computed effects in efficient order by keeping a topologically-\n // sorted queue of compute effects to run, and inserting subsequently\n // invalidated effects as they are run\n dedupeId++;\n const order = getComputedOrder(inst);\n const queue = [];\n for (let p in changedProps) {\n enqueueEffectsFor(p, computeEffects, queue, order, hasPaths);\n }\n let info;\n while ((info = queue.shift())) {\n if (runComputedEffect(inst, '', changedProps, oldProps, info)) {\n enqueueEffectsFor(info.methodInfo, computeEffects, queue, order, hasPaths);\n }\n }\n Object.assign(/** @type {!Object} */ (oldProps), inst.__dataOld);\n Object.assign(/** @type {!Object} */ (changedProps), inst.__dataPending);\n inst.__dataPending = null;\n } else {\n // Original Polymer 2.x computed effects order, which continues running\n // effects until no further computed properties have been invalidated\n let inputProps = changedProps;\n while (runEffects(inst, computeEffects, inputProps, oldProps, hasPaths)) {\n Object.assign(/** @type {!Object} */ (oldProps), inst.__dataOld);\n Object.assign(/** @type {!Object} */ (changedProps), inst.__dataPending);\n inputProps = inst.__dataPending;\n inst.__dataPending = null;\n }\n }\n }\n}\n\n/**\n * Inserts a computed effect into a queue, given the specified order. Performs\n * the insert using a binary search.\n *\n * Used by `orderedComputed: true` computed property algorithm.\n *\n * @param {Object} info Property effects metadata\n * @param {Array<Object>} queue Ordered queue of effects\n * @param {Map<string,number>} order Map of computed property name->topological\n * sort order\n */\nconst insertEffect = (info, queue, order) => {\n let start = 0;\n let end = queue.length - 1;\n let idx = -1;\n while (start <= end) {\n const mid = (start + end) >> 1;\n // Note `methodInfo` is where the computed property name is stored in\n // the effect metadata\n const cmp = order.get(queue[mid].methodInfo) - order.get(info.methodInfo);\n if (cmp < 0) {\n start = mid + 1;\n } else if (cmp > 0) {\n end = mid - 1;\n } else {\n idx = mid;\n break;\n }\n }\n if (idx < 0) {\n idx = end + 1;\n }\n queue.splice(idx, 0, info);\n};\n\n/**\n * Inserts all downstream computed effects invalidated by the specified property\n * into the topologically-sorted queue of effects to be run.\n *\n * Used by `orderedComputed: true` computed property algorithm.\n *\n * @param {string} prop Property name\n * @param {Object} computeEffects Computed effects for this element\n * @param {Array<Object>} queue Topologically-sorted queue of computed effects\n * to be run\n * @param {Map<string,number>} order Map of computed property name->topological\n * sort order\n * @param {boolean} hasPaths True with `changedProps` contains one or more paths\n */\nconst enqueueEffectsFor = (prop, computeEffects, queue, order, hasPaths) => {\n const rootProperty = hasPaths ? root(prop) : prop;\n const fxs = computeEffects[rootProperty];\n if (fxs) {\n for (let i=0; i<fxs.length; i++) {\n const fx = fxs[i];\n if ((fx.info.lastRun !== dedupeId) &&\n (!hasPaths || pathMatchesTrigger(prop, fx.trigger))) {\n fx.info.lastRun = dedupeId;\n insertEffect(fx.info, queue, order);\n }\n }\n }\n};\n\n/**\n * Generates and retrieves a memoized map of computed property name to its\n * topologically-sorted order.\n *\n * The map is generated by first assigning a \"dependency count\" to each property\n * (defined as number properties it depends on, including its method for\n * \"dynamic functions\"). Any properties that have no dependencies are added to\n * the `ready` queue, which are properties whose order can be added to the final\n * order map. Properties are popped off the `ready` queue one by one and a.) added as\n * the next property in the order map, and b.) each property that it is a\n * dependency for has its dep count decremented (and if that property's dep\n * count goes to zero, it is added to the `ready` queue), until all properties\n * have been visited and ordered.\n *\n * Used by `orderedComputed: true` computed property algorithm.\n *\n * @param {!Polymer_PropertyEffects} inst The instance to retrieve the computed\n * effect order for.\n * @return {Map<string,number>} Map of computed property name->topological sort\n * order\n */\nfunction getComputedOrder(inst) {\n let ordered = inst.constructor.__orderedComputedDeps;\n if (!ordered) {\n ordered = new Map();\n const effects = inst[TYPES.COMPUTE];\n let {counts, ready, total} = dependencyCounts(inst);\n let curr;\n while ((curr = ready.shift())) {\n ordered.set(curr, ordered.size);\n const computedByCurr = effects[curr];\n if (computedByCurr) {\n computedByCurr.forEach(fx => {\n // Note `methodInfo` is where the computed property name is stored\n const computedProp = fx.info.methodInfo;\n --total;\n if (--counts[computedProp] === 0) {\n ready.push(computedProp);\n }\n });\n }\n }\n if (total !== 0) {\n const el = /** @type {HTMLElement} */ (inst);\n console.warn(`Computed graph for ${el.localName} incomplete; circular?`);\n }\n inst.constructor.__orderedComputedDeps = ordered;\n }\n return ordered;\n}\n\n/**\n * Generates a map of property-to-dependency count (`counts`, where \"dependency\n * count\" is the number of dependencies a given property has assuming it is a\n * computed property, otherwise 0). It also returns a pre-populated list of\n * `ready` properties that have no dependencies and a `total` count, which is\n * used for error-checking the graph.\n *\n * Used by `orderedComputed: true` computed property algorithm.\n *\n * @param {!Polymer_PropertyEffects} inst The instance to generate dependency\n * counts for.\n * @return {!Object} Object containing `counts` map (property-to-dependency\n * count) and pre-populated `ready` array of properties that had zero\n * dependencies.\n */\nfunction dependencyCounts(inst) {\n const infoForComputed = inst[COMPUTE_INFO];\n const counts = {};\n const computedDeps = inst[TYPES.COMPUTE];\n const ready = [];\n let total = 0;\n // Count dependencies for each computed property\n for (let p in infoForComputed) {\n const info = infoForComputed[p];\n // Be sure to add the method name itself in case of \"dynamic functions\"\n total += counts[p] =\n info.args.filter(a => !a.literal).length + (info.dynamicFn ? 1 : 0);\n }\n // Build list of ready properties (that aren't themselves computed)\n for (let p in computedDeps) {\n if (!infoForComputed[p]) {\n ready.push(p);\n }\n }\n return {counts, ready, total};\n}\n\n/**\n * Implements the \"computed property\" effect by running the method with the\n * values of the arguments specified in the `info` object and setting the\n * return value to the computed property specified.\n *\n * @param {!Polymer_PropertyEffects} inst The instance the effect will be run on\n * @param {string} property Name of property\n * @param {?Object} changedProps Bag of current property changes\n * @param {?Object} oldProps Bag of previous values for changed properties\n * @param {?} info Effect metadata\n * @return {boolean} True when the property being computed changed\n * @private\n */\nfunction runComputedEffect(inst, property, changedProps, oldProps, info) {\n // Dirty check dependencies and run if any invalid\n let result = runMethodEffect(inst, property, changedProps, oldProps, info);\n // Abort if method returns a no-op result\n if (result === NOOP) {\n return false;\n }\n let computedProp = info.methodInfo;\n if (inst.__dataHasAccessor && inst.__dataHasAccessor[computedProp]) {\n return inst._setPendingProperty(computedProp, result, true);\n } else {\n inst[computedProp] = result;\n return false;\n }\n}\n\n/**\n * Computes path changes based on path links set up using the `linkPaths`\n * API.\n *\n * @param {!Polymer_PropertyEffects} inst The instance whose props are changing\n * @param {string} path Path that has changed\n * @param {*} value Value of changed path\n * @return {void}\n * @private\n */\nfunction computeLinkedPaths(inst, path, value) {\n let links = inst.__dataLinkedPaths;\n if (links) {\n let link;\n for (let a in links) {\n let b = links[a];\n if (isDescendant(a, path)) {\n link = translate(a, b, path);\n inst._setPendingPropertyOrPath(link, value, true, true);\n } else if (isDescendant(b, path)) {\n link = translate(b, a, path);\n inst._setPendingPropertyOrPath(link, value, true, true);\n }\n }\n }\n}\n\n// -- bindings ----------------------------------------------\n\n/**\n * Adds binding metadata to the current `nodeInfo`, and binding effects\n * for all part dependencies to `templateInfo`.\n *\n * @param {Function} constructor Class that `_parseTemplate` is currently\n * running on\n * @param {TemplateInfo} templateInfo Template metadata for current template\n * @param {NodeInfo} nodeInfo Node metadata for current template node\n * @param {string} kind Binding kind, either 'property', 'attribute', or 'text'\n * @param {string} target Target property name\n * @param {!Array<!BindingPart>} parts Array of binding part metadata\n * @param {string=} literal Literal text surrounding binding parts (specified\n * only for 'property' bindings, since these must be initialized as part\n * of boot-up)\n * @return {void}\n * @private\n */\nfunction addBinding(constructor, templateInfo, nodeInfo, kind, target, parts, literal) {\n // Create binding metadata and add to nodeInfo\n nodeInfo.bindings = nodeInfo.bindings || [];\n let /** Binding */ binding = { kind, target, parts, literal, isCompound: (parts.length !== 1) };\n nodeInfo.bindings.push(binding);\n // Add listener info to binding metadata\n if (shouldAddListener(binding)) {\n let {event, negate} = binding.parts[0];\n binding.listenerEvent = event || (camelToDashCase(target) + '-changed');\n binding.listenerNegate = negate;\n }\n // Add \"propagate\" property effects to templateInfo\n let index = templateInfo.nodeInfoList.length;\n for (let i=0; i<binding.parts.length; i++) {\n let part = binding.parts[i];\n part.compoundIndex = i;\n addEffectForBindingPart(constructor, templateInfo, binding, part, index);\n }\n}\n\n/**\n * Adds property effects to the given `templateInfo` for the given binding\n * part.\n *\n * @param {Function} constructor Class that `_parseTemplate` is currently\n * running on\n * @param {TemplateInfo} templateInfo Template metadata for current template\n * @param {!Binding} binding Binding metadata\n * @param {!BindingPart} part Binding part metadata\n * @param {number} index Index into `nodeInfoList` for this node\n * @return {void}\n */\nfunction addEffectForBindingPart(constructor, templateInfo, binding, part, index) {\n if (!part.literal) {\n if (binding.kind === 'attribute' && binding.target[0] === '-') {\n console.warn('Cannot set attribute ' + binding.target +\n ' because \"-\" is not a valid attribute starting character');\n } else {\n let dependencies = part.dependencies;\n let info = { index, binding, part, evaluator: constructor };\n for (let j=0; j<dependencies.length; j++) {\n let trigger = dependencies[j];\n if (typeof trigger == 'string') {\n trigger = parseArg(trigger);\n trigger.wildcard = true;\n }\n constructor._addTemplatePropertyEffect(templateInfo, trigger.rootProperty, {\n fn: runBindingEffect,\n info, trigger\n });\n }\n }\n }\n}\n\n/**\n * Implements the \"binding\" (property/path binding) effect.\n *\n * Note that binding syntax is overridable via `_parseBindings` and\n * `_evaluateBinding`. This method will call `_evaluateBinding` for any\n * non-literal parts returned from `_parseBindings`. However,\n * there is no support for _path_ bindings via custom binding parts,\n * as this is specific to Polymer's path binding syntax.\n *\n * @param {!Polymer_PropertyEffects} inst The instance the effect will be run on\n * @param {string} path Name of property\n * @param {Object} props Bag of current property changes\n * @param {Object} oldProps Bag of previous values for changed properties\n * @param {?} info Effect metadata\n * @param {boolean} hasPaths True with `props` contains one or more paths\n * @param {Array} nodeList List of nodes associated with `nodeInfoList` template\n * metadata\n * @return {void}\n * @private\n */\nfunction runBindingEffect(inst, path, props, oldProps, info, hasPaths, nodeList) {\n let node = nodeList[info.index];\n let binding = info.binding;\n let part = info.part;\n // Subpath notification: transform path and set to client\n // e.g.: foo=\"{{obj.sub}}\", path: 'obj.sub.prop', set 'foo.prop'=obj.sub.prop\n if (hasPaths && part.source && (path.length > part.source.length) &&\n (binding.kind == 'property') && !binding.isCompound &&\n node.__isPropertyEffectsClient &&\n node.__dataHasAccessor && node.__dataHasAccessor[binding.target]) {\n let value = props[path];\n path = translate(part.source, binding.target, path);\n if (node._setPendingPropertyOrPath(path, value, false, true)) {\n inst._enqueueClient(node);\n }\n } else {\n let value = info.evaluator._evaluateBinding(inst, part, path, props, oldProps, hasPaths);\n // Propagate value to child\n // Abort if value is a no-op result\n if (value !== NOOP) {\n applyBindingValue(inst, node, binding, part, value);\n }\n }\n}\n\n/**\n * Sets the value for an \"binding\" (binding) effect to a node,\n * either as a property or attribute.\n *\n * @param {!Polymer_PropertyEffects} inst The instance owning the binding effect\n * @param {Node} node Target node for binding\n * @param {!Binding} binding Binding metadata\n * @param {!BindingPart} part Binding part metadata\n * @param {*} value Value to set\n * @return {void}\n * @private\n */\nfunction applyBindingValue(inst, node, binding, part, value) {\n value = computeBindingValue(node, value, binding, part);\n if (sanitizeDOMValue) {\n value = sanitizeDOMValue(value, binding.target, binding.kind, node);\n }\n if (binding.kind == 'attribute') {\n // Attribute binding\n inst._valueToNodeAttribute(/** @type {Element} */(node), value, binding.target);\n } else {\n // Property binding\n let prop = binding.target;\n if (node.__isPropertyEffectsClient &&\n node.__dataHasAccessor && node.__dataHasAccessor[prop]) {\n if (!node[TYPES.READ_ONLY] || !node[TYPES.READ_ONLY][prop]) {\n if (node._setPendingProperty(prop, value)) {\n inst._enqueueClient(node);\n }\n }\n } else {\n // In legacy no-batching mode, bindings applied before dataReady are\n // equivalent to the \"apply config\" phase, which only set managed props\n inst._setUnmanagedPropertyToNode(node, prop, value);\n }\n }\n}\n\n/**\n * Transforms an \"binding\" effect value based on compound & negation\n * effect metadata, as well as handling for special-case properties\n *\n * @param {Node} node Node the value will be set to\n * @param {*} value Value to set\n * @param {!Binding} binding Binding metadata\n * @param {!BindingPart} part Binding part metadata\n * @return {*} Transformed value to set\n * @private\n */\nfunction computeBindingValue(node, value, binding, part) {\n if (binding.isCompound) {\n let storage = node.__dataCompoundStorage[binding.target];\n storage[part.compoundIndex] = value;\n value = storage.join('');\n }\n if (binding.kind !== 'attribute') {\n // Some browsers serialize `undefined` to `\"undefined\"`\n if (binding.target === 'textContent' ||\n (binding.target === 'value' &&\n (node.localName === 'input' || node.localName === 'textarea'))) {\n value = value == undefined ? '' : value;\n }\n }\n return value;\n}\n\n/**\n * Returns true if a binding's metadata meets all the requirements to allow\n * 2-way binding, and therefore a `<property>-changed` event listener should be\n * added:\n * - used curly braces\n * - is a property (not attribute) binding\n * - is not a textContent binding\n * - is not compound\n *\n * @param {!Binding} binding Binding metadata\n * @return {boolean} True if 2-way listener should be added\n * @private\n */\nfunction shouldAddListener(binding) {\n return Boolean(binding.target) &&\n binding.kind != 'attribute' &&\n binding.kind != 'text' &&\n !binding.isCompound &&\n binding.parts[0].mode === '{';\n}\n\n/**\n * Setup compound binding storage structures, notify listeners, and dataHost\n * references onto the bound nodeList.\n *\n * @param {!Polymer_PropertyEffects} inst Instance that bas been previously\n * bound\n * @param {TemplateInfo} templateInfo Template metadata\n * @return {void}\n * @private\n */\nfunction setupBindings(inst, templateInfo) {\n // Setup compound storage, dataHost, and notify listeners\n let {nodeList, nodeInfoList} = templateInfo;\n if (nodeInfoList.length) {\n for (let i=0; i < nodeInfoList.length; i++) {\n let info = nodeInfoList[i];\n let node = nodeList[i];\n let bindings = info.bindings;\n if (bindings) {\n for (let i=0; i<bindings.length; i++) {\n let binding = bindings[i];\n setupCompoundStorage(node, binding);\n addNotifyListener(node, inst, binding);\n }\n }\n // This ensures all bound elements have a host set, regardless\n // of whether they upgrade synchronous to creation\n node.__dataHost = inst;\n }\n }\n}\n\n/**\n * Initializes `__dataCompoundStorage` local storage on a bound node with\n * initial literal data for compound bindings, and sets the joined\n * literal parts to the bound property.\n *\n * When changes to compound parts occur, they are first set into the compound\n * storage array for that property, and then the array is joined to result in\n * the final value set to the property/attribute.\n *\n * @param {Node} node Bound node to initialize\n * @param {Binding} binding Binding metadata\n * @return {void}\n * @private\n */\nfunction setupCompoundStorage(node, binding) {\n if (binding.isCompound) {\n // Create compound storage map\n let storage = node.__dataCompoundStorage ||\n (node.__dataCompoundStorage = {});\n let parts = binding.parts;\n // Copy literals from parts into storage for this binding\n let literals = new Array(parts.length);\n for (let j=0; j<parts.length; j++) {\n literals[j] = parts[j].literal;\n }\n let target = binding.target;\n storage[target] = literals;\n // Configure properties with their literal parts\n if (binding.literal && binding.kind == 'property') {\n // Note, className needs style scoping so this needs wrapping.\n // We may also want to consider doing this for `textContent` and\n // `innerHTML`.\n if (target === 'className') {\n node = wrap(node);\n }\n node[target] = binding.literal;\n }\n }\n}\n\n/**\n * Adds a 2-way binding notification event listener to the node specified\n *\n * @param {Object} node Child element to add listener to\n * @param {!Polymer_PropertyEffects} inst Host element instance to handle\n * notification event\n * @param {Binding} binding Binding metadata\n * @return {void}\n * @private\n */\nfunction addNotifyListener(node, inst, binding) {\n if (binding.listenerEvent) {\n let part = binding.parts[0];\n node.addEventListener(binding.listenerEvent, function(e) {\n handleNotification(e, inst, binding.target, part.source, part.negate);\n });\n }\n}\n\n// -- for method-based effects (complexObserver & computed) --------------\n\n/**\n * Adds property effects for each argument in the method signature (and\n * optionally, for the method name if `dynamic` is true) that calls the\n * provided effect function.\n *\n * @param {Element | Object} model Prototype or instance\n * @param {!MethodSignature} sig Method signature metadata\n * @param {string} type Type of property effect to add\n * @param {Function} effectFn Function to run when arguments change\n * @param {*=} methodInfo Effect-specific information to be included in\n * method effect metadata\n * @param {boolean|Object=} dynamicFn Boolean or object map indicating whether\n * method names should be included as a dependency to the effect. Note,\n * defaults to true if the signature is static (sig.static is true).\n * @return {!Object} Effect metadata for this method effect\n * @private\n */\nfunction createMethodEffect(model, sig, type, effectFn, methodInfo, dynamicFn) {\n dynamicFn = sig.static || (dynamicFn &&\n (typeof dynamicFn !== 'object' || dynamicFn[sig.methodName]));\n let info = {\n methodName: sig.methodName,\n args: sig.args,\n methodInfo,\n dynamicFn\n };\n for (let i=0, arg; (i<sig.args.length) && (arg=sig.args[i]); i++) {\n if (!arg.literal) {\n model._addPropertyEffect(arg.rootProperty, type, {\n fn: effectFn, info: info, trigger: arg\n });\n }\n }\n if (dynamicFn) {\n model._addPropertyEffect(sig.methodName, type, {\n fn: effectFn, info: info\n });\n }\n return info;\n}\n\n/**\n * Calls a method with arguments marshaled from properties on the instance\n * based on the method signature contained in the effect metadata.\n *\n * Multi-property observers, computed properties, and inline computing\n * functions call this function to invoke the method, then use the return\n * value accordingly.\n *\n * @param {!Polymer_PropertyEffects} inst The instance the effect will be run on\n * @param {string} property Name of property\n * @param {Object} props Bag of current property changes\n * @param {Object} oldProps Bag of previous values for changed properties\n * @param {?} info Effect metadata\n * @return {*} Returns the return value from the method invocation\n * @private\n */\nfunction runMethodEffect(inst, property, props, oldProps, info) {\n // Instances can optionally have a _methodHost which allows redirecting where\n // to find methods. Currently used by `templatize`.\n let context = inst._methodHost || inst;\n let fn = context[info.methodName];\n if (fn) {\n let args = inst._marshalArgs(info.args, property, props);\n return args === NOOP ? NOOP : fn.apply(context, args);\n } else if (!info.dynamicFn) {\n console.warn('method `' + info.methodName + '` not defined');\n }\n}\n\nconst emptyArray = [];\n\n// Regular expressions used for binding\nconst IDENT = '(?:' + '[a-zA-Z_$][\\\\w.:$\\\\-*]*' + ')';\nconst NUMBER = '(?:' + '[-+]?[0-9]*\\\\.?[0-9]+(?:[eE][-+]?[0-9]+)?' + ')';\nconst SQUOTE_STRING = '(?:' + '\\'(?:[^\\'\\\\\\\\]|\\\\\\\\.)*\\'' + ')';\nconst DQUOTE_STRING = '(?:' + '\"(?:[^\"\\\\\\\\]|\\\\\\\\.)*\"' + ')';\nconst STRING = '(?:' + SQUOTE_STRING + '|' + DQUOTE_STRING + ')';\nconst ARGUMENT = '(?:(' + IDENT + '|' + NUMBER + '|' + STRING + ')\\\\s*' + ')';\nconst ARGUMENTS = '(?:' + ARGUMENT + '(?:,\\\\s*' + ARGUMENT + ')*' + ')';\nconst ARGUMENT_LIST = '(?:' + '\\\\(\\\\s*' +\n '(?:' + ARGUMENTS + '?' + ')' +\n '\\\\)\\\\s*' + ')';\nconst BINDING = '(' + IDENT + '\\\\s*' + ARGUMENT_LIST + '?' + ')'; // Group 3\nconst OPEN_BRACKET = '(\\\\[\\\\[|{{)' + '\\\\s*';\nconst CLOSE_BRACKET = '(?:]]|}})';\nconst NEGATE = '(?:(!)\\\\s*)?'; // Group 2\nconst EXPRESSION = OPEN_BRACKET + NEGATE + BINDING + CLOSE_BRACKET;\nconst bindingRegex = new RegExp(EXPRESSION, \"g\");\n\n/**\n * Create a string from binding parts of all the literal parts\n *\n * @param {!Array<BindingPart>} parts All parts to stringify\n * @return {string} String made from the literal parts\n */\nfunction literalFromParts(parts) {\n let s = '';\n for (let i=0; i<parts.length; i++) {\n let literal = parts[i].literal;\n s += literal || '';\n }\n return s;\n}\n\n/**\n * Parses an expression string for a method signature, and returns a metadata\n * describing the method in terms of `methodName`, `static` (whether all the\n * arguments are literals), and an array of `args`\n *\n * @param {string} expression The expression to parse\n * @return {?MethodSignature} The method metadata object if a method expression was\n * found, otherwise `undefined`\n * @private\n */\nfunction parseMethod(expression) {\n // tries to match valid javascript property names\n let m = expression.match(/([^\\s]+?)\\(([\\s\\S]*)\\)/);\n if (m) {\n let methodName = m[1];\n let sig = { methodName, static: true, args: emptyArray };\n if (m[2].trim()) {\n // replace escaped commas with comma entity, split on un-escaped commas\n let args = m[2].replace(/\\\\,/g, '&comma;').split(',');\n return parseArgs(args, sig);\n } else {\n return sig;\n }\n }\n return null;\n}\n\n/**\n * Parses an array of arguments and sets the `args` property of the supplied\n * signature metadata object. Sets the `static` property to false if any\n * argument is a non-literal.\n *\n * @param {!Array<string>} argList Array of argument names\n * @param {!MethodSignature} sig Method signature metadata object\n * @return {!MethodSignature} The updated signature metadata object\n * @private\n */\nfunction parseArgs(argList, sig) {\n sig.args = argList.map(function(rawArg) {\n let arg = parseArg(rawArg);\n if (!arg.literal) {\n sig.static = false;\n }\n return arg;\n }, this);\n return sig;\n}\n\n/**\n * Parses an individual argument, and returns an argument metadata object\n * with the following fields:\n *\n * {\n * value: 'prop', // property/path or literal value\n * literal: false, // whether argument is a literal\n * structured: false, // whether the property is a path\n * rootProperty: 'prop', // the root property of the path\n * wildcard: false // whether the argument was a wildcard '.*' path\n * }\n *\n * @param {string} rawArg The string value of the argument\n * @return {!MethodArg} Argument metadata object\n * @private\n */\nfunction parseArg(rawArg) {\n // clean up whitespace\n let arg = rawArg.trim()\n // replace comma entity with comma\n .replace(/&comma;/g, ',')\n // repair extra escape sequences; note only commas strictly need\n // escaping, but we allow any other char to be escaped since its\n // likely users will do this\n .replace(/\\\\(.)/g, '$1')\n ;\n // basic argument descriptor\n let a = {\n name: arg,\n value: '',\n literal: false\n };\n // detect literal value (must be String or Number)\n let fc = arg[0];\n if (fc === '-') {\n fc = arg[1];\n }\n if (fc >= '0' && fc <= '9') {\n fc = '#';\n }\n switch(fc) {\n case \"'\":\n case '\"':\n a.value = arg.slice(1, -1);\n a.literal = true;\n break;\n case '#':\n a.value = Number(arg);\n a.literal = true;\n break;\n }\n // if not literal, look for structured path\n if (!a.literal) {\n a.rootProperty = root(arg);\n // detect structured path (has dots)\n a.structured = isPath(arg);\n if (a.structured) {\n a.wildcard = (arg.slice(-2) == '.*');\n if (a.wildcard) {\n a.name = arg.slice(0, -2);\n }\n }\n }\n return a;\n}\n\nfunction getArgValue(data, props, path) {\n let value = get(data, path);\n // when data is not stored e.g. `splices`, get the value from changedProps\n // TODO(kschaaf): Note, this can cause a rare issue where the wildcard\n // info.value could pull a stale value out of changedProps during a reentrant\n // change that sets the value back to undefined.\n // https://github.com/Polymer/polymer/issues/5479\n if (value === undefined) {\n value = props[path];\n }\n return value;\n}\n\n// data api\n\n/**\n * Sends array splice notifications (`.splices` and `.length`)\n *\n * Note: this implementation only accepts normalized paths\n *\n * @param {!Polymer_PropertyEffects} inst Instance to send notifications to\n * @param {Array} array The array the mutations occurred on\n * @param {string} path The path to the array that was mutated\n * @param {Array} splices Array of splice records\n * @return {void}\n * @private\n */\nfunction notifySplices(inst, array, path, splices) {\n const splicesData = { indexSplices: splices };\n // Legacy behavior stored splices in `__data__` so it was *not* ephemeral.\n // To match this behavior, we store splices directly on the array.\n if (legacyUndefined && !inst._overrideLegacyUndefined) {\n array.splices = splicesData;\n }\n inst.notifyPath(path + '.splices', splicesData);\n inst.notifyPath(path + '.length', array.length);\n // Clear splice data only when it's stored on the array.\n if (legacyUndefined && !inst._overrideLegacyUndefined) {\n splicesData.indexSplices = [];\n }\n}\n\n/**\n * Creates a splice record and sends an array splice notification for\n * the described mutation\n *\n * Note: this implementation only accepts normalized paths\n *\n * @param {!Polymer_PropertyEffects} inst Instance to send notifications to\n * @param {Array} array The array the mutations occurred on\n * @param {string} path The path to the array that was mutated\n * @param {number} index Index at which the array mutation occurred\n * @param {number} addedCount Number of added items\n * @param {Array} removed Array of removed items\n * @return {void}\n * @private\n */\nfunction notifySplice(inst, array, path, index, addedCount, removed) {\n notifySplices(inst, array, path, [{\n index: index,\n addedCount: addedCount,\n removed: removed,\n object: array,\n type: 'splice'\n }]);\n}\n\n/**\n * Returns an upper-cased version of the string.\n *\n * @param {string} name String to uppercase\n * @return {string} Uppercased string\n * @private\n */\nfunction upper(name) {\n return name[0].toUpperCase() + name.substring(1);\n}\n\n/**\n * Element class mixin that provides meta-programming for Polymer's template\n * binding and data observation (collectively, \"property effects\") system.\n *\n * This mixin uses provides the following key static methods for adding\n * property effects to an element class:\n * - `addPropertyEffect`\n * - `createPropertyObserver`\n * - `createMethodObserver`\n * - `createNotifyingProperty`\n * - `createReadOnlyProperty`\n * - `createReflectedProperty`\n * - `createComputedProperty`\n * - `bindTemplate`\n *\n * Each method creates one or more property accessors, along with metadata\n * used by this mixin's implementation of `_propertiesChanged` to perform\n * the property effects.\n *\n * Underscored versions of the above methods also exist on the element\n * prototype for adding property effects on instances at runtime.\n *\n * Note that this mixin overrides several `PropertyAccessors` methods, in\n * many cases to maintain guarantees provided by the Polymer 1.x features;\n * notably it changes property accessors to be synchronous by default\n * whereas the default when using `PropertyAccessors` standalone is to be\n * async by default.\n *\n * @mixinFunction\n * @polymer\n * @appliesMixin TemplateStamp\n * @appliesMixin PropertyAccessors\n * @summary Element class mixin that provides meta-programming for Polymer's\n * template binding and data observation system.\n */\nexport const PropertyEffects = dedupingMixin(superClass => {\n\n /**\n * @constructor\n * @implements {Polymer_PropertyAccessors}\n * @implements {Polymer_TemplateStamp}\n * @unrestricted\n * @private\n */\n const propertyEffectsBase = TemplateStamp(PropertyAccessors(superClass));\n\n /**\n * @polymer\n * @mixinClass\n * @implements {Polymer_PropertyEffects}\n * @extends {propertyEffectsBase}\n * @unrestricted\n */\n class PropertyEffects extends propertyEffectsBase {\n\n constructor() {\n super();\n /** @type {boolean} */\n // Used to identify users of this mixin, ala instanceof\n this.__isPropertyEffectsClient = true;\n /** @type {boolean} */\n this.__dataClientsReady;\n /** @type {Array} */\n this.__dataPendingClients;\n /** @type {Object} */\n this.__dataToNotify;\n /** @type {Object} */\n this.__dataLinkedPaths;\n /** @type {boolean} */\n this.__dataHasPaths;\n /** @type {Object} */\n this.__dataCompoundStorage;\n /** @type {Polymer_PropertyEffects} */\n this.__dataHost;\n /** @type {!Object} */\n this.__dataTemp;\n /** @type {boolean} */\n this.__dataClientsInitialized;\n /** @type {!Object} */\n this.__data;\n /** @type {!Object|null} */\n this.__dataPending;\n /** @type {!Object} */\n this.__dataOld;\n /** @type {Object} */\n this.__computeEffects;\n /** @type {Object} */\n this.__computeInfo;\n /** @type {Object} */\n this.__reflectEffects;\n /** @type {Object} */\n this.__notifyEffects;\n /** @type {Object} */\n this.__propagateEffects;\n /** @type {Object} */\n this.__observeEffects;\n /** @type {Object} */\n this.__readOnly;\n /** @type {!TemplateInfo} */\n this.__templateInfo;\n /** @type {boolean} */\n this._overrideLegacyUndefined;\n }\n\n get PROPERTY_EFFECT_TYPES() {\n return TYPES;\n }\n\n /**\n * @override\n * @return {void}\n */\n _initializeProperties() {\n super._initializeProperties();\n this._registerHost();\n this.__dataClientsReady = false;\n this.__dataPendingClients = null;\n this.__dataToNotify = null;\n this.__dataLinkedPaths = null;\n this.__dataHasPaths = false;\n // May be set on instance prior to upgrade\n this.__dataCompoundStorage = this.__dataCompoundStorage || null;\n this.__dataHost = this.__dataHost || null;\n this.__dataTemp = {};\n this.__dataClientsInitialized = false;\n }\n\n _registerHost() {\n if (hostStack.length) {\n let host = hostStack[hostStack.length-1];\n host._enqueueClient(this);\n // This ensures even non-bound elements have a host set, as\n // long as they upgrade synchronously\n this.__dataHost = host;\n }\n }\n\n /**\n * Overrides `PropertyAccessors` implementation to provide a\n * more efficient implementation of initializing properties from\n * the prototype on the instance.\n *\n * @override\n * @param {Object} props Properties to initialize on the prototype\n * @return {void}\n */\n _initializeProtoProperties(props) {\n this.__data = Object.create(props);\n this.__dataPending = Object.create(props);\n this.__dataOld = {};\n }\n\n /**\n * Overrides `PropertyAccessors` implementation to avoid setting\n * `_setProperty`'s `shouldNotify: true`.\n *\n * @override\n * @param {Object} props Properties to initialize on the instance\n * @return {void}\n */\n _initializeInstanceProperties(props) {\n let readOnly = this[TYPES.READ_ONLY];\n for (let prop in props) {\n if (!readOnly || !readOnly[prop]) {\n this.__dataPending = this.__dataPending || {};\n this.__dataOld = this.__dataOld || {};\n this.__data[prop] = this.__dataPending[prop] = props[prop];\n }\n }\n }\n\n // Prototype setup ----------------------------------------\n\n /**\n * Equivalent to static `addPropertyEffect` API but can be called on\n * an instance to add effects at runtime. See that method for\n * full API docs.\n *\n * @override\n * @param {string} property Property that should trigger the effect\n * @param {string} type Effect type, from this.PROPERTY_EFFECT_TYPES\n * @param {Object=} effect Effect metadata object\n * @return {void}\n * @protected\n */\n _addPropertyEffect(property, type, effect) {\n this._createPropertyAccessor(property, type == TYPES.READ_ONLY);\n // effects are accumulated into arrays per property based on type\n let effects = ensureOwnEffectMap(this, type, true)[property];\n if (!effects) {\n effects = this[type][property] = [];\n }\n effects.push(effect);\n }\n\n /**\n * Removes the given property effect.\n *\n * @override\n * @param {string} property Property the effect was associated with\n * @param {string} type Effect type, from this.PROPERTY_EFFECT_TYPES\n * @param {Object=} effect Effect metadata object to remove\n * @return {void}\n */\n _removePropertyEffect(property, type, effect) {\n let effects = ensureOwnEffectMap(this, type, true)[property];\n let idx = effects.indexOf(effect);\n if (idx >= 0) {\n effects.splice(idx, 1);\n }\n }\n\n /**\n * Returns whether the current prototype/instance has a property effect\n * of a certain type.\n *\n * @override\n * @param {string} property Property name\n * @param {string=} type Effect type, from this.PROPERTY_EFFECT_TYPES\n * @return {boolean} True if the prototype/instance has an effect of this\n * type\n * @protected\n */\n _hasPropertyEffect(property, type) {\n let effects = this[type];\n return Boolean(effects && effects[property]);\n }\n\n /**\n * Returns whether the current prototype/instance has a \"read only\"\n * accessor for the given property.\n *\n * @override\n * @param {string} property Property name\n * @return {boolean} True if the prototype/instance has an effect of this\n * type\n * @protected\n */\n _hasReadOnlyEffect(property) {\n return this._hasPropertyEffect(property, TYPES.READ_ONLY);\n }\n\n /**\n * Returns whether the current prototype/instance has a \"notify\"\n * property effect for the given property.\n *\n * @override\n * @param {string} property Property name\n * @return {boolean} True if the prototype/instance has an effect of this\n * type\n * @protected\n */\n _hasNotifyEffect(property) {\n return this._hasPropertyEffect(property, TYPES.NOTIFY);\n }\n\n /**\n * Returns whether the current prototype/instance has a \"reflect to\n * attribute\" property effect for the given property.\n *\n * @override\n * @param {string} property Property name\n * @return {boolean} True if the prototype/instance has an effect of this\n * type\n * @protected\n */\n _hasReflectEffect(property) {\n return this._hasPropertyEffect(property, TYPES.REFLECT);\n }\n\n /**\n * Returns whether the current prototype/instance has a \"computed\"\n * property effect for the given property.\n *\n * @override\n * @param {string} property Property name\n * @return {boolean} True if the prototype/instance has an effect of this\n * type\n * @protected\n */\n _hasComputedEffect(property) {\n return this._hasPropertyEffect(property, TYPES.COMPUTE);\n }\n\n // Runtime ----------------------------------------\n\n /**\n * Sets a pending property or path. If the root property of the path in\n * question had no accessor, the path is set, otherwise it is enqueued\n * via `_setPendingProperty`.\n *\n * This function isolates relatively expensive functionality necessary\n * for the public API (`set`, `setProperties`, `notifyPath`, and property\n * change listeners via {{...}} bindings), such that it is only done\n * when paths enter the system, and not at every propagation step. It\n * also sets a `__dataHasPaths` flag on the instance which is used to\n * fast-path slower path-matching code in the property effects host paths.\n *\n * `path` can be a path string or array of path parts as accepted by the\n * public API.\n *\n * @override\n * @param {string | !Array<number|string>} path Path to set\n * @param {*} value Value to set\n * @param {boolean=} shouldNotify Set to true if this change should\n * cause a property notification event dispatch\n * @param {boolean=} isPathNotification If the path being set is a path\n * notification of an already changed value, as opposed to a request\n * to set and notify the change. In the latter `false` case, a dirty\n * check is performed and then the value is set to the path before\n * enqueuing the pending property change.\n * @return {boolean} Returns true if the property/path was enqueued in\n * the pending changes bag.\n * @protected\n */\n _setPendingPropertyOrPath(path, value, shouldNotify, isPathNotification) {\n if (isPathNotification ||\n root(Array.isArray(path) ? path[0] : path) !== path) {\n // Dirty check changes being set to a path against the actual object,\n // since this is the entry point for paths into the system; from here\n // the only dirty checks are against the `__dataTemp` cache to prevent\n // duplicate work in the same turn only. Note, if this was a notification\n // of a change already set to a path (isPathNotification: true),\n // we always let the change through and skip the `set` since it was\n // already dirty checked at the point of entry and the underlying\n // object has already been updated\n if (!isPathNotification) {\n let old = get(this, path);\n path = /** @type {string} */ (set(this, path, value));\n // Use property-accessor's simpler dirty check\n if (!path || !super._shouldPropertyChange(path, value, old)) {\n return false;\n }\n }\n this.__dataHasPaths = true;\n if (this._setPendingProperty(/**@type{string}*/(path), value, shouldNotify)) {\n computeLinkedPaths(this, /**@type{string}*/ (path), value);\n return true;\n }\n } else {\n if (this.__dataHasAccessor && this.__dataHasAccessor[path]) {\n return this._setPendingProperty(/**@type{string}*/(path), value, shouldNotify);\n } else {\n this[path] = value;\n }\n }\n return false;\n }\n\n /**\n * Applies a value to a non-Polymer element/node's property.\n *\n * The implementation makes a best-effort at binding interop:\n * Some native element properties have side-effects when\n * re-setting the same value (e.g. setting `<input>.value` resets the\n * cursor position), so we do a dirty-check before setting the value.\n * However, for better interop with non-Polymer custom elements that\n * accept objects, we explicitly re-set object changes coming from the\n * Polymer world (which may include deep object changes without the\n * top reference changing), erring on the side of providing more\n * information.\n *\n * Users may override this method to provide alternate approaches.\n *\n * @override\n * @param {!Node} node The node to set a property on\n * @param {string} prop The property to set\n * @param {*} value The value to set\n * @return {void}\n * @protected\n */\n _setUnmanagedPropertyToNode(node, prop, value) {\n // It is a judgment call that resetting primitives is\n // \"bad\" and resettings objects is also \"good\"; alternatively we could\n // implement a whitelist of tag & property values that should never\n // be reset (e.g. <input>.value && <select>.value)\n if (value !== node[prop] || typeof value == 'object') {\n // Note, className needs style scoping so this needs wrapping.\n if (prop === 'className') {\n node = /** @type {!Node} */(wrap(node));\n }\n node[prop] = value;\n }\n }\n\n /**\n * Overrides the `PropertiesChanged` implementation to introduce special\n * dirty check logic depending on the property & value being set:\n *\n * 1. Any value set to a path (e.g. 'obj.prop': 42 or 'obj.prop': {...})\n * Stored in `__dataTemp`, dirty checked against `__dataTemp`\n * 2. Object set to simple property (e.g. 'prop': {...})\n * Stored in `__dataTemp` and `__data`, dirty checked against\n * `__dataTemp` by default implementation of `_shouldPropertyChange`\n * 3. Primitive value set to simple property (e.g. 'prop': 42)\n * Stored in `__data`, dirty checked against `__data`\n *\n * The dirty-check is important to prevent cycles due to two-way\n * notification, but paths and objects are only dirty checked against any\n * previous value set during this turn via a \"temporary cache\" that is\n * cleared when the last `_propertiesChanged` exits. This is so:\n * a. any cached array paths (e.g. 'array.3.prop') may be invalidated\n * due to array mutations like shift/unshift/splice; this is fine\n * since path changes are dirty-checked at user entry points like `set`\n * b. dirty-checking for objects only lasts one turn to allow the user\n * to mutate the object in-place and re-set it with the same identity\n * and have all sub-properties re-propagated in a subsequent turn.\n *\n * The temp cache is not necessarily sufficient to prevent invalid array\n * paths, since a splice can happen during the same turn (with pathological\n * user code); we could introduce a \"fixup\" for temporarily cached array\n * paths if needed: https://github.com/Polymer/polymer/issues/4227\n *\n * @override\n * @param {string} property Name of the property\n * @param {*} value Value to set\n * @param {boolean=} shouldNotify True if property should fire notification\n * event (applies only for `notify: true` properties)\n * @return {boolean} Returns true if the property changed\n */\n _setPendingProperty(property, value, shouldNotify) {\n let propIsPath = this.__dataHasPaths && isPath(property);\n let prevProps = propIsPath ? this.__dataTemp : this.__data;\n if (this._shouldPropertyChange(property, value, prevProps[property])) {\n if (!this.__dataPending) {\n this.__dataPending = {};\n this.__dataOld = {};\n }\n // Ensure old is captured from the last turn\n if (!(property in this.__dataOld)) {\n this.__dataOld[property] = this.__data[property];\n }\n // Paths are stored in temporary cache (cleared at end of turn),\n // which is used for dirty-checking, all others stored in __data\n if (propIsPath) {\n this.__dataTemp[property] = value;\n } else {\n this.__data[property] = value;\n }\n // All changes go into pending property bag, passed to _propertiesChanged\n this.__dataPending[property] = value;\n // Track properties that should notify separately\n if (propIsPath || (this[TYPES.NOTIFY] && this[TYPES.NOTIFY][property])) {\n this.__dataToNotify = this.__dataToNotify || {};\n this.__dataToNotify[property] = shouldNotify;\n }\n return true;\n }\n return false;\n }\n\n /**\n * Overrides base implementation to ensure all accessors set `shouldNotify`\n * to true, for per-property notification tracking.\n *\n * @override\n * @param {string} property Name of the property\n * @param {*} value Value to set\n * @return {void}\n */\n _setProperty(property, value) {\n if (this._setPendingProperty(property, value, true)) {\n this._invalidateProperties();\n }\n }\n\n /**\n * Overrides `PropertyAccessor`'s default async queuing of\n * `_propertiesChanged`: if `__dataReady` is false (has not yet been\n * manually flushed), the function no-ops; otherwise flushes\n * `_propertiesChanged` synchronously.\n *\n * @override\n * @return {void}\n */\n _invalidateProperties() {\n if (this.__dataReady) {\n this._flushProperties();\n }\n }\n\n /**\n * Enqueues the given client on a list of pending clients, whose\n * pending property changes can later be flushed via a call to\n * `_flushClients`.\n *\n * @override\n * @param {Object} client PropertyEffects client to enqueue\n * @return {void}\n * @protected\n */\n _enqueueClient(client) {\n this.__dataPendingClients = this.__dataPendingClients || [];\n if (client !== this) {\n this.__dataPendingClients.push(client);\n }\n }\n\n /**\n * Flushes any clients previously enqueued via `_enqueueClient`, causing\n * their `_flushProperties` method to run.\n *\n * @override\n * @return {void}\n * @protected\n */\n _flushClients() {\n if (!this.__dataClientsReady) {\n this.__dataClientsReady = true;\n this._readyClients();\n // Override point where accessors are turned on; importantly,\n // this is after clients have fully readied, providing a guarantee\n // that any property effects occur only after all clients are ready.\n this.__dataReady = true;\n } else {\n this.__enableOrFlushClients();\n }\n }\n\n // NOTE: We ensure clients either enable or flush as appropriate. This\n // handles two corner cases:\n // (1) clients flush properly when connected/enabled before the host\n // enables; e.g.\n // (a) Templatize stamps with no properties and does not flush and\n // (b) the instance is inserted into dom and\n // (c) then the instance flushes.\n // (2) clients enable properly when not connected/enabled when the host\n // flushes; e.g.\n // (a) a template is runtime stamped and not yet connected/enabled\n // (b) a host sets a property, causing stamped dom to flush\n // (c) the stamped dom enables.\n __enableOrFlushClients() {\n let clients = this.__dataPendingClients;\n if (clients) {\n this.__dataPendingClients = null;\n for (let i=0; i < clients.length; i++) {\n let client = clients[i];\n if (!client.__dataEnabled) {\n client._enableProperties();\n } else if (client.__dataPending) {\n client._flushProperties();\n }\n }\n }\n }\n\n /**\n * Perform any initial setup on client dom. Called before the first\n * `_flushProperties` call on client dom and before any element\n * observers are called.\n *\n * @override\n * @return {void}\n * @protected\n */\n _readyClients() {\n this.__enableOrFlushClients();\n }\n\n /**\n * Sets a bag of property changes to this instance, and\n * synchronously processes all effects of the properties as a batch.\n *\n * Property names must be simple properties, not paths. Batched\n * path propagation is not supported.\n *\n * @override\n * @param {Object} props Bag of one or more key-value pairs whose key is\n * a property and value is the new value to set for that property.\n * @param {boolean=} setReadOnly When true, any private values set in\n * `props` will be set. By default, `setProperties` will not set\n * `readOnly: true` root properties.\n * @return {void}\n * @public\n */\n setProperties(props, setReadOnly) {\n for (let path in props) {\n if (setReadOnly || !this[TYPES.READ_ONLY] || !this[TYPES.READ_ONLY][path]) {\n //TODO(kschaaf): explicitly disallow paths in setProperty?\n // wildcard observers currently only pass the first changed path\n // in the `info` object, and you could do some odd things batching\n // paths, e.g. {'foo.bar': {...}, 'foo': null}\n this._setPendingPropertyOrPath(path, props[path], true);\n }\n }\n this._invalidateProperties();\n }\n\n /**\n * Overrides `PropertyAccessors` so that property accessor\n * side effects are not enabled until after client dom is fully ready.\n * Also calls `_flushClients` callback to ensure client dom is enabled\n * that was not enabled as a result of flushing properties.\n *\n * @override\n * @return {void}\n */\n ready() {\n // It is important that `super.ready()` is not called here as it\n // immediately turns on accessors. Instead, we wait until `readyClients`\n // to enable accessors to provide a guarantee that clients are ready\n // before processing any accessors side effects.\n this._flushProperties();\n // If no data was pending, `_flushProperties` will not `flushClients`\n // so ensure this is done.\n if (!this.__dataClientsReady) {\n this._flushClients();\n }\n // Before ready, client notifications do not trigger _flushProperties.\n // Therefore a flush is necessary here if data has been set.\n if (this.__dataPending) {\n this._flushProperties();\n }\n }\n\n /**\n * Implements `PropertyAccessors`'s properties changed callback.\n *\n * Runs each class of effects for the batch of changed properties in\n * a specific order (compute, propagate, reflect, observe, notify).\n *\n * @override\n * @param {!Object} currentProps Bag of all current accessor values\n * @param {?Object} changedProps Bag of properties changed since the last\n * call to `_propertiesChanged`\n * @param {?Object} oldProps Bag of previous values for each property\n * in `changedProps`\n * @return {void}\n */\n _propertiesChanged(currentProps, changedProps, oldProps) {\n // ----------------------------\n // let c = Object.getOwnPropertyNames(changedProps || {});\n // window.debug && console.group(this.localName + '#' + this.id + ': ' + c);\n // if (window.debug) { debugger; }\n // ----------------------------\n let hasPaths = this.__dataHasPaths;\n this.__dataHasPaths = false;\n let notifyProps;\n // Compute properties\n runComputedEffects(this, changedProps, oldProps, hasPaths);\n // Clear notify properties prior to possible reentry (propagate, observe),\n // but after computing effects have a chance to add to them\n notifyProps = this.__dataToNotify;\n this.__dataToNotify = null;\n // Propagate properties to clients\n this._propagatePropertyChanges(changedProps, oldProps, hasPaths);\n // Flush clients\n this._flushClients();\n // Reflect properties\n runEffects(this, this[TYPES.REFLECT], changedProps, oldProps, hasPaths);\n // Observe properties\n runEffects(this, this[TYPES.OBSERVE], changedProps, oldProps, hasPaths);\n // Notify properties to host\n if (notifyProps) {\n runNotifyEffects(this, notifyProps, changedProps, oldProps, hasPaths);\n }\n // Clear temporary cache at end of turn\n if (this.__dataCounter == 1) {\n this.__dataTemp = {};\n }\n // ----------------------------\n // window.debug && console.groupEnd(this.localName + '#' + this.id + ': ' + c);\n // ----------------------------\n }\n\n /**\n * Called to propagate any property changes to stamped template nodes\n * managed by this element.\n *\n * @override\n * @param {Object} changedProps Bag of changed properties\n * @param {Object} oldProps Bag of previous values for changed properties\n * @param {boolean} hasPaths True with `props` contains one or more paths\n * @return {void}\n * @protected\n */\n _propagatePropertyChanges(changedProps, oldProps, hasPaths) {\n if (this[TYPES.PROPAGATE]) {\n runEffects(this, this[TYPES.PROPAGATE], changedProps, oldProps, hasPaths);\n }\n if (this.__templateInfo) {\n this._runEffectsForTemplate(this.__templateInfo, changedProps, oldProps, hasPaths);\n }\n }\n\n _runEffectsForTemplate(templateInfo, changedProps, oldProps, hasPaths) {\n const baseRunEffects = (changedProps, hasPaths) => {\n runEffects(this, templateInfo.propertyEffects, changedProps, oldProps,\n hasPaths, templateInfo.nodeList);\n for (let info=templateInfo.firstChild; info; info=info.nextSibling) {\n this._runEffectsForTemplate(info, changedProps, oldProps, hasPaths);\n }\n };\n if (templateInfo.runEffects) {\n templateInfo.runEffects(baseRunEffects, changedProps, hasPaths);\n } else {\n baseRunEffects(changedProps, hasPaths);\n }\n }\n\n /**\n * Aliases one data path as another, such that path notifications from one\n * are routed to the other.\n *\n * @override\n * @param {string | !Array<string|number>} to Target path to link.\n * @param {string | !Array<string|number>} from Source path to link.\n * @return {void}\n * @public\n */\n linkPaths(to, from) {\n to = normalize(to);\n from = normalize(from);\n this.__dataLinkedPaths = this.__dataLinkedPaths || {};\n this.__dataLinkedPaths[to] = from;\n }\n\n /**\n * Removes a data path alias previously established with `_linkPaths`.\n *\n * Note, the path to unlink should be the target (`to`) used when\n * linking the paths.\n *\n * @override\n * @param {string | !Array<string|number>} path Target path to unlink.\n * @return {void}\n * @public\n */\n unlinkPaths(path) {\n path = normalize(path);\n if (this.__dataLinkedPaths) {\n delete this.__dataLinkedPaths[path];\n }\n }\n\n /**\n * Notify that an array has changed.\n *\n * Example:\n *\n * this.items = [ {name: 'Jim'}, {name: 'Todd'}, {name: 'Bill'} ];\n * ...\n * this.items.splice(1, 1, {name: 'Sam'});\n * this.items.push({name: 'Bob'});\n * this.notifySplices('items', [\n * { index: 1, removed: [{name: 'Todd'}], addedCount: 1,\n * object: this.items, type: 'splice' },\n * { index: 3, removed: [], addedCount: 1,\n * object: this.items, type: 'splice'}\n * ]);\n *\n * @param {string} path Path that should be notified.\n * @param {Array} splices Array of splice records indicating ordered\n * changes that occurred to the array. Each record should have the\n * following fields:\n * * index: index at which the change occurred\n * * removed: array of items that were removed from this index\n * * addedCount: number of new items added at this index\n * * object: a reference to the array in question\n * * type: the string literal 'splice'\n *\n * Note that splice records _must_ be normalized such that they are\n * reported in index order (raw results from `Object.observe` are not\n * ordered and must be normalized/merged before notifying).\n *\n * @override\n * @return {void}\n * @public\n */\n notifySplices(path, splices) {\n let info = {path: ''};\n let array = /** @type {Array} */(get(this, path, info));\n notifySplices(this, array, info.path, splices);\n }\n\n /**\n * Convenience method for reading a value from a path.\n *\n * Note, if any part in the path is undefined, this method returns\n * `undefined` (this method does not throw when dereferencing undefined\n * paths).\n *\n * @override\n * @param {(string|!Array<(string|number)>)} path Path to the value\n * to read. The path may be specified as a string (e.g. `foo.bar.baz`)\n * or an array of path parts (e.g. `['foo.bar', 'baz']`). Note that\n * bracketed expressions are not supported; string-based path parts\n * *must* be separated by dots. Note that when dereferencing array\n * indices, the index may be used as a dotted part directly\n * (e.g. `users.12.name` or `['users', 12, 'name']`).\n * @param {Object=} root Root object from which the path is evaluated.\n * @return {*} Value at the path, or `undefined` if any part of the path\n * is undefined.\n * @public\n */\n get(path, root) {\n return get(root || this, path);\n }\n\n /**\n * Convenience method for setting a value to a path and notifying any\n * elements bound to the same path.\n *\n * Note, if any part in the path except for the last is undefined,\n * this method does nothing (this method does not throw when\n * dereferencing undefined paths).\n *\n * @override\n * @param {(string|!Array<(string|number)>)} path Path to the value\n * to write. The path may be specified as a string (e.g. `'foo.bar.baz'`)\n * or an array of path parts (e.g. `['foo.bar', 'baz']`). Note that\n * bracketed expressions are not supported; string-based path parts\n * *must* be separated by dots. Note that when dereferencing array\n * indices, the index may be used as a dotted part directly\n * (e.g. `'users.12.name'` or `['users', 12, 'name']`).\n * @param {*} value Value to set at the specified path.\n * @param {Object=} root Root object from which the path is evaluated.\n * When specified, no notification will occur.\n * @return {void}\n * @public\n */\n set(path, value, root) {\n if (root) {\n set(root, path, value);\n } else {\n if (!this[TYPES.READ_ONLY] || !this[TYPES.READ_ONLY][/** @type {string} */(path)]) {\n if (this._setPendingPropertyOrPath(path, value, true)) {\n this._invalidateProperties();\n }\n }\n }\n }\n\n /**\n * Adds items onto the end of the array at the path specified.\n *\n * The arguments after `path` and return value match that of\n * `Array.prototype.push`.\n *\n * This method notifies other paths to the same array that a\n * splice occurred to the array.\n *\n * @override\n * @param {string | !Array<string|number>} path Path to array.\n * @param {...*} items Items to push onto array\n * @return {number} New length of the array.\n * @public\n */\n push(path, ...items) {\n let info = {path: ''};\n let array = /** @type {Array}*/(get(this, path, info));\n let len = array.length;\n let ret = array.push(...items);\n if (items.length) {\n notifySplice(this, array, info.path, len, items.length, []);\n }\n return ret;\n }\n\n /**\n * Removes an item from the end of array at the path specified.\n *\n * The arguments after `path` and return value match that of\n * `Array.prototype.pop`.\n *\n * This method notifies other paths to the same array that a\n * splice occurred to the array.\n *\n * @override\n * @param {string | !Array<string|number>} path Path to array.\n * @return {*} Item that was removed.\n * @public\n */\n pop(path) {\n let info = {path: ''};\n let array = /** @type {Array} */(get(this, path, info));\n let hadLength = Boolean(array.length);\n let ret = array.pop();\n if (hadLength) {\n notifySplice(this, array, info.path, array.length, 0, [ret]);\n }\n return ret;\n }\n\n /**\n * Starting from the start index specified, removes 0 or more items\n * from the array and inserts 0 or more new items in their place.\n *\n * The arguments after `path` and return value match that of\n * `Array.prototype.splice`.\n *\n * This method notifies other paths to the same array that a\n * splice occurred to the array.\n *\n * @override\n * @param {string | !Array<string|number>} path Path to array.\n * @param {number} start Index from which to start removing/inserting.\n * @param {number=} deleteCount Number of items to remove.\n * @param {...*} items Items to insert into array.\n * @return {!Array} Array of removed items.\n * @public\n */\n splice(path, start, deleteCount, ...items) {\n let info = {path : ''};\n let array = /** @type {Array} */(get(this, path, info));\n // Normalize fancy native splice handling of crazy start values\n if (start < 0) {\n start = array.length - Math.floor(-start);\n } else if (start) {\n start = Math.floor(start);\n }\n // array.splice does different things based on the number of arguments\n // you pass in. Therefore, array.splice(0) and array.splice(0, undefined)\n // do different things. In the former, the whole array is cleared. In the\n // latter, no items are removed.\n // This means that we need to detect whether 1. one of the arguments\n // is actually passed in and then 2. determine how many arguments\n // we should pass on to the native array.splice\n //\n let ret;\n // Omit any additional arguments if they were not passed in\n if (arguments.length === 2) {\n ret = array.splice(start);\n // Either start was undefined and the others were defined, but in this\n // case we can safely pass on all arguments\n //\n // Note: this includes the case where none of the arguments were passed in,\n // e.g. this.splice('array'). However, if both start and deleteCount\n // are undefined, array.splice will not modify the array (as expected)\n } else {\n ret = array.splice(start, deleteCount, ...items);\n }\n // At the end, check whether any items were passed in (e.g. insertions)\n // or if the return array contains items (e.g. deletions).\n // Only notify if items were added or deleted.\n if (items.length || ret.length) {\n notifySplice(this, array, info.path, start, items.length, ret);\n }\n return ret;\n }\n\n /**\n * Removes an item from the beginning of array at the path specified.\n *\n * The arguments after `path` and return value match that of\n * `Array.prototype.pop`.\n *\n * This method notifies other paths to the same array that a\n * splice occurred to the array.\n *\n * @override\n * @param {string | !Array<string|number>} path Path to array.\n * @return {*} Item that was removed.\n * @public\n */\n shift(path) {\n let info = {path: ''};\n let array = /** @type {Array} */(get(this, path, info));\n let hadLength = Boolean(array.length);\n let ret = array.shift();\n if (hadLength) {\n notifySplice(this, array, info.path, 0, 0, [ret]);\n }\n return ret;\n }\n\n /**\n * Adds items onto the beginning of the array at the path specified.\n *\n * The arguments after `path` and return value match that of\n * `Array.prototype.push`.\n *\n * This method notifies other paths to the same array that a\n * splice occurred to the array.\n *\n * @override\n * @param {string | !Array<string|number>} path Path to array.\n * @param {...*} items Items to insert info array\n * @return {number} New length of the array.\n * @public\n */\n unshift(path, ...items) {\n let info = {path: ''};\n let array = /** @type {Array} */(get(this, path, info));\n let ret = array.unshift(...items);\n if (items.length) {\n notifySplice(this, array, info.path, 0, items.length, []);\n }\n return ret;\n }\n\n /**\n * Notify that a path has changed.\n *\n * Example:\n *\n * this.item.user.name = 'Bob';\n * this.notifyPath('item.user.name');\n *\n * @override\n * @param {string} path Path that should be notified.\n * @param {*=} value Value at the path (optional).\n * @return {void}\n * @public\n */\n notifyPath(path, value) {\n /** @type {string} */\n let propPath;\n if (arguments.length == 1) {\n // Get value if not supplied\n let info = {path: ''};\n value = get(this, path, info);\n propPath = info.path;\n } else if (Array.isArray(path)) {\n // Normalize path if needed\n propPath = normalize(path);\n } else {\n propPath = /** @type{string} */(path);\n }\n if (this._setPendingPropertyOrPath(propPath, value, true, true)) {\n this._invalidateProperties();\n }\n }\n\n /**\n * Equivalent to static `createReadOnlyProperty` API but can be called on\n * an instance to add effects at runtime. See that method for\n * full API docs.\n *\n * @override\n * @param {string} property Property name\n * @param {boolean=} protectedSetter Creates a custom protected setter\n * when `true`.\n * @return {void}\n * @protected\n */\n _createReadOnlyProperty(property, protectedSetter) {\n this._addPropertyEffect(property, TYPES.READ_ONLY);\n if (protectedSetter) {\n this['_set' + upper(property)] = /** @this {PropertyEffects} */function(value) {\n this._setProperty(property, value);\n };\n }\n }\n\n /**\n * Equivalent to static `createPropertyObserver` API but can be called on\n * an instance to add effects at runtime. See that method for\n * full API docs.\n *\n * @override\n * @param {string} property Property name\n * @param {string|function(*,*)} method Function or name of observer method\n * to call\n * @param {boolean=} dynamicFn Whether the method name should be included as\n * a dependency to the effect.\n * @return {void}\n * @protected\n */\n _createPropertyObserver(property, method, dynamicFn) {\n let info = { property, method, dynamicFn: Boolean(dynamicFn) };\n this._addPropertyEffect(property, TYPES.OBSERVE, {\n fn: runObserverEffect, info, trigger: {name: property}\n });\n if (dynamicFn) {\n this._addPropertyEffect(/** @type {string} */(method), TYPES.OBSERVE, {\n fn: runObserverEffect, info, trigger: {name: method}\n });\n }\n }\n\n /**\n * Equivalent to static `createMethodObserver` API but can be called on\n * an instance to add effects at runtime. See that method for\n * full API docs.\n *\n * @override\n * @param {string} expression Method expression\n * @param {boolean|Object=} dynamicFn Boolean or object map indicating\n * whether method names should be included as a dependency to the effect.\n * @return {void}\n * @protected\n */\n _createMethodObserver(expression, dynamicFn) {\n let sig = parseMethod(expression);\n if (!sig) {\n throw new Error(\"Malformed observer expression '\" + expression + \"'\");\n }\n createMethodEffect(this, sig, TYPES.OBSERVE, runMethodEffect, null, dynamicFn);\n }\n\n /**\n * Equivalent to static `createNotifyingProperty` API but can be called on\n * an instance to add effects at runtime. See that method for\n * full API docs.\n *\n * @override\n * @param {string} property Property name\n * @return {void}\n * @protected\n */\n _createNotifyingProperty(property) {\n this._addPropertyEffect(property, TYPES.NOTIFY, {\n fn: runNotifyEffect,\n info: {\n eventName: camelToDashCase(property) + '-changed',\n property: property\n }\n });\n }\n\n /**\n * Equivalent to static `createReflectedProperty` API but can be called on\n * an instance to add effects at runtime. See that method for\n * full API docs.\n *\n * @override\n * @param {string} property Property name\n * @return {void}\n * @protected\n * @suppress {missingProperties} go/missingfnprops\n */\n _createReflectedProperty(property) {\n let attr = this.constructor.attributeNameForProperty(property);\n if (attr[0] === '-') {\n console.warn('Property ' + property + ' cannot be reflected to attribute ' +\n attr + ' because \"-\" is not a valid starting attribute name. Use a lowercase first letter for the property instead.');\n } else {\n this._addPropertyEffect(property, TYPES.REFLECT, {\n fn: runReflectEffect,\n info: {\n attrName: attr\n }\n });\n }\n }\n\n /**\n * Equivalent to static `createComputedProperty` API but can be called on\n * an instance to add effects at runtime. See that method for\n * full API docs.\n *\n * @override\n * @param {string} property Name of computed property to set\n * @param {string} expression Method expression\n * @param {boolean|Object=} dynamicFn Boolean or object map indicating\n * whether method names should be included as a dependency to the effect.\n * @return {void}\n * @protected\n */\n _createComputedProperty(property, expression, dynamicFn) {\n let sig = parseMethod(expression);\n if (!sig) {\n throw new Error(\"Malformed computed expression '\" + expression + \"'\");\n }\n const info = createMethodEffect(this, sig, TYPES.COMPUTE, runComputedEffect, property, dynamicFn);\n // Effects are normally stored as map of dependency->effect, but for\n // ordered computation, we also need tree of computedProp->dependencies\n ensureOwnEffectMap(this, COMPUTE_INFO)[property] = info;\n }\n\n /**\n * Gather the argument values for a method specified in the provided array\n * of argument metadata.\n *\n * The `path` and `value` arguments are used to fill in wildcard descriptor\n * when the method is being called as a result of a path notification.\n *\n * @param {!Array<!MethodArg>} args Array of argument metadata\n * @param {string} path Property/path name that triggered the method effect\n * @param {Object} props Bag of current property changes\n * @return {!Array<*>} Array of argument values\n * @private\n */\n _marshalArgs(args, path, props) {\n const data = this.__data;\n const values = [];\n for (let i=0, l=args.length; i<l; i++) {\n let {name, structured, wildcard, value, literal} = args[i];\n if (!literal) {\n if (wildcard) {\n const matches = isDescendant(name, path);\n const pathValue = getArgValue(data, props, matches ? path : name);\n value = {\n path: matches ? path : name,\n value: pathValue,\n base: matches ? get(data, name) : pathValue\n };\n } else {\n value = structured ? getArgValue(data, props, name) : data[name];\n }\n }\n // When the `legacyUndefined` flag is enabled, pass a no-op value\n // so that the observer, computed property, or compound binding is aborted.\n if (legacyUndefined && !this._overrideLegacyUndefined && value === undefined && args.length > 1) {\n return NOOP;\n }\n values[i] = value;\n }\n return values;\n }\n\n // -- static class methods ------------\n\n /**\n * Ensures an accessor exists for the specified property, and adds\n * to a list of \"property effects\" that will run when the accessor for\n * the specified property is set. Effects are grouped by \"type\", which\n * roughly corresponds to a phase in effect processing. The effect\n * metadata should be in the following form:\n *\n * {\n * fn: effectFunction, // Reference to function to call to perform effect\n * info: { ... } // Effect metadata passed to function\n * trigger: { // Optional triggering metadata; if not provided\n * name: string // the property is treated as a wildcard\n * structured: boolean\n * wildcard: boolean\n * }\n * }\n *\n * Effects are called from `_propertiesChanged` in the following order by\n * type:\n *\n * 1. COMPUTE\n * 2. PROPAGATE\n * 3. REFLECT\n * 4. OBSERVE\n * 5. NOTIFY\n *\n * Effect functions are called with the following signature:\n *\n * effectFunction(inst, path, props, oldProps, info, hasPaths)\n *\n * @param {string} property Property that should trigger the effect\n * @param {string} type Effect type, from this.PROPERTY_EFFECT_TYPES\n * @param {Object=} effect Effect metadata object\n * @return {void}\n * @protected\n * @nocollapse\n */\n static addPropertyEffect(property, type, effect) {\n this.prototype._addPropertyEffect(property, type, effect);\n }\n\n /**\n * Creates a single-property observer for the given property.\n *\n * @param {string} property Property name\n * @param {string|function(*,*)} method Function or name of observer method to call\n * @param {boolean=} dynamicFn Whether the method name should be included as\n * a dependency to the effect.\n * @return {void}\n * @protected\n * @nocollapse\n */\n static createPropertyObserver(property, method, dynamicFn) {\n this.prototype._createPropertyObserver(property, method, dynamicFn);\n }\n\n /**\n * Creates a multi-property \"method observer\" based on the provided\n * expression, which should be a string in the form of a normal JavaScript\n * function signature: `'methodName(arg1, [..., argn])'`. Each argument\n * should correspond to a property or path in the context of this\n * prototype (or instance), or may be a literal string or number.\n *\n * @param {string} expression Method expression\n * @param {boolean|Object=} dynamicFn Boolean or object map indicating\n * @return {void}\n * whether method names should be included as a dependency to the effect.\n * @protected\n * @nocollapse\n */\n static createMethodObserver(expression, dynamicFn) {\n this.prototype._createMethodObserver(expression, dynamicFn);\n }\n\n /**\n * Causes the setter for the given property to dispatch `<property>-changed`\n * events to notify of changes to the property.\n *\n * @param {string} property Property name\n * @return {void}\n * @protected\n * @nocollapse\n */\n static createNotifyingProperty(property) {\n this.prototype._createNotifyingProperty(property);\n }\n\n /**\n * Creates a read-only accessor for the given property.\n *\n * To set the property, use the protected `_setProperty` API.\n * To create a custom protected setter (e.g. `_setMyProp()` for\n * property `myProp`), pass `true` for `protectedSetter`.\n *\n * Note, if the property will have other property effects, this method\n * should be called first, before adding other effects.\n *\n * @param {string} property Property name\n * @param {boolean=} protectedSetter Creates a custom protected setter\n * when `true`.\n * @return {void}\n * @protected\n * @nocollapse\n */\n static createReadOnlyProperty(property, protectedSetter) {\n this.prototype._createReadOnlyProperty(property, protectedSetter);\n }\n\n /**\n * Causes the setter for the given property to reflect the property value\n * to a (dash-cased) attribute of the same name.\n *\n * @param {string} property Property name\n * @return {void}\n * @protected\n * @nocollapse\n */\n static createReflectedProperty(property) {\n this.prototype._createReflectedProperty(property);\n }\n\n /**\n * Creates a computed property whose value is set to the result of the\n * method described by the given `expression` each time one or more\n * arguments to the method changes. The expression should be a string\n * in the form of a normal JavaScript function signature:\n * `'methodName(arg1, [..., argn])'`\n *\n * @param {string} property Name of computed property to set\n * @param {string} expression Method expression\n * @param {boolean|Object=} dynamicFn Boolean or object map indicating whether\n * method names should be included as a dependency to the effect.\n * @return {void}\n * @protected\n * @nocollapse\n */\n static createComputedProperty(property, expression, dynamicFn) {\n this.prototype._createComputedProperty(property, expression, dynamicFn);\n }\n\n /**\n * Parses the provided template to ensure binding effects are created\n * for them, and then ensures property accessors are created for any\n * dependent properties in the template. Binding effects for bound\n * templates are stored in a linked list on the instance so that\n * templates can be efficiently stamped and unstamped.\n *\n * @param {!HTMLTemplateElement} template Template containing binding\n * bindings\n * @return {!TemplateInfo} Template metadata object\n * @protected\n * @nocollapse\n */\n static bindTemplate(template) {\n return this.prototype._bindTemplate(template);\n }\n\n // -- binding ----------------------------------------------\n\n /*\n * Overview of binding flow:\n *\n * During finalization (`instanceBinding==false`, `wasPreBound==false`):\n * `_bindTemplate(t, false)` called directly during finalization - parses\n * the template (for the first time), and then assigns that _prototypical_\n * template info to `__preboundTemplateInfo` _on the prototype_; note in\n * this case `wasPreBound` is false; this is the first time we're binding\n * it, thus we create accessors.\n *\n * During first stamping (`instanceBinding==true`, `wasPreBound==true`):\n * `_stampTemplate` calls `_bindTemplate(t, true)`: the `templateInfo`\n * returned matches the prebound one, and so this is `wasPreBound == true`\n * state; thus we _skip_ creating accessors, but _do_ create an instance\n * of the template info to serve as the start of our linked list (needs to\n * be an instance, not the prototypical one, so that we can add `nodeList`\n * to it to contain the `nodeInfo`-ordered list of instance nodes for\n * bindings, and so we can chain runtime-stamped template infos off of\n * it). At this point, the call to `_stampTemplate` calls\n * `applyTemplateInfo` for each nested `<template>` found during parsing\n * to hand prototypical `_templateInfo` to them; we also pass the _parent_\n * `templateInfo` to the `<template>` so that we have the instance-time\n * parent to link the `templateInfo` under in the case it was\n * runtime-stamped.\n *\n * During subsequent runtime stamping (`instanceBinding==true`,\n * `wasPreBound==false`): `_stampTemplate` calls `_bindTemplate(t, true)`\n * - here `templateInfo` is guaranteed to _not_ match the prebound one,\n * because it was either a different template altogether, or even if it\n * was the same template, the step above created a instance of the info;\n * in this case `wasPreBound == false`, so we _do_ create accessors, _and_\n * link a instance into the linked list.\n */\n\n /**\n * Equivalent to static `bindTemplate` API but can be called on an instance\n * to add effects at runtime. See that method for full API docs.\n *\n * This method may be called on the prototype (for prototypical template\n * binding, to avoid creating accessors every instance) once per prototype,\n * and will be called with `runtimeBinding: true` by `_stampTemplate` to\n * create and link an instance of the template metadata associated with a\n * particular stamping.\n *\n * @override\n * @param {!HTMLTemplateElement} template Template containing binding\n * bindings\n * @param {boolean=} instanceBinding When false (default), performs\n * \"prototypical\" binding of the template and overwrites any previously\n * bound template for the class. When true (as passed from\n * `_stampTemplate`), the template info is instanced and linked into the\n * list of bound templates.\n * @return {!TemplateInfo} Template metadata object; for `runtimeBinding`,\n * this is an instance of the prototypical template info\n * @protected\n * @suppress {missingProperties} go/missingfnprops\n */\n _bindTemplate(template, instanceBinding) {\n let templateInfo = this.constructor._parseTemplate(template);\n let wasPreBound = this.__preBoundTemplateInfo == templateInfo;\n // Optimization: since this is called twice for proto-bound templates,\n // don't attempt to recreate accessors if this template was pre-bound\n if (!wasPreBound) {\n for (let prop in templateInfo.propertyEffects) {\n this._createPropertyAccessor(prop);\n }\n }\n if (instanceBinding) {\n // For instance-time binding, create instance of template metadata\n // and link into tree of templates if necessary\n templateInfo = /** @type {!TemplateInfo} */(Object.create(templateInfo));\n templateInfo.wasPreBound = wasPreBound;\n if (!this.__templateInfo) {\n // Set the info to the root of the tree\n this.__templateInfo = templateInfo;\n } else {\n // Append this template info onto the end of its parent template's\n // list, which will determine the tree structure via which property\n // effects are run; if this template was not nested in another\n // template, use the root template (the first stamped one) as the\n // parent. Note, `parent` is the `templateInfo` instance for this\n // template's parent (containing) template, which was set up in\n // `applyTemplateInfo`. While a given template's `parent` is set\n // apriori, it is only added to the parent's child list at the point\n // that it is being bound, since a template may or may not ever be\n // stamped, and may be stamped more than once (in which case instances\n // of the template info will be in the tree under its parent more than\n // once).\n const parent = template._parentTemplateInfo || this.__templateInfo;\n const previous = parent.lastChild;\n templateInfo.parent = parent;\n parent.lastChild = templateInfo;\n templateInfo.previousSibling = previous;\n if (previous) {\n previous.nextSibling = templateInfo;\n } else {\n parent.firstChild = templateInfo;\n }\n }\n } else {\n this.__preBoundTemplateInfo = templateInfo;\n }\n return templateInfo;\n }\n\n /**\n * Adds a property effect to the given template metadata, which is run\n * at the \"propagate\" stage of `_propertiesChanged` when the template\n * has been bound to the element via `_bindTemplate`.\n *\n * The `effect` object should match the format in `_addPropertyEffect`.\n *\n * @param {Object} templateInfo Template metadata to add effect to\n * @param {string} prop Property that should trigger the effect\n * @param {Object=} effect Effect metadata object\n * @return {void}\n * @protected\n * @nocollapse\n */\n static _addTemplatePropertyEffect(templateInfo, prop, effect) {\n let hostProps = templateInfo.hostProps = templateInfo.hostProps || {};\n hostProps[prop] = true;\n let effects = templateInfo.propertyEffects = templateInfo.propertyEffects || {};\n let propEffects = effects[prop] = effects[prop] || [];\n propEffects.push(effect);\n }\n\n /**\n * Stamps the provided template and performs instance-time setup for\n * Polymer template features, including data bindings, declarative event\n * listeners, and the `this.$` map of `id`'s to nodes. A document fragment\n * is returned containing the stamped DOM, ready for insertion into the\n * DOM.\n *\n * This method may be called more than once; however note that due to\n * `shadycss` polyfill limitations, only styles from templates prepared\n * using `ShadyCSS.prepareTemplate` will be correctly polyfilled (scoped\n * to the shadow root and support CSS custom properties), and note that\n * `ShadyCSS.prepareTemplate` may only be called once per element. As such,\n * any styles required by in runtime-stamped templates must be included\n * in the main element template.\n *\n * @param {!HTMLTemplateElement} template Template to stamp\n * @param {TemplateInfo=} templateInfo Optional bound template info associated\n * with the template to be stamped; if omitted the template will be\n * automatically bound.\n * @return {!StampedTemplate} Cloned template content\n * @override\n * @protected\n */\n _stampTemplate(template, templateInfo) {\n templateInfo = templateInfo || /** @type {!TemplateInfo} */(this._bindTemplate(template, true));\n // Ensures that created dom is `_enqueueClient`'d to this element so\n // that it can be flushed on next call to `_flushProperties`\n hostStack.push(this);\n let dom = super._stampTemplate(template, templateInfo);\n hostStack.pop();\n // Add template-instance-specific data to instanced templateInfo\n templateInfo.nodeList = dom.nodeList;\n // Capture child nodes to allow unstamping of non-prototypical templates\n if (!templateInfo.wasPreBound) {\n let nodes = templateInfo.childNodes = [];\n for (let n=dom.firstChild; n; n=n.nextSibling) {\n nodes.push(n);\n }\n }\n dom.templateInfo = templateInfo;\n // Setup compound storage, 2-way listeners, and dataHost for bindings\n setupBindings(this, templateInfo);\n // Flush properties into template nodes; the check on `__dataClientsReady`\n // ensures we don't needlessly run effects for an element's initial\n // prototypical template stamping since they will happen as a part of the\n // first call to `_propertiesChanged`. This flag is set to true\n // after running the initial propagate effects, and immediately before\n // flushing clients. Since downstream clients could cause stamping on\n // this host (e.g. a fastDomIf `dom-if` being forced to render\n // synchronously), this flag ensures effects for runtime-stamped templates\n // are run at this point during the initial element boot-up.\n if (this.__dataClientsReady) {\n this._runEffectsForTemplate(templateInfo, this.__data, null, false);\n this._flushClients();\n }\n return dom;\n }\n\n /**\n * Removes and unbinds the nodes previously contained in the provided\n * DocumentFragment returned from `_stampTemplate`.\n *\n * @override\n * @param {!StampedTemplate} dom DocumentFragment previously returned\n * from `_stampTemplate` associated with the nodes to be removed\n * @return {void}\n * @protected\n */\n _removeBoundDom(dom) {\n // Unlink template info; Note that while the child is unlinked from its\n // parent list, a template's `parent` reference is never removed, since\n // this is is determined by the tree structure and applied at\n // `applyTemplateInfo` time.\n const templateInfo = dom.templateInfo;\n const {previousSibling, nextSibling, parent} = templateInfo;\n if (previousSibling) {\n previousSibling.nextSibling = nextSibling;\n } else if (parent) {\n parent.firstChild = nextSibling;\n }\n if (nextSibling) {\n nextSibling.previousSibling = previousSibling;\n } else if (parent) {\n parent.lastChild = previousSibling;\n }\n templateInfo.nextSibling = templateInfo.previousSibling = null;\n // Remove stamped nodes\n let nodes = templateInfo.childNodes;\n for (let i=0; i<nodes.length; i++) {\n let node = nodes[i];\n wrap(wrap(node).parentNode).removeChild(node);\n }\n }\n\n /**\n * Overrides default `TemplateStamp` implementation to add support for\n * parsing bindings from `TextNode`'s' `textContent`. A `bindings`\n * array is added to `nodeInfo` and populated with binding metadata\n * with information capturing the binding target, and a `parts` array\n * with one or more metadata objects capturing the source(s) of the\n * binding.\n *\n * @param {Node} node Node to parse\n * @param {TemplateInfo} templateInfo Template metadata for current template\n * @param {NodeInfo} nodeInfo Node metadata for current template node\n * @return {boolean} `true` if the visited node added node-specific\n * metadata to `nodeInfo`\n * @protected\n * @suppress {missingProperties} Interfaces in closure do not inherit statics, but classes do\n * @nocollapse\n */\n static _parseTemplateNode(node, templateInfo, nodeInfo) {\n // TODO(https://github.com/google/closure-compiler/issues/3240):\n // Change back to just super.methodCall()\n let noted = propertyEffectsBase._parseTemplateNode.call(\n this, node, templateInfo, nodeInfo);\n if (node.nodeType === Node.TEXT_NODE) {\n let parts = this._parseBindings(node.textContent, templateInfo);\n if (parts) {\n // Initialize the textContent with any literal parts\n // NOTE: default to a space here so the textNode remains; some browsers\n // (IE) omit an empty textNode following cloneNode/importNode.\n node.textContent = literalFromParts(parts) || ' ';\n addBinding(this, templateInfo, nodeInfo, 'text', 'textContent', parts);\n noted = true;\n }\n }\n return noted;\n }\n\n /**\n * Overrides default `TemplateStamp` implementation to add support for\n * parsing bindings from attributes. A `bindings`\n * array is added to `nodeInfo` and populated with binding metadata\n * with information capturing the binding target, and a `parts` array\n * with one or more metadata objects capturing the source(s) of the\n * binding.\n *\n * @param {Element} node Node to parse\n * @param {TemplateInfo} templateInfo Template metadata for current template\n * @param {NodeInfo} nodeInfo Node metadata for current template node\n * @param {string} name Attribute name\n * @param {string} value Attribute value\n * @return {boolean} `true` if the visited node added node-specific\n * metadata to `nodeInfo`\n * @protected\n * @suppress {missingProperties} Interfaces in closure do not inherit statics, but classes do\n * @nocollapse\n */\n static _parseTemplateNodeAttribute(node, templateInfo, nodeInfo, name, value) {\n let parts = this._parseBindings(value, templateInfo);\n if (parts) {\n // Attribute or property\n let origName = name;\n let kind = 'property';\n // The only way we see a capital letter here is if the attr has\n // a capital letter in it per spec. In this case, to make sure\n // this binding works, we go ahead and make the binding to the attribute.\n if (capitalAttributeRegex.test(name)) {\n kind = 'attribute';\n } else if (name[name.length-1] == '$') {\n name = name.slice(0, -1);\n kind = 'attribute';\n }\n // Initialize attribute bindings with any literal parts\n let literal = literalFromParts(parts);\n if (literal && kind == 'attribute') {\n // Ensure a ShadyCSS template scoped style is not removed\n // when a class$ binding's initial literal value is set.\n if (name == 'class' && node.hasAttribute('class')) {\n literal += ' ' + node.getAttribute(name);\n }\n node.setAttribute(name, literal);\n }\n // support disable-upgrade\n if (kind == 'attribute' && origName == 'disable-upgrade$') {\n node.setAttribute(name, '');\n }\n // Clear attribute before removing, since IE won't allow removing\n // `value` attribute if it previously had a value (can't\n // unconditionally set '' before removing since attributes with `$`\n // can't be set using setAttribute)\n if (node.localName === 'input' && origName === 'value') {\n node.setAttribute(origName, '');\n }\n // Remove annotation\n node.removeAttribute(origName);\n // Case hackery: attributes are lower-case, but bind targets\n // (properties) are case sensitive. Gambit is to map dash-case to\n // camel-case: `foo-bar` becomes `fooBar`.\n // Attribute bindings are excepted.\n if (kind === 'property') {\n name = dashToCamelCase(name);\n }\n addBinding(this, templateInfo, nodeInfo, kind, name, parts, literal);\n return true;\n } else {\n // TODO(https://github.com/google/closure-compiler/issues/3240):\n // Change back to just super.methodCall()\n return propertyEffectsBase._parseTemplateNodeAttribute.call(\n this, node, templateInfo, nodeInfo, name, value);\n }\n }\n\n /**\n * Overrides default `TemplateStamp` implementation to add support for\n * binding the properties that a nested template depends on to the template\n * as `_host_<property>`.\n *\n * @param {Node} node Node to parse\n * @param {TemplateInfo} templateInfo Template metadata for current template\n * @param {NodeInfo} nodeInfo Node metadata for current template node\n * @return {boolean} `true` if the visited node added node-specific\n * metadata to `nodeInfo`\n * @protected\n * @suppress {missingProperties} Interfaces in closure do not inherit statics, but classes do\n * @nocollapse\n */\n static _parseTemplateNestedTemplate(node, templateInfo, nodeInfo) {\n // TODO(https://github.com/google/closure-compiler/issues/3240):\n // Change back to just super.methodCall()\n let noted = propertyEffectsBase._parseTemplateNestedTemplate.call(\n this, node, templateInfo, nodeInfo);\n const parent = node.parentNode;\n const nestedTemplateInfo = nodeInfo.templateInfo;\n const isDomIf = parent.localName === 'dom-if';\n const isDomRepeat = parent.localName === 'dom-repeat';\n // Remove nested template and redirect its host bindings & templateInfo\n // onto the parent (dom-if/repeat element)'s nodeInfo\n if (removeNestedTemplates && (isDomIf || isDomRepeat)) {\n parent.removeChild(node);\n // Use the parent's nodeInfo (for the dom-if/repeat) to record the\n // templateInfo, and use that for any host property bindings below\n nodeInfo = nodeInfo.parentInfo;\n nodeInfo.templateInfo = nestedTemplateInfo;\n // Ensure the parent dom-if/repeat is noted since it now may have host\n // bindings; it may not have been if it did not have its own bindings\n nodeInfo.noted = true;\n noted = false;\n }\n // Merge host props into outer template and add bindings\n let hostProps = nestedTemplateInfo.hostProps;\n if (fastDomIf && isDomIf) {\n // `fastDomIf` mode uses runtime-template stamping to add accessors/\n // effects to properties used in its template; as such we don't need to\n // tax the host element with `_host_` bindings for the `dom-if`.\n // However, in the event it is nested in a `dom-repeat`, it is still\n // important that its host properties are added to the\n // TemplateInstance's `hostProps` so that they are forwarded to the\n // TemplateInstance.\n if (hostProps) {\n templateInfo.hostProps =\n Object.assign(templateInfo.hostProps || {}, hostProps);\n // Ensure the dom-if is noted so that it has a __dataHost, since\n // `fastDomIf` uses the host for runtime template stamping; note this\n // was already ensured above in the `removeNestedTemplates` case\n if (!removeNestedTemplates) {\n nodeInfo.parentInfo.noted = true;\n }\n }\n } else {\n let mode = '{';\n for (let source in hostProps) {\n let parts = [{ mode, source, dependencies: [source], hostProp: true }];\n addBinding(this, templateInfo, nodeInfo, 'property', '_host_' + source, parts);\n }\n }\n return noted;\n }\n\n /**\n * Called to parse text in a template (either attribute values or\n * textContent) into binding metadata.\n *\n * Any overrides of this method should return an array of binding part\n * metadata representing one or more bindings found in the provided text\n * and any \"literal\" text in between. Any non-literal parts will be passed\n * to `_evaluateBinding` when any dependencies change. The only required\n * fields of each \"part\" in the returned array are as follows:\n *\n * - `dependencies` - Array containing trigger metadata for each property\n * that should trigger the binding to update\n * - `literal` - String containing text if the part represents a literal;\n * in this case no `dependencies` are needed\n *\n * Additional metadata for use by `_evaluateBinding` may be provided in\n * each part object as needed.\n *\n * The default implementation handles the following types of bindings\n * (one or more may be intermixed with literal strings):\n * - Property binding: `[[prop]]`\n * - Path binding: `[[object.prop]]`\n * - Negated property or path bindings: `[[!prop]]` or `[[!object.prop]]`\n * - Two-way property or path bindings (supports negation):\n * `{{prop}}`, `{{object.prop}}`, `{{!prop}}` or `{{!object.prop}}`\n * - Inline computed method (supports negation):\n * `[[compute(a, 'literal', b)]]`, `[[!compute(a, 'literal', b)]]`\n *\n * The default implementation uses a regular expression for best\n * performance. However, the regular expression uses a white-list of\n * allowed characters in a data-binding, which causes problems for\n * data-bindings that do use characters not in this white-list.\n *\n * Instead of updating the white-list with all allowed characters,\n * there is a StrictBindingParser (see lib/mixins/strict-binding-parser)\n * that uses a state machine instead. This state machine is able to handle\n * all characters. However, it is slightly less performant, therefore we\n * extracted it into a separate optional mixin.\n *\n * @param {string} text Text to parse from attribute or textContent\n * @param {Object} templateInfo Current template metadata\n * @return {Array<!BindingPart>} Array of binding part metadata\n * @protected\n * @nocollapse\n */\n static _parseBindings(text, templateInfo) {\n let parts = [];\n let lastIndex = 0;\n let m;\n // Example: \"literal1{{prop}}literal2[[!compute(foo,bar)]]final\"\n // Regex matches:\n // Iteration 1: Iteration 2:\n // m[1]: '{{' '[['\n // m[2]: '' '!'\n // m[3]: 'prop' 'compute(foo,bar)'\n while ((m = bindingRegex.exec(text)) !== null) {\n // Add literal part\n if (m.index > lastIndex) {\n parts.push({literal: text.slice(lastIndex, m.index)});\n }\n // Add binding part\n let mode = m[1][0];\n let negate = Boolean(m[2]);\n let source = m[3].trim();\n let customEvent = false, notifyEvent = '', colon = -1;\n if (mode == '{' && (colon = source.indexOf('::')) > 0) {\n notifyEvent = source.substring(colon + 2);\n source = source.substring(0, colon);\n customEvent = true;\n }\n let signature = parseMethod(source);\n let dependencies = [];\n if (signature) {\n // Inline computed function\n let {args, methodName} = signature;\n for (let i=0; i<args.length; i++) {\n let arg = args[i];\n if (!arg.literal) {\n dependencies.push(arg);\n }\n }\n let dynamicFns = templateInfo.dynamicFns;\n if (dynamicFns && dynamicFns[methodName] || signature.static) {\n dependencies.push(methodName);\n signature.dynamicFn = true;\n }\n } else {\n // Property or path\n dependencies.push(source);\n }\n parts.push({\n source, mode, negate, customEvent, signature, dependencies,\n event: notifyEvent\n });\n lastIndex = bindingRegex.lastIndex;\n }\n // Add a final literal part\n if (lastIndex && lastIndex < text.length) {\n let literal = text.substring(lastIndex);\n if (literal) {\n parts.push({\n literal: literal\n });\n }\n }\n if (parts.length) {\n return parts;\n } else {\n return null;\n }\n }\n\n /**\n * Called to evaluate a previously parsed binding part based on a set of\n * one or more changed dependencies.\n *\n * @param {!Polymer_PropertyEffects} inst Element that should be used as\n * scope for binding dependencies\n * @param {BindingPart} part Binding part metadata\n * @param {string} path Property/path that triggered this effect\n * @param {Object} props Bag of current property changes\n * @param {Object} oldProps Bag of previous values for changed properties\n * @param {boolean} hasPaths True with `props` contains one or more paths\n * @return {*} Value the binding part evaluated to\n * @protected\n * @nocollapse\n */\n static _evaluateBinding(inst, part, path, props, oldProps, hasPaths) {\n let value;\n if (part.signature) {\n value = runMethodEffect(inst, path, props, oldProps, part.signature);\n } else if (path != part.source) {\n value = get(inst, part.source);\n } else {\n if (hasPaths && isPath(path)) {\n value = get(inst, path);\n } else {\n value = inst.__data[path];\n }\n }\n if (part.negate) {\n value = !value;\n }\n return value;\n }\n\n }\n\n return PropertyEffects;\n});\n\n/**\n * Stack for enqueuing client dom created by a host element.\n *\n * By default elements are flushed via `_flushProperties` when\n * `connectedCallback` is called. Elements attach their client dom to\n * themselves at `ready` time which results from this first flush.\n * This provides an ordering guarantee that the client dom an element\n * creates is flushed before the element itself (i.e. client `ready`\n * fires before host `ready`).\n *\n * However, if `_flushProperties` is called *before* an element is connected,\n * as for example `Templatize` does, this ordering guarantee cannot be\n * satisfied because no elements are connected. (Note: Bound elements that\n * receive data do become enqueued clients and are properly ordered but\n * unbound elements are not.)\n *\n * To maintain the desired \"client before host\" ordering guarantee for this\n * case we rely on the \"host stack. Client nodes registers themselves with\n * the creating host element when created. This ensures that all client dom\n * is readied in the proper order, maintaining the desired guarantee.\n *\n * @private\n */\nconst hostStack = [];\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport '../utils/boot.js';\n\nimport { dedupingMixin } from '../utils/mixin.js';\nimport { register, incrementInstanceCount } from '../utils/telemetry.js';\nimport { PropertiesChanged } from './properties-changed.js';\n\n/**\n * Creates a copy of `props` with each property normalized such that\n * upgraded it is an object with at least a type property { type: Type}.\n *\n * @param {!Object} props Properties to normalize\n * @return {!Object} Copy of input `props` with normalized properties that\n * are in the form {type: Type}\n * @private\n */\nfunction normalizeProperties(props) {\n const output = {};\n for (let p in props) {\n const o = props[p];\n output[p] = (typeof o === 'function') ? {type: o} : o;\n }\n return output;\n}\n\n/**\n * Mixin that provides a minimal starting point to using the PropertiesChanged\n * mixin by providing a mechanism to declare properties in a static\n * getter (e.g. static get properties() { return { foo: String } }). Changes\n * are reported via the `_propertiesChanged` method.\n *\n * This mixin provides no specific support for rendering. Users are expected\n * to create a ShadowRoot and put content into it and update it in whatever\n * way makes sense. This can be done in reaction to properties changing by\n * implementing `_propertiesChanged`.\n *\n * @mixinFunction\n * @polymer\n * @appliesMixin PropertiesChanged\n * @summary Mixin that provides a minimal starting point for using\n * the PropertiesChanged mixin by providing a declarative `properties` object.\n * @template T\n * @param {function(new:T)} superClass Class to apply mixin to.\n * @return {function(new:T)} superClass with mixin applied.\n */\nexport const PropertiesMixin = dedupingMixin(superClass => {\n\n /**\n * @constructor\n * @implements {Polymer_PropertiesChanged}\n * @private\n */\n const base = PropertiesChanged(superClass);\n\n /**\n * Returns the super class constructor for the given class, if it is an\n * instance of the PropertiesMixin.\n *\n * @param {!PropertiesMixinConstructor} constructor PropertiesMixin constructor\n * @return {?PropertiesMixinConstructor} Super class constructor\n */\n function superPropertiesClass(constructor) {\n const superCtor = Object.getPrototypeOf(constructor);\n\n // Note, the `PropertiesMixin` class below only refers to the class\n // generated by this call to the mixin; the instanceof test only works\n // because the mixin is deduped and guaranteed only to apply once, hence\n // all constructors in a proto chain will see the same `PropertiesMixin`\n return (superCtor.prototype instanceof PropertiesMixin) ?\n /** @type {!PropertiesMixinConstructor} */ (superCtor) : null;\n }\n\n /**\n * Returns a memoized version of the `properties` object for the\n * given class. Properties not in object format are converted to at\n * least {type}.\n *\n * @param {PropertiesMixinConstructor} constructor PropertiesMixin constructor\n * @return {Object} Memoized properties object\n */\n function ownProperties(constructor) {\n if (!constructor.hasOwnProperty(JSCompiler_renameProperty('__ownProperties', constructor))) {\n let props = null;\n\n if (constructor.hasOwnProperty(JSCompiler_renameProperty('properties', constructor))) {\n const properties = constructor.properties;\n\n if (properties) {\n props = normalizeProperties(properties);\n }\n }\n\n constructor.__ownProperties = props;\n }\n return constructor.__ownProperties;\n }\n\n /**\n * @polymer\n * @mixinClass\n * @extends {base}\n * @implements {Polymer_PropertiesMixin}\n * @unrestricted\n */\n class PropertiesMixin extends base {\n\n /**\n * Implements standard custom elements getter to observes the attributes\n * listed in `properties`.\n * @suppress {missingProperties} Interfaces in closure do not inherit statics, but classes do\n * @nocollapse\n */\n static get observedAttributes() {\n if (!this.hasOwnProperty(JSCompiler_renameProperty('__observedAttributes', this))) {\n register(this.prototype);\n const props = this._properties;\n this.__observedAttributes = props ? Object.keys(props).map(p => this.prototype._addPropertyToAttributeMap(p)) : [];\n }\n return this.__observedAttributes;\n }\n\n /**\n * Finalizes an element definition, including ensuring any super classes\n * are also finalized. This includes ensuring property\n * accessors exist on the element prototype. This method calls\n * `_finalizeClass` to finalize each constructor in the prototype chain.\n * @return {void}\n * @nocollapse\n */\n static finalize() {\n if (!this.hasOwnProperty(JSCompiler_renameProperty('__finalized', this))) {\n const superCtor = superPropertiesClass(/** @type {!PropertiesMixinConstructor} */(this));\n if (superCtor) {\n superCtor.finalize();\n }\n this.__finalized = true;\n this._finalizeClass();\n }\n }\n\n /**\n * Finalize an element class. This includes ensuring property\n * accessors exist on the element prototype. This method is called by\n * `finalize` and finalizes the class constructor.\n *\n * @protected\n * @nocollapse\n */\n static _finalizeClass() {\n const props = ownProperties(/** @type {!PropertiesMixinConstructor} */(this));\n if (props) {\n /** @type {?} */ (this).createProperties(props);\n }\n }\n\n /**\n * Returns a memoized version of all properties, including those inherited\n * from super classes. Properties not in object format are converted to\n * at least {type}.\n *\n * @return {Object} Object containing properties for this class\n * @protected\n * @nocollapse\n */\n static get _properties() {\n if (!this.hasOwnProperty(\n JSCompiler_renameProperty('__properties', this))) {\n const superCtor = superPropertiesClass(/** @type {!PropertiesMixinConstructor} */(this));\n this.__properties = Object.assign({},\n superCtor && superCtor._properties,\n ownProperties(/** @type {PropertiesMixinConstructor} */(this)));\n }\n return this.__properties;\n }\n\n /**\n * Overrides `PropertiesChanged` method to return type specified in the\n * static `properties` object for the given property.\n * @param {string} name Name of property\n * @return {*} Type to which to deserialize attribute\n *\n * @protected\n * @nocollapse\n */\n static typeForProperty(name) {\n const info = this._properties[name];\n return info && info.type;\n }\n\n /**\n * Overrides `PropertiesChanged` method and adds a call to\n * `finalize` which lazily configures the element's property accessors.\n * @override\n * @return {void}\n */\n _initializeProperties() {\n incrementInstanceCount();\n this.constructor.finalize();\n super._initializeProperties();\n }\n\n /**\n * Called when the element is added to a document.\n * Calls `_enableProperties` to turn on property system from\n * `PropertiesChanged`.\n * @suppress {missingProperties} Super may or may not implement the callback\n * @return {void}\n * @override\n */\n connectedCallback() {\n if (super.connectedCallback) {\n super.connectedCallback();\n }\n this._enableProperties();\n }\n\n /**\n * Called when the element is removed from a document\n * @suppress {missingProperties} Super may or may not implement the callback\n * @return {void}\n * @override\n */\n disconnectedCallback() {\n if (super.disconnectedCallback) {\n super.disconnectedCallback();\n }\n }\n\n }\n\n return PropertiesMixin;\n\n});\n","/**\n * @fileoverview\n * @suppress {checkPrototypalTypes}\n * @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt The complete set of authors may be found\n * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may\n * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by\n * Google as part of the polymer project is also subject to an additional IP\n * rights grant found at http://polymer.github.io/PATENTS.txt\n */\nimport '../utils/boot.js';\n\nimport { rootPath, strictTemplatePolicy, allowTemplateFromDomModule, legacyOptimizations, legacyWarnings, syncInitialRender, supportsAdoptingStyleSheets, useAdoptedStyleSheetsWithBuiltCSS } from '../utils/settings.js';\nimport { dedupingMixin } from '../utils/mixin.js';\nimport { stylesFromTemplate, stylesFromModuleImports } from '../utils/style-gather.js';\nimport { pathFromUrl, resolveCss, resolveUrl } from '../utils/resolve-url.js';\nimport { DomModule } from '../elements/dom-module.js';\nimport { PropertyEffects } from './property-effects.js';\nimport { PropertiesMixin } from './properties-mixin.js';\nimport { wrap } from '../utils/wrap.js';\n\n/**\n * Current Polymer version in Semver notation.\n * @type {string} Semver notation of the current version of Polymer.\n */\nexport const version = '3.5.1';\n\nexport const builtCSS = window.ShadyCSS && window.ShadyCSS['cssBuild'];\n\n/**\n * Element class mixin that provides the core API for Polymer's meta-programming\n * features including template stamping, data-binding, attribute deserialization,\n * and property change observation.\n *\n * Subclassers may provide the following static getters to return metadata\n * used to configure Polymer's features for the class:\n *\n * - `static get is()`: When the template is provided via a `dom-module`,\n * users should return the `dom-module` id from a static `is` getter. If\n * no template is needed or the template is provided directly via the\n * `template` getter, there is no need to define `is` for the element.\n *\n * - `static get template()`: Users may provide the template directly (as\n * opposed to via `dom-module`) by implementing a static `template` getter.\n * The getter must return an `HTMLTemplateElement`.\n *\n * - `static get properties()`: Should return an object describing\n * property-related metadata used by Polymer features (key: property name\n * value: object containing property metadata). Valid keys in per-property\n * metadata include:\n * - `type` (String|Number|Object|Array|...): Used by\n * `attributeChangedCallback` to determine how string-based attributes\n * are deserialized to JavaScript property values.\n * - `notify` (boolean): Causes a change in the property to fire a\n * non-bubbling event called `<property>-changed`. Elements that have\n * enabled two-way binding to the property use this event to observe changes.\n * - `readOnly` (boolean): Creates a getter for the property, but no setter.\n * To set a read-only property, use the private setter method\n * `_setProperty(property, value)`.\n * - `observer` (string): Observer method name that will be called when\n * the property changes. The arguments of the method are\n * `(value, previousValue)`.\n * - `computed` (string): String describing method and dependent properties\n * for computing the value of this property (e.g. `'computeFoo(bar, zot)'`).\n * Computed properties are read-only by default and can only be changed\n * via the return value of the computing method.\n *\n * - `static get observers()`: Array of strings describing multi-property\n * observer methods and their dependent properties (e.g.\n * `'observeABC(a, b, c)'`).\n *\n * The base class provides default implementations for the following standard\n * custom element lifecycle callbacks; users may override these, but should\n * call the super method to ensure\n * - `constructor`: Run when the element is created or upgraded\n * - `connectedCallback`: Run each time the element is connected to the\n * document\n * - `disconnectedCallback`: Run each time the element is disconnected from\n * the document\n * - `attributeChangedCallback`: Run each time an attribute in\n * `observedAttributes` is set or removed (note: this element's default\n * `observedAttributes` implementation will automatically return an array\n * of dash-cased attributes based on `properties`)\n *\n * @mixinFunction\n * @polymer\n * @appliesMixin PropertyEffects\n * @appliesMixin PropertiesMixin\n * @property rootPath {string} Set to the value of `rootPath`,\n * which defaults to the main document path\n * @property importPath {string} Set to the value of the class's static\n * `importPath` property, which defaults to the path of this element's\n * `dom-module` (when `is` is used), but can be overridden for other\n * import strategies.\n * @summary Element class mixin that provides the core API for Polymer's\n * meta-programming features.\n * @template T\n * @param {function(new:T)} superClass Class to apply mixin to.\n * @return {function(new:T)} superClass with mixin applied.\n */\nexport const ElementMixin = dedupingMixin(base => {\n /**\n * @constructor\n * @implements {Polymer_PropertyEffects}\n * @implements {Polymer_PropertiesMixin}\n * @extends {HTMLElement}\n * @private\n */\n const polymerElementBase = PropertiesMixin(PropertyEffects(base));\n\n /**\n * Returns a list of properties with default values.\n * This list is created as an optimization since it is a subset of\n * the list returned from `_properties`.\n * This list is used in `_initializeProperties` to set property defaults.\n *\n * @param {PolymerElementConstructor} constructor Element class\n * @return {PolymerElementProperties} Flattened properties for this class\n * that have default values\n * @private\n */\n function propertyDefaults(constructor) {\n if (!constructor.hasOwnProperty(\n JSCompiler_renameProperty('__propertyDefaults', constructor))) {\n constructor.__propertyDefaults = null;\n let props = constructor._properties;\n for (let p in props) {\n let info = props[p];\n if ('value' in info) {\n constructor.__propertyDefaults = constructor.__propertyDefaults || {};\n constructor.__propertyDefaults[p] = info;\n }\n }\n }\n return constructor.__propertyDefaults;\n }\n\n /**\n * Returns a memoized version of the `observers` array.\n * @param {PolymerElementConstructor} constructor Element class\n * @return {Array} Array containing own observers for the given class\n * @protected\n */\n function ownObservers(constructor) {\n if (!constructor.hasOwnProperty(\n JSCompiler_renameProperty('__ownObservers', constructor))) {\n constructor.__ownObservers =\n constructor.hasOwnProperty(\n JSCompiler_renameProperty('observers', constructor)) ?\n /** @type {PolymerElementConstructor} */ (constructor).observers :\n null;\n }\n return constructor.__ownObservers;\n }\n\n /**\n * Creates effects for a property.\n *\n * Note, once a property has been set to\n * `readOnly`, `computed`, `reflectToAttribute`, or `notify`\n * these values may not be changed. For example, a subclass cannot\n * alter these settings. However, additional `observers` may be added\n * by subclasses.\n *\n * The info object should contain property metadata as follows:\n *\n * * `type`: {function} type to which an attribute matching the property\n * is deserialized. Note the property is camel-cased from a dash-cased\n * attribute. For example, 'foo-bar' attribute is deserialized to a\n * property named 'fooBar'.\n *\n * * `readOnly`: {boolean} creates a readOnly property and\n * makes a private setter for the private of the form '_setFoo' for a\n * property 'foo',\n *\n * * `computed`: {string} creates a computed property. A computed property\n * is also automatically set to `readOnly: true`. The value is calculated\n * by running a method and arguments parsed from the given string. For\n * example 'compute(foo)' will compute a given property when the\n * 'foo' property changes by executing the 'compute' method. This method\n * must return the computed value.\n *\n * * `reflectToAttribute`: {boolean} If true, the property value is reflected\n * to an attribute of the same name. Note, the attribute is dash-cased\n * so a property named 'fooBar' is reflected as 'foo-bar'.\n *\n * * `notify`: {boolean} sends a non-bubbling notification event when\n * the property changes. For example, a property named 'foo' sends an\n * event named 'foo-changed' with `event.detail` set to the value of\n * the property.\n *\n * * observer: {string} name of a method that runs when the property\n * changes. The arguments of the method are (value, previousValue).\n *\n * Note: Users may want control over modifying property\n * effects via subclassing. For example, a user might want to make a\n * reflectToAttribute property not do so in a subclass. We've chosen to\n * disable this because it leads to additional complication.\n * For example, a readOnly effect generates a special setter. If a subclass\n * disables the effect, the setter would fail unexpectedly.\n * Based on feedback, we may want to try to make effects more malleable\n * and/or provide an advanced api for manipulating them.\n *\n * @param {!PolymerElement} proto Element class prototype to add accessors\n * and effects to\n * @param {string} name Name of the property.\n * @param {Object} info Info object from which to create property effects.\n * Supported keys:\n * @param {Object} allProps Flattened map of all properties defined in this\n * element (including inherited properties)\n * @return {void}\n * @private\n */\n function createPropertyFromConfig(proto, name, info, allProps) {\n // computed forces readOnly...\n if (info.computed) {\n info.readOnly = true;\n }\n // Note, since all computed properties are readOnly, this prevents\n // adding additional computed property effects (which leads to a confusing\n // setup where multiple triggers for setting a property)\n // While we do have `hasComputedEffect` this is set on the property's\n // dependencies rather than itself.\n if (info.computed) {\n if (proto._hasReadOnlyEffect(name)) {\n console.warn(`Cannot redefine computed property '${name}'.`);\n } else {\n proto._createComputedProperty(name, info.computed, allProps);\n }\n }\n if (info.readOnly && !proto._hasReadOnlyEffect(name)) {\n proto._createReadOnlyProperty(name, !info.computed);\n } else if (info.readOnly === false && proto._hasReadOnlyEffect(name)) {\n console.warn(`Cannot make readOnly property '${name}' non-readOnly.`);\n }\n if (info.reflectToAttribute && !proto._hasReflectEffect(name)) {\n proto._createReflectedProperty(name);\n } else if (info.reflectToAttribute === false && proto._hasReflectEffect(name)) {\n console.warn(`Cannot make reflected property '${name}' non-reflected.`);\n }\n if (info.notify && !proto._hasNotifyEffect(name)) {\n proto._createNotifyingProperty(name);\n } else if (info.notify === false && proto._hasNotifyEffect(name)) {\n console.warn(`Cannot make notify property '${name}' non-notify.`);\n }\n // always add observer\n if (info.observer) {\n proto._createPropertyObserver(name, info.observer, allProps[info.observer]);\n }\n // always create the mapping from attribute back to property for deserialization.\n proto._addPropertyToAttributeMap(name);\n }\n\n /**\n * Process all style elements in the element template. Styles with the\n * `include` attribute are processed such that any styles in\n * the associated \"style modules\" are included in the element template.\n * @param {PolymerElementConstructor} klass Element class\n * @param {!HTMLTemplateElement} template Template to process\n * @param {string} is Name of element\n * @param {string} baseURI Base URI for element\n * @private\n */\n function processElementStyles(klass, template, is, baseURI) {\n if (!builtCSS) {\n const templateStyles = template.content.querySelectorAll('style');\n const stylesWithImports = stylesFromTemplate(template);\n // insert styles from <link rel=\"import\" type=\"css\"> at the top of the template\n const linkedStyles = stylesFromModuleImports(is);\n const firstTemplateChild = template.content.firstElementChild;\n for (let idx = 0; idx < linkedStyles.length; idx++) {\n let s = linkedStyles[idx];\n s.textContent = klass._processStyleText(s.textContent, baseURI);\n template.content.insertBefore(s, firstTemplateChild);\n }\n // keep track of the last \"concrete\" style in the template we have encountered\n let templateStyleIndex = 0;\n // ensure all gathered styles are actually in this template.\n for (let i = 0; i < stylesWithImports.length; i++) {\n let s = stylesWithImports[i];\n let templateStyle = templateStyles[templateStyleIndex];\n // if the style is not in this template, it's been \"included\" and\n // we put a clone of it in the template before the style that included it\n if (templateStyle !== s) {\n s = s.cloneNode(true);\n templateStyle.parentNode.insertBefore(s, templateStyle);\n } else {\n templateStyleIndex++;\n }\n s.textContent = klass._processStyleText(s.textContent, baseURI);\n }\n }\n if (window.ShadyCSS) {\n window.ShadyCSS.prepareTemplate(template, is);\n }\n // Support for `adoptedStylesheets` relies on using native Shadow DOM\n // and built CSS. Built CSS is required because runtime transformation of\n // `@apply` is not supported. This is because ShadyCSS relies on being able\n // to update a `style` element in the element template and this is\n // removed when using `adoptedStyleSheets`.\n // Note, it would be more efficient to allow style includes to become\n // separate stylesheets; however, because of `@apply` these are\n // potentially not shareable and sharing the ones that could be shared\n // would require some coordination. To keep it simple, all the includes\n // and styles are collapsed into a single shareable stylesheet.\n if (useAdoptedStyleSheetsWithBuiltCSS && builtCSS &&\n supportsAdoptingStyleSheets) {\n // Remove styles in template and make a shareable stylesheet\n const styles = template.content.querySelectorAll('style');\n if (styles) {\n let css = '';\n Array.from(styles).forEach(s => {\n css += s.textContent;\n s.parentNode.removeChild(s);\n });\n klass._styleSheet = new CSSStyleSheet();\n klass._styleSheet.replaceSync(css);\n }\n }\n }\n\n /**\n * Look up template from dom-module for element\n *\n * @param {string} is Element name to look up\n * @return {?HTMLTemplateElement|undefined} Template found in dom module, or\n * undefined if not found\n * @protected\n */\n function getTemplateFromDomModule(is) {\n let template = null;\n // Under strictTemplatePolicy in 3.x+, dom-module lookup is only allowed\n // when opted-in via allowTemplateFromDomModule\n if (is && (!strictTemplatePolicy || allowTemplateFromDomModule)) {\n template = /** @type {?HTMLTemplateElement} */ (\n DomModule.import(is, 'template'));\n // Under strictTemplatePolicy, require any element with an `is`\n // specified to have a dom-module\n if (strictTemplatePolicy && !template) {\n throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${is}`);\n }\n }\n return template;\n }\n\n /**\n * @polymer\n * @mixinClass\n * @unrestricted\n * @implements {Polymer_ElementMixin}\n * @extends {polymerElementBase}\n */\n class PolymerElement extends polymerElementBase {\n\n /**\n * Current Polymer version in Semver notation.\n * @type {string} Semver notation of the current version of Polymer.\n * @nocollapse\n */\n static get polymerElementVersion() {\n return version;\n }\n\n /**\n * Override of PropertiesMixin _finalizeClass to create observers and\n * find the template.\n * @return {void}\n * @protected\n * @suppress {missingProperties} Interfaces in closure do not inherit statics, but classes do\n * @nocollapse\n */\n static _finalizeClass() {\n // TODO(https://github.com/google/closure-compiler/issues/3240):\n // Change back to just super.methodCall()\n polymerElementBase._finalizeClass.call(this);\n const observers = ownObservers(this);\n if (observers) {\n this.createObservers(observers, this._properties);\n }\n this._prepareTemplate();\n }\n\n /** @nocollapse */\n static _prepareTemplate() {\n // note: create \"working\" template that is finalized at instance time\n let template = /** @type {PolymerElementConstructor} */ (this).template;\n if (template) {\n if (typeof template === 'string') {\n console.error('template getter must return HTMLTemplateElement');\n template = null;\n } else if (!legacyOptimizations) {\n template = template.cloneNode(true);\n }\n }\n\n /** @override */\n this.prototype._template = template;\n }\n\n /**\n * Override of PropertiesChanged createProperties to create accessors\n * and property effects for all of the properties.\n * @param {!Object} props .\n * @return {void}\n * @protected\n * @nocollapse\n */\n static createProperties(props) {\n for (let p in props) {\n createPropertyFromConfig(\n /** @type {?} */ (this.prototype), p, props[p], props);\n }\n }\n\n /**\n * Creates observers for the given `observers` array.\n * Leverages `PropertyEffects` to create observers.\n * @param {Object} observers Array of observer descriptors for\n * this class\n * @param {Object} dynamicFns Object containing keys for any properties\n * that are functions and should trigger the effect when the function\n * reference is changed\n * @return {void}\n * @protected\n * @nocollapse\n */\n static createObservers(observers, dynamicFns) {\n const proto = this.prototype;\n for (let i=0; i < observers.length; i++) {\n proto._createMethodObserver(observers[i], dynamicFns);\n }\n }\n\n /**\n * Returns the template that will be stamped into this element's shadow root.\n *\n * If a `static get is()` getter is defined, the default implementation will\n * return the first `<template>` in a `dom-module` whose `id` matches this\n * element's `is` (note that a `_template` property on the class prototype\n * takes precedence over the `dom-module` template, to maintain legacy\n * element semantics; a subclass will subsequently fall back to its super\n * class template if neither a `prototype._template` or a `dom-module` for\n * the class's `is` was found).\n *\n * Users may override this getter to return an arbitrary template\n * (in which case the `is` getter is unnecessary). The template returned\n * must be an `HTMLTemplateElement`.\n *\n * Note that when subclassing, if the super class overrode the default\n * implementation and the subclass would like to provide an alternate\n * template via a `dom-module`, it should override this getter and\n * return `DomModule.import(this.is, 'template')`.\n *\n * If a subclass would like to modify the super class template, it should\n * clone it rather than modify it in place. If the getter does expensive\n * work such as cloning/modifying a template, it should memoize the\n * template for maximum performance:\n *\n * let memoizedTemplate;\n * class MySubClass extends MySuperClass {\n * static get template() {\n * if (!memoizedTemplate) {\n * memoizedTemplate = super.template.cloneNode(true);\n * let subContent = document.createElement('div');\n * subContent.textContent = 'This came from MySubClass';\n * memoizedTemplate.content.appendChild(subContent);\n * }\n * return memoizedTemplate;\n * }\n * }\n *\n * @return {!HTMLTemplateElement|string} Template to be stamped\n * @nocollapse\n */\n static get template() {\n // Explanation of template-related properties:\n // - constructor.template (this getter): the template for the class.\n // This can come from the prototype (for legacy elements), from a\n // dom-module, or from the super class's template (or can be overridden\n // altogether by the user)\n // - constructor._template: memoized version of constructor.template\n // - prototype._template: working template for the element, which will be\n // parsed and modified in place. It is a cloned version of\n // constructor.template, saved in _finalizeClass(). Note that before\n // this getter is called, for legacy elements this could be from a\n // _template field on the info object passed to Polymer(), a behavior,\n // or set in registered(); once the static getter runs, a clone of it\n // will overwrite it on the prototype as the working template.\n if (!this.hasOwnProperty(JSCompiler_renameProperty('_template', this))) {\n let protoTemplate = this.prototype.hasOwnProperty(\n JSCompiler_renameProperty('_template', this.prototype)) ?\n this.prototype._template : undefined;\n // Accept a function for the legacy Polymer({_template:...}) field for\n // lazy parsing\n if (typeof protoTemplate === 'function') {\n protoTemplate = protoTemplate();\n }\n this._template =\n // If user has put template on prototype (e.g. in legacy via registered\n // callback or info object), prefer that first. Note that `null` is\n // used as a sentinel to indicate \"no template\" and can be used to\n // override a super template, whereas `undefined` is used as a\n // sentinel to mean \"fall-back to default template lookup\" via\n // dom-module and/or super.template.\n protoTemplate !== undefined ? protoTemplate :\n // Look in dom-module associated with this element's is\n ((this.hasOwnProperty(JSCompiler_renameProperty('is', this)) &&\n (getTemplateFromDomModule(/** @type {PolymerElementConstructor}*/ (this).is))) ||\n // Next look for superclass template (call the super impl this\n // way so that `this` points to the superclass)\n Object.getPrototypeOf(/** @type {PolymerElementConstructor}*/ (this).prototype).constructor.template);\n }\n return this._template;\n }\n\n /**\n * Set the template.\n *\n * @param {!HTMLTemplateElement|string} value Template to set.\n * @nocollapse\n */\n static set template(value) {\n this._template = value;\n }\n\n /**\n * Path matching the url from which the element was imported.\n *\n * This path is used to resolve url's in template style cssText.\n * The `importPath` property is also set on element instances and can be\n * used to create bindings relative to the import path.\n *\n * For elements defined in ES modules, users should implement\n * `static get importMeta() { return import.meta; }`, and the default\n * implementation of `importPath` will return `import.meta.url`'s path.\n * For elements defined in HTML imports, this getter will return the path\n * to the document containing a `dom-module` element matching this\n * element's static `is` property.\n *\n * Note, this path should contain a trailing `/`.\n *\n * @return {string} The import path for this element class\n * @suppress {missingProperties}\n * @nocollapse\n */\n static get importPath() {\n if (!this.hasOwnProperty(JSCompiler_renameProperty('_importPath', this))) {\n const meta = this.importMeta;\n if (meta) {\n this._importPath = pathFromUrl(meta.url);\n } else {\n const module = DomModule.import(/** @type {PolymerElementConstructor} */ (this).is);\n this._importPath = (module && module.assetpath) ||\n Object.getPrototypeOf(/** @type {PolymerElementConstructor}*/ (this).prototype).constructor.importPath;\n }\n }\n return this._importPath;\n }\n\n constructor() {\n super();\n /** @type {HTMLTemplateElement} */\n this._template;\n /** @type {string} */\n this._importPath;\n /** @type {string} */\n this.rootPath;\n /** @type {string} */\n this.importPath;\n /** @type {StampedTemplate | HTMLElement | ShadowRoot} */\n this.root;\n /** @type {!Object<string, !Element>} */\n this.$;\n }\n\n /**\n * Overrides the default `PropertyAccessors` to ensure class\n * metaprogramming related to property accessors and effects has\n * completed (calls `finalize`).\n *\n * It also initializes any property defaults provided via `value` in\n * `properties` metadata.\n *\n * @return {void}\n * @override\n * @suppress {invalidCasts,missingProperties} go/missingfnprops\n */\n _initializeProperties() {\n this.constructor.finalize();\n // note: finalize template when we have access to `localName` to\n // avoid dependence on `is` for polyfilling styling.\n this.constructor._finalizeTemplate(/** @type {!HTMLElement} */(this).localName);\n super._initializeProperties();\n // set path defaults\n this.rootPath = rootPath;\n this.importPath = this.constructor.importPath;\n // apply property defaults...\n let p$ = propertyDefaults(this.constructor);\n if (!p$) {\n return;\n }\n for (let p in p$) {\n let info = p$[p];\n if (this._canApplyPropertyDefault(p)) {\n let value = typeof info.value == 'function' ?\n info.value.call(this) :\n info.value;\n // Set via `_setProperty` if there is an accessor, to enable\n // initializing readOnly property defaults\n if (this._hasAccessor(p)) {\n this._setPendingProperty(p, value, true);\n } else {\n this[p] = value;\n }\n }\n }\n }\n\n /**\n * Determines if a property dfeault can be applied. For example, this\n * prevents a default from being applied when a property that has no\n * accessor is overridden by its host before upgrade (e.g. via a binding).\n * @override\n * @param {string} property Name of the property\n * @return {boolean} Returns true if the property default can be applied.\n */\n _canApplyPropertyDefault(property) {\n return !this.hasOwnProperty(property);\n }\n\n /**\n * Gather style text for a style element in the template.\n *\n * @param {string} cssText Text containing styling to process\n * @param {string} baseURI Base URI to rebase CSS paths against\n * @return {string} The processed CSS text\n * @protected\n * @nocollapse\n */\n static _processStyleText(cssText, baseURI) {\n return resolveCss(cssText, baseURI);\n }\n\n /**\n * Configures an element `proto` to function with a given `template`.\n * The element name `is` and extends `ext` must be specified for ShadyCSS\n * style scoping.\n *\n * @param {string} is Tag name (or type extension name) for this element\n * @return {void}\n * @protected\n * @nocollapse\n */\n static _finalizeTemplate(is) {\n /** @const {HTMLTemplateElement} */\n const template = this.prototype._template;\n if (template && !template.__polymerFinalized) {\n template.__polymerFinalized = true;\n const importPath = this.importPath;\n const baseURI = importPath ? resolveUrl(importPath) : '';\n // e.g. support `include=\"module-name\"`, and ShadyCSS\n processElementStyles(this, template, is, baseURI);\n this.prototype._bindTemplate(template);\n }\n }\n\n /**\n * Provides a default implementation of the standard Custom Elements\n * `connectedCallback`.\n *\n * The default implementation enables the property effects system and\n * flushes any pending properties, and updates shimmed CSS properties\n * when using the ShadyCSS scoping/custom properties polyfill.\n *\n * @override\n * @suppress {missingProperties, invalidCasts} Super may or may not\n * implement the callback\n * @return {void}\n */\n connectedCallback() {\n if (window.ShadyCSS && this._template) {\n window.ShadyCSS.styleElement(/** @type {!HTMLElement} */(this));\n }\n super.connectedCallback();\n }\n\n /**\n * Stamps the element template.\n *\n * @return {void}\n * @override\n */\n ready() {\n if (this._template) {\n this.root = this._stampTemplate(this._template);\n this.$ = this.root.$;\n }\n super.ready();\n }\n\n /**\n * Implements `PropertyEffects`'s `_readyClients` call. Attaches\n * element dom by calling `_attachDom` with the dom stamped from the\n * element's template via `_stampTemplate`. Note that this allows\n * client dom to be attached to the element prior to any observers\n * running.\n *\n * @return {void}\n * @override\n */\n _readyClients() {\n if (this._template) {\n this.root = this._attachDom(/** @type {StampedTemplate} */(this.root));\n }\n // The super._readyClients here sets the clients initialized flag.\n // We must wait to do this until after client dom is created/attached\n // so that this flag can be checked to prevent notifications fired\n // during this process from being handled before clients are ready.\n super._readyClients();\n }\n\n\n /**\n * Attaches an element's stamped dom to itself. By default,\n * this method creates a `shadowRoot` and adds the dom to it.\n * However, this method may be overridden to allow an element\n * to put its dom in another location.\n *\n * @override\n * @throws {Error}\n * @suppress {missingReturn}\n * @param {StampedTemplate} dom to attach to the element.\n * @return {ShadowRoot} node to which the dom has been attached.\n */\n _attachDom(dom) {\n const n = wrap(this);\n if (n.attachShadow) {\n if (dom) {\n if (!n.shadowRoot) {\n n.attachShadow({mode: 'open', shadyUpgradeFragment: dom});\n n.shadowRoot.appendChild(dom);\n // When `adoptedStyleSheets` is supported a stylesheet is made\n // available on the element constructor.\n if (this.constructor._styleSheet) {\n n.shadowRoot.adoptedStyleSheets = [this.constructor._styleSheet];\n }\n }\n if (syncInitialRender && window.ShadyDOM) {\n window.ShadyDOM.flushInitial(n.shadowRoot);\n }\n return n.shadowRoot;\n }\n return null;\n } else {\n throw new Error('ShadowDOM not available. ' +\n // TODO(sorvell): move to compile-time conditional when supported\n 'PolymerElement can create dom as children instead of in ' +\n 'ShadowDOM by setting `this.root = this;\\` before \\`ready\\`.');\n }\n }\n\n /**\n * When using the ShadyCSS scoping and custom property shim, causes all\n * shimmed styles in this element (and its subtree) to be updated\n * based on current custom property values.\n *\n * The optional parameter overrides inline custom property styles with an\n * object of properties where the keys are CSS properties, and the values\n * are strings.\n *\n * Example: `this.updateStyles({'--color': 'blue'})`\n *\n * These properties are retained unless a value of `null` is set.\n *\n * Note: This function does not support updating CSS mixins.\n * You can not dynamically change the value of an `@apply`.\n *\n * @override\n * @param {Object=} properties Bag of custom property key/values to\n * apply to this element.\n * @return {void}\n * @suppress {invalidCasts}\n */\n updateStyles(properties) {\n if (window.ShadyCSS) {\n window.ShadyCSS.styleSubtree(/** @type {!HTMLElement} */(this), properties);\n }\n }\n\n /**\n * Rewrites a given URL relative to a base URL. The base URL defaults to\n * the original location of the document containing the `dom-module` for\n * this element. This method will return the same URL before and after\n * bundling.\n *\n * Note that this function performs no resolution for URLs that start\n * with `/` (absolute URLs) or `#` (hash identifiers). For general purpose\n * URL resolution, use `window.URL`.\n *\n * @override\n * @param {string} url URL to resolve.\n * @param {string=} base Optional base URL to resolve against, defaults\n * to the element's `importPath`\n * @return {string} Rewritten URL relative to base\n */\n resolveUrl(url, base) {\n if (!base && this.importPath) {\n base = resolveUrl(this.importPath);\n }\n return resolveUrl(url, base);\n }\n\n /**\n * Overrides `PropertyEffects` to add map of dynamic functions on\n * template info, for consumption by `PropertyEffects` template binding\n * code. This map determines which method templates should have accessors\n * created for them.\n *\n * @param {!HTMLTemplateElement} template Template\n * @param {!TemplateInfo} templateInfo Template metadata for current template\n * @param {!NodeInfo} nodeInfo Node metadata for current template.\n * @return {boolean} .\n * @suppress {missingProperties} Interfaces in closure do not inherit statics, but classes do\n * @nocollapse\n */\n static _parseTemplateContent(template, templateInfo, nodeInfo) {\n templateInfo.dynamicFns = templateInfo.dynamicFns || this._properties;\n // TODO(https://github.com/google/closure-compiler/issues/3240):\n // Change back to just super.methodCall()\n return polymerElementBase._parseTemplateContent.call(\n this, template, templateInfo, nodeInfo);\n }\n\n /**\n * Overrides `PropertyEffects` to warn on use of undeclared properties in\n * template.\n *\n * @param {Object} templateInfo Template metadata to add effect to\n * @param {string} prop Property that should trigger the effect\n * @param {Object=} effect Effect metadata object\n * @return {void}\n * @protected\n * @suppress {missingProperties} Interfaces in closure do not inherit statics, but classes do\n * @nocollapse\n */\n static _addTemplatePropertyEffect(templateInfo, prop, effect) {\n // Warn if properties are used in template without being declared.\n // Properties must be listed in `properties` to be included in\n // `observedAttributes` since CE V1 reads that at registration time, and\n // since we want to keep template parsing lazy, we can't automatically\n // add undeclared properties used in templates to `observedAttributes`.\n // The warning is only enabled in `legacyOptimizations` mode, since\n // we don't want to spam existing users who might have adopted the\n // shorthand when attribute deserialization is not important.\n if (legacyWarnings && !(prop in this._properties) &&\n // Methods used in templates with no dependencies (or only literal\n // dependencies) become accessors with template effects; ignore these\n !(effect.info.part.signature && effect.info.part.signature.static) &&\n // Warnings for bindings added to nested templates are handled by\n // templatizer so ignore both the host-to-template bindings\n // (`hostProp`) and TemplateInstance-to-child bindings\n // (`nestedTemplate`)\n !effect.info.part.hostProp && !templateInfo.nestedTemplate) {\n console.warn(`Property '${prop}' used in template but not declared in 'properties'; ` +\n `attribute will not be observed.`);\n }\n // TODO(https://github.com/google/closure-compiler/issues/3240):\n // Change back to just super.methodCall()\n return polymerElementBase._addTemplatePropertyEffect.call(\n this, templateInfo, prop, effect);\n }\n\n }\n\n return PolymerElement;\n});\n\n/**\n * When using the ShadyCSS scoping and custom property shim, causes all\n * shimmed `styles` (via `custom-style`) in the document (and its subtree)\n * to be updated based on current custom property values.\n *\n * The optional parameter overrides inline custom property styles with an\n * object of properties where the keys are CSS properties, and the values\n * are strings.\n *\n * Example: `updateStyles({'--color': 'blue'})`\n *\n * These properties are retained unless a value of `null` is set.\n *\n * @param {Object=} props Bag of custom property key/values to\n * apply to the document.\n * @return {void}\n */\nexport const updateStyles = function(props) {\n if (window.ShadyCSS) {\n window.ShadyCSS.styleDocument(props);\n }\n};\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport './boot.js';\n\n/**\n * Our TrustedTypePolicy for HTML which is declared using the Polymer html\n * template tag function.\n *\n * That HTML is a developer-authored constant, and is parsed with innerHTML\n * before any untrusted expressions have been mixed in. Therefor it is\n * considered safe by construction.\n *\n * @type {!TrustedTypePolicy|undefined}\n */\nconst policy = window.trustedTypes &&\n trustedTypes.createPolicy('polymer-html-literal', {createHTML: (s) => s});\n\n/**\n * Class representing a static string value which can be used to filter\n * strings by asseting that they have been created via this class. The\n * `value` property returns the string passed to the constructor.\n */\nclass LiteralString {\n /**\n * @param {!ITemplateArray} strings Constant parts of tagged template literal\n * @param {!Array<*>} values Variable parts of tagged template literal\n */\n constructor(strings, values) {\n assertValidTemplateStringParameters(strings, values);\n const string = values.reduce(\n (acc, v, idx) => acc + literalValue(v) + strings[idx + 1], strings[0]);\n /** @type {string} */\n this.value = string.toString();\n }\n /**\n * @return {string} LiteralString string value\n * @override\n */\n toString() {\n return this.value;\n }\n}\n\n/**\n * @param {*} value Object to stringify into HTML\n * @return {string} HTML stringified form of `obj`\n */\nfunction literalValue(value) {\n if (value instanceof LiteralString) {\n return /** @type {!LiteralString} */(value).value;\n } else {\n throw new Error(\n `non-literal value passed to Polymer's htmlLiteral function: ${value}`\n );\n }\n}\n\n/**\n * @param {*} value Object to stringify into HTML\n * @return {string} HTML stringified form of `obj`\n */\nfunction htmlValue(value) {\n if (value instanceof HTMLTemplateElement) {\n // This might be an mXSS risk – mainly in the case where this template\n // contains untrusted content that was believed to be sanitized.\n // However we can't just use the XMLSerializer here because it misencodes\n // `>` characters inside style tags.\n // For an example of an actual case that hit this encoding issue,\n // see b/198592167\n return /** @type {!HTMLTemplateElement } */(value).innerHTML;\n } else if (value instanceof LiteralString) {\n return literalValue(value);\n } else {\n throw new Error(\n `non-template value passed to Polymer's html function: ${value}`);\n }\n}\n\n/**\n * A template literal tag that creates an HTML <template> element from the\n * contents of the string.\n *\n * This allows you to write a Polymer Template in JavaScript.\n *\n * Templates can be composed by interpolating `HTMLTemplateElement`s in\n * expressions in the JavaScript template literal. The nested template's\n * `innerHTML` is included in the containing template. The only other\n * values allowed in expressions are those returned from `htmlLiteral`\n * which ensures only literal values from JS source ever reach the HTML, to\n * guard against XSS risks.\n *\n * All other values are disallowed in expressions to help prevent XSS\n * attacks; however, `htmlLiteral` can be used to compose static\n * string values into templates. This is useful to compose strings into\n * places that do not accept html, like the css text of a `style`\n * element.\n *\n * Example:\n *\n * static get template() {\n * return html`\n * <style>:host{ content:\"...\" }</style>\n * <div class=\"shadowed\">${this.partialTemplate}</div>\n * ${super.template}\n * `;\n * }\n * static get partialTemplate() { return html`<span>Partial!</span>`; }\n *\n * @param {!ITemplateArray} strings Constant parts of tagged template literal\n * @param {...*} values Variable parts of tagged template literal\n * @return {!HTMLTemplateElement} Constructed HTMLTemplateElement\n */\nexport const html = function html(strings, ...values) {\n assertValidTemplateStringParameters(strings, values);\n const template =\n /** @type {!HTMLTemplateElement} */ (document.createElement('template'));\n let value = values.reduce(\n (acc, v, idx) => acc + htmlValue(v) + strings[idx + 1], strings[0]);\n if (policy) {\n value = policy.createHTML(value);\n }\n template.innerHTML = value;\n return template;\n};\n\n/**\n * @param {!ITemplateArray} strings Constant parts of tagged template literal\n * @param {!Array<*>} values Array of values from quasis\n */\nconst assertValidTemplateStringParameters = (strings, values) => {\n // Note: if/when https://github.com/tc39/proposal-array-is-template-object\n // is standardized, use that instead when available, as it can perform an\n // unforgable check (though of course, the function itself can be forged).\n if (!Array.isArray(strings) || !Array.isArray(strings.raw) ||\n (values.length !== strings.length - 1)) {\n // This is either caused by a browser bug, a compiler bug, or someone\n // calling the html template tag function as a regular function.\n //\n throw new TypeError('Invalid call to the html template tag');\n }\n};\n\n/**\n * An html literal tag that can be used with `html` to compose.\n * a literal string.\n *\n * Example:\n *\n * static get template() {\n * return html`\n * <style>\n * :host { display: block; }\n * ${this.styleTemplate()}\n * </style>\n * <div class=\"shadowed\">${staticValue}</div>\n * ${super.template}\n * `;\n * }\n * static get styleTemplate() {\n * return htmlLiteral`.shadowed { background: gray; }`;\n * }\n *\n * @param {!ITemplateArray} strings Constant parts of tagged template literal\n * @param {...*} values Variable parts of tagged template literal\n * @return {!LiteralString} Constructed literal string\n */\nexport const htmlLiteral = function(strings, ...values) {\n return new LiteralString(strings, values);\n};\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nimport { ElementMixin, version } from './lib/mixins/element-mixin.js';\nexport { html } from './lib/utils/html-tag.js';\n\nexport { version };\n\n/**\n * Base class that provides the core API for Polymer's meta-programming\n * features including template stamping, data-binding, attribute deserialization,\n * and property change observation.\n *\n * @customElement\n * @polymer\n * @constructor\n * @implements {Polymer_ElementMixin}\n * @extends HTMLElement\n * @appliesMixin ElementMixin\n * @summary Custom element base class that provides the core API for Polymer's\n * key meta-programming features including template stamping, data-binding,\n * attribute deserialization, and property change observation\n */\nexport const PolymerElement = ElementMixin(HTMLElement);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * Array of Vaadin custom element classes that have been subscribed to the dir changes.\n */\nconst directionSubscribers = [];\n\nfunction alignDirs(element, documentDir, elementDir = element.getAttribute('dir')) {\n if (documentDir) {\n element.setAttribute('dir', documentDir);\n } else if (elementDir != null) {\n element.removeAttribute('dir');\n }\n}\n\nfunction getDocumentDir() {\n return document.documentElement.getAttribute('dir');\n}\n\nfunction directionUpdater() {\n const documentDir = getDocumentDir();\n directionSubscribers.forEach((element) => {\n alignDirs(element, documentDir);\n });\n}\n\nconst directionObserver = new MutationObserver(directionUpdater);\ndirectionObserver.observe(document.documentElement, { attributes: true, attributeFilter: ['dir'] });\n\n/**\n * A mixin to handle `dir` attribute based on the one set on the `<html>` element.\n *\n * @polymerMixin\n */\nexport const DirMixin = (superClass) =>\n class VaadinDirMixin extends superClass {\n static get properties() {\n return {\n /**\n * @protected\n */\n dir: {\n type: String,\n value: '',\n reflectToAttribute: true,\n converter: {\n fromAttribute: (attr) => {\n return !attr ? '' : attr;\n },\n toAttribute: (prop) => {\n return prop === '' ? null : prop;\n },\n },\n },\n };\n }\n\n /**\n * @return {boolean}\n * @protected\n */\n get __isRTL() {\n return this.getAttribute('dir') === 'rtl';\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n if (!this.hasAttribute('dir') || this.__restoreSubscription) {\n this.__subscribe();\n alignDirs(this, getDocumentDir(), null);\n }\n }\n\n /** @protected */\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback(name, oldValue, newValue);\n if (name !== 'dir') {\n return;\n }\n\n const documentDir = getDocumentDir();\n\n // New value equals to the document direction and the element is not subscribed to the changes\n const newValueEqlDocDir = newValue === documentDir && directionSubscribers.indexOf(this) === -1;\n // Value was emptied and the element is not subscribed to the changes\n const newValueEmptied = !newValue && oldValue && directionSubscribers.indexOf(this) === -1;\n // New value is different and the old equals to document direction and the element is not subscribed to the changes\n const newDiffValue = newValue !== documentDir && oldValue === documentDir;\n\n if (newValueEqlDocDir || newValueEmptied) {\n this.__subscribe();\n alignDirs(this, documentDir, newValue);\n } else if (newDiffValue) {\n this.__unsubscribe();\n }\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.__restoreSubscription = directionSubscribers.includes(this);\n this.__unsubscribe();\n }\n\n /** @protected */\n _valueToNodeAttribute(node, value, attribute) {\n // Override default Polymer attribute reflection to match native behavior of HTMLElement.dir property\n // If the property contains an empty string then it should not create an empty attribute\n if (attribute === 'dir' && value === '' && !node.hasAttribute('dir')) {\n return;\n }\n super._valueToNodeAttribute(node, value, attribute);\n }\n\n /** @protected */\n _attributeToProperty(attribute, value, type) {\n // Override default Polymer attribute reflection to match native behavior of HTMLElement.dir property\n // If the attribute is removed, then the dir property should contain an empty string instead of null\n if (attribute === 'dir' && !value) {\n this.dir = '';\n } else {\n super._attributeToProperty(attribute, value, type);\n }\n }\n\n /** @private */\n __subscribe() {\n if (!directionSubscribers.includes(this)) {\n directionSubscribers.push(this);\n }\n }\n\n /** @private */\n __unsubscribe() {\n if (directionSubscribers.includes(this)) {\n directionSubscribers.splice(directionSubscribers.indexOf(this), 1);\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, PolymerElement } from '@polymer/polymer';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';\nimport { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\n/**\n * @customElement\n * @extends HTMLElement\n * @mixes ThemableMixin\n * @mixes DirMixin\n */\nexport class InputContainer extends ThemableMixin(DirMixin(PolymerElement)) {\n static get is() {\n return 'vaadin-input-container';\n }\n\n static get template() {\n return html`\n <style>\n :host {\n display: flex;\n align-items: center;\n flex: 0 1 auto;\n border-radius:\n /* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius */\n var(--vaadin-input-field-top-start-radius, var(--__border-radius))\n var(--vaadin-input-field-top-end-radius, var(--__border-radius))\n var(--vaadin-input-field-bottom-end-radius, var(--__border-radius))\n var(--vaadin-input-field-bottom-start-radius, var(--__border-radius));\n --_border-radius: var(--vaadin-input-field-border-radius, 0px);\n --_input-border-width: var(--vaadin-input-field-border-width, 0);\n --_input-border-color: var(--vaadin-input-field-border-color, transparent);\n box-shadow: inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);\n }\n\n :host([dir='rtl']) {\n border-radius:\n /* Don't use logical props, see https://github.com/vaadin/vaadin-time-picker/issues/145 */\n var(--vaadin-input-field-top-end-radius, var(--_border-radius))\n var(--vaadin-input-field-top-start-radius, var(--_border-radius))\n var(--vaadin-input-field-bottom-start-radius, var(--_border-radius))\n var(--vaadin-input-field-bottom-end-radius, var(--_border-radius));\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n /* Reset the native input styles */\n ::slotted(input) {\n -webkit-appearance: none;\n -moz-appearance: none;\n flex: auto;\n white-space: nowrap;\n overflow: hidden;\n width: 100%;\n height: 100%;\n outline: none;\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: 0;\n min-width: 0;\n font: inherit;\n line-height: normal;\n color: inherit;\n background-color: transparent;\n /* Disable default invalid style in Firefox */\n box-shadow: none;\n }\n\n ::slotted(*) {\n flex: none;\n }\n\n ::slotted(:is(input, textarea))::placeholder {\n /* Use ::slotted(input:placeholder-shown) in themes to style the placeholder. */\n /* because ::slotted(...)::placeholder does not work in Safari. */\n font: inherit;\n color: inherit;\n /* Override default opacity in Firefox */\n opacity: 1;\n }\n </style>\n <slot name=\"prefix\"></slot>\n <slot></slot>\n <slot name=\"suffix\"></slot>\n `;\n }\n\n static get properties() {\n return {\n /**\n * If true, the user cannot interact with this element.\n */\n disabled: {\n type: Boolean,\n reflectToAttribute: true,\n },\n\n /**\n * Set to true to make this element read-only.\n */\n readonly: {\n type: Boolean,\n reflectToAttribute: true,\n },\n\n /**\n * Set to true when the element is invalid.\n */\n invalid: {\n type: Boolean,\n reflectToAttribute: true,\n },\n };\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addEventListener('pointerdown', (event) => {\n if (event.target === this) {\n // Prevent direct clicks to the input container from blurring the input\n event.preventDefault();\n }\n });\n\n this.addEventListener('click', (event) => {\n if (event.target === this) {\n // The vaadin-input-container element was directly clicked,\n // focus any focusable child element from the default slot\n this.shadowRoot\n .querySelector('slot:not([name])')\n .assignedNodes({ flatten: true })\n .forEach((node) => node.focus && node.focus());\n }\n });\n }\n}\n\ndefineCustomElement(InputContainer);\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './version.js';\nimport { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { addLumoGlobalStyles } from './global.js';\n\nconst spacing = css`\n :host {\n /* Square */\n --lumo-space-xs: 0.25rem;\n --lumo-space-s: 0.5rem;\n --lumo-space-m: 1rem;\n --lumo-space-l: 1.5rem;\n --lumo-space-xl: 2.5rem;\n\n /* Wide */\n --lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);\n --lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);\n --lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);\n --lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);\n --lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);\n\n /* Tall */\n --lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);\n --lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);\n --lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);\n --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);\n --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);\n }\n`;\n\naddLumoGlobalStyles('spacing-props', spacing);\n\nexport { spacing };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '../color.js';\nimport '../spacing.js';\nimport '../style.js';\nimport '../typography.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst overlay = css`\n :host {\n top: var(--lumo-space-m);\n right: var(--lumo-space-m);\n bottom: var(--lumo-space-m);\n left: var(--lumo-space-m);\n /* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */\n /* stylelint-disable-next-line */\n outline: 0px solid transparent;\n }\n\n [part='overlay'] {\n background-color: var(--lumo-base-color);\n background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));\n border-radius: var(--lumo-border-radius-m);\n box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-m);\n color: var(--lumo-body-text-color);\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size-m);\n font-weight: 400;\n line-height: var(--lumo-line-height-m);\n letter-spacing: 0;\n text-transform: none;\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n [part='content'] {\n padding: var(--lumo-space-xs);\n }\n\n [part='backdrop'] {\n background-color: var(--lumo-shade-20pct);\n animation: 0.2s lumo-overlay-backdrop-enter both;\n will-change: opacity;\n }\n\n @keyframes lumo-overlay-backdrop-enter {\n 0% {\n opacity: 0;\n }\n }\n\n :host([closing]) [part='backdrop'] {\n animation: 0.2s lumo-overlay-backdrop-exit both;\n }\n\n @keyframes lumo-overlay-backdrop-exit {\n 100% {\n opacity: 0;\n }\n }\n\n @keyframes lumo-overlay-dummy-animation {\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 1;\n }\n }\n`;\n\nregisterStyles('', overlay, { moduleId: 'lumo-overlay' });\n\nexport { overlay };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '../spacing.js';\nimport '../style.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { overlay } from './overlay.js';\n\nconst menuOverlayCore = css`\n :host([opening]),\n :host([closing]) {\n animation: 0.14s lumo-overlay-dummy-animation;\n }\n\n [part='overlay'] {\n will-change: opacity, transform;\n }\n\n :host([opening]) [part='overlay'] {\n animation: 0.1s lumo-menu-overlay-enter ease-out both;\n }\n\n @keyframes lumo-menu-overlay-enter {\n 0% {\n opacity: 0;\n transform: translateY(-4px);\n }\n }\n\n :host([closing]) [part='overlay'] {\n animation: 0.1s lumo-menu-overlay-exit both;\n }\n\n @keyframes lumo-menu-overlay-exit {\n 100% {\n opacity: 0;\n }\n }\n`;\n\nregisterStyles('', menuOverlayCore, { moduleId: 'lumo-menu-overlay-core' });\n\nconst menuOverlayExt = css`\n /* Small viewport (bottom sheet) styles */\n /* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */\n @media (max-width: 420px), (max-height: 420px) {\n :host {\n top: 0 !important;\n right: 0 !important;\n bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;\n left: 0 !important;\n align-items: stretch !important;\n justify-content: flex-end !important;\n }\n\n [part='overlay'] {\n max-height: 50vh;\n width: 100vw;\n border-radius: 0;\n box-shadow: var(--lumo-box-shadow-xl);\n }\n\n /* The content part scrolls instead of the overlay part, because of the gradient fade-out */\n [part='content'] {\n padding: 30px var(--lumo-space-m);\n max-height: inherit;\n box-sizing: border-box;\n -webkit-overflow-scrolling: touch;\n overflow: auto;\n -webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);\n mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);\n }\n\n [part='backdrop'] {\n display: block;\n }\n\n /* Animations */\n\n :host([opening]) [part='overlay'] {\n animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(0.215, 0.61, 0.355, 1) both;\n }\n\n :host([closing]),\n :host([closing]) [part='backdrop'] {\n animation-delay: 0.14s;\n }\n\n :host([closing]) [part='overlay'] {\n animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(0.55, 0.055, 0.675, 0.19) both;\n }\n }\n\n @keyframes lumo-mobile-menu-overlay-enter {\n 0% {\n transform: translateY(150%);\n }\n }\n\n @keyframes lumo-mobile-menu-overlay-exit {\n 100% {\n transform: translateY(150%);\n }\n }\n`;\n\nconst menuOverlay = [overlay, menuOverlayCore, menuOverlayExt];\n\nregisterStyles('', menuOverlay, { moduleId: 'lumo-menu-overlay' });\n\nexport { menuOverlayCore, menuOverlay };\n","import '@vaadin/vaadin-lumo-styles/sizing.js';\nimport '@vaadin/vaadin-lumo-styles/spacing.js';\nimport { menuOverlay } from '@vaadin/vaadin-lumo-styles/mixins/menu-overlay.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst datePickerOverlay = css`\n [part='overlay'] {\n /*\n Width:\n date cell widths\n + month calendar side padding\n + year scroller width\n */\n /* prettier-ignore */\n width:\n calc(\n var(--lumo-size-m) * 7\n + var(--lumo-space-xs) * 2\n + 57px\n );\n height: 100%;\n max-height: calc(var(--lumo-size-m) * 14);\n overflow: hidden;\n -webkit-tap-highlight-color: transparent;\n }\n\n [part='overlay'] {\n flex-direction: column;\n }\n\n [part='content'] {\n padding: 0;\n height: 100%;\n overflow: hidden;\n -webkit-mask-image: none;\n mask-image: none;\n }\n\n :host([top-aligned]) [part~='overlay'] {\n margin-top: var(--lumo-space-xs);\n }\n\n :host([bottom-aligned]) [part~='overlay'] {\n margin-bottom: var(--lumo-space-xs);\n }\n\n @media (max-width: 420px), (max-height: 420px) {\n [part='overlay'] {\n width: 100vw;\n height: 70vh;\n max-height: 70vh;\n }\n }\n`;\n\nregisterStyles('vaadin-date-picker-overlay', [menuOverlay, datePickerOverlay], {\n moduleId: 'lumo-date-picker-overlay',\n});\n","import '@vaadin/vaadin-lumo-styles/color.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport '@vaadin/vaadin-lumo-styles/spacing.js';\nimport '@vaadin/vaadin-lumo-styles/style.js';\nimport '@vaadin/vaadin-lumo-styles/typography.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst button = css`\n :host {\n /* Sizing */\n --lumo-button-size: var(--lumo-size-m);\n min-width: calc(var(--lumo-button-size) * 2);\n height: var(--lumo-button-size);\n padding: 0 calc(var(--lumo-button-size) / 3 + var(--lumo-border-radius-m) / 2);\n margin: var(--lumo-space-xs) 0;\n box-sizing: border-box;\n /* Style */\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size-m);\n font-weight: 500;\n color: var(--_lumo-button-color, var(--lumo-primary-text-color));\n background-color: var(--_lumo-button-background-color, var(--lumo-contrast-5pct));\n border-radius: var(--lumo-border-radius-m);\n cursor: var(--lumo-clickable-cursor);\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n flex-shrink: 0;\n }\n\n /* Set only for the internal parts so we don't affect the host vertical alignment */\n [part='label'],\n [part='prefix'],\n [part='suffix'] {\n line-height: var(--lumo-line-height-xs);\n }\n\n [part='label'] {\n padding: calc(var(--lumo-button-size) / 6) 0;\n }\n\n :host([theme~='small']) {\n font-size: var(--lumo-font-size-s);\n --lumo-button-size: var(--lumo-size-s);\n }\n\n :host([theme~='large']) {\n font-size: var(--lumo-font-size-l);\n --lumo-button-size: var(--lumo-size-l);\n }\n\n /* For interaction states */\n :host::before,\n :host::after {\n content: '';\n /* We rely on the host always being relative */\n position: absolute;\n z-index: 1;\n inset: 0;\n background-color: currentColor;\n border-radius: inherit;\n opacity: 0;\n pointer-events: none;\n }\n\n /* Hover */\n\n @media (any-hover: hover) {\n :host(:hover)::before {\n opacity: 0.02;\n }\n }\n\n /* Active */\n\n :host::after {\n transition: opacity 1.4s, transform 0.1s;\n filter: blur(8px);\n }\n\n :host([active])::before {\n opacity: 0.05;\n transition-duration: 0s;\n }\n\n :host([active])::after {\n opacity: 0.1;\n transition-duration: 0s, 0s;\n transform: scale(0);\n }\n\n /* Keyboard focus */\n\n :host([focus-ring]) {\n box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);\n }\n\n :host([theme~='primary'][focus-ring]) {\n box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);\n }\n\n /* Types (primary, tertiary, tertiary-inline */\n\n :host([theme~='tertiary']),\n :host([theme~='tertiary-inline']) {\n background-color: transparent !important;\n min-width: 0;\n }\n\n :host([theme~='tertiary']) {\n padding: 0 calc(var(--lumo-button-size) / 6);\n }\n\n :host([theme~='tertiary-inline'])::before {\n display: none;\n }\n\n :host([theme~='tertiary-inline']) {\n margin: 0;\n height: auto;\n padding: 0;\n line-height: inherit;\n font-size: inherit;\n }\n\n :host([theme~='tertiary-inline']) [part='label'] {\n padding: 0;\n overflow: visible;\n line-height: inherit;\n }\n\n :host([theme~='primary']) {\n background-color: var(--_lumo-button-primary-background-color, var(--lumo-primary-color));\n color: var(--_lumo-button-primary-color, var(--lumo-primary-contrast-color));\n font-weight: 600;\n min-width: calc(var(--lumo-button-size) * 2.5);\n }\n\n :host([theme~='primary'])::before {\n background-color: black;\n }\n\n @media (any-hover: hover) {\n :host([theme~='primary']:hover)::before {\n opacity: 0.05;\n }\n }\n\n :host([theme~='primary'][active])::before {\n opacity: 0.1;\n }\n\n :host([theme~='primary'][active])::after {\n opacity: 0.2;\n }\n\n /* Colors (success, error, contrast) */\n\n :host([theme~='success']) {\n color: var(--lumo-success-text-color);\n }\n\n :host([theme~='success'][theme~='primary']) {\n background-color: var(--lumo-success-color);\n color: var(--lumo-success-contrast-color);\n }\n\n :host([theme~='error']) {\n color: var(--lumo-error-text-color);\n }\n\n :host([theme~='error'][theme~='primary']) {\n background-color: var(--lumo-error-color);\n color: var(--lumo-error-contrast-color);\n }\n\n :host([theme~='contrast']) {\n color: var(--lumo-contrast);\n }\n\n :host([theme~='contrast'][theme~='primary']) {\n background-color: var(--lumo-contrast);\n color: var(--lumo-base-color);\n }\n\n /* Disabled state. Keep selectors after other color variants. */\n\n :host([disabled]) {\n pointer-events: none;\n color: var(--lumo-disabled-text-color);\n }\n\n :host([theme~='primary'][disabled]) {\n background-color: var(--lumo-contrast-30pct);\n color: var(--lumo-base-color);\n }\n\n :host([theme~='primary'][disabled]) [part] {\n opacity: 0.7;\n }\n\n /* Icons */\n\n [part] ::slotted(vaadin-icon) {\n display: inline-block;\n width: var(--lumo-icon-size-m);\n height: var(--lumo-icon-size-m);\n }\n\n /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */\n [part] ::slotted(vaadin-icon[icon^='vaadin:']) {\n padding: 0.25em;\n box-sizing: border-box !important;\n }\n\n [part='prefix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n [part='suffix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n /* Icon-only */\n\n :host([theme~='icon']:not([theme~='tertiary-inline'])) {\n min-width: var(--lumo-button-size);\n padding-left: calc(var(--lumo-button-size) / 4);\n padding-right: calc(var(--lumo-button-size) / 4);\n }\n\n :host([theme~='icon']) [part='prefix'],\n :host([theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n\n /* RTL specific styles */\n\n :host([dir='rtl']) [part='prefix'] {\n margin-left: 0.25em;\n margin-right: -0.25em;\n }\n\n :host([dir='rtl']) [part='suffix'] {\n margin-left: -0.25em;\n margin-right: 0.25em;\n }\n\n :host([dir='rtl'][theme~='icon']) [part='prefix'],\n :host([dir='rtl'][theme~='icon']) [part='suffix'] {\n margin-left: 0;\n margin-right: 0;\n }\n`;\n\nregisterStyles('vaadin-button', button, { moduleId: 'lumo-button' });\n\nexport { button };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';\n\n/**\n * @typedef ReactiveController\n * @type {import('lit').ReactiveController}\n */\n\n/**\n * A mixin for connecting controllers to the element.\n *\n * @polymerMixin\n */\nexport const ControllerMixin = dedupingMixin((superClass) => {\n // If the superclass extends from LitElement,\n // use its own controllers implementation.\n if (typeof superClass.prototype.addController === 'function') {\n return superClass;\n }\n\n return class ControllerMixinClass extends superClass {\n constructor() {\n super();\n\n /**\n * @type {Set<ReactiveController>}\n */\n this.__controllers = new Set();\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n this.__controllers.forEach((c) => {\n if (c.hostConnected) {\n c.hostConnected();\n }\n });\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.__controllers.forEach((c) => {\n if (c.hostDisconnected) {\n c.hostDisconnected();\n }\n });\n }\n\n /**\n * Registers a controller to participate in the element update cycle.\n *\n * @param {ReactiveController} controller\n * @protected\n */\n addController(controller) {\n this.__controllers.add(controller);\n // Call hostConnected if a controller is added after the element is attached.\n if (this.$ !== undefined && this.isConnected && controller.hostConnected) {\n controller.hostConnected();\n }\n }\n\n /**\n * Removes a controller from the element.\n *\n * @param {ReactiveController} controller\n * @protected\n */\n removeController(controller) {\n this.__controllers.delete(controller);\n }\n };\n});\n","const DEV_MODE_CODE_REGEXP =\n /\\/\\*[\\*!]\\s+vaadin-dev-mode:start([\\s\\S]*)vaadin-dev-mode:end\\s+\\*\\*\\//i;\n\nconst FlowClients = window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.clients;\n\nfunction isMinified() {\n function test() {\n /** vaadin-dev-mode:start\n return false;\n vaadin-dev-mode:end **/\n return true;\n }\n return uncommentAndRun(test);\n}\n\nfunction isDevelopmentMode() {\n try {\n if (isForcedDevelopmentMode()) {\n return true;\n }\n\n if (!isLocalhost()) {\n return false;\n }\n\n if (FlowClients) {\n return !isFlowProductionMode();\n }\n\n return !isMinified();\n } catch (e) {\n // Some error in this code, assume production so no further actions will be taken\n return false;\n }\n}\n\nfunction isForcedDevelopmentMode() {\n return localStorage.getItem(\"vaadin.developmentmode.force\");\n}\n\nfunction isLocalhost() {\n return ([\"localhost\",\"127.0.0.1\"].indexOf(window.location.hostname) >= 0);\n}\n\nfunction isFlowProductionMode() {\n if (FlowClients) {\n const productionModeApps = Object.keys(FlowClients)\n .map(key => FlowClients[key])\n .filter(client => client.productionMode);\n if (productionModeApps.length > 0) {\n return true;\n }\n }\n return false;\n}\n\nfunction uncommentAndRun(callback, args) {\n if (typeof callback !== 'function') {\n return;\n }\n\n const match = DEV_MODE_CODE_REGEXP.exec(callback.toString());\n if (match) {\n try {\n // requires CSP: script-src 'unsafe-eval'\n callback = new Function(match[1]);\n } catch (e) {\n // eat the exception\n console.log('vaadin-development-mode-detector: uncommentAndRun() failed', e)\n }\n }\n\n return callback(args);\n}\n\n// A guard against polymer-modulizer removing the window.Vaadin\n// initialization above.\nwindow['Vaadin'] = window['Vaadin'] || {};\n\n/**\n * Inspects the source code of the given `callback` function for\n * specially-marked _commented_ code. If such commented code is found in the\n * callback source, uncomments and runs that code instead of the callback\n * itself. Otherwise runs the callback as is.\n *\n * The optional arguments are passed into the callback / uncommented code,\n * the result is returned.\n *\n * See the `isMinified()` function source code in this file for an example.\n *\n */\nexport const runIfDevelopmentMode = function(callback, args) {\n if (window.Vaadin.developmentMode) {\n return uncommentAndRun(callback, args);\n }\n};\n\nif (window.Vaadin.developmentMode === undefined) {\n window.Vaadin.developmentMode = isDevelopmentMode();\n}\n","/* This file is autogenerated from src/vaadin-usage-statistics.tpl.html */\n/*\n\nThis script gathers usage statistics from the application running in development mode.\n\nStatistics gathering is automatically disabled and excluded from production builds.\n\nFor details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.\n\n*/\n/*\n FIXME(polymer-modulizer): the above comments were extracted\n from HTML and may be out of place here. Review them and\n then delete this comment!\n*/\nimport { runIfDevelopmentMode } from '@vaadin/vaadin-development-mode-detector/vaadin-development-mode-detector.js';\n\nfunction maybeGatherAndSendStats() {\n /*! vaadin-dev-mode:start\n (function () {\n'use strict';\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar getPolymerVersion = function getPolymerVersion() {\n return window.Polymer && window.Polymer.version;\n};\n\nvar StatisticsGatherer = function () {\n function StatisticsGatherer(logger) {\n classCallCheck(this, StatisticsGatherer);\n\n this.now = new Date().getTime();\n this.logger = logger;\n }\n\n createClass(StatisticsGatherer, [{\n key: 'frameworkVersionDetectors',\n value: function frameworkVersionDetectors() {\n return {\n 'Flow': function Flow() {\n if (window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.clients) {\n var flowVersions = Object.keys(window.Vaadin.Flow.clients).map(function (key) {\n return window.Vaadin.Flow.clients[key];\n }).filter(function (client) {\n return client.getVersionInfo;\n }).map(function (client) {\n return client.getVersionInfo().flow;\n });\n if (flowVersions.length > 0) {\n return flowVersions[0];\n }\n }\n },\n 'Vaadin Framework': function VaadinFramework() {\n if (window.vaadin && window.vaadin.clients) {\n var frameworkVersions = Object.values(window.vaadin.clients).filter(function (client) {\n return client.getVersionInfo;\n }).map(function (client) {\n return client.getVersionInfo().vaadinVersion;\n });\n if (frameworkVersions.length > 0) {\n return frameworkVersions[0];\n }\n }\n },\n 'AngularJs': function AngularJs() {\n if (window.angular && window.angular.version && window.angular.version) {\n return window.angular.version.full;\n }\n },\n 'Angular': function Angular() {\n if (window.ng) {\n var tags = document.querySelectorAll(\"[ng-version]\");\n if (tags.length > 0) {\n return tags[0].getAttribute(\"ng-version\");\n }\n return \"Unknown\";\n }\n },\n 'Backbone.js': function BackboneJs() {\n if (window.Backbone) {\n return window.Backbone.VERSION;\n }\n },\n 'React': function React() {\n var reactSelector = '[data-reactroot], [data-reactid]';\n if (!!document.querySelector(reactSelector)) {\n // React does not publish the version by default\n return \"unknown\";\n }\n },\n 'Ember': function Ember() {\n if (window.Em && window.Em.VERSION) {\n return window.Em.VERSION;\n } else if (window.Ember && window.Ember.VERSION) {\n return window.Ember.VERSION;\n }\n },\n 'jQuery': function (_jQuery) {\n function jQuery() {\n return _jQuery.apply(this, arguments);\n }\n\n jQuery.toString = function () {\n return _jQuery.toString();\n };\n\n return jQuery;\n }(function () {\n if (typeof jQuery === 'function' && jQuery.prototype.jquery !== undefined) {\n return jQuery.prototype.jquery;\n }\n }),\n 'Polymer': function Polymer() {\n var version = getPolymerVersion();\n if (version) {\n return version;\n }\n },\n 'LitElement': function LitElement() {\n var version = window.litElementVersions && window.litElementVersions[0];\n if (version) {\n return version;\n }\n },\n 'LitHtml': function LitHtml() {\n var version = window.litHtmlVersions && window.litHtmlVersions[0];\n if (version) {\n return version;\n }\n },\n 'Vue.js': function VueJs() {\n if (window.Vue) {\n return window.Vue.version;\n }\n }\n };\n }\n }, {\n key: 'getUsedVaadinElements',\n value: function getUsedVaadinElements(elements) {\n var version = getPolymerVersion();\n var elementClasses = void 0;\n // NOTE: In case you edit the code here, YOU MUST UPDATE any statistics reporting code in Flow.\n // Check all locations calling the method getEntries() in\n // https://github.com/vaadin/flow/blob/master/flow-server/src/main/java/com/vaadin/flow/internal/UsageStatistics.java#L106\n // Currently it is only used by BootstrapHandler.\n if (version && version.indexOf('2') === 0) {\n // Polymer 2: components classes are stored in window.Vaadin\n elementClasses = Object.keys(window.Vaadin).map(function (c) {\n return window.Vaadin[c];\n }).filter(function (c) {\n return c.is;\n });\n } else {\n // Polymer 3: components classes are stored in window.Vaadin.registrations\n elementClasses = window.Vaadin.registrations || [];\n }\n elementClasses.forEach(function (klass) {\n var version = klass.version ? klass.version : \"0.0.0\";\n elements[klass.is] = { version: version };\n });\n }\n }, {\n key: 'getUsedVaadinThemes',\n value: function getUsedVaadinThemes(themes) {\n ['Lumo', 'Material'].forEach(function (themeName) {\n var theme;\n var version = getPolymerVersion();\n if (version && version.indexOf('2') === 0) {\n // Polymer 2: themes are stored in window.Vaadin\n theme = window.Vaadin[themeName];\n } else {\n // Polymer 3: themes are stored in custom element registry\n theme = customElements.get('vaadin-' + themeName.toLowerCase() + '-styles');\n }\n if (theme && theme.version) {\n themes[themeName] = { version: theme.version };\n }\n });\n }\n }, {\n key: 'getFrameworks',\n value: function getFrameworks(frameworks) {\n var detectors = this.frameworkVersionDetectors();\n Object.keys(detectors).forEach(function (framework) {\n var detector = detectors[framework];\n try {\n var version = detector();\n if (version) {\n frameworks[framework] = { version: version };\n }\n } catch (e) {}\n });\n }\n }, {\n key: 'gather',\n value: function gather(storage) {\n var storedStats = storage.read();\n var gatheredStats = {};\n var types = [\"elements\", \"frameworks\", \"themes\"];\n\n types.forEach(function (type) {\n gatheredStats[type] = {};\n if (!storedStats[type]) {\n storedStats[type] = {};\n }\n });\n\n var previousStats = JSON.stringify(storedStats);\n\n this.getUsedVaadinElements(gatheredStats.elements);\n this.getFrameworks(gatheredStats.frameworks);\n this.getUsedVaadinThemes(gatheredStats.themes);\n\n var now = this.now;\n types.forEach(function (type) {\n var keys = Object.keys(gatheredStats[type]);\n keys.forEach(function (key) {\n if (!storedStats[type][key] || _typeof(storedStats[type][key]) != _typeof({})) {\n storedStats[type][key] = { firstUsed: now };\n }\n // Discards any previously logged version number\n storedStats[type][key].version = gatheredStats[type][key].version;\n storedStats[type][key].lastUsed = now;\n });\n });\n\n var newStats = JSON.stringify(storedStats);\n storage.write(newStats);\n if (newStats != previousStats && Object.keys(storedStats).length > 0) {\n this.logger.debug(\"New stats: \" + newStats);\n }\n }\n }]);\n return StatisticsGatherer;\n}();\n\nvar StatisticsStorage = function () {\n function StatisticsStorage(key) {\n classCallCheck(this, StatisticsStorage);\n\n this.key = key;\n }\n\n createClass(StatisticsStorage, [{\n key: 'read',\n value: function read() {\n var localStorageStatsString = localStorage.getItem(this.key);\n try {\n return JSON.parse(localStorageStatsString ? localStorageStatsString : '{}');\n } catch (e) {\n return {};\n }\n }\n }, {\n key: 'write',\n value: function write(data) {\n localStorage.setItem(this.key, data);\n }\n }, {\n key: 'clear',\n value: function clear() {\n localStorage.removeItem(this.key);\n }\n }, {\n key: 'isEmpty',\n value: function isEmpty() {\n var storedStats = this.read();\n var empty = true;\n Object.keys(storedStats).forEach(function (key) {\n if (Object.keys(storedStats[key]).length > 0) {\n empty = false;\n }\n });\n\n return empty;\n }\n }]);\n return StatisticsStorage;\n}();\n\nvar StatisticsSender = function () {\n function StatisticsSender(url, logger) {\n classCallCheck(this, StatisticsSender);\n\n this.url = url;\n this.logger = logger;\n }\n\n createClass(StatisticsSender, [{\n key: 'send',\n value: function send(data, errorHandler) {\n var logger = this.logger;\n\n if (navigator.onLine === false) {\n logger.debug(\"Offline, can't send\");\n errorHandler();\n return;\n }\n logger.debug(\"Sending data to \" + this.url);\n\n var req = new XMLHttpRequest();\n req.withCredentials = true;\n req.addEventListener(\"load\", function () {\n // Stats sent, nothing more to do\n logger.debug(\"Response: \" + req.responseText);\n });\n req.addEventListener(\"error\", function () {\n logger.debug(\"Send failed\");\n errorHandler();\n });\n req.addEventListener(\"abort\", function () {\n logger.debug(\"Send aborted\");\n errorHandler();\n });\n req.open(\"POST\", this.url);\n req.setRequestHeader(\"Content-Type\", \"application/json\");\n req.send(data);\n }\n }]);\n return StatisticsSender;\n}();\n\nvar StatisticsLogger = function () {\n function StatisticsLogger(id) {\n classCallCheck(this, StatisticsLogger);\n\n this.id = id;\n }\n\n createClass(StatisticsLogger, [{\n key: '_isDebug',\n value: function _isDebug() {\n return localStorage.getItem(\"vaadin.\" + this.id + \".debug\");\n }\n }, {\n key: 'debug',\n value: function debug(msg) {\n if (this._isDebug()) {\n console.info(this.id + \": \" + msg);\n }\n }\n }]);\n return StatisticsLogger;\n}();\n\nvar UsageStatistics = function () {\n function UsageStatistics() {\n classCallCheck(this, UsageStatistics);\n\n this.now = new Date();\n this.timeNow = this.now.getTime();\n this.gatherDelay = 10; // Delay between loading this file and gathering stats\n this.initialDelay = 24 * 60 * 60;\n\n this.logger = new StatisticsLogger(\"statistics\");\n this.storage = new StatisticsStorage(\"vaadin.statistics.basket\");\n this.gatherer = new StatisticsGatherer(this.logger);\n this.sender = new StatisticsSender(\"https://tools.vaadin.com/usage-stats/submit\", this.logger);\n }\n\n createClass(UsageStatistics, [{\n key: 'maybeGatherAndSend',\n value: function maybeGatherAndSend() {\n var _this = this;\n\n if (localStorage.getItem(UsageStatistics.optOutKey)) {\n return;\n }\n this.gatherer.gather(this.storage);\n setTimeout(function () {\n _this.maybeSend();\n }, this.gatherDelay * 1000);\n }\n }, {\n key: 'lottery',\n value: function lottery() {\n return true;\n }\n }, {\n key: 'currentMonth',\n value: function currentMonth() {\n return this.now.getYear() * 12 + this.now.getMonth();\n }\n }, {\n key: 'maybeSend',\n value: function maybeSend() {\n var firstUse = Number(localStorage.getItem(UsageStatistics.firstUseKey));\n var monthProcessed = Number(localStorage.getItem(UsageStatistics.monthProcessedKey));\n\n if (!firstUse) {\n // Use a grace period to avoid interfering with tests, incognito mode etc\n firstUse = this.timeNow;\n localStorage.setItem(UsageStatistics.firstUseKey, firstUse);\n }\n\n if (this.timeNow < firstUse + this.initialDelay * 1000) {\n this.logger.debug(\"No statistics will be sent until the initial delay of \" + this.initialDelay + \"s has passed\");\n return;\n }\n if (this.currentMonth() <= monthProcessed) {\n this.logger.debug(\"This month has already been processed\");\n return;\n }\n localStorage.setItem(UsageStatistics.monthProcessedKey, this.currentMonth());\n // Use random sampling\n if (this.lottery()) {\n this.logger.debug(\"Congratulations, we have a winner!\");\n } else {\n this.logger.debug(\"Sorry, no stats from you this time\");\n return;\n }\n\n this.send();\n }\n }, {\n key: 'send',\n value: function send() {\n // Ensure we have the latest data\n this.gatherer.gather(this.storage);\n\n // Read, send and clean up\n var data = this.storage.read();\n data[\"firstUse\"] = Number(localStorage.getItem(UsageStatistics.firstUseKey));\n data[\"usageStatisticsVersion\"] = UsageStatistics.version;\n var info = 'This request contains usage statistics gathered from the application running in development mode. \\n\\nStatistics gathering is automatically disabled and excluded from production builds.\\n\\nFor details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.\\n\\n\\n\\n';\n var self = this;\n this.sender.send(info + JSON.stringify(data), function () {\n // Revert the 'month processed' flag\n localStorage.setItem(UsageStatistics.monthProcessedKey, self.currentMonth() - 1);\n });\n }\n }], [{\n key: 'version',\n get: function get$1() {\n return '2.1.2';\n }\n }, {\n key: 'firstUseKey',\n get: function get$1() {\n return 'vaadin.statistics.firstuse';\n }\n }, {\n key: 'monthProcessedKey',\n get: function get$1() {\n return 'vaadin.statistics.monthProcessed';\n }\n }, {\n key: 'optOutKey',\n get: function get$1() {\n return 'vaadin.statistics.optout';\n }\n }]);\n return UsageStatistics;\n}();\n\ntry {\n window.Vaadin = window.Vaadin || {};\n window.Vaadin.usageStatsChecker = window.Vaadin.usageStatsChecker || new UsageStatistics();\n window.Vaadin.usageStatsChecker.maybeGatherAndSend();\n} catch (e) {\n // Intentionally ignored as this is not a problem in the app being developed\n}\n\n}());\n\n vaadin-dev-mode:end **/\n}\n\nexport const usageStatistics = function() {\n if (typeof runIfDevelopmentMode === 'function') {\n return runIfDevelopmentMode(maybeGatherAndSendStats);\n }\n};\n","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * @fileoverview\n *\n * This module provides a number of strategies for enqueuing asynchronous\n * tasks. Each sub-module provides a standard `run(fn)` interface that returns a\n * handle, and a `cancel(handle)` interface for canceling async tasks before\n * they run.\n *\n * @summary Module that provides a number of strategies for enqueuing\n * asynchronous tasks.\n */\n\nlet microtaskCurrHandle = 0;\nlet microtaskLastHandle = 0;\nconst microtaskCallbacks = [];\nlet microtaskScheduled = false;\n\nfunction microtaskFlush() {\n microtaskScheduled = false;\n const len = microtaskCallbacks.length;\n for (let i = 0; i < len; i++) {\n const cb = microtaskCallbacks[i];\n if (cb) {\n try {\n cb();\n } catch (e) {\n setTimeout(() => {\n throw e;\n });\n }\n }\n }\n microtaskCallbacks.splice(0, len);\n microtaskLastHandle += len;\n}\n\n/**\n * Async interface wrapper around `setTimeout`.\n *\n * @namespace\n * @summary Async interface wrapper around `setTimeout`.\n */\nconst timeOut = {\n /**\n * Returns a sub-module with the async interface providing the provided\n * delay.\n *\n * @memberof timeOut\n * @param {number=} delay Time to wait before calling callbacks in ms\n * @return {!AsyncInterface} An async timeout interface\n */\n after(delay) {\n return {\n run(fn) {\n return window.setTimeout(fn, delay);\n },\n cancel(handle) {\n window.clearTimeout(handle);\n },\n };\n },\n /**\n * Enqueues a function called in the next task.\n *\n * @memberof timeOut\n * @param {!Function} fn Callback to run\n * @param {number=} delay Delay in milliseconds\n * @return {number} Handle used for canceling task\n */\n run(fn, delay) {\n return window.setTimeout(fn, delay);\n },\n /**\n * Cancels a previously enqueued `timeOut` callback.\n *\n * @memberof timeOut\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n window.clearTimeout(handle);\n },\n};\nexport { timeOut };\n\n/**\n * Async interface wrapper around `requestAnimationFrame`.\n *\n * @namespace\n * @summary Async interface wrapper around `requestAnimationFrame`.\n */\nconst animationFrame = {\n /**\n * Enqueues a function called at `requestAnimationFrame` timing.\n *\n * @memberof animationFrame\n * @param {function(number):void} fn Callback to run\n * @return {number} Handle used for canceling task\n */\n run(fn) {\n return window.requestAnimationFrame(fn);\n },\n /**\n * Cancels a previously enqueued `animationFrame` callback.\n *\n * @memberof animationFrame\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n window.cancelAnimationFrame(handle);\n },\n};\nexport { animationFrame };\n\n/**\n * Async interface wrapper around `requestIdleCallback`. Falls back to\n * `setTimeout` on browsers that do not support `requestIdleCallback`.\n *\n * @namespace\n * @summary Async interface wrapper around `requestIdleCallback`.\n */\nconst idlePeriod = {\n /**\n * Enqueues a function called at `requestIdleCallback` timing.\n *\n * @memberof idlePeriod\n * @param {function(!IdleDeadline):void} fn Callback to run\n * @return {number} Handle used for canceling task\n */\n run(fn) {\n return window.requestIdleCallback ? window.requestIdleCallback(fn) : window.setTimeout(fn, 16);\n },\n /**\n * Cancels a previously enqueued `idlePeriod` callback.\n *\n * @memberof idlePeriod\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n if (window.cancelIdleCallback) {\n window.cancelIdleCallback(handle);\n } else {\n window.clearTimeout(handle);\n }\n },\n};\nexport { idlePeriod };\n\n/**\n * Async interface for enqueuing callbacks that run at microtask timing.\n *\n * @namespace\n * @summary Async interface for enqueuing callbacks that run at microtask\n * timing.\n */\nconst microTask = {\n /**\n * Enqueues a function called at microtask timing.\n *\n * @memberof microTask\n * @param {!Function=} callback Callback to run\n * @return {number} Handle used for canceling task\n */\n run(callback) {\n if (!microtaskScheduled) {\n microtaskScheduled = true;\n queueMicrotask(() => microtaskFlush());\n }\n microtaskCallbacks.push(callback);\n const result = microtaskCurrHandle;\n microtaskCurrHandle += 1;\n return result;\n },\n\n /**\n * Cancels a previously enqueued `microTask` callback.\n *\n * @memberof microTask\n * @param {number} handle Handle returned from `run` of callback to cancel\n * @return {void}\n */\n cancel(handle) {\n const idx = handle - microtaskLastHandle;\n if (idx >= 0) {\n if (!microtaskCallbacks[idx]) {\n throw new Error(`invalid async handle: ${handle}`);\n }\n microtaskCallbacks[idx] = null;\n }\n },\n};\nexport { microTask };\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\nconst debouncerQueue = new Set();\n\n/**\n * @summary Collapse multiple callbacks into one invocation after a timer.\n */\nexport class Debouncer {\n /**\n * Creates a debouncer if no debouncer is passed as a parameter\n * or it cancels an active debouncer otherwise. The following\n * example shows how a debouncer can be called multiple times within a\n * microtask and \"debounced\" such that the provided callback function is\n * called once. Add this method to a custom element:\n *\n * ```js\n * import {microTask} from '@vaadin/component-base/src/async.js';\n * import {Debouncer} from '@vaadin/component-base/src/debounce.js';\n * // ...\n *\n * _debounceWork() {\n * this._debounceJob = Debouncer.debounce(this._debounceJob,\n * microTask, () => this._doWork());\n * }\n * ```\n *\n * If the `_debounceWork` method is called multiple times within the same\n * microtask, the `_doWork` function will be called only once at the next\n * microtask checkpoint.\n *\n * Note: In testing it is often convenient to avoid asynchrony. To accomplish\n * this with a debouncer, you can use `enqueueDebouncer` and\n * `flush`. For example, extend the above example by adding\n * `enqueueDebouncer(this._debounceJob)` at the end of the\n * `_debounceWork` method. Then in a test, call `flush` to ensure\n * the debouncer has completed.\n *\n * @param {Debouncer?} debouncer Debouncer object.\n * @param {!AsyncInterface} asyncModule Object with Async interface\n * @param {function()} callback Callback to run.\n * @return {!Debouncer} Returns a debouncer object.\n */\n static debounce(debouncer, asyncModule, callback) {\n if (debouncer instanceof Debouncer) {\n // Cancel the async callback, but leave in debouncerQueue if it was\n // enqueued, to maintain 1.x flush order\n debouncer._cancelAsync();\n } else {\n debouncer = new Debouncer();\n }\n debouncer.setConfig(asyncModule, callback);\n return debouncer;\n }\n\n constructor() {\n this._asyncModule = null;\n this._callback = null;\n this._timer = null;\n }\n\n /**\n * Sets the scheduler; that is, a module with the Async interface,\n * a callback and optional arguments to be passed to the run function\n * from the async module.\n *\n * @param {!AsyncInterface} asyncModule Object with Async interface.\n * @param {function()} callback Callback to run.\n * @return {void}\n */\n setConfig(asyncModule, callback) {\n this._asyncModule = asyncModule;\n this._callback = callback;\n this._timer = this._asyncModule.run(() => {\n this._timer = null;\n debouncerQueue.delete(this);\n this._callback();\n });\n }\n\n /**\n * Cancels an active debouncer and returns a reference to itself.\n *\n * @return {void}\n */\n cancel() {\n if (this.isActive()) {\n this._cancelAsync();\n // Canceling a debouncer removes its spot from the flush queue,\n // so if a debouncer is manually canceled and re-debounced, it\n // will reset its flush order (this is a very minor difference from 1.x)\n // Re-debouncing via the `debounce` API retains the 1.x FIFO flush order\n debouncerQueue.delete(this);\n }\n }\n\n /**\n * Cancels a debouncer's async callback.\n *\n * @return {void}\n */\n _cancelAsync() {\n if (this.isActive()) {\n this._asyncModule.cancel(/** @type {number} */ (this._timer));\n this._timer = null;\n }\n }\n\n /**\n * Flushes an active debouncer and returns a reference to itself.\n *\n * @return {void}\n */\n flush() {\n if (this.isActive()) {\n this.cancel();\n this._callback();\n }\n }\n\n /**\n * Returns true if the debouncer is active.\n *\n * @return {boolean} True if active.\n */\n isActive() {\n return this._timer != null;\n }\n}\n\n/**\n * Adds a `Debouncer` to a list of globally flushable tasks.\n *\n * @param {!Debouncer} debouncer Debouncer to enqueue\n * @return {void}\n */\nexport function enqueueDebouncer(debouncer) {\n debouncerQueue.add(debouncer);\n}\n\n/**\n * Flushes any enqueued debouncers\n *\n * @return {boolean} Returns whether any debouncers were flushed\n */\nexport function flushDebouncers() {\n const didFlush = Boolean(debouncerQueue.size);\n // If new debouncers are added while flushing, Set.forEach will ensure\n // newly added ones are also flushed\n debouncerQueue.forEach((debouncer) => {\n try {\n debouncer.flush();\n } catch (e) {\n setTimeout(() => {\n throw e;\n });\n }\n });\n return didFlush;\n}\n\nexport const flush = () => {\n let debouncers;\n do {\n debouncers = flushDebouncers();\n } while (debouncers);\n};\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { setCancelSyntheticClickEvents } from '@polymer/polymer/lib/utils/settings.js';\nimport { usageStatistics } from '@vaadin/vaadin-usage-statistics/vaadin-usage-statistics.js';\nimport { idlePeriod } from './async.js';\nimport { Debouncer, enqueueDebouncer } from './debounce.js';\nimport { DirMixin } from './dir-mixin.js';\n\n// This setting affects the legacy Polymer gestures which get activated\n// once you import any iron component e.g iron-icon.\n// It has to be explicitly disabled to prevent click issues in iOS + VoiceOver\n// for buttons that are based on `[role=button]` e.g vaadin-button.\nsetCancelSyntheticClickEvents(false);\n\nif (!window.Vaadin) {\n window.Vaadin = {};\n}\n\n/**\n * Array of Vaadin custom element classes that have been finalized.\n */\nif (!window.Vaadin.registrations) {\n window.Vaadin.registrations = [];\n}\n\nif (!window.Vaadin.developmentModeCallback) {\n window.Vaadin.developmentModeCallback = {};\n}\n\nwindow.Vaadin.developmentModeCallback['vaadin-usage-statistics'] = function () {\n usageStatistics();\n};\n\nlet statsJob;\n\nconst registered = new Set();\n\n/**\n * @polymerMixin\n * @mixes DirMixin\n */\nexport const ElementMixin = (superClass) =>\n class VaadinElementMixin extends DirMixin(superClass) {\n static get version() {\n return '24.2.9';\n }\n\n /** @protected */\n static finalize() {\n super.finalize();\n\n const { is } = this;\n\n // Registers a class prototype for telemetry purposes.\n if (is && !registered.has(is)) {\n window.Vaadin.registrations.push(this);\n registered.add(is);\n\n if (window.Vaadin.developmentModeCallback) {\n statsJob = Debouncer.debounce(statsJob, idlePeriod, () => {\n window.Vaadin.developmentModeCallback['vaadin-usage-statistics']();\n });\n enqueueDebouncer(statsJob);\n }\n }\n }\n\n constructor() {\n super();\n\n if (document.doctype === null) {\n console.warn(\n 'Vaadin components require the \"standards mode\" declaration. Please add <!DOCTYPE html> to the HTML document.',\n );\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * Returns an array of ancestor root nodes for the given node.\n *\n * A root node is either a document node or a document fragment node (Shadow Root).\n * The array is collected by a bottom-up DOM traversing that starts with the given node\n * and involves both the light DOM and ancestor shadow DOM trees.\n *\n * @param {Node} node\n * @return {Node[]}\n */\nexport function getAncestorRootNodes(node) {\n const result = [];\n\n while (node) {\n if (node.nodeType === Node.DOCUMENT_NODE) {\n result.push(node);\n break;\n }\n\n if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n result.push(node);\n node = node.host;\n continue;\n }\n\n if (node.assignedSlot) {\n node = node.assignedSlot;\n continue;\n }\n\n node = node.parentNode;\n }\n\n return result;\n}\n\n/**\n * Returns the list of flattened elements for the given `node`.\n * This list consists of a node's children and, for any children that are\n * `<slot>` elements, the expanded flattened list of `assignedElements`.\n *\n * @param {Node} node\n * @return {Element[]}\n */\nexport function getFlattenedElements(node) {\n const result = [];\n let elements;\n if (node.localName === 'slot') {\n elements = node.assignedElements();\n } else {\n result.push(node);\n elements = [...node.children];\n }\n elements.forEach((elem) => result.push(...getFlattenedElements(elem)));\n return result;\n}\n\n/**\n * Traverses the given node and its parents, including those that are across\n * the shadow root boundaries, until it finds a node that matches the selector.\n *\n * @param {string} selector The CSS selector to match against\n * @param {Node} node The starting node for the traversal\n * @return {Node | null} The closest matching element, or null if no match is found\n */\nexport function getClosestElement(selector, node) {\n if (!node) {\n return null;\n }\n\n return node.closest(selector) || getClosestElement(selector, node.getRootNode().host);\n}\n\n/**\n * Takes a string with values separated by space and returns a set the values\n *\n * @param {string} value\n * @return {Set<string>}\n */\nexport function deserializeAttributeValue(value) {\n if (!value) {\n return new Set();\n }\n\n return new Set(value.split(' '));\n}\n\n/**\n * Takes a set of string values and returns a string with values separated by space\n *\n * @param {Set<string>} values\n * @return {string}\n */\nexport function serializeAttributeValue(values) {\n return values ? [...values].join(' ') : '';\n}\n\n/**\n * Adds a value to an attribute containing space-delimited values.\n *\n * @param {HTMLElement} element\n * @param {string} attr\n * @param {string} value\n */\nexport function addValueToAttribute(element, attr, value) {\n const values = deserializeAttributeValue(element.getAttribute(attr));\n values.add(value);\n element.setAttribute(attr, serializeAttributeValue(values));\n}\n\n/**\n * Removes a value from an attribute containing space-delimited values.\n * If the value is the last one, the whole attribute is removed.\n *\n * @param {HTMLElement} element\n * @param {string} attr\n * @param {string} value\n */\nexport function removeValueFromAttribute(element, attr, value) {\n const values = deserializeAttributeValue(element.getAttribute(attr));\n values.delete(value);\n if (values.size === 0) {\n element.removeAttribute(attr);\n return;\n }\n element.setAttribute(attr, serializeAttributeValue(values));\n}\n\n/**\n * Returns true if the given node is an empty text node, false otherwise.\n *\n * @param {Node} node\n * @return {boolean}\n */\nexport function isEmptyTextNode(node) {\n return node.nodeType === Node.TEXT_NODE && node.textContent.trim() === '';\n}\n","/**\n * @license\n * Copyright (c) 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * A helper for observing slot changes.\n */\nexport class SlotObserver {\n constructor(slot, callback) {\n /** @type HTMLSlotElement */\n this.slot = slot;\n\n /** @type Function */\n this.callback = callback;\n\n /** @type {Node[]} */\n this._storedNodes = [];\n\n this._connected = false;\n this._scheduled = false;\n\n this._boundSchedule = () => {\n this._schedule();\n };\n\n this.connect();\n this._schedule();\n }\n\n /**\n * Activates an observer. This method is automatically called when\n * a `SlotObserver` is created. It should only be called to re-activate\n * an observer that has been deactivated via the `disconnect` method.\n */\n connect() {\n this.slot.addEventListener('slotchange', this._boundSchedule);\n this._connected = true;\n }\n\n /**\n * Deactivates the observer. After calling this method the observer callback\n * will not be called when changes to slotted nodes occur. The `connect` method\n * may be subsequently called to reactivate the observer.\n */\n disconnect() {\n this.slot.removeEventListener('slotchange', this._boundSchedule);\n this._connected = false;\n }\n\n /** @private */\n _schedule() {\n if (!this._scheduled) {\n this._scheduled = true;\n\n queueMicrotask(() => {\n this.flush();\n });\n }\n }\n\n /**\n * Run the observer callback synchronously.\n */\n flush() {\n if (!this._connected) {\n return;\n }\n\n this._scheduled = false;\n\n this._processNodes();\n }\n\n /** @private */\n _processNodes() {\n const currentNodes = this.slot.assignedNodes({ flatten: true });\n\n let addedNodes = [];\n const removedNodes = [];\n const movedNodes = [];\n\n if (currentNodes.length) {\n addedNodes = currentNodes.filter((node) => !this._storedNodes.includes(node));\n }\n\n if (this._storedNodes.length) {\n this._storedNodes.forEach((node, index) => {\n const idx = currentNodes.indexOf(node);\n if (idx === -1) {\n removedNodes.push(node);\n } else if (idx !== index) {\n movedNodes.push(node);\n }\n });\n }\n\n if (addedNodes.length || removedNodes.length || movedNodes.length) {\n this.callback({ addedNodes, movedNodes, removedNodes });\n }\n\n this._storedNodes = currentNodes;\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\nlet uniqueId = 0;\n\n/**\n * Resets the unique id counter.\n *\n * @return {void}\n */\nexport function resetUniqueId() {\n uniqueId = 0;\n}\n\n/**\n * Returns a unique integer id.\n *\n * @return {number}\n */\nexport function generateUniqueId() {\n // eslint-disable-next-line no-plusplus\n return uniqueId++;\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { isEmptyTextNode } from './dom-utils.js';\nimport { SlotObserver } from './slot-observer.js';\nimport { generateUniqueId } from './unique-id-utils.js';\n\n/**\n * A controller for providing content to slot element and observing changes.\n */\nexport class SlotController extends EventTarget {\n /**\n * Ensure that every instance has unique ID.\n *\n * @param {HTMLElement} host\n * @param {string} slotName\n * @return {string}\n * @protected\n */\n static generateId(host, slotName) {\n const prefix = slotName || 'default';\n return `${prefix}-${host.localName}-${generateUniqueId()}`;\n }\n\n constructor(host, slotName, tagName, config = {}) {\n super();\n\n const { initializer, multiple, observe, useUniqueId } = config;\n\n this.host = host;\n this.slotName = slotName;\n this.tagName = tagName;\n this.observe = typeof observe === 'boolean' ? observe : true;\n this.multiple = typeof multiple === 'boolean' ? multiple : false;\n this.slotInitializer = initializer;\n\n if (multiple) {\n this.nodes = [];\n }\n\n // Only generate the default ID if requested by the controller.\n if (useUniqueId) {\n this.defaultId = this.constructor.generateId(host, slotName);\n }\n }\n\n hostConnected() {\n if (!this.initialized) {\n if (this.multiple) {\n this.initMultiple();\n } else {\n this.initSingle();\n }\n\n if (this.observe) {\n this.observeSlot();\n }\n\n this.initialized = true;\n }\n }\n\n /** @protected */\n initSingle() {\n let node = this.getSlotChild();\n\n if (!node) {\n node = this.attachDefaultNode();\n this.initNode(node);\n } else {\n this.node = node;\n this.initAddedNode(node);\n }\n }\n\n /** @protected */\n initMultiple() {\n const children = this.getSlotChildren();\n\n if (children.length === 0) {\n const defaultNode = this.attachDefaultNode();\n if (defaultNode) {\n this.nodes = [defaultNode];\n this.initNode(defaultNode);\n }\n } else {\n this.nodes = children;\n children.forEach((node) => {\n this.initAddedNode(node);\n });\n }\n }\n\n /**\n * Create and attach default node using the provided tag name, if any.\n * @return {Node | undefined}\n * @protected\n */\n attachDefaultNode() {\n const { host, slotName, tagName } = this;\n\n // Check if the node was created previously and if so, reuse it.\n let node = this.defaultNode;\n\n // Tag name is optional, sometimes we don't init default content.\n if (!node && tagName) {\n node = document.createElement(tagName);\n if (node instanceof Element) {\n if (slotName !== '') {\n node.setAttribute('slot', slotName);\n }\n this.node = node;\n this.defaultNode = node;\n }\n }\n\n if (node) {\n host.appendChild(node);\n }\n\n return node;\n }\n\n /**\n * Return the list of nodes matching the slot managed by the controller.\n * @return {Node}\n */\n getSlotChildren() {\n const { slotName } = this;\n return Array.from(this.host.childNodes).filter((node) => {\n // Either an element (any slot) or a text node (only un-named slot).\n return (\n (node.nodeType === Node.ELEMENT_NODE && node.slot === slotName) ||\n (node.nodeType === Node.TEXT_NODE && node.textContent.trim() && slotName === '')\n );\n });\n }\n\n /**\n * Return a reference to the node managed by the controller.\n * @return {Node}\n */\n getSlotChild() {\n return this.getSlotChildren()[0];\n }\n\n /**\n * Run `slotInitializer` for the node managed by the controller.\n *\n * @param {Node} node\n * @protected\n */\n initNode(node) {\n const { slotInitializer } = this;\n // Don't try to bind `this` to initializer (normally it's arrow function).\n // Instead, pass the host as a first argument to access component's state.\n if (slotInitializer) {\n slotInitializer(node, this.host);\n }\n }\n\n /**\n * Override to initialize the newly added custom node.\n *\n * @param {Node} _node\n * @protected\n */\n initCustomNode(_node) {}\n\n /**\n * Override to teardown slotted node when it's removed.\n *\n * @param {Node} _node\n * @protected\n */\n teardownNode(_node) {}\n\n /**\n * Run both `initCustomNode` and `initNode` for a custom slotted node.\n *\n * @param {Node} node\n * @protected\n */\n initAddedNode(node) {\n if (node !== this.defaultNode) {\n this.initCustomNode(node);\n this.initNode(node);\n }\n }\n\n /**\n * Setup the observer to manage slot content changes.\n * @protected\n */\n observeSlot() {\n const { slotName } = this;\n const selector = slotName === '' ? 'slot:not([name])' : `slot[name=${slotName}]`;\n const slot = this.host.shadowRoot.querySelector(selector);\n\n this.__slotObserver = new SlotObserver(slot, ({ addedNodes, removedNodes }) => {\n const current = this.multiple ? this.nodes : [this.node];\n\n // Calling `slot.assignedNodes()` includes whitespace text nodes in case of default slot:\n // unlike comment nodes, they are not filtered out. So we need to manually ignore them.\n const newNodes = addedNodes.filter((node) => !isEmptyTextNode(node) && !current.includes(node));\n\n if (removedNodes.length) {\n this.nodes = current.filter((node) => !removedNodes.includes(node));\n\n removedNodes.forEach((node) => {\n this.teardownNode(node);\n });\n }\n\n if (newNodes && newNodes.length > 0) {\n if (this.multiple) {\n // Remove default node if exists\n if (this.defaultNode) {\n this.defaultNode.remove();\n }\n this.nodes = [...current, ...newNodes].filter((node) => node !== this.defaultNode);\n newNodes.forEach((node) => {\n this.initAddedNode(node);\n });\n } else {\n // Remove previous node if exists\n if (this.node) {\n this.node.remove();\n }\n this.node = newNodes[0];\n this.initAddedNode(this.node);\n }\n }\n });\n }\n}\n","/**\n * @license\n * Copyright (c) 2022 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from './slot-controller.js';\n\n/**\n * A controller that manages the slotted tooltip element.\n */\nexport class TooltipController extends SlotController {\n constructor(host) {\n // Do not provide slot factory to create tooltip lazily.\n super(host, 'tooltip');\n\n this.setTarget(host);\n }\n\n /**\n * Override to initialize the newly added custom tooltip.\n *\n * @param {Node} tooltipNode\n * @protected\n * @override\n */\n initCustomNode(tooltipNode) {\n tooltipNode.target = this.target;\n\n if (this.ariaTarget !== undefined) {\n tooltipNode.ariaTarget = this.ariaTarget;\n }\n\n if (this.context !== undefined) {\n tooltipNode.context = this.context;\n }\n\n if (this.manual !== undefined) {\n tooltipNode.manual = this.manual;\n }\n\n if (this.opened !== undefined) {\n tooltipNode.opened = this.opened;\n }\n\n if (this.position !== undefined) {\n tooltipNode._position = this.position;\n }\n\n if (this.shouldShow !== undefined) {\n tooltipNode.shouldShow = this.shouldShow;\n }\n\n this.__notifyChange();\n }\n\n /**\n * Override to notify the host when the tooltip is removed.\n *\n * @param {Node} tooltipNode\n * @protected\n * @override\n */\n teardownNode() {\n this.__notifyChange();\n }\n\n /**\n * Set an HTML element for linking with the tooltip overlay\n * via `aria-describedby` attribute used by screen readers.\n * @param {HTMLElement} ariaTarget\n */\n setAriaTarget(ariaTarget) {\n this.ariaTarget = ariaTarget;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.ariaTarget = ariaTarget;\n }\n }\n\n /**\n * Set a context object to be used by generator.\n * @param {object} context\n */\n setContext(context) {\n this.context = context;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.context = context;\n }\n }\n\n /**\n * Toggle manual state on the slotted tooltip.\n * @param {boolean} manual\n */\n setManual(manual) {\n this.manual = manual;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.manual = manual;\n }\n }\n\n /**\n * Toggle opened state on the slotted tooltip.\n * @param {boolean} opened\n */\n setOpened(opened) {\n this.opened = opened;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.opened = opened;\n }\n }\n\n /**\n * Set default position for the slotted tooltip.\n * This can be overridden by setting the position\n * using corresponding property or attribute.\n * @param {string} position\n */\n setPosition(position) {\n this.position = position;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode._position = position;\n }\n }\n\n /**\n * Set function used to detect whether to show\n * the tooltip based on a condition.\n * @param {Function} shouldShow\n */\n setShouldShow(shouldShow) {\n this.shouldShow = shouldShow;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.shouldShow = shouldShow;\n }\n }\n\n /**\n * Set an HTML element to attach the tooltip to.\n * @param {HTMLElement} target\n */\n setTarget(target) {\n this.target = target;\n\n const tooltipNode = this.node;\n if (tooltipNode) {\n tooltipNode.target = target;\n }\n }\n\n /** @private */\n __notifyChange() {\n this.dispatchEvent(new CustomEvent('tooltip-changed', { detail: { node: this.node } }));\n }\n}\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const buttonStyles = css`\n :host {\n display: inline-block;\n position: relative;\n outline: none;\n white-space: nowrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n /* Aligns the button with form fields when placed on the same line.\n Note, to make it work, the form fields should have the same \"::before\" pseudo-element. */\n .vaadin-button-container::before {\n content: '\\\\2003';\n display: inline-block;\n width: 0;\n max-height: 100%;\n }\n\n .vaadin-button-container {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n width: 100%;\n height: 100%;\n min-height: inherit;\n text-shadow: inherit;\n }\n\n [part='prefix'],\n [part='suffix'] {\n flex: none;\n }\n\n [part='label'] {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n @media (forced-colors: active) {\n :host {\n outline: 1px solid;\n outline-offset: -1px;\n }\n\n :host([focused]) {\n outline-width: 2px;\n }\n\n :host([disabled]) {\n outline-color: GrayText;\n }\n }\n`;\n\nexport const buttonTemplate = (html) => html`\n <div class=\"vaadin-button-container\">\n <span part=\"prefix\" aria-hidden=\"true\">\n <slot name=\"prefix\"></slot>\n </span>\n <span part=\"label\">\n <slot></slot>\n </span>\n <span part=\"suffix\" aria-hidden=\"true\">\n <slot name=\"suffix\"></slot>\n </span>\n </div>\n <slot name=\"tooltip\"></slot>\n`;\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/* eslint-disable @typescript-eslint/no-use-before-define */\n\n/**\n * @fileoverview\n *\n * Module for adding listeners to a node for the following normalized\n * cross-platform \"gesture\" events:\n * - `down` - mouse or touch went down\n * - `up` - mouse or touch went up\n * - `tap` - mouse click or finger tap\n * - `track` - mouse drag or touch move\n *\n * @summary Module for adding cross-platform gesture event listeners.\n */\n\nimport { microTask } from './async.js';\n\nconst passiveTouchGestures = false;\nconst wrap = (node) => node;\n\n// Detect native touch action support\nconst HAS_NATIVE_TA = typeof document.head.style.touchAction === 'string';\nconst GESTURE_KEY = '__polymerGestures';\nconst HANDLED_OBJ = '__polymerGesturesHandled';\nconst TOUCH_ACTION = '__polymerGesturesTouchAction';\n// Radius for tap and track\nconst TAP_DISTANCE = 25;\nconst TRACK_DISTANCE = 5;\n// Number of last N track positions to keep\nconst TRACK_LENGTH = 2;\n\nconst MOUSE_EVENTS = ['mousedown', 'mousemove', 'mouseup', 'click'];\n// An array of bitmask values for mapping MouseEvent.which to MouseEvent.buttons\nconst MOUSE_WHICH_TO_BUTTONS = [0, 1, 4, 2];\nconst MOUSE_HAS_BUTTONS = (function () {\n try {\n return new MouseEvent('test', { buttons: 1 }).buttons === 1;\n } catch (e) {\n return false;\n }\n})();\n\n/**\n * @param {string} name Possible mouse event name\n * @return {boolean} true if mouse event, false if not\n */\nfunction isMouseEvent(name) {\n return MOUSE_EVENTS.indexOf(name) > -1;\n}\n\n/* eslint no-empty: [\"error\", { \"allowEmptyCatch\": true }] */\n// check for passive event listeners\nlet supportsPassive = false;\n(function () {\n try {\n const opts = Object.defineProperty({}, 'passive', {\n // eslint-disable-next-line getter-return\n get() {\n supportsPassive = true;\n },\n });\n window.addEventListener('test', null, opts);\n window.removeEventListener('test', null, opts);\n } catch (e) {}\n})();\n\n/**\n * Generate settings for event listeners, dependant on `passiveTouchGestures`\n *\n * @param {string} eventName Event name to determine if `{passive}` option is\n * needed\n * @return {{passive: boolean} | undefined} Options to use for addEventListener\n * and removeEventListener\n */\nfunction PASSIVE_TOUCH(eventName) {\n if (isMouseEvent(eventName) || eventName === 'touchend') {\n return;\n }\n if (HAS_NATIVE_TA && supportsPassive && passiveTouchGestures) {\n return { passive: true };\n }\n}\n\n// Check for touch-only devices\nconst IS_TOUCH_ONLY = navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u);\n\n// Defined at https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#enabling-and-disabling-form-controls:-the-disabled-attribute\n/** @type {!Object<boolean>} */\nconst canBeDisabled = {\n button: true,\n command: true,\n fieldset: true,\n input: true,\n keygen: true,\n optgroup: true,\n option: true,\n select: true,\n textarea: true,\n};\n\n/**\n * @param {MouseEvent} ev event to test for left mouse button down\n * @return {boolean} has left mouse button down\n */\nfunction hasLeftMouseButton(ev) {\n const type = ev.type;\n // Exit early if the event is not a mouse event\n if (!isMouseEvent(type)) {\n return false;\n }\n // Ev.button is not reliable for mousemove (0 is overloaded as both left button and no buttons)\n // instead we use ev.buttons (bitmask of buttons) or fall back to ev.which (deprecated, 0 for no buttons, 1 for left button)\n if (type === 'mousemove') {\n // Allow undefined for testing events\n let buttons = ev.buttons === undefined ? 1 : ev.buttons;\n if (ev instanceof window.MouseEvent && !MOUSE_HAS_BUTTONS) {\n buttons = MOUSE_WHICH_TO_BUTTONS[ev.which] || 0;\n }\n // Buttons is a bitmask, check that the left button bit is set (1)\n return Boolean(buttons & 1);\n }\n // Allow undefined for testing events\n const button = ev.button === undefined ? 0 : ev.button;\n // Ev.button is 0 in mousedown/mouseup/click for left button activation\n return button === 0;\n}\n\nfunction isSyntheticClick(ev) {\n if (ev.type === 'click') {\n // Ev.detail is 0 for HTMLElement.click in most browsers\n if (ev.detail === 0) {\n return true;\n }\n // In the worst case, check that the x/y position of the click is within\n // the bounding box of the target of the event\n // Thanks IE 10 >:(\n const t = _findOriginalTarget(ev);\n // Make sure the target of the event is an element so we can use getBoundingClientRect,\n // if not, just assume it is a synthetic click\n if (!t.nodeType || /** @type {Element} */ (t).nodeType !== Node.ELEMENT_NODE) {\n return true;\n }\n const bcr = /** @type {Element} */ (t).getBoundingClientRect();\n // Use page x/y to account for scrolling\n const x = ev.pageX,\n y = ev.pageY;\n // Ev is a synthetic click if the position is outside the bounding box of the target\n return !(x >= bcr.left && x <= bcr.right && y >= bcr.top && y <= bcr.bottom);\n }\n return false;\n}\n\nconst POINTERSTATE = {\n mouse: {\n target: null,\n mouseIgnoreJob: null,\n },\n touch: {\n x: 0,\n y: 0,\n id: -1,\n scrollDecided: false,\n },\n};\n\nfunction firstTouchAction(ev) {\n let ta = 'auto';\n const path = getComposedPath(ev);\n for (let i = 0, n; i < path.length; i++) {\n n = path[i];\n if (n[TOUCH_ACTION]) {\n ta = n[TOUCH_ACTION];\n break;\n }\n }\n return ta;\n}\n\nfunction trackDocument(stateObj, movefn, upfn) {\n stateObj.movefn = movefn;\n stateObj.upfn = upfn;\n document.addEventListener('mousemove', movefn);\n document.addEventListener('mouseup', upfn);\n}\n\nfunction untrackDocument(stateObj) {\n document.removeEventListener('mousemove', stateObj.movefn);\n document.removeEventListener('mouseup', stateObj.upfn);\n stateObj.movefn = null;\n stateObj.upfn = null;\n}\n\n/**\n * Returns the composedPath for the given event.\n * @param {Event} event to process\n * @return {!Array<!EventTarget>} Path of the event\n */\nconst getComposedPath =\n window.ShadyDOM && window.ShadyDOM.noPatch\n ? window.ShadyDOM.composedPath\n : (event) => (event.composedPath && event.composedPath()) || [];\n\n/** @type {!Object<string, !GestureRecognizer>} */\nexport const gestures = {};\n\n/** @type {!Array<!GestureRecognizer>} */\nexport const recognizers = [];\n\n/**\n * Finds the element rendered on the screen at the provided coordinates.\n *\n * Similar to `document.elementFromPoint`, but pierces through\n * shadow roots.\n *\n * @param {number} x Horizontal pixel coordinate\n * @param {number} y Vertical pixel coordinate\n * @return {Element} Returns the deepest shadowRoot inclusive element\n * found at the screen position given.\n */\nexport function deepTargetFind(x, y) {\n let node = document.elementFromPoint(x, y);\n let next = node;\n // This code path is only taken when native ShadowDOM is used\n // if there is a shadowroot, it may have a node at x/y\n // if there is not a shadowroot, exit the loop\n while (next && next.shadowRoot && !window.ShadyDOM) {\n // If there is a node at x/y in the shadowroot, look deeper\n const oldNext = next;\n next = next.shadowRoot.elementFromPoint(x, y);\n // On Safari, elementFromPoint may return the shadowRoot host\n if (oldNext === next) {\n break;\n }\n if (next) {\n node = next;\n }\n }\n return node;\n}\n\n/**\n * A cheaper check than ev.composedPath()[0];\n *\n * @private\n * @param {Event|Touch} ev Event.\n * @return {EventTarget} Returns the event target.\n */\nfunction _findOriginalTarget(ev) {\n const path = getComposedPath(/** @type {?Event} */ (ev));\n // It shouldn't be, but sometimes path is empty (window on Safari).\n return path.length > 0 ? path[0] : ev.target;\n}\n\n/**\n * @private\n * @param {Event} ev Event.\n * @return {void}\n */\nfunction _handleNative(ev) {\n const type = ev.type;\n const node = ev.currentTarget;\n const gobj = node[GESTURE_KEY];\n if (!gobj) {\n return;\n }\n const gs = gobj[type];\n if (!gs) {\n return;\n }\n if (!ev[HANDLED_OBJ]) {\n ev[HANDLED_OBJ] = {};\n if (type.startsWith('touch')) {\n const t = ev.changedTouches[0];\n if (type === 'touchstart') {\n // Only handle the first finger\n if (ev.touches.length === 1) {\n POINTERSTATE.touch.id = t.identifier;\n }\n }\n if (POINTERSTATE.touch.id !== t.identifier) {\n return;\n }\n if (!HAS_NATIVE_TA) {\n if (type === 'touchstart' || type === 'touchmove') {\n _handleTouchAction(ev);\n }\n }\n }\n }\n const handled = ev[HANDLED_OBJ];\n // Used to ignore synthetic mouse events\n if (handled.skip) {\n return;\n }\n // Reset recognizer state\n for (let i = 0, r; i < recognizers.length; i++) {\n r = recognizers[i];\n if (gs[r.name] && !handled[r.name]) {\n if (r.flow && r.flow.start.indexOf(ev.type) > -1 && r.reset) {\n r.reset();\n }\n }\n }\n // Enforce gesture recognizer order\n for (let i = 0, r; i < recognizers.length; i++) {\n r = recognizers[i];\n if (gs[r.name] && !handled[r.name]) {\n handled[r.name] = true;\n r[type](ev);\n }\n }\n}\n\n/**\n * @private\n * @param {TouchEvent} ev Event.\n * @return {void}\n */\nfunction _handleTouchAction(ev) {\n const t = ev.changedTouches[0];\n const type = ev.type;\n if (type === 'touchstart') {\n POINTERSTATE.touch.x = t.clientX;\n POINTERSTATE.touch.y = t.clientY;\n POINTERSTATE.touch.scrollDecided = false;\n } else if (type === 'touchmove') {\n if (POINTERSTATE.touch.scrollDecided) {\n return;\n }\n POINTERSTATE.touch.scrollDecided = true;\n const ta = firstTouchAction(ev);\n let shouldPrevent = false;\n const dx = Math.abs(POINTERSTATE.touch.x - t.clientX);\n const dy = Math.abs(POINTERSTATE.touch.y - t.clientY);\n if (!ev.cancelable) {\n // Scrolling is happening\n } else if (ta === 'none') {\n shouldPrevent = true;\n } else if (ta === 'pan-x') {\n shouldPrevent = dy > dx;\n } else if (ta === 'pan-y') {\n shouldPrevent = dx > dy;\n }\n if (shouldPrevent) {\n ev.preventDefault();\n } else {\n prevent('track');\n }\n }\n}\n\n/**\n * Adds an event listener to a node for the given gesture type.\n *\n * @param {!EventTarget} node Node to add listener on\n * @param {string} evType Gesture type: `down`, `up`, `track`, or `tap`\n * @param {!function(!Event):void} handler Event listener function to call\n * @return {boolean} Returns true if a gesture event listener was added.\n */\nexport function addListener(node, evType, handler) {\n if (gestures[evType]) {\n _add(node, evType, handler);\n return true;\n }\n return false;\n}\n\n/**\n * Removes an event listener from a node for the given gesture type.\n *\n * @param {!EventTarget} node Node to remove listener from\n * @param {string} evType Gesture type: `down`, `up`, `track`, or `tap`\n * @param {!function(!Event):void} handler Event listener function previously passed to\n * `addListener`.\n * @return {boolean} Returns true if a gesture event listener was removed.\n */\nexport function removeListener(node, evType, handler) {\n if (gestures[evType]) {\n _remove(node, evType, handler);\n return true;\n }\n return false;\n}\n\n/**\n * Automate the event listeners for the native events\n *\n * @private\n * @param {!EventTarget} node Node on which to add the event.\n * @param {string} evType Event type to add.\n * @param {function(!Event)} handler Event handler function.\n * @return {void}\n */\nfunction _add(node, evType, handler) {\n const recognizer = gestures[evType];\n const deps = recognizer.deps;\n const name = recognizer.name;\n let gobj = node[GESTURE_KEY];\n if (!gobj) {\n node[GESTURE_KEY] = gobj = {};\n }\n for (let i = 0, dep, gd; i < deps.length; i++) {\n dep = deps[i];\n // Don't add mouse handlers on iOS because they cause gray selection overlays\n if (IS_TOUCH_ONLY && isMouseEvent(dep) && dep !== 'click') {\n continue;\n }\n gd = gobj[dep];\n if (!gd) {\n gobj[dep] = gd = { _count: 0 };\n }\n if (gd._count === 0) {\n node.addEventListener(dep, _handleNative, PASSIVE_TOUCH(dep));\n }\n gd[name] = (gd[name] || 0) + 1;\n gd._count = (gd._count || 0) + 1;\n }\n node.addEventListener(evType, handler);\n if (recognizer.touchAction) {\n setTouchAction(node, recognizer.touchAction);\n }\n}\n\n/**\n * Automate event listener removal for native events\n *\n * @private\n * @param {!EventTarget} node Node on which to remove the event.\n * @param {string} evType Event type to remove.\n * @param {function(!Event): void} handler Event handler function.\n * @return {void}\n */\nfunction _remove(node, evType, handler) {\n const recognizer = gestures[evType];\n const deps = recognizer.deps;\n const name = recognizer.name;\n const gobj = node[GESTURE_KEY];\n if (gobj) {\n for (let i = 0, dep, gd; i < deps.length; i++) {\n dep = deps[i];\n gd = gobj[dep];\n if (gd && gd[name]) {\n gd[name] = (gd[name] || 1) - 1;\n gd._count = (gd._count || 1) - 1;\n if (gd._count === 0) {\n node.removeEventListener(dep, _handleNative, PASSIVE_TOUCH(dep));\n }\n }\n }\n }\n node.removeEventListener(evType, handler);\n}\n\n/**\n * Registers a new gesture event recognizer for adding new custom\n * gesture event types.\n *\n * @param {!GestureRecognizer} recog Gesture recognizer descriptor\n * @return {void}\n */\nexport function register(recog) {\n recognizers.push(recog);\n recog.emits.forEach((emit) => {\n gestures[emit] = recog;\n });\n}\n\n/**\n * @private\n * @param {string} evName Event name.\n * @return {Object} Returns the gesture for the given event name.\n */\nfunction _findRecognizerByEvent(evName) {\n for (let i = 0, r; i < recognizers.length; i++) {\n r = recognizers[i];\n for (let j = 0, n; j < r.emits.length; j++) {\n n = r.emits[j];\n if (n === evName) {\n return r;\n }\n }\n }\n return null;\n}\n\n/**\n * Sets scrolling direction on node.\n *\n * This value is checked on first move, thus it should be called prior to\n * adding event listeners.\n *\n * @param {!EventTarget} node Node to set touch action setting on\n * @param {string} value Touch action value\n * @return {void}\n */\nexport function setTouchAction(node, value) {\n if (HAS_NATIVE_TA && node instanceof HTMLElement) {\n // NOTE: add touchAction async so that events can be added in\n // custom element constructors. Otherwise we run afoul of custom\n // elements restriction against settings attributes (style) in the\n // constructor.\n microTask.run(() => {\n node.style.touchAction = value;\n });\n }\n node[TOUCH_ACTION] = value;\n}\n\n/**\n * Dispatches an event on the `target` element of `type` with the given\n * `detail`.\n * @private\n * @param {!EventTarget} target The element on which to fire an event.\n * @param {string} type The type of event to fire.\n * @param {!Object=} detail The detail object to populate on the event.\n * @return {void}\n */\nfunction _fire(target, type, detail) {\n const ev = new Event(type, { bubbles: true, cancelable: true, composed: true });\n ev.detail = detail;\n wrap(/** @type {!Node} */ (target)).dispatchEvent(ev);\n // Forward `preventDefault` in a clean way\n if (ev.defaultPrevented) {\n const preventer = detail.preventer || detail.sourceEvent;\n if (preventer && preventer.preventDefault) {\n preventer.preventDefault();\n }\n }\n}\n\n/**\n * Prevents the dispatch and default action of the given event name.\n *\n * @param {string} evName Event name.\n * @return {void}\n */\nexport function prevent(evName) {\n const recognizer = _findRecognizerByEvent(evName);\n if (recognizer.info) {\n recognizer.info.prevent = true;\n }\n}\n\nregister({\n name: 'downup',\n deps: ['mousedown', 'touchstart', 'touchend'],\n flow: {\n start: ['mousedown', 'touchstart'],\n end: ['mouseup', 'touchend'],\n },\n emits: ['down', 'up'],\n\n info: {\n movefn: null,\n upfn: null,\n },\n\n /**\n * @this {GestureRecognizer}\n * @return {void}\n */\n reset() {\n untrackDocument(this.info);\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {MouseEvent} e\n * @return {void}\n */\n mousedown(e) {\n if (!hasLeftMouseButton(e)) {\n return;\n }\n const t = _findOriginalTarget(e);\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const self = this;\n const movefn = (e) => {\n if (!hasLeftMouseButton(e)) {\n downupFire('up', t, e);\n untrackDocument(self.info);\n }\n };\n const upfn = (e) => {\n if (hasLeftMouseButton(e)) {\n downupFire('up', t, e);\n }\n untrackDocument(self.info);\n };\n trackDocument(this.info, movefn, upfn);\n downupFire('down', t, e);\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {TouchEvent} e\n * @return {void}\n */\n touchstart(e) {\n downupFire('down', _findOriginalTarget(e), e.changedTouches[0], e);\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {TouchEvent} e\n * @return {void}\n */\n touchend(e) {\n downupFire('up', _findOriginalTarget(e), e.changedTouches[0], e);\n },\n});\n\n/**\n * @param {string} type\n * @param {EventTarget} target\n * @param {Event|Touch} event\n * @param {Event=} preventer\n * @return {void}\n */\nfunction downupFire(type, target, event, preventer) {\n if (!target) {\n return;\n }\n _fire(target, type, {\n x: event.clientX,\n y: event.clientY,\n sourceEvent: event,\n preventer,\n prevent(e) {\n return prevent(e);\n },\n });\n}\n\nregister({\n name: 'track',\n touchAction: 'none',\n deps: ['mousedown', 'touchstart', 'touchmove', 'touchend'],\n flow: {\n start: ['mousedown', 'touchstart'],\n end: ['mouseup', 'touchend'],\n },\n emits: ['track'],\n\n info: {\n x: 0,\n y: 0,\n state: 'start',\n started: false,\n moves: [],\n /** @this {GestureInfo} */\n addMove(move) {\n if (this.moves.length > TRACK_LENGTH) {\n this.moves.shift();\n }\n this.moves.push(move);\n },\n movefn: null,\n upfn: null,\n prevent: false,\n },\n\n /**\n * @this {GestureRecognizer}\n * @return {void}\n */\n reset() {\n this.info.state = 'start';\n this.info.started = false;\n this.info.moves = [];\n this.info.x = 0;\n this.info.y = 0;\n this.info.prevent = false;\n untrackDocument(this.info);\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {MouseEvent} e\n * @return {void}\n */\n mousedown(e) {\n if (!hasLeftMouseButton(e)) {\n return;\n }\n const t = _findOriginalTarget(e);\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const self = this;\n const movefn = (e) => {\n const x = e.clientX,\n y = e.clientY;\n if (trackHasMovedEnough(self.info, x, y)) {\n // First move is 'start', subsequent moves are 'move', mouseup is 'end'\n self.info.state = self.info.started ? (e.type === 'mouseup' ? 'end' : 'track') : 'start';\n if (self.info.state === 'start') {\n // If and only if tracking, always prevent tap\n prevent('tap');\n }\n self.info.addMove({ x, y });\n if (!hasLeftMouseButton(e)) {\n // Always fire \"end\"\n self.info.state = 'end';\n untrackDocument(self.info);\n }\n if (t) {\n trackFire(self.info, t, e);\n }\n self.info.started = true;\n }\n };\n const upfn = (e) => {\n if (self.info.started) {\n movefn(e);\n }\n\n // Remove the temporary listeners\n untrackDocument(self.info);\n };\n // Add temporary document listeners as mouse retargets\n trackDocument(this.info, movefn, upfn);\n this.info.x = e.clientX;\n this.info.y = e.clientY;\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {TouchEvent} e\n * @return {void}\n */\n touchstart(e) {\n const ct = e.changedTouches[0];\n this.info.x = ct.clientX;\n this.info.y = ct.clientY;\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {TouchEvent} e\n * @return {void}\n */\n touchmove(e) {\n const t = _findOriginalTarget(e);\n const ct = e.changedTouches[0];\n const x = ct.clientX,\n y = ct.clientY;\n if (trackHasMovedEnough(this.info, x, y)) {\n if (this.info.state === 'start') {\n // If and only if tracking, always prevent tap\n prevent('tap');\n }\n this.info.addMove({ x, y });\n trackFire(this.info, t, ct);\n this.info.state = 'track';\n this.info.started = true;\n }\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {TouchEvent} e\n * @return {void}\n */\n touchend(e) {\n const t = _findOriginalTarget(e);\n const ct = e.changedTouches[0];\n // Only trackend if track was started and not aborted\n if (this.info.started) {\n // Reset started state on up\n this.info.state = 'end';\n this.info.addMove({ x: ct.clientX, y: ct.clientY });\n trackFire(this.info, t, ct);\n }\n },\n});\n\n/**\n * @param {!GestureInfo} info\n * @param {number} x\n * @param {number} y\n * @return {boolean}\n */\nfunction trackHasMovedEnough(info, x, y) {\n if (info.prevent) {\n return false;\n }\n if (info.started) {\n return true;\n }\n const dx = Math.abs(info.x - x);\n const dy = Math.abs(info.y - y);\n return dx >= TRACK_DISTANCE || dy >= TRACK_DISTANCE;\n}\n\n/**\n * @param {!GestureInfo} info\n * @param {?EventTarget} target\n * @param {Touch} touch\n * @return {void}\n */\nfunction trackFire(info, target, touch) {\n if (!target) {\n return;\n }\n const secondlast = info.moves[info.moves.length - 2];\n const lastmove = info.moves[info.moves.length - 1];\n const dx = lastmove.x - info.x;\n const dy = lastmove.y - info.y;\n let ddx,\n ddy = 0;\n if (secondlast) {\n ddx = lastmove.x - secondlast.x;\n ddy = lastmove.y - secondlast.y;\n }\n _fire(target, 'track', {\n state: info.state,\n x: touch.clientX,\n y: touch.clientY,\n dx,\n dy,\n ddx,\n ddy,\n sourceEvent: touch,\n hover() {\n return deepTargetFind(touch.clientX, touch.clientY);\n },\n });\n}\n\nregister({\n name: 'tap',\n deps: ['mousedown', 'click', 'touchstart', 'touchend'],\n flow: {\n start: ['mousedown', 'touchstart'],\n end: ['click', 'touchend'],\n },\n emits: ['tap'],\n info: {\n x: NaN,\n y: NaN,\n prevent: false,\n },\n\n /**\n * @this {GestureRecognizer}\n * @return {void}\n */\n reset() {\n this.info.x = NaN;\n this.info.y = NaN;\n this.info.prevent = false;\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {MouseEvent} e\n * @return {void}\n */\n mousedown(e) {\n if (hasLeftMouseButton(e)) {\n this.info.x = e.clientX;\n this.info.y = e.clientY;\n }\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {MouseEvent} e\n * @return {void}\n */\n click(e) {\n if (hasLeftMouseButton(e)) {\n trackForward(this.info, e);\n }\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {TouchEvent} e\n * @return {void}\n */\n touchstart(e) {\n const touch = e.changedTouches[0];\n this.info.x = touch.clientX;\n this.info.y = touch.clientY;\n },\n\n /**\n * @this {GestureRecognizer}\n * @param {TouchEvent} e\n * @return {void}\n */\n touchend(e) {\n trackForward(this.info, e.changedTouches[0], e);\n },\n});\n\n/**\n * @param {!GestureInfo} info\n * @param {Event | Touch} e\n * @param {Event=} preventer\n * @return {void}\n */\nfunction trackForward(info, e, preventer) {\n const dx = Math.abs(e.clientX - info.x);\n const dy = Math.abs(e.clientY - info.y);\n // Find original target from `preventer` for TouchEvents, or `e` for MouseEvents\n const t = _findOriginalTarget(preventer || e);\n if (!t || (canBeDisabled[/** @type {!HTMLElement} */ (t).localName] && t.hasAttribute('disabled'))) {\n return;\n }\n // Dx,dy can be NaN if `click` has been simulated and there was no `down` for `start`\n if (isNaN(dx) || isNaN(dy) || (dx <= TAP_DISTANCE && dy <= TAP_DISTANCE) || isSyntheticClick(e)) {\n // Prevent taps from being generated if an event has canceled them\n if (!info.prevent) {\n _fire(t, 'tap', {\n x: e.clientX,\n y: e.clientY,\n sourceEvent: e,\n preventer,\n });\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';\n\n/**\n * A mixin to provide disabled property for field components.\n *\n * @polymerMixin\n */\nexport const DisabledMixin = dedupingMixin(\n (superclass) =>\n class DisabledMixinClass extends superclass {\n static get properties() {\n return {\n /**\n * If true, the user cannot interact with this element.\n */\n disabled: {\n type: Boolean,\n value: false,\n observer: '_disabledChanged',\n reflectToAttribute: true,\n },\n };\n }\n\n /**\n * @param {boolean} disabled\n * @protected\n */\n _disabledChanged(disabled) {\n this._setAriaDisabled(disabled);\n }\n\n /**\n * @param {boolean} disabled\n * @protected\n */\n _setAriaDisabled(disabled) {\n if (disabled) {\n this.setAttribute('aria-disabled', 'true');\n } else {\n this.removeAttribute('aria-disabled');\n }\n }\n\n /**\n * Overrides the default element `click` method in order to prevent\n * firing the `click` event when the element is disabled.\n * @protected\n * @override\n */\n click() {\n if (!this.disabled) {\n super.click();\n }\n }\n },\n);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';\n\n/**\n * A mixin that manages keyboard handling.\n * The mixin subscribes to the keyboard events while an actual implementation\n * for the event handlers is left to the client (a component or another mixin).\n *\n * @polymerMixin\n */\nexport const KeyboardMixin = dedupingMixin(\n (superclass) =>\n class KeyboardMixinClass extends superclass {\n /** @protected */\n ready() {\n super.ready();\n\n this.addEventListener('keydown', (event) => {\n this._onKeyDown(event);\n });\n\n this.addEventListener('keyup', (event) => {\n this._onKeyUp(event);\n });\n }\n\n /**\n * A handler for the `keydown` event. By default, it calls\n * separate methods for handling \"Enter\" and \"Escape\" keys.\n * Override the method to implement your own behavior.\n *\n * @param {KeyboardEvent} event\n * @protected\n */\n _onKeyDown(event) {\n switch (event.key) {\n case 'Enter':\n this._onEnter(event);\n break;\n case 'Escape':\n this._onEscape(event);\n break;\n default:\n break;\n }\n }\n\n /**\n * A handler for the `keyup` event. By default, it does nothing.\n * Override the method to implement your own behavior.\n *\n * @param {KeyboardEvent} _event\n * @protected\n */\n _onKeyUp(_event) {\n // To be implemented.\n }\n\n /**\n * A handler for the \"Enter\" key. By default, it does nothing.\n * Override the method to implement your own behavior.\n *\n * @param {KeyboardEvent} _event\n * @protected\n */\n _onEnter(_event) {\n // To be implemented.\n }\n\n /**\n * A handler for the \"Escape\" key. By default, it does nothing.\n * Override the method to implement your own behavior.\n *\n * @param {KeyboardEvent} _event\n * @protected\n */\n _onEscape(_event) {\n // To be implemented.\n }\n },\n);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n// We consider the keyboard to be active if the window has received a keydown\n// event since the last mousedown event.\nlet keyboardActive = false;\n\n// Listen for top-level keydown and mousedown events.\n// Use capture phase so we detect events even if they're handled.\nwindow.addEventListener(\n 'keydown',\n () => {\n keyboardActive = true;\n },\n { capture: true },\n);\n\nwindow.addEventListener(\n 'mousedown',\n () => {\n keyboardActive = false;\n },\n { capture: true },\n);\n\n/**\n * Returns the actually focused element by traversing shadow\n * trees recursively to ensure it's the leaf element.\n *\n * @return {Element}\n */\nexport function getDeepActiveElement() {\n let host = document.activeElement || document.body;\n while (host.shadowRoot && host.shadowRoot.activeElement) {\n host = host.shadowRoot.activeElement;\n }\n return host;\n}\n\n/**\n * Returns true if the window has received a keydown\n * event since the last mousedown event.\n *\n * @return {boolean}\n */\nexport function isKeyboardActive() {\n return keyboardActive;\n}\n\n/**\n * Returns true if the element is hidden directly with `display: none` or `visibility: hidden`,\n * false otherwise.\n *\n * The method doesn't traverse the element's ancestors, it only checks for the CSS properties\n * set directly to or inherited by the element.\n *\n * @param {HTMLElement} element\n * @return {boolean}\n */\nfunction isElementHiddenDirectly(element) {\n // Check inline style first to save a re-flow.\n const style = element.style;\n if (style.visibility === 'hidden' || style.display === 'none') {\n return true;\n }\n\n const computedStyle = window.getComputedStyle(element);\n if (computedStyle.visibility === 'hidden' || computedStyle.display === 'none') {\n return true;\n }\n\n return false;\n}\n\n/**\n * Returns if element `a` has lower tab order compared to element `b`\n * (both elements are assumed to be focusable and tabbable).\n * Elements with tabindex = 0 have lower tab order compared to elements\n * with tabindex > 0.\n * If both have same tabindex, it returns false.\n *\n * @param {HTMLElement} a\n * @param {HTMLElement} b\n * @return {boolean}\n */\nfunction hasLowerTabOrder(a, b) {\n // Normalize tabIndexes\n // e.g. in Firefox `<div contenteditable>` has `tabIndex = -1`\n const ati = Math.max(a.tabIndex, 0);\n const bti = Math.max(b.tabIndex, 0);\n return ati === 0 || bti === 0 ? bti > ati : ati > bti;\n}\n\n/**\n * Merge sort iterator, merges the two arrays into one, sorted by tabindex.\n *\n * @param {HTMLElement[]} left\n * @param {HTMLElement[]} right\n * @return {HTMLElement[]}\n */\nfunction mergeSortByTabIndex(left, right) {\n const result = [];\n while (left.length > 0 && right.length > 0) {\n if (hasLowerTabOrder(left[0], right[0])) {\n result.push(right.shift());\n } else {\n result.push(left.shift());\n }\n }\n\n return result.concat(left, right);\n}\n\n/**\n * Sorts an array of elements by tabindex. Returns a new array.\n *\n * @param {HTMLElement[]} elements\n * @return {HTMLElement[]}\n */\nfunction sortElementsByTabIndex(elements) {\n // Implement a merge sort as Array.prototype.sort does a non-stable sort\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort\n const len = elements.length;\n if (len < 2) {\n return elements;\n }\n const pivot = Math.ceil(len / 2);\n const left = sortElementsByTabIndex(elements.slice(0, pivot));\n const right = sortElementsByTabIndex(elements.slice(pivot));\n\n return mergeSortByTabIndex(left, right);\n}\n\n/**\n * Returns true if the element is hidden, false otherwise.\n *\n * An element is treated as hidden when any of the following conditions are met:\n * - the element itself or one of its ancestors has `display: none`.\n * - the element has or inherits `visibility: hidden`.\n *\n * @param {HTMLElement} element\n * @return {boolean}\n */\nexport function isElementHidden(element) {\n // `offsetParent` is `null` when the element itself\n // or one of its ancestors is hidden with `display: none`.\n // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent\n // However `offsetParent` is also null when the element is using fixed\n // positioning, so additionally check if the element takes up layout space.\n if (element.offsetParent === null && element.clientWidth === 0 && element.clientHeight === 0) {\n return true;\n }\n\n return isElementHiddenDirectly(element);\n}\n\n/**\n * Returns true if the element is focusable, otherwise false.\n *\n * The list of focusable elements is taken from http://stackoverflow.com/a/1600194/4228703.\n * However, there isn't a definite list, it's up to the browser.\n * The only standard we have is DOM Level 2 HTML https://www.w3.org/TR/DOM-Level-2-HTML/html.html,\n * according to which the only elements that have a `focus()` method are:\n * - HTMLInputElement\n * - HTMLSelectElement\n * - HTMLTextAreaElement\n * - HTMLAnchorElement\n *\n * This notably omits HTMLButtonElement and HTMLAreaElement.\n * Referring to these tests with tabbables in different browsers\n * http://allyjs.io/data-tables/focusable.html\n *\n * @param {HTMLElement} element\n * @return {boolean}\n */\nexport function isElementFocusable(element) {\n // The element cannot be focused if its `tabindex` attribute is set to `-1`.\n if (element.matches('[tabindex=\"-1\"]')) {\n return false;\n }\n\n // Elements that cannot be focused if they have a `disabled` attribute.\n if (element.matches('input, select, textarea, button, object')) {\n return element.matches(':not([disabled])');\n }\n\n // Elements that can be focused even if they have a `disabled` attribute.\n return element.matches('a[href], area[href], iframe, [tabindex], [contentEditable]');\n}\n\n/**\n * Returns true if the element is focused, false otherwise.\n *\n * @param {HTMLElement} element\n * @return {boolean}\n */\nexport function isElementFocused(element) {\n return element.getRootNode().activeElement === element;\n}\n\n/**\n * Returns the normalized element tabindex. If not focusable, returns -1.\n * It checks for the attribute \"tabindex\" instead of the element property\n * `tabIndex` since browsers assign different values to it.\n * e.g. in Firefox `<div contenteditable>` has `tabIndex = -1`\n *\n * @param {HTMLElement} element\n * @return {number}\n */\nfunction normalizeTabIndex(element) {\n if (!isElementFocusable(element)) {\n return -1;\n }\n\n const tabIndex = element.getAttribute('tabindex') || 0;\n return Number(tabIndex);\n}\n\n/**\n * Searches for nodes that are tabbable and adds them to the `result` array.\n * Returns if the `result` array needs to be sorted by tabindex.\n *\n * @param {Node} node The starting point for the search; added to `result` if tabbable.\n * @param {HTMLElement[]} result\n * @return {boolean}\n * @private\n */\nfunction collectFocusableNodes(node, result) {\n if (node.nodeType !== Node.ELEMENT_NODE || isElementHiddenDirectly(node)) {\n // Don't traverse children if the node is not an HTML element or not visible.\n return false;\n }\n\n const element = /** @type {HTMLElement} */ (node);\n const tabIndex = normalizeTabIndex(element);\n let needsSort = tabIndex > 0;\n if (tabIndex >= 0) {\n result.push(element);\n }\n\n let children = [];\n if (element.localName === 'slot') {\n children = element.assignedNodes({ flatten: true });\n } else {\n // Use shadow root if possible, will check for distributed nodes.\n children = (element.shadowRoot || element).children;\n }\n [...children].forEach((child) => {\n // Ensure method is always invoked to collect focusable children.\n needsSort = collectFocusableNodes(child, result) || needsSort;\n });\n return needsSort;\n}\n\n/**\n * Returns a tab-ordered array of focusable elements for a root element.\n * The resulting array will include the root element if it is focusable.\n *\n * The method traverses nodes in shadow DOM trees too if any.\n *\n * @param {HTMLElement} element\n * @return {HTMLElement[]}\n */\nexport function getFocusableElements(element) {\n const focusableElements = [];\n const needsSortByTabIndex = collectFocusableNodes(element, focusableElements);\n // If there is at least one element with tabindex > 0,\n // we need to sort the final array by tabindex.\n if (needsSortByTabIndex) {\n return sortElementsByTabIndex(focusableElements);\n }\n return focusableElements;\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';\nimport { isKeyboardActive } from './focus-utils.js';\n\n/**\n * A mixin to handle `focused` and `focus-ring` attributes based on focus.\n *\n * @polymerMixin\n */\nexport const FocusMixin = dedupingMixin(\n (superclass) =>\n class FocusMixinClass extends superclass {\n /**\n * @protected\n * @return {boolean}\n */\n get _keyboardActive() {\n return isKeyboardActive();\n }\n\n /** @protected */\n ready() {\n this.addEventListener('focusin', (e) => {\n if (this._shouldSetFocus(e)) {\n this._setFocused(true);\n }\n });\n\n this.addEventListener('focusout', (e) => {\n if (this._shouldRemoveFocus(e)) {\n this._setFocused(false);\n }\n });\n\n // In super.ready() other 'focusin' and 'focusout' listeners might be\n // added, so we call it after our own ones to ensure they execute first.\n // Issue to watch out: when incorrect, <vaadin-combo-box> refocuses the\n // input field on iOS after \"Done\" is pressed.\n super.ready();\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n // In non-Chrome browsers, blur does not fire on the element when it is disconnected.\n // reproducible in `<vaadin-date-picker>` when closing on `Cancel` or `Today` click.\n if (this.hasAttribute('focused')) {\n this._setFocused(false);\n }\n }\n\n /**\n * Override to change how focused and focus-ring attributes are set.\n *\n * @param {boolean} focused\n * @protected\n */\n _setFocused(focused) {\n this.toggleAttribute('focused', focused);\n\n // Focus-ring is true when the element was focused from the keyboard.\n // Focus Ring [A11ycasts]: https://youtu.be/ilj2P5-5CjI\n this.toggleAttribute('focus-ring', focused && this._keyboardActive);\n }\n\n /**\n * Override to define if the field receives focus based on the event.\n *\n * @param {FocusEvent} _event\n * @return {boolean}\n * @protected\n */\n _shouldSetFocus(_event) {\n return true;\n }\n\n /**\n * Override to define if the field loses focus based on the event.\n *\n * @param {FocusEvent} _event\n * @return {boolean}\n * @protected\n */\n _shouldRemoveFocus(_event) {\n return true;\n }\n },\n);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { DisabledMixin } from './disabled-mixin.js';\n\n/**\n * A mixin to toggle the `tabindex` attribute.\n *\n * The attribute is set to -1 whenever the user disables the element\n * and restored with the last known value once the element is enabled.\n *\n * @polymerMixin\n * @mixes DisabledMixin\n */\nexport const TabindexMixin = (superclass) =>\n class TabindexMixinClass extends DisabledMixin(superclass) {\n static get properties() {\n return {\n /**\n * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.\n *\n * @protected\n */\n tabindex: {\n type: Number,\n reflectToAttribute: true,\n observer: '_tabindexChanged',\n },\n\n /**\n * Stores the last known tabindex since the element has been disabled.\n *\n * @protected\n */\n _lastTabIndex: {\n type: Number,\n },\n };\n }\n\n /**\n * When the element gets disabled, the observer saves the last known tabindex\n * and makes the element not focusable by setting tabindex to -1.\n * As soon as the element gets enabled, the observer restores the last known tabindex\n * so that the element can be focusable again.\n *\n * @protected\n * @override\n */\n _disabledChanged(disabled, oldDisabled) {\n super._disabledChanged(disabled, oldDisabled);\n\n if (disabled) {\n if (this.tabindex !== undefined) {\n this._lastTabIndex = this.tabindex;\n }\n this.tabindex = -1;\n } else if (oldDisabled) {\n this.tabindex = this._lastTabIndex;\n }\n }\n\n /**\n * When the user has changed tabindex while the element is disabled,\n * the observer reverts tabindex to -1 and rather saves the new tabindex value to apply it later.\n * The new value will be applied as soon as the element becomes enabled.\n *\n * @protected\n */\n _tabindexChanged(tabindex) {\n if (this.disabled && tabindex !== -1) {\n this._lastTabIndex = tabindex;\n this.tabindex = -1;\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { ActiveMixin } from '@vaadin/a11y-base/src/active-mixin.js';\nimport { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';\nimport { TabindexMixin } from '@vaadin/a11y-base/src/tabindex-mixin.js';\n\n/**\n * A mixin providing common button functionality.\n *\n * @polymerMixin\n * @mixes ActiveMixin\n * @mixes FocusMixin\n * @mixes TabindexMixin\n */\nexport const ButtonMixin = (superClass) =>\n class ButtonMixinClass extends ActiveMixin(TabindexMixin(FocusMixin(superClass))) {\n static get properties() {\n return {\n /**\n * Indicates whether the element can be focused and where it participates in sequential keyboard navigation.\n *\n * @override\n * @protected\n */\n tabindex: {\n type: Number,\n value: 0,\n reflectToAttribute: true,\n },\n };\n }\n\n /**\n * By default, `Space` is the only possible activation key for a focusable HTML element.\n * Nonetheless, the button is an exception as it can be also activated by pressing `Enter`.\n * See the \"Keyboard Support\" section in https://www.w3.org/TR/wai-aria-practices/examples/button/button.html.\n *\n * @protected\n * @override\n */\n get _activeKeys() {\n return ['Enter', ' '];\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n // By default, if the user hasn't provided a custom role,\n // the role attribute is set to \"button\".\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'button');\n }\n }\n\n /**\n * Since the button component is designed on the base of the `[role=button]` attribute,\n * and doesn't have a native <button> inside, in order to be fully accessible from the keyboard,\n * it should manually fire the `click` event once an activation key is pressed,\n * as it follows from the WAI-ARIA specifications:\n * https://www.w3.org/TR/wai-aria-practices-1.1/#button\n *\n * According to the UI Events specifications,\n * the `click` event should be fired exactly on `keydown`:\n * https://www.w3.org/TR/uievents/#event-type-keydown\n *\n * @param {KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {\n return;\n }\n\n if (this._activeKeys.includes(event.key)) {\n event.preventDefault();\n\n // `DisabledMixin` overrides the standard `click()` method\n // so that it doesn't fire the `click` event when the element is disabled.\n this.click();\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { addListener } from '@vaadin/component-base/src/gestures.js';\nimport { DisabledMixin } from './disabled-mixin.js';\nimport { KeyboardMixin } from './keyboard-mixin.js';\n\n/**\n * A mixin to toggle the `active` attribute.\n *\n * The attribute is set whenever the user activates the element by a pointer\n * or presses an activation key on the element from the keyboard.\n *\n * The attribute is removed as soon as the element is deactivated\n * by the pointer or by releasing the activation key.\n *\n * @polymerMixin\n * @mixes DisabledMixin\n * @mixes KeyboardMixin\n */\nexport const ActiveMixin = (superclass) =>\n class ActiveMixinClass extends DisabledMixin(KeyboardMixin(superclass)) {\n /**\n * An array of activation keys.\n *\n * See possible values here:\n * https://developer.mozilla.org/ru/docs/Web/API/KeyboardEvent/key/Key_Values\n *\n * @protected\n * @return {!Array<!string>}\n */\n get _activeKeys() {\n return [' '];\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n addListener(this, 'down', (event) => {\n if (this._shouldSetActive(event)) {\n this._setActive(true);\n }\n });\n\n addListener(this, 'up', () => {\n this._setActive(false);\n });\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n // When the element is disconnecting from the DOM at the moment being active,\n // the `active` attribute needs to be manually removed from the element.\n // Otherwise, it will preserve on the element until the element is activated once again.\n // The case reproduces for `<vaadin-date-picker>` when closing on `Cancel` or `Today` click.\n this._setActive(false);\n }\n\n /**\n * @param {KeyboardEvent | MouseEvent} _event\n * @protected\n */\n _shouldSetActive(_event) {\n return !this.disabled;\n }\n\n /**\n * Sets the `active` attribute on the element if an activation key is pressed.\n *\n * @param {KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n if (this._shouldSetActive(event) && this._activeKeys.includes(event.key)) {\n this._setActive(true);\n\n // Element can become hidden before the `keyup` event, e.g. on button click.\n // Use document listener to ensure `active` attribute is removed correctly.\n document.addEventListener(\n 'keyup',\n (e) => {\n if (this._activeKeys.includes(e.key)) {\n this._setActive(false);\n }\n },\n { once: true },\n );\n }\n }\n\n /**\n * Toggles the `active` attribute on the element.\n *\n * @param {boolean} active\n * @protected\n */\n _setActive(active) {\n this.toggleAttribute('active', active);\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { buttonStyles, buttonTemplate } from './vaadin-button-base.js';\nimport { ButtonMixin } from './vaadin-button-mixin.js';\n\nregisterStyles('vaadin-button', buttonStyles, { moduleId: 'vaadin-button-styles' });\n\n/**\n * `<vaadin-button>` is an accessible and customizable button that allows users to perform actions.\n *\n * ```html\n * <vaadin-button>Press me</vaadin-button>\n * ```\n *\n * ### Styling\n *\n * The following shadow DOM parts are available for styling:\n *\n * Part name | Description\n * ----------|-------------\n * `label` | The label (text) inside the button.\n * `prefix` | A slot for content before the label (e.g. an icon).\n * `suffix` | A slot for content after the label (e.g. an icon).\n *\n * The following attributes are available for styling:\n *\n * Attribute | Description\n * -------------|-------------\n * `active` | Set when the button is pressed down, either with mouse, touch or the keyboard.\n * `disabled` | Set when the button is disabled.\n * `focus-ring` | Set when the button is focused using the keyboard.\n * `focused` | Set when the button is focused.\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ButtonMixin\n * @mixes ControllerMixin\n * @mixes ElementMixin\n * @mixes ThemableMixin\n */\nclass Button extends ButtonMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerElement)))) {\n static get is() {\n return 'vaadin-button';\n }\n\n static get template() {\n return buttonTemplate(html);\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._tooltipController = new TooltipController(this);\n this.addController(this._tooltipController);\n }\n}\n\ndefineCustomElement(Button);\n\nexport { Button };\n","import '@vaadin/vaadin-lumo-styles/color.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nregisterStyles(\n 'vaadin-date-picker-year',\n css`\n :host([current]) [part='year-number'] {\n color: var(--lumo-primary-text-color);\n }\n\n :host(:not([current])) [part='year-number'],\n [part='year-separator'] {\n opacity: var(--_lumo-date-picker-year-opacity, 0.7);\n transition: 0.2s opacity;\n }\n\n [part='year-number'],\n [part='year-separator'] {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 50%;\n transform: translateY(-50%);\n }\n\n [part='year-separator']::after {\n color: var(--lumo-disabled-text-color);\n content: '\\\\2022';\n }\n `,\n { moduleId: 'lumo-date-picker-year' },\n);\n","import '@vaadin/vaadin-lumo-styles/color.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport '@vaadin/vaadin-lumo-styles/spacing.js';\nimport '@vaadin/vaadin-lumo-styles/style.js';\nimport '@vaadin/vaadin-lumo-styles/typography.js';\nimport '@vaadin/button/theme/lumo/vaadin-button.js';\nimport './vaadin-date-picker-year-styles.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nregisterStyles(\n 'vaadin-date-picker-overlay-content',\n css`\n :host {\n position: relative;\n /* Background for the year scroller, placed here as we are using a mask image on the actual years part */\n background-image: linear-gradient(var(--lumo-shade-5pct), var(--lumo-shade-5pct));\n background-size: 57px 100%;\n background-position: top right;\n background-repeat: no-repeat;\n cursor: default;\n }\n\n ::slotted([slot='months']) {\n /* Month calendar height:\n header height + margin-bottom\n + weekdays height + margin-bottom\n + date cell heights\n + small margin between month calendars\n */\n /* prettier-ignore */\n --vaadin-infinite-scroller-item-height:\n calc(\n var(--lumo-font-size-l) + var(--lumo-space-m)\n + var(--lumo-font-size-xs) + var(--lumo-space-s)\n + var(--lumo-size-m) * 6\n + var(--lumo-space-s)\n );\n --vaadin-infinite-scroller-buffer-offset: 10%;\n -webkit-mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent);\n mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent);\n position: relative;\n margin-right: 57px;\n }\n\n ::slotted([slot='years']) {\n /* TODO get rid of fixed magic number */\n --vaadin-infinite-scroller-buffer-width: 97px;\n width: 57px;\n height: auto;\n top: 0;\n bottom: 0;\n font-size: var(--lumo-font-size-s);\n box-shadow: inset 2px 0 4px 0 var(--lumo-shade-5pct);\n -webkit-mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);\n mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);\n cursor: var(--lumo-clickable-cursor);\n }\n\n ::slotted([slot='years']:hover) {\n --_lumo-date-picker-year-opacity: 1;\n }\n\n /* TODO unsupported selector */\n #scrollers {\n position: static;\n display: block;\n }\n\n /* TODO fix this in vaadin-date-picker that it adapts to the width of the year scroller */\n :host([desktop]) ::slotted([slot='months']) {\n right: auto;\n }\n\n /* Year scroller position indicator */\n ::slotted([slot='years'])::before {\n border: none;\n width: 1em;\n height: 1em;\n background-color: var(--lumo-base-color);\n background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));\n transform: translate(-75%, -50%) rotate(45deg);\n border-top-right-radius: var(--lumo-border-radius-s);\n box-shadow: 2px -2px 6px 0 var(--lumo-shade-5pct);\n z-index: 1;\n }\n\n [part='toolbar'] {\n padding: var(--lumo-space-s);\n border-bottom-left-radius: var(--lumo-border-radius-l);\n margin-right: 57px;\n }\n\n [part='toolbar'] ::slotted(vaadin-button) {\n margin: 0;\n }\n\n /* Narrow viewport mode (fullscreen) */\n\n :host([fullscreen]) [part='toolbar'] {\n order: -1;\n background-color: var(--lumo-base-color);\n }\n\n :host([fullscreen]) [part='overlay-header'] {\n order: -2;\n height: var(--lumo-size-m);\n padding: var(--lumo-space-s);\n position: absolute;\n left: 0;\n right: 0;\n justify-content: center;\n }\n\n :host([fullscreen]) [part='toggle-button'],\n :host([fullscreen]) [part='clear-button'],\n [part='overlay-header'] [part='label'] {\n display: none;\n }\n\n /* Very narrow screen (year scroller initially hidden) */\n\n [part='years-toggle-button'] {\n display: flex;\n align-items: center;\n height: var(--lumo-size-s);\n padding: 0 0.5em;\n border-radius: var(--lumo-border-radius-m);\n z-index: 3;\n color: var(--lumo-primary-text-color);\n font-weight: 500;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n :host([years-visible]) [part='years-toggle-button'] {\n background-color: var(--lumo-primary-color);\n color: var(--lumo-primary-contrast-color);\n }\n\n /* TODO magic number (same as used for media-query in vaadin-date-picker-overlay-content) */\n @media screen and (max-width: 374px) {\n :host {\n background-image: none;\n }\n\n [part='toolbar'],\n ::slotted([slot='months']) {\n margin-right: 0;\n }\n\n /* TODO make date-picker adapt to the width of the years part */\n ::slotted([slot='years']) {\n --vaadin-infinite-scroller-buffer-width: 90px;\n width: 50px;\n background-color: var(--lumo-shade-5pct);\n }\n\n :host([years-visible]) ::slotted([slot='months']) {\n padding-left: 50px;\n }\n }\n `,\n { moduleId: 'lumo-date-picker-overlay-content' },\n);\n","import '@vaadin/vaadin-lumo-styles/color.js';\nimport '@vaadin/vaadin-lumo-styles/sizing.js';\nimport '@vaadin/vaadin-lumo-styles/spacing.js';\nimport '@vaadin/vaadin-lumo-styles/style.js';\nimport '@vaadin/vaadin-lumo-styles/typography.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nregisterStyles(\n 'vaadin-month-calendar',\n css`\n :host {\n -moz-user-select: none;\n -webkit-user-select: none;\n -webkit-tap-highlight-color: transparent;\n user-select: none;\n font-size: var(--lumo-font-size-m);\n color: var(--lumo-body-text-color);\n text-align: center;\n padding: 0 var(--lumo-space-xs);\n }\n\n /* Month header */\n\n [part='month-header'] {\n color: var(--lumo-header-text-color);\n font-size: var(--lumo-font-size-l);\n line-height: 1;\n font-weight: 500;\n margin-bottom: var(--lumo-space-m);\n }\n\n /* Week days and numbers */\n\n [part='weekdays'],\n [part='weekday'],\n [part='week-number'] {\n font-size: var(--lumo-font-size-xxs);\n line-height: 1;\n color: var(--lumo-secondary-text-color);\n }\n\n [part='weekdays'] {\n margin-bottom: var(--lumo-space-s);\n }\n\n [part='weekday']:empty,\n [part='week-number'] {\n width: var(--lumo-size-xs);\n }\n\n /* Date and week number cells */\n\n [part~='date'],\n [part='week-number'] {\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: var(--lumo-size-m);\n position: relative;\n }\n\n [part~='date'] {\n transition: color 0.1s;\n }\n\n [part~='date']:not(:empty) {\n cursor: var(--lumo-clickable-cursor);\n }\n\n :host([week-numbers]) [part='weekday']:not(:empty),\n :host([week-numbers]) [part~='date'] {\n width: calc((100% - var(--lumo-size-xs)) / 7);\n }\n\n /* Today date */\n\n [part~='date'][part~='today'] {\n color: var(--lumo-primary-text-color);\n }\n\n /* Focused date */\n\n [part~='date']::before {\n content: '';\n position: absolute;\n z-index: -1;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n min-width: 2em;\n min-height: 2em;\n width: 80%;\n height: 80%;\n max-height: 100%;\n max-width: 100%;\n border-radius: var(--lumo-border-radius-m);\n }\n\n [part~='date'][part~='focused']::before {\n box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);\n }\n\n :host(:not([focused])) [part~='date'][part~='focused']::before {\n animation: vaadin-date-picker-month-calendar-focus-date 1.4s infinite;\n }\n\n @keyframes vaadin-date-picker-month-calendar-focus-date {\n 50% {\n box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px transparent;\n }\n }\n\n [part~='date']:not(:empty):not([part~='disabled']):not([part~='selected']):hover::before {\n background-color: var(--lumo-primary-color-10pct);\n }\n\n [part~='date'][part~='selected'] {\n color: var(--lumo-primary-contrast-color);\n }\n\n [part~='date'][part~='selected']::before {\n background-color: var(--lumo-primary-color);\n }\n\n [part~='date'][part~='disabled'] {\n color: var(--lumo-disabled-text-color);\n }\n\n @media (pointer: coarse) {\n [part~='date']:hover:not([part~='selected'])::before,\n [part~='focused']:not([part~='selected'])::before {\n display: none;\n }\n\n [part~='date']:not(:empty):not([part~='disabled']):active::before {\n display: block;\n }\n\n [part~='date'][part~='selected']::before {\n box-shadow: none;\n }\n }\n\n /* Disabled */\n\n :host([disabled]) * {\n color: var(--lumo-disabled-text-color) !important;\n }\n `,\n { moduleId: 'lumo-month-calendar' },\n);\n\nconst template = document.createElement('template');\n\ntemplate.innerHTML = `\n <style>\n @keyframes vaadin-date-picker-month-calendar-focus-date {\n 50% {\n box-shadow: 0 0 0 2px transparent;\n }\n }\n </style>\n`;\n\ndocument.head.appendChild(template.content);\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport './version.js';\nimport { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { addLumoGlobalStyles } from './global.js';\n\nconst fontIcons = css`\n @font-face {\n font-family: 'lumo-icons';\n src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABEgAAsAAAAAIjQAAQAAAAAAAAAAAAAA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+BknAAAAHicbY7ZboMwEEW5CVBCSLrv+76kfJRjTwHFsdGAG+Xvy5JUfehIHp0rnxmNN/D6ir3/a4YBhvARIMQOIowQY4wEE0yxiz3s4wCHOMIxTnCKM5zjApe4wjVucIs73OMBj3jCM17wije84wMzfHqJ0EVmUkmmJo77oOmrHvfIRZbXsTCZplTZldlgb3TYGVHProwFs11t1A57tcON2rErR3PBqcwF1/6ctI6k0GSU4JHMSS6WghdJQ99sTbfuN7QLJ9vQ37dNrgyktnIxlDYLJNuqitpRbYWKFNuyDT6pog6oOYKHtKakeakqKjHXpPwlGRcsC+OqxLIiJpXqoqqDMreG2l5bv9Ri3TRX+c23DZna9WFFgmXuO6Ps1Jm/w6ErW8N3FbHn/QC444j0AA==)\n format('woff');\n font-weight: normal;\n font-style: normal;\n }\n\n html {\n --lumo-icons-align-center: '\\\\ea01';\n --lumo-icons-align-left: '\\\\ea02';\n --lumo-icons-align-right: '\\\\ea03';\n --lumo-icons-angle-down: '\\\\ea04';\n --lumo-icons-angle-left: '\\\\ea05';\n --lumo-icons-angle-right: '\\\\ea06';\n --lumo-icons-angle-up: '\\\\ea07';\n --lumo-icons-arrow-down: '\\\\ea08';\n --lumo-icons-arrow-left: '\\\\ea09';\n --lumo-icons-arrow-right: '\\\\ea0a';\n --lumo-icons-arrow-up: '\\\\ea0b';\n --lumo-icons-bar-chart: '\\\\ea0c';\n --lumo-icons-bell: '\\\\ea0d';\n --lumo-icons-calendar: '\\\\ea0e';\n --lumo-icons-checkmark: '\\\\ea0f';\n --lumo-icons-chevron-down: '\\\\ea10';\n --lumo-icons-chevron-left: '\\\\ea11';\n --lumo-icons-chevron-right: '\\\\ea12';\n --lumo-icons-chevron-up: '\\\\ea13';\n --lumo-icons-clock: '\\\\ea14';\n --lumo-icons-cog: '\\\\ea15';\n --lumo-icons-cross: '\\\\ea16';\n --lumo-icons-download: '\\\\ea17';\n --lumo-icons-dropdown: '\\\\ea18';\n --lumo-icons-edit: '\\\\ea19';\n --lumo-icons-error: '\\\\ea1a';\n --lumo-icons-eye: '\\\\ea1b';\n --lumo-icons-eye-disabled: '\\\\ea1c';\n --lumo-icons-menu: '\\\\ea1d';\n --lumo-icons-minus: '\\\\ea1e';\n --lumo-icons-ordered-list: '\\\\ea1f';\n --lumo-icons-phone: '\\\\ea20';\n --lumo-icons-photo: '\\\\ea21';\n --lumo-icons-play: '\\\\ea22';\n --lumo-icons-plus: '\\\\ea23';\n --lumo-icons-redo: '\\\\ea24';\n --lumo-icons-reload: '\\\\ea25';\n --lumo-icons-search: '\\\\ea26';\n --lumo-icons-undo: '\\\\ea27';\n --lumo-icons-unordered-list: '\\\\ea28';\n --lumo-icons-upload: '\\\\ea29';\n --lumo-icons-user: '\\\\ea2a';\n }\n`;\n\naddLumoGlobalStyles('font-icons', fontIcons);\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '../color.js';\nimport '../font-icons.js';\nimport '../sizing.js';\nimport '../style.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst fieldButton = css`\n [part$='button'] {\n flex: none;\n width: 1em;\n height: 1em;\n line-height: 1;\n font-size: var(--lumo-icon-size-m);\n text-align: center;\n color: var(--lumo-contrast-60pct);\n transition: 0.2s color;\n cursor: var(--lumo-clickable-cursor);\n }\n\n [part$='button']:hover {\n color: var(--lumo-contrast-90pct);\n }\n\n :host([disabled]) [part$='button'],\n :host([readonly]) [part$='button'] {\n color: var(--lumo-contrast-20pct);\n cursor: default;\n }\n\n [part$='button']::before {\n font-family: 'lumo-icons';\n display: block;\n }\n`;\nregisterStyles('', fieldButton, { moduleId: 'lumo-field-button' });\n\nexport { fieldButton };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '../color.js';\nimport '../sizing.js';\nimport '../style.js';\nimport '../typography.js';\nimport { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nexport const helper = css`\n :host([has-helper]) [part='helper-text']::before {\n content: '';\n display: block;\n height: 0.4em;\n }\n\n [part='helper-text'] {\n display: block;\n color: var(--lumo-secondary-text-color);\n font-size: var(--lumo-font-size-xs);\n line-height: var(--lumo-line-height-xs);\n margin-left: calc(var(--lumo-border-radius-m) / 4);\n transition: color 0.2s;\n }\n\n :host(:hover:not([readonly])) [part='helper-text'] {\n color: var(--lumo-body-text-color);\n }\n\n :host([disabled]) [part='helper-text'] {\n color: var(--lumo-disabled-text-color);\n -webkit-text-fill-color: var(--lumo-disabled-text-color);\n }\n\n :host([has-helper][theme~='helper-above-field']) [part='helper-text']::before {\n display: none;\n }\n\n :host([has-helper][theme~='helper-above-field']) [part='helper-text']::after {\n content: '';\n display: block;\n height: 0.4em;\n }\n\n :host([has-helper][theme~='helper-above-field']) [part='label'] {\n order: 0;\n padding-bottom: 0.4em;\n }\n\n :host([has-helper][theme~='helper-above-field']) [part='helper-text'] {\n order: 1;\n }\n\n :host([has-helper][theme~='helper-above-field']) [part='label'] + * {\n order: 2;\n }\n\n :host([has-helper][theme~='helper-above-field']) [part='error-message'] {\n order: 3;\n }\n`;\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '../color.js';\nimport '../spacing.js';\nimport '../style.js';\nimport '../typography.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst requiredField = css`\n [part='label'] {\n align-self: flex-start;\n color: var(--lumo-secondary-text-color);\n font-weight: 500;\n font-size: var(--lumo-font-size-s);\n margin-left: calc(var(--lumo-border-radius-m) / 4);\n transition: color 0.2s;\n line-height: 1;\n padding-right: 1em;\n padding-bottom: 0.5em;\n /* As a workaround for diacritics being cut off, add a top padding and a \n negative margin to compensate */\n padding-top: 0.25em;\n margin-top: -0.25em;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n position: relative;\n max-width: 100%;\n box-sizing: border-box;\n }\n\n :host([has-label])::before {\n margin-top: calc(var(--lumo-font-size-s) * 1.5);\n }\n\n :host([has-label][theme~='small'])::before {\n margin-top: calc(var(--lumo-font-size-xs) * 1.5);\n }\n\n :host([has-label]) {\n padding-top: var(--lumo-space-m);\n }\n\n :host([has-label]) ::slotted([slot='tooltip']) {\n --vaadin-tooltip-offset-bottom: calc((var(--lumo-space-m) - var(--lumo-space-xs)) * -1);\n }\n\n :host([required]) [part='required-indicator']::after {\n content: var(--lumo-required-field-indicator, '\\\\2022');\n transition: opacity 0.2s;\n color: var(--lumo-required-field-indicator-color, var(--lumo-primary-text-color));\n position: absolute;\n right: 0;\n width: 1em;\n text-align: center;\n }\n\n :host([invalid]) [part='required-indicator']::after {\n color: var(--lumo-required-field-indicator-color, var(--lumo-error-text-color));\n }\n\n [part='error-message'] {\n margin-left: calc(var(--lumo-border-radius-m) / 4);\n font-size: var(--lumo-font-size-xs);\n line-height: var(--lumo-line-height-xs);\n color: var(--lumo-error-text-color);\n will-change: max-height;\n transition: 0.4s max-height;\n max-height: 5em;\n }\n\n :host([has-error-message]) [part='error-message']::before,\n :host([has-error-message]) [part='error-message']::after {\n content: '';\n display: block;\n height: 0.4em;\n }\n\n :host(:not([invalid])) [part='error-message'] {\n max-height: 0;\n overflow: hidden;\n }\n\n /* RTL specific styles */\n\n :host([dir='rtl']) [part='label'] {\n margin-left: 0;\n margin-right: calc(var(--lumo-border-radius-m) / 4);\n }\n\n :host([dir='rtl']) [part='label'] {\n padding-left: 1em;\n padding-right: 0;\n }\n\n :host([dir='rtl']) [part='required-indicator']::after {\n right: auto;\n left: 0;\n }\n\n :host([dir='rtl']) [part='error-message'] {\n margin-left: 0;\n margin-right: calc(var(--lumo-border-radius-m) / 4);\n }\n`;\n\nregisterStyles('', requiredField, { moduleId: 'lumo-required-field' });\n\nexport { requiredField };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '../color.js';\nimport '../font-icons.js';\nimport '../sizing.js';\nimport '../spacing.js';\nimport '../style.js';\nimport '../typography.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { fieldButton } from './field-button.js';\nimport { helper } from './helper.js';\nimport { requiredField } from './required-field.js';\n\nconst inputField = css`\n :host {\n --lumo-text-field-size: var(--lumo-size-m);\n color: var(--lumo-body-text-color);\n font-size: var(--lumo-font-size-m);\n font-family: var(--lumo-font-family);\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-tap-highlight-color: transparent;\n padding: var(--lumo-space-xs) 0;\n }\n\n :host::before {\n height: var(--lumo-text-field-size);\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n }\n\n :host([focused]:not([readonly])) [part='label'] {\n color: var(--lumo-primary-text-color);\n }\n\n :host([focused]) [part='input-field'] ::slotted(:is(input, textarea)) {\n -webkit-mask-image: none;\n mask-image: none;\n }\n\n ::slotted(:is(input, textarea):placeholder-shown) {\n color: var(--lumo-secondary-text-color);\n }\n\n /* Hover */\n :host(:hover:not([readonly]):not([focused])) [part='label'] {\n color: var(--lumo-body-text-color);\n }\n\n :host(:hover:not([readonly]):not([focused])) [part='input-field']::after {\n opacity: 0.1;\n }\n\n /* Touch device adjustment */\n @media (pointer: coarse) {\n :host(:hover:not([readonly]):not([focused])) [part='label'] {\n color: var(--lumo-secondary-text-color);\n }\n\n :host(:hover:not([readonly]):not([focused])) [part='input-field']::after {\n opacity: 0;\n }\n\n :host(:active:not([readonly]):not([focused])) [part='input-field']::after {\n opacity: 0.2;\n }\n }\n\n /* Trigger when not focusing using the keyboard */\n :host([focused]:not([focus-ring]):not([readonly])) [part='input-field']::after {\n transform: scaleX(0);\n transition-duration: 0.15s, 1s;\n }\n\n /* Focus-ring */\n :host([focus-ring]) [part='input-field'] {\n box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);\n }\n\n /* Read-only and disabled */\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 0;\n }\n\n /* Read-only style */\n :host([readonly]) {\n --vaadin-input-field-border-color: transparent;\n }\n\n /* Disabled style */\n :host([disabled]) {\n pointer-events: none;\n --vaadin-input-field-border-color: var(--lumo-contrast-20pct);\n }\n\n :host([disabled]) [part='label'],\n :host([disabled]) [part='input-field'] ::slotted(*) {\n color: var(--lumo-disabled-text-color);\n -webkit-text-fill-color: var(--lumo-disabled-text-color);\n }\n\n /* Invalid style */\n :host([invalid]) {\n --vaadin-input-field-border-color: var(--lumo-error-color);\n }\n\n :host([invalid][focus-ring]) [part='input-field'] {\n box-shadow: 0 0 0 2px var(--lumo-error-color-50pct);\n }\n\n :host([input-prevented]) [part='input-field'] {\n animation: shake 0.15s infinite;\n }\n\n @keyframes shake {\n 25% {\n transform: translateX(4px);\n }\n 75% {\n transform: translateX(-4px);\n }\n }\n\n /* Small theme */\n :host([theme~='small']) {\n font-size: var(--lumo-font-size-s);\n --lumo-text-field-size: var(--lumo-size-s);\n }\n\n :host([theme~='small']) [part='label'] {\n font-size: var(--lumo-font-size-xs);\n }\n\n :host([theme~='small']) [part='error-message'] {\n font-size: var(--lumo-font-size-xxs);\n }\n\n /* Slotted content */\n [part='input-field'] ::slotted(:not(vaadin-icon):not(input):not(textarea)) {\n color: var(--lumo-secondary-text-color);\n font-weight: 400;\n }\n\n [part='clear-button']::before {\n content: var(--lumo-icons-cross);\n }\n`;\n\nconst inputFieldShared = [requiredField, fieldButton, helper, inputField];\n\nregisterStyles('', inputFieldShared, {\n moduleId: 'lumo-input-field-shared-styles',\n});\n\nexport { inputField, inputFieldShared };\n","import '@vaadin/vaadin-lumo-styles/font-icons.js';\nimport { inputFieldShared } from '@vaadin/vaadin-lumo-styles/mixins/input-field-shared.js';\nimport { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\nconst datePicker = css`\n :host {\n outline: none;\n }\n\n [part='toggle-button']::before {\n content: var(--lumo-icons-calendar);\n }\n\n [part='clear-button']::before {\n content: var(--lumo-icons-cross);\n }\n\n @media (max-width: 420px), (max-height: 420px) {\n [part='overlay-content'] {\n height: 70vh;\n }\n }\n\n :host([dir='rtl']) [part='input-field'] ::slotted(input) {\n --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);\n }\n\n :host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {\n --_lumo-text-field-overflow-mask-image: none;\n }\n`;\n\nregisterStyles('vaadin-date-picker', [inputFieldShared, datePicker], { moduleId: 'lumo-date-picker' });\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/**\n * Module for scheduling flushable pre-render and post-render tasks.\n *\n * @summary Module for scheduling flushable pre-render and post-render tasks.\n */\n\nimport './boot.js';\n\nlet scheduled = false;\nlet beforeRenderQueue = [];\nlet afterRenderQueue = [];\n\nfunction schedule() {\n scheduled = true;\n // before next render\n requestAnimationFrame(function() {\n scheduled = false;\n flushQueue(beforeRenderQueue);\n // after the render\n setTimeout(function() {\n runQueue(afterRenderQueue);\n });\n });\n}\n\nfunction flushQueue(queue) {\n while (queue.length) {\n callMethod(queue.shift());\n }\n}\n\nfunction runQueue(queue) {\n for (let i=0, l=queue.length; i < l; i++) {\n callMethod(queue.shift());\n }\n}\n\nfunction callMethod(info) {\n const context = info[0];\n const callback = info[1];\n const args = info[2];\n try {\n callback.apply(context, args);\n } catch(e) {\n setTimeout(() => {\n throw e;\n });\n }\n}\n\n/**\n * Flushes all `beforeNextRender` tasks, followed by all `afterNextRender`\n * tasks.\n *\n * @return {void}\n */\nexport function flush() {\n while (beforeRenderQueue.length || afterRenderQueue.length) {\n flushQueue(beforeRenderQueue);\n flushQueue(afterRenderQueue);\n }\n scheduled = false;\n}\n\n\n/**\n * Enqueues a callback which will be run before the next render, at\n * `requestAnimationFrame` timing.\n *\n * This method is useful for enqueuing work that requires DOM measurement,\n * since measurement may not be reliable in custom element callbacks before\n * the first render, as well as for batching measurement tasks in general.\n *\n * Tasks in this queue may be flushed by calling `flush()`.\n *\n * @param {*} context Context object the callback function will be bound to\n * @param {function(...*):void} callback Callback function\n * @param {!Array=} args An array of arguments to call the callback function with\n * @return {void}\n */\nexport function beforeNextRender(context, callback, args) {\n if (!scheduled) {\n schedule();\n }\n beforeRenderQueue.push([context, callback, args]);\n}\n\n/**\n * Enqueues a callback which will be run after the next render, equivalent\n * to one task (`setTimeout`) after the next `requestAnimationFrame`.\n *\n * This method is useful for tuning the first-render performance of an\n * element or application by deferring non-critical work until after the\n * first paint. Typical non-render-critical work may include adding UI\n * event listeners and aria attributes.\n *\n * @param {*} context Context object the callback function will be bound to\n * @param {function(...*):void} callback Callback function\n * @param {!Array=} args An array of arguments to call the callback function with\n * @return {void}\n */\nexport function afterNextRender(context, callback, args) {\n if (!scheduled) {\n schedule();\n }\n afterRenderQueue.push([context, callback, args]);\n}\n\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\nconst testUserAgent = (regexp) => regexp.test(navigator.userAgent);\n\nconst testPlatform = (regexp) => regexp.test(navigator.platform);\n\nconst testVendor = (regexp) => regexp.test(navigator.vendor);\n\nexport const isAndroid = testUserAgent(/Android/u);\n\nexport const isChrome = testUserAgent(/Chrome/u) && testVendor(/Google Inc/u);\n\nexport const isFirefox = testUserAgent(/Firefox/u);\n\n// IPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.\nexport const isIPad = testPlatform(/^iPad/u) || (testPlatform(/^Mac/u) && navigator.maxTouchPoints > 1);\n\nexport const isIPhone = testPlatform(/^iPhone/u);\n\nexport const isIOS = isIPhone || isIPad;\n\nexport const isSafari = testUserAgent(/^((?!chrome|android).)*safari/iu);\n\nexport const isTouch = (() => {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (e) {\n return false;\n }\n})();\n","/**\n * @license\n * Copyright (c) 2017 Anton Korzunov\n * SPDX-License-Identifier: MIT\n */\n\n/**\n * @fileoverview\n *\n * This module includes JS code copied from the `aria-hidden` package:\n * https://github.com/theKashey/aria-hidden/blob/master/src/index.ts\n */\n\n/** @type {WeakMap<Element, number>} */\nlet counterMap = new WeakMap();\n\n/** @type {WeakMap<Element, boolean>} */\nlet uncontrolledNodes = new WeakMap();\n\n/** @type {Record<string, WeakMap<Element, number>>} */\nlet markerMap = {};\n\n/** @type {number} */\nlet lockCount = 0;\n\n/**\n * @param {?Node} node\n * @return {boolean}\n */\nconst isElement = (node) => node && node.nodeType === Node.ELEMENT_NODE;\n\n/**\n * @param {...unknown} args\n */\nconst logError = (...args) => {\n console.error(`Error: ${args.join(' ')}. Skip setting aria-hidden.`);\n};\n\n/**\n * @param {HTMLElement} parent\n * @param {Element[]} targets\n * @return {Element[]}\n */\nconst correctTargets = (parent, targets) => {\n if (!isElement(parent)) {\n logError(parent, 'is not a valid element');\n return [];\n }\n\n return targets\n .map((target) => {\n if (!isElement(target)) {\n logError(target, 'is not a valid element');\n return null;\n }\n\n let node = target;\n while (node && node !== parent) {\n if (parent.contains(node)) {\n return target;\n }\n node = node.getRootNode().host;\n }\n\n logError(target, 'is not contained inside', parent);\n return null;\n })\n .filter((x) => Boolean(x));\n};\n\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param {HTMLElement} [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Function}\n */\nconst applyAttributeToOthers = (originalTarget, parentNode, markerName, controlAttribute) => {\n const targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n\n const markerCounter = markerMap[markerName];\n\n /** @type {Element[]} */\n const hiddenNodes = [];\n\n /** @type {Set<Node>} */\n const elementsToKeep = new Set();\n\n /** @type {Set<Node>} */\n const elementsToStop = new Set(targets);\n\n /**\n * @param {?Node} el\n */\n const keep = (el) => {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n\n elementsToKeep.add(el);\n\n const slot = el.assignedSlot;\n if (slot) {\n keep(slot);\n }\n\n keep(el.parentNode || el.host);\n };\n\n targets.forEach(keep);\n\n /**\n * @param {?Node} el\n */\n const deep = (parent) => {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n\n const root = parent.shadowRoot;\n const children = root ? [...parent.children, ...root.children] : [...parent.children];\n children.forEach((node) => {\n // Skip elements that don't need to be hidden\n if (['template', 'script', 'style'].includes(node.localName)) {\n return;\n }\n\n if (elementsToKeep.has(node)) {\n deep(node);\n } else {\n const attr = node.getAttribute(controlAttribute);\n const alreadyHidden = attr !== null && attr !== 'false';\n const counterValue = (counterMap.get(node) || 0) + 1;\n const markerValue = (markerCounter.get(node) || 0) + 1;\n\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n });\n };\n\n deep(parentNode);\n\n elementsToKeep.clear();\n\n lockCount += 1;\n\n return () => {\n hiddenNodes.forEach((node) => {\n const counterValue = counterMap.get(node) - 1;\n const markerValue = markerCounter.get(node) - 1;\n\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n\n if (!counterValue) {\n if (uncontrolledNodes.has(node)) {\n uncontrolledNodes.delete(node);\n } else {\n node.removeAttribute(controlAttribute);\n }\n }\n\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n\n lockCount -= 1;\n\n if (!lockCount) {\n // clear\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};\n\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param {HTMLElement} [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Function} undo command\n */\nexport const hideOthers = (originalTarget, parentNode = document.body, markerName = 'data-aria-hidden') => {\n const targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n\n if (parentNode) {\n // We should not hide ariaLive elements - https://github.com/theKashey/aria-hidden/issues/10\n targets.push(...Array.from(parentNode.querySelectorAll('[aria-live]')));\n }\n\n return applyAttributeToOthers(targets, parentNode, markerName, 'aria-hidden');\n};\n\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param {HTMLElement} [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Function} undo command\n */\nexport const inertOthers = (originalTarget, parentNode = document.body, markerName = 'data-inert-ed') => {\n return applyAttributeToOthers(originalTarget, parentNode, markerName, 'inert');\n};\n\n/**\n * @return if current browser supports inert\n */\nexport const supportsInert = 'inert' in HTMLElement.prototype;\n\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param {HTMLElement} [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Function} undo command\n */\nexport const suppressOthers = (originalTarget, parentNode, markerName) =>\n (supportsInert ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { hideOthers } from './aria-hidden.js';\n\n/**\n * A controller for handling modal state on the elements with `dialog` and `alertdialog` role.\n * See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-modal\n *\n * Note, the actual `role` and `aria-modal` attributes are supposed to be handled by the\n * consumer web component. This is done in to ensure the controller only does one thing.\n */\nexport class AriaModalController {\n /**\n * @param {HTMLElement} host\n */\n constructor(host, callback) {\n /**\n * The controller host element.\n *\n * @type {HTMLElement}\n */\n this.host = host;\n\n /**\n * The callback used to detect which element\n * to use as a target. Defaults to the host.\n *\n * @type {Function}\n */\n this.callback = typeof callback === 'function' ? callback : () => host;\n }\n\n /**\n * Make the controller host modal by hiding other elements from screen readers\n * using `aria-hidden` attribute (can be replaced with `inert` in the future).\n *\n * The method name is chosen to align with the one provided by native `<dialog>`:\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal\n */\n showModal() {\n const targets = this.callback();\n this.__showOthers = hideOthers(targets);\n }\n\n /**\n * Remove `aria-hidden` from other elements unless there are any other\n * controller hosts on the page activated by using `showModal()` call.\n */\n close() {\n if (this.__showOthers) {\n this.__showOthers();\n this.__showOthers = null;\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { getDeepActiveElement } from './focus-utils.js';\n\n/**\n * A controller for saving a focused node and restoring focus to it later.\n */\nexport class FocusRestorationController {\n /**\n * Saves the given node as a target for restoring focus to\n * when `restoreFocus()` is called. If no node is provided,\n * the currently focused node in the DOM is saved as a target.\n *\n * @param {Node | null | undefined} focusNode\n */\n saveFocus(focusNode) {\n this.focusNode = focusNode || getDeepActiveElement();\n }\n\n /**\n * Restores focus to the target node that was saved previously with `saveFocus()`.\n */\n restoreFocus() {\n const focusNode = this.focusNode;\n if (!focusNode) {\n return;\n }\n\n if (getDeepActiveElement() === document.body) {\n // In Firefox and Safari, focusing the node synchronously\n // doesn't work as expected when the overlay is closing on outside click.\n // These browsers force focus to move to the body element and retain it\n // there until the next event loop iteration.\n setTimeout(() => focusNode.focus());\n } else {\n focusNode.focus();\n }\n\n this.focusNode = null;\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { getFocusableElements, isElementFocused } from './focus-utils.js';\n\nconst instances = [];\n\n/**\n * A controller for trapping focus within a DOM node.\n */\nexport class FocusTrapController {\n /**\n * @param {HTMLElement} host\n */\n constructor(host) {\n /**\n * The controller host element.\n *\n * @type {HTMLElement}\n */\n this.host = host;\n\n /**\n * A node for trapping focus in.\n *\n * @type {HTMLElement | null}\n * @private\n */\n this.__trapNode = null;\n\n this.__onKeyDown = this.__onKeyDown.bind(this);\n }\n\n /**\n * An array of tab-ordered focusable elements inside the trap node.\n *\n * @return {HTMLElement[]}\n * @private\n */\n get __focusableElements() {\n return getFocusableElements(this.__trapNode);\n }\n\n /**\n * The index of the element inside the trap node that currently has focus.\n *\n * @return {HTMLElement | undefined}\n * @private\n */\n get __focusedElementIndex() {\n const focusableElements = this.__focusableElements;\n return focusableElements.indexOf(focusableElements.filter(isElementFocused).pop());\n }\n\n hostConnected() {\n document.addEventListener('keydown', this.__onKeyDown);\n }\n\n hostDisconnected() {\n document.removeEventListener('keydown', this.__onKeyDown);\n }\n\n /**\n * Activates a focus trap for a DOM node that will prevent focus from escaping the node.\n * The trap can be deactivated with the `.releaseFocus()` method.\n *\n * If focus is initially outside the trap, the method will move focus inside,\n * on the first focusable element of the trap in the tab order.\n * The first focusable element can be the trap node itself if it is focusable\n * and comes first in the tab order.\n *\n * If there are no focusable elements, the method will throw an exception\n * and the trap will not be set.\n *\n * @param {HTMLElement} trapNode\n */\n trapFocus(trapNode) {\n this.__trapNode = trapNode;\n\n if (this.__focusableElements.length === 0) {\n this.__trapNode = null;\n throw new Error('The trap node should have at least one focusable descendant or be focusable itself.');\n }\n\n instances.push(this);\n\n if (this.__focusedElementIndex === -1) {\n this.__focusableElements[0].focus();\n }\n }\n\n /**\n * Deactivates the focus trap set with the `.trapFocus()` method\n * so that it becomes possible to tab outside the trap node.\n */\n releaseFocus() {\n this.__trapNode = null;\n\n instances.pop();\n }\n\n /**\n * A `keydown` event handler that manages tabbing navigation when the trap is enabled.\n *\n * - Moves focus to the next focusable element of the trap on `Tab` press.\n * When no next element to focus, the method moves focus to the first focusable element.\n * - Moves focus to the prev focusable element of the trap on `Shift+Tab` press.\n * When no prev element to focus, the method moves focus to the last focusable element.\n *\n * @param {KeyboardEvent} event\n * @private\n */\n __onKeyDown(event) {\n if (!this.__trapNode) {\n return;\n }\n\n // Only handle events for the last instance\n if (this !== Array.from(instances).pop()) {\n return;\n }\n\n if (event.key === 'Tab') {\n event.preventDefault();\n\n const backward = event.shiftKey;\n this.__focusNextElement(backward);\n }\n }\n\n /**\n * - Moves focus to the next focusable element if `backward === false`.\n * When no next element to focus, the method moves focus to the first focusable element.\n * - Moves focus to the prev focusable element if `backward === true`.\n * When no prev element to focus the method moves focus to the last focusable element.\n *\n * If no focusable elements, the method returns immediately.\n *\n * @param {boolean} backward\n * @private\n */\n __focusNextElement(backward = false) {\n const focusableElements = this.__focusableElements;\n const step = backward ? -1 : 1;\n const currentIndex = this.__focusedElementIndex;\n const nextIndex = (focusableElements.length + currentIndex + step) % focusableElements.length;\n const element = focusableElements[nextIndex];\n element.focus();\n if (element.localName === 'input') {\n element.select();\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { AriaModalController } from '@vaadin/a11y-base/src/aria-modal-controller.js';\nimport { FocusRestorationController } from '@vaadin/a11y-base/src/focus-restoration-controller.js';\nimport { FocusTrapController } from '@vaadin/a11y-base/src/focus-trap-controller.js';\nimport { getDeepActiveElement } from '@vaadin/a11y-base/src/focus-utils.js';\nimport { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';\n\n/**\n * @polymerMixin\n * @mixes ControllerMixin\n */\nexport const OverlayFocusMixin = (superClass) =>\n class OverlayFocusMixin extends ControllerMixin(superClass) {\n static get properties() {\n return {\n /**\n * When true, opening the overlay moves focus to the first focusable child,\n * or to the overlay part with tabindex if there are no focusable children.\n * @attr {boolean} focus-trap\n */\n focusTrap: {\n type: Boolean,\n value: false,\n },\n\n /**\n * Set to true to enable restoring of focus when overlay is closed.\n * @attr {boolean} restore-focus-on-close\n */\n restoreFocusOnClose: {\n type: Boolean,\n value: false,\n },\n\n /**\n * Set to specify the element which should be focused on overlay close,\n * if `restoreFocusOnClose` is set to true.\n * @type {HTMLElement}\n */\n restoreFocusNode: {\n type: HTMLElement,\n },\n };\n }\n\n constructor() {\n super();\n\n this.__ariaModalController = new AriaModalController(this);\n this.__focusTrapController = new FocusTrapController(this);\n this.__focusRestorationController = new FocusRestorationController();\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addController(this.__ariaModalController);\n this.addController(this.__focusTrapController);\n this.addController(this.__focusRestorationController);\n }\n\n /**\n * Release focus and restore focus after the overlay is closed.\n *\n * @protected\n */\n _resetFocus() {\n if (this.focusTrap) {\n this.__ariaModalController.close();\n this.__focusTrapController.releaseFocus();\n }\n\n if (this.restoreFocusOnClose && this._shouldRestoreFocus()) {\n this.__focusRestorationController.restoreFocus();\n }\n }\n\n /**\n * Save the previously focused node when the overlay starts to open.\n *\n * @protected\n */\n _saveFocus() {\n if (this.restoreFocusOnClose) {\n this.__focusRestorationController.saveFocus(this.restoreFocusNode);\n }\n }\n\n /**\n * Trap focus within the overlay after opening has completed.\n *\n * @protected\n */\n _trapFocus() {\n if (this.focusTrap) {\n this.__ariaModalController.showModal();\n this.__focusTrapController.trapFocus(this.$.overlay);\n }\n }\n\n /**\n * Returns true if focus is still inside the overlay or on the body element,\n * otherwise false.\n *\n * Focus shouldn't be restored if it's been moved elsewhere by another\n * component or as a result of a user interaction e.g. the user clicked\n * on a button outside the overlay while the overlay was open.\n *\n * @protected\n * @return {boolean}\n */\n _shouldRestoreFocus() {\n const activeElement = getDeepActiveElement();\n return activeElement === document.body || this._deepContains(activeElement);\n }\n\n /**\n * Returns true if the overlay contains the given node,\n * including those within shadow DOM trees.\n *\n * @param {Node} node\n * @return {boolean}\n * @protected\n */\n _deepContains(node) {\n if (this.contains(node)) {\n return true;\n }\n let n = node;\n const doc = node.ownerDocument;\n // Walk from node to `this` or `document`\n while (n && n !== doc && n !== this) {\n n = n.parentNode || n.host;\n }\n return n === this;\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * Returns all attached overlays in visual stacking order.\n * @private\n */\nconst getAttachedInstances = () =>\n Array.from(document.body.children)\n .filter((el) => el instanceof HTMLElement && el._hasOverlayStackMixin && !el.hasAttribute('closing'))\n .sort((a, b) => a.__zIndex - b.__zIndex || 0);\n\n/**\n * Returns true if the overlay is the last one in the opened overlays stack.\n * @param {HTMLElement} overlay\n * @return {boolean}\n * @protected\n */\nexport const isLastOverlay = (overlay) => overlay === getAttachedInstances().pop();\n\n/**\n * @polymerMixin\n */\nexport const OverlayStackMixin = (superClass) =>\n class OverlayStackMixin extends superClass {\n constructor() {\n super();\n\n this._hasOverlayStackMixin = true;\n }\n\n /**\n * Returns true if this is the last one in the opened overlays stack.\n *\n * @return {boolean}\n * @protected\n */\n get _last() {\n return isLastOverlay(this);\n }\n\n /**\n * Brings the overlay as visually the frontmost one.\n */\n bringToFront() {\n let zIndex = '';\n const frontmost = getAttachedInstances()\n .filter((o) => o !== this)\n .pop();\n if (frontmost) {\n const frontmostZIndex = frontmost.__zIndex;\n zIndex = frontmostZIndex + 1;\n }\n this.style.zIndex = zIndex;\n this.__zIndex = zIndex || parseFloat(getComputedStyle(this).zIndex);\n }\n\n /** @protected */\n _enterModalState() {\n if (document.body.style.pointerEvents !== 'none') {\n // Set body pointer-events to 'none' to disable mouse interactions with\n // other document nodes.\n this._previousDocumentPointerEvents = document.body.style.pointerEvents;\n document.body.style.pointerEvents = 'none';\n }\n\n // Disable pointer events in other attached overlays\n getAttachedInstances().forEach((el) => {\n if (el !== this) {\n el.$.overlay.style.pointerEvents = 'none';\n }\n });\n }\n\n /** @protected */\n _exitModalState() {\n if (this._previousDocumentPointerEvents !== undefined) {\n // Restore body pointer-events\n document.body.style.pointerEvents = this._previousDocumentPointerEvents;\n delete this._previousDocumentPointerEvents;\n }\n\n // Restore pointer events in the previous overlay(s)\n const instances = getAttachedInstances();\n\n let el;\n // Use instances.pop() to ensure the reverse order\n while ((el = instances.pop())) {\n if (el === this) {\n // Skip the current instance\n continue;\n }\n el.$.overlay.style.removeProperty('pointer-events');\n if (!el.modeless) {\n // Stop after the last modal\n break;\n }\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { afterNextRender } from '@polymer/polymer/lib/utils/render-status.js';\nimport { isIOS } from '@vaadin/component-base/src/browser-utils.js';\nimport { OverlayFocusMixin } from './vaadin-overlay-focus-mixin.js';\nimport { OverlayStackMixin } from './vaadin-overlay-stack-mixin.js';\n\n/**\n * @polymerMixin\n * @mixes OverlayFocusMixin\n * @mixes OverlayStackMixin\n */\nexport const OverlayMixin = (superClass) =>\n class OverlayMixin extends OverlayFocusMixin(OverlayStackMixin(superClass)) {\n static get properties() {\n return {\n /**\n * When true, the overlay is visible and attached to body.\n */\n opened: {\n type: Boolean,\n notify: true,\n observer: '_openedChanged',\n reflectToAttribute: true,\n },\n\n /**\n * Owner element passed with renderer function\n * @type {HTMLElement}\n */\n owner: {\n type: Object,\n },\n\n /**\n * Object with properties that is passed to `renderer` function\n */\n model: {\n type: Object,\n },\n\n /**\n * Custom function for rendering the content of the overlay.\n * Receives three arguments:\n *\n * - `root` The root container DOM element. Append your content to it.\n * - `owner` The host element of the renderer function.\n * - `model` The object with the properties related with rendering.\n * @type {OverlayRenderer | null | undefined}\n */\n renderer: {\n type: Object,\n },\n\n /**\n * When true the overlay won't disable the main content, showing\n * it doesn't change the functionality of the user interface.\n * @type {boolean}\n */\n modeless: {\n type: Boolean,\n value: false,\n reflectToAttribute: true,\n observer: '_modelessChanged',\n },\n\n /**\n * When set to true, the overlay is hidden. This also closes the overlay\n * immediately in case there is a closing animation in progress.\n * @type {boolean}\n */\n hidden: {\n type: Boolean,\n reflectToAttribute: true,\n observer: '_hiddenChanged',\n },\n\n /**\n * When true the overlay has backdrop on top of content when opened.\n * @type {boolean}\n */\n withBackdrop: {\n type: Boolean,\n value: false,\n reflectToAttribute: true,\n },\n };\n }\n\n static get observers() {\n return ['_rendererOrDataChanged(renderer, owner, model, opened)'];\n }\n\n constructor() {\n super();\n\n this._boundMouseDownListener = this._mouseDownListener.bind(this);\n this._boundMouseUpListener = this._mouseUpListener.bind(this);\n this._boundOutsideClickListener = this._outsideClickListener.bind(this);\n this._boundKeydownListener = this._keydownListener.bind(this);\n\n /* c8 ignore next 3 */\n if (isIOS) {\n this._boundIosResizeListener = () => this._detectIosNavbar();\n }\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n // Need to add dummy click listeners to this and the backdrop or else\n // the document click event listener (_outsideClickListener) may never\n // get invoked on iOS Safari (reproducible in <vaadin-dialog>\n // and <vaadin-context-menu>).\n this.addEventListener('click', () => {});\n this.$.backdrop.addEventListener('click', () => {});\n\n this.addEventListener('mouseup', () => {\n // In Chrome, focus moves to body on overlay content mousedown\n // See https://github.com/vaadin/flow-components/issues/5507\n if (document.activeElement === document.body && this.$.overlay.getAttribute('tabindex') === '0') {\n this.$.overlay.focus();\n }\n });\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n /* c8 ignore next 3 */\n if (this._boundIosResizeListener) {\n this._detectIosNavbar();\n window.addEventListener('resize', this._boundIosResizeListener);\n }\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n /* c8 ignore next 3 */\n if (this._boundIosResizeListener) {\n window.removeEventListener('resize', this._boundIosResizeListener);\n }\n }\n\n /**\n * Requests an update for the content of the overlay.\n * While performing the update, it invokes the renderer passed in the `renderer` property.\n *\n * It is not guaranteed that the update happens immediately (synchronously) after it is requested.\n */\n requestContentUpdate() {\n if (this.renderer) {\n this.renderer.call(this.owner, this, this.owner, this.model);\n }\n }\n\n /**\n * @param {Event=} sourceEvent\n */\n close(sourceEvent) {\n const evt = new CustomEvent('vaadin-overlay-close', {\n bubbles: true,\n cancelable: true,\n detail: { sourceEvent },\n });\n this.dispatchEvent(evt);\n if (!evt.defaultPrevented) {\n this.opened = false;\n }\n }\n\n /** @private */\n _detectIosNavbar() {\n /* c8 ignore next 15 */\n if (!this.opened) {\n return;\n }\n\n const innerHeight = window.innerHeight;\n const innerWidth = window.innerWidth;\n\n const landscape = innerWidth > innerHeight;\n\n const clientHeight = document.documentElement.clientHeight;\n\n if (landscape && clientHeight > innerHeight) {\n this.style.setProperty('--vaadin-overlay-viewport-bottom', `${clientHeight - innerHeight}px`);\n } else {\n this.style.setProperty('--vaadin-overlay-viewport-bottom', '0');\n }\n }\n\n /** @private */\n _addGlobalListeners() {\n document.addEventListener('mousedown', this._boundMouseDownListener);\n document.addEventListener('mouseup', this._boundMouseUpListener);\n // Firefox leaks click to document on contextmenu even if prevented\n // https://bugzilla.mozilla.org/show_bug.cgi?id=990614\n document.documentElement.addEventListener('click', this._boundOutsideClickListener, true);\n }\n\n /** @private */\n _removeGlobalListeners() {\n document.removeEventListener('mousedown', this._boundMouseDownListener);\n document.removeEventListener('mouseup', this._boundMouseUpListener);\n document.documentElement.removeEventListener('click', this._boundOutsideClickListener, true);\n }\n\n /** @private */\n _rendererOrDataChanged(renderer, owner, model, opened) {\n const ownerOrModelChanged = this._oldOwner !== owner || this._oldModel !== model;\n this._oldModel = model;\n this._oldOwner = owner;\n\n const rendererChanged = this._oldRenderer !== renderer;\n this._oldRenderer = renderer;\n\n const openedChanged = this._oldOpened !== opened;\n this._oldOpened = opened;\n\n if (rendererChanged) {\n this.innerHTML = '';\n // Whenever a Lit-based renderer is used, it assigns a Lit part to the node it was rendered into.\n // When clearing the rendered content, this part needs to be manually disposed of.\n // Otherwise, using a Lit-based renderer on the same node will throw an exception or render nothing afterward.\n delete this._$litPart$;\n }\n\n if (opened && renderer && (rendererChanged || openedChanged || ownerOrModelChanged)) {\n this.requestContentUpdate();\n }\n }\n\n /** @private */\n _modelessChanged(modeless) {\n if (!modeless) {\n if (this.opened) {\n this._addGlobalListeners();\n this._enterModalState();\n }\n } else {\n this._removeGlobalListeners();\n this._exitModalState();\n }\n }\n\n /** @private */\n _openedChanged(opened, wasOpened) {\n if (opened) {\n this._saveFocus();\n\n this._animatedOpening();\n\n afterNextRender(this, () => {\n this._trapFocus();\n\n const evt = new CustomEvent('vaadin-overlay-open', { bubbles: true });\n this.dispatchEvent(evt);\n });\n\n document.addEventListener('keydown', this._boundKeydownListener);\n\n if (!this.modeless) {\n this._addGlobalListeners();\n }\n } else if (wasOpened) {\n this._resetFocus();\n\n this._animatedClosing();\n\n document.removeEventListener('keydown', this._boundKeydownListener);\n\n if (!this.modeless) {\n this._removeGlobalListeners();\n }\n }\n }\n\n /** @private */\n _hiddenChanged(hidden) {\n if (hidden && this.hasAttribute('closing')) {\n this._flushAnimation('closing');\n }\n }\n\n /**\n * @return {boolean}\n * @private\n */\n _shouldAnimate() {\n const style = getComputedStyle(this);\n const name = style.getPropertyValue('animation-name');\n const hidden = style.getPropertyValue('display') === 'none';\n return !hidden && name && name !== 'none';\n }\n\n /**\n * @param {string} type\n * @param {Function} callback\n * @private\n */\n _enqueueAnimation(type, callback) {\n const handler = `__${type}Handler`;\n const listener = (event) => {\n if (event && event.target !== this) {\n return;\n }\n callback();\n this.removeEventListener('animationend', listener);\n delete this[handler];\n };\n this[handler] = listener;\n this.addEventListener('animationend', listener);\n }\n\n /**\n * @param {string} type\n * @protected\n */\n _flushAnimation(type) {\n const handler = `__${type}Handler`;\n if (typeof this[handler] === 'function') {\n this[handler]();\n }\n }\n\n /** @private */\n _animatedOpening() {\n if (this.parentNode === document.body && this.hasAttribute('closing')) {\n this._flushAnimation('closing');\n }\n this._attachOverlay();\n if (!this.modeless) {\n this._enterModalState();\n }\n this.setAttribute('opening', '');\n\n if (this._shouldAnimate()) {\n this._enqueueAnimation('opening', () => {\n this._finishOpening();\n });\n } else {\n this._finishOpening();\n }\n }\n\n /** @private */\n _attachOverlay() {\n this._placeholder = document.createComment('vaadin-overlay-placeholder');\n this.parentNode.insertBefore(this._placeholder, this);\n document.body.appendChild(this);\n this.bringToFront();\n }\n\n /** @private */\n _finishOpening() {\n this.removeAttribute('opening');\n }\n\n /** @private */\n _finishClosing() {\n this._detachOverlay();\n this.$.overlay.style.removeProperty('pointer-events');\n this.removeAttribute('closing');\n this.dispatchEvent(new CustomEvent('vaadin-overlay-closed'));\n }\n\n /** @private */\n _animatedClosing() {\n if (this.hasAttribute('opening')) {\n this._flushAnimation('opening');\n }\n if (this._placeholder) {\n this._exitModalState();\n this.setAttribute('closing', '');\n this.dispatchEvent(new CustomEvent('vaadin-overlay-closing'));\n\n if (this._shouldAnimate()) {\n this._enqueueAnimation('closing', () => {\n this._finishClosing();\n });\n } else {\n this._finishClosing();\n }\n }\n }\n\n /** @private */\n _detachOverlay() {\n this._placeholder.parentNode.insertBefore(this, this._placeholder);\n this._placeholder.parentNode.removeChild(this._placeholder);\n }\n\n /** @private */\n _mouseDownListener(event) {\n this._mouseDownInside = event.composedPath().indexOf(this.$.overlay) >= 0;\n }\n\n /** @private */\n _mouseUpListener(event) {\n this._mouseUpInside = event.composedPath().indexOf(this.$.overlay) >= 0;\n }\n\n /**\n * Whether to close the overlay on outside click or not.\n * Override this method to customize the closing logic.\n *\n * @param {Event} _event\n * @return {boolean}\n * @protected\n */\n _shouldCloseOnOutsideClick(_event) {\n return this._last;\n }\n\n /**\n * Outside click listener used in capture phase to close the overlay before\n * propagating the event to the listener on the element that triggered it.\n * Otherwise, calling `open()` would result in closing and re-opening.\n *\n * @private\n */\n _outsideClickListener(event) {\n if (event.composedPath().includes(this.$.overlay) || this._mouseDownInside || this._mouseUpInside) {\n this._mouseDownInside = false;\n this._mouseUpInside = false;\n return;\n }\n\n if (!this._shouldCloseOnOutsideClick(event)) {\n return;\n }\n\n const evt = new CustomEvent('vaadin-overlay-outside-click', {\n bubbles: true,\n cancelable: true,\n detail: { sourceEvent: event },\n });\n this.dispatchEvent(evt);\n\n if (this.opened && !evt.defaultPrevented) {\n this.close(event);\n }\n }\n\n /**\n * Listener used to close whe overlay on Escape press, if it is the last one.\n * @private\n */\n _keydownListener(event) {\n if (!this._last) {\n return;\n }\n\n // Only close modeless overlay on Esc press when it contains focus\n if (this.modeless && !event.composedPath().includes(this.$.overlay)) {\n return;\n }\n\n if (event.key === 'Escape') {\n const evt = new CustomEvent('vaadin-overlay-escape-press', {\n bubbles: true,\n cancelable: true,\n detail: { sourceEvent: event },\n });\n this.dispatchEvent(evt);\n\n if (this.opened && !evt.defaultPrevented) {\n this.close(event);\n }\n }\n }\n };\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { getAncestorRootNodes } from '@vaadin/component-base/src/dom-utils.js';\n\nconst PROP_NAMES_VERTICAL = {\n start: 'top',\n end: 'bottom',\n};\n\nconst PROP_NAMES_HORIZONTAL = {\n start: 'left',\n end: 'right',\n};\n\nconst targetResizeObserver = new ResizeObserver((entries) => {\n setTimeout(() => {\n entries.forEach((entry) => {\n if (entry.target.__overlay) {\n entry.target.__overlay._updatePosition();\n }\n });\n });\n});\n\n/**\n * @polymerMixin\n */\nexport const PositionMixin = (superClass) =>\n class PositionMixin extends superClass {\n static get properties() {\n return {\n /**\n * The element next to which this overlay should be aligned.\n * The position of the overlay relative to the positionTarget can be adjusted\n * with properties `horizontalAlign`, `verticalAlign`, `noHorizontalOverlap`\n * and `noVerticalOverlap`.\n */\n positionTarget: {\n type: Object,\n value: null,\n },\n\n /**\n * When `positionTarget` is set, this property defines whether to align the overlay's\n * left or right side to the target element by default.\n * Possible values are `start` and `end`.\n * RTL is taken into account when interpreting the value.\n * The overlay is automatically flipped to the opposite side when it doesn't fit into\n * the default side defined by this property.\n *\n * @attr {start|end} horizontal-align\n */\n horizontalAlign: {\n type: String,\n value: 'start',\n },\n\n /**\n * When `positionTarget` is set, this property defines whether to align the overlay's\n * top or bottom side to the target element by default.\n * Possible values are `top` and `bottom`.\n * The overlay is automatically flipped to the opposite side when it doesn't fit into\n * the default side defined by this property.\n *\n * @attr {top|bottom} vertical-align\n */\n verticalAlign: {\n type: String,\n value: 'top',\n },\n\n /**\n * When `positionTarget` is set, this property defines whether the overlay should overlap\n * the target element in the x-axis, or be positioned right next to it.\n *\n * @attr {boolean} no-horizontal-overlap\n */\n noHorizontalOverlap: {\n type: Boolean,\n value: false,\n },\n\n /**\n * When `positionTarget` is set, this property defines whether the overlay should overlap\n * the target element in the y-axis, or be positioned right above/below it.\n *\n * @attr {boolean} no-vertical-overlap\n */\n noVerticalOverlap: {\n type: Boolean,\n value: false,\n },\n\n /**\n * If the overlay content has no intrinsic height, this property can be used to set\n * the minimum vertical space (in pixels) required by the overlay. Setting a value to\n * the property effectively disables the content measurement in favor of using this\n * fixed value for determining the open direction.\n *\n * @attr {number} required-vertical-space\n */\n requiredVerticalSpace: {\n type: Number,\n value: 0,\n },\n };\n }\n\n static get observers() {\n return [\n '__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)',\n '__overlayOpenedChanged(opened, positionTarget)',\n ];\n }\n\n constructor() {\n super();\n\n this.__onScroll = this.__onScroll.bind(this);\n this._updatePosition = this._updatePosition.bind(this);\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n if (this.opened) {\n this.__addUpdatePositionEventListeners();\n }\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.__removeUpdatePositionEventListeners();\n }\n\n /** @private */\n __addUpdatePositionEventListeners() {\n window.addEventListener('resize', this._updatePosition);\n\n this.__positionTargetAncestorRootNodes = getAncestorRootNodes(this.positionTarget);\n this.__positionTargetAncestorRootNodes.forEach((node) => {\n node.addEventListener('scroll', this.__onScroll, true);\n });\n }\n\n /** @private */\n __removeUpdatePositionEventListeners() {\n window.removeEventListener('resize', this._updatePosition);\n\n if (this.__positionTargetAncestorRootNodes) {\n this.__positionTargetAncestorRootNodes.forEach((node) => {\n node.removeEventListener('scroll', this.__onScroll, true);\n });\n this.__positionTargetAncestorRootNodes = null;\n }\n }\n\n /** @private */\n __overlayOpenedChanged(opened, positionTarget) {\n this.__removeUpdatePositionEventListeners();\n\n if (positionTarget) {\n positionTarget.__overlay = null;\n targetResizeObserver.unobserve(positionTarget);\n\n if (opened) {\n this.__addUpdatePositionEventListeners();\n positionTarget.__overlay = this;\n targetResizeObserver.observe(positionTarget);\n }\n }\n\n if (opened) {\n const computedStyle = getComputedStyle(this);\n if (!this.__margins) {\n this.__margins = {};\n ['top', 'bottom', 'left', 'right'].forEach((propName) => {\n this.__margins[propName] = parseInt(computedStyle[propName], 10);\n });\n }\n this.setAttribute('dir', computedStyle.direction);\n\n this._updatePosition();\n // Schedule another position update (to cover virtual keyboard opening for example)\n requestAnimationFrame(() => this._updatePosition());\n }\n }\n\n __positionSettingsChanged() {\n this._updatePosition();\n }\n\n /** @private */\n __onScroll(e) {\n // If the scroll event occurred inside the overlay, ignore it.\n if (!this.contains(e.target)) {\n this._updatePosition();\n }\n }\n\n _updatePosition() {\n if (!this.positionTarget || !this.opened) {\n return;\n }\n\n const targetRect = this.positionTarget.getBoundingClientRect();\n\n // Detect the desired alignment and update the layout accordingly\n const shouldAlignStartVertically = this.__shouldAlignStartVertically(targetRect);\n this.style.justifyContent = shouldAlignStartVertically ? 'flex-start' : 'flex-end';\n\n const isRTL = this.__isRTL;\n const shouldAlignStartHorizontally = this.__shouldAlignStartHorizontally(targetRect, isRTL);\n const flexStart = (!isRTL && shouldAlignStartHorizontally) || (isRTL && !shouldAlignStartHorizontally);\n this.style.alignItems = flexStart ? 'flex-start' : 'flex-end';\n\n // Get the overlay rect after possible overlay alignment changes\n const overlayRect = this.getBoundingClientRect();\n\n // Obtain vertical positioning properties\n const verticalProps = this.__calculatePositionInOneDimension(\n targetRect,\n overlayRect,\n this.noVerticalOverlap,\n PROP_NAMES_VERTICAL,\n this,\n shouldAlignStartVertically,\n );\n\n // Obtain horizontal positioning properties\n const horizontalProps = this.__calculatePositionInOneDimension(\n targetRect,\n overlayRect,\n this.noHorizontalOverlap,\n PROP_NAMES_HORIZONTAL,\n this,\n shouldAlignStartHorizontally,\n );\n\n // Apply the positioning properties to the overlay\n Object.assign(this.style, verticalProps, horizontalProps);\n\n this.toggleAttribute('bottom-aligned', !shouldAlignStartVertically);\n this.toggleAttribute('top-aligned', shouldAlignStartVertically);\n\n this.toggleAttribute('end-aligned', !flexStart);\n this.toggleAttribute('start-aligned', flexStart);\n }\n\n __shouldAlignStartHorizontally(targetRect, rtl) {\n // Using previous size to fix a case where window resize may cause the overlay to be squeezed\n // smaller than its current space before the fit-calculations.\n const contentWidth = Math.max(this.__oldContentWidth || 0, this.$.overlay.offsetWidth);\n this.__oldContentWidth = this.$.overlay.offsetWidth;\n\n const viewportWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);\n const defaultAlignLeft = (!rtl && this.horizontalAlign === 'start') || (rtl && this.horizontalAlign === 'end');\n\n return this.__shouldAlignStart(\n targetRect,\n contentWidth,\n viewportWidth,\n this.__margins,\n defaultAlignLeft,\n this.noHorizontalOverlap,\n PROP_NAMES_HORIZONTAL,\n );\n }\n\n __shouldAlignStartVertically(targetRect) {\n // Using previous size to fix a case where window resize may cause the overlay to be squeezed\n // smaller than its current space before the fit-calculations.\n const contentHeight =\n this.requiredVerticalSpace || Math.max(this.__oldContentHeight || 0, this.$.overlay.offsetHeight);\n this.__oldContentHeight = this.$.overlay.offsetHeight;\n\n const viewportHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);\n const defaultAlignTop = this.verticalAlign === 'top';\n\n return this.__shouldAlignStart(\n targetRect,\n contentHeight,\n viewportHeight,\n this.__margins,\n defaultAlignTop,\n this.noVerticalOverlap,\n PROP_NAMES_VERTICAL,\n );\n }\n\n // eslint-disable-next-line max-params\n __shouldAlignStart(targetRect, contentSize, viewportSize, margins, defaultAlignStart, noOverlap, propNames) {\n const spaceForStartAlignment =\n viewportSize - targetRect[noOverlap ? propNames.end : propNames.start] - margins[propNames.end];\n const spaceForEndAlignment = targetRect[noOverlap ? propNames.start : propNames.end] - margins[propNames.start];\n\n const spaceForDefaultAlignment = defaultAlignStart ? spaceForStartAlignment : spaceForEndAlignment;\n const spaceForOtherAlignment = defaultAlignStart ? spaceForEndAlignment : spaceForStartAlignment;\n\n const shouldGoToDefaultSide =\n spaceForDefaultAlignment > spaceForOtherAlignment || spaceForDefaultAlignment > contentSize;\n\n return defaultAlignStart === shouldGoToDefaultSide;\n }\n\n /**\n * Returns an adjusted value after resizing the browser window,\n * to avoid wrong calculations when e.g. previously set `bottom`\n * CSS property value is larger than the updated viewport height.\n * See https://github.com/vaadin/web-components/issues/4604\n */\n __adjustBottomProperty(cssPropNameToSet, propNames, currentValue) {\n let adjustedProp;\n\n if (cssPropNameToSet === propNames.end) {\n // Adjust horizontally\n if (propNames.end === PROP_NAMES_VERTICAL.end) {\n const viewportHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);\n\n if (currentValue > viewportHeight && this.__oldViewportHeight) {\n const heightDiff = this.__oldViewportHeight - viewportHeight;\n adjustedProp = currentValue - heightDiff;\n }\n\n this.__oldViewportHeight = viewportHeight;\n }\n\n // Adjust vertically\n if (propNames.end === PROP_NAMES_HORIZONTAL.end) {\n const viewportWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);\n\n if (currentValue > viewportWidth && this.__oldViewportWidth) {\n const widthDiff = this.__oldViewportWidth - viewportWidth;\n adjustedProp = currentValue - widthDiff;\n }\n\n this.__oldViewportWidth = viewportWidth;\n }\n }\n\n return adjustedProp;\n }\n\n /**\n * Returns an object with CSS position properties to set,\n * e.g. { top: \"100px\" }\n */\n // eslint-disable-next-line max-params\n __calculatePositionInOneDimension(targetRect, overlayRect, noOverlap, propNames, overlay, shouldAlignStart) {\n const cssPropNameToSet = shouldAlignStart ? propNames.start : propNames.end;\n const cssPropNameToClear = shouldAlignStart ? propNames.end : propNames.start;\n\n const currentValue = parseFloat(overlay.style[cssPropNameToSet] || getComputedStyle(overlay)[cssPropNameToSet]);\n const adjustedValue = this.__adjustBottomProperty(cssPropNameToSet, propNames, currentValue);\n\n const diff =\n overlayRect[shouldAlignStart ? propNames.start : propNames.end] -\n targetRect[noOverlap === shouldAlignStart ? propNames.end : propNames.start];\n\n const valueToSet = adjustedValue\n ? `${adjustedValue}px`\n : `${currentValue + diff * (shouldAlignStart ? -1 : 1)}px`;\n\n return {\n [cssPropNameToSet]: valueToSet,\n [cssPropNameToClear]: '',\n };\n }\n };\n","/**\n * @license\n * Copyright (c) 2016 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';\nimport { OverlayMixin } from '@vaadin/overlay/src/vaadin-overlay-mixin.js';\nimport { PositionMixin } from '@vaadin/overlay/src/vaadin-overlay-position-mixin.js';\nimport { overlayStyles } from '@vaadin/overlay/src/vaadin-overlay-styles.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { datePickerOverlayStyles } from './vaadin-date-picker-overlay-styles.js';\n\nregisterStyles('vaadin-date-picker-overlay', [overlayStyles, datePickerOverlayStyles], {\n moduleId: 'vaadin-date-picker-overlay-styles',\n});\n\n/**\n * An element used internally by `<vaadin-date-picker>`. Not intended to be used separately.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes PositionMixin\n * @mixes OverlayMixin\n * @mixes DirMixin\n * @mixes ThemableMixin\n * @private\n */\nclass DatePickerOverlay extends PositionMixin(OverlayMixin(DirMixin(ThemableMixin(PolymerElement)))) {\n static get is() {\n return 'vaadin-date-picker-overlay';\n }\n\n static get template() {\n return html`\n <div id=\"backdrop\" part=\"backdrop\" hidden$=\"[[!withBackdrop]]\"></div>\n <div part=\"overlay\" id=\"overlay\">\n <div part=\"content\" id=\"content\">\n <slot></slot>\n </div>\n </div>\n `;\n }\n}\n\ndefineCustomElement(DatePickerOverlay);\n","/**\n * @license\n * Copyright (c) 2017 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const overlayStyles = css`\n :host {\n z-index: 200;\n position: fixed;\n\n /* Despite of what the names say, <vaadin-overlay> is just a container\n for position/sizing/alignment. The actual overlay is the overlay part. */\n\n /* Default position constraints: the entire viewport. Note: themes can\n override this to introduce gaps between the overlay and the viewport. */\n inset: 0;\n bottom: var(--vaadin-overlay-viewport-bottom);\n\n /* Use flexbox alignment for the overlay part. */\n display: flex;\n flex-direction: column; /* makes dropdowns sizing easier */\n /* Align to center by default. */\n align-items: center;\n justify-content: center;\n\n /* Allow centering when max-width/max-height applies. */\n margin: auto;\n\n /* The host is not clickable, only the overlay part is. */\n pointer-events: none;\n\n /* Remove tap highlight on touch devices. */\n -webkit-tap-highlight-color: transparent;\n\n /* CSS API for host */\n --vaadin-overlay-viewport-bottom: 0;\n }\n\n :host([hidden]),\n :host(:not([opened]):not([closing])) {\n display: none !important;\n }\n\n [part='overlay'] {\n -webkit-overflow-scrolling: touch;\n overflow: auto;\n pointer-events: auto;\n\n /* Prevent overflowing the host */\n max-width: 100%;\n box-sizing: border-box;\n\n -webkit-tap-highlight-color: initial; /* reenable tap highlight inside */\n }\n\n [part='backdrop'] {\n z-index: -1;\n content: '';\n background: rgba(0, 0, 0, 0.5);\n position: fixed;\n inset: 0;\n pointer-events: auto;\n }\n`;\n","/**\n * @license\n * Copyright (c) 2016 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const datePickerOverlayStyles = css`\n [part='overlay'] {\n display: flex;\n flex: auto;\n }\n\n [part~='content'] {\n flex: auto;\n }\n\n @media (forced-colors: active) {\n [part='overlay'] {\n outline: 3px solid;\n }\n }\n`;\n","/**\n * @license\n * Copyright (c) 2016 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * Get ISO 8601 week number for the given date.\n *\n * @param {!Date} Date object\n * @return {number} Week number\n */\nexport function getISOWeekNumber(date) {\n // Ported from Vaadin Framework method com.vaadin.client.DateTimeService.getISOWeekNumber(date)\n let dayOfWeek = date.getDay(); // 0 == sunday\n\n // ISO 8601 use weeks that start on monday so we use\n // mon=1,tue=2,...sun=7;\n if (dayOfWeek === 0) {\n dayOfWeek = 7;\n }\n // Find nearest thursday (defines the week in ISO 8601). The week number\n // for the nearest thursday is the same as for the target date.\n const nearestThursdayDiff = 4 - dayOfWeek; // 4 is thursday\n const nearestThursday = new Date(date.getTime() + nearestThursdayDiff * 24 * 3600 * 1000);\n\n const firstOfJanuary = new Date(0, 0);\n firstOfJanuary.setFullYear(nearestThursday.getFullYear());\n\n const timeDiff = nearestThursday.getTime() - firstOfJanuary.getTime();\n\n // Rounding the result, as the division doesn't result in an integer\n // when the given date is inside daylight saving time period.\n const daysSinceFirstOfJanuary = Math.round(timeDiff / (24 * 3600 * 1000));\n\n return Math.floor(daysSinceFirstOfJanuary / 7 + 1);\n}\n\n/**\n * Check if two dates are equal.\n *\n * @param {Date} date1\n * @param {Date} date2\n * @return {boolean} True if the given date objects refer to the same date\n */\nexport function dateEquals(date1, date2) {\n return (\n date1 instanceof Date &&\n date2 instanceof Date &&\n date1.getFullYear() === date2.getFullYear() &&\n date1.getMonth() === date2.getMonth() &&\n date1.getDate() === date2.getDate()\n );\n}\n\n/**\n * Check if the given date is in the range of allowed dates.\n *\n * @param {!Date} date The date to check\n * @param {Date} min Range start\n * @param {Date} max Range end\n * @return {boolean} True if the date is in the range\n */\nexport function dateAllowed(date, min, max) {\n return (!min || date >= min) && (!max || date <= max);\n}\n\n/**\n * Get closest date from array of dates.\n *\n * @param {!Date} date The date to compare dates with\n * @param {!Array<!Date>} dates Array of date objects\n * @return {!Date} Closest date\n */\nexport function getClosestDate(date, dates) {\n return dates\n .filter((date) => date !== undefined)\n .reduce((closestDate, candidate) => {\n if (!candidate) {\n return closestDate;\n }\n\n if (!closestDate) {\n return candidate;\n }\n\n const candidateDiff = Math.abs(date.getTime() - candidate.getTime());\n const closestDateDiff = Math.abs(closestDate.getTime() - date.getTime());\n return candidateDiff < closestDateDiff ? candidate : closestDate;\n });\n}\n\n/**\n * Extracts the basic component parts of a date (day, month and year)\n * to the expected format.\n * @param {!Date} date\n * @return {{day: number, month: number, year: number}}\n */\nexport function extractDateParts(date) {\n return {\n day: date.getDate(),\n month: date.getMonth(),\n year: date.getFullYear(),\n };\n}\n\n/**\n * Get difference in months between today and given months value.\n *\n * @param {number} months\n * @return {number}\n */\nexport function dateAfterXMonths(months) {\n const today = new Date();\n const result = new Date(today);\n result.setDate(1);\n result.setMonth(parseInt(months) + today.getMonth());\n return result;\n}\n\n/**\n * Calculate the year of the date based on the provided reference date.\n * Gets a two-digit year and returns a full year.\n * @param {!Date} referenceDate The date to act as basis in the calculation\n * @param {!number} year Should be in the range of [0, 99]\n * @param {number} month\n * @param {number} day\n * @return {!number} Adjusted year value\n */\nexport function getAdjustedYear(referenceDate, year, month = 0, day = 1) {\n if (year > 99) {\n throw new Error('The provided year cannot have more than 2 digits.');\n }\n if (year < 0) {\n throw new Error('The provided year cannot be negative.');\n }\n // Year values up to 2 digits are parsed based on the reference date.\n let adjustedYear = year + Math.floor(referenceDate.getFullYear() / 100) * 100;\n if (referenceDate < new Date(adjustedYear - 50, month, day)) {\n adjustedYear -= 100;\n } else if (referenceDate > new Date(adjustedYear + 50, month, day)) {\n adjustedYear += 100;\n }\n return adjustedYear;\n}\n\n/**\n * Parse date string of one of the following date formats:\n * - ISO 8601 `\"YYYY-MM-DD\"`\n * - 6-digit extended ISO 8601 `\"+YYYYYY-MM-DD\"`, `\"-YYYYYY-MM-DD\"`\n * @param {!string} str Date string to parse\n * @return {Date} Parsed date\n */\nexport function parseDate(str) {\n // Parsing with RegExp to ensure correct format\n const parts = /^([-+]\\d{1}|\\d{2,4}|[-+]\\d{6})-(\\d{1,2})-(\\d{1,2})$/u.exec(str);\n if (!parts) {\n return undefined;\n }\n\n const date = new Date(0, 0); // Wrong date (1900-01-01), but with midnight in local time\n date.setFullYear(parseInt(parts[1], 10));\n date.setMonth(parseInt(parts[2], 10) - 1);\n date.setDate(parseInt(parts[3], 10));\n return date;\n}\n","/**\n * @license\n * Copyright (c) 2016 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { timeOut } from '@vaadin/component-base/src/async.js';\nimport { isFirefox } from '@vaadin/component-base/src/browser-utils.js';\nimport { Debouncer } from '@vaadin/component-base/src/debounce.js';\nimport { generateUniqueId } from '@vaadin/component-base/src/unique-id-utils.js';\n\nconst template = document.createElement('template');\ntemplate.innerHTML = `\n <style>\n :host {\n display: block;\n overflow: hidden;\n height: 500px;\n }\n\n #scroller {\n position: relative;\n height: 100%;\n overflow: auto;\n outline: none;\n margin-right: -40px;\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n }\n\n #scroller.notouchscroll {\n -webkit-overflow-scrolling: auto;\n }\n\n #scroller::-webkit-scrollbar {\n display: none;\n }\n\n .buffer {\n position: absolute;\n width: var(--vaadin-infinite-scroller-buffer-width, 100%);\n box-sizing: border-box;\n padding-right: 40px;\n top: var(--vaadin-infinite-scroller-buffer-offset, 0);\n animation: fadein 0.2s;\n }\n\n @keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n </style>\n\n <div id=\"scroller\">\n <div class=\"buffer\"></div>\n <div class=\"buffer\"></div>\n <div id=\"fullHeight\"></div>\n </div>\n`;\n\n/**\n * @extends HTMLElement\n * @private\n */\nexport class InfiniteScroller extends HTMLElement {\n constructor() {\n super();\n\n const root = this.attachShadow({ mode: 'open' });\n root.appendChild(template.content.cloneNode(true));\n\n /**\n * Count of individual items in each buffer.\n * The scroller has 2 buffers altogether so bufferSize of 20\n * will result in 40 buffered DOM items in total.\n * Changing after initialization not supported.\n * @type {number}\n */\n this.bufferSize = 20;\n\n /**\n * The amount of initial scroll top. Needed in order for the\n * user to be able to scroll backwards.\n * @type {number}\n * @private\n */\n this._initialScroll = 500000;\n\n /**\n * The index/position mapped at _initialScroll point.\n * @type {number}\n * @private\n */\n this._initialIndex = 0;\n\n /**\n * @type {boolean}\n * @private\n */\n this._activated = false;\n }\n\n /**\n * @return {boolean}\n */\n get active() {\n return this._activated;\n }\n\n set active(active) {\n if (active && !this._activated) {\n this._createPool();\n this._activated = true;\n }\n }\n\n /**\n * @return {number}\n */\n get bufferOffset() {\n return this._buffers[0].offsetTop;\n }\n\n /**\n * @return {number}\n */\n get itemHeight() {\n if (!this._itemHeightVal) {\n const itemHeight = getComputedStyle(this).getPropertyValue('--vaadin-infinite-scroller-item-height');\n // Use background-position temp inline style for unit conversion\n const tmpStyleProp = 'background-position';\n this.$.fullHeight.style.setProperty(tmpStyleProp, itemHeight);\n const itemHeightPx = getComputedStyle(this.$.fullHeight).getPropertyValue(tmpStyleProp);\n this.$.fullHeight.style.removeProperty(tmpStyleProp);\n this._itemHeightVal = parseFloat(itemHeightPx);\n }\n\n return this._itemHeightVal;\n }\n\n /** @private */\n get _bufferHeight() {\n return this.itemHeight * this.bufferSize;\n }\n\n /**\n * @return {number}\n */\n get position() {\n return (this.$.scroller.scrollTop - this._buffers[0].translateY) / this.itemHeight + this._firstIndex;\n }\n\n /**\n * Current scroller position as index. Can be a fractional number.\n *\n * @type {number}\n */\n set position(index) {\n this._preventScrollEvent = true;\n if (index > this._firstIndex && index < this._firstIndex + this.bufferSize * 2) {\n this.$.scroller.scrollTop = this.itemHeight * (index - this._firstIndex) + this._buffers[0].translateY;\n } else {\n this._initialIndex = ~~index;\n this._reset();\n this._scrollDisabled = true;\n this.$.scroller.scrollTop += (index % 1) * this.itemHeight;\n this._scrollDisabled = false;\n }\n\n if (this._mayHaveMomentum) {\n // Stop the possible iOS Safari momentum with -webkit-overflow-scrolling: auto;\n this.$.scroller.classList.add('notouchscroll');\n this._mayHaveMomentum = false;\n\n setTimeout(() => {\n // Restore -webkit-overflow-scrolling: touch; after a small delay.\n this.$.scroller.classList.remove('notouchscroll');\n }, 10);\n }\n }\n\n /** @protected */\n connectedCallback() {\n if (!this._ready) {\n this._ready = true;\n\n this.$ = {};\n this.shadowRoot.querySelectorAll('[id]').forEach((node) => {\n this.$[node.id] = node;\n });\n\n this.$.scroller.addEventListener('scroll', () => this._scroll());\n\n /** @private */\n this._buffers = [...this.shadowRoot.querySelectorAll('.buffer')];\n\n this.$.fullHeight.style.height = `${this._initialScroll * 2}px`;\n\n // Firefox interprets elements with overflow:auto as focusable\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1069739\n if (isFirefox) {\n this.$.scroller.tabIndex = -1;\n }\n }\n }\n\n /**\n * Force the scroller to update clones after a reset, without\n * waiting for the debouncer to resolve.\n */\n forceUpdate() {\n if (this._debouncerUpdateClones) {\n this._buffers[0].updated = this._buffers[1].updated = false;\n this._updateClones();\n this._debouncerUpdateClones.cancel();\n }\n }\n\n /**\n * @protected\n * @override\n */\n _createElement() {\n // To be implemented.\n }\n\n /**\n * @param {HTMLElement} _element\n * @param {number} _index\n * @protected\n * @override\n */\n _updateElement(_element, _index) {\n // To be implemented.\n }\n\n /** @private */\n _finishInit() {\n if (!this._initDone) {\n // Once the first set of items start fading in, stamp the rest\n this._buffers.forEach((buffer) => {\n [...buffer.children].forEach((slot) => {\n this._ensureStampedInstance(slot._itemWrapper);\n });\n });\n\n if (!this._buffers[0].translateY) {\n this._reset();\n }\n\n this._initDone = true;\n this.dispatchEvent(new CustomEvent('init-done'));\n }\n }\n\n /** @private */\n _translateBuffer(up) {\n const index = up ? 1 : 0;\n this._buffers[index].translateY = this._buffers[index ? 0 : 1].translateY + this._bufferHeight * (index ? -1 : 1);\n this._buffers[index].style.transform = `translate3d(0, ${this._buffers[index].translateY}px, 0)`;\n this._buffers[index].updated = false;\n this._buffers.reverse();\n }\n\n /** @private */\n _scroll() {\n if (this._scrollDisabled) {\n return;\n }\n\n const scrollTop = this.$.scroller.scrollTop;\n if (scrollTop < this._bufferHeight || scrollTop > this._initialScroll * 2 - this._bufferHeight) {\n // Scrolled near the end/beginning of the scrollable area -> reset.\n this._initialIndex = ~~this.position;\n this._reset();\n }\n\n // Check if we scrolled enough to translate the buffer positions.\n const offset = this.itemHeight + this.bufferOffset;\n const upperThresholdReached = scrollTop > this._buffers[1].translateY + offset;\n const lowerThresholdReached = scrollTop < this._buffers[0].translateY + offset;\n\n if (upperThresholdReached || lowerThresholdReached) {\n this._translateBuffer(lowerThresholdReached);\n this._updateClones();\n }\n\n if (!this._preventScrollEvent) {\n this.dispatchEvent(new CustomEvent('custom-scroll', { bubbles: false, composed: true }));\n this._mayHaveMomentum = true;\n }\n this._preventScrollEvent = false;\n\n this._debouncerScrollFinish = Debouncer.debounce(this._debouncerScrollFinish, timeOut.after(200), () => {\n const scrollerRect = this.$.scroller.getBoundingClientRect();\n if (!this._isVisible(this._buffers[0], scrollerRect) && !this._isVisible(this._buffers[1], scrollerRect)) {\n this.position = this.position; // eslint-disable-line no-self-assign\n }\n });\n }\n\n /** @private */\n _reset() {\n this._scrollDisabled = true;\n this.$.scroller.scrollTop = this._initialScroll;\n this._buffers[0].translateY = this._initialScroll - this._bufferHeight;\n this._buffers[1].translateY = this._initialScroll;\n this._buffers.forEach((buffer) => {\n buffer.style.transform = `translate3d(0, ${buffer.translateY}px, 0)`;\n });\n this._buffers[0].updated = this._buffers[1].updated = false;\n this._updateClones(true);\n\n this._debouncerUpdateClones = Debouncer.debounce(this._debouncerUpdateClones, timeOut.after(200), () => {\n this._buffers[0].updated = this._buffers[1].updated = false;\n this._updateClones();\n });\n\n this._scrollDisabled = false;\n }\n\n /** @private */\n _createPool() {\n const container = this.getBoundingClientRect();\n this._buffers.forEach((buffer) => {\n for (let i = 0; i < this.bufferSize; i++) {\n const itemWrapper = document.createElement('div');\n itemWrapper.style.height = `${this.itemHeight}px`;\n itemWrapper.instance = {};\n\n const slotName = `vaadin-infinite-scroller-item-content-${generateUniqueId()}`;\n\n const slot = document.createElement('slot');\n slot.setAttribute('name', slotName);\n slot._itemWrapper = itemWrapper;\n buffer.appendChild(slot);\n\n itemWrapper.setAttribute('slot', slotName);\n this.appendChild(itemWrapper);\n\n // Only stamp the visible instances first\n if (this._isVisible(itemWrapper, container)) {\n this._ensureStampedInstance(itemWrapper);\n }\n }\n });\n\n requestAnimationFrame(() => {\n this._finishInit();\n });\n }\n\n /** @private */\n _ensureStampedInstance(itemWrapper) {\n if (itemWrapper.firstElementChild) {\n return;\n }\n\n const tmpInstance = itemWrapper.instance;\n\n itemWrapper.instance = this._createElement();\n itemWrapper.appendChild(itemWrapper.instance);\n\n Object.keys(tmpInstance).forEach((prop) => {\n itemWrapper.instance[prop] = tmpInstance[prop];\n });\n }\n\n /** @private */\n _updateClones(viewPortOnly) {\n this._firstIndex = ~~((this._buffers[0].translateY - this._initialScroll) / this.itemHeight) + this._initialIndex;\n\n const scrollerRect = viewPortOnly ? this.$.scroller.getBoundingClientRect() : undefined;\n this._buffers.forEach((buffer, bufferIndex) => {\n if (!buffer.updated) {\n const firstIndex = this._firstIndex + this.bufferSize * bufferIndex;\n\n [...buffer.children].forEach((slot, index) => {\n const itemWrapper = slot._itemWrapper;\n if (!viewPortOnly || this._isVisible(itemWrapper, scrollerRect)) {\n this._updateElement(itemWrapper.instance, firstIndex + index);\n }\n });\n buffer.updated = true;\n }\n });\n }\n\n /** @private */\n _isVisible(element, container) {\n const rect = element.getBoundingClientRect();\n return rect.bottom > container.top && rect.top < container.bottom;\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { dateAfterXMonths } from './vaadin-date-picker-helper.js';\nimport { InfiniteScroller } from './vaadin-infinite-scroller.js';\n\nconst stylesTemplate = document.createElement('template');\nstylesTemplate.innerHTML = `\n <style>\n :host {\n --vaadin-infinite-scroller-item-height: 270px;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n }\n </style>\n`;\n\n/**\n * An element used internally by `<vaadin-date-picker>`. Not intended to be used separately.\n *\n * @customElement\n * @extends InfiniteScroller\n * @private\n */\nclass DatePickerMonthScroller extends InfiniteScroller {\n static get is() {\n return 'vaadin-date-picker-month-scroller';\n }\n\n constructor() {\n super();\n\n this.bufferSize = 3;\n this.shadowRoot.appendChild(stylesTemplate.content.cloneNode(true));\n }\n\n /**\n * @protected\n * @override\n */\n _createElement() {\n return document.createElement('vaadin-month-calendar');\n }\n\n /**\n * @param {HTMLElement} element\n * @param {number} index\n * @protected\n * @override\n */\n _updateElement(element, index) {\n element.month = dateAfterXMonths(index);\n }\n}\n\ndefineCustomElement(DatePickerMonthScroller);\n","/**\n * @license\n * Copyright (c) 2016 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { InfiniteScroller } from './vaadin-infinite-scroller.js';\n\nconst stylesTemplate = document.createElement('template');\nstylesTemplate.innerHTML = `\n <style>\n :host {\n --vaadin-infinite-scroller-item-height: 80px;\n width: 50px;\n display: block;\n height: 100%;\n position: absolute;\n right: 0;\n transform: translateX(100%);\n -webkit-tap-highlight-color: transparent;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n /* Center the year scroller position. */\n --vaadin-infinite-scroller-buffer-offset: 50%;\n }\n\n :host::before {\n content: '';\n display: block;\n background: transparent;\n width: 0;\n height: 0;\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n border-width: 6px;\n border-style: solid;\n border-color: transparent;\n border-left-color: #000;\n }\n </style>\n`;\n\n/**\n * An element used internally by `<vaadin-date-picker>`. Not intended to be used separately.\n *\n * @customElement\n * @extends InfiniteScroller\n * @private\n */\nclass DatePickerYearScroller extends InfiniteScroller {\n static get is() {\n return 'vaadin-date-picker-year-scroller';\n }\n\n constructor() {\n super();\n\n this.bufferSize = 12;\n this.shadowRoot.appendChild(stylesTemplate.content.cloneNode(true));\n }\n\n /**\n * @protected\n * @override\n */\n _createElement() {\n return document.createElement('vaadin-date-picker-year');\n }\n\n /**\n * @param {HTMLElement} element\n * @param {number} index\n * @protected\n * @override\n */\n _updateElement(element, index) {\n element.year = this._yearAfterXYears(index);\n }\n\n /** @private */\n _yearAfterXYears(index) {\n const today = new Date();\n const result = new Date(today);\n result.setFullYear(parseInt(index) + today.getFullYear());\n return result.getFullYear();\n }\n}\n\ndefineCustomElement(DatePickerYearScroller);\n","/**\n * @license\n * Copyright (c) 2016 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\n\n/**\n * An element used internally by `<vaadin-date-picker>`. Not intended to be used separately.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ThemableMixin\n * @private\n */\nexport class DatePickerYear extends ThemableMixin(PolymerElement) {\n static get is() {\n return 'vaadin-date-picker-year';\n }\n\n static get template() {\n return html`\n <style>\n :host {\n display: block;\n height: 100%;\n }\n </style>\n <div part=\"year-number\">[[year]]</div>\n <div part=\"year-separator\" aria-hidden=\"true\"></div>\n `;\n }\n\n static get properties() {\n return {\n year: {\n type: String,\n },\n\n selectedDate: {\n type: Object,\n },\n };\n }\n\n static get observers() {\n return ['__updateSelected(year, selectedDate)'];\n }\n\n /** @private */\n __updateSelected(year, selectedDate) {\n this.toggleAttribute('selected', selectedDate && selectedDate.getFullYear() === year);\n this.toggleAttribute('current', year === new Date().getFullYear());\n }\n}\n\ndefineCustomElement(DatePickerYear);\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport { dedupingMixin } from '../utils/mixin.js';\n\n// Common implementation for mixin & behavior\nfunction mutablePropertyChange(inst, property, value, old, mutableData) {\n let isObject;\n if (mutableData) {\n isObject = (typeof value === 'object' && value !== null);\n // Pull `old` for Objects from temp cache, but treat `null` as a primitive\n if (isObject) {\n old = inst.__dataTemp[property];\n }\n }\n // Strict equality check, but return false for NaN===NaN\n let shouldChange = (old !== value && (old === old || value === value));\n // Objects are stored in temporary cache (cleared at end of\n // turn), which is used for dirty-checking\n if (isObject && shouldChange) {\n inst.__dataTemp[property] = value;\n }\n return shouldChange;\n}\n\n/**\n * Element class mixin to skip strict dirty-checking for objects and arrays\n * (always consider them to be \"dirty\"), for use on elements utilizing\n * `PropertyEffects`\n *\n * By default, `PropertyEffects` performs strict dirty checking on\n * objects, which means that any deep modifications to an object or array will\n * not be propagated unless \"immutable\" data patterns are used (i.e. all object\n * references from the root to the mutation were changed).\n *\n * Polymer also provides a proprietary data mutation and path notification API\n * (e.g. `notifyPath`, `set`, and array mutation API's) that allow efficient\n * mutation and notification of deep changes in an object graph to all elements\n * bound to the same object graph.\n *\n * In cases where neither immutable patterns nor the data mutation API can be\n * used, applying this mixin will cause Polymer to skip dirty checking for\n * objects and arrays (always consider them to be \"dirty\"). This allows a\n * user to make a deep modification to a bound object graph, and then either\n * simply re-set the object (e.g. `this.items = this.items`) or call `notifyPath`\n * (e.g. `this.notifyPath('items')`) to update the tree. Note that all\n * elements that wish to be updated based on deep mutations must apply this\n * mixin or otherwise skip strict dirty checking for objects/arrays.\n * Specifically, any elements in the binding tree between the source of a\n * mutation and the consumption of it must apply this mixin or enable the\n * `OptionalMutableData` mixin.\n *\n * In order to make the dirty check strategy configurable, see\n * `OptionalMutableData`.\n *\n * Note, the performance characteristics of propagating large object graphs\n * will be worse as opposed to using strict dirty checking with immutable\n * patterns or Polymer's path notification API.\n *\n * @mixinFunction\n * @polymer\n * @summary Element class mixin to skip strict dirty-checking for objects\n * and arrays\n * @template T\n * @param {function(new:T)} superClass Class to apply mixin to.\n * @return {function(new:T)} superClass with mixin applied.\n */\nexport const MutableData = dedupingMixin(superClass => {\n\n /**\n * @polymer\n * @mixinClass\n * @implements {Polymer_MutableData}\n */\n class MutableData extends superClass {\n /**\n * Overrides `PropertyEffects` to provide option for skipping\n * strict equality checking for Objects and Arrays.\n *\n * This method pulls the value to dirty check against from the `__dataTemp`\n * cache (rather than the normal `__data` cache) for Objects. Since the temp\n * cache is cleared at the end of a turn, this implementation allows\n * side-effects of deep object changes to be processed by re-setting the\n * same object (using the temp cache as an in-turn backstop to prevent\n * cycles due to 2-way notification).\n *\n * @param {string} property Property name\n * @param {*} value New property value\n * @param {*} old Previous property value\n * @return {boolean} Whether the property should be considered a change\n * @protected\n */\n _shouldPropertyChange(property, value, old) {\n return mutablePropertyChange(this, property, value, old, true);\n }\n\n }\n\n return MutableData;\n\n});\n\n/**\n * Element class mixin to add the optional ability to skip strict\n * dirty-checking for objects and arrays (always consider them to be\n * \"dirty\") by setting a `mutable-data` attribute on an element instance.\n *\n * By default, `PropertyEffects` performs strict dirty checking on\n * objects, which means that any deep modifications to an object or array will\n * not be propagated unless \"immutable\" data patterns are used (i.e. all object\n * references from the root to the mutation were changed).\n *\n * Polymer also provides a proprietary data mutation and path notification API\n * (e.g. `notifyPath`, `set`, and array mutation API's) that allow efficient\n * mutation and notification of deep changes in an object graph to all elements\n * bound to the same object graph.\n *\n * In cases where neither immutable patterns nor the data mutation API can be\n * used, applying this mixin will allow Polymer to skip dirty checking for\n * objects and arrays (always consider them to be \"dirty\"). This allows a\n * user to make a deep modification to a bound object graph, and then either\n * simply re-set the object (e.g. `this.items = this.items`) or call `notifyPath`\n * (e.g. `this.notifyPath('items')`) to update the tree. Note that all\n * elements that wish to be updated based on deep mutations must apply this\n * mixin or otherwise skip strict dirty checking for objects/arrays.\n * Specifically, any elements in the binding tree between the source of a\n * mutation and the consumption of it must enable this mixin or apply the\n * `MutableData` mixin.\n *\n * While this mixin adds the ability to forgo Object/Array dirty checking,\n * the `mutableData` flag defaults to false and must be set on the instance.\n *\n * Note, the performance characteristics of propagating large object graphs\n * will be worse by relying on `mutableData: true` as opposed to using\n * strict dirty checking with immutable patterns or Polymer's path notification\n * API.\n *\n * @mixinFunction\n * @polymer\n * @summary Element class mixin to optionally skip strict dirty-checking\n * for objects and arrays\n */\nexport const OptionalMutableData = dedupingMixin(superClass => {\n\n /**\n * @mixinClass\n * @polymer\n * @implements {Polymer_OptionalMutableData}\n */\n class OptionalMutableData extends superClass {\n\n /** @nocollapse */\n static get properties() {\n return {\n /**\n * Instance-level flag for configuring the dirty-checking strategy\n * for this element. When true, Objects and Arrays will skip dirty\n * checking, otherwise strict equality checking will be used.\n */\n mutableData: Boolean\n };\n }\n\n /**\n * Overrides `PropertyEffects` to provide option for skipping\n * strict equality checking for Objects and Arrays.\n *\n * When `this.mutableData` is true on this instance, this method\n * pulls the value to dirty check against from the `__dataTemp` cache\n * (rather than the normal `__data` cache) for Objects. Since the temp\n * cache is cleared at the end of a turn, this implementation allows\n * side-effects of deep object changes to be processed by re-setting the\n * same object (using the temp cache as an in-turn backstop to prevent\n * cycles due to 2-way notification).\n *\n * @param {string} property Property name\n * @param {*} value New property value\n * @param {*} old Previous property value\n * @return {boolean} Whether the property should be considered a change\n * @protected\n */\n _shouldPropertyChange(property, value, old) {\n return mutablePropertyChange(this, property, value, old, this.mutableData);\n }\n }\n\n return OptionalMutableData;\n\n});\n\n// Export for use by legacy behavior\nMutableData._mutablePropertyChange = mutablePropertyChange;\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/**\n * Module for preparing and stamping instances of templates that utilize\n * Polymer's data-binding and declarative event listener features.\n *\n * Example:\n *\n * // Get a template from somewhere, e.g. light DOM\n * let template = this.querySelector('template');\n * // Prepare the template\n * let TemplateClass = Templatize.templatize(template);\n * // Instance the template with an initial data model\n * let instance = new TemplateClass({myProp: 'initial'});\n * // Insert the instance's DOM somewhere, e.g. element's shadow DOM\n * this.shadowRoot.appendChild(instance.root);\n * // Changing a property on the instance will propagate to bindings\n * // in the template\n * instance.myProp = 'new value';\n *\n * The `options` dictionary passed to `templatize` allows for customizing\n * features of the generated template class, including how outer-scope host\n * properties should be forwarded into template instances, how any instance\n * properties added into the template's scope should be notified out to\n * the host, and whether the instance should be decorated as a \"parent model\"\n * of any event handlers.\n *\n * // Customize property forwarding and event model decoration\n * let TemplateClass = Templatize.templatize(template, this, {\n * parentModel: true,\n * forwardHostProp(property, value) {...},\n * instanceProps: {...},\n * notifyInstanceProp(instance, property, value) {...},\n * });\n *\n * @summary Module for preparing and stamping instances of templates\n * utilizing Polymer templating features.\n */\n\nimport './boot.js';\n\nimport { PropertyEffects } from '../mixins/property-effects.js';\nimport { MutableData } from '../mixins/mutable-data.js';\nimport { strictTemplatePolicy, legacyWarnings } from './settings.js';\nimport { wrap } from './wrap.js';\n\n// Base class for HTMLTemplateElement extension that has property effects\n// machinery for propagating host properties to children. This is an ES5\n// class only because Babel (incorrectly) requires super() in the class\n// constructor even though no `this` is used and it returns an instance.\nlet newInstance = null;\n\n/**\n * @constructor\n * @extends {HTMLTemplateElement}\n * @private\n */\nfunction HTMLTemplateElementExtension() { return newInstance; }\nHTMLTemplateElementExtension.prototype = Object.create(HTMLTemplateElement.prototype, {\n constructor: {\n value: HTMLTemplateElementExtension,\n writable: true\n }\n});\n\n/**\n * @constructor\n * @implements {Polymer_PropertyEffects}\n * @extends {HTMLTemplateElementExtension}\n * @private\n */\nconst DataTemplate = PropertyEffects(HTMLTemplateElementExtension);\n\n/**\n * @constructor\n * @implements {Polymer_MutableData}\n * @extends {DataTemplate}\n * @private\n */\nconst MutableDataTemplate = MutableData(DataTemplate);\n\n// Applies a DataTemplate subclass to a <template> instance\nfunction upgradeTemplate(template, constructor) {\n newInstance = template;\n Object.setPrototypeOf(template, constructor.prototype);\n new constructor();\n newInstance = null;\n}\n\n/**\n * Base class for TemplateInstance.\n * @constructor\n * @extends {HTMLElement}\n * @implements {Polymer_PropertyEffects}\n * @private\n */\nconst templateInstanceBase = PropertyEffects(class {});\n\nexport function showHideChildren(hide, children) {\n for (let i=0; i<children.length; i++) {\n let n = children[i];\n // Ignore non-changes\n if (Boolean(hide) != Boolean(n.__hideTemplateChildren__)) {\n // clear and restore text\n if (n.nodeType === Node.TEXT_NODE) {\n if (hide) {\n n.__polymerTextContent__ = n.textContent;\n n.textContent = '';\n } else {\n n.textContent = n.__polymerTextContent__;\n }\n // remove and replace slot\n } else if (n.localName === 'slot') {\n if (hide) {\n n.__polymerReplaced__ = document.createComment('hidden-slot');\n wrap(wrap(n).parentNode).replaceChild(n.__polymerReplaced__, n);\n } else {\n const replace = n.__polymerReplaced__;\n if (replace) {\n wrap(wrap(replace).parentNode).replaceChild(n, replace);\n }\n }\n }\n // hide and show nodes\n else if (n.style) {\n if (hide) {\n n.__polymerDisplay__ = n.style.display;\n n.style.display = 'none';\n } else {\n n.style.display = n.__polymerDisplay__;\n }\n }\n }\n n.__hideTemplateChildren__ = hide;\n if (n._showHideChildren) {\n n._showHideChildren(hide);\n }\n }\n}\n\n/**\n * @polymer\n * @customElement\n * @appliesMixin PropertyEffects\n * @unrestricted\n */\nclass TemplateInstanceBase extends templateInstanceBase {\n constructor(props) {\n super();\n this._configureProperties(props);\n /** @type {!StampedTemplate} */\n this.root = this._stampTemplate(this.__dataHost);\n // Save list of stamped children\n let children = [];\n /** @suppress {invalidCasts} */\n this.children = /** @type {!NodeList} */ (children);\n // Polymer 1.x did not use `Polymer.dom` here so not bothering.\n for (let n = this.root.firstChild; n; n=n.nextSibling) {\n children.push(n);\n n.__templatizeInstance = this;\n }\n if (this.__templatizeOwner &&\n this.__templatizeOwner.__hideTemplateChildren__) {\n this._showHideChildren(true);\n }\n // Flush props only when props are passed if instance props exist\n // or when there isn't instance props.\n let options = this.__templatizeOptions;\n if ((props && options.instanceProps) || !options.instanceProps) {\n this._enableProperties();\n }\n }\n /**\n * Configure the given `props` by calling `_setPendingProperty`. Also\n * sets any properties stored in `__hostProps`.\n * @private\n * @param {Object} props Object of property name-value pairs to set.\n * @return {void}\n */\n _configureProperties(props) {\n let options = this.__templatizeOptions;\n if (options.forwardHostProp) {\n for (let hprop in this.__hostProps) {\n this._setPendingProperty(hprop, this.__dataHost['_host_' + hprop]);\n }\n }\n // Any instance props passed in the constructor will overwrite host props;\n // normally this would be a user error but we don't specifically filter them\n for (let iprop in props) {\n this._setPendingProperty(iprop, props[iprop]);\n }\n }\n /**\n * Forwards a host property to this instance. This method should be\n * called on instances from the `options.forwardHostProp` callback\n * to propagate changes of host properties to each instance.\n *\n * Note this method enqueues the change, which are flushed as a batch.\n *\n * @param {string} prop Property or path name\n * @param {*} value Value of the property to forward\n * @return {void}\n */\n forwardHostProp(prop, value) {\n if (this._setPendingPropertyOrPath(prop, value, false, true)) {\n this.__dataHost._enqueueClient(this);\n }\n }\n\n /**\n * Override point for adding custom or simulated event handling.\n *\n * @override\n * @param {!Node} node Node to add event listener to\n * @param {string} eventName Name of event\n * @param {function(!Event):void} handler Listener function to add\n * @return {void}\n */\n _addEventListenerToNode(node, eventName, handler) {\n if (this._methodHost && this.__templatizeOptions.parentModel) {\n // If this instance should be considered a parent model, decorate\n // events this template instance as `model`\n this._methodHost._addEventListenerToNode(node, eventName, (e) => {\n e.model = this;\n handler(e);\n });\n } else {\n // Otherwise delegate to the template's host (which could be)\n // another template instance\n let templateHost = this.__dataHost.__dataHost;\n if (templateHost) {\n templateHost._addEventListenerToNode(node, eventName, handler);\n }\n }\n }\n /**\n * Shows or hides the template instance top level child elements. For\n * text nodes, `textContent` is removed while \"hidden\" and replaced when\n * \"shown.\"\n * @param {boolean} hide Set to true to hide the children;\n * set to false to show them.\n * @return {void}\n * @protected\n */\n _showHideChildren(hide) {\n showHideChildren(hide, this.children);\n }\n /**\n * Overrides default property-effects implementation to intercept\n * textContent bindings while children are \"hidden\" and cache in\n * private storage for later retrieval.\n *\n * @override\n * @param {!Node} node The node to set a property on\n * @param {string} prop The property to set\n * @param {*} value The value to set\n * @return {void}\n * @protected\n */\n _setUnmanagedPropertyToNode(node, prop, value) {\n if (node.__hideTemplateChildren__ &&\n node.nodeType == Node.TEXT_NODE && prop == 'textContent') {\n node.__polymerTextContent__ = value;\n } else {\n super._setUnmanagedPropertyToNode(node, prop, value);\n }\n }\n /**\n * Find the parent model of this template instance. The parent model\n * is either another templatize instance that had option `parentModel: true`,\n * or else the host element.\n *\n * @return {!Polymer_PropertyEffects} The parent model of this instance\n */\n get parentModel() {\n let model = this.__parentModel;\n if (!model) {\n let options;\n model = this;\n do {\n // A template instance's `__dataHost` is a <template>\n // `model.__dataHost.__dataHost` is the template's host\n model = model.__dataHost.__dataHost;\n } while ((options = model.__templatizeOptions) && !options.parentModel);\n this.__parentModel = model;\n }\n return model;\n }\n\n /**\n * Stub of HTMLElement's `dispatchEvent`, so that effects that may\n * dispatch events safely no-op.\n *\n * @param {Event} event Event to dispatch\n * @return {boolean} Always true.\n * @override\n */\n dispatchEvent(event) { // eslint-disable-line no-unused-vars\n return true;\n }\n}\n\n/** @type {!DataTemplate} */\nTemplateInstanceBase.prototype.__dataHost;\n/** @type {!TemplatizeOptions} */\nTemplateInstanceBase.prototype.__templatizeOptions;\n/** @type {!Polymer_PropertyEffects} */\nTemplateInstanceBase.prototype._methodHost;\n/** @type {!Object} */\nTemplateInstanceBase.prototype.__templatizeOwner;\n/** @type {!Object} */\nTemplateInstanceBase.prototype.__hostProps;\n\n/**\n * @constructor\n * @extends {TemplateInstanceBase}\n * @implements {Polymer_MutableData}\n * @private\n */\nconst MutableTemplateInstanceBase = MutableData(\n // This cast shouldn't be neccessary, but Closure doesn't understand that\n // TemplateInstanceBase is a constructor function.\n /** @type {function(new:TemplateInstanceBase)} */ (TemplateInstanceBase));\n\nfunction findMethodHost(template) {\n // Technically this should be the owner of the outermost template.\n // In shadow dom, this is always getRootNode().host, but we can\n // approximate this via cooperation with our dataHost always setting\n // `_methodHost` as long as there were bindings (or id's) on this\n // instance causing it to get a dataHost.\n let templateHost = template.__dataHost;\n return templateHost && templateHost._methodHost || templateHost;\n}\n\n/* eslint-disable valid-jsdoc */\n/**\n * @suppress {missingProperties} class.prototype is not defined for some reason\n */\nfunction createTemplatizerClass(template, templateInfo, options) {\n /**\n * @constructor\n * @extends {TemplateInstanceBase}\n */\n let templatizerBase = options.mutableData ?\n MutableTemplateInstanceBase : TemplateInstanceBase;\n\n // Affordance for global mixins onto TemplatizeInstance\n if (templatize.mixin) {\n templatizerBase = templatize.mixin(templatizerBase);\n }\n\n /**\n * Anonymous class created by the templatize\n * @constructor\n * @private\n */\n let klass = class extends templatizerBase { };\n /** @override */\n klass.prototype.__templatizeOptions = options;\n klass.prototype._bindTemplate(template);\n addNotifyEffects(klass, template, templateInfo, options);\n return klass;\n}\n\n/**\n * Adds propagate effects from the template to the template instance for\n * properties that the host binds to the template using the `_host_` prefix.\n *\n * @suppress {missingProperties} class.prototype is not defined for some reason\n */\nfunction addPropagateEffects(target, templateInfo, options, methodHost) {\n let userForwardHostProp = options.forwardHostProp;\n if (userForwardHostProp && templateInfo.hasHostProps) {\n // Under the `removeNestedTemplates` optimization, a custom element like\n // `dom-if` or `dom-repeat` can itself be treated as the \"template\"; this\n // flag is used to switch between upgrading a `<template>` to be a property\n // effects client vs. adding the effects directly to the custom element\n const isTemplate = target.localName == 'template';\n // Provide data API and property effects on memoized template class\n let klass = templateInfo.templatizeTemplateClass;\n if (!klass) {\n if (isTemplate) {\n /**\n * @constructor\n * @extends {DataTemplate}\n */\n let templatizedBase =\n options.mutableData ? MutableDataTemplate : DataTemplate;\n\n // NOTE: due to https://github.com/google/closure-compiler/issues/2928,\n // combining the next two lines into one assignment causes a spurious\n // type error.\n /** @private */\n class TemplatizedTemplate extends templatizedBase {}\n klass = templateInfo.templatizeTemplateClass = TemplatizedTemplate;\n } else {\n /**\n * @constructor\n * @extends {PolymerElement}\n */\n const templatizedBase = target.constructor;\n\n // Create a cached subclass of the base custom element class onto which\n // to put the template-specific propagate effects\n // NOTE: due to https://github.com/google/closure-compiler/issues/2928,\n // combining the next two lines into one assignment causes a spurious\n // type error.\n /** @private */\n class TemplatizedTemplateExtension extends templatizedBase {}\n klass = templateInfo.templatizeTemplateClass =\n TemplatizedTemplateExtension;\n }\n // Add template - >instances effects\n // and host <- template effects\n let hostProps = templateInfo.hostProps;\n for (let prop in hostProps) {\n klass.prototype._addPropertyEffect('_host_' + prop,\n klass.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,\n {fn: createForwardHostPropEffect(prop, userForwardHostProp)});\n klass.prototype._createNotifyingProperty('_host_' + prop);\n }\n if (legacyWarnings && methodHost) {\n warnOnUndeclaredProperties(templateInfo, options, methodHost);\n }\n }\n // Mix any pre-bound data into __data; no need to flush this to\n // instances since they pull from the template at instance-time\n if (target.__dataProto) {\n // Note, generally `__dataProto` could be chained, but it's guaranteed\n // to not be since this is a vanilla template we just added effects to\n Object.assign(target.__data, target.__dataProto);\n }\n if (isTemplate) {\n upgradeTemplate(target, klass);\n // Clear any pending data for performance\n target.__dataTemp = {};\n target.__dataPending = null;\n target.__dataOld = null;\n target._enableProperties();\n } else {\n // Swizzle the cached subclass prototype onto the custom element\n Object.setPrototypeOf(target, klass.prototype);\n // Check for any pre-bound instance host properties, and do the\n // instance property delete/assign dance for those (directly into data;\n // not need to go through accessor since they are pulled at instance time)\n const hostProps = templateInfo.hostProps;\n for (let prop in hostProps) {\n prop = '_host_' + prop;\n if (prop in target) {\n const val = target[prop];\n delete target[prop];\n target.__data[prop] = val;\n }\n }\n }\n }\n}\n/* eslint-enable valid-jsdoc */\n\nfunction createForwardHostPropEffect(hostProp, userForwardHostProp) {\n return function forwardHostProp(template, prop, props) {\n userForwardHostProp.call(template.__templatizeOwner,\n prop.substring('_host_'.length), props[prop]);\n };\n}\n\nfunction addNotifyEffects(klass, template, templateInfo, options) {\n let hostProps = templateInfo.hostProps || {};\n for (let iprop in options.instanceProps) {\n delete hostProps[iprop];\n let userNotifyInstanceProp = options.notifyInstanceProp;\n if (userNotifyInstanceProp) {\n klass.prototype._addPropertyEffect(iprop,\n klass.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,\n {fn: createNotifyInstancePropEffect(iprop, userNotifyInstanceProp)});\n }\n }\n if (options.forwardHostProp && template.__dataHost) {\n for (let hprop in hostProps) {\n // As we're iterating hostProps in this function, note whether\n // there were any, for an optimization in addPropagateEffects\n if (!templateInfo.hasHostProps) {\n templateInfo.hasHostProps = true;\n }\n klass.prototype._addPropertyEffect(hprop,\n klass.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,\n {fn: createNotifyHostPropEffect()});\n }\n }\n}\n\nfunction createNotifyInstancePropEffect(instProp, userNotifyInstanceProp) {\n return function notifyInstanceProp(inst, prop, props) {\n userNotifyInstanceProp.call(inst.__templatizeOwner,\n inst, prop, props[prop]);\n };\n}\n\nfunction createNotifyHostPropEffect() {\n return function notifyHostProp(inst, prop, props) {\n inst.__dataHost._setPendingPropertyOrPath('_host_' + prop, props[prop], true, true);\n };\n}\n\n\n/**\n * Returns an anonymous `PropertyEffects` class bound to the\n * `<template>` provided. Instancing the class will result in the\n * template being stamped into a document fragment stored as the instance's\n * `root` property, after which it can be appended to the DOM.\n *\n * Templates may utilize all Polymer data-binding features as well as\n * declarative event listeners. Event listeners and inline computing\n * functions in the template will be called on the host of the template.\n *\n * The constructor returned takes a single argument dictionary of initial\n * property values to propagate into template bindings. Additionally\n * host properties can be forwarded in, and instance properties can be\n * notified out by providing optional callbacks in the `options` dictionary.\n *\n * Valid configuration in `options` are as follows:\n *\n * - `forwardHostProp(property, value)`: Called when a property referenced\n * in the template changed on the template's host. As this library does\n * not retain references to templates instanced by the user, it is the\n * templatize owner's responsibility to forward host property changes into\n * user-stamped instances. The `instance.forwardHostProp(property, value)`\n * method on the generated class should be called to forward host\n * properties into the template to prevent unnecessary property-changed\n * notifications. Any properties referenced in the template that are not\n * defined in `instanceProps` will be notified up to the template's host\n * automatically.\n * - `instanceProps`: Dictionary of property names that will be added\n * to the instance by the templatize owner. These properties shadow any\n * host properties, and changes within the template to these properties\n * will result in `notifyInstanceProp` being called.\n * - `mutableData`: When `true`, the generated class will skip strict\n * dirty-checking for objects and arrays (always consider them to be\n * \"dirty\").\n * - `notifyInstanceProp(instance, property, value)`: Called when\n * an instance property changes. Users may choose to call `notifyPath`\n * on e.g. the owner to notify the change.\n * - `parentModel`: When `true`, events handled by declarative event listeners\n * (`on-event=\"handler\"`) will be decorated with a `model` property pointing\n * to the template instance that stamped it. It will also be returned\n * from `instance.parentModel` in cases where template instance nesting\n * causes an inner model to shadow an outer model.\n *\n * All callbacks are called bound to the `owner`. Any context\n * needed for the callbacks (such as references to `instances` stamped)\n * should be stored on the `owner` such that they can be retrieved via\n * `this`.\n *\n * When `options.forwardHostProp` is declared as an option, any properties\n * referenced in the template will be automatically forwarded from the host of\n * the `<template>` to instances, with the exception of any properties listed in\n * the `options.instanceProps` object. `instanceProps` are assumed to be\n * managed by the owner of the instances, either passed into the constructor\n * or set after the fact. Note, any properties passed into the constructor will\n * always be set to the instance (regardless of whether they would normally\n * be forwarded from the host).\n *\n * Note that `templatize()` can be run only once for a given `<template>`.\n * Further calls will result in an error. Also, there is a special\n * behavior if the template was duplicated through a mechanism such as\n * `<dom-repeat>` or `<test-fixture>`. In this case, all calls to\n * `templatize()` return the same class for all duplicates of a template.\n * The class returned from `templatize()` is generated only once using\n * the `options` from the first call. This means that any `options`\n * provided to subsequent calls will be ignored. Therefore, it is very\n * important not to close over any variables inside the callbacks. Also,\n * arrow functions must be avoided because they bind the outer `this`.\n * Inside the callbacks, any contextual information can be accessed\n * through `this`, which points to the `owner`.\n *\n * @param {!HTMLTemplateElement} template Template to templatize\n * @param {Polymer_PropertyEffects=} owner Owner of the template instances;\n * any optional callbacks will be bound to this owner.\n * @param {Object=} options Options dictionary (see summary for details)\n * @return {function(new:TemplateInstanceBase, Object=)} Generated class bound\n * to the template provided\n * @suppress {invalidCasts}\n */\nexport function templatize(template, owner, options) {\n // Under strictTemplatePolicy, the templatized element must be owned\n // by a (trusted) Polymer element, indicated by existence of _methodHost;\n // e.g. for dom-if & dom-repeat in main document, _methodHost is null\n if (strictTemplatePolicy && !findMethodHost(template)) {\n throw new Error('strictTemplatePolicy: template owner not trusted');\n }\n options = /** @type {!TemplatizeOptions} */(options || {});\n if (template.__templatizeOwner) {\n throw new Error('A <template> can only be templatized once');\n }\n template.__templatizeOwner = owner;\n const ctor = owner ? owner.constructor : TemplateInstanceBase;\n let templateInfo = ctor._parseTemplate(template);\n // Get memoized base class for the prototypical template, which\n // includes property effects for binding template & forwarding\n /**\n * @constructor\n * @extends {TemplateInstanceBase}\n */\n let baseClass = templateInfo.templatizeInstanceClass;\n if (!baseClass) {\n baseClass = createTemplatizerClass(template, templateInfo, options);\n templateInfo.templatizeInstanceClass = baseClass;\n }\n const methodHost = findMethodHost(template);\n // Host property forwarding must be installed onto template instance\n addPropagateEffects(template, templateInfo, options, methodHost);\n // Subclass base class and add reference for this specific template\n /** @private */\n let klass = class TemplateInstance extends baseClass {};\n /** @override */\n klass.prototype._methodHost = methodHost;\n /** @override */\n klass.prototype.__dataHost = /** @type {!DataTemplate} */ (template);\n /** @override */\n klass.prototype.__templatizeOwner = /** @type {!Object} */ (owner);\n /** @override */\n klass.prototype.__hostProps = templateInfo.hostProps;\n klass = /** @type {function(new:TemplateInstanceBase)} */(klass); //eslint-disable-line no-self-assign\n return klass;\n}\n\nfunction warnOnUndeclaredProperties(templateInfo, options, methodHost) {\n const declaredProps = methodHost.constructor._properties;\n const {propertyEffects} = templateInfo;\n const {instanceProps} = options;\n for (let prop in propertyEffects) {\n // Ensure properties with template effects are declared on the outermost\n // host (`methodHost`), unless they are instance props or static functions\n if (!declaredProps[prop] && !(instanceProps && instanceProps[prop])) {\n const effects = propertyEffects[prop];\n for (let i=0; i<effects.length; i++) {\n const {part} = effects[i].info;\n if (!(part.signature && part.signature.static)) {\n console.warn(`Property '${prop}' used in template but not ` +\n `declared in 'properties'; attribute will not be observed.`);\n break;\n }\n }\n }\n }\n}\n\n/**\n * Returns the template \"model\" associated with a given element, which\n * serves as the binding scope for the template instance the element is\n * contained in. A template model is an instance of\n * `TemplateInstanceBase`, and should be used to manipulate data\n * associated with this template instance.\n *\n * Example:\n *\n * let model = modelForElement(el);\n * if (model.index < 10) {\n * model.set('item.checked', true);\n * }\n *\n * @param {HTMLElement} template The model will be returned for\n * elements stamped from this template (accepts either an HTMLTemplateElement)\n * or a `<dom-if>`/`<dom-repeat>` element when using `removeNestedTemplates`\n * optimization.\n * @param {Node=} node Node for which to return a template model.\n * @return {TemplateInstanceBase} Template instance representing the\n * binding scope for the element\n */\nexport function modelForElement(template, node) {\n let model;\n while (node) {\n // An element with a __templatizeInstance marks the top boundary\n // of a scope; walk up until we find one, and then ensure that\n // its __dataHost matches `this`, meaning this dom-repeat stamped it\n if ((model = node.__dataHost ? node : node.__templatizeInstance)) {\n // Found an element stamped by another template; keep walking up\n // from its __dataHost\n if (model.__dataHost != template) {\n node = model.__dataHost;\n } else {\n return model;\n }\n } else {\n // Still in a template scope, keep going up until\n // a __templatizeInstance is found\n node = wrap(node).parentNode;\n }\n }\n return null;\n}\n\nexport { TemplateInstanceBase };\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport './boot.js';\n\nimport './mixin.js';\nimport './async.js';\n\n/**\n * @summary Collapse multiple callbacks into one invocation after a timer.\n */\nexport class Debouncer {\n constructor() {\n this._asyncModule = null;\n this._callback = null;\n this._timer = null;\n }\n /**\n * Sets the scheduler; that is, a module with the Async interface,\n * a callback and optional arguments to be passed to the run function\n * from the async module.\n *\n * @param {!AsyncInterface} asyncModule Object with Async interface.\n * @param {function()} callback Callback to run.\n * @return {void}\n */\n setConfig(asyncModule, callback) {\n this._asyncModule = asyncModule;\n this._callback = callback;\n this._timer = this._asyncModule.run(() => {\n this._timer = null;\n debouncerQueue.delete(this);\n this._callback();\n });\n }\n /**\n * Cancels an active debouncer and returns a reference to itself.\n *\n * @return {void}\n */\n cancel() {\n if (this.isActive()) {\n this._cancelAsync();\n // Canceling a debouncer removes its spot from the flush queue,\n // so if a debouncer is manually canceled and re-debounced, it\n // will reset its flush order (this is a very minor difference from 1.x)\n // Re-debouncing via the `debounce` API retains the 1.x FIFO flush order\n debouncerQueue.delete(this);\n }\n }\n /**\n * Cancels a debouncer's async callback.\n *\n * @return {void}\n */\n _cancelAsync() {\n if (this.isActive()) {\n this._asyncModule.cancel(/** @type {number} */(this._timer));\n this._timer = null;\n }\n }\n /**\n * Flushes an active debouncer and returns a reference to itself.\n *\n * @return {void}\n */\n flush() {\n if (this.isActive()) {\n this.cancel();\n this._callback();\n }\n }\n /**\n * Returns true if the debouncer is active.\n *\n * @return {boolean} True if active.\n */\n isActive() {\n return this._timer != null;\n }\n /**\n * Creates a debouncer if no debouncer is passed as a parameter\n * or it cancels an active debouncer otherwise. The following\n * example shows how a debouncer can be called multiple times within a\n * microtask and \"debounced\" such that the provided callback function is\n * called once. Add this method to a custom element:\n *\n * ```js\n * import {microTask} from '@polymer/polymer/lib/utils/async.js';\n * import {Debouncer} from '@polymer/polymer/lib/utils/debounce.js';\n * // ...\n *\n * _debounceWork() {\n * this._debounceJob = Debouncer.debounce(this._debounceJob,\n * microTask, () => this._doWork());\n * }\n * ```\n *\n * If the `_debounceWork` method is called multiple times within the same\n * microtask, the `_doWork` function will be called only once at the next\n * microtask checkpoint.\n *\n * Note: In testing it is often convenient to avoid asynchrony. To accomplish\n * this with a debouncer, you can use `enqueueDebouncer` and\n * `flush`. For example, extend the above example by adding\n * `enqueueDebouncer(this._debounceJob)` at the end of the\n * `_debounceWork` method. Then in a test, call `flush` to ensure\n * the debouncer has completed.\n *\n * @param {Debouncer?} debouncer Debouncer object.\n * @param {!AsyncInterface} asyncModule Object with Async interface\n * @param {function()} callback Callback to run.\n * @return {!Debouncer} Returns a debouncer object.\n */\n static debounce(debouncer, asyncModule, callback) {\n if (debouncer instanceof Debouncer) {\n // Cancel the async callback, but leave in debouncerQueue if it was\n // enqueued, to maintain 1.x flush order\n debouncer._cancelAsync();\n } else {\n debouncer = new Debouncer();\n }\n debouncer.setConfig(asyncModule, callback);\n return debouncer;\n }\n}\n\nlet debouncerQueue = new Set();\n\n/**\n * Adds a `Debouncer` to a list of globally flushable tasks.\n *\n * @param {!Debouncer} debouncer Debouncer to enqueue\n * @return {void}\n */\nexport const enqueueDebouncer = function(debouncer) {\n debouncerQueue.add(debouncer);\n};\n\n/**\n * Flushes any enqueued debouncers\n *\n * @return {boolean} Returns whether any debouncers were flushed\n */\nexport const flushDebouncers = function() {\n const didFlush = Boolean(debouncerQueue.size);\n // If new debouncers are added while flushing, Set.forEach will ensure\n // newly added ones are also flushed\n debouncerQueue.forEach(debouncer => {\n try {\n debouncer.flush();\n } catch(e) {\n setTimeout(() => {\n throw e;\n });\n }\n });\n return didFlush;\n};","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport './boot.js';\nimport {enqueueDebouncer, flushDebouncers} from '../utils/debounce.js';\nexport {enqueueDebouncer};\n\n/**\n * Forces several classes of asynchronously queued tasks to flush:\n * - Debouncers added via `enqueueDebouncer`\n * - ShadyDOM distribution\n *\n * @return {void}\n */\nexport const flush = function() {\n let shadyDOM, debouncers;\n do {\n shadyDOM = window.ShadyDOM && ShadyDOM.flush();\n if (window.ShadyCSS && window.ShadyCSS.ScopingShim) {\n window.ShadyCSS.ScopingShim.flush();\n }\n debouncers = flushDebouncers();\n } while (shadyDOM || debouncers);\n};\n","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\n\n/**\n * @fileoverview\n *\n * Module to hide `<dom-bind>`, `<dom-if>`, and `<dom-repeat>` elements\n * optimally in ShadyDOM\n */\n\nimport {legacyOptimizations, useShadow} from './settings.js';\n\nlet elementsHidden = false;\n\n/**\n * @return {boolean} True if elements will be hidden globally\n */\nexport function hideElementsGlobally() {\n if (legacyOptimizations && !useShadow) {\n if (!elementsHidden) {\n elementsHidden = true;\n const style = document.createElement('style');\n style.textContent = 'dom-bind,dom-if,dom-repeat{display:none;}';\n document.head.appendChild(style);\n }\n return true;\n }\n return false;\n}","/**\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport { PolymerElement } from '../../polymer-element.js';\n\nimport { TemplateInstanceBase, templatize, modelForElement } from '../utils/templatize.js'; // eslint-disable-line no-unused-vars\nimport { Debouncer } from '../utils/debounce.js';\nimport { enqueueDebouncer, flush } from '../utils/flush.js';\nimport { OptionalMutableData } from '../mixins/mutable-data.js';\nimport { matches, translate } from '../utils/path.js';\nimport { timeOut, microTask } from '../utils/async.js';\nimport { wrap } from '../utils/wrap.js';\nimport { hideElementsGlobally } from '../utils/hide-template-controls.js';\nimport { suppressTemplateNotifications } from '../utils/settings.js';\n\n/**\n * @constructor\n * @implements {Polymer_OptionalMutableData}\n * @extends {PolymerElement}\n * @private\n */\nconst domRepeatBase = OptionalMutableData(PolymerElement);\n\n/**\n * The `<dom-repeat>` element will automatically stamp and binds one instance\n * of template content to each object in a user-provided array.\n * `dom-repeat` accepts an `items` property, and one instance of the template\n * is stamped for each item into the DOM at the location of the `dom-repeat`\n * element. The `item` property will be set on each instance's binding\n * scope, thus templates should bind to sub-properties of `item`.\n *\n * Example:\n *\n * ```html\n * <dom-module id=\"employee-list\">\n *\n * <template>\n *\n * <div> Employee list: </div>\n * <dom-repeat items=\"{{employees}}\">\n * <template>\n * <div>First name: <span>{{item.first}}</span></div>\n * <div>Last name: <span>{{item.last}}</span></div>\n * </template>\n * </dom-repeat>\n *\n * </template>\n *\n * </dom-module>\n * ```\n *\n * With the following custom element definition:\n *\n * ```js\n * class EmployeeList extends PolymerElement {\n * static get is() { return 'employee-list'; }\n * static get properties() {\n * return {\n * employees: {\n * value() {\n * return [\n * {first: 'Bob', last: 'Smith'},\n * {first: 'Sally', last: 'Johnson'},\n * ...\n * ];\n * }\n * }\n * };\n * }\n * }\n * ```\n *\n * Notifications for changes to items sub-properties will be forwarded to template\n * instances, which will update via the normal structured data notification system.\n *\n * Mutations to the `items` array itself should be made using the Array\n * mutation API's on the PropertyEffects mixin (`push`, `pop`, `splice`,\n * `shift`, `unshift`), and template instances will be kept in sync with the\n * data in the array.\n *\n * Events caught by event handlers within the `dom-repeat` template will be\n * decorated with a `model` property, which represents the binding scope for\n * each template instance. The model should be used to manipulate data on the\n * instance, for example `event.model.set('item.checked', true);`.\n *\n * Alternatively, the model for a template instance for an element stamped by\n * a `dom-repeat` can be obtained using the `modelForElement` API on the\n * `dom-repeat` that stamped it, for example\n * `this.$.domRepeat.modelForElement(event.target).set('item.checked', true);`.\n * This may be useful for manipulating instance data of event targets obtained\n * by event handlers on parents of the `dom-repeat` (event delegation).\n *\n * A view-specific filter/sort may be applied to each `dom-repeat` by supplying a\n * `filter` and/or `sort` property. This may be a string that names a function on\n * the host, or a function may be assigned to the property directly. The functions\n * should implemented following the standard `Array` filter/sort API.\n *\n * In order to re-run the filter or sort functions based on changes to sub-fields\n * of `items`, the `observe` property may be set as a space-separated list of\n * `item` sub-fields that should cause a re-filter/sort when modified. If\n * the filter or sort function depends on properties not contained in `items`,\n * the user should observe changes to those properties and call `render` to update\n * the view based on the dependency change.\n *\n * For example, for an `dom-repeat` with a filter of the following:\n *\n * ```js\n * isEngineer(item) {\n * return item.type == 'engineer' || item.manager.type == 'engineer';\n * }\n * ```\n *\n * Then the `observe` property should be configured as follows:\n *\n * ```html\n * <dom-repeat items=\"{{employees}}\" filter=\"isEngineer\" observe=\"type manager.type\">\n * ```\n *\n * @customElement\n * @polymer\n * @extends {domRepeatBase}\n * @appliesMixin OptionalMutableData\n * @summary Custom element for stamping instance of a template bound to\n * items in an array.\n */\nexport class DomRepeat extends domRepeatBase {\n\n // Not needed to find template; can be removed once the analyzer\n // can find the tag name from customElements.define call\n static get is() { return 'dom-repeat'; }\n\n static get template() { return null; }\n\n static get properties() {\n\n /**\n * Fired whenever DOM is added or removed by this template (by\n * default, rendering occurs lazily). To force immediate rendering, call\n * `render`.\n *\n * @event dom-change\n */\n return {\n\n /**\n * An array containing items determining how many instances of the template\n * to stamp and that that each template instance should bind to.\n */\n items: {\n type: Array\n },\n\n /**\n * The name of the variable to add to the binding scope for the array\n * element associated with a given template instance.\n */\n as: {\n type: String,\n value: 'item'\n },\n\n /**\n * The name of the variable to add to the binding scope with the index\n * of the instance in the sorted and filtered list of rendered items.\n * Note, for the index in the `this.items` array, use the value of the\n * `itemsIndexAs` property.\n */\n indexAs: {\n type: String,\n value: 'index'\n },\n\n /**\n * The name of the variable to add to the binding scope with the index\n * of the instance in the `this.items` array. Note, for the index of\n * this instance in the sorted and filtered list of rendered items,\n * use the value of the `indexAs` property.\n */\n itemsIndexAs: {\n type: String,\n value: 'itemsIndex'\n },\n\n /**\n * A function that should determine the sort order of the items. This\n * property should either be provided as a string, indicating a method\n * name on the element's host, or else be an actual function. The\n * function should match the sort function passed to `Array.sort`.\n * Using a sort function has no effect on the underlying `items` array.\n */\n sort: {\n type: Function,\n observer: '__sortChanged'\n },\n\n /**\n * A function that can be used to filter items out of the view. This\n * property should either be provided as a string, indicating a method\n * name on the element's host, or else be an actual function. The\n * function should match the sort function passed to `Array.filter`.\n * Using a filter function has no effect on the underlying `items` array.\n */\n filter: {\n type: Function,\n observer: '__filterChanged'\n },\n\n /**\n * When using a `filter` or `sort` function, the `observe` property\n * should be set to a space-separated list of the names of item\n * sub-fields that should trigger a re-sort or re-filter when changed.\n * These should generally be fields of `item` that the sort or filter\n * function depends on.\n */\n observe: {\n type: String,\n observer: '__observeChanged'\n },\n\n /**\n * When using a `filter` or `sort` function, the `delay` property\n * determines a debounce time in ms after a change to observed item\n * properties that must pass before the filter or sort is re-run.\n * This is useful in rate-limiting shuffling of the view when\n * item changes may be frequent.\n */\n delay: Number,\n\n /**\n * Count of currently rendered items after `filter` (if any) has been applied.\n * If \"chunking mode\" is enabled, `renderedItemCount` is updated each time a\n * set of template instances is rendered.\n *\n */\n renderedItemCount: {\n type: Number,\n notify: !suppressTemplateNotifications,\n readOnly: true\n },\n\n /**\n * When greater than zero, defines an initial count of template instances\n * to render after setting the `items` array, before the next paint, and\n * puts the `dom-repeat` into \"chunking mode\". The remaining items (and\n * any future items as a result of pushing onto the array) will be created\n * and rendered incrementally at each animation frame thereof until all\n * instances have been rendered.\n */\n initialCount: {\n type: Number\n },\n\n /**\n * When `initialCount` is used, this property defines a frame rate (in\n * fps) to target by throttling the number of instances rendered each\n * frame to not exceed the budget for the target frame rate. The\n * framerate is effectively the number of `requestAnimationFrame`s that\n * it tries to allow to actually fire in a given second. It does this\n * by measuring the time between `rAF`s and continuously adjusting the\n * number of items created each `rAF` to maintain the target framerate.\n * Setting this to a higher number allows lower latency and higher\n * throughput for event handlers and other tasks, but results in a\n * longer time for the remaining items to complete rendering.\n */\n targetFramerate: {\n type: Number,\n value: 20\n },\n\n _targetFrameTime: {\n type: Number,\n computed: '__computeFrameTime(targetFramerate)'\n },\n\n /**\n * When the global `suppressTemplateNotifications` setting is used, setting\n * `notifyDomChange: true` will enable firing `dom-change` events on this\n * element.\n */\n notifyDomChange: {\n type: Boolean\n },\n\n /**\n * When chunking is enabled via `initialCount` and the `items` array is\n * set to a new array, this flag controls whether the previously rendered\n * instances are reused or not.\n *\n * When `true`, any previously rendered template instances are updated in\n * place to their new item values synchronously in one shot, and then any\n * further items (if any) are chunked out. When `false`, the list is\n * returned back to its `initialCount` (any instances over the initial\n * count are discarded) and the remainder of the list is chunked back in.\n * Set this to `true` to avoid re-creating the list and losing scroll\n * position, although note that when changing the list to completely\n * different data the render thread will be blocked until all existing\n * instances are updated to their new data.\n */\n reuseChunkedInstances: {\n type: Boolean\n }\n\n };\n\n }\n\n static get observers() {\n return [ '__itemsChanged(items.*)' ];\n }\n\n constructor() {\n super();\n this.__instances = [];\n this.__renderDebouncer = null;\n this.__itemsIdxToInstIdx = {};\n this.__chunkCount = null;\n this.__renderStartTime = null;\n this.__itemsArrayChanged = false;\n this.__shouldMeasureChunk = false;\n this.__shouldContinueChunking = false;\n this.__chunkingId = 0;\n this.__sortFn = null;\n this.__filterFn = null;\n this.__observePaths = null;\n /** @type {?function(new:TemplateInstanceBase, Object=)} */\n this.__ctor = null;\n this.__isDetached = true;\n this.template = null;\n /** @type {TemplateInfo} */\n this._templateInfo;\n }\n\n /**\n * @override\n * @return {void}\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.__isDetached = true;\n for (let i=0; i<this.__instances.length; i++) {\n this.__detachInstance(i);\n }\n // Stop chunking if one was in progress\n if (this.__chunkingId) {\n cancelAnimationFrame(this.__chunkingId);\n }\n }\n\n /**\n * @override\n * @return {void}\n */\n connectedCallback() {\n super.connectedCallback();\n if (!hideElementsGlobally()) {\n this.style.display = 'none';\n }\n // only perform attachment if the element was previously detached.\n if (this.__isDetached) {\n this.__isDetached = false;\n let wrappedParent = wrap(wrap(this).parentNode);\n for (let i=0; i<this.__instances.length; i++) {\n this.__attachInstance(i, wrappedParent);\n }\n // Restart chunking if one was in progress when disconnected\n if (this.__chunkingId) {\n this.__render();\n }\n }\n }\n\n __ensureTemplatized() {\n // Templatizing (generating the instance constructor) needs to wait\n // until ready, since won't have its template content handed back to\n // it until then\n if (!this.__ctor) {\n // When `removeNestedTemplates` is true, the \"template\" is the element\n // itself, which has been given a `_templateInfo` property\n const thisAsTemplate = /** @type {!HTMLTemplateElement} */ (\n /** @type {!HTMLElement} */ (this));\n let template = this.template = thisAsTemplate._templateInfo ?\n thisAsTemplate :\n /** @type {!HTMLTemplateElement} */ (this.querySelector('template'));\n if (!template) {\n // Wait until childList changes and template should be there by then\n let observer = new MutationObserver(() => {\n if (this.querySelector('template')) {\n observer.disconnect();\n this.__render();\n } else {\n throw new Error('dom-repeat requires a <template> child');\n }\n });\n observer.observe(this, {childList: true});\n return false;\n }\n // Template instance props that should be excluded from forwarding\n let instanceProps = {};\n instanceProps[this.as] = true;\n instanceProps[this.indexAs] = true;\n instanceProps[this.itemsIndexAs] = true;\n this.__ctor = templatize(template, this, {\n mutableData: this.mutableData,\n parentModel: true,\n instanceProps: instanceProps,\n /**\n * @this {DomRepeat}\n * @param {string} prop Property to set\n * @param {*} value Value to set property to\n */\n forwardHostProp: function(prop, value) {\n let i$ = this.__instances;\n for (let i=0, inst; (i<i$.length) && (inst=i$[i]); i++) {\n inst.forwardHostProp(prop, value);\n }\n },\n /**\n * @this {DomRepeat}\n * @param {Object} inst Instance to notify\n * @param {string} prop Property to notify\n * @param {*} value Value to notify\n */\n notifyInstanceProp: function(inst, prop, value) {\n if (matches(this.as, prop)) {\n let idx = inst[this.itemsIndexAs];\n if (prop == this.as) {\n this.items[idx] = value;\n }\n let path = translate(this.as, `${JSCompiler_renameProperty('items', this)}.${idx}`, prop);\n this.notifyPath(path, value);\n }\n }\n });\n }\n return true;\n }\n\n __getMethodHost() {\n // Technically this should be the owner of the outermost template.\n // In shadow dom, this is always getRootNode().host, but we can\n // approximate this via cooperation with our dataHost always setting\n // `_methodHost` as long as there were bindings (or id's) on this\n // instance causing it to get a dataHost.\n return this.__dataHost._methodHost || this.__dataHost;\n }\n\n __functionFromPropertyValue(functionOrMethodName) {\n if (typeof functionOrMethodName === 'string') {\n let methodName = functionOrMethodName;\n let obj = this.__getMethodHost();\n return function() { return obj[methodName].apply(obj, arguments); };\n }\n\n return functionOrMethodName;\n }\n\n __sortChanged(sort) {\n this.__sortFn = this.__functionFromPropertyValue(sort);\n if (this.items) { this.__debounceRender(this.__render); }\n }\n\n __filterChanged(filter) {\n this.__filterFn = this.__functionFromPropertyValue(filter);\n if (this.items) { this.__debounceRender(this.__render); }\n }\n\n __computeFrameTime(rate) {\n return Math.ceil(1000/rate);\n }\n\n __observeChanged() {\n this.__observePaths = this.observe &&\n this.observe.replace('.*', '.').split(' ');\n }\n\n __handleObservedPaths(path) {\n // Handle cases where path changes should cause a re-sort/filter\n if (this.__sortFn || this.__filterFn) {\n if (!path) {\n // Always re-render if the item itself changed\n this.__debounceRender(this.__render, this.delay);\n } else if (this.__observePaths) {\n // Otherwise, re-render if the path changed matches an observed path\n let paths = this.__observePaths;\n for (let i=0; i<paths.length; i++) {\n if (path.indexOf(paths[i]) === 0) {\n this.__debounceRender(this.__render, this.delay);\n }\n }\n }\n }\n }\n\n __itemsChanged(change) {\n if (this.items && !Array.isArray(this.items)) {\n console.warn('dom-repeat expected array for `items`, found', this.items);\n }\n // If path was to an item (e.g. 'items.3' or 'items.3.foo'), forward the\n // path to that instance synchronously (returns false for non-item paths)\n if (!this.__handleItemPath(change.path, change.value)) {\n // Otherwise, the array was reset ('items') or spliced ('items.splices'),\n // so queue a render. Restart chunking when the items changed (for\n // backward compatibility), unless `reuseChunkedInstances` option is set\n if (change.path === 'items') {\n this.__itemsArrayChanged = true;\n }\n this.__debounceRender(this.__render);\n }\n }\n\n /**\n * @param {function(this:DomRepeat)} fn Function to debounce.\n * @param {number=} delay Delay in ms to debounce by.\n */\n __debounceRender(fn, delay = 0) {\n this.__renderDebouncer = Debouncer.debounce(\n this.__renderDebouncer\n , delay > 0 ? timeOut.after(delay) : microTask\n , fn.bind(this));\n enqueueDebouncer(this.__renderDebouncer);\n }\n\n /**\n * Forces the element to render its content. Normally rendering is\n * asynchronous to a provoking change. This is done for efficiency so\n * that multiple changes trigger only a single render. The render method\n * should be called if, for example, template rendering is required to\n * validate application state.\n * @return {void}\n */\n render() {\n // Queue this repeater, then flush all in order\n this.__debounceRender(this.__render);\n flush();\n }\n\n __render() {\n if (!this.__ensureTemplatized()) {\n // No template found yet\n return;\n }\n let items = this.items || [];\n // Sort and filter the items into a mapping array from instance->item\n const isntIdxToItemsIdx = this.__sortAndFilterItems(items);\n // If we're chunking, increase the limit if there are new instances to\n // create and schedule the next chunk\n const limit = this.__calculateLimit(isntIdxToItemsIdx.length);\n // Create, update, and/or remove instances\n this.__updateInstances(items, limit, isntIdxToItemsIdx);\n // If we're chunking, schedule a rAF task to measure/continue chunking. \n // Do this before any notifying events (renderedItemCount & dom-change)\n // since those could modify items and enqueue a new full render which will\n // pre-empt this measurement.\n if (this.initialCount &&\n (this.__shouldMeasureChunk || this.__shouldContinueChunking)) {\n cancelAnimationFrame(this.__chunkingId);\n this.__chunkingId = requestAnimationFrame(() => {\n this.__chunkingId = null;\n this.__continueChunking();\n });\n }\n // Set rendered item count\n this._setRenderedItemCount(this.__instances.length);\n // Notify users\n if (!suppressTemplateNotifications || this.notifyDomChange) {\n this.dispatchEvent(new CustomEvent('dom-change', {\n bubbles: true,\n composed: true\n }));\n }\n }\n\n __sortAndFilterItems(items) {\n // Generate array maping the instance index to the items array index\n let isntIdxToItemsIdx = new Array(items.length);\n for (let i=0; i<items.length; i++) {\n isntIdxToItemsIdx[i] = i;\n }\n // Apply user filter\n if (this.__filterFn) {\n isntIdxToItemsIdx = isntIdxToItemsIdx.filter((i, idx, array) =>\n this.__filterFn(items[i], idx, array));\n }\n // Apply user sort\n if (this.__sortFn) {\n isntIdxToItemsIdx.sort((a, b) => this.__sortFn(items[a], items[b]));\n }\n return isntIdxToItemsIdx;\n }\n\n __calculateLimit(filteredItemCount) {\n let limit = filteredItemCount;\n const currentCount = this.__instances.length;\n // When chunking, we increase the limit from the currently rendered count\n // by the chunk count that is re-calculated after each rAF (with special\n // cases for resetting the limit to initialCount after changing items)\n if (this.initialCount) {\n let newCount;\n if (!this.__chunkCount ||\n (this.__itemsArrayChanged && !this.reuseChunkedInstances)) {\n // Limit next render to the initial count\n limit = Math.min(filteredItemCount, this.initialCount);\n // Subtract off any existing instances to determine the number of\n // instances that will be created\n newCount = Math.max(limit - currentCount, 0);\n // Initialize the chunk size with how many items we're creating\n this.__chunkCount = newCount || 1;\n } else {\n // The number of new instances that will be created is based on the\n // existing instances, the new list size, and the chunk size\n newCount = Math.min(\n Math.max(filteredItemCount - currentCount, 0), \n this.__chunkCount);\n // Update the limit based on how many new items we're making, limited\n // buy the total size of the list\n limit = Math.min(currentCount + newCount, filteredItemCount);\n }\n // Record some state about chunking for use in `__continueChunking`\n this.__shouldMeasureChunk = newCount === this.__chunkCount;\n this.__shouldContinueChunking = limit < filteredItemCount;\n this.__renderStartTime = performance.now();\n }\n this.__itemsArrayChanged = false;\n return limit;\n }\n\n __continueChunking() {\n // Simple auto chunkSize throttling algorithm based on feedback loop:\n // measure actual time between frames and scale chunk count by ratio of\n // target/actual frame time. Only modify chunk size if our measurement\n // reflects the cost of a creating a full chunk's worth of instances; this\n // avoids scaling up the chunk size if we e.g. quickly re-rendered instances\n // in place\n if (this.__shouldMeasureChunk) {\n const renderTime = performance.now() - this.__renderStartTime;\n const ratio = this._targetFrameTime / renderTime;\n this.__chunkCount = Math.round(this.__chunkCount * ratio) || 1;\n }\n // Enqueue a new render if we haven't reached the full size of the list\n if (this.__shouldContinueChunking) {\n this.__debounceRender(this.__render);\n }\n }\n \n __updateInstances(items, limit, isntIdxToItemsIdx) {\n // items->inst map kept for item path forwarding\n const itemsIdxToInstIdx = this.__itemsIdxToInstIdx = {};\n let instIdx;\n // Generate instances and assign items\n for (instIdx=0; instIdx<limit; instIdx++) {\n let inst = this.__instances[instIdx];\n let itemIdx = isntIdxToItemsIdx[instIdx];\n let item = items[itemIdx];\n itemsIdxToInstIdx[itemIdx] = instIdx;\n if (inst) {\n inst._setPendingProperty(this.as, item);\n inst._setPendingProperty(this.indexAs, instIdx);\n inst._setPendingProperty(this.itemsIndexAs, itemIdx);\n inst._flushProperties();\n } else {\n this.__insertInstance(item, instIdx, itemIdx);\n }\n }\n // Remove any extra instances from previous state\n for (let i=this.__instances.length-1; i>=instIdx; i--) {\n this.__detachAndRemoveInstance(i);\n }\n }\n\n __detachInstance(idx) {\n let inst = this.__instances[idx];\n const wrappedRoot = wrap(inst.root);\n for (let i=0; i<inst.children.length; i++) {\n let el = inst.children[i];\n wrappedRoot.appendChild(el);\n }\n return inst;\n }\n\n __attachInstance(idx, parent) {\n let inst = this.__instances[idx];\n // Note, this is pre-wrapped as an optimization\n parent.insertBefore(inst.root, this);\n }\n\n __detachAndRemoveInstance(idx) {\n this.__detachInstance(idx);\n this.__instances.splice(idx, 1);\n }\n\n __stampInstance(item, instIdx, itemIdx) {\n let model = {};\n model[this.as] = item;\n model[this.indexAs] = instIdx;\n model[this.itemsIndexAs] = itemIdx;\n return new this.__ctor(model);\n }\n\n __insertInstance(item, instIdx, itemIdx) {\n const inst = this.__stampInstance(item, instIdx, itemIdx);\n let beforeRow = this.__instances[instIdx + 1];\n let beforeNode = beforeRow ? beforeRow.children[0] : this;\n wrap(wrap(this).parentNode).insertBefore(inst.root, beforeNode);\n this.__instances[instIdx] = inst;\n return inst;\n }\n\n // Implements extension point from Templatize mixin\n /**\n * Shows or hides the template instance top level child elements. For\n * text nodes, `textContent` is removed while \"hidden\" and replaced when\n * \"shown.\"\n * @param {boolean} hidden Set to true to hide the children;\n * set to false to show them.\n * @return {void}\n * @protected\n */\n _showHideChildren(hidden) {\n for (let i=0; i<this.__instances.length; i++) {\n this.__instances[i]._showHideChildren(hidden);\n }\n }\n\n // Called as a side effect of a host items.<key>.<path> path change,\n // responsible for notifying item.<path> changes to inst for key\n __handleItemPath(path, value) {\n let itemsPath = path.slice(6); // 'items.'.length == 6\n let dot = itemsPath.indexOf('.');\n let itemsIdx = dot < 0 ? itemsPath : itemsPath.substring(0, dot);\n // If path was index into array...\n if (itemsIdx == parseInt(itemsIdx, 10)) {\n let itemSubPath = dot < 0 ? '' : itemsPath.substring(dot+1);\n // If the path is observed, it will trigger a full refresh\n this.__handleObservedPaths(itemSubPath);\n // Note, even if a rull refresh is triggered, always do the path\n // notification because unless mutableData is used for dom-repeat\n // and all elements in the instance subtree, a full refresh may\n // not trigger the proper update.\n let instIdx = this.__itemsIdxToInstIdx[itemsIdx];\n let inst = this.__instances[instIdx];\n if (inst) {\n let itemPath = this.as + (itemSubPath ? '.' + itemSubPath : '');\n // This is effectively `notifyPath`, but avoids some of the overhead\n // of the public API\n inst._setPendingPropertyOrPath(itemPath, value, false, true);\n inst._flushProperties();\n }\n return true;\n }\n }\n\n /**\n * Returns the item associated with a given element stamped by\n * this `dom-repeat`.\n *\n * Note, to modify sub-properties of the item,\n * `modelForElement(el).set('item.<sub-prop>', value)`\n * should be used.\n *\n * @param {!HTMLElement} el Element for which to return the item.\n * @return {*} Item associated with the element.\n */\n itemForElement(el) {\n let instance = this.modelForElement(el);\n return instance && instance[this.as];\n }\n\n /**\n * Returns the inst index for a given element stamped by this `dom-repeat`.\n * If `sort` is provided, the index will reflect the sorted order (rather\n * than the original array order).\n *\n * @param {!HTMLElement} el Element for which to return the index.\n * @return {?number} Row index associated with the element (note this may\n * not correspond to the array index if a user `sort` is applied).\n */\n indexForElement(el) {\n let instance = this.modelForElement(el);\n return instance && instance[this.indexAs];\n }\n\n /**\n * Returns the template \"model\" associated with a given element, which\n * serves as the binding scope for the template instance the element is\n * contained in. A template model\n * should be used to manipulate data associated with this template instance.\n *\n * Example:\n *\n * let model = modelForElement(el);\n * if (model.index < 10) {\n * model.set('item.checked', true);\n * }\n *\n * @param {!HTMLElement} el Element for which to return a template model.\n * @return {TemplateInstanceBase} Model representing the binding scope for\n * the element.\n */\n modelForElement(el) {\n return modelForElement(this.template, el);\n }\n\n}\n\ncustomElements.define(DomRepeat.is, DomRepeat);\n","/**\n * @license\n * Copyright (c) 2016 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { FocusMixin } from '@vaadin/a11y-base/src/focus-mixin.js';\nimport { addListener } from '@vaadin/component-base/src/gestures.js';\nimport { dateAllowed, dateEquals, getISOWeekNumber } from './vaadin-date-picker-helper.js';\n\n/**\n * @polymerMixin\n * @mixes FocusMixin\n */\nexport const MonthCalendarMixin = (superClass) =>\n class MonthCalendarMixinClass extends FocusMixin(superClass) {\n static get properties() {\n return {\n /**\n * A `Date` object defining the month to be displayed. Only year and\n * month properties are actually used.\n */\n month: {\n type: Object,\n value: new Date(),\n sync: true,\n },\n\n /**\n * A `Date` object for the currently selected date.\n */\n selectedDate: {\n type: Object,\n notify: true,\n sync: true,\n },\n\n /**\n * A `Date` object for the currently focused date.\n */\n focusedDate: {\n type: Object,\n },\n\n /**\n * Set true to display ISO-8601 week numbers in the calendar. Notice that\n * displaying week numbers is only supported when `i18n.firstDayOfWeek`\n * is 1 (Monday).\n */\n showWeekNumbers: {\n type: Boolean,\n value: false,\n },\n\n i18n: {\n type: Object,\n },\n\n /**\n * Flag stating whether taps on the component should be ignored.\n */\n ignoreTaps: {\n type: Boolean,\n },\n\n /**\n * The earliest date that can be selected. All earlier dates will be disabled.\n */\n minDate: {\n type: Date,\n value: null,\n sync: true,\n },\n\n /**\n * The latest date that can be selected. All later dates will be disabled.\n */\n maxDate: {\n type: Date,\n value: null,\n sync: true,\n },\n\n disabled: {\n type: Boolean,\n reflectToAttribute: true,\n },\n\n /** @protected */\n _days: {\n type: Array,\n },\n\n /** @protected */\n _weeks: {\n type: Array,\n },\n\n /** @private */\n _notTapping: {\n type: Boolean,\n },\n };\n }\n\n static get observers() {\n return ['__focusedDateChanged(focusedDate, _days)'];\n }\n\n get focusableDateElement() {\n return [...this.shadowRoot.querySelectorAll('[part~=date]')].find((datePart) => {\n return dateEquals(datePart.date, this.focusedDate);\n });\n }\n\n /** @protected */\n ready() {\n super.ready();\n addListener(this.$.monthGrid, 'tap', this._handleTap.bind(this));\n }\n\n /**\n * Returns true if all the dates in the month are out of the allowed range\n * @protected\n */\n _isDisabled(month, minDate, maxDate) {\n // First day of the month\n const firstDate = new Date(0, 0);\n firstDate.setFullYear(month.getFullYear());\n firstDate.setMonth(month.getMonth());\n firstDate.setDate(1);\n\n // Last day of the month\n const lastDate = new Date(0, 0);\n lastDate.setFullYear(month.getFullYear());\n lastDate.setMonth(month.getMonth() + 1);\n lastDate.setDate(0);\n\n if (\n minDate &&\n maxDate &&\n minDate.getMonth() === maxDate.getMonth() &&\n minDate.getMonth() === month.getMonth() &&\n maxDate.getDate() - minDate.getDate() >= 0\n ) {\n return false;\n }\n\n return !dateAllowed(firstDate, minDate, maxDate) && !dateAllowed(lastDate, minDate, maxDate);\n }\n\n /** @protected */\n _getTitle(month, i18n) {\n if (month === undefined || i18n === undefined) {\n return;\n }\n return i18n.formatTitle(i18n.monthNames[month.getMonth()], month.getFullYear());\n }\n\n /** @protected */\n _onMonthGridTouchStart() {\n this._notTapping = false;\n setTimeout(() => {\n this._notTapping = true;\n }, 300);\n }\n\n /** @private */\n _dateAdd(date, delta) {\n date.setDate(date.getDate() + delta);\n }\n\n /** @private */\n _applyFirstDayOfWeek(weekDayNames, firstDayOfWeek) {\n if (weekDayNames === undefined || firstDayOfWeek === undefined) {\n return;\n }\n\n return weekDayNames.slice(firstDayOfWeek).concat(weekDayNames.slice(0, firstDayOfWeek));\n }\n\n /** @protected */\n _getWeekDayNames(i18n, showWeekNumbers) {\n if (i18n === undefined || showWeekNumbers === undefined) {\n return [];\n }\n const { weekdays, weekdaysShort, firstDayOfWeek } = i18n;\n\n const weekDayNamesShort = this._applyFirstDayOfWeek(weekdaysShort, firstDayOfWeek);\n const weekDayNames = this._applyFirstDayOfWeek(weekdays, firstDayOfWeek);\n\n return weekDayNames.map((day, index) => {\n return {\n weekDay: day,\n weekDayShort: weekDayNamesShort[index],\n };\n });\n }\n\n /** @private */\n __focusedDateChanged(focusedDate, days) {\n if (Array.isArray(days) && days.some((date) => dateEquals(date, focusedDate))) {\n this.removeAttribute('aria-hidden');\n } else {\n this.setAttribute('aria-hidden', 'true');\n }\n }\n\n /** @protected */\n _getDate(date) {\n return date ? date.getDate() : '';\n }\n\n /** @protected */\n _showWeekSeparator(showWeekNumbers, i18n) {\n // Currently only supported for locales that start the week on Monday.\n return showWeekNumbers && i18n && i18n.firstDayOfWeek === 1;\n }\n\n /** @protected */\n _isToday(date) {\n return dateEquals(new Date(), date);\n }\n\n /** @protected */\n _getDays(month, i18n) {\n if (month === undefined || i18n === undefined) {\n return [];\n }\n // First day of the month (at midnight).\n const date = new Date(0, 0);\n date.setFullYear(month.getFullYear());\n date.setMonth(month.getMonth());\n date.setDate(1);\n\n // Rewind to first day of the week.\n while (date.getDay() !== i18n.firstDayOfWeek) {\n this._dateAdd(date, -1);\n }\n\n const days = [];\n const startMonth = date.getMonth();\n const targetMonth = month.getMonth();\n while (date.getMonth() === targetMonth || date.getMonth() === startMonth) {\n days.push(date.getMonth() === targetMonth ? new Date(date.getTime()) : null);\n\n // Advance to next day.\n this._dateAdd(date, 1);\n }\n return days;\n }\n\n /** @protected */\n _getWeeks(days) {\n return days.reduce((acc, day, i) => {\n if (i % 7 === 0) {\n acc.push([]);\n }\n acc[acc.length - 1].push(day);\n return acc;\n }, []);\n }\n\n /** @protected */\n _handleTap(e) {\n if (!this.ignoreTaps && !this._notTapping && e.target.date && !e.target.hasAttribute('disabled')) {\n this.selectedDate = e.target.date;\n this.dispatchEvent(\n new CustomEvent('date-tap', { detail: { date: e.target.date }, bubbles: true, composed: true }),\n );\n }\n }\n\n /** @protected */\n _preventDefault(e) {\n e.preventDefault();\n }\n\n /** @protected */\n __getWeekNumber(days) {\n const date = days.reduce((acc, d) => {\n return !acc && d ? d : acc;\n });\n\n return getISOWeekNumber(date);\n }\n\n /** @protected */\n __getDayAriaLabel(date) {\n if (!date) {\n return '';\n }\n\n let ariaLabel = `${this._getDate(date)} ${this.i18n.monthNames[date.getMonth()]} ${date.getFullYear()}, ${\n this.i18n.weekdays[date.getDay()]\n }`;\n\n if (this._isToday(date)) {\n ariaLabel += `, ${this.i18n.today}`;\n }\n\n return ariaLabel;\n }\n };\n","/**\n * @license\n * Copyright (c) 2016 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@polymer/polymer/lib/elements/dom-repeat.js';\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { dateAllowed, dateEquals } from './vaadin-date-picker-helper.js';\nimport { MonthCalendarMixin } from './vaadin-month-calendar-mixin.js';\nimport { monthCalendarStyles } from './vaadin-month-calendar-styles.js';\n\nregisterStyles('vaadin-month-calendar', monthCalendarStyles, {\n moduleId: 'vaadin-month-calendar-styles',\n});\n\n/**\n * @customElement\n * @extends HTMLElement\n * @private\n */\nclass MonthCalendar extends MonthCalendarMixin(ThemableMixin(PolymerElement)) {\n static get template() {\n return html`\n <div part=\"month-header\" id=\"month-header\" aria-hidden=\"true\">[[_getTitle(month, i18n)]]</div>\n <table\n id=\"monthGrid\"\n role=\"grid\"\n aria-labelledby=\"month-header\"\n on-touchend=\"_preventDefault\"\n on-touchstart=\"_onMonthGridTouchStart\"\n >\n <thead id=\"weekdays-container\">\n <tr role=\"row\" part=\"weekdays\">\n <th part=\"weekday\" aria-hidden=\"true\" hidden$=\"[[!_showWeekSeparator(showWeekNumbers, i18n)]]\"></th>\n <template is=\"dom-repeat\" items=\"[[_getWeekDayNames(i18n, showWeekNumbers)]]\">\n <th role=\"columnheader\" part=\"weekday\" scope=\"col\" abbr$=\"[[item.weekDay]]\" aria-hidden=\"true\">\n [[item.weekDayShort]]\n </th>\n </template>\n </tr>\n </thead>\n <tbody id=\"days-container\">\n <template is=\"dom-repeat\" items=\"[[_weeks]]\" as=\"week\">\n <tr role=\"row\">\n <td part=\"week-number\" aria-hidden=\"true\" hidden$=\"[[!_showWeekSeparator(showWeekNumbers, i18n)]]\">\n [[__getWeekNumber(week)]]\n </td>\n <template is=\"dom-repeat\" items=\"[[week]]\">\n <td\n role=\"gridcell\"\n part$=\"[[__getDatePart(item, focusedDate, selectedDate, minDate, maxDate)]]\"\n date=\"[[item]]\"\n tabindex$=\"[[__getDayTabindex(item, focusedDate)]]\"\n disabled$=\"[[__isDayDisabled(item, minDate, maxDate)]]\"\n aria-selected$=\"[[__getDayAriaSelected(item, selectedDate)]]\"\n aria-disabled$=\"[[__getDayAriaDisabled(item, minDate, maxDate)]]\"\n aria-label$=\"[[__getDayAriaLabel(item)]]\"\n >[[_getDate(item)]]</td\n >\n </template>\n </tr>\n </template>\n </tbody>\n </table>\n `;\n }\n\n static get is() {\n return 'vaadin-month-calendar';\n }\n\n static get properties() {\n return {\n /** @protected */\n _days: {\n type: Array,\n computed: '_getDays(month, i18n, minDate, maxDate)',\n },\n\n /** @protected */\n _weeks: {\n type: Array,\n computed: '_getWeeks(_days)',\n },\n\n disabled: {\n type: Boolean,\n reflectToAttribute: true,\n computed: '_isDisabled(month, minDate, maxDate)',\n },\n };\n }\n\n static get observers() {\n return ['_showWeekNumbersChanged(showWeekNumbers, i18n)'];\n }\n\n /** @private */\n _showWeekNumbersChanged(showWeekNumbers, i18n) {\n if (showWeekNumbers && i18n && i18n.firstDayOfWeek === 1) {\n this.setAttribute('week-numbers', '');\n } else {\n this.removeAttribute('week-numbers');\n }\n }\n\n /** @private */\n __getDatePart(date, focusedDate, selectedDate, minDate, maxDate) {\n const result = ['date'];\n\n if (this.__isDayDisabled(date, minDate, maxDate)) {\n result.push('disabled');\n }\n\n if (this.__isDayFocused(date, focusedDate)) {\n result.push('focused');\n }\n\n if (this.__isDaySelected(date, selectedDate)) {\n result.push('selected');\n }\n\n if (this._isToday(date)) {\n result.push('today');\n }\n\n return result.join(' ');\n }\n\n /** @private */\n __isDayFocused(date, focusedDate) {\n return dateEquals(date, focusedDate);\n }\n\n /** @private */\n __isDaySelected(date, selectedDate) {\n return dateEquals(date, selectedDate);\n }\n\n /** @private */\n __getDayAriaSelected(date, selectedDate) {\n if (this.__isDaySelected(date, selectedDate)) {\n return 'true';\n }\n }\n\n /** @private */\n __isDayDisabled(date, minDate, maxDate) {\n return !dateAllowed(date, minDate, maxDate);\n }\n\n /** @private */\n __getDayAriaDisabled(date, min, max) {\n if (date === undefined || min === undefined || max === undefined) {\n return;\n }\n\n if (this.__isDayDisabled(date, min, max)) {\n return 'true';\n }\n }\n\n /** @private */\n __getDayTabindex(date, focusedDate) {\n if (this.__isDayFocused(date, focusedDate)) {\n return '0';\n }\n\n return '-1';\n }\n}\n\ndefineCustomElement(MonthCalendar);\n","/**\n * @license\n * Copyright (c) 2016 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const monthCalendarStyles = css`\n :host {\n display: block;\n }\n\n #monthGrid {\n width: 100%;\n border-collapse: collapse;\n }\n\n #days-container tr,\n #weekdays-container tr {\n display: flex;\n }\n\n [part~='date'] {\n outline: none;\n }\n\n [part~='disabled'] {\n pointer-events: none;\n }\n\n [part='week-number'][hidden],\n [part='weekday'][hidden] {\n display: none;\n }\n\n [part='weekday'],\n [part~='date'] {\n width: calc(100% / 7);\n padding: 0;\n font-weight: normal;\n }\n\n [part='weekday']:empty,\n [part='week-number'] {\n width: 12.5%;\n flex-shrink: 0;\n padding: 0;\n }\n\n :host([week-numbers]) [part='weekday']:not(:empty),\n :host([week-numbers]) [part~='date'] {\n width: 12.5%;\n }\n\n @media (forced-colors: active) {\n [part~='date'][part~='focused'] {\n outline: 1px solid;\n }\n\n [part~='date'][part~='selected'] {\n outline: 3px solid;\n }\n }\n`;\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * A controller for listening on media query changes.\n */\nexport class MediaQueryController {\n constructor(query, callback) {\n /**\n * The CSS media query to evaluate.\n *\n * @type {string}\n * @protected\n */\n this.query = query;\n\n /**\n * Function to call when media query changes.\n *\n * @type {Function}\n * @protected\n */\n this.callback = callback;\n\n this._boundQueryHandler = this._queryHandler.bind(this);\n }\n\n hostConnected() {\n this._removeListener();\n\n this._mediaQuery = window.matchMedia(this.query);\n\n this._addListener();\n\n this._queryHandler(this._mediaQuery);\n }\n\n hostDisconnected() {\n this._removeListener();\n }\n\n /** @private */\n _addListener() {\n if (this._mediaQuery) {\n this._mediaQuery.addListener(this._boundQueryHandler);\n }\n }\n\n /** @private */\n _removeListener() {\n if (this._mediaQuery) {\n this._mediaQuery.removeListener(this._boundQueryHandler);\n }\n\n this._mediaQuery = null;\n }\n\n /** @private */\n _queryHandler(mediaQuery) {\n if (typeof this.callback === 'function') {\n this.callback(mediaQuery.matches);\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { flush } from '@polymer/polymer/lib/utils/flush.js';\nimport { afterNextRender } from '@polymer/polymer/lib/utils/render-status.js';\nimport { timeOut } from '@vaadin/component-base/src/async.js';\nimport { Debouncer } from '@vaadin/component-base/src/debounce.js';\nimport { addListener, setTouchAction } from '@vaadin/component-base/src/gestures.js';\nimport { MediaQueryController } from '@vaadin/component-base/src/media-query-controller.js';\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\nimport { dateAfterXMonths, dateEquals, extractDateParts, getClosestDate } from './vaadin-date-picker-helper.js';\n\n/**\n * @polymerMixin\n */\nexport const DatePickerOverlayContentMixin = (superClass) =>\n class DatePickerOverlayContentMixin extends superClass {\n static get properties() {\n return {\n scrollDuration: {\n type: Number,\n value: 300,\n },\n\n /**\n * The value for this element.\n */\n selectedDate: {\n type: Object,\n value: null,\n sync: true,\n },\n\n /**\n * Date value which is focused using keyboard.\n */\n focusedDate: {\n type: Object,\n notify: true,\n observer: '_focusedDateChanged',\n sync: true,\n },\n\n _focusedMonthDate: Number,\n\n /**\n * Date which should be visible when there is no value selected.\n */\n initialPosition: {\n type: Object,\n observer: '_initialPositionChanged',\n },\n\n _originDate: {\n type: Object,\n value: new Date(),\n },\n\n _visibleMonthIndex: Number,\n\n _desktopMode: {\n type: Boolean,\n observer: '_desktopModeChanged',\n },\n\n _desktopMediaQuery: {\n type: String,\n value: '(min-width: 375px)',\n },\n\n _translateX: {\n observer: '_translateXChanged',\n },\n\n _yearScrollerWidth: {\n value: 50,\n },\n\n i18n: {\n type: Object,\n },\n\n showWeekNumbers: {\n type: Boolean,\n value: false,\n },\n\n _ignoreTaps: Boolean,\n\n _notTapping: Boolean,\n\n /**\n * The earliest date that can be selected. All earlier dates will be disabled.\n */\n minDate: {\n type: Object,\n sync: true,\n },\n\n /**\n * The latest date that can be selected. All later dates will be disabled.\n */\n maxDate: {\n type: Object,\n sync: true,\n },\n\n /**\n * Input label\n */\n label: String,\n\n _cancelButton: {\n type: Object,\n },\n\n _todayButton: {\n type: Object,\n },\n\n calendars: {\n type: Array,\n value: () => [],\n },\n\n years: {\n type: Array,\n value: () => [],\n },\n };\n }\n\n static get observers() {\n return [\n '__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme)',\n '__updateCancelButton(_cancelButton, i18n)',\n '__updateTodayButton(_todayButton, i18n, minDate, maxDate)',\n '__updateYears(years, selectedDate, _theme)',\n ];\n }\n\n /**\n * Whether to scroll to a sub-month position when scrolling to a date.\n * This is active if the month scroller is not large enough to fit a\n * full month. In that case we want to scroll to a position between\n * two months in order to have the focused date in the visible area.\n * @returns {boolean} whether to use sub-month scrolling\n * @private\n */\n get __useSubMonthScrolling() {\n return this._monthScroller.clientHeight < this._monthScroller.itemHeight + this._monthScroller.bufferOffset;\n }\n\n get focusableDateElement() {\n return this.calendars.map((calendar) => calendar.focusableDateElement).find(Boolean);\n }\n\n /** @protected */\n _addListeners() {\n setTouchAction(this.$.scrollers, 'pan-y');\n\n addListener(this.$.scrollers, 'track', this._track.bind(this));\n addListener(this.shadowRoot.querySelector('[part=\"clear-button\"]'), 'tap', this._clear.bind(this));\n addListener(this.shadowRoot.querySelector('[part=\"toggle-button\"]'), 'tap', this._cancel.bind(this));\n addListener(\n this.shadowRoot.querySelector('[part=\"years-toggle-button\"]'),\n 'tap',\n this._toggleYearScroller.bind(this),\n );\n }\n\n /** @protected */\n _initControllers() {\n this.addController(\n new MediaQueryController(this._desktopMediaQuery, (matches) => {\n this._desktopMode = matches;\n }),\n );\n\n this.addController(\n new SlotController(this, 'today-button', 'vaadin-button', {\n observe: false,\n initializer: (btn) => {\n btn.setAttribute('theme', 'tertiary');\n btn.addEventListener('keydown', (e) => this.__onTodayButtonKeyDown(e));\n addListener(btn, 'tap', this._onTodayTap.bind(this));\n this._todayButton = btn;\n },\n }),\n );\n\n this.addController(\n new SlotController(this, 'cancel-button', 'vaadin-button', {\n observe: false,\n initializer: (btn) => {\n btn.setAttribute('theme', 'tertiary');\n btn.addEventListener('keydown', (e) => this.__onCancelButtonKeyDown(e));\n addListener(btn, 'tap', this._cancel.bind(this));\n this._cancelButton = btn;\n },\n }),\n );\n\n this.__initMonthScroller();\n this.__initYearScroller();\n }\n\n reset() {\n this._closeYearScroller();\n this._toggleAnimateClass(true);\n }\n\n /**\n * Focuses the cancel button\n */\n focusCancel() {\n this._cancelButton.focus();\n }\n\n /**\n * Scrolls the list to the given Date.\n */\n scrollToDate(date, animate) {\n const offset = this.__useSubMonthScrolling ? this._calculateWeekScrollOffset(date) : 0;\n this._scrollToPosition(this._differenceInMonths(date, this._originDate) + offset, animate);\n this._monthScroller.forceUpdate();\n }\n\n /** @private */\n __initMonthScroller() {\n this.addController(\n new SlotController(this, 'months', 'vaadin-date-picker-month-scroller', {\n observe: false,\n initializer: (scroller) => {\n scroller.addEventListener('custom-scroll', () => {\n this._onMonthScroll();\n });\n\n scroller.addEventListener('touchstart', () => {\n this._onMonthScrollTouchStart();\n });\n\n scroller.addEventListener('keydown', (e) => {\n this.__onMonthCalendarKeyDown(e);\n });\n\n scroller.addEventListener('init-done', () => {\n const calendars = [...this.querySelectorAll('vaadin-month-calendar')];\n\n // Two-way binding for selectedDate property\n calendars.forEach((calendar) => {\n calendar.addEventListener('selected-date-changed', (e) => {\n this.selectedDate = e.detail.value;\n });\n });\n\n this.calendars = calendars;\n });\n\n this._monthScroller = scroller;\n },\n }),\n );\n }\n\n /** @private */\n __initYearScroller() {\n this.addController(\n new SlotController(this, 'years', 'vaadin-date-picker-year-scroller', {\n observe: false,\n initializer: (scroller) => {\n scroller.setAttribute('aria-hidden', 'true');\n\n addListener(scroller, 'tap', (e) => {\n this._onYearTap(e);\n });\n\n scroller.addEventListener('custom-scroll', () => {\n this._onYearScroll();\n });\n\n scroller.addEventListener('touchstart', () => {\n this._onYearScrollTouchStart();\n });\n\n scroller.addEventListener('init-done', () => {\n this.years = [...this.querySelectorAll('vaadin-date-picker-year')];\n });\n\n this._yearScroller = scroller;\n },\n }),\n );\n }\n\n /** @private */\n __updateCancelButton(cancelButton, i18n) {\n if (cancelButton) {\n cancelButton.textContent = i18n && i18n.cancel;\n }\n }\n\n /** @private */\n __updateTodayButton(todayButton, i18n, minDate, maxDate) {\n if (todayButton) {\n todayButton.textContent = i18n && i18n.today;\n todayButton.disabled = !this._isTodayAllowed(minDate, maxDate);\n }\n }\n\n // eslint-disable-next-line max-params\n __updateCalendars(\n calendars,\n i18n,\n minDate,\n maxDate,\n selectedDate,\n focusedDate,\n showWeekNumbers,\n ignoreTaps,\n theme,\n ) {\n if (calendars && calendars.length) {\n calendars.forEach((calendar) => {\n calendar.i18n = i18n;\n calendar.minDate = minDate;\n calendar.maxDate = maxDate;\n calendar.focusedDate = focusedDate;\n calendar.selectedDate = selectedDate;\n calendar.showWeekNumbers = showWeekNumbers;\n calendar.ignoreTaps = ignoreTaps;\n\n if (theme) {\n calendar.setAttribute('theme', theme);\n } else {\n calendar.removeAttribute('theme');\n }\n });\n }\n }\n\n /** @private */\n __updateYears(years, selectedDate, theme) {\n if (years && years.length) {\n years.forEach((year) => {\n year.selectedDate = selectedDate;\n\n if (theme) {\n year.setAttribute('theme', theme);\n } else {\n year.removeAttribute('theme');\n }\n });\n }\n }\n\n /**\n * Select a date and fire event indicating user interaction.\n * @protected\n */\n _selectDate(dateToSelect) {\n this.selectedDate = dateToSelect;\n this.dispatchEvent(\n new CustomEvent('date-selected', { detail: { date: dateToSelect }, bubbles: true, composed: true }),\n );\n }\n\n /** @private */\n _desktopModeChanged(desktopMode) {\n this.toggleAttribute('desktop', desktopMode);\n }\n\n /** @private */\n _focusedDateChanged(focusedDate) {\n this.revealDate(focusedDate);\n }\n\n /**\n * Scrolls the month and year scrollers enough to reveal the given date.\n */\n revealDate(date, animate = true) {\n if (!date) {\n return;\n }\n const diff = this._differenceInMonths(date, this._originDate);\n // If scroll area does not fit the full month, then always scroll with an offset to\n // approximately display the week of the date\n if (this.__useSubMonthScrolling) {\n const offset = this._calculateWeekScrollOffset(date);\n this._scrollToPosition(diff + offset, animate);\n return;\n }\n\n // Otherwise determine if we need to scroll to make the month of the date visible\n const scrolledAboveViewport = this._monthScroller.position > diff;\n\n const visibleArea = Math.max(\n this._monthScroller.itemHeight,\n this._monthScroller.clientHeight - this._monthScroller.bufferOffset * 2,\n );\n const visibleItems = visibleArea / this._monthScroller.itemHeight;\n const scrolledBelowViewport = this._monthScroller.position + visibleItems - 1 < diff;\n\n if (scrolledAboveViewport) {\n this._scrollToPosition(diff, animate);\n } else if (scrolledBelowViewport) {\n this._scrollToPosition(diff - visibleItems + 1, animate);\n }\n }\n\n /**\n * Calculates an offset to be added to the month scroll position\n * when using sub-month scrolling, in order ensure that the week\n * that the date is in is visible even for small scroll areas.\n * As the month scroller uses a month as minimal scroll unit\n * (a value of `1` equals one month), we can not exactly identify\n * the position of a specific week. This is a best effort\n * implementation based on manual testing.\n * @param date the date for which to calculate the offset\n * @returns {number} the offset\n * @private\n */\n _calculateWeekScrollOffset(date) {\n // Get first day of month\n const temp = new Date(0, 0);\n temp.setFullYear(date.getFullYear());\n temp.setMonth(date.getMonth());\n temp.setDate(1);\n // Determine week (=row index) of date within the month\n let week = 0;\n while (temp.getDate() < date.getDate()) {\n temp.setDate(temp.getDate() + 1);\n if (temp.getDay() === this.i18n.firstDayOfWeek) {\n week += 1;\n }\n }\n // Calculate magic number that approximately keeps the week visible\n return week / 6;\n }\n\n /** @private */\n _initialPositionChanged(initialPosition) {\n if (this._monthScroller && this._yearScroller) {\n this._monthScroller.active = true;\n this._yearScroller.active = true;\n }\n\n this.scrollToDate(initialPosition);\n }\n\n /** @private */\n _repositionYearScroller() {\n const monthPosition = this._monthScroller.position;\n this._visibleMonthIndex = Math.floor(monthPosition);\n this._yearScroller.position = (monthPosition + this._originDate.getMonth()) / 12;\n }\n\n /** @private */\n _repositionMonthScroller() {\n this._monthScroller.position = this._yearScroller.position * 12 - this._originDate.getMonth();\n this._visibleMonthIndex = Math.floor(this._monthScroller.position);\n }\n\n /** @private */\n _onMonthScroll() {\n this._repositionYearScroller();\n this._doIgnoreTaps();\n }\n\n /** @private */\n _onYearScroll() {\n this._repositionMonthScroller();\n this._doIgnoreTaps();\n }\n\n /** @private */\n _onYearScrollTouchStart() {\n this._notTapping = false;\n setTimeout(() => {\n this._notTapping = true;\n }, 300);\n\n this._repositionMonthScroller();\n }\n\n /** @private */\n _onMonthScrollTouchStart() {\n this._repositionYearScroller();\n }\n\n /** @private */\n _doIgnoreTaps() {\n this._ignoreTaps = true;\n this._debouncer = Debouncer.debounce(this._debouncer, timeOut.after(300), () => {\n this._ignoreTaps = false;\n });\n }\n\n /** @protected */\n _formatDisplayed(date, i18n, label) {\n if (date && i18n && typeof i18n.formatDate === 'function') {\n return i18n.formatDate(extractDateParts(date));\n }\n return label;\n }\n\n /** @private */\n _onTodayTap() {\n const today = new Date();\n\n if (Math.abs(this._monthScroller.position - this._differenceInMonths(today, this._originDate)) < 0.001) {\n // Select today only if the month scroller is positioned approximately\n // at the beginning of the current month\n this._selectDate(today);\n this._close();\n } else {\n this._scrollToCurrentMonth();\n }\n }\n\n /** @private */\n _scrollToCurrentMonth() {\n if (this.focusedDate) {\n this.focusedDate = new Date();\n }\n\n this.scrollToDate(new Date(), true);\n }\n\n /** @private */\n _onYearTap(e) {\n if (!this._ignoreTaps && !this._notTapping) {\n const scrollDelta =\n e.detail.y - (this._yearScroller.getBoundingClientRect().top + this._yearScroller.clientHeight / 2);\n const yearDelta = scrollDelta / this._yearScroller.itemHeight;\n this._scrollToPosition(this._monthScroller.position + yearDelta * 12, true);\n }\n }\n\n /** @private */\n _scrollToPosition(targetPosition, animate) {\n if (this._targetPosition !== undefined) {\n this._targetPosition = targetPosition;\n return;\n }\n\n if (!animate) {\n this._monthScroller.position = targetPosition;\n this._targetPosition = undefined;\n this._repositionYearScroller();\n this.__tryFocusDate();\n return;\n }\n\n this._targetPosition = targetPosition;\n\n let revealResolve;\n this._revealPromise = new Promise((resolve) => {\n revealResolve = resolve;\n });\n\n // http://gizma.com/easing/\n const easingFunction = (t, b, c, d) => {\n t /= d / 2;\n if (t < 1) {\n return (c / 2) * t * t + b;\n }\n t -= 1;\n return (-c / 2) * (t * (t - 2) - 1) + b;\n };\n\n let start = 0;\n const initialPosition = this._monthScroller.position;\n\n const smoothScroll = (timestamp) => {\n if (!start) {\n start = timestamp;\n }\n\n const currentTime = timestamp - start;\n\n if (currentTime < this.scrollDuration) {\n const currentPos = easingFunction(\n currentTime,\n initialPosition,\n this._targetPosition - initialPosition,\n this.scrollDuration,\n );\n this._monthScroller.position = currentPos;\n window.requestAnimationFrame(smoothScroll);\n } else {\n this.dispatchEvent(\n new CustomEvent('scroll-animation-finished', {\n bubbles: true,\n composed: true,\n detail: {\n position: this._targetPosition,\n oldPosition: initialPosition,\n },\n }),\n );\n\n this._monthScroller.position = this._targetPosition;\n this._targetPosition = undefined;\n\n revealResolve();\n this._revealPromise = undefined;\n }\n\n setTimeout(this._repositionYearScroller.bind(this), 1);\n };\n\n // Start the animation.\n window.requestAnimationFrame(smoothScroll);\n }\n\n /** @private */\n _limit(value, range) {\n return Math.min(range.max, Math.max(range.min, value));\n }\n\n /** @private */\n _handleTrack(e) {\n // Check if horizontal movement threshold (dx) not exceeded or\n // scrolling fast vertically (ddy).\n if (Math.abs(e.detail.dx) < 10 || Math.abs(e.detail.ddy) > 10) {\n return;\n }\n\n // If we're flinging quickly -> start animating already.\n if (Math.abs(e.detail.ddx) > this._yearScrollerWidth / 3) {\n this._toggleAnimateClass(true);\n }\n\n const newTranslateX = this._translateX + e.detail.ddx;\n this._translateX = this._limit(newTranslateX, {\n min: 0,\n max: this._yearScrollerWidth,\n });\n }\n\n /** @private */\n _track(e) {\n if (this._desktopMode) {\n // No need to track for swipe gestures on desktop.\n return;\n }\n\n switch (e.detail.state) {\n case 'start':\n this._toggleAnimateClass(false);\n break;\n case 'track':\n this._handleTrack(e);\n break;\n case 'end':\n this._toggleAnimateClass(true);\n if (this._translateX >= this._yearScrollerWidth / 2) {\n this._closeYearScroller();\n } else {\n this._openYearScroller();\n }\n break;\n default:\n break;\n }\n }\n\n /** @private */\n _toggleAnimateClass(enable) {\n if (enable) {\n this.classList.add('animate');\n } else {\n this.classList.remove('animate');\n }\n }\n\n /** @private */\n _toggleYearScroller() {\n if (this._isYearScrollerVisible()) {\n this._closeYearScroller();\n } else {\n this._openYearScroller();\n }\n }\n\n /** @private */\n _openYearScroller() {\n this._translateX = 0;\n this.setAttribute('years-visible', '');\n }\n\n /** @private */\n _closeYearScroller() {\n this.removeAttribute('years-visible');\n this._translateX = this._yearScrollerWidth;\n }\n\n /** @private */\n _isYearScrollerVisible() {\n return this._translateX < this._yearScrollerWidth / 2;\n }\n\n /** @private */\n _translateXChanged(x) {\n if (!this._desktopMode) {\n this._monthScroller.style.transform = `translateX(${x - this._yearScrollerWidth}px)`;\n this._yearScroller.style.transform = `translateX(${x}px)`;\n }\n }\n\n /** @private */\n _yearAfterXMonths(months) {\n return dateAfterXMonths(months).getFullYear();\n }\n\n /** @private */\n _differenceInMonths(date1, date2) {\n const months = (date1.getFullYear() - date2.getFullYear()) * 12;\n return months - date2.getMonth() + date1.getMonth();\n }\n\n /** @private */\n _clear() {\n this._selectDate('');\n }\n\n /** @private */\n _close() {\n this.dispatchEvent(new CustomEvent('close', { bubbles: true, composed: true }));\n }\n\n /** @private */\n _cancel() {\n this.focusedDate = this.selectedDate;\n this._close();\n }\n\n /** @protected */\n _preventDefault(e) {\n e.preventDefault();\n }\n\n /** @private */\n __toggleDate(date) {\n if (dateEquals(date, this.selectedDate)) {\n this._clear();\n this.focusedDate = date;\n } else {\n this._selectDate(date);\n }\n }\n\n /** @private */\n __onMonthCalendarKeyDown(event) {\n let handled = false;\n\n switch (event.key) {\n case 'ArrowDown':\n this._moveFocusByDays(7);\n handled = true;\n break;\n case 'ArrowUp':\n this._moveFocusByDays(-7);\n handled = true;\n break;\n case 'ArrowRight':\n this._moveFocusByDays(this.__isRTL ? -1 : 1);\n handled = true;\n break;\n case 'ArrowLeft':\n this._moveFocusByDays(this.__isRTL ? 1 : -1);\n handled = true;\n break;\n case 'Enter':\n this._selectDate(this.focusedDate);\n this._close();\n handled = true;\n break;\n case ' ':\n this.__toggleDate(this.focusedDate);\n handled = true;\n break;\n case 'Home':\n this._moveFocusInsideMonth(this.focusedDate, 'minDate');\n handled = true;\n break;\n case 'End':\n this._moveFocusInsideMonth(this.focusedDate, 'maxDate');\n handled = true;\n break;\n case 'PageDown':\n this._moveFocusByMonths(event.shiftKey ? 12 : 1);\n handled = true;\n break;\n case 'PageUp':\n this._moveFocusByMonths(event.shiftKey ? -12 : -1);\n handled = true;\n break;\n case 'Tab':\n this._onTabKeyDown(event, 'calendar');\n break;\n default:\n break;\n }\n\n if (handled) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n\n /** @private */\n _onTabKeyDown(event, section) {\n // Stop propagation to avoid focus-trap\n // listener when used in a modal dialog.\n event.stopPropagation();\n\n switch (section) {\n case 'calendar':\n if (event.shiftKey) {\n event.preventDefault();\n\n if (this.hasAttribute('fullscreen')) {\n // Trap focus in the overlay\n this.focusCancel();\n } else {\n this.__focusInput();\n }\n }\n break;\n case 'today':\n if (event.shiftKey) {\n event.preventDefault();\n this.focusDateElement();\n }\n break;\n case 'cancel':\n if (!event.shiftKey) {\n event.preventDefault();\n\n if (this.hasAttribute('fullscreen')) {\n // Trap focus in the overlay\n this.focusDateElement();\n } else {\n this.__focusInput();\n }\n }\n break;\n default:\n break;\n }\n }\n\n /** @private */\n __onTodayButtonKeyDown(event) {\n if (event.key === 'Tab') {\n this._onTabKeyDown(event, 'today');\n }\n }\n\n /** @private */\n __onCancelButtonKeyDown(event) {\n if (event.key === 'Tab') {\n this._onTabKeyDown(event, 'cancel');\n }\n }\n\n /** @private */\n __focusInput() {\n this.dispatchEvent(new CustomEvent('focus-input', { bubbles: true, composed: true }));\n }\n\n /** @private */\n __tryFocusDate() {\n const dateToFocus = this.__pendingDateFocus;\n if (dateToFocus) {\n // Check the date element with tabindex=\"0\"\n const dateElement = this.focusableDateElement;\n\n if (dateElement && dateEquals(dateElement.date, this.__pendingDateFocus)) {\n delete this.__pendingDateFocus;\n dateElement.focus();\n }\n }\n }\n\n async focusDate(date, keepMonth) {\n const dateToFocus = date || this.selectedDate || this.initialPosition || new Date();\n this.focusedDate = dateToFocus;\n if (!keepMonth) {\n this._focusedMonthDate = dateToFocus.getDate();\n }\n await this.focusDateElement(false);\n }\n\n async focusDateElement(reveal = true) {\n this.__pendingDateFocus = this.focusedDate;\n\n // Wait for `vaadin-month-calendar` elements to be rendered\n if (!this.calendars.length) {\n await new Promise((resolve) => {\n afterNextRender(this, () => {\n // Force dom-repeat elements to render\n flush();\n resolve();\n });\n });\n }\n\n // Reveal focused date unless it has been just set,\n // which triggers `revealDate()` in the observer.\n if (reveal) {\n this.revealDate(this.focusedDate);\n }\n\n if (this._revealPromise) {\n // Wait for focused date to be scrolled into view.\n await this._revealPromise;\n }\n\n this.__tryFocusDate();\n }\n\n /** @private */\n _focusClosestDate(focus) {\n this.focusDate(getClosestDate(focus, [this.minDate, this.maxDate]));\n }\n\n /** @private */\n _focusAllowedDate(dateToFocus, diff, keepMonth) {\n if (this._dateAllowed(dateToFocus)) {\n this.focusDate(dateToFocus, keepMonth);\n } else if (this._dateAllowed(this.focusedDate)) {\n // Move to min or max date\n if (diff > 0) {\n // Down, Right or Page Down key\n this.focusDate(this.maxDate);\n } else {\n // Up, Left or Page Up key\n this.focusDate(this.minDate);\n }\n } else {\n // Move to closest allowed date\n this._focusClosestDate(this.focusedDate);\n }\n }\n\n /** @private */\n _getDateDiff(months, days) {\n const date = new Date(0, 0);\n date.setFullYear(this.focusedDate.getFullYear());\n date.setMonth(this.focusedDate.getMonth() + months);\n if (days) {\n date.setDate(this.focusedDate.getDate() + days);\n }\n return date;\n }\n\n /** @private */\n _moveFocusByDays(days) {\n const dateToFocus = this._getDateDiff(0, days);\n\n this._focusAllowedDate(dateToFocus, days, false);\n }\n\n /** @private */\n _moveFocusByMonths(months) {\n const dateToFocus = this._getDateDiff(months);\n const targetMonth = dateToFocus.getMonth();\n\n if (!this._focusedMonthDate) {\n this._focusedMonthDate = this.focusedDate.getDate();\n }\n\n dateToFocus.setDate(this._focusedMonthDate);\n\n if (dateToFocus.getMonth() !== targetMonth) {\n dateToFocus.setDate(0);\n }\n\n this._focusAllowedDate(dateToFocus, months, true);\n }\n\n /** @private */\n _moveFocusInsideMonth(focusedDate, property) {\n const dateToFocus = new Date(0, 0);\n dateToFocus.setFullYear(focusedDate.getFullYear());\n\n if (property === 'minDate') {\n dateToFocus.setMonth(focusedDate.getMonth());\n dateToFocus.setDate(1);\n } else {\n dateToFocus.setMonth(focusedDate.getMonth() + 1);\n dateToFocus.setDate(0);\n }\n\n if (this._dateAllowed(dateToFocus)) {\n this.focusDate(dateToFocus);\n } else if (this._dateAllowed(focusedDate)) {\n // Move to minDate or maxDate\n this.focusDate(this[property]);\n } else {\n // Move to closest allowed date\n this._focusClosestDate(focusedDate);\n }\n }\n\n /** @private */\n _dateAllowed(date, min = this.minDate, max = this.maxDate) {\n return (!min || date >= min) && (!max || date <= max);\n }\n\n /** @private */\n _isTodayAllowed(min, max) {\n const today = new Date();\n const todayMidnight = new Date(0, 0);\n todayMidnight.setFullYear(today.getFullYear());\n todayMidnight.setMonth(today.getMonth());\n todayMidnight.setDate(today.getDate());\n return this._dateAllowed(todayMidnight, min, max);\n }\n\n /**\n * Fired when the scroller reaches the target scrolling position.\n * @event scroll-animation-finished\n * @param {Number} detail.position new position\n * @param {Number} detail.oldPosition old position\n */\n };\n","/**\n * @license\n * Copyright (c) 2016 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/button/src/vaadin-button.js';\nimport './vaadin-date-picker-month-scroller.js';\nimport './vaadin-date-picker-year-scroller.js';\nimport './vaadin-date-picker-year.js';\nimport './vaadin-month-calendar.js';\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { DirMixin } from '@vaadin/component-base/src/dir-mixin.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { DatePickerOverlayContentMixin } from './vaadin-date-picker-overlay-content-mixin.js';\nimport { overlayContentStyles } from './vaadin-date-picker-overlay-content-styles.js';\n\nregisterStyles('vaadin-date-picker-overlay-content', overlayContentStyles, {\n moduleId: 'vaadin-date-picker-overlay-content-styles',\n});\n\n/**\n * @customElement\n * @extends HTMLElement\n * @private\n */\nclass DatePickerOverlayContent extends DatePickerOverlayContentMixin(\n ControllerMixin(ThemableMixin(DirMixin(PolymerElement))),\n) {\n static get template() {\n return html`\n <div part=\"overlay-header\" on-touchend=\"_preventDefault\" aria-hidden=\"true\">\n <div part=\"label\">[[_formatDisplayed(selectedDate, i18n, label)]]</div>\n <div part=\"clear-button\" hidden$=\"[[!selectedDate]]\"></div>\n <div part=\"toggle-button\"></div>\n\n <div part=\"years-toggle-button\" hidden$=\"[[_desktopMode]]\" aria-hidden=\"true\">\n [[_yearAfterXMonths(_visibleMonthIndex)]]\n </div>\n </div>\n\n <div id=\"scrollers\">\n <slot name=\"months\"></slot>\n <slot name=\"years\"></slot>\n </div>\n\n <div on-touchend=\"_preventDefault\" role=\"toolbar\" part=\"toolbar\">\n <slot name=\"today-button\"></slot>\n <slot name=\"cancel-button\"></slot>\n </div>\n `;\n }\n\n static get is() {\n return 'vaadin-date-picker-overlay-content';\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.setAttribute('role', 'dialog');\n\n this._addListeners();\n this._initControllers();\n }\n}\n\ndefineCustomElement(DatePickerOverlayContent);\n","/**\n * @license\n * Copyright (c) 2016 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const overlayContentStyles = css`\n :host {\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n outline: none;\n }\n\n [part='overlay-header'] {\n display: flex;\n flex-shrink: 0;\n flex-wrap: nowrap;\n align-items: center;\n }\n\n :host(:not([fullscreen])) [part='overlay-header'] {\n display: none;\n }\n\n [part='label'] {\n flex-grow: 1;\n }\n\n [hidden] {\n display: none !important;\n }\n\n [part='years-toggle-button'] {\n display: flex;\n }\n\n #scrollers {\n display: flex;\n height: 100%;\n width: 100%;\n position: relative;\n overflow: hidden;\n }\n\n :host([desktop]) ::slotted([slot='months']) {\n right: 50px;\n transform: none !important;\n }\n\n :host([desktop]) ::slotted([slot='years']) {\n transform: none !important;\n }\n\n :host(.animate) ::slotted([slot='months']),\n :host(.animate) ::slotted([slot='years']) {\n transition: all 200ms;\n }\n\n [part='toolbar'] {\n display: flex;\n justify-content: space-between;\n z-index: 2;\n flex-shrink: 0;\n }\n`;\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';\nimport { FocusMixin } from './focus-mixin.js';\nimport { TabindexMixin } from './tabindex-mixin.js';\n\n/**\n * A mixin to forward focus to an element in the light DOM.\n *\n * @polymerMixin\n * @mixes FocusMixin\n * @mixes TabindexMixin\n */\nexport const DelegateFocusMixin = dedupingMixin(\n (superclass) =>\n class DelegateFocusMixinClass extends FocusMixin(TabindexMixin(superclass)) {\n static get properties() {\n return {\n /**\n * Specify that this control should have input focus when the page loads.\n */\n autofocus: {\n type: Boolean,\n },\n\n /**\n * A reference to the focusable element controlled by the mixin.\n * It can be an input, textarea, button or any element with tabindex > -1.\n *\n * Any component implementing this mixin is expected to provide it\n * by using `this._setFocusElement(input)` Polymer API.\n *\n * Toggling `tabindex` attribute on the host element propagates its value to `focusElement`.\n *\n * @protected\n * @type {!HTMLElement}\n */\n focusElement: {\n type: Object,\n readOnly: true,\n observer: '_focusElementChanged',\n },\n\n /**\n * Override the property from `TabIndexMixin`\n * to ensure the `tabindex` attribute of the focus element\n * will be restored to `0` after re-enabling the element.\n *\n * @protected\n * @override\n */\n _lastTabIndex: {\n value: 0,\n },\n };\n }\n\n constructor() {\n super();\n\n this._boundOnBlur = this._onBlur.bind(this);\n this._boundOnFocus = this._onFocus.bind(this);\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n if (this.autofocus && !this.disabled) {\n requestAnimationFrame(() => {\n this.focus();\n this.setAttribute('focus-ring', '');\n });\n }\n }\n\n /**\n * @protected\n * @override\n */\n focus() {\n if (this.focusElement && !this.disabled) {\n this.focusElement.focus();\n }\n }\n\n /**\n * @protected\n * @override\n */\n blur() {\n if (this.focusElement) {\n this.focusElement.blur();\n }\n }\n\n /**\n * @protected\n * @override\n */\n click() {\n if (this.focusElement && !this.disabled) {\n this.focusElement.click();\n }\n }\n\n /** @protected */\n _focusElementChanged(element, oldElement) {\n if (element) {\n element.disabled = this.disabled;\n this._addFocusListeners(element);\n this.__forwardTabIndex(this.tabindex);\n } else if (oldElement) {\n this._removeFocusListeners(oldElement);\n }\n }\n\n /**\n * @param {HTMLElement} element\n * @protected\n */\n _addFocusListeners(element) {\n element.addEventListener('blur', this._boundOnBlur);\n element.addEventListener('focus', this._boundOnFocus);\n }\n\n /**\n * @param {HTMLElement} element\n * @protected\n */\n _removeFocusListeners(element) {\n element.removeEventListener('blur', this._boundOnBlur);\n element.removeEventListener('focus', this._boundOnFocus);\n }\n\n /**\n * Focus event does not bubble, so we dispatch it manually\n * on the host element to support adding focus listeners\n * when the focusable element is placed in light DOM.\n * @param {FocusEvent} event\n * @protected\n */\n _onFocus(event) {\n event.stopPropagation();\n this.dispatchEvent(new Event('focus'));\n }\n\n /**\n * Blur event does not bubble, so we dispatch it manually\n * on the host element to support adding blur listeners\n * when the focusable element is placed in light DOM.\n * @param {FocusEvent} event\n * @protected\n */\n _onBlur(event) {\n event.stopPropagation();\n this.dispatchEvent(new Event('blur'));\n }\n\n /**\n * @param {FocusEvent} event\n * @return {boolean}\n * @protected\n * @override\n */\n _shouldSetFocus(event) {\n return event.target === this.focusElement;\n }\n\n /**\n * @param {FocusEvent} event\n * @return {boolean}\n * @protected\n * @override\n */\n _shouldRemoveFocus(event) {\n return event.target === this.focusElement;\n }\n\n /**\n * @param {boolean} disabled\n * @param {boolean} oldDisabled\n * @protected\n * @override\n */\n _disabledChanged(disabled, oldDisabled) {\n super._disabledChanged(disabled, oldDisabled);\n\n if (this.focusElement) {\n this.focusElement.disabled = disabled;\n }\n\n if (disabled) {\n this.blur();\n }\n }\n\n /**\n * Override an observer from `TabindexMixin`.\n * Do not call super to remove tabindex attribute\n * from the host after it has been forwarded.\n * @param {string} tabindex\n * @protected\n * @override\n */\n _tabindexChanged(tabindex) {\n this.__forwardTabIndex(tabindex);\n }\n\n /** @private */\n __forwardTabIndex(tabindex) {\n if (tabindex !== undefined && this.focusElement) {\n this.focusElement.tabIndex = tabindex;\n\n // Preserve tabindex=\"-1\" on the host element\n if (tabindex !== -1) {\n this.tabindex = undefined;\n }\n }\n\n if (this.disabled && tabindex) {\n // If tabindex attribute was changed while component was disabled\n if (tabindex !== -1) {\n this._lastTabIndex = tabindex;\n }\n this.tabindex = undefined;\n }\n }\n },\n);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';\n\nconst stylesMap = new WeakMap();\n\n/**\n * Get all the styles inserted into root.\n * @param {DocumentOrShadowRoot} root\n * @return {Set<string>}\n */\nfunction getRootStyles(root) {\n if (!stylesMap.has(root)) {\n stylesMap.set(root, new Set());\n }\n\n return stylesMap.get(root);\n}\n\n/**\n * Insert styles into the root.\n * @param {string} styles\n * @param {DocumentOrShadowRoot} root\n */\nfunction insertStyles(styles, root) {\n const style = document.createElement('style');\n style.textContent = styles;\n\n if (root === document) {\n document.head.appendChild(style);\n } else {\n root.insertBefore(style, root.firstChild);\n }\n}\n\n/**\n * Mixin to insert styles into the outer scope to handle slotted components.\n * This is useful e.g. to hide native `<input type=\"number\">` controls.\n *\n * @polymerMixin\n */\nexport const SlotStylesMixin = dedupingMixin(\n (superclass) =>\n class SlotStylesMixinClass extends superclass {\n /**\n * List of styles to insert into root.\n * @protected\n */\n get slotStyles() {\n return {};\n }\n\n /** @protected */\n connectedCallback() {\n super.connectedCallback();\n\n this.__applySlotStyles();\n }\n\n /** @private */\n __applySlotStyles() {\n const root = this.getRootNode();\n const rootStyles = getRootStyles(root);\n\n this.slotStyles.forEach((styles) => {\n if (!rootStyles.has(styles)) {\n insertStyles(styles, root);\n rootStyles.add(styles);\n }\n });\n }\n },\n);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';\n\n/**\n * A mixin to store the reference to an input element\n * and add input and change event listeners to it.\n *\n * @polymerMixin\n */\nexport const InputMixin = dedupingMixin(\n (superclass) =>\n class InputMixinClass extends superclass {\n static get properties() {\n return {\n /**\n * A reference to the input element controlled by the mixin.\n * Any component implementing this mixin is expected to provide it\n * by using `this._setInputElement(input)` Polymer API.\n *\n * A typical case is using `InputController` that does this automatically.\n * However, the input element does not have to always be native <input>:\n * as an example, <vaadin-combo-box-light> accepts other components.\n *\n * @protected\n * @type {!HTMLElement}\n */\n inputElement: {\n type: Object,\n readOnly: true,\n observer: '_inputElementChanged',\n },\n\n /**\n * String used to define input type.\n * @protected\n */\n type: {\n type: String,\n readOnly: true,\n },\n\n /**\n * The value of the field.\n */\n value: {\n type: String,\n value: '',\n observer: '_valueChanged',\n notify: true,\n sync: true,\n },\n\n /**\n * Whether the input element has a non-empty value.\n *\n * @protected\n */\n _hasInputValue: {\n type: Boolean,\n value: false,\n observer: '_hasInputValueChanged',\n },\n };\n }\n\n constructor() {\n super();\n\n this._boundOnInput = this.__onInput.bind(this);\n this._boundOnChange = this._onChange.bind(this);\n }\n\n /**\n * Indicates whether the value is different from the default one.\n * Override if the `value` property has a type other than `string`.\n *\n * @protected\n */\n get _hasValue() {\n return this.value != null && this.value !== '';\n }\n\n /**\n * A property for accessing the input element's value.\n *\n * Override this getter if the property is different from the default `value` one.\n *\n * @protected\n * @return {string}\n */\n get _inputElementValueProperty() {\n return 'value';\n }\n\n /**\n * The input element's value.\n *\n * @protected\n * @return {string}\n */\n get _inputElementValue() {\n return this.inputElement ? this.inputElement[this._inputElementValueProperty] : undefined;\n }\n\n /**\n * The input element's value.\n *\n * @protected\n */\n set _inputElementValue(value) {\n if (this.inputElement) {\n this.inputElement[this._inputElementValueProperty] = value;\n }\n }\n\n /**\n * Clear the value of the field.\n */\n clear() {\n this._hasInputValue = false;\n\n this.value = '';\n\n // Clear the input immediately without waiting for the observer.\n // Otherwise, when using Lit, the old value would be restored.\n this._inputElementValue = '';\n }\n\n /**\n * Add event listeners to the input element instance.\n * Override this method to add custom listeners.\n * @param {!HTMLElement} input\n * @protected\n */\n _addInputListeners(input) {\n input.addEventListener('input', this._boundOnInput);\n input.addEventListener('change', this._boundOnChange);\n }\n\n /**\n * Remove event listeners from the input element instance.\n * @param {!HTMLElement} input\n * @protected\n */\n _removeInputListeners(input) {\n input.removeEventListener('input', this._boundOnInput);\n input.removeEventListener('change', this._boundOnChange);\n }\n\n /**\n * A method to forward the value property set on the field\n * programmatically back to the input element value.\n * Override this method to perform additional checks,\n * for example to skip this in certain conditions.\n * @param {string} value\n * @protected\n */\n _forwardInputValue(value) {\n // Value might be set before an input element is initialized.\n // This case should be handled separately by a component that\n // implements this mixin, for example in `connectedCallback`.\n if (!this.inputElement) {\n return;\n }\n\n this._inputElementValue = value != null ? value : '';\n }\n\n /**\n * @param {HTMLElement | undefined} input\n * @param {HTMLElement | undefined} oldInput\n * @protected\n */\n _inputElementChanged(input, oldInput) {\n if (input) {\n this._addInputListeners(input);\n } else if (oldInput) {\n this._removeInputListeners(oldInput);\n }\n }\n\n /**\n * Observer to notify about the change of private property.\n *\n * @private\n */\n _hasInputValueChanged(hasValue, oldHasValue) {\n if (hasValue || oldHasValue) {\n this.dispatchEvent(new CustomEvent('has-input-value-changed'));\n }\n }\n\n /**\n * An input event listener used to update `_hasInputValue` property.\n * Do not override this method.\n *\n * @param {Event} event\n * @private\n */\n __onInput(event) {\n this._setHasInputValue(event);\n this._onInput(event);\n }\n\n /**\n * An input event listener used to update the field value.\n *\n * @param {Event} event\n * @protected\n */\n _onInput(event) {\n // In the case a custom web component is passed as `inputElement`,\n // the actual native input element, on which the event occurred,\n // can be inside shadow trees.\n const target = event.composedPath()[0];\n // Ignore fake input events e.g. used by clear button.\n this.__userInput = event.isTrusted;\n this.value = target.value;\n this.__userInput = false;\n }\n\n /**\n * A change event listener.\n * Override this method with an actual implementation.\n * @param {Event} _event\n * @protected\n */\n _onChange(_event) {}\n\n /**\n * Toggle the has-value attribute based on the value property.\n *\n * @param {boolean} hasValue\n * @protected\n */\n _toggleHasValue(hasValue) {\n this.toggleAttribute('has-value', hasValue);\n }\n\n /**\n * Observer called when a value property changes.\n * @param {string | undefined} newVal\n * @param {string | undefined} oldVal\n * @protected\n */\n _valueChanged(newVal, oldVal) {\n this._toggleHasValue(this._hasValue);\n\n // Setting initial value to empty string, do nothing.\n if (newVal === '' && oldVal === undefined) {\n return;\n }\n\n // Value is set by the user, no need to sync it back to input.\n if (this.__userInput) {\n return;\n }\n\n // Setting a value programmatically, sync it to input element.\n this._forwardInputValue(newVal);\n }\n\n /**\n * Sets the `_hasInputValue` property based on the `input` event.\n *\n * @param {InputEvent} event\n * @protected\n */\n _setHasInputValue(event) {\n // In the case a custom web component is passed as `inputElement`,\n // the actual native input element, on which the event occurred,\n // can be inside shadow trees.\n const target = event.composedPath()[0];\n this._hasInputValue = target.value.length > 0;\n }\n },\n);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { KeyboardMixin } from '@vaadin/a11y-base/src/keyboard-mixin.js';\nimport { isTouch } from '@vaadin/component-base/src/browser-utils.js';\nimport { InputMixin } from './input-mixin.js';\n\n/**\n * A mixin that manages the clear button.\n *\n * @polymerMixin\n * @mixes InputMixin\n * @mixes KeyboardMixin\n */\nexport const ClearButtonMixin = (superclass) =>\n class ClearButtonMixinClass extends InputMixin(KeyboardMixin(superclass)) {\n static get properties() {\n return {\n /**\n * Set to true to display the clear icon which clears the input.\n *\n * It is up to the component to choose where to place the clear icon:\n * in the Shadow DOM or in the light DOM. In any way, a reference to\n * the clear icon element should be provided via the `clearElement` getter.\n *\n * @attr {boolean} clear-button-visible\n */\n clearButtonVisible: {\n type: Boolean,\n reflectToAttribute: true,\n value: false,\n },\n };\n }\n\n /**\n * Any element extending this mixin is required to implement this getter.\n * It returns the reference to the clear button element.\n *\n * @protected\n * @return {Element | null | undefined}\n */\n get clearElement() {\n console.warn(`Please implement the 'clearElement' property in <${this.localName}>`);\n return null;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n if (this.clearElement) {\n this.clearElement.addEventListener('mousedown', (event) => this._onClearButtonMouseDown(event));\n this.clearElement.addEventListener('click', (event) => this._onClearButtonClick(event));\n }\n }\n\n /**\n * @param {Event} event\n * @protected\n */\n _onClearButtonClick(event) {\n event.preventDefault();\n this._onClearAction();\n }\n\n /**\n * @param {MouseEvent} event\n * @protected\n */\n _onClearButtonMouseDown(event) {\n event.preventDefault();\n if (!isTouch) {\n this.inputElement.focus();\n }\n }\n\n /**\n * Override an event listener inherited from `KeydownMixin` to clear on Esc.\n * Components that extend this mixin can prevent this behavior by overriding\n * this method without calling `super._onEscape` to provide custom logic.\n *\n * @param {KeyboardEvent} event\n * @protected\n * @override\n */\n _onEscape(event) {\n super._onEscape(event);\n\n if (this.clearButtonVisible && !!this.value) {\n event.stopPropagation();\n this._onClearAction();\n }\n }\n\n /**\n * Clears the value and dispatches `input` and `change` events\n * on the input element. This method should be called\n * when the clear action originates from the user.\n *\n * @protected\n */\n _onClearAction() {\n this.clear();\n // Note, according to the HTML spec, the native change event isn't composed\n // while the input event is composed.\n this.inputElement.dispatchEvent(new Event('input', { bubbles: true, composed: true }));\n this.inputElement.dispatchEvent(new Event('change', { bubbles: true }));\n }\n };\n","/**\n * @license\n * Copyright (c) 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport {\n addValueToAttribute,\n deserializeAttributeValue,\n removeValueFromAttribute,\n serializeAttributeValue,\n} from '@vaadin/component-base/src/dom-utils.js';\n\nconst attributeToTargets = new Map();\n\n/**\n * Gets or creates a Set with the stored values for each element controlled by this helper\n *\n * @param {string} attr the attribute name used as key in the map\n *\n * @returns {WeakMap<HTMLElement, Set<string>} a weak map with the stored values for the elements being controlled by the helper\n */\nfunction getAttrMap(attr) {\n if (!attributeToTargets.has(attr)) {\n attributeToTargets.set(attr, new WeakMap());\n }\n return attributeToTargets.get(attr);\n}\n\n/**\n * Cleans the values set on the attribute to the given element.\n * It also stores the current values in the map, if `storeValue` is `true`.\n *\n * @param {HTMLElement} target\n * @param {string} attr the attribute to be cleared\n * @param {boolean} storeValue whether or not the current value of the attribute should be stored on the map\n * @returns\n */\nfunction cleanAriaIDReference(target, attr) {\n if (!target) {\n return;\n }\n\n target.removeAttribute(attr);\n}\n\n/**\n * Storing values of the accessible attributes in a Set inside of the WeakMap.\n *\n * @param {HTMLElement} target\n * @param {string} attr the attribute to be stored\n */\nfunction storeAriaIDReference(target, attr) {\n if (!target || !attr) {\n return;\n }\n const attributeMap = getAttrMap(attr);\n if (attributeMap.has(target)) {\n return;\n }\n const values = deserializeAttributeValue(target.getAttribute(attr));\n attributeMap.set(target, new Set(values));\n}\n\n/**\n * Restores the generated values of the attribute to the given element.\n *\n * @param {HTMLElement} target\n * @param {string} attr\n */\nexport function restoreGeneratedAriaIDReference(target, attr) {\n if (!target || !attr) {\n return;\n }\n const attributeMap = getAttrMap(attr);\n const values = attributeMap.get(target);\n if (!values || values.size === 0) {\n target.removeAttribute(attr);\n } else {\n addValueToAttribute(target, attr, serializeAttributeValue(values));\n }\n attributeMap.delete(target);\n}\n\n/**\n * Sets a new ID reference for a target element and an ARIA attribute.\n *\n * @typedef {Object} AriaIdReferenceConfig\n * @property {string | null | undefined} newId\n * @property {string | null | undefined} oldId\n * @property {boolean | null | undefined} fromUser\n * @param {HTMLElement} target\n * @param {string} attr\n * @param {AriaIdReferenceConfig | null | undefined} config\n * @param config.newId The new ARIA ID reference to set. If `null`, the attribute is removed,\n * and `config.fromUser` is true, any stored values are restored. If there are stored values\n * and `config.fromUser` is `false`, then `config.newId` is added to the stored values set.\n * @param config.oldId The ARIA ID reference to be removed from the attribute. If there are\n * stored values and `config.fromUser` is `false`, then `config.oldId` is removed from the\n * stored values set.\n * @param config.fromUser Indicates whether the function is called by the user or internally.\n * When `config.fromUser` is called with `true` for the first time, the function will clear\n * and store the attribute value for the given element.\n */\nexport function setAriaIDReference(target, attr, config = { newId: null, oldId: null, fromUser: false }) {\n if (!target || !attr) {\n return;\n }\n\n const { newId, oldId, fromUser } = config;\n\n const attributeMap = getAttrMap(attr);\n const storedValues = attributeMap.get(target);\n\n if (!fromUser && !!storedValues) {\n // If there's any stored values, it means the attribute is being handled by the user\n // Replace the \"oldId\" with \"newId\" on the stored values set and leave\n oldId && storedValues.delete(oldId);\n newId && storedValues.add(newId);\n return;\n }\n\n if (fromUser) {\n if (!storedValues) {\n // If it's called from user and there's no stored values for the attribute,\n // then store the current value\n storeAriaIDReference(target, attr);\n } else if (!newId) {\n // If called from user with newId == null, it means the attribute will no longer\n // be in control of the user and the stored values should be restored\n // Removing the entry on the map for this target\n attributeMap.delete(target);\n }\n\n // If it's from user, then clear the attribute value before setting newId\n cleanAriaIDReference(target, attr);\n }\n\n removeValueFromAttribute(target, attr, oldId);\n\n const attributeValue = !newId ? serializeAttributeValue(storedValues) : newId;\n if (attributeValue) {\n addValueToAttribute(target, attr, attributeValue);\n }\n}\n\n/**\n * Removes the {@link attr | attribute} value of the given {@link target} element.\n * It also stores the current value, if no stored values are present.\n *\n * @param {HTMLElement} target\n * @param {string} attr\n */\nexport function removeAriaIDReference(target, attr) {\n storeAriaIDReference(target, attr);\n cleanAriaIDReference(target, attr);\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport {\n removeAriaIDReference,\n restoreGeneratedAriaIDReference,\n setAriaIDReference,\n} from '@vaadin/a11y-base/src/aria-id-reference.js';\n\n/**\n * A controller for managing ARIA attributes for a field element:\n * either the component itself or slotted `<input>` element.\n */\nexport class FieldAriaController {\n constructor(host) {\n this.host = host;\n this.__required = false;\n }\n\n /**\n * Sets a target element to which ARIA attributes are added.\n *\n * @param {HTMLElement} target\n */\n setTarget(target) {\n this.__target = target;\n this.__setAriaRequiredAttribute(this.__required);\n // We need to make sure that value in __labelId is stored\n this.__setLabelIdToAriaAttribute(this.__labelId, this.__labelId);\n if (this.__labelIdFromUser != null) {\n this.__setLabelIdToAriaAttribute(this.__labelIdFromUser, this.__labelIdFromUser, true);\n }\n this.__setErrorIdToAriaAttribute(this.__errorId);\n this.__setHelperIdToAriaAttribute(this.__helperId);\n this.setAriaLabel(this.__label);\n }\n\n /**\n * Toggles the `aria-required` attribute on the target element\n * if the target is the host component (e.g. a field group).\n * Otherwise, it does nothing.\n *\n * @param {boolean} required\n */\n setRequired(required) {\n this.__setAriaRequiredAttribute(required);\n this.__required = required;\n }\n\n /**\n * Defines the `aria-label` attribute of the target element.\n *\n * To remove the attribute, pass `null` as `label`.\n *\n * @param {string | null | undefined} label\n */\n setAriaLabel(label) {\n this.__setAriaLabelToAttribute(label);\n this.__label = label;\n }\n\n /**\n * Links the target element with a slotted label element\n * via the target's attribute `aria-labelledby`.\n *\n * To unlink the previous slotted label element, pass `null` as `labelId`.\n *\n * @param {string | null} labelId\n */\n setLabelId(labelId, fromUser = false) {\n const oldLabelId = fromUser ? this.__labelIdFromUser : this.__labelId;\n this.__setLabelIdToAriaAttribute(labelId, oldLabelId, fromUser);\n if (fromUser) {\n this.__labelIdFromUser = labelId;\n } else {\n this.__labelId = labelId;\n }\n }\n\n /**\n * Links the target element with a slotted error element via the target's attribute:\n * - `aria-labelledby` if the target is the host component (e.g a field group).\n * - `aria-describedby` otherwise.\n *\n * To unlink the previous slotted error element, pass `null` as `errorId`.\n *\n * @param {string | null} errorId\n */\n setErrorId(errorId) {\n this.__setErrorIdToAriaAttribute(errorId, this.__errorId);\n this.__errorId = errorId;\n }\n\n /**\n * Links the target element with a slotted helper element via the target's attribute:\n * - `aria-labelledby` if the target is the host component (e.g a field group).\n * - `aria-describedby` otherwise.\n *\n * To unlink the previous slotted helper element, pass `null` as `helperId`.\n *\n * @param {string | null} helperId\n */\n setHelperId(helperId) {\n this.__setHelperIdToAriaAttribute(helperId, this.__helperId);\n this.__helperId = helperId;\n }\n\n /**\n * @param {string | null | undefined} label\n * @private\n * */\n __setAriaLabelToAttribute(label) {\n if (!this.__target) {\n return;\n }\n if (label) {\n removeAriaIDReference(this.__target, 'aria-labelledby');\n this.__target.setAttribute('aria-label', label);\n } else if (this.__label) {\n restoreGeneratedAriaIDReference(this.__target, 'aria-labelledby');\n this.__target.removeAttribute('aria-label');\n }\n }\n\n /**\n * @param {string | null | undefined} labelId\n * @param {string | null | undefined} oldLabelId\n * @param {boolean | null | undefined} fromUser\n * @private\n */\n __setLabelIdToAriaAttribute(labelId, oldLabelId, fromUser) {\n setAriaIDReference(this.__target, 'aria-labelledby', { newId: labelId, oldId: oldLabelId, fromUser });\n }\n\n /**\n * @param {string | null | undefined} errorId\n * @param {string | null | undefined} oldErrorId\n * @private\n */\n __setErrorIdToAriaAttribute(errorId, oldErrorId) {\n setAriaIDReference(this.__target, 'aria-describedby', { newId: errorId, oldId: oldErrorId, fromUser: false });\n }\n\n /**\n * @param {string | null | undefined} helperId\n * @param {string | null | undefined} oldHelperId\n * @private\n */\n __setHelperIdToAriaAttribute(helperId, oldHelperId) {\n setAriaIDReference(this.__target, 'aria-describedby', { newId: helperId, oldId: oldHelperId, fromUser: false });\n }\n\n /**\n * @param {boolean} required\n * @private\n */\n __setAriaRequiredAttribute(required) {\n if (!this.__target) {\n return;\n }\n\n if (['input', 'textarea'].includes(this.__target.localName)) {\n // Native <input> or <textarea>, required is enough\n return;\n }\n\n if (required) {\n this.__target.setAttribute('aria-required', 'true');\n } else {\n this.__target.removeAttribute('aria-required');\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2022 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from './slot-controller.js';\n\n/**\n * A controller that observes slotted element mutations, especially ID attribute\n * and the text content, and fires an event to notify host element about those.\n */\nexport class SlotChildObserveController extends SlotController {\n constructor(host, slot, tagName, config = {}) {\n super(host, slot, tagName, { ...config, useUniqueId: true });\n }\n\n /**\n * Override to initialize the newly added custom node.\n *\n * @param {Node} node\n * @protected\n * @override\n */\n initCustomNode(node) {\n this.__updateNodeId(node);\n this.__notifyChange(node);\n }\n\n /**\n * Override to notify the controller host about removal of\n * the custom node, and to apply the default one if needed.\n *\n * @param {Node} _node\n * @protected\n * @override\n */\n teardownNode(_node) {\n const node = this.getSlotChild();\n\n // Custom node is added to the slot\n if (node && node !== this.defaultNode) {\n this.__notifyChange(node);\n } else {\n this.restoreDefaultNode();\n this.updateDefaultNode(this.node);\n }\n }\n\n /**\n * Override method inherited from `SlotMixin`\n * to set ID attribute on the default node.\n *\n * @return {Node}\n * @protected\n * @override\n */\n attachDefaultNode() {\n const node = super.attachDefaultNode();\n\n if (node) {\n this.__updateNodeId(node);\n }\n\n return node;\n }\n\n /**\n * Override to restore default node when a custom one is removed.\n *\n * @protected\n */\n restoreDefaultNode() {\n // To be implemented\n }\n\n /**\n * Override to update default node text on property change.\n *\n * @param {Node} node\n * @protected\n */\n updateDefaultNode(node) {\n this.__notifyChange(node);\n }\n\n /**\n * Setup the mutation observer on the node to update ID and notify host.\n * Node doesn't get observed automatically until this method is called.\n *\n * @param {Node} node\n * @protected\n */\n observeNode(node) {\n // Stop observing the previous node, if any.\n if (this.__nodeObserver) {\n this.__nodeObserver.disconnect();\n }\n\n this.__nodeObserver = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n const target = mutation.target;\n\n // Ensure the mutation target is the currently connected node\n // to ignore async mutations dispatched for removed element.\n const isCurrentNodeMutation = target === this.node;\n\n if (mutation.type === 'attributes') {\n // We use attributeFilter to only observe ID mutation,\n // no need to check for attribute name separately.\n if (isCurrentNodeMutation) {\n this.__updateNodeId(target);\n }\n } else if (isCurrentNodeMutation || target.parentElement === this.node) {\n // Node text content has changed.\n this.__notifyChange(this.node);\n }\n });\n });\n\n // Observe changes to node ID attribute, text content and children.\n this.__nodeObserver.observe(node, {\n attributes: true,\n attributeFilter: ['id'],\n childList: true,\n subtree: true,\n characterData: true,\n });\n }\n\n /**\n * Returns true if a node is an HTML element with children,\n * or is a defined custom element, or has non-empty text.\n *\n * @param {Node} node\n * @return {boolean}\n * @private\n */\n __hasContent(node) {\n if (!node) {\n return false;\n }\n\n return (\n (node.nodeType === Node.ELEMENT_NODE && (customElements.get(node.localName) || node.children.length > 0)) ||\n (node.textContent && node.textContent.trim() !== '')\n );\n }\n\n /**\n * Fire an event to notify the controller host about node changes.\n *\n * @param {Node} node\n * @private\n */\n __notifyChange(node) {\n this.dispatchEvent(\n new CustomEvent('slot-content-changed', {\n detail: { hasContent: this.__hasContent(node), node },\n }),\n );\n }\n\n /**\n * Set default ID on the node in case it is an HTML element.\n *\n * @param {Node} node\n * @private\n */\n __updateNodeId(node) {\n // When in multiple mode, only set ID attribute on the element in default slot.\n const isFirstNode = !this.nodes || node === this.nodes[0];\n if (node.nodeType === Node.ELEMENT_NODE && (!this.multiple || isFirstNode) && !node.id) {\n node.id = this.defaultId;\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotChildObserveController } from '@vaadin/component-base/src/slot-child-observe-controller.js';\n\n/**\n * A controller that manages the error message node content.\n */\nexport class ErrorController extends SlotChildObserveController {\n constructor(host) {\n super(host, 'error-message', 'div');\n }\n\n /**\n * Set the error message element text content.\n *\n * @param {string} errorMessage\n */\n setErrorMessage(errorMessage) {\n this.errorMessage = errorMessage;\n\n this.updateDefaultNode(this.node);\n }\n\n /**\n * Set invalid state for detecting whether to show error message.\n *\n * @param {boolean} invalid\n */\n setInvalid(invalid) {\n this.invalid = invalid;\n\n this.updateDefaultNode(this.node);\n }\n\n /**\n * Override method inherited from `SlotController` to not run\n * initializer on the custom slotted node unnecessarily.\n *\n * @param {Node} node\n * @protected\n * @override\n */\n initAddedNode(node) {\n if (node !== this.defaultNode) {\n // There is no need to run `initNode`.\n this.initCustomNode(node);\n }\n }\n\n /**\n * Override to initialize the newly added default error message.\n *\n * @param {Node} errorNode\n * @protected\n * @override\n */\n initNode(errorNode) {\n this.updateDefaultNode(errorNode);\n }\n\n /**\n * Override to initialize the newly added custom error message.\n *\n * @param {Node} errorNode\n * @protected\n * @override\n */\n initCustomNode(errorNode) {\n // Save the custom error message content on the host.\n if (errorNode.textContent && !this.errorMessage) {\n this.errorMessage = errorNode.textContent.trim();\n }\n\n // Notify the host about custom node.\n super.initCustomNode(errorNode);\n }\n\n /**\n * Override method inherited from `SlotChildObserveController`\n * to restore the default error message element.\n *\n * @protected\n * @override\n */\n restoreDefaultNode() {\n this.attachDefaultNode();\n }\n\n /**\n * Override method inherited from `SlotChildObserveController`\n * to update the error message text and hidden state.\n *\n * Note: unlike with other controllers, this method is\n * called for both default and custom error message.\n *\n * @param {Node | undefined} node\n * @protected\n * @override\n */\n updateDefaultNode(errorNode) {\n const { errorMessage, invalid } = this;\n const hasError = Boolean(invalid && errorMessage && errorMessage.trim() !== '');\n\n if (errorNode) {\n errorNode.textContent = hasError ? errorMessage : '';\n errorNode.hidden = !hasError;\n\n // Role alert will make the error message announce immediately\n // as the field becomes invalid\n if (hasError) {\n errorNode.setAttribute('role', 'alert');\n } else {\n errorNode.removeAttribute('role');\n }\n }\n\n // Notify the host after update.\n super.updateDefaultNode(errorNode);\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotChildObserveController } from '@vaadin/component-base/src/slot-child-observe-controller.js';\n\n/**\n * A controller that manages the helper node content.\n */\nexport class HelperController extends SlotChildObserveController {\n constructor(host) {\n // Do not provide tag name, as we create helper lazily.\n super(host, 'helper', null);\n }\n\n /**\n * Set helper text based on corresponding host property.\n *\n * @param {string} helperText\n */\n setHelperText(helperText) {\n this.helperText = helperText;\n\n // Restore the default helper, if needed.\n const helperNode = this.getSlotChild();\n if (!helperNode) {\n this.restoreDefaultNode();\n }\n\n // When default helper is used, update it.\n if (this.node === this.defaultNode) {\n this.updateDefaultNode(this.node);\n }\n }\n\n /**\n * Override method inherited from `SlotChildObserveController`\n * to create the default helper element lazily as needed.\n *\n * @param {Node | undefined} node\n * @protected\n * @override\n */\n restoreDefaultNode() {\n const { helperText } = this;\n\n // No helper yet, create one.\n if (helperText && helperText.trim() !== '') {\n this.tagName = 'div';\n\n const helperNode = this.attachDefaultNode();\n\n // Observe the default node.\n this.observeNode(helperNode);\n }\n }\n\n /**\n * Override method inherited from `SlotChildObserveController`\n * to update the default helper element text content.\n *\n * @param {Node | undefined} node\n * @protected\n * @override\n */\n updateDefaultNode(node) {\n if (node) {\n node.textContent = this.helperText;\n }\n\n // Notify the host after update.\n super.updateDefaultNode(node);\n }\n\n /**\n * Override to observe the newly added custom node.\n *\n * @param {Node} node\n * @protected\n * @override\n */\n initCustomNode(node) {\n // Notify the host about a custom slotted helper.\n super.initCustomNode(node);\n\n this.observeNode(node);\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotChildObserveController } from '@vaadin/component-base/src/slot-child-observe-controller.js';\n\n/**\n * A controller to manage the label element.\n */\nexport class LabelController extends SlotChildObserveController {\n constructor(host) {\n super(host, 'label', 'label');\n }\n\n /**\n * Set label based on corresponding host property.\n *\n * @param {string} label\n */\n setLabel(label) {\n this.label = label;\n\n // Restore the default label, if needed.\n const labelNode = this.getSlotChild();\n if (!labelNode) {\n this.restoreDefaultNode();\n }\n\n // When default label is used, update it.\n if (this.node === this.defaultNode) {\n this.updateDefaultNode(this.node);\n }\n }\n\n /**\n * Override method inherited from `SlotChildObserveController`\n * to restore and observe the default label element.\n *\n * @protected\n * @override\n */\n restoreDefaultNode() {\n const { label } = this;\n\n // Restore the default label.\n if (label && label.trim() !== '') {\n const labelNode = this.attachDefaultNode();\n\n // Observe the default label.\n this.observeNode(labelNode);\n }\n }\n\n /**\n * Override method inherited from `SlotChildObserveController`\n * to update the default label element text content.\n *\n * @param {Node | undefined} node\n * @protected\n * @override\n */\n updateDefaultNode(node) {\n if (node) {\n node.textContent = this.label;\n }\n\n // Notify the host after update.\n super.updateDefaultNode(node);\n }\n\n /**\n * Override to observe the newly added custom node.\n *\n * @param {Node} node\n * @protected\n * @override\n */\n initCustomNode(node) {\n // Notify the host about adding a custom node.\n super.initCustomNode(node);\n\n this.observeNode(node);\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';\nimport { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';\nimport { LabelController } from './label-controller.js';\n\n/**\n * A mixin to provide label via corresponding property or named slot.\n *\n * @polymerMixin\n * @mixes ControllerMixin\n */\nexport const LabelMixin = dedupingMixin(\n (superclass) =>\n class LabelMixinClass extends ControllerMixin(superclass) {\n static get properties() {\n return {\n /**\n * The label text for the input node.\n * When no light dom defined via [slot=label], this value will be used.\n */\n label: {\n type: String,\n observer: '_labelChanged',\n },\n };\n }\n\n constructor() {\n super();\n\n this._labelController = new LabelController(this);\n\n this._labelController.addEventListener('slot-content-changed', (event) => {\n this.toggleAttribute('has-label', event.detail.hasContent);\n });\n }\n\n /** @protected */\n get _labelId() {\n const node = this._labelNode;\n return node && node.id;\n }\n\n /** @protected */\n get _labelNode() {\n return this._labelController.node;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addController(this._labelController);\n }\n\n /** @protected */\n _labelChanged(label) {\n this._labelController.setLabel(label);\n }\n },\n);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';\n\n/**\n * A mixin to provide required state and validation logic.\n *\n * @polymerMixin\n */\nexport const ValidateMixin = dedupingMixin(\n (superclass) =>\n class ValidateMixinClass extends superclass {\n static get properties() {\n return {\n /**\n * Set to true when the field is invalid.\n */\n invalid: {\n type: Boolean,\n reflectToAttribute: true,\n notify: true,\n value: false,\n },\n\n /**\n * Specifies that the user must fill in a value.\n */\n required: {\n type: Boolean,\n reflectToAttribute: true,\n },\n };\n }\n\n /**\n * Validates the field and sets the `invalid` property based on the result.\n *\n * The method fires a `validated` event with the result of the validation.\n *\n * @return {boolean} True if the value is valid.\n */\n validate() {\n const isValid = this.checkValidity();\n this._setInvalid(!isValid);\n this.dispatchEvent(new CustomEvent('validated', { detail: { valid: isValid } }));\n return isValid;\n }\n\n /**\n * Returns true if the field value satisfies all constraints (if any).\n *\n * @return {boolean}\n */\n checkValidity() {\n return !this.required || !!this.value;\n }\n\n /**\n * @param {boolean} invalid\n * @protected\n */\n _setInvalid(invalid) {\n if (this._shouldSetInvalid(invalid)) {\n this.invalid = invalid;\n }\n }\n\n /**\n * Override this method to define whether the given `invalid` state should be set.\n *\n * @param {boolean} _invalid\n * @return {boolean}\n * @protected\n */\n _shouldSetInvalid(_invalid) {\n return true;\n }\n\n /**\n * Fired whenever the field is validated.\n *\n * @event validated\n * @param {Object} detail\n * @param {boolean} detail.valid the result of the validation.\n */\n },\n);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';\n\n/**\n * A mixin to delegate properties and attributes to a target element.\n *\n * @polymerMixin\n */\nexport const DelegateStateMixin = dedupingMixin(\n (superclass) =>\n class DelegateStateMixinClass extends superclass {\n static get properties() {\n return {\n /**\n * A target element to which attributes and properties are delegated.\n * @protected\n */\n stateTarget: {\n type: Object,\n observer: '_stateTargetChanged',\n },\n };\n }\n\n /**\n * An array of the host attributes to delegate to the target element.\n */\n static get delegateAttrs() {\n return [];\n }\n\n /**\n * An array of the host properties to delegate to the target element.\n */\n static get delegateProps() {\n return [];\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._createDelegateAttrsObserver();\n this._createDelegatePropsObserver();\n }\n\n /** @protected */\n _stateTargetChanged(target) {\n if (target) {\n this._ensureAttrsDelegated();\n this._ensurePropsDelegated();\n }\n }\n\n /** @protected */\n _createDelegateAttrsObserver() {\n this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(', ')})`);\n }\n\n /** @protected */\n _createDelegatePropsObserver() {\n this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(', ')})`);\n }\n\n /** @protected */\n _ensureAttrsDelegated() {\n this.constructor.delegateAttrs.forEach((name) => {\n this._delegateAttribute(name, this[name]);\n });\n }\n\n /** @protected */\n _ensurePropsDelegated() {\n this.constructor.delegateProps.forEach((name) => {\n this._delegateProperty(name, this[name]);\n });\n }\n\n /** @protected */\n _delegateAttrsChanged(...values) {\n this.constructor.delegateAttrs.forEach((name, index) => {\n this._delegateAttribute(name, values[index]);\n });\n }\n\n /** @protected */\n _delegatePropsChanged(...values) {\n this.constructor.delegateProps.forEach((name, index) => {\n this._delegateProperty(name, values[index]);\n });\n }\n\n /** @protected */\n _delegateAttribute(name, value) {\n if (!this.stateTarget) {\n return;\n }\n\n if (name === 'invalid') {\n this._delegateAttribute('aria-invalid', value ? 'true' : false);\n }\n\n if (typeof value === 'boolean') {\n this.stateTarget.toggleAttribute(name, value);\n } else if (value) {\n this.stateTarget.setAttribute(name, value);\n } else {\n this.stateTarget.removeAttribute(name);\n }\n }\n\n /** @protected */\n _delegateProperty(name, value) {\n if (!this.stateTarget) {\n return;\n }\n\n this.stateTarget[name] = value;\n }\n },\n);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';\nimport { DelegateStateMixin } from '@vaadin/component-base/src/delegate-state-mixin.js';\nimport { InputMixin } from './input-mixin.js';\nimport { ValidateMixin } from './validate-mixin.js';\n\n/**\n * A mixin to combine multiple input validation constraints.\n *\n * @polymerMixin\n * @mixes DelegateStateMixin\n * @mixes InputMixin\n * @mixes ValidateMixin\n */\nexport const InputConstraintsMixin = dedupingMixin(\n (superclass) =>\n class InputConstraintsMixinClass extends DelegateStateMixin(ValidateMixin(InputMixin(superclass))) {\n /**\n * An array of attributes which participate in the input validation.\n * Changing these attributes will cause the input to re-validate.\n *\n * IMPORTANT: The attributes should be properly delegated to the input element\n * from the host using `delegateAttrs` getter (see `DelegateStateMixin`).\n * The `required` attribute is already delegated.\n */\n static get constraints() {\n return ['required'];\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'required'];\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this._createConstraintsObserver();\n }\n\n /**\n * Returns true if the current input value satisfies all constraints (if any).\n * @return {boolean}\n */\n checkValidity() {\n if (this.inputElement && this._hasValidConstraints(this.constructor.constraints.map((c) => this[c]))) {\n return this.inputElement.checkValidity();\n }\n return !this.invalid;\n }\n\n /**\n * Returns true if some of the provided set of constraints are valid.\n * @param {Array} constraints\n * @return {boolean}\n * @protected\n */\n _hasValidConstraints(constraints) {\n return constraints.some((c) => this.__isValidConstraint(c));\n }\n\n /**\n * Override this method to customize setting up constraints observer.\n * @protected\n */\n _createConstraintsObserver() {\n // This complex observer needs to be added dynamically instead of using `static get observers()`\n // to make it possible to tweak this behavior in classes that apply this mixin.\n this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(', ')})`);\n }\n\n /**\n * Override this method to implement custom validation constraints.\n * @param {HTMLElement | undefined} stateTarget\n * @param {unknown[]} constraints\n * @protected\n */\n _constraintsChanged(stateTarget, ...constraints) {\n // The input element's validity cannot be determined until\n // all the necessary constraint attributes aren't set on it.\n if (!stateTarget) {\n return;\n }\n\n const hasConstraints = this._hasValidConstraints(constraints);\n const isLastConstraintRemoved = this.__previousHasConstraints && !hasConstraints;\n\n if ((this._hasValue || this.invalid) && hasConstraints) {\n this.validate();\n } else if (isLastConstraintRemoved) {\n this._setInvalid(false);\n }\n\n this.__previousHasConstraints = hasConstraints;\n }\n\n /**\n * Override an event listener inherited from `InputMixin`\n * to capture native `change` event and make sure that\n * a new one is dispatched after validation runs.\n * @param {Event} event\n * @protected\n * @override\n */\n _onChange(event) {\n event.stopPropagation();\n\n this.validate();\n\n this.dispatchEvent(\n new CustomEvent('change', {\n detail: {\n sourceEvent: event,\n },\n bubbles: event.bubbles,\n cancelable: event.cancelable,\n }),\n );\n }\n\n /** @private */\n __isValidConstraint(constraint) {\n // 0 is valid for `minlength` and `maxlength`\n return Boolean(constraint) || constraint === 0;\n }\n },\n);\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { DelegateFocusMixin } from '@vaadin/a11y-base/src/delegate-focus-mixin.js';\nimport { KeyboardMixin } from '@vaadin/a11y-base/src/keyboard-mixin.js';\nimport { timeOut } from '@vaadin/component-base/src/async.js';\nimport { Debouncer } from '@vaadin/component-base/src/debounce.js';\nimport { SlotStylesMixin } from '@vaadin/component-base/src/slot-styles-mixin.js';\nimport { ClearButtonMixin } from './clear-button-mixin.js';\nimport { FieldMixin } from './field-mixin.js';\nimport { InputConstraintsMixin } from './input-constraints-mixin.js';\n\n/**\n * A mixin to provide shared logic for the editable form input controls.\n *\n * @polymerMixin\n * @mixes DelegateFocusMixin\n * @mixes FieldMixin\n * @mixes InputConstraintsMixin\n * @mixes KeyboardMixin\n * @mixes ClearButtonMixin\n * @mixes SlotStylesMixin\n */\nexport const InputControlMixin = (superclass) =>\n class InputControlMixinClass extends SlotStylesMixin(\n DelegateFocusMixin(InputConstraintsMixin(FieldMixin(ClearButtonMixin(KeyboardMixin(superclass))))),\n ) {\n static get properties() {\n return {\n /**\n * A pattern matched against individual characters the user inputs.\n *\n * When set, the field will prevent:\n * - `keydown` events if the entered key doesn't match `/^allowedCharPattern$/`\n * - `paste` events if the pasted text doesn't match `/^allowedCharPattern*$/`\n * - `drop` events if the dropped text doesn't match `/^allowedCharPattern*$/`\n *\n * For example, to allow entering only numbers and minus signs, use:\n * `allowedCharPattern = \"[\\\\d-]\"`\n * @attr {string} allowed-char-pattern\n */\n allowedCharPattern: {\n type: String,\n observer: '_allowedCharPatternChanged',\n },\n\n /**\n * If true, the input text gets fully selected when the field is focused using click or touch / tap.\n */\n autoselect: {\n type: Boolean,\n value: false,\n },\n\n /**\n * The name of this field.\n */\n name: {\n type: String,\n reflectToAttribute: true,\n },\n\n /**\n * A hint to the user of what can be entered in the field.\n */\n placeholder: {\n type: String,\n reflectToAttribute: true,\n },\n\n /**\n * When present, it specifies that the field is read-only.\n */\n readonly: {\n type: Boolean,\n value: false,\n reflectToAttribute: true,\n },\n\n /**\n * The text usually displayed in a tooltip popup when the mouse is over the field.\n */\n title: {\n type: String,\n reflectToAttribute: true,\n },\n };\n }\n\n static get delegateAttrs() {\n return [...super.delegateAttrs, 'name', 'type', 'placeholder', 'readonly', 'invalid', 'title'];\n }\n\n constructor() {\n super();\n\n this._boundOnPaste = this._onPaste.bind(this);\n this._boundOnDrop = this._onDrop.bind(this);\n this._boundOnBeforeInput = this._onBeforeInput.bind(this);\n }\n\n /** @protected */\n get slotStyles() {\n // Needed for Safari, where ::slotted(...)::placeholder does not work\n return [\n `\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n `,\n ];\n }\n\n /**\n * Override an event listener from `DelegateFocusMixin`.\n * @param {FocusEvent} event\n * @protected\n * @override\n */\n _onFocus(event) {\n super._onFocus(event);\n\n if (this.autoselect && this.inputElement) {\n this.inputElement.select();\n }\n }\n\n /**\n * Override an event listener inherited from `InputMixin`\n * to capture native `change` event and make sure that\n * a new one is dispatched after validation runs.\n * @param {Event} event\n * @protected\n * @override\n */\n _onChange(event) {\n event.stopPropagation();\n\n this.validate();\n\n this.dispatchEvent(\n new CustomEvent('change', {\n detail: {\n sourceEvent: event,\n },\n bubbles: event.bubbles,\n cancelable: event.cancelable,\n }),\n );\n }\n\n /**\n * Override a method from `InputMixin`.\n * @param {!HTMLElement} input\n * @protected\n * @override\n */\n _addInputListeners(input) {\n super._addInputListeners(input);\n\n input.addEventListener('paste', this._boundOnPaste);\n input.addEventListener('drop', this._boundOnDrop);\n input.addEventListener('beforeinput', this._boundOnBeforeInput);\n }\n\n /**\n * Override a method from `InputMixin`.\n * @param {!HTMLElement} input\n * @protected\n * @override\n */\n _removeInputListeners(input) {\n super._removeInputListeners(input);\n\n input.removeEventListener('paste', this._boundOnPaste);\n input.removeEventListener('drop', this._boundOnDrop);\n input.removeEventListener('beforeinput', this._boundOnBeforeInput);\n }\n\n /**\n * Override an event listener from `KeyboardMixin`.\n * @param {!KeyboardEvent} event\n * @protected\n * @override\n */\n _onKeyDown(event) {\n super._onKeyDown(event);\n\n if (this.allowedCharPattern && !this.__shouldAcceptKey(event)) {\n event.preventDefault();\n this._markInputPrevented();\n }\n }\n\n /** @protected */\n _markInputPrevented() {\n // Add input-prevented attribute for 200ms\n this.setAttribute('input-prevented', '');\n this._preventInputDebouncer = Debouncer.debounce(this._preventInputDebouncer, timeOut.after(200), () => {\n this.removeAttribute('input-prevented');\n });\n }\n\n /** @private */\n __shouldAcceptKey(event) {\n return (\n event.metaKey ||\n event.ctrlKey ||\n !event.key || // Allow typing anything if event.key is not supported\n event.key.length !== 1 || // Allow \"Backspace\", \"ArrowLeft\" etc.\n this.__allowedCharRegExp.test(event.key)\n );\n }\n\n /** @private */\n _onPaste(e) {\n if (this.allowedCharPattern) {\n const pastedText = e.clipboardData.getData('text');\n if (!this.__allowedTextRegExp.test(pastedText)) {\n e.preventDefault();\n this._markInputPrevented();\n }\n }\n }\n\n /** @private */\n _onDrop(e) {\n if (this.allowedCharPattern) {\n const draggedText = e.dataTransfer.getData('text');\n if (!this.__allowedTextRegExp.test(draggedText)) {\n e.preventDefault();\n this._markInputPrevented();\n }\n }\n }\n\n /** @private */\n _onBeforeInput(e) {\n // The `beforeinput` event covers all the cases for `allowedCharPattern`: keyboard, pasting and dropping,\n // but it is still experimental technology so we can't rely on it. It's used here just as an additional check,\n // because it seems to be the only way to detect and prevent specific keys on mobile devices.\n // See https://github.com/vaadin/vaadin-text-field/issues/429\n if (this.allowedCharPattern && e.data && !this.__allowedTextRegExp.test(e.data)) {\n e.preventDefault();\n this._markInputPrevented();\n }\n }\n\n /** @private */\n _allowedCharPatternChanged(charPattern) {\n if (charPattern) {\n try {\n this.__allowedCharRegExp = new RegExp(`^${charPattern}$`, 'u');\n this.__allowedTextRegExp = new RegExp(`^${charPattern}*$`, 'u');\n } catch (e) {\n console.error(e);\n }\n }\n }\n\n /**\n * Fired when the user commits a value change.\n *\n * @event change\n */\n\n /**\n * Fired when the value is changed by the user: on every typing keystroke,\n * and the value is cleared using the clear button.\n *\n * @event input\n */\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { FieldAriaController } from '@vaadin/a11y-base/src/field-aria-controller.js';\nimport { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';\nimport { ErrorController } from './error-controller.js';\nimport { HelperController } from './helper-controller.js';\nimport { LabelMixin } from './label-mixin.js';\nimport { ValidateMixin } from './validate-mixin.js';\n\n/**\n * A mixin to provide common field logic: label, error message and helper text.\n *\n * @polymerMixin\n * @mixes ControllerMixin\n * @mixes LabelMixin\n * @mixes ValidateMixin\n */\nexport const FieldMixin = (superclass) =>\n class FieldMixinClass extends ValidateMixin(LabelMixin(ControllerMixin(superclass))) {\n static get properties() {\n return {\n /**\n * A target element to which ARIA attributes are set.\n * @protected\n */\n ariaTarget: {\n type: Object,\n observer: '_ariaTargetChanged',\n },\n\n /**\n * Error to show when the field is invalid.\n *\n * @attr {string} error-message\n */\n errorMessage: {\n type: String,\n observer: '_errorMessageChanged',\n },\n\n /**\n * String used for the helper text.\n * @attr {string} helper-text\n */\n helperText: {\n type: String,\n observer: '_helperTextChanged',\n },\n\n /**\n * String used to label the component to screen reader users.\n * @attr {string} accessible-name\n */\n accessibleName: {\n type: String,\n observer: '_accessibleNameChanged',\n },\n\n /**\n * Id of the element used as label of the component to screen reader users.\n * @attr {string} accessible-name-ref\n */\n accessibleNameRef: {\n type: String,\n observer: '_accessibleNameRefChanged',\n },\n };\n }\n\n static get observers() {\n return ['_invalidChanged(invalid)', '_requiredChanged(required)'];\n }\n\n constructor() {\n super();\n\n this._fieldAriaController = new FieldAriaController(this);\n this._helperController = new HelperController(this);\n this._errorController = new ErrorController(this);\n\n this._errorController.addEventListener('slot-content-changed', (event) => {\n this.toggleAttribute('has-error-message', event.detail.hasContent);\n });\n\n this._labelController.addEventListener('slot-content-changed', (event) => {\n const { hasContent, node } = event.detail;\n this.__labelChanged(hasContent, node);\n });\n\n this._helperController.addEventListener('slot-content-changed', (event) => {\n const { hasContent, node } = event.detail;\n this.toggleAttribute('has-helper', hasContent);\n this.__helperChanged(hasContent, node);\n });\n }\n\n /**\n * @protected\n * @return {HTMLElement}\n */\n get _errorNode() {\n return this._errorController.node;\n }\n\n /**\n * @protected\n * @return {HTMLElement}\n */\n get _helperNode() {\n return this._helperController.node;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addController(this._fieldAriaController);\n this.addController(this._helperController);\n this.addController(this._errorController);\n }\n\n /** @private */\n __helperChanged(hasHelper, helperNode) {\n if (hasHelper) {\n this._fieldAriaController.setHelperId(helperNode.id);\n } else {\n this._fieldAriaController.setHelperId(null);\n }\n }\n\n /** @protected */\n _accessibleNameChanged(accessibleName) {\n this._fieldAriaController.setAriaLabel(accessibleName);\n }\n\n /** @protected */\n _accessibleNameRefChanged(accessibleNameRef) {\n this._fieldAriaController.setLabelId(accessibleNameRef, true);\n }\n\n /** @private */\n __labelChanged(hasLabel, labelNode) {\n // Label ID should be only added when the label content is present.\n // Otherwise, it may conflict with an `aria-label` attribute possibly added by the user.\n if (hasLabel) {\n this._fieldAriaController.setLabelId(labelNode.id);\n } else {\n this._fieldAriaController.setLabelId(null);\n }\n }\n\n /**\n * @param {string | null | undefined} errorMessage\n * @protected\n */\n _errorMessageChanged(errorMessage) {\n this._errorController.setErrorMessage(errorMessage);\n }\n\n /**\n * @param {string} helperText\n * @protected\n */\n _helperTextChanged(helperText) {\n this._helperController.setHelperText(helperText);\n }\n\n /**\n * @param {HTMLElement | null | undefined} target\n * @protected\n */\n _ariaTargetChanged(target) {\n if (target) {\n this._fieldAriaController.setTarget(target);\n }\n }\n\n /**\n * @param {boolean} required\n * @protected\n */\n _requiredChanged(required) {\n this._fieldAriaController.setRequired(required);\n }\n\n /**\n * @param {boolean} invalid\n * @protected\n */\n _invalidChanged(invalid) {\n this._errorController.setInvalid(invalid);\n\n // This timeout is needed to prevent NVDA from announcing the error message twice:\n // 1. Once adding the `[role=alert]` attribute when updating `has-error-message` (OK).\n // 2. Once linking the error ID with the ARIA target here (unwanted).\n // Related issue: https://github.com/vaadin/web-components/issues/3061.\n setTimeout(() => {\n // Error message ID needs to be dynamically added / removed based on the validity\n // Otherwise assistive technologies would announce the error, even if we hide it.\n if (invalid) {\n const node = this._errorNode;\n this._fieldAriaController.setErrorId(node && node.id);\n } else {\n this._fieldAriaController.setErrorId(null);\n }\n });\n }\n };\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { SlotController } from '@vaadin/component-base/src/slot-controller.js';\n\n/**\n * A controller to create and initialize slotted `<input>` element.\n */\nexport class InputController extends SlotController {\n constructor(host, callback) {\n super(host, 'input', 'input', {\n initializer: (node, host) => {\n if (host.value) {\n node.value = host.value;\n }\n if (host.type) {\n node.setAttribute('type', host.type);\n }\n\n // Ensure every instance has unique ID\n node.id = this.defaultId;\n\n if (typeof callback === 'function') {\n callback(node);\n }\n },\n useUniqueId: true,\n });\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * A controller for linking a `<label>` element with an `<input>` element.\n */\nexport class LabelledInputController {\n constructor(input, labelController) {\n this.input = input;\n this.__preventDuplicateLabelClick = this.__preventDuplicateLabelClick.bind(this);\n\n labelController.addEventListener('slot-content-changed', (event) => {\n this.__initLabel(event.detail.node);\n });\n\n // Initialize the default label element\n this.__initLabel(labelController.node);\n }\n\n /**\n * @param {HTMLElement} label\n * @private\n */\n __initLabel(label) {\n if (label) {\n label.addEventListener('click', this.__preventDuplicateLabelClick);\n\n if (this.input) {\n label.setAttribute('for', this.input.id);\n }\n }\n }\n\n /**\n * The native platform fires an event for both the click on the label, and also\n * the subsequent click on the native input element caused by label click.\n * This results in two click events arriving at the host, but we only want one.\n * This method prevents the duplicate click and ensures the correct isTrusted event\n * with the correct event.target arrives at the host.\n * @private\n */\n __preventDuplicateLabelClick() {\n const inputClickHandler = (e) => {\n e.stopImmediatePropagation();\n this.input.removeEventListener('click', inputClickHandler);\n };\n this.input.addEventListener('click', inputClickHandler);\n }\n}\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd..\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const clearButton = css`\n [part='clear-button'] {\n display: none;\n cursor: default;\n }\n\n [part='clear-button']::before {\n content: '\\\\2715';\n }\n\n :host([clear-button-visible][has-value]:not([disabled]):not([readonly])) [part='clear-button'] {\n display: block;\n }\n`;\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd..\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { clearButton } from './clear-button-styles.js';\nimport { fieldShared } from './field-shared-styles.js';\nimport { inputFieldContainer } from './input-field-container-styles.js';\n\nexport const inputFieldShared = [fieldShared, inputFieldContainer, clearButton];\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd..\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const fieldShared = css`\n :host {\n display: inline-flex;\n outline: none;\n }\n\n :host::before {\n content: '\\\\2003';\n width: 0;\n display: inline-block;\n /* Size and position this element on the same vertical position as the input-field element\n to make vertical align for the host element work as expected */\n }\n\n :host([hidden]) {\n display: none !important;\n }\n\n :host(:not([has-label])) [part='label'] {\n display: none;\n }\n\n @media (forced-colors: active) {\n :host(:not([readonly])) [part='input-field'] {\n outline: 1px solid;\n outline-offset: -1px;\n }\n :host([focused]) [part='input-field'] {\n outline-width: 2px;\n }\n :host([disabled]) [part='input-field'] {\n outline-color: GrayText;\n }\n }\n`;\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd..\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const inputFieldContainer = css`\n [class$='container'] {\n display: flex;\n flex-direction: column;\n min-width: 100%;\n max-width: 100%;\n width: var(--vaadin-field-default-width, 12em);\n }\n`;\n","/**\n * @license\n * Copyright (c) 2021 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * A controller which prevents the virtual keyboard from showing up on mobile devices\n * when the field's overlay is closed.\n */\nexport class VirtualKeyboardController {\n /**\n * @param {{ inputElement?: HTMLElement; opened: boolean } & HTMLElement} host\n */\n constructor(host) {\n this.host = host;\n\n host.addEventListener('opened-changed', () => {\n if (!host.opened) {\n // Prevent opening the virtual keyboard when the input gets re-focused on dropdown close\n this.__setVirtualKeyboardEnabled(false);\n }\n });\n\n // Re-enable virtual keyboard on blur, so it gets opened when the field is focused again\n host.addEventListener('blur', () => this.__setVirtualKeyboardEnabled(true));\n\n // Re-enable the virtual keyboard whenever the field is touched\n host.addEventListener('touchstart', () => this.__setVirtualKeyboardEnabled(true));\n }\n\n /** @private */\n __setVirtualKeyboardEnabled(value) {\n if (this.host.inputElement) {\n this.host.inputElement.inputMode = value ? '' : 'none';\n }\n }\n}\n","/**\n * @license\n * Copyright (c) 2016 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { hideOthers } from '@vaadin/a11y-base/src/aria-hidden.js';\nimport { DelegateFocusMixin } from '@vaadin/a11y-base/src/delegate-focus-mixin.js';\nimport { KeyboardMixin } from '@vaadin/a11y-base/src/keyboard-mixin.js';\nimport { isIOS } from '@vaadin/component-base/src/browser-utils.js';\nimport { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';\nimport { MediaQueryController } from '@vaadin/component-base/src/media-query-controller.js';\nimport { OverlayClassMixin } from '@vaadin/component-base/src/overlay-class-mixin.js';\nimport { InputConstraintsMixin } from '@vaadin/field-base/src/input-constraints-mixin.js';\nimport { VirtualKeyboardController } from '@vaadin/field-base/src/virtual-keyboard-controller.js';\nimport {\n dateAllowed,\n dateEquals,\n extractDateParts,\n getAdjustedYear,\n getClosestDate,\n parseDate,\n} from './vaadin-date-picker-helper.js';\n\n/**\n * @polymerMixin\n * @mixes ControllerMixin\n * @mixes DelegateFocusMixin\n * @mixes InputConstraintsMixin\n * @mixes KeyboardMixin\n * @mixes OverlayClassMixin\n * @param {function(new:HTMLElement)} subclass\n */\nexport const DatePickerMixin = (subclass) =>\n class DatePickerMixinClass extends OverlayClassMixin(\n ControllerMixin(DelegateFocusMixin(InputConstraintsMixin(KeyboardMixin(subclass)))),\n ) {\n static get properties() {\n return {\n /**\n * The current selected date.\n * @type {Date | undefined}\n * @protected\n */\n _selectedDate: {\n type: Object,\n sync: true,\n },\n\n /**\n * @type {Date | undefined}\n * @protected\n */\n _focusedDate: {\n type: Object,\n sync: true,\n },\n\n /**\n * Selected date.\n *\n * Supported date formats:\n * - ISO 8601 `\"YYYY-MM-DD\"` (default)\n * - 6-digit extended ISO 8601 `\"+YYYYYY-MM-DD\"`, `\"-YYYYYY-MM-DD\"`\n *\n * @type {string}\n */\n value: {\n type: String,\n notify: true,\n value: '',\n sync: true,\n },\n\n /**\n * Date which should be visible when there is no value selected.\n *\n * The same date formats as for the `value` property are supported.\n * @attr {string} initial-position\n */\n initialPosition: String,\n\n /**\n * Set true to open the date selector overlay.\n */\n opened: {\n type: Boolean,\n reflectToAttribute: true,\n notify: true,\n observer: '_openedChanged',\n sync: true,\n },\n\n /**\n * Set true to prevent the overlay from opening automatically.\n * @attr {boolean} auto-open-disabled\n */\n autoOpenDisabled: Boolean,\n\n /**\n * Set true to display ISO-8601 week numbers in the calendar. Notice that\n * displaying week numbers is only supported when `i18n.firstDayOfWeek`\n * is 1 (Monday).\n * @attr {boolean} show-week-numbers\n */\n showWeekNumbers: {\n type: Boolean,\n value: false,\n sync: true,\n },\n\n /**\n * @type {boolean}\n * @protected\n */\n _fullscreen: {\n type: Boolean,\n value: false,\n sync: true,\n },\n\n /**\n * @type {string}\n * @protected\n */\n _fullscreenMediaQuery: {\n value: '(max-width: 420px), (max-height: 420px)',\n },\n\n /**\n * The object used to localize this component.\n * To change the default localization, replace the entire\n * `i18n` object with a custom one.\n *\n * To update individual properties, extend the existing i18n object like so:\n * ```\n * datePicker.i18n = { ...datePicker.i18n, {\n * formatDate: date => { ... },\n * parseDate: value => { ... },\n * }};\n * ```\n *\n * The object has the following JSON structure and default values:\n *\n * ```\n * {\n * // An array with the full names of months starting\n * // with January.\n * monthNames: [\n * 'January', 'February', 'March', 'April', 'May',\n * 'June', 'July', 'August', 'September',\n * 'October', 'November', 'December'\n * ],\n *\n * // An array of weekday names starting with Sunday. Used\n * // in screen reader announcements.\n * weekdays: [\n * 'Sunday', 'Monday', 'Tuesday', 'Wednesday',\n * 'Thursday', 'Friday', 'Saturday'\n * ],\n *\n * // An array of short weekday names starting with Sunday.\n * // Displayed in the calendar.\n * weekdaysShort: [\n * 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'\n * ],\n *\n * // An integer indicating the first day of the week\n * // (0 = Sunday, 1 = Monday, etc.).\n * firstDayOfWeek: 0,\n *\n * // Translation of the Today shortcut button text.\n * today: 'Today',\n *\n * // Translation of the Cancel button text.\n * cancel: 'Cancel',\n *\n * // Used for adjusting the year value when parsing dates with short years.\n * // The year values between 0 and 99 are evaluated and adjusted.\n * // Example: for a referenceDate of 1970-10-30;\n * // dateToBeParsed: 40-10-30, result: 1940-10-30\n * // dateToBeParsed: 80-10-30, result: 1980-10-30\n * // dateToBeParsed: 10-10-30, result: 2010-10-30\n * // Supported date format: ISO 8601 `\"YYYY-MM-DD\"` (default)\n * // The default value is the current date.\n * referenceDate: '',\n *\n * // A function to format given `Object` as\n * // date string. Object is in the format `{ day: ..., month: ..., year: ... }`\n * // Note: The argument month is 0-based. This means that January = 0 and December = 11.\n * formatDate: d => {\n * // returns a string representation of the given\n * // object in 'MM/DD/YYYY' -format\n * },\n *\n * // A function to parse the given text to an `Object` in the format `{ day: ..., month: ..., year: ... }`.\n * // Must properly parse (at least) text formatted by `formatDate`.\n * // Setting the property to null will disable keyboard input feature.\n * // Note: The argument month is 0-based. This means that January = 0 and December = 11.\n * parseDate: text => {\n * // Parses a string in 'MM/DD/YY', 'MM/DD' or 'DD' -format to\n * // an `Object` in the format `{ day: ..., month: ..., year: ... }`.\n * }\n *\n * // A function to format given `monthName` and\n * // `fullYear` integer as calendar title string.\n * formatTitle: (monthName, fullYear) => {\n * return monthName + ' ' + fullYear;\n * }\n * }\n * ```\n *\n * @type {!DatePickerI18n}\n * @default {English/US}\n */\n i18n: {\n type: Object,\n sync: true,\n value: () => {\n return {\n monthNames: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ],\n weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n firstDayOfWeek: 0,\n today: 'Today',\n cancel: 'Cancel',\n referenceDate: '',\n formatDate(d) {\n const yearStr = String(d.year).replace(/\\d+/u, (y) => '0000'.substr(y.length) + y);\n return [d.month + 1, d.day, yearStr].join('/');\n },\n parseDate(text) {\n const parts = text.split('/');\n const today = new Date();\n let date,\n month = today.getMonth(),\n year = today.getFullYear();\n\n if (parts.length === 3) {\n month = parseInt(parts[0]) - 1;\n date = parseInt(parts[1]);\n year = parseInt(parts[2]);\n if (parts[2].length < 3 && year >= 0) {\n const usedReferenceDate = this.referenceDate ? parseDate(this.referenceDate) : new Date();\n year = getAdjustedYear(usedReferenceDate, year, month, date);\n }\n } else if (parts.length === 2) {\n month = parseInt(parts[0]) - 1;\n date = parseInt(parts[1]);\n } else if (parts.length === 1) {\n date = parseInt(parts[0]);\n }\n\n if (date !== undefined) {\n return { day: date, month, year };\n }\n },\n formatTitle: (monthName, fullYear) => {\n return `${monthName} ${fullYear}`;\n },\n };\n },\n },\n\n /**\n * The earliest date that can be selected. All earlier dates will be disabled.\n *\n * Supported date formats:\n * - ISO 8601 `\"YYYY-MM-DD\"` (default)\n * - 6-digit extended ISO 8601 `\"+YYYYYY-MM-DD\"`, `\"-YYYYYY-MM-DD\"`\n *\n * @type {string | undefined}\n */\n min: {\n type: String,\n sync: true,\n },\n\n /**\n * The latest date that can be selected. All later dates will be disabled.\n *\n * Supported date formats:\n * - ISO 8601 `\"YYYY-MM-DD\"` (default)\n * - 6-digit extended ISO 8601 `\"+YYYYYY-MM-DD\"`, `\"-YYYYYY-MM-DD\"`\n *\n * @type {string | undefined}\n */\n max: {\n type: String,\n sync: true,\n },\n\n /**\n * The earliest date that can be selected. All earlier dates will be disabled.\n * @type {Date | undefined}\n * @protected\n */\n _minDate: {\n type: Date,\n computed: '__computeMinOrMaxDate(min)',\n sync: true,\n },\n\n /**\n * The latest date that can be selected. All later dates will be disabled.\n * @type {Date | undefined}\n * @protected\n */\n _maxDate: {\n type: Date,\n computed: '__computeMinOrMaxDate(max)',\n sync: true,\n },\n\n /** @private */\n _noInput: {\n type: Boolean,\n computed: '_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)',\n },\n\n /** @private */\n _ios: {\n type: Boolean,\n value: isIOS,\n },\n\n /** @private */\n _focusOverlayOnOpen: Boolean,\n\n /** @private */\n _overlayContent: {\n type: Object,\n sync: true,\n },\n\n /**\n * In date-picker, unlike other components extending `InputMixin`,\n * the property indicates true only if the input has been entered by the user.\n * In the case of programmatic changes, the property is reset to false.\n * Read more about why this workaround is needed:\n * https://github.com/vaadin/web-components/issues/5639\n *\n * @protected\n * @override\n */\n _hasInputValue: {\n type: Boolean,\n },\n };\n }\n\n static get observers() {\n return [\n '_selectedDateChanged(_selectedDate, i18n)',\n '_focusedDateChanged(_focusedDate, i18n)',\n '__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers)',\n '__updateOverlayContentTheme(_overlayContent, _theme)',\n '__updateOverlayContentFullScreen(_overlayContent, _fullscreen)',\n ];\n }\n\n static get constraints() {\n return [...super.constraints, 'min', 'max'];\n }\n\n constructor() {\n super();\n\n this._boundOnClick = this._onClick.bind(this);\n this._boundOnScroll = this._onScroll.bind(this);\n this._boundOverlayRenderer = this._overlayRenderer.bind(this);\n }\n\n /**\n * @override\n * @protected\n */\n get _inputElementValue() {\n return super._inputElementValue;\n }\n\n /**\n * The setter is overridden to reset the `_hasInputValue` property\n * to false when the input element's value is updated programmatically.\n * In date-picker, `_hasInputValue` is supposed to indicate true only\n * if the input has been entered by the user.\n * Read more about why this workaround is needed:\n * https://github.com/vaadin/web-components/issues/5639\n *\n * @override\n * @protected\n */\n set _inputElementValue(value) {\n super._inputElementValue = value;\n this._hasInputValue = false;\n }\n\n /**\n * Override a getter from `InputControlMixin` to make it optional\n * and to prevent warning when a clear button is missing,\n * for example when using <vaadin-date-picker-light>.\n * @protected\n * @return {Element | null | undefined}\n */\n get clearElement() {\n return null;\n }\n\n /** @private */\n get _nativeInput() {\n if (this.inputElement) {\n // TODO: support focusElement for backwards compatibility\n return this.inputElement.focusElement || this.inputElement;\n }\n return null;\n }\n\n /**\n * Override an event listener from `DelegateFocusMixin`\n * @protected\n */\n _onFocus(event) {\n super._onFocus(event);\n\n if (this._noInput) {\n event.target.blur();\n }\n }\n\n /**\n * Override an event listener from `DelegateFocusMixin`\n * @protected\n */\n _onBlur(event) {\n super._onBlur(event);\n\n if (!this.opened) {\n this._selectParsedOrFocusedDate();\n\n // Do not validate when focusout is caused by document\n // losing focus, which happens on browser tab switch.\n if (document.hasFocus()) {\n this.validate();\n }\n }\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addEventListener('click', this._boundOnClick);\n\n this.addController(\n new MediaQueryController(this._fullscreenMediaQuery, (matches) => {\n this._fullscreen = matches;\n }),\n );\n\n this.addController(new VirtualKeyboardController(this));\n\n const overlay = this.$.overlay;\n this._overlayElement = overlay;\n\n overlay.renderer = this._boundOverlayRenderer;\n\n this.addEventListener('mousedown', () => this.__bringToFront());\n this.addEventListener('touchstart', () => this.__bringToFront());\n }\n\n /** @protected */\n disconnectedCallback() {\n super.disconnectedCallback();\n\n this.opened = false;\n }\n\n /**\n * Opens the dropdown.\n */\n open() {\n if (!this.disabled && !this.readonly) {\n this.opened = true;\n }\n }\n\n /**\n * Closes the dropdown.\n */\n close() {\n this.$.overlay.close();\n }\n\n /** @private */\n _overlayRenderer(root) {\n if (root.firstChild) {\n return;\n }\n\n // Create and store document content element\n const content = document.createElement('vaadin-date-picker-overlay-content');\n root.appendChild(content);\n\n this._overlayContent = content;\n\n content.addEventListener('close', () => {\n this._close();\n });\n\n content.addEventListener('focus-input', this._focusAndSelect.bind(this));\n\n // User confirmed selected date by clicking the calendar.\n content.addEventListener('date-tap', (e) => {\n this.__userConfirmedDate = true;\n\n this._selectDate(e.detail.date);\n\n this._close();\n });\n\n // User confirmed selected date by pressing Enter, Space, or Today.\n content.addEventListener('date-selected', (e) => {\n // Reset if a date is deselected.\n this.__userConfirmedDate = !!e.detail.date;\n\n this._selectDate(e.detail.date);\n });\n\n // Set focus-ring attribute when moving focus to the overlay\n // by pressing Tab or arrow key, after opening it on click.\n content.addEventListener('focusin', () => {\n if (this._keyboardActive) {\n this._setFocused(true);\n }\n });\n\n // Two-way data binding for `focusedDate` property\n content.addEventListener('focused-date-changed', (e) => {\n this._focusedDate = e.detail.value;\n });\n }\n\n /**\n * @param {string} dateString\n * @private\n */\n __parseDate(dateString) {\n if (!this.i18n.parseDate) {\n return;\n }\n\n let dateObject = this.i18n.parseDate(dateString);\n if (dateObject) {\n dateObject = parseDate(`${dateObject.year}-${dateObject.month + 1}-${dateObject.day}`);\n }\n if (dateObject && !isNaN(dateObject.getTime())) {\n return dateObject;\n }\n }\n\n /**\n * @param {Date} dateObject\n * @private\n */\n __formatDate(dateObject) {\n if (this.i18n.formatDate) {\n return this.i18n.formatDate(extractDateParts(dateObject));\n }\n }\n\n /**\n * Returns true if the current input value satisfies all constraints (if any)\n *\n * Override the `checkValidity` method for custom validations.\n *\n * @return {boolean} True if the value is valid\n */\n checkValidity() {\n const inputValue = this._inputElementValue;\n const inputValid = !inputValue || (!!this._selectedDate && inputValue === this.__formatDate(this._selectedDate));\n const minMaxValid = !this._selectedDate || dateAllowed(this._selectedDate, this._minDate, this._maxDate);\n\n let inputValidity = true;\n if (this.inputElement) {\n if (this.inputElement.checkValidity) {\n inputValidity = this.inputElement.checkValidity();\n } else if (this.inputElement.validate) {\n // Iron-form-elements have the validate API\n inputValidity = this.inputElement.validate();\n }\n }\n\n return inputValid && minMaxValid && inputValidity;\n }\n\n /**\n * Override method inherited from `FocusMixin`\n * to not call `_setFocused(true)` when focus\n * is restored after closing overlay on click,\n * and to avoid removing `focus-ring` attribute.\n *\n * @param {!FocusEvent} _event\n * @return {boolean}\n * @protected\n * @override\n */\n _shouldSetFocus(_event) {\n return !this._shouldKeepFocusRing;\n }\n\n /**\n * Override method inherited from `FocusMixin`\n * to prevent removing the `focused` attribute:\n * - when moving focus to the overlay content,\n * - when closing on date click / outside click.\n *\n * @param {!FocusEvent} _event\n * @return {boolean}\n * @protected\n * @override\n */\n _shouldRemoveFocus(_event) {\n return !this.opened;\n }\n\n /**\n * Override method inherited from `FocusMixin`\n * to store the `focus-ring` state to restore\n * it later when closing on outside click.\n *\n * @param {boolean} focused\n * @protected\n * @override\n */\n _setFocused(focused) {\n super._setFocused(focused);\n\n this._shouldKeepFocusRing = focused && this._keyboardActive;\n }\n\n /** @private */\n __dispatchChange() {\n this.validate();\n this.dispatchEvent(new CustomEvent('change', { bubbles: true }));\n }\n\n /**\n * Select date on user interaction and set the flag\n * to fire change event if necessary.\n *\n * @param {Date} dateToSelect\n * @protected\n */\n _selectDate(dateToSelect) {\n const prevValue = this.value;\n\n this._selectedDate = dateToSelect;\n\n if (prevValue !== this.value) {\n this.__dispatchChange();\n }\n }\n\n /** @private */\n _close() {\n this._focus();\n this.close();\n }\n\n /** @private */\n __bringToFront() {\n requestAnimationFrame(() => {\n this.$.overlay.bringToFront();\n });\n }\n\n /** @private */\n // eslint-disable-next-line max-params\n _isNoInput(inputElement, fullscreen, ios, i18n, opened, autoOpenDisabled) {\n // On fullscreen mode, text input is disabled if auto-open isn't disabled or\n // whenever the dropdown is opened\n const noInputOnFullscreenMode = fullscreen && (!autoOpenDisabled || opened);\n // On iOS, text input is disabled whenever the dropdown is opened, because\n // the virtual keyboard doesn't affect the viewport metrics and thus the\n // dropdown could get covered by the keyboard.\n const noInputOnIos = ios && opened;\n\n return !inputElement || noInputOnFullscreenMode || noInputOnIos || !i18n.parseDate;\n }\n\n /** @private */\n _formatISO(date) {\n if (!(date instanceof Date)) {\n return '';\n }\n\n const pad = (num, fmt = '00') => (fmt + num).substr((fmt + num).length - fmt.length);\n\n let yearSign = '';\n let yearFmt = '0000';\n let yearAbs = date.getFullYear();\n if (yearAbs < 0) {\n yearAbs = -yearAbs;\n yearSign = '-';\n yearFmt = '000000';\n } else if (date.getFullYear() >= 10000) {\n yearSign = '+';\n yearFmt = '000000';\n }\n\n const year = yearSign + pad(yearAbs, yearFmt);\n const month = pad(date.getMonth() + 1);\n const day = pad(date.getDate());\n return [year, month, day].join('-');\n }\n\n /** @protected */\n _inputElementChanged(input) {\n super._inputElementChanged(input);\n if (input) {\n input.autocomplete = 'off';\n input.setAttribute('role', 'combobox');\n input.setAttribute('aria-haspopup', 'dialog');\n input.setAttribute('aria-expanded', !!this.opened);\n this._applyInputValue(this._selectedDate);\n }\n }\n\n /** @protected */\n _openedChanged(opened) {\n if (this.inputElement) {\n this.inputElement.setAttribute('aria-expanded', opened);\n }\n }\n\n /** @private */\n _selectedDateChanged(selectedDate, i18n) {\n if (selectedDate === undefined || i18n === undefined) {\n return;\n }\n\n if (!this.__keepInputValue) {\n this._applyInputValue(selectedDate);\n }\n\n this.value = this._formatISO(selectedDate);\n this._ignoreFocusedDateChange = true;\n this._focusedDate = selectedDate;\n this._ignoreFocusedDateChange = false;\n }\n\n /** @private */\n _focusedDateChanged(focusedDate, i18n) {\n if (focusedDate === undefined || i18n === undefined) {\n return;\n }\n if (!this._ignoreFocusedDateChange && !this._noInput) {\n this._applyInputValue(focusedDate);\n }\n }\n\n /**\n * Override the value observer from `InputMixin` to implement custom\n * handling of the `value` property. The date-picker doesn't forward\n * the value directly to the input like the default implementation of `InputMixin`.\n * Instead, it parses the value into a date, puts it in `_selectedDate` which\n * is then displayed in the input with respect to the specified date format.\n *\n * @param {string | undefined} value\n * @param {string | undefined} oldValue\n * @protected\n * @override\n */\n _valueChanged(value, oldValue) {\n const newDate = parseDate(value);\n\n if (value && !newDate) {\n // The new value cannot be parsed, revert the old value.\n this.value = oldValue;\n return;\n }\n\n if (value) {\n if (!dateEquals(this._selectedDate, newDate)) {\n // Update the date instance only if the date has actually changed.\n this._selectedDate = newDate;\n\n if (oldValue !== undefined) {\n // Validate only if `value` changes after initialization.\n this.validate();\n }\n }\n } else {\n this._selectedDate = null;\n }\n\n this._toggleHasValue(this._hasValue);\n }\n\n /** @private */\n // eslint-disable-next-line max-params\n __updateOverlayContent(overlayContent, i18n, label, minDate, maxDate, focusedDate, selectedDate, showWeekNumbers) {\n if (overlayContent) {\n overlayContent.i18n = i18n;\n overlayContent.label = label;\n overlayContent.minDate = minDate;\n overlayContent.maxDate = maxDate;\n overlayContent.focusedDate = focusedDate;\n overlayContent.selectedDate = selectedDate;\n overlayContent.showWeekNumbers = showWeekNumbers;\n }\n }\n\n /** @private */\n __updateOverlayContentTheme(overlayContent, theme) {\n if (overlayContent) {\n if (theme) {\n overlayContent.setAttribute('theme', theme);\n } else {\n overlayContent.removeAttribute('theme');\n }\n }\n }\n\n /** @private */\n __updateOverlayContentFullScreen(overlayContent, fullscreen) {\n if (overlayContent) {\n overlayContent.toggleAttribute('fullscreen', fullscreen);\n }\n }\n\n /** @protected */\n _onOverlayEscapePress() {\n this._focusedDate = this._selectedDate;\n this._close();\n }\n\n /** @protected */\n _onOverlayOpened() {\n const content = this._overlayContent;\n content.reset();\n\n // Detect which date to show\n const initialPosition = this._getInitialPosition();\n content.initialPosition = initialPosition;\n\n // Scroll the date into view\n const scrollFocusDate = content.focusedDate || initialPosition;\n content.scrollToDate(scrollFocusDate);\n\n // Ensure the date is focused\n this._ignoreFocusedDateChange = true;\n content.focusedDate = scrollFocusDate;\n this._ignoreFocusedDateChange = false;\n\n window.addEventListener('scroll', this._boundOnScroll, true);\n\n if (this._focusOverlayOnOpen) {\n content.focusDateElement();\n this._focusOverlayOnOpen = false;\n } else {\n this._focus();\n }\n\n const input = this._nativeInput;\n if (this._noInput && input) {\n input.blur();\n this._overlayContent.focusDateElement();\n }\n\n const focusables = this._noInput ? content : [input, content];\n this.__showOthers = hideOthers(focusables);\n }\n\n /** @private */\n _getInitialPosition() {\n const parsedInitialPosition = parseDate(this.initialPosition);\n\n const initialPosition =\n this._selectedDate || this._overlayContent.initialPosition || parsedInitialPosition || new Date();\n\n return parsedInitialPosition || dateAllowed(initialPosition, this._minDate, this._maxDate)\n ? initialPosition\n : getClosestDate(initialPosition, [this._minDate, this._maxDate]);\n }\n\n /** @private */\n _selectParsedOrFocusedDate() {\n // Select the parsed input or focused date\n this._ignoreFocusedDateChange = true;\n if (this.i18n.parseDate) {\n const inputValue = this._inputElementValue || '';\n const parsedDate = this.__parseDate(inputValue);\n\n if (parsedDate) {\n this._selectDate(parsedDate);\n } else {\n this.__keepInputValue = true;\n this._selectDate(null);\n this._selectedDate = null;\n this.__keepInputValue = false;\n }\n } else if (this._focusedDate) {\n this._selectDate(this._focusedDate);\n }\n this._ignoreFocusedDateChange = false;\n }\n\n /** @protected */\n _onOverlayClosed() {\n // Reset `aria-hidden` state.\n if (this.__showOthers) {\n this.__showOthers();\n this.__showOthers = null;\n }\n\n window.removeEventListener('scroll', this._boundOnScroll, true);\n\n // No need to select date on close if it was confirmed by the user.\n if (this.__userConfirmedDate) {\n this.__userConfirmedDate = false;\n } else {\n this._selectParsedOrFocusedDate();\n }\n\n if (this._nativeInput && this._nativeInput.selectionStart) {\n this._nativeInput.selectionStart = this._nativeInput.selectionEnd;\n }\n // No need to revalidate the value after `_selectedDateChanged`\n // Needed in case the value was not changed: open and close dropdown,\n // especially on outside click. On Esc key press, do not validate.\n if (!this.value && !this._keyboardActive) {\n this.validate();\n }\n }\n\n /** @private */\n _onScroll(e) {\n if (e.target === window || !this._overlayContent.contains(e.target)) {\n this._overlayContent._repositionYearScroller();\n }\n }\n\n /** @protected */\n _focus() {\n if (!this._noInput) {\n this.inputElement.focus();\n }\n }\n\n /** @private */\n _focusAndSelect() {\n this._focus();\n this._setSelectionRange(0, this._inputElementValue.length);\n }\n\n /** @private */\n _applyInputValue(date) {\n this._inputElementValue = date ? this.__formatDate(date) : '';\n }\n\n /** @private */\n _setSelectionRange(a, b) {\n if (this._nativeInput && this._nativeInput.setSelectionRange) {\n this._nativeInput.setSelectionRange(a, b);\n }\n }\n\n /**\n * Override an event listener from `InputConstraintsMixin`\n * to have date-picker fully control when to fire a change event\n * and trigger validation.\n *\n * @protected\n */\n _onChange(event) {\n event.stopPropagation();\n }\n\n /**\n * @param {Event} event\n * @private\n */\n _onClick(event) {\n // Clear button click is handled in separate listener\n // but bubbles to the host, so we need to ignore it.\n if (!this._isClearButton(event)) {\n this._onHostClick(event);\n }\n }\n\n /**\n * @param {Event} event\n * @private\n */\n _onHostClick(event) {\n if (!this.autoOpenDisabled || this._noInput) {\n event.preventDefault();\n this.open();\n }\n }\n\n /**\n * Override an event listener from `InputControlMixin`\n * to validate and dispatch change on clear.\n * @protected\n */\n _onClearButtonClick(event) {\n event.preventDefault();\n this._inputElementValue = '';\n this.value = '';\n this.__dispatchChange();\n }\n\n /**\n * Override an event listener from `KeyboardMixin`.\n * @param {KeyboardEvent} e\n * @protected\n * @override\n */\n _onKeyDown(e) {\n super._onKeyDown(e);\n\n if (this._noInput) {\n // The input element cannot be readonly as it would conflict with\n // the required attribute. Both are not allowed on an input element.\n // Therefore we prevent default on most keydown events.\n const allowedKeys = [\n 9, // Tab\n ];\n if (allowedKeys.indexOf(e.keyCode) === -1) {\n e.preventDefault();\n }\n }\n\n switch (e.key) {\n case 'ArrowDown':\n case 'ArrowUp':\n // Prevent scrolling the page with arrows\n e.preventDefault();\n if (this.opened) {\n // The overlay can be opened with ctrl + option + shift in VoiceOver\n // and without this logic, it won't be possible to focus the dialog opened this way.\n this._overlayContent.focusDateElement();\n } else {\n this._focusOverlayOnOpen = true;\n this.open();\n }\n break;\n case 'Tab':\n if (this.opened) {\n e.preventDefault();\n e.stopPropagation();\n // Clear the selection range (remains visible on IE)\n this._setSelectionRange(0, 0);\n if (e.shiftKey) {\n this._overlayContent.focusCancel();\n } else {\n this._overlayContent.focusDateElement();\n }\n }\n break;\n default:\n break;\n }\n }\n\n /**\n * Override an event listener from `KeyboardMixin`.\n *\n * @param {!KeyboardEvent} _event\n * @protected\n * @override\n */\n _onEnter(_event) {\n const oldValue = this.value;\n if (this.opened) {\n // Closing will implicitly select parsed or focused date\n this.close();\n } else {\n this._selectParsedOrFocusedDate();\n }\n if (oldValue === this.value) {\n this.validate();\n }\n }\n\n /**\n * Override an event listener from `KeyboardMixin`.\n * Do not call `super` in order to override clear\n * button logic defined in `InputControlMixin`.\n *\n * @param {!KeyboardEvent} event\n * @protected\n * @override\n */\n _onEscape(event) {\n // Closing overlay is handled in vaadin-overlay-escape-press event listener.\n if (this.opened) {\n return;\n }\n\n if (this.clearButtonVisible && !!this.value) {\n // Stop event from propagating to the host element\n // to avoid closing dialog when clearing on Esc\n event.stopPropagation();\n this._onClearButtonClick(event);\n return;\n }\n\n if (this.autoOpenDisabled) {\n // Do not restore selected date if Esc was pressed after clearing input field\n if (this.inputElement.value === '') {\n this._selectDate(null);\n }\n this._applyInputValue(this._selectedDate);\n } else {\n this._focusedDate = this._selectedDate;\n this._selectParsedOrFocusedDate();\n }\n }\n\n /** @protected */\n _isClearButton(event) {\n return event.composedPath()[0] === this.clearElement;\n }\n\n /**\n * Override an event listener from `InputMixin`\n * @protected\n */\n _onInput() {\n if (!this.opened && this._inputElementValue && !this.autoOpenDisabled) {\n this.open();\n }\n\n if (this._inputElementValue) {\n const parsedDate = this.__parseDate(this._inputElementValue);\n if (parsedDate) {\n this._ignoreFocusedDateChange = true;\n if (!dateEquals(parsedDate, this._focusedDate)) {\n this._focusedDate = parsedDate;\n }\n this._ignoreFocusedDateChange = false;\n }\n }\n }\n\n /** @private */\n __computeMinOrMaxDate(dateString) {\n return parseDate(dateString);\n }\n\n /**\n * Fired when the user commits a value change.\n *\n * @event change\n */\n\n /**\n * Fired when `value` property value changes.\n *\n * @event value-changed\n */\n\n /**\n * Fired when `opened` property value changes.\n *\n * @event opened-changed\n */\n };\n","import PlayerBonusHistory from './PlayerBonusHistory.svelte';\nfunction safeDecorator(fn) {\n // eslint-disable-next-line func-names\n return function (...args) {\n try {\n return fn.apply(this, args);\n }\n catch (error) {\n if (error instanceof DOMException &&\n error.message.includes('has already been used with this registry') || error.message.includes('Cannot define multiple custom elements with the same tag name')) {\n return false;\n }\n throw error;\n }\n };\n}\ncustomElements.define = safeDecorator(customElements.define);\n!customElements.get('player-bonus-history') && customElements.define('player-bonus-history', PlayerBonusHistory);\nexport default PlayerBonusHistory;\n","/**\n * @license\n * Copyright (c) 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\n\n/**\n * A mixin that forwards CSS class names to the internal overlay element\n * by setting the `overlayClass` property or `overlay-class` attribute.\n *\n * @polymerMixin\n */\nexport const OverlayClassMixin = (superclass) =>\n class OverlayClassMixinClass extends superclass {\n static get properties() {\n return {\n /**\n * A space-delimited list of CSS class names to set on the overlay element.\n * This property does not affect other CSS class names set manually via JS.\n *\n * Note, if the CSS class name was set with this property, clearing it will\n * remove it from the overlay, even if the same class name was also added\n * manually, e.g. by using `classList.add()` in the `renderer` function.\n *\n * @attr {string} overlay-class\n */\n overlayClass: {\n type: String,\n },\n\n /**\n * An overlay element on which CSS class names are set.\n *\n * @protected\n */\n _overlayElement: {\n type: Object,\n },\n };\n }\n\n static get observers() {\n return ['__updateOverlayClassNames(overlayClass, _overlayElement)'];\n }\n\n /** @private */\n __updateOverlayClassNames(overlayClass, overlayElement) {\n if (!overlayElement) {\n return;\n }\n\n // Overlay is set but overlayClass is not set\n if (overlayClass === undefined) {\n return;\n }\n\n const { classList } = overlayElement;\n\n if (!this.__initialClasses) {\n this.__initialClasses = new Set(classList);\n }\n\n if (Array.isArray(this.__previousClasses)) {\n // Remove old classes that no longer apply\n const classesToRemove = this.__previousClasses.filter((name) => !this.__initialClasses.has(name));\n if (classesToRemove.length > 0) {\n classList.remove(...classesToRemove);\n }\n }\n\n // Add new classes based on the overlayClass\n const classesToAdd = typeof overlayClass === 'string' ? overlayClass.split(' ') : [];\n if (classesToAdd.length > 0) {\n classList.add(...classesToAdd);\n }\n\n this.__previousClasses = classesToAdd;\n }\n };\n","/**\n * @license\n * Copyright (c) 2016 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport '@vaadin/input-container/src/vaadin-input-container.js';\nimport './vaadin-date-picker-overlay.js';\nimport './vaadin-date-picker-overlay-content.js';\nimport { html, PolymerElement } from '@polymer/polymer/polymer-element.js';\nimport { defineCustomElement } from '@vaadin/component-base/src/define.js';\nimport { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';\nimport { TooltipController } from '@vaadin/component-base/src/tooltip-controller.js';\nimport { InputControlMixin } from '@vaadin/field-base/src/input-control-mixin.js';\nimport { InputController } from '@vaadin/field-base/src/input-controller.js';\nimport { LabelledInputController } from '@vaadin/field-base/src/labelled-input-controller.js';\nimport { inputFieldShared } from '@vaadin/field-base/src/styles/input-field-shared-styles.js';\nimport { registerStyles, ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';\nimport { DatePickerMixin } from './vaadin-date-picker-mixin.js';\nimport { datePickerStyles } from './vaadin-date-picker-styles.js';\n\nregisterStyles('vaadin-date-picker', [inputFieldShared, datePickerStyles], { moduleId: 'vaadin-date-picker-styles' });\n\n/**\n * `<vaadin-date-picker>` is an input field that allows to enter a date by typing or by selecting from a calendar overlay.\n *\n * ```html\n * <vaadin-date-picker label=\"Birthday\"></vaadin-date-picker>\n * ```\n *\n * ```js\n * datePicker.value = '2016-03-02';\n * ```\n *\n * When the selected `value` is changed, a `value-changed` event is triggered.\n *\n * ### Styling\n *\n * The following custom properties are available for styling:\n *\n * Custom property | Description | Default\n * -------------------------------|----------------------------|---------\n * `--vaadin-field-default-width` | Default width of the field | `12em`\n *\n * `<vaadin-date-picker>` provides the same set of shadow DOM parts and state attributes as `<vaadin-text-field>`.\n * See [`<vaadin-text-field>`](#/elements/vaadin-text-field) for the styling documentation.\n *\n * In addition to `<vaadin-text-field>` parts, the following parts are available for theming:\n *\n * Part name | Description\n * ----------------------|--------------------\n * `toggle-button` | Toggle button\n *\n * In addition to `<vaadin-text-field>` state attributes, the following state attributes are available for theming:\n *\n * Attribute | Description | Part name\n * -----------|--------------------------------------------------|-----------\n * `opened` | Set when the date selector overlay is opened | :host\n *\n * If you want to replace the default `<input>` and its container with a custom implementation to get full control\n * over the input field, consider using the [`<vaadin-date-picker-light>`](#/elements/vaadin-date-picker-light) element.\n *\n * ### Internal components\n *\n * In addition to `<vaadin-date-picker>` itself, the following internal\n * components are themable:\n *\n * - `<vaadin-date-picker-overlay>` - has the same API as [`<vaadin-overlay>`](#/elements/vaadin-overlay).\n * - `<vaadin-date-picker-overlay-content>`\n * - `<vaadin-date-picker-month-scroller>`\n * - `<vaadin-date-picker-year-scroller>`\n * - `<vaadin-date-picker-year>`\n * - `<vaadin-month-calendar>`\n * - [`<vaadin-input-container>`](#/elements/vaadin-input-container) - an internal element wrapping the input.\n *\n * In order to style the overlay content, use `<vaadin-date-picker-overlay-content>` shadow DOM parts:\n *\n * Part name | Description\n * ----------------------|--------------------\n * `overlay-header` | Fullscreen mode header\n * `label` | Fullscreen mode value/label\n * `clear-button` | Fullscreen mode clear button\n * `toggle-button` | Fullscreen mode toggle button\n * `years-toggle-button` | Fullscreen mode years scroller toggle\n * `toolbar` | Footer bar with slotted buttons\n *\n * The following state attributes are available on the `<vaadin-date-picker-overlay-content>` element:\n *\n * Attribute | Description\n * ----------------|-------------------------------------------------\n * `desktop` | Set when the overlay content is in desktop mode\n * `fullscreen` | Set when the overlay content is in fullscreen mode\n * `years-visible` | Set when the year scroller is visible in fullscreen mode\n *\n * In order to style the month calendar, use `<vaadin-month-calendar>` shadow DOM parts:\n *\n * Part name | Description\n * ----------------------|--------------------\n * `month-header` | Month title\n * `weekdays` | Weekday container\n * `weekday` | Weekday element\n * `week-numbers` | Week numbers container\n * `week-number` | Week number element\n * `date` | Date element\n * `disabled` | Disabled date element\n * `focused` | Focused date element\n * `selected` | Selected date element\n * `today` | Date element corresponding to the current day\n *\n * In order to style year scroller elements, use `<vaadin-date-picker-year>` shadow DOM parts:\n *\n * Part name | Description\n * ----------------------|--------------------\n * `year-number` | Year number\n * `year-separator` | Year separator\n *\n * Note: the `theme` attribute value set on `<vaadin-date-picker>` is\n * propagated to the internal components listed above.\n *\n * See [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n *\n * @fires {Event} change - Fired when the user commits a value change.\n * @fires {CustomEvent} invalid-changed - Fired when the `invalid` property changes.\n * @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.\n * @fires {CustomEvent} value-changed - Fired when the `value` property changes.\n * @fires {CustomEvent} validated - Fired whenever the field is validated.\n *\n * @customElement\n * @extends HTMLElement\n * @mixes ElementMixin\n * @mixes ThemableMixin\n * @mixes InputControlMixin\n * @mixes DatePickerMixin\n */\nclass DatePicker extends DatePickerMixin(InputControlMixin(ThemableMixin(ElementMixin(PolymerElement)))) {\n static get is() {\n return 'vaadin-date-picker';\n }\n\n static get template() {\n return html`\n <div class=\"vaadin-date-picker-container\">\n <div part=\"label\">\n <slot name=\"label\"></slot>\n <span part=\"required-indicator\" aria-hidden=\"true\" on-click=\"focus\"></span>\n </div>\n\n <vaadin-input-container\n part=\"input-field\"\n readonly=\"[[readonly]]\"\n disabled=\"[[disabled]]\"\n invalid=\"[[invalid]]\"\n theme$=\"[[_theme]]\"\n >\n <slot name=\"prefix\" slot=\"prefix\"></slot>\n <slot name=\"input\"></slot>\n <div id=\"clearButton\" part=\"clear-button\" slot=\"suffix\" aria-hidden=\"true\"></div>\n <div part=\"toggle-button\" slot=\"suffix\" aria-hidden=\"true\" on-click=\"_toggle\"></div>\n </vaadin-input-container>\n\n <div part=\"helper-text\">\n <slot name=\"helper\"></slot>\n </div>\n\n <div part=\"error-message\">\n <slot name=\"error-message\"></slot>\n </div>\n </div>\n\n <vaadin-date-picker-overlay\n id=\"overlay\"\n fullscreen$=\"[[_fullscreen]]\"\n theme$=\"[[_theme]]\"\n opened=\"{{opened}}\"\n on-vaadin-overlay-escape-press=\"_onOverlayEscapePress\"\n on-vaadin-overlay-open=\"_onOverlayOpened\"\n on-vaadin-overlay-closing=\"_onOverlayClosed\"\n restore-focus-on-close\n restore-focus-node=\"[[inputElement]]\"\n ></vaadin-date-picker-overlay>\n\n <slot name=\"tooltip\"></slot>\n `;\n }\n\n /**\n * Used by `InputControlMixin` as a reference to the clear button element.\n * @protected\n * @return {!HTMLElement}\n */\n get clearElement() {\n return this.$.clearButton;\n }\n\n /** @protected */\n ready() {\n super.ready();\n\n this.addController(\n new InputController(this, (input) => {\n this._setInputElement(input);\n this._setFocusElement(input);\n this.stateTarget = input;\n this.ariaTarget = input;\n }),\n );\n this.addController(new LabelledInputController(this.inputElement, this._labelController));\n\n this._tooltipController = new TooltipController(this);\n this.addController(this._tooltipController);\n this._tooltipController.setPosition('top');\n this._tooltipController.setAriaTarget(this.inputElement);\n this._tooltipController.setShouldShow((target) => !target.opened);\n\n const toggleButton = this.shadowRoot.querySelector('[part=\"toggle-button\"]');\n toggleButton.addEventListener('mousedown', (e) => e.preventDefault());\n\n this.$.overlay.addEventListener('vaadin-overlay-close', this._onVaadinOverlayClose.bind(this));\n }\n\n /** @private */\n _onVaadinOverlayClose(e) {\n if (e.detail.sourceEvent && e.detail.sourceEvent.composedPath().includes(this)) {\n e.preventDefault();\n }\n }\n\n /** @private */\n _toggle(e) {\n e.stopPropagation();\n if (this.$.overlay.opened) {\n this.close();\n } else {\n this.open();\n }\n }\n\n // Workaround https://github.com/vaadin/web-components/issues/2855\n /** @protected */\n _openedChanged(opened) {\n super._openedChanged(opened);\n\n this.$.overlay.positionTarget = this.shadowRoot.querySelector('[part=\"input-field\"]');\n this.$.overlay.noVerticalOverlap = true;\n }\n}\n\ndefineCustomElement(DatePicker);\n\nexport { DatePicker };\n","/**\n * @license\n * Copyright (c) 2016 - 2023 Vaadin Ltd.\n * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/\n */\nimport { css } from 'lit';\n\nexport const datePickerStyles = css`\n :host([opened]) {\n pointer-events: auto;\n }\n\n :host([dir='rtl']) [part='input-field'] {\n direction: ltr;\n }\n\n :host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {\n direction: rtl;\n text-align: left;\n }\n`;\n","import {\n dictionary,\n locale,\n addMessages,\n _\n} from 'svelte-i18n';\n\nfunction setupI18n({ withLocale: _locale, translations }) {\n locale.subscribe((data) => {\n if (data == null) {\n dictionary.set(translations);\n locale.set(_locale);\n }\n }); // maybe we will need this to make sure that the i18n is set up only once\n /*dictionary.set(translations);\n locale.set(_locale);*/\n}\n\nfunction addNewMessages(lang, dict) {\n addMessages(lang, dict);\n}\n\nfunction setLocale(_locale) {\n locale.set(_locale);\n}\n\nexport { _, setupI18n, addNewMessages, setLocale };\n","export const TRANSLATIONS = {\n \"en\": {\n \"titleBonusesHistory\": \"Bonus History\",\n \"dateFrom\": \"From:\",\n \"dateTo\": \"To:\",\n \"dateFilter\": \"Filter\",\n \"noBonusHistory\": \"You have no bonuses for the selected period.\"\n },\n \"zh-hk\": {\n \"titleBonusesHistory\": \"獎金歷史\",\n \"dateFrom\": \"從:\",\n \"dateTo\": \"至:\",\n \"dateFilter\": \"篩選\",\n \"noBonusHistory\": \"您目前沒有獎金歷史。\"\n },\n \"fr\": {\n \"titleBonusesHistory\": \"Historique du bonus\",\n \"dateFrom\": \"De:\",\n \"dateTo\": \"A:\",\n \"dateFilter\": \"Filtre\",\n \"noBonusHistory\": \"Vous n'avez pas d'historique de bonus pour le moment.\"\n },\n \"ro\": {\n \"titleBonusesHistory\": \"Istoric bonusuri\",\n \"dateFrom\": \"De la\",\n \"dateTo\": \"La\",\n \"dateFilter\": \"Filtru\",\n \"noBonusHistory\": \"Nu ai bonusuri pentru perioada selectata.\"\n },\n \"es\": {\n \"titleBonusesHistory\": \"Historial de Bonos\",\n \"dateFrom\": \"Desde:\",\n \"dateTo\": \"A:\",\n \"dateFilter\": \"Filtro\",\n \"noBonusHistory\": \"No tiene Bonos para el periodo seleccionado.\"\n },\n \"pt\": {\n \"titleBonusesHistory\": \"Histórico de bônus\",\n \"dateFrom\": \"A partir de:\",\n \"dateTo\": \"Para:\",\n \"dateFilter\": \"Filtro:\",\n \"noBonusHistory\": \"Você não tem histórico de bônus no momento.\"\n },\n \"hr\": {\n \"titleBonusesHistory\": \"Povijest bonusa\",\n \"dateFrom\": \"Od:\",\n \"dateTo\": \"Do:\",\n \"dateFilter\": \"Filter\",\n \"noBonusHistory\": \"Nemate bonusa u povijesti.\"\n },\n \"pt-br\": {\n \"titleBonusesHistory\": \"Histórico de bônus\",\n \"dateFrom\": \"De:\",\n \"dateTo\": \"PARA:\",\n \"dateFilter\": \"Filtro\",\n \"noBonusHistory\": \"Não há bônus para o período selecionado\"\n },\n \"es-mx\": {\n \"titleBonusesHistory\": \"Historial de bonos\",\n \"dateFrom\": \"De:\",\n \"dateTo\": \"A:\",\n \"dateFilter\": \"Filtro\",\n \"noBonusHistory\": \"No tiene bonus para el periodo seleccionado\"\n },\n \"tr\": {\n \"titleBonusesHistory\": \"Bonus Geçmişi\",\n \"dateFrom\": \"İtibaren:\",\n \"dateTo\": \"İle:\",\n \"dateFilter\": \"Filtre\",\n \"noBonusHistory\": \"Seçilen dönem için bonusunuz yok.\"\n }\n}","<svelte:options tag={null} />\n<script lang=\"ts\">\n import { onMount } from 'svelte';\n import { getDevice } from 'rvhelper';\n import moment from 'moment';\n\n import '@everymatrix/player-bonus-card';\n import '@vaadin/date-picker/vaadin-date-picker.js';\n import { _, addNewMessages, setLocale } from './i18n';\n import { TRANSLATIONS } from './translations';\n\n export let endpoint:string = '';\n export let session:string = '';\n export let playerid:string = '';\n export let lang:string = 'en';\n export let clientstyling:string = '';\n export let clientstylingurl:string = '';\n export let translationurl:string = '';\n // both bonushistorystatus and bonushistorytype need to be set on the widget\n // before the other attributes used to call getBonuses() in order for these filters to work\n export let bonushistorystatus:string = '';\n export let bonushistorytype:string = '';\n\n let customStylingContainer:HTMLElement;\n let isLoading:boolean = false;\n let userAgent:string = window.navigator.userAgent;\n let isMobile:boolean = (getDevice(userAgent) === 'PC') ? false : true;\n let startCalendar:HTMLElement;\n let endCalendar:HTMLElement;\n let maxDate:string;\n let lastMonth:string;\n\n maxDate = moment(new Date()).format('YYYY-MM-DD');\n lastMonth = moment(new Date()).subtract(3, 'months').format('YYYY-MM-DD')\n\n let bonusCalendarStartDate:string = lastMonth;\n let bonusCalendarEndDate:string = maxDate;\n\n let bonusesPrevPage:number = 0;\n let bonusesNextPage:number = 0;\n let bonusesLastPage:number = 0;\n let numberOfPages:number = 0;\n let bonusesPerPage:number = 6;\n let currentPage:number = 0;\n let bonusesList:Array<Object> = [];\n\n const setTranslationUrl = ():void => {\n let url:string = translationurl;\n\n fetch(url).then((res:any) => res.json())\n .then((res) => {\n Object.keys(res).forEach((item:any):void => {\n addNewMessages(item, res[item]);\n });\n }).catch((err:any) => {\n console.log(err);\n });\n }\n\n Object.keys(TRANSLATIONS).forEach((item:any) => {\n addNewMessages(item, TRANSLATIONS[item]);\n });\n\n const toggleScreen = ():void => {\n window.postMessage({type: 'PlayerAccountMenuActive', isMobile}, window.location.href);\n }\n\n const getBonuses = (offset:number, status, type):void => {\n let url:URL = new URL(`${endpoint}/v1/player/${playerid}/bonusWallet`);\n \n let startDate:string = moment(bonusCalendarStartDate).startOf('day').utc().format('YYYY-MM-DDTHH:mm:ss.SSS[Z]');\n let endDate:string = moment(bonusCalendarEndDate).endOf('day').utc().format('YYYY-MM-DDTHH:mm:ss.SSS[Z]');\n\n let filter:string = '', statuses:string = '', types:string = '';\n \n if (status) {\n let bonusStatusArray:Array<string> = status.split(',');\n let modifiedStatuses = bonusStatusArray.map(status => `status=${status}`);\n statuses = modifiedStatuses.join(',');\n filter = filter + statuses + ',';\n }\n \n if (type) {\n let bonusTypesArray:Array<string> = type.split(',');\n let modifiedTypes = bonusTypesArray.map(type => `type=${type}`);\n types = modifiedTypes.join(',');\n filter = filter + types + ',';\n }\n filter = filter + `granted=[${startDate}~${endDate}]`;\n\n url.searchParams.append('filter', filter);\n url.searchParams.append('pagination', `offset=${offset},limit=${bonusesPerPage}`);\n\n let options = {\n method: \"GET\",\n headers: {\n 'X-SessionId': session,\n }\n };\n\n fetch(url.href, options)\n .then((res:any) => res.json())\n .then((data:any) => {\n numberOfPages = (Math.ceil(data.total/bonusesPerPage));\n\n if ((offset - bonusesPerPage) >= 0) {\n bonusesPrevPage = offset - bonusesPerPage;\n }\n\n if ((offset + bonusesPerPage) < data.total) {\n bonusesNextPage = offset + bonusesPerPage;\n }\n\n bonusesLastPage = (numberOfPages - 1) * bonusesPerPage;\n currentPage = offset / bonusesPerPage;\n\n bonusesList = data.items;\n }, (err:any) => {\n console.error(err);\n });\n\n window.postMessage({ type: 'ScrollToTop'}, window.location.href);\n }\n\n const startCalendarHandler = (e:any):void => {\n bonusCalendarStartDate = e.target.value;\n }\n\n const endCalendarHandler = (e:any):void => {\n bonusCalendarEndDate = e.target.value;\n }\n\n const setCalendarEventListener = ():void => {\n startCalendar.addEventListener('change', startCalendarHandler, false);\n endCalendar.addEventListener('change', endCalendarHandler, false);\n }\n\n onMount(() => {\n return () => {\n startCalendar.removeEventListener('change', startCalendarHandler);\n endCalendar.removeEventListener('change', endCalendarHandler);\n }\n });\n\n const initialLoad = () => {\n setLocale(lang);\n }\n\n const setClientStyling = ():void => {\n let sheet:HTMLElement = document.createElement('style');\n sheet.innerHTML = clientstyling;\n customStylingContainer.appendChild(sheet);\n }\n\n const setClientStylingURL = ():void => {\n let url:URL = new URL(clientstylingurl);\n let cssFile:HTMLElement = document.createElement('style');\n\n fetch(url.href)\n .then((res:any) => res.text())\n .then((data:any) => {\n cssFile.innerHTML = data\n\n setTimeout(() => { customStylingContainer.appendChild(cssFile) }, 1);\n });\n }\n\n $: lang && initialLoad();\n $: startCalendar && endCalendar && setCalendarEventListener();\n $: if (session && playerid && endpoint) {\n getBonuses(0, bonushistorystatus, bonushistorytype)\n } \n $: clientstylingurl && customStylingContainer && setClientStylingURL();\n $: clientstyling && customStylingContainer && setClientStyling();\n $: translationurl && setTranslationUrl();\n</script>\n\n<div bind:this={customStylingContainer}>\n {#if isLoading}\n <div class=\"ModalLoader\"></div>\n {:else}\n <div class=\"BonusesWrapper {isMobile ? 'BonusesWrapperMobile' : ''}\">\n {#if isMobile}\n <div class=\"MenuReturnButton\" on:click={() => toggleScreen()}>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"15\" height=\"15\" viewBox=\"0 0 15 15\"><defs><style>.aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}</style></defs><g transform=\"translate(-20 -158)\">\n <g transform=\"translate(20 158)\">\n <path class=\"aaa\" d=\"M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z\" transform=\"translate(15 15) rotate(180)\"/>\n </g></g>\n </svg>\n <h2 class=\"BonusesTitleMobile\">{$_('titleBonusesHistory')}</h2>\n </div>\n {/if}\n <h2 class=\"BonusesTitle {isMobile ? 'BonusesTitleNone' : ''}\" part=\"BonusesTitle {isMobile ? 'BonusesTitleNone' : ''}\">{$_('titleBonusesHistory')}</h2>\n\n <div class=\"BonusCalendarWrapper {isMobile ? 'BonusCalendarWrapperMobile' : ''}\">\n <div class=\"BonusesCalendarContainer {isMobile ? 'BonusesCalendarContainerMobile' : ''}\">\n <div class=\"BonusesCalendarStartDate {isMobile ? 'BonusesCalendarMobile' : ''}\">\n <label for=\"BonusCalendarStartDate\">{$_('dateFrom')}</label>\n <vaadin-date-picker bind:this={startCalendar} max={maxDate} value={lastMonth} placeholder=\"From\" class=\"VaadinDatePicker\"></vaadin-date-picker>\n </div>\n <div class=\"BonusesCalendarEndDate {isMobile ? 'BonusesCalendarMobile' : ''}\">\n <label for=\"BonusesCalendarEndDate\">{$_('dateTo')}</label>\n <vaadin-date-picker bind:this={endCalendar} max={maxDate} value={maxDate} placeholder=\"To\" class=\"VaadinDatePicker\"></vaadin-date-picker>\n </div>\n </div>\n <button class=\"BonusesCalendarFilter {isMobile ? 'BonusesCalendarFilterMobile' : ''}\" on:click={() => getBonuses(0, bonushistorystatus, bonushistorytype)}>{$_('dateFilter')}</button>\n </div>\n <div class=\"BonusesGrid {isMobile ? 'BonusesGridMobile' : ''}\">\n {#if bonusesList.length === 0}\n <p>{$_('noBonusHistory')}</p>\n {:else}\n {#each bonusesList as bonus}\n {#if bonus.type === 'freeRound'}\n <player-bonus-card\n bonuswalletid={bonus.walletId}\n bonusdate={bonus.granted}\n bonusstatus={bonus.status}\n bonusname={bonus.name}\n bonustype={bonus.type}\n bonuscurrency={bonus.currency}\n {lang}\n {clientstyling}\n {clientstylingurl}\n  {translationurl}\n ></player-bonus-card>\n {:else}\n <player-bonus-card\n bonuswalletid={bonus.walletId}\n bonusdate={bonus.granted}\n bonusstatus={bonus.status}\n bonusname={bonus.name}\n bonustype={bonus.type}\n bonusamount={bonus.extension.grantedPlayerCurrencyAmount}\n bonuswageringamount={`${bonus.fulfilledWR} / ${bonus.originalWageringRequirement}`}\n bonusremainingamount={bonus.currentAmount}\n bonuscurrency={bonus.currency}\n {lang}\n {clientstyling}\n {clientstylingurl}\n  {translationurl}\n ></player-bonus-card>\n {/if}\n {/each}\n {/if}\n </div>\n {#if bonusesList.length !== 0}\n <div class=\"BonusesPaginationWrapper {isMobile ? 'BonusesPaginationWrapperMobile' : ''}\">\n <span class=\"BonusesFirst {currentPage === 0 ? 'Inactive' : ''}\" on:click={() => getBonuses(0, bonushistorystatus, bonushistorytype)}>&vert;&lt;</span>\n <span class=\"BonusesPrev {currentPage === 0 ? 'Inactive' : ''}\" on:click={() => getBonuses(bonusesPrevPage, bonushistorystatus, bonushistorytype)}>&lt;</span>\n {#each Array(numberOfPages) as _, i}\n <span class=\"BonusesPage {i === currentPage ? 'BonusPageActive' : ''}\" on:click={() => getBonuses(i*bonusesPerPage, bonushistorystatus, bonushistorytype)}>{i+1}</span>\n {/each}\n <span class=\"BonusesNext {currentPage === (numberOfPages - 1) ? 'Inactive' : ''}\" on:click={() => getBonuses(bonusesNextPage, bonushistorystatus, bonushistorytype)}>&gt;</span>\n <span class=\"BonusesLast {currentPage === (numberOfPages - 1) ? 'Inactive' : ''}\" on:click={() => getBonuses(bonusesLastPage, bonushistorystatus, bonushistorytype)}>&gt;&vert;</span>\n </div>\n {/if}\n </div>\n {/if}\n</div>\n\n<style lang=\"scss\">\n\n\n\n .BonusesWrapper {\n background-color: var(--emw-color-pale, var(--emw--color-gray-50, #F1F1F1));\n border-radius: var(--emw--border-radius-large, 20px);\n color: var(--emw--color-typography-cotrast, #444444);\n padding: 50px;\n max-width: 850px;\n\n &.BonusesWrapperMobile {\n padding: 20px 15px;\n max-width: unset;\n }\n }\n\n .MenuReturnButton{\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n display: inline-flex;\n align-items: center;\n column-gap: 10px;\n margin-bottom: 10px;\n & svg {\n fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n }\n }\n\n .BonusesTitle {\n font-size: var(--emw--font-size-x-large, 26px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n font-weight: var(--emw--font-weigh-normal, 400);\n }\n\n .BonusesTitleMobile {\n font-size: var(--emw--size-standard, 16px);\n }\n\n .BonusesTitleNone {\n display: none;\n }\n\n .BonusCalendarWrapper {\n display: flex;\n gap: 15px;\n padding-bottom: 30px;\n align-items: center;\n &.BonusCalendarWrapperMobile {\n flex-direction: column;\n gap: 10px;\n padding-bottom: 15px;\n }\n }\n\n .BonusesCalendarContainer {\n display: flex;\n gap: 20px;\n &.BonusesCalendarContainerMobile {\n flex-direction: row;\n gap: 0;\n justify-content: space-between;\n padding-bottom: 0;\n width: 100%;\n }\n }\n\n .BonusesCalendarStartDate,\n .BonusesCalendarEndDate {\n color: var(--emw--color-gray-300, #58586B);\n display: flex;\n position: relative;\n align-items: center;\n gap: 10px;\n &.BonusesCalendarMobile {\n flex-direction: column;\n align-items: flex-start;\n gap: 5px;\n width: 48%;\n .VaadinDatePicker {\n width: 100%;\n border-radius: var(--emw--border-radius-large, 20px);\n }\n }\n\n label {\n font-size: var(--emw--font-size-small, 14px);\n font-weight: 300;\n }\n\n input {\n width: 100%;\n height: 44px;\n border: 1px solid var(--emw--color-gray-100, #E6E6E6);\n border-radius: var(--emw--border-radius-small, 5px);\n box-sizing: border-box;\n padding: 5px 15px;\n font-size: var(--emw--size-standard, 16px);\n line-height: 18px;\n outline-color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n }\n }\n\n .BonusesCalendarFilter {\n background-image: linear-gradient(to bottom, color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 20%), var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, white 30%));\n border: 2px solid var(--emw--button-border-color, #0E5924);\n color: var(--emw--button-text-color, #FFFFFF);\n border-radius: var(--emw--button-border-radius, 50px);\n cursor: pointer;\n width: 120px;\n height: 40px;\n font-size: var(--emw--font-size-medium, 15px);\n text-transform: uppercase;\n text-align: center;\n transition-duration: 0.3s;\n box-sizing: border-box;\n padding: 10px;\n outline: none;\n &.BonusesCalendarFilterMobile {\n width: 100%;\n height: 44px;\n }\n\n &:active {\n background: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n }\n }\n\n .BonusesGrid {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 50px;\n border-radius: var(--emw--border-radius-large, 20px);\n\n &.BonusesGridMobile {\n grid-template-columns: 1fr;\n gap: 20px;\n }\n }\n\n .BonusesPaginationWrapper {\n margin: 40px 0;\n display: flex;\n justify-content: center;\n &.BonusesPaginationWrapperMobile {\n text-align: center;\n }\n .BonusesFirst, .BonusesPrev, .BonusesNext, .BonusesLast {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n font-size: var(--emw--size-standard, 16px);\n cursor: pointer;\n padding: 5px 10px;\n font-weight: var(--emw--font-weight-bold, 700);\n &.Inactive {\n color: var(--emw--color-gray-100, #E6E6E6);\n cursor: default;\n }\n }\n .BonusesPage {\n margin: 0 5px;\n color: var(--emw--color-typography-cotrast, #444444);\n font-size: var(--emw--size-standard, 16px);\n cursor: pointer;\n padding: 5px 10px;\n &.BonusPageActive {\n background-color: var(--emw--color-white, #FFFFFF);\n font-weight: var(--emw--font-weight-bold, 700);\n }\n }\n }\n</style>\n"],"names":["noop","run","fn","blank_object","Object","create","run_all","fns","forEach","is_function","thing","safe_not_equal","a","b","subscribe","store","callbacks","unsub","unsubscribe","component_subscribe","component","callback","$$","on_destroy","push","append","target","node","appendChild","insert","anchor","insertBefore","detach","parentNode","removeChild","destroy_each","iterations","detaching","let","i","length","d","element","name","document","createElement","svg_element","createElementNS","text","data","createTextNode","space","empty","listen","event","handler","options","addEventListener","removeEventListener","attr","attribute","value","removeAttribute","getAttribute","setAttribute","set_custom_element_data","prop","set_data","attribute_to_object","attributes","result","current_component","set_current_component","dirty_components","binding_callbacks","render_callbacks","flush_callbacks","resolved_promise","Promise","resolve","update_scheduled","add_render_callback","seen_callbacks","Set","flushidx","flush","saved_component","update","dirty","fragment","before_update","p","ctx","after_update","e","pop","has","add","clear","outroing","init","instance","create_fragment","not_equal","props","append_styles","parent_component","bound","on_mount","on_disconnect","context","Map","skip_bound","root","ready","ret","rest","then","fill","hydrate","nodes","Array","from","childNodes","l","c","intro","block","delete","local","customElement","m","new_on_destroy","map","filter","SvelteElement","HTMLElement","constructor","super","this","attachShadow","mode","connectedCallback","key","slotted","attributeChangedCallback","_oldValue","newValue","disconnectedCallback","$destroy","destroy_component","filtered","targets","indexOf","$on","type","index","splice","$set","$$props","$$set","keys","viewClasses","isArrayBufferView","g","globalThis","self","global","support","Symbol","Blob","normalizeName","String","test","TypeError","toLowerCase","normalizeValue","iteratorFor","items","iterator","next","shift","done","Headers","headers","isArray","header","getOwnPropertyNames","consumed","body","_noBody","bodyUsed","reject","fileReaderReady","reader","onload","onerror","error","readBlobAsArrayBuffer","blob","FileReader","promise","readAsArrayBuffer","bufferClone","buf","view","slice","Uint8Array","byteLength","set","buffer","Body","_initBody","obj","_bodyInit","_bodyText","prototype","isPrototypeOf","_bodyBlob","FormData","_bodyFormData","URLSearchParams","toString","DataView","_bodyArrayBuffer","ArrayBuffer","call","get","rejected","Error","arrayBuffer","isView","byteOffset","encoding","match","exec","readAsText","chars","fromCharCode","join","formData","decode","json","JSON","parse","oldValue","hasOwnProperty","thisArg","values","entries","methods","Request","input","reParamSearch","url","credentials","method","signal","upcased","toUpperCase","AbortController","referrer","cache","replace","Date","getTime","form","trim","split","bytes","decodeURIComponent","Response","bodyInit","status","undefined","RangeError","ok","statusText","clone","response","redirectStatuses","DOMException","redirect","location","err","message","stack","fetch","request","aborted","names","xhr","XMLHttpRequest","abortXhr","abort","rawHeaders","getAllResponseHeaders","substr","line","parts","console","warn","responseURL","responseText","setTimeout","ontimeout","onabort","open","href","withCredentials","responseType","setRequestHeader","onreadystatechange","readyState","send","fetch$1","polyfill","bind","extendStatics","setPrototypeOf","__proto__","__extends","__","__values","o","s","__read","n","r","ar","return","__spreadArray","to","pack","arguments","concat","isFunction","createErrorClass","createImpl","ctorFunc","UnsubscriptionError","_super","errors","arrRemove","arr","item","Subscription","e_1","_a","e_2","_b","closed","_parentage","_parentage_1","_parentage_1_1","remove","e_1_1","initialFinalizer","initialTeardown","_finalizers","_finalizers_1","_finalizers_1_1","finalizer","execFinalizer","e_2_1","teardown","_hasParent","_addParent","parent","includes","_removeParent","EMPTY","EMPTY_SUBSCRIPTION","isSubscription","config","useDeprecatedSynchronousErrorHandling","useDeprecatedNextContext","timeoutProvider","timeout","args","_i","delegate","apply","clearTimeout","handle","t","errorContext","cb","isRoot","errorThrown","Subscriber","complete","SafeSubscriber","isStopped","_next","_error","_complete","destination","_bind","Function","_this","EMPTY_OBSERVER","ConsumerObserver","partialObserver","handleUnhandledError","observerOrNext","context_1","observable","Observable","lift","operator","source","subscriber","_subscribe","_trySubscribe","sink","promiseCtor","getPromiseCtor","Symbol_observable","pipe","operations","x","reduce","prev","toPromise","ObjectUnsubscribedError","Subject","subject","AnonymousSubject","_throwIfClosed","currentObservers","observers","_c","hasError","thrownError","defineProperty","enumerable","configurable","_checkFinalizedStatuses","_innerSubscribe","asObservable","dateTimestampProvider","now","ReplaySubject","_buffer","_infiniteTimeWindow","_timestampProvider","_windowTime","_trimBuffer","subscription","copy","_bufferSize","adjustedBufferSize","Infinity","last","Math","max","topics","subjects","subscriber_queue","writable","start","stop","subscribers","new_value","run_queue","invalidate","size","derived","stores","initial_value","single","stores_array","auto","started","pending","cleanup","sync","unsubscribers","isMergeableObject","stringValue","$$typeof","REACT_ELEMENT_TYPE","for","cloneUnlessOtherwiseSpecified","deepmerge","defaultArrayMerge","getKeys","getOwnPropertySymbols","symbol","propertyIsEnumerable","propertyIsOnObject","object","property","_","mergeObject","customMerge","arrayMerge","sourceIsArray","all","array","cjs","ErrorKind","TYPE","SKELETON_TYPE","__assign","assign","isLiteralElement","el","literal","isNumberElement","number","isDateElement","date","isTimeElement","time","isSelectElement","select","isPluralElement","plural","isTagElement","tag","isNumberSkeleton","isDateTimeSkeleton","dateTime","EXPECT_ARGUMENT_CLOSING_BRACE","EMPTY_ARGUMENT","MALFORMED_ARGUMENT","EXPECT_ARGUMENT_TYPE","INVALID_ARGUMENT_TYPE","EXPECT_ARGUMENT_STYLE","INVALID_NUMBER_SKELETON","INVALID_DATE_TIME_SKELETON","EXPECT_NUMBER_SKELETON","EXPECT_DATE_TIME_SKELETON","UNCLOSED_QUOTE_IN_ARGUMENT_STYLE","EXPECT_SELECT_ARGUMENT_OPTIONS","EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE","INVALID_PLURAL_ARGUMENT_OFFSET_VALUE","EXPECT_SELECT_ARGUMENT_SELECTOR","EXPECT_PLURAL_ARGUMENT_SELECTOR","EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT","EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT","INVALID_PLURAL_ARGUMENT_SELECTOR","DUPLICATE_PLURAL_ARGUMENT_SELECTOR","DUPLICATE_SELECT_ARGUMENT_SELECTOR","MISSING_OTHER_CLAUSE","INVALID_TAG","INVALID_TAG_NAME","UNMATCHED_CLOSING_TAG","UNCLOSED_TAG","argument","pound","SPACE_SEPARATOR_REGEX","DATE_TIME_REGEX","WHITE_SPACE_REGEX","FRACTION_PRECISION_REGEX","SIGNIFICANT_PRECISION_REGEX","INTEGER_WIDTH_REGEX","CONCISE_INTEGER_WIDTH_REGEX","parseSignificantPrecision","str","roundingPriority","g1","g2","minimumSignificantDigits","maximumSignificantDigits","parseSign","signDisplay","currencySign","parseNotationOptions","opt","parseNumberSkeleton","tokens","tokens_1","conciseScientificAndEngineeringOpts","token","stem","style","scale","currency","useGrouping","maximumFractionDigits","unit","notation","compactDisplay","currencyDisplay","unitDisplay","parseFloat","g3","g4","g5","minimumIntegerDigits","minimumFractionDigits","trailingZeroDisplay","signOpts","timeData","AX","BQ","CP","CZ","DK","FI","ID","IS","ML","NE","RU","SE","SJ","SK","AS","BT","DJ","ER","GH","IN","LS","PG","PW","SO","TO","VU","WS","001","AL","TD","ca-ES","CF","CM","fr-CA","gl-ES","it-CH","it-IT","LU","NP","PF","SC","SM","SN","TF","VA","CY","GR","CO","DO","KP","KR","NA","PA","PR","VE","AC","AI","BW","BZ","CC","CK","CX","DG","FK","GB","GG","GI","IE","IM","IO","JE","LT","MK","MN","MS","NF","NG","NR","NU","PN","SH","SX","TA","ZA","af-ZA","AR","CL","CR","CU","EA","es-BO","es-BR","es-EC","es-ES","es-GQ","es-PE","GT","HN","IC","KG","KM","LK","MA","MX","NI","PY","SV","UY","JP","AD","AM","AO","AT","AW","BE","BF","BJ","BL","BR","CG","CI","CV","DE","EE","FR","GA","GF","GN","GP","GW","HR","IL","IT","KZ","MC","MD","MF","MQ","MZ","NC","NL","PM","PT","RE","RO","SI","SR","ST","TG","TR","WF","YT","BD","PK","AZ","BA","BG","CH","GE","LI","ME","RS","UA","UZ","XK","AG","AU","BB","BM","BS","CA","DM","en-001","FJ","FM","GD","GM","GU","GY","JM","KI","KN","KY","LC","LR","MH","MP","MW","NZ","SB","SG","SL","SS","SZ","TC","TT","UM","US","VC","VG","VI","ZM","BO","EC","ES","GQ","PE","AE","ar-001","BH","DZ","EG","EH","HK","IQ","JO","KW","LB","LY","MO","MR","OM","PH","PS","QA","SA","SD","SY","TN","YE","AF","LA","CN","LV","TL","zu-ZA","CD","IR","hi-IN","kn-IN","ml-IN","te-IN","KH","ta-IN","BN","MY","ET","gu-IN","mr-IN","pa-IN","TW","KE","MM","TZ","UG","SPACE_SEPARATOR_START_REGEX","RegExp","SPACE_SEPARATOR_END_REGEX","createLocation","end","hasNativeStartsWith","startsWith","hasNativeFromCodePoint","fromCodePoint","hasNativeFromEntries","fromEntries","hasNativeCodePointAt","codePointAt","hasTrimStart","trimStart","hasTrimEnd","trimEnd","isSafeInteger","Number","isFinite","floor","abs","REGEX_SUPPORTS_U_AND_Y","IDENTIFIER_PREFIX_RE_1","matchIdentifierAtIndex","search","position","codePoints","code","elements","entries_1","first","charCodeAt","second","flag","lastIndex","_isWhiteSpace","_isPatternSyntax","Parser","offset","parseMessage","nestingLevel","parentArgType","expectingCloseTag","isEOF","char","parseArgument","val","ignoreTag","peek","clonePosition","_isAlpha","parseTag","parseLiteral","bump","closingTagNameStartPosition","startPosition","tagName","parseTagName","bumpSpace","bumpIf","childrenResult","children","endTagStartPosition","startOffset","parseQuoteResult","tryParseQuote","parseUnquotedResult","tryParseUnquoted","parseLeftAngleResult","tryParseLeftAngleBracket","codepoint","ch","openingBracePosition","parseIdentifierIfPossible","parseArgumentOptions","startingPosition","endOffset","bumpTo","typeStartPosition","argType","typeEndPosition","styleAndLocation","styleStartPosition","parseSimpleArgStyleIfPossible","styleLocation","argCloseResult","tryParseArgumentClose","location_1","skeleton","parseNumberSkeletonFromString","dateTimePattern","locale","skeletonCopy","patternPos","patternChar","charAt","extraLength","hourLen","dayPeriodLen","hourChar","regionTag","hourCycle","hourCycles","languageTag","language","maximize","region","pattern","parsedOptions","shouldParseSkeletons","len","era","year","month","day","weekday","hour12","hour","minute","timeZoneName","typeEndPosition_1","identifierAndLocation","pluralOffset","tryParseDecimalInteger","location_2","optionsResult","tryParsePluralOrSelectOptions","pluralType","nestedBraces","apostrophePosition","bumpUntil","stringTokens_1","stemAndOptions","options_1","expectCloseTag","parsedFirstIdentifier","hasOtherClause","parsedSelectors","selector","selectorLocation","fragmentResult","requiresOtherClause","expectNumberError","invalidNumberError","sign","hasDigits","decimal","column","kind","prefix","currentOffset","targetOffset","min","nextCode","opts","SyntaxError","originalMessage","captureLocation","pruneLocation","els","k","memoize","cacheDefault","serializer","serializerDefault","strategy","assemble","monadic","variadic","arg","cacheKey","computedValue","serialize","stringify","ObjectWithoutPrototypeCache","ErrorCode","strategies","MISSING_VALUE","INVALID_VALUE","MISSING_INTL_API","FormatError","PART_TYPE","InvalidValueError","InvalidValueTypeError","MissingValueError","variableId","msg","formatToParts","locales","formatters","formats","currentPluralValue","els_1","getNumberFormat","format","varName","getDateTimeFormat","medium","value_1","formatFn","chunks","other","Intl","PluralRules","rule","getPluralRules","part","lastPart","createFastMemoizeCache","IntlMessageFormat","memoizedDefaultLocale","NumberFormat","resolvedOptions","resolveLocale","supportedLocales","supportedLocalesOf","Locale","__parse","integer","percent","short","long","full","overrideFormats","defaultConfig","configs","defaultLocale","formatterCache","pluralRules","ast","resolvedLocale","getAst","c1","c2","DateTimeFormat","lookupCache","addToCache","path","lookup","refLocale","getPossibleLocales","id","hasLocaleDictionary","fullKey","partialKey","localeDictionary","dictionary","$dictionary","addMessages","partials","dictionary2","newDictionary","queue","getLocaleQueue","hasLocaleQueue","some","localeQueue","loadLocaleQueue","loader","partial","default","activeFlushes","queues","localeItem","localeName","fallbackLocale","loadingDelay","scientific","engineering","compactLong","compactShort","warnOnMissingMessages","handleMissingMessage","getOptions","$isLoading","__defProp$1","__defProps","defineProperties","__getOwnPropDescs","getOwnPropertyDescriptors","__getOwnPropSymbols$1","__hasOwnProp$1","__propIsEnum$1","__defNormalProp$1","current","internalLocale","getSubLocales","reverse","getCurrentLocale","newLocale","window","documentElement","$locale","relatedLocales","loadingTimer","finally","monadicMemoize","__defProp","__getOwnPropSymbols","__hasOwnProp","__propIsEnum","__defNormalProp","__spreadValues","__objRest","exclude","getIntlFormatterOptions","createNumberFormatter","createDateFormatter","createTimeFormatter","_e","_f","getMessageFormatter","$format","_d","messageObj","defaultValue","formatMessage","getDevice","_k","_l","_j","_g","_h","emWidgets","topic","step","replaySubject","userAgent","module","exports","hookCallback","hooks","isObject","hasOwnProp","isObjectEmpty","isUndefined","isNumber","isDate","res","arrLen","extend","valueOf","createUTC","strict","createLocalOrUTC","utc","getParsingFlags","_pf","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidEra","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","meridiem","rfc2822","weekdayMismatch","isValid","flags","parsedParts","isNowValid","isNaN","invalidWeekday","_strict","bigHour","isFrozen","_isValid","createInvalid","NaN","fun","momentProperties","updateInProgress","copyConfig","momentPropertiesLen","_isAMomentObject","_tzm","_isUTC","_offset","_locale","Moment","updateOffset","isMoment","suppressDeprecationWarnings","deprecate","firstTime","deprecationHandler","argLen","deprecations","deprecateSimple","mergeConfigs","parentConfig","childConfig","zeroFill","targetLength","forceSign","absNumber","zerosToFill","pow","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","padded","ordinal","func","localeData","formatMoment","expandFormat","mom","output","invalidDate","replaceLongDateFormatTokens","longDateFormat","aliases","D","dates","days","weekdays","E","isoweekdays","isoweekday","DDD","dayofyears","dayofyear","h","hours","ms","milliseconds","millisecond","minutes","M","months","Q","quarters","quarter","seconds","gg","weekyears","weekyear","isoweekyears","isoweekyear","w","weeks","week","W","isoweeks","isoweek","y","years","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","priorities","isoWeekday","dayOfYear","weekYear","isoWeekYear","isoWeek","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchWord","match1to2NoLeadingZero","match1to2HasZero","addRegexToken","regex","strictRegex","regexes","isStrict","getParseRegexForToken","regexEscape","matched","p1","p2","p3","p4","absFloor","ceil","toInt","argumentForCoercion","coercedNumber","addParseToken","tokenLen","addWeekParseToken","_w","isLeapYear","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","daysInYear","parseTwoDigitYear","parseInt","getSetYear","makeGetSet","keepTime","set$1","isUTC","getUTCMilliseconds","getMilliseconds","getUTCSeconds","getSeconds","getUTCMinutes","getMinutes","getUTCHours","getHours","getUTCDate","getDate","getUTCDay","getDay","getUTCMonth","getMonth","getUTCFullYear","getFullYear","setUTCMilliseconds","setMilliseconds","setUTCSeconds","setSeconds","setUTCMinutes","setMinutes","setUTCHours","setHours","setUTCDate","setDate","setUTCFullYear","setFullYear","daysInMonth","modMonth","monthsShort","monthsShortRegex","monthsRegex","monthsParse","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","setMonth","setUTCMonth","getSetMonth","computeMonthsParse","cmpLenRev","shortP","longP","shortPieces","longPieces","mixedPieces","sort","_monthsRegex","_monthsShortRegex","_monthsStrictRegex","_monthsShortStrictRegex","createDate","createUTCDate","UTC","firstWeekOffset","dow","doy","fwd","dayOfYearFromWeeks","resYear","resDayOfYear","weekOfYear","resWeek","weekOffset","weeksInYear","weekOffsetNext","shiftWeekdays","ws","weekdaysMin","weekdaysShort","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","weekdaysParse","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","computeWeekdaysParse","minp","shortp","longp","minPieces","_weekdaysRegex","_weekdaysShortRegex","_weekdaysMinRegex","_weekdaysStrictRegex","_weekdaysShortStrictRegex","_weekdaysMinStrictRegex","hFormat","lowercase","matchMeridiem","_meridiemParse","kInput","_isPm","isPM","_meridiem","pos","pos1","pos2","getSetHour","globalLocale","baseConfig","calendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","LTS","L","LL","LLL","LLLL","dayOfMonthOrdinalParse","relativeTime","future","past","ss","mm","hh","dd","ww","yy","meridiemParse","localeFamilies","normalizeLocale","chooseLocale","j","loadLocale","commonPrefix","arr1","arr2","minl","oldLocale","_abbr","require","getSetGlobalLocale","getLocale","defineLocale","abbr","_config","parentLocale","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","obsOffsets","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","string","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","configFromRFC2822","parsedArray","weekdayStr","parsedInput","checkWeekday","obsOffset","militaryOffset","numOffset","hm","defaults","configFromArray","currentDate","weekdayOverflow","curWeek","nowValue","_useUTC","createLocal","_week","temp","_dayOfYear","yearToUse","_nextDay","expectedWeekday","ISO_8601","RFC_2822","stringLength","totalParsedInputLength","skipped","meridiemHour","isPm","erasConvertYear","prepareConfig","dayOrDate","preparse","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","score","createFromInputFallback","pickBy","moments","prototypeMin","prototypeMax","ordering","Duration","duration","unitHasDecimal","orderLen","_milliseconds","_days","_months","_data","_bubble","isDuration","absRound","round","separator","utcOffset","offsetFromString","chunkOffset","matcher","matches","cloneWithOffset","model","diff","setTime","getDateOffset","getTimezoneOffset","isUtc","aspNetRegex","isoRegex","createDuration","parseIso","base","diffRes","isBefore","positiveMomentsDifference","inp","isAfter","createAdder","direction","period","tmp","addSubtract","isAdding","isString","isMomentInput","arrayTest","dataTypeTest","objectTest","propertyTest","properties","propertyLen","monthDiff","wholeMonthDiff","newLocaleData","invalid","subtract","defaultFormat","defaultFormatUtc","lang","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","matchEraAbbr","erasAbbrRegex","computeErasParse","erasName","erasAbbr","erasNarrow","abbrPieces","namePieces","narrowPieces","eras","narrow","_erasRegex","_erasNameRegex","_erasAbbrRegex","_erasNarrowRegex","addWeekYearFormatToken","getter","getSetWeekYearHelper","weeksTarget","dayOfYearData","erasNameRegex","erasNarrowRegex","erasParse","_eraYearOrdinalRegex","matchEraYearOrdinal","eraYearOrdinalParse","_dayOfMonthOrdinalParse","_ordinalParse","_dayOfMonthOrdinalParseLenient","getSetDayOfMonth","getSetMinute","getSetSecond","parseMs","preParsePostFormat","get$1","field","setter","listMonthsImpl","out","listWeekdaysImpl","localeSorted","getSetMillisecond","proto","sod","startOf","calendarFormat","asFloat","that","zoneDelta","endOf","startOfDate","MS_PER_HOUR","MS_PER_MINUTE","MS_PER_SECOND","inputString","postformat","withoutSuffix","humanize","fromNow","toNow","invalidAt","localInput","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","parsingFlags","prioritized","unitsObj","u","priority","prioritizedLen","toArray","toObject","toDate","toISOString","keepOffset","inspect","zone","isLocal","toJSON","unix","creationData","eraName","since","until","eraNarrow","eraAbbr","eraYear","dir","getSetWeek","isoWeeks","weekInfo","weeksInWeekYear","isoWeeksInYear","isoWeeksInISOWeekYear","getSetDayOfWeek","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","parseZone","tZone","hasAlignedHourOffset","isDST","isUtcOffset","zoneAbbr","zoneName","isDSTShifted","_isDSTShifted","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","proto$1","_calendar","_longDateFormat","formatUpper","tok","_invalidDate","_ordinal","isFuture","_relativeTime","pastFuture","_eras","isFormat","standalone","_monthsShort","monthName","_monthsParseExact","ii","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","firstDayOfYear","firstDayOfWeek","_weekdays","_weekdaysMin","_weekdaysShort","weekdayName","_weekdaysParseExact","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","_fullWeekdaysParse","isLower","langData","mathAbs","addSubtract$1","absCeil","daysToMonths","monthsToDays","makeAs","alias","as","makeGetter","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","valueOf$1","thresholds","relativeTime$1","posNegDuration","substituteTimeAgo","abs$1","toISOString$1","ymSign","daysSign","hmsSign","total","toFixed","proto$2","add$1","subtract$1","monthsFromDays","argWithSuffix","argThresholds","withSuffix","th","toIsoString","version","updateLocale","tmpLocale","relativeTimeRounding","roundingFunction","relativeTimeThreshold","threshold","limit","myMoment","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","TIME","TIME_SECONDS","TIME_MS","factory","addNewMessages","dict","TRANSLATIONS","en","bonusName","bonusType","bonusAmount","wageringAmount","remainingBonus","forfeitBonus","active","released","expired","forfeited","zh-hk","fr","ro","es","pt","hr","pt-br","es-mx","tr","t0_value","div","p0","t0","t_value","button","t2_value","moment","t4_value","t6_value","t10_value","create_if_block_3","create_if_block_2","create_if_block_1","if_block3","create_if_block","p1_class_value","div4","div3","div0","span","div1","div2","p5","t2","t4","t6","t10","customStylingContainer","bonuswalletid","bonusdate","bonusstatus","bonusname","bonustype","bonusamount","bonuswageringamount","bonusremainingamount","bonuscurrency","clientstyling","clientstylingurl","translationurl","navigator","isMobile","bonusTypeText","$$invalidate","URL","cssFile","innerHTML","setClientStylingURL","sheet","catch","log","postMessage","$$value","defineCustomElement","CustomElement","definedVersion","defined","customElements","is","define","Lumo","ShadowRoot","ShadyCSS","nativeShadow","Document","CSSStyleSheet","WeakMap","_$cssResult$","cssText","styleSheet","replaceSync","cssRules","trustedTypes","emptyScript","reactiveElementPolyfillSupport","toAttribute","Boolean","fromAttribute","converter","reflect","hasChanged","_$Ei","isUpdatePending","hasUpdated","_$El","_$Eu","addInitializer","finalize","observedAttributes","elementProperties","_$Ep","_$Ev","createProperty","state","noAccessor","getPropertyDescriptor","requestUpdate","getPropertyOptions","getPrototypeOf","elementStyles","finalizeStyles","styles","flat","unshift","_$E_","enableUpdating","_$AL","_$Eg","addController","_$ES","renderRoot","isConnected","hostConnected","removeController","createRenderRoot","shadowRoot","shadowRootOptions","adoptedStyleSheets","litNonce","textContent","hostDisconnected","_$AK","_$EO","_$EC","_$Ej","await","scheduleUpdate","performUpdate","shouldUpdate","willUpdate","hostUpdate","_$Ek","_$AE","hostUpdated","firstUpdated","updated","updateComplete","getUpdateComplete","ReactiveElement","reactiveElementVersions","createPolicy","createHTML","random","createComment","f","$","T","A","C","createTreeWalker","P","N","strings","_$litType$","v","currentNode","content","firstChild","nextNode","nodeType","hasAttributes","getAttributeNames","endsWith","ctor","H","z","S","_$Co","_$Cl","_$litDirective$","_$AO","_$AT","_$AS","_$AV","_$AN","_$AD","_$AM","_$AU","creationScope","importNode","R","nextSibling","Z","_$AI","_$AH","_$AA","_$AB","_$Cp","startNode","endNode","_$AR","_$AC","_$AP","setConnected","I","capture","once","passive","handleEvent","host","B","litHtmlPolyfillSupport","litHtmlVersions","renderOptions","_$Do","renderBefore","render","_$litPart$","finalized","_$litElement$","litElementHydrateSupport","LitElement","litElementPolyfillSupport","litElementVersions","themeRegistry","classHasThemes","elementClass","registerStyles","themeFor","CSSResult","Vaadin","styleModules","include","moduleId","getAllThemes","getThemes","defaultModuleName","themes","theme","themeForToken","getIncludedStyles","includedStyles","includeModuleId","includedTheme","find","includePriority","moduleName","themeA","themeB","ThemableMixin","superClass","_theme","readOnly","_set_theme","template","styleEl","_template","getStylesForThis","themeStyles","inheritedThemes","__themes","flatMap","lastIndexOf","addLumoGlobalStyles","styleTag","head","insertAdjacentElement","css","font","JSCompiler_renameProperty","workingURL","resolveDoc","CSS_URL_RX","ABS_URL","resolveUrl","baseURI","pathname","implementation","createHTMLDocument","resolveCss","pre","post","pathFromUrl","substring","useShadow","ShadyDOM","inUse","supportsAdoptingStyleSheets","nativeCss","rootPath","Polymer","sanitizeDOMValue","strictTemplatePolicy","setPassiveTouchGestures","allowTemplateFromDomModule","legacyOptimizations","legacyWarnings","syncInitialRender","legacyUndefined","orderedComputed","removeNestedTemplates","fastDomIf","suppressTemplateNotifications","useAdoptedStyleSheetsWithBuiltCSS","legacyNoObservedAttributes","dedupeId","dedupingMixin","mixin","mixinApplications","__mixinApplications","mixinDedupeId","baseSet","__mixinSet","extended","mixinSet","modules","lcModules","setModule","findModule","DomModule","import","querySelector","old","namespace","register","assetpath","__assetpath","owner","HTMLImports","importForElement","ownerDocument","MODULE_STYLE_LINK_SELECTOR","INCLUDE_ATTR","SHADY_UNSCOPED_ATTR","importModule","styleForImport","importDoc","importCss","stylesFromModules","moduleIds","_styles","_stylesFromModuleImports","stylesFromTemplate","e$","querySelectorAll","p$","unscoped","hasAttribute","_unscopedStyle","_style","wrap","noPatch","patch","isPath","dotIndex","isAncestor","isDescendant","translate","newBase","normalize","info","caseMap","DASH_TO_CAMEL","CAMEL_TO_DASH","dashToCamelCase","dash","camelToDashCase","camel","microtaskCurrHandle","microtaskLastHandle","microtaskCallbacks","microtaskNodeContent","microtaskScheduled","microtaskNode","timeOut","MutationObserver","observe","characterData","after","delay","cancel","microTask","idx","microtask","PropertiesChanged","createProperties","_createPropertyAccessor","attributeNameForProperty","typeForProperty","_addPropertyToAttributeMap","__dataHasAccessor","_definePropertyAccessor","__dataAttributes","__data","_setPendingProperty","_invalidateProperties","__dataEnabled","__dataReady","__dataInvalid","__dataPending","__dataOld","__dataInstanceProps","__dataCounter","__serializing","_initializeProperties","_flushProperties","_initializeInstanceProperties","_setProperty","_getProperty","ext","changed","_shouldPropertyChange","_isPropertyPending","_enableProperties","changedProps","_shouldPropertiesChange","_propertiesChanged","currentProps","oldProps","_attributeToProperty","_deserializeValue","_propertyToAttribute","_valueToNodeAttribute","_serializeValue","nativeProperties","isTrustedType","isHTML","isScript","isScriptURL","PropertyAccessors","createPropertiesForAttributes","a$","__dataProto","_initializeProtoProperties","_ensureAttribute","outValue","_hasAccessor","templateExtensions","dom-if","dom-repeat","placeholderBugDetect","placeholderBug","copyAttributeWithTemplateEventPolicy","polymerTemplateEventAttributePolicy","createScript","dest","src","TemplateStamp","_parseTemplate","outerTemplateInfo","templateInfo","_templateInfo","nestedTemplate","stripWhiteSpace","_parseTemplateContent","nodeInfo","_parseTemplateNode","noted","localName","hasInsertionPoint","_parseTemplateNestedTemplate","placeholder","_parseTemplateChildNodes","_parseTemplateNodeAttributes","parentIndex","replaceChild","Node","TEXT_NODE","childInfo","parentInfo","infoIndex","nodeInfoList","createDocumentFragment","attrs","_parseTemplateNodeAttribute","events","_contentForTemplate","_stampTemplate","HTMLTemplateElement","decorate","dom","__noInsertionPoint","nodeList","findTemplateNode","inst","parentTemplateInfo","_parentTemplateInfo","_addMethodEventListenerToNode","eventName","methodName","detail","_methodHost","_addEventListenerToNode","_removeEventListenerFromNode","NOOP","TYPES","COMPUTE","REFLECT","NOTIFY","PROPAGATE","OBSERVE","READ_ONLY","COMPUTE_INFO","capitalAttributeRegex","ensureOwnEffectMap","cloneArrays","effects","protoFx","instFx","runEffects","hasPaths","extraArgs","ran","fxs","fx","lastRun","pathMatchesTrigger","trigger","triggerPath","structured","wildcard","runObserverEffect","changedProp","dynamicFn","dispatchNotifyEvent","queueProperty","dispatchEvent","CustomEvent","runNotifyEffect","runReflectEffect","attrName","runComputedEffects","computeEffects","order","ordered","__orderedComputedDeps","curr","counts","infoForComputed","computedDeps","computedByCurr","computedProp","methodInfo","enqueueEffectsFor","runComputedEffect","inputProps","insertEffect","mid","cmp","runMethodEffect","addBinding","bindings","binding","isCompound","negate","listenerEvent","listenerNegate","compoundIndex","dependencies","evaluator","parseArg","_addTemplatePropertyEffect","rootProperty","runBindingEffect","__isPropertyEffectsClient","_setPendingPropertyOrPath","_enqueueClient","_evaluateBinding","storage","__dataCompoundStorage","_setUnmanagedPropertyToNode","addNotifyListener","fromProp","toPath","fromPath","currentTarget","createMethodEffect","sig","effectFn","static","_addPropertyEffect","_marshalArgs","emptyArray","IDENT","ARGUMENT","bindingRegex","OPEN_BRACKET","literalFromParts","parseMethod","expression","argList","rawArg","fc","getArgValue","notifySplices","splices","splicesData","indexSplices","_overrideLegacyUndefined","notifyPath","notifySplice","addedCount","removed","PropertyEffects","propertyEffectsBase","__dataClientsReady","__dataPendingClients","__dataToNotify","__dataLinkedPaths","__dataHasPaths","__dataHost","__dataTemp","__dataClientsInitialized","__computeEffects","__computeInfo","__reflectEffects","__notifyEffects","__propagateEffects","__observeEffects","__readOnly","__templateInfo","PROPERTY_EFFECT_TYPES","_registerHost","hostStack","effect","_removePropertyEffect","_hasPropertyEffect","_hasReadOnlyEffect","_hasNotifyEffect","_hasReflectEffect","_hasComputedEffect","shouldNotify","isPathNotification","links","link","propIsPath","prevProps","client","_flushClients","__enableOrFlushClients","_readyClients","clients","setProperties","setReadOnly","notifyProps","_propagatePropertyChanges","notified","_runEffectsForTemplate","baseRunEffects","propertyEffects","linkPaths","unlinkPaths","hadLength","deleteCount","propPath","_createReadOnlyProperty","protectedSetter","_createPropertyObserver","_createMethodObserver","_createNotifyingProperty","_createReflectedProperty","_createComputedProperty","pathValue","addPropertyEffect","createPropertyObserver","createMethodObserver","createNotifyingProperty","createReadOnlyProperty","createReflectedProperty","createComputedProperty","bindTemplate","_bindTemplate","instanceBinding","wasPreBound","__preBoundTemplateInfo","previous","lastChild","previousSibling","hostProps","literals","_removeBoundDom","_parseBindings","origName","nestedTemplateInfo","isDomIf","isDomRepeat","hostProp","customEvent","notifyEvent","colon","signature","dynamicFns","PropertiesMixin","superPropertiesClass","superCtor","ownProperties","__ownProperties","_properties","__observedAttributes","__finalized","_finalizeClass","__properties","builtCSS","cssBuild","ElementMixin","polymerElementBase","polymerElementVersion","__ownObservers","createObservers","_prepareTemplate","cloneNode","allProps","computed","reflectToAttribute","notify","observer","protoTemplate","importPath","meta","importMeta","_importPath","_finalizeTemplate","__propertyDefaults","_canApplyPropertyDefault","_processStyleText","__polymerFinalized","klass","templateStyles","stylesWithImports","linkedStyles","firstTemplateChild","firstElementChild","templateStyleIndex","templateStyle","prepareTemplate","_styleSheet","styleElement","_attachDom","shadyUpgradeFragment","flushInitial","updateStyles","styleSubtree","policy","literalValue","assertValidTemplateStringParameters","acc","html","raw","PolymerElement","directionSubscribers","alignDirs","documentDir","elementDir","getDocumentDir","directionObserver","attributeFilter","DirMixin","__isRTL","__restoreSubscription","__subscribe","newValueEqlDocDir","newValueEmptied","newDiffValue","__unsubscribe","InputContainer","disabled","readonly","preventDefault","assignedNodes","flatten","focus","overlay","menuOverlayCore","menuOverlay","ControllerMixin","__controllers","controller","DEV_MODE_CODE_REGEXP","FlowClients","Flow","uncommentAndRun","maybeGatherAndSendStats","developmentMode","localStorage","getItem","hostname","productionMode","isDevelopmentMode","idlePeriod","requestIdleCallback","cancelIdleCallback","queueMicrotask","debouncerQueue","Debouncer","debounce","debouncer","asyncModule","_cancelAsync","setConfig","_asyncModule","_callback","_timer","isActive","statsJob","registered","registrations","developmentModeCallback","runIfDevelopmentMode","doctype","deserializeAttributeValue","serializeAttributeValue","addValueToAttribute","SlotObserver","slot","_storedNodes","_connected","_scheduled","_boundSchedule","_schedule","connect","disconnect","_processNodes","currentNodes","addedNodes","removedNodes","movedNodes","uniqueId","SlotController","EventTarget","generateId","slotName","initializer","multiple","useUniqueId","slotInitializer","defaultId","initialized","initMultiple","initSingle","observeSlot","getSlotChild","initAddedNode","attachDefaultNode","initNode","getSlotChildren","defaultNode","Element","ELEMENT_NODE","initCustomNode","_node","teardownNode","__slotObserver","newNodes","TooltipController","setTarget","tooltipNode","ariaTarget","manual","opened","_position","shouldShow","__notifyChange","setAriaTarget","setContext","setManual","setOpened","setPosition","setShouldShow","buttonStyles","passiveTouchGestures","HAS_NATIVE_TA","touchAction","GESTURE_KEY","HANDLED_OBJ","TOUCH_ACTION","MOUSE_EVENTS","MOUSE_WHICH_TO_BUTTONS","MOUSE_HAS_BUTTONS","MouseEvent","buttons","isMouseEvent","supportsPassive","IS_TOUCH_ONLY","canBeDisabled","command","fieldset","keygen","optgroup","option","textarea","hasLeftMouseButton","ev","which","POINTERSTATE","mouse","mouseIgnoreJob","touch","scrollDecided","trackDocument","stateObj","movefn","upfn","untrackDocument","getComposedPath","composedPath","gestures","recognizers","_findOriginalTarget","_handleNative","gobj","gs","changedTouches","touches","identifier","clientX","clientY","ta","shouldPrevent","dx","dy","cancelable","prevent","handled","skip","flow","reset","addListener","evType","recognizer","deps","dep","gd","_count","setTouchAction","recog","emits","emit","_fire","Event","bubbles","composed","defaultPrevented","preventer","sourceEvent","evName","downupFire","trackHasMovedEnough","trackFire","secondlast","moves","lastmove","ddx","ddy","hover","elementFromPoint","oldNext","trackForward","bcr","getBoundingClientRect","pageX","pageY","left","right","top","bottom","mousedown","touchstart","touchend","addMove","move","ct","touchmove","click","DisabledMixin","superclass","_disabledChanged","_setAriaDisabled","KeyboardMixin","_onKeyDown","_onKeyUp","_onEnter","_onEscape","_event","keyboardActive","getDeepActiveElement","activeElement","sortElementsByTabIndex","pivot","ati","tabIndex","bti","isElementFocused","getRootNode","FocusMixin","_keyboardActive","_shouldSetFocus","_setFocused","_shouldRemoveFocus","focused","toggleAttribute","TabindexMixin","tabindex","_lastTabIndex","oldDisabled","_tabindexChanged","ButtonMixin","_activeKeys","_shouldSetActive","_setActive","altKey","shiftKey","ctrlKey","metaKey","Button","_tooltipController","template$1","fieldButton","helper","requiredField","inputFieldShared","scheduled","beforeRenderQueue","afterRenderQueue","schedule","requestAnimationFrame","callMethod","afterNextRender","testUserAgent","regexp","testPlatform","platform","vendor","isFirefox","isIPad","maxTouchPoints","isIOS","isTouch","ru","createEvent","counterMap","uncontrolledNodes","markerMap","lockCount","isElement","logError","hideOthers","originalTarget","markerName","controlAttribute","contains","markerCounter","hiddenNodes","elementsToKeep","elementsToStop","keep","assignedSlot","deep","alreadyHidden","counterValue","markerValue","AriaModalController","showModal","__showOthers","close","FocusRestorationController","saveFocus","focusNode","restoreFocus","instances","FocusTrapController","__trapNode","__onKeyDown","__focusableElements","collectFocusableNodes","visibility","display","computedStyle","getComputedStyle","needsSort","child","focusableElements","__focusedElementIndex","trapFocus","trapNode","releaseFocus","backward","__focusNextElement","currentIndex","getAttachedInstances","_hasOverlayStackMixin","__zIndex","OverlayMixin","_last","bringToFront","zIndex","frontmost","_enterModalState","pointerEvents","_previousDocumentPointerEvents","_exitModalState","removeProperty","modeless","focusTrap","restoreFocusOnClose","restoreFocusNode","__ariaModalController","__focusTrapController","__focusRestorationController","_resetFocus","_shouldRestoreFocus","_saveFocus","_trapFocus","_deepContains","doc","renderer","hidden","withBackdrop","_boundMouseDownListener","_mouseDownListener","_boundMouseUpListener","_mouseUpListener","_boundOutsideClickListener","_outsideClickListener","_boundKeydownListener","_keydownListener","_boundIosResizeListener","_detectIosNavbar","backdrop","requestContentUpdate","evt","innerHeight","clientHeight","innerWidth","setProperty","_addGlobalListeners","_removeGlobalListeners","_rendererOrDataChanged","ownerOrModelChanged","_oldOwner","_oldModel","rendererChanged","_oldRenderer","openedChanged","_oldOpened","_modelessChanged","_openedChanged","wasOpened","_animatedOpening","_animatedClosing","_hiddenChanged","_flushAnimation","_shouldAnimate","getPropertyValue","_enqueueAnimation","listener","_attachOverlay","_finishOpening","_placeholder","_finishClosing","_detachOverlay","_mouseDownInside","_mouseUpInside","_shouldCloseOnOutsideClick","PROP_NAMES_VERTICAL","PROP_NAMES_HORIZONTAL","targetResizeObserver","ResizeObserver","entry","__overlay","_updatePosition","PositionMixin","positionTarget","horizontalAlign","verticalAlign","noHorizontalOverlap","noVerticalOverlap","requiredVerticalSpace","__onScroll","__addUpdatePositionEventListeners","__removeUpdatePositionEventListeners","__positionTargetAncestorRootNodes","DOCUMENT_NODE","DOCUMENT_FRAGMENT_NODE","__overlayOpenedChanged","unobserve","__margins","propName","__positionSettingsChanged","shouldAlignStartVertically","shouldAlignStartHorizontally","flexStart","overlayRect","verticalProps","horizontalProps","targetRect","__shouldAlignStartVertically","justifyContent","isRTL","__shouldAlignStartHorizontally","alignItems","__calculatePositionInOneDimension","rtl","contentWidth","__oldContentWidth","offsetWidth","viewportWidth","clientWidth","defaultAlignLeft","__shouldAlignStart","contentHeight","__oldContentHeight","offsetHeight","viewportHeight","defaultAlignTop","contentSize","viewportSize","margins","defaultAlignStart","noOverlap","propNames","spaceForStartAlignment","spaceForEndAlignment","spaceForDefaultAlignment","__adjustBottomProperty","cssPropNameToSet","currentValue","adjustedProp","__oldViewportHeight","__oldViewportWidth","shouldAlignStart","cssPropNameToClear","adjustedValue","DatePickerOverlay","dateEquals","date1","date2","dateAllowed","getClosestDate","closestDate","candidate","extractDateParts","dateAfterXMonths","today","parseDate","InfiniteScroller","bufferSize","_initialScroll","_initialIndex","_activated","_createPool","bufferOffset","_buffers","offsetTop","itemHeight","tmpStyleProp","itemHeightPx","_itemHeightVal","fullHeight","_bufferHeight","scroller","scrollTop","translateY","_firstIndex","_preventScrollEvent","_reset","_scrollDisabled","_mayHaveMomentum","classList","_ready","_scroll","height","forceUpdate","_debouncerUpdateClones","_updateClones","_createElement","_updateElement","_element","_index","_finishInit","_initDone","_ensureStampedInstance","_itemWrapper","_translateBuffer","up","transform","upperThresholdReached","lowerThresholdReached","_debouncerScrollFinish","scrollerRect","_isVisible","container","itemWrapper","tmpInstance","viewPortOnly","bufferIndex","firstIndex","rect","stylesTemplate","stylesTemplate$1","_yearAfterXYears","DatePickerYear","selectedDate","__updateSelected","mutablePropertyChange","mutableData","shouldChange","MutableData","OptionalMutableData","_mutablePropertyChange","newInstance","HTMLTemplateElementExtension","DataTemplate","MutableDataTemplate","templateInstanceBase","TemplateInstanceBase","_configureProperties","__templatizeInstance","__templatizeOwner","__hideTemplateChildren__","_showHideChildren","__templatizeOptions","instanceProps","forwardHostProp","hprop","__hostProps","iprop","templateHost","parentModel","hide","__polymerTextContent__","__polymerReplaced__","__polymerDisplay__","__parentModel","MutableTemplateInstanceBase","Ku","findMethodHost","createTemplatizerClass","templatizerBase","templatize","userNotifyInstanceProp","notifyInstanceProp","hasHostProps","addPropagateEffects","methodHost","userForwardHostProp","isTemplate","templatizeTemplateClass","templatizedBase","TemplatizedTemplate","TemplatizedTemplateExtension","declaredProps","baseClass","templatizeInstanceClass","shadyDOM","didFlush","ScopingShim","elementsHidden","domRepeatBase","DomRepeat","indexAs","itemsIndexAs","renderedItemCount","initialCount","targetFramerate","_targetFrameTime","notifyDomChange","reuseChunkedInstances","__instances","__renderDebouncer","__itemsIdxToInstIdx","__chunkCount","__renderStartTime","__itemsArrayChanged","__shouldMeasureChunk","__shouldContinueChunking","__chunkingId","__sortFn","__filterFn","__observePaths","__ctor","__isDetached","__detachInstance","cancelAnimationFrame","wrappedParent","__attachInstance","__render","__ensureTemplatized","childList","i$","__getMethodHost","__functionFromPropertyValue","functionOrMethodName","__sortChanged","__debounceRender","__filterChanged","__computeFrameTime","rate","__observeChanged","__handleObservedPaths","paths","__itemsChanged","change","__handleItemPath","isntIdxToItemsIdx","__sortAndFilterItems","__calculateLimit","__updateInstances","__continueChunking","_setRenderedItemCount","filteredItemCount","currentCount","newCount","performance","ratio","renderTime","itemsIdxToInstIdx","instIdx","itemIdx","__insertInstance","__detachAndRemoveInstance","wrappedRoot","__stampInstance","beforeRow","beforeNode","itemsPath","dot","itemsIdx","itemSubPath","itemPath","itemForElement","modelForElement","indexForElement","MonthCalendarMixin","focusedDate","showWeekNumbers","i18n","ignoreTaps","minDate","maxDate","_weeks","_notTapping","focusableDateElement","datePart","monthGrid","_handleTap","_isDisabled","firstDate","lastDate","_getTitle","formatTitle","monthNames","_onMonthGridTouchStart","_dateAdd","delta","_applyFirstDayOfWeek","weekDayNames","_getWeekDayNames","weekDayNamesShort","weekDay","weekDayShort","__focusedDateChanged","_getDate","_showWeekSeparator","_isToday","_getDays","startMonth","targetMonth","_getWeeks","_preventDefault","__getWeekNumber","dayOfWeek","nearestThursdayDiff","nearestThursday","firstOfJanuary","timeDiff","daysSinceFirstOfJanuary","__getDayAriaLabel","ariaLabel","MonthCalendar","_showWeekNumbersChanged","__getDatePart","__isDayDisabled","__isDayFocused","__isDaySelected","__getDayAriaSelected","__getDayAriaDisabled","__getDayTabindex","MediaQueryController","query","_boundQueryHandler","_queryHandler","_removeListener","_mediaQuery","matchMedia","_addListener","removeListener","mediaQuery","DatePickerOverlayContentMixin","scrollDuration","_focusedMonthDate","initialPosition","_originDate","_visibleMonthIndex","_desktopMode","_desktopMediaQuery","_translateX","_yearScrollerWidth","_ignoreTaps","label","_cancelButton","_todayButton","calendars","__useSubMonthScrolling","_monthScroller","_addListeners","scrollers","_track","_clear","_cancel","_toggleYearScroller","_initControllers","btn","__onTodayButtonKeyDown","_onTodayTap","__onCancelButtonKeyDown","__initMonthScroller","__initYearScroller","_closeYearScroller","_toggleAnimateClass","focusCancel","scrollToDate","animate","_calculateWeekScrollOffset","_scrollToPosition","_differenceInMonths","_onMonthScroll","_onMonthScrollTouchStart","__onMonthCalendarKeyDown","_onYearTap","_onYearScroll","_onYearScrollTouchStart","_yearScroller","__updateCancelButton","cancelButton","__updateTodayButton","todayButton","_isTodayAllowed","__updateCalendars","__updateYears","_selectDate","dateToSelect","_desktopModeChanged","desktopMode","_focusedDateChanged","revealDate","scrolledAboveViewport","visibleItems","scrolledBelowViewport","_initialPositionChanged","_repositionYearScroller","monthPosition","_repositionMonthScroller","_doIgnoreTaps","_debouncer","_formatDisplayed","formatDate","_close","_scrollToCurrentMonth","yearDelta","targetPosition","_targetPosition","revealResolve","_revealPromise","smoothScroll","timestamp","currentTime","currentPos","oldPosition","__tryFocusDate","_limit","range","_handleTrack","newTranslateX","_openYearScroller","enable","_isYearScrollerVisible","_translateXChanged","_yearAfterXMonths","__toggleDate","_moveFocusByDays","_moveFocusInsideMonth","_moveFocusByMonths","_onTabKeyDown","stopPropagation","section","__focusInput","focusDateElement","dateElement","__pendingDateFocus","focusDate","keepMonth","dateToFocus","reveal","_focusClosestDate","_focusAllowedDate","_dateAllowed","_getDateDiff","todayMidnight","DatePickerOverlayContent","DelegateFocusMixin","autofocus","focusElement","_boundOnBlur","_onBlur","_boundOnFocus","_onFocus","blur","_focusElementChanged","oldElement","_addFocusListeners","__forwardTabIndex","_removeFocusListeners","stylesMap","SlotStylesMixin","slotStyles","__applySlotStyles","rootStyles","InputMixin","inputElement","_hasInputValue","_boundOnInput","__onInput","_boundOnChange","_onChange","_hasValue","_inputElementValueProperty","_inputElementValue","_addInputListeners","_removeInputListeners","_forwardInputValue","_inputElementChanged","oldInput","_hasInputValueChanged","hasValue","oldHasValue","_setHasInputValue","_onInput","__userInput","isTrusted","_toggleHasValue","_valueChanged","newVal","oldVal","ClearButtonMixin","attributeToTargets","getAttrMap","cleanAriaIDReference","storeAriaIDReference","attributeMap","setAriaIDReference","newId","oldId","fromUser","storedValues","attributeValue","FieldAriaController","__required","__target","__setAriaRequiredAttribute","__setLabelIdToAriaAttribute","__labelId","__labelIdFromUser","__setErrorIdToAriaAttribute","__errorId","__setHelperIdToAriaAttribute","__helperId","setAriaLabel","__label","setRequired","required","__setAriaLabelToAttribute","setLabelId","labelId","oldLabelId","setErrorId","errorId","setHelperId","helperId","oldErrorId","oldHelperId","SlotChildObserveController","__updateNodeId","restoreDefaultNode","updateDefaultNode","observeNode","__nodeObserver","mutations","mutation","isCurrentNodeMutation","parentElement","subtree","__hasContent","hasContent","isFirstNode","ErrorController","setErrorMessage","errorMessage","setInvalid","errorNode","HelperController","setHelperText","helperText","helperNode","LabelController","setLabel","labelNode","LabelMixin","_labelController","_labelId","_labelNode","_labelChanged","ValidateMixin","validate","checkValidity","_setInvalid","valid","_shouldSetInvalid","_invalid","DelegateStateMixin","stateTarget","delegateAttrs","delegateProps","_createDelegateAttrsObserver","_createDelegatePropsObserver","_stateTargetChanged","_ensureAttrsDelegated","_ensurePropsDelegated","_delegateAttribute","_delegateProperty","_delegateAttrsChanged","_delegatePropsChanged","InputConstraintsMixin","constraints","_createConstraintsObserver","_hasValidConstraints","__isValidConstraint","_constraintsChanged","hasConstraints","isLastConstraintRemoved","__previousHasConstraints","constraint","InputControlMixin","clearButtonVisible","clearElement","_onClearButtonMouseDown","_onClearButtonClick","_onClearAction","accessibleName","accessibleNameRef","_fieldAriaController","_helperController","_errorController","__labelChanged","__helperChanged","_errorNode","_helperNode","hasHelper","_accessibleNameChanged","_accessibleNameRefChanged","hasLabel","_errorMessageChanged","_helperTextChanged","_ariaTargetChanged","_requiredChanged","_invalidChanged","allowedCharPattern","autoselect","title","_boundOnPaste","_onPaste","_boundOnDrop","_onDrop","_boundOnBeforeInput","_onBeforeInput","__shouldAcceptKey","_markInputPrevented","_preventInputDebouncer","__allowedCharRegExp","pastedText","clipboardData","getData","__allowedTextRegExp","draggedText","dataTransfer","_allowedCharPatternChanged","charPattern","InputController","LabelledInputController","labelController","__preventDuplicateLabelClick","__initLabel","inputClickHandler","stopImmediatePropagation","VirtualKeyboardController","__setVirtualKeyboardEnabled","inputMode","DatePickerMixin","subclass","overlayClass","_overlayElement","__updateOverlayClassNames","overlayElement","__initialClasses","__previousClasses","classesToRemove","classesToAdd","_selectedDate","_focusedDate","autoOpenDisabled","_fullscreen","_fullscreenMediaQuery","referenceDate","adjustedYear","fullYear","_minDate","_maxDate","_noInput","_ios","_focusOverlayOnOpen","_overlayContent","_boundOnClick","_onClick","_boundOnScroll","_onScroll","_boundOverlayRenderer","_overlayRenderer","_nativeInput","_selectParsedOrFocusedDate","hasFocus","__bringToFront","_focusAndSelect","__userConfirmedDate","__parseDate","dateString","dateObject","__formatDate","inputValue","inputValid","minMaxValid","inputValidity","_shouldKeepFocusRing","__dispatchChange","prevValue","_focus","_isNoInput","fullscreen","ios","_formatISO","pad","num","fmt","yearSign","yearFmt","yearAbs","autocomplete","_applyInputValue","_selectedDateChanged","__keepInputValue","_ignoreFocusedDateChange","newDate","__updateOverlayContent","overlayContent","__updateOverlayContentTheme","__updateOverlayContentFullScreen","_onOverlayEscapePress","_onOverlayOpened","_getInitialPosition","scrollFocusDate","focusables","parsedInitialPosition","parsedDate","_onOverlayClosed","selectionStart","selectionEnd","_setSelectionRange","setSelectionRange","_isClearButton","_onHostClick","keyCode","__computeMinOrMaxDate","DatePicker","clearButton","_setInputElement","_setFocusElement","_onVaadinOverlayClose","_toggle","titleBonusesHistory","dateFrom","dateTo","dateFilter","noBonusHistory","t1_value","t3_value","t9_value","svg","defs","g0","h2","div5","label0","vaadin_date_picker0","label1","vaadin_date_picker1","if_block0","t1","t3","t9","player_bonus_card_bonuswalletid_value","walletId","player_bonus_card","player_bonus_card_bonusdate_value","granted","player_bonus_card_bonusstatus_value","player_bonus_card_bonusname_value","player_bonus_card_bonustype_value","extension","grantedPlayerCurrencyAmount","player_bonus_card_bonuswageringamount_value","fulfilledWR","originalWageringRequirement","player_bonus_card_bonusremainingamount_value","currentAmount","player_bonus_card_bonuscurrency_value","each_value","span0","span0_class_value","span1","span1_class_value","span2","span3","span_class_value","startCalendar","endCalendar","lastMonth","endpoint","session","playerid","bonushistorystatus","bonushistorytype","bonusCalendarStartDate","bonusCalendarEndDate","bonusesPrevPage","bonusesNextPage","bonusesLastPage","numberOfPages","currentPage","bonusesList","toggleScreen","getBonuses","startDate","endDate","statuses","types","searchParams","X-SessionId","startCalendarHandler","endCalendarHandler","PlayerBonusHistory"],"mappings":"iNAAA,SAASA,KAkBT,SAASC,EAAIC,GACT,OAAOA,EACX,CAAA,CACA,SAASC,IACL,OAAOC,OAAOC,OAAO,IACzB,CAAA,CACA,SAASC,EAAQC,GACbA,EAAIC,QAAQP,CAAAA,CAChB,CACA,SAASQ,EAAYC,GACjB,MAAwB,YAAVA,OAAAA,CAClB,CACA,SAASC,EAAeC,EAAGC,GACvB,OAAOD,GAAKA,EAAIC,GAAKA,EAAID,IAAMC,GAAOD,GAAkB,UAANA,OAAAA,GAAgC,YAANA,OAAAA,CAChF,CAoBA,SAASE,EAAUC,KAAUC,GACzB,GAAa,MAATD,EACA,OAAOf,EAEX,IAAMiB,EAAQF,EAAMD,aAAaE,CACjC,EAAA,OAAOC,EAAMC,YAAc,IAAMD,EAAMC,YAAgBD,EAAAA,CAC3D,CAMA,SAASE,EAAoBC,EAAWL,EAAOM,GAC3CD,EAAUE,GAAGC,WAAWC,KAAKV,EAAUC,EAAOM,CAAAA,CAAAA,CAClD,CA8RA,SAASI,EAAOC,EAAQC,GACpBD,EAAOE,YAAYD,CACvB,CAAA,CAoDA,SAASE,EAAOH,EAAQC,EAAMG,GAC1BJ,EAAOK,aAAaJ,EAAMG,GAAU,IACxC,CAAA,CASA,SAASE,E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,GAAM,CACF,KAEJC,GAAM,CACF,KAEJC,GAAM,CACF,KAEJC,GAAM,CACF,KAEJC,GAAM,CACF,KAEJC,GAAM,CACF,KAEJC,GAAM,CACF,KAEJC,GAAM,CACF,KAEJC,GAAM,CACF,IACA,KAEJC,GAAM,CACF,IACA,KAEJC,GAAM,CACF,IACA,KAEJC,GAAM,CACF,IACA,KAEJC,GAAM,CACF,IACA,KAEJC,GAAM,CACF,IACA,KAEJC,GAAM,CACF,IACA,KAEJC,GAAM,CACF,IACA,KAEJC,GAAM,CACF,IACA,KAEJC,GAAM,CACF,IACA,KAEJC,GAAM,CACF,IACA,KAEJC,GAAM,CACF,IACA,KAEJC,GAAM,CACF,IACA,KAEJC,MAAO,CACH,IACA,KAEJC,GAAM,CACF,IACA,IACA,MAEJC,GAAM,CACF,IACA,IACA,MAEJC,QAAS,CACL,IACA,IACA,MAEJC,GAAM,CACF,IACA,IACA,MAEJC,GAAM,CACF,IACA,IACA,MAEJC,QAAS,CACL,IACA,IACA,MAEJC,QAAS,CACL,IACA,IACA,MAEJC,QAAS,CACL,IACA,IACA,MAEJC,QAAS,CACL,IACA,IACA,MAEJC,GAAM,CACF,IACA,IACA,MAEJC,GAAM,CACF,IACA,IACA,MAEJC,GAAM,CACF,IACA,IACA,MAEJC,GAAM,CACF,IACA,IACA,MAEJC,GAAM,CACF,IACA,IACA,MAEJC,GAAM,CACF,IACA,IACA,MAEJC,GAAM,CACF,IACA,IACA,MAEJC,GAAM,CACF,IACA,IACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,QAAS,CACL,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,QAAS,CACL,IACA,IACA,KACA,MAEJC,QAAS,CACL,IACA,IACA,KACA,MAEJC,QAAS,CACL,IACA,IACA,KACA,MAEJC,QAAS,CACL,IACA,IACA,KACA,MAEJC,QAAS,CACL,IACA,IACA,KACA,MAEJC,QAAS,CACL,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KACA,MAEJC,GAAM,CACF,IACA,IACA,KAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,MAEJC,GAAM,CACF,IACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,SAAU,CACN,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,IACA,MAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,SAAU,CACN,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,GAAM,CACF,IACA,KACA,KACA,KAEJC,QAAS,CACL,IACA,KACA,KACA,KAEJC,GAAM,CACF,KACA,KAEJC,GAAM,CACF,KACA,KAEJC,QAAS,CACL,KACA,IACA,KAEJC,QAAS,CACL,KACA,IACA,KAEJC,QAAS,CACL,KACA,IACA,KAEJC,QAAS,CACL,KACA,IACA,KAEJC,GAAM,CACF,KACA,IACA,IACA,MAEJC,QAAS,CACL,KACA,IACA,KACA,KAEJC,GAAM,CACF,KACA,KACA,IACA,KAEJC,GAAM,CACF,KACA,KACA,IACA,KAEJC,GAAM,CACF,KACA,KACA,IACA,KAEJC,QAAS,CACL,KACA,KACA,IACA,KAEJC,QAAS,CACL,KACA,KACA,IACA,KAEJC,QAAS,CACL,KACA,KACA,IACA,KAEJC,GAAM,CACF,KACA,KACA,IACA,KAEJC,GAAM,CACF,KACA,KACA,IACA,KAEJC,GAAM,CACF,KACA,KACA,IACA,KAEJC,GAAM,CACF,KACA,KACA,IACA,KAEJC,GAAM,CACF,KACA,KACA,IACA,IAAA,EDjzCR,IAAIC,GAA8B,IAAIC,OAAO,IAAItgB,OAAO0N,EAAsB9I,OAAQ,GAClF2b,CAAAA,EAAAA,GAA4B,IAAID,OAAO,GAAGtgB,OAAO0N,EAAsB9I,OAAQ,IAAA,CA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ER,OAAnBgM,EADI+gB,GAAuBhoB,KAAK0F,CAAAA,EACrB,IAAgCuB,EAAK,EAChE,GAI6B,SAAgCvB,EAAGzK,GAExD,IADA,IA+2BkB/B,EA/2Bd6G,EAAQ,KACC,CACT,IAAI7G,EAAImuB,GAAY3hB,EAAGzK,GACvB,GAAUsH,KAAAA,IAANrJ,GAAmB2vB,GAAc3vB,CAAM4vB,GA62BrC,KADQ5vB,EA52B8CA,IA62B5CA,GAAK,IACnB,KAANA,GACM,IAALA,GAAeA,GAAK,IACf,KAANA,GACM,KAANA,GACM,KAANA,GACM,KAANA,GACM,KAANA,GACM,KAANA,GACM,IAALA,GAAeA,GAAK,IACf,IAALA,GAAeA,GAAK,IACf,IAALA,GAAeA,GAAK,IACf,IAALA,GAAeA,GAAK,IACf,KAANA,GACM,KAANA,GACM,KAANA,GACM,KAANA,GACM,KAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,KAALA,GAAeA,GAAK,KACf,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAANA,GACM,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,OAANA,GACM,OAANA,GACM,OAANA,GACM,MAALA,GAAeA,GAAK,MACf,OAANA,GACM,OAANA,GACM,OAANA,GACM,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,OAANA,GACM,OAANA,GACM,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,OAANA,GACM,OAANA,GACM,OAANA,GACM,MAALA,GAAeA,GAAK,MACf,OAANA,GACM,OAANA,GACM,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,OAANA,GACM,MAALA,GAAeA,GAAK,MACf,OAANA,GACM,MAALA,GAAeA,GAAK,MACf,OAANA,GACM,MAALA,GAAeA,GAAK,MACf,OAANA,GACM,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,OAANA,GACM,OAANA,GACM,OAANA,GACM,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,OAANA,GACM,OAANA,GACM,OAANA,GACM,OAANA,GACM,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,KACf,OAANA,GACM,OAANA,GACM,MAALA,GAAeA,GAAK,MACf,OAANA,GACM,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,OAANA,GACM,MAALA,GAAeA,GAAK,MACf,OAANA,GACM,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,MAALA,GAAeA,GAAK,MACf,OAANA,GACM,MAALA,GAAeA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,OAALA,GAAeA,GAAK,OACf,OAALA,GAAeA,GAAK,OACf,QAANA,GACM,QAANA,GACM,OAALA,GAAeA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,OAALA,GAAeA,GAAK,OACf,OAALA,GAAeA,GAAK,OACf,OAALA,GAAeA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,OAALA,GAAeA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,OAALA,GAAeA,GAAK,OACf,QAANA,GACM,QAANA,GACM,OAALA,GAAeA,GAAK,OACf,OAALA,GAAeA,GAAK,OACf,OAALA,GAAeA,GAAK,OACf,OAALA,GAAeA,GAAK,OACf,OAALA,GAAeA,GAAK,OACf,OAALA,GAAeA,GAAK,OACf,OAALA,GAAeA,GAAK,OACf,OAALA,GAAeA,GAAK,OACf,QAANA,GACM,OAALA,GAAeA,GAAK,OACf,OAALA,GAAeA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,OAALA,GAAeA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,OAALA,GAAeA,GAAK,OACf,QAANA,GACM,OAALA,GAAeA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,OAALA,GAAeA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,QAANA,GACM,OAALA,GAAeA,GAAK,OACf,QAANA,GACM,OAALA,GAAeA,GAAK,OACf,OAALA,GAAeA,GAAK,OACf,OAALA,GAAeA,GAAK,OACf,QAANA,GACM,QAANA,GACM,QAANA,GACM,OAALA,GAAeA,GAAK,OACf,OAALA,GAAeA,GAAK,OACf,QAANA,GACM,OAALA,GAAeA,GAAK,OACf,OAALA,GAAeA,GAAK,OACf,QAANA,GACM,Q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