`.\n */\nlet MatExpansionPanelTitle = /*#__PURE__*/(() => {\n class MatExpansionPanelTitle {\n static {\n this.ɵfac = function MatExpansionPanelTitle_Factory(t) {\n return new (t || MatExpansionPanelTitle)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatExpansionPanelTitle,\n selectors: [[\"mat-panel-title\"]],\n hostAttrs: [1, \"mat-expansion-panel-header-title\"],\n standalone: true\n });\n }\n }\n return MatExpansionPanelTitle;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Directive for a Material Design Accordion.\n */\nlet MatAccordion = /*#__PURE__*/(() => {\n class MatAccordion extends CdkAccordion {\n constructor() {\n super(...arguments);\n /** Headers belonging to this accordion. */\n this._ownHeaders = new QueryList();\n /** Whether the expansion indicator should be hidden. */\n this.hideToggle = false;\n /**\n * Display mode used for all expansion panels in the accordion. Currently two display\n * modes exist:\n * default - a gutter-like spacing is placed around any expanded panel, placing the expanded\n * panel at a different elevation from the rest of the accordion.\n * flat - no spacing is placed around expanded panels, showing all panels at the same\n * elevation.\n */\n this.displayMode = 'default';\n /** The position of the expansion indicator. */\n this.togglePosition = 'after';\n }\n ngAfterContentInit() {\n this._headers.changes.pipe(startWith(this._headers)).subscribe(headers => {\n this._ownHeaders.reset(headers.filter(header => header.panel.accordion === this));\n this._ownHeaders.notifyOnChanges();\n });\n this._keyManager = new FocusKeyManager(this._ownHeaders).withWrap().withHomeAndEnd();\n }\n /** Handles keyboard events coming in from the panel headers. */\n _handleHeaderKeydown(event) {\n this._keyManager.onKeydown(event);\n }\n _handleHeaderFocus(header) {\n this._keyManager.updateActiveItem(header);\n }\n ngOnDestroy() {\n super.ngOnDestroy();\n this._keyManager?.destroy();\n this._ownHeaders.destroy();\n }\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵMatAccordion_BaseFactory;\n return function MatAccordion_Factory(t) {\n return (ɵMatAccordion_BaseFactory || (ɵMatAccordion_BaseFactory = i0.ɵɵgetInheritedFactory(MatAccordion)))(t || MatAccordion);\n };\n })();\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatAccordion,\n selectors: [[\"mat-accordion\"]],\n contentQueries: function MatAccordion_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatExpansionPanelHeader, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._headers = _t);\n }\n },\n hostAttrs: [1, \"mat-accordion\"],\n hostVars: 2,\n hostBindings: function MatAccordion_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"mat-accordion-multi\", ctx.multi);\n }\n },\n inputs: {\n hideToggle: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"hideToggle\", \"hideToggle\", booleanAttribute],\n displayMode: \"displayMode\",\n togglePosition: \"togglePosition\"\n },\n exportAs: [\"matAccordion\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: MAT_ACCORDION,\n useExisting: MatAccordion\n }]), i0.ɵɵInputTransformsFeature, i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return MatAccordion;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatExpansionModule = /*#__PURE__*/(() => {\n class MatExpansionModule {\n static {\n this.ɵfac = function MatExpansionModule_Factory(t) {\n return new (t || MatExpansionModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MatExpansionModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [MatCommonModule, CdkAccordionModule, PortalModule]\n });\n }\n }\n return MatExpansionModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { EXPANSION_PANEL_ANIMATION_TIMING, MAT_ACCORDION, MAT_EXPANSION_PANEL, MAT_EXPANSION_PANEL_DEFAULT_OPTIONS, MatAccordion, MatExpansionModule, MatExpansionPanel, MatExpansionPanelActionRow, MatExpansionPanelContent, MatExpansionPanelDescription, MatExpansionPanelHeader, MatExpansionPanelTitle, matExpansionAnimations };\n","/**\n * marked v4.3.0 - a markdown parser\n * Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)\n * https://github.com/markedjs/marked\n */\n\n/**\n * DO NOT EDIT THIS FILE\n * The code in this file is generated from files in ./src/\n */\n\nfunction getDefaults() {\n return {\n async: false,\n baseUrl: null,\n breaks: false,\n extensions: null,\n gfm: true,\n headerIds: true,\n headerPrefix: '',\n highlight: null,\n hooks: null,\n langPrefix: 'language-',\n mangle: true,\n pedantic: false,\n renderer: null,\n sanitize: false,\n sanitizer: null,\n silent: false,\n smartypants: false,\n tokenizer: null,\n walkTokens: null,\n xhtml: false\n };\n}\nlet defaults = getDefaults();\nfunction changeDefaults(newDefaults) {\n defaults = newDefaults;\n}\n\n/**\n * Helpers\n */\nconst escapeTest = /[&<>\"']/;\nconst escapeReplace = new RegExp(escapeTest.source, 'g');\nconst escapeTestNoEncode = /[<>\"']|&(?!(#\\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\\w+);)/;\nconst escapeReplaceNoEncode = new RegExp(escapeTestNoEncode.source, 'g');\nconst escapeReplacements = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n};\nconst getEscapeReplacement = ch => escapeReplacements[ch];\nfunction escape(html, encode) {\n if (encode) {\n if (escapeTest.test(html)) {\n return html.replace(escapeReplace, getEscapeReplacement);\n }\n } else {\n if (escapeTestNoEncode.test(html)) {\n return html.replace(escapeReplaceNoEncode, getEscapeReplacement);\n }\n }\n return html;\n}\nconst unescapeTest = /&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig;\n\n/**\n * @param {string} html\n */\nfunction unescape(html) {\n // explicitly match decimal, hex, and named HTML entities\n return html.replace(unescapeTest, (_, n) => {\n n = n.toLowerCase();\n if (n === 'colon') return ':';\n if (n.charAt(0) === '#') {\n return n.charAt(1) === 'x' ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1));\n }\n return '';\n });\n}\nconst caret = /(^|[^\\[])\\^/g;\n\n/**\n * @param {string | RegExp} regex\n * @param {string} opt\n */\nfunction edit(regex, opt) {\n regex = typeof regex === 'string' ? regex : regex.source;\n opt = opt || '';\n const obj = {\n replace: (name, val) => {\n val = val.source || val;\n val = val.replace(caret, '$1');\n regex = regex.replace(name, val);\n return obj;\n },\n getRegex: () => {\n return new RegExp(regex, opt);\n }\n };\n return obj;\n}\nconst nonWordAndColonTest = /[^\\w:]/g;\nconst originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;\n\n/**\n * @param {boolean} sanitize\n * @param {string} base\n * @param {string} href\n */\nfunction cleanUrl(sanitize, base, href) {\n if (sanitize) {\n let prot;\n try {\n prot = decodeURIComponent(unescape(href)).replace(nonWordAndColonTest, '').toLowerCase();\n } catch (e) {\n return null;\n }\n if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) {\n return null;\n }\n }\n if (base && !originIndependentUrl.test(href)) {\n href = resolveUrl(base, href);\n }\n try {\n href = encodeURI(href).replace(/%25/g, '%');\n } catch (e) {\n return null;\n }\n return href;\n}\nconst baseUrls = {};\nconst justDomain = /^[^:]+:\\/*[^/]*$/;\nconst protocol = /^([^:]+:)[\\s\\S]*$/;\nconst domain = /^([^:]+:\\/*[^/]*)[\\s\\S]*$/;\n\n/**\n * @param {string} base\n * @param {string} href\n */\nfunction resolveUrl(base, href) {\n if (!baseUrls[' ' + base]) {\n // we can ignore everything in base after the last slash of its path component,\n // but we might need to add _that_\n // https://tools.ietf.org/html/rfc3986#section-3\n if (justDomain.test(base)) {\n baseUrls[' ' + base] = base + '/';\n } else {\n baseUrls[' ' + base] = rtrim(base, '/', true);\n }\n }\n base = baseUrls[' ' + base];\n const relativeBase = base.indexOf(':') === -1;\n if (href.substring(0, 2) === '//') {\n if (relativeBase) {\n return href;\n }\n return base.replace(protocol, '$1') + href;\n } else if (href.charAt(0) === '/') {\n if (relativeBase) {\n return href;\n }\n return base.replace(domain, '$1') + href;\n } else {\n return base + href;\n }\n}\nconst noopTest = {\n exec: function noopTest() {}\n};\nfunction splitCells(tableRow, count) {\n // ensure that every cell-delimiting pipe has a space\n // before it to distinguish it from an escaped pipe\n const row = tableRow.replace(/\\|/g, (match, offset, str) => {\n let escaped = false,\n curr = offset;\n while (--curr >= 0 && str[curr] === '\\\\') escaped = !escaped;\n if (escaped) {\n // odd number of slashes means | is escaped\n // so we leave it alone\n return '|';\n } else {\n // add space before unescaped |\n return ' |';\n }\n }),\n cells = row.split(/ \\|/);\n let i = 0;\n\n // First/last cell in a row cannot be empty if it has no leading/trailing pipe\n if (!cells[0].trim()) {\n cells.shift();\n }\n if (cells.length > 0 && !cells[cells.length - 1].trim()) {\n cells.pop();\n }\n if (cells.length > count) {\n cells.splice(count);\n } else {\n while (cells.length < count) cells.push('');\n }\n for (; i < cells.length; i++) {\n // leading or trailing whitespace is ignored per the gfm spec\n cells[i] = cells[i].trim().replace(/\\\\\\|/g, '|');\n }\n return cells;\n}\n\n/**\n * Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').\n * /c*$/ is vulnerable to REDOS.\n *\n * @param {string} str\n * @param {string} c\n * @param {boolean} invert Remove suffix of non-c chars instead. Default falsey.\n */\nfunction rtrim(str, c, invert) {\n const l = str.length;\n if (l === 0) {\n return '';\n }\n\n // Length of suffix matching the invert condition.\n let suffLen = 0;\n\n // Step left until we fail to match the invert condition.\n while (suffLen < l) {\n const currChar = str.charAt(l - suffLen - 1);\n if (currChar === c && !invert) {\n suffLen++;\n } else if (currChar !== c && invert) {\n suffLen++;\n } else {\n break;\n }\n }\n return str.slice(0, l - suffLen);\n}\nfunction findClosingBracket(str, b) {\n if (str.indexOf(b[1]) === -1) {\n return -1;\n }\n const l = str.length;\n let level = 0,\n i = 0;\n for (; i < l; i++) {\n if (str[i] === '\\\\') {\n i++;\n } else if (str[i] === b[0]) {\n level++;\n } else if (str[i] === b[1]) {\n level--;\n if (level < 0) {\n return i;\n }\n }\n }\n return -1;\n}\nfunction checkSanitizeDeprecation(opt) {\n if (opt && opt.sanitize && !opt.silent) {\n console.warn('marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options');\n }\n}\n\n// copied from https://stackoverflow.com/a/5450113/806777\n/**\n * @param {string} pattern\n * @param {number} count\n */\nfunction repeatString(pattern, count) {\n if (count < 1) {\n return '';\n }\n let result = '';\n while (count > 1) {\n if (count & 1) {\n result += pattern;\n }\n count >>= 1;\n pattern += pattern;\n }\n return result + pattern;\n}\nfunction outputLink(cap, link, raw, lexer) {\n const href = link.href;\n const title = link.title ? escape(link.title) : null;\n const text = cap[1].replace(/\\\\([\\[\\]])/g, '$1');\n if (cap[0].charAt(0) !== '!') {\n lexer.state.inLink = true;\n const token = {\n type: 'link',\n raw,\n href,\n title,\n text,\n tokens: lexer.inlineTokens(text)\n };\n lexer.state.inLink = false;\n return token;\n }\n return {\n type: 'image',\n raw,\n href,\n title,\n text: escape(text)\n };\n}\nfunction indentCodeCompensation(raw, text) {\n const matchIndentToCode = raw.match(/^(\\s+)(?:```)/);\n if (matchIndentToCode === null) {\n return text;\n }\n const indentToCode = matchIndentToCode[1];\n return text.split('\\n').map(node => {\n const matchIndentInNode = node.match(/^\\s+/);\n if (matchIndentInNode === null) {\n return node;\n }\n const [indentInNode] = matchIndentInNode;\n if (indentInNode.length >= indentToCode.length) {\n return node.slice(indentToCode.length);\n }\n return node;\n }).join('\\n');\n}\n\n/**\n * Tokenizer\n */\nclass Tokenizer {\n constructor(options) {\n this.options = options || defaults;\n }\n space(src) {\n const cap = this.rules.block.newline.exec(src);\n if (cap && cap[0].length > 0) {\n return {\n type: 'space',\n raw: cap[0]\n };\n }\n }\n code(src) {\n const cap = this.rules.block.code.exec(src);\n if (cap) {\n const text = cap[0].replace(/^ {1,4}/gm, '');\n return {\n type: 'code',\n raw: cap[0],\n codeBlockStyle: 'indented',\n text: !this.options.pedantic ? rtrim(text, '\\n') : text\n };\n }\n }\n fences(src) {\n const cap = this.rules.block.fences.exec(src);\n if (cap) {\n const raw = cap[0];\n const text = indentCodeCompensation(raw, cap[3] || '');\n return {\n type: 'code',\n raw,\n lang: cap[2] ? cap[2].trim().replace(this.rules.inline._escapes, '$1') : cap[2],\n text\n };\n }\n }\n heading(src) {\n const cap = this.rules.block.heading.exec(src);\n if (cap) {\n let text = cap[2].trim();\n\n // remove trailing #s\n if (/#$/.test(text)) {\n const trimmed = rtrim(text, '#');\n if (this.options.pedantic) {\n text = trimmed.trim();\n } else if (!trimmed || / $/.test(trimmed)) {\n // CommonMark requires space before trailing #s\n text = trimmed.trim();\n }\n }\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[1].length,\n text,\n tokens: this.lexer.inline(text)\n };\n }\n }\n hr(src) {\n const cap = this.rules.block.hr.exec(src);\n if (cap) {\n return {\n type: 'hr',\n raw: cap[0]\n };\n }\n }\n blockquote(src) {\n const cap = this.rules.block.blockquote.exec(src);\n if (cap) {\n const text = cap[0].replace(/^ *>[ \\t]?/gm, '');\n const top = this.lexer.state.top;\n this.lexer.state.top = true;\n const tokens = this.lexer.blockTokens(text);\n this.lexer.state.top = top;\n return {\n type: 'blockquote',\n raw: cap[0],\n tokens,\n text\n };\n }\n }\n list(src) {\n let cap = this.rules.block.list.exec(src);\n if (cap) {\n let raw, istask, ischecked, indent, i, blankLine, endsWithBlankLine, line, nextLine, rawLine, itemContents, endEarly;\n let bull = cap[1].trim();\n const isordered = bull.length > 1;\n const list = {\n type: 'list',\n raw: '',\n ordered: isordered,\n start: isordered ? +bull.slice(0, -1) : '',\n loose: false,\n items: []\n };\n bull = isordered ? `\\\\d{1,9}\\\\${bull.slice(-1)}` : `\\\\${bull}`;\n if (this.options.pedantic) {\n bull = isordered ? bull : '[*+-]';\n }\n\n // Get next list item\n const itemRegex = new RegExp(`^( {0,3}${bull})((?:[\\t ][^\\\\n]*)?(?:\\\\n|$))`);\n\n // Check if current bullet point can start a new List Item\n while (src) {\n endEarly = false;\n if (!(cap = itemRegex.exec(src))) {\n break;\n }\n if (this.rules.block.hr.test(src)) {\n // End list if bullet was actually HR (possibly move into itemRegex?)\n break;\n }\n raw = cap[0];\n src = src.substring(raw.length);\n line = cap[2].split('\\n', 1)[0].replace(/^\\t+/, t => ' '.repeat(3 * t.length));\n nextLine = src.split('\\n', 1)[0];\n if (this.options.pedantic) {\n indent = 2;\n itemContents = line.trimLeft();\n } else {\n indent = cap[2].search(/[^ ]/); // Find first non-space char\n indent = indent > 4 ? 1 : indent; // Treat indented code blocks (> 4 spaces) as having only 1 indent\n itemContents = line.slice(indent);\n indent += cap[1].length;\n }\n blankLine = false;\n if (!line && /^ *$/.test(nextLine)) {\n // Items begin with at most one blank line\n raw += nextLine + '\\n';\n src = src.substring(nextLine.length + 1);\n endEarly = true;\n }\n if (!endEarly) {\n const nextBulletRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:[*+-]|\\\\d{1,9}[.)])((?:[ \\t][^\\\\n]*)?(?:\\\\n|$))`);\n const hrRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$)`);\n const fencesBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}(?:\\`\\`\\`|~~~)`);\n const headingBeginRegex = new RegExp(`^ {0,${Math.min(3, indent - 1)}}#`);\n\n // Check if following lines should be included in List Item\n while (src) {\n rawLine = src.split('\\n', 1)[0];\n nextLine = rawLine;\n\n // Re-align to follow commonmark nesting rules\n if (this.options.pedantic) {\n nextLine = nextLine.replace(/^ {1,4}(?=( {4})*[^ ])/g, ' ');\n }\n\n // End list item if found code fences\n if (fencesBeginRegex.test(nextLine)) {\n break;\n }\n\n // End list item if found start of new heading\n if (headingBeginRegex.test(nextLine)) {\n break;\n }\n\n // End list item if found start of new bullet\n if (nextBulletRegex.test(nextLine)) {\n break;\n }\n\n // Horizontal rule found\n if (hrRegex.test(src)) {\n break;\n }\n if (nextLine.search(/[^ ]/) >= indent || !nextLine.trim()) {\n // Dedent if possible\n itemContents += '\\n' + nextLine.slice(indent);\n } else {\n // not enough indentation\n if (blankLine) {\n break;\n }\n\n // paragraph continuation unless last line was a different block level element\n if (line.search(/[^ ]/) >= 4) {\n // indented code block\n break;\n }\n if (fencesBeginRegex.test(line)) {\n break;\n }\n if (headingBeginRegex.test(line)) {\n break;\n }\n if (hrRegex.test(line)) {\n break;\n }\n itemContents += '\\n' + nextLine;\n }\n if (!blankLine && !nextLine.trim()) {\n // Check if current line is blank\n blankLine = true;\n }\n raw += rawLine + '\\n';\n src = src.substring(rawLine.length + 1);\n line = nextLine.slice(indent);\n }\n }\n if (!list.loose) {\n // If the previous item ended with a blank line, the list is loose\n if (endsWithBlankLine) {\n list.loose = true;\n } else if (/\\n *\\n *$/.test(raw)) {\n endsWithBlankLine = true;\n }\n }\n\n // Check for task list items\n if (this.options.gfm) {\n istask = /^\\[[ xX]\\] /.exec(itemContents);\n if (istask) {\n ischecked = istask[0] !== '[ ] ';\n itemContents = itemContents.replace(/^\\[[ xX]\\] +/, '');\n }\n }\n list.items.push({\n type: 'list_item',\n raw,\n task: !!istask,\n checked: ischecked,\n loose: false,\n text: itemContents\n });\n list.raw += raw;\n }\n\n // Do not consume newlines at end of final item. Alternatively, make itemRegex *start* with any newlines to simplify/speed up endsWithBlankLine logic\n list.items[list.items.length - 1].raw = raw.trimRight();\n list.items[list.items.length - 1].text = itemContents.trimRight();\n list.raw = list.raw.trimRight();\n const l = list.items.length;\n\n // Item child tokens handled here at end because we needed to have the final item to trim it first\n for (i = 0; i < l; i++) {\n this.lexer.state.top = false;\n list.items[i].tokens = this.lexer.blockTokens(list.items[i].text, []);\n if (!list.loose) {\n // Check if list should be loose\n const spacers = list.items[i].tokens.filter(t => t.type === 'space');\n const hasMultipleLineBreaks = spacers.length > 0 && spacers.some(t => /\\n.*\\n/.test(t.raw));\n list.loose = hasMultipleLineBreaks;\n }\n }\n\n // Set all items to loose if list is loose\n if (list.loose) {\n for (i = 0; i < l; i++) {\n list.items[i].loose = true;\n }\n }\n return list;\n }\n }\n html(src) {\n const cap = this.rules.block.html.exec(src);\n if (cap) {\n const token = {\n type: 'html',\n raw: cap[0],\n pre: !this.options.sanitizer && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),\n text: cap[0]\n };\n if (this.options.sanitize) {\n const text = this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]);\n token.type = 'paragraph';\n token.text = text;\n token.tokens = this.lexer.inline(text);\n }\n return token;\n }\n }\n def(src) {\n const cap = this.rules.block.def.exec(src);\n if (cap) {\n const tag = cap[1].toLowerCase().replace(/\\s+/g, ' ');\n const href = cap[2] ? cap[2].replace(/^<(.*)>$/, '$1').replace(this.rules.inline._escapes, '$1') : '';\n const title = cap[3] ? cap[3].substring(1, cap[3].length - 1).replace(this.rules.inline._escapes, '$1') : cap[3];\n return {\n type: 'def',\n tag,\n raw: cap[0],\n href,\n title\n };\n }\n }\n table(src) {\n const cap = this.rules.block.table.exec(src);\n if (cap) {\n const item = {\n type: 'table',\n header: splitCells(cap[1]).map(c => {\n return {\n text: c\n };\n }),\n align: cap[2].replace(/^ *|\\| *$/g, '').split(/ *\\| */),\n rows: cap[3] && cap[3].trim() ? cap[3].replace(/\\n[ \\t]*$/, '').split('\\n') : []\n };\n if (item.header.length === item.align.length) {\n item.raw = cap[0];\n let l = item.align.length;\n let i, j, k, row;\n for (i = 0; i < l; i++) {\n if (/^ *-+: *$/.test(item.align[i])) {\n item.align[i] = 'right';\n } else if (/^ *:-+: *$/.test(item.align[i])) {\n item.align[i] = 'center';\n } else if (/^ *:-+ *$/.test(item.align[i])) {\n item.align[i] = 'left';\n } else {\n item.align[i] = null;\n }\n }\n l = item.rows.length;\n for (i = 0; i < l; i++) {\n item.rows[i] = splitCells(item.rows[i], item.header.length).map(c => {\n return {\n text: c\n };\n });\n }\n\n // parse child tokens inside headers and cells\n\n // header child tokens\n l = item.header.length;\n for (j = 0; j < l; j++) {\n item.header[j].tokens = this.lexer.inline(item.header[j].text);\n }\n\n // cell child tokens\n l = item.rows.length;\n for (j = 0; j < l; j++) {\n row = item.rows[j];\n for (k = 0; k < row.length; k++) {\n row[k].tokens = this.lexer.inline(row[k].text);\n }\n }\n return item;\n }\n }\n }\n lheading(src) {\n const cap = this.rules.block.lheading.exec(src);\n if (cap) {\n return {\n type: 'heading',\n raw: cap[0],\n depth: cap[2].charAt(0) === '=' ? 1 : 2,\n text: cap[1],\n tokens: this.lexer.inline(cap[1])\n };\n }\n }\n paragraph(src) {\n const cap = this.rules.block.paragraph.exec(src);\n if (cap) {\n const text = cap[1].charAt(cap[1].length - 1) === '\\n' ? cap[1].slice(0, -1) : cap[1];\n return {\n type: 'paragraph',\n raw: cap[0],\n text,\n tokens: this.lexer.inline(text)\n };\n }\n }\n text(src) {\n const cap = this.rules.block.text.exec(src);\n if (cap) {\n return {\n type: 'text',\n raw: cap[0],\n text: cap[0],\n tokens: this.lexer.inline(cap[0])\n };\n }\n }\n escape(src) {\n const cap = this.rules.inline.escape.exec(src);\n if (cap) {\n return {\n type: 'escape',\n raw: cap[0],\n text: escape(cap[1])\n };\n }\n }\n tag(src) {\n const cap = this.rules.inline.tag.exec(src);\n if (cap) {\n if (!this.lexer.state.inLink && /^/i.test(cap[0])) {\n this.lexer.state.inLink = false;\n }\n if (!this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n this.lexer.state.inRawBlock = true;\n } else if (this.lexer.state.inRawBlock && /^<\\/(pre|code|kbd|script)(\\s|>)/i.test(cap[0])) {\n this.lexer.state.inRawBlock = false;\n }\n return {\n type: this.options.sanitize ? 'text' : 'html',\n raw: cap[0],\n inLink: this.lexer.state.inLink,\n inRawBlock: this.lexer.state.inRawBlock,\n text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]) : cap[0]\n };\n }\n }\n link(src) {\n const cap = this.rules.inline.link.exec(src);\n if (cap) {\n const trimmedUrl = cap[2].trim();\n if (!this.options.pedantic && /^$/.test(trimmedUrl)) {\n return;\n }\n\n // ending angle bracket cannot be escaped\n const rtrimSlash = rtrim(trimmedUrl.slice(0, -1), '\\\\');\n if ((trimmedUrl.length - rtrimSlash.length) % 2 === 0) {\n return;\n }\n } else {\n // find closing parenthesis\n const lastParenIndex = findClosingBracket(cap[2], '()');\n if (lastParenIndex > -1) {\n const start = cap[0].indexOf('!') === 0 ? 5 : 4;\n const linkLen = start + cap[1].length + lastParenIndex;\n cap[2] = cap[2].substring(0, lastParenIndex);\n cap[0] = cap[0].substring(0, linkLen).trim();\n cap[3] = '';\n }\n }\n let href = cap[2];\n let title = '';\n if (this.options.pedantic) {\n // split pedantic href and title\n const link = /^([^'\"]*[^\\s])\\s+(['\"])(.*)\\2/.exec(href);\n if (link) {\n href = link[1];\n title = link[3];\n }\n } else {\n title = cap[3] ? cap[3].slice(1, -1) : '';\n }\n href = href.trim();\n if (/^$/.test(trimmedUrl)) {\n // pedantic allows starting angle bracket without ending angle bracket\n href = href.slice(1);\n } else {\n href = href.slice(1, -1);\n }\n }\n return outputLink(cap, {\n href: href ? href.replace(this.rules.inline._escapes, '$1') : href,\n title: title ? title.replace(this.rules.inline._escapes, '$1') : title\n }, cap[0], this.lexer);\n }\n }\n reflink(src, links) {\n let cap;\n if ((cap = this.rules.inline.reflink.exec(src)) || (cap = this.rules.inline.nolink.exec(src))) {\n let link = (cap[2] || cap[1]).replace(/\\s+/g, ' ');\n link = links[link.toLowerCase()];\n if (!link) {\n const text = cap[0].charAt(0);\n return {\n type: 'text',\n raw: text,\n text\n };\n }\n return outputLink(cap, link, cap[0], this.lexer);\n }\n }\n emStrong(src, maskedSrc, prevChar = '') {\n let match = this.rules.inline.emStrong.lDelim.exec(src);\n if (!match) return;\n\n // _ can't be between two alphanumerics. \\p{L}\\p{N} includes non-english alphabet/numbers as well\n if (match[3] && prevChar.match(/[\\p{L}\\p{N}]/u)) return;\n const nextChar = match[1] || match[2] || '';\n if (!nextChar || nextChar && (prevChar === '' || this.rules.inline.punctuation.exec(prevChar))) {\n const lLength = match[0].length - 1;\n let rDelim,\n rLength,\n delimTotal = lLength,\n midDelimTotal = 0;\n const endReg = match[0][0] === '*' ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;\n endReg.lastIndex = 0;\n\n // Clip maskedSrc to same section of string as src (move to lexer?)\n maskedSrc = maskedSrc.slice(-1 * src.length + lLength);\n while ((match = endReg.exec(maskedSrc)) != null) {\n rDelim = match[1] || match[2] || match[3] || match[4] || match[5] || match[6];\n if (!rDelim) continue; // skip single * in __abc*abc__\n\n rLength = rDelim.length;\n if (match[3] || match[4]) {\n // found another Left Delim\n delimTotal += rLength;\n continue;\n } else if (match[5] || match[6]) {\n // either Left or Right Delim\n if (lLength % 3 && !((lLength + rLength) % 3)) {\n midDelimTotal += rLength;\n continue; // CommonMark Emphasis Rules 9-10\n }\n }\n delimTotal -= rLength;\n if (delimTotal > 0) continue; // Haven't found enough closing delimiters\n\n // Remove extra characters. *a*** -> *a*\n rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);\n const raw = src.slice(0, lLength + match.index + (match[0].length - rDelim.length) + rLength);\n\n // Create `em` if smallest delimiter has odd char count. *a***\n if (Math.min(lLength, rLength) % 2) {\n const text = raw.slice(1, -1);\n return {\n type: 'em',\n raw,\n text,\n tokens: this.lexer.inlineTokens(text)\n };\n }\n\n // Create 'strong' if smallest delimiter has even char count. **a***\n const text = raw.slice(2, -2);\n return {\n type: 'strong',\n raw,\n text,\n tokens: this.lexer.inlineTokens(text)\n };\n }\n }\n }\n codespan(src) {\n const cap = this.rules.inline.code.exec(src);\n if (cap) {\n let text = cap[2].replace(/\\n/g, ' ');\n const hasNonSpaceChars = /[^ ]/.test(text);\n const hasSpaceCharsOnBothEnds = /^ /.test(text) && / $/.test(text);\n if (hasNonSpaceChars && hasSpaceCharsOnBothEnds) {\n text = text.substring(1, text.length - 1);\n }\n text = escape(text, true);\n return {\n type: 'codespan',\n raw: cap[0],\n text\n };\n }\n }\n br(src) {\n const cap = this.rules.inline.br.exec(src);\n if (cap) {\n return {\n type: 'br',\n raw: cap[0]\n };\n }\n }\n del(src) {\n const cap = this.rules.inline.del.exec(src);\n if (cap) {\n return {\n type: 'del',\n raw: cap[0],\n text: cap[2],\n tokens: this.lexer.inlineTokens(cap[2])\n };\n }\n }\n autolink(src, mangle) {\n const cap = this.rules.inline.autolink.exec(src);\n if (cap) {\n let text, href;\n if (cap[2] === '@') {\n text = escape(this.options.mangle ? mangle(cap[1]) : cap[1]);\n href = 'mailto:' + text;\n } else {\n text = escape(cap[1]);\n href = text;\n }\n return {\n type: 'link',\n raw: cap[0],\n text,\n href,\n tokens: [{\n type: 'text',\n raw: text,\n text\n }]\n };\n }\n }\n url(src, mangle) {\n let cap;\n if (cap = this.rules.inline.url.exec(src)) {\n let text, href;\n if (cap[2] === '@') {\n text = escape(this.options.mangle ? mangle(cap[0]) : cap[0]);\n href = 'mailto:' + text;\n } else {\n // do extended autolink path validation\n let prevCapZero;\n do {\n prevCapZero = cap[0];\n cap[0] = this.rules.inline._backpedal.exec(cap[0])[0];\n } while (prevCapZero !== cap[0]);\n text = escape(cap[0]);\n if (cap[1] === 'www.') {\n href = 'http://' + cap[0];\n } else {\n href = cap[0];\n }\n }\n return {\n type: 'link',\n raw: cap[0],\n text,\n href,\n tokens: [{\n type: 'text',\n raw: text,\n text\n }]\n };\n }\n }\n inlineText(src, smartypants) {\n const cap = this.rules.inline.text.exec(src);\n if (cap) {\n let text;\n if (this.lexer.state.inRawBlock) {\n text = this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]) : cap[0];\n } else {\n text = escape(this.options.smartypants ? smartypants(cap[0]) : cap[0]);\n }\n return {\n type: 'text',\n raw: cap[0],\n text\n };\n }\n }\n}\n\n/**\n * Block-Level Grammar\n */\nconst block = {\n newline: /^(?: *(?:\\n|$))+/,\n code: /^( {4}[^\\n]+(?:\\n(?: *(?:\\n|$))*)?)+/,\n fences: /^ {0,3}(`{3,}(?=[^`\\n]*(?:\\n|$))|~{3,})([^\\n]*)(?:\\n|$)(?:|([\\s\\S]*?)(?:\\n|$))(?: {0,3}\\1[~`]* *(?=\\n|$)|$)/,\n hr: /^ {0,3}((?:-[\\t ]*){3,}|(?:_[ \\t]*){3,}|(?:\\*[ \\t]*){3,})(?:\\n+|$)/,\n heading: /^ {0,3}(#{1,6})(?=\\s|$)(.*)(?:\\n+|$)/,\n blockquote: /^( {0,3}> ?(paragraph|[^\\n]*)(?:\\n|$))+/,\n list: /^( {0,3}bull)([ \\t][^\\n]+?)?(?:\\n|$)/,\n html: '^ {0,3}(?:' // optional indentation\n + '<(script|pre|style|textarea)[\\\\s>][\\\\s\\\\S]*?(?:\\\\1>[^\\\\n]*\\\\n+|$)' // (1)\n + '|comment[^\\\\n]*(\\\\n+|$)' // (2)\n + '|<\\\\?[\\\\s\\\\S]*?(?:\\\\?>\\\\n*|$)' // (3)\n + '|\\\\n*|$)' // (4)\n + '|\\\\n*|$)' // (5)\n + '|?(tag)(?: +|\\\\n|/?>)[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (6)\n + '|<(?!script|pre|style|textarea)([a-z][\\\\w-]*)(?:attribute)*? */?>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) open tag\n + '|(?!script|pre|style|textarea)[a-z][\\\\w-]*\\\\s*>(?=[ \\\\t]*(?:\\\\n|$))[\\\\s\\\\S]*?(?:(?:\\\\n *)+\\\\n|$)' // (7) closing tag\n + ')',\n def: /^ {0,3}\\[(label)\\]: *(?:\\n *)?([^<\\s][^\\s]*|<.*?>)(?:(?: +(?:\\n *)?| *\\n *)(title))? *(?:\\n+|$)/,\n table: noopTest,\n lheading: /^((?:.|\\n(?!\\n))+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n // regex template, placeholders will be replaced according to different paragraph\n // interruption rules of commonmark and the original markdown spec:\n _paragraph: /^([^\\n]+(?:\\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\\n)[^\\n]+)*)/,\n text: /^[^\\n]+/\n};\nblock._label = /(?!\\s*\\])(?:\\\\.|[^\\[\\]\\\\])+/;\nblock._title = /(?:\"(?:\\\\\"?|[^\"\\\\])*\"|'[^'\\n]*(?:\\n[^'\\n]+)*\\n?'|\\([^()]*\\))/;\nblock.def = edit(block.def).replace('label', block._label).replace('title', block._title).getRegex();\nblock.bullet = /(?:[*+-]|\\d{1,9}[.)])/;\nblock.listItemStart = edit(/^( *)(bull) */).replace('bull', block.bullet).getRegex();\nblock.list = edit(block.list).replace(/bull/g, block.bullet).replace('hr', '\\\\n+(?=\\\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\\\* *){3,})(?:\\\\n+|$))').replace('def', '\\\\n+(?=' + block.def.source + ')').getRegex();\nblock._tag = 'address|article|aside|base|basefont|blockquote|body|caption' + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption' + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe' + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option' + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr' + '|track|ul';\nblock._comment = /|$)/;\nblock.html = edit(block.html, 'i').replace('comment', block._comment).replace('tag', block._tag).replace('attribute', / +[a-zA-Z:_][\\w.:-]*(?: *= *\"[^\"\\n]*\"| *= *'[^'\\n]*'| *= *[^\\s\"'=<>`]+)?/).getRegex();\nblock.paragraph = edit(block._paragraph).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs\n.replace('|table', '').replace('blockquote', ' {0,3}>').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n.replace('html', '?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)').replace('tag', block._tag) // pars can be interrupted by type (6) html blocks\n.getRegex();\nblock.blockquote = edit(block.blockquote).replace('paragraph', block.paragraph).getRegex();\n\n/**\n * Normal Block Grammar\n */\n\nblock.normal = {\n ...block\n};\n\n/**\n * GFM Block Grammar\n */\n\nblock.gfm = {\n ...block.normal,\n table: '^ *([^\\\\n ].*\\\\|.*)\\\\n' // Header\n + ' {0,3}(?:\\\\| *)?(:?-+:? *(?:\\\\| *:?-+:? *)*)(?:\\\\| *)?' // Align\n + '(?:\\\\n((?:(?! *\\\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\\\n|$))*)\\\\n*|$)' // Cells\n};\nblock.gfm.table = edit(block.gfm.table).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n.replace('html', '?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)').replace('tag', block._tag) // tables can be interrupted by type (6) html blocks\n.getRegex();\nblock.gfm.paragraph = edit(block._paragraph).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs\n.replace('table', block.gfm.table) // interrupt paragraphs with table\n.replace('blockquote', ' {0,3}>').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\\\n]*\\\\n)|~{3,})[^\\\\n]*\\\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt\n.replace('html', '?(?:tag)(?: +|\\\\n|/?>)|<(?:script|pre|style|textarea|!--)').replace('tag', block._tag) // pars can be interrupted by type (6) html blocks\n.getRegex();\n/**\n * Pedantic grammar (original John Gruber's loose markdown specification)\n */\n\nblock.pedantic = {\n ...block.normal,\n html: edit('^ *(?:comment *(?:\\\\n|\\\\s*$)' + '|<(tag)[\\\\s\\\\S]+?\\\\1> *(?:\\\\n{2,}|\\\\s*$)' // closed tag\n + '| \\\\s]*)*?/?> *(?:\\\\n{2,}|\\\\s*$))').replace('comment', block._comment).replace(/tag/g, '(?!(?:' + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub' + '|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)' + '\\\\b)\\\\w+(?!:|[^\\\\w\\\\s@]*@)\\\\b').getRegex(),\n def: /^ *\\[([^\\]]+)\\]: *([^\\s>]+)>?(?: +([\"(][^\\n]+[\")]))? *(?:\\n+|$)/,\n heading: /^(#{1,6})(.*)(?:\\n+|$)/,\n fences: noopTest,\n // fences not supported\n lheading: /^(.+?)\\n {0,3}(=+|-+) *(?:\\n+|$)/,\n paragraph: edit(block.normal._paragraph).replace('hr', block.hr).replace('heading', ' *#{1,6} *[^\\n]').replace('lheading', block.lheading).replace('blockquote', ' {0,3}>').replace('|fences', '').replace('|list', '').replace('|html', '').getRegex()\n};\n\n/**\n * Inline-Level Grammar\n */\nconst inline = {\n escape: /^\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/,\n autolink: /^<(scheme:[^\\s\\x00-\\x1f<>]*|email)>/,\n url: noopTest,\n tag: '^comment' + '|^[a-zA-Z][\\\\w:-]*\\\\s*>' // self-closing tag\n + '|^<[a-zA-Z][\\\\w-]*(?:attribute)*?\\\\s*/?>' // open tag\n + '|^<\\\\?[\\\\s\\\\S]*?\\\\?>' // processing instruction, e.g. \n + '|^' // declaration, e.g. \n + '|^',\n // CDATA section\n link: /^!?\\[(label)\\]\\(\\s*(href)(?:\\s+(title))?\\s*\\)/,\n reflink: /^!?\\[(label)\\]\\[(ref)\\]/,\n nolink: /^!?\\[(ref)\\](?:\\[\\])?/,\n reflinkSearch: 'reflink|nolink(?!\\\\()',\n emStrong: {\n lDelim: /^(?:\\*+(?:([punct_])|[^\\s*]))|^_+(?:([punct*])|([^\\s_]))/,\n // (1) and (2) can only be a Right Delimiter. (3) and (4) can only be Left. (5) and (6) can be either Left or Right.\n // () Skip orphan inside strong () Consume to delim (1) #*** (2) a***#, a*** (3) #***a, ***a (4) ***# (5) #***# (6) a***a\n rDelimAst: /^(?:[^_*\\\\]|\\\\.)*?\\_\\_(?:[^_*\\\\]|\\\\.)*?\\*(?:[^_*\\\\]|\\\\.)*?(?=\\_\\_)|(?:[^*\\\\]|\\\\.)+(?=[^*])|[punct_](\\*+)(?=[\\s]|$)|(?:[^punct*_\\s\\\\]|\\\\.)(\\*+)(?=[punct_\\s]|$)|[punct_\\s](\\*+)(?=[^punct*_\\s])|[\\s](\\*+)(?=[punct_])|[punct_](\\*+)(?=[punct_])|(?:[^punct*_\\s\\\\]|\\\\.)(\\*+)(?=[^punct*_\\s])/,\n rDelimUnd: /^(?:[^_*\\\\]|\\\\.)*?\\*\\*(?:[^_*\\\\]|\\\\.)*?\\_(?:[^_*\\\\]|\\\\.)*?(?=\\*\\*)|(?:[^_\\\\]|\\\\.)+(?=[^_])|[punct*](\\_+)(?=[\\s]|$)|(?:[^punct*_\\s\\\\]|\\\\.)(\\_+)(?=[punct*\\s]|$)|[punct*\\s](\\_+)(?=[^punct*_\\s])|[\\s](\\_+)(?=[punct*])|[punct*](\\_+)(?=[punct*])/ // ^- Not allowed for _\n },\n code: /^(`+)([^`]|[^`][\\s\\S]*?[^`])\\1(?!`)/,\n br: /^( {2,}|\\\\)\\n(?!\\s*$)/,\n del: noopTest,\n text: /^(`+|[^`])(?:(?= {2,}\\n)|[\\s\\S]*?(?:(?=[\\\\?@\\\\[\\\\]`^{|}~';\ninline.punctuation = edit(inline.punctuation).replace(/punctuation/g, inline._punctuation).getRegex();\n\n// sequences em should skip over [title](link), `code`, \ninline.blockSkip = /\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>/g;\n// lookbehind is not available on Safari as of version 16\n// inline.escapedEmSt = /(?<=(?:^|[^\\\\)(?:\\\\[^])*)\\\\[*_]/g;\ninline.escapedEmSt = /(?:^|[^\\\\])(?:\\\\\\\\)*\\\\[*_]/g;\ninline._comment = edit(block._comment).replace('(?:-->|$)', '-->').getRegex();\ninline.emStrong.lDelim = edit(inline.emStrong.lDelim).replace(/punct/g, inline._punctuation).getRegex();\ninline.emStrong.rDelimAst = edit(inline.emStrong.rDelimAst, 'g').replace(/punct/g, inline._punctuation).getRegex();\ninline.emStrong.rDelimUnd = edit(inline.emStrong.rDelimUnd, 'g').replace(/punct/g, inline._punctuation).getRegex();\ninline._escapes = /\\\\([!\"#$%&'()*+,\\-./:;<=>?@\\[\\]\\\\^_`{|}~])/g;\ninline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;\ninline._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;\ninline.autolink = edit(inline.autolink).replace('scheme', inline._scheme).replace('email', inline._email).getRegex();\ninline._attribute = /\\s+[a-zA-Z:_][\\w.:-]*(?:\\s*=\\s*\"[^\"]*\"|\\s*=\\s*'[^']*'|\\s*=\\s*[^\\s\"'=<>`]+)?/;\ninline.tag = edit(inline.tag).replace('comment', inline._comment).replace('attribute', inline._attribute).getRegex();\ninline._label = /(?:\\[(?:\\\\.|[^\\[\\]\\\\])*\\]|\\\\.|`[^`]*`|[^\\[\\]\\\\`])*?/;\ninline._href = /<(?:\\\\.|[^\\n<>\\\\])+>|[^\\s\\x00-\\x1f]*/;\ninline._title = /\"(?:\\\\\"?|[^\"\\\\])*\"|'(?:\\\\'?|[^'\\\\])*'|\\((?:\\\\\\)?|[^)\\\\])*\\)/;\ninline.link = edit(inline.link).replace('label', inline._label).replace('href', inline._href).replace('title', inline._title).getRegex();\ninline.reflink = edit(inline.reflink).replace('label', inline._label).replace('ref', block._label).getRegex();\ninline.nolink = edit(inline.nolink).replace('ref', block._label).getRegex();\ninline.reflinkSearch = edit(inline.reflinkSearch, 'g').replace('reflink', inline.reflink).replace('nolink', inline.nolink).getRegex();\n\n/**\n * Normal Inline Grammar\n */\n\ninline.normal = {\n ...inline\n};\n\n/**\n * Pedantic Inline Grammar\n */\n\ninline.pedantic = {\n ...inline.normal,\n strong: {\n start: /^__|\\*\\*/,\n middle: /^__(?=\\S)([\\s\\S]*?\\S)__(?!_)|^\\*\\*(?=\\S)([\\s\\S]*?\\S)\\*\\*(?!\\*)/,\n endAst: /\\*\\*(?!\\*)/g,\n endUnd: /__(?!_)/g\n },\n em: {\n start: /^_|\\*/,\n middle: /^()\\*(?=\\S)([\\s\\S]*?\\S)\\*(?!\\*)|^_(?=\\S)([\\s\\S]*?\\S)_(?!_)/,\n endAst: /\\*(?!\\*)/g,\n endUnd: /_(?!_)/g\n },\n link: edit(/^!?\\[(label)\\]\\((.*?)\\)/).replace('label', inline._label).getRegex(),\n reflink: edit(/^!?\\[(label)\\]\\s*\\[([^\\]]*)\\]/).replace('label', inline._label).getRegex()\n};\n\n/**\n * GFM Inline Grammar\n */\n\ninline.gfm = {\n ...inline.normal,\n escape: edit(inline.escape).replace('])', '~|])').getRegex(),\n _extended_email: /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,\n url: /^((?:ftp|https?):\\/\\/|www\\.)(?:[a-zA-Z0-9\\-]+\\.?)+[^\\s<]*|^email/,\n _backpedal: /(?:[^?!.,:;*_'\"~()&]+|\\([^)]*\\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'\"~)]+(?!$))+/,\n del: /^(~~?)(?=[^\\s~])([\\s\\S]*?[^\\s~])\\1(?=[^~]|$)/,\n text: /^([`~]+|[^`~])(?:(?= {2,}\\n)|(?=[a-zA-Z0-9.!#$%&'*+\\/=?_`{\\|}~-]+@)|[\\s\\S]*?(?:(?=[\\\\ 0.5) {\n ch = 'x' + ch.toString(16);\n }\n out += '' + ch + ';';\n }\n return out;\n}\n\n/**\n * Block Lexer\n */\nclass Lexer {\n constructor(options) {\n this.tokens = [];\n this.tokens.links = Object.create(null);\n this.options = options || defaults;\n this.options.tokenizer = this.options.tokenizer || new Tokenizer();\n this.tokenizer = this.options.tokenizer;\n this.tokenizer.options = this.options;\n this.tokenizer.lexer = this;\n this.inlineQueue = [];\n this.state = {\n inLink: false,\n inRawBlock: false,\n top: true\n };\n const rules = {\n block: block.normal,\n inline: inline.normal\n };\n if (this.options.pedantic) {\n rules.block = block.pedantic;\n rules.inline = inline.pedantic;\n } else if (this.options.gfm) {\n rules.block = block.gfm;\n if (this.options.breaks) {\n rules.inline = inline.breaks;\n } else {\n rules.inline = inline.gfm;\n }\n }\n this.tokenizer.rules = rules;\n }\n\n /**\n * Expose Rules\n */\n static get rules() {\n return {\n block,\n inline\n };\n }\n\n /**\n * Static Lex Method\n */\n static lex(src, options) {\n const lexer = new Lexer(options);\n return lexer.lex(src);\n }\n\n /**\n * Static Lex Inline Method\n */\n static lexInline(src, options) {\n const lexer = new Lexer(options);\n return lexer.inlineTokens(src);\n }\n\n /**\n * Preprocessing\n */\n lex(src) {\n src = src.replace(/\\r\\n|\\r/g, '\\n');\n this.blockTokens(src, this.tokens);\n let next;\n while (next = this.inlineQueue.shift()) {\n this.inlineTokens(next.src, next.tokens);\n }\n return this.tokens;\n }\n\n /**\n * Lexing\n */\n blockTokens(src, tokens = []) {\n if (this.options.pedantic) {\n src = src.replace(/\\t/g, ' ').replace(/^ +$/gm, '');\n } else {\n src = src.replace(/^( *)(\\t+)/gm, (_, leading, tabs) => {\n return leading + ' '.repeat(tabs.length);\n });\n }\n let token, lastToken, cutSrc, lastParagraphClipped;\n while (src) {\n if (this.options.extensions && this.options.extensions.block && this.options.extensions.block.some(extTokenizer => {\n if (token = extTokenizer.call({\n lexer: this\n }, src, tokens)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n return true;\n }\n return false;\n })) {\n continue;\n }\n\n // newline\n if (token = this.tokenizer.space(src)) {\n src = src.substring(token.raw.length);\n if (token.raw.length === 1 && tokens.length > 0) {\n // if there's a single \\n as a spacer, it's terminating the last line,\n // so move it there so that we don't get unecessary paragraph tags\n tokens[tokens.length - 1].raw += '\\n';\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n // code\n if (token = this.tokenizer.code(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n // An indented code block cannot interrupt a paragraph.\n if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n // fences\n if (token = this.tokenizer.fences(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // heading\n if (token = this.tokenizer.heading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // hr\n if (token = this.tokenizer.hr(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // blockquote\n if (token = this.tokenizer.blockquote(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // list\n if (token = this.tokenizer.list(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // html\n if (token = this.tokenizer.html(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // def\n if (token = this.tokenizer.def(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.raw;\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else if (!this.tokens.links[token.tag]) {\n this.tokens.links[token.tag] = {\n href: token.href,\n title: token.title\n };\n }\n continue;\n }\n\n // table (gfm)\n if (token = this.tokenizer.table(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // lheading\n if (token = this.tokenizer.lheading(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // top-level paragraph\n // prevent paragraph consuming extensions by clipping 'src' to extension start\n cutSrc = src;\n if (this.options.extensions && this.options.extensions.startBlock) {\n let startIndex = Infinity;\n const tempSrc = src.slice(1);\n let tempStart;\n this.options.extensions.startBlock.forEach(function (getStartIndex) {\n tempStart = getStartIndex.call({\n lexer: this\n }, tempSrc);\n if (typeof tempStart === 'number' && tempStart >= 0) {\n startIndex = Math.min(startIndex, tempStart);\n }\n });\n if (startIndex < Infinity && startIndex >= 0) {\n cutSrc = src.substring(0, startIndex + 1);\n }\n }\n if (this.state.top && (token = this.tokenizer.paragraph(cutSrc))) {\n lastToken = tokens[tokens.length - 1];\n if (lastParagraphClipped && lastToken.type === 'paragraph') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue.pop();\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else {\n tokens.push(token);\n }\n lastParagraphClipped = cutSrc.length !== src.length;\n src = src.substring(token.raw.length);\n continue;\n }\n\n // text\n if (token = this.tokenizer.text(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += '\\n' + token.raw;\n lastToken.text += '\\n' + token.text;\n this.inlineQueue.pop();\n this.inlineQueue[this.inlineQueue.length - 1].src = lastToken.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n if (src) {\n const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n if (this.options.silent) {\n console.error(errMsg);\n break;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n this.state.top = true;\n return tokens;\n }\n inline(src, tokens = []) {\n this.inlineQueue.push({\n src,\n tokens\n });\n return tokens;\n }\n\n /**\n * Lexing/Compiling\n */\n inlineTokens(src, tokens = []) {\n let token, lastToken, cutSrc;\n\n // String with links masked to avoid interference with em and strong\n let maskedSrc = src;\n let match;\n let keepPrevChar, prevChar;\n\n // Mask out reflinks\n if (this.tokens.links) {\n const links = Object.keys(this.tokens.links);\n if (links.length > 0) {\n while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {\n if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);\n }\n }\n }\n }\n // Mask out other blocks\n while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index) + '[' + repeatString('a', match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);\n }\n\n // Mask out escaped em & strong delimiters\n while ((match = this.tokenizer.rules.inline.escapedEmSt.exec(maskedSrc)) != null) {\n maskedSrc = maskedSrc.slice(0, match.index + match[0].length - 2) + '++' + maskedSrc.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);\n this.tokenizer.rules.inline.escapedEmSt.lastIndex--;\n }\n while (src) {\n if (!keepPrevChar) {\n prevChar = '';\n }\n keepPrevChar = false;\n\n // extensions\n if (this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some(extTokenizer => {\n if (token = extTokenizer.call({\n lexer: this\n }, src, tokens)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n return true;\n }\n return false;\n })) {\n continue;\n }\n\n // escape\n if (token = this.tokenizer.escape(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // tag\n if (token = this.tokenizer.tag(src)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n // link\n if (token = this.tokenizer.link(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // reflink, nolink\n if (token = this.tokenizer.reflink(src, this.tokens.links)) {\n src = src.substring(token.raw.length);\n lastToken = tokens[tokens.length - 1];\n if (lastToken && token.type === 'text' && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n\n // em & strong\n if (token = this.tokenizer.emStrong(src, maskedSrc, prevChar)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // code\n if (token = this.tokenizer.codespan(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // br\n if (token = this.tokenizer.br(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // del (gfm)\n if (token = this.tokenizer.del(src)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // autolink\n if (token = this.tokenizer.autolink(src, mangle)) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // url (gfm)\n if (!this.state.inLink && (token = this.tokenizer.url(src, mangle))) {\n src = src.substring(token.raw.length);\n tokens.push(token);\n continue;\n }\n\n // text\n // prevent inlineText consuming extensions by clipping 'src' to extension start\n cutSrc = src;\n if (this.options.extensions && this.options.extensions.startInline) {\n let startIndex = Infinity;\n const tempSrc = src.slice(1);\n let tempStart;\n this.options.extensions.startInline.forEach(function (getStartIndex) {\n tempStart = getStartIndex.call({\n lexer: this\n }, tempSrc);\n if (typeof tempStart === 'number' && tempStart >= 0) {\n startIndex = Math.min(startIndex, tempStart);\n }\n });\n if (startIndex < Infinity && startIndex >= 0) {\n cutSrc = src.substring(0, startIndex + 1);\n }\n }\n if (token = this.tokenizer.inlineText(cutSrc, smartypants)) {\n src = src.substring(token.raw.length);\n if (token.raw.slice(-1) !== '_') {\n // Track prevChar before string of ____ started\n prevChar = token.raw.slice(-1);\n }\n keepPrevChar = true;\n lastToken = tokens[tokens.length - 1];\n if (lastToken && lastToken.type === 'text') {\n lastToken.raw += token.raw;\n lastToken.text += token.text;\n } else {\n tokens.push(token);\n }\n continue;\n }\n if (src) {\n const errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);\n if (this.options.silent) {\n console.error(errMsg);\n break;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n return tokens;\n }\n}\n\n/**\n * Renderer\n */\nclass Renderer {\n constructor(options) {\n this.options = options || defaults;\n }\n code(code, infostring, escaped) {\n const lang = (infostring || '').match(/\\S*/)[0];\n if (this.options.highlight) {\n const out = this.options.highlight(code, lang);\n if (out != null && out !== code) {\n escaped = true;\n code = out;\n }\n }\n code = code.replace(/\\n$/, '') + '\\n';\n if (!lang) {\n return '' + (escaped ? code : escape(code, true)) + '
\\n';\n }\n return '' + (escaped ? code : escape(code, true)) + '
\\n';\n }\n\n /**\n * @param {string} quote\n */\n blockquote(quote) {\n return `\\n${quote} \\n`;\n }\n html(html) {\n return html;\n }\n\n /**\n * @param {string} text\n * @param {string} level\n * @param {string} raw\n * @param {any} slugger\n */\n heading(text, level, raw, slugger) {\n if (this.options.headerIds) {\n const id = this.options.headerPrefix + slugger.slug(raw);\n return `${text} \\n`;\n }\n\n // ignore IDs\n return `${text} \\n`;\n }\n hr() {\n return this.options.xhtml ? ' \\n' : ' \\n';\n }\n list(body, ordered, start) {\n const type = ordered ? 'ol' : 'ul',\n startatt = ordered && start !== 1 ? ' start=\"' + start + '\"' : '';\n return '<' + type + startatt + '>\\n' + body + '' + type + '>\\n';\n }\n\n /**\n * @param {string} text\n */\n listitem(text) {\n return `${text} \\n`;\n }\n checkbox(checked) {\n return ' ';\n }\n\n /**\n * @param {string} text\n */\n paragraph(text) {\n return `${text}
\\n`;\n }\n\n /**\n * @param {string} header\n * @param {string} body\n */\n table(header, body) {\n if (body) body = `${body} `;\n return ' \\n' + '\\n' + header + ' \\n' + body + '
\\n';\n }\n\n /**\n * @param {string} content\n */\n tablerow(content) {\n return `\\n${content} \\n`;\n }\n tablecell(content, flags) {\n const type = flags.header ? 'th' : 'td';\n const tag = flags.align ? `<${type} align=\"${flags.align}\">` : `<${type}>`;\n return tag + content + `${type}>\\n`;\n }\n\n /**\n * span level renderer\n * @param {string} text\n */\n strong(text) {\n return `${text} `;\n }\n\n /**\n * @param {string} text\n */\n em(text) {\n return `${text} `;\n }\n\n /**\n * @param {string} text\n */\n codespan(text) {\n return `${text}
`;\n }\n br() {\n return this.options.xhtml ? ' ' : ' ';\n }\n\n /**\n * @param {string} text\n */\n del(text) {\n return `${text}`;\n }\n\n /**\n * @param {string} href\n * @param {string} title\n * @param {string} text\n */\n link(href, title, text) {\n href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);\n if (href === null) {\n return text;\n }\n let out = '' + text + ' ';\n return out;\n }\n\n /**\n * @param {string} href\n * @param {string} title\n * @param {string} text\n */\n image(href, title, text) {\n href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);\n if (href === null) {\n return text;\n }\n let out = ` ' : '>';\n return out;\n }\n text(text) {\n return text;\n }\n}\n\n/**\n * TextRenderer\n * returns only the textual part of the token\n */\nclass TextRenderer {\n // no need for block level renderers\n strong(text) {\n return text;\n }\n em(text) {\n return text;\n }\n codespan(text) {\n return text;\n }\n del(text) {\n return text;\n }\n html(text) {\n return text;\n }\n text(text) {\n return text;\n }\n link(href, title, text) {\n return '' + text;\n }\n image(href, title, text) {\n return '' + text;\n }\n br() {\n return '';\n }\n}\n\n/**\n * Slugger generates header id\n */\nclass Slugger {\n constructor() {\n this.seen = {};\n }\n\n /**\n * @param {string} value\n */\n serialize(value) {\n return value.toLowerCase().trim()\n // remove html tags\n .replace(/<[!\\/a-z].*?>/ig, '')\n // remove unwanted chars\n .replace(/[\\u2000-\\u206F\\u2E00-\\u2E7F\\\\'!\"#$%&()*+,./:;<=>?@[\\]^`{|}~]/g, '').replace(/\\s/g, '-');\n }\n\n /**\n * Finds the next safe (unique) slug to use\n * @param {string} originalSlug\n * @param {boolean} isDryRun\n */\n getNextSafeSlug(originalSlug, isDryRun) {\n let slug = originalSlug;\n let occurenceAccumulator = 0;\n if (this.seen.hasOwnProperty(slug)) {\n occurenceAccumulator = this.seen[originalSlug];\n do {\n occurenceAccumulator++;\n slug = originalSlug + '-' + occurenceAccumulator;\n } while (this.seen.hasOwnProperty(slug));\n }\n if (!isDryRun) {\n this.seen[originalSlug] = occurenceAccumulator;\n this.seen[slug] = 0;\n }\n return slug;\n }\n\n /**\n * Convert string to unique id\n * @param {object} [options]\n * @param {boolean} [options.dryrun] Generates the next unique slug without\n * updating the internal accumulator.\n */\n slug(value, options = {}) {\n const slug = this.serialize(value);\n return this.getNextSafeSlug(slug, options.dryrun);\n }\n}\n\n/**\n * Parsing & Compiling\n */\nclass Parser {\n constructor(options) {\n this.options = options || defaults;\n this.options.renderer = this.options.renderer || new Renderer();\n this.renderer = this.options.renderer;\n this.renderer.options = this.options;\n this.textRenderer = new TextRenderer();\n this.slugger = new Slugger();\n }\n\n /**\n * Static Parse Method\n */\n static parse(tokens, options) {\n const parser = new Parser(options);\n return parser.parse(tokens);\n }\n\n /**\n * Static Parse Inline Method\n */\n static parseInline(tokens, options) {\n const parser = new Parser(options);\n return parser.parseInline(tokens);\n }\n\n /**\n * Parse Loop\n */\n parse(tokens, top = true) {\n let out = '',\n i,\n j,\n k,\n l2,\n l3,\n row,\n cell,\n header,\n body,\n token,\n ordered,\n start,\n loose,\n itemBody,\n item,\n checked,\n task,\n checkbox,\n ret;\n const l = tokens.length;\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n // Run any renderer extensions\n if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) {\n ret = this.options.extensions.renderers[token.type].call({\n parser: this\n }, token);\n if (ret !== false || !['space', 'hr', 'heading', 'code', 'table', 'blockquote', 'list', 'html', 'paragraph', 'text'].includes(token.type)) {\n out += ret || '';\n continue;\n }\n }\n switch (token.type) {\n case 'space':\n {\n continue;\n }\n case 'hr':\n {\n out += this.renderer.hr();\n continue;\n }\n case 'heading':\n {\n out += this.renderer.heading(this.parseInline(token.tokens), token.depth, unescape(this.parseInline(token.tokens, this.textRenderer)), this.slugger);\n continue;\n }\n case 'code':\n {\n out += this.renderer.code(token.text, token.lang, token.escaped);\n continue;\n }\n case 'table':\n {\n header = '';\n\n // header\n cell = '';\n l2 = token.header.length;\n for (j = 0; j < l2; j++) {\n cell += this.renderer.tablecell(this.parseInline(token.header[j].tokens), {\n header: true,\n align: token.align[j]\n });\n }\n header += this.renderer.tablerow(cell);\n body = '';\n l2 = token.rows.length;\n for (j = 0; j < l2; j++) {\n row = token.rows[j];\n cell = '';\n l3 = row.length;\n for (k = 0; k < l3; k++) {\n cell += this.renderer.tablecell(this.parseInline(row[k].tokens), {\n header: false,\n align: token.align[k]\n });\n }\n body += this.renderer.tablerow(cell);\n }\n out += this.renderer.table(header, body);\n continue;\n }\n case 'blockquote':\n {\n body = this.parse(token.tokens);\n out += this.renderer.blockquote(body);\n continue;\n }\n case 'list':\n {\n ordered = token.ordered;\n start = token.start;\n loose = token.loose;\n l2 = token.items.length;\n body = '';\n for (j = 0; j < l2; j++) {\n item = token.items[j];\n checked = item.checked;\n task = item.task;\n itemBody = '';\n if (item.task) {\n checkbox = this.renderer.checkbox(checked);\n if (loose) {\n if (item.tokens.length > 0 && item.tokens[0].type === 'paragraph') {\n item.tokens[0].text = checkbox + ' ' + item.tokens[0].text;\n if (item.tokens[0].tokens && item.tokens[0].tokens.length > 0 && item.tokens[0].tokens[0].type === 'text') {\n item.tokens[0].tokens[0].text = checkbox + ' ' + item.tokens[0].tokens[0].text;\n }\n } else {\n item.tokens.unshift({\n type: 'text',\n text: checkbox\n });\n }\n } else {\n itemBody += checkbox;\n }\n }\n itemBody += this.parse(item.tokens, loose);\n body += this.renderer.listitem(itemBody, task, checked);\n }\n out += this.renderer.list(body, ordered, start);\n continue;\n }\n case 'html':\n {\n // TODO parse inline content if parameter markdown=1\n out += this.renderer.html(token.text);\n continue;\n }\n case 'paragraph':\n {\n out += this.renderer.paragraph(this.parseInline(token.tokens));\n continue;\n }\n case 'text':\n {\n body = token.tokens ? this.parseInline(token.tokens) : token.text;\n while (i + 1 < l && tokens[i + 1].type === 'text') {\n token = tokens[++i];\n body += '\\n' + (token.tokens ? this.parseInline(token.tokens) : token.text);\n }\n out += top ? this.renderer.paragraph(body) : body;\n continue;\n }\n default:\n {\n const errMsg = 'Token with \"' + token.type + '\" type was not found.';\n if (this.options.silent) {\n console.error(errMsg);\n return;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n }\n return out;\n }\n\n /**\n * Parse Inline Tokens\n */\n parseInline(tokens, renderer) {\n renderer = renderer || this.renderer;\n let out = '',\n i,\n token,\n ret;\n const l = tokens.length;\n for (i = 0; i < l; i++) {\n token = tokens[i];\n\n // Run any renderer extensions\n if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) {\n ret = this.options.extensions.renderers[token.type].call({\n parser: this\n }, token);\n if (ret !== false || !['escape', 'html', 'link', 'image', 'strong', 'em', 'codespan', 'br', 'del', 'text'].includes(token.type)) {\n out += ret || '';\n continue;\n }\n }\n switch (token.type) {\n case 'escape':\n {\n out += renderer.text(token.text);\n break;\n }\n case 'html':\n {\n out += renderer.html(token.text);\n break;\n }\n case 'link':\n {\n out += renderer.link(token.href, token.title, this.parseInline(token.tokens, renderer));\n break;\n }\n case 'image':\n {\n out += renderer.image(token.href, token.title, token.text);\n break;\n }\n case 'strong':\n {\n out += renderer.strong(this.parseInline(token.tokens, renderer));\n break;\n }\n case 'em':\n {\n out += renderer.em(this.parseInline(token.tokens, renderer));\n break;\n }\n case 'codespan':\n {\n out += renderer.codespan(token.text);\n break;\n }\n case 'br':\n {\n out += renderer.br();\n break;\n }\n case 'del':\n {\n out += renderer.del(this.parseInline(token.tokens, renderer));\n break;\n }\n case 'text':\n {\n out += renderer.text(token.text);\n break;\n }\n default:\n {\n const errMsg = 'Token with \"' + token.type + '\" type was not found.';\n if (this.options.silent) {\n console.error(errMsg);\n return;\n } else {\n throw new Error(errMsg);\n }\n }\n }\n }\n return out;\n }\n}\nclass Hooks {\n constructor(options) {\n this.options = options || defaults;\n }\n static passThroughHooks = new Set(['preprocess', 'postprocess']);\n\n /**\n * Process markdown before marked\n */\n preprocess(markdown) {\n return markdown;\n }\n\n /**\n * Process HTML after marked is finished\n */\n postprocess(html) {\n return html;\n }\n}\nfunction onError(silent, async, callback) {\n return e => {\n e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n if (silent) {\n const msg = 'An error occurred:
' + escape(e.message + '', true) + ' ';\n if (async) {\n return Promise.resolve(msg);\n }\n if (callback) {\n callback(null, msg);\n return;\n }\n return msg;\n }\n if (async) {\n return Promise.reject(e);\n }\n if (callback) {\n callback(e);\n return;\n }\n throw e;\n };\n}\nfunction parseMarkdown(lexer, parser) {\n return (src, opt, callback) => {\n if (typeof opt === 'function') {\n callback = opt;\n opt = null;\n }\n const origOpt = {\n ...opt\n };\n opt = {\n ...marked.defaults,\n ...origOpt\n };\n const throwError = onError(opt.silent, opt.async, callback);\n\n // throw error in case of non string input\n if (typeof src === 'undefined' || src === null) {\n return throwError(new Error('marked(): input parameter is undefined or null'));\n }\n if (typeof src !== 'string') {\n return throwError(new Error('marked(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected'));\n }\n checkSanitizeDeprecation(opt);\n if (opt.hooks) {\n opt.hooks.options = opt;\n }\n if (callback) {\n const highlight = opt.highlight;\n let tokens;\n try {\n if (opt.hooks) {\n src = opt.hooks.preprocess(src);\n }\n tokens = lexer(src, opt);\n } catch (e) {\n return throwError(e);\n }\n const done = function (err) {\n let out;\n if (!err) {\n try {\n if (opt.walkTokens) {\n marked.walkTokens(tokens, opt.walkTokens);\n }\n out = parser(tokens, opt);\n if (opt.hooks) {\n out = opt.hooks.postprocess(out);\n }\n } catch (e) {\n err = e;\n }\n }\n opt.highlight = highlight;\n return err ? throwError(err) : callback(null, out);\n };\n if (!highlight || highlight.length < 3) {\n return done();\n }\n delete opt.highlight;\n if (!tokens.length) return done();\n let pending = 0;\n marked.walkTokens(tokens, function (token) {\n if (token.type === 'code') {\n pending++;\n setTimeout(() => {\n highlight(token.text, token.lang, function (err, code) {\n if (err) {\n return done(err);\n }\n if (code != null && code !== token.text) {\n token.text = code;\n token.escaped = true;\n }\n pending--;\n if (pending === 0) {\n done();\n }\n });\n }, 0);\n }\n });\n if (pending === 0) {\n done();\n }\n return;\n }\n if (opt.async) {\n return Promise.resolve(opt.hooks ? opt.hooks.preprocess(src) : src).then(src => lexer(src, opt)).then(tokens => opt.walkTokens ? Promise.all(marked.walkTokens(tokens, opt.walkTokens)).then(() => tokens) : tokens).then(tokens => parser(tokens, opt)).then(html => opt.hooks ? opt.hooks.postprocess(html) : html).catch(throwError);\n }\n try {\n if (opt.hooks) {\n src = opt.hooks.preprocess(src);\n }\n const tokens = lexer(src, opt);\n if (opt.walkTokens) {\n marked.walkTokens(tokens, opt.walkTokens);\n }\n let html = parser(tokens, opt);\n if (opt.hooks) {\n html = opt.hooks.postprocess(html);\n }\n return html;\n } catch (e) {\n return throwError(e);\n }\n };\n}\n\n/**\n * Marked\n */\nfunction marked(src, opt, callback) {\n return parseMarkdown(Lexer.lex, Parser.parse)(src, opt, callback);\n}\n\n/**\n * Options\n */\n\nmarked.options = marked.setOptions = function (opt) {\n marked.defaults = {\n ...marked.defaults,\n ...opt\n };\n changeDefaults(marked.defaults);\n return marked;\n};\nmarked.getDefaults = getDefaults;\nmarked.defaults = defaults;\n\n/**\n * Use Extension\n */\n\nmarked.use = function (...args) {\n const extensions = marked.defaults.extensions || {\n renderers: {},\n childTokens: {}\n };\n args.forEach(pack => {\n // copy options to new object\n const opts = {\n ...pack\n };\n\n // set async to true if it was set to true before\n opts.async = marked.defaults.async || opts.async || false;\n\n // ==-- Parse \"addon\" extensions --== //\n if (pack.extensions) {\n pack.extensions.forEach(ext => {\n if (!ext.name) {\n throw new Error('extension name required');\n }\n if (ext.renderer) {\n // Renderer extensions\n const prevRenderer = extensions.renderers[ext.name];\n if (prevRenderer) {\n // Replace extension with func to run new extension but fall back if false\n extensions.renderers[ext.name] = function (...args) {\n let ret = ext.renderer.apply(this, args);\n if (ret === false) {\n ret = prevRenderer.apply(this, args);\n }\n return ret;\n };\n } else {\n extensions.renderers[ext.name] = ext.renderer;\n }\n }\n if (ext.tokenizer) {\n // Tokenizer Extensions\n if (!ext.level || ext.level !== 'block' && ext.level !== 'inline') {\n throw new Error(\"extension level must be 'block' or 'inline'\");\n }\n if (extensions[ext.level]) {\n extensions[ext.level].unshift(ext.tokenizer);\n } else {\n extensions[ext.level] = [ext.tokenizer];\n }\n if (ext.start) {\n // Function to check for start of token\n if (ext.level === 'block') {\n if (extensions.startBlock) {\n extensions.startBlock.push(ext.start);\n } else {\n extensions.startBlock = [ext.start];\n }\n } else if (ext.level === 'inline') {\n if (extensions.startInline) {\n extensions.startInline.push(ext.start);\n } else {\n extensions.startInline = [ext.start];\n }\n }\n }\n }\n if (ext.childTokens) {\n // Child tokens to be visited by walkTokens\n extensions.childTokens[ext.name] = ext.childTokens;\n }\n });\n opts.extensions = extensions;\n }\n\n // ==-- Parse \"overwrite\" extensions --== //\n if (pack.renderer) {\n const renderer = marked.defaults.renderer || new Renderer();\n for (const prop in pack.renderer) {\n const prevRenderer = renderer[prop];\n // Replace renderer with func to run extension, but fall back if false\n renderer[prop] = (...args) => {\n let ret = pack.renderer[prop].apply(renderer, args);\n if (ret === false) {\n ret = prevRenderer.apply(renderer, args);\n }\n return ret;\n };\n }\n opts.renderer = renderer;\n }\n if (pack.tokenizer) {\n const tokenizer = marked.defaults.tokenizer || new Tokenizer();\n for (const prop in pack.tokenizer) {\n const prevTokenizer = tokenizer[prop];\n // Replace tokenizer with func to run extension, but fall back if false\n tokenizer[prop] = (...args) => {\n let ret = pack.tokenizer[prop].apply(tokenizer, args);\n if (ret === false) {\n ret = prevTokenizer.apply(tokenizer, args);\n }\n return ret;\n };\n }\n opts.tokenizer = tokenizer;\n }\n\n // ==-- Parse Hooks extensions --== //\n if (pack.hooks) {\n const hooks = marked.defaults.hooks || new Hooks();\n for (const prop in pack.hooks) {\n const prevHook = hooks[prop];\n if (Hooks.passThroughHooks.has(prop)) {\n hooks[prop] = arg => {\n if (marked.defaults.async) {\n return Promise.resolve(pack.hooks[prop].call(hooks, arg)).then(ret => {\n return prevHook.call(hooks, ret);\n });\n }\n const ret = pack.hooks[prop].call(hooks, arg);\n return prevHook.call(hooks, ret);\n };\n } else {\n hooks[prop] = (...args) => {\n let ret = pack.hooks[prop].apply(hooks, args);\n if (ret === false) {\n ret = prevHook.apply(hooks, args);\n }\n return ret;\n };\n }\n }\n opts.hooks = hooks;\n }\n\n // ==-- Parse WalkTokens extensions --== //\n if (pack.walkTokens) {\n const walkTokens = marked.defaults.walkTokens;\n opts.walkTokens = function (token) {\n let values = [];\n values.push(pack.walkTokens.call(this, token));\n if (walkTokens) {\n values = values.concat(walkTokens.call(this, token));\n }\n return values;\n };\n }\n marked.setOptions(opts);\n });\n};\n\n/**\n * Run callback for every token\n */\n\nmarked.walkTokens = function (tokens, callback) {\n let values = [];\n for (const token of tokens) {\n values = values.concat(callback.call(marked, token));\n switch (token.type) {\n case 'table':\n {\n for (const cell of token.header) {\n values = values.concat(marked.walkTokens(cell.tokens, callback));\n }\n for (const row of token.rows) {\n for (const cell of row) {\n values = values.concat(marked.walkTokens(cell.tokens, callback));\n }\n }\n break;\n }\n case 'list':\n {\n values = values.concat(marked.walkTokens(token.items, callback));\n break;\n }\n default:\n {\n if (marked.defaults.extensions && marked.defaults.extensions.childTokens && marked.defaults.extensions.childTokens[token.type]) {\n // Walk any extensions\n marked.defaults.extensions.childTokens[token.type].forEach(function (childTokens) {\n values = values.concat(marked.walkTokens(token[childTokens], callback));\n });\n } else if (token.tokens) {\n values = values.concat(marked.walkTokens(token.tokens, callback));\n }\n }\n }\n }\n return values;\n};\n\n/**\n * Parse Inline\n * @param {string} src\n */\nmarked.parseInline = parseMarkdown(Lexer.lexInline, Parser.parseInline);\n\n/**\n * Expose\n */\nmarked.Parser = Parser;\nmarked.parser = Parser.parse;\nmarked.Renderer = Renderer;\nmarked.TextRenderer = TextRenderer;\nmarked.Lexer = Lexer;\nmarked.lexer = Lexer.lex;\nmarked.Tokenizer = Tokenizer;\nmarked.Slugger = Slugger;\nmarked.Hooks = Hooks;\nmarked.parse = marked;\nconst options = marked.options;\nconst setOptions = marked.setOptions;\nconst use = marked.use;\nconst walkTokens = marked.walkTokens;\nconst parseInline = marked.parseInline;\nconst parse = marked;\nconst parser = Parser.parse;\nconst lexer = Lexer.lex;\nexport { Hooks, Lexer, Parser, Renderer, Slugger, TextRenderer, Tokenizer, defaults, getDefaults, lexer, marked, options, parse, parseInline, parser, setOptions, use, walkTokens };","import * as i0 from '@angular/core';\nimport { Component, ChangeDetectionStrategy, Pipe, InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, EventEmitter, Input, Output, SecurityContext, NgModule } from '@angular/core';\nimport { Subject, merge, of, timer } from 'rxjs';\nimport { switchMap, mapTo, distinctUntilChanged, shareReplay, startWith, map, takeUntil, first } from 'rxjs/operators';\nimport * as i1 from '@angular/common';\nimport { isPlatformBrowser, CommonModule } from '@angular/common';\nimport { Renderer, marked } from 'marked';\nexport { Renderer as MarkedRenderer } from 'marked';\nimport * as i1$1 from '@angular/common/http';\nimport * as i4 from '@angular/platform-browser';\nconst _c0 = [\"*\"];\nconst BUTTON_TEXT_COPY = 'Copy';\nconst BUTTON_TEXT_COPIED = 'Copied';\nlet ClipboardButtonComponent = /*#__PURE__*/(() => {\n class ClipboardButtonComponent {\n constructor() {\n this._buttonClick$ = new Subject();\n this.copied$ = this._buttonClick$.pipe(switchMap(() => merge(of(true), timer(3000).pipe(mapTo(false)))), distinctUntilChanged(), shareReplay(1));\n this.copiedText$ = this.copied$.pipe(startWith(false), map(copied => copied ? BUTTON_TEXT_COPIED : BUTTON_TEXT_COPY));\n }\n onCopyToClipboardClick() {\n this._buttonClick$.next();\n }\n }\n ClipboardButtonComponent.ɵfac = function ClipboardButtonComponent_Factory(t) {\n return new (t || ClipboardButtonComponent)();\n };\n ClipboardButtonComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: ClipboardButtonComponent,\n selectors: [[\"markdown-clipboard\"]],\n decls: 4,\n vars: 7,\n consts: [[1, \"markdown-clipboard-button\", 3, \"click\"]],\n template: function ClipboardButtonComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"button\", 0);\n i0.ɵɵpipe(1, \"async\");\n i0.ɵɵlistener(\"click\", function ClipboardButtonComponent_Template_button_click_0_listener() {\n return ctx.onCopyToClipboardClick();\n });\n i0.ɵɵtext(2);\n i0.ɵɵpipe(3, \"async\");\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵclassProp(\"copied\", i0.ɵɵpipeBind1(1, 3, ctx.copied$));\n i0.ɵɵadvance(2);\n i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 5, ctx.copiedText$));\n }\n },\n dependencies: [i1.AsyncPipe],\n encapsulation: 2,\n changeDetection: 0\n });\n return ClipboardButtonComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nclass ClipboardOptions {}\nclass ClipboardRenderOptions extends ClipboardOptions {}\n\n/* eslint-disable */\nclass KatexSpecificOptions {}\nlet LanguagePipe = /*#__PURE__*/(() => {\n class LanguagePipe {\n transform(value, language) {\n if (value == null) {\n value = '';\n }\n if (language == null) {\n language = '';\n }\n if (typeof value !== 'string') {\n console.error(`LanguagePipe has been invoked with an invalid value type [${typeof value}]`);\n return value;\n }\n if (typeof language !== 'string') {\n console.error(`LanguagePipe has been invoked with an invalid parameter [${typeof language}]`);\n return value;\n }\n return '```' + language + '\\n' + value + '\\n```';\n }\n }\n LanguagePipe.ɵfac = function LanguagePipe_Factory(t) {\n return new (t || LanguagePipe)();\n };\n LanguagePipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"language\",\n type: LanguagePipe,\n pure: true\n });\n return LanguagePipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nvar PrismPlugin = /*#__PURE__*/function (PrismPlugin) {\n PrismPlugin[\"CommandLine\"] = \"command-line\";\n PrismPlugin[\"LineHighlight\"] = \"line-highlight\";\n PrismPlugin[\"LineNumbers\"] = \"line-numbers\";\n return PrismPlugin;\n}(PrismPlugin || {});\nclass MarkedOptions {}\n\n/* eslint-disable max-len */\nconst errorJoyPixelsNotLoaded = '[ngx-markdown] When using the `emoji` attribute you *have to* include Emoji-Toolkit files to `angular.json` or use imports. See README for more information';\nconst errorKatexNotLoaded = '[ngx-markdown] When using the `katex` attribute you *have to* include KaTeX files to `angular.json` or use imports. See README for more information';\nconst errorMermaidNotLoaded = '[ngx-markdown] When using the `mermaid` attribute you *have to* include Mermaid files to `angular.json` or use imports. See README for more information';\nconst errorClipboardNotLoaded = '[ngx-markdown] When using the `clipboard` attribute you *have to* include Clipboard files to `angular.json` or use imports. See README for more information';\nconst errorClipboardViewContainerRequired = '[ngx-markdown] When using the `clipboard` attribute you *have to* provide the `viewContainerRef` parameter to `MarkdownService.render()` function';\nconst errorSrcWithoutHttpClient = '[ngx-markdown] When using the `src` attribute you *have to* pass the `HttpClient` as a parameter of the `forRoot` method. See README for more information';\n/* eslint-enable max-len */\nconst SECURITY_CONTEXT = new InjectionToken('SECURITY_CONTEXT');\nclass ExtendedRenderer extends Renderer {\n constructor() {\n super(...arguments);\n this.ɵNgxMarkdownRendererExtended = false;\n }\n}\nlet MarkdownService = /*#__PURE__*/(() => {\n class MarkdownService {\n constructor(platform, securityContext, http, clipboardOptions, options, sanitizer) {\n this.platform = platform;\n this.securityContext = securityContext;\n this.http = http;\n this.clipboardOptions = clipboardOptions;\n this.sanitizer = sanitizer;\n this.DEFAULT_PARSE_OPTIONS = {\n decodeHtml: false,\n inline: false,\n emoji: false,\n mermaid: false,\n markedOptions: undefined\n };\n this.DEFAULT_RENDER_OPTIONS = {\n clipboard: false,\n clipboardOptions: undefined,\n katex: false,\n katexOptions: undefined,\n mermaid: false,\n mermaidOptions: undefined\n };\n this.DEFAULT_MARKED_OPTIONS = {\n renderer: new Renderer()\n };\n this.DEFAULT_KATEX_OPTIONS = {\n delimiters: [{\n left: \"$$\",\n right: \"$$\",\n display: true\n }, {\n left: \"$\",\n right: \"$\",\n display: false\n }, {\n left: \"\\\\(\",\n right: \"\\\\)\",\n display: false\n }, {\n left: \"\\\\begin{equation}\",\n right: \"\\\\end{equation}\",\n display: true\n }, {\n left: \"\\\\begin{align}\",\n right: \"\\\\end{align}\",\n display: true\n }, {\n left: \"\\\\begin{alignat}\",\n right: \"\\\\end{alignat}\",\n display: true\n }, {\n left: \"\\\\begin{gather}\",\n right: \"\\\\end{gather}\",\n display: true\n }, {\n left: \"\\\\begin{CD}\",\n right: \"\\\\end{CD}\",\n display: true\n }, {\n left: \"\\\\[\",\n right: \"\\\\]\",\n display: true\n }]\n };\n this.DEFAULT_MERMAID_OPTIONS = {\n startOnLoad: false\n };\n this.DEFAULT_CLIPBOARD_OPTIONS = {\n buttonComponent: undefined\n };\n this._reload$ = new Subject();\n this.reload$ = this._reload$.asObservable();\n this.options = options;\n }\n get options() {\n return this._options;\n }\n set options(value) {\n this._options = {\n ...this.DEFAULT_MARKED_OPTIONS,\n ...value\n };\n }\n get renderer() {\n return this.options.renderer;\n }\n set renderer(value) {\n this.options.renderer = value;\n }\n parse(markdown, options = this.DEFAULT_PARSE_OPTIONS) {\n const {\n decodeHtml,\n inline,\n emoji,\n mermaid,\n markedOptions = this.options\n } = options;\n if (mermaid) {\n this.renderer = this.extendRenderer(markedOptions.renderer || new Renderer());\n }\n const trimmed = this.trimIndentation(markdown);\n const decoded = decodeHtml ? this.decodeHtml(trimmed) : trimmed;\n const emojified = emoji ? this.parseEmoji(decoded) : decoded;\n const marked = this.parseMarked(emojified, markedOptions, inline);\n return this.sanitizer.sanitize(this.securityContext, marked) || '';\n }\n render(element, options = this.DEFAULT_RENDER_OPTIONS, viewContainerRef) {\n const {\n clipboard,\n clipboardOptions,\n katex,\n katexOptions,\n mermaid,\n mermaidOptions\n } = options;\n if (clipboard) {\n this.renderClipboard(element, viewContainerRef, {\n ...this.DEFAULT_CLIPBOARD_OPTIONS,\n ...this.clipboardOptions,\n ...clipboardOptions\n });\n }\n if (katex) {\n this.renderKatex(element, {\n ...this.DEFAULT_KATEX_OPTIONS,\n ...katexOptions\n });\n }\n if (mermaid) {\n this.renderMermaid(element, {\n ...this.DEFAULT_MERMAID_OPTIONS,\n ...mermaidOptions\n });\n }\n this.highlight(element);\n }\n reload() {\n this._reload$.next();\n }\n getSource(src) {\n if (!this.http) {\n throw new Error(errorSrcWithoutHttpClient);\n }\n return this.http.get(src, {\n responseType: 'text'\n }).pipe(map(markdown => this.handleExtension(src, markdown)));\n }\n highlight(element) {\n if (!isPlatformBrowser(this.platform)) {\n return;\n }\n if (typeof Prism === 'undefined' || typeof Prism.highlightAllUnder === 'undefined') {\n return;\n }\n if (!element) {\n element = document;\n }\n const noLanguageElements = element.querySelectorAll('pre code:not([class*=\"language-\"])');\n Array.prototype.forEach.call(noLanguageElements, x => x.classList.add('language-none'));\n Prism.highlightAllUnder(element);\n }\n decodeHtml(html) {\n if (!isPlatformBrowser(this.platform)) {\n return html;\n }\n const textarea = document.createElement('textarea');\n textarea.innerHTML = html;\n return textarea.value;\n }\n extendRenderer(renderer) {\n const extendedRenderer = renderer;\n if (extendedRenderer.ɵNgxMarkdownRendererExtended === true) {\n return renderer;\n }\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const defaultCode = renderer.code;\n renderer.code = function (code, language, isEscaped) {\n return language === 'mermaid' ? `${code}
` : defaultCode.call(this, code, language, isEscaped);\n };\n extendedRenderer.ɵNgxMarkdownRendererExtended = true;\n return renderer;\n }\n handleExtension(src, markdown) {\n const urlProtocolIndex = src.lastIndexOf('://');\n const urlWithoutProtocol = urlProtocolIndex > -1 ? src.substring(urlProtocolIndex + 4) : src;\n const lastSlashIndex = urlWithoutProtocol.lastIndexOf('/');\n const lastUrlSegment = lastSlashIndex > -1 ? urlWithoutProtocol.substring(lastSlashIndex + 1).split('?')[0] : '';\n const lastDotIndex = lastUrlSegment.lastIndexOf('.');\n const extension = lastDotIndex > -1 ? lastUrlSegment.substring(lastDotIndex + 1) : '';\n return !!extension && extension !== 'md' ? '```' + extension + '\\n' + markdown + '\\n```' : markdown;\n }\n parseMarked(html, markedOptions, inline = false) {\n if (!isPlatformBrowser(this.platform)) {\n return html;\n }\n if (inline) {\n return marked.parseInline(html, markedOptions);\n }\n return marked.parse(html, markedOptions);\n }\n parseEmoji(html) {\n if (!isPlatformBrowser(this.platform)) {\n return html;\n }\n if (typeof joypixels === 'undefined' || typeof joypixels.shortnameToUnicode === 'undefined') {\n throw new Error(errorJoyPixelsNotLoaded);\n }\n return joypixels.shortnameToUnicode(html);\n }\n renderKatex(element, options) {\n if (!isPlatformBrowser(this.platform)) {\n return;\n }\n if (typeof katex === 'undefined' || typeof renderMathInElement === 'undefined') {\n throw new Error(errorKatexNotLoaded);\n }\n renderMathInElement(element, options);\n }\n renderClipboard(element, viewContainerRef, options) {\n if (!isPlatformBrowser(this.platform)) {\n return;\n }\n if (typeof ClipboardJS === 'undefined') {\n throw new Error(errorClipboardNotLoaded);\n }\n if (!viewContainerRef) {\n throw new Error(errorClipboardViewContainerRequired);\n }\n const {\n buttonComponent,\n buttonTemplate\n } = options;\n // target every elements\n const preElements = element.querySelectorAll('pre');\n for (let i = 0; i < preElements.length; i++) {\n const preElement = preElements.item(i);\n // create wrapper element\n const preWrapperElement = document.createElement('div');\n preWrapperElement.style.position = 'relative';\n preElement.parentNode.insertBefore(preWrapperElement, preElement);\n preWrapperElement.appendChild(preElement);\n // create toolbar element\n const toolbarWrapperElement = document.createElement('div');\n toolbarWrapperElement.style.position = 'absolute';\n toolbarWrapperElement.style.top = '.5em';\n toolbarWrapperElement.style.right = '.5em';\n toolbarWrapperElement.style.opacity = '0';\n toolbarWrapperElement.style.transition = 'opacity 250ms ease-out';\n preWrapperElement.insertAdjacentElement('beforeend', toolbarWrapperElement);\n // register listener to show/hide toolbar\n preElement.onmouseover = () => toolbarWrapperElement.style.opacity = '1';\n preElement.onmouseout = () => toolbarWrapperElement.style.opacity = '0';\n // declare embeddedViewRef holding variable\n let embeddedViewRef;\n // use provided component via input property\n // or provided via ClipboardOptions provider\n if (buttonComponent) {\n const componentRef = viewContainerRef.createComponent(buttonComponent);\n embeddedViewRef = componentRef.hostView;\n }\n // use provided template via input property\n else if (buttonTemplate) {\n embeddedViewRef = viewContainerRef.createEmbeddedView(buttonTemplate);\n }\n // use default component\n else {\n const componentRef = viewContainerRef.createComponent(ClipboardButtonComponent);\n embeddedViewRef = componentRef.hostView;\n }\n // declare clipboard instance variable\n let clipboardInstance;\n // attach clipboard.js to root node\n embeddedViewRef.rootNodes.forEach(node => {\n node.onmouseover = () => toolbarWrapperElement.style.opacity = '1';\n toolbarWrapperElement.appendChild(node);\n clipboardInstance = new ClipboardJS(node, {\n text: () => preElement.innerText\n });\n });\n // destroy clipboard instance when view is destroyed\n embeddedViewRef.onDestroy(() => clipboardInstance.destroy());\n }\n }\n renderMermaid(element, options = this.DEFAULT_MERMAID_OPTIONS) {\n if (!isPlatformBrowser(this.platform)) {\n return;\n }\n if (typeof mermaid === 'undefined' || typeof mermaid.init === 'undefined') {\n throw new Error(errorMermaidNotLoaded);\n }\n const mermaidElements = element.querySelectorAll('.mermaid');\n if (mermaidElements.length === 0) {\n return;\n }\n mermaid.initialize(options);\n mermaid.init(mermaidElements);\n }\n trimIndentation(markdown) {\n if (!markdown) {\n return '';\n }\n let indentStart;\n return markdown.split('\\n').map(line => {\n let lineIdentStart = indentStart;\n if (line.length > 0) {\n lineIdentStart = isNaN(lineIdentStart) ? line.search(/\\S|$/) : Math.min(line.search(/\\S|$/), lineIdentStart);\n }\n if (isNaN(indentStart)) {\n indentStart = lineIdentStart;\n }\n return lineIdentStart ? line.substring(lineIdentStart) : line;\n }).join('\\n');\n }\n }\n MarkdownService.ɵfac = function MarkdownService_Factory(t) {\n return new (t || MarkdownService)(i0.ɵɵinject(PLATFORM_ID), i0.ɵɵinject(SECURITY_CONTEXT), i0.ɵɵinject(i1$1.HttpClient, 8), i0.ɵɵinject(ClipboardOptions, 8), i0.ɵɵinject(MarkedOptions, 8), i0.ɵɵinject(i4.DomSanitizer));\n };\n MarkdownService.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: MarkdownService,\n factory: MarkdownService.ɵfac\n });\n return MarkdownService;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\nlet MarkdownComponent = /*#__PURE__*/(() => {\n class MarkdownComponent {\n constructor(element, markdownService, viewContainerRef) {\n this.element = element;\n this.markdownService = markdownService;\n this.viewContainerRef = viewContainerRef;\n // Event emitters\n this.error = new EventEmitter();\n this.load = new EventEmitter();\n this.ready = new EventEmitter();\n this._commandLine = false;\n this._clipboard = false;\n this._emoji = false;\n this._inline = false;\n this._katex = false;\n this._lineHighlight = false;\n this._lineNumbers = false;\n this._mermaid = false;\n this.destroyed$ = new Subject();\n }\n get inline() {\n return this._inline;\n }\n set inline(value) {\n this._inline = this.coerceBooleanProperty(value);\n }\n // Plugin - clipboard\n get clipboard() {\n return this._clipboard;\n }\n set clipboard(value) {\n this._clipboard = this.coerceBooleanProperty(value);\n }\n // Plugin - emoji\n get emoji() {\n return this._emoji;\n }\n set emoji(value) {\n this._emoji = this.coerceBooleanProperty(value);\n }\n // Plugin - katex\n get katex() {\n return this._katex;\n }\n set katex(value) {\n this._katex = this.coerceBooleanProperty(value);\n }\n // Plugin - mermaid\n get mermaid() {\n return this._mermaid;\n }\n set mermaid(value) {\n this._mermaid = this.coerceBooleanProperty(value);\n }\n // Plugin - lineHighlight\n get lineHighlight() {\n return this._lineHighlight;\n }\n set lineHighlight(value) {\n this._lineHighlight = this.coerceBooleanProperty(value);\n }\n // Plugin - lineNumbers\n get lineNumbers() {\n return this._lineNumbers;\n }\n set lineNumbers(value) {\n this._lineNumbers = this.coerceBooleanProperty(value);\n }\n // Plugin - commandLine\n get commandLine() {\n return this._commandLine;\n }\n set commandLine(value) {\n this._commandLine = this.coerceBooleanProperty(value);\n }\n ngOnChanges() {\n this.loadContent();\n }\n loadContent() {\n if (this.data != null) {\n this.handleData();\n return;\n }\n if (this.src != null) {\n this.handleSrc();\n return;\n }\n }\n ngAfterViewInit() {\n if (!this.data && !this.src) {\n this.handleTransclusion();\n }\n this.markdownService.reload$.pipe(takeUntil(this.destroyed$)).subscribe(() => this.loadContent());\n }\n ngOnDestroy() {\n this.destroyed$.next();\n this.destroyed$.complete();\n }\n render(markdown, decodeHtml = false) {\n const parsedOptions = {\n decodeHtml,\n inline: this.inline,\n emoji: this.emoji,\n mermaid: this.mermaid\n };\n const renderOptions = {\n clipboard: this.clipboard,\n clipboardOptions: {\n buttonComponent: this.clipboardButtonComponent,\n buttonTemplate: this.clipboardButtonTemplate\n },\n katex: this.katex,\n katexOptions: this.katexOptions,\n mermaid: this.mermaid,\n mermaidOptions: this.mermaidOptions\n };\n const parsed = this.markdownService.parse(markdown, parsedOptions);\n this.element.nativeElement.innerHTML = parsed;\n this.handlePlugins();\n this.markdownService.render(this.element.nativeElement, renderOptions, this.viewContainerRef);\n this.ready.emit();\n }\n coerceBooleanProperty(value) {\n return value != null && `${String(value)}` !== 'false';\n }\n handleData() {\n this.render(this.data);\n }\n handleSrc() {\n this.markdownService.getSource(this.src).subscribe({\n next: markdown => {\n this.render(markdown);\n this.load.emit(markdown);\n },\n error: error => this.error.emit(error)\n });\n }\n handleTransclusion() {\n this.render(this.element.nativeElement.innerHTML, true);\n }\n handlePlugins() {\n if (this.commandLine) {\n this.setPluginClass(this.element.nativeElement, PrismPlugin.CommandLine);\n this.setPluginOptions(this.element.nativeElement, {\n dataFilterOutput: this.filterOutput,\n dataHost: this.host,\n dataPrompt: this.prompt,\n dataOutput: this.output,\n dataUser: this.user\n });\n }\n if (this.lineHighlight) {\n this.setPluginOptions(this.element.nativeElement, {\n dataLine: this.line,\n dataLineOffset: this.lineOffset\n });\n }\n if (this.lineNumbers) {\n this.setPluginClass(this.element.nativeElement, PrismPlugin.LineNumbers);\n this.setPluginOptions(this.element.nativeElement, {\n dataStart: this.start\n });\n }\n }\n setPluginClass(element, plugin) {\n const preElements = element.querySelectorAll('pre');\n for (let i = 0; i < preElements.length; i++) {\n const classes = plugin instanceof Array ? plugin : [plugin];\n preElements.item(i).classList.add(...classes);\n }\n }\n setPluginOptions(element, options) {\n const preElements = element.querySelectorAll('pre');\n for (let i = 0; i < preElements.length; i++) {\n Object.keys(options).forEach(option => {\n const attributeValue = options[option];\n if (attributeValue) {\n const attributeName = this.toLispCase(option);\n preElements.item(i).setAttribute(attributeName, attributeValue.toString());\n }\n });\n }\n }\n toLispCase(value) {\n const upperChars = value.match(/([A-Z])/g);\n if (!upperChars) {\n return value;\n }\n let str = value.toString();\n for (let i = 0, n = upperChars.length; i < n; i++) {\n str = str.replace(new RegExp(upperChars[i]), '-' + upperChars[i].toLowerCase());\n }\n if (str.slice(0, 1) === '-') {\n str = str.slice(1);\n }\n return str;\n }\n }\n MarkdownComponent.ɵfac = function MarkdownComponent_Factory(t) {\n return new (t || MarkdownComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(MarkdownService), i0.ɵɵdirectiveInject(i0.ViewContainerRef));\n };\n MarkdownComponent.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MarkdownComponent,\n selectors: [[\"markdown\"], [\"\", \"markdown\", \"\"]],\n inputs: {\n data: \"data\",\n src: \"src\",\n inline: \"inline\",\n clipboard: \"clipboard\",\n clipboardButtonComponent: \"clipboardButtonComponent\",\n clipboardButtonTemplate: \"clipboardButtonTemplate\",\n emoji: \"emoji\",\n katex: \"katex\",\n katexOptions: \"katexOptions\",\n mermaid: \"mermaid\",\n mermaidOptions: \"mermaidOptions\",\n lineHighlight: \"lineHighlight\",\n line: \"line\",\n lineOffset: \"lineOffset\",\n lineNumbers: \"lineNumbers\",\n start: \"start\",\n commandLine: \"commandLine\",\n filterOutput: \"filterOutput\",\n host: \"host\",\n prompt: \"prompt\",\n output: \"output\",\n user: \"user\"\n },\n outputs: {\n error: \"error\",\n load: \"load\",\n ready: \"ready\"\n },\n features: [i0.ɵɵNgOnChangesFeature],\n ngContentSelectors: _c0,\n decls: 1,\n vars: 0,\n template: function MarkdownComponent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵprojection(0);\n }\n },\n encapsulation: 2\n });\n return MarkdownComponent;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MarkdownPipe = /*#__PURE__*/(() => {\n class MarkdownPipe {\n constructor(domSanitizer, elementRef, markdownService, viewContainerRef, zone) {\n this.domSanitizer = domSanitizer;\n this.elementRef = elementRef;\n this.markdownService = markdownService;\n this.viewContainerRef = viewContainerRef;\n this.zone = zone;\n }\n transform(value, options) {\n if (value == null) {\n return '';\n }\n if (typeof value !== 'string') {\n console.error(`MarkdownPipe has been invoked with an invalid value type [${typeof value}]`);\n return value;\n }\n const markdown = this.markdownService.parse(value, options);\n this.zone.onStable.pipe(first()).subscribe(() => this.markdownService.render(this.elementRef.nativeElement, options, this.viewContainerRef));\n return this.domSanitizer.bypassSecurityTrustHtml(markdown);\n }\n }\n MarkdownPipe.ɵfac = function MarkdownPipe_Factory(t) {\n return new (t || MarkdownPipe)(i0.ɵɵdirectiveInject(i4.DomSanitizer, 16), i0.ɵɵdirectiveInject(i0.ElementRef, 16), i0.ɵɵdirectiveInject(MarkdownService, 16), i0.ɵɵdirectiveInject(i0.ViewContainerRef, 16), i0.ɵɵdirectiveInject(i0.NgZone, 16));\n };\n MarkdownPipe.ɵpipe = /* @__PURE__ */i0.ɵɵdefinePipe({\n name: \"markdown\",\n type: MarkdownPipe,\n pure: true\n });\n return MarkdownPipe;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst sharedDeclarations = [ClipboardButtonComponent, LanguagePipe, MarkdownComponent, MarkdownPipe];\nconst sharedEntryComponents = [ClipboardButtonComponent];\nlet MarkdownModule = /*#__PURE__*/(() => {\n class MarkdownModule {\n static forRoot(markdownModuleConfig) {\n return {\n ngModule: MarkdownModule,\n providers: [MarkdownService, markdownModuleConfig && markdownModuleConfig.loader || [], markdownModuleConfig && markdownModuleConfig.clipboardOptions || [], markdownModuleConfig && markdownModuleConfig.markedOptions || [], {\n provide: SECURITY_CONTEXT,\n useValue: markdownModuleConfig && markdownModuleConfig.sanitize != null ? markdownModuleConfig.sanitize : SecurityContext.HTML\n }]\n };\n }\n static forChild() {\n return {\n ngModule: MarkdownModule\n };\n }\n }\n MarkdownModule.ɵfac = function MarkdownModule_Factory(t) {\n return new (t || MarkdownModule)();\n };\n MarkdownModule.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MarkdownModule\n });\n MarkdownModule.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [CommonModule]\n });\n return MarkdownModule;\n})();\n(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/* eslint-disable */\nvar MermaidAPI;\n(function (MermaidAPI) {\n let SecurityLevel;\n (function (SecurityLevel) {\n /**\r\n * (default) tags in text are encoded, click functionality is disabled\r\n */\n SecurityLevel[\"Strict\"] = \"strict\";\n /**\r\n * tags in text are allowed, click functionality is enabled\r\n */\n SecurityLevel[\"Loose\"] = \"loose\";\n /**\r\n * html tags in text are allowed, (only script element is removed), click functionality is enabled\r\n */\n SecurityLevel[\"Antiscript\"] = \"antiscript\";\n /**\r\n * with this security level all rendering takes place in a sandboxed iframe.\r\n * This prevent any javascript running in the context.\r\n * This may hinder interactive functionality of the diagram like scripts,\r\n * popups in sequence diagram or links to other tabs/targets etc.\r\n */\n SecurityLevel[\"Sandbox\"] = \"sandbox\";\n })(SecurityLevel = MermaidAPI.SecurityLevel || (MermaidAPI.SecurityLevel = {}));\n let Theme;\n (function (Theme) {\n /**\r\n * Designed to modified, as the name implies it is supposed to be used as the base for making custom themes.\r\n */\n Theme[\"Base\"] = \"base\";\n /**\r\n * A theme full of light greens that is easy on the eyes.\r\n */\n Theme[\"Forest\"] = \"forest\";\n /**\r\n * A theme that would go well with other dark colored elements.\r\n */\n Theme[\"Dark\"] = \"dark\";\n /**\r\n * The default theme for all diagrams.\r\n */\n Theme[\"Default\"] = \"default\";\n /**\r\n * The theme to be used for black and white printing\r\n */\n Theme[\"Neutral\"] = \"neutral\";\n })(Theme = MermaidAPI.Theme || (MermaidAPI.Theme = {}));\n let LogLevel;\n (function (LogLevel) {\n LogLevel[LogLevel[\"Debug\"] = 1] = \"Debug\";\n LogLevel[LogLevel[\"Info\"] = 2] = \"Info\";\n LogLevel[LogLevel[\"Warn\"] = 3] = \"Warn\";\n LogLevel[LogLevel[\"Error\"] = 4] = \"Error\";\n LogLevel[LogLevel[\"Fatal\"] = 5] = \"Fatal\";\n })(LogLevel = MermaidAPI.LogLevel || (MermaidAPI.LogLevel = {}));\n})(MermaidAPI || (MermaidAPI = {}));\n\n/**\r\n * Generated bundle index. Do not edit.\r\n */\n\nexport { ClipboardButtonComponent, ClipboardOptions, ClipboardRenderOptions, ExtendedRenderer, KatexSpecificOptions, LanguagePipe, MarkdownComponent, MarkdownModule, MarkdownPipe, MarkdownService, MarkedOptions, MermaidAPI, PrismPlugin, SECURITY_CONTEXT, errorClipboardNotLoaded, errorClipboardViewContainerRequired, errorJoyPixelsNotLoaded, errorKatexNotLoaded, errorMermaidNotLoaded, errorSrcWithoutHttpClient };\n","import { NgModule } from '@angular/core';\nimport { IconComponent } from './icon.component';\n\n@NgModule({\n imports: [IconComponent],\n declarations: [],\n exports: [IconComponent],\n})\nexport class VaIconModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\n\nimport { ProjectMilestonesComponent } from './project-milestones.component';\nimport { VaIconModule } from './../va-icon/icon.module';\nimport { MarkdownModule } from 'ngx-markdown';\n\n@NgModule({\n imports: [\n CommonModule,\n MatCardModule,\n MatExpansionModule,\n MatIconModule,\n MatProgressBarModule,\n VaIconModule,\n MarkdownModule,\n ],\n declarations: [ProjectMilestonesComponent],\n exports: [ProjectMilestonesComponent, MarkdownModule],\n})\nexport class ProjectMilestonesModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { VaSanitizePipe } from './safe-html.pipe';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [VaSanitizePipe],\n exports: [VaSanitizePipe],\n})\nexport class VaSafeHtmlModule {}\n","import { ElementRef, Directive, Inject } from '@angular/core';\n\n@Directive({ standalone: true, selector: '[vaSearchInput]' })\nexport class VaSearchInputDirective {\n constructor(@Inject(ElementRef) private elementRef: ElementRef) {}\n\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n selector(): void {\n this.elementRef.nativeElement.select();\n }\n}\n","import { Injectable } from '@angular/core';\nimport { LocalStorageService } from '../local-storage.service';\n\nconst SEARCH_TERM_FILTER = 'search-term-filter';\n@Injectable({ providedIn: 'root' })\nexport class SearchBoxService {\n constructor(private localStorageService: LocalStorageService) {}\n\n saveSearchTerm(contextKey: string, input: string): void {\n this.localStorageService.set(contextKey || '' + SEARCH_TERM_FILTER, input);\n }\n\n getSearchTerm(contextKey: string): string | null {\n return this.localStorageService.get(contextKey || '' + SEARCH_TERM_FILTER);\n }\n}\n","import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';\nimport { VaSearchInputDirective } from './search-box-input.directive';\nimport { SearchBoxService } from './search-box.service';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { MatIconModule } from '@angular/material/icon';\n\n@Component({\n standalone: true,\n imports: [CommonModule, FormsModule, MatIconModule, VaSearchInputDirective],\n selector: 'va-search-box',\n template: `\n \n \n search \n
\n `,\n styleUrls: ['search-box.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SearchBoxComponent implements OnInit {\n @ViewChild(VaSearchInputDirective, { static: true }) inputArea: VaSearchInputDirective;\n @Output() update = new EventEmitter();\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() submit = new EventEmitter();\n @Input() highlightWhenSelected = true;\n @Input() disabled = false;\n @Input() initial = '';\n @Input() enabledSaveSearchTerm = false;\n @Input() contextKey = '';\n @Input() placeholder = '';\n isSelected = false;\n constructor(private searchBoxService: SearchBoxService) {}\n\n ngOnInit(): void {\n if (!this.initial && this.enabledSaveSearchTerm) {\n this.initial = this.searchBoxService.getSearchTerm(this.contextKey);\n if (this.initial) {\n this.update.emit(this.initial);\n }\n }\n }\n\n submitSearch(term: string): void {\n this.submit.emit(term);\n if (this.enabledSaveSearchTerm) {\n this.searchBoxService.saveSearchTerm(this.contextKey, term);\n }\n this.inputArea.selector();\n }\n\n updateSearch(term: string): void {\n this.update.emit(term);\n if (this.enabledSaveSearchTerm) {\n this.searchBoxService.saveSearchTerm(this.contextKey, term);\n }\n }\n\n focusOnSearchBox(): void {\n window.setTimeout(() => this.inputArea.focus(), 0);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { SearchBoxComponent } from './search-box.component';\n\n@NgModule({\n imports: [SearchBoxComponent],\n exports: [SearchBoxComponent],\n})\nexport class VaSearchBoxModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatMenuModule } from '@angular/material/menu';\n\nimport { VaActionMenuComponent } from './va-action-menu.component';\n\n@NgModule({\n imports: [CommonModule, MatButtonModule, MatIconModule, MatMenuModule],\n declarations: [VaActionMenuComponent],\n exports: [VaActionMenuComponent],\n})\nexport class VaActionMenuModule {}\n","import { NgModule } from '@angular/core';\nimport { VaBadgeComponent } from './va-badge.component';\n\n@NgModule({\n declarations: [VaBadgeComponent],\n exports: [VaBadgeComponent],\n})\nexport class VaBadgeModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule } from '@angular/router';\nimport { TranslateModule } from '@ngx-translate/core';\n\nimport { VaBreadcrumbsComponent } from './va-breadcrumbs.component';\nimport { LexiconModule } from '@galaxy/lexicon';\nimport baseTranslation from '../assets/i18n/en_devel.json';\nimport { WEBLATE_COMPONENT_NAME } from '../constants';\n\n@NgModule({\n declarations: [VaBreadcrumbsComponent],\n imports: [\n CommonModule,\n RouterModule,\n TranslateModule,\n LexiconModule.forChild({\n componentName: WEBLATE_COMPONENT_NAME,\n baseTranslation: baseTranslation,\n }),\n ],\n exports: [VaBreadcrumbsComponent],\n})\nexport class VaBreadcrumbsModule {}\n","import * as i0 from '@angular/core';\nimport { Component, ViewEncapsulation, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { MatCommonModule } from '@angular/material/core';\nlet MatDivider = /*#__PURE__*/(() => {\n class MatDivider {\n constructor() {\n this._vertical = false;\n this._inset = false;\n }\n /** Whether the divider is vertically aligned. */\n get vertical() {\n return this._vertical;\n }\n set vertical(value) {\n this._vertical = coerceBooleanProperty(value);\n }\n /** Whether the divider is an inset divider. */\n get inset() {\n return this._inset;\n }\n set inset(value) {\n this._inset = coerceBooleanProperty(value);\n }\n static {\n this.ɵfac = function MatDivider_Factory(t) {\n return new (t || MatDivider)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatDivider,\n selectors: [[\"mat-divider\"]],\n hostAttrs: [\"role\", \"separator\", 1, \"mat-divider\"],\n hostVars: 7,\n hostBindings: function MatDivider_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"aria-orientation\", ctx.vertical ? \"vertical\" : \"horizontal\");\n i0.ɵɵclassProp(\"mat-divider-vertical\", ctx.vertical)(\"mat-divider-horizontal\", !ctx.vertical)(\"mat-divider-inset\", ctx.inset);\n }\n },\n inputs: {\n vertical: \"vertical\",\n inset: \"inset\"\n },\n standalone: true,\n features: [i0.ɵɵStandaloneFeature],\n decls: 0,\n vars: 0,\n template: function MatDivider_Template(rf, ctx) {},\n styles: [\".mat-divider{display:block;margin:0;border-top-style:solid;border-top-color:var(--mat-divider-color);border-top-width:var(--mat-divider-width)}.mat-divider.mat-divider-vertical{border-top:0;border-right-style:solid;border-right-color:var(--mat-divider-color);border-right-width:var(--mat-divider-width)}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatDivider;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatDividerModule = /*#__PURE__*/(() => {\n class MatDividerModule {\n static {\n this.ɵfac = function MatDividerModule_Factory(t) {\n return new (t || MatDividerModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MatDividerModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [MatCommonModule, MatCommonModule]\n });\n }\n }\n return MatDividerModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MatDivider, MatDividerModule };\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatRippleModule } from '@angular/material/core';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { CommonPipesModule } from '../common-pipes/common-pipes.module';\nimport { VaFilterChipContainerComponent } from './va-filter-chip-container/va-filter-chip-container.component';\nimport { VaFilterChipComponent } from './va-filter-chip/va-filter-chip.component';\nimport { LexiconModule } from '@galaxy/lexicon';\nimport baseTranslation from '../assets/i18n/en_devel.json';\nimport { WEBLATE_COMPONENT_NAME } from '../constants';\n\n@NgModule({\n declarations: [VaFilterChipContainerComponent, VaFilterChipComponent],\n exports: [VaFilterChipContainerComponent, VaFilterChipComponent],\n imports: [\n CommonModule,\n MatIconModule,\n TranslateModule,\n LexiconModule.forChild({\n componentName: WEBLATE_COMPONENT_NAME,\n baseTranslation: baseTranslation,\n }),\n CommonPipesModule,\n MatDialogModule,\n MatDividerModule,\n MatButtonModule,\n MatRippleModule,\n MatMenuModule,\n ],\n})\nexport class VaFilterChipsModule {}\n","import * as i0 from '@angular/core';\nimport { InjectionToken, Injectable, Optional, Inject, NgModule } from '@angular/core';\nimport { DateAdapter, MAT_DATE_LOCALE, MAT_DATE_FORMATS } from '@angular/material/core';\nimport * as _rollupMoment from 'moment';\nimport _rollupMoment__default from 'moment';\nconst moment = _rollupMoment__default || _rollupMoment;\n/** InjectionToken for moment date adapter to configure options. */\nconst MAT_MOMENT_DATE_ADAPTER_OPTIONS = /*#__PURE__*/new InjectionToken('MAT_MOMENT_DATE_ADAPTER_OPTIONS', {\n providedIn: 'root',\n factory: MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY\n});\n/** @docs-private */\nfunction MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY() {\n return {\n useUtc: false\n };\n}\n/** Creates an array and fills it with values. */\nfunction range(length, valueFunction) {\n const valuesArray = Array(length);\n for (let i = 0; i < length; i++) {\n valuesArray[i] = valueFunction(i);\n }\n return valuesArray;\n}\n/** Adapts Moment.js Dates for use with Angular Material. */\nlet MomentDateAdapter = /*#__PURE__*/(() => {\n class MomentDateAdapter extends DateAdapter {\n constructor(dateLocale, _options) {\n super();\n this._options = _options;\n this.setLocale(dateLocale || moment.locale());\n }\n setLocale(locale) {\n super.setLocale(locale);\n let momentLocaleData = moment.localeData(locale);\n this._localeData = {\n firstDayOfWeek: momentLocaleData.firstDayOfWeek(),\n longMonths: momentLocaleData.months(),\n shortMonths: momentLocaleData.monthsShort(),\n dates: range(31, i => this.createDate(2017, 0, i + 1).format('D')),\n longDaysOfWeek: momentLocaleData.weekdays(),\n shortDaysOfWeek: momentLocaleData.weekdaysShort(),\n narrowDaysOfWeek: momentLocaleData.weekdaysMin()\n };\n }\n getYear(date) {\n return this.clone(date).year();\n }\n getMonth(date) {\n return this.clone(date).month();\n }\n getDate(date) {\n return this.clone(date).date();\n }\n getDayOfWeek(date) {\n return this.clone(date).day();\n }\n getMonthNames(style) {\n // Moment.js doesn't support narrow month names, so we just use short if narrow is requested.\n return style == 'long' ? this._localeData.longMonths : this._localeData.shortMonths;\n }\n getDateNames() {\n return this._localeData.dates;\n }\n getDayOfWeekNames(style) {\n if (style == 'long') {\n return this._localeData.longDaysOfWeek;\n }\n if (style == 'short') {\n return this._localeData.shortDaysOfWeek;\n }\n return this._localeData.narrowDaysOfWeek;\n }\n getYearName(date) {\n return this.clone(date).format('YYYY');\n }\n getFirstDayOfWeek() {\n return this._localeData.firstDayOfWeek;\n }\n getNumDaysInMonth(date) {\n return this.clone(date).daysInMonth();\n }\n clone(date) {\n return date.clone().locale(this.locale);\n }\n createDate(year, month, date) {\n // Moment.js will create an invalid date if any of the components are out of bounds, but we\n // explicitly check each case so we can throw more descriptive errors.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (month < 0 || month > 11) {\n throw Error(`Invalid month index \"${month}\". Month index has to be between 0 and 11.`);\n }\n if (date < 1) {\n throw Error(`Invalid date \"${date}\". Date has to be greater than 0.`);\n }\n }\n const result = this._createMoment({\n year,\n month,\n date\n }).locale(this.locale);\n // If the result isn't valid, the date must have been out of bounds for this month.\n if (!result.isValid() && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`Invalid date \"${date}\" for month with index \"${month}\".`);\n }\n return result;\n }\n today() {\n return this._createMoment().locale(this.locale);\n }\n parse(value, parseFormat) {\n if (value && typeof value == 'string') {\n return this._createMoment(value, parseFormat, this.locale);\n }\n return value ? this._createMoment(value).locale(this.locale) : null;\n }\n format(date, displayFormat) {\n date = this.clone(date);\n if (!this.isValid(date) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('MomentDateAdapter: Cannot format invalid date.');\n }\n return date.format(displayFormat);\n }\n addCalendarYears(date, years) {\n return this.clone(date).add({\n years\n });\n }\n addCalendarMonths(date, months) {\n return this.clone(date).add({\n months\n });\n }\n addCalendarDays(date, days) {\n return this.clone(date).add({\n days\n });\n }\n toIso8601(date) {\n return this.clone(date).format();\n }\n /**\n * Returns the given value if given a valid Moment or null. Deserializes valid ISO 8601 strings\n * (https://www.ietf.org/rfc/rfc3339.txt) and valid Date objects into valid Moments and empty\n * string into null. Returns an invalid date for all other values.\n */\n deserialize(value) {\n let date;\n if (value instanceof Date) {\n date = this._createMoment(value).locale(this.locale);\n } else if (this.isDateInstance(value)) {\n // Note: assumes that cloning also sets the correct locale.\n return this.clone(value);\n }\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n date = this._createMoment(value, moment.ISO_8601).locale(this.locale);\n }\n if (date && this.isValid(date)) {\n return this._createMoment(date).locale(this.locale);\n }\n return super.deserialize(value);\n }\n isDateInstance(obj) {\n return moment.isMoment(obj);\n }\n isValid(date) {\n return this.clone(date).isValid();\n }\n invalid() {\n return moment.invalid();\n }\n /** Creates a Moment instance while respecting the current UTC settings. */\n _createMoment(date, format, locale) {\n const {\n strict,\n useUtc\n } = this._options || {};\n return useUtc ? moment.utc(date, format, locale, strict) : moment(date, format, locale, strict);\n }\n static {\n this.ɵfac = function MomentDateAdapter_Factory(t) {\n return new (t || MomentDateAdapter)(i0.ɵɵinject(MAT_DATE_LOCALE, 8), i0.ɵɵinject(MAT_MOMENT_DATE_ADAPTER_OPTIONS, 8));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: MomentDateAdapter,\n factory: MomentDateAdapter.ɵfac\n });\n }\n }\n return MomentDateAdapter;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst MAT_MOMENT_DATE_FORMATS = {\n parse: {\n dateInput: 'l'\n },\n display: {\n dateInput: 'l',\n monthYearLabel: 'MMM YYYY',\n dateA11yLabel: 'LL',\n monthYearA11yLabel: 'MMMM YYYY'\n }\n};\nlet MomentDateModule = /*#__PURE__*/(() => {\n class MomentDateModule {\n static {\n this.ɵfac = function MomentDateModule_Factory(t) {\n return new (t || MomentDateModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MomentDateModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [{\n provide: DateAdapter,\n useClass: MomentDateAdapter,\n deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS]\n }]\n });\n }\n }\n return MomentDateModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatMomentDateModule = /*#__PURE__*/(() => {\n class MatMomentDateModule {\n static {\n this.ɵfac = function MatMomentDateModule_Factory(t) {\n return new (t || MatMomentDateModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MatMomentDateModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [provideMomentDateAdapter()]\n });\n }\n }\n return MatMomentDateModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction provideMomentDateAdapter(formats = MAT_MOMENT_DATE_FORMATS, options) {\n const providers = [{\n provide: DateAdapter,\n useClass: MomentDateAdapter,\n deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS]\n }, {\n provide: MAT_DATE_FORMATS,\n useValue: formats\n }];\n if (options) {\n providers.push({\n provide: MAT_MOMENT_DATE_ADAPTER_OPTIONS,\n useValue: options\n });\n }\n return providers;\n}\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_MOMENT_DATE_ADAPTER_OPTIONS, MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY, MAT_MOMENT_DATE_FORMATS, MatMomentDateModule, MomentDateAdapter, MomentDateModule, provideMomentDateAdapter };\n","import * as i0 from '@angular/core';\nimport { InjectionToken, Directive, Optional, Inject, inject, Input, ANIMATION_MODULE_TYPE, ContentChildren, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, EventEmitter, Output, forwardRef, NgModule } from '@angular/core';\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport * as i1 from '@angular/cdk/platform';\nimport { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';\nimport { RippleRenderer, MAT_RIPPLE_GLOBAL_OPTIONS, MatCommonModule, MatRippleModule, MatPseudoCheckboxModule } from '@angular/material/core';\nimport { Subscription, merge, Subject } from 'rxjs';\nimport { CdkObserveContent, ObserversModule } from '@angular/cdk/observers';\nimport { NgTemplateOutlet, CommonModule } from '@angular/common';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { FocusKeyManager } from '@angular/cdk/a11y';\nimport { SelectionModel } from '@angular/cdk/collections';\nimport { ENTER, SPACE, A, hasModifierKey } from '@angular/cdk/keycodes';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { takeUntil } from 'rxjs/operators';\n\n/**\n * Injection token that can be used to reference instances of an `ListOption`. It serves\n * as alternative token to an actual implementation which could result in undesired\n * retention of the class or circular references breaking runtime execution.\n * @docs-private\n */\nconst _c0 = [\"*\"];\nconst _c1 = \"@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-list-divider::after{content:\\\"\\\";display:block;border-bottom-width:1px;border-bottom-style:solid}}.mdc-list{margin:0;padding:8px 0;list-style-type:none}.mdc-list:focus{outline:none}.mdc-list-item__wrapper{display:block}.mdc-list-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;align-items:stretch;cursor:pointer}.mdc-list-item:focus{outline:none}.mdc-list-item.mdc-list-item--with-one-line{height:48px}.mdc-list-item.mdc-list-item--with-two-lines{height:64px}.mdc-list-item.mdc-list-item--with-three-lines{height:88px}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__start{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--disabled,.mdc-list-item.mdc-list-item--non-interactive{cursor:auto}.mdc-list-item:not(.mdc-list-item--selected):focus::before,.mdc-list-item.mdc-ripple-upgraded--background-focused::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\\\"\\\";pointer-events:none}@media screen and (forced-colors: active){.mdc-list-item:not(.mdc-list-item--selected):focus::before,.mdc-list-item.mdc-ripple-upgraded--background-focused::before{border-color:CanvasText}}.mdc-list-item.mdc-list-item--selected::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:3px double rgba(0,0,0,0);border-radius:inherit;content:\\\"\\\";pointer-events:none}@media screen and (forced-colors: active){.mdc-list-item.mdc-list-item--selected::before{border-color:CanvasText}}.mdc-list-item.mdc-list-item--selected:focus::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:3px solid rgba(0,0,0,0);border-radius:inherit;content:\\\"\\\";pointer-events:none}@media screen and (forced-colors: active){.mdc-list-item.mdc-list-item--selected:focus::before{border-color:CanvasText}}a.mdc-list-item{color:inherit;text-decoration:none}.mdc-list-item__start{fill:currentColor;flex-shrink:0;pointer-events:none}.mdc-list-item__end{flex-shrink:0;pointer-events:none}.mdc-list-item__content{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;align-self:center;flex:1;pointer-events:none}.mdc-list-item--with-two-lines .mdc-list-item__content,.mdc-list-item--with-three-lines .mdc-list-item__content{align-self:stretch}.mdc-list-item__content[for]{pointer-events:none}.mdc-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-three-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item__secondary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal}.mdc-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-three-lines .mdc-list-item__secondary-text{white-space:normal;line-height:20px}.mdc-list-item--with-overline .mdc-list-item__secondary-text{white-space:nowrap;line-height:auto}.mdc-list-item__overline-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:24px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-three-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-three-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-three-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-avatar.mdc-list-item,.mdc-list-item--with-leading-avatar.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-avatar .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-avatar .mdc-list-item__start,.mdc-list-item--with-leading-avatar .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-avatar .mdc-list-item__start{border-radius:50%}.mdc-list-item--with-leading-icon.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-icon.mdc-list-item,.mdc-list-item--with-leading-icon.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-icon .mdc-list-item__start{margin-left:16px;margin-right:32px}[dir=rtl] .mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--with-leading-icon .mdc-list-item__start[dir=rtl]{margin-left:32px;margin-right:16px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-thumbnail.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-thumbnail.mdc-list-item,.mdc-list-item--with-leading-thumbnail.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-thumbnail .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-thumbnail .mdc-list-item__start,.mdc-list-item--with-leading-thumbnail .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-image.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-image.mdc-list-item,.mdc-list-item--with-leading-image.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-image .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-image .mdc-list-item__start,.mdc-list-item--with-leading-image .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-image.mdc-list-item--with-one-line{height:72px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-video.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-video.mdc-list-item,.mdc-list-item--with-leading-video.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-video .mdc-list-item__start{margin-left:0;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-video .mdc-list-item__start,.mdc-list-item--with-leading-video .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-video.mdc-list-item--with-one-line{height:72px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-checkbox.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-checkbox.mdc-list-item,.mdc-list-item--with-leading-checkbox.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:8px;margin-right:24px}[dir=rtl] .mdc-list-item--with-leading-checkbox .mdc-list-item__start,.mdc-list-item--with-leading-checkbox .mdc-list-item__start[dir=rtl]{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-radio.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-radio.mdc-list-item,.mdc-list-item--with-leading-radio.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-radio .mdc-list-item__start{margin-left:8px;margin-right:24px}[dir=rtl] .mdc-list-item--with-leading-radio .mdc-list-item__start,.mdc-list-item--with-leading-radio .mdc-list-item__start[dir=rtl]{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-switch.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-switch.mdc-list-item,.mdc-list-item--with-leading-switch.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-switch .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-switch .mdc-list-item__start,.mdc-list-item--with-leading-switch .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-trailing-icon.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-icon.mdc-list-item,.mdc-list-item--with-trailing-icon.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-icon .mdc-list-item__end{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-icon .mdc-list-item__end,.mdc-list-item--with-trailing-icon .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:flex-start;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-meta.mdc-list-item,.mdc-list-item--with-trailing-meta.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-meta .mdc-list-item__end{margin-left:28px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-meta .mdc-list-item__end,.mdc-list-item--with-trailing-meta .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:28px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-trailing-meta .mdc-list-item__end{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-caption-font-family);font-size:var(--mdc-typography-caption-font-size);line-height:var(--mdc-typography-caption-line-height);font-weight:var(--mdc-typography-caption-font-weight);letter-spacing:var(--mdc-typography-caption-letter-spacing);text-decoration:var(--mdc-typography-caption-text-decoration);text-transform:var(--mdc-typography-caption-text-transform)}.mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item,.mdc-list-item--with-trailing-checkbox.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:24px;margin-right:8px}[dir=rtl] .mdc-list-item--with-trailing-checkbox .mdc-list-item__end,.mdc-list-item--with-trailing-checkbox .mdc-list-item__end[dir=rtl]{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-radio.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item,.mdc-list-item--with-trailing-radio.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-radio .mdc-list-item__end{margin-left:24px;margin-right:8px}[dir=rtl] .mdc-list-item--with-trailing-radio .mdc-list-item__end,.mdc-list-item--with-trailing-radio .mdc-list-item__end[dir=rtl]{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-radio.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-switch.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-switch.mdc-list-item,.mdc-list-item--with-trailing-switch.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-switch .mdc-list-item__end{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-switch .mdc-list-item__end,.mdc-list-item--with-trailing-switch .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-switch.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item--with-overline.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-overline.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-overline.mdc-list-item--with-three-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-overline.mdc-list-item--with-three-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:0}.mdc-list-item{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-list-item,.mdc-list-item[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-list-group .mdc-deprecated-list{padding:0}.mdc-list-group__subheader{margin:calc((3rem - 1.5rem)/2) 16px}.mdc-list-divider{padding:0;background-clip:content-box}.mdc-list-divider.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset{padding-left:16px;padding-right:auto}[dir=rtl] .mdc-list-divider.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset,.mdc-list-divider.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset[dir=rtl]{padding-left:auto;padding-right:16px}.mdc-list-divider.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset{padding-left:auto;padding-right:16px}[dir=rtl] .mdc-list-divider.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset,.mdc-list-divider.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset[dir=rtl]{padding-left:16px;padding-right:auto}.mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset{padding-left:0px;padding-right:auto}[dir=rtl] .mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset[dir=rtl]{padding-left:auto;padding-right:0px}[dir=rtl] .mdc-list-divider,.mdc-list-divider[dir=rtl]{padding:0}.mdc-list-item{background-color:var(--mdc-list-list-item-container-color)}.mdc-list-item.mdc-list-item--selected{background-color:var(--mdc-list-list-item-selected-container-color)}.mdc-list-item--with-one-line{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-one-line.mdc-list-item--with-leading-avatar,.mdc-list-item--with-one-line.mdc-list-item--with-leading-icon,.mdc-list-item--with-one-line.mdc-list-item--with-leading-thumbnail,.mdc-list-item--with-one-line.mdc-list-item--with-leading-checkbox,.mdc-list-item--with-one-line.mdc-list-item--with-leading-radio,.mdc-list-item--with-one-line.mdc-list-item--with-leading-switch{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-one-line.mdc-list-item--with-leading-image,.mdc-list-item--with-one-line.mdc-list-item--with-leading-video{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-two-lines{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-two-lines.mdc-list-item--with-leading-avatar,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-icon,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-thumbnail,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-checkbox,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-radio,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-switch,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-image,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-video{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-three-lines{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item.mdc-list-item--with-one-line{height:var(--mdc-list-list-item-one-line-container-height)}.mdc-list-item.mdc-list-item--with-two-lines{height:var(--mdc-list-list-item-two-line-container-height)}.mdc-list-item.mdc-list-item--with-three-lines{height:var(--mdc-list-list-item-three-line-container-height)}.mdc-list-item__primary-text{color:var(--mdc-list-list-item-label-text-color)}.mdc-list-item__primary-text{font-family:var(--mdc-list-list-item-label-text-font);line-height:var(--mdc-list-list-item-label-text-line-height);font-size:var(--mdc-list-list-item-label-text-size);font-weight:var(--mdc-list-list-item-label-text-weight);letter-spacing:var(--mdc-list-list-item-label-text-tracking)}.mdc-list-item__secondary-text{color:var(--mdc-list-list-item-supporting-text-color)}.mdc-list-item__secondary-text{font-family:var(--mdc-list-list-item-supporting-text-font);line-height:var(--mdc-list-list-item-supporting-text-line-height);font-size:var(--mdc-list-list-item-supporting-text-size);font-weight:var(--mdc-list-list-item-supporting-text-weight);letter-spacing:var(--mdc-list-list-item-supporting-text-tracking)}.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mdc-list-list-item-leading-icon-color)}.mdc-list-item--with-leading-icon .mdc-list-item__start{width:var(--mdc-list-list-item-leading-icon-size);height:var(--mdc-list-list-item-leading-icon-size)}.mdc-list-item--with-leading-icon .mdc-list-item__start>i{font-size:var(--mdc-list-list-item-leading-icon-size)}.mdc-list-item--with-leading-icon .mdc-list-item__start .mdc-list-item__icon{font-size:var(--mdc-list-list-item-leading-icon-size);width:var(--mdc-list-list-item-leading-icon-size);height:var(--mdc-list-list-item-leading-icon-size)}.mdc-list-item--with-leading-icon .mdc-list-item__start .mdc-list-item__icon,.mdc-list-item--with-leading-icon .mdc-list-item__start .mdc-list-item__icon>.materialdesignWizIconSvgsSvgIcon{display:block}.mdc-list-item--with-leading-avatar .mdc-list-item__start{width:var(--mdc-list-list-item-leading-avatar-size);height:var(--mdc-list-list-item-leading-avatar-size)}.mdc-list-item.mdc-list-item--with-trailing-meta .mdc-list-item__end{color:var(--mdc-list-list-item-trailing-supporting-text-color)}.mdc-list-item--with-trailing-meta .mdc-list-item__end{font-family:var(--mdc-list-list-item-trailing-supporting-text-font);line-height:var(--mdc-list-list-item-trailing-supporting-text-line-height);font-size:var(--mdc-list-list-item-trailing-supporting-text-size);font-weight:var(--mdc-list-list-item-trailing-supporting-text-weight);letter-spacing:var(--mdc-list-list-item-trailing-supporting-text-tracking)}.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-trailing-icon-color)}.mdc-list-item--with-trailing-icon .mdc-list-item__end{width:var(--mdc-list-list-item-trailing-icon-size);height:var(--mdc-list-list-item-trailing-icon-size)}.mdc-list-item--with-trailing-icon .mdc-list-item__end>i{font-size:var(--mdc-list-list-item-trailing-icon-size)}.mdc-list-item--with-trailing-icon .mdc-list-item__end .mdc-list-item__icon{font-size:var(--mdc-list-list-item-trailing-icon-size);width:var(--mdc-list-list-item-trailing-icon-size);height:var(--mdc-list-list-item-trailing-icon-size)}.mdc-list-item--with-trailing-icon .mdc-list-item__end .mdc-list-item__icon,.mdc-list-item--with-trailing-icon .mdc-list-item__end .mdc-list-item__icon>.materialdesignWizIconSvgsSvgIcon{display:block}.mdc-list-item--selected.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-selected-trailing-icon-color)}.mdc-list-item--disabled .mdc-list-item__start,.mdc-list-item--disabled .mdc-list-item__content,.mdc-list-item--disabled .mdc-list-item__end{opacity:1}.mdc-list-item--disabled .mdc-list-item__primary-text,.mdc-list-item--disabled .mdc-list-item__secondary-text,.mdc-list-item--disabled .mdc-list-item__overline-text{opacity:var(--mdc-list-list-item-disabled-label-text-opacity)}.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mdc-list-list-item-disabled-leading-icon-color)}.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start{opacity:var(--mdc-list-list-item-disabled-leading-icon-opacity)}.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-disabled-trailing-icon-color)}.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end{opacity:var(--mdc-list-list-item-disabled-trailing-icon-opacity)}.mdc-list-item:hover .mdc-list-item__primary-text{color:var(--mdc-list-list-item-hover-label-text-color)}.mdc-list-item--with-leading-icon:hover .mdc-list-item__start{color:var(--mdc-list-list-item-hover-leading-icon-color)}.mdc-list-item--with-trailing-icon:hover .mdc-list-item__end{color:var(--mdc-list-list-item-hover-trailing-icon-color)}.mdc-list-item:focus .mdc-list-item__primary-text{color:var(--mdc-list-list-item-focus-label-text-color)}.mdc-list-item.mdc-list-item--disabled .mdc-list-item__primary-text{color:var(--mdc-list-list-item-disabled-label-text-color)}.mdc-list-item:hover::before{background-color:var(--mdc-list-list-item-hover-state-layer-color);opacity:var(--mdc-list-list-item-hover-state-layer-opacity)}.mdc-list-item.mdc-list-item--disabled::before{background-color:var(--mdc-list-list-item-disabled-state-layer-color);opacity:var(--mdc-list-list-item-disabled-state-layer-opacity)}.mdc-list-item:focus::before{background-color:var(--mdc-list-list-item-focus-state-layer-color);opacity:var(--mdc-list-list-item-focus-state-layer-opacity)}.mdc-list-item--disabled .mdc-radio,.mdc-list-item--disabled .mdc-checkbox{opacity:var(--mdc-list-list-item-disabled-label-text-opacity)}.mdc-list-item--with-leading-avatar .mat-mdc-list-item-avatar{border-radius:var(--mdc-list-list-item-leading-avatar-shape);background-color:var(--mdc-list-list-item-leading-avatar-color)}.mat-mdc-list-item-icon{font-size:var(--mdc-list-list-item-leading-icon-size)}.cdk-high-contrast-active a.mdc-list-item--activated::after{content:\\\"\\\";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}.cdk-high-contrast-active a.mdc-list-item--activated [dir=rtl]::after{right:auto;left:16px}.mat-mdc-list-base{display:block}.mat-mdc-list-base .mdc-list-item__start,.mat-mdc-list-base .mdc-list-item__end,.mat-mdc-list-base .mdc-list-item__content{pointer-events:auto}.mat-mdc-list-item,.mat-mdc-list-option{width:100%;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-list-item:not(.mat-mdc-list-item-interactive),.mat-mdc-list-option:not(.mat-mdc-list-item-interactive){cursor:default}.mat-mdc-list-item .mat-divider-inset,.mat-mdc-list-option .mat-divider-inset{position:absolute;left:0;right:0;bottom:0}.mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,.mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-left:72px}[dir=rtl] .mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,[dir=rtl] .mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-right:72px}.mat-mdc-list-item-interactive::before{top:0;left:0;right:0;bottom:0;position:absolute;content:\\\"\\\";opacity:0;pointer-events:none}.mat-mdc-list-item>.mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-list-item:focus>.mat-mdc-focus-indicator::before{content:\\\"\\\"}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-line.mdc-list-item__secondary-text{white-space:nowrap;line-height:normal}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-unscoped-content.mdc-list-item__secondary-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}mat-action-list button{background:none;color:inherit;border:none;font:inherit;outline:inherit;-webkit-tap-highlight-color:rgba(0,0,0,0);text-align:start}mat-action-list button::-moz-focus-inner{border:0}.mdc-list-item--with-leading-icon .mdc-list-item__start{margin-inline-start:var(--mat-list-list-item-leading-icon-start-space);margin-inline-end:var(--mat-list-list-item-leading-icon-end-space)}a.mdc-list-item.mdc-list-item--activated{background-color:var(--mat-list-active-indicator-color)}a.mdc-list-item.mdc-list-item--activated.mdc-list-item{border-radius:var(--mat-list-active-indicator-shape)}\";\nconst _c2 = [\"unscopedContent\"];\nconst _c3 = [\"text\"];\nconst _c4 = [[[\"\", \"matListItemAvatar\", \"\"], [\"\", \"matListItemIcon\", \"\"]], [[\"\", \"matListItemTitle\", \"\"]], [[\"\", \"matListItemLine\", \"\"]], \"*\", [[\"\", \"matListItemMeta\", \"\"]], [[\"mat-divider\"]]];\nconst _c5 = [\"[matListItemAvatar],[matListItemIcon]\", \"[matListItemTitle]\", \"[matListItemLine]\", \"*\", \"[matListItemMeta]\", \"mat-divider\"];\nconst _c6 = [[[\"\", \"matListItemTitle\", \"\"]], [[\"\", \"matListItemLine\", \"\"]], \"*\", [[\"mat-divider\"]], [[\"\", \"matListItemAvatar\", \"\"], [\"\", \"matListItemIcon\", \"\"]]];\nconst _c7 = [\"[matListItemTitle]\", \"[matListItemLine]\", \"*\", \"mat-divider\", \"[matListItemAvatar],[matListItemIcon]\"];\nfunction MatListOption_ng_template_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojection(0, 4);\n }\n}\nfunction MatListOption_ng_template_2_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 9);\n i0.ɵɵelement(1, \"input\", 10);\n i0.ɵɵelementStart(2, \"div\", 11);\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(3, \"svg\", 12);\n i0.ɵɵelement(4, \"path\", 13);\n i0.ɵɵelementEnd();\n i0.ɵɵnamespaceHTML();\n i0.ɵɵelement(5, \"div\", 14);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"mdc-checkbox--disabled\", ctx_r1.disabled);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"checked\", ctx_r1.selected)(\"disabled\", ctx_r1.disabled);\n }\n}\nfunction MatListOption_ng_template_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 15);\n i0.ɵɵelement(1, \"input\", 16);\n i0.ɵɵelementStart(2, \"div\", 17);\n i0.ɵɵelement(3, \"div\", 18)(4, \"div\", 19);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"mdc-radio--disabled\", ctx_r1.disabled);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"checked\", ctx_r1.selected)(\"disabled\", ctx_r1.disabled);\n }\n}\nfunction MatListOption_Conditional_6_ng_template_1_Template(rf, ctx) {}\nfunction MatListOption_Conditional_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 4);\n i0.ɵɵtemplate(1, MatListOption_Conditional_6_ng_template_1_Template, 0, 0, \"ng-template\", 20);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵnextContext();\n const checkbox_r3 = i0.ɵɵreference(3);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngTemplateOutlet\", checkbox_r3);\n }\n}\nfunction MatListOption_Conditional_7_ng_template_1_Template(rf, ctx) {}\nfunction MatListOption_Conditional_7_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 21);\n i0.ɵɵtemplate(1, MatListOption_Conditional_7_ng_template_1_Template, 0, 0, \"ng-template\", 20);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵnextContext();\n const radio_r4 = i0.ɵɵreference(5);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngTemplateOutlet\", radio_r4);\n }\n}\nfunction MatListOption_Conditional_8_ng_template_0_Template(rf, ctx) {}\nfunction MatListOption_Conditional_8_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, MatListOption_Conditional_8_ng_template_0_Template, 0, 0, \"ng-template\", 20);\n }\n if (rf & 2) {\n i0.ɵɵnextContext();\n const icons_r5 = i0.ɵɵreference(1);\n i0.ɵɵproperty(\"ngTemplateOutlet\", icons_r5);\n }\n}\nfunction MatListOption_Conditional_15_ng_template_1_Template(rf, ctx) {}\nfunction MatListOption_Conditional_15_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 7);\n i0.ɵɵtemplate(1, MatListOption_Conditional_15_ng_template_1_Template, 0, 0, \"ng-template\", 20);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵnextContext();\n const checkbox_r3 = i0.ɵɵreference(3);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngTemplateOutlet\", checkbox_r3);\n }\n}\nfunction MatListOption_Conditional_16_ng_template_1_Template(rf, ctx) {}\nfunction MatListOption_Conditional_16_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"span\", 7);\n i0.ɵɵtemplate(1, MatListOption_Conditional_16_ng_template_1_Template, 0, 0, \"ng-template\", 20);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵnextContext();\n const radio_r4 = i0.ɵɵreference(5);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"ngTemplateOutlet\", radio_r4);\n }\n}\nfunction MatListOption_Conditional_17_ng_template_0_Template(rf, ctx) {}\nfunction MatListOption_Conditional_17_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, MatListOption_Conditional_17_ng_template_0_Template, 0, 0, \"ng-template\", 20);\n }\n if (rf & 2) {\n i0.ɵɵnextContext();\n const icons_r5 = i0.ɵɵreference(1);\n i0.ɵɵproperty(\"ngTemplateOutlet\", icons_r5);\n }\n}\nconst LIST_OPTION = /*#__PURE__*/new InjectionToken('ListOption');\n\n/**\n * Directive capturing the title of a list item. A list item usually consists of a\n * title and optional secondary or tertiary lines.\n *\n * Text content for the title never wraps. There can only be a single title per list item.\n */\nlet MatListItemTitle = /*#__PURE__*/(() => {\n class MatListItemTitle {\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n static {\n this.ɵfac = function MatListItemTitle_Factory(t) {\n return new (t || MatListItemTitle)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatListItemTitle,\n selectors: [[\"\", \"matListItemTitle\", \"\"]],\n hostAttrs: [1, \"mat-mdc-list-item-title\", \"mdc-list-item__primary-text\"],\n standalone: true\n });\n }\n }\n return MatListItemTitle;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Directive capturing a line in a list item. A list item usually consists of a\n * title and optional secondary or tertiary lines.\n *\n * Text content inside a line never wraps. There can be at maximum two lines per list item.\n */\nlet MatListItemLine = /*#__PURE__*/(() => {\n class MatListItemLine {\n constructor(_elementRef) {\n this._elementRef = _elementRef;\n }\n static {\n this.ɵfac = function MatListItemLine_Factory(t) {\n return new (t || MatListItemLine)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatListItemLine,\n selectors: [[\"\", \"matListItemLine\", \"\"]],\n hostAttrs: [1, \"mat-mdc-list-item-line\", \"mdc-list-item__secondary-text\"],\n standalone: true\n });\n }\n }\n return MatListItemLine;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Directive matching an optional meta section for list items.\n *\n * List items can reserve space at the end of an item to display a control,\n * button or additional text content.\n */\nlet MatListItemMeta = /*#__PURE__*/(() => {\n class MatListItemMeta {\n static {\n this.ɵfac = function MatListItemMeta_Factory(t) {\n return new (t || MatListItemMeta)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatListItemMeta,\n selectors: [[\"\", \"matListItemMeta\", \"\"]],\n hostAttrs: [1, \"mat-mdc-list-item-meta\", \"mdc-list-item__end\"],\n standalone: true\n });\n }\n }\n return MatListItemMeta;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * @docs-private\n *\n * MDC uses the very intuitively named classes `.mdc-list-item__start` and `.mat-list-item__end` to\n * position content such as icons or checkboxes/radios that comes either before or after the text\n * content respectively. This directive detects the placement of the checkbox/radio and applies the\n * correct MDC class to position the icon/avatar on the opposite side.\n */\nlet _MatListItemGraphicBase = /*#__PURE__*/(() => {\n class _MatListItemGraphicBase {\n constructor(_listOption) {\n this._listOption = _listOption;\n }\n _isAlignedAtStart() {\n // By default, in all list items the graphic is aligned at start. In list options,\n // the graphic is only aligned at start if the checkbox/radio is at the end.\n return !this._listOption || this._listOption?._getTogglePosition() === 'after';\n }\n static {\n this.ɵfac = function _MatListItemGraphicBase_Factory(t) {\n return new (t || _MatListItemGraphicBase)(i0.ɵɵdirectiveInject(LIST_OPTION, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: _MatListItemGraphicBase,\n hostVars: 4,\n hostBindings: function _MatListItemGraphicBase_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"mdc-list-item__start\", ctx._isAlignedAtStart())(\"mdc-list-item__end\", !ctx._isAlignedAtStart());\n }\n },\n standalone: true\n });\n }\n }\n return _MatListItemGraphicBase;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Directive matching an optional avatar within a list item.\n *\n * List items can reserve space at the beginning of an item to display an avatar.\n */\nlet MatListItemAvatar = /*#__PURE__*/(() => {\n class MatListItemAvatar extends _MatListItemGraphicBase {\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵMatListItemAvatar_BaseFactory;\n return function MatListItemAvatar_Factory(t) {\n return (ɵMatListItemAvatar_BaseFactory || (ɵMatListItemAvatar_BaseFactory = i0.ɵɵgetInheritedFactory(MatListItemAvatar)))(t || MatListItemAvatar);\n };\n })();\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatListItemAvatar,\n selectors: [[\"\", \"matListItemAvatar\", \"\"]],\n hostAttrs: [1, \"mat-mdc-list-item-avatar\"],\n standalone: true,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return MatListItemAvatar;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Directive matching an optional icon within a list item.\n *\n * List items can reserve space at the beginning of an item to display an icon.\n */\nlet MatListItemIcon = /*#__PURE__*/(() => {\n class MatListItemIcon extends _MatListItemGraphicBase {\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵMatListItemIcon_BaseFactory;\n return function MatListItemIcon_Factory(t) {\n return (ɵMatListItemIcon_BaseFactory || (ɵMatListItemIcon_BaseFactory = i0.ɵɵgetInheritedFactory(MatListItemIcon)))(t || MatListItemIcon);\n };\n })();\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatListItemIcon,\n selectors: [[\"\", \"matListItemIcon\", \"\"]],\n hostAttrs: [1, \"mat-mdc-list-item-icon\"],\n standalone: true,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return MatListItemIcon;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Injection token that can be used to provide the default options for the list module. */\nconst MAT_LIST_CONFIG = /*#__PURE__*/new InjectionToken('MAT_LIST_CONFIG');\n\n/** @docs-private */\nlet MatListBase = /*#__PURE__*/(() => {\n class MatListBase {\n constructor() {\n this._isNonInteractive = true;\n this._disableRipple = false;\n this._disabled = false;\n this._defaultOptions = inject(MAT_LIST_CONFIG, {\n optional: true\n });\n }\n /** Whether ripples for all list items is disabled. */\n get disableRipple() {\n return this._disableRipple;\n }\n set disableRipple(value) {\n this._disableRipple = coerceBooleanProperty(value);\n }\n /**\n * Whether the entire list is disabled. When disabled, the list itself and each of its list items\n * are disabled.\n */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n }\n static {\n this.ɵfac = function MatListBase_Factory(t) {\n return new (t || MatListBase)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatListBase,\n hostVars: 1,\n hostBindings: function MatListBase_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"aria-disabled\", ctx.disabled);\n }\n },\n inputs: {\n disableRipple: \"disableRipple\",\n disabled: \"disabled\"\n },\n standalone: true\n });\n }\n }\n return MatListBase;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/** @docs-private */\nlet MatListItemBase = /*#__PURE__*/(() => {\n class MatListItemBase {\n /**\n * The number of lines this list item should reserve space for. If not specified,\n * lines are inferred based on the projected content.\n *\n * Explicitly specifying the number of lines is useful if you want to acquire additional\n * space and enable the wrapping of text. The unscoped text content of a list item will\n * always be able to take up the remaining space of the item, unless it represents the title.\n *\n * A maximum of three lines is supported as per the Material Design specification.\n */\n set lines(lines) {\n this._explicitLines = coerceNumberProperty(lines, null);\n this._updateItemLines(false);\n }\n /** Whether ripples for list items are disabled. */\n get disableRipple() {\n return this.disabled || this._disableRipple || this._noopAnimations || !!this._listBase?.disableRipple;\n }\n set disableRipple(value) {\n this._disableRipple = coerceBooleanProperty(value);\n }\n /** Whether the list-item is disabled. */\n get disabled() {\n return this._disabled || !!this._listBase?.disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n }\n /**\n * Implemented as part of `RippleTarget`.\n * @docs-private\n */\n get rippleDisabled() {\n return this.disableRipple || !!this.rippleConfig.disabled;\n }\n constructor(_elementRef, _ngZone, _listBase, _platform, globalRippleOptions, animationMode) {\n this._elementRef = _elementRef;\n this._ngZone = _ngZone;\n this._listBase = _listBase;\n this._platform = _platform;\n this._explicitLines = null;\n this._disableRipple = false;\n this._disabled = false;\n this._subscriptions = new Subscription();\n this._rippleRenderer = null;\n /** Whether the list item has unscoped text content. */\n this._hasUnscopedTextContent = false;\n this.rippleConfig = globalRippleOptions || {};\n this._hostElement = this._elementRef.nativeElement;\n this._isButtonElement = this._hostElement.nodeName.toLowerCase() === 'button';\n this._noopAnimations = animationMode === 'NoopAnimations';\n if (_listBase && !_listBase._isNonInteractive) {\n this._initInteractiveListItem();\n }\n // If no type attribute is specified for a host `` element, set it to `button`. If a\n // type attribute is already specified, we do nothing. We do this for backwards compatibility.\n // TODO: Determine if we intend to continue doing this for the MDC-based list.\n if (this._isButtonElement && !this._hostElement.hasAttribute('type')) {\n this._hostElement.setAttribute('type', 'button');\n }\n }\n ngAfterViewInit() {\n this._monitorProjectedLinesAndTitle();\n this._updateItemLines(true);\n }\n ngOnDestroy() {\n this._subscriptions.unsubscribe();\n if (this._rippleRenderer !== null) {\n this._rippleRenderer._removeTriggerEvents();\n }\n }\n /** Whether the list item has icons or avatars. */\n _hasIconOrAvatar() {\n return !!(this._avatars.length || this._icons.length);\n }\n _initInteractiveListItem() {\n this._hostElement.classList.add('mat-mdc-list-item-interactive');\n this._rippleRenderer = new RippleRenderer(this, this._ngZone, this._hostElement, this._platform);\n this._rippleRenderer.setupTriggerEvents(this._hostElement);\n }\n /**\n * Subscribes to changes in the projected title and lines. Triggers a\n * item lines update whenever a change occurs.\n */\n _monitorProjectedLinesAndTitle() {\n this._ngZone.runOutsideAngular(() => {\n this._subscriptions.add(merge(this._lines.changes, this._titles.changes).subscribe(() => this._updateItemLines(false)));\n });\n }\n /**\n * Updates the lines of the list item. Based on the projected user content and optional\n * explicit lines setting, the visual appearance of the list item is determined.\n *\n * This method should be invoked whenever the projected user content changes, or\n * when the explicit lines have been updated.\n *\n * @param recheckUnscopedContent Whether the projected unscoped content should be re-checked.\n * The unscoped content is not re-checked for every update as it is a rather expensive check\n * for content that is expected to not change very often.\n */\n _updateItemLines(recheckUnscopedContent) {\n // If the updated is triggered too early before the view and content is initialized,\n // we just skip the update. After view initialization the update is triggered again.\n if (!this._lines || !this._titles || !this._unscopedContent) {\n return;\n }\n // Re-check the DOM for unscoped text content if requested. This needs to\n // happen before any computation or sanity checks run as these rely on the\n // result of whether there is unscoped text content or not.\n if (recheckUnscopedContent) {\n this._checkDomForUnscopedTextContent();\n }\n // Sanity check the list item lines and title in the content. This is a dev-mode only\n // check that can be dead-code eliminated by Terser in production.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n sanityCheckListItemContent(this);\n }\n const numberOfLines = this._explicitLines ?? this._inferLinesFromContent();\n const unscopedContentEl = this._unscopedContent.nativeElement;\n // Update the list item element to reflect the number of lines.\n this._hostElement.classList.toggle('mat-mdc-list-item-single-line', numberOfLines <= 1);\n this._hostElement.classList.toggle('mdc-list-item--with-one-line', numberOfLines <= 1);\n this._hostElement.classList.toggle('mdc-list-item--with-two-lines', numberOfLines === 2);\n this._hostElement.classList.toggle('mdc-list-item--with-three-lines', numberOfLines === 3);\n // If there is no title and the unscoped content is the is the only line, the\n // unscoped text content will be treated as the title of the list-item.\n if (this._hasUnscopedTextContent) {\n const treatAsTitle = this._titles.length === 0 && numberOfLines === 1;\n unscopedContentEl.classList.toggle('mdc-list-item__primary-text', treatAsTitle);\n unscopedContentEl.classList.toggle('mdc-list-item__secondary-text', !treatAsTitle);\n } else {\n unscopedContentEl.classList.remove('mdc-list-item__primary-text');\n unscopedContentEl.classList.remove('mdc-list-item__secondary-text');\n }\n }\n /**\n * Infers the number of lines based on the projected user content. This is useful\n * if no explicit number of lines has been specified on the list item.\n *\n * The number of lines is inferred based on whether there is a title, the number of\n * additional lines (secondary/tertiary). An additional line is acquired if there is\n * unscoped text content.\n */\n _inferLinesFromContent() {\n let numOfLines = this._titles.length + this._lines.length;\n if (this._hasUnscopedTextContent) {\n numOfLines += 1;\n }\n return numOfLines;\n }\n /** Checks whether the list item has unscoped text content. */\n _checkDomForUnscopedTextContent() {\n this._hasUnscopedTextContent = Array.from(this._unscopedContent.nativeElement.childNodes).filter(node => node.nodeType !== node.COMMENT_NODE).some(node => !!(node.textContent && node.textContent.trim()));\n }\n static {\n this.ɵfac = function MatListItemBase_Factory(t) {\n return new (t || MatListItemBase)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(MatListBase, 8), i0.ɵɵdirectiveInject(i1.Platform), i0.ɵɵdirectiveInject(MAT_RIPPLE_GLOBAL_OPTIONS, 8), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatListItemBase,\n contentQueries: function MatListItemBase_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatListItemAvatar, 4);\n i0.ɵɵcontentQuery(dirIndex, MatListItemIcon, 4);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._avatars = _t);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._icons = _t);\n }\n },\n hostVars: 4,\n hostBindings: function MatListItemBase_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"aria-disabled\", ctx.disabled)(\"disabled\", ctx._isButtonElement && ctx.disabled || null);\n i0.ɵɵclassProp(\"mdc-list-item--disabled\", ctx.disabled);\n }\n },\n inputs: {\n lines: \"lines\",\n disableRipple: \"disableRipple\",\n disabled: \"disabled\"\n },\n standalone: true\n });\n }\n }\n return MatListItemBase;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Sanity checks the configuration of the list item with respect to the amount\n * of lines, whether there is a title, or if there is unscoped text content.\n *\n * The checks are extracted into a top-level function that can be dead-code\n * eliminated by Terser or other optimizers in production mode.\n */\nfunction sanityCheckListItemContent(item) {\n const numTitles = item._titles.length;\n const numLines = item._lines.length;\n if (numTitles > 1) {\n console.warn('A list item cannot have multiple titles.');\n }\n if (numTitles === 0 && numLines > 0) {\n console.warn('A list item line can only be used if there is a list item title.');\n }\n if (numTitles === 0 && item._hasUnscopedTextContent && item._explicitLines !== null && item._explicitLines > 1) {\n console.warn('A list item cannot have wrapping content without a title.');\n }\n if (numLines > 2 || numLines === 2 && item._hasUnscopedTextContent) {\n console.warn('A list item can have at maximum three lines.');\n }\n}\nlet MatActionList = /*#__PURE__*/(() => {\n class MatActionList extends MatListBase {\n constructor() {\n super(...arguments);\n // An navigation list is considered interactive, but does not extend the interactive list\n // base class. We do this because as per MDC, items of interactive lists are only reachable\n // through keyboard shortcuts. We want all items for the navigation list to be reachable\n // through tab key as we do not intend to provide any special accessibility treatment. The\n // accessibility treatment depends on how the end-user will interact with it.\n this._isNonInteractive = false;\n }\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵMatActionList_BaseFactory;\n return function MatActionList_Factory(t) {\n return (ɵMatActionList_BaseFactory || (ɵMatActionList_BaseFactory = i0.ɵɵgetInheritedFactory(MatActionList)))(t || MatActionList);\n };\n })();\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatActionList,\n selectors: [[\"mat-action-list\"]],\n hostAttrs: [\"role\", \"group\", 1, \"mat-mdc-action-list\", \"mat-mdc-list-base\", \"mdc-list\"],\n exportAs: [\"matActionList\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: MatListBase,\n useExisting: MatActionList\n }]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c0,\n decls: 1,\n vars: 0,\n template: function MatActionList_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵprojection(0);\n }\n },\n styles: [\"@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-list-divider::after{content:\\\"\\\";display:block;border-bottom-width:1px;border-bottom-style:solid}}.mdc-list{margin:0;padding:8px 0;list-style-type:none}.mdc-list:focus{outline:none}.mdc-list-item__wrapper{display:block}.mdc-list-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;align-items:stretch;cursor:pointer}.mdc-list-item:focus{outline:none}.mdc-list-item.mdc-list-item--with-one-line{height:48px}.mdc-list-item.mdc-list-item--with-two-lines{height:64px}.mdc-list-item.mdc-list-item--with-three-lines{height:88px}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__start{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--disabled,.mdc-list-item.mdc-list-item--non-interactive{cursor:auto}.mdc-list-item:not(.mdc-list-item--selected):focus::before,.mdc-list-item.mdc-ripple-upgraded--background-focused::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:\\\"\\\";pointer-events:none}@media screen and (forced-colors: active){.mdc-list-item:not(.mdc-list-item--selected):focus::before,.mdc-list-item.mdc-ripple-upgraded--background-focused::before{border-color:CanvasText}}.mdc-list-item.mdc-list-item--selected::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:3px double rgba(0,0,0,0);border-radius:inherit;content:\\\"\\\";pointer-events:none}@media screen and (forced-colors: active){.mdc-list-item.mdc-list-item--selected::before{border-color:CanvasText}}.mdc-list-item.mdc-list-item--selected:focus::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:3px solid rgba(0,0,0,0);border-radius:inherit;content:\\\"\\\";pointer-events:none}@media screen and (forced-colors: active){.mdc-list-item.mdc-list-item--selected:focus::before{border-color:CanvasText}}a.mdc-list-item{color:inherit;text-decoration:none}.mdc-list-item__start{fill:currentColor;flex-shrink:0;pointer-events:none}.mdc-list-item__end{flex-shrink:0;pointer-events:none}.mdc-list-item__content{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;align-self:center;flex:1;pointer-events:none}.mdc-list-item--with-two-lines .mdc-list-item__content,.mdc-list-item--with-three-lines .mdc-list-item__content{align-self:stretch}.mdc-list-item__content[for]{pointer-events:none}.mdc-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-three-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item__secondary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;line-height:normal}.mdc-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-three-lines .mdc-list-item__secondary-text{white-space:normal;line-height:20px}.mdc-list-item--with-overline .mdc-list-item__secondary-text{white-space:nowrap;line-height:auto}.mdc-list-item__overline-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:24px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-three-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-three-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-three-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-avatar.mdc-list-item,.mdc-list-item--with-leading-avatar.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-avatar .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-avatar .mdc-list-item__start,.mdc-list-item--with-leading-avatar .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-avatar .mdc-list-item__start{border-radius:50%}.mdc-list-item--with-leading-icon.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-icon.mdc-list-item,.mdc-list-item--with-leading-icon.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-icon .mdc-list-item__start{margin-left:16px;margin-right:32px}[dir=rtl] .mdc-list-item--with-leading-icon .mdc-list-item__start,.mdc-list-item--with-leading-icon .mdc-list-item__start[dir=rtl]{margin-left:32px;margin-right:16px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-thumbnail.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-thumbnail.mdc-list-item,.mdc-list-item--with-leading-thumbnail.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-thumbnail .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-thumbnail .mdc-list-item__start,.mdc-list-item--with-leading-thumbnail .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-thumbnail.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-image.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-image.mdc-list-item,.mdc-list-item--with-leading-image.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-image .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-image .mdc-list-item__start,.mdc-list-item--with-leading-image .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-image.mdc-list-item--with-one-line{height:72px}.mdc-list-item--with-leading-image.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-video.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-video.mdc-list-item,.mdc-list-item--with-leading-video.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-video .mdc-list-item__start{margin-left:0;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-video .mdc-list-item__start,.mdc-list-item--with-leading-video .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-video.mdc-list-item--with-one-line{height:72px}.mdc-list-item--with-leading-video.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-checkbox.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-checkbox.mdc-list-item,.mdc-list-item--with-leading-checkbox.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:8px;margin-right:24px}[dir=rtl] .mdc-list-item--with-leading-checkbox .mdc-list-item__start,.mdc-list-item--with-leading-checkbox .mdc-list-item__start[dir=rtl]{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-radio.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-radio.mdc-list-item,.mdc-list-item--with-leading-radio.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-radio .mdc-list-item__start{margin-left:8px;margin-right:24px}[dir=rtl] .mdc-list-item--with-leading-radio .mdc-list-item__start,.mdc-list-item--with-leading-radio .mdc-list-item__start[dir=rtl]{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-leading-switch.mdc-list-item{padding-left:0;padding-right:auto}[dir=rtl] .mdc-list-item--with-leading-switch.mdc-list-item,.mdc-list-item--with-leading-switch.mdc-list-item[dir=rtl]{padding-left:auto;padding-right:0}.mdc-list-item--with-leading-switch .mdc-list-item__start{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-leading-switch .mdc-list-item__start,.mdc-list-item--with-leading-switch .mdc-list-item__start[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines .mdc-list-item__overline-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-leading-switch.mdc-list-item--with-one-line{height:56px}.mdc-list-item--with-leading-switch.mdc-list-item--with-two-lines{height:72px}.mdc-list-item--with-trailing-icon.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-icon.mdc-list-item,.mdc-list-item--with-trailing-icon.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-icon .mdc-list-item__end{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-icon .mdc-list-item__end,.mdc-list-item--with-trailing-icon .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:flex-start;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-meta.mdc-list-item,.mdc-list-item--with-trailing-meta.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-meta .mdc-list-item__end{margin-left:28px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-meta .mdc-list-item__end,.mdc-list-item--with-trailing-meta .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:28px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end::before{display:inline-block;width:0;height:28px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-trailing-meta .mdc-list-item__end{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-caption-font-family);font-size:var(--mdc-typography-caption-font-size);line-height:var(--mdc-typography-caption-line-height);font-weight:var(--mdc-typography-caption-font-weight);letter-spacing:var(--mdc-typography-caption-letter-spacing);text-decoration:var(--mdc-typography-caption-text-decoration);text-transform:var(--mdc-typography-caption-text-transform)}.mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item,.mdc-list-item--with-trailing-checkbox.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:24px;margin-right:8px}[dir=rtl] .mdc-list-item--with-trailing-checkbox .mdc-list-item__end,.mdc-list-item--with-trailing-checkbox .mdc-list-item__end[dir=rtl]{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-radio.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item,.mdc-list-item--with-trailing-radio.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-radio .mdc-list-item__end{margin-left:24px;margin-right:8px}[dir=rtl] .mdc-list-item--with-trailing-radio .mdc-list-item__end,.mdc-list-item--with-trailing-radio .mdc-list-item__end[dir=rtl]{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-radio.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-switch.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-switch.mdc-list-item,.mdc-list-item--with-trailing-switch.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mdc-list-item--with-trailing-switch .mdc-list-item__end{margin-left:16px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-switch .mdc-list-item__end,.mdc-list-item--with-trailing-switch .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-switch.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item--with-overline.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-overline.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:0}.mdc-list-item--with-overline.mdc-list-item--with-three-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-overline.mdc-list-item--with-three-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:0}.mdc-list-item{padding-left:16px;padding-right:16px}[dir=rtl] .mdc-list-item,.mdc-list-item[dir=rtl]{padding-left:16px;padding-right:16px}.mdc-list-group .mdc-deprecated-list{padding:0}.mdc-list-group__subheader{margin:calc((3rem - 1.5rem)/2) 16px}.mdc-list-divider{padding:0;background-clip:content-box}.mdc-list-divider.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset{padding-left:16px;padding-right:auto}[dir=rtl] .mdc-list-divider.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset,[dir=rtl] .mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset,.mdc-list-divider.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-text.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-icon.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-image.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-switch.mdc-list-divider--with-leading-inset[dir=rtl],.mdc-list-divider--with-leading-radio.mdc-list-divider--with-leading-inset[dir=rtl]{padding-left:auto;padding-right:16px}.mdc-list-divider.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset,.mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset{padding-left:auto;padding-right:16px}[dir=rtl] .mdc-list-divider.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset,[dir=rtl] .mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset,.mdc-list-divider.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-text.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-icon.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-image.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-thumbnail.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-avatar.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-checkbox.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-switch.mdc-list-divider--with-trailing-inset[dir=rtl],.mdc-list-divider--with-leading-radio.mdc-list-divider--with-trailing-inset[dir=rtl]{padding-left:16px;padding-right:auto}.mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset{padding-left:0px;padding-right:auto}[dir=rtl] .mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset,.mdc-list-divider--with-leading-video.mdc-list-divider--with-leading-inset[dir=rtl]{padding-left:auto;padding-right:0px}[dir=rtl] .mdc-list-divider,.mdc-list-divider[dir=rtl]{padding:0}.mdc-list-item{background-color:var(--mdc-list-list-item-container-color)}.mdc-list-item.mdc-list-item--selected{background-color:var(--mdc-list-list-item-selected-container-color)}.mdc-list-item--with-one-line{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-one-line.mdc-list-item--with-leading-avatar,.mdc-list-item--with-one-line.mdc-list-item--with-leading-icon,.mdc-list-item--with-one-line.mdc-list-item--with-leading-thumbnail,.mdc-list-item--with-one-line.mdc-list-item--with-leading-checkbox,.mdc-list-item--with-one-line.mdc-list-item--with-leading-radio,.mdc-list-item--with-one-line.mdc-list-item--with-leading-switch{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-one-line.mdc-list-item--with-leading-image,.mdc-list-item--with-one-line.mdc-list-item--with-leading-video{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-two-lines{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-two-lines.mdc-list-item--with-leading-avatar,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-icon,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-thumbnail,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-checkbox,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-radio,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-switch,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-image,.mdc-list-item--with-two-lines.mdc-list-item--with-leading-video{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item--with-three-lines{border-radius:var(--mdc-list-list-item-container-shape)}.mdc-list-item.mdc-list-item--with-one-line{height:var(--mdc-list-list-item-one-line-container-height)}.mdc-list-item.mdc-list-item--with-two-lines{height:var(--mdc-list-list-item-two-line-container-height)}.mdc-list-item.mdc-list-item--with-three-lines{height:var(--mdc-list-list-item-three-line-container-height)}.mdc-list-item__primary-text{color:var(--mdc-list-list-item-label-text-color)}.mdc-list-item__primary-text{font-family:var(--mdc-list-list-item-label-text-font);line-height:var(--mdc-list-list-item-label-text-line-height);font-size:var(--mdc-list-list-item-label-text-size);font-weight:var(--mdc-list-list-item-label-text-weight);letter-spacing:var(--mdc-list-list-item-label-text-tracking)}.mdc-list-item__secondary-text{color:var(--mdc-list-list-item-supporting-text-color)}.mdc-list-item__secondary-text{font-family:var(--mdc-list-list-item-supporting-text-font);line-height:var(--mdc-list-list-item-supporting-text-line-height);font-size:var(--mdc-list-list-item-supporting-text-size);font-weight:var(--mdc-list-list-item-supporting-text-weight);letter-spacing:var(--mdc-list-list-item-supporting-text-tracking)}.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mdc-list-list-item-leading-icon-color)}.mdc-list-item--with-leading-icon .mdc-list-item__start{width:var(--mdc-list-list-item-leading-icon-size);height:var(--mdc-list-list-item-leading-icon-size)}.mdc-list-item--with-leading-icon .mdc-list-item__start>i{font-size:var(--mdc-list-list-item-leading-icon-size)}.mdc-list-item--with-leading-icon .mdc-list-item__start .mdc-list-item__icon{font-size:var(--mdc-list-list-item-leading-icon-size);width:var(--mdc-list-list-item-leading-icon-size);height:var(--mdc-list-list-item-leading-icon-size)}.mdc-list-item--with-leading-icon .mdc-list-item__start .mdc-list-item__icon,.mdc-list-item--with-leading-icon .mdc-list-item__start .mdc-list-item__icon>.materialdesignWizIconSvgsSvgIcon{display:block}.mdc-list-item--with-leading-avatar .mdc-list-item__start{width:var(--mdc-list-list-item-leading-avatar-size);height:var(--mdc-list-list-item-leading-avatar-size)}.mdc-list-item.mdc-list-item--with-trailing-meta .mdc-list-item__end{color:var(--mdc-list-list-item-trailing-supporting-text-color)}.mdc-list-item--with-trailing-meta .mdc-list-item__end{font-family:var(--mdc-list-list-item-trailing-supporting-text-font);line-height:var(--mdc-list-list-item-trailing-supporting-text-line-height);font-size:var(--mdc-list-list-item-trailing-supporting-text-size);font-weight:var(--mdc-list-list-item-trailing-supporting-text-weight);letter-spacing:var(--mdc-list-list-item-trailing-supporting-text-tracking)}.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-trailing-icon-color)}.mdc-list-item--with-trailing-icon .mdc-list-item__end{width:var(--mdc-list-list-item-trailing-icon-size);height:var(--mdc-list-list-item-trailing-icon-size)}.mdc-list-item--with-trailing-icon .mdc-list-item__end>i{font-size:var(--mdc-list-list-item-trailing-icon-size)}.mdc-list-item--with-trailing-icon .mdc-list-item__end .mdc-list-item__icon{font-size:var(--mdc-list-list-item-trailing-icon-size);width:var(--mdc-list-list-item-trailing-icon-size);height:var(--mdc-list-list-item-trailing-icon-size)}.mdc-list-item--with-trailing-icon .mdc-list-item__end .mdc-list-item__icon,.mdc-list-item--with-trailing-icon .mdc-list-item__end .mdc-list-item__icon>.materialdesignWizIconSvgsSvgIcon{display:block}.mdc-list-item--selected.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-selected-trailing-icon-color)}.mdc-list-item--disabled .mdc-list-item__start,.mdc-list-item--disabled .mdc-list-item__content,.mdc-list-item--disabled .mdc-list-item__end{opacity:1}.mdc-list-item--disabled .mdc-list-item__primary-text,.mdc-list-item--disabled .mdc-list-item__secondary-text,.mdc-list-item--disabled .mdc-list-item__overline-text{opacity:var(--mdc-list-list-item-disabled-label-text-opacity)}.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mdc-list-list-item-disabled-leading-icon-color)}.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start{opacity:var(--mdc-list-list-item-disabled-leading-icon-opacity)}.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mdc-list-list-item-disabled-trailing-icon-color)}.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end{opacity:var(--mdc-list-list-item-disabled-trailing-icon-opacity)}.mdc-list-item:hover .mdc-list-item__primary-text{color:var(--mdc-list-list-item-hover-label-text-color)}.mdc-list-item--with-leading-icon:hover .mdc-list-item__start{color:var(--mdc-list-list-item-hover-leading-icon-color)}.mdc-list-item--with-trailing-icon:hover .mdc-list-item__end{color:var(--mdc-list-list-item-hover-trailing-icon-color)}.mdc-list-item:focus .mdc-list-item__primary-text{color:var(--mdc-list-list-item-focus-label-text-color)}.mdc-list-item.mdc-list-item--disabled .mdc-list-item__primary-text{color:var(--mdc-list-list-item-disabled-label-text-color)}.mdc-list-item:hover::before{background-color:var(--mdc-list-list-item-hover-state-layer-color);opacity:var(--mdc-list-list-item-hover-state-layer-opacity)}.mdc-list-item.mdc-list-item--disabled::before{background-color:var(--mdc-list-list-item-disabled-state-layer-color);opacity:var(--mdc-list-list-item-disabled-state-layer-opacity)}.mdc-list-item:focus::before{background-color:var(--mdc-list-list-item-focus-state-layer-color);opacity:var(--mdc-list-list-item-focus-state-layer-opacity)}.mdc-list-item--disabled .mdc-radio,.mdc-list-item--disabled .mdc-checkbox{opacity:var(--mdc-list-list-item-disabled-label-text-opacity)}.mdc-list-item--with-leading-avatar .mat-mdc-list-item-avatar{border-radius:var(--mdc-list-list-item-leading-avatar-shape);background-color:var(--mdc-list-list-item-leading-avatar-color)}.mat-mdc-list-item-icon{font-size:var(--mdc-list-list-item-leading-icon-size)}.cdk-high-contrast-active a.mdc-list-item--activated::after{content:\\\"\\\";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}.cdk-high-contrast-active a.mdc-list-item--activated [dir=rtl]::after{right:auto;left:16px}.mat-mdc-list-base{display:block}.mat-mdc-list-base .mdc-list-item__start,.mat-mdc-list-base .mdc-list-item__end,.mat-mdc-list-base .mdc-list-item__content{pointer-events:auto}.mat-mdc-list-item,.mat-mdc-list-option{width:100%;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-list-item:not(.mat-mdc-list-item-interactive),.mat-mdc-list-option:not(.mat-mdc-list-item-interactive){cursor:default}.mat-mdc-list-item .mat-divider-inset,.mat-mdc-list-option .mat-divider-inset{position:absolute;left:0;right:0;bottom:0}.mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,.mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-left:72px}[dir=rtl] .mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,[dir=rtl] .mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-right:72px}.mat-mdc-list-item-interactive::before{top:0;left:0;right:0;bottom:0;position:absolute;content:\\\"\\\";opacity:0;pointer-events:none}.mat-mdc-list-item>.mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-list-item:focus>.mat-mdc-focus-indicator::before{content:\\\"\\\"}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-line.mdc-list-item__secondary-text{white-space:nowrap;line-height:normal}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-unscoped-content.mdc-list-item__secondary-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}mat-action-list button{background:none;color:inherit;border:none;font:inherit;outline:inherit;-webkit-tap-highlight-color:rgba(0,0,0,0);text-align:start}mat-action-list button::-moz-focus-inner{border:0}.mdc-list-item--with-leading-icon .mdc-list-item__start{margin-inline-start:var(--mat-list-list-item-leading-icon-start-space);margin-inline-end:var(--mat-list-list-item-leading-icon-end-space)}a.mdc-list-item.mdc-list-item--activated{background-color:var(--mat-list-active-indicator-color)}a.mdc-list-item.mdc-list-item--activated.mdc-list-item{border-radius:var(--mat-list-active-indicator-shape)}\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatActionList;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to inject instances of `MatList`. It serves as\n * alternative token to the actual `MatList` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nconst MAT_LIST = /*#__PURE__*/new InjectionToken('MatList');\nlet MatList = /*#__PURE__*/(() => {\n class MatList extends MatListBase {\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵMatList_BaseFactory;\n return function MatList_Factory(t) {\n return (ɵMatList_BaseFactory || (ɵMatList_BaseFactory = i0.ɵɵgetInheritedFactory(MatList)))(t || MatList);\n };\n })();\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatList,\n selectors: [[\"mat-list\"]],\n hostAttrs: [1, \"mat-mdc-list\", \"mat-mdc-list-base\", \"mdc-list\"],\n exportAs: [\"matList\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: MatListBase,\n useExisting: MatList\n }]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c0,\n decls: 1,\n vars: 0,\n template: function MatList_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵprojection(0);\n }\n },\n styles: [_c1],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatList;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatListItem = /*#__PURE__*/(() => {\n class MatListItem extends MatListItemBase {\n /** Indicates whether an item in a `` is the currently active page. */\n get activated() {\n return this._activated;\n }\n set activated(activated) {\n this._activated = coerceBooleanProperty(activated);\n }\n constructor(element, ngZone, listBase, platform, globalRippleOptions, animationMode) {\n super(element, ngZone, listBase, platform, globalRippleOptions, animationMode);\n this._activated = false;\n }\n /**\n * Determine the value of `aria-current`. Return 'page' if this item is an activated anchor tag.\n * Otherwise, return `null`. This method is safe to use with server-side rendering.\n */\n _getAriaCurrent() {\n return this._hostElement.nodeName === 'A' && this._activated ? 'page' : null;\n }\n static {\n this.ɵfac = function MatListItem_Factory(t) {\n return new (t || MatListItem)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(MatListBase, 8), i0.ɵɵdirectiveInject(i1.Platform), i0.ɵɵdirectiveInject(MAT_RIPPLE_GLOBAL_OPTIONS, 8), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatListItem,\n selectors: [[\"mat-list-item\"], [\"a\", \"mat-list-item\", \"\"], [\"button\", \"mat-list-item\", \"\"]],\n contentQueries: function MatListItem_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatListItemLine, 5);\n i0.ɵɵcontentQuery(dirIndex, MatListItemTitle, 5);\n i0.ɵɵcontentQuery(dirIndex, MatListItemMeta, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._lines = _t);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._titles = _t);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._meta = _t);\n }\n },\n viewQuery: function MatListItem_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c2, 5);\n i0.ɵɵviewQuery(_c3, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._unscopedContent = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._itemText = _t.first);\n }\n },\n hostAttrs: [1, \"mat-mdc-list-item\", \"mdc-list-item\"],\n hostVars: 11,\n hostBindings: function MatListItem_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"aria-current\", ctx._getAriaCurrent());\n i0.ɵɵclassProp(\"mdc-list-item--activated\", ctx.activated)(\"mdc-list-item--with-leading-avatar\", ctx._avatars.length !== 0)(\"mdc-list-item--with-leading-icon\", ctx._icons.length !== 0)(\"mdc-list-item--with-trailing-meta\", ctx._meta.length !== 0)(\"_mat-animation-noopable\", ctx._noopAnimations);\n }\n },\n inputs: {\n activated: \"activated\"\n },\n exportAs: [\"matListItem\"],\n standalone: true,\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c5,\n decls: 10,\n vars: 0,\n consts: [[\"unscopedContent\", \"\"], [1, \"mdc-list-item__content\"], [1, \"mat-mdc-list-item-unscoped-content\", 3, \"cdkObserveContent\"], [1, \"mat-mdc-focus-indicator\"]],\n template: function MatListItem_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵprojectionDef(_c4);\n i0.ɵɵprojection(0);\n i0.ɵɵelementStart(1, \"span\", 1);\n i0.ɵɵprojection(2, 1);\n i0.ɵɵprojection(3, 2);\n i0.ɵɵelementStart(4, \"span\", 2, 0);\n i0.ɵɵlistener(\"cdkObserveContent\", function MatListItem_Template_span_cdkObserveContent_4_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._updateItemLines(true));\n });\n i0.ɵɵprojection(6, 3);\n i0.ɵɵelementEnd()();\n i0.ɵɵprojection(7, 4);\n i0.ɵɵprojection(8, 5);\n i0.ɵɵelement(9, \"div\", 3);\n }\n },\n dependencies: [CdkObserveContent],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatListItem;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to reference instances of an `SelectionList`. It serves\n * as alternative token to an actual implementation which would result in circular references.\n * @docs-private\n */\nconst SELECTION_LIST = /*#__PURE__*/new InjectionToken('SelectionList');\nlet MatListOption = /*#__PURE__*/(() => {\n class MatListOption extends MatListItemBase {\n /**\n * Whether the label should appear before or after the checkbox/radio. Defaults to 'after'\n *\n * @deprecated Use `togglePosition` instead.\n * @breaking-change 17.0.0\n */\n get checkboxPosition() {\n return this.togglePosition;\n }\n set checkboxPosition(value) {\n this.togglePosition = value;\n }\n /** Theme color of the list option. This sets the color of the checkbox/radio. */\n get color() {\n return this._color || this._selectionList.color;\n }\n set color(newValue) {\n this._color = newValue;\n }\n /** Value of the option */\n get value() {\n return this._value;\n }\n set value(newValue) {\n if (this.selected && newValue !== this.value && this._inputsInitialized) {\n this.selected = false;\n }\n this._value = newValue;\n }\n /** Whether the option is selected. */\n get selected() {\n return this._selectionList.selectedOptions.isSelected(this);\n }\n set selected(value) {\n const isSelected = coerceBooleanProperty(value);\n if (isSelected !== this._selected) {\n this._setSelected(isSelected);\n if (isSelected || this._selectionList.multiple) {\n this._selectionList._reportValueChange();\n }\n }\n }\n constructor(elementRef, ngZone, _selectionList, platform, _changeDetectorRef, globalRippleOptions, animationMode) {\n super(elementRef, ngZone, _selectionList, platform, globalRippleOptions, animationMode);\n this._selectionList = _selectionList;\n this._changeDetectorRef = _changeDetectorRef;\n /**\n * Emits when the selected state of the option has changed.\n * Use to facilitate two-data binding to the `selected` property.\n * @docs-private\n */\n this.selectedChange = new EventEmitter();\n /** Whether the label should appear before or after the checkbox/radio. Defaults to 'after' */\n this.togglePosition = 'after';\n this._selected = false;\n /**\n * This is set to true after the first OnChanges cycle so we don't\n * clear the value of `selected` in the first cycle.\n */\n this._inputsInitialized = false;\n }\n ngOnInit() {\n const list = this._selectionList;\n if (list._value && list._value.some(value => list.compareWith(this._value, value))) {\n this._setSelected(true);\n }\n const wasSelected = this._selected;\n // List options that are selected at initialization can't be reported properly to the form\n // control. This is because it takes some time until the selection-list knows about all\n // available options. Also it can happen that the ControlValueAccessor has an initial value\n // that should be used instead. Deferring the value change report to the next tick ensures\n // that the form control value is not being overwritten.\n Promise.resolve().then(() => {\n if (this._selected || wasSelected) {\n this.selected = true;\n this._changeDetectorRef.markForCheck();\n }\n });\n this._inputsInitialized = true;\n }\n ngOnDestroy() {\n super.ngOnDestroy();\n if (this.selected) {\n // We have to delay this until the next tick in order\n // to avoid changed after checked errors.\n Promise.resolve().then(() => {\n this.selected = false;\n });\n }\n }\n /** Toggles the selection state of the option. */\n toggle() {\n this.selected = !this.selected;\n }\n /** Allows for programmatic focusing of the option. */\n focus() {\n this._hostElement.focus();\n }\n /** Gets the text label of the list option. Used for the typeahead functionality in the list. */\n getLabel() {\n const titleElement = this._titles?.get(0)?._elementRef.nativeElement;\n // If there is no explicit title element, the unscoped text content\n // is treated as the list item title.\n const labelEl = titleElement || this._unscopedContent?.nativeElement;\n return labelEl?.textContent || '';\n }\n /** Whether a checkbox is shown at the given position. */\n _hasCheckboxAt(position) {\n return this._selectionList.multiple && this._getTogglePosition() === position;\n }\n /** Where a radio indicator is shown at the given position. */\n _hasRadioAt(position) {\n return !this._selectionList.multiple && this._getTogglePosition() === position && !this._selectionList.hideSingleSelectionIndicator;\n }\n /** Whether icons or avatars are shown at the given position. */\n _hasIconsOrAvatarsAt(position) {\n return this._hasProjected('icons', position) || this._hasProjected('avatars', position);\n }\n /** Gets whether the given type of element is projected at the specified position. */\n _hasProjected(type, position) {\n // If the checkbox/radio is shown at the specified position, neither icons or\n // avatars can be shown at the position.\n return this._getTogglePosition() !== position && (type === 'avatars' ? this._avatars.length !== 0 : this._icons.length !== 0);\n }\n _handleBlur() {\n this._selectionList._onTouched();\n }\n /** Gets the current position of the checkbox/radio. */\n _getTogglePosition() {\n return this.togglePosition || 'after';\n }\n /**\n * Sets the selected state of the option.\n * @returns Whether the value has changed.\n */\n _setSelected(selected) {\n if (selected === this._selected) {\n return false;\n }\n this._selected = selected;\n if (selected) {\n this._selectionList.selectedOptions.select(this);\n } else {\n this._selectionList.selectedOptions.deselect(this);\n }\n this.selectedChange.emit(selected);\n this._changeDetectorRef.markForCheck();\n return true;\n }\n /**\n * Notifies Angular that the option needs to be checked in the next change detection run.\n * Mainly used to trigger an update of the list option if the disabled state of the selection\n * list changed.\n */\n _markForCheck() {\n this._changeDetectorRef.markForCheck();\n }\n /** Toggles the option's value based on a user interaction. */\n _toggleOnInteraction() {\n if (!this.disabled) {\n if (this._selectionList.multiple) {\n this.selected = !this.selected;\n this._selectionList._emitChangeEvent([this]);\n } else if (!this.selected) {\n this.selected = true;\n this._selectionList._emitChangeEvent([this]);\n }\n }\n }\n /** Sets the tabindex of the list option. */\n _setTabindex(value) {\n this._hostElement.setAttribute('tabindex', value + '');\n }\n static {\n this.ɵfac = function MatListOption_Factory(t) {\n return new (t || MatListOption)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(SELECTION_LIST), i0.ɵɵdirectiveInject(i1.Platform), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(MAT_RIPPLE_GLOBAL_OPTIONS, 8), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatListOption,\n selectors: [[\"mat-list-option\"]],\n contentQueries: function MatListOption_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatListItemLine, 5);\n i0.ɵɵcontentQuery(dirIndex, MatListItemTitle, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._lines = _t);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._titles = _t);\n }\n },\n viewQuery: function MatListOption_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c2, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._unscopedContent = _t.first);\n }\n },\n hostAttrs: [\"role\", \"option\", 1, \"mat-mdc-list-item\", \"mat-mdc-list-option\", \"mdc-list-item\"],\n hostVars: 25,\n hostBindings: function MatListOption_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"blur\", function MatListOption_blur_HostBindingHandler() {\n return ctx._handleBlur();\n })(\"click\", function MatListOption_click_HostBindingHandler() {\n return ctx._toggleOnInteraction();\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"aria-selected\", ctx.selected);\n i0.ɵɵclassProp(\"mdc-list-item--selected\", ctx.selected && !ctx._selectionList.multiple && ctx._selectionList.hideSingleSelectionIndicator)(\"mdc-list-item--with-leading-avatar\", ctx._hasProjected(\"avatars\", \"before\"))(\"mdc-list-item--with-leading-icon\", ctx._hasProjected(\"icons\", \"before\"))(\"mdc-list-item--with-trailing-icon\", ctx._hasProjected(\"icons\", \"after\"))(\"mat-mdc-list-option-with-trailing-avatar\", ctx._hasProjected(\"avatars\", \"after\"))(\"mdc-list-item--with-leading-checkbox\", ctx._hasCheckboxAt(\"before\"))(\"mdc-list-item--with-trailing-checkbox\", ctx._hasCheckboxAt(\"after\"))(\"mdc-list-item--with-leading-radio\", ctx._hasRadioAt(\"before\"))(\"mdc-list-item--with-trailing-radio\", ctx._hasRadioAt(\"after\"))(\"mat-accent\", ctx.color !== \"primary\" && ctx.color !== \"warn\")(\"mat-warn\", ctx.color === \"warn\")(\"_mat-animation-noopable\", ctx._noopAnimations);\n }\n },\n inputs: {\n togglePosition: \"togglePosition\",\n checkboxPosition: \"checkboxPosition\",\n color: \"color\",\n value: \"value\",\n selected: \"selected\"\n },\n outputs: {\n selectedChange: \"selectedChange\"\n },\n exportAs: [\"matListOption\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: MatListItemBase,\n useExisting: MatListOption\n }, {\n provide: LIST_OPTION,\n useExisting: MatListOption\n }]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c7,\n decls: 20,\n vars: 4,\n consts: [[\"icons\", \"\"], [\"checkbox\", \"\"], [\"radio\", \"\"], [\"unscopedContent\", \"\"], [1, \"mdc-list-item__start\", \"mat-mdc-list-option-checkbox-before\"], [1, \"mdc-list-item__content\"], [1, \"mat-mdc-list-item-unscoped-content\", 3, \"cdkObserveContent\"], [1, \"mdc-list-item__end\"], [1, \"mat-mdc-focus-indicator\"], [1, \"mdc-checkbox\"], [\"type\", \"checkbox\", 1, \"mdc-checkbox__native-control\", 3, \"checked\", \"disabled\"], [1, \"mdc-checkbox__background\"], [\"viewBox\", \"0 0 24 24\", \"aria-hidden\", \"true\", 1, \"mdc-checkbox__checkmark\"], [\"fill\", \"none\", \"d\", \"M1.73,12.91 8.1,19.28 22.79,4.59\", 1, \"mdc-checkbox__checkmark-path\"], [1, \"mdc-checkbox__mixedmark\"], [1, \"mdc-radio\"], [\"type\", \"radio\", 1, \"mdc-radio__native-control\", 3, \"checked\", \"disabled\"], [1, \"mdc-radio__background\"], [1, \"mdc-radio__outer-circle\"], [1, \"mdc-radio__inner-circle\"], [3, \"ngTemplateOutlet\"], [1, \"mdc-list-item__start\", \"mat-mdc-list-option-radio-before\"]],\n template: function MatListOption_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵprojectionDef(_c6);\n i0.ɵɵtemplate(0, MatListOption_ng_template_0_Template, 1, 0, \"ng-template\", null, 0, i0.ɵɵtemplateRefExtractor)(2, MatListOption_ng_template_2_Template, 6, 4, \"ng-template\", null, 1, i0.ɵɵtemplateRefExtractor)(4, MatListOption_ng_template_4_Template, 5, 4, \"ng-template\", null, 2, i0.ɵɵtemplateRefExtractor)(6, MatListOption_Conditional_6_Template, 2, 1, \"span\", 4)(7, MatListOption_Conditional_7_Template, 2, 1)(8, MatListOption_Conditional_8_Template, 1, 1);\n i0.ɵɵelementStart(9, \"span\", 5);\n i0.ɵɵprojection(10);\n i0.ɵɵprojection(11, 1);\n i0.ɵɵelementStart(12, \"span\", 6, 3);\n i0.ɵɵlistener(\"cdkObserveContent\", function MatListOption_Template_span_cdkObserveContent_12_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._updateItemLines(true));\n });\n i0.ɵɵprojection(14, 2);\n i0.ɵɵelementEnd()();\n i0.ɵɵtemplate(15, MatListOption_Conditional_15_Template, 2, 1, \"span\", 7)(16, MatListOption_Conditional_16_Template, 2, 1)(17, MatListOption_Conditional_17_Template, 1, 1);\n i0.ɵɵprojection(18, 3);\n i0.ɵɵelement(19, \"div\", 8);\n }\n if (rf & 2) {\n i0.ɵɵadvance(6);\n i0.ɵɵconditional(6, ctx._hasCheckboxAt(\"before\") ? 6 : ctx._hasRadioAt(\"before\") ? 7 : -1);\n i0.ɵɵadvance(2);\n i0.ɵɵconditional(8, ctx._hasIconsOrAvatarsAt(\"before\") ? 8 : -1);\n i0.ɵɵadvance(7);\n i0.ɵɵconditional(15, ctx._hasCheckboxAt(\"after\") ? 15 : ctx._hasRadioAt(\"after\") ? 16 : -1);\n i0.ɵɵadvance(2);\n i0.ɵɵconditional(17, ctx._hasIconsOrAvatarsAt(\"after\") ? 17 : -1);\n }\n },\n dependencies: [NgTemplateOutlet, CdkObserveContent],\n styles: [\".mat-mdc-list-option-with-trailing-avatar.mdc-list-item{padding-left:auto;padding-right:0}[dir=rtl] .mat-mdc-list-option-with-trailing-avatar.mdc-list-item,.mat-mdc-list-option-with-trailing-avatar.mdc-list-item[dir=rtl]{padding-left:0;padding-right:auto}.mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end{margin-left:16px;margin-right:16px}[dir=rtl] .mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end,.mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end[dir=rtl]{margin-left:16px;margin-right:16px}.mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end{width:40px;height:40px}.mat-mdc-list-option-with-trailing-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mat-mdc-list-option-with-trailing-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:\\\"\\\";vertical-align:0}.mat-mdc-list-option-with-trailing-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:\\\"\\\";vertical-align:-20px}.mat-mdc-list-option-with-trailing-avatar .mdc-list-item__end{border-radius:50%}.mat-mdc-list-option .mdc-touch-target-wrapper{display:inline}.mat-mdc-list-option .mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}.mat-mdc-list-option .mdc-checkbox[hidden]{display:none}.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{border-color:CanvasText}}.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{content:\\\"\\\";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{border-color:CanvasText}}@media all and (-ms-high-contrast: none){.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__focus-ring{display:none}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-list-option .mdc-checkbox__mixedmark{margin:0 1px}}.mat-mdc-list-option .mdc-checkbox--disabled{cursor:default;pointer-events:none}.mat-mdc-list-option .mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color}.mat-mdc-list-option .mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0}.mdc-checkbox--upgraded .mat-mdc-list-option .mdc-checkbox__checkmark{opacity:1}.mat-mdc-list-option .mdc-checkbox__checkmark-path{stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mat-mdc-list-option .mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0}.mat-mdc-list-option .mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mat-mdc-list-option .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mat-mdc-list-option .mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mat-mdc-list-option .mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mat-mdc-list-option .mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mat-mdc-list-option .mdc-checkbox--touch{margin:calc((var(--mdc-checkbox-state-layer-size, 48px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mat-mdc-list-option .mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);width:var(--mdc-checkbox-state-layer-size, 48px);height:var(--mdc-checkbox-state-layer-size, 48px)}.mat-mdc-list-option .mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{opacity:1}.mat-mdc-list-option .mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-mdc-list-option .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mat-mdc-list-option .mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0}.mat-mdc-list-option .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mat-mdc-list-option .mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mat-mdc-list-option .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color}.mat-mdc-list-option .mdc-radio[hidden]{display:none}.mat-mdc-list-option .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-list-option .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:\\\"\\\"}.mat-mdc-list-option .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%}.mat-mdc-list-option .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%}.mat-mdc-list-option .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1}.mat-mdc-list-option .mdc-radio--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mat-mdc-list-option .mdc-radio--touch .mdc-radio__native-control{top:calc((40px - 48px) / 2);right:calc((40px - 48px) / 2);left:calc((40px - 48px) / 2);width:48px;height:48px}.mat-mdc-list-option .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mat-mdc-list-option .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mat-mdc-list-option .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mat-mdc-list-option .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{border-color:CanvasText}}.mat-mdc-list-option .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mat-mdc-list-option .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{content:\\\"\\\";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mat-mdc-list-option .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mat-mdc-list-option .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{border-color:CanvasText}}.mat-mdc-list-option .mdc-radio--disabled{cursor:default;pointer-events:none}.mat-mdc-list-option .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5)}.mat-mdc-list-option .mdc-radio__native-control:disabled+.mdc-radio__background,.mat-mdc-list-option [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background{cursor:default}.mat-mdc-list-option .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}@media all and (-ms-high-contrast: none){.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox .mdc-checkbox__focus-ring{display:none}}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__background{transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__mixedmark{transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__background::before{transition:opacity 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__outer-circle{transition:border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__inner-circle{transition:transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option:not(._mat-animation-noopable) .mdc-radio__native-control:focus+.mdc-radio__background::before{transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-list-option .mdc-checkbox{padding:calc((40px - 18px) / 2);padding:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2);margin:calc((40px - 40px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.38);border-color:var(--mdc-checkbox-disabled-unselected-icon-color, rgba(0, 0, 0, 0.38));background-color:transparent}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:rgba(0, 0, 0, 0.38);background-color:var(--mdc-checkbox-disabled-selected-icon-color, rgba(0, 0, 0, 0.38))}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:white;color:var(--mdc-checkbox-selected-checkmark-color, white)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:white;border-color:var(--mdc-checkbox-selected-checkmark-color, white)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:#fff;color:var(--mdc-checkbox-disabled-selected-checkmark-color, #fff)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:#fff;border-color:var(--mdc-checkbox-disabled-selected-checkmark-color, #fff)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:#f44336;border-color:var(--mdc-checkbox-selected-icon-color, #f44336);background-color:#f44336;background-color:var(--mdc-checkbox-selected-icon-color, #f44336)}@keyframes mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336{0%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:#f44336;border-color:var(--mdc-checkbox-selected-icon-color, #f44336);background-color:#f44336;background-color:var(--mdc-checkbox-selected-icon-color, #f44336)}}@keyframes mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336{0%,80%{border-color:#f44336;border-color:var(--mdc-checkbox-selected-icon-color, #f44336);background-color:#f44336;background-color:var(--mdc-checkbox-selected-icon-color, #f44336)}100%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336}.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336}.mat-mdc-list-option .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:#212121;border-color:var(--mdc-checkbox-unselected-hover-icon-color, #212121);background-color:transparent}.mat-mdc-list-option .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox:hover .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:#f44336;border-color:var(--mdc-checkbox-selected-hover-icon-color, #f44336);background-color:#f44336;background-color:var(--mdc-checkbox-selected-hover-icon-color, #f44336)}@keyframes mdc-checkbox-fade-in-background-FF212121FFF4433600000000FFF44336{0%{border-color:#212121;border-color:var(--mdc-checkbox-unselected-hover-icon-color, #212121);background-color:transparent}50%{border-color:#f44336;border-color:var(--mdc-checkbox-selected-hover-icon-color, #f44336);background-color:#f44336;background-color:var(--mdc-checkbox-selected-hover-icon-color, #f44336)}}@keyframes mdc-checkbox-fade-out-background-FF212121FFF4433600000000FFF44336{0%,80%{border-color:#f44336;border-color:var(--mdc-checkbox-selected-hover-icon-color, #f44336);background-color:#f44336;background-color:var(--mdc-checkbox-selected-hover-icon-color, #f44336)}100%{border-color:#212121;border-color:var(--mdc-checkbox-unselected-hover-icon-color, #212121);background-color:transparent}}.mat-mdc-list-option .mdc-checkbox:hover.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox:hover.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-FF212121FFF4433600000000FFF44336}.mat-mdc-list-option .mdc-checkbox:hover.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox:hover.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-FF212121FFF4433600000000FFF44336}.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:#212121;border-color:var(--mdc-checkbox-unselected-focus-icon-color, #212121);background-color:transparent}.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:#f44336;border-color:var(--mdc-checkbox-selected-focus-icon-color, #f44336);background-color:#f44336;background-color:var(--mdc-checkbox-selected-focus-icon-color, #f44336)}@keyframes mdc-checkbox-fade-in-background-FF212121FFF4433600000000FFF44336{0%{border-color:#212121;border-color:var(--mdc-checkbox-unselected-focus-icon-color, #212121);background-color:transparent}50%{border-color:#f44336;border-color:var(--mdc-checkbox-selected-focus-icon-color, #f44336);background-color:#f44336;background-color:var(--mdc-checkbox-selected-focus-icon-color, #f44336)}}@keyframes mdc-checkbox-fade-out-background-FF212121FFF4433600000000FFF44336{0%,80%{border-color:#f44336;border-color:var(--mdc-checkbox-selected-focus-icon-color, #f44336);background-color:#f44336;background-color:var(--mdc-checkbox-selected-focus-icon-color, #f44336)}100%{border-color:#212121;border-color:var(--mdc-checkbox-unselected-focus-icon-color, #212121);background-color:transparent}}.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-FF212121FFF4433600000000FFF44336}.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-FF212121FFF4433600000000FFF44336}.mat-mdc-list-option .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unselected-pressed-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mat-mdc-list-option .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:#f44336;border-color:var(--mdc-checkbox-selected-pressed-icon-color, #f44336);background-color:#f44336;background-color:var(--mdc-checkbox-selected-pressed-icon-color, #f44336)}@keyframes mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336{0%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unselected-pressed-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:#f44336;border-color:var(--mdc-checkbox-selected-pressed-icon-color, #f44336);background-color:#f44336;background-color:var(--mdc-checkbox-selected-pressed-icon-color, #f44336)}}@keyframes mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336{0%,80%{border-color:#f44336;border-color:var(--mdc-checkbox-selected-pressed-icon-color, #f44336);background-color:#f44336;background-color:var(--mdc-checkbox-selected-pressed-icon-color, #f44336)}100%{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-checkbox-unselected-pressed-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mat-mdc-list-option .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336}.mat-mdc-list-option .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-list-option .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__ripple::before,.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__ripple::after{background-color:black;background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, black)}.mat-mdc-list-option .mdc-checkbox:hover .mdc-checkbox__ripple::before,.mat-mdc-list-option .mdc-checkbox.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-checkbox-unselected-hover-state-layer-opacity, 0.04)}.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.16;opacity:var(--mdc-checkbox-unselected-focus-state-layer-opacity, 0.16)}.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mat-mdc-list-option .mdc-checkbox:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.16;opacity:var(--mdc-checkbox-unselected-pressed-state-layer-opacity, 0.16)}.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-checkbox-unselected-pressed-state-layer-opacity, 0.16)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__ripple::before{background-color:black;background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, black)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__ripple::after{background-color:black;background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color, black)}.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#f44336;background-color:var(--mdc-checkbox-selected-hover-state-layer-color, #f44336)}.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--selected:hover .mdc-checkbox__ripple::before,.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--selected.mdc-ripple-surface--hover .mdc-checkbox__ripple::before{opacity:0.04;opacity:var(--mdc-checkbox-selected-hover-state-layer-opacity, 0.04)}.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded--background-focused .mdc-checkbox__ripple::before,.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):focus .mdc-checkbox__ripple::before{transition-duration:75ms;opacity:0.16;opacity:var(--mdc-checkbox-selected-focus-state-layer-opacity, 0.16)}.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded) .mdc-checkbox__ripple::after{transition:opacity 150ms linear}.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--selected:not(.mdc-ripple-upgraded):active .mdc-checkbox__ripple::after{transition-duration:75ms;opacity:0.16;opacity:var(--mdc-checkbox-selected-pressed-state-layer-opacity, 0.16)}.mat-mdc-list-option .mdc-checkbox.mdc-checkbox--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-checkbox-selected-pressed-state-layer-opacity, 0.16)}.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::before,.mat-mdc-list-option .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--selected .mdc-checkbox__ripple::after{background-color:#f44336;background-color:var(--mdc-checkbox-selected-hover-state-layer-color, #f44336)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__background{top:calc((40px - 18px) / 2);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2);left:calc((40px - 18px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2)}.mat-mdc-list-option .mdc-checkbox .mdc-checkbox__native-control{top:calc((40px - 40px) / 2);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);right:calc((40px - 40px) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);left:calc((40px - 40px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);width:40px;width:var(--mdc-checkbox-state-layer-size, 40px);height:40px;height:var(--mdc-checkbox-state-layer-size, 40px)}.mat-mdc-list-option .mdc-radio{padding:calc((40px - 20px) / 2);padding:calc((var(--mdc-radio-state-layer-size, 40px) - 20px) / 2)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:black;border-color:var(--mdc-radio-disabled-selected-icon-color, black)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:black;border-color:var(--mdc-radio-disabled-selected-icon-color, black)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{opacity:0.38;opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{opacity:0.38;opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:black;border-color:var(--mdc-radio-disabled-unselected-icon-color, black)}.mat-mdc-list-option .mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{opacity:0.38;opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-list-option .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-list-option .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:#f44336;border-color:var(--mdc-radio-selected-focus-icon-color, #f44336)}.mat-mdc-list-option .mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-list-option .mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:#f44336;border-color:var(--mdc-radio-selected-focus-icon-color, #f44336)}.mat-mdc-list-option .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:#f44336;border-color:var(--mdc-radio-selected-hover-icon-color, #f44336)}.mat-mdc-list-option .mdc-radio:hover .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:#f44336;border-color:var(--mdc-radio-selected-hover-icon-color, #f44336)}.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:#f44336;border-color:var(--mdc-radio-selected-icon-color, #f44336)}.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:#f44336;border-color:var(--mdc-radio-selected-icon-color, #f44336)}.mat-mdc-list-option .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:#f44336;border-color:var(--mdc-radio-selected-pressed-icon-color, #f44336)}.mat-mdc-list-option .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:#f44336;border-color:var(--mdc-radio-selected-pressed-icon-color, #f44336)}.mat-mdc-list-option .mdc-radio:hover .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:#212121;border-color:var(--mdc-radio-unselected-hover-icon-color, #212121)}.mat-mdc-list-option .mdc-radio .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-radio-unselected-icon-color, rgba(0, 0, 0, 0.54))}.mat-mdc-list-option .mdc-radio:not(:disabled):active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0, 0, 0, 0.54);border-color:var(--mdc-radio-unselected-pressed-icon-color, rgba(0, 0, 0, 0.54))}.mat-mdc-list-option .mdc-radio .mdc-radio__background::before{top:calc(-1 * (40px - 20px) / 2);top:calc(-1 * (var(--mdc-radio-state-layer-size, 40px) - 20px) / 2);left:calc(-1 * (40px - 20px) / 2);left:calc(-1 * (var(--mdc-radio-state-layer-size, 40px) - 20px) / 2);width:40px;width:var(--mdc-radio-state-layer-size, 40px);height:40px;height:var(--mdc-radio-state-layer-size, 40px)}.mat-mdc-list-option .mdc-radio .mdc-radio__native-control{top:calc((40px - 40px) / 2);top:calc((var(--mdc-radio-state-layer-size, 40px) - var(--mdc-radio-state-layer-size, 40px)) / 2);right:calc((40px - 40px) / 2);right:calc((var(--mdc-radio-state-layer-size, 40px) - var(--mdc-radio-state-layer-size, 40px)) / 2);left:calc((40px - 40px) / 2);left:calc((var(--mdc-radio-state-layer-size, 40px) - var(--mdc-radio-state-layer-size, 40px)) / 2);width:40px;width:var(--mdc-radio-state-layer-size, 40px);height:40px;height:var(--mdc-radio-state-layer-size, 40px)}.mat-mdc-list-option .mdc-checkbox__native-control,.mat-mdc-list-option .mdc-radio__native-control{display:none}.cdk-high-contrast-active .mat-mdc-list-option.mdc-list-item--selected::after{content:\\\"\\\";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}.cdk-high-contrast-active .mat-mdc-list-option.mdc-list-item--selected [dir=rtl]::after{right:auto;left:16px}\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatListOption;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Directive whose purpose is to add the mat- CSS styling to this selector.\n * @docs-private\n */\nlet MatListSubheaderCssMatStyler = /*#__PURE__*/(() => {\n class MatListSubheaderCssMatStyler {\n static {\n this.ɵfac = function MatListSubheaderCssMatStyler_Factory(t) {\n return new (t || MatListSubheaderCssMatStyler)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatListSubheaderCssMatStyler,\n selectors: [[\"\", \"mat-subheader\", \"\"], [\"\", \"matSubheader\", \"\"]],\n hostAttrs: [1, \"mat-mdc-subheader\", \"mdc-list-group__subheader\"],\n standalone: true\n });\n }\n }\n return MatListSubheaderCssMatStyler;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to inject instances of `MatNavList`. It serves as\n * alternative token to the actual `MatNavList` class which could cause unnecessary\n * retention of the class and its component metadata.\n */\nconst MAT_NAV_LIST = /*#__PURE__*/new InjectionToken('MatNavList');\nlet MatNavList = /*#__PURE__*/(() => {\n class MatNavList extends MatListBase {\n constructor() {\n super(...arguments);\n // An navigation list is considered interactive, but does not extend the interactive list\n // base class. We do this because as per MDC, items of interactive lists are only reachable\n // through keyboard shortcuts. We want all items for the navigation list to be reachable\n // through tab key as we do not intend to provide any special accessibility treatment. The\n // accessibility treatment depends on how the end-user will interact with it.\n this._isNonInteractive = false;\n }\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵMatNavList_BaseFactory;\n return function MatNavList_Factory(t) {\n return (ɵMatNavList_BaseFactory || (ɵMatNavList_BaseFactory = i0.ɵɵgetInheritedFactory(MatNavList)))(t || MatNavList);\n };\n })();\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatNavList,\n selectors: [[\"mat-nav-list\"]],\n hostAttrs: [\"role\", \"navigation\", 1, \"mat-mdc-nav-list\", \"mat-mdc-list-base\", \"mdc-list\"],\n exportAs: [\"matNavList\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: MatListBase,\n useExisting: MatNavList\n }]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c0,\n decls: 1,\n vars: 0,\n template: function MatNavList_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵprojection(0);\n }\n },\n styles: [_c1],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatNavList;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst MAT_SELECTION_LIST_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: /*#__PURE__*/forwardRef(() => MatSelectionList),\n multi: true\n};\n/** Change event that is being fired whenever the selected state of an option changes. */\nclass MatSelectionListChange {\n constructor( /** Reference to the selection list that emitted the event. */\n source, /** Reference to the options that have been changed. */\n options) {\n this.source = source;\n this.options = options;\n }\n}\nlet MatSelectionList = /*#__PURE__*/(() => {\n class MatSelectionList extends MatListBase {\n /** Whether selection is limited to one or multiple items (default multiple). */\n get multiple() {\n return this._multiple;\n }\n set multiple(value) {\n const newValue = coerceBooleanProperty(value);\n if (newValue !== this._multiple) {\n if ((typeof ngDevMode === 'undefined' || ngDevMode) && this._initialized) {\n throw new Error('Cannot change `multiple` mode of mat-selection-list after initialization.');\n }\n this._multiple = newValue;\n this.selectedOptions = new SelectionModel(this._multiple, this.selectedOptions.selected);\n }\n }\n /** Whether radio indicator for all list items is hidden. */\n get hideSingleSelectionIndicator() {\n return this._hideSingleSelectionIndicator;\n }\n set hideSingleSelectionIndicator(value) {\n this._hideSingleSelectionIndicator = coerceBooleanProperty(value);\n }\n constructor(_element, _ngZone) {\n super();\n this._element = _element;\n this._ngZone = _ngZone;\n this._initialized = false;\n /** Emits when the list has been destroyed. */\n this._destroyed = new Subject();\n /** View to model callback that should be called whenever the selected options change. */\n this._onChange = _ => {};\n /** Emits a change event whenever the selected state of an option changes. */\n this.selectionChange = new EventEmitter();\n /** Theme color of the selection list. This sets the checkbox color for all list options. */\n this.color = 'accent';\n /**\n * Function used for comparing an option against the selected value when determining which\n * options should appear as selected. The first argument is the value of an options. The second\n * one is a value from the selected value. A boolean must be returned.\n */\n this.compareWith = (a1, a2) => a1 === a2;\n this._multiple = true;\n this._hideSingleSelectionIndicator = this._defaultOptions?.hideSingleSelectionIndicator ?? false;\n /** The currently selected options. */\n this.selectedOptions = new SelectionModel(this._multiple);\n /** View to model callback that should be called if the list or its options lost focus. */\n this._onTouched = () => {};\n this._selectionListDisabled = false;\n /** Handles focusout events within the list. */\n this._handleFocusout = () => {\n // Focus takes a while to update so we have to wrap our call in a timeout.\n setTimeout(() => {\n if (!this._containsFocus()) {\n this._resetActiveOption();\n }\n });\n };\n /** Handles focusin events within the list. */\n this._handleFocusin = event => {\n if (this.disabled) {\n return;\n }\n const activeIndex = this._items.toArray().findIndex(item => item._elementRef.nativeElement.contains(event.target));\n if (activeIndex > -1) {\n this._setActiveOption(activeIndex);\n } else {\n this._resetActiveOption();\n }\n };\n this._isNonInteractive = false;\n }\n ngAfterViewInit() {\n // Mark the selection list as initialized so that the `multiple`\n // binding can no longer be changed.\n this._initialized = true;\n this._setupRovingTabindex();\n // These events are bound outside the zone, because they don't change\n // any change-detected properties and they can trigger timeouts.\n this._ngZone.runOutsideAngular(() => {\n this._element.nativeElement.addEventListener('focusin', this._handleFocusin);\n this._element.nativeElement.addEventListener('focusout', this._handleFocusout);\n });\n if (this._value) {\n this._setOptionsFromValues(this._value);\n }\n this._watchForSelectionChange();\n }\n ngOnChanges(changes) {\n const disabledChanges = changes['disabled'];\n const disableRippleChanges = changes['disableRipple'];\n const hideSingleSelectionIndicatorChanges = changes['hideSingleSelectionIndicator'];\n if (disableRippleChanges && !disableRippleChanges.firstChange || disabledChanges && !disabledChanges.firstChange || hideSingleSelectionIndicatorChanges && !hideSingleSelectionIndicatorChanges.firstChange) {\n this._markOptionsForCheck();\n }\n }\n ngOnDestroy() {\n this._keyManager?.destroy();\n this._element.nativeElement.removeEventListener('focusin', this._handleFocusin);\n this._element.nativeElement.removeEventListener('focusout', this._handleFocusout);\n this._destroyed.next();\n this._destroyed.complete();\n this._isDestroyed = true;\n }\n /** Focuses the selection list. */\n focus(options) {\n this._element.nativeElement.focus(options);\n }\n /** Selects all of the options. Returns the options that changed as a result. */\n selectAll() {\n return this._setAllOptionsSelected(true);\n }\n /** Deselects all of the options. Returns the options that changed as a result. */\n deselectAll() {\n return this._setAllOptionsSelected(false);\n }\n /** Reports a value change to the ControlValueAccessor */\n _reportValueChange() {\n // Stop reporting value changes after the list has been destroyed. This avoids\n // cases where the list might wrongly reset its value once it is removed, but\n // the form control is still live.\n if (this.options && !this._isDestroyed) {\n const value = this._getSelectedOptionValues();\n this._onChange(value);\n this._value = value;\n }\n }\n /** Emits a change event if the selected state of an option changed. */\n _emitChangeEvent(options) {\n this.selectionChange.emit(new MatSelectionListChange(this, options));\n }\n /** Implemented as part of ControlValueAccessor. */\n writeValue(values) {\n this._value = values;\n if (this.options) {\n this._setOptionsFromValues(values || []);\n }\n }\n /** Implemented as a part of ControlValueAccessor. */\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n }\n /**\n * Whether the *entire* selection list is disabled. When true, each list item is also disabled\n * and each list item is removed from the tab order (has tabindex=\"-1\").\n */\n get disabled() {\n return this._selectionListDisabled;\n }\n set disabled(value) {\n // Update the disabled state of this list. Write to `this._selectionListDisabled` instead of\n // `super.disabled`. That is to avoid closure compiler compatibility issues with assigning to\n // a super property.\n this._selectionListDisabled = coerceBooleanProperty(value);\n if (this._selectionListDisabled) {\n this._keyManager?.setActiveItem(-1);\n }\n }\n /** Implemented as part of ControlValueAccessor. */\n registerOnChange(fn) {\n this._onChange = fn;\n }\n /** Implemented as part of ControlValueAccessor. */\n registerOnTouched(fn) {\n this._onTouched = fn;\n }\n /** Watches for changes in the selected state of the options and updates the list accordingly. */\n _watchForSelectionChange() {\n this.selectedOptions.changed.pipe(takeUntil(this._destroyed)).subscribe(event => {\n // Sync external changes to the model back to the options.\n for (let item of event.added) {\n item.selected = true;\n }\n for (let item of event.removed) {\n item.selected = false;\n }\n if (!this._containsFocus()) {\n this._resetActiveOption();\n }\n });\n }\n /** Sets the selected options based on the specified values. */\n _setOptionsFromValues(values) {\n this.options.forEach(option => option._setSelected(false));\n values.forEach(value => {\n const correspondingOption = this.options.find(option => {\n // Skip options that are already in the model. This allows us to handle cases\n // where the same primitive value is selected multiple times.\n return option.selected ? false : this.compareWith(option.value, value);\n });\n if (correspondingOption) {\n correspondingOption._setSelected(true);\n }\n });\n }\n /** Returns the values of the selected options. */\n _getSelectedOptionValues() {\n return this.options.filter(option => option.selected).map(option => option.value);\n }\n /** Marks all the options to be checked in the next change detection run. */\n _markOptionsForCheck() {\n if (this.options) {\n this.options.forEach(option => option._markForCheck());\n }\n }\n /**\n * Sets the selected state on all of the options\n * and emits an event if anything changed.\n */\n _setAllOptionsSelected(isSelected, skipDisabled) {\n // Keep track of whether anything changed, because we only want to\n // emit the changed event when something actually changed.\n const changedOptions = [];\n this.options.forEach(option => {\n if ((!skipDisabled || !option.disabled) && option._setSelected(isSelected)) {\n changedOptions.push(option);\n }\n });\n if (changedOptions.length) {\n this._reportValueChange();\n }\n return changedOptions;\n }\n // Note: This getter exists for backwards compatibility. The `_items` query list\n // cannot be named `options` as it will be picked up by the interactive list base.\n /** The option components contained within this selection-list. */\n get options() {\n return this._items;\n }\n /** Handles keydown events within the list. */\n _handleKeydown(event) {\n const activeItem = this._keyManager.activeItem;\n if ((event.keyCode === ENTER || event.keyCode === SPACE) && !this._keyManager.isTyping() && activeItem && !activeItem.disabled) {\n event.preventDefault();\n activeItem._toggleOnInteraction();\n } else if (event.keyCode === A && this.multiple && !this._keyManager.isTyping() && hasModifierKey(event, 'ctrlKey')) {\n const shouldSelect = this.options.some(option => !option.disabled && !option.selected);\n event.preventDefault();\n this._emitChangeEvent(this._setAllOptionsSelected(shouldSelect, true));\n } else {\n this._keyManager.onKeydown(event);\n }\n }\n /**\n * Sets up the logic for maintaining the roving tabindex.\n *\n * `skipPredicate` determines if key manager should avoid putting a given list item in the tab\n * index. Allow disabled list items to receive focus to align with WAI ARIA recommendation.\n * Normally WAI ARIA's instructions are to exclude disabled items from the tab order, but it\n * makes a few exceptions for compound widgets.\n *\n * From [Developing a Keyboard Interface](\n * https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/):\n * \"For the following composite widget elements, keep them focusable when disabled: Options in a\n * Listbox...\"\n */\n _setupRovingTabindex() {\n this._keyManager = new FocusKeyManager(this._items).withHomeAndEnd().withTypeAhead().withWrap().skipPredicate(() => this.disabled);\n // Set the initial focus.\n this._resetActiveOption();\n // Move the tabindex to the currently-focused list item.\n this._keyManager.change.subscribe(activeItemIndex => this._setActiveOption(activeItemIndex));\n // If the active item is removed from the list, reset back to the first one.\n this._items.changes.pipe(takeUntil(this._destroyed)).subscribe(() => {\n const activeItem = this._keyManager.activeItem;\n if (!activeItem || this._items.toArray().indexOf(activeItem) === -1) {\n this._resetActiveOption();\n }\n });\n }\n /**\n * Sets an option as active.\n * @param index Index of the active option. If set to -1, no option will be active.\n */\n _setActiveOption(index) {\n this._items.forEach((item, itemIndex) => item._setTabindex(itemIndex === index ? 0 : -1));\n this._keyManager.updateActiveItem(index);\n }\n /**\n * Resets the active option. When the list is disabled, remove all options from to the tab order.\n * Otherwise, focus the first selected option.\n */\n _resetActiveOption() {\n if (this.disabled) {\n this._setActiveOption(-1);\n return;\n }\n const activeItem = this._items.find(item => item.selected && !item.disabled) || this._items.first;\n this._setActiveOption(activeItem ? this._items.toArray().indexOf(activeItem) : -1);\n }\n /** Returns whether the focus is currently within the list. */\n _containsFocus() {\n const activeElement = _getFocusedElementPierceShadowDom();\n return activeElement && this._element.nativeElement.contains(activeElement);\n }\n static {\n this.ɵfac = function MatSelectionList_Factory(t) {\n return new (t || MatSelectionList)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.NgZone));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatSelectionList,\n selectors: [[\"mat-selection-list\"]],\n contentQueries: function MatSelectionList_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatListOption, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._items = _t);\n }\n },\n hostAttrs: [\"role\", \"listbox\", 1, \"mat-mdc-selection-list\", \"mat-mdc-list-base\", \"mdc-list\"],\n hostVars: 1,\n hostBindings: function MatSelectionList_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"keydown\", function MatSelectionList_keydown_HostBindingHandler($event) {\n return ctx._handleKeydown($event);\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"aria-multiselectable\", ctx.multiple);\n }\n },\n inputs: {\n color: \"color\",\n compareWith: \"compareWith\",\n multiple: \"multiple\",\n hideSingleSelectionIndicator: \"hideSingleSelectionIndicator\",\n disabled: \"disabled\"\n },\n outputs: {\n selectionChange: \"selectionChange\"\n },\n exportAs: [\"matSelectionList\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([MAT_SELECTION_LIST_VALUE_ACCESSOR, {\n provide: MatListBase,\n useExisting: MatSelectionList\n }, {\n provide: SELECTION_LIST,\n useExisting: MatSelectionList\n }]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵNgOnChangesFeature, i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c0,\n decls: 1,\n vars: 0,\n template: function MatSelectionList_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵprojection(0);\n }\n },\n styles: [_c1],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatSelectionList;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatListModule = /*#__PURE__*/(() => {\n class MatListModule {\n static {\n this.ɵfac = function MatListModule_Factory(t) {\n return new (t || MatListModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MatListModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [ObserversModule, CommonModule, MatCommonModule, MatRippleModule, MatPseudoCheckboxModule, MatDividerModule]\n });\n }\n }\n return MatListModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_LIST, MAT_LIST_CONFIG, MAT_NAV_LIST, MAT_SELECTION_LIST_VALUE_ACCESSOR, MatActionList, MatList, MatListItem, MatListItemAvatar, MatListItemIcon, MatListItemLine, MatListItemMeta, MatListItemTitle, MatListModule, MatListOption, MatListSubheaderCssMatStyler, MatNavList, MatSelectionList, MatSelectionListChange, SELECTION_LIST, _MatListItemGraphicBase };\n","import * as i0 from '@angular/core';\nimport { InjectionToken, Directive, Inject, Optional, booleanAttribute, TemplateRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, ContentChild, ViewChild, inject, ElementRef, EventEmitter, ANIMATION_MODULE_TYPE, numberAttribute, Output, ContentChildren, forwardRef, QueryList, Attribute, NgModule } from '@angular/core';\nimport { MatRipple, MAT_RIPPLE_GLOBAL_OPTIONS, MatCommonModule } from '@angular/material/core';\nimport { CdkPortal, TemplatePortal, CdkPortalOutlet } from '@angular/cdk/portal';\nimport { Subject, fromEvent, of, merge, EMPTY, Observable, timer, Subscription, BehaviorSubject } from 'rxjs';\nimport * as i1 from '@angular/cdk/scrolling';\nimport { CdkScrollable } from '@angular/cdk/scrolling';\nimport * as i3 from '@angular/cdk/platform';\nimport { normalizePassiveListenerOptions, Platform } from '@angular/cdk/platform';\nimport * as i2 from '@angular/cdk/bidi';\nimport * as i4 from '@angular/cdk/a11y';\nimport { FocusKeyManager, CdkMonitorFocus } from '@angular/cdk/a11y';\nimport { hasModifierKey, SPACE, ENTER } from '@angular/cdk/keycodes';\nimport { takeUntil, take, startWith, switchMap, skip, filter, distinctUntilChanged } from 'rxjs/operators';\nimport { CdkObserveContent } from '@angular/cdk/observers';\nimport { DOCUMENT, NgClass } from '@angular/common';\nimport { trigger, state, style, transition, animate } from '@angular/animations';\n\n/**\n * Injection token that can be used to reference instances of `MatTabContent`. It serves as\n * alternative token to the actual `MatTabContent` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst _c0 = [\"*\"];\nfunction MatTab_ng_template_0_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojection(0);\n }\n}\nconst _c1 = [\"tabListContainer\"];\nconst _c2 = [\"tabList\"];\nconst _c3 = [\"tabListInner\"];\nconst _c4 = [\"nextPaginator\"];\nconst _c5 = [\"previousPaginator\"];\nconst _c6 = a0 => ({\n animationDuration: a0\n});\nconst _c7 = (a0, a1) => ({\n value: a0,\n params: a1\n});\nfunction MatTabBody_ng_template_2_Template(rf, ctx) {}\nconst _c8 = [\"tabBodyWrapper\"];\nconst _c9 = [\"tabHeader\"];\nfunction MatTabGroup_For_3_Conditional_6_ng_template_0_Template(rf, ctx) {}\nfunction MatTabGroup_For_3_Conditional_6_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtemplate(0, MatTabGroup_For_3_Conditional_6_ng_template_0_Template, 0, 0, \"ng-template\", 12);\n }\n if (rf & 2) {\n const tab_r4 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵproperty(\"cdkPortalOutlet\", tab_r4.templateLabel);\n }\n}\nfunction MatTabGroup_For_3_Conditional_7_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵtext(0);\n }\n if (rf & 2) {\n const tab_r4 = i0.ɵɵnextContext().$implicit;\n i0.ɵɵtextInterpolate(tab_r4.textLabel);\n }\n}\nfunction MatTabGroup_For_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r2 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 7, 2);\n i0.ɵɵlistener(\"click\", function MatTabGroup_For_3_Template_div_click_0_listener() {\n const ctx_r2 = i0.ɵɵrestoreView(_r2);\n const tab_r4 = ctx_r2.$implicit;\n const i_r5 = ctx_r2.$index;\n const ctx_r5 = i0.ɵɵnextContext();\n const tabHeader_r7 = i0.ɵɵreference(1);\n return i0.ɵɵresetView(ctx_r5._handleClick(tab_r4, tabHeader_r7, i_r5));\n })(\"cdkFocusChange\", function MatTabGroup_For_3_Template_div_cdkFocusChange_0_listener($event) {\n const i_r5 = i0.ɵɵrestoreView(_r2).$index;\n const ctx_r5 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r5._tabFocusChanged($event, i_r5));\n });\n i0.ɵɵelement(2, \"span\", 8)(3, \"div\", 9);\n i0.ɵɵelementStart(4, \"span\", 10)(5, \"span\", 11);\n i0.ɵɵtemplate(6, MatTabGroup_For_3_Conditional_6_Template, 1, 1)(7, MatTabGroup_For_3_Conditional_7_Template, 1, 1);\n i0.ɵɵelementEnd()()();\n }\n if (rf & 2) {\n const tab_r4 = ctx.$implicit;\n const i_r5 = ctx.$index;\n const tabNode_r8 = i0.ɵɵreference(1);\n const ctx_r5 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"mdc-tab--active\", ctx_r5.selectedIndex === i_r5);\n i0.ɵɵproperty(\"id\", ctx_r5._getTabLabelId(i_r5))(\"ngClass\", tab_r4.labelClass)(\"disabled\", tab_r4.disabled)(\"fitInkBarToContent\", ctx_r5.fitInkBarToContent);\n i0.ɵɵattribute(\"tabIndex\", ctx_r5._getTabIndex(i_r5))(\"aria-posinset\", i_r5 + 1)(\"aria-setsize\", ctx_r5._tabs.length)(\"aria-controls\", ctx_r5._getTabContentId(i_r5))(\"aria-selected\", ctx_r5.selectedIndex === i_r5)(\"aria-label\", tab_r4.ariaLabel || null)(\"aria-labelledby\", !tab_r4.ariaLabel && tab_r4.ariaLabelledby ? tab_r4.ariaLabelledby : null);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"matRippleTrigger\", tabNode_r8)(\"matRippleDisabled\", tab_r4.disabled || ctx_r5.disableRipple);\n i0.ɵɵadvance(3);\n i0.ɵɵconditional(6, tab_r4.templateLabel ? 6 : 7);\n }\n}\nfunction MatTabGroup_Conditional_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojection(0);\n }\n}\nfunction MatTabGroup_For_8_Template(rf, ctx) {\n if (rf & 1) {\n const _r9 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"mat-tab-body\", 13);\n i0.ɵɵlistener(\"_onCentered\", function MatTabGroup_For_8_Template_mat_tab_body__onCentered_0_listener() {\n i0.ɵɵrestoreView(_r9);\n const ctx_r5 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r5._removeTabBodyWrapperHeight());\n })(\"_onCentering\", function MatTabGroup_For_8_Template_mat_tab_body__onCentering_0_listener($event) {\n i0.ɵɵrestoreView(_r9);\n const ctx_r5 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r5._setTabBodyWrapperHeight($event));\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const tab_r10 = ctx.$implicit;\n const i_r11 = ctx.$index;\n const ctx_r5 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"mat-mdc-tab-body-active\", ctx_r5.selectedIndex === i_r11);\n i0.ɵɵproperty(\"id\", ctx_r5._getTabContentId(i_r11))(\"ngClass\", tab_r10.bodyClass)(\"content\", tab_r10.content)(\"position\", tab_r10.position)(\"origin\", tab_r10.origin)(\"animationDuration\", ctx_r5.animationDuration)(\"preserveContent\", ctx_r5.preserveContent);\n i0.ɵɵattribute(\"tabindex\", ctx_r5.contentTabIndex != null && ctx_r5.selectedIndex === i_r11 ? ctx_r5.contentTabIndex : null)(\"aria-labelledby\", ctx_r5._getTabLabelId(i_r11))(\"aria-hidden\", ctx_r5.selectedIndex !== i_r11);\n }\n}\nconst _c10 = [\"mat-tab-nav-bar\", \"\"];\nconst _c11 = [\"mat-tab-link\", \"\"];\nconst MAT_TAB_CONTENT = /*#__PURE__*/new InjectionToken('MatTabContent');\n/** Decorates the `ng-template` tags and reads out the template from it. */\nlet MatTabContent = /*#__PURE__*/(() => {\n class MatTabContent {\n constructor( /** Content for the tab. */template) {\n this.template = template;\n }\n static {\n this.ɵfac = function MatTabContent_Factory(t) {\n return new (t || MatTabContent)(i0.ɵɵdirectiveInject(i0.TemplateRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatTabContent,\n selectors: [[\"\", \"matTabContent\", \"\"]],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: MAT_TAB_CONTENT,\n useExisting: MatTabContent\n }])]\n });\n }\n }\n return MatTabContent;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to reference instances of `MatTabLabel`. It serves as\n * alternative token to the actual `MatTabLabel` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst MAT_TAB_LABEL = /*#__PURE__*/new InjectionToken('MatTabLabel');\n/**\n * Used to provide a tab label to a tab without causing a circular dependency.\n * @docs-private\n */\nconst MAT_TAB = /*#__PURE__*/new InjectionToken('MAT_TAB');\n/** Used to flag tab labels for use with the portal directive */\nlet MatTabLabel = /*#__PURE__*/(() => {\n class MatTabLabel extends CdkPortal {\n constructor(templateRef, viewContainerRef, _closestTab) {\n super(templateRef, viewContainerRef);\n this._closestTab = _closestTab;\n }\n static {\n this.ɵfac = function MatTabLabel_Factory(t) {\n return new (t || MatTabLabel)(i0.ɵɵdirectiveInject(i0.TemplateRef), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(MAT_TAB, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatTabLabel,\n selectors: [[\"\", \"mat-tab-label\", \"\"], [\"\", \"matTabLabel\", \"\"]],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: MAT_TAB_LABEL,\n useExisting: MatTabLabel\n }]), i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return MatTabLabel;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Used to provide a tab group to a tab without causing a circular dependency.\n * @docs-private\n */\nconst MAT_TAB_GROUP = /*#__PURE__*/new InjectionToken('MAT_TAB_GROUP');\nlet MatTab = /*#__PURE__*/(() => {\n class MatTab {\n /** Content for the tab label given by ``. */\n get templateLabel() {\n return this._templateLabel;\n }\n set templateLabel(value) {\n this._setTemplateLabelInput(value);\n }\n /** @docs-private */\n get content() {\n return this._contentPortal;\n }\n constructor(_viewContainerRef, _closestTabGroup) {\n this._viewContainerRef = _viewContainerRef;\n this._closestTabGroup = _closestTabGroup;\n /** whether the tab is disabled. */\n this.disabled = false;\n /**\n * Template provided in the tab content that will be used if present, used to enable lazy-loading\n */\n this._explicitContent = undefined;\n /** Plain text label for the tab, used when there is no template label. */\n this.textLabel = '';\n /** Portal that will be the hosted content of the tab */\n this._contentPortal = null;\n /** Emits whenever the internal state of the tab changes. */\n this._stateChanges = new Subject();\n /**\n * The relatively indexed position where 0 represents the center, negative is left, and positive\n * represents the right.\n */\n this.position = null;\n /**\n * The initial relatively index origin of the tab if it was created and selected after there\n * was already a selected tab. Provides context of what position the tab should originate from.\n */\n this.origin = null;\n /**\n * Whether the tab is currently active.\n */\n this.isActive = false;\n }\n ngOnChanges(changes) {\n if (changes.hasOwnProperty('textLabel') || changes.hasOwnProperty('disabled')) {\n this._stateChanges.next();\n }\n }\n ngOnDestroy() {\n this._stateChanges.complete();\n }\n ngOnInit() {\n this._contentPortal = new TemplatePortal(this._explicitContent || this._implicitContent, this._viewContainerRef);\n }\n /**\n * This has been extracted to a util because of TS 4 and VE.\n * View Engine doesn't support property rename inheritance.\n * TS 4.0 doesn't allow properties to override accessors or vice-versa.\n * @docs-private\n */\n _setTemplateLabelInput(value) {\n // Only update the label if the query managed to find one. This works around an issue where a\n // user may have manually set `templateLabel` during creation mode, which would then get\n // clobbered by `undefined` when the query resolves. Also note that we check that the closest\n // tab matches the current one so that we don't pick up labels from nested tabs.\n if (value && value._closestTab === this) {\n this._templateLabel = value;\n }\n }\n static {\n this.ɵfac = function MatTab_Factory(t) {\n return new (t || MatTab)(i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(MAT_TAB_GROUP, 8));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatTab,\n selectors: [[\"mat-tab\"]],\n contentQueries: function MatTab_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatTabLabel, 5);\n i0.ɵɵcontentQuery(dirIndex, MatTabContent, 7, TemplateRef);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.templateLabel = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._explicitContent = _t.first);\n }\n },\n viewQuery: function MatTab_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(TemplateRef, 7);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._implicitContent = _t.first);\n }\n },\n hostAttrs: [\"hidden\", \"\"],\n inputs: {\n disabled: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"disabled\", \"disabled\", booleanAttribute],\n textLabel: [i0.ɵɵInputFlags.None, \"label\", \"textLabel\"],\n ariaLabel: [i0.ɵɵInputFlags.None, \"aria-label\", \"ariaLabel\"],\n ariaLabelledby: [i0.ɵɵInputFlags.None, \"aria-labelledby\", \"ariaLabelledby\"],\n labelClass: \"labelClass\",\n bodyClass: \"bodyClass\"\n },\n exportAs: [\"matTab\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: MAT_TAB,\n useExisting: MatTab\n }]), i0.ɵɵInputTransformsFeature, i0.ɵɵNgOnChangesFeature, i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c0,\n decls: 1,\n vars: 0,\n template: function MatTab_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵtemplate(0, MatTab_ng_template_0_Template, 1, 0, \"ng-template\");\n }\n },\n encapsulation: 2\n });\n }\n }\n return MatTab;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Class that is applied when a tab indicator is active. */\nconst ACTIVE_CLASS = 'mdc-tab-indicator--active';\n/** Class that is applied when the tab indicator should not transition. */\nconst NO_TRANSITION_CLASS = 'mdc-tab-indicator--no-transition';\n/**\n * Abstraction around the MDC tab indicator that acts as the tab header's ink bar.\n * @docs-private\n */\nclass MatInkBar {\n constructor(_items) {\n this._items = _items;\n }\n /** Hides the ink bar. */\n hide() {\n this._items.forEach(item => item.deactivateInkBar());\n }\n /** Aligns the ink bar to a DOM node. */\n alignToElement(element) {\n const correspondingItem = this._items.find(item => item.elementRef.nativeElement === element);\n const currentItem = this._currentItem;\n if (correspondingItem === currentItem) {\n return;\n }\n currentItem?.deactivateInkBar();\n if (correspondingItem) {\n const domRect = currentItem?.elementRef.nativeElement.getBoundingClientRect?.();\n // The ink bar won't animate unless we give it the `DOMRect` of the previous item.\n correspondingItem.activateInkBar(domRect);\n this._currentItem = correspondingItem;\n }\n }\n}\nlet InkBarItem = /*#__PURE__*/(() => {\n class InkBarItem {\n constructor() {\n this._elementRef = inject(ElementRef);\n this._fitToContent = false;\n }\n /** Whether the ink bar should fit to the entire tab or just its content. */\n get fitInkBarToContent() {\n return this._fitToContent;\n }\n set fitInkBarToContent(newValue) {\n if (this._fitToContent !== newValue) {\n this._fitToContent = newValue;\n if (this._inkBarElement) {\n this._appendInkBarElement();\n }\n }\n }\n /** Aligns the ink bar to the current item. */\n activateInkBar(previousIndicatorClientRect) {\n const element = this._elementRef.nativeElement;\n // Early exit if no indicator is present to handle cases where an indicator\n // may be activated without a prior indicator state\n if (!previousIndicatorClientRect || !element.getBoundingClientRect || !this._inkBarContentElement) {\n element.classList.add(ACTIVE_CLASS);\n return;\n }\n // This animation uses the FLIP approach. You can read more about it at the link below:\n // https://aerotwist.com/blog/flip-your-animations/\n // Calculate the dimensions based on the dimensions of the previous indicator\n const currentClientRect = element.getBoundingClientRect();\n const widthDelta = previousIndicatorClientRect.width / currentClientRect.width;\n const xPosition = previousIndicatorClientRect.left - currentClientRect.left;\n element.classList.add(NO_TRANSITION_CLASS);\n this._inkBarContentElement.style.setProperty('transform', `translateX(${xPosition}px) scaleX(${widthDelta})`);\n // Force repaint before updating classes and transform to ensure the transform properly takes effect\n element.getBoundingClientRect();\n element.classList.remove(NO_TRANSITION_CLASS);\n element.classList.add(ACTIVE_CLASS);\n this._inkBarContentElement.style.setProperty('transform', '');\n }\n /** Removes the ink bar from the current item. */\n deactivateInkBar() {\n this._elementRef.nativeElement.classList.remove(ACTIVE_CLASS);\n }\n /** Initializes the foundation. */\n ngOnInit() {\n this._createInkBarElement();\n }\n /** Destroys the foundation. */\n ngOnDestroy() {\n this._inkBarElement?.remove();\n this._inkBarElement = this._inkBarContentElement = null;\n }\n /** Creates and appends the ink bar element. */\n _createInkBarElement() {\n const documentNode = this._elementRef.nativeElement.ownerDocument || document;\n const inkBarElement = this._inkBarElement = documentNode.createElement('span');\n const inkBarContentElement = this._inkBarContentElement = documentNode.createElement('span');\n inkBarElement.className = 'mdc-tab-indicator';\n inkBarContentElement.className = 'mdc-tab-indicator__content mdc-tab-indicator__content--underline';\n inkBarElement.appendChild(this._inkBarContentElement);\n this._appendInkBarElement();\n }\n /**\n * Appends the ink bar to the tab host element or content, depending on whether\n * the ink bar should fit to content.\n */\n _appendInkBarElement() {\n if (!this._inkBarElement && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Ink bar element has not been created and cannot be appended');\n }\n const parentElement = this._fitToContent ? this._elementRef.nativeElement.querySelector('.mdc-tab__content') : this._elementRef.nativeElement;\n if (!parentElement && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Missing element to host the ink bar');\n }\n parentElement.appendChild(this._inkBarElement);\n }\n static {\n this.ɵfac = function InkBarItem_Factory(t) {\n return new (t || InkBarItem)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: InkBarItem,\n inputs: {\n fitInkBarToContent: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"fitInkBarToContent\", \"fitInkBarToContent\", booleanAttribute]\n },\n features: [i0.ɵɵInputTransformsFeature]\n });\n }\n }\n return InkBarItem;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * The default positioner function for the MatInkBar.\n * @docs-private\n */\nfunction _MAT_INK_BAR_POSITIONER_FACTORY() {\n const method = element => ({\n left: element ? (element.offsetLeft || 0) + 'px' : '0',\n width: element ? (element.offsetWidth || 0) + 'px' : '0'\n });\n return method;\n}\n/** Injection token for the MatInkBar's Positioner. */\nconst _MAT_INK_BAR_POSITIONER = /*#__PURE__*/new InjectionToken('MatInkBarPositioner', {\n providedIn: 'root',\n factory: _MAT_INK_BAR_POSITIONER_FACTORY\n});\n\n/**\n * Used in the `mat-tab-group` view to display tab labels.\n * @docs-private\n */\nlet MatTabLabelWrapper = /*#__PURE__*/(() => {\n class MatTabLabelWrapper extends InkBarItem {\n constructor(elementRef) {\n super();\n this.elementRef = elementRef;\n /** Whether the tab is disabled. */\n this.disabled = false;\n }\n /** Sets focus on the wrapper element */\n focus() {\n this.elementRef.nativeElement.focus();\n }\n getOffsetLeft() {\n return this.elementRef.nativeElement.offsetLeft;\n }\n getOffsetWidth() {\n return this.elementRef.nativeElement.offsetWidth;\n }\n static {\n this.ɵfac = function MatTabLabelWrapper_Factory(t) {\n return new (t || MatTabLabelWrapper)(i0.ɵɵdirectiveInject(i0.ElementRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatTabLabelWrapper,\n selectors: [[\"\", \"matTabLabelWrapper\", \"\"]],\n hostVars: 3,\n hostBindings: function MatTabLabelWrapper_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"aria-disabled\", !!ctx.disabled);\n i0.ɵɵclassProp(\"mat-mdc-tab-disabled\", ctx.disabled);\n }\n },\n inputs: {\n disabled: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"disabled\", \"disabled\", booleanAttribute]\n },\n standalone: true,\n features: [i0.ɵɵInputTransformsFeature, i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return MatTabLabelWrapper;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Config used to bind passive event listeners */\nconst passiveEventListenerOptions = /*#__PURE__*/normalizePassiveListenerOptions({\n passive: true\n});\n/**\n * Amount of milliseconds to wait before starting to scroll the header automatically.\n * Set a little conservatively in order to handle fake events dispatched on touch devices.\n */\nconst HEADER_SCROLL_DELAY = 650;\n/**\n * Interval in milliseconds at which to scroll the header\n * while the user is holding their pointer.\n */\nconst HEADER_SCROLL_INTERVAL = 100;\n/**\n * Base class for a tab header that supported pagination.\n * @docs-private\n */\nlet MatPaginatedTabHeader = /*#__PURE__*/(() => {\n class MatPaginatedTabHeader {\n /** The index of the active tab. */\n get selectedIndex() {\n return this._selectedIndex;\n }\n set selectedIndex(v) {\n const value = isNaN(v) ? 0 : v;\n if (this._selectedIndex != value) {\n this._selectedIndexChanged = true;\n this._selectedIndex = value;\n if (this._keyManager) {\n this._keyManager.updateActiveItem(value);\n }\n }\n }\n constructor(_elementRef, _changeDetectorRef, _viewportRuler, _dir, _ngZone, _platform, _animationMode) {\n this._elementRef = _elementRef;\n this._changeDetectorRef = _changeDetectorRef;\n this._viewportRuler = _viewportRuler;\n this._dir = _dir;\n this._ngZone = _ngZone;\n this._platform = _platform;\n this._animationMode = _animationMode;\n /** The distance in pixels that the tab labels should be translated to the left. */\n this._scrollDistance = 0;\n /** Whether the header should scroll to the selected index after the view has been checked. */\n this._selectedIndexChanged = false;\n /** Emits when the component is destroyed. */\n this._destroyed = new Subject();\n /** Whether the controls for pagination should be displayed */\n this._showPaginationControls = false;\n /** Whether the tab list can be scrolled more towards the end of the tab label list. */\n this._disableScrollAfter = true;\n /** Whether the tab list can be scrolled more towards the beginning of the tab label list. */\n this._disableScrollBefore = true;\n /** Stream that will stop the automated scrolling. */\n this._stopScrolling = new Subject();\n /**\n * Whether pagination should be disabled. This can be used to avoid unnecessary\n * layout recalculations if it's known that pagination won't be required.\n */\n this.disablePagination = false;\n this._selectedIndex = 0;\n /** Event emitted when the option is selected. */\n this.selectFocusedIndex = new EventEmitter();\n /** Event emitted when a label is focused. */\n this.indexFocused = new EventEmitter();\n // Bind the `mouseleave` event on the outside since it doesn't change anything in the view.\n _ngZone.runOutsideAngular(() => {\n fromEvent(_elementRef.nativeElement, 'mouseleave').pipe(takeUntil(this._destroyed)).subscribe(() => {\n this._stopInterval();\n });\n });\n }\n ngAfterViewInit() {\n // We need to handle these events manually, because we want to bind passive event listeners.\n fromEvent(this._previousPaginator.nativeElement, 'touchstart', passiveEventListenerOptions).pipe(takeUntil(this._destroyed)).subscribe(() => {\n this._handlePaginatorPress('before');\n });\n fromEvent(this._nextPaginator.nativeElement, 'touchstart', passiveEventListenerOptions).pipe(takeUntil(this._destroyed)).subscribe(() => {\n this._handlePaginatorPress('after');\n });\n }\n ngAfterContentInit() {\n const dirChange = this._dir ? this._dir.change : of('ltr');\n const resize = this._viewportRuler.change(150);\n const realign = () => {\n this.updatePagination();\n this._alignInkBarToSelectedTab();\n };\n this._keyManager = new FocusKeyManager(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap()\n // Allow focus to land on disabled tabs, as per https://w3c.github.io/aria-practices/#kbd_disabled_controls\n .skipPredicate(() => false);\n this._keyManager.updateActiveItem(this._selectedIndex);\n // Defer the first call in order to allow for slower browsers to lay out the elements.\n // This helps in cases where the user lands directly on a page with paginated tabs.\n // Note that we use `onStable` instead of `requestAnimationFrame`, because the latter\n // can hold up tests that are in a background tab.\n this._ngZone.onStable.pipe(take(1)).subscribe(realign);\n // On dir change or window resize, realign the ink bar and update the orientation of\n // the key manager if the direction has changed.\n merge(dirChange, resize, this._items.changes, this._itemsResized()).pipe(takeUntil(this._destroyed)).subscribe(() => {\n // We need to defer this to give the browser some time to recalculate\n // the element dimensions. The call has to be wrapped in `NgZone.run`,\n // because the viewport change handler runs outside of Angular.\n this._ngZone.run(() => {\n Promise.resolve().then(() => {\n // Clamp the scroll distance, because it can change with the number of tabs.\n this._scrollDistance = Math.max(0, Math.min(this._getMaxScrollDistance(), this._scrollDistance));\n realign();\n });\n });\n this._keyManager.withHorizontalOrientation(this._getLayoutDirection());\n });\n // If there is a change in the focus key manager we need to emit the `indexFocused`\n // event in order to provide a public event that notifies about focus changes. Also we realign\n // the tabs container by scrolling the new focused tab into the visible section.\n this._keyManager.change.subscribe(newFocusIndex => {\n this.indexFocused.emit(newFocusIndex);\n this._setTabFocus(newFocusIndex);\n });\n }\n /** Sends any changes that could affect the layout of the items. */\n _itemsResized() {\n if (typeof ResizeObserver !== 'function') {\n return EMPTY;\n }\n return this._items.changes.pipe(startWith(this._items), switchMap(tabItems => new Observable(observer => this._ngZone.runOutsideAngular(() => {\n const resizeObserver = new ResizeObserver(entries => observer.next(entries));\n tabItems.forEach(item => resizeObserver.observe(item.elementRef.nativeElement));\n return () => {\n resizeObserver.disconnect();\n };\n }))),\n // Skip the first emit since the resize observer emits when an item\n // is observed for new items when the tab is already inserted\n skip(1),\n // Skip emissions where all the elements are invisible since we don't want\n // the header to try and re-render with invalid measurements. See #25574.\n filter(entries => entries.some(e => e.contentRect.width > 0 && e.contentRect.height > 0)));\n }\n ngAfterContentChecked() {\n // If the number of tab labels have changed, check if scrolling should be enabled\n if (this._tabLabelCount != this._items.length) {\n this.updatePagination();\n this._tabLabelCount = this._items.length;\n this._changeDetectorRef.markForCheck();\n }\n // If the selected index has changed, scroll to the label and check if the scrolling controls\n // should be disabled.\n if (this._selectedIndexChanged) {\n this._scrollToLabel(this._selectedIndex);\n this._checkScrollingControls();\n this._alignInkBarToSelectedTab();\n this._selectedIndexChanged = false;\n this._changeDetectorRef.markForCheck();\n }\n // If the scroll distance has been changed (tab selected, focused, scroll controls activated),\n // then translate the header to reflect this.\n if (this._scrollDistanceChanged) {\n this._updateTabScrollPosition();\n this._scrollDistanceChanged = false;\n this._changeDetectorRef.markForCheck();\n }\n }\n ngOnDestroy() {\n this._keyManager?.destroy();\n this._destroyed.next();\n this._destroyed.complete();\n this._stopScrolling.complete();\n }\n /** Handles keyboard events on the header. */\n _handleKeydown(event) {\n // We don't handle any key bindings with a modifier key.\n if (hasModifierKey(event)) {\n return;\n }\n switch (event.keyCode) {\n case ENTER:\n case SPACE:\n if (this.focusIndex !== this.selectedIndex) {\n const item = this._items.get(this.focusIndex);\n if (item && !item.disabled) {\n this.selectFocusedIndex.emit(this.focusIndex);\n this._itemSelected(event);\n }\n }\n break;\n default:\n this._keyManager.onKeydown(event);\n }\n }\n /**\n * Callback for when the MutationObserver detects that the content has changed.\n */\n _onContentChanges() {\n const textContent = this._elementRef.nativeElement.textContent;\n // We need to diff the text content of the header, because the MutationObserver callback\n // will fire even if the text content didn't change which is inefficient and is prone\n // to infinite loops if a poorly constructed expression is passed in (see #14249).\n if (textContent !== this._currentTextContent) {\n this._currentTextContent = textContent || '';\n // The content observer runs outside the `NgZone` by default, which\n // means that we need to bring the callback back in ourselves.\n this._ngZone.run(() => {\n this.updatePagination();\n this._alignInkBarToSelectedTab();\n this._changeDetectorRef.markForCheck();\n });\n }\n }\n /**\n * Updates the view whether pagination should be enabled or not.\n *\n * WARNING: Calling this method can be very costly in terms of performance. It should be called\n * as infrequently as possible from outside of the Tabs component as it causes a reflow of the\n * page.\n */\n updatePagination() {\n this._checkPaginationEnabled();\n this._checkScrollingControls();\n this._updateTabScrollPosition();\n }\n /** Tracks which element has focus; used for keyboard navigation */\n get focusIndex() {\n return this._keyManager ? this._keyManager.activeItemIndex : 0;\n }\n /** When the focus index is set, we must manually send focus to the correct label */\n set focusIndex(value) {\n if (!this._isValidIndex(value) || this.focusIndex === value || !this._keyManager) {\n return;\n }\n this._keyManager.setActiveItem(value);\n }\n /**\n * Determines if an index is valid. If the tabs are not ready yet, we assume that the user is\n * providing a valid index and return true.\n */\n _isValidIndex(index) {\n return this._items ? !!this._items.toArray()[index] : true;\n }\n /**\n * Sets focus on the HTML element for the label wrapper and scrolls it into the view if\n * scrolling is enabled.\n */\n _setTabFocus(tabIndex) {\n if (this._showPaginationControls) {\n this._scrollToLabel(tabIndex);\n }\n if (this._items && this._items.length) {\n this._items.toArray()[tabIndex].focus();\n // Do not let the browser manage scrolling to focus the element, this will be handled\n // by using translation. In LTR, the scroll left should be 0. In RTL, the scroll width\n // should be the full width minus the offset width.\n const containerEl = this._tabListContainer.nativeElement;\n const dir = this._getLayoutDirection();\n if (dir == 'ltr') {\n containerEl.scrollLeft = 0;\n } else {\n containerEl.scrollLeft = containerEl.scrollWidth - containerEl.offsetWidth;\n }\n }\n }\n /** The layout direction of the containing app. */\n _getLayoutDirection() {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\n /** Performs the CSS transformation on the tab list that will cause the list to scroll. */\n _updateTabScrollPosition() {\n if (this.disablePagination) {\n return;\n }\n const scrollDistance = this.scrollDistance;\n const translateX = this._getLayoutDirection() === 'ltr' ? -scrollDistance : scrollDistance;\n // Don't use `translate3d` here because we don't want to create a new layer. A new layer\n // seems to cause flickering and overflow in Internet Explorer. For example, the ink bar\n // and ripples will exceed the boundaries of the visible tab bar.\n // See: https://github.com/angular/components/issues/10276\n // We round the `transform` here, because transforms with sub-pixel precision cause some\n // browsers to blur the content of the element.\n this._tabList.nativeElement.style.transform = `translateX(${Math.round(translateX)}px)`;\n // Setting the `transform` on IE will change the scroll offset of the parent, causing the\n // position to be thrown off in some cases. We have to reset it ourselves to ensure that\n // it doesn't get thrown off. Note that we scope it only to IE and Edge, because messing\n // with the scroll position throws off Chrome 71+ in RTL mode (see #14689).\n if (this._platform.TRIDENT || this._platform.EDGE) {\n this._tabListContainer.nativeElement.scrollLeft = 0;\n }\n }\n /** Sets the distance in pixels that the tab header should be transformed in the X-axis. */\n get scrollDistance() {\n return this._scrollDistance;\n }\n set scrollDistance(value) {\n this._scrollTo(value);\n }\n /**\n * Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or\n * the end of the list, respectively). The distance to scroll is computed to be a third of the\n * length of the tab list view window.\n *\n * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n * should be called sparingly.\n */\n _scrollHeader(direction) {\n const viewLength = this._tabListContainer.nativeElement.offsetWidth;\n // Move the scroll distance one-third the length of the tab list's viewport.\n const scrollAmount = (direction == 'before' ? -1 : 1) * viewLength / 3;\n return this._scrollTo(this._scrollDistance + scrollAmount);\n }\n /** Handles click events on the pagination arrows. */\n _handlePaginatorClick(direction) {\n this._stopInterval();\n this._scrollHeader(direction);\n }\n /**\n * Moves the tab list such that the desired tab label (marked by index) is moved into view.\n *\n * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n * should be called sparingly.\n */\n _scrollToLabel(labelIndex) {\n if (this.disablePagination) {\n return;\n }\n const selectedLabel = this._items ? this._items.toArray()[labelIndex] : null;\n if (!selectedLabel) {\n return;\n }\n // The view length is the visible width of the tab labels.\n const viewLength = this._tabListContainer.nativeElement.offsetWidth;\n const {\n offsetLeft,\n offsetWidth\n } = selectedLabel.elementRef.nativeElement;\n let labelBeforePos, labelAfterPos;\n if (this._getLayoutDirection() == 'ltr') {\n labelBeforePos = offsetLeft;\n labelAfterPos = labelBeforePos + offsetWidth;\n } else {\n labelAfterPos = this._tabListInner.nativeElement.offsetWidth - offsetLeft;\n labelBeforePos = labelAfterPos - offsetWidth;\n }\n const beforeVisiblePos = this.scrollDistance;\n const afterVisiblePos = this.scrollDistance + viewLength;\n if (labelBeforePos < beforeVisiblePos) {\n // Scroll header to move label to the before direction\n this.scrollDistance -= beforeVisiblePos - labelBeforePos;\n } else if (labelAfterPos > afterVisiblePos) {\n // Scroll header to move label to the after direction\n this.scrollDistance += Math.min(labelAfterPos - afterVisiblePos, labelBeforePos - beforeVisiblePos);\n }\n }\n /**\n * Evaluate whether the pagination controls should be displayed. If the scroll width of the\n * tab list is wider than the size of the header container, then the pagination controls should\n * be shown.\n *\n * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n * should be called sparingly.\n */\n _checkPaginationEnabled() {\n if (this.disablePagination) {\n this._showPaginationControls = false;\n } else {\n const isEnabled = this._tabListInner.nativeElement.scrollWidth > this._elementRef.nativeElement.offsetWidth;\n if (!isEnabled) {\n this.scrollDistance = 0;\n }\n if (isEnabled !== this._showPaginationControls) {\n this._changeDetectorRef.markForCheck();\n }\n this._showPaginationControls = isEnabled;\n }\n }\n /**\n * Evaluate whether the before and after controls should be enabled or disabled.\n * If the header is at the beginning of the list (scroll distance is equal to 0) then disable the\n * before button. If the header is at the end of the list (scroll distance is equal to the\n * maximum distance we can scroll), then disable the after button.\n *\n * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n * should be called sparingly.\n */\n _checkScrollingControls() {\n if (this.disablePagination) {\n this._disableScrollAfter = this._disableScrollBefore = true;\n } else {\n // Check if the pagination arrows should be activated.\n this._disableScrollBefore = this.scrollDistance == 0;\n this._disableScrollAfter = this.scrollDistance == this._getMaxScrollDistance();\n this._changeDetectorRef.markForCheck();\n }\n }\n /**\n * Determines what is the maximum length in pixels that can be set for the scroll distance. This\n * is equal to the difference in width between the tab list container and tab header container.\n *\n * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n * should be called sparingly.\n */\n _getMaxScrollDistance() {\n const lengthOfTabList = this._tabListInner.nativeElement.scrollWidth;\n const viewLength = this._tabListContainer.nativeElement.offsetWidth;\n return lengthOfTabList - viewLength || 0;\n }\n /** Tells the ink-bar to align itself to the current label wrapper */\n _alignInkBarToSelectedTab() {\n const selectedItem = this._items && this._items.length ? this._items.toArray()[this.selectedIndex] : null;\n const selectedLabelWrapper = selectedItem ? selectedItem.elementRef.nativeElement : null;\n if (selectedLabelWrapper) {\n this._inkBar.alignToElement(selectedLabelWrapper);\n } else {\n this._inkBar.hide();\n }\n }\n /** Stops the currently-running paginator interval. */\n _stopInterval() {\n this._stopScrolling.next();\n }\n /**\n * Handles the user pressing down on one of the paginators.\n * Starts scrolling the header after a certain amount of time.\n * @param direction In which direction the paginator should be scrolled.\n */\n _handlePaginatorPress(direction, mouseEvent) {\n // Don't start auto scrolling for right mouse button clicks. Note that we shouldn't have to\n // null check the `button`, but we do it so we don't break tests that use fake events.\n if (mouseEvent && mouseEvent.button != null && mouseEvent.button !== 0) {\n return;\n }\n // Avoid overlapping timers.\n this._stopInterval();\n // Start a timer after the delay and keep firing based on the interval.\n timer(HEADER_SCROLL_DELAY, HEADER_SCROLL_INTERVAL)\n // Keep the timer going until something tells it to stop or the component is destroyed.\n .pipe(takeUntil(merge(this._stopScrolling, this._destroyed))).subscribe(() => {\n const {\n maxScrollDistance,\n distance\n } = this._scrollHeader(direction);\n // Stop the timer if we've reached the start or the end.\n if (distance === 0 || distance >= maxScrollDistance) {\n this._stopInterval();\n }\n });\n }\n /**\n * Scrolls the header to a given position.\n * @param position Position to which to scroll.\n * @returns Information on the current scroll distance and the maximum.\n */\n _scrollTo(position) {\n if (this.disablePagination) {\n return {\n maxScrollDistance: 0,\n distance: 0\n };\n }\n const maxScrollDistance = this._getMaxScrollDistance();\n this._scrollDistance = Math.max(0, Math.min(maxScrollDistance, position));\n // Mark that the scroll distance has changed so that after the view is checked, the CSS\n // transformation can move the header.\n this._scrollDistanceChanged = true;\n this._checkScrollingControls();\n return {\n maxScrollDistance,\n distance: this._scrollDistance\n };\n }\n static {\n this.ɵfac = function MatPaginatedTabHeader_Factory(t) {\n return new (t || MatPaginatedTabHeader)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1.ViewportRuler), i0.ɵɵdirectiveInject(i2.Directionality, 8), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i3.Platform), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatPaginatedTabHeader,\n inputs: {\n disablePagination: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"disablePagination\", \"disablePagination\", booleanAttribute],\n selectedIndex: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"selectedIndex\", \"selectedIndex\", numberAttribute]\n },\n outputs: {\n selectFocusedIndex: \"selectFocusedIndex\",\n indexFocused: \"indexFocused\"\n },\n features: [i0.ɵɵInputTransformsFeature]\n });\n }\n }\n return MatPaginatedTabHeader;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * The header of the tab group which displays a list of all the tabs in the tab group. Includes\n * an ink bar that follows the currently selected tab. When the tabs list's width exceeds the\n * width of the header container, then arrows will be displayed to allow the user to scroll\n * left and right across the header.\n * @docs-private\n */\nlet MatTabHeader = /*#__PURE__*/(() => {\n class MatTabHeader extends MatPaginatedTabHeader {\n constructor(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform, animationMode) {\n super(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform, animationMode);\n /** Whether the ripple effect is disabled or not. */\n this.disableRipple = false;\n }\n ngAfterContentInit() {\n this._inkBar = new MatInkBar(this._items);\n super.ngAfterContentInit();\n }\n _itemSelected(event) {\n event.preventDefault();\n }\n static {\n this.ɵfac = function MatTabHeader_Factory(t) {\n return new (t || MatTabHeader)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1.ViewportRuler), i0.ɵɵdirectiveInject(i2.Directionality, 8), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i3.Platform), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatTabHeader,\n selectors: [[\"mat-tab-header\"]],\n contentQueries: function MatTabHeader_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatTabLabelWrapper, 4);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._items = _t);\n }\n },\n viewQuery: function MatTabHeader_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c1, 7);\n i0.ɵɵviewQuery(_c2, 7);\n i0.ɵɵviewQuery(_c3, 7);\n i0.ɵɵviewQuery(_c4, 5);\n i0.ɵɵviewQuery(_c5, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._tabListContainer = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._tabList = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._tabListInner = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._nextPaginator = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._previousPaginator = _t.first);\n }\n },\n hostAttrs: [1, \"mat-mdc-tab-header\"],\n hostVars: 4,\n hostBindings: function MatTabHeader_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"mat-mdc-tab-header-pagination-controls-enabled\", ctx._showPaginationControls)(\"mat-mdc-tab-header-rtl\", ctx._getLayoutDirection() == \"rtl\");\n }\n },\n inputs: {\n disableRipple: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"disableRipple\", \"disableRipple\", booleanAttribute]\n },\n standalone: true,\n features: [i0.ɵɵInputTransformsFeature, i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c0,\n decls: 13,\n vars: 10,\n consts: [[\"previousPaginator\", \"\"], [\"tabListContainer\", \"\"], [\"tabList\", \"\"], [\"tabListInner\", \"\"], [\"nextPaginator\", \"\"], [\"aria-hidden\", \"true\", \"type\", \"button\", \"mat-ripple\", \"\", \"tabindex\", \"-1\", 1, \"mat-mdc-tab-header-pagination\", \"mat-mdc-tab-header-pagination-before\", 3, \"click\", \"mousedown\", \"touchend\", \"matRippleDisabled\", \"disabled\"], [1, \"mat-mdc-tab-header-pagination-chevron\"], [1, \"mat-mdc-tab-label-container\", 3, \"keydown\"], [\"role\", \"tablist\", 1, \"mat-mdc-tab-list\", 3, \"cdkObserveContent\"], [1, \"mat-mdc-tab-labels\"], [\"aria-hidden\", \"true\", \"type\", \"button\", \"mat-ripple\", \"\", \"tabindex\", \"-1\", 1, \"mat-mdc-tab-header-pagination\", \"mat-mdc-tab-header-pagination-after\", 3, \"mousedown\", \"click\", \"touchend\", \"matRippleDisabled\", \"disabled\"]],\n template: function MatTabHeader_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"button\", 5, 0);\n i0.ɵɵlistener(\"click\", function MatTabHeader_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._handlePaginatorClick(\"before\"));\n })(\"mousedown\", function MatTabHeader_Template_button_mousedown_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._handlePaginatorPress(\"before\", $event));\n })(\"touchend\", function MatTabHeader_Template_button_touchend_0_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._stopInterval());\n });\n i0.ɵɵelement(2, \"div\", 6);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"div\", 7, 1);\n i0.ɵɵlistener(\"keydown\", function MatTabHeader_Template_div_keydown_3_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._handleKeydown($event));\n });\n i0.ɵɵelementStart(5, \"div\", 8, 2);\n i0.ɵɵlistener(\"cdkObserveContent\", function MatTabHeader_Template_div_cdkObserveContent_5_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._onContentChanges());\n });\n i0.ɵɵelementStart(7, \"div\", 9, 3);\n i0.ɵɵprojection(9);\n i0.ɵɵelementEnd()()();\n i0.ɵɵelementStart(10, \"button\", 10, 4);\n i0.ɵɵlistener(\"mousedown\", function MatTabHeader_Template_button_mousedown_10_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._handlePaginatorPress(\"after\", $event));\n })(\"click\", function MatTabHeader_Template_button_click_10_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._handlePaginatorClick(\"after\"));\n })(\"touchend\", function MatTabHeader_Template_button_touchend_10_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._stopInterval());\n });\n i0.ɵɵelement(12, \"div\", 6);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵclassProp(\"mat-mdc-tab-header-pagination-disabled\", ctx._disableScrollBefore);\n i0.ɵɵproperty(\"matRippleDisabled\", ctx._disableScrollBefore || ctx.disableRipple)(\"disabled\", ctx._disableScrollBefore || null);\n i0.ɵɵadvance(3);\n i0.ɵɵclassProp(\"_mat-animation-noopable\", ctx._animationMode === \"NoopAnimations\");\n i0.ɵɵadvance(7);\n i0.ɵɵclassProp(\"mat-mdc-tab-header-pagination-disabled\", ctx._disableScrollAfter);\n i0.ɵɵproperty(\"matRippleDisabled\", ctx._disableScrollAfter || ctx.disableRipple)(\"disabled\", ctx._disableScrollAfter || null);\n }\n },\n dependencies: [MatRipple, CdkObserveContent],\n styles: [\".mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;background:none;border:none;outline:0;padding:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color)}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-header-pagination-icon-color)}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}._mat-animation-noopable span.mdc-tab-indicator__content,._mat-animation-noopable span.mdc-tab__text-label{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-header-divider-height);border-bottom-color:var(--mat-tab-header-divider-color)}.mat-mdc-tab-group-inverted-header .mat-mdc-tab-label-container{border-bottom:none;border-top-style:solid;border-top-width:var(--mat-tab-header-divider-height);border-top-color:var(--mat-tab-header-divider-color)}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.mat-mdc-tab::before{margin:5px}.cdk-high-contrast-active .mat-mdc-tab[aria-disabled=true]{color:GrayText}\"],\n encapsulation: 2\n });\n }\n }\n return MatTabHeader;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Injection token that can be used to provide the default options the tabs module. */\nconst MAT_TABS_CONFIG = /*#__PURE__*/new InjectionToken('MAT_TABS_CONFIG');\n\n/**\n * Animations used by the Material tabs.\n * @docs-private\n */\nconst matTabsAnimations = {\n /** Animation translates a tab along the X axis. */\n translateTab: /*#__PURE__*/trigger('translateTab', [\n /*#__PURE__*/\n // Transitions to `none` instead of 0, because some browsers might blur the content.\n state('center, void, left-origin-center, right-origin-center', /*#__PURE__*/style({\n transform: 'none'\n })),\n /*#__PURE__*/\n // If the tab is either on the left or right, we additionally add a `min-height` of 1px\n // in order to ensure that the element has a height before its state changes. This is\n // necessary because Chrome does seem to skip the transition in RTL mode if the element does\n // not have a static height and is not rendered. See related issue: #9465\n state('left', /*#__PURE__*/style({\n transform: 'translate3d(-100%, 0, 0)',\n minHeight: '1px',\n // Normally this is redundant since we detach the content from the DOM, but if the user\n // opted into keeping the content in the DOM, we have to hide it so it isn't focusable.\n visibility: 'hidden'\n })), /*#__PURE__*/state('right', /*#__PURE__*/style({\n transform: 'translate3d(100%, 0, 0)',\n minHeight: '1px',\n visibility: 'hidden'\n })), /*#__PURE__*/transition('* => left, * => right, left => center, right => center', /*#__PURE__*/animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')), /*#__PURE__*/transition('void => left-origin-center', [/*#__PURE__*/style({\n transform: 'translate3d(-100%, 0, 0)',\n visibility: 'hidden'\n }), /*#__PURE__*/animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')]), /*#__PURE__*/transition('void => right-origin-center', [/*#__PURE__*/style({\n transform: 'translate3d(100%, 0, 0)',\n visibility: 'hidden'\n }), /*#__PURE__*/animate('{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)')])])\n};\n\n/**\n * The portal host directive for the contents of the tab.\n * @docs-private\n */\nlet MatTabBodyPortal = /*#__PURE__*/(() => {\n class MatTabBodyPortal extends CdkPortalOutlet {\n constructor(componentFactoryResolver, viewContainerRef, _host, _document) {\n super(componentFactoryResolver, viewContainerRef, _document);\n this._host = _host;\n /** Subscription to events for when the tab body begins centering. */\n this._centeringSub = Subscription.EMPTY;\n /** Subscription to events for when the tab body finishes leaving from center position. */\n this._leavingSub = Subscription.EMPTY;\n }\n /** Set initial visibility or set up subscription for changing visibility. */\n ngOnInit() {\n super.ngOnInit();\n this._centeringSub = this._host._beforeCentering.pipe(startWith(this._host._isCenterPosition(this._host._position))).subscribe(isCentering => {\n if (isCentering && !this.hasAttached()) {\n this.attach(this._host._content);\n }\n });\n this._leavingSub = this._host._afterLeavingCenter.subscribe(() => {\n if (!this._host.preserveContent) {\n this.detach();\n }\n });\n }\n /** Clean up centering subscription. */\n ngOnDestroy() {\n super.ngOnDestroy();\n this._centeringSub.unsubscribe();\n this._leavingSub.unsubscribe();\n }\n static {\n this.ɵfac = function MatTabBodyPortal_Factory(t) {\n return new (t || MatTabBodyPortal)(i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(forwardRef(() => MatTabBody)), i0.ɵɵdirectiveInject(DOCUMENT));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatTabBodyPortal,\n selectors: [[\"\", \"matTabBodyHost\", \"\"]],\n standalone: true,\n features: [i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return MatTabBodyPortal;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Wrapper for the contents of a tab.\n * @docs-private\n */\nlet MatTabBody = /*#__PURE__*/(() => {\n class MatTabBody {\n /** The shifted index position of the tab body, where zero represents the active center tab. */\n set position(position) {\n this._positionIndex = position;\n this._computePositionAnimationState();\n }\n constructor(_elementRef, _dir, changeDetectorRef) {\n this._elementRef = _elementRef;\n this._dir = _dir;\n /** Subscription to the directionality change observable. */\n this._dirChangeSubscription = Subscription.EMPTY;\n /** Emits when an animation on the tab is complete. */\n this._translateTabComplete = new Subject();\n /** Event emitted when the tab begins to animate towards the center as the active tab. */\n this._onCentering = new EventEmitter();\n /** Event emitted before the centering of the tab begins. */\n this._beforeCentering = new EventEmitter();\n /** Event emitted before the centering of the tab begins. */\n this._afterLeavingCenter = new EventEmitter();\n /** Event emitted when the tab completes its animation towards the center. */\n this._onCentered = new EventEmitter(true);\n // Note that the default value will always be overwritten by `MatTabBody`, but we need one\n // anyway to prevent the animations module from throwing an error if the body is used on its own.\n /** Duration for the tab's animation. */\n this.animationDuration = '500ms';\n /** Whether the tab's content should be kept in the DOM while it's off-screen. */\n this.preserveContent = false;\n if (_dir) {\n this._dirChangeSubscription = _dir.change.subscribe(dir => {\n this._computePositionAnimationState(dir);\n changeDetectorRef.markForCheck();\n });\n }\n // Ensure that we get unique animation events, because the `.done` callback can get\n // invoked twice in some browsers. See https://github.com/angular/angular/issues/24084.\n this._translateTabComplete.pipe(distinctUntilChanged((x, y) => {\n return x.fromState === y.fromState && x.toState === y.toState;\n })).subscribe(event => {\n // If the transition to the center is complete, emit an event.\n if (this._isCenterPosition(event.toState) && this._isCenterPosition(this._position)) {\n this._onCentered.emit();\n }\n if (this._isCenterPosition(event.fromState) && !this._isCenterPosition(this._position)) {\n this._afterLeavingCenter.emit();\n }\n });\n }\n /**\n * After initialized, check if the content is centered and has an origin. If so, set the\n * special position states that transition the tab from the left or right before centering.\n */\n ngOnInit() {\n if (this._position == 'center' && this.origin != null) {\n this._position = this._computePositionFromOrigin(this.origin);\n }\n }\n ngOnDestroy() {\n this._dirChangeSubscription.unsubscribe();\n this._translateTabComplete.complete();\n }\n _onTranslateTabStarted(event) {\n const isCentering = this._isCenterPosition(event.toState);\n this._beforeCentering.emit(isCentering);\n if (isCentering) {\n this._onCentering.emit(this._elementRef.nativeElement.clientHeight);\n }\n }\n /** The text direction of the containing app. */\n _getLayoutDirection() {\n return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n }\n /** Whether the provided position state is considered center, regardless of origin. */\n _isCenterPosition(position) {\n return position == 'center' || position == 'left-origin-center' || position == 'right-origin-center';\n }\n /** Computes the position state that will be used for the tab-body animation trigger. */\n _computePositionAnimationState(dir = this._getLayoutDirection()) {\n if (this._positionIndex < 0) {\n this._position = dir == 'ltr' ? 'left' : 'right';\n } else if (this._positionIndex > 0) {\n this._position = dir == 'ltr' ? 'right' : 'left';\n } else {\n this._position = 'center';\n }\n }\n /**\n * Computes the position state based on the specified origin position. This is used if the\n * tab is becoming visible immediately after creation.\n */\n _computePositionFromOrigin(origin) {\n const dir = this._getLayoutDirection();\n if (dir == 'ltr' && origin <= 0 || dir == 'rtl' && origin > 0) {\n return 'left-origin-center';\n }\n return 'right-origin-center';\n }\n static {\n this.ɵfac = function MatTabBody_Factory(t) {\n return new (t || MatTabBody)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i2.Directionality, 8), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatTabBody,\n selectors: [[\"mat-tab-body\"]],\n viewQuery: function MatTabBody_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(CdkPortalOutlet, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._portalHost = _t.first);\n }\n },\n hostAttrs: [1, \"mat-mdc-tab-body\"],\n inputs: {\n _content: [i0.ɵɵInputFlags.None, \"content\", \"_content\"],\n origin: \"origin\",\n animationDuration: \"animationDuration\",\n preserveContent: \"preserveContent\",\n position: \"position\"\n },\n outputs: {\n _onCentering: \"_onCentering\",\n _beforeCentering: \"_beforeCentering\",\n _afterLeavingCenter: \"_afterLeavingCenter\",\n _onCentered: \"_onCentered\"\n },\n standalone: true,\n features: [i0.ɵɵStandaloneFeature],\n decls: 3,\n vars: 6,\n consts: [[\"content\", \"\"], [\"cdkScrollable\", \"\", 1, \"mat-mdc-tab-body-content\"], [\"matTabBodyHost\", \"\"]],\n template: function MatTabBody_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 1, 0);\n i0.ɵɵlistener(\"@translateTab.start\", function MatTabBody_Template_div_animation_translateTab_start_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._onTranslateTabStarted($event));\n })(\"@translateTab.done\", function MatTabBody_Template_div_animation_translateTab_done_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._translateTabComplete.next($event));\n });\n i0.ɵɵtemplate(2, MatTabBody_ng_template_2_Template, 0, 0, \"ng-template\", 2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"@translateTab\", i0.ɵɵpureFunction2(3, _c7, ctx._position, i0.ɵɵpureFunction1(1, _c6, ctx.animationDuration)));\n }\n },\n dependencies: [MatTabBodyPortal, CdkScrollable],\n styles: [\".mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-mdc-tab-body-content[style*=\\\"visibility: hidden\\\"]{display:none}\"],\n encapsulation: 2,\n data: {\n animation: [matTabsAnimations.translateTab]\n }\n });\n }\n }\n return MatTabBody;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Used to generate unique ID's for each tab component */\nlet nextId = 0;\n/** Boolean constant that determines whether the tab group supports the `backgroundColor` input */\nconst ENABLE_BACKGROUND_INPUT = true;\n/**\n * Material design tab-group component. Supports basic tab pairs (label + content) and includes\n * animated ink-bar, keyboard navigation, and screen reader.\n * See: https://material.io/design/components/tabs.html\n */\nlet MatTabGroup = /*#__PURE__*/(() => {\n class MatTabGroup {\n /** Whether the ink bar should fit its width to the size of the tab label content. */\n get fitInkBarToContent() {\n return this._fitInkBarToContent;\n }\n set fitInkBarToContent(value) {\n this._fitInkBarToContent = value;\n this._changeDetectorRef.markForCheck();\n }\n /** The index of the active tab. */\n get selectedIndex() {\n return this._selectedIndex;\n }\n set selectedIndex(value) {\n this._indexToSelect = isNaN(value) ? null : value;\n }\n /** Duration for the tab animation. Will be normalized to milliseconds if no units are set. */\n get animationDuration() {\n return this._animationDuration;\n }\n set animationDuration(value) {\n const stringValue = value + '';\n this._animationDuration = /^\\d+$/.test(stringValue) ? value + 'ms' : stringValue;\n }\n /**\n * `tabindex` to be set on the inner element that wraps the tab content. Can be used for improved\n * accessibility when the tab does not have focusable elements or if it has scrollable content.\n * The `tabindex` will be removed automatically for inactive tabs.\n * Read more at https://www.w3.org/TR/wai-aria-practices/examples/tabs/tabs-2/tabs.html\n */\n get contentTabIndex() {\n return this._contentTabIndex;\n }\n set contentTabIndex(value) {\n this._contentTabIndex = isNaN(value) ? null : value;\n }\n /**\n * Background color of the tab group.\n * @deprecated The background color should be customized through Sass theming APIs.\n * @breaking-change 20.0.0 Remove this input\n */\n get backgroundColor() {\n return this._backgroundColor;\n }\n set backgroundColor(value) {\n if (!ENABLE_BACKGROUND_INPUT) {\n throw new Error(`mat-tab-group background color must be set through the Sass theming API`);\n }\n const classList = this._elementRef.nativeElement.classList;\n classList.remove('mat-tabs-with-background', `mat-background-${this.backgroundColor}`);\n if (value) {\n classList.add('mat-tabs-with-background', `mat-background-${value}`);\n }\n this._backgroundColor = value;\n }\n constructor(_elementRef, _changeDetectorRef, defaultConfig, _animationMode) {\n this._elementRef = _elementRef;\n this._changeDetectorRef = _changeDetectorRef;\n this._animationMode = _animationMode;\n /** All of the tabs that belong to the group. */\n this._tabs = new QueryList();\n /** The tab index that should be selected after the content has been checked. */\n this._indexToSelect = 0;\n /** Index of the tab that was focused last. */\n this._lastFocusedTabIndex = null;\n /** Snapshot of the height of the tab body wrapper before another tab is activated. */\n this._tabBodyWrapperHeight = 0;\n /** Subscription to tabs being added/removed. */\n this._tabsSubscription = Subscription.EMPTY;\n /** Subscription to changes in the tab labels. */\n this._tabLabelSubscription = Subscription.EMPTY;\n this._fitInkBarToContent = false;\n /** Whether tabs should be stretched to fill the header. */\n this.stretchTabs = true;\n /** Whether the tab group should grow to the size of the active tab. */\n this.dynamicHeight = false;\n this._selectedIndex = null;\n /** Position of the tab header. */\n this.headerPosition = 'above';\n /**\n * Whether pagination should be disabled. This can be used to avoid unnecessary\n * layout recalculations if it's known that pagination won't be required.\n */\n this.disablePagination = false;\n /** Whether ripples in the tab group are disabled. */\n this.disableRipple = false;\n /**\n * By default tabs remove their content from the DOM while it's off-screen.\n * Setting this to `true` will keep it in the DOM which will prevent elements\n * like iframes and videos from reloading next time it comes back into the view.\n */\n this.preserveContent = false;\n /** Output to enable support for two-way binding on `[(selectedIndex)]` */\n this.selectedIndexChange = new EventEmitter();\n /** Event emitted when focus has changed within a tab group. */\n this.focusChange = new EventEmitter();\n /** Event emitted when the body animation has completed */\n this.animationDone = new EventEmitter();\n /** Event emitted when the tab selection has changed. */\n this.selectedTabChange = new EventEmitter(true);\n /** Whether the tab group is rendered on the server. */\n this._isServer = !inject(Platform).isBrowser;\n this._groupId = nextId++;\n this.animationDuration = defaultConfig && defaultConfig.animationDuration ? defaultConfig.animationDuration : '500ms';\n this.disablePagination = defaultConfig && defaultConfig.disablePagination != null ? defaultConfig.disablePagination : false;\n this.dynamicHeight = defaultConfig && defaultConfig.dynamicHeight != null ? defaultConfig.dynamicHeight : false;\n if (defaultConfig?.contentTabIndex != null) {\n this.contentTabIndex = defaultConfig.contentTabIndex;\n }\n this.preserveContent = !!defaultConfig?.preserveContent;\n this.fitInkBarToContent = defaultConfig && defaultConfig.fitInkBarToContent != null ? defaultConfig.fitInkBarToContent : false;\n this.stretchTabs = defaultConfig && defaultConfig.stretchTabs != null ? defaultConfig.stretchTabs : true;\n }\n /**\n * After the content is checked, this component knows what tabs have been defined\n * and what the selected index should be. This is where we can know exactly what position\n * each tab should be in according to the new selected index, and additionally we know how\n * a new selected tab should transition in (from the left or right).\n */\n ngAfterContentChecked() {\n // Don't clamp the `indexToSelect` immediately in the setter because it can happen that\n // the amount of tabs changes before the actual change detection runs.\n const indexToSelect = this._indexToSelect = this._clampTabIndex(this._indexToSelect);\n // If there is a change in selected index, emit a change event. Should not trigger if\n // the selected index has not yet been initialized.\n if (this._selectedIndex != indexToSelect) {\n const isFirstRun = this._selectedIndex == null;\n if (!isFirstRun) {\n this.selectedTabChange.emit(this._createChangeEvent(indexToSelect));\n // Preserve the height so page doesn't scroll up during tab change.\n // Fixes https://stackblitz.com/edit/mat-tabs-scroll-page-top-on-tab-change\n const wrapper = this._tabBodyWrapper.nativeElement;\n wrapper.style.minHeight = wrapper.clientHeight + 'px';\n }\n // Changing these values after change detection has run\n // since the checked content may contain references to them.\n Promise.resolve().then(() => {\n this._tabs.forEach((tab, index) => tab.isActive = index === indexToSelect);\n if (!isFirstRun) {\n this.selectedIndexChange.emit(indexToSelect);\n // Clear the min-height, this was needed during tab change to avoid\n // unnecessary scrolling.\n this._tabBodyWrapper.nativeElement.style.minHeight = '';\n }\n });\n }\n // Setup the position for each tab and optionally setup an origin on the next selected tab.\n this._tabs.forEach((tab, index) => {\n tab.position = index - indexToSelect;\n // If there is already a selected tab, then set up an origin for the next selected tab\n // if it doesn't have one already.\n if (this._selectedIndex != null && tab.position == 0 && !tab.origin) {\n tab.origin = indexToSelect - this._selectedIndex;\n }\n });\n if (this._selectedIndex !== indexToSelect) {\n this._selectedIndex = indexToSelect;\n this._lastFocusedTabIndex = null;\n this._changeDetectorRef.markForCheck();\n }\n }\n ngAfterContentInit() {\n this._subscribeToAllTabChanges();\n this._subscribeToTabLabels();\n // Subscribe to changes in the amount of tabs, in order to be\n // able to re-render the content as new tabs are added or removed.\n this._tabsSubscription = this._tabs.changes.subscribe(() => {\n const indexToSelect = this._clampTabIndex(this._indexToSelect);\n // Maintain the previously-selected tab if a new tab is added or removed and there is no\n // explicit change that selects a different tab.\n if (indexToSelect === this._selectedIndex) {\n const tabs = this._tabs.toArray();\n let selectedTab;\n for (let i = 0; i < tabs.length; i++) {\n if (tabs[i].isActive) {\n // Assign both to the `_indexToSelect` and `_selectedIndex` so we don't fire a changed\n // event, otherwise the consumer may end up in an infinite loop in some edge cases like\n // adding a tab within the `selectedIndexChange` event.\n this._indexToSelect = this._selectedIndex = i;\n this._lastFocusedTabIndex = null;\n selectedTab = tabs[i];\n break;\n }\n }\n // If we haven't found an active tab and a tab exists at the selected index, it means\n // that the active tab was swapped out. Since this won't be picked up by the rendering\n // loop in `ngAfterContentChecked`, we need to sync it up manually.\n if (!selectedTab && tabs[indexToSelect]) {\n Promise.resolve().then(() => {\n tabs[indexToSelect].isActive = true;\n this.selectedTabChange.emit(this._createChangeEvent(indexToSelect));\n });\n }\n }\n this._changeDetectorRef.markForCheck();\n });\n }\n /** Listens to changes in all of the tabs. */\n _subscribeToAllTabChanges() {\n // Since we use a query with `descendants: true` to pick up the tabs, we may end up catching\n // some that are inside of nested tab groups. We filter them out manually by checking that\n // the closest group to the tab is the current one.\n this._allTabs.changes.pipe(startWith(this._allTabs)).subscribe(tabs => {\n this._tabs.reset(tabs.filter(tab => {\n return tab._closestTabGroup === this || !tab._closestTabGroup;\n }));\n this._tabs.notifyOnChanges();\n });\n }\n ngOnDestroy() {\n this._tabs.destroy();\n this._tabsSubscription.unsubscribe();\n this._tabLabelSubscription.unsubscribe();\n }\n /** Re-aligns the ink bar to the selected tab element. */\n realignInkBar() {\n if (this._tabHeader) {\n this._tabHeader._alignInkBarToSelectedTab();\n }\n }\n /**\n * Recalculates the tab group's pagination dimensions.\n *\n * WARNING: Calling this method can be very costly in terms of performance. It should be called\n * as infrequently as possible from outside of the Tabs component as it causes a reflow of the\n * page.\n */\n updatePagination() {\n if (this._tabHeader) {\n this._tabHeader.updatePagination();\n }\n }\n /**\n * Sets focus to a particular tab.\n * @param index Index of the tab to be focused.\n */\n focusTab(index) {\n const header = this._tabHeader;\n if (header) {\n header.focusIndex = index;\n }\n }\n _focusChanged(index) {\n this._lastFocusedTabIndex = index;\n this.focusChange.emit(this._createChangeEvent(index));\n }\n _createChangeEvent(index) {\n const event = new MatTabChangeEvent();\n event.index = index;\n if (this._tabs && this._tabs.length) {\n event.tab = this._tabs.toArray()[index];\n }\n return event;\n }\n /**\n * Subscribes to changes in the tab labels. This is needed, because the @Input for the label is\n * on the MatTab component, whereas the data binding is inside the MatTabGroup. In order for the\n * binding to be updated, we need to subscribe to changes in it and trigger change detection\n * manually.\n */\n _subscribeToTabLabels() {\n if (this._tabLabelSubscription) {\n this._tabLabelSubscription.unsubscribe();\n }\n this._tabLabelSubscription = merge(...this._tabs.map(tab => tab._stateChanges)).subscribe(() => this._changeDetectorRef.markForCheck());\n }\n /** Clamps the given index to the bounds of 0 and the tabs length. */\n _clampTabIndex(index) {\n // Note the `|| 0`, which ensures that values like NaN can't get through\n // and which would otherwise throw the component into an infinite loop\n // (since Math.max(NaN, 0) === NaN).\n return Math.min(this._tabs.length - 1, Math.max(index || 0, 0));\n }\n /** Returns a unique id for each tab label element */\n _getTabLabelId(i) {\n return `mat-tab-label-${this._groupId}-${i}`;\n }\n /** Returns a unique id for each tab content element */\n _getTabContentId(i) {\n return `mat-tab-content-${this._groupId}-${i}`;\n }\n /**\n * Sets the height of the body wrapper to the height of the activating tab if dynamic\n * height property is true.\n */\n _setTabBodyWrapperHeight(tabHeight) {\n if (!this.dynamicHeight || !this._tabBodyWrapperHeight) {\n return;\n }\n const wrapper = this._tabBodyWrapper.nativeElement;\n wrapper.style.height = this._tabBodyWrapperHeight + 'px';\n // This conditional forces the browser to paint the height so that\n // the animation to the new height can have an origin.\n if (this._tabBodyWrapper.nativeElement.offsetHeight) {\n wrapper.style.height = tabHeight + 'px';\n }\n }\n /** Removes the height of the tab body wrapper. */\n _removeTabBodyWrapperHeight() {\n const wrapper = this._tabBodyWrapper.nativeElement;\n this._tabBodyWrapperHeight = wrapper.clientHeight;\n wrapper.style.height = '';\n this.animationDone.emit();\n }\n /** Handle click events, setting new selected index if appropriate. */\n _handleClick(tab, tabHeader, index) {\n tabHeader.focusIndex = index;\n if (!tab.disabled) {\n this.selectedIndex = index;\n }\n }\n /** Retrieves the tabindex for the tab. */\n _getTabIndex(index) {\n const targetIndex = this._lastFocusedTabIndex ?? this.selectedIndex;\n return index === targetIndex ? 0 : -1;\n }\n /** Callback for when the focused state of a tab has changed. */\n _tabFocusChanged(focusOrigin, index) {\n // Mouse/touch focus happens during the `mousedown`/`touchstart` phase which\n // can cause the tab to be moved out from under the pointer, interrupting the\n // click sequence (see #21898). We don't need to scroll the tab into view for\n // such cases anyway, because it will be done when the tab becomes selected.\n if (focusOrigin && focusOrigin !== 'mouse' && focusOrigin !== 'touch') {\n this._tabHeader.focusIndex = index;\n }\n }\n static {\n this.ɵfac = function MatTabGroup_Factory(t) {\n return new (t || MatTabGroup)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(MAT_TABS_CONFIG, 8), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatTabGroup,\n selectors: [[\"mat-tab-group\"]],\n contentQueries: function MatTabGroup_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatTab, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._allTabs = _t);\n }\n },\n viewQuery: function MatTabGroup_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c8, 5);\n i0.ɵɵviewQuery(_c9, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._tabBodyWrapper = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._tabHeader = _t.first);\n }\n },\n hostAttrs: [1, \"mat-mdc-tab-group\"],\n hostVars: 10,\n hostBindings: function MatTabGroup_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassMap(\"mat-\" + (ctx.color || \"primary\"));\n i0.ɵɵstyleProp(\"--mat-tab-animation-duration\", ctx.animationDuration);\n i0.ɵɵclassProp(\"mat-mdc-tab-group-dynamic-height\", ctx.dynamicHeight)(\"mat-mdc-tab-group-inverted-header\", ctx.headerPosition === \"below\")(\"mat-mdc-tab-group-stretch-tabs\", ctx.stretchTabs);\n }\n },\n inputs: {\n color: \"color\",\n fitInkBarToContent: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"fitInkBarToContent\", \"fitInkBarToContent\", booleanAttribute],\n stretchTabs: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"mat-stretch-tabs\", \"stretchTabs\", booleanAttribute],\n dynamicHeight: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"dynamicHeight\", \"dynamicHeight\", booleanAttribute],\n selectedIndex: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"selectedIndex\", \"selectedIndex\", numberAttribute],\n headerPosition: \"headerPosition\",\n animationDuration: \"animationDuration\",\n contentTabIndex: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"contentTabIndex\", \"contentTabIndex\", numberAttribute],\n disablePagination: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"disablePagination\", \"disablePagination\", booleanAttribute],\n disableRipple: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"disableRipple\", \"disableRipple\", booleanAttribute],\n preserveContent: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"preserveContent\", \"preserveContent\", booleanAttribute],\n backgroundColor: \"backgroundColor\"\n },\n outputs: {\n selectedIndexChange: \"selectedIndexChange\",\n focusChange: \"focusChange\",\n animationDone: \"animationDone\",\n selectedTabChange: \"selectedTabChange\"\n },\n exportAs: [\"matTabGroup\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: MAT_TAB_GROUP,\n useExisting: MatTabGroup\n }]), i0.ɵɵInputTransformsFeature, i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c0,\n decls: 9,\n vars: 6,\n consts: [[\"tabHeader\", \"\"], [\"tabBodyWrapper\", \"\"], [\"tabNode\", \"\"], [3, \"indexFocused\", \"selectFocusedIndex\", \"selectedIndex\", \"disableRipple\", \"disablePagination\"], [\"role\", \"tab\", \"matTabLabelWrapper\", \"\", \"cdkMonitorElementFocus\", \"\", 1, \"mdc-tab\", \"mat-mdc-tab\", \"mat-mdc-focus-indicator\"], [1, \"mat-mdc-tab-body-wrapper\"], [\"role\", \"tabpanel\"], [\"role\", \"tab\", \"matTabLabelWrapper\", \"\", \"cdkMonitorElementFocus\", \"\", 1, \"mdc-tab\", \"mat-mdc-tab\", \"mat-mdc-focus-indicator\", 3, \"click\", \"cdkFocusChange\", \"id\", \"ngClass\", \"disabled\", \"fitInkBarToContent\"], [1, \"mdc-tab__ripple\"], [\"mat-ripple\", \"\", 1, \"mat-mdc-tab-ripple\", 3, \"matRippleTrigger\", \"matRippleDisabled\"], [1, \"mdc-tab__content\"], [1, \"mdc-tab__text-label\"], [3, \"cdkPortalOutlet\"], [\"role\", \"tabpanel\", 3, \"_onCentered\", \"_onCentering\", \"id\", \"ngClass\", \"content\", \"position\", \"origin\", \"animationDuration\", \"preserveContent\"]],\n template: function MatTabGroup_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"mat-tab-header\", 3, 0);\n i0.ɵɵlistener(\"indexFocused\", function MatTabGroup_Template_mat_tab_header_indexFocused_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._focusChanged($event));\n })(\"selectFocusedIndex\", function MatTabGroup_Template_mat_tab_header_selectFocusedIndex_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx.selectedIndex = $event);\n });\n i0.ɵɵrepeaterCreate(2, MatTabGroup_For_3_Template, 8, 16, \"div\", 4, i0.ɵɵrepeaterTrackByIdentity);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(4, MatTabGroup_Conditional_4_Template, 1, 0);\n i0.ɵɵelementStart(5, \"div\", 5, 1);\n i0.ɵɵrepeaterCreate(7, MatTabGroup_For_8_Template, 1, 12, \"mat-tab-body\", 6, i0.ɵɵrepeaterTrackByIdentity);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵproperty(\"selectedIndex\", ctx.selectedIndex || 0)(\"disableRipple\", ctx.disableRipple)(\"disablePagination\", ctx.disablePagination);\n i0.ɵɵadvance(2);\n i0.ɵɵrepeater(ctx._tabs);\n i0.ɵɵadvance(2);\n i0.ɵɵconditional(4, ctx._isServer ? 4 : -1);\n i0.ɵɵadvance();\n i0.ɵɵclassProp(\"_mat-animation-noopable\", ctx._animationMode === \"NoopAnimations\");\n i0.ɵɵadvance(2);\n i0.ɵɵrepeater(ctx._tabs);\n }\n },\n dependencies: [MatTabHeader, MatTabLabelWrapper, CdkMonitorFocus, NgClass, MatRipple, CdkPortalOutlet, MatTabBody],\n styles: [\".mdc-tab{min-width:90px;padding-right:24px;padding-left:24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;margin:0;padding-top:0;padding-bottom:0;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;-webkit-appearance:none;z-index:1}.mdc-tab::-moz-focus-inner{padding:0;border:0}.mdc-tab[hidden]{display:none}.mdc-tab--min-width{flex:0 1 auto}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab__icon{transition:150ms color linear;z-index:2}.mdc-tab--stacked .mdc-tab__content{flex-direction:column;align-items:center;justify-content:center}.mdc-tab--stacked .mdc-tab__text-label{padding-top:6px;padding-bottom:4px}.mdc-tab--active .mdc-tab__text-label,.mdc-tab--active .mdc-tab__icon{transition-delay:100ms}.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label{padding-left:8px;padding-right:0}[dir=rtl] .mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label,.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label[dir=rtl]{padding-left:0;padding-right:8px}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator__content--icon{align-self:center;margin:0 auto}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}.mdc-tab-indicator .mdc-tab-indicator__content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition:150ms opacity linear}.mdc-tab-indicator--active.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition-delay:100ms}.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;font-family:var(--mat-tab-header-label-text-font);font-size:var(--mat-tab-header-label-text-size);letter-spacing:var(--mat-tab-header-label-text-tracking);line-height:var(--mat-tab-header-label-text-line-height);font-weight:var(--mat-tab-header-label-text-weight)}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-color:var(--mdc-tab-indicator-active-indicator-color)}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-top-width:var(--mdc-tab-indicator-active-indicator-height)}.mat-mdc-tab .mdc-tab-indicator__content--underline{border-radius:var(--mdc-tab-indicator-active-indicator-shape)}.mat-mdc-tab:not(.mdc-tab--stacked){height:var(--mdc-secondary-navigation-tab-container-height)}.mat-mdc-tab:not(:disabled).mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):hover.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):focus.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):active.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:disabled.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):hover:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):focus:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:not(:disabled):active:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab:disabled:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab.mdc-tab{flex-grow:0}.mat-mdc-tab:hover .mdc-tab__text-label{color:var(--mat-tab-header-inactive-hover-label-text-color)}.mat-mdc-tab:focus .mdc-tab__text-label{color:var(--mat-tab-header-inactive-focus-label-text-color)}.mat-mdc-tab.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-header-active-label-text-color)}.mat-mdc-tab.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-header-active-ripple-color)}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-header-active-hover-label-text-color)}.mat-mdc-tab.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-hover-indicator-color)}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-header-active-focus-label-text-color)}.mat-mdc-tab.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-focus-indicator-color)}.mat-mdc-tab.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-header-disabled-ripple-color)}.mat-mdc-tab .mdc-tab__ripple::before{content:\\\"\\\";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-header-inactive-ripple-color)}.mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-header-inactive-label-text-color);display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color)}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-header-with-background-background-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background.mat-primary>.mat-mdc-tab-header .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-header .mat-mdc-tab:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-focus-indicator::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-focus-indicator::before{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}\"],\n encapsulation: 2\n });\n }\n }\n return MatTabGroup;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/** A simple change event emitted on focus or selection changes. */\nclass MatTabChangeEvent {}\n\n// Increasing integer for generating unique ids for tab nav components.\nlet nextUniqueId = 0;\n/**\n * Navigation component matching the styles of the tab group header.\n * Provides anchored navigation with animated ink bar.\n */\nlet MatTabNav = /*#__PURE__*/(() => {\n class MatTabNav extends MatPaginatedTabHeader {\n /** Whether the ink bar should fit its width to the size of the tab label content. */\n get fitInkBarToContent() {\n return this._fitInkBarToContent.value;\n }\n set fitInkBarToContent(value) {\n this._fitInkBarToContent.next(value);\n this._changeDetectorRef.markForCheck();\n }\n get animationDuration() {\n return this._animationDuration;\n }\n set animationDuration(value) {\n const stringValue = value + '';\n this._animationDuration = /^\\d+$/.test(stringValue) ? value + 'ms' : stringValue;\n }\n /** Background color of the tab nav. */\n get backgroundColor() {\n return this._backgroundColor;\n }\n set backgroundColor(value) {\n const classList = this._elementRef.nativeElement.classList;\n classList.remove('mat-tabs-with-background', `mat-background-${this.backgroundColor}`);\n if (value) {\n classList.add('mat-tabs-with-background', `mat-background-${value}`);\n }\n this._backgroundColor = value;\n }\n constructor(elementRef, dir, ngZone, changeDetectorRef, viewportRuler, platform, animationMode, defaultConfig) {\n super(elementRef, changeDetectorRef, viewportRuler, dir, ngZone, platform, animationMode);\n this._fitInkBarToContent = new BehaviorSubject(false);\n /** Whether tabs should be stretched to fill the header. */\n this.stretchTabs = true;\n /** Whether the ripple effect is disabled or not. */\n this.disableRipple = false;\n /** Theme color of the nav bar. */\n this.color = 'primary';\n this.disablePagination = defaultConfig && defaultConfig.disablePagination != null ? defaultConfig.disablePagination : false;\n this.fitInkBarToContent = defaultConfig && defaultConfig.fitInkBarToContent != null ? defaultConfig.fitInkBarToContent : false;\n this.stretchTabs = defaultConfig && defaultConfig.stretchTabs != null ? defaultConfig.stretchTabs : true;\n }\n _itemSelected() {\n // noop\n }\n ngAfterContentInit() {\n this._inkBar = new MatInkBar(this._items);\n // We need this to run before the `changes` subscription in parent to ensure that the\n // selectedIndex is up-to-date by the time the super class starts looking for it.\n this._items.changes.pipe(startWith(null), takeUntil(this._destroyed)).subscribe(() => {\n this.updateActiveLink();\n });\n super.ngAfterContentInit();\n }\n ngAfterViewInit() {\n if (!this.tabPanel && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw new Error('A mat-tab-nav-panel must be specified via [tabPanel].');\n }\n super.ngAfterViewInit();\n }\n /** Notifies the component that the active link has been changed. */\n updateActiveLink() {\n if (!this._items) {\n return;\n }\n const items = this._items.toArray();\n for (let i = 0; i < items.length; i++) {\n if (items[i].active) {\n this.selectedIndex = i;\n this._changeDetectorRef.markForCheck();\n if (this.tabPanel) {\n this.tabPanel._activeTabId = items[i].id;\n }\n return;\n }\n }\n // The ink bar should hide itself if no items are active.\n this.selectedIndex = -1;\n this._inkBar.hide();\n }\n _getRole() {\n return this.tabPanel ? 'tablist' : this._elementRef.nativeElement.getAttribute('role');\n }\n static {\n this.ɵfac = function MatTabNav_Factory(t) {\n return new (t || MatTabNav)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i2.Directionality, 8), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1.ViewportRuler), i0.ɵɵdirectiveInject(i3.Platform), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8), i0.ɵɵdirectiveInject(MAT_TABS_CONFIG, 8));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatTabNav,\n selectors: [[\"\", \"mat-tab-nav-bar\", \"\"]],\n contentQueries: function MatTabNav_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatTabLink, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._items = _t);\n }\n },\n viewQuery: function MatTabNav_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c1, 7);\n i0.ɵɵviewQuery(_c2, 7);\n i0.ɵɵviewQuery(_c3, 7);\n i0.ɵɵviewQuery(_c4, 5);\n i0.ɵɵviewQuery(_c5, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._tabListContainer = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._tabList = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._tabListInner = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._nextPaginator = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._previousPaginator = _t.first);\n }\n },\n hostAttrs: [1, \"mat-mdc-tab-nav-bar\", \"mat-mdc-tab-header\"],\n hostVars: 17,\n hostBindings: function MatTabNav_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"role\", ctx._getRole());\n i0.ɵɵstyleProp(\"--mat-tab-animation-duration\", ctx.animationDuration);\n i0.ɵɵclassProp(\"mat-mdc-tab-header-pagination-controls-enabled\", ctx._showPaginationControls)(\"mat-mdc-tab-header-rtl\", ctx._getLayoutDirection() == \"rtl\")(\"mat-mdc-tab-nav-bar-stretch-tabs\", ctx.stretchTabs)(\"mat-primary\", ctx.color !== \"warn\" && ctx.color !== \"accent\")(\"mat-accent\", ctx.color === \"accent\")(\"mat-warn\", ctx.color === \"warn\")(\"_mat-animation-noopable\", ctx._animationMode === \"NoopAnimations\");\n }\n },\n inputs: {\n fitInkBarToContent: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"fitInkBarToContent\", \"fitInkBarToContent\", booleanAttribute],\n stretchTabs: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"mat-stretch-tabs\", \"stretchTabs\", booleanAttribute],\n animationDuration: \"animationDuration\",\n backgroundColor: \"backgroundColor\",\n disableRipple: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"disableRipple\", \"disableRipple\", booleanAttribute],\n color: \"color\",\n tabPanel: \"tabPanel\"\n },\n exportAs: [\"matTabNavBar\", \"matTabNav\"],\n standalone: true,\n features: [i0.ɵɵInputTransformsFeature, i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature],\n attrs: _c10,\n ngContentSelectors: _c0,\n decls: 13,\n vars: 8,\n consts: [[\"previousPaginator\", \"\"], [\"tabListContainer\", \"\"], [\"tabList\", \"\"], [\"tabListInner\", \"\"], [\"nextPaginator\", \"\"], [\"aria-hidden\", \"true\", \"type\", \"button\", \"mat-ripple\", \"\", \"tabindex\", \"-1\", 1, \"mat-mdc-tab-header-pagination\", \"mat-mdc-tab-header-pagination-before\", 3, \"click\", \"mousedown\", \"touchend\", \"matRippleDisabled\", \"disabled\"], [1, \"mat-mdc-tab-header-pagination-chevron\"], [1, \"mat-mdc-tab-link-container\", 3, \"keydown\"], [1, \"mat-mdc-tab-list\", 3, \"cdkObserveContent\"], [1, \"mat-mdc-tab-links\"], [\"aria-hidden\", \"true\", \"type\", \"button\", \"mat-ripple\", \"\", \"tabindex\", \"-1\", 1, \"mat-mdc-tab-header-pagination\", \"mat-mdc-tab-header-pagination-after\", 3, \"mousedown\", \"click\", \"touchend\", \"matRippleDisabled\", \"disabled\"]],\n template: function MatTabNav_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"button\", 5, 0);\n i0.ɵɵlistener(\"click\", function MatTabNav_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._handlePaginatorClick(\"before\"));\n })(\"mousedown\", function MatTabNav_Template_button_mousedown_0_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._handlePaginatorPress(\"before\", $event));\n })(\"touchend\", function MatTabNav_Template_button_touchend_0_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._stopInterval());\n });\n i0.ɵɵelement(2, \"div\", 6);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"div\", 7, 1);\n i0.ɵɵlistener(\"keydown\", function MatTabNav_Template_div_keydown_3_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._handleKeydown($event));\n });\n i0.ɵɵelementStart(5, \"div\", 8, 2);\n i0.ɵɵlistener(\"cdkObserveContent\", function MatTabNav_Template_div_cdkObserveContent_5_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._onContentChanges());\n });\n i0.ɵɵelementStart(7, \"div\", 9, 3);\n i0.ɵɵprojection(9);\n i0.ɵɵelementEnd()()();\n i0.ɵɵelementStart(10, \"button\", 10, 4);\n i0.ɵɵlistener(\"mousedown\", function MatTabNav_Template_button_mousedown_10_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._handlePaginatorPress(\"after\", $event));\n })(\"click\", function MatTabNav_Template_button_click_10_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._handlePaginatorClick(\"after\"));\n })(\"touchend\", function MatTabNav_Template_button_touchend_10_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._stopInterval());\n });\n i0.ɵɵelement(12, \"div\", 6);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵclassProp(\"mat-mdc-tab-header-pagination-disabled\", ctx._disableScrollBefore);\n i0.ɵɵproperty(\"matRippleDisabled\", ctx._disableScrollBefore || ctx.disableRipple)(\"disabled\", ctx._disableScrollBefore || null);\n i0.ɵɵadvance(10);\n i0.ɵɵclassProp(\"mat-mdc-tab-header-pagination-disabled\", ctx._disableScrollAfter);\n i0.ɵɵproperty(\"matRippleDisabled\", ctx._disableScrollAfter || ctx.disableRipple)(\"disabled\", ctx._disableScrollAfter || null);\n }\n },\n dependencies: [MatRipple, CdkObserveContent],\n styles: [\".mdc-tab{min-width:90px;padding-right:24px;padding-left:24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;margin:0;padding-top:0;padding-bottom:0;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;-webkit-appearance:none;z-index:1}.mdc-tab::-moz-focus-inner{padding:0;border:0}.mdc-tab[hidden]{display:none}.mdc-tab--min-width{flex:0 1 auto}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab__icon{transition:150ms color linear;z-index:2}.mdc-tab--stacked .mdc-tab__content{flex-direction:column;align-items:center;justify-content:center}.mdc-tab--stacked .mdc-tab__text-label{padding-top:6px;padding-bottom:4px}.mdc-tab--active .mdc-tab__text-label,.mdc-tab--active .mdc-tab__icon{transition-delay:100ms}.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label{padding-left:8px;padding-right:0}[dir=rtl] .mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label,.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label[dir=rtl]{padding-left:0;padding-right:8px}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator__content--icon{align-self:center;margin:0 auto}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}.mdc-tab-indicator .mdc-tab-indicator__content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition:150ms opacity linear}.mdc-tab-indicator--active.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition-delay:100ms}.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mdc-tab-indicator .mdc-tab-indicator__content{transition-duration:var(--mat-tab-animation-duration, 250ms)}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;background:none;border:none;outline:0;padding:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color)}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px;border-color:var(--mat-tab-header-pagination-icon-color)}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}._mat-animation-noopable span.mdc-tab-indicator__content,._mat-animation-noopable span.mdc-tab__text-label{transition:none}.mat-mdc-tab-links{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-link-container .mat-mdc-tab-links{justify-content:flex-end}.mat-mdc-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1;border-bottom-style:solid;border-bottom-width:var(--mat-tab-header-divider-height);border-bottom-color:var(--mat-tab-header-divider-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-tab-header-with-background-background-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background.mat-primary>.mat-mdc-tab-link-container .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab__text-label{color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background:not(.mat-primary)>.mat-mdc-tab-link-container .mat-mdc-tab-link:not(.mdc-tab--active) .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-focus-indicator::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-focus-indicator::before{border-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mdc-tab__ripple::before,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-tab-header-with-background-foreground-color)}.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-link-container .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-nav-bar.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{color:var(--mat-tab-header-with-background-foreground-color)}\"],\n encapsulation: 2\n });\n }\n }\n return MatTabNav;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Link inside a `mat-tab-nav-bar`.\n */\nlet MatTabLink = /*#__PURE__*/(() => {\n class MatTabLink extends InkBarItem {\n /** Whether the link is active. */\n get active() {\n return this._isActive;\n }\n set active(value) {\n if (value !== this._isActive) {\n this._isActive = value;\n this._tabNavBar.updateActiveLink();\n }\n }\n /**\n * Whether ripples are disabled on interaction.\n * @docs-private\n */\n get rippleDisabled() {\n return this.disabled || this.disableRipple || this._tabNavBar.disableRipple || !!this.rippleConfig.disabled;\n }\n constructor(_tabNavBar, /** @docs-private */elementRef, globalRippleOptions, tabIndex, _focusMonitor, animationMode) {\n super();\n this._tabNavBar = _tabNavBar;\n this.elementRef = elementRef;\n this._focusMonitor = _focusMonitor;\n this._destroyed = new Subject();\n /** Whether the tab link is active or not. */\n this._isActive = false;\n /** Whether the tab link is disabled. */\n this.disabled = false;\n /** Whether ripples are disabled on the tab link. */\n this.disableRipple = false;\n this.tabIndex = 0;\n /** Unique id for the tab. */\n this.id = `mat-tab-link-${nextUniqueId++}`;\n this.rippleConfig = globalRippleOptions || {};\n this.tabIndex = parseInt(tabIndex) || 0;\n if (animationMode === 'NoopAnimations') {\n this.rippleConfig.animation = {\n enterDuration: 0,\n exitDuration: 0\n };\n }\n _tabNavBar._fitInkBarToContent.pipe(takeUntil(this._destroyed)).subscribe(fitInkBarToContent => {\n this.fitInkBarToContent = fitInkBarToContent;\n });\n }\n /** Focuses the tab link. */\n focus() {\n this.elementRef.nativeElement.focus();\n }\n ngAfterViewInit() {\n this._focusMonitor.monitor(this.elementRef);\n }\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n super.ngOnDestroy();\n this._focusMonitor.stopMonitoring(this.elementRef);\n }\n _handleFocus() {\n // Since we allow navigation through tabbing in the nav bar, we\n // have to update the focused index whenever the link receives focus.\n this._tabNavBar.focusIndex = this._tabNavBar._items.toArray().indexOf(this);\n }\n _handleKeydown(event) {\n if (event.keyCode === SPACE || event.keyCode === ENTER) {\n if (this.disabled) {\n event.preventDefault();\n } else if (this._tabNavBar.tabPanel) {\n // Only prevent the default action on space since it can scroll the page.\n // Don't prevent enter since it can break link navigation.\n if (event.keyCode === SPACE) {\n event.preventDefault();\n }\n this.elementRef.nativeElement.click();\n }\n }\n }\n _getAriaControls() {\n return this._tabNavBar.tabPanel ? this._tabNavBar.tabPanel?.id : this.elementRef.nativeElement.getAttribute('aria-controls');\n }\n _getAriaSelected() {\n if (this._tabNavBar.tabPanel) {\n return this.active ? 'true' : 'false';\n } else {\n return this.elementRef.nativeElement.getAttribute('aria-selected');\n }\n }\n _getAriaCurrent() {\n return this.active && !this._tabNavBar.tabPanel ? 'page' : null;\n }\n _getRole() {\n return this._tabNavBar.tabPanel ? 'tab' : this.elementRef.nativeElement.getAttribute('role');\n }\n _getTabIndex() {\n if (this._tabNavBar.tabPanel) {\n return this._isActive && !this.disabled ? 0 : -1;\n } else {\n return this.disabled ? -1 : this.tabIndex;\n }\n }\n static {\n this.ɵfac = function MatTabLink_Factory(t) {\n return new (t || MatTabLink)(i0.ɵɵdirectiveInject(MatTabNav), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(MAT_RIPPLE_GLOBAL_OPTIONS, 8), i0.ɵɵinjectAttribute('tabindex'), i0.ɵɵdirectiveInject(i4.FocusMonitor), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatTabLink,\n selectors: [[\"\", \"mat-tab-link\", \"\"], [\"\", \"matTabLink\", \"\"]],\n hostAttrs: [1, \"mdc-tab\", \"mat-mdc-tab-link\", \"mat-mdc-focus-indicator\"],\n hostVars: 11,\n hostBindings: function MatTabLink_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"focus\", function MatTabLink_focus_HostBindingHandler() {\n return ctx._handleFocus();\n })(\"keydown\", function MatTabLink_keydown_HostBindingHandler($event) {\n return ctx._handleKeydown($event);\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"aria-controls\", ctx._getAriaControls())(\"aria-current\", ctx._getAriaCurrent())(\"aria-disabled\", ctx.disabled)(\"aria-selected\", ctx._getAriaSelected())(\"id\", ctx.id)(\"tabIndex\", ctx._getTabIndex())(\"role\", ctx._getRole());\n i0.ɵɵclassProp(\"mat-mdc-tab-disabled\", ctx.disabled)(\"mdc-tab--active\", ctx.active);\n }\n },\n inputs: {\n active: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"active\", \"active\", booleanAttribute],\n disabled: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"disabled\", \"disabled\", booleanAttribute],\n disableRipple: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"disableRipple\", \"disableRipple\", booleanAttribute],\n tabIndex: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"tabIndex\", \"tabIndex\", value => value == null ? 0 : numberAttribute(value)],\n id: \"id\"\n },\n exportAs: [\"matTabLink\"],\n standalone: true,\n features: [i0.ɵɵInputTransformsFeature, i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature],\n attrs: _c11,\n ngContentSelectors: _c0,\n decls: 5,\n vars: 2,\n consts: [[1, \"mdc-tab__ripple\"], [\"mat-ripple\", \"\", 1, \"mat-mdc-tab-ripple\", 3, \"matRippleTrigger\", \"matRippleDisabled\"], [1, \"mdc-tab__content\"], [1, \"mdc-tab__text-label\"]],\n template: function MatTabLink_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelement(0, \"span\", 0)(1, \"div\", 1);\n i0.ɵɵelementStart(2, \"span\", 2)(3, \"span\", 3);\n i0.ɵɵprojection(4);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"matRippleTrigger\", ctx.elementRef.nativeElement)(\"matRippleDisabled\", ctx.rippleDisabled);\n }\n },\n dependencies: [MatRipple],\n styles: [\".mat-mdc-tab-link{-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-decoration:none;background:none;font-family:var(--mat-tab-header-label-text-font);font-size:var(--mat-tab-header-label-text-size);letter-spacing:var(--mat-tab-header-label-text-tracking);line-height:var(--mat-tab-header-label-text-line-height);font-weight:var(--mat-tab-header-label-text-weight)}.mat-mdc-tab-link .mdc-tab-indicator__content--underline{border-color:var(--mdc-tab-indicator-active-indicator-color)}.mat-mdc-tab-link .mdc-tab-indicator__content--underline{border-top-width:var(--mdc-tab-indicator-active-indicator-height)}.mat-mdc-tab-link .mdc-tab-indicator__content--underline{border-radius:var(--mdc-tab-indicator-active-indicator-shape)}.mat-mdc-tab-link:not(.mdc-tab--stacked){height:var(--mdc-secondary-navigation-tab-container-height)}.mat-mdc-tab-link:not(:disabled).mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab-link:not(:disabled):hover.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab-link:not(:disabled):focus.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab-link:not(:disabled):active.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab-link:disabled.mdc-tab--active .mdc-tab__icon{fill:currentColor}.mat-mdc-tab-link:not(:disabled):not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab-link:not(:disabled):hover:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab-link:not(:disabled):focus:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab-link:not(:disabled):active:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab-link:disabled:not(.mdc-tab--active) .mdc-tab__icon{fill:currentColor}.mat-mdc-tab-link.mdc-tab{flex-grow:0}.mat-mdc-tab-link:hover .mdc-tab__text-label{color:var(--mat-tab-header-inactive-hover-label-text-color)}.mat-mdc-tab-link:focus .mdc-tab__text-label{color:var(--mat-tab-header-inactive-focus-label-text-color)}.mat-mdc-tab-link.mdc-tab--active .mdc-tab__text-label{color:var(--mat-tab-header-active-label-text-color)}.mat-mdc-tab-link.mdc-tab--active .mdc-tab__ripple::before,.mat-mdc-tab-link.mdc-tab--active .mat-ripple-element{background-color:var(--mat-tab-header-active-ripple-color)}.mat-mdc-tab-link.mdc-tab--active:hover .mdc-tab__text-label{color:var(--mat-tab-header-active-hover-label-text-color)}.mat-mdc-tab-link.mdc-tab--active:hover .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-hover-indicator-color)}.mat-mdc-tab-link.mdc-tab--active:focus .mdc-tab__text-label{color:var(--mat-tab-header-active-focus-label-text-color)}.mat-mdc-tab-link.mdc-tab--active:focus .mdc-tab-indicator__content--underline{border-color:var(--mat-tab-header-active-focus-indicator-color)}.mat-mdc-tab-link.mat-mdc-tab-disabled{opacity:.4;pointer-events:none}.mat-mdc-tab-link.mat-mdc-tab-disabled .mdc-tab__content{pointer-events:none}.mat-mdc-tab-link.mat-mdc-tab-disabled .mdc-tab__ripple::before,.mat-mdc-tab-link.mat-mdc-tab-disabled .mat-ripple-element{background-color:var(--mat-tab-header-disabled-ripple-color)}.mat-mdc-tab-link .mdc-tab__ripple::before{content:\\\"\\\";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none;background-color:var(--mat-tab-header-inactive-ripple-color)}.mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-tab-header-inactive-label-text-color);display:inline-flex;align-items:center}.mat-mdc-tab-link .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab-link:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab-link.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab-link.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab-link .mat-ripple-element{opacity:.12;background-color:var(--mat-tab-header-inactive-ripple-color)}.mat-mdc-tab-header.mat-mdc-tab-nav-bar-stretch-tabs .mat-mdc-tab-link{flex-grow:1}.mat-mdc-tab-link::before{margin:5px}@media(max-width: 599px){.mat-mdc-tab-link{min-width:72px}}\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatTabLink;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Tab panel component associated with MatTabNav.\n */\nlet MatTabNavPanel = /*#__PURE__*/(() => {\n class MatTabNavPanel {\n constructor() {\n /** Unique id for the tab panel. */\n this.id = `mat-tab-nav-panel-${nextUniqueId++}`;\n }\n static {\n this.ɵfac = function MatTabNavPanel_Factory(t) {\n return new (t || MatTabNavPanel)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatTabNavPanel,\n selectors: [[\"mat-tab-nav-panel\"]],\n hostAttrs: [\"role\", \"tabpanel\", 1, \"mat-mdc-tab-nav-panel\"],\n hostVars: 2,\n hostBindings: function MatTabNavPanel_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"aria-labelledby\", ctx._activeTabId)(\"id\", ctx.id);\n }\n },\n inputs: {\n id: \"id\"\n },\n exportAs: [\"matTabNavPanel\"],\n standalone: true,\n features: [i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c0,\n decls: 1,\n vars: 0,\n template: function MatTabNavPanel_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵprojection(0);\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatTabNavPanel;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatTabsModule = /*#__PURE__*/(() => {\n class MatTabsModule {\n static {\n this.ɵfac = function MatTabsModule_Factory(t) {\n return new (t || MatTabsModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MatTabsModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [MatCommonModule, MatCommonModule]\n });\n }\n }\n return MatTabsModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_TAB, MAT_TABS_CONFIG, MAT_TAB_CONTENT, MAT_TAB_GROUP, MAT_TAB_LABEL, MatInkBar, MatPaginatedTabHeader, MatTab, MatTabBody, MatTabBodyPortal, MatTabChangeEvent, MatTabContent, MatTabGroup, MatTabHeader, MatTabLabel, MatTabLabelWrapper, MatTabLink, MatTabNav, MatTabNavPanel, MatTabsModule, _MAT_INK_BAR_POSITIONER, _MAT_INK_BAR_POSITIONER_FACTORY, matTabsAnimations };\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { GalaxyWrapComponent } from './galaxy-wrap.component';\n\n@NgModule({\n declarations: [GalaxyWrapComponent],\n imports: [CommonModule],\n exports: [GalaxyWrapComponent],\n})\nexport class GalaxyWrapModule {}\n","import { SearchSelectComponent } from './search-select.component';\nimport { NgModule } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { MatIconModule } from '@angular/material/icon';\nimport { CommonModule } from '@angular/common';\nimport { VaSearchBoxModule } from '../search-box/va-search-box.module';\nimport { LexiconModule } from '@galaxy/lexicon';\nimport baseTranslation from '../assets/i18n/en_devel.json';\nimport { WEBLATE_COMPONENT_NAME } from '../constants';\n\n@NgModule({\n imports: [\n CommonModule,\n VaSearchBoxModule,\n MatIconModule,\n TranslateModule,\n LexiconModule.forChild({\n componentName: WEBLATE_COMPONENT_NAME,\n baseTranslation: baseTranslation,\n }),\n ],\n declarations: [SearchSelectComponent],\n exports: [SearchSelectComponent],\n})\nexport class VaSearchSelectModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { VaSearchSelectModule } from '../va-search-select/va-search-select.module';\nimport { ItemsAndStatusComponent } from './va-items-and-status.component';\n\n@NgModule({\n imports: [CommonModule, VaSearchSelectModule],\n declarations: [ItemsAndStatusComponent],\n exports: [ItemsAndStatusComponent],\n})\nexport class VaItemsAndStatusModule {}\n","export enum Language {\n AFRIKAANS = 'af',\n CZECH = 'cs',\n DUTCH = 'nl',\n ENGLISH = 'en',\n FRENCH = 'fr',\n FRENCH_CANADA = 'fr-ca',\n FRENCH_FRANCE = 'fr-fr',\n GERMAN = 'de',\n ITALIAN = 'it',\n JAPANESE = 'ja',\n PORTUGUESE = 'pt',\n RUSSIAN = 'ru',\n SPANISH_LATIN_AMERICA = 'es-419',\n}\n\nexport interface LanguageMapping {\n code: string;\n label: string;\n flag?: string;\n totalStrings?: number;\n translatedStrings?: number;\n}\n\nexport const LanguageMap: LanguageMapping[] = [\n { code: Language.ENGLISH, label: 'English', flag: '🇺🇸' },\n { code: Language.SPANISH_LATIN_AMERICA, label: 'English', flag: '🇪🇸' },\n { code: Language.FRENCH_FRANCE, label: 'Français', flag: '🇫🇷' },\n { code: Language.FRENCH_CANADA, label: 'Français', flag: '🇨🇦' },\n { code: Language.CZECH, label: 'Čeština', flag: '🇨🇿' },\n { code: Language.DUTCH, label: 'Nederlands', flag: '🇳🇱' },\n { code: Language.GERMAN, label: 'Deutsch', flag: '🇧🇪' },\n { code: Language.ITALIAN, label: 'Italiano', flag: '🇮🇹' },\n];\n","import { loadTranslations as _loadTranslations } from '@angular/localize';\nimport { LEXICON_FILE_FORMAT_OPTION } from '@galaxy/lexicon';\nimport { Language } from './language';\n\nconst LOCALE_LOCALSTORAGE_KEY = 'e5190deccf484eea9d9676c8fd75dbc0';\nconst LANGUAGE_OPTIONS = [\n Language.AFRIKAANS,\n Language.CZECH,\n Language.DUTCH,\n Language.ENGLISH,\n Language.FRENCH,\n Language.FRENCH_CANADA,\n Language.GERMAN,\n Language.ITALIAN,\n Language.PORTUGUESE,\n Language.RUSSIAN,\n Language.SPANISH_LATIN_AMERICA,\n];\n\ndeclare global {\n interface Window {\n partnerId: string;\n }\n}\n\n// public function for boostrapping internationalization for the application\n// weblateComponentName format example: 'advertising-intelligence/digital-ads-client'\nexport function bootstrapI18n(\n weblateComponentName: string,\n baseTranslations?: any,\n overrideLanguageOptions?: Language[],\n format?: LEXICON_FILE_FORMAT_OPTION,\n forceOtw?: boolean,\n environment?: string,\n): void {\n loadTranslationFile(\n getLocale(overrideLanguageOptions),\n weblateComponentName,\n baseTranslations,\n format,\n forceOtw,\n environment,\n );\n}\n\n// todo: I don't think I like this overrideLanguageOptions dealio, refactor\nexport function getLocale(overrideLanguageOptions?: Language[]): string {\n const language =\n getLanguageFromLocalStorage(overrideLanguageOptions) || detectLanguageFromBrowser() || Language.ENGLISH;\n let locale = language.toString();\n // safeguard/default\n if (!locale) {\n locale = 'en';\n }\n return locale;\n}\n\n// public function for setting the current language in local storage\nexport function setLanguage(language: Language | string): void {\n if (localStorage) {\n localStorage.setItem(LOCALE_LOCALSTORAGE_KEY, language);\n }\n}\n\nexport function getLanguageFromLocalStorage(overrideLanguageOptions?: Language[]): Language | undefined {\n if (localStorage) {\n const languageCode = localStorage.getItem(LOCALE_LOCALSTORAGE_KEY);\n if (languageCode) {\n return findLanguageFromCode(languageCode.toLowerCase(), overrideLanguageOptions);\n }\n }\n return undefined;\n}\n\nexport function detectLanguageFromBrowser(): Language | undefined {\n const browserLanguageCode = getBrowserCultureLang().toLowerCase();\n return findLanguageFromCode(browserLanguageCode);\n}\n\nexport function getBrowserCultureLang(): string {\n if (typeof window === 'undefined' || typeof window.navigator === 'undefined') {\n return '';\n }\n // Select language from various browser sources\n let browserCultureLang = Intl.NumberFormat().resolvedOptions().locale;\n if (!browserCultureLang && window.navigator.languages && window.navigator.languages.length) {\n browserCultureLang = window.navigator.languages[0];\n }\n browserCultureLang =\n browserCultureLang ||\n window.navigator.language ||\n (window.navigator as any).browserLanguage ||\n (window.navigator as any).userLanguage;\n return browserCultureLang.replace(/_/g, '-');\n}\n\nexport function findLanguageFromCode(languageCode: string, overrideLanguageOptions?: Language[]): Language | undefined {\n const languageOptions = overrideLanguageOptions ? overrideLanguageOptions : LANGUAGE_OPTIONS;\n // Search for full string\n let language = languageOptions.find((opt) => {\n return opt.toString().startsWith(languageCode);\n });\n // Search by partial language code\n if (!language && languageCode.indexOf('-') === 2) {\n language = languageOptions.find((opt) => {\n return opt.toString().startsWith(languageCode.slice(0, 2));\n });\n }\n return language;\n}\n\nexport function buildFilePath(\n locale: string,\n weblateComponentName: string,\n format?: LEXICON_FILE_FORMAT_OPTION,\n environment = 'prod',\n): string {\n const env = environment === 'prod' ? 'prod' : 'demo';\n const I18N_ASSETS_BASE_URL = `https://lexicon-${env}.apigateway.co/get-translations`;\n\n let filepath = I18N_ASSETS_BASE_URL + `?componentNames=${weblateComponentName}&languageCode=${locale}`;\n switch (format) {\n case LEXICON_FILE_FORMAT_OPTION.XLIFF1:\n filepath += `&format=xlf`;\n break;\n default:\n filepath += `&format=json`;\n break;\n }\n if (typeof window !== 'undefined' && window.partnerId) {\n filepath += `&partnerId=${window.partnerId}`;\n }\n return filepath;\n}\n\nexport function loadTranslationFile(\n locale: string,\n weblateComponentName: string,\n baseTranslations?: any,\n format?: LEXICON_FILE_FORMAT_OPTION,\n forceOtw?: boolean,\n environment?: string,\n): void {\n if (!('deployment' in window) && !forceOtw && baseTranslations) {\n loadTranslations(locale, flattenObject(baseTranslations));\n return;\n }\n\n const filepath = buildFilePath(locale, weblateComponentName, format, environment);\n const xhr = new XMLHttpRequest();\n xhr.onload = () => {\n if (xhr.status === 200) {\n let translations: Record;\n switch (format) {\n case LEXICON_FILE_FORMAT_OPTION.XLIFF1:\n translations = parseXliff(xhr.responseText);\n break;\n case LEXICON_FILE_FORMAT_OPTION.NESTED_JSON:\n translations = parseNestedJSON(xhr.responseText);\n break;\n case LEXICON_FILE_FORMAT_OPTION.FLAT_JSON:\n translations = parseFlatJSON(xhr.responseText);\n break;\n default:\n translations = parseNestedJSON(xhr.responseText);\n break;\n }\n if (Object.keys(translations).length !== 0) {\n loadTranslations(locale, translations);\n }\n }\n };\n const async = false;\n xhr.open('GET', filepath, async);\n xhr.send();\n}\n\nexport function loadTranslations(locale: string, translations: Record): void {\n if (translations && Object.keys(translations).length) {\n _loadTranslations(translations);\n }\n if (locale) {\n $localize.locale = locale;\n }\n}\n\nexport function parseXliff(content: string): Record {\n const translations: Record = {};\n const document = new DOMParser().parseFromString(content, 'text/xml');\n const textUnits = Array.from(document.getElementsByTagName('trans-unit'));\n textUnits.forEach((unit) => {\n const target = unit.getElementsByTagName('target').item(0);\n if (target) {\n translations[unit.id] = Array.from(target.childNodes)\n .map((child) => {\n if (child instanceof Text) {\n return child.wholeText;\n } else if (child instanceof Element) {\n return `{$${child.id}}`;\n }\n return '';\n })\n .join('');\n }\n });\n return translations;\n}\n\nexport function parseNestedJSON(content: string): Record {\n const parsedTranslationBundle = JSON.parse(content);\n return flattenObject(parsedTranslationBundle);\n}\n\nexport function parseFlatJSON(content: string): Record {\n return JSON.parse(content);\n}\n\nexport function flattenObject(ob: Record): any {\n const toReturn: Record = {};\n let flatObject: Record;\n for (const i in ob) {\n if (!(i in ob)) {\n continue;\n }\n if (typeof ob[i] === 'object') {\n flatObject = flattenObject(ob[i]);\n for (const x in flatObject) {\n if (!(x in flatObject)) {\n continue;\n }\n toReturn[i + '.' + x] = flatObject[x];\n }\n } else {\n toReturn[i] = ob[i];\n }\n }\n return toReturn;\n}\n","import { NgModule } from '@angular/core';\nimport { MatIconModule } from '@angular/material/icon';\nimport { CommonModule } from '@angular/common';\nimport { VaMultiSelectComponent } from './va-multi-select.component';\nimport { GalaxyWrapModule } from '@vendasta/galaxy/galaxy-wrap';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatInputModule } from '@angular/material/input';\nimport { GalaxyFormFieldModule } from '@vendasta/galaxy/form-field';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatChipsModule } from '@angular/material/chips';\n\n@NgModule({\n imports: [\n CommonModule,\n MatIconModule,\n GalaxyWrapModule,\n MatSelectModule,\n MatInputModule,\n GalaxyFormFieldModule,\n FormsModule,\n MatAutocompleteModule,\n ReactiveFormsModule,\n MatChipsModule,\n ],\n declarations: [VaMultiSelectComponent],\n exports: [VaMultiSelectComponent],\n})\nexport class VaMultiSelectModule {}\n","import { LayoutModule } from '@angular/cdk/layout';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatMomentDateModule } from '@angular/material-moment-adapter';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatDatepickerModule } from '@angular/material/datepicker';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatListModule } from '@angular/material/list';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { RouterModule } from '@angular/router';\nimport { LexiconModule } from '@galaxy/lexicon';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { GalaxyWrapModule } from '@vendasta/galaxy/galaxy-wrap';\nimport baseTranslation from '../assets/i18n/en_devel.json';\nimport { WEBLATE_COMPONENT_NAME } from '../constants';\nimport { VaSearchBoxModule } from '../search-box/va-search-box.module';\nimport { VaItemsAndStatusModule } from '../va-items-and-status/va-items-and-status.module';\nimport { VaMultiSelectModule } from '../va-multi-select/va-multi-select.module';\nimport { VaSearchSelectModule } from '../va-search-select/va-search-select.module';\nimport { AppliedFiltersBarComponent } from './applied-filters-bar.component';\nimport { ExportFilterDialogComponent } from './export-filter-dialog.component';\nimport { FilterContainerComponent } from './filter-container.component';\nimport { FilterComponent } from './filter.component';\nimport { CheckboxFilterFieldComponent } from './filters/checkbox/filter-field-checkbox.component';\nimport { DatePickerFilterFieldComponent } from './filters/date-picker/filter-field-date-picker.component';\nimport { FilterFieldComponent } from './filters/filter-field.component';\nimport { FilterFieldDirective } from './filters/filter.directive';\nimport { ItemsAndStatusFilterFieldComponent } from './filters/items-and-status/filter-field-items-and-status.component';\nimport { MultiItemsAndStatusFilterFieldComponent } from './filters/multi-items-and-status/filter-field-multi-items-and-status.component';\nimport { MultiSelectFilterFieldComponent } from './filters/multi-select/filter-field-multi-select.component';\nimport { RadioFilterFieldComponent } from './filters/radio/filter-field-radio.component';\nimport { RangeFilterFieldComponent } from './filters/range/filter-field-range.component';\nimport { SearchSelectFilterFieldComponent } from './filters/search-select/filter-field-search-select.component';\nimport { TabbedFilterFieldComponent } from './filters/tabbed/filter-field-tabbed.component';\nimport { TextFilterFieldComponent } from './filters/text/filter-field-text.component';\nimport { ImportFilterDialogComponent } from './import-filter-dialog.component';\nimport { ManageSavedFiltersDialogComponent } from './manage-saved-filters-dialog.component';\nimport { SaveAppliedFiltersDialogComponent } from './save-applied-filters-dialog.component';\nimport { SavedFiltersMenuComponent } from './saved-filters-menu.component';\n\n@NgModule({\n imports: [\n RouterModule,\n CommonModule,\n VaSearchBoxModule,\n VaSearchSelectModule,\n VaItemsAndStatusModule,\n VaMultiSelectModule,\n MatCheckboxModule,\n MatTabsModule,\n MatMenuModule,\n MatIconModule,\n MatRadioModule,\n MatButtonModule,\n MatInputModule,\n MatDialogModule,\n MatListModule,\n MatDatepickerModule,\n FormsModule,\n ReactiveFormsModule,\n TranslateModule,\n LexiconModule.forChild({\n componentName: WEBLATE_COMPONENT_NAME,\n baseTranslation: baseTranslation,\n }),\n MatMomentDateModule,\n LayoutModule,\n MatTooltipModule,\n GalaxyWrapModule,\n MatChipsModule,\n ],\n declarations: [\n FilterComponent,\n FilterFieldDirective,\n FilterContainerComponent,\n FilterFieldComponent,\n AppliedFiltersBarComponent,\n CheckboxFilterFieldComponent,\n DatePickerFilterFieldComponent,\n SearchSelectFilterFieldComponent,\n ItemsAndStatusFilterFieldComponent,\n MultiItemsAndStatusFilterFieldComponent,\n MultiSelectFilterFieldComponent,\n TextFilterFieldComponent,\n TabbedFilterFieldComponent,\n RadioFilterFieldComponent,\n SaveAppliedFiltersDialogComponent,\n ManageSavedFiltersDialogComponent,\n SavedFiltersMenuComponent,\n RangeFilterFieldComponent,\n ExportFilterDialogComponent,\n ImportFilterDialogComponent,\n ],\n exports: [\n FilterComponent,\n FilterContainerComponent,\n AppliedFiltersBarComponent,\n SavedFiltersMenuComponent,\n FilterFieldDirective,\n ExportFilterDialogComponent,\n ImportFilterDialogComponent,\n ],\n providers: [],\n})\nexport class VaFilterModule {}\n","import * as i0 from '@angular/core';\nimport { InjectionToken, forwardRef, EventEmitter, ANIMATION_MODULE_TYPE, booleanAttribute, numberAttribute, Component, ViewEncapsulation, ChangeDetectionStrategy, Attribute, Inject, Optional, ViewChild, Input, Output, Directive, NgModule } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, NG_VALIDATORS, CheckboxRequiredValidator } from '@angular/forms';\nimport * as i1 from '@angular/cdk/a11y';\nimport { MatRipple, _MatInternalFormField, MatCommonModule } from '@angular/material/core';\n\n/** Injection token to be used to override the default options for `mat-slide-toggle`. */\nconst _c0 = [\"switch\"];\nconst _c1 = [\"*\"];\nfunction MatSlideToggle_Conditional_10_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"div\", 10);\n i0.ɵɵnamespaceSVG();\n i0.ɵɵelementStart(1, \"svg\", 12);\n i0.ɵɵelement(2, \"path\", 13);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(3, \"svg\", 14);\n i0.ɵɵelement(4, \"path\", 15);\n i0.ɵɵelementEnd()();\n }\n}\nconst MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS = /*#__PURE__*/new InjectionToken('mat-slide-toggle-default-options', {\n providedIn: 'root',\n factory: () => ({\n disableToggleValue: false,\n hideIcon: false\n })\n});\n\n/**\n * @deprecated Will stop being exported.\n * @breaking-change 19.0.0\n */\nconst MAT_SLIDE_TOGGLE_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: /*#__PURE__*/forwardRef(() => MatSlideToggle),\n multi: true\n};\n/** Change event object emitted by a slide toggle. */\nclass MatSlideToggleChange {\n constructor( /** The source slide toggle of the event. */\n source, /** The new `checked` value of the slide toggle. */\n checked) {\n this.source = source;\n this.checked = checked;\n }\n}\n// Increasing integer for generating unique ids for slide-toggle components.\nlet nextUniqueId = 0;\nlet MatSlideToggle = /*#__PURE__*/(() => {\n class MatSlideToggle {\n _createChangeEvent(isChecked) {\n return new MatSlideToggleChange(this, isChecked);\n }\n /** Returns the unique id for the visual hidden button. */\n get buttonId() {\n return `${this.id || this._uniqueId}-button`;\n }\n /** Focuses the slide-toggle. */\n focus() {\n this._switchElement.nativeElement.focus();\n }\n /** Whether the slide-toggle element is checked or not. */\n get checked() {\n return this._checked;\n }\n set checked(value) {\n this._checked = value;\n this._changeDetectorRef.markForCheck();\n }\n /** Returns the unique id for the visual hidden input. */\n get inputId() {\n return `${this.id || this._uniqueId}-input`;\n }\n constructor(_elementRef, _focusMonitor, _changeDetectorRef, tabIndex, defaults, animationMode) {\n this._elementRef = _elementRef;\n this._focusMonitor = _focusMonitor;\n this._changeDetectorRef = _changeDetectorRef;\n this.defaults = defaults;\n this._onChange = _ => {};\n this._onTouched = () => {};\n this._validatorOnChange = () => {};\n this._checked = false;\n /** Name value will be applied to the input element if present. */\n this.name = null;\n /** Whether the label should appear after or before the slide-toggle. Defaults to 'after'. */\n this.labelPosition = 'after';\n /** Used to set the aria-label attribute on the underlying input element. */\n this.ariaLabel = null;\n /** Used to set the aria-labelledby attribute on the underlying input element. */\n this.ariaLabelledby = null;\n /** Whether the slide toggle is disabled. */\n this.disabled = false;\n /** Whether the slide toggle has a ripple. */\n this.disableRipple = false;\n /** Tabindex of slide toggle. */\n this.tabIndex = 0;\n /** An event will be dispatched each time the slide-toggle changes its value. */\n this.change = new EventEmitter();\n /**\n * An event will be dispatched each time the slide-toggle input is toggled.\n * This event is always emitted when the user toggles the slide toggle, but this does not mean\n * the slide toggle's value has changed.\n */\n this.toggleChange = new EventEmitter();\n this.tabIndex = parseInt(tabIndex) || 0;\n this.color = defaults.color || 'accent';\n this._noopAnimations = animationMode === 'NoopAnimations';\n this.id = this._uniqueId = `mat-mdc-slide-toggle-${++nextUniqueId}`;\n this.hideIcon = defaults.hideIcon ?? false;\n this._labelId = this._uniqueId + '-label';\n }\n ngAfterContentInit() {\n this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n if (focusOrigin === 'keyboard' || focusOrigin === 'program') {\n this._focused = true;\n this._changeDetectorRef.markForCheck();\n } else if (!focusOrigin) {\n // When a focused element becomes disabled, the browser *immediately* fires a blur event.\n // Angular does not expect events to be raised during change detection, so any state\n // change (such as a form control's ng-touched) will cause a changed-after-checked error.\n // See https://github.com/angular/angular/issues/17793. To work around this, we defer\n // telling the form control it has been touched until the next tick.\n Promise.resolve().then(() => {\n this._focused = false;\n this._onTouched();\n this._changeDetectorRef.markForCheck();\n });\n }\n });\n }\n ngOnChanges(changes) {\n if (changes['required']) {\n this._validatorOnChange();\n }\n }\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n /** Implemented as part of ControlValueAccessor. */\n writeValue(value) {\n this.checked = !!value;\n }\n /** Implemented as part of ControlValueAccessor. */\n registerOnChange(fn) {\n this._onChange = fn;\n }\n /** Implemented as part of ControlValueAccessor. */\n registerOnTouched(fn) {\n this._onTouched = fn;\n }\n /** Implemented as a part of Validator. */\n validate(control) {\n return this.required && control.value !== true ? {\n 'required': true\n } : null;\n }\n /** Implemented as a part of Validator. */\n registerOnValidatorChange(fn) {\n this._validatorOnChange = fn;\n }\n /** Implemented as a part of ControlValueAccessor. */\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n this._changeDetectorRef.markForCheck();\n }\n /** Toggles the checked state of the slide-toggle. */\n toggle() {\n this.checked = !this.checked;\n this._onChange(this.checked);\n }\n /**\n * Emits a change event on the `change` output. Also notifies the FormControl about the change.\n */\n _emitChangeEvent() {\n this._onChange(this.checked);\n this.change.emit(this._createChangeEvent(this.checked));\n }\n /** Method being called whenever the underlying button is clicked. */\n _handleClick() {\n this.toggleChange.emit();\n if (!this.defaults.disableToggleValue) {\n this.checked = !this.checked;\n this._onChange(this.checked);\n this.change.emit(new MatSlideToggleChange(this, this.checked));\n }\n }\n _getAriaLabelledBy() {\n if (this.ariaLabelledby) {\n return this.ariaLabelledby;\n }\n // Even though we have a `label` element with a `for` pointing to the button, we need the\n // `aria-labelledby`, because the button gets flagged as not having a label by tools like axe.\n return this.ariaLabel ? null : this._labelId;\n }\n static {\n this.ɵfac = function MatSlideToggle_Factory(t) {\n return new (t || MatSlideToggle)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.FocusMonitor), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵinjectAttribute('tabindex'), i0.ɵɵdirectiveInject(MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatSlideToggle,\n selectors: [[\"mat-slide-toggle\"]],\n viewQuery: function MatSlideToggle_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c0, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._switchElement = _t.first);\n }\n },\n hostAttrs: [1, \"mat-mdc-slide-toggle\"],\n hostVars: 13,\n hostBindings: function MatSlideToggle_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵhostProperty(\"id\", ctx.id);\n i0.ɵɵattribute(\"tabindex\", null)(\"aria-label\", null)(\"name\", null)(\"aria-labelledby\", null);\n i0.ɵɵclassMap(ctx.color ? \"mat-\" + ctx.color : \"\");\n i0.ɵɵclassProp(\"mat-mdc-slide-toggle-focused\", ctx._focused)(\"mat-mdc-slide-toggle-checked\", ctx.checked)(\"_mat-animation-noopable\", ctx._noopAnimations);\n }\n },\n inputs: {\n name: \"name\",\n id: \"id\",\n labelPosition: \"labelPosition\",\n ariaLabel: [i0.ɵɵInputFlags.None, \"aria-label\", \"ariaLabel\"],\n ariaLabelledby: [i0.ɵɵInputFlags.None, \"aria-labelledby\", \"ariaLabelledby\"],\n ariaDescribedby: [i0.ɵɵInputFlags.None, \"aria-describedby\", \"ariaDescribedby\"],\n required: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"required\", \"required\", booleanAttribute],\n color: \"color\",\n disabled: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"disabled\", \"disabled\", booleanAttribute],\n disableRipple: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"disableRipple\", \"disableRipple\", booleanAttribute],\n tabIndex: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"tabIndex\", \"tabIndex\", value => value == null ? 0 : numberAttribute(value)],\n checked: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"checked\", \"checked\", booleanAttribute],\n hideIcon: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"hideIcon\", \"hideIcon\", booleanAttribute]\n },\n outputs: {\n change: \"change\",\n toggleChange: \"toggleChange\"\n },\n exportAs: [\"matSlideToggle\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([MAT_SLIDE_TOGGLE_VALUE_ACCESSOR, {\n provide: NG_VALIDATORS,\n useExisting: MatSlideToggle,\n multi: true\n }]), i0.ɵɵInputTransformsFeature, i0.ɵɵNgOnChangesFeature, i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c1,\n decls: 13,\n vars: 24,\n consts: [[\"switch\", \"\"], [\"mat-internal-form-field\", \"\", 3, \"labelPosition\"], [\"role\", \"switch\", \"type\", \"button\", 1, \"mdc-switch\", 3, \"click\", \"tabIndex\", \"disabled\"], [1, \"mdc-switch__track\"], [1, \"mdc-switch__handle-track\"], [1, \"mdc-switch__handle\"], [1, \"mdc-switch__shadow\"], [1, \"mdc-elevation-overlay\"], [1, \"mdc-switch__ripple\"], [\"mat-ripple\", \"\", 1, \"mat-mdc-slide-toggle-ripple\", \"mat-mdc-focus-indicator\", 3, \"matRippleTrigger\", \"matRippleDisabled\", \"matRippleCentered\"], [1, \"mdc-switch__icons\"], [1, \"mdc-label\", 3, \"click\", \"for\"], [\"viewBox\", \"0 0 24 24\", \"aria-hidden\", \"true\", 1, \"mdc-switch__icon\", \"mdc-switch__icon--on\"], [\"d\", \"M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z\"], [\"viewBox\", \"0 0 24 24\", \"aria-hidden\", \"true\", 1, \"mdc-switch__icon\", \"mdc-switch__icon--off\"], [\"d\", \"M20 13H4v-2h16v2z\"]],\n template: function MatSlideToggle_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"div\", 1)(1, \"button\", 2, 0);\n i0.ɵɵlistener(\"click\", function MatSlideToggle_Template_button_click_1_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._handleClick());\n });\n i0.ɵɵelement(3, \"div\", 3);\n i0.ɵɵelementStart(4, \"div\", 4)(5, \"div\", 5)(6, \"div\", 6);\n i0.ɵɵelement(7, \"div\", 7);\n i0.ɵɵelementEnd();\n i0.ɵɵelementStart(8, \"div\", 8);\n i0.ɵɵelement(9, \"div\", 9);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(10, MatSlideToggle_Conditional_10_Template, 5, 0, \"div\", 10);\n i0.ɵɵelementEnd()()();\n i0.ɵɵelementStart(11, \"label\", 11);\n i0.ɵɵlistener(\"click\", function MatSlideToggle_Template_label_click_11_listener($event) {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView($event.stopPropagation());\n });\n i0.ɵɵprojection(12);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const switch_r2 = i0.ɵɵreference(2);\n i0.ɵɵproperty(\"labelPosition\", ctx.labelPosition);\n i0.ɵɵadvance();\n i0.ɵɵclassProp(\"mdc-switch--selected\", ctx.checked)(\"mdc-switch--unselected\", !ctx.checked)(\"mdc-switch--checked\", ctx.checked)(\"mdc-switch--disabled\", ctx.disabled);\n i0.ɵɵproperty(\"tabIndex\", ctx.disabled ? -1 : ctx.tabIndex)(\"disabled\", ctx.disabled);\n i0.ɵɵattribute(\"id\", ctx.buttonId)(\"name\", ctx.name)(\"aria-label\", ctx.ariaLabel)(\"aria-labelledby\", ctx._getAriaLabelledBy())(\"aria-describedby\", ctx.ariaDescribedby)(\"aria-required\", ctx.required || null)(\"aria-checked\", ctx.checked);\n i0.ɵɵadvance(8);\n i0.ɵɵproperty(\"matRippleTrigger\", switch_r2)(\"matRippleDisabled\", ctx.disableRipple || ctx.disabled)(\"matRippleCentered\", true);\n i0.ɵɵadvance();\n i0.ɵɵconditional(10, !ctx.hideIcon ? 10 : -1);\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"for\", ctx.buttonId);\n i0.ɵɵattribute(\"id\", ctx._labelId);\n }\n },\n dependencies: [MatRipple, _MatInternalFormField],\n styles: [\".mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1);background-color:var(--mdc-elevation-overlay-color)}.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative}.mdc-switch[hidden]{display:none}.mdc-switch:disabled{cursor:default;pointer-events:none}.mdc-switch__track{overflow:hidden;position:relative;width:100%}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:\\\"\\\";height:100%;left:0;position:absolute;width:100%}@media screen and (forced-colors: active){.mdc-switch__track::before,.mdc-switch__track::after{border-color:currentColor}}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0)}.mdc-switch__track::after{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(-100%)}[dir=rtl] .mdc-switch__track::after,.mdc-switch__track[dir=rtl]::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track[dir=rtl]::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::after{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0)}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0)}[dir=rtl] .mdc-switch__handle-track,.mdc-switch__handle-track[dir=rtl]{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track,.mdc-switch--selected .mdc-switch__handle-track[dir=rtl]{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto}[dir=rtl] .mdc-switch__handle,.mdc-switch__handle[dir=rtl]{left:auto;right:0}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:\\\"\\\";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}@media screen and (forced-colors: active){.mdc-switch__handle::before,.mdc-switch__handle::after{border-color:currentColor}}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-elevation-overlay{bottom:0;left:0;right:0;top:0}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1}.mdc-switch:disabled .mdc-switch__ripple{display:none}.mdc-switch__icons{height:100%;position:relative;width:100%;z-index:1}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle .mdc-switch--disabled+label{color:var(--mdc-switch-disabled-label-text-color)}.mdc-switch{width:var(--mdc-switch-track-width)}.mdc-switch.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-selected-handle-color)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-hover-handle-color)}.mdc-switch.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-focus-handle-color)}.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-selected-pressed-handle-color)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-selected-handle-color)}.mdc-switch.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-unselected-handle-color)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-hover-handle-color)}.mdc-switch.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-focus-handle-color)}.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-unselected-pressed-handle-color)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-unselected-handle-color)}.mdc-switch .mdc-switch__handle::before{background:var(--mdc-switch-handle-surface-color)}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation)}.mdc-switch:disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation)}.mdc-switch .mdc-switch__focus-ring-wrapper,.mdc-switch .mdc-switch__handle{height:var(--mdc-switch-handle-height)}.mdc-switch .mdc-switch__handle{border-radius:var(--mdc-switch-handle-shape)}.mdc-switch .mdc-switch__handle{width:var(--mdc-switch-handle-width)}.mdc-switch .mdc-switch__handle-track{width:calc(100% - var(--mdc-switch-handle-width))}.mdc-switch.mdc-switch--selected:enabled .mdc-switch__icon{fill:var(--mdc-switch-selected-icon-color)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-selected-icon-color)}.mdc-switch.mdc-switch--unselected:enabled .mdc-switch__icon{fill:var(--mdc-switch-unselected-icon-color)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-unselected-icon-color)}.mdc-switch.mdc-switch--selected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-selected-icon-opacity)}.mdc-switch.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-unselected-icon-opacity)}.mdc-switch.mdc-switch--selected .mdc-switch__icon{width:var(--mdc-switch-selected-icon-size);height:var(--mdc-switch-selected-icon-size)}.mdc-switch.mdc-switch--unselected .mdc-switch__icon{width:var(--mdc-switch-unselected-icon-size);height:var(--mdc-switch-unselected-icon-size)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-hover-state-layer-color)}.mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-focus-state-layer-color)}.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background-color:var(--mdc-switch-selected-pressed-state-layer-color)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-hover-state-layer-color)}.mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-focus-state-layer-color)}.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background-color:var(--mdc-switch-unselected-pressed-state-layer-color)}.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before{opacity:var(--mdc-switch-selected-hover-state-layer-opacity)}.mdc-switch.mdc-switch--selected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mdc-switch.mdc-switch--selected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{transition-duration:75ms;opacity:var(--mdc-switch-selected-focus-state-layer-opacity)}.mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{transition:opacity 150ms linear}.mdc-switch.mdc-switch--selected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{transition-duration:75ms;opacity:var(--mdc-switch-selected-pressed-state-layer-opacity)}.mdc-switch.mdc-switch--selected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-selected-pressed-state-layer-opacity)}.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus):hover .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:hover:not(:focus).mdc-ripple-surface--hover .mdc-switch__ripple::before{opacity:var(--mdc-switch-unselected-hover-state-layer-opacity)}.mdc-switch.mdc-switch--unselected:enabled:focus.mdc-ripple-upgraded--background-focused .mdc-switch__ripple::before,.mdc-switch.mdc-switch--unselected:enabled:focus:not(.mdc-ripple-upgraded):focus .mdc-switch__ripple::before{transition-duration:75ms;opacity:var(--mdc-switch-unselected-focus-state-layer-opacity)}.mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded) .mdc-switch__ripple::after{transition:opacity 150ms linear}.mdc-switch.mdc-switch--unselected:enabled:active:not(.mdc-ripple-upgraded):active .mdc-switch__ripple::after{transition-duration:75ms;opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity)}.mdc-switch.mdc-switch--unselected:enabled:active.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity)}.mdc-switch .mdc-switch__ripple{height:var(--mdc-switch-state-layer-size);width:var(--mdc-switch-state-layer-size)}.mdc-switch .mdc-switch__track{height:var(--mdc-switch-track-height)}.mdc-switch:disabled .mdc-switch__track{opacity:var(--mdc-switch-disabled-track-opacity)}.mdc-switch:enabled .mdc-switch__track::after{background:var(--mdc-switch-selected-track-color)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-hover-track-color)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-focus-track-color)}.mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mdc-switch-selected-pressed-track-color)}.mdc-switch:disabled .mdc-switch__track::after{background:var(--mdc-switch-disabled-selected-track-color)}.mdc-switch:enabled .mdc-switch__track::before{background:var(--mdc-switch-unselected-track-color)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-hover-track-color)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-focus-track-color)}.mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mdc-switch-unselected-pressed-track-color)}.mdc-switch:disabled .mdc-switch__track::before{background:var(--mdc-switch-disabled-unselected-track-color)}.mdc-switch .mdc-switch__track{border-radius:var(--mdc-switch-track-shape)}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation-shadow)}.mdc-switch:disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation-shadow)}.mat-mdc-slide-toggle{display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle .mdc-switch__ripple::after{content:\\\"\\\";opacity:0}.mat-mdc-slide-toggle .mdc-switch:hover .mdc-switch__ripple::after{opacity:.04;transition:opacity 75ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mdc-switch .mdc-switch__ripple::after{opacity:.12}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-mdc-focus-indicator::before{content:\\\"\\\"}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-mdc-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-elevation-overlay,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}.mat-mdc-slide-toggle .mdc-switch:enabled+.mdc-label{cursor:pointer}.mdc-switch__handle{transition:width 75ms cubic-bezier(0.4, 0, 0.2, 1),height 75ms cubic-bezier(0.4, 0, 0.2, 1),margin 75ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-switch--selected .mdc-switch__track::before{opacity:var(--mat-switch-hidden-track-opacity);transition:var(--mat-switch-hidden-track-transition)}.mdc-switch--selected .mdc-switch__track::after{opacity:var(--mat-switch-visible-track-opacity);transition:var(--mat-switch-visible-track-transition)}.mdc-switch--unselected .mdc-switch__track::before{opacity:var(--mat-switch-visible-track-opacity);transition:var(--mat-switch-visible-track-transition)}.mdc-switch--unselected .mdc-switch__track::after{opacity:var(--mat-switch-hidden-track-opacity);transition:var(--mat-switch-hidden-track-transition)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle{width:var(--mat-switch-unselected-handle-size);height:var(--mat-switch-unselected-handle-size)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle{width:var(--mat-switch-selected-handle-size);height:var(--mat-switch-selected-handle-size)}.mat-mdc-slide-toggle .mdc-switch__handle:has(.mdc-switch__icons){width:var(--mat-switch-with-icon-handle-size);height:var(--mat-switch-with-icon-handle-size)}.mat-mdc-slide-toggle:active .mdc-switch:not(.mdc-switch--disabled) .mdc-switch__handle{width:var(--mat-switch-pressed-handle-size);height:var(--mat-switch-pressed-handle-size)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle{margin:var(--mat-switch-selected-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-selected-with-icon-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle{margin:var(--mat-switch-unselected-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-unselected-with-icon-handle-horizontal-margin)}.mat-mdc-slide-toggle:active .mdc-switch--selected:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-selected-pressed-handle-horizontal-margin)}.mat-mdc-slide-toggle:active .mdc-switch--unselected:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-unselected-pressed-handle-horizontal-margin)}.mdc-switch__track::after,.mdc-switch__track::before{border-width:var(--mat-switch-track-outline-width);border-color:var(--mat-switch-track-outline-color)}.mdc-switch--selected .mdc-switch__track::after,.mdc-switch--selected .mdc-switch__track::before{border-width:var(--mat-switch-selected-track-outline-width)}.mdc-switch--disabled .mdc-switch__track::after,.mdc-switch--disabled .mdc-switch__track::before{border-width:var(--mat-switch-disabled-unselected-track-outline-width);border-color:var(--mat-switch-disabled-unselected-track-outline-color)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-selected-handle-opacity)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-unselected-handle-opacity)}\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatSlideToggle;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @deprecated No longer used, `MatCheckbox` implements required validation directly.\n * @breaking-change 19.0.0\n */\nconst MAT_SLIDE_TOGGLE_REQUIRED_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: /*#__PURE__*/forwardRef(() => MatSlideToggleRequiredValidator),\n multi: true\n};\n/**\n * Validator for Material slide-toggle components with the required attribute in a\n * template-driven form. The default validator for required form controls asserts\n * that the control value is not undefined but that is not appropriate for a slide-toggle\n * where the value is always defined.\n *\n * Required slide-toggle form controls are valid when checked.\n *\n * @deprecated No longer used, `MatCheckbox` implements required validation directly.\n * @breaking-change 19.0.0\n */\nlet MatSlideToggleRequiredValidator = /*#__PURE__*/(() => {\n class MatSlideToggleRequiredValidator extends CheckboxRequiredValidator {\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵMatSlideToggleRequiredValidator_BaseFactory;\n return function MatSlideToggleRequiredValidator_Factory(t) {\n return (ɵMatSlideToggleRequiredValidator_BaseFactory || (ɵMatSlideToggleRequiredValidator_BaseFactory = i0.ɵɵgetInheritedFactory(MatSlideToggleRequiredValidator)))(t || MatSlideToggleRequiredValidator);\n };\n })();\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatSlideToggleRequiredValidator,\n selectors: [[\"mat-slide-toggle\", \"required\", \"\", \"formControlName\", \"\"], [\"mat-slide-toggle\", \"required\", \"\", \"formControl\", \"\"], [\"mat-slide-toggle\", \"required\", \"\", \"ngModel\", \"\"]],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([MAT_SLIDE_TOGGLE_REQUIRED_VALIDATOR]), i0.ɵɵInheritDefinitionFeature]\n });\n }\n }\n return MatSlideToggleRequiredValidator;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * @deprecated No longer used, `MatSlideToggle` implements required validation directly.\n * @breaking-change 19.0.0\n */\nlet _MatSlideToggleRequiredValidatorModule = /*#__PURE__*/(() => {\n class _MatSlideToggleRequiredValidatorModule {\n static {\n this.ɵfac = function _MatSlideToggleRequiredValidatorModule_Factory(t) {\n return new (t || _MatSlideToggleRequiredValidatorModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: _MatSlideToggleRequiredValidatorModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({});\n }\n }\n return _MatSlideToggleRequiredValidatorModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatSlideToggleModule = /*#__PURE__*/(() => {\n class MatSlideToggleModule {\n static {\n this.ɵfac = function MatSlideToggleModule_Factory(t) {\n return new (t || MatSlideToggleModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MatSlideToggleModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [MatSlideToggle, MatCommonModule, MatCommonModule]\n });\n }\n }\n return MatSlideToggleModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS, MAT_SLIDE_TOGGLE_REQUIRED_VALIDATOR, MAT_SLIDE_TOGGLE_VALUE_ACCESSOR, MatSlideToggle, MatSlideToggleChange, MatSlideToggleModule, MatSlideToggleRequiredValidator, _MatSlideToggleRequiredValidatorModule };\n","import { NgModule } from '@angular/core';\nimport { VaIconModule } from '../va-icon/icon.module';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { CommonModule } from '@angular/common';\n\nimport { VaActionMenuModule } from '../va-action-menu/va-action-menu.module';\nimport { VaListComponent } from './va-list.component';\nimport { VaListItemComponent } from './list-item/va-list-item.component';\nimport { ExpandedViewDirective } from './list-item/expanded-view.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n MatCheckboxModule,\n MatButtonModule,\n MatIconModule,\n MatSlideToggleModule,\n MatTooltipModule,\n MatProgressSpinnerModule,\n MatProgressBarModule,\n MatChipsModule,\n VaIconModule,\n VaActionMenuModule,\n ],\n declarations: [ExpandedViewDirective, VaListComponent, VaListItemComponent],\n exports: [VaListComponent, ExpandedViewDirective],\n})\nexport class VaListModule {}\n","import * as i0 from '@angular/core';\nimport { Injectable, Inject, InjectionToken, booleanAttribute, Directive, Optional, SkipSelf, Input, EventEmitter, Self, Output, inject, NgModule } from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport * as i1 from '@angular/cdk/scrolling';\nimport { CdkScrollableModule } from '@angular/cdk/scrolling';\nimport { _getEventTarget, normalizePassiveListenerOptions, _getShadowRoot } from '@angular/cdk/platform';\nimport { coerceElement, coerceNumberProperty, coerceArray } from '@angular/cdk/coercion';\nimport { isFakeTouchstartFromScreenReader, isFakeMousedownFromScreenReader } from '@angular/cdk/a11y';\nimport { Subject, Subscription, interval, animationFrameScheduler, Observable, merge, BehaviorSubject } from 'rxjs';\nimport { takeUntil, map, take, tap, switchMap, startWith } from 'rxjs/operators';\nimport * as i1$1 from '@angular/cdk/bidi';\n\n/**\n * Shallow-extends a stylesheet object with another stylesheet-like object.\n * Note that the keys in `source` have to be dash-cased.\n * @docs-private\n */\nfunction extendStyles(dest, source, importantProperties) {\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n const value = source[key];\n if (value) {\n dest.setProperty(key, value, importantProperties?.has(key) ? 'important' : '');\n } else {\n dest.removeProperty(key);\n }\n }\n }\n return dest;\n}\n/**\n * Toggles whether the native drag interactions should be enabled for an element.\n * @param element Element on which to toggle the drag interactions.\n * @param enable Whether the drag interactions should be enabled.\n * @docs-private\n */\nfunction toggleNativeDragInteractions(element, enable) {\n const userSelect = enable ? '' : 'none';\n extendStyles(element.style, {\n 'touch-action': enable ? '' : 'none',\n '-webkit-user-drag': enable ? '' : 'none',\n '-webkit-tap-highlight-color': enable ? '' : 'transparent',\n 'user-select': userSelect,\n '-ms-user-select': userSelect,\n '-webkit-user-select': userSelect,\n '-moz-user-select': userSelect\n });\n}\n/**\n * Toggles whether an element is visible while preserving its dimensions.\n * @param element Element whose visibility to toggle\n * @param enable Whether the element should be visible.\n * @param importantProperties Properties to be set as `!important`.\n * @docs-private\n */\nfunction toggleVisibility(element, enable, importantProperties) {\n extendStyles(element.style, {\n position: enable ? '' : 'fixed',\n top: enable ? '' : '0',\n opacity: enable ? '' : '0',\n left: enable ? '' : '-999em'\n }, importantProperties);\n}\n/**\n * Combines a transform string with an optional other transform\n * that exited before the base transform was applied.\n */\nfunction combineTransforms(transform, initialTransform) {\n return initialTransform && initialTransform != 'none' ? transform + ' ' + initialTransform : transform;\n}\n\n/** Parses a CSS time value to milliseconds. */\nfunction parseCssTimeUnitsToMs(value) {\n // Some browsers will return it in seconds, whereas others will return milliseconds.\n const multiplier = value.toLowerCase().indexOf('ms') > -1 ? 1 : 1000;\n return parseFloat(value) * multiplier;\n}\n/** Gets the transform transition duration, including the delay, of an element in milliseconds. */\nfunction getTransformTransitionDurationInMs(element) {\n const computedStyle = getComputedStyle(element);\n const transitionedProperties = parseCssPropertyValue(computedStyle, 'transition-property');\n const property = transitionedProperties.find(prop => prop === 'transform' || prop === 'all');\n // If there's no transition for `all` or `transform`, we shouldn't do anything.\n if (!property) {\n return 0;\n }\n // Get the index of the property that we're interested in and match\n // it up to the same index in `transition-delay` and `transition-duration`.\n const propertyIndex = transitionedProperties.indexOf(property);\n const rawDurations = parseCssPropertyValue(computedStyle, 'transition-duration');\n const rawDelays = parseCssPropertyValue(computedStyle, 'transition-delay');\n return parseCssTimeUnitsToMs(rawDurations[propertyIndex]) + parseCssTimeUnitsToMs(rawDelays[propertyIndex]);\n}\n/** Parses out multiple values from a computed style into an array. */\nfunction parseCssPropertyValue(computedStyle, name) {\n const value = computedStyle.getPropertyValue(name);\n return value.split(',').map(part => part.trim());\n}\n\n/** Gets a mutable version of an element's bounding `DOMRect`. */\nfunction getMutableClientRect(element) {\n const rect = element.getBoundingClientRect();\n // We need to clone the `clientRect` here, because all the values on it are readonly\n // and we need to be able to update them. Also we can't use a spread here, because\n // the values on a `DOMRect` aren't own properties. See:\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect#Notes\n return {\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left,\n width: rect.width,\n height: rect.height,\n x: rect.x,\n y: rect.y\n };\n}\n/**\n * Checks whether some coordinates are within a `DOMRect`.\n * @param clientRect DOMRect that is being checked.\n * @param x Coordinates along the X axis.\n * @param y Coordinates along the Y axis.\n */\nfunction isInsideClientRect(clientRect, x, y) {\n const {\n top,\n bottom,\n left,\n right\n } = clientRect;\n return y >= top && y <= bottom && x >= left && x <= right;\n}\n/**\n * Updates the top/left positions of a `DOMRect`, as well as their bottom/right counterparts.\n * @param domRect `DOMRect` that should be updated.\n * @param top Amount to add to the `top` position.\n * @param left Amount to add to the `left` position.\n */\nfunction adjustDomRect(domRect, top, left) {\n domRect.top += top;\n domRect.bottom = domRect.top + domRect.height;\n domRect.left += left;\n domRect.right = domRect.left + domRect.width;\n}\n/**\n * Checks whether the pointer coordinates are close to a DOMRect.\n * @param rect DOMRect to check against.\n * @param threshold Threshold around the DOMRect.\n * @param pointerX Coordinates along the X axis.\n * @param pointerY Coordinates along the Y axis.\n */\nfunction isPointerNearDomRect(rect, threshold, pointerX, pointerY) {\n const {\n top,\n right,\n bottom,\n left,\n width,\n height\n } = rect;\n const xThreshold = width * threshold;\n const yThreshold = height * threshold;\n return pointerY > top - yThreshold && pointerY < bottom + yThreshold && pointerX > left - xThreshold && pointerX < right + xThreshold;\n}\n\n/** Keeps track of the scroll position and dimensions of the parents of an element. */\nclass ParentPositionTracker {\n constructor(_document) {\n this._document = _document;\n /** Cached positions of the scrollable parent elements. */\n this.positions = new Map();\n }\n /** Clears the cached positions. */\n clear() {\n this.positions.clear();\n }\n /** Caches the positions. Should be called at the beginning of a drag sequence. */\n cache(elements) {\n this.clear();\n this.positions.set(this._document, {\n scrollPosition: this.getViewportScrollPosition()\n });\n elements.forEach(element => {\n this.positions.set(element, {\n scrollPosition: {\n top: element.scrollTop,\n left: element.scrollLeft\n },\n clientRect: getMutableClientRect(element)\n });\n });\n }\n /** Handles scrolling while a drag is taking place. */\n handleScroll(event) {\n const target = _getEventTarget(event);\n const cachedPosition = this.positions.get(target);\n if (!cachedPosition) {\n return null;\n }\n const scrollPosition = cachedPosition.scrollPosition;\n let newTop;\n let newLeft;\n if (target === this._document) {\n const viewportScrollPosition = this.getViewportScrollPosition();\n newTop = viewportScrollPosition.top;\n newLeft = viewportScrollPosition.left;\n } else {\n newTop = target.scrollTop;\n newLeft = target.scrollLeft;\n }\n const topDifference = scrollPosition.top - newTop;\n const leftDifference = scrollPosition.left - newLeft;\n // Go through and update the cached positions of the scroll\n // parents that are inside the element that was scrolled.\n this.positions.forEach((position, node) => {\n if (position.clientRect && target !== node && target.contains(node)) {\n adjustDomRect(position.clientRect, topDifference, leftDifference);\n }\n });\n scrollPosition.top = newTop;\n scrollPosition.left = newLeft;\n return {\n top: topDifference,\n left: leftDifference\n };\n }\n /**\n * Gets the scroll position of the viewport. Note that we use the scrollX and scrollY directly,\n * instead of going through the `ViewportRuler`, because the first value the ruler looks at is\n * the top/left offset of the `document.documentElement` which works for most cases, but breaks\n * if the element is offset by something like the `BlockScrollStrategy`.\n */\n getViewportScrollPosition() {\n return {\n top: window.scrollY,\n left: window.scrollX\n };\n }\n}\n\n/** Creates a deep clone of an element. */\nfunction deepCloneNode(node) {\n const clone = node.cloneNode(true);\n const descendantsWithId = clone.querySelectorAll('[id]');\n const nodeName = node.nodeName.toLowerCase();\n // Remove the `id` to avoid having multiple elements with the same id on the page.\n clone.removeAttribute('id');\n for (let i = 0; i < descendantsWithId.length; i++) {\n descendantsWithId[i].removeAttribute('id');\n }\n if (nodeName === 'canvas') {\n transferCanvasData(node, clone);\n } else if (nodeName === 'input' || nodeName === 'select' || nodeName === 'textarea') {\n transferInputData(node, clone);\n }\n transferData('canvas', node, clone, transferCanvasData);\n transferData('input, textarea, select', node, clone, transferInputData);\n return clone;\n}\n/** Matches elements between an element and its clone and allows for their data to be cloned. */\nfunction transferData(selector, node, clone, callback) {\n const descendantElements = node.querySelectorAll(selector);\n if (descendantElements.length) {\n const cloneElements = clone.querySelectorAll(selector);\n for (let i = 0; i < descendantElements.length; i++) {\n callback(descendantElements[i], cloneElements[i]);\n }\n }\n}\n// Counter for unique cloned radio button names.\nlet cloneUniqueId = 0;\n/** Transfers the data of one input element to another. */\nfunction transferInputData(source, clone) {\n // Browsers throw an error when assigning the value of a file input programmatically.\n if (clone.type !== 'file') {\n clone.value = source.value;\n }\n // Radio button `name` attributes must be unique for radio button groups\n // otherwise original radio buttons can lose their checked state\n // once the clone is inserted in the DOM.\n if (clone.type === 'radio' && clone.name) {\n clone.name = `mat-clone-${clone.name}-${cloneUniqueId++}`;\n }\n}\n/** Transfers the data of one canvas element to another. */\nfunction transferCanvasData(source, clone) {\n const context = clone.getContext('2d');\n if (context) {\n // In some cases `drawImage` can throw (e.g. if the canvas size is 0x0).\n // We can't do much about it so just ignore the error.\n try {\n context.drawImage(source, 0, 0);\n } catch {}\n }\n}\n\n/** Options that can be used to bind a passive event listener. */\nconst passiveEventListenerOptions = /*#__PURE__*/normalizePassiveListenerOptions({\n passive: true\n});\n/** Options that can be used to bind an active event listener. */\nconst activeEventListenerOptions = /*#__PURE__*/normalizePassiveListenerOptions({\n passive: false\n});\n/**\n * Time in milliseconds for which to ignore mouse events, after\n * receiving a touch event. Used to avoid doing double work for\n * touch devices where the browser fires fake mouse events, in\n * addition to touch events.\n */\nconst MOUSE_EVENT_IGNORE_TIME = 800;\n/** Inline styles to be set as `!important` while dragging. */\nconst dragImportantProperties = /*#__PURE__*/new Set([\n// Needs to be important, because some `mat-table` sets `position: sticky !important`. See #22781.\n'position']);\n/**\n * Reference to a draggable item. Used to manipulate or dispose of the item.\n */\nclass DragRef {\n /** Whether starting to drag this element is disabled. */\n get disabled() {\n return this._disabled || !!(this._dropContainer && this._dropContainer.disabled);\n }\n set disabled(value) {\n if (value !== this._disabled) {\n this._disabled = value;\n this._toggleNativeDragInteractions();\n this._handles.forEach(handle => toggleNativeDragInteractions(handle, value));\n }\n }\n constructor(element, _config, _document, _ngZone, _viewportRuler, _dragDropRegistry) {\n this._config = _config;\n this._document = _document;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n this._dragDropRegistry = _dragDropRegistry;\n /**\n * CSS `transform` applied to the element when it isn't being dragged. We need a\n * passive transform in order for the dragged element to retain its new position\n * after the user has stopped dragging and because we need to know the relative\n * position in case they start dragging again. This corresponds to `element.style.transform`.\n */\n this._passiveTransform = {\n x: 0,\n y: 0\n };\n /** CSS `transform` that is applied to the element while it's being dragged. */\n this._activeTransform = {\n x: 0,\n y: 0\n };\n /**\n * Whether the dragging sequence has been started. Doesn't\n * necessarily mean that the element has been moved.\n */\n this._hasStartedDragging = false;\n /** Emits when the item is being moved. */\n this._moveEvents = new Subject();\n /** Subscription to pointer movement events. */\n this._pointerMoveSubscription = Subscription.EMPTY;\n /** Subscription to the event that is dispatched when the user lifts their pointer. */\n this._pointerUpSubscription = Subscription.EMPTY;\n /** Subscription to the viewport being scrolled. */\n this._scrollSubscription = Subscription.EMPTY;\n /** Subscription to the viewport being resized. */\n this._resizeSubscription = Subscription.EMPTY;\n /** Cached reference to the boundary element. */\n this._boundaryElement = null;\n /** Whether the native dragging interactions have been enabled on the root element. */\n this._nativeInteractionsEnabled = true;\n /** Elements that can be used to drag the draggable item. */\n this._handles = [];\n /** Registered handles that are currently disabled. */\n this._disabledHandles = new Set();\n /** Layout direction of the item. */\n this._direction = 'ltr';\n /**\n * Amount of milliseconds to wait after the user has put their\n * pointer down before starting to drag the element.\n */\n this.dragStartDelay = 0;\n this._disabled = false;\n /** Emits as the drag sequence is being prepared. */\n this.beforeStarted = new Subject();\n /** Emits when the user starts dragging the item. */\n this.started = new Subject();\n /** Emits when the user has released a drag item, before any animations have started. */\n this.released = new Subject();\n /** Emits when the user stops dragging an item in the container. */\n this.ended = new Subject();\n /** Emits when the user has moved the item into a new container. */\n this.entered = new Subject();\n /** Emits when the user removes the item its container by dragging it into another container. */\n this.exited = new Subject();\n /** Emits when the user drops the item inside a container. */\n this.dropped = new Subject();\n /**\n * Emits as the user is dragging the item. Use with caution,\n * because this event will fire for every pixel that the user has dragged.\n */\n this.moved = this._moveEvents;\n /** Handler for the `mousedown`/`touchstart` events. */\n this._pointerDown = event => {\n this.beforeStarted.next();\n // Delegate the event based on whether it started from a handle or the element itself.\n if (this._handles.length) {\n const targetHandle = this._getTargetHandle(event);\n if (targetHandle && !this._disabledHandles.has(targetHandle) && !this.disabled) {\n this._initializeDragSequence(targetHandle, event);\n }\n } else if (!this.disabled) {\n this._initializeDragSequence(this._rootElement, event);\n }\n };\n /** Handler that is invoked when the user moves their pointer after they've initiated a drag. */\n this._pointerMove = event => {\n const pointerPosition = this._getPointerPositionOnPage(event);\n if (!this._hasStartedDragging) {\n const distanceX = Math.abs(pointerPosition.x - this._pickupPositionOnPage.x);\n const distanceY = Math.abs(pointerPosition.y - this._pickupPositionOnPage.y);\n const isOverThreshold = distanceX + distanceY >= this._config.dragStartThreshold;\n // Only start dragging after the user has moved more than the minimum distance in either\n // direction. Note that this is preferable over doing something like `skip(minimumDistance)`\n // in the `pointerMove` subscription, because we're not guaranteed to have one move event\n // per pixel of movement (e.g. if the user moves their pointer quickly).\n if (isOverThreshold) {\n const isDelayElapsed = Date.now() >= this._dragStartTime + this._getDragStartDelay(event);\n const container = this._dropContainer;\n if (!isDelayElapsed) {\n this._endDragSequence(event);\n return;\n }\n // Prevent other drag sequences from starting while something in the container is still\n // being dragged. This can happen while we're waiting for the drop animation to finish\n // and can cause errors, because some elements might still be moving around.\n if (!container || !container.isDragging() && !container.isReceiving()) {\n // Prevent the default action as soon as the dragging sequence is considered as\n // \"started\" since waiting for the next event can allow the device to begin scrolling.\n event.preventDefault();\n this._hasStartedDragging = true;\n this._ngZone.run(() => this._startDragSequence(event));\n }\n }\n return;\n }\n // We prevent the default action down here so that we know that dragging has started. This is\n // important for touch devices where doing this too early can unnecessarily block scrolling,\n // if there's a dragging delay.\n event.preventDefault();\n const constrainedPointerPosition = this._getConstrainedPointerPosition(pointerPosition);\n this._hasMoved = true;\n this._lastKnownPointerPosition = pointerPosition;\n this._updatePointerDirectionDelta(constrainedPointerPosition);\n if (this._dropContainer) {\n this._updateActiveDropContainer(constrainedPointerPosition, pointerPosition);\n } else {\n // If there's a position constraint function, we want the element's top/left to be at the\n // specific position on the page. Use the initial position as a reference if that's the case.\n const offset = this.constrainPosition ? this._initialDomRect : this._pickupPositionOnPage;\n const activeTransform = this._activeTransform;\n activeTransform.x = constrainedPointerPosition.x - offset.x + this._passiveTransform.x;\n activeTransform.y = constrainedPointerPosition.y - offset.y + this._passiveTransform.y;\n this._applyRootElementTransform(activeTransform.x, activeTransform.y);\n }\n // Since this event gets fired for every pixel while dragging, we only\n // want to fire it if the consumer opted into it. Also we have to\n // re-enter the zone because we run all of the events on the outside.\n if (this._moveEvents.observers.length) {\n this._ngZone.run(() => {\n this._moveEvents.next({\n source: this,\n pointerPosition: constrainedPointerPosition,\n event,\n distance: this._getDragDistance(constrainedPointerPosition),\n delta: this._pointerDirectionDelta\n });\n });\n }\n };\n /** Handler that is invoked when the user lifts their pointer up, after initiating a drag. */\n this._pointerUp = event => {\n this._endDragSequence(event);\n };\n /** Handles a native `dragstart` event. */\n this._nativeDragStart = event => {\n if (this._handles.length) {\n const targetHandle = this._getTargetHandle(event);\n if (targetHandle && !this._disabledHandles.has(targetHandle) && !this.disabled) {\n event.preventDefault();\n }\n } else if (!this.disabled) {\n // Usually this isn't necessary since the we prevent the default action in `pointerDown`,\n // but some cases like dragging of links can slip through (see #24403).\n event.preventDefault();\n }\n };\n this.withRootElement(element).withParent(_config.parentDragRef || null);\n this._parentPositions = new ParentPositionTracker(_document);\n _dragDropRegistry.registerDragItem(this);\n }\n /**\n * Returns the element that is being used as a placeholder\n * while the current element is being dragged.\n */\n getPlaceholderElement() {\n return this._placeholder;\n }\n /** Returns the root draggable element. */\n getRootElement() {\n return this._rootElement;\n }\n /**\n * Gets the currently-visible element that represents the drag item.\n * While dragging this is the placeholder, otherwise it's the root element.\n */\n getVisibleElement() {\n return this.isDragging() ? this.getPlaceholderElement() : this.getRootElement();\n }\n /** Registers the handles that can be used to drag the element. */\n withHandles(handles) {\n this._handles = handles.map(handle => coerceElement(handle));\n this._handles.forEach(handle => toggleNativeDragInteractions(handle, this.disabled));\n this._toggleNativeDragInteractions();\n // Delete any lingering disabled handles that may have been destroyed. Note that we re-create\n // the set, rather than iterate over it and filter out the destroyed handles, because while\n // the ES spec allows for sets to be modified while they're being iterated over, some polyfills\n // use an array internally which may throw an error.\n const disabledHandles = new Set();\n this._disabledHandles.forEach(handle => {\n if (this._handles.indexOf(handle) > -1) {\n disabledHandles.add(handle);\n }\n });\n this._disabledHandles = disabledHandles;\n return this;\n }\n /**\n * Registers the template that should be used for the drag preview.\n * @param template Template that from which to stamp out the preview.\n */\n withPreviewTemplate(template) {\n this._previewTemplate = template;\n return this;\n }\n /**\n * Registers the template that should be used for the drag placeholder.\n * @param template Template that from which to stamp out the placeholder.\n */\n withPlaceholderTemplate(template) {\n this._placeholderTemplate = template;\n return this;\n }\n /**\n * Sets an alternate drag root element. The root element is the element that will be moved as\n * the user is dragging. Passing an alternate root element is useful when trying to enable\n * dragging on an element that you might not have access to.\n */\n withRootElement(rootElement) {\n const element = coerceElement(rootElement);\n if (element !== this._rootElement) {\n if (this._rootElement) {\n this._removeRootElementListeners(this._rootElement);\n }\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener('mousedown', this._pointerDown, activeEventListenerOptions);\n element.addEventListener('touchstart', this._pointerDown, passiveEventListenerOptions);\n element.addEventListener('dragstart', this._nativeDragStart, activeEventListenerOptions);\n });\n this._initialTransform = undefined;\n this._rootElement = element;\n }\n if (typeof SVGElement !== 'undefined' && this._rootElement instanceof SVGElement) {\n this._ownerSVGElement = this._rootElement.ownerSVGElement;\n }\n return this;\n }\n /**\n * Element to which the draggable's position will be constrained.\n */\n withBoundaryElement(boundaryElement) {\n this._boundaryElement = boundaryElement ? coerceElement(boundaryElement) : null;\n this._resizeSubscription.unsubscribe();\n if (boundaryElement) {\n this._resizeSubscription = this._viewportRuler.change(10).subscribe(() => this._containInsideBoundaryOnResize());\n }\n return this;\n }\n /** Sets the parent ref that the ref is nested in. */\n withParent(parent) {\n this._parentDragRef = parent;\n return this;\n }\n /** Removes the dragging functionality from the DOM element. */\n dispose() {\n this._removeRootElementListeners(this._rootElement);\n // Do this check before removing from the registry since it'll\n // stop being considered as dragged once it is removed.\n if (this.isDragging()) {\n // Since we move out the element to the end of the body while it's being\n // dragged, we have to make sure that it's removed if it gets destroyed.\n this._rootElement?.remove();\n }\n this._anchor?.remove();\n this._destroyPreview();\n this._destroyPlaceholder();\n this._dragDropRegistry.removeDragItem(this);\n this._removeSubscriptions();\n this.beforeStarted.complete();\n this.started.complete();\n this.released.complete();\n this.ended.complete();\n this.entered.complete();\n this.exited.complete();\n this.dropped.complete();\n this._moveEvents.complete();\n this._handles = [];\n this._disabledHandles.clear();\n this._dropContainer = undefined;\n this._resizeSubscription.unsubscribe();\n this._parentPositions.clear();\n this._boundaryElement = this._rootElement = this._ownerSVGElement = this._placeholderTemplate = this._previewTemplate = this._anchor = this._parentDragRef = null;\n }\n /** Checks whether the element is currently being dragged. */\n isDragging() {\n return this._hasStartedDragging && this._dragDropRegistry.isDragging(this);\n }\n /** Resets a standalone drag item to its initial position. */\n reset() {\n this._rootElement.style.transform = this._initialTransform || '';\n this._activeTransform = {\n x: 0,\n y: 0\n };\n this._passiveTransform = {\n x: 0,\n y: 0\n };\n }\n /**\n * Sets a handle as disabled. While a handle is disabled, it'll capture and interrupt dragging.\n * @param handle Handle element that should be disabled.\n */\n disableHandle(handle) {\n if (!this._disabledHandles.has(handle) && this._handles.indexOf(handle) > -1) {\n this._disabledHandles.add(handle);\n toggleNativeDragInteractions(handle, true);\n }\n }\n /**\n * Enables a handle, if it has been disabled.\n * @param handle Handle element to be enabled.\n */\n enableHandle(handle) {\n if (this._disabledHandles.has(handle)) {\n this._disabledHandles.delete(handle);\n toggleNativeDragInteractions(handle, this.disabled);\n }\n }\n /** Sets the layout direction of the draggable item. */\n withDirection(direction) {\n this._direction = direction;\n return this;\n }\n /** Sets the container that the item is part of. */\n _withDropContainer(container) {\n this._dropContainer = container;\n }\n /**\n * Gets the current position in pixels the draggable outside of a drop container.\n */\n getFreeDragPosition() {\n const position = this.isDragging() ? this._activeTransform : this._passiveTransform;\n return {\n x: position.x,\n y: position.y\n };\n }\n /**\n * Sets the current position in pixels the draggable outside of a drop container.\n * @param value New position to be set.\n */\n setFreeDragPosition(value) {\n this._activeTransform = {\n x: 0,\n y: 0\n };\n this._passiveTransform.x = value.x;\n this._passiveTransform.y = value.y;\n if (!this._dropContainer) {\n this._applyRootElementTransform(value.x, value.y);\n }\n return this;\n }\n /**\n * Sets the container into which to insert the preview element.\n * @param value Container into which to insert the preview.\n */\n withPreviewContainer(value) {\n this._previewContainer = value;\n return this;\n }\n /** Updates the item's sort order based on the last-known pointer position. */\n _sortFromLastPointerPosition() {\n const position = this._lastKnownPointerPosition;\n if (position && this._dropContainer) {\n this._updateActiveDropContainer(this._getConstrainedPointerPosition(position), position);\n }\n }\n /** Unsubscribes from the global subscriptions. */\n _removeSubscriptions() {\n this._pointerMoveSubscription.unsubscribe();\n this._pointerUpSubscription.unsubscribe();\n this._scrollSubscription.unsubscribe();\n }\n /** Destroys the preview element and its ViewRef. */\n _destroyPreview() {\n this._preview?.remove();\n this._previewRef?.destroy();\n this._preview = this._previewRef = null;\n }\n /** Destroys the placeholder element and its ViewRef. */\n _destroyPlaceholder() {\n this._placeholder?.remove();\n this._placeholderRef?.destroy();\n this._placeholder = this._placeholderRef = null;\n }\n /**\n * Clears subscriptions and stops the dragging sequence.\n * @param event Browser event object that ended the sequence.\n */\n _endDragSequence(event) {\n // Note that here we use `isDragging` from the service, rather than from `this`.\n // The difference is that the one from the service reflects whether a dragging sequence\n // has been initiated, whereas the one on `this` includes whether the user has passed\n // the minimum dragging threshold.\n if (!this._dragDropRegistry.isDragging(this)) {\n return;\n }\n this._removeSubscriptions();\n this._dragDropRegistry.stopDragging(this);\n this._toggleNativeDragInteractions();\n if (this._handles) {\n this._rootElement.style.webkitTapHighlightColor = this._rootElementTapHighlight;\n }\n if (!this._hasStartedDragging) {\n return;\n }\n this.released.next({\n source: this,\n event\n });\n if (this._dropContainer) {\n // Stop scrolling immediately, instead of waiting for the animation to finish.\n this._dropContainer._stopScrolling();\n this._animatePreviewToPlaceholder().then(() => {\n this._cleanupDragArtifacts(event);\n this._cleanupCachedDimensions();\n this._dragDropRegistry.stopDragging(this);\n });\n } else {\n // Convert the active transform into a passive one. This means that next time\n // the user starts dragging the item, its position will be calculated relatively\n // to the new passive transform.\n this._passiveTransform.x = this._activeTransform.x;\n const pointerPosition = this._getPointerPositionOnPage(event);\n this._passiveTransform.y = this._activeTransform.y;\n this._ngZone.run(() => {\n this.ended.next({\n source: this,\n distance: this._getDragDistance(pointerPosition),\n dropPoint: pointerPosition,\n event\n });\n });\n this._cleanupCachedDimensions();\n this._dragDropRegistry.stopDragging(this);\n }\n }\n /** Starts the dragging sequence. */\n _startDragSequence(event) {\n if (isTouchEvent(event)) {\n this._lastTouchEventTime = Date.now();\n }\n this._toggleNativeDragInteractions();\n const dropContainer = this._dropContainer;\n if (dropContainer) {\n const element = this._rootElement;\n const parent = element.parentNode;\n const placeholder = this._placeholder = this._createPlaceholderElement();\n const anchor = this._anchor = this._anchor || this._document.createComment('');\n // Needs to happen before the root element is moved.\n const shadowRoot = this._getShadowRoot();\n // Insert an anchor node so that we can restore the element's position in the DOM.\n parent.insertBefore(anchor, element);\n // There's no risk of transforms stacking when inside a drop container so\n // we can keep the initial transform up to date any time dragging starts.\n this._initialTransform = element.style.transform || '';\n // Create the preview after the initial transform has\n // been cached, because it can be affected by the transform.\n this._preview = this._createPreviewElement();\n // We move the element out at the end of the body and we make it hidden, because keeping it in\n // place will throw off the consumer's `:last-child` selectors. We can't remove the element\n // from the DOM completely, because iOS will stop firing all subsequent events in the chain.\n toggleVisibility(element, false, dragImportantProperties);\n this._document.body.appendChild(parent.replaceChild(placeholder, element));\n this._getPreviewInsertionPoint(parent, shadowRoot).appendChild(this._preview);\n this.started.next({\n source: this,\n event\n }); // Emit before notifying the container.\n dropContainer.start();\n this._initialContainer = dropContainer;\n this._initialIndex = dropContainer.getItemIndex(this);\n } else {\n this.started.next({\n source: this,\n event\n });\n this._initialContainer = this._initialIndex = undefined;\n }\n // Important to run after we've called `start` on the parent container\n // so that it has had time to resolve its scrollable parents.\n this._parentPositions.cache(dropContainer ? dropContainer.getScrollableParents() : []);\n }\n /**\n * Sets up the different variables and subscriptions\n * that will be necessary for the dragging sequence.\n * @param referenceElement Element that started the drag sequence.\n * @param event Browser event object that started the sequence.\n */\n _initializeDragSequence(referenceElement, event) {\n // Stop propagation if the item is inside another\n // draggable so we don't start multiple drag sequences.\n if (this._parentDragRef) {\n event.stopPropagation();\n }\n const isDragging = this.isDragging();\n const isTouchSequence = isTouchEvent(event);\n const isAuxiliaryMouseButton = !isTouchSequence && event.button !== 0;\n const rootElement = this._rootElement;\n const target = _getEventTarget(event);\n const isSyntheticEvent = !isTouchSequence && this._lastTouchEventTime && this._lastTouchEventTime + MOUSE_EVENT_IGNORE_TIME > Date.now();\n const isFakeEvent = isTouchSequence ? isFakeTouchstartFromScreenReader(event) : isFakeMousedownFromScreenReader(event);\n // If the event started from an element with the native HTML drag&drop, it'll interfere\n // with our own dragging (e.g. `img` tags do it by default). Prevent the default action\n // to stop it from happening. Note that preventing on `dragstart` also seems to work, but\n // it's flaky and it fails if the user drags it away quickly. Also note that we only want\n // to do this for `mousedown` since doing the same for `touchstart` will stop any `click`\n // events from firing on touch devices.\n if (target && target.draggable && event.type === 'mousedown') {\n event.preventDefault();\n }\n // Abort if the user is already dragging or is using a mouse button other than the primary one.\n if (isDragging || isAuxiliaryMouseButton || isSyntheticEvent || isFakeEvent) {\n return;\n }\n // If we've got handles, we need to disable the tap highlight on the entire root element,\n // otherwise iOS will still add it, even though all the drag interactions on the handle\n // are disabled.\n if (this._handles.length) {\n const rootStyles = rootElement.style;\n this._rootElementTapHighlight = rootStyles.webkitTapHighlightColor || '';\n rootStyles.webkitTapHighlightColor = 'transparent';\n }\n this._hasStartedDragging = this._hasMoved = false;\n // Avoid multiple subscriptions and memory leaks when multi touch\n // (isDragging check above isn't enough because of possible temporal and/or dimensional delays)\n this._removeSubscriptions();\n this._initialDomRect = this._rootElement.getBoundingClientRect();\n this._pointerMoveSubscription = this._dragDropRegistry.pointerMove.subscribe(this._pointerMove);\n this._pointerUpSubscription = this._dragDropRegistry.pointerUp.subscribe(this._pointerUp);\n this._scrollSubscription = this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(scrollEvent => this._updateOnScroll(scrollEvent));\n if (this._boundaryElement) {\n this._boundaryRect = getMutableClientRect(this._boundaryElement);\n }\n // If we have a custom preview we can't know ahead of time how large it'll be so we position\n // it next to the cursor. The exception is when the consumer has opted into making the preview\n // the same size as the root element, in which case we do know the size.\n const previewTemplate = this._previewTemplate;\n this._pickupPositionInElement = previewTemplate && previewTemplate.template && !previewTemplate.matchSize ? {\n x: 0,\n y: 0\n } : this._getPointerPositionInElement(this._initialDomRect, referenceElement, event);\n const pointerPosition = this._pickupPositionOnPage = this._lastKnownPointerPosition = this._getPointerPositionOnPage(event);\n this._pointerDirectionDelta = {\n x: 0,\n y: 0\n };\n this._pointerPositionAtLastDirectionChange = {\n x: pointerPosition.x,\n y: pointerPosition.y\n };\n this._dragStartTime = Date.now();\n this._dragDropRegistry.startDragging(this, event);\n }\n /** Cleans up the DOM artifacts that were added to facilitate the element being dragged. */\n _cleanupDragArtifacts(event) {\n // Restore the element's visibility and insert it at its old position in the DOM.\n // It's important that we maintain the position, because moving the element around in the DOM\n // can throw off `NgFor` which does smart diffing and re-creates elements only when necessary,\n // while moving the existing elements in all other cases.\n toggleVisibility(this._rootElement, true, dragImportantProperties);\n this._anchor.parentNode.replaceChild(this._rootElement, this._anchor);\n this._destroyPreview();\n this._destroyPlaceholder();\n this._initialDomRect = this._boundaryRect = this._previewRect = this._initialTransform = undefined;\n // Re-enter the NgZone since we bound `document` events on the outside.\n this._ngZone.run(() => {\n const container = this._dropContainer;\n const currentIndex = container.getItemIndex(this);\n const pointerPosition = this._getPointerPositionOnPage(event);\n const distance = this._getDragDistance(pointerPosition);\n const isPointerOverContainer = container._isOverContainer(pointerPosition.x, pointerPosition.y);\n this.ended.next({\n source: this,\n distance,\n dropPoint: pointerPosition,\n event\n });\n this.dropped.next({\n item: this,\n currentIndex,\n previousIndex: this._initialIndex,\n container: container,\n previousContainer: this._initialContainer,\n isPointerOverContainer,\n distance,\n dropPoint: pointerPosition,\n event\n });\n container.drop(this, currentIndex, this._initialIndex, this._initialContainer, isPointerOverContainer, distance, pointerPosition, event);\n this._dropContainer = this._initialContainer;\n });\n }\n /**\n * Updates the item's position in its drop container, or moves it\n * into a new one, depending on its current drag position.\n */\n _updateActiveDropContainer({\n x,\n y\n }, {\n x: rawX,\n y: rawY\n }) {\n // Drop container that draggable has been moved into.\n let newContainer = this._initialContainer._getSiblingContainerFromPosition(this, x, y);\n // If we couldn't find a new container to move the item into, and the item has left its\n // initial container, check whether the it's over the initial container. This handles the\n // case where two containers are connected one way and the user tries to undo dragging an\n // item into a new container.\n if (!newContainer && this._dropContainer !== this._initialContainer && this._initialContainer._isOverContainer(x, y)) {\n newContainer = this._initialContainer;\n }\n if (newContainer && newContainer !== this._dropContainer) {\n this._ngZone.run(() => {\n // Notify the old container that the item has left.\n this.exited.next({\n item: this,\n container: this._dropContainer\n });\n this._dropContainer.exit(this);\n // Notify the new container that the item has entered.\n this._dropContainer = newContainer;\n this._dropContainer.enter(this, x, y, newContainer === this._initialContainer &&\n // If we're re-entering the initial container and sorting is disabled,\n // put item the into its starting index to begin with.\n newContainer.sortingDisabled ? this._initialIndex : undefined);\n this.entered.next({\n item: this,\n container: newContainer,\n currentIndex: newContainer.getItemIndex(this)\n });\n });\n }\n // Dragging may have been interrupted as a result of the events above.\n if (this.isDragging()) {\n this._dropContainer._startScrollingIfNecessary(rawX, rawY);\n this._dropContainer._sortItem(this, x, y, this._pointerDirectionDelta);\n if (this.constrainPosition) {\n this._applyPreviewTransform(x, y);\n } else {\n this._applyPreviewTransform(x - this._pickupPositionInElement.x, y - this._pickupPositionInElement.y);\n }\n }\n }\n /**\n * Creates the element that will be rendered next to the user's pointer\n * and will be used as a preview of the element that is being dragged.\n */\n _createPreviewElement() {\n const previewConfig = this._previewTemplate;\n const previewClass = this.previewClass;\n const previewTemplate = previewConfig ? previewConfig.template : null;\n let preview;\n if (previewTemplate && previewConfig) {\n // Measure the element before we've inserted the preview\n // since the insertion could throw off the measurement.\n const rootRect = previewConfig.matchSize ? this._initialDomRect : null;\n const viewRef = previewConfig.viewContainer.createEmbeddedView(previewTemplate, previewConfig.context);\n viewRef.detectChanges();\n preview = getRootNode(viewRef, this._document);\n this._previewRef = viewRef;\n if (previewConfig.matchSize) {\n matchElementSize(preview, rootRect);\n } else {\n preview.style.transform = getTransform(this._pickupPositionOnPage.x, this._pickupPositionOnPage.y);\n }\n } else {\n preview = deepCloneNode(this._rootElement);\n matchElementSize(preview, this._initialDomRect);\n if (this._initialTransform) {\n preview.style.transform = this._initialTransform;\n }\n }\n extendStyles(preview.style, {\n // It's important that we disable the pointer events on the preview, because\n // it can throw off the `document.elementFromPoint` calls in the `CdkDropList`.\n 'pointer-events': 'none',\n // We have to reset the margin, because it can throw off positioning relative to the viewport.\n 'margin': '0',\n 'position': 'fixed',\n 'top': '0',\n 'left': '0',\n 'z-index': `${this._config.zIndex || 1000}`\n }, dragImportantProperties);\n toggleNativeDragInteractions(preview, false);\n preview.classList.add('cdk-drag-preview');\n preview.setAttribute('dir', this._direction);\n if (previewClass) {\n if (Array.isArray(previewClass)) {\n previewClass.forEach(className => preview.classList.add(className));\n } else {\n preview.classList.add(previewClass);\n }\n }\n return preview;\n }\n /**\n * Animates the preview element from its current position to the location of the drop placeholder.\n * @returns Promise that resolves when the animation completes.\n */\n _animatePreviewToPlaceholder() {\n // If the user hasn't moved yet, the transitionend event won't fire.\n if (!this._hasMoved) {\n return Promise.resolve();\n }\n const placeholderRect = this._placeholder.getBoundingClientRect();\n // Apply the class that adds a transition to the preview.\n this._preview.classList.add('cdk-drag-animating');\n // Move the preview to the placeholder position.\n this._applyPreviewTransform(placeholderRect.left, placeholderRect.top);\n // If the element doesn't have a `transition`, the `transitionend` event won't fire. Since\n // we need to trigger a style recalculation in order for the `cdk-drag-animating` class to\n // apply its style, we take advantage of the available info to figure out whether we need to\n // bind the event in the first place.\n const duration = getTransformTransitionDurationInMs(this._preview);\n if (duration === 0) {\n return Promise.resolve();\n }\n return this._ngZone.runOutsideAngular(() => {\n return new Promise(resolve => {\n const handler = event => {\n if (!event || _getEventTarget(event) === this._preview && event.propertyName === 'transform') {\n this._preview?.removeEventListener('transitionend', handler);\n resolve();\n clearTimeout(timeout);\n }\n };\n // If a transition is short enough, the browser might not fire the `transitionend` event.\n // Since we know how long it's supposed to take, add a timeout with a 50% buffer that'll\n // fire if the transition hasn't completed when it was supposed to.\n const timeout = setTimeout(handler, duration * 1.5);\n this._preview.addEventListener('transitionend', handler);\n });\n });\n }\n /** Creates an element that will be shown instead of the current element while dragging. */\n _createPlaceholderElement() {\n const placeholderConfig = this._placeholderTemplate;\n const placeholderTemplate = placeholderConfig ? placeholderConfig.template : null;\n let placeholder;\n if (placeholderTemplate) {\n this._placeholderRef = placeholderConfig.viewContainer.createEmbeddedView(placeholderTemplate, placeholderConfig.context);\n this._placeholderRef.detectChanges();\n placeholder = getRootNode(this._placeholderRef, this._document);\n } else {\n placeholder = deepCloneNode(this._rootElement);\n }\n // Stop pointer events on the preview so the user can't\n // interact with it while the preview is animating.\n placeholder.style.pointerEvents = 'none';\n placeholder.classList.add('cdk-drag-placeholder');\n return placeholder;\n }\n /**\n * Figures out the coordinates at which an element was picked up.\n * @param referenceElement Element that initiated the dragging.\n * @param event Event that initiated the dragging.\n */\n _getPointerPositionInElement(elementRect, referenceElement, event) {\n const handleElement = referenceElement === this._rootElement ? null : referenceElement;\n const referenceRect = handleElement ? handleElement.getBoundingClientRect() : elementRect;\n const point = isTouchEvent(event) ? event.targetTouches[0] : event;\n const scrollPosition = this._getViewportScrollPosition();\n const x = point.pageX - referenceRect.left - scrollPosition.left;\n const y = point.pageY - referenceRect.top - scrollPosition.top;\n return {\n x: referenceRect.left - elementRect.left + x,\n y: referenceRect.top - elementRect.top + y\n };\n }\n /** Determines the point of the page that was touched by the user. */\n _getPointerPositionOnPage(event) {\n const scrollPosition = this._getViewportScrollPosition();\n const point = isTouchEvent(event) ?\n // `touches` will be empty for start/end events so we have to fall back to `changedTouches`.\n // Also note that on real devices we're guaranteed for either `touches` or `changedTouches`\n // to have a value, but Firefox in device emulation mode has a bug where both can be empty\n // for `touchstart` and `touchend` so we fall back to a dummy object in order to avoid\n // throwing an error. The value returned here will be incorrect, but since this only\n // breaks inside a developer tool and the value is only used for secondary information,\n // we can get away with it. See https://bugzilla.mozilla.org/show_bug.cgi?id=1615824.\n event.touches[0] || event.changedTouches[0] || {\n pageX: 0,\n pageY: 0\n } : event;\n const x = point.pageX - scrollPosition.left;\n const y = point.pageY - scrollPosition.top;\n // if dragging SVG element, try to convert from the screen coordinate system to the SVG\n // coordinate system\n if (this._ownerSVGElement) {\n const svgMatrix = this._ownerSVGElement.getScreenCTM();\n if (svgMatrix) {\n const svgPoint = this._ownerSVGElement.createSVGPoint();\n svgPoint.x = x;\n svgPoint.y = y;\n return svgPoint.matrixTransform(svgMatrix.inverse());\n }\n }\n return {\n x,\n y\n };\n }\n /** Gets the pointer position on the page, accounting for any position constraints. */\n _getConstrainedPointerPosition(point) {\n const dropContainerLock = this._dropContainer ? this._dropContainer.lockAxis : null;\n let {\n x,\n y\n } = this.constrainPosition ? this.constrainPosition(point, this, this._initialDomRect, this._pickupPositionInElement) : point;\n if (this.lockAxis === 'x' || dropContainerLock === 'x') {\n y = this._pickupPositionOnPage.y - (this.constrainPosition ? this._pickupPositionInElement.y : 0);\n } else if (this.lockAxis === 'y' || dropContainerLock === 'y') {\n x = this._pickupPositionOnPage.x - (this.constrainPosition ? this._pickupPositionInElement.x : 0);\n }\n if (this._boundaryRect) {\n // If not using a custom constrain we need to account for the pickup position in the element\n // otherwise we do not need to do this, as it has already been accounted for\n const {\n x: pickupX,\n y: pickupY\n } = !this.constrainPosition ? this._pickupPositionInElement : {\n x: 0,\n y: 0\n };\n const boundaryRect = this._boundaryRect;\n const {\n width: previewWidth,\n height: previewHeight\n } = this._getPreviewRect();\n const minY = boundaryRect.top + pickupY;\n const maxY = boundaryRect.bottom - (previewHeight - pickupY);\n const minX = boundaryRect.left + pickupX;\n const maxX = boundaryRect.right - (previewWidth - pickupX);\n x = clamp$1(x, minX, maxX);\n y = clamp$1(y, minY, maxY);\n }\n return {\n x,\n y\n };\n }\n /** Updates the current drag delta, based on the user's current pointer position on the page. */\n _updatePointerDirectionDelta(pointerPositionOnPage) {\n const {\n x,\n y\n } = pointerPositionOnPage;\n const delta = this._pointerDirectionDelta;\n const positionSinceLastChange = this._pointerPositionAtLastDirectionChange;\n // Amount of pixels the user has dragged since the last time the direction changed.\n const changeX = Math.abs(x - positionSinceLastChange.x);\n const changeY = Math.abs(y - positionSinceLastChange.y);\n // Because we handle pointer events on a per-pixel basis, we don't want the delta\n // to change for every pixel, otherwise anything that depends on it can look erratic.\n // To make the delta more consistent, we track how much the user has moved since the last\n // delta change and we only update it after it has reached a certain threshold.\n if (changeX > this._config.pointerDirectionChangeThreshold) {\n delta.x = x > positionSinceLastChange.x ? 1 : -1;\n positionSinceLastChange.x = x;\n }\n if (changeY > this._config.pointerDirectionChangeThreshold) {\n delta.y = y > positionSinceLastChange.y ? 1 : -1;\n positionSinceLastChange.y = y;\n }\n return delta;\n }\n /** Toggles the native drag interactions, based on how many handles are registered. */\n _toggleNativeDragInteractions() {\n if (!this._rootElement || !this._handles) {\n return;\n }\n const shouldEnable = this._handles.length > 0 || !this.isDragging();\n if (shouldEnable !== this._nativeInteractionsEnabled) {\n this._nativeInteractionsEnabled = shouldEnable;\n toggleNativeDragInteractions(this._rootElement, shouldEnable);\n }\n }\n /** Removes the manually-added event listeners from the root element. */\n _removeRootElementListeners(element) {\n element.removeEventListener('mousedown', this._pointerDown, activeEventListenerOptions);\n element.removeEventListener('touchstart', this._pointerDown, passiveEventListenerOptions);\n element.removeEventListener('dragstart', this._nativeDragStart, activeEventListenerOptions);\n }\n /**\n * Applies a `transform` to the root element, taking into account any existing transforms on it.\n * @param x New transform value along the X axis.\n * @param y New transform value along the Y axis.\n */\n _applyRootElementTransform(x, y) {\n const transform = getTransform(x, y);\n const styles = this._rootElement.style;\n // Cache the previous transform amount only after the first drag sequence, because\n // we don't want our own transforms to stack on top of each other.\n // Should be excluded none because none + translate3d(x, y, x) is invalid css\n if (this._initialTransform == null) {\n this._initialTransform = styles.transform && styles.transform != 'none' ? styles.transform : '';\n }\n // Preserve the previous `transform` value, if there was one. Note that we apply our own\n // transform before the user's, because things like rotation can affect which direction\n // the element will be translated towards.\n styles.transform = combineTransforms(transform, this._initialTransform);\n }\n /**\n * Applies a `transform` to the preview, taking into account any existing transforms on it.\n * @param x New transform value along the X axis.\n * @param y New transform value along the Y axis.\n */\n _applyPreviewTransform(x, y) {\n // Only apply the initial transform if the preview is a clone of the original element, otherwise\n // it could be completely different and the transform might not make sense anymore.\n const initialTransform = this._previewTemplate?.template ? undefined : this._initialTransform;\n const transform = getTransform(x, y);\n this._preview.style.transform = combineTransforms(transform, initialTransform);\n }\n /**\n * Gets the distance that the user has dragged during the current drag sequence.\n * @param currentPosition Current position of the user's pointer.\n */\n _getDragDistance(currentPosition) {\n const pickupPosition = this._pickupPositionOnPage;\n if (pickupPosition) {\n return {\n x: currentPosition.x - pickupPosition.x,\n y: currentPosition.y - pickupPosition.y\n };\n }\n return {\n x: 0,\n y: 0\n };\n }\n /** Cleans up any cached element dimensions that we don't need after dragging has stopped. */\n _cleanupCachedDimensions() {\n this._boundaryRect = this._previewRect = undefined;\n this._parentPositions.clear();\n }\n /**\n * Checks whether the element is still inside its boundary after the viewport has been resized.\n * If not, the position is adjusted so that the element fits again.\n */\n _containInsideBoundaryOnResize() {\n let {\n x,\n y\n } = this._passiveTransform;\n if (x === 0 && y === 0 || this.isDragging() || !this._boundaryElement) {\n return;\n }\n // Note: don't use `_clientRectAtStart` here, because we want the latest position.\n const elementRect = this._rootElement.getBoundingClientRect();\n const boundaryRect = this._boundaryElement.getBoundingClientRect();\n // It's possible that the element got hidden away after dragging (e.g. by switching to a\n // different tab). Don't do anything in this case so we don't clear the user's position.\n if (boundaryRect.width === 0 && boundaryRect.height === 0 || elementRect.width === 0 && elementRect.height === 0) {\n return;\n }\n const leftOverflow = boundaryRect.left - elementRect.left;\n const rightOverflow = elementRect.right - boundaryRect.right;\n const topOverflow = boundaryRect.top - elementRect.top;\n const bottomOverflow = elementRect.bottom - boundaryRect.bottom;\n // If the element has become wider than the boundary, we can't\n // do much to make it fit so we just anchor it to the left.\n if (boundaryRect.width > elementRect.width) {\n if (leftOverflow > 0) {\n x += leftOverflow;\n }\n if (rightOverflow > 0) {\n x -= rightOverflow;\n }\n } else {\n x = 0;\n }\n // If the element has become taller than the boundary, we can't\n // do much to make it fit so we just anchor it to the top.\n if (boundaryRect.height > elementRect.height) {\n if (topOverflow > 0) {\n y += topOverflow;\n }\n if (bottomOverflow > 0) {\n y -= bottomOverflow;\n }\n } else {\n y = 0;\n }\n if (x !== this._passiveTransform.x || y !== this._passiveTransform.y) {\n this.setFreeDragPosition({\n y,\n x\n });\n }\n }\n /** Gets the drag start delay, based on the event type. */\n _getDragStartDelay(event) {\n const value = this.dragStartDelay;\n if (typeof value === 'number') {\n return value;\n } else if (isTouchEvent(event)) {\n return value.touch;\n }\n return value ? value.mouse : 0;\n }\n /** Updates the internal state of the draggable element when scrolling has occurred. */\n _updateOnScroll(event) {\n const scrollDifference = this._parentPositions.handleScroll(event);\n if (scrollDifference) {\n const target = _getEventTarget(event);\n // DOMRect dimensions are based on the scroll position of the page and its parent\n // node so we have to update the cached boundary DOMRect if the user has scrolled.\n if (this._boundaryRect && target !== this._boundaryElement && target.contains(this._boundaryElement)) {\n adjustDomRect(this._boundaryRect, scrollDifference.top, scrollDifference.left);\n }\n this._pickupPositionOnPage.x += scrollDifference.left;\n this._pickupPositionOnPage.y += scrollDifference.top;\n // If we're in free drag mode, we have to update the active transform, because\n // it isn't relative to the viewport like the preview inside a drop list.\n if (!this._dropContainer) {\n this._activeTransform.x -= scrollDifference.left;\n this._activeTransform.y -= scrollDifference.top;\n this._applyRootElementTransform(this._activeTransform.x, this._activeTransform.y);\n }\n }\n }\n /** Gets the scroll position of the viewport. */\n _getViewportScrollPosition() {\n return this._parentPositions.positions.get(this._document)?.scrollPosition || this._parentPositions.getViewportScrollPosition();\n }\n /**\n * Lazily resolves and returns the shadow root of the element. We do this in a function, rather\n * than saving it in property directly on init, because we want to resolve it as late as possible\n * in order to ensure that the element has been moved into the shadow DOM. Doing it inside the\n * constructor might be too early if the element is inside of something like `ngFor` or `ngIf`.\n */\n _getShadowRoot() {\n if (this._cachedShadowRoot === undefined) {\n this._cachedShadowRoot = _getShadowRoot(this._rootElement);\n }\n return this._cachedShadowRoot;\n }\n /** Gets the element into which the drag preview should be inserted. */\n _getPreviewInsertionPoint(initialParent, shadowRoot) {\n const previewContainer = this._previewContainer || 'global';\n if (previewContainer === 'parent') {\n return initialParent;\n }\n if (previewContainer === 'global') {\n const documentRef = this._document;\n // We can't use the body if the user is in fullscreen mode,\n // because the preview will render under the fullscreen element.\n // TODO(crisbeto): dedupe this with the `FullscreenOverlayContainer` eventually.\n return shadowRoot || documentRef.fullscreenElement || documentRef.webkitFullscreenElement || documentRef.mozFullScreenElement || documentRef.msFullscreenElement || documentRef.body;\n }\n return coerceElement(previewContainer);\n }\n /** Lazily resolves and returns the dimensions of the preview. */\n _getPreviewRect() {\n // Cache the preview element rect if we haven't cached it already or if\n // we cached it too early before the element dimensions were computed.\n if (!this._previewRect || !this._previewRect.width && !this._previewRect.height) {\n this._previewRect = this._preview ? this._preview.getBoundingClientRect() : this._initialDomRect;\n }\n return this._previewRect;\n }\n /** Gets a handle that is the target of an event. */\n _getTargetHandle(event) {\n return this._handles.find(handle => {\n return event.target && (event.target === handle || handle.contains(event.target));\n });\n }\n}\n/**\n * Gets a 3d `transform` that can be applied to an element.\n * @param x Desired position of the element along the X axis.\n * @param y Desired position of the element along the Y axis.\n */\nfunction getTransform(x, y) {\n // Round the transforms since some browsers will\n // blur the elements for sub-pixel transforms.\n return `translate3d(${Math.round(x)}px, ${Math.round(y)}px, 0)`;\n}\n/** Clamps a value between a minimum and a maximum. */\nfunction clamp$1(value, min, max) {\n return Math.max(min, Math.min(max, value));\n}\n/** Determines whether an event is a touch event. */\nfunction isTouchEvent(event) {\n // This function is called for every pixel that the user has dragged so we need it to be\n // as fast as possible. Since we only bind mouse events and touch events, we can assume\n // that if the event's name starts with `t`, it's a touch event.\n return event.type[0] === 't';\n}\n/**\n * Gets the root HTML element of an embedded view.\n * If the root is not an HTML element it gets wrapped in one.\n */\nfunction getRootNode(viewRef, _document) {\n const rootNodes = viewRef.rootNodes;\n if (rootNodes.length === 1 && rootNodes[0].nodeType === _document.ELEMENT_NODE) {\n return rootNodes[0];\n }\n const wrapper = _document.createElement('div');\n rootNodes.forEach(node => wrapper.appendChild(node));\n return wrapper;\n}\n/**\n * Matches the target element's size to the source's size.\n * @param target Element that needs to be resized.\n * @param sourceRect Dimensions of the source element.\n */\nfunction matchElementSize(target, sourceRect) {\n target.style.width = `${sourceRect.width}px`;\n target.style.height = `${sourceRect.height}px`;\n target.style.transform = getTransform(sourceRect.left, sourceRect.top);\n}\n\n/**\n * Moves an item one index in an array to another.\n * @param array Array in which to move the item.\n * @param fromIndex Starting index of the item.\n * @param toIndex Index to which the item should be moved.\n */\nfunction moveItemInArray(array, fromIndex, toIndex) {\n const from = clamp(fromIndex, array.length - 1);\n const to = clamp(toIndex, array.length - 1);\n if (from === to) {\n return;\n }\n const target = array[from];\n const delta = to < from ? -1 : 1;\n for (let i = from; i !== to; i += delta) {\n array[i] = array[i + delta];\n }\n array[to] = target;\n}\n/**\n * Moves an item from one array to another.\n * @param currentArray Array from which to transfer the item.\n * @param targetArray Array into which to put the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n */\nfunction transferArrayItem(currentArray, targetArray, currentIndex, targetIndex) {\n const from = clamp(currentIndex, currentArray.length - 1);\n const to = clamp(targetIndex, targetArray.length);\n if (currentArray.length) {\n targetArray.splice(to, 0, currentArray.splice(from, 1)[0]);\n }\n}\n/**\n * Copies an item from one array to another, leaving it in its\n * original position in current array.\n * @param currentArray Array from which to copy the item.\n * @param targetArray Array into which is copy the item.\n * @param currentIndex Index of the item in its current array.\n * @param targetIndex Index at which to insert the item.\n *\n */\nfunction copyArrayItem(currentArray, targetArray, currentIndex, targetIndex) {\n const to = clamp(targetIndex, targetArray.length);\n if (currentArray.length) {\n targetArray.splice(to, 0, currentArray[currentIndex]);\n }\n}\n/** Clamps a number between zero and a maximum. */\nfunction clamp(value, max) {\n return Math.max(0, Math.min(max, value));\n}\n\n/**\n * Strategy that only supports sorting along a single axis.\n * Items are reordered using CSS transforms which allows for sorting to be animated.\n * @docs-private\n */\nclass SingleAxisSortStrategy {\n constructor(_element, _dragDropRegistry) {\n this._element = _element;\n this._dragDropRegistry = _dragDropRegistry;\n /** Cache of the dimensions of all the items inside the container. */\n this._itemPositions = [];\n /** Direction in which the list is oriented. */\n this.orientation = 'vertical';\n /**\n * Keeps track of the item that was last swapped with the dragged item, as well as what direction\n * the pointer was moving in when the swap occurred and whether the user's pointer continued to\n * overlap with the swapped item after the swapping occurred.\n */\n this._previousSwap = {\n drag: null,\n delta: 0,\n overlaps: false\n };\n }\n /**\n * To be called when the drag sequence starts.\n * @param items Items that are currently in the list.\n */\n start(items) {\n this.withItems(items);\n }\n /**\n * To be called when an item is being sorted.\n * @param item Item to be sorted.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param pointerDelta Direction in which the pointer is moving along each axis.\n */\n sort(item, pointerX, pointerY, pointerDelta) {\n const siblings = this._itemPositions;\n const newIndex = this._getItemIndexFromPointerPosition(item, pointerX, pointerY, pointerDelta);\n if (newIndex === -1 && siblings.length > 0) {\n return null;\n }\n const isHorizontal = this.orientation === 'horizontal';\n const currentIndex = siblings.findIndex(currentItem => currentItem.drag === item);\n const siblingAtNewPosition = siblings[newIndex];\n const currentPosition = siblings[currentIndex].clientRect;\n const newPosition = siblingAtNewPosition.clientRect;\n const delta = currentIndex > newIndex ? 1 : -1;\n // How many pixels the item's placeholder should be offset.\n const itemOffset = this._getItemOffsetPx(currentPosition, newPosition, delta);\n // How many pixels all the other items should be offset.\n const siblingOffset = this._getSiblingOffsetPx(currentIndex, siblings, delta);\n // Save the previous order of the items before moving the item to its new index.\n // We use this to check whether an item has been moved as a result of the sorting.\n const oldOrder = siblings.slice();\n // Shuffle the array in place.\n moveItemInArray(siblings, currentIndex, newIndex);\n siblings.forEach((sibling, index) => {\n // Don't do anything if the position hasn't changed.\n if (oldOrder[index] === sibling) {\n return;\n }\n const isDraggedItem = sibling.drag === item;\n const offset = isDraggedItem ? itemOffset : siblingOffset;\n const elementToOffset = isDraggedItem ? item.getPlaceholderElement() : sibling.drag.getRootElement();\n // Update the offset to reflect the new position.\n sibling.offset += offset;\n // Since we're moving the items with a `transform`, we need to adjust their cached\n // client rects to reflect their new position, as well as swap their positions in the cache.\n // Note that we shouldn't use `getBoundingClientRect` here to update the cache, because the\n // elements may be mid-animation which will give us a wrong result.\n if (isHorizontal) {\n // Round the transforms since some browsers will\n // blur the elements, for sub-pixel transforms.\n elementToOffset.style.transform = combineTransforms(`translate3d(${Math.round(sibling.offset)}px, 0, 0)`, sibling.initialTransform);\n adjustDomRect(sibling.clientRect, 0, offset);\n } else {\n elementToOffset.style.transform = combineTransforms(`translate3d(0, ${Math.round(sibling.offset)}px, 0)`, sibling.initialTransform);\n adjustDomRect(sibling.clientRect, offset, 0);\n }\n });\n // Note that it's important that we do this after the client rects have been adjusted.\n this._previousSwap.overlaps = isInsideClientRect(newPosition, pointerX, pointerY);\n this._previousSwap.drag = siblingAtNewPosition.drag;\n this._previousSwap.delta = isHorizontal ? pointerDelta.x : pointerDelta.y;\n return {\n previousIndex: currentIndex,\n currentIndex: newIndex\n };\n }\n /**\n * Called when an item is being moved into the container.\n * @param item Item that was moved into the container.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param index Index at which the item entered. If omitted, the container will try to figure it\n * out automatically.\n */\n enter(item, pointerX, pointerY, index) {\n const newIndex = index == null || index < 0 ?\n // We use the coordinates of where the item entered the drop\n // zone to figure out at which index it should be inserted.\n this._getItemIndexFromPointerPosition(item, pointerX, pointerY) : index;\n const activeDraggables = this._activeDraggables;\n const currentIndex = activeDraggables.indexOf(item);\n const placeholder = item.getPlaceholderElement();\n let newPositionReference = activeDraggables[newIndex];\n // If the item at the new position is the same as the item that is being dragged,\n // it means that we're trying to restore the item to its initial position. In this\n // case we should use the next item from the list as the reference.\n if (newPositionReference === item) {\n newPositionReference = activeDraggables[newIndex + 1];\n }\n // If we didn't find a new position reference, it means that either the item didn't start off\n // in this container, or that the item requested to be inserted at the end of the list.\n if (!newPositionReference && (newIndex == null || newIndex === -1 || newIndex < activeDraggables.length - 1) && this._shouldEnterAsFirstChild(pointerX, pointerY)) {\n newPositionReference = activeDraggables[0];\n }\n // Since the item may be in the `activeDraggables` already (e.g. if the user dragged it\n // into another container and back again), we have to ensure that it isn't duplicated.\n if (currentIndex > -1) {\n activeDraggables.splice(currentIndex, 1);\n }\n // Don't use items that are being dragged as a reference, because\n // their element has been moved down to the bottom of the body.\n if (newPositionReference && !this._dragDropRegistry.isDragging(newPositionReference)) {\n const element = newPositionReference.getRootElement();\n element.parentElement.insertBefore(placeholder, element);\n activeDraggables.splice(newIndex, 0, item);\n } else {\n coerceElement(this._element).appendChild(placeholder);\n activeDraggables.push(item);\n }\n // The transform needs to be cleared so it doesn't throw off the measurements.\n placeholder.style.transform = '';\n // Note that usually `start` is called together with `enter` when an item goes into a new\n // container. This will cache item positions, but we need to refresh them since the amount\n // of items has changed.\n this._cacheItemPositions();\n }\n /** Sets the items that are currently part of the list. */\n withItems(items) {\n this._activeDraggables = items.slice();\n this._cacheItemPositions();\n }\n /** Assigns a sort predicate to the strategy. */\n withSortPredicate(predicate) {\n this._sortPredicate = predicate;\n }\n /** Resets the strategy to its initial state before dragging was started. */\n reset() {\n // TODO(crisbeto): may have to wait for the animations to finish.\n this._activeDraggables.forEach(item => {\n const rootElement = item.getRootElement();\n if (rootElement) {\n const initialTransform = this._itemPositions.find(p => p.drag === item)?.initialTransform;\n rootElement.style.transform = initialTransform || '';\n }\n });\n this._itemPositions = [];\n this._activeDraggables = [];\n this._previousSwap.drag = null;\n this._previousSwap.delta = 0;\n this._previousSwap.overlaps = false;\n }\n /**\n * Gets a snapshot of items currently in the list.\n * Can include items that we dragged in from another list.\n */\n getActiveItemsSnapshot() {\n return this._activeDraggables;\n }\n /** Gets the index of a specific item. */\n getItemIndex(item) {\n // Items are sorted always by top/left in the cache, however they flow differently in RTL.\n // The rest of the logic still stands no matter what orientation we're in, however\n // we need to invert the array when determining the index.\n const items = this.orientation === 'horizontal' && this.direction === 'rtl' ? this._itemPositions.slice().reverse() : this._itemPositions;\n return items.findIndex(currentItem => currentItem.drag === item);\n }\n /** Used to notify the strategy that the scroll position has changed. */\n updateOnScroll(topDifference, leftDifference) {\n // Since we know the amount that the user has scrolled we can shift all of the\n // client rectangles ourselves. This is cheaper than re-measuring everything and\n // we can avoid inconsistent behavior where we might be measuring the element before\n // its position has changed.\n this._itemPositions.forEach(({\n clientRect\n }) => {\n adjustDomRect(clientRect, topDifference, leftDifference);\n });\n // We need two loops for this, because we want all of the cached\n // positions to be up-to-date before we re-sort the item.\n this._itemPositions.forEach(({\n drag\n }) => {\n if (this._dragDropRegistry.isDragging(drag)) {\n // We need to re-sort the item manually, because the pointer move\n // events won't be dispatched while the user is scrolling.\n drag._sortFromLastPointerPosition();\n }\n });\n }\n /** Refreshes the position cache of the items and sibling containers. */\n _cacheItemPositions() {\n const isHorizontal = this.orientation === 'horizontal';\n this._itemPositions = this._activeDraggables.map(drag => {\n const elementToMeasure = drag.getVisibleElement();\n return {\n drag,\n offset: 0,\n initialTransform: elementToMeasure.style.transform || '',\n clientRect: getMutableClientRect(elementToMeasure)\n };\n }).sort((a, b) => {\n return isHorizontal ? a.clientRect.left - b.clientRect.left : a.clientRect.top - b.clientRect.top;\n });\n }\n /**\n * Gets the offset in pixels by which the item that is being dragged should be moved.\n * @param currentPosition Current position of the item.\n * @param newPosition Position of the item where the current item should be moved.\n * @param delta Direction in which the user is moving.\n */\n _getItemOffsetPx(currentPosition, newPosition, delta) {\n const isHorizontal = this.orientation === 'horizontal';\n let itemOffset = isHorizontal ? newPosition.left - currentPosition.left : newPosition.top - currentPosition.top;\n // Account for differences in the item width/height.\n if (delta === -1) {\n itemOffset += isHorizontal ? newPosition.width - currentPosition.width : newPosition.height - currentPosition.height;\n }\n return itemOffset;\n }\n /**\n * Gets the offset in pixels by which the items that aren't being dragged should be moved.\n * @param currentIndex Index of the item currently being dragged.\n * @param siblings All of the items in the list.\n * @param delta Direction in which the user is moving.\n */\n _getSiblingOffsetPx(currentIndex, siblings, delta) {\n const isHorizontal = this.orientation === 'horizontal';\n const currentPosition = siblings[currentIndex].clientRect;\n const immediateSibling = siblings[currentIndex + delta * -1];\n let siblingOffset = currentPosition[isHorizontal ? 'width' : 'height'] * delta;\n if (immediateSibling) {\n const start = isHorizontal ? 'left' : 'top';\n const end = isHorizontal ? 'right' : 'bottom';\n // Get the spacing between the start of the current item and the end of the one immediately\n // after it in the direction in which the user is dragging, or vice versa. We add it to the\n // offset in order to push the element to where it will be when it's inline and is influenced\n // by the `margin` of its siblings.\n if (delta === -1) {\n siblingOffset -= immediateSibling.clientRect[start] - currentPosition[end];\n } else {\n siblingOffset += currentPosition[start] - immediateSibling.clientRect[end];\n }\n }\n return siblingOffset;\n }\n /**\n * Checks if pointer is entering in the first position\n * @param pointerX Position of the user's pointer along the X axis.\n * @param pointerY Position of the user's pointer along the Y axis.\n */\n _shouldEnterAsFirstChild(pointerX, pointerY) {\n if (!this._activeDraggables.length) {\n return false;\n }\n const itemPositions = this._itemPositions;\n const isHorizontal = this.orientation === 'horizontal';\n // `itemPositions` are sorted by position while `activeDraggables` are sorted by child index\n // check if container is using some sort of \"reverse\" ordering (eg: flex-direction: row-reverse)\n const reversed = itemPositions[0].drag !== this._activeDraggables[0];\n if (reversed) {\n const lastItemRect = itemPositions[itemPositions.length - 1].clientRect;\n return isHorizontal ? pointerX >= lastItemRect.right : pointerY >= lastItemRect.bottom;\n } else {\n const firstItemRect = itemPositions[0].clientRect;\n return isHorizontal ? pointerX <= firstItemRect.left : pointerY <= firstItemRect.top;\n }\n }\n /**\n * Gets the index of an item in the drop container, based on the position of the user's pointer.\n * @param item Item that is being sorted.\n * @param pointerX Position of the user's pointer along the X axis.\n * @param pointerY Position of the user's pointer along the Y axis.\n * @param delta Direction in which the user is moving their pointer.\n */\n _getItemIndexFromPointerPosition(item, pointerX, pointerY, delta) {\n const isHorizontal = this.orientation === 'horizontal';\n const index = this._itemPositions.findIndex(({\n drag,\n clientRect\n }) => {\n // Skip the item itself.\n if (drag === item) {\n return false;\n }\n if (delta) {\n const direction = isHorizontal ? delta.x : delta.y;\n // If the user is still hovering over the same item as last time, their cursor hasn't left\n // the item after we made the swap, and they didn't change the direction in which they're\n // dragging, we don't consider it a direction swap.\n if (drag === this._previousSwap.drag && this._previousSwap.overlaps && direction === this._previousSwap.delta) {\n return false;\n }\n }\n return isHorizontal ?\n // Round these down since most browsers report client rects with\n // sub-pixel precision, whereas the pointer coordinates are rounded to pixels.\n pointerX >= Math.floor(clientRect.left) && pointerX < Math.floor(clientRect.right) : pointerY >= Math.floor(clientRect.top) && pointerY < Math.floor(clientRect.bottom);\n });\n return index === -1 || !this._sortPredicate(index, item) ? -1 : index;\n }\n}\n\n/**\n * Proximity, as a ratio to width/height, at which a\n * dragged item will affect the drop container.\n */\nconst DROP_PROXIMITY_THRESHOLD = 0.05;\n/**\n * Proximity, as a ratio to width/height at which to start auto-scrolling the drop list or the\n * viewport. The value comes from trying it out manually until it feels right.\n */\nconst SCROLL_PROXIMITY_THRESHOLD = 0.05;\n/** Vertical direction in which we can auto-scroll. */\nvar AutoScrollVerticalDirection = /*#__PURE__*/function (AutoScrollVerticalDirection) {\n AutoScrollVerticalDirection[AutoScrollVerticalDirection[\"NONE\"] = 0] = \"NONE\";\n AutoScrollVerticalDirection[AutoScrollVerticalDirection[\"UP\"] = 1] = \"UP\";\n AutoScrollVerticalDirection[AutoScrollVerticalDirection[\"DOWN\"] = 2] = \"DOWN\";\n return AutoScrollVerticalDirection;\n}(AutoScrollVerticalDirection || {});\n/** Horizontal direction in which we can auto-scroll. */\nvar AutoScrollHorizontalDirection = /*#__PURE__*/function (AutoScrollHorizontalDirection) {\n AutoScrollHorizontalDirection[AutoScrollHorizontalDirection[\"NONE\"] = 0] = \"NONE\";\n AutoScrollHorizontalDirection[AutoScrollHorizontalDirection[\"LEFT\"] = 1] = \"LEFT\";\n AutoScrollHorizontalDirection[AutoScrollHorizontalDirection[\"RIGHT\"] = 2] = \"RIGHT\";\n return AutoScrollHorizontalDirection;\n}(AutoScrollHorizontalDirection || {});\n/**\n * Reference to a drop list. Used to manipulate or dispose of the container.\n */\nclass DropListRef {\n constructor(element, _dragDropRegistry, _document, _ngZone, _viewportRuler) {\n this._dragDropRegistry = _dragDropRegistry;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n /** Whether starting a dragging sequence from this container is disabled. */\n this.disabled = false;\n /** Whether sorting items within the list is disabled. */\n this.sortingDisabled = false;\n /**\n * Whether auto-scrolling the view when the user\n * moves their pointer close to the edges is disabled.\n */\n this.autoScrollDisabled = false;\n /** Number of pixels to scroll for each frame when auto-scrolling an element. */\n this.autoScrollStep = 2;\n /**\n * Function that is used to determine whether an item\n * is allowed to be moved into a drop container.\n */\n this.enterPredicate = () => true;\n /** Function that is used to determine whether an item can be sorted into a particular index. */\n this.sortPredicate = () => true;\n /** Emits right before dragging has started. */\n this.beforeStarted = new Subject();\n /**\n * Emits when the user has moved a new drag item into this container.\n */\n this.entered = new Subject();\n /**\n * Emits when the user removes an item from the container\n * by dragging it into another container.\n */\n this.exited = new Subject();\n /** Emits when the user drops an item inside the container. */\n this.dropped = new Subject();\n /** Emits as the user is swapping items while actively dragging. */\n this.sorted = new Subject();\n /** Emits when a dragging sequence is started in a list connected to the current one. */\n this.receivingStarted = new Subject();\n /** Emits when a dragging sequence is stopped from a list connected to the current one. */\n this.receivingStopped = new Subject();\n /** Whether an item in the list is being dragged. */\n this._isDragging = false;\n /** Draggable items in the container. */\n this._draggables = [];\n /** Drop lists that are connected to the current one. */\n this._siblings = [];\n /** Connected siblings that currently have a dragged item. */\n this._activeSiblings = new Set();\n /** Subscription to the window being scrolled. */\n this._viewportScrollSubscription = Subscription.EMPTY;\n /** Vertical direction in which the list is currently scrolling. */\n this._verticalScrollDirection = AutoScrollVerticalDirection.NONE;\n /** Horizontal direction in which the list is currently scrolling. */\n this._horizontalScrollDirection = AutoScrollHorizontalDirection.NONE;\n /** Used to signal to the current auto-scroll sequence when to stop. */\n this._stopScrollTimers = new Subject();\n /** Shadow root of the current element. Necessary for `elementFromPoint` to resolve correctly. */\n this._cachedShadowRoot = null;\n /** Starts the interval that'll auto-scroll the element. */\n this._startScrollInterval = () => {\n this._stopScrolling();\n interval(0, animationFrameScheduler).pipe(takeUntil(this._stopScrollTimers)).subscribe(() => {\n const node = this._scrollNode;\n const scrollStep = this.autoScrollStep;\n if (this._verticalScrollDirection === AutoScrollVerticalDirection.UP) {\n node.scrollBy(0, -scrollStep);\n } else if (this._verticalScrollDirection === AutoScrollVerticalDirection.DOWN) {\n node.scrollBy(0, scrollStep);\n }\n if (this._horizontalScrollDirection === AutoScrollHorizontalDirection.LEFT) {\n node.scrollBy(-scrollStep, 0);\n } else if (this._horizontalScrollDirection === AutoScrollHorizontalDirection.RIGHT) {\n node.scrollBy(scrollStep, 0);\n }\n });\n };\n this.element = coerceElement(element);\n this._document = _document;\n this.withScrollableParents([this.element]);\n _dragDropRegistry.registerDropContainer(this);\n this._parentPositions = new ParentPositionTracker(_document);\n this._sortStrategy = new SingleAxisSortStrategy(this.element, _dragDropRegistry);\n this._sortStrategy.withSortPredicate((index, item) => this.sortPredicate(index, item, this));\n }\n /** Removes the drop list functionality from the DOM element. */\n dispose() {\n this._stopScrolling();\n this._stopScrollTimers.complete();\n this._viewportScrollSubscription.unsubscribe();\n this.beforeStarted.complete();\n this.entered.complete();\n this.exited.complete();\n this.dropped.complete();\n this.sorted.complete();\n this.receivingStarted.complete();\n this.receivingStopped.complete();\n this._activeSiblings.clear();\n this._scrollNode = null;\n this._parentPositions.clear();\n this._dragDropRegistry.removeDropContainer(this);\n }\n /** Whether an item from this list is currently being dragged. */\n isDragging() {\n return this._isDragging;\n }\n /** Starts dragging an item. */\n start() {\n this._draggingStarted();\n this._notifyReceivingSiblings();\n }\n /**\n * Attempts to move an item into the container.\n * @param item Item that was moved into the container.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param index Index at which the item entered. If omitted, the container will try to figure it\n * out automatically.\n */\n enter(item, pointerX, pointerY, index) {\n this._draggingStarted();\n // If sorting is disabled, we want the item to return to its starting\n // position if the user is returning it to its initial container.\n if (index == null && this.sortingDisabled) {\n index = this._draggables.indexOf(item);\n }\n this._sortStrategy.enter(item, pointerX, pointerY, index);\n // Note that this usually happens inside `_draggingStarted` as well, but the dimensions\n // can change when the sort strategy moves the item around inside `enter`.\n this._cacheParentPositions();\n // Notify siblings at the end so that the item has been inserted into the `activeDraggables`.\n this._notifyReceivingSiblings();\n this.entered.next({\n item,\n container: this,\n currentIndex: this.getItemIndex(item)\n });\n }\n /**\n * Removes an item from the container after it was dragged into another container by the user.\n * @param item Item that was dragged out.\n */\n exit(item) {\n this._reset();\n this.exited.next({\n item,\n container: this\n });\n }\n /**\n * Drops an item into this container.\n * @param item Item being dropped into the container.\n * @param currentIndex Index at which the item should be inserted.\n * @param previousIndex Index of the item when dragging started.\n * @param previousContainer Container from which the item got dragged in.\n * @param isPointerOverContainer Whether the user's pointer was over the\n * container when the item was dropped.\n * @param distance Distance the user has dragged since the start of the dragging sequence.\n * @param event Event that triggered the dropping sequence.\n *\n * @breaking-change 15.0.0 `previousIndex` and `event` parameters to become required.\n */\n drop(item, currentIndex, previousIndex, previousContainer, isPointerOverContainer, distance, dropPoint, event = {}) {\n this._reset();\n this.dropped.next({\n item,\n currentIndex,\n previousIndex,\n container: this,\n previousContainer,\n isPointerOverContainer,\n distance,\n dropPoint,\n event\n });\n }\n /**\n * Sets the draggable items that are a part of this list.\n * @param items Items that are a part of this list.\n */\n withItems(items) {\n const previousItems = this._draggables;\n this._draggables = items;\n items.forEach(item => item._withDropContainer(this));\n if (this.isDragging()) {\n const draggedItems = previousItems.filter(item => item.isDragging());\n // If all of the items being dragged were removed\n // from the list, abort the current drag sequence.\n if (draggedItems.every(item => items.indexOf(item) === -1)) {\n this._reset();\n } else {\n this._sortStrategy.withItems(this._draggables);\n }\n }\n return this;\n }\n /** Sets the layout direction of the drop list. */\n withDirection(direction) {\n this._sortStrategy.direction = direction;\n return this;\n }\n /**\n * Sets the containers that are connected to this one. When two or more containers are\n * connected, the user will be allowed to transfer items between them.\n * @param connectedTo Other containers that the current containers should be connected to.\n */\n connectedTo(connectedTo) {\n this._siblings = connectedTo.slice();\n return this;\n }\n /**\n * Sets the orientation of the container.\n * @param orientation New orientation for the container.\n */\n withOrientation(orientation) {\n // TODO(crisbeto): eventually we should be constructing the new sort strategy here based on\n // the new orientation. For now we can assume that it'll always be `SingleAxisSortStrategy`.\n this._sortStrategy.orientation = orientation;\n return this;\n }\n /**\n * Sets which parent elements are can be scrolled while the user is dragging.\n * @param elements Elements that can be scrolled.\n */\n withScrollableParents(elements) {\n const element = coerceElement(this.element);\n // We always allow the current element to be scrollable\n // so we need to ensure that it's in the array.\n this._scrollableElements = elements.indexOf(element) === -1 ? [element, ...elements] : elements.slice();\n return this;\n }\n /** Gets the scrollable parents that are registered with this drop container. */\n getScrollableParents() {\n return this._scrollableElements;\n }\n /**\n * Figures out the index of an item in the container.\n * @param item Item whose index should be determined.\n */\n getItemIndex(item) {\n return this._isDragging ? this._sortStrategy.getItemIndex(item) : this._draggables.indexOf(item);\n }\n /**\n * Whether the list is able to receive the item that\n * is currently being dragged inside a connected drop list.\n */\n isReceiving() {\n return this._activeSiblings.size > 0;\n }\n /**\n * Sorts an item inside the container based on its position.\n * @param item Item to be sorted.\n * @param pointerX Position of the item along the X axis.\n * @param pointerY Position of the item along the Y axis.\n * @param pointerDelta Direction in which the pointer is moving along each axis.\n */\n _sortItem(item, pointerX, pointerY, pointerDelta) {\n // Don't sort the item if sorting is disabled or it's out of range.\n if (this.sortingDisabled || !this._domRect || !isPointerNearDomRect(this._domRect, DROP_PROXIMITY_THRESHOLD, pointerX, pointerY)) {\n return;\n }\n const result = this._sortStrategy.sort(item, pointerX, pointerY, pointerDelta);\n if (result) {\n this.sorted.next({\n previousIndex: result.previousIndex,\n currentIndex: result.currentIndex,\n container: this,\n item\n });\n }\n }\n /**\n * Checks whether the user's pointer is close to the edges of either the\n * viewport or the drop list and starts the auto-scroll sequence.\n * @param pointerX User's pointer position along the x axis.\n * @param pointerY User's pointer position along the y axis.\n */\n _startScrollingIfNecessary(pointerX, pointerY) {\n if (this.autoScrollDisabled) {\n return;\n }\n let scrollNode;\n let verticalScrollDirection = AutoScrollVerticalDirection.NONE;\n let horizontalScrollDirection = AutoScrollHorizontalDirection.NONE;\n // Check whether we should start scrolling any of the parent containers.\n this._parentPositions.positions.forEach((position, element) => {\n // We have special handling for the `document` below. Also this would be\n // nicer with a for...of loop, but it requires changing a compiler flag.\n if (element === this._document || !position.clientRect || scrollNode) {\n return;\n }\n if (isPointerNearDomRect(position.clientRect, DROP_PROXIMITY_THRESHOLD, pointerX, pointerY)) {\n [verticalScrollDirection, horizontalScrollDirection] = getElementScrollDirections(element, position.clientRect, this._sortStrategy.direction, pointerX, pointerY);\n if (verticalScrollDirection || horizontalScrollDirection) {\n scrollNode = element;\n }\n }\n });\n // Otherwise check if we can start scrolling the viewport.\n if (!verticalScrollDirection && !horizontalScrollDirection) {\n const {\n width,\n height\n } = this._viewportRuler.getViewportSize();\n const domRect = {\n width,\n height,\n top: 0,\n right: width,\n bottom: height,\n left: 0\n };\n verticalScrollDirection = getVerticalScrollDirection(domRect, pointerY);\n horizontalScrollDirection = getHorizontalScrollDirection(domRect, pointerX);\n scrollNode = window;\n }\n if (scrollNode && (verticalScrollDirection !== this._verticalScrollDirection || horizontalScrollDirection !== this._horizontalScrollDirection || scrollNode !== this._scrollNode)) {\n this._verticalScrollDirection = verticalScrollDirection;\n this._horizontalScrollDirection = horizontalScrollDirection;\n this._scrollNode = scrollNode;\n if ((verticalScrollDirection || horizontalScrollDirection) && scrollNode) {\n this._ngZone.runOutsideAngular(this._startScrollInterval);\n } else {\n this._stopScrolling();\n }\n }\n }\n /** Stops any currently-running auto-scroll sequences. */\n _stopScrolling() {\n this._stopScrollTimers.next();\n }\n /** Starts the dragging sequence within the list. */\n _draggingStarted() {\n const styles = coerceElement(this.element).style;\n this.beforeStarted.next();\n this._isDragging = true;\n // We need to disable scroll snapping while the user is dragging, because it breaks automatic\n // scrolling. The browser seems to round the value based on the snapping points which means\n // that we can't increment/decrement the scroll position.\n this._initialScrollSnap = styles.msScrollSnapType || styles.scrollSnapType || '';\n styles.scrollSnapType = styles.msScrollSnapType = 'none';\n this._sortStrategy.start(this._draggables);\n this._cacheParentPositions();\n this._viewportScrollSubscription.unsubscribe();\n this._listenToScrollEvents();\n }\n /** Caches the positions of the configured scrollable parents. */\n _cacheParentPositions() {\n const element = coerceElement(this.element);\n this._parentPositions.cache(this._scrollableElements);\n // The list element is always in the `scrollableElements`\n // so we can take advantage of the cached `DOMRect`.\n this._domRect = this._parentPositions.positions.get(element).clientRect;\n }\n /** Resets the container to its initial state. */\n _reset() {\n this._isDragging = false;\n const styles = coerceElement(this.element).style;\n styles.scrollSnapType = styles.msScrollSnapType = this._initialScrollSnap;\n this._siblings.forEach(sibling => sibling._stopReceiving(this));\n this._sortStrategy.reset();\n this._stopScrolling();\n this._viewportScrollSubscription.unsubscribe();\n this._parentPositions.clear();\n }\n /**\n * Checks whether the user's pointer is positioned over the container.\n * @param x Pointer position along the X axis.\n * @param y Pointer position along the Y axis.\n */\n _isOverContainer(x, y) {\n return this._domRect != null && isInsideClientRect(this._domRect, x, y);\n }\n /**\n * Figures out whether an item should be moved into a sibling\n * drop container, based on its current position.\n * @param item Drag item that is being moved.\n * @param x Position of the item along the X axis.\n * @param y Position of the item along the Y axis.\n */\n _getSiblingContainerFromPosition(item, x, y) {\n return this._siblings.find(sibling => sibling._canReceive(item, x, y));\n }\n /**\n * Checks whether the drop list can receive the passed-in item.\n * @param item Item that is being dragged into the list.\n * @param x Position of the item along the X axis.\n * @param y Position of the item along the Y axis.\n */\n _canReceive(item, x, y) {\n if (!this._domRect || !isInsideClientRect(this._domRect, x, y) || !this.enterPredicate(item, this)) {\n return false;\n }\n const elementFromPoint = this._getShadowRoot().elementFromPoint(x, y);\n // If there's no element at the pointer position, then\n // the client rect is probably scrolled out of the view.\n if (!elementFromPoint) {\n return false;\n }\n const nativeElement = coerceElement(this.element);\n // The `DOMRect`, that we're using to find the container over which the user is\n // hovering, doesn't give us any information on whether the element has been scrolled\n // out of the view or whether it's overlapping with other containers. This means that\n // we could end up transferring the item into a container that's invisible or is positioned\n // below another one. We use the result from `elementFromPoint` to get the top-most element\n // at the pointer position and to find whether it's one of the intersecting drop containers.\n return elementFromPoint === nativeElement || nativeElement.contains(elementFromPoint);\n }\n /**\n * Called by one of the connected drop lists when a dragging sequence has started.\n * @param sibling Sibling in which dragging has started.\n */\n _startReceiving(sibling, items) {\n const activeSiblings = this._activeSiblings;\n if (!activeSiblings.has(sibling) && items.every(item => {\n // Note that we have to add an exception to the `enterPredicate` for items that started off\n // in this drop list. The drag ref has logic that allows an item to return to its initial\n // container, if it has left the initial container and none of the connected containers\n // allow it to enter. See `DragRef._updateActiveDropContainer` for more context.\n return this.enterPredicate(item, this) || this._draggables.indexOf(item) > -1;\n })) {\n activeSiblings.add(sibling);\n this._cacheParentPositions();\n this._listenToScrollEvents();\n this.receivingStarted.next({\n initiator: sibling,\n receiver: this,\n items\n });\n }\n }\n /**\n * Called by a connected drop list when dragging has stopped.\n * @param sibling Sibling whose dragging has stopped.\n */\n _stopReceiving(sibling) {\n this._activeSiblings.delete(sibling);\n this._viewportScrollSubscription.unsubscribe();\n this.receivingStopped.next({\n initiator: sibling,\n receiver: this\n });\n }\n /**\n * Starts listening to scroll events on the viewport.\n * Used for updating the internal state of the list.\n */\n _listenToScrollEvents() {\n this._viewportScrollSubscription = this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(event => {\n if (this.isDragging()) {\n const scrollDifference = this._parentPositions.handleScroll(event);\n if (scrollDifference) {\n this._sortStrategy.updateOnScroll(scrollDifference.top, scrollDifference.left);\n }\n } else if (this.isReceiving()) {\n this._cacheParentPositions();\n }\n });\n }\n /**\n * Lazily resolves and returns the shadow root of the element. We do this in a function, rather\n * than saving it in property directly on init, because we want to resolve it as late as possible\n * in order to ensure that the element has been moved into the shadow DOM. Doing it inside the\n * constructor might be too early if the element is inside of something like `ngFor` or `ngIf`.\n */\n _getShadowRoot() {\n if (!this._cachedShadowRoot) {\n const shadowRoot = _getShadowRoot(coerceElement(this.element));\n this._cachedShadowRoot = shadowRoot || this._document;\n }\n return this._cachedShadowRoot;\n }\n /** Notifies any siblings that may potentially receive the item. */\n _notifyReceivingSiblings() {\n const draggedItems = this._sortStrategy.getActiveItemsSnapshot().filter(item => item.isDragging());\n this._siblings.forEach(sibling => sibling._startReceiving(this, draggedItems));\n }\n}\n/**\n * Gets whether the vertical auto-scroll direction of a node.\n * @param clientRect Dimensions of the node.\n * @param pointerY Position of the user's pointer along the y axis.\n */\nfunction getVerticalScrollDirection(clientRect, pointerY) {\n const {\n top,\n bottom,\n height\n } = clientRect;\n const yThreshold = height * SCROLL_PROXIMITY_THRESHOLD;\n if (pointerY >= top - yThreshold && pointerY <= top + yThreshold) {\n return AutoScrollVerticalDirection.UP;\n } else if (pointerY >= bottom - yThreshold && pointerY <= bottom + yThreshold) {\n return AutoScrollVerticalDirection.DOWN;\n }\n return AutoScrollVerticalDirection.NONE;\n}\n/**\n * Gets whether the horizontal auto-scroll direction of a node.\n * @param clientRect Dimensions of the node.\n * @param pointerX Position of the user's pointer along the x axis.\n */\nfunction getHorizontalScrollDirection(clientRect, pointerX) {\n const {\n left,\n right,\n width\n } = clientRect;\n const xThreshold = width * SCROLL_PROXIMITY_THRESHOLD;\n if (pointerX >= left - xThreshold && pointerX <= left + xThreshold) {\n return AutoScrollHorizontalDirection.LEFT;\n } else if (pointerX >= right - xThreshold && pointerX <= right + xThreshold) {\n return AutoScrollHorizontalDirection.RIGHT;\n }\n return AutoScrollHorizontalDirection.NONE;\n}\n/**\n * Gets the directions in which an element node should be scrolled,\n * assuming that the user's pointer is already within it scrollable region.\n * @param element Element for which we should calculate the scroll direction.\n * @param clientRect Bounding client rectangle of the element.\n * @param direction Layout direction of the drop list.\n * @param pointerX Position of the user's pointer along the x axis.\n * @param pointerY Position of the user's pointer along the y axis.\n */\nfunction getElementScrollDirections(element, clientRect, direction, pointerX, pointerY) {\n const computedVertical = getVerticalScrollDirection(clientRect, pointerY);\n const computedHorizontal = getHorizontalScrollDirection(clientRect, pointerX);\n let verticalScrollDirection = AutoScrollVerticalDirection.NONE;\n let horizontalScrollDirection = AutoScrollHorizontalDirection.NONE;\n // Note that we here we do some extra checks for whether the element is actually scrollable in\n // a certain direction and we only assign the scroll direction if it is. We do this so that we\n // can allow other elements to be scrolled, if the current element can't be scrolled anymore.\n // This allows us to handle cases where the scroll regions of two scrollable elements overlap.\n if (computedVertical) {\n const scrollTop = element.scrollTop;\n if (computedVertical === AutoScrollVerticalDirection.UP) {\n if (scrollTop > 0) {\n verticalScrollDirection = AutoScrollVerticalDirection.UP;\n }\n } else if (element.scrollHeight - scrollTop > element.clientHeight) {\n verticalScrollDirection = AutoScrollVerticalDirection.DOWN;\n }\n }\n if (computedHorizontal) {\n const scrollLeft = element.scrollLeft;\n if (direction === 'rtl') {\n if (computedHorizontal === AutoScrollHorizontalDirection.RIGHT) {\n // In RTL `scrollLeft` will be negative when scrolled.\n if (scrollLeft < 0) {\n horizontalScrollDirection = AutoScrollHorizontalDirection.RIGHT;\n }\n } else if (element.scrollWidth + scrollLeft > element.clientWidth) {\n horizontalScrollDirection = AutoScrollHorizontalDirection.LEFT;\n }\n } else {\n if (computedHorizontal === AutoScrollHorizontalDirection.LEFT) {\n if (scrollLeft > 0) {\n horizontalScrollDirection = AutoScrollHorizontalDirection.LEFT;\n }\n } else if (element.scrollWidth - scrollLeft > element.clientWidth) {\n horizontalScrollDirection = AutoScrollHorizontalDirection.RIGHT;\n }\n }\n }\n return [verticalScrollDirection, horizontalScrollDirection];\n}\n\n/** Event options that can be used to bind an active, capturing event. */\nconst activeCapturingEventOptions = /*#__PURE__*/normalizePassiveListenerOptions({\n passive: false,\n capture: true\n});\n/**\n * Service that keeps track of all the drag item and drop container\n * instances, and manages global event listeners on the `document`.\n * @docs-private\n */\n// Note: this class is generic, rather than referencing CdkDrag and CdkDropList directly, in order\n// to avoid circular imports. If we were to reference them here, importing the registry into the\n// classes that are registering themselves will introduce a circular import.\nlet DragDropRegistry = /*#__PURE__*/(() => {\n class DragDropRegistry {\n constructor(_ngZone, _document) {\n this._ngZone = _ngZone;\n /** Registered drop container instances. */\n this._dropInstances = new Set();\n /** Registered drag item instances. */\n this._dragInstances = new Set();\n /** Drag item instances that are currently being dragged. */\n this._activeDragInstances = [];\n /** Keeps track of the event listeners that we've bound to the `document`. */\n this._globalListeners = new Map();\n /**\n * Predicate function to check if an item is being dragged. Moved out into a property,\n * because it'll be called a lot and we don't want to create a new function every time.\n */\n this._draggingPredicate = item => item.isDragging();\n /**\n * Emits the `touchmove` or `mousemove` events that are dispatched\n * while the user is dragging a drag item instance.\n */\n this.pointerMove = new Subject();\n /**\n * Emits the `touchend` or `mouseup` events that are dispatched\n * while the user is dragging a drag item instance.\n */\n this.pointerUp = new Subject();\n /**\n * Emits when the viewport has been scrolled while the user is dragging an item.\n * @deprecated To be turned into a private member. Use the `scrolled` method instead.\n * @breaking-change 13.0.0\n */\n this.scroll = new Subject();\n /**\n * Event listener that will prevent the default browser action while the user is dragging.\n * @param event Event whose default action should be prevented.\n */\n this._preventDefaultWhileDragging = event => {\n if (this._activeDragInstances.length > 0) {\n event.preventDefault();\n }\n };\n /** Event listener for `touchmove` that is bound even if no dragging is happening. */\n this._persistentTouchmoveListener = event => {\n if (this._activeDragInstances.length > 0) {\n // Note that we only want to prevent the default action after dragging has actually started.\n // Usually this is the same time at which the item is added to the `_activeDragInstances`,\n // but it could be pushed back if the user has set up a drag delay or threshold.\n if (this._activeDragInstances.some(this._draggingPredicate)) {\n event.preventDefault();\n }\n this.pointerMove.next(event);\n }\n };\n this._document = _document;\n }\n /** Adds a drop container to the registry. */\n registerDropContainer(drop) {\n if (!this._dropInstances.has(drop)) {\n this._dropInstances.add(drop);\n }\n }\n /** Adds a drag item instance to the registry. */\n registerDragItem(drag) {\n this._dragInstances.add(drag);\n // The `touchmove` event gets bound once, ahead of time, because WebKit\n // won't preventDefault on a dynamically-added `touchmove` listener.\n // See https://bugs.webkit.org/show_bug.cgi?id=184250.\n if (this._dragInstances.size === 1) {\n this._ngZone.runOutsideAngular(() => {\n // The event handler has to be explicitly active,\n // because newer browsers make it passive by default.\n this._document.addEventListener('touchmove', this._persistentTouchmoveListener, activeCapturingEventOptions);\n });\n }\n }\n /** Removes a drop container from the registry. */\n removeDropContainer(drop) {\n this._dropInstances.delete(drop);\n }\n /** Removes a drag item instance from the registry. */\n removeDragItem(drag) {\n this._dragInstances.delete(drag);\n this.stopDragging(drag);\n if (this._dragInstances.size === 0) {\n this._document.removeEventListener('touchmove', this._persistentTouchmoveListener, activeCapturingEventOptions);\n }\n }\n /**\n * Starts the dragging sequence for a drag instance.\n * @param drag Drag instance which is being dragged.\n * @param event Event that initiated the dragging.\n */\n startDragging(drag, event) {\n // Do not process the same drag twice to avoid memory leaks and redundant listeners\n if (this._activeDragInstances.indexOf(drag) > -1) {\n return;\n }\n this._activeDragInstances.push(drag);\n if (this._activeDragInstances.length === 1) {\n const isTouchEvent = event.type.startsWith('touch');\n // We explicitly bind __active__ listeners here, because newer browsers will default to\n // passive ones for `mousemove` and `touchmove`. The events need to be active, because we\n // use `preventDefault` to prevent the page from scrolling while the user is dragging.\n this._globalListeners.set(isTouchEvent ? 'touchend' : 'mouseup', {\n handler: e => this.pointerUp.next(e),\n options: true\n }).set('scroll', {\n handler: e => this.scroll.next(e),\n // Use capturing so that we pick up scroll changes in any scrollable nodes that aren't\n // the document. See https://github.com/angular/components/issues/17144.\n options: true\n })\n // Preventing the default action on `mousemove` isn't enough to disable text selection\n // on Safari so we need to prevent the selection event as well. Alternatively this can\n // be done by setting `user-select: none` on the `body`, however it has causes a style\n // recalculation which can be expensive on pages with a lot of elements.\n .set('selectstart', {\n handler: this._preventDefaultWhileDragging,\n options: activeCapturingEventOptions\n });\n // We don't have to bind a move event for touch drag sequences, because\n // we already have a persistent global one bound from `registerDragItem`.\n if (!isTouchEvent) {\n this._globalListeners.set('mousemove', {\n handler: e => this.pointerMove.next(e),\n options: activeCapturingEventOptions\n });\n }\n this._ngZone.runOutsideAngular(() => {\n this._globalListeners.forEach((config, name) => {\n this._document.addEventListener(name, config.handler, config.options);\n });\n });\n }\n }\n /** Stops dragging a drag item instance. */\n stopDragging(drag) {\n const index = this._activeDragInstances.indexOf(drag);\n if (index > -1) {\n this._activeDragInstances.splice(index, 1);\n if (this._activeDragInstances.length === 0) {\n this._clearGlobalListeners();\n }\n }\n }\n /** Gets whether a drag item instance is currently being dragged. */\n isDragging(drag) {\n return this._activeDragInstances.indexOf(drag) > -1;\n }\n /**\n * Gets a stream that will emit when any element on the page is scrolled while an item is being\n * dragged.\n * @param shadowRoot Optional shadow root that the current dragging sequence started from.\n * Top-level listeners won't pick up events coming from the shadow DOM so this parameter can\n * be used to include an additional top-level listener at the shadow root level.\n */\n scrolled(shadowRoot) {\n const streams = [this.scroll];\n if (shadowRoot && shadowRoot !== this._document) {\n // Note that this is basically the same as `fromEvent` from rxjs, but we do it ourselves,\n // because we want to guarantee that the event is bound outside of the `NgZone`. With\n // `fromEvent` it'll only happen if the subscription is outside the `NgZone`.\n streams.push(new Observable(observer => {\n return this._ngZone.runOutsideAngular(() => {\n const eventOptions = true;\n const callback = event => {\n if (this._activeDragInstances.length) {\n observer.next(event);\n }\n };\n shadowRoot.addEventListener('scroll', callback, eventOptions);\n return () => {\n shadowRoot.removeEventListener('scroll', callback, eventOptions);\n };\n });\n }));\n }\n return merge(...streams);\n }\n ngOnDestroy() {\n this._dragInstances.forEach(instance => this.removeDragItem(instance));\n this._dropInstances.forEach(instance => this.removeDropContainer(instance));\n this._clearGlobalListeners();\n this.pointerMove.complete();\n this.pointerUp.complete();\n }\n /** Clears out the global event listeners from the `document`. */\n _clearGlobalListeners() {\n this._globalListeners.forEach((config, name) => {\n this._document.removeEventListener(name, config.handler, config.options);\n });\n this._globalListeners.clear();\n }\n static {\n this.ɵfac = function DragDropRegistry_Factory(t) {\n return new (t || DragDropRegistry)(i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(DOCUMENT));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: DragDropRegistry,\n factory: DragDropRegistry.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return DragDropRegistry;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Default configuration to be used when creating a `DragRef`. */\nconst DEFAULT_CONFIG = {\n dragStartThreshold: 5,\n pointerDirectionChangeThreshold: 5\n};\n/**\n * Service that allows for drag-and-drop functionality to be attached to DOM elements.\n */\nlet DragDrop = /*#__PURE__*/(() => {\n class DragDrop {\n constructor(_document, _ngZone, _viewportRuler, _dragDropRegistry) {\n this._document = _document;\n this._ngZone = _ngZone;\n this._viewportRuler = _viewportRuler;\n this._dragDropRegistry = _dragDropRegistry;\n }\n /**\n * Turns an element into a draggable item.\n * @param element Element to which to attach the dragging functionality.\n * @param config Object used to configure the dragging behavior.\n */\n createDrag(element, config = DEFAULT_CONFIG) {\n return new DragRef(element, config, this._document, this._ngZone, this._viewportRuler, this._dragDropRegistry);\n }\n /**\n * Turns an element into a drop list.\n * @param element Element to which to attach the drop list functionality.\n */\n createDropList(element) {\n return new DropListRef(element, this._dragDropRegistry, this._document, this._ngZone, this._viewportRuler);\n }\n static {\n this.ɵfac = function DragDrop_Factory(t) {\n return new (t || DragDrop)(i0.ɵɵinject(DOCUMENT), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i1.ViewportRuler), i0.ɵɵinject(DragDropRegistry));\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: DragDrop,\n factory: DragDrop.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return DragDrop;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used for a `CdkDrag` to provide itself as a parent to the\n * drag-specific child directive (`CdkDragHandle`, `CdkDragPreview` etc.). Used primarily\n * to avoid circular imports.\n * @docs-private\n */\nconst CDK_DRAG_PARENT = /*#__PURE__*/new InjectionToken('CDK_DRAG_PARENT');\n\n/**\n * Asserts that a particular node is an element.\n * @param node Node to be checked.\n * @param name Name to attach to the error message.\n */\nfunction assertElementNode(node, name) {\n if (node.nodeType !== 1) {\n throw Error(`${name} must be attached to an element node. ` + `Currently attached to \"${node.nodeName}\".`);\n }\n}\n\n/**\n * Injection token that can be used to reference instances of `CdkDragHandle`. It serves as\n * alternative token to the actual `CdkDragHandle` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DRAG_HANDLE = /*#__PURE__*/new InjectionToken('CdkDragHandle');\n/** Handle that can be used to drag a CdkDrag instance. */\nlet CdkDragHandle = /*#__PURE__*/(() => {\n class CdkDragHandle {\n /** Whether starting to drag through this handle is disabled. */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = value;\n this._stateChanges.next(this);\n }\n constructor(element, _parentDrag) {\n this.element = element;\n this._parentDrag = _parentDrag;\n /** Emits when the state of the handle has changed. */\n this._stateChanges = new Subject();\n this._disabled = false;\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n assertElementNode(element.nativeElement, 'cdkDragHandle');\n }\n _parentDrag?._addHandle(this);\n }\n ngOnDestroy() {\n this._parentDrag?._removeHandle(this);\n this._stateChanges.complete();\n }\n static {\n this.ɵfac = function CdkDragHandle_Factory(t) {\n return new (t || CdkDragHandle)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(CDK_DRAG_PARENT, 12));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDragHandle,\n selectors: [[\"\", \"cdkDragHandle\", \"\"]],\n hostAttrs: [1, \"cdk-drag-handle\"],\n inputs: {\n disabled: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"cdkDragHandleDisabled\", \"disabled\", booleanAttribute]\n },\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CDK_DRAG_HANDLE,\n useExisting: CdkDragHandle\n }]), i0.ɵɵInputTransformsFeature]\n });\n }\n }\n return CdkDragHandle;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to configure the\n * behavior of the drag&drop-related components.\n */\nconst CDK_DRAG_CONFIG = /*#__PURE__*/new InjectionToken('CDK_DRAG_CONFIG');\nconst DRAG_HOST_CLASS = 'cdk-drag';\n/**\n * Injection token that can be used to reference instances of `CdkDropList`. It serves as\n * alternative token to the actual `CdkDropList` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DROP_LIST = /*#__PURE__*/new InjectionToken('CdkDropList');\n/** Element that can be moved inside a CdkDropList container. */\nlet CdkDrag = /*#__PURE__*/(() => {\n class CdkDrag {\n static {\n this._dragInstances = [];\n }\n /** Whether starting to drag this element is disabled. */\n get disabled() {\n return this._disabled || this.dropContainer && this.dropContainer.disabled;\n }\n set disabled(value) {\n this._disabled = value;\n this._dragRef.disabled = this._disabled;\n }\n constructor( /** Element that the draggable is attached to. */\n element, /** Droppable container that the draggable is a part of. */\n dropContainer,\n /**\n * @deprecated `_document` parameter no longer being used and will be removed.\n * @breaking-change 12.0.0\n */\n _document, _ngZone, _viewContainerRef, config, _dir, dragDrop, _changeDetectorRef, _selfHandle, _parentDrag) {\n this.element = element;\n this.dropContainer = dropContainer;\n this._ngZone = _ngZone;\n this._viewContainerRef = _viewContainerRef;\n this._dir = _dir;\n this._changeDetectorRef = _changeDetectorRef;\n this._selfHandle = _selfHandle;\n this._parentDrag = _parentDrag;\n this._destroyed = new Subject();\n this._handles = new BehaviorSubject([]);\n /** Emits when the user starts dragging the item. */\n this.started = new EventEmitter();\n /** Emits when the user has released a drag item, before any animations have started. */\n this.released = new EventEmitter();\n /** Emits when the user stops dragging an item in the container. */\n this.ended = new EventEmitter();\n /** Emits when the user has moved the item into a new container. */\n this.entered = new EventEmitter();\n /** Emits when the user removes the item its container by dragging it into another container. */\n this.exited = new EventEmitter();\n /** Emits when the user drops the item inside a container. */\n this.dropped = new EventEmitter();\n /**\n * Emits as the user is dragging the item. Use with caution,\n * because this event will fire for every pixel that the user has dragged.\n */\n this.moved = new Observable(observer => {\n const subscription = this._dragRef.moved.pipe(map(movedEvent => ({\n source: this,\n pointerPosition: movedEvent.pointerPosition,\n event: movedEvent.event,\n delta: movedEvent.delta,\n distance: movedEvent.distance\n }))).subscribe(observer);\n return () => {\n subscription.unsubscribe();\n };\n });\n this._dragRef = dragDrop.createDrag(element, {\n dragStartThreshold: config && config.dragStartThreshold != null ? config.dragStartThreshold : 5,\n pointerDirectionChangeThreshold: config && config.pointerDirectionChangeThreshold != null ? config.pointerDirectionChangeThreshold : 5,\n zIndex: config?.zIndex\n });\n this._dragRef.data = this;\n // We have to keep track of the drag instances in order to be able to match an element to\n // a drag instance. We can't go through the global registry of `DragRef`, because the root\n // element could be different.\n CdkDrag._dragInstances.push(this);\n if (config) {\n this._assignDefaults(config);\n }\n // Note that usually the container is assigned when the drop list is picks up the item, but in\n // some cases (mainly transplanted views with OnPush, see #18341) we may end up in a situation\n // where there are no items on the first change detection pass, but the items get picked up as\n // soon as the user triggers another pass by dragging. This is a problem, because the item would\n // have to switch from standalone mode to drag mode in the middle of the dragging sequence which\n // is too late since the two modes save different kinds of information. We work around it by\n // assigning the drop container both from here and the list.\n if (dropContainer) {\n this._dragRef._withDropContainer(dropContainer._dropListRef);\n dropContainer.addItem(this);\n }\n this._syncInputs(this._dragRef);\n this._handleEvents(this._dragRef);\n }\n /**\n * Returns the element that is being used as a placeholder\n * while the current element is being dragged.\n */\n getPlaceholderElement() {\n return this._dragRef.getPlaceholderElement();\n }\n /** Returns the root draggable element. */\n getRootElement() {\n return this._dragRef.getRootElement();\n }\n /** Resets a standalone drag item to its initial position. */\n reset() {\n this._dragRef.reset();\n }\n /**\n * Gets the pixel coordinates of the draggable outside of a drop container.\n */\n getFreeDragPosition() {\n return this._dragRef.getFreeDragPosition();\n }\n /**\n * Sets the current position in pixels the draggable outside of a drop container.\n * @param value New position to be set.\n */\n setFreeDragPosition(value) {\n this._dragRef.setFreeDragPosition(value);\n }\n ngAfterViewInit() {\n // Normally this isn't in the zone, but it can cause major performance regressions for apps\n // using `zone-patch-rxjs` because it'll trigger a change detection when it unsubscribes.\n this._ngZone.runOutsideAngular(() => {\n // We need to wait for the zone to stabilize, in order for the reference\n // element to be in the proper place in the DOM. This is mostly relevant\n // for draggable elements inside portals since they get stamped out in\n // their original DOM position and then they get transferred to the portal.\n this._ngZone.onStable.pipe(take(1), takeUntil(this._destroyed)).subscribe(() => {\n this._updateRootElement();\n this._setupHandlesListener();\n if (this.freeDragPosition) {\n this._dragRef.setFreeDragPosition(this.freeDragPosition);\n }\n });\n });\n }\n ngOnChanges(changes) {\n const rootSelectorChange = changes['rootElementSelector'];\n const positionChange = changes['freeDragPosition'];\n // We don't have to react to the first change since it's being\n // handled in `ngAfterViewInit` where it needs to be deferred.\n if (rootSelectorChange && !rootSelectorChange.firstChange) {\n this._updateRootElement();\n }\n // Skip the first change since it's being handled in `ngAfterViewInit`.\n if (positionChange && !positionChange.firstChange && this.freeDragPosition) {\n this._dragRef.setFreeDragPosition(this.freeDragPosition);\n }\n }\n ngOnDestroy() {\n if (this.dropContainer) {\n this.dropContainer.removeItem(this);\n }\n const index = CdkDrag._dragInstances.indexOf(this);\n if (index > -1) {\n CdkDrag._dragInstances.splice(index, 1);\n }\n // Unnecessary in most cases, but used to avoid extra change detections with `zone-paths-rxjs`.\n this._ngZone.runOutsideAngular(() => {\n this._handles.complete();\n this._destroyed.next();\n this._destroyed.complete();\n this._dragRef.dispose();\n });\n }\n _addHandle(handle) {\n const handles = this._handles.getValue();\n handles.push(handle);\n this._handles.next(handles);\n }\n _removeHandle(handle) {\n const handles = this._handles.getValue();\n const index = handles.indexOf(handle);\n if (index > -1) {\n handles.splice(index, 1);\n this._handles.next(handles);\n }\n }\n _setPreviewTemplate(preview) {\n this._previewTemplate = preview;\n }\n _resetPreviewTemplate(preview) {\n if (preview === this._previewTemplate) {\n this._previewTemplate = null;\n }\n }\n _setPlaceholderTemplate(placeholder) {\n this._placeholderTemplate = placeholder;\n }\n _resetPlaceholderTemplate(placeholder) {\n if (placeholder === this._placeholderTemplate) {\n this._placeholderTemplate = null;\n }\n }\n /** Syncs the root element with the `DragRef`. */\n _updateRootElement() {\n const element = this.element.nativeElement;\n let rootElement = element;\n if (this.rootElementSelector) {\n rootElement = element.closest !== undefined ? element.closest(this.rootElementSelector) :\n // Comment tag doesn't have closest method, so use parent's one.\n element.parentElement?.closest(this.rootElementSelector);\n }\n if (rootElement && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n assertElementNode(rootElement, 'cdkDrag');\n }\n this._dragRef.withRootElement(rootElement || element);\n }\n /** Gets the boundary element, based on the `boundaryElement` value. */\n _getBoundaryElement() {\n const boundary = this.boundaryElement;\n if (!boundary) {\n return null;\n }\n if (typeof boundary === 'string') {\n return this.element.nativeElement.closest(boundary);\n }\n return coerceElement(boundary);\n }\n /** Syncs the inputs of the CdkDrag with the options of the underlying DragRef. */\n _syncInputs(ref) {\n ref.beforeStarted.subscribe(() => {\n if (!ref.isDragging()) {\n const dir = this._dir;\n const dragStartDelay = this.dragStartDelay;\n const placeholder = this._placeholderTemplate ? {\n template: this._placeholderTemplate.templateRef,\n context: this._placeholderTemplate.data,\n viewContainer: this._viewContainerRef\n } : null;\n const preview = this._previewTemplate ? {\n template: this._previewTemplate.templateRef,\n context: this._previewTemplate.data,\n matchSize: this._previewTemplate.matchSize,\n viewContainer: this._viewContainerRef\n } : null;\n ref.disabled = this.disabled;\n ref.lockAxis = this.lockAxis;\n ref.dragStartDelay = typeof dragStartDelay === 'object' && dragStartDelay ? dragStartDelay : coerceNumberProperty(dragStartDelay);\n ref.constrainPosition = this.constrainPosition;\n ref.previewClass = this.previewClass;\n ref.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(placeholder).withPreviewTemplate(preview).withPreviewContainer(this.previewContainer || 'global');\n if (dir) {\n ref.withDirection(dir.value);\n }\n }\n });\n // This only needs to be resolved once.\n ref.beforeStarted.pipe(take(1)).subscribe(() => {\n // If we managed to resolve a parent through DI, use it.\n if (this._parentDrag) {\n ref.withParent(this._parentDrag._dragRef);\n return;\n }\n // Otherwise fall back to resolving the parent by looking up the DOM. This can happen if\n // the item was projected into another item by something like `ngTemplateOutlet`.\n let parent = this.element.nativeElement.parentElement;\n while (parent) {\n if (parent.classList.contains(DRAG_HOST_CLASS)) {\n ref.withParent(CdkDrag._dragInstances.find(drag => {\n return drag.element.nativeElement === parent;\n })?._dragRef || null);\n break;\n }\n parent = parent.parentElement;\n }\n });\n }\n /** Handles the events from the underlying `DragRef`. */\n _handleEvents(ref) {\n ref.started.subscribe(startEvent => {\n this.started.emit({\n source: this,\n event: startEvent.event\n });\n // Since all of these events run outside of change detection,\n // we need to ensure that everything is marked correctly.\n this._changeDetectorRef.markForCheck();\n });\n ref.released.subscribe(releaseEvent => {\n this.released.emit({\n source: this,\n event: releaseEvent.event\n });\n });\n ref.ended.subscribe(endEvent => {\n this.ended.emit({\n source: this,\n distance: endEvent.distance,\n dropPoint: endEvent.dropPoint,\n event: endEvent.event\n });\n // Since all of these events run outside of change detection,\n // we need to ensure that everything is marked correctly.\n this._changeDetectorRef.markForCheck();\n });\n ref.entered.subscribe(enterEvent => {\n this.entered.emit({\n container: enterEvent.container.data,\n item: this,\n currentIndex: enterEvent.currentIndex\n });\n });\n ref.exited.subscribe(exitEvent => {\n this.exited.emit({\n container: exitEvent.container.data,\n item: this\n });\n });\n ref.dropped.subscribe(dropEvent => {\n this.dropped.emit({\n previousIndex: dropEvent.previousIndex,\n currentIndex: dropEvent.currentIndex,\n previousContainer: dropEvent.previousContainer.data,\n container: dropEvent.container.data,\n isPointerOverContainer: dropEvent.isPointerOverContainer,\n item: this,\n distance: dropEvent.distance,\n dropPoint: dropEvent.dropPoint,\n event: dropEvent.event\n });\n });\n }\n /** Assigns the default input values based on a provided config object. */\n _assignDefaults(config) {\n const {\n lockAxis,\n dragStartDelay,\n constrainPosition,\n previewClass,\n boundaryElement,\n draggingDisabled,\n rootElementSelector,\n previewContainer\n } = config;\n this.disabled = draggingDisabled == null ? false : draggingDisabled;\n this.dragStartDelay = dragStartDelay || 0;\n if (lockAxis) {\n this.lockAxis = lockAxis;\n }\n if (constrainPosition) {\n this.constrainPosition = constrainPosition;\n }\n if (previewClass) {\n this.previewClass = previewClass;\n }\n if (boundaryElement) {\n this.boundaryElement = boundaryElement;\n }\n if (rootElementSelector) {\n this.rootElementSelector = rootElementSelector;\n }\n if (previewContainer) {\n this.previewContainer = previewContainer;\n }\n }\n /** Sets up the listener that syncs the handles with the drag ref. */\n _setupHandlesListener() {\n // Listen for any newly-added handles.\n this._handles.pipe(\n // Sync the new handles with the DragRef.\n tap(handles => {\n const handleElements = handles.map(handle => handle.element);\n // Usually handles are only allowed to be a descendant of the drag element, but if\n // the consumer defined a different drag root, we should allow the drag element\n // itself to be a handle too.\n if (this._selfHandle && this.rootElementSelector) {\n handleElements.push(this.element);\n }\n this._dragRef.withHandles(handleElements);\n }),\n // Listen if the state of any of the handles changes.\n switchMap(handles => {\n return merge(...handles.map(item => item._stateChanges.pipe(startWith(item))));\n }), takeUntil(this._destroyed)).subscribe(handleInstance => {\n // Enabled/disable the handle that changed in the DragRef.\n const dragRef = this._dragRef;\n const handle = handleInstance.element.nativeElement;\n handleInstance.disabled ? dragRef.disableHandle(handle) : dragRef.enableHandle(handle);\n });\n }\n static {\n this.ɵfac = function CdkDrag_Factory(t) {\n return new (t || CdkDrag)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(CDK_DROP_LIST, 12), i0.ɵɵdirectiveInject(DOCUMENT), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(CDK_DRAG_CONFIG, 8), i0.ɵɵdirectiveInject(i1$1.Directionality, 8), i0.ɵɵdirectiveInject(DragDrop), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(CDK_DRAG_HANDLE, 10), i0.ɵɵdirectiveInject(CDK_DRAG_PARENT, 12));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDrag,\n selectors: [[\"\", \"cdkDrag\", \"\"]],\n hostAttrs: [1, \"cdk-drag\"],\n hostVars: 4,\n hostBindings: function CdkDrag_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"cdk-drag-disabled\", ctx.disabled)(\"cdk-drag-dragging\", ctx._dragRef.isDragging());\n }\n },\n inputs: {\n data: [i0.ɵɵInputFlags.None, \"cdkDragData\", \"data\"],\n lockAxis: [i0.ɵɵInputFlags.None, \"cdkDragLockAxis\", \"lockAxis\"],\n rootElementSelector: [i0.ɵɵInputFlags.None, \"cdkDragRootElement\", \"rootElementSelector\"],\n boundaryElement: [i0.ɵɵInputFlags.None, \"cdkDragBoundary\", \"boundaryElement\"],\n dragStartDelay: [i0.ɵɵInputFlags.None, \"cdkDragStartDelay\", \"dragStartDelay\"],\n freeDragPosition: [i0.ɵɵInputFlags.None, \"cdkDragFreeDragPosition\", \"freeDragPosition\"],\n disabled: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"cdkDragDisabled\", \"disabled\", booleanAttribute],\n constrainPosition: [i0.ɵɵInputFlags.None, \"cdkDragConstrainPosition\", \"constrainPosition\"],\n previewClass: [i0.ɵɵInputFlags.None, \"cdkDragPreviewClass\", \"previewClass\"],\n previewContainer: [i0.ɵɵInputFlags.None, \"cdkDragPreviewContainer\", \"previewContainer\"]\n },\n outputs: {\n started: \"cdkDragStarted\",\n released: \"cdkDragReleased\",\n ended: \"cdkDragEnded\",\n entered: \"cdkDragEntered\",\n exited: \"cdkDragExited\",\n dropped: \"cdkDragDropped\",\n moved: \"cdkDragMoved\"\n },\n exportAs: [\"cdkDrag\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CDK_DRAG_PARENT,\n useExisting: CdkDrag\n }]), i0.ɵɵInputTransformsFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return CdkDrag;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to reference instances of `CdkDropListGroup`. It serves as\n * alternative token to the actual `CdkDropListGroup` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DROP_LIST_GROUP = /*#__PURE__*/new InjectionToken('CdkDropListGroup');\n/**\n * Declaratively connects sibling `cdkDropList` instances together. All of the `cdkDropList`\n * elements that are placed inside a `cdkDropListGroup` will be connected to each other\n * automatically. Can be used as an alternative to the `cdkDropListConnectedTo` input\n * from `cdkDropList`.\n */\nlet CdkDropListGroup = /*#__PURE__*/(() => {\n class CdkDropListGroup {\n constructor() {\n /** Drop lists registered inside the group. */\n this._items = new Set();\n /** Whether starting a dragging sequence from inside this group is disabled. */\n this.disabled = false;\n }\n ngOnDestroy() {\n this._items.clear();\n }\n static {\n this.ɵfac = function CdkDropListGroup_Factory(t) {\n return new (t || CdkDropListGroup)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDropListGroup,\n selectors: [[\"\", \"cdkDropListGroup\", \"\"]],\n inputs: {\n disabled: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"cdkDropListGroupDisabled\", \"disabled\", booleanAttribute]\n },\n exportAs: [\"cdkDropListGroup\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CDK_DROP_LIST_GROUP,\n useExisting: CdkDropListGroup\n }]), i0.ɵɵInputTransformsFeature]\n });\n }\n }\n return CdkDropListGroup;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/** Counter used to generate unique ids for drop zones. */\nlet _uniqueIdCounter = 0;\n/** Container that wraps a set of draggable items. */\nlet CdkDropList = /*#__PURE__*/(() => {\n class CdkDropList {\n /** Keeps track of the drop lists that are currently on the page. */\n static {\n this._dropLists = [];\n }\n /** Whether starting a dragging sequence from this container is disabled. */\n get disabled() {\n return this._disabled || !!this._group && this._group.disabled;\n }\n set disabled(value) {\n // Usually we sync the directive and ref state right before dragging starts, in order to have\n // a single point of failure and to avoid having to use setters for everything. `disabled` is\n // a special case, because it can prevent the `beforeStarted` event from firing, which can lock\n // the user in a disabled state, so we also need to sync it as it's being set.\n this._dropListRef.disabled = this._disabled = value;\n }\n constructor( /** Element that the drop list is attached to. */\n element, dragDrop, _changeDetectorRef, _scrollDispatcher, _dir, _group, config) {\n this.element = element;\n this._changeDetectorRef = _changeDetectorRef;\n this._scrollDispatcher = _scrollDispatcher;\n this._dir = _dir;\n this._group = _group;\n /** Emits when the list has been destroyed. */\n this._destroyed = new Subject();\n /**\n * Other draggable containers that this container is connected to and into which the\n * container's items can be transferred. Can either be references to other drop containers,\n * or their unique IDs.\n */\n this.connectedTo = [];\n /**\n * Unique ID for the drop zone. Can be used as a reference\n * in the `connectedTo` of another `CdkDropList`.\n */\n this.id = `cdk-drop-list-${_uniqueIdCounter++}`;\n /**\n * Function that is used to determine whether an item\n * is allowed to be moved into a drop container.\n */\n this.enterPredicate = () => true;\n /** Functions that is used to determine whether an item can be sorted into a particular index. */\n this.sortPredicate = () => true;\n /** Emits when the user drops an item inside the container. */\n this.dropped = new EventEmitter();\n /**\n * Emits when the user has moved a new drag item into this container.\n */\n this.entered = new EventEmitter();\n /**\n * Emits when the user removes an item from the container\n * by dragging it into another container.\n */\n this.exited = new EventEmitter();\n /** Emits as the user is swapping items while actively dragging. */\n this.sorted = new EventEmitter();\n /**\n * Keeps track of the items that are registered with this container. Historically we used to\n * do this with a `ContentChildren` query, however queries don't handle transplanted views very\n * well which means that we can't handle cases like dragging the headers of a `mat-table`\n * correctly. What we do instead is to have the items register themselves with the container\n * and then we sort them based on their position in the DOM.\n */\n this._unsortedItems = new Set();\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n assertElementNode(element.nativeElement, 'cdkDropList');\n }\n this._dropListRef = dragDrop.createDropList(element);\n this._dropListRef.data = this;\n if (config) {\n this._assignDefaults(config);\n }\n this._dropListRef.enterPredicate = (drag, drop) => {\n return this.enterPredicate(drag.data, drop.data);\n };\n this._dropListRef.sortPredicate = (index, drag, drop) => {\n return this.sortPredicate(index, drag.data, drop.data);\n };\n this._setupInputSyncSubscription(this._dropListRef);\n this._handleEvents(this._dropListRef);\n CdkDropList._dropLists.push(this);\n if (_group) {\n _group._items.add(this);\n }\n }\n /** Registers an items with the drop list. */\n addItem(item) {\n this._unsortedItems.add(item);\n if (this._dropListRef.isDragging()) {\n this._syncItemsWithRef();\n }\n }\n /** Removes an item from the drop list. */\n removeItem(item) {\n this._unsortedItems.delete(item);\n if (this._dropListRef.isDragging()) {\n this._syncItemsWithRef();\n }\n }\n /** Gets the registered items in the list, sorted by their position in the DOM. */\n getSortedItems() {\n return Array.from(this._unsortedItems).sort((a, b) => {\n const documentPosition = a._dragRef.getVisibleElement().compareDocumentPosition(b._dragRef.getVisibleElement());\n // `compareDocumentPosition` returns a bitmask so we have to use a bitwise operator.\n // https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition\n // tslint:disable-next-line:no-bitwise\n return documentPosition & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;\n });\n }\n ngOnDestroy() {\n const index = CdkDropList._dropLists.indexOf(this);\n if (index > -1) {\n CdkDropList._dropLists.splice(index, 1);\n }\n if (this._group) {\n this._group._items.delete(this);\n }\n this._unsortedItems.clear();\n this._dropListRef.dispose();\n this._destroyed.next();\n this._destroyed.complete();\n }\n /** Syncs the inputs of the CdkDropList with the options of the underlying DropListRef. */\n _setupInputSyncSubscription(ref) {\n if (this._dir) {\n this._dir.change.pipe(startWith(this._dir.value), takeUntil(this._destroyed)).subscribe(value => ref.withDirection(value));\n }\n ref.beforeStarted.subscribe(() => {\n const siblings = coerceArray(this.connectedTo).map(drop => {\n if (typeof drop === 'string') {\n const correspondingDropList = CdkDropList._dropLists.find(list => list.id === drop);\n if (!correspondingDropList && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n console.warn(`CdkDropList could not find connected drop list with id \"${drop}\"`);\n }\n return correspondingDropList;\n }\n return drop;\n });\n if (this._group) {\n this._group._items.forEach(drop => {\n if (siblings.indexOf(drop) === -1) {\n siblings.push(drop);\n }\n });\n }\n // Note that we resolve the scrollable parents here so that we delay the resolution\n // as long as possible, ensuring that the element is in its final place in the DOM.\n if (!this._scrollableParentsResolved) {\n const scrollableParents = this._scrollDispatcher.getAncestorScrollContainers(this.element).map(scrollable => scrollable.getElementRef().nativeElement);\n this._dropListRef.withScrollableParents(scrollableParents);\n // Only do this once since it involves traversing the DOM and the parents\n // shouldn't be able to change without the drop list being destroyed.\n this._scrollableParentsResolved = true;\n }\n ref.disabled = this.disabled;\n ref.lockAxis = this.lockAxis;\n ref.sortingDisabled = this.sortingDisabled;\n ref.autoScrollDisabled = this.autoScrollDisabled;\n ref.autoScrollStep = coerceNumberProperty(this.autoScrollStep, 2);\n ref.connectedTo(siblings.filter(drop => drop && drop !== this).map(list => list._dropListRef)).withOrientation(this.orientation);\n });\n }\n /** Handles events from the underlying DropListRef. */\n _handleEvents(ref) {\n ref.beforeStarted.subscribe(() => {\n this._syncItemsWithRef();\n this._changeDetectorRef.markForCheck();\n });\n ref.entered.subscribe(event => {\n this.entered.emit({\n container: this,\n item: event.item.data,\n currentIndex: event.currentIndex\n });\n });\n ref.exited.subscribe(event => {\n this.exited.emit({\n container: this,\n item: event.item.data\n });\n this._changeDetectorRef.markForCheck();\n });\n ref.sorted.subscribe(event => {\n this.sorted.emit({\n previousIndex: event.previousIndex,\n currentIndex: event.currentIndex,\n container: this,\n item: event.item.data\n });\n });\n ref.dropped.subscribe(dropEvent => {\n this.dropped.emit({\n previousIndex: dropEvent.previousIndex,\n currentIndex: dropEvent.currentIndex,\n previousContainer: dropEvent.previousContainer.data,\n container: dropEvent.container.data,\n item: dropEvent.item.data,\n isPointerOverContainer: dropEvent.isPointerOverContainer,\n distance: dropEvent.distance,\n dropPoint: dropEvent.dropPoint,\n event: dropEvent.event\n });\n // Mark for check since all of these events run outside of change\n // detection and we're not guaranteed for something else to have triggered it.\n this._changeDetectorRef.markForCheck();\n });\n merge(ref.receivingStarted, ref.receivingStopped).subscribe(() => this._changeDetectorRef.markForCheck());\n }\n /** Assigns the default input values based on a provided config object. */\n _assignDefaults(config) {\n const {\n lockAxis,\n draggingDisabled,\n sortingDisabled,\n listAutoScrollDisabled,\n listOrientation\n } = config;\n this.disabled = draggingDisabled == null ? false : draggingDisabled;\n this.sortingDisabled = sortingDisabled == null ? false : sortingDisabled;\n this.autoScrollDisabled = listAutoScrollDisabled == null ? false : listAutoScrollDisabled;\n this.orientation = listOrientation || 'vertical';\n if (lockAxis) {\n this.lockAxis = lockAxis;\n }\n }\n /** Syncs up the registered drag items with underlying drop list ref. */\n _syncItemsWithRef() {\n this._dropListRef.withItems(this.getSortedItems().map(item => item._dragRef));\n }\n static {\n this.ɵfac = function CdkDropList_Factory(t) {\n return new (t || CdkDropList)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(DragDrop), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1.ScrollDispatcher), i0.ɵɵdirectiveInject(i1$1.Directionality, 8), i0.ɵɵdirectiveInject(CDK_DROP_LIST_GROUP, 12), i0.ɵɵdirectiveInject(CDK_DRAG_CONFIG, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDropList,\n selectors: [[\"\", \"cdkDropList\", \"\"], [\"cdk-drop-list\"]],\n hostAttrs: [1, \"cdk-drop-list\"],\n hostVars: 7,\n hostBindings: function CdkDropList_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"id\", ctx.id);\n i0.ɵɵclassProp(\"cdk-drop-list-disabled\", ctx.disabled)(\"cdk-drop-list-dragging\", ctx._dropListRef.isDragging())(\"cdk-drop-list-receiving\", ctx._dropListRef.isReceiving());\n }\n },\n inputs: {\n connectedTo: [i0.ɵɵInputFlags.None, \"cdkDropListConnectedTo\", \"connectedTo\"],\n data: [i0.ɵɵInputFlags.None, \"cdkDropListData\", \"data\"],\n orientation: [i0.ɵɵInputFlags.None, \"cdkDropListOrientation\", \"orientation\"],\n id: \"id\",\n lockAxis: [i0.ɵɵInputFlags.None, \"cdkDropListLockAxis\", \"lockAxis\"],\n disabled: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"cdkDropListDisabled\", \"disabled\", booleanAttribute],\n sortingDisabled: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"cdkDropListSortingDisabled\", \"sortingDisabled\", booleanAttribute],\n enterPredicate: [i0.ɵɵInputFlags.None, \"cdkDropListEnterPredicate\", \"enterPredicate\"],\n sortPredicate: [i0.ɵɵInputFlags.None, \"cdkDropListSortPredicate\", \"sortPredicate\"],\n autoScrollDisabled: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"cdkDropListAutoScrollDisabled\", \"autoScrollDisabled\", booleanAttribute],\n autoScrollStep: [i0.ɵɵInputFlags.None, \"cdkDropListAutoScrollStep\", \"autoScrollStep\"]\n },\n outputs: {\n dropped: \"cdkDropListDropped\",\n entered: \"cdkDropListEntered\",\n exited: \"cdkDropListExited\",\n sorted: \"cdkDropListSorted\"\n },\n exportAs: [\"cdkDropList\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([\n // Prevent child drop lists from picking up the same group as their parent.\n {\n provide: CDK_DROP_LIST_GROUP,\n useValue: undefined\n }, {\n provide: CDK_DROP_LIST,\n useExisting: CdkDropList\n }]), i0.ɵɵInputTransformsFeature]\n });\n }\n }\n return CdkDropList;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to reference instances of `CdkDragPreview`. It serves as\n * alternative token to the actual `CdkDragPreview` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DRAG_PREVIEW = /*#__PURE__*/new InjectionToken('CdkDragPreview');\n/**\n * Element that will be used as a template for the preview\n * of a CdkDrag when it is being dragged.\n */\nlet CdkDragPreview = /*#__PURE__*/(() => {\n class CdkDragPreview {\n constructor(templateRef) {\n this.templateRef = templateRef;\n this._drag = inject(CDK_DRAG_PARENT);\n /** Whether the preview should preserve the same size as the item that is being dragged. */\n this.matchSize = false;\n this._drag._setPreviewTemplate(this);\n }\n ngOnDestroy() {\n this._drag._resetPreviewTemplate(this);\n }\n static {\n this.ɵfac = function CdkDragPreview_Factory(t) {\n return new (t || CdkDragPreview)(i0.ɵɵdirectiveInject(i0.TemplateRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDragPreview,\n selectors: [[\"ng-template\", \"cdkDragPreview\", \"\"]],\n inputs: {\n data: \"data\",\n matchSize: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"matchSize\", \"matchSize\", booleanAttribute]\n },\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CDK_DRAG_PREVIEW,\n useExisting: CdkDragPreview\n }]), i0.ɵɵInputTransformsFeature]\n });\n }\n }\n return CdkDragPreview;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Injection token that can be used to reference instances of `CdkDragPlaceholder`. It serves as\n * alternative token to the actual `CdkDragPlaceholder` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nconst CDK_DRAG_PLACEHOLDER = /*#__PURE__*/new InjectionToken('CdkDragPlaceholder');\n/**\n * Element that will be used as a template for the placeholder of a CdkDrag when\n * it is being dragged. The placeholder is displayed in place of the element being dragged.\n */\nlet CdkDragPlaceholder = /*#__PURE__*/(() => {\n class CdkDragPlaceholder {\n constructor(templateRef) {\n this.templateRef = templateRef;\n this._drag = inject(CDK_DRAG_PARENT);\n this._drag._setPlaceholderTemplate(this);\n }\n ngOnDestroy() {\n this._drag._resetPlaceholderTemplate(this);\n }\n static {\n this.ɵfac = function CdkDragPlaceholder_Factory(t) {\n return new (t || CdkDragPlaceholder)(i0.ɵɵdirectiveInject(i0.TemplateRef));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: CdkDragPlaceholder,\n selectors: [[\"ng-template\", \"cdkDragPlaceholder\", \"\"]],\n inputs: {\n data: \"data\"\n },\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CDK_DRAG_PLACEHOLDER,\n useExisting: CdkDragPlaceholder\n }])]\n });\n }\n }\n return CdkDragPlaceholder;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nconst DRAG_DROP_DIRECTIVES = [CdkDropList, CdkDropListGroup, CdkDrag, CdkDragHandle, CdkDragPreview, CdkDragPlaceholder];\nlet DragDropModule = /*#__PURE__*/(() => {\n class DragDropModule {\n static {\n this.ɵfac = function DragDropModule_Factory(t) {\n return new (t || DragDropModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: DragDropModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [DragDrop],\n imports: [CdkScrollableModule]\n });\n }\n }\n return DragDropModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { CDK_DRAG_CONFIG, CDK_DRAG_HANDLE, CDK_DRAG_PARENT, CDK_DRAG_PLACEHOLDER, CDK_DRAG_PREVIEW, CDK_DROP_LIST, CDK_DROP_LIST_GROUP, CdkDrag, CdkDragHandle, CdkDragPlaceholder, CdkDragPreview, CdkDropList, CdkDropListGroup, DragDrop, DragDropModule, DragDropRegistry, DragRef, DropListRef, copyArrayItem, moveItemInArray, transferArrayItem };\n","import * as i0 from '@angular/core';\nimport { InjectionToken, EventEmitter, booleanAttribute, Directive, Optional, Inject, Input, Output, Injectable, SkipSelf, Component, ViewEncapsulation, ChangeDetectionStrategy, NgModule } from '@angular/core';\nimport * as i3 from '@angular/cdk/a11y';\nimport { SPACE, ENTER } from '@angular/cdk/keycodes';\nimport { ReplaySubject, Subject, merge } from 'rxjs';\nimport { trigger, state, style, transition, animate, keyframes, query, animateChild } from '@angular/animations';\nimport { AnimationDurations, AnimationCurves, MatCommonModule } from '@angular/material/core';\n\n/** @docs-private */\nconst _c0 = [\"mat-sort-header\", \"\"];\nconst _c1 = [\"*\"];\nfunction MatSortHeader_Conditional_3_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 2);\n i0.ɵɵlistener(\"@arrowPosition.start\", function MatSortHeader_Conditional_3_Template_div_animation_arrowPosition_start_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1._disableViewStateAnimation = true);\n })(\"@arrowPosition.done\", function MatSortHeader_Conditional_3_Template_div_animation_arrowPosition_done_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1._disableViewStateAnimation = false);\n });\n i0.ɵɵelement(1, \"div\", 3);\n i0.ɵɵelementStart(2, \"div\", 4);\n i0.ɵɵelement(3, \"div\", 5)(4, \"div\", 6)(5, \"div\", 7);\n i0.ɵɵelementEnd()();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"@arrowOpacity\", ctx_r1._getArrowViewState())(\"@arrowPosition\", ctx_r1._getArrowViewState())(\"@allowChildren\", ctx_r1._getArrowDirectionState());\n i0.ɵɵadvance(2);\n i0.ɵɵproperty(\"@indicator\", ctx_r1._getArrowDirectionState());\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"@leftPointer\", ctx_r1._getArrowDirectionState());\n i0.ɵɵadvance();\n i0.ɵɵproperty(\"@rightPointer\", ctx_r1._getArrowDirectionState());\n }\n}\nfunction getSortDuplicateSortableIdError(id) {\n return Error(`Cannot have two MatSortables with the same id (${id}).`);\n}\n/** @docs-private */\nfunction getSortHeaderNotContainedWithinSortError() {\n return Error(`MatSortHeader must be placed within a parent element with the MatSort directive.`);\n}\n/** @docs-private */\nfunction getSortHeaderMissingIdError() {\n return Error(`MatSortHeader must be provided with a unique id.`);\n}\n/** @docs-private */\nfunction getSortInvalidDirectionError(direction) {\n return Error(`${direction} is not a valid sort direction ('asc' or 'desc').`);\n}\n\n/** Injection token to be used to override the default options for `mat-sort`. */\nconst MAT_SORT_DEFAULT_OPTIONS = /*#__PURE__*/new InjectionToken('MAT_SORT_DEFAULT_OPTIONS');\n/** Container for MatSortables to manage the sort state and provide default sort parameters. */\nlet MatSort = /*#__PURE__*/(() => {\n class MatSort {\n /** The sort direction of the currently active MatSortable. */\n get direction() {\n return this._direction;\n }\n set direction(direction) {\n if (direction && direction !== 'asc' && direction !== 'desc' && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getSortInvalidDirectionError(direction);\n }\n this._direction = direction;\n }\n constructor(_defaultOptions) {\n this._defaultOptions = _defaultOptions;\n this._initializedStream = new ReplaySubject(1);\n /** Collection of all registered sortables that this directive manages. */\n this.sortables = new Map();\n /** Used to notify any child components listening to state changes. */\n this._stateChanges = new Subject();\n /**\n * The direction to set when an MatSortable is initially sorted.\n * May be overridden by the MatSortable's sort start.\n */\n this.start = 'asc';\n this._direction = '';\n /** Whether the sortable is disabled. */\n this.disabled = false;\n /** Event emitted when the user changes either the active sort or sort direction. */\n this.sortChange = new EventEmitter();\n /** Emits when the paginator is initialized. */\n this.initialized = this._initializedStream;\n }\n /**\n * Register function to be used by the contained MatSortables. Adds the MatSortable to the\n * collection of MatSortables.\n */\n register(sortable) {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!sortable.id) {\n throw getSortHeaderMissingIdError();\n }\n if (this.sortables.has(sortable.id)) {\n throw getSortDuplicateSortableIdError(sortable.id);\n }\n }\n this.sortables.set(sortable.id, sortable);\n }\n /**\n * Unregister function to be used by the contained MatSortables. Removes the MatSortable from the\n * collection of contained MatSortables.\n */\n deregister(sortable) {\n this.sortables.delete(sortable.id);\n }\n /** Sets the active sort id and determines the new sort direction. */\n sort(sortable) {\n if (this.active != sortable.id) {\n this.active = sortable.id;\n this.direction = sortable.start ? sortable.start : this.start;\n } else {\n this.direction = this.getNextSortDirection(sortable);\n }\n this.sortChange.emit({\n active: this.active,\n direction: this.direction\n });\n }\n /** Returns the next sort direction of the active sortable, checking for potential overrides. */\n getNextSortDirection(sortable) {\n if (!sortable) {\n return '';\n }\n // Get the sort direction cycle with the potential sortable overrides.\n const disableClear = sortable?.disableClear ?? this.disableClear ?? !!this._defaultOptions?.disableClear;\n let sortDirectionCycle = getSortDirectionCycle(sortable.start || this.start, disableClear);\n // Get and return the next direction in the cycle\n let nextDirectionIndex = sortDirectionCycle.indexOf(this.direction) + 1;\n if (nextDirectionIndex >= sortDirectionCycle.length) {\n nextDirectionIndex = 0;\n }\n return sortDirectionCycle[nextDirectionIndex];\n }\n ngOnInit() {\n this._initializedStream.next();\n }\n ngOnChanges() {\n this._stateChanges.next();\n }\n ngOnDestroy() {\n this._stateChanges.complete();\n this._initializedStream.complete();\n }\n static {\n this.ɵfac = function MatSort_Factory(t) {\n return new (t || MatSort)(i0.ɵɵdirectiveInject(MAT_SORT_DEFAULT_OPTIONS, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatSort,\n selectors: [[\"\", \"matSort\", \"\"]],\n hostAttrs: [1, \"mat-sort\"],\n inputs: {\n active: [i0.ɵɵInputFlags.None, \"matSortActive\", \"active\"],\n start: [i0.ɵɵInputFlags.None, \"matSortStart\", \"start\"],\n direction: [i0.ɵɵInputFlags.None, \"matSortDirection\", \"direction\"],\n disableClear: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"matSortDisableClear\", \"disableClear\", booleanAttribute],\n disabled: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"matSortDisabled\", \"disabled\", booleanAttribute]\n },\n outputs: {\n sortChange: \"matSortChange\"\n },\n exportAs: [\"matSort\"],\n standalone: true,\n features: [i0.ɵɵInputTransformsFeature, i0.ɵɵNgOnChangesFeature]\n });\n }\n }\n return MatSort;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/** Returns the sort direction cycle to use given the provided parameters of order and clear. */\nfunction getSortDirectionCycle(start, disableClear) {\n let sortOrder = ['asc', 'desc'];\n if (start == 'desc') {\n sortOrder.reverse();\n }\n if (!disableClear) {\n sortOrder.push('');\n }\n return sortOrder;\n}\nconst SORT_ANIMATION_TRANSITION = AnimationDurations.ENTERING + ' ' + AnimationCurves.STANDARD_CURVE;\n/**\n * Animations used by MatSort.\n * @docs-private\n */\nconst matSortAnimations = {\n /** Animation that moves the sort indicator. */\n indicator: /*#__PURE__*/trigger('indicator', [/*#__PURE__*/state('active-asc, asc', /*#__PURE__*/style({\n transform: 'translateY(0px)'\n })),\n /*#__PURE__*/\n // 10px is the height of the sort indicator, minus the width of the pointers\n state('active-desc, desc', /*#__PURE__*/style({\n transform: 'translateY(10px)'\n })), /*#__PURE__*/transition('active-asc <=> active-desc', /*#__PURE__*/animate(SORT_ANIMATION_TRANSITION))]),\n /** Animation that rotates the left pointer of the indicator based on the sorting direction. */\n leftPointer: /*#__PURE__*/trigger('leftPointer', [/*#__PURE__*/state('active-asc, asc', /*#__PURE__*/style({\n transform: 'rotate(-45deg)'\n })), /*#__PURE__*/state('active-desc, desc', /*#__PURE__*/style({\n transform: 'rotate(45deg)'\n })), /*#__PURE__*/transition('active-asc <=> active-desc', /*#__PURE__*/animate(SORT_ANIMATION_TRANSITION))]),\n /** Animation that rotates the right pointer of the indicator based on the sorting direction. */\n rightPointer: /*#__PURE__*/trigger('rightPointer', [/*#__PURE__*/state('active-asc, asc', /*#__PURE__*/style({\n transform: 'rotate(45deg)'\n })), /*#__PURE__*/state('active-desc, desc', /*#__PURE__*/style({\n transform: 'rotate(-45deg)'\n })), /*#__PURE__*/transition('active-asc <=> active-desc', /*#__PURE__*/animate(SORT_ANIMATION_TRANSITION))]),\n /** Animation that controls the arrow opacity. */\n arrowOpacity: /*#__PURE__*/trigger('arrowOpacity', [/*#__PURE__*/state('desc-to-active, asc-to-active, active', /*#__PURE__*/style({\n opacity: 1\n })), /*#__PURE__*/state('desc-to-hint, asc-to-hint, hint', /*#__PURE__*/style({\n opacity: 0.54\n })), /*#__PURE__*/state('hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void', /*#__PURE__*/style({\n opacity: 0\n })),\n /*#__PURE__*/\n // Transition between all states except for immediate transitions\n transition('* => asc, * => desc, * => active, * => hint, * => void', /*#__PURE__*/animate('0ms')), /*#__PURE__*/transition('* <=> *', /*#__PURE__*/animate(SORT_ANIMATION_TRANSITION))]),\n /**\n * Animation for the translation of the arrow as a whole. States are separated into two\n * groups: ones with animations and others that are immediate. Immediate states are asc, desc,\n * peek, and active. The other states define a specific animation (source-to-destination)\n * and are determined as a function of their prev user-perceived state and what the next state\n * should be.\n */\n arrowPosition: /*#__PURE__*/trigger('arrowPosition', [\n /*#__PURE__*/\n // Hidden Above => Hint Center\n transition('* => desc-to-hint, * => desc-to-active', /*#__PURE__*/animate(SORT_ANIMATION_TRANSITION, /*#__PURE__*/keyframes([/*#__PURE__*/style({\n transform: 'translateY(-25%)'\n }), /*#__PURE__*/style({\n transform: 'translateY(0)'\n })]))),\n /*#__PURE__*/\n // Hint Center => Hidden Below\n transition('* => hint-to-desc, * => active-to-desc', /*#__PURE__*/animate(SORT_ANIMATION_TRANSITION, /*#__PURE__*/keyframes([/*#__PURE__*/style({\n transform: 'translateY(0)'\n }), /*#__PURE__*/style({\n transform: 'translateY(25%)'\n })]))),\n /*#__PURE__*/\n // Hidden Below => Hint Center\n transition('* => asc-to-hint, * => asc-to-active', /*#__PURE__*/animate(SORT_ANIMATION_TRANSITION, /*#__PURE__*/keyframes([/*#__PURE__*/style({\n transform: 'translateY(25%)'\n }), /*#__PURE__*/style({\n transform: 'translateY(0)'\n })]))),\n /*#__PURE__*/\n // Hint Center => Hidden Above\n transition('* => hint-to-asc, * => active-to-asc', /*#__PURE__*/animate(SORT_ANIMATION_TRANSITION, /*#__PURE__*/keyframes([/*#__PURE__*/style({\n transform: 'translateY(0)'\n }), /*#__PURE__*/style({\n transform: 'translateY(-25%)'\n })]))), /*#__PURE__*/state('desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active', /*#__PURE__*/style({\n transform: 'translateY(0)'\n })), /*#__PURE__*/state('hint-to-desc, active-to-desc, desc', /*#__PURE__*/style({\n transform: 'translateY(-25%)'\n })), /*#__PURE__*/state('hint-to-asc, active-to-asc, asc', /*#__PURE__*/style({\n transform: 'translateY(25%)'\n }))]),\n /** Necessary trigger that calls animate on children animations. */\n allowChildren: /*#__PURE__*/trigger('allowChildren', [/*#__PURE__*/transition('* <=> *', [/*#__PURE__*/query('@*', /*#__PURE__*/animateChild(), {\n optional: true\n })])])\n};\n\n/**\n * To modify the labels and text displayed, create a new instance of MatSortHeaderIntl and\n * include it in a custom provider.\n */\nlet MatSortHeaderIntl = /*#__PURE__*/(() => {\n class MatSortHeaderIntl {\n constructor() {\n /**\n * Stream that emits whenever the labels here are changed. Use this to notify\n * components if the labels have changed after initialization.\n */\n this.changes = new Subject();\n }\n static {\n this.ɵfac = function MatSortHeaderIntl_Factory(t) {\n return new (t || MatSortHeaderIntl)();\n };\n }\n static {\n this.ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: MatSortHeaderIntl,\n factory: MatSortHeaderIntl.ɵfac,\n providedIn: 'root'\n });\n }\n }\n return MatSortHeaderIntl;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/** @docs-private */\nfunction MAT_SORT_HEADER_INTL_PROVIDER_FACTORY(parentIntl) {\n return parentIntl || new MatSortHeaderIntl();\n}\n/** @docs-private */\nconst MAT_SORT_HEADER_INTL_PROVIDER = {\n // If there is already an MatSortHeaderIntl available, use that. Otherwise, provide a new one.\n provide: MatSortHeaderIntl,\n deps: [[/*#__PURE__*/new Optional(), /*#__PURE__*/new SkipSelf(), MatSortHeaderIntl]],\n useFactory: MAT_SORT_HEADER_INTL_PROVIDER_FACTORY\n};\n\n/**\n * Applies sorting behavior (click to change sort) and styles to an element, including an\n * arrow to display the current sort direction.\n *\n * Must be provided with an id and contained within a parent MatSort directive.\n *\n * If used on header cells in a CdkTable, it will automatically default its id from its containing\n * column definition.\n */\nlet MatSortHeader = /*#__PURE__*/(() => {\n class MatSortHeader {\n /**\n * Description applied to MatSortHeader's button element with aria-describedby. This text should\n * describe the action that will occur when the user clicks the sort header.\n */\n get sortActionDescription() {\n return this._sortActionDescription;\n }\n set sortActionDescription(value) {\n this._updateSortActionDescription(value);\n }\n constructor(\n /**\n * @deprecated `_intl` parameter isn't being used anymore and it'll be removed.\n * @breaking-change 13.0.0\n */\n _intl, _changeDetectorRef,\n // `MatSort` is not optionally injected, but just asserted manually w/ better error.\n // tslint:disable-next-line: lightweight-tokens\n _sort, _columnDef, _focusMonitor, _elementRef, /** @breaking-change 14.0.0 _ariaDescriber will be required. */\n _ariaDescriber, defaultOptions) {\n this._intl = _intl;\n this._changeDetectorRef = _changeDetectorRef;\n this._sort = _sort;\n this._columnDef = _columnDef;\n this._focusMonitor = _focusMonitor;\n this._elementRef = _elementRef;\n this._ariaDescriber = _ariaDescriber;\n /**\n * Flag set to true when the indicator should be displayed while the sort is not active. Used to\n * provide an affordance that the header is sortable by showing on focus and hover.\n */\n this._showIndicatorHint = false;\n /**\n * The view transition state of the arrow (translation/ opacity) - indicates its `from` and `to`\n * position through the animation. If animations are currently disabled, the fromState is removed\n * so that there is no animation displayed.\n */\n this._viewState = {};\n /** The direction the arrow should be facing according to the current state. */\n this._arrowDirection = '';\n /**\n * Whether the view state animation should show the transition between the `from` and `to` states.\n */\n this._disableViewStateAnimation = false;\n /** Sets the position of the arrow that displays when sorted. */\n this.arrowPosition = 'after';\n /** whether the sort header is disabled. */\n this.disabled = false;\n // Default the action description to \"Sort\" because it's better than nothing.\n // Without a description, the button's label comes from the sort header text content,\n // which doesn't give any indication that it performs a sorting operation.\n this._sortActionDescription = 'Sort';\n // Note that we use a string token for the `_columnDef`, because the value is provided both by\n // `material/table` and `cdk/table` and we can't have the CDK depending on Material,\n // and we want to avoid having the sort header depending on the CDK table because\n // of this single reference.\n if (!_sort && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getSortHeaderNotContainedWithinSortError();\n }\n if (defaultOptions?.arrowPosition) {\n this.arrowPosition = defaultOptions?.arrowPosition;\n }\n this._handleStateChanges();\n }\n ngOnInit() {\n if (!this.id && this._columnDef) {\n this.id = this._columnDef.name;\n }\n // Initialize the direction of the arrow and set the view state to be immediately that state.\n this._updateArrowDirection();\n this._setAnimationTransitionState({\n toState: this._isSorted() ? 'active' : this._arrowDirection\n });\n this._sort.register(this);\n this._sortButton = this._elementRef.nativeElement.querySelector('.mat-sort-header-container');\n this._updateSortActionDescription(this._sortActionDescription);\n }\n ngAfterViewInit() {\n // We use the focus monitor because we also want to style\n // things differently based on the focus origin.\n this._focusMonitor.monitor(this._elementRef, true).subscribe(origin => {\n const newState = !!origin;\n if (newState !== this._showIndicatorHint) {\n this._setIndicatorHintVisible(newState);\n this._changeDetectorRef.markForCheck();\n }\n });\n }\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n this._sort.deregister(this);\n this._rerenderSubscription.unsubscribe();\n }\n /**\n * Sets the \"hint\" state such that the arrow will be semi-transparently displayed as a hint to the\n * user showing what the active sort will become. If set to false, the arrow will fade away.\n */\n _setIndicatorHintVisible(visible) {\n // No-op if the sort header is disabled - should not make the hint visible.\n if (this._isDisabled() && visible) {\n return;\n }\n this._showIndicatorHint = visible;\n if (!this._isSorted()) {\n this._updateArrowDirection();\n if (this._showIndicatorHint) {\n this._setAnimationTransitionState({\n fromState: this._arrowDirection,\n toState: 'hint'\n });\n } else {\n this._setAnimationTransitionState({\n fromState: 'hint',\n toState: this._arrowDirection\n });\n }\n }\n }\n /**\n * Sets the animation transition view state for the arrow's position and opacity. If the\n * `disableViewStateAnimation` flag is set to true, the `fromState` will be ignored so that\n * no animation appears.\n */\n _setAnimationTransitionState(viewState) {\n this._viewState = viewState || {};\n // If the animation for arrow position state (opacity/translation) should be disabled,\n // remove the fromState so that it jumps right to the toState.\n if (this._disableViewStateAnimation) {\n this._viewState = {\n toState: viewState.toState\n };\n }\n }\n /** Triggers the sort on this sort header and removes the indicator hint. */\n _toggleOnInteraction() {\n this._sort.sort(this);\n // Do not show the animation if the header was already shown in the right position.\n if (this._viewState.toState === 'hint' || this._viewState.toState === 'active') {\n this._disableViewStateAnimation = true;\n }\n }\n _handleClick() {\n if (!this._isDisabled()) {\n this._sort.sort(this);\n }\n }\n _handleKeydown(event) {\n if (!this._isDisabled() && (event.keyCode === SPACE || event.keyCode === ENTER)) {\n event.preventDefault();\n this._toggleOnInteraction();\n }\n }\n /** Whether this MatSortHeader is currently sorted in either ascending or descending order. */\n _isSorted() {\n return this._sort.active == this.id && (this._sort.direction === 'asc' || this._sort.direction === 'desc');\n }\n /** Returns the animation state for the arrow direction (indicator and pointers). */\n _getArrowDirectionState() {\n return `${this._isSorted() ? 'active-' : ''}${this._arrowDirection}`;\n }\n /** Returns the arrow position state (opacity, translation). */\n _getArrowViewState() {\n const fromState = this._viewState.fromState;\n return (fromState ? `${fromState}-to-` : '') + this._viewState.toState;\n }\n /**\n * Updates the direction the arrow should be pointing. If it is not sorted, the arrow should be\n * facing the start direction. Otherwise if it is sorted, the arrow should point in the currently\n * active sorted direction. The reason this is updated through a function is because the direction\n * should only be changed at specific times - when deactivated but the hint is displayed and when\n * the sort is active and the direction changes. Otherwise the arrow's direction should linger\n * in cases such as the sort becoming deactivated but we want to animate the arrow away while\n * preserving its direction, even though the next sort direction is actually different and should\n * only be changed once the arrow displays again (hint or activation).\n */\n _updateArrowDirection() {\n this._arrowDirection = this._isSorted() ? this._sort.direction : this.start || this._sort.start;\n }\n _isDisabled() {\n return this._sort.disabled || this.disabled;\n }\n /**\n * Gets the aria-sort attribute that should be applied to this sort header. If this header\n * is not sorted, returns null so that the attribute is removed from the host element. Aria spec\n * says that the aria-sort property should only be present on one header at a time, so removing\n * ensures this is true.\n */\n _getAriaSortAttribute() {\n if (!this._isSorted()) {\n return 'none';\n }\n return this._sort.direction == 'asc' ? 'ascending' : 'descending';\n }\n /** Whether the arrow inside the sort header should be rendered. */\n _renderArrow() {\n return !this._isDisabled() || this._isSorted();\n }\n _updateSortActionDescription(newDescription) {\n // We use AriaDescriber for the sort button instead of setting an `aria-label` because some\n // screen readers (notably VoiceOver) will read both the column header *and* the button's label\n // for every *cell* in the table, creating a lot of unnecessary noise.\n // If _sortButton is undefined, the component hasn't been initialized yet so there's\n // nothing to update in the DOM.\n if (this._sortButton) {\n // removeDescription will no-op if there is no existing message.\n // TODO(jelbourn): remove optional chaining when AriaDescriber is required.\n this._ariaDescriber?.removeDescription(this._sortButton, this._sortActionDescription);\n this._ariaDescriber?.describe(this._sortButton, newDescription);\n }\n this._sortActionDescription = newDescription;\n }\n /** Handles changes in the sorting state. */\n _handleStateChanges() {\n this._rerenderSubscription = merge(this._sort.sortChange, this._sort._stateChanges, this._intl.changes).subscribe(() => {\n if (this._isSorted()) {\n this._updateArrowDirection();\n // Do not show the animation if the header was already shown in the right position.\n if (this._viewState.toState === 'hint' || this._viewState.toState === 'active') {\n this._disableViewStateAnimation = true;\n }\n this._setAnimationTransitionState({\n fromState: this._arrowDirection,\n toState: 'active'\n });\n this._showIndicatorHint = false;\n }\n // If this header was recently active and now no longer sorted, animate away the arrow.\n if (!this._isSorted() && this._viewState && this._viewState.toState === 'active') {\n this._disableViewStateAnimation = false;\n this._setAnimationTransitionState({\n fromState: 'active',\n toState: this._arrowDirection\n });\n }\n this._changeDetectorRef.markForCheck();\n });\n }\n static {\n this.ɵfac = function MatSortHeader_Factory(t) {\n return new (t || MatSortHeader)(i0.ɵɵdirectiveInject(MatSortHeaderIntl), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(MatSort, 8), i0.ɵɵdirectiveInject('MAT_SORT_HEADER_COLUMN_DEF', 8), i0.ɵɵdirectiveInject(i3.FocusMonitor), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i3.AriaDescriber, 8), i0.ɵɵdirectiveInject(MAT_SORT_DEFAULT_OPTIONS, 8));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatSortHeader,\n selectors: [[\"\", \"mat-sort-header\", \"\"]],\n hostAttrs: [1, \"mat-sort-header\"],\n hostVars: 3,\n hostBindings: function MatSortHeader_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"click\", function MatSortHeader_click_HostBindingHandler() {\n return ctx._handleClick();\n })(\"keydown\", function MatSortHeader_keydown_HostBindingHandler($event) {\n return ctx._handleKeydown($event);\n })(\"mouseenter\", function MatSortHeader_mouseenter_HostBindingHandler() {\n return ctx._setIndicatorHintVisible(true);\n })(\"mouseleave\", function MatSortHeader_mouseleave_HostBindingHandler() {\n return ctx._setIndicatorHintVisible(false);\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"aria-sort\", ctx._getAriaSortAttribute());\n i0.ɵɵclassProp(\"mat-sort-header-disabled\", ctx._isDisabled());\n }\n },\n inputs: {\n id: [i0.ɵɵInputFlags.None, \"mat-sort-header\", \"id\"],\n arrowPosition: \"arrowPosition\",\n start: \"start\",\n disabled: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"disabled\", \"disabled\", booleanAttribute],\n sortActionDescription: \"sortActionDescription\",\n disableClear: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"disableClear\", \"disableClear\", booleanAttribute]\n },\n exportAs: [\"matSortHeader\"],\n standalone: true,\n features: [i0.ɵɵInputTransformsFeature, i0.ɵɵStandaloneFeature],\n attrs: _c0,\n ngContentSelectors: _c1,\n decls: 4,\n vars: 7,\n consts: [[1, \"mat-sort-header-container\", \"mat-focus-indicator\"], [1, \"mat-sort-header-content\"], [1, \"mat-sort-header-arrow\"], [1, \"mat-sort-header-stem\"], [1, \"mat-sort-header-indicator\"], [1, \"mat-sort-header-pointer-left\"], [1, \"mat-sort-header-pointer-right\"], [1, \"mat-sort-header-pointer-middle\"]],\n template: function MatSortHeader_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"div\", 0)(1, \"div\", 1);\n i0.ɵɵprojection(2);\n i0.ɵɵelementEnd();\n i0.ɵɵtemplate(3, MatSortHeader_Conditional_3_Template, 6, 6, \"div\", 2);\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n i0.ɵɵclassProp(\"mat-sort-header-sorted\", ctx._isSorted())(\"mat-sort-header-position-before\", ctx.arrowPosition === \"before\");\n i0.ɵɵattribute(\"tabindex\", ctx._isDisabled() ? null : 0)(\"role\", ctx._isDisabled() ? null : \"button\");\n i0.ɵɵadvance(3);\n i0.ɵɵconditional(3, ctx._renderArrow() ? 3 : -1);\n }\n },\n styles: [\".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-container::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;color:var(--mat-sort-arrow-color);opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}\"],\n encapsulation: 2,\n data: {\n animation: [matSortAnimations.indicator, matSortAnimations.leftPointer, matSortAnimations.rightPointer, matSortAnimations.arrowOpacity, matSortAnimations.arrowPosition, matSortAnimations.allowChildren]\n },\n changeDetection: 0\n });\n }\n }\n return MatSortHeader;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatSortModule = /*#__PURE__*/(() => {\n class MatSortModule {\n static {\n this.ɵfac = function MatSortModule_Factory(t) {\n return new (t || MatSortModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MatSortModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [MAT_SORT_HEADER_INTL_PROVIDER],\n imports: [MatCommonModule]\n });\n }\n }\n return MatSortModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_SORT_DEFAULT_OPTIONS, MAT_SORT_HEADER_INTL_PROVIDER, MAT_SORT_HEADER_INTL_PROVIDER_FACTORY, MatSort, MatSortHeader, MatSortHeaderIntl, MatSortModule, matSortAnimations };\n","import { DragDropModule } from '@angular/cdk/drag-drop';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatSortModule } from '@angular/material/sort';\nimport { LexiconModule } from '@galaxy/lexicon';\nimport { TranslateModule } from '@ngx-translate/core';\nimport baseTranslation from '../assets/i18n/en_devel.json';\nimport { WEBLATE_COMPONENT_NAME } from '../constants';\nimport { VaSearchBoxModule } from '../search-box/va-search-box.module';\nimport { AdvancedColumnOrganizerButtonComponent } from './actions/advanced-column-organizer/advanced-column-organizer-button.component';\nimport { AdvancedColumnOrganizerComponent } from './actions/advanced-column-organizer/advanced-column-organizer.compontent';\nimport { ColumnSorterComponent } from './actions/column-sorter/column-sorter.component';\nimport { VaMaterialTableComponent } from './va-mat-table.component';\n\n@NgModule({\n declarations: [\n VaMaterialTableComponent,\n ColumnSorterComponent,\n AdvancedColumnOrganizerButtonComponent,\n AdvancedColumnOrganizerComponent,\n ],\n imports: [\n CommonModule,\n MatTableModule,\n MatSortModule,\n MatButtonModule,\n MatIconModule,\n MatCardModule,\n DragDropModule,\n MatMenuModule,\n MatCheckboxModule,\n TranslateModule,\n LexiconModule.forChild({\n componentName: WEBLATE_COMPONENT_NAME,\n baseTranslation: baseTranslation,\n }),\n MatDialogModule,\n VaSearchBoxModule,\n MatTabsModule,\n ],\n exports: [\n VaMaterialTableComponent,\n ColumnSorterComponent,\n AdvancedColumnOrganizerComponent,\n AdvancedColumnOrganizerButtonComponent,\n ],\n})\nexport class VaMaterialTableModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { VaNavItemListComponent } from './nav-item-list.component';\n\n@NgModule({\n imports: [CommonModule, MatButtonModule, MatIconModule],\n declarations: [VaNavItemListComponent],\n exports: [VaNavItemListComponent],\n})\nexport class VaNavItemListModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { VaNavItemComponent } from './nav-item.component';\nimport { RouterModule } from '@angular/router';\n\n@NgModule({\n imports: [CommonModule, MatButtonModule, MatIconModule, RouterModule],\n declarations: [VaNavItemComponent],\n exports: [VaNavItemComponent],\n})\nexport class VaNavItemModule {}\n","import * as i1 from '@angular/cdk/scrolling';\nimport { CdkScrollable, CdkScrollableModule } from '@angular/cdk/scrolling';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, EventEmitter, Optional, Input, Output, ViewChild, QueryList, ANIMATION_MODULE_TYPE, ContentChildren, ContentChild, NgModule } from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport * as i2 from '@angular/cdk/a11y';\nimport * as i4 from '@angular/cdk/bidi';\nimport { coerceBooleanProperty, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport * as i3 from '@angular/cdk/platform';\nimport { DOCUMENT } from '@angular/common';\nimport { Subject, fromEvent, merge } from 'rxjs';\nimport { filter, map, mapTo, takeUntil, distinctUntilChanged, take, startWith, debounceTime } from 'rxjs/operators';\nimport { trigger, state, style, transition, animate } from '@angular/animations';\n\n/**\n * Animations used by the Material drawers.\n * @docs-private\n */\nconst _c0 = [\"*\"];\nconst _c1 = [\"content\"];\nconst _c2 = [[[\"mat-drawer\"]], [[\"mat-drawer-content\"]], \"*\"];\nconst _c3 = [\"mat-drawer\", \"mat-drawer-content\", \"*\"];\nfunction MatDrawerContainer_Conditional_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 1);\n i0.ɵɵlistener(\"click\", function MatDrawerContainer_Conditional_0_Template_div_click_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1._onBackdropClicked());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"mat-drawer-shown\", ctx_r1._isShowingBackdrop());\n }\n}\nfunction MatDrawerContainer_Conditional_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"mat-drawer-content\");\n i0.ɵɵprojection(1, 2);\n i0.ɵɵelementEnd();\n }\n}\nconst _c4 = [[[\"mat-sidenav\"]], [[\"mat-sidenav-content\"]], \"*\"];\nconst _c5 = [\"mat-sidenav\", \"mat-sidenav-content\", \"*\"];\nfunction MatSidenavContainer_Conditional_0_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵelementStart(0, \"div\", 1);\n i0.ɵɵlistener(\"click\", function MatSidenavContainer_Conditional_0_Template_div_click_0_listener() {\n i0.ɵɵrestoreView(_r1);\n const ctx_r1 = i0.ɵɵnextContext();\n return i0.ɵɵresetView(ctx_r1._onBackdropClicked());\n });\n i0.ɵɵelementEnd();\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵclassProp(\"mat-drawer-shown\", ctx_r1._isShowingBackdrop());\n }\n}\nfunction MatSidenavContainer_Conditional_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelementStart(0, \"mat-sidenav-content\");\n i0.ɵɵprojection(1, 2);\n i0.ɵɵelementEnd();\n }\n}\nconst _c6 = \".mat-drawer-container{position:relative;z-index:1;color:var(--mat-sidenav-content-text-color);background-color:var(--mat-sidenav-content-background-color);box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible;background-color:var(--mat-sidenav-scrim-color)}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;color:var(--mat-sidenav-container-text-color);box-shadow:var(--mat-sidenav-container-elevation-shadow);background-color:var(--mat-sidenav-container-background-color);border-top-right-radius:var(--mat-sidenav-container-shape);border-bottom-right-radius:var(--mat-sidenav-container-shape);width:var(--mat-sidenav-container-width);display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0);border-top-left-radius:var(--mat-sidenav-container-shape);border-bottom-left-radius:var(--mat-sidenav-container-shape);border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .mat-drawer{border-top-left-radius:var(--mat-sidenav-container-shape);border-bottom-left-radius:var(--mat-sidenav-container-shape);border-top-right-radius:0;border-bottom-right-radius:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{border-top-right-radius:var(--mat-sidenav-container-shape);border-bottom-right-radius:var(--mat-sidenav-container-shape);border-top-left-radius:0;border-bottom-left-radius:0;left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer[style*=\\\"visibility: hidden\\\"]{display:none}.mat-drawer-side{box-shadow:none;border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid}.mat-drawer-side.mat-drawer-end{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid;border-left:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}\";\nconst matDrawerAnimations = {\n /** Animation that slides a drawer in and out. */\n transformDrawer: /*#__PURE__*/trigger('transform', [\n /*#__PURE__*/\n // We remove the `transform` here completely, rather than setting it to zero, because:\n // 1. Having a transform can cause elements with ripples or an animated\n // transform to shift around in Chrome with an RTL layout (see #10023).\n // 2. 3d transforms causes text to appear blurry on IE and Edge.\n state('open, open-instant', /*#__PURE__*/style({\n 'transform': 'none',\n 'visibility': 'visible'\n })), /*#__PURE__*/state('void', /*#__PURE__*/style({\n // Avoids the shadow showing up when closed in SSR.\n 'box-shadow': 'none',\n 'visibility': 'hidden'\n })), /*#__PURE__*/transition('void => open-instant', /*#__PURE__*/animate('0ms')), /*#__PURE__*/transition('void <=> open, open-instant => void', /*#__PURE__*/animate('400ms cubic-bezier(0.25, 0.8, 0.25, 1)'))])\n};\n\n/**\n * Throws an exception when two MatDrawer are matching the same position.\n * @docs-private\n */\nfunction throwMatDuplicatedDrawerError(position) {\n throw Error(`A drawer was already declared for 'position=\"${position}\"'`);\n}\n/** Configures whether drawers should use auto sizing by default. */\nconst MAT_DRAWER_DEFAULT_AUTOSIZE = /*#__PURE__*/new InjectionToken('MAT_DRAWER_DEFAULT_AUTOSIZE', {\n providedIn: 'root',\n factory: MAT_DRAWER_DEFAULT_AUTOSIZE_FACTORY\n});\n/**\n * Used to provide a drawer container to a drawer while avoiding circular references.\n * @docs-private\n */\nconst MAT_DRAWER_CONTAINER = /*#__PURE__*/new InjectionToken('MAT_DRAWER_CONTAINER');\n/** @docs-private */\nfunction MAT_DRAWER_DEFAULT_AUTOSIZE_FACTORY() {\n return false;\n}\nlet MatDrawerContent = /*#__PURE__*/(() => {\n class MatDrawerContent extends CdkScrollable {\n constructor(_changeDetectorRef, _container, elementRef, scrollDispatcher, ngZone) {\n super(elementRef, scrollDispatcher, ngZone);\n this._changeDetectorRef = _changeDetectorRef;\n this._container = _container;\n }\n ngAfterContentInit() {\n this._container._contentMarginChanges.subscribe(() => {\n this._changeDetectorRef.markForCheck();\n });\n }\n static {\n this.ɵfac = function MatDrawerContent_Factory(t) {\n return new (t || MatDrawerContent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(forwardRef(() => MatDrawerContainer)), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.ScrollDispatcher), i0.ɵɵdirectiveInject(i0.NgZone));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatDrawerContent,\n selectors: [[\"mat-drawer-content\"]],\n hostAttrs: [1, \"mat-drawer-content\"],\n hostVars: 4,\n hostBindings: function MatDrawerContent_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵstyleProp(\"margin-left\", ctx._container._contentMargins.left, \"px\")(\"margin-right\", ctx._container._contentMargins.right, \"px\");\n }\n },\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CdkScrollable,\n useExisting: MatDrawerContent\n }]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c0,\n decls: 1,\n vars: 0,\n template: function MatDrawerContent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵprojection(0);\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatDrawerContent;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * This component corresponds to a drawer that can be opened on the drawer container.\n */\nlet MatDrawer = /*#__PURE__*/(() => {\n class MatDrawer {\n /** The side that the drawer is attached to. */\n get position() {\n return this._position;\n }\n set position(value) {\n // Make sure we have a valid value.\n value = value === 'end' ? 'end' : 'start';\n if (value !== this._position) {\n // Static inputs in Ivy are set before the element is in the DOM.\n if (this._isAttached) {\n this._updatePositionInParent(value);\n }\n this._position = value;\n this.onPositionChanged.emit();\n }\n }\n /** Mode of the drawer; one of 'over', 'push' or 'side'. */\n get mode() {\n return this._mode;\n }\n set mode(value) {\n this._mode = value;\n this._updateFocusTrapState();\n this._modeChanged.next();\n }\n /** Whether the drawer can be closed with the escape key or by clicking on the backdrop. */\n get disableClose() {\n return this._disableClose;\n }\n set disableClose(value) {\n this._disableClose = coerceBooleanProperty(value);\n }\n /**\n * Whether the drawer should focus the first focusable element automatically when opened.\n * Defaults to false in when `mode` is set to `side`, otherwise defaults to `true`. If explicitly\n * enabled, focus will be moved into the sidenav in `side` mode as well.\n * @breaking-change 14.0.0 Remove boolean option from autoFocus. Use string or AutoFocusTarget\n * instead.\n */\n get autoFocus() {\n const value = this._autoFocus;\n // Note that usually we don't allow autoFocus to be set to `first-tabbable` in `side` mode,\n // because we don't know how the sidenav is being used, but in some cases it still makes\n // sense to do it. The consumer can explicitly set `autoFocus`.\n if (value == null) {\n if (this.mode === 'side') {\n return 'dialog';\n } else {\n return 'first-tabbable';\n }\n }\n return value;\n }\n set autoFocus(value) {\n if (value === 'true' || value === 'false' || value == null) {\n value = coerceBooleanProperty(value);\n }\n this._autoFocus = value;\n }\n /**\n * Whether the drawer is opened. We overload this because we trigger an event when it\n * starts or end.\n */\n get opened() {\n return this._opened;\n }\n set opened(value) {\n this.toggle(coerceBooleanProperty(value));\n }\n constructor(_elementRef, _focusTrapFactory, _focusMonitor, _platform, _ngZone, _interactivityChecker, _doc, _container) {\n this._elementRef = _elementRef;\n this._focusTrapFactory = _focusTrapFactory;\n this._focusMonitor = _focusMonitor;\n this._platform = _platform;\n this._ngZone = _ngZone;\n this._interactivityChecker = _interactivityChecker;\n this._doc = _doc;\n this._container = _container;\n this._focusTrap = null;\n this._elementFocusedBeforeDrawerWasOpened = null;\n /** Whether the drawer is initialized. Used for disabling the initial animation. */\n this._enableAnimations = false;\n this._position = 'start';\n this._mode = 'over';\n this._disableClose = false;\n this._opened = false;\n /** Emits whenever the drawer has started animating. */\n this._animationStarted = new Subject();\n /** Emits whenever the drawer is done animating. */\n this._animationEnd = new Subject();\n /** Current state of the sidenav animation. */\n this._animationState = 'void';\n /** Event emitted when the drawer open state is changed. */\n this.openedChange =\n // Note this has to be async in order to avoid some issues with two-bindings (see #8872).\n new EventEmitter( /* isAsync */true);\n /** Event emitted when the drawer has been opened. */\n this._openedStream = this.openedChange.pipe(filter(o => o), map(() => {}));\n /** Event emitted when the drawer has started opening. */\n this.openedStart = this._animationStarted.pipe(filter(e => e.fromState !== e.toState && e.toState.indexOf('open') === 0), mapTo(undefined));\n /** Event emitted when the drawer has been closed. */\n this._closedStream = this.openedChange.pipe(filter(o => !o), map(() => {}));\n /** Event emitted when the drawer has started closing. */\n this.closedStart = this._animationStarted.pipe(filter(e => e.fromState !== e.toState && e.toState === 'void'), mapTo(undefined));\n /** Emits when the component is destroyed. */\n this._destroyed = new Subject();\n /** Event emitted when the drawer's position changes. */\n // tslint:disable-next-line:no-output-on-prefix\n this.onPositionChanged = new EventEmitter();\n /**\n * An observable that emits when the drawer mode changes. This is used by the drawer container to\n * to know when to when the mode changes so it can adapt the margins on the content.\n */\n this._modeChanged = new Subject();\n this.openedChange.subscribe(opened => {\n if (opened) {\n if (this._doc) {\n this._elementFocusedBeforeDrawerWasOpened = this._doc.activeElement;\n }\n this._takeFocus();\n } else if (this._isFocusWithinDrawer()) {\n this._restoreFocus(this._openedVia || 'program');\n }\n });\n /**\n * Listen to `keydown` events outside the zone so that change detection is not run every\n * time a key is pressed. Instead we re-enter the zone only if the `ESC` key is pressed\n * and we don't have close disabled.\n */\n this._ngZone.runOutsideAngular(() => {\n fromEvent(this._elementRef.nativeElement, 'keydown').pipe(filter(event => {\n return event.keyCode === ESCAPE && !this.disableClose && !hasModifierKey(event);\n }), takeUntil(this._destroyed)).subscribe(event => this._ngZone.run(() => {\n this.close();\n event.stopPropagation();\n event.preventDefault();\n }));\n });\n // We need a Subject with distinctUntilChanged, because the `done` event\n // fires twice on some browsers. See https://github.com/angular/angular/issues/24084\n this._animationEnd.pipe(distinctUntilChanged((x, y) => {\n return x.fromState === y.fromState && x.toState === y.toState;\n })).subscribe(event => {\n const {\n fromState,\n toState\n } = event;\n if (toState.indexOf('open') === 0 && fromState === 'void' || toState === 'void' && fromState.indexOf('open') === 0) {\n this.openedChange.emit(this._opened);\n }\n });\n }\n /**\n * Focuses the provided element. If the element is not focusable, it will add a tabIndex\n * attribute to forcefully focus it. The attribute is removed after focus is moved.\n * @param element The element to focus.\n */\n _forceFocus(element, options) {\n if (!this._interactivityChecker.isFocusable(element)) {\n element.tabIndex = -1;\n // The tabindex attribute should be removed to avoid navigating to that element again\n this._ngZone.runOutsideAngular(() => {\n const callback = () => {\n element.removeEventListener('blur', callback);\n element.removeEventListener('mousedown', callback);\n element.removeAttribute('tabindex');\n };\n element.addEventListener('blur', callback);\n element.addEventListener('mousedown', callback);\n });\n }\n element.focus(options);\n }\n /**\n * Focuses the first element that matches the given selector within the focus trap.\n * @param selector The CSS selector for the element to set focus to.\n */\n _focusByCssSelector(selector, options) {\n let elementToFocus = this._elementRef.nativeElement.querySelector(selector);\n if (elementToFocus) {\n this._forceFocus(elementToFocus, options);\n }\n }\n /**\n * Moves focus into the drawer. Note that this works even if\n * the focus trap is disabled in `side` mode.\n */\n _takeFocus() {\n if (!this._focusTrap) {\n return;\n }\n const element = this._elementRef.nativeElement;\n // When autoFocus is not on the sidenav, if the element cannot be focused or does\n // not exist, focus the sidenav itself so the keyboard navigation still works.\n // We need to check that `focus` is a function due to Universal.\n switch (this.autoFocus) {\n case false:\n case 'dialog':\n return;\n case true:\n case 'first-tabbable':\n this._focusTrap.focusInitialElementWhenReady().then(hasMovedFocus => {\n if (!hasMovedFocus && typeof this._elementRef.nativeElement.focus === 'function') {\n element.focus();\n }\n });\n break;\n case 'first-heading':\n this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role=\"heading\"]');\n break;\n default:\n this._focusByCssSelector(this.autoFocus);\n break;\n }\n }\n /**\n * Restores focus to the element that was originally focused when the drawer opened.\n * If no element was focused at that time, the focus will be restored to the drawer.\n */\n _restoreFocus(focusOrigin) {\n if (this.autoFocus === 'dialog') {\n return;\n }\n if (this._elementFocusedBeforeDrawerWasOpened) {\n this._focusMonitor.focusVia(this._elementFocusedBeforeDrawerWasOpened, focusOrigin);\n } else {\n this._elementRef.nativeElement.blur();\n }\n this._elementFocusedBeforeDrawerWasOpened = null;\n }\n /** Whether focus is currently within the drawer. */\n _isFocusWithinDrawer() {\n const activeEl = this._doc.activeElement;\n return !!activeEl && this._elementRef.nativeElement.contains(activeEl);\n }\n ngAfterViewInit() {\n this._isAttached = true;\n // Only update the DOM position when the sidenav is positioned at\n // the end since we project the sidenav before the content by default.\n if (this._position === 'end') {\n this._updatePositionInParent('end');\n }\n // Needs to happen after the position is updated\n // so the focus trap anchors are in the right place.\n if (this._platform.isBrowser) {\n this._focusTrap = this._focusTrapFactory.create(this._elementRef.nativeElement);\n this._updateFocusTrapState();\n }\n }\n ngAfterContentChecked() {\n // Enable the animations after the lifecycle hooks have run, in order to avoid animating\n // drawers that are open by default. When we're on the server, we shouldn't enable the\n // animations, because we don't want the drawer to animate the first time the user sees\n // the page.\n if (this._platform.isBrowser) {\n this._enableAnimations = true;\n }\n }\n ngOnDestroy() {\n this._focusTrap?.destroy();\n this._anchor?.remove();\n this._anchor = null;\n this._animationStarted.complete();\n this._animationEnd.complete();\n this._modeChanged.complete();\n this._destroyed.next();\n this._destroyed.complete();\n }\n /**\n * Open the drawer.\n * @param openedVia Whether the drawer was opened by a key press, mouse click or programmatically.\n * Used for focus management after the sidenav is closed.\n */\n open(openedVia) {\n return this.toggle(true, openedVia);\n }\n /** Close the drawer. */\n close() {\n return this.toggle(false);\n }\n /** Closes the drawer with context that the backdrop was clicked. */\n _closeViaBackdropClick() {\n // If the drawer is closed upon a backdrop click, we always want to restore focus. We\n // don't need to check whether focus is currently in the drawer, as clicking on the\n // backdrop causes blurs the active element.\n return this._setOpen( /* isOpen */false, /* restoreFocus */true, 'mouse');\n }\n /**\n * Toggle this drawer.\n * @param isOpen Whether the drawer should be open.\n * @param openedVia Whether the drawer was opened by a key press, mouse click or programmatically.\n * Used for focus management after the sidenav is closed.\n */\n toggle(isOpen = !this.opened, openedVia) {\n // If the focus is currently inside the drawer content and we are closing the drawer,\n // restore the focus to the initially focused element (when the drawer opened).\n if (isOpen && openedVia) {\n this._openedVia = openedVia;\n }\n const result = this._setOpen(isOpen, /* restoreFocus */!isOpen && this._isFocusWithinDrawer(), this._openedVia || 'program');\n if (!isOpen) {\n this._openedVia = null;\n }\n return result;\n }\n /**\n * Toggles the opened state of the drawer.\n * @param isOpen Whether the drawer should open or close.\n * @param restoreFocus Whether focus should be restored on close.\n * @param focusOrigin Origin to use when restoring focus.\n */\n _setOpen(isOpen, restoreFocus, focusOrigin) {\n this._opened = isOpen;\n if (isOpen) {\n this._animationState = this._enableAnimations ? 'open' : 'open-instant';\n } else {\n this._animationState = 'void';\n if (restoreFocus) {\n this._restoreFocus(focusOrigin);\n }\n }\n this._updateFocusTrapState();\n return new Promise(resolve => {\n this.openedChange.pipe(take(1)).subscribe(open => resolve(open ? 'open' : 'close'));\n });\n }\n _getWidth() {\n return this._elementRef.nativeElement ? this._elementRef.nativeElement.offsetWidth || 0 : 0;\n }\n /** Updates the enabled state of the focus trap. */\n _updateFocusTrapState() {\n if (this._focusTrap) {\n // Trap focus only if the backdrop is enabled. Otherwise, allow end user to interact with the\n // sidenav content.\n this._focusTrap.enabled = !!this._container?.hasBackdrop;\n }\n }\n /**\n * Updates the position of the drawer in the DOM. We need to move the element around ourselves\n * when it's in the `end` position so that it comes after the content and the visual order\n * matches the tab order. We also need to be able to move it back to `start` if the sidenav\n * started off as `end` and was changed to `start`.\n */\n _updatePositionInParent(newPosition) {\n // Don't move the DOM node around on the server, because it can throw off hydration.\n if (!this._platform.isBrowser) {\n return;\n }\n const element = this._elementRef.nativeElement;\n const parent = element.parentNode;\n if (newPosition === 'end') {\n if (!this._anchor) {\n this._anchor = this._doc.createComment('mat-drawer-anchor');\n parent.insertBefore(this._anchor, element);\n }\n parent.appendChild(element);\n } else if (this._anchor) {\n this._anchor.parentNode.insertBefore(element, this._anchor);\n }\n }\n static {\n this.ɵfac = function MatDrawer_Factory(t) {\n return new (t || MatDrawer)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i2.FocusTrapFactory), i0.ɵɵdirectiveInject(i2.FocusMonitor), i0.ɵɵdirectiveInject(i3.Platform), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i2.InteractivityChecker), i0.ɵɵdirectiveInject(DOCUMENT, 8), i0.ɵɵdirectiveInject(MAT_DRAWER_CONTAINER, 8));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatDrawer,\n selectors: [[\"mat-drawer\"]],\n viewQuery: function MatDrawer_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c1, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._content = _t.first);\n }\n },\n hostAttrs: [\"tabIndex\", \"-1\", 1, \"mat-drawer\"],\n hostVars: 12,\n hostBindings: function MatDrawer_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵsyntheticHostListener(\"@transform.start\", function MatDrawer_animation_transform_start_HostBindingHandler($event) {\n return ctx._animationStarted.next($event);\n })(\"@transform.done\", function MatDrawer_animation_transform_done_HostBindingHandler($event) {\n return ctx._animationEnd.next($event);\n });\n }\n if (rf & 2) {\n i0.ɵɵsyntheticHostProperty(\"@transform\", ctx._animationState);\n i0.ɵɵattribute(\"align\", null);\n i0.ɵɵclassProp(\"mat-drawer-end\", ctx.position === \"end\")(\"mat-drawer-over\", ctx.mode === \"over\")(\"mat-drawer-push\", ctx.mode === \"push\")(\"mat-drawer-side\", ctx.mode === \"side\")(\"mat-drawer-opened\", ctx.opened);\n }\n },\n inputs: {\n position: \"position\",\n mode: \"mode\",\n disableClose: \"disableClose\",\n autoFocus: \"autoFocus\",\n opened: \"opened\"\n },\n outputs: {\n openedChange: \"openedChange\",\n _openedStream: \"opened\",\n openedStart: \"openedStart\",\n _closedStream: \"closed\",\n closedStart: \"closedStart\",\n onPositionChanged: \"positionChanged\"\n },\n exportAs: [\"matDrawer\"],\n standalone: true,\n features: [i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c0,\n decls: 3,\n vars: 0,\n consts: [[\"content\", \"\"], [\"cdkScrollable\", \"\", 1, \"mat-drawer-inner-container\"]],\n template: function MatDrawer_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"div\", 1, 0);\n i0.ɵɵprojection(2);\n i0.ɵɵelementEnd();\n }\n },\n dependencies: [CdkScrollable],\n encapsulation: 2,\n data: {\n animation: [matDrawerAnimations.transformDrawer]\n },\n changeDetection: 0\n });\n }\n }\n return MatDrawer;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * `` component.\n *\n * This is the parent component to one or two ``s that validates the state internally\n * and coordinates the backdrop and content styling.\n */\nlet MatDrawerContainer = /*#__PURE__*/(() => {\n class MatDrawerContainer {\n /** The drawer child with the `start` position. */\n get start() {\n return this._start;\n }\n /** The drawer child with the `end` position. */\n get end() {\n return this._end;\n }\n /**\n * Whether to automatically resize the container whenever\n * the size of any of its drawers changes.\n *\n * **Use at your own risk!** Enabling this option can cause layout thrashing by measuring\n * the drawers on every change detection cycle. Can be configured globally via the\n * `MAT_DRAWER_DEFAULT_AUTOSIZE` token.\n */\n get autosize() {\n return this._autosize;\n }\n set autosize(value) {\n this._autosize = coerceBooleanProperty(value);\n }\n /**\n * Whether the drawer container should have a backdrop while one of the sidenavs is open.\n * If explicitly set to `true`, the backdrop will be enabled for drawers in the `side`\n * mode as well.\n */\n get hasBackdrop() {\n return this._drawerHasBackdrop(this._start) || this._drawerHasBackdrop(this._end);\n }\n set hasBackdrop(value) {\n this._backdropOverride = value == null ? null : coerceBooleanProperty(value);\n }\n /** Reference to the CdkScrollable instance that wraps the scrollable content. */\n get scrollable() {\n return this._userContent || this._content;\n }\n constructor(_dir, _element, _ngZone, _changeDetectorRef, viewportRuler, defaultAutosize = false, _animationMode) {\n this._dir = _dir;\n this._element = _element;\n this._ngZone = _ngZone;\n this._changeDetectorRef = _changeDetectorRef;\n this._animationMode = _animationMode;\n /** Drawers that belong to this container. */\n this._drawers = new QueryList();\n /** Event emitted when the drawer backdrop is clicked. */\n this.backdropClick = new EventEmitter();\n /** Emits when the component is destroyed. */\n this._destroyed = new Subject();\n /** Emits on every ngDoCheck. Used for debouncing reflows. */\n this._doCheckSubject = new Subject();\n /**\n * Margins to be applied to the content. These are used to push / shrink the drawer content when a\n * drawer is open. We use margin rather than transform even for push mode because transform breaks\n * fixed position elements inside of the transformed element.\n */\n this._contentMargins = {\n left: null,\n right: null\n };\n this._contentMarginChanges = new Subject();\n // If a `Dir` directive exists up the tree, listen direction changes\n // and update the left/right properties to point to the proper start/end.\n if (_dir) {\n _dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => {\n this._validateDrawers();\n this.updateContentMargins();\n });\n }\n // Since the minimum width of the sidenav depends on the viewport width,\n // we need to recompute the margins if the viewport changes.\n viewportRuler.change().pipe(takeUntil(this._destroyed)).subscribe(() => this.updateContentMargins());\n this._autosize = defaultAutosize;\n }\n ngAfterContentInit() {\n this._allDrawers.changes.pipe(startWith(this._allDrawers), takeUntil(this._destroyed)).subscribe(drawer => {\n this._drawers.reset(drawer.filter(item => !item._container || item._container === this));\n this._drawers.notifyOnChanges();\n });\n this._drawers.changes.pipe(startWith(null)).subscribe(() => {\n this._validateDrawers();\n this._drawers.forEach(drawer => {\n this._watchDrawerToggle(drawer);\n this._watchDrawerPosition(drawer);\n this._watchDrawerMode(drawer);\n });\n if (!this._drawers.length || this._isDrawerOpen(this._start) || this._isDrawerOpen(this._end)) {\n this.updateContentMargins();\n }\n this._changeDetectorRef.markForCheck();\n });\n // Avoid hitting the NgZone through the debounce timeout.\n this._ngZone.runOutsideAngular(() => {\n this._doCheckSubject.pipe(debounceTime(10),\n // Arbitrary debounce time, less than a frame at 60fps\n takeUntil(this._destroyed)).subscribe(() => this.updateContentMargins());\n });\n }\n ngOnDestroy() {\n this._contentMarginChanges.complete();\n this._doCheckSubject.complete();\n this._drawers.destroy();\n this._destroyed.next();\n this._destroyed.complete();\n }\n /** Calls `open` of both start and end drawers */\n open() {\n this._drawers.forEach(drawer => drawer.open());\n }\n /** Calls `close` of both start and end drawers */\n close() {\n this._drawers.forEach(drawer => drawer.close());\n }\n /**\n * Recalculates and updates the inline styles for the content. Note that this should be used\n * sparingly, because it causes a reflow.\n */\n updateContentMargins() {\n // 1. For drawers in `over` mode, they don't affect the content.\n // 2. For drawers in `side` mode they should shrink the content. We do this by adding to the\n // left margin (for left drawer) or right margin (for right the drawer).\n // 3. For drawers in `push` mode the should shift the content without resizing it. We do this by\n // adding to the left or right margin and simultaneously subtracting the same amount of\n // margin from the other side.\n let left = 0;\n let right = 0;\n if (this._left && this._left.opened) {\n if (this._left.mode == 'side') {\n left += this._left._getWidth();\n } else if (this._left.mode == 'push') {\n const width = this._left._getWidth();\n left += width;\n right -= width;\n }\n }\n if (this._right && this._right.opened) {\n if (this._right.mode == 'side') {\n right += this._right._getWidth();\n } else if (this._right.mode == 'push') {\n const width = this._right._getWidth();\n right += width;\n left -= width;\n }\n }\n // If either `right` or `left` is zero, don't set a style to the element. This\n // allows users to specify a custom size via CSS class in SSR scenarios where the\n // measured widths will always be zero. Note that we reset to `null` here, rather\n // than below, in order to ensure that the types in the `if` below are consistent.\n left = left || null;\n right = right || null;\n if (left !== this._contentMargins.left || right !== this._contentMargins.right) {\n this._contentMargins = {\n left,\n right\n };\n // Pull back into the NgZone since in some cases we could be outside. We need to be careful\n // to do it only when something changed, otherwise we can end up hitting the zone too often.\n this._ngZone.run(() => this._contentMarginChanges.next(this._contentMargins));\n }\n }\n ngDoCheck() {\n // If users opted into autosizing, do a check every change detection cycle.\n if (this._autosize && this._isPushed()) {\n // Run outside the NgZone, otherwise the debouncer will throw us into an infinite loop.\n this._ngZone.runOutsideAngular(() => this._doCheckSubject.next());\n }\n }\n /**\n * Subscribes to drawer events in order to set a class on the main container element when the\n * drawer is open and the backdrop is visible. This ensures any overflow on the container element\n * is properly hidden.\n */\n _watchDrawerToggle(drawer) {\n drawer._animationStarted.pipe(filter(event => event.fromState !== event.toState), takeUntil(this._drawers.changes)).subscribe(event => {\n // Set the transition class on the container so that the animations occur. This should not\n // be set initially because animations should only be triggered via a change in state.\n if (event.toState !== 'open-instant' && this._animationMode !== 'NoopAnimations') {\n this._element.nativeElement.classList.add('mat-drawer-transition');\n }\n this.updateContentMargins();\n this._changeDetectorRef.markForCheck();\n });\n if (drawer.mode !== 'side') {\n drawer.openedChange.pipe(takeUntil(this._drawers.changes)).subscribe(() => this._setContainerClass(drawer.opened));\n }\n }\n /**\n * Subscribes to drawer onPositionChanged event in order to\n * re-validate drawers when the position changes.\n */\n _watchDrawerPosition(drawer) {\n if (!drawer) {\n return;\n }\n // NOTE: We need to wait for the microtask queue to be empty before validating,\n // since both drawers may be swapping positions at the same time.\n drawer.onPositionChanged.pipe(takeUntil(this._drawers.changes)).subscribe(() => {\n this._ngZone.onMicrotaskEmpty.pipe(take(1)).subscribe(() => {\n this._validateDrawers();\n });\n });\n }\n /** Subscribes to changes in drawer mode so we can run change detection. */\n _watchDrawerMode(drawer) {\n if (drawer) {\n drawer._modeChanged.pipe(takeUntil(merge(this._drawers.changes, this._destroyed))).subscribe(() => {\n this.updateContentMargins();\n this._changeDetectorRef.markForCheck();\n });\n }\n }\n /** Toggles the 'mat-drawer-opened' class on the main 'mat-drawer-container' element. */\n _setContainerClass(isAdd) {\n const classList = this._element.nativeElement.classList;\n const className = 'mat-drawer-container-has-open';\n if (isAdd) {\n classList.add(className);\n } else {\n classList.remove(className);\n }\n }\n /** Validate the state of the drawer children components. */\n _validateDrawers() {\n this._start = this._end = null;\n // Ensure that we have at most one start and one end drawer.\n this._drawers.forEach(drawer => {\n if (drawer.position == 'end') {\n if (this._end != null && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwMatDuplicatedDrawerError('end');\n }\n this._end = drawer;\n } else {\n if (this._start != null && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throwMatDuplicatedDrawerError('start');\n }\n this._start = drawer;\n }\n });\n this._right = this._left = null;\n // Detect if we're LTR or RTL.\n if (this._dir && this._dir.value === 'rtl') {\n this._left = this._end;\n this._right = this._start;\n } else {\n this._left = this._start;\n this._right = this._end;\n }\n }\n /** Whether the container is being pushed to the side by one of the drawers. */\n _isPushed() {\n return this._isDrawerOpen(this._start) && this._start.mode != 'over' || this._isDrawerOpen(this._end) && this._end.mode != 'over';\n }\n _onBackdropClicked() {\n this.backdropClick.emit();\n this._closeModalDrawersViaBackdrop();\n }\n _closeModalDrawersViaBackdrop() {\n // Close all open drawers where closing is not disabled and the mode is not `side`.\n [this._start, this._end].filter(drawer => drawer && !drawer.disableClose && this._drawerHasBackdrop(drawer)).forEach(drawer => drawer._closeViaBackdropClick());\n }\n _isShowingBackdrop() {\n return this._isDrawerOpen(this._start) && this._drawerHasBackdrop(this._start) || this._isDrawerOpen(this._end) && this._drawerHasBackdrop(this._end);\n }\n _isDrawerOpen(drawer) {\n return drawer != null && drawer.opened;\n }\n // Whether argument drawer should have a backdrop when it opens\n _drawerHasBackdrop(drawer) {\n if (this._backdropOverride == null) {\n return !!drawer && drawer.mode !== 'side';\n }\n return this._backdropOverride;\n }\n static {\n this.ɵfac = function MatDrawerContainer_Factory(t) {\n return new (t || MatDrawerContainer)(i0.ɵɵdirectiveInject(i4.Directionality, 8), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1.ViewportRuler), i0.ɵɵdirectiveInject(MAT_DRAWER_DEFAULT_AUTOSIZE), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatDrawerContainer,\n selectors: [[\"mat-drawer-container\"]],\n contentQueries: function MatDrawerContainer_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatDrawerContent, 5);\n i0.ɵɵcontentQuery(dirIndex, MatDrawer, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._content = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._allDrawers = _t);\n }\n },\n viewQuery: function MatDrawerContainer_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(MatDrawerContent, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._userContent = _t.first);\n }\n },\n hostAttrs: [1, \"mat-drawer-container\"],\n hostVars: 2,\n hostBindings: function MatDrawerContainer_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"mat-drawer-container-explicit-backdrop\", ctx._backdropOverride);\n }\n },\n inputs: {\n autosize: \"autosize\",\n hasBackdrop: \"hasBackdrop\"\n },\n outputs: {\n backdropClick: \"backdropClick\"\n },\n exportAs: [\"matDrawerContainer\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: MAT_DRAWER_CONTAINER,\n useExisting: MatDrawerContainer\n }]), i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c3,\n decls: 4,\n vars: 2,\n consts: [[1, \"mat-drawer-backdrop\"], [1, \"mat-drawer-backdrop\", 3, \"click\"]],\n template: function MatDrawerContainer_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef(_c2);\n i0.ɵɵtemplate(0, MatDrawerContainer_Conditional_0_Template, 1, 2, \"div\", 0);\n i0.ɵɵprojection(1);\n i0.ɵɵprojection(2, 1);\n i0.ɵɵtemplate(3, MatDrawerContainer_Conditional_3_Template, 2, 0, \"mat-drawer-content\");\n }\n if (rf & 2) {\n i0.ɵɵconditional(0, ctx.hasBackdrop ? 0 : -1);\n i0.ɵɵadvance(3);\n i0.ɵɵconditional(3, !ctx._content ? 3 : -1);\n }\n },\n dependencies: [MatDrawerContent],\n styles: [\".mat-drawer-container{position:relative;z-index:1;color:var(--mat-sidenav-content-text-color);background-color:var(--mat-sidenav-content-background-color);box-sizing:border-box;-webkit-overflow-scrolling:touch;display:block;overflow:hidden}.mat-drawer-container[fullscreen]{top:0;left:0;right:0;bottom:0;position:absolute}.mat-drawer-container[fullscreen].mat-drawer-container-has-open{overflow:hidden}.mat-drawer-container.mat-drawer-container-explicit-backdrop .mat-drawer-side{z-index:3}.mat-drawer-container.ng-animate-disabled .mat-drawer-backdrop,.mat-drawer-container.ng-animate-disabled .mat-drawer-content,.ng-animate-disabled .mat-drawer-container .mat-drawer-backdrop,.ng-animate-disabled .mat-drawer-container .mat-drawer-content{transition:none}.mat-drawer-backdrop{top:0;left:0;right:0;bottom:0;position:absolute;display:block;z-index:3;visibility:hidden}.mat-drawer-backdrop.mat-drawer-shown{visibility:visible;background-color:var(--mat-sidenav-scrim-color)}.mat-drawer-transition .mat-drawer-backdrop{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:background-color,visibility}.cdk-high-contrast-active .mat-drawer-backdrop{opacity:.5}.mat-drawer-content{position:relative;z-index:1;display:block;height:100%;overflow:auto}.mat-drawer-transition .mat-drawer-content{transition-duration:400ms;transition-timing-function:cubic-bezier(0.25, 0.8, 0.25, 1);transition-property:transform,margin-left,margin-right}.mat-drawer{position:relative;z-index:4;color:var(--mat-sidenav-container-text-color);box-shadow:var(--mat-sidenav-container-elevation-shadow);background-color:var(--mat-sidenav-container-background-color);border-top-right-radius:var(--mat-sidenav-container-shape);border-bottom-right-radius:var(--mat-sidenav-container-shape);width:var(--mat-sidenav-container-width);display:block;position:absolute;top:0;bottom:0;z-index:3;outline:0;box-sizing:border-box;overflow-y:auto;transform:translate3d(-100%, 0, 0)}.cdk-high-contrast-active .mat-drawer,.cdk-high-contrast-active [dir=rtl] .mat-drawer.mat-drawer-end{border-right:solid 1px currentColor}.cdk-high-contrast-active [dir=rtl] .mat-drawer,.cdk-high-contrast-active .mat-drawer.mat-drawer-end{border-left:solid 1px currentColor;border-right:none}.mat-drawer.mat-drawer-side{z-index:2}.mat-drawer.mat-drawer-end{right:0;transform:translate3d(100%, 0, 0);border-top-left-radius:var(--mat-sidenav-container-shape);border-bottom-left-radius:var(--mat-sidenav-container-shape);border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .mat-drawer{border-top-left-radius:var(--mat-sidenav-container-shape);border-bottom-left-radius:var(--mat-sidenav-container-shape);border-top-right-radius:0;border-bottom-right-radius:0;transform:translate3d(100%, 0, 0)}[dir=rtl] .mat-drawer.mat-drawer-end{border-top-right-radius:var(--mat-sidenav-container-shape);border-bottom-right-radius:var(--mat-sidenav-container-shape);border-top-left-radius:0;border-bottom-left-radius:0;left:0;right:auto;transform:translate3d(-100%, 0, 0)}.mat-drawer[style*=\\\"visibility: hidden\\\"]{display:none}.mat-drawer-side{box-shadow:none;border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid}.mat-drawer-side.mat-drawer-end{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side{border-left-color:var(--mat-sidenav-container-divider-color);border-left-width:1px;border-left-style:solid;border-right:none}[dir=rtl] .mat-drawer-side.mat-drawer-end{border-right-color:var(--mat-sidenav-container-divider-color);border-right-width:1px;border-right-style:solid;border-left:none}.mat-drawer-inner-container{width:100%;height:100%;overflow:auto;-webkit-overflow-scrolling:touch}.mat-sidenav-fixed{position:fixed}\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatDrawerContainer;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatSidenavContent = /*#__PURE__*/(() => {\n class MatSidenavContent extends MatDrawerContent {\n constructor(changeDetectorRef, container, elementRef, scrollDispatcher, ngZone) {\n super(changeDetectorRef, container, elementRef, scrollDispatcher, ngZone);\n }\n static {\n this.ɵfac = function MatSidenavContent_Factory(t) {\n return new (t || MatSidenavContent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(forwardRef(() => MatSidenavContainer)), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.ScrollDispatcher), i0.ɵɵdirectiveInject(i0.NgZone));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatSidenavContent,\n selectors: [[\"mat-sidenav-content\"]],\n hostAttrs: [1, \"mat-drawer-content\", \"mat-sidenav-content\"],\n hostVars: 4,\n hostBindings: function MatSidenavContent_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵstyleProp(\"margin-left\", ctx._container._contentMargins.left, \"px\")(\"margin-right\", ctx._container._contentMargins.right, \"px\");\n }\n },\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: CdkScrollable,\n useExisting: MatSidenavContent\n }]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c0,\n decls: 1,\n vars: 0,\n template: function MatSidenavContent_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵprojection(0);\n }\n },\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatSidenavContent;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatSidenav = /*#__PURE__*/(() => {\n class MatSidenav extends MatDrawer {\n constructor() {\n super(...arguments);\n this._fixedInViewport = false;\n this._fixedTopGap = 0;\n this._fixedBottomGap = 0;\n }\n /** Whether the sidenav is fixed in the viewport. */\n get fixedInViewport() {\n return this._fixedInViewport;\n }\n set fixedInViewport(value) {\n this._fixedInViewport = coerceBooleanProperty(value);\n }\n /**\n * The gap between the top of the sidenav and the top of the viewport when the sidenav is in fixed\n * mode.\n */\n get fixedTopGap() {\n return this._fixedTopGap;\n }\n set fixedTopGap(value) {\n this._fixedTopGap = coerceNumberProperty(value);\n }\n /**\n * The gap between the bottom of the sidenav and the bottom of the viewport when the sidenav is in\n * fixed mode.\n */\n get fixedBottomGap() {\n return this._fixedBottomGap;\n }\n set fixedBottomGap(value) {\n this._fixedBottomGap = coerceNumberProperty(value);\n }\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵMatSidenav_BaseFactory;\n return function MatSidenav_Factory(t) {\n return (ɵMatSidenav_BaseFactory || (ɵMatSidenav_BaseFactory = i0.ɵɵgetInheritedFactory(MatSidenav)))(t || MatSidenav);\n };\n })();\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatSidenav,\n selectors: [[\"mat-sidenav\"]],\n hostAttrs: [\"tabIndex\", \"-1\", 1, \"mat-drawer\", \"mat-sidenav\"],\n hostVars: 17,\n hostBindings: function MatSidenav_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"align\", null);\n i0.ɵɵstyleProp(\"top\", ctx.fixedInViewport ? ctx.fixedTopGap : null, \"px\")(\"bottom\", ctx.fixedInViewport ? ctx.fixedBottomGap : null, \"px\");\n i0.ɵɵclassProp(\"mat-drawer-end\", ctx.position === \"end\")(\"mat-drawer-over\", ctx.mode === \"over\")(\"mat-drawer-push\", ctx.mode === \"push\")(\"mat-drawer-side\", ctx.mode === \"side\")(\"mat-drawer-opened\", ctx.opened)(\"mat-sidenav-fixed\", ctx.fixedInViewport);\n }\n },\n inputs: {\n fixedInViewport: \"fixedInViewport\",\n fixedTopGap: \"fixedTopGap\",\n fixedBottomGap: \"fixedBottomGap\"\n },\n exportAs: [\"matSidenav\"],\n standalone: true,\n features: [i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c0,\n decls: 3,\n vars: 0,\n consts: [[\"content\", \"\"], [\"cdkScrollable\", \"\", 1, \"mat-drawer-inner-container\"]],\n template: function MatSidenav_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"div\", 1, 0);\n i0.ɵɵprojection(2);\n i0.ɵɵelementEnd();\n }\n },\n dependencies: [CdkScrollable],\n encapsulation: 2,\n data: {\n animation: [matDrawerAnimations.transformDrawer]\n },\n changeDetection: 0\n });\n }\n }\n return MatSidenav;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatSidenavContainer = /*#__PURE__*/(() => {\n class MatSidenavContainer extends MatDrawerContainer {\n constructor() {\n super(...arguments);\n this._allDrawers = undefined;\n // We need an initializer here to avoid a TS error.\n this._content = undefined;\n }\n static {\n this.ɵfac = /* @__PURE__ */(() => {\n let ɵMatSidenavContainer_BaseFactory;\n return function MatSidenavContainer_Factory(t) {\n return (ɵMatSidenavContainer_BaseFactory || (ɵMatSidenavContainer_BaseFactory = i0.ɵɵgetInheritedFactory(MatSidenavContainer)))(t || MatSidenavContainer);\n };\n })();\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatSidenavContainer,\n selectors: [[\"mat-sidenav-container\"]],\n contentQueries: function MatSidenavContainer_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatSidenavContent, 5);\n i0.ɵɵcontentQuery(dirIndex, MatSidenav, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._content = _t.first);\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._allDrawers = _t);\n }\n },\n hostAttrs: [1, \"mat-drawer-container\", \"mat-sidenav-container\"],\n hostVars: 2,\n hostBindings: function MatSidenavContainer_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"mat-drawer-container-explicit-backdrop\", ctx._backdropOverride);\n }\n },\n exportAs: [\"matSidenavContainer\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([{\n provide: MAT_DRAWER_CONTAINER,\n useExisting: MatSidenavContainer\n }]), i0.ɵɵInheritDefinitionFeature, i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c5,\n decls: 4,\n vars: 2,\n consts: [[1, \"mat-drawer-backdrop\"], [1, \"mat-drawer-backdrop\", 3, \"click\"]],\n template: function MatSidenavContainer_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef(_c4);\n i0.ɵɵtemplate(0, MatSidenavContainer_Conditional_0_Template, 1, 2, \"div\", 0);\n i0.ɵɵprojection(1);\n i0.ɵɵprojection(2, 1);\n i0.ɵɵtemplate(3, MatSidenavContainer_Conditional_3_Template, 2, 0, \"mat-sidenav-content\");\n }\n if (rf & 2) {\n i0.ɵɵconditional(0, ctx.hasBackdrop ? 0 : -1);\n i0.ɵɵadvance(3);\n i0.ɵɵconditional(3, !ctx._content ? 3 : -1);\n }\n },\n dependencies: [MatSidenavContent],\n styles: [_c6],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatSidenavContainer;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatSidenavModule = /*#__PURE__*/(() => {\n class MatSidenavModule {\n static {\n this.ɵfac = function MatSidenavModule_Factory(t) {\n return new (t || MatSidenavModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MatSidenavModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [MatCommonModule, CdkScrollableModule, CdkScrollableModule, MatCommonModule]\n });\n }\n }\n return MatSidenavModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_DRAWER_DEFAULT_AUTOSIZE, MAT_DRAWER_DEFAULT_AUTOSIZE_FACTORY, MatDrawer, MatDrawerContainer, MatDrawerContent, MatSidenav, MatSidenavContainer, MatSidenavContent, MatSidenavModule, matDrawerAnimations, throwMatDuplicatedDrawerError };\n","import * as i0 from '@angular/core';\nimport { Directive, Component, ChangeDetectionStrategy, ViewEncapsulation, Inject, Input, ContentChildren, NgModule } from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport * as i1 from '@angular/cdk/platform';\nimport { DOCUMENT } from '@angular/common';\nconst _c0 = [\"*\", [[\"mat-toolbar-row\"]]];\nconst _c1 = [\"*\", \"mat-toolbar-row\"];\nlet MatToolbarRow = /*#__PURE__*/(() => {\n class MatToolbarRow {\n static {\n this.ɵfac = function MatToolbarRow_Factory(t) {\n return new (t || MatToolbarRow)();\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatToolbarRow,\n selectors: [[\"mat-toolbar-row\"]],\n hostAttrs: [1, \"mat-toolbar-row\"],\n exportAs: [\"matToolbarRow\"],\n standalone: true\n });\n }\n }\n return MatToolbarRow;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatToolbar = /*#__PURE__*/(() => {\n class MatToolbar {\n constructor(_elementRef, _platform, document) {\n this._elementRef = _elementRef;\n this._platform = _platform;\n // TODO: make the document a required param when doing breaking changes.\n this._document = document;\n }\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n this._checkToolbarMixedModes();\n this._toolbarRows.changes.subscribe(() => this._checkToolbarMixedModes());\n }\n }\n /**\n * Throws an exception when developers are attempting to combine the different toolbar row modes.\n */\n _checkToolbarMixedModes() {\n if (this._toolbarRows.length && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n // Check if there are any other DOM nodes that can display content but aren't inside of\n // a element.\n const isCombinedUsage = Array.from(this._elementRef.nativeElement.childNodes).filter(node => !(node.classList && node.classList.contains('mat-toolbar-row'))).filter(node => node.nodeType !== (this._document ? this._document.COMMENT_NODE : 8)).some(node => !!(node.textContent && node.textContent.trim()));\n if (isCombinedUsage) {\n throwToolbarMixedModesError();\n }\n }\n }\n static {\n this.ɵfac = function MatToolbar_Factory(t) {\n return new (t || MatToolbar)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.Platform), i0.ɵɵdirectiveInject(DOCUMENT));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatToolbar,\n selectors: [[\"mat-toolbar\"]],\n contentQueries: function MatToolbar_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatToolbarRow, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._toolbarRows = _t);\n }\n },\n hostAttrs: [1, \"mat-toolbar\"],\n hostVars: 6,\n hostBindings: function MatToolbar_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassMap(ctx.color ? \"mat-\" + ctx.color : \"\");\n i0.ɵɵclassProp(\"mat-toolbar-multiple-rows\", ctx._toolbarRows.length > 0)(\"mat-toolbar-single-row\", ctx._toolbarRows.length === 0);\n }\n },\n inputs: {\n color: \"color\"\n },\n exportAs: [\"matToolbar\"],\n standalone: true,\n features: [i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c1,\n decls: 2,\n vars: 0,\n template: function MatToolbar_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵprojectionDef(_c0);\n i0.ɵɵprojection(0);\n i0.ɵɵprojection(1, 1);\n }\n },\n styles: [\".mat-toolbar{background:var(--mat-toolbar-container-background-color);color:var(--mat-toolbar-container-text-color)}.mat-toolbar,.mat-toolbar h1,.mat-toolbar h2,.mat-toolbar h3,.mat-toolbar h4,.mat-toolbar h5,.mat-toolbar h6{font-family:var(--mat-toolbar-title-text-font);font-size:var(--mat-toolbar-title-text-size);line-height:var(--mat-toolbar-title-text-line-height);font-weight:var(--mat-toolbar-title-text-weight);letter-spacing:var(--mat-toolbar-title-text-tracking);margin:0}.cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar .mat-form-field-underline,.mat-toolbar .mat-form-field-ripple,.mat-toolbar .mat-focused .mat-form-field-ripple{background-color:currentColor}.mat-toolbar .mat-form-field-label,.mat-toolbar .mat-focused .mat-form-field-label,.mat-toolbar .mat-select-value,.mat-toolbar .mat-select-arrow,.mat-toolbar .mat-form-field.mat-focused .mat-select-arrow{color:inherit}.mat-toolbar .mat-input-element{caret-color:currentColor}.mat-toolbar .mat-mdc-button-base.mat-mdc-button-base.mat-unthemed{--mdc-text-button-label-text-color:var(--mat-toolbar-container-text-color);--mdc-outlined-button-label-text-color:var(--mat-toolbar-container-text-color)}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap;height:var(--mat-toolbar-standard-height)}@media(max-width: 599px){.mat-toolbar-row,.mat-toolbar-single-row{height:var(--mat-toolbar-mobile-height)}}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%;min-height:var(--mat-toolbar-standard-height)}@media(max-width: 599px){.mat-toolbar-multiple-rows{min-height:var(--mat-toolbar-mobile-height)}}\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatToolbar;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/**\n * Throws an exception when attempting to combine the different toolbar row modes.\n * @docs-private\n */\nfunction throwToolbarMixedModesError() {\n throw Error('MatToolbar: Attempting to combine different toolbar modes. ' + 'Either specify multiple `` elements explicitly or just place content ' + 'inside of a `` for a single row.');\n}\nlet MatToolbarModule = /*#__PURE__*/(() => {\n class MatToolbarModule {\n static {\n this.ɵfac = function MatToolbarModule_Factory(t) {\n return new (t || MatToolbarModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MatToolbarModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [MatCommonModule, MatCommonModule]\n });\n }\n }\n return MatToolbarModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MatToolbar, MatToolbarModule, MatToolbarRow, throwToolbarMixedModesError };\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatSidenavModule } from '@angular/material/sidenav';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { VaNavComponent } from './nav.component';\n\n@NgModule({\n imports: [CommonModule, MatSidenavModule, MatButtonModule, MatToolbarModule, MatIconModule],\n declarations: [VaNavComponent],\n exports: [VaNavComponent],\n})\nexport class VaNavModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport {\n VaNestedSelectorComponent,\n VaNestedSelectorTitleComponent,\n VaNestedSelectorNestComponent,\n VaNestedSelectorNestItemComponent,\n VaHideDirective,\n} from './nested-selector';\n\n@NgModule({\n imports: [CommonModule],\n exports: [\n VaNestedSelectorComponent,\n VaNestedSelectorTitleComponent,\n VaNestedSelectorNestComponent,\n VaNestedSelectorNestItemComponent,\n VaHideDirective,\n ],\n declarations: [\n VaNestedSelectorComponent,\n VaNestedSelectorTitleComponent,\n VaNestedSelectorNestComponent,\n VaNestedSelectorNestItemComponent,\n VaHideDirective,\n ],\n})\nexport class VaNestedSelectorModule {}\n","import * as i0 from '@angular/core';\nimport { Component, ViewEncapsulation, ChangeDetectionStrategy, inject, ApplicationRef, createComponent, EnvironmentInjector, ANIMATION_MODULE_TYPE, booleanAttribute, Directive, Optional, Inject, Input, NgModule } from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport * as i1 from '@angular/cdk/a11y';\nimport { InteractivityChecker, A11yModule } from '@angular/cdk/a11y';\nimport { DOCUMENT } from '@angular/common';\nlet nextId = 0;\nconst BADGE_CONTENT_CLASS = 'mat-badge-content';\n/** Keeps track of the apps currently containing badges. */\nconst badgeApps = /*#__PURE__*/new Set();\n/**\n * Component used to load the structural styles of the badge.\n * @docs-private\n */\nlet _MatBadgeStyleLoader = /*#__PURE__*/(() => {\n class _MatBadgeStyleLoader {\n static {\n this.ɵfac = function _MatBadgeStyleLoader_Factory(t) {\n return new (t || _MatBadgeStyleLoader)();\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: _MatBadgeStyleLoader,\n selectors: [[\"ng-component\"]],\n standalone: true,\n features: [i0.ɵɵStandaloneFeature],\n decls: 0,\n vars: 0,\n template: function _MatBadgeStyleLoader_Template(rf, ctx) {},\n styles: [\".mat-badge{position:relative}.mat-badge.mat-badge{overflow:visible}.mat-badge-content{position:absolute;text-align:center;display:inline-block;transition:transform 200ms ease-in-out;transform:scale(0.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;box-sizing:border-box;pointer-events:none;background-color:var(--mat-badge-background-color);color:var(--mat-badge-text-color);font-family:var(--mat-badge-text-font);font-weight:var(--mat-badge-text-weight);border-radius:var(--mat-badge-container-shape)}.cdk-high-contrast-active .mat-badge-content{outline:solid 1px;border-radius:0}.mat-badge-above .mat-badge-content{bottom:100%}.mat-badge-below .mat-badge-content{top:100%}.mat-badge-before .mat-badge-content{right:100%}[dir=rtl] .mat-badge-before .mat-badge-content{right:auto;left:100%}.mat-badge-after .mat-badge-content{left:100%}[dir=rtl] .mat-badge-after .mat-badge-content{left:auto;right:100%}.mat-badge-disabled .mat-badge-content{background-color:var(--mat-badge-disabled-state-background-color);color:var(--mat-badge-disabled-state-text-color)}.mat-badge-hidden .mat-badge-content{display:none}.ng-animate-disabled .mat-badge-content,.mat-badge-content._mat-animation-noopable{transition:none}.mat-badge-content.mat-badge-active{transform:none}.mat-badge-small .mat-badge-content{width:var(--mat-badge-legacy-small-size-container-size, unset);height:var(--mat-badge-legacy-small-size-container-size, unset);min-width:var(--mat-badge-small-size-container-size, unset);min-height:var(--mat-badge-small-size-container-size, unset);line-height:var(--mat-badge-legacy-small-size-container-size, var(--mat-badge-small-size-container-size));padding:var(--mat-badge-small-size-container-padding);font-size:var(--mat-badge-small-size-text-size);margin:var(--mat-badge-small-size-container-offset)}.mat-badge-small.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-small-size-container-overlap-offset)}.mat-badge-medium .mat-badge-content{width:var(--mat-badge-legacy-container-size, unset);height:var(--mat-badge-legacy-container-size, unset);min-width:var(--mat-badge-container-size, unset);min-height:var(--mat-badge-container-size, unset);line-height:var(--mat-badge-legacy-container-size, var(--mat-badge-container-size));padding:var(--mat-badge-container-padding);font-size:var(--mat-badge-text-size);margin:var(--mat-badge-container-offset)}.mat-badge-medium.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-container-overlap-offset)}.mat-badge-large .mat-badge-content{width:var(--mat-badge-legacy-large-size-container-size, unset);height:var(--mat-badge-legacy-large-size-container-size, unset);min-width:var(--mat-badge-large-size-container-size, unset);min-height:var(--mat-badge-large-size-container-size, unset);line-height:var(--mat-badge-legacy-large-size-container-size, var(--mat-badge-large-size-container-size));padding:var(--mat-badge-large-size-container-padding);font-size:var(--mat-badge-large-size-text-size);margin:var(--mat-badge-large-size-container-offset)}.mat-badge-large.mat-badge-overlap .mat-badge-content{margin:var(--mat-badge-large-size-container-overlap-offset)}\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return _MatBadgeStyleLoader;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/** Directive to display a text badge. */\nlet MatBadge = /*#__PURE__*/(() => {\n class MatBadge {\n /** The color of the badge. Can be `primary`, `accent`, or `warn`. */\n get color() {\n return this._color;\n }\n set color(value) {\n this._setColor(value);\n this._color = value;\n }\n /** The content for the badge */\n get content() {\n return this._content;\n }\n set content(newContent) {\n this._updateRenderedContent(newContent);\n }\n /** Message used to describe the decorated element via aria-describedby */\n get description() {\n return this._description;\n }\n set description(newDescription) {\n this._updateDescription(newDescription);\n }\n constructor(_ngZone, _elementRef, _ariaDescriber, _renderer, _animationMode) {\n this._ngZone = _ngZone;\n this._elementRef = _elementRef;\n this._ariaDescriber = _ariaDescriber;\n this._renderer = _renderer;\n this._animationMode = _animationMode;\n this._color = 'primary';\n /** Whether the badge should overlap its contents or not */\n this.overlap = true;\n /**\n * Position the badge should reside.\n * Accepts any combination of 'above'|'below' and 'before'|'after'\n */\n this.position = 'above after';\n /** Size of the badge. Can be 'small', 'medium', or 'large'. */\n this.size = 'medium';\n /** Unique id for the badge */\n this._id = nextId++;\n /** Whether the OnInit lifecycle hook has run yet */\n this._isInitialized = false;\n /** InteractivityChecker to determine if the badge host is focusable. */\n this._interactivityChecker = inject(InteractivityChecker);\n this._document = inject(DOCUMENT);\n const appRef = inject(ApplicationRef);\n if (!badgeApps.has(appRef)) {\n badgeApps.add(appRef);\n const componentRef = createComponent(_MatBadgeStyleLoader, {\n environmentInjector: inject(EnvironmentInjector)\n });\n appRef.onDestroy(() => {\n badgeApps.delete(appRef);\n if (badgeApps.size === 0) {\n componentRef.destroy();\n }\n });\n }\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const nativeElement = _elementRef.nativeElement;\n if (nativeElement.nodeType !== nativeElement.ELEMENT_NODE) {\n throw Error('matBadge must be attached to an element node.');\n }\n const matIconTagName = 'mat-icon';\n // Heads-up for developers to avoid putting matBadge on \n // as it is aria-hidden by default docs mention this at:\n // https://material.angular.io/components/badge/overview#accessibility\n if (nativeElement.tagName.toLowerCase() === matIconTagName && nativeElement.getAttribute('aria-hidden') === 'true') {\n console.warn(`Detected a matBadge on an \"aria-hidden\" \"\". ` + `Consider setting aria-hidden=\"false\" in order to surface the information assistive technology.` + `\\n${nativeElement.outerHTML}`);\n }\n }\n }\n /** Whether the badge is above the host or not */\n isAbove() {\n return this.position.indexOf('below') === -1;\n }\n /** Whether the badge is after the host or not */\n isAfter() {\n return this.position.indexOf('before') === -1;\n }\n /**\n * Gets the element into which the badge's content is being rendered. Undefined if the element\n * hasn't been created (e.g. if the badge doesn't have content).\n */\n getBadgeElement() {\n return this._badgeElement;\n }\n ngOnInit() {\n // We may have server-side rendered badge that we need to clear.\n // We need to do this in ngOnInit because the full content of the component\n // on which the badge is attached won't necessarily be in the DOM until this point.\n this._clearExistingBadges();\n if (this.content && !this._badgeElement) {\n this._badgeElement = this._createBadgeElement();\n this._updateRenderedContent(this.content);\n }\n this._isInitialized = true;\n }\n ngOnDestroy() {\n // ViewEngine only: when creating a badge through the Renderer, Angular remembers its index.\n // We have to destroy it ourselves, otherwise it'll be retained in memory.\n if (this._renderer.destroyNode) {\n this._renderer.destroyNode(this._badgeElement);\n this._inlineBadgeDescription?.remove();\n }\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.description);\n }\n /** Gets whether the badge's host element is interactive. */\n _isHostInteractive() {\n // Ignore visibility since it requires an expensive style caluclation.\n return this._interactivityChecker.isFocusable(this._elementRef.nativeElement, {\n ignoreVisibility: true\n });\n }\n /** Creates the badge element */\n _createBadgeElement() {\n const badgeElement = this._renderer.createElement('span');\n const activeClass = 'mat-badge-active';\n badgeElement.setAttribute('id', `mat-badge-content-${this._id}`);\n // The badge is aria-hidden because we don't want it to appear in the page's navigation\n // flow. Instead, we use the badge to describe the decorated element with aria-describedby.\n badgeElement.setAttribute('aria-hidden', 'true');\n badgeElement.classList.add(BADGE_CONTENT_CLASS);\n if (this._animationMode === 'NoopAnimations') {\n badgeElement.classList.add('_mat-animation-noopable');\n }\n this._elementRef.nativeElement.appendChild(badgeElement);\n // animate in after insertion\n if (typeof requestAnimationFrame === 'function' && this._animationMode !== 'NoopAnimations') {\n this._ngZone.runOutsideAngular(() => {\n requestAnimationFrame(() => {\n badgeElement.classList.add(activeClass);\n });\n });\n } else {\n badgeElement.classList.add(activeClass);\n }\n return badgeElement;\n }\n /** Update the text content of the badge element in the DOM, creating the element if necessary. */\n _updateRenderedContent(newContent) {\n const newContentNormalized = `${newContent ?? ''}`.trim();\n // Don't create the badge element if the directive isn't initialized because we want to\n // append the badge element to the *end* of the host element's content for backwards\n // compatibility.\n if (this._isInitialized && newContentNormalized && !this._badgeElement) {\n this._badgeElement = this._createBadgeElement();\n }\n if (this._badgeElement) {\n this._badgeElement.textContent = newContentNormalized;\n }\n this._content = newContentNormalized;\n }\n /** Updates the host element's aria description via AriaDescriber. */\n _updateDescription(newDescription) {\n // Always start by removing the aria-describedby; we will add a new one if necessary.\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.description);\n // NOTE: We only check whether the host is interactive here, which happens during\n // when then badge content changes. It is possible that the host changes\n // interactivity status separate from one of these. However, watching the interactivity\n // status of the host would require a `MutationObserver`, which is likely more code + overhead\n // than it's worth; from usages inside Google, we see that the vats majority of badges either\n // never change interactivity, or also set `matBadgeHidden` based on the same condition.\n if (!newDescription || this._isHostInteractive()) {\n this._removeInlineDescription();\n }\n this._description = newDescription;\n // We don't add `aria-describedby` for non-interactive hosts elements because we\n // instead insert the description inline.\n if (this._isHostInteractive()) {\n this._ariaDescriber.describe(this._elementRef.nativeElement, newDescription);\n } else {\n this._updateInlineDescription();\n }\n }\n _updateInlineDescription() {\n // Create the inline description element if it doesn't exist\n if (!this._inlineBadgeDescription) {\n this._inlineBadgeDescription = this._document.createElement('span');\n this._inlineBadgeDescription.classList.add('cdk-visually-hidden');\n }\n this._inlineBadgeDescription.textContent = this.description;\n this._badgeElement?.appendChild(this._inlineBadgeDescription);\n }\n _removeInlineDescription() {\n this._inlineBadgeDescription?.remove();\n this._inlineBadgeDescription = undefined;\n }\n /** Adds css theme class given the color to the component host */\n _setColor(colorPalette) {\n const classList = this._elementRef.nativeElement.classList;\n classList.remove(`mat-badge-${this._color}`);\n if (colorPalette) {\n classList.add(`mat-badge-${colorPalette}`);\n }\n }\n /** Clears any existing badges that might be left over from server-side rendering. */\n _clearExistingBadges() {\n // Only check direct children of this host element in order to avoid deleting\n // any badges that might exist in descendant elements.\n const badges = this._elementRef.nativeElement.querySelectorAll(`:scope > .${BADGE_CONTENT_CLASS}`);\n for (const badgeElement of Array.from(badges)) {\n if (badgeElement !== this._badgeElement) {\n badgeElement.remove();\n }\n }\n }\n static {\n this.ɵfac = function MatBadge_Factory(t) {\n return new (t || MatBadge)(i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.AriaDescriber), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(ANIMATION_MODULE_TYPE, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatBadge,\n selectors: [[\"\", \"matBadge\", \"\"]],\n hostAttrs: [1, \"mat-badge\"],\n hostVars: 20,\n hostBindings: function MatBadge_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵclassProp(\"mat-badge-overlap\", ctx.overlap)(\"mat-badge-above\", ctx.isAbove())(\"mat-badge-below\", !ctx.isAbove())(\"mat-badge-before\", !ctx.isAfter())(\"mat-badge-after\", ctx.isAfter())(\"mat-badge-small\", ctx.size === \"small\")(\"mat-badge-medium\", ctx.size === \"medium\")(\"mat-badge-large\", ctx.size === \"large\")(\"mat-badge-hidden\", ctx.hidden || !ctx.content)(\"mat-badge-disabled\", ctx.disabled);\n }\n },\n inputs: {\n color: [i0.ɵɵInputFlags.None, \"matBadgeColor\", \"color\"],\n overlap: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"matBadgeOverlap\", \"overlap\", booleanAttribute],\n disabled: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"matBadgeDisabled\", \"disabled\", booleanAttribute],\n position: [i0.ɵɵInputFlags.None, \"matBadgePosition\", \"position\"],\n content: [i0.ɵɵInputFlags.None, \"matBadge\", \"content\"],\n description: [i0.ɵɵInputFlags.None, \"matBadgeDescription\", \"description\"],\n size: [i0.ɵɵInputFlags.None, \"matBadgeSize\", \"size\"],\n hidden: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"matBadgeHidden\", \"hidden\", booleanAttribute]\n },\n standalone: true,\n features: [i0.ɵɵInputTransformsFeature]\n });\n }\n }\n return MatBadge;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatBadgeModule = /*#__PURE__*/(() => {\n class MatBadgeModule {\n static {\n this.ɵfac = function MatBadgeModule_Factory(t) {\n return new (t || MatBadgeModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MatBadgeModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [A11yModule, MatCommonModule, MatCommonModule]\n });\n }\n }\n return MatBadgeModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MatBadge, MatBadgeModule };\n","import { Injectable } from '@angular/core';\nimport { Filters } from '../va-filter/filters/filter';\nimport { Breadcrumbs } from '../va-breadcrumbs/va-breadcrumbs';\nimport { Router, NavigationEnd } from '@angular/router';\nimport { BehaviorSubject, Subject, Observable } from 'rxjs';\nimport { map, filter, shareReplay } from 'rxjs/operators';\nimport { VaProductNavBadges } from './va-product-badges';\nimport { ActionButton } from './action-button';\nimport { VaProductNavItem } from './va-product-nav-item';\nimport { PageInformation } from './page-information';\n\n@Injectable()\nexport class VaProductNavService {\n private filters$$ = new BehaviorSubject(null);\n private infoSidebar$$ = new BehaviorSubject(null);\n private primaryActionButton$$ = new BehaviorSubject(null);\n private secondaryActionButton$$ = new BehaviorSubject(null);\n private breadcrumbs$$: BehaviorSubject = new BehaviorSubject([]);\n private navBadges$$: BehaviorSubject = new BehaviorSubject({});\n private search$$ = new BehaviorSubject(null);\n private showInfoIcon$$: BehaviorSubject = new BehaviorSubject(false);\n private _navItems: VaProductNavItem[];\n private scroll$$ = new BehaviorSubject(null);\n private toggleNav$$: Subject = new Subject();\n\n constructor(private router: Router) {}\n\n isSelected(navItem: VaProductNavItem, isChild: boolean): boolean {\n if (navItem.children && navItem.children.length > 0) {\n navItem.children.forEach((child) => (child.selected = this.isSelected(child, true)));\n return navItem.children.find((ch) => ch.selected) != null;\n } else {\n return this.router.isActive(navItem.url, isChild);\n }\n }\n\n setNavItems(navItems: VaProductNavItem[]): void {\n this._navItems = navItems;\n this.navItems.map((item) => {\n item.selected = this.isSelected(item, false);\n return item;\n });\n this.router.events\n .pipe(\n filter((event) => event instanceof NavigationEnd),\n map(() =>\n this.navItems.map((item) => {\n item.selected = this.isSelected(item, false);\n }),\n ),\n )\n .subscribe();\n }\n\n setFilters(filters: Filters | null): void {\n this.filters$$.next(filters);\n }\n\n setInfoSidebar(pageInfo: PageInformation | PageInformation[] | null): void {\n if (pageInfo === null) {\n pageInfo = [];\n } else if (!Array.isArray(pageInfo)) {\n pageInfo = [pageInfo];\n }\n this.infoSidebar$$.next(pageInfo);\n }\n\n setPrimaryActionButton(actionButton: ActionButton | null): void {\n this.primaryActionButton$$.next(actionButton);\n }\n\n setSecondaryActionButton(actionButton: ActionButton | null): void {\n this.secondaryActionButton$$.next(actionButton);\n }\n\n setBreadcrumbs(breadcrumbs: Breadcrumbs[]): void {\n this.breadcrumbs$$.next(breadcrumbs);\n }\n\n setNavBadges(navBadges: VaProductNavBadges): void {\n this.navBadges$$.next(navBadges);\n }\n\n setSearch(search: string | null): void {\n this.search$$.next(search);\n }\n\n setShowInfoIcon(flag: boolean): void {\n this.showInfoIcon$$.next(flag);\n }\n\n setScroll(scrollEvent: Event): void {\n this.scroll$$.next(scrollEvent);\n }\n\n toggleNav(): void {\n this.toggleNav$$.next(null);\n }\n\n get navItems(): VaProductNavItem[] {\n return this._navItems;\n }\n\n get breadcrumbs$(): Observable {\n return this.breadcrumbs$$.asObservable();\n }\n\n get primaryActionButton$(): Observable {\n return this.primaryActionButton$$.asObservable();\n }\n\n get secondaryActionButton$(): Observable {\n return this.secondaryActionButton$$.asObservable();\n }\n\n get infoSidebar$(): Observable {\n return this.infoSidebar$$.asObservable();\n }\n\n get filters$(): Observable {\n return this.filters$$.asObservable();\n }\n\n get navBadges$(): Observable {\n return this.navBadges$$.asObservable();\n }\n\n get search$(): Observable {\n return this.search$$.asObservable();\n }\n\n get showInfoIcon$(): Observable {\n return this.showInfoIcon$$.asObservable();\n }\n\n get scroll$(): Observable {\n return this.scroll$$.asObservable().pipe(shareReplay(1));\n }\n\n get toggleNav$(): Observable {\n return this.toggleNav$$.pipe(map((value) => value));\n }\n}\n","import { registerVersion } from '@firebase/app';\nexport * from '@firebase/app';\nvar name = \"firebase\";\nvar version = \"10.7.1\";\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nregisterVersion(name, version, 'app');\n","import * as i0 from '@angular/core';\nimport { Version, Injectable } from '@angular/core';\nimport { getApps } from 'firebase/app';\nimport { queueScheduler, asyncScheduler, Observable } from 'rxjs';\nimport { tap, observeOn, subscribeOn } from 'rxjs/operators';\nconst VERSION = /*#__PURE__*/new Version('ANGULARFIRE2_VERSION');\nconst ɵisSupportedError = module => `The APP_INITIALIZER that is \"making\" isSupported() sync for the sake of convenient DI has not resolved in this\ncontext. Rather than injecting ${module} in the constructor, first ensure that ${module} is supported by calling\n\\`await isSupported()\\`, then retrieve the instance from the injector manually \\`injector.get(${module})\\`.`;\nfunction ɵgetDefaultInstanceOf(identifier, provided, defaultApp) {\n if (provided) {\n // Was provide* only called once? If so grab that\n if (provided.length === 1) {\n return provided[0];\n }\n const providedUsingDefaultApp = provided.filter(it => it.app === defaultApp);\n // Was provide* only called once, using the default app? If so use that\n if (providedUsingDefaultApp.length === 1) {\n return providedUsingDefaultApp[0];\n }\n }\n // Grab the default instance from the defaultApp\n const defaultAppWithContainer = defaultApp;\n const provider = defaultAppWithContainer.container.getProvider(identifier);\n return provider.getImmediate({\n optional: true\n });\n}\nconst ɵgetAllInstancesOf = (identifier, app) => {\n const apps = app ? [app] : getApps();\n const instances = [];\n apps.forEach(app => {\n const provider = app.container.getProvider(identifier);\n provider.instances.forEach(instance => {\n if (!instances.includes(instance)) {\n instances.push(instance);\n }\n });\n });\n return instances;\n};\nclass ɵAppCheckInstances {\n constructor() {\n return ɵgetAllInstancesOf(ɵAPP_CHECK_PROVIDER_NAME);\n }\n}\nconst ɵAPP_CHECK_PROVIDER_NAME = 'app-check';\n\n/* eslint-disable @typescript-eslint/ban-ts-comment */\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nfunction noop() {}\n/**\n * Schedules tasks so that they are invoked inside the Zone that is passed in the constructor.\n */\nclass ɵZoneScheduler {\n zone;\n delegate;\n constructor(zone, delegate = queueScheduler) {\n this.zone = zone;\n this.delegate = delegate;\n }\n now() {\n return this.delegate.now();\n }\n schedule(work, delay, state) {\n const targetZone = this.zone;\n // Wrap the specified work function to make sure that if nested scheduling takes place the\n // work is executed in the correct zone\n const workInZone = function (state) {\n targetZone.runGuarded(() => {\n work.apply(this, [state]);\n });\n };\n // Scheduling itself needs to be run in zone to ensure setInterval calls for async scheduling are done\n // inside the correct zone. This scheduler needs to schedule asynchronously always to ensure that\n // firebase emissions are never synchronous. Specifying a delay causes issues with the queueScheduler delegate.\n return this.delegate.schedule(workInZone, delay, state);\n }\n}\nclass BlockUntilFirstOperator {\n zone;\n // @ts-ignore\n task = null;\n constructor(zone) {\n this.zone = zone;\n }\n call(subscriber, source) {\n const unscheduleTask = this.unscheduleTask.bind(this);\n // @ts-ignore\n this.task = this.zone.run(() => Zone.current.scheduleMacroTask('firebaseZoneBlock', noop, {}, noop, noop));\n return source.pipe(tap({\n next: unscheduleTask,\n complete: unscheduleTask,\n error: unscheduleTask\n })).subscribe(subscriber).add(unscheduleTask);\n }\n unscheduleTask() {\n // maybe this is a race condition, invoke in a timeout\n // hold for 10ms while I try to figure out what is going on\n setTimeout(() => {\n if (this.task != null && this.task.state === 'scheduled') {\n this.task.invoke();\n this.task = null;\n }\n }, 10);\n }\n}\nlet ɵAngularFireSchedulers = /*#__PURE__*/(() => {\n class ɵAngularFireSchedulers {\n ngZone;\n outsideAngular;\n insideAngular;\n constructor(ngZone) {\n this.ngZone = ngZone;\n // @ts-ignore\n this.outsideAngular = ngZone.runOutsideAngular(() => new ɵZoneScheduler(Zone.current));\n // @ts-ignore\n this.insideAngular = ngZone.run(() => new ɵZoneScheduler(Zone.current, asyncScheduler));\n globalThis.ɵAngularFireScheduler ||= this;\n }\n static ɵfac = function ɵAngularFireSchedulers_Factory(t) {\n return new (t || ɵAngularFireSchedulers)(i0.ɵɵinject(i0.NgZone));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: ɵAngularFireSchedulers,\n factory: ɵAngularFireSchedulers.ɵfac,\n providedIn: 'root'\n });\n }\n return ɵAngularFireSchedulers;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction getSchedulers() {\n const schedulers = globalThis.ɵAngularFireScheduler;\n if (!schedulers) {\n throw new Error(`Either AngularFireModule has not been provided in your AppModule (this can be done manually or implictly using\nprovideFirebaseApp) or you're calling an AngularFire method outside of an NgModule (which is not supported).`);\n }\n return schedulers;\n}\nfunction runOutsideAngular(fn) {\n return getSchedulers().ngZone.runOutsideAngular(() => fn());\n}\nfunction run(fn) {\n return getSchedulers().ngZone.run(() => fn());\n}\nfunction observeOutsideAngular(obs$) {\n return obs$.pipe(observeOn(getSchedulers().outsideAngular));\n}\nfunction observeInsideAngular(obs$) {\n return obs$.pipe(observeOn(getSchedulers().insideAngular));\n}\nfunction keepUnstableUntilFirst(obs$) {\n return ɵkeepUnstableUntilFirstFactory(getSchedulers())(obs$);\n}\n/**\n * Operator to block the zone until the first value has been emitted or the observable\n * has completed/errored. This is used to make sure that universal waits until the first\n * value from firebase but doesn't block the zone forever since the firebase subscription\n * is still alive.\n */\nfunction ɵkeepUnstableUntilFirstFactory(schedulers) {\n return function keepUnstableUntilFirst(obs$) {\n obs$ = obs$.lift(new BlockUntilFirstOperator(schedulers.ngZone));\n return obs$.pipe(\n // Run the subscribe body outside of Angular (e.g. calling Firebase SDK to add a listener to a change event)\n subscribeOn(schedulers.outsideAngular),\n // Run operators inside the angular zone (e.g. side effects via tap())\n observeOn(schedulers.insideAngular)\n // INVESTIGATE https://github.com/angular/angularfire/pull/2315\n // share()\n );\n };\n}\n// @ts-ignore\nconst zoneWrapFn = (it, macrotask) => {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const _this = this;\n // function() is needed for the arguments object\n return function () {\n const _arguments = arguments;\n if (macrotask) {\n setTimeout(() => {\n if (macrotask.state === 'scheduled') {\n macrotask.invoke();\n }\n }, 10);\n }\n return run(() => it.apply(_this, _arguments));\n };\n};\nconst ɵzoneWrap = (it, blockUntilFirst) => {\n // function() is needed for the arguments object\n return function () {\n // @ts-ignore\n let macrotask;\n const _arguments = arguments;\n // if this is a callback function, e.g, onSnapshot, we should create a microtask and invoke it\n // only once one of the callback functions is tripped.\n for (let i = 0; i < arguments.length; i++) {\n if (typeof _arguments[i] === 'function') {\n if (blockUntilFirst) {\n // @ts-ignore\n macrotask ||= run(() => Zone.current.scheduleMacroTask('firebaseZoneBlock', noop, {}, noop, noop));\n }\n // TODO create a microtask to track callback functions\n _arguments[i] = zoneWrapFn(_arguments[i], macrotask);\n }\n }\n const ret = runOutsideAngular(() => it.apply(this, _arguments));\n if (!blockUntilFirst) {\n if (ret instanceof Observable) {\n const schedulers = getSchedulers();\n return ret.pipe(subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular));\n } else {\n return run(() => ret);\n }\n }\n if (ret instanceof Observable) {\n return ret.pipe(keepUnstableUntilFirst);\n } else if (ret instanceof Promise) {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n return run(() => new Promise((resolve, reject) => ret.then(it => run(() => resolve(it)), reason => run(() => reject(reason)))));\n } else if (typeof ret === 'function' && macrotask) {\n // Handle unsubscribe\n // function() is needed for the arguments object\n return function () {\n setTimeout(() => {\n if (macrotask && macrotask.state === 'scheduled') {\n macrotask.invoke();\n }\n }, 10);\n return ret.apply(this, arguments);\n };\n } else {\n // TODO how do we handle storage uploads in Zone? and other stuff with cancel() etc?\n return run(() => ret);\n }\n };\n};\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { VERSION, keepUnstableUntilFirst, observeInsideAngular, observeOutsideAngular, ɵAPP_CHECK_PROVIDER_NAME, ɵAngularFireSchedulers, ɵAppCheckInstances, ɵZoneScheduler, ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, ɵisSupportedError, ɵkeepUnstableUntilFirstFactory, ɵzoneWrap };\n","import { getApps as getApps$1, getApp as getApp$1, registerVersion as registerVersion$1, deleteApp as deleteApp$1, initializeApp as initializeApp$1, onLog as onLog$1, setLogLevel as setLogLevel$1 } from 'firebase/app';\nexport * from 'firebase/app';\nimport { from, timer } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Optional, VERSION as VERSION$1, PLATFORM_ID, NgModule, Inject, NgZone, Injector } from '@angular/core';\nimport { VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';\nclass FirebaseApp {\n constructor(app) {\n return app;\n }\n}\nclass FirebaseApps {\n constructor() {\n return getApps$1();\n }\n}\nconst firebaseApp$ = /*#__PURE__*/ /*#__PURE__*/timer(0, 300).pipe( /*#__PURE__*/concatMap(() => from(getApps$1())), /*#__PURE__*/distinct());\nfunction defaultFirebaseAppFactory(provided) {\n // Use the provided app, if there is only one, otherwise fetch the default app\n if (provided && provided.length === 1) {\n return provided[0];\n }\n return new FirebaseApp(getApp$1());\n}\n// With FIREBASE_APPS I wanted to capture the default app instance, if it is initialized by\n// the reserved URL; ɵPROVIDED_FIREBASE_APPS is not for public consumption and serves to ensure that all\n// provideFirebaseApp(...) calls are satisfied before FirebaseApp$ or FirebaseApp is resolved\nconst PROVIDED_FIREBASE_APPS = /*#__PURE__*/new InjectionToken('angularfire2._apps');\n// Injecting FirebaseApp will now only inject the default Firebase App\n// this allows allows beginners to import /__/firebase/init.js to auto initialize Firebase App\n// from the reserved URL.\nconst DEFAULT_FIREBASE_APP_PROVIDER = {\n provide: FirebaseApp,\n useFactory: defaultFirebaseAppFactory,\n deps: [[/*#__PURE__*/new Optional(), PROVIDED_FIREBASE_APPS]]\n};\nconst FIREBASE_APPS_PROVIDER = {\n provide: FirebaseApps,\n deps: [[/*#__PURE__*/new Optional(), PROVIDED_FIREBASE_APPS]]\n};\nfunction firebaseAppFactory(fn) {\n return (zone, injector) => {\n const app = zone.runOutsideAngular(() => fn(injector));\n return new FirebaseApp(app);\n };\n}\nlet FirebaseAppModule = /*#__PURE__*/(() => {\n class FirebaseAppModule {\n // eslint-disable-next-line @typescript-eslint/ban-types\n constructor(platformId) {\n registerVersion$1('angularfire', VERSION.full, 'core');\n registerVersion$1('angularfire', VERSION.full, 'app');\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n registerVersion$1('angular', VERSION$1.full, platformId.toString());\n }\n static ɵfac = function FirebaseAppModule_Factory(t) {\n return new (t || FirebaseAppModule)(i0.ɵɵinject(PLATFORM_ID));\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: FirebaseAppModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [DEFAULT_FIREBASE_APP_PROVIDER, FIREBASE_APPS_PROVIDER]\n });\n }\n return FirebaseAppModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n// Calling initializeApp({ ... }, 'name') multiple times will add more FirebaseApps into the FIREBASE_APPS\n// injection scope. This allows developers to more easily work with multiple Firebase Applications. Downside\n// is that DI for app name and options doesn't really make sense anymore.\nfunction provideFirebaseApp(fn, ...deps) {\n return {\n ngModule: FirebaseAppModule,\n providers: [{\n provide: PROVIDED_FIREBASE_APPS,\n useFactory: firebaseAppFactory(fn),\n multi: true,\n deps: [NgZone, Injector, ɵAngularFireSchedulers, ...deps]\n }]\n };\n}\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nconst deleteApp = /*#__PURE__*/ɵzoneWrap(deleteApp$1, true);\nconst getApp = /*#__PURE__*/ɵzoneWrap(getApp$1, true);\nconst getApps = /*#__PURE__*/ɵzoneWrap(getApps$1, true);\nconst initializeApp = /*#__PURE__*/ɵzoneWrap(initializeApp$1, true);\nconst onLog = /*#__PURE__*/ɵzoneWrap(onLog$1, true);\nconst registerVersion = /*#__PURE__*/ɵzoneWrap(registerVersion$1, true);\nconst setLogLevel = /*#__PURE__*/ɵzoneWrap(setLogLevel$1, true);\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { FirebaseApp, FirebaseAppModule, FirebaseApps, deleteApp, firebaseApp$, getApp, getApps, initializeApp, onLog, provideFirebaseApp, registerVersion, setLogLevel };\n","import { _getProvider, getApp, _registerComponent, registerVersion } from '@firebase/app';\nimport { Component } from '@firebase/component';\nimport { Deferred, ErrorFactory, isIndexedDBAvailable, uuidv4, getGlobal, base64, issuedAtTime, calculateBackoffMillis, getModularInstance } from '@firebase/util';\nimport { Logger } from '@firebase/logger';\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst APP_CHECK_STATES = new Map();\nconst DEFAULT_STATE = {\n activated: false,\n tokenObservers: []\n};\nconst DEBUG_STATE = {\n initialized: false,\n enabled: false\n};\n/**\r\n * Gets a reference to the state object.\r\n */\nfunction getStateReference(app) {\n return APP_CHECK_STATES.get(app) || Object.assign({}, DEFAULT_STATE);\n}\n/**\r\n * Set once on initialization. The map should hold the same reference to the\r\n * same object until this entry is deleted.\r\n */\nfunction setInitialState(app, state) {\n APP_CHECK_STATES.set(app, state);\n return APP_CHECK_STATES.get(app);\n}\nfunction getDebugState() {\n return DEBUG_STATE;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst BASE_ENDPOINT = 'https://content-firebaseappcheck.googleapis.com/v1';\nconst EXCHANGE_RECAPTCHA_TOKEN_METHOD = 'exchangeRecaptchaV3Token';\nconst EXCHANGE_RECAPTCHA_ENTERPRISE_TOKEN_METHOD = 'exchangeRecaptchaEnterpriseToken';\nconst EXCHANGE_DEBUG_TOKEN_METHOD = 'exchangeDebugToken';\nconst TOKEN_REFRESH_TIME = {\n /**\r\n * The offset time before token natural expiration to run the refresh.\r\n * This is currently 5 minutes.\r\n */\n OFFSET_DURATION: 5 * 60 * 1000,\n /**\r\n * This is the first retrial wait after an error. This is currently\r\n * 30 seconds.\r\n */\n RETRIAL_MIN_WAIT: 30 * 1000,\n /**\r\n * This is the maximum retrial wait, currently 16 minutes.\r\n */\n RETRIAL_MAX_WAIT: 16 * 60 * 1000\n};\n/**\r\n * One day in millis, for certain error code backoffs.\r\n */\nconst ONE_DAY = 24 * 60 * 60 * 1000;\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Port from auth proactiverefresh.js\r\n *\r\n */\n// TODO: move it to @firebase/util?\n// TODO: allow to config whether refresh should happen in the background\nclass Refresher {\n constructor(operation, retryPolicy, getWaitDuration, lowerBound, upperBound) {\n this.operation = operation;\n this.retryPolicy = retryPolicy;\n this.getWaitDuration = getWaitDuration;\n this.lowerBound = lowerBound;\n this.upperBound = upperBound;\n this.pending = null;\n this.nextErrorWaitInterval = lowerBound;\n if (lowerBound > upperBound) {\n throw new Error('Proactive refresh lower bound greater than upper bound!');\n }\n }\n start() {\n this.nextErrorWaitInterval = this.lowerBound;\n this.process(true).catch(() => {\n /* we don't care about the result */\n });\n }\n stop() {\n if (this.pending) {\n this.pending.reject('cancelled');\n this.pending = null;\n }\n }\n isRunning() {\n return !!this.pending;\n }\n async process(hasSucceeded) {\n this.stop();\n try {\n this.pending = new Deferred();\n this.pending.promise.catch(_e => {\n /* ignore */\n });\n await sleep(this.getNextRun(hasSucceeded));\n // Why do we resolve a promise, then immediate wait for it?\n // We do it to make the promise chain cancellable.\n // We can call stop() which rejects the promise before the following line execute, which makes\n // the code jump to the catch block.\n // TODO: unit test this\n this.pending.resolve();\n await this.pending.promise;\n this.pending = new Deferred();\n this.pending.promise.catch(_e => {\n /* ignore */\n });\n await this.operation();\n this.pending.resolve();\n await this.pending.promise;\n this.process(true).catch(() => {\n /* we don't care about the result */\n });\n } catch (error) {\n if (this.retryPolicy(error)) {\n this.process(false).catch(() => {\n /* we don't care about the result */\n });\n } else {\n this.stop();\n }\n }\n }\n getNextRun(hasSucceeded) {\n if (hasSucceeded) {\n // If last operation succeeded, reset next error wait interval and return\n // the default wait duration.\n this.nextErrorWaitInterval = this.lowerBound;\n // Return typical wait duration interval after a successful operation.\n return this.getWaitDuration();\n } else {\n // Get next error wait interval.\n const currentErrorWaitInterval = this.nextErrorWaitInterval;\n // Double interval for next consecutive error.\n this.nextErrorWaitInterval *= 2;\n // Make sure next wait interval does not exceed the maximum upper bound.\n if (this.nextErrorWaitInterval > this.upperBound) {\n this.nextErrorWaitInterval = this.upperBound;\n }\n return currentErrorWaitInterval;\n }\n }\n}\nfunction sleep(ms) {\n return new Promise(resolve => {\n setTimeout(resolve, ms);\n });\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst ERRORS = {\n [\"already-initialized\" /* AppCheckError.ALREADY_INITIALIZED */]: 'You have already called initializeAppCheck() for FirebaseApp {$appName} with ' + 'different options. To avoid this error, call initializeAppCheck() with the ' + 'same options as when it was originally called. This will return the ' + 'already initialized instance.',\n [\"use-before-activation\" /* AppCheckError.USE_BEFORE_ACTIVATION */]: 'App Check is being used before initializeAppCheck() is called for FirebaseApp {$appName}. ' + 'Call initializeAppCheck() before instantiating other Firebase services.',\n [\"fetch-network-error\" /* AppCheckError.FETCH_NETWORK_ERROR */]: 'Fetch failed to connect to a network. Check Internet connection. ' + 'Original error: {$originalErrorMessage}.',\n [\"fetch-parse-error\" /* AppCheckError.FETCH_PARSE_ERROR */]: 'Fetch client could not parse response.' + ' Original error: {$originalErrorMessage}.',\n [\"fetch-status-error\" /* AppCheckError.FETCH_STATUS_ERROR */]: 'Fetch server returned an HTTP error status. HTTP status: {$httpStatus}.',\n [\"storage-open\" /* AppCheckError.STORAGE_OPEN */]: 'Error thrown when opening storage. Original error: {$originalErrorMessage}.',\n [\"storage-get\" /* AppCheckError.STORAGE_GET */]: 'Error thrown when reading from storage. Original error: {$originalErrorMessage}.',\n [\"storage-set\" /* AppCheckError.STORAGE_WRITE */]: 'Error thrown when writing to storage. Original error: {$originalErrorMessage}.',\n [\"recaptcha-error\" /* AppCheckError.RECAPTCHA_ERROR */]: 'ReCAPTCHA error.',\n [\"throttled\" /* AppCheckError.THROTTLED */]: `Requests throttled due to {$httpStatus} error. Attempts allowed again after {$time}`\n};\nconst ERROR_FACTORY = new ErrorFactory('appCheck', 'AppCheck', ERRORS);\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction getRecaptcha(isEnterprise = false) {\n var _a;\n if (isEnterprise) {\n return (_a = self.grecaptcha) === null || _a === void 0 ? void 0 : _a.enterprise;\n }\n return self.grecaptcha;\n}\nfunction ensureActivated(app) {\n if (!getStateReference(app).activated) {\n throw ERROR_FACTORY.create(\"use-before-activation\" /* AppCheckError.USE_BEFORE_ACTIVATION */, {\n appName: app.name\n });\n }\n}\nfunction getDurationString(durationInMillis) {\n const totalSeconds = Math.round(durationInMillis / 1000);\n const days = Math.floor(totalSeconds / (3600 * 24));\n const hours = Math.floor((totalSeconds - days * 3600 * 24) / 3600);\n const minutes = Math.floor((totalSeconds - days * 3600 * 24 - hours * 3600) / 60);\n const seconds = totalSeconds - days * 3600 * 24 - hours * 3600 - minutes * 60;\n let result = '';\n if (days) {\n result += pad(days) + 'd:';\n }\n if (hours) {\n result += pad(hours) + 'h:';\n }\n result += pad(minutes) + 'm:' + pad(seconds) + 's';\n return result;\n}\nfunction pad(value) {\n if (value === 0) {\n return '00';\n }\n return value >= 10 ? value.toString() : '0' + value;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function exchangeToken({\n url,\n body\n}, heartbeatServiceProvider) {\n const headers = {\n 'Content-Type': 'application/json'\n };\n // If heartbeat service exists, add heartbeat header string to the header.\n const heartbeatService = heartbeatServiceProvider.getImmediate({\n optional: true\n });\n if (heartbeatService) {\n const heartbeatsHeader = await heartbeatService.getHeartbeatsHeader();\n if (heartbeatsHeader) {\n headers['X-Firebase-Client'] = heartbeatsHeader;\n }\n }\n const options = {\n method: 'POST',\n body: JSON.stringify(body),\n headers\n };\n let response;\n try {\n response = await fetch(url, options);\n } catch (originalError) {\n throw ERROR_FACTORY.create(\"fetch-network-error\" /* AppCheckError.FETCH_NETWORK_ERROR */, {\n originalErrorMessage: originalError === null || originalError === void 0 ? void 0 : originalError.message\n });\n }\n if (response.status !== 200) {\n throw ERROR_FACTORY.create(\"fetch-status-error\" /* AppCheckError.FETCH_STATUS_ERROR */, {\n httpStatus: response.status\n });\n }\n let responseBody;\n try {\n // JSON parsing throws SyntaxError if the response body isn't a JSON string.\n responseBody = await response.json();\n } catch (originalError) {\n throw ERROR_FACTORY.create(\"fetch-parse-error\" /* AppCheckError.FETCH_PARSE_ERROR */, {\n originalErrorMessage: originalError === null || originalError === void 0 ? void 0 : originalError.message\n });\n }\n // Protobuf duration format.\n // https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/Duration\n const match = responseBody.ttl.match(/^([\\d.]+)(s)$/);\n if (!match || !match[2] || isNaN(Number(match[1]))) {\n throw ERROR_FACTORY.create(\"fetch-parse-error\" /* AppCheckError.FETCH_PARSE_ERROR */, {\n originalErrorMessage: `ttl field (timeToLive) is not in standard Protobuf Duration ` + `format: ${responseBody.ttl}`\n });\n }\n const timeToLiveAsNumber = Number(match[1]) * 1000;\n const now = Date.now();\n return {\n token: responseBody.token,\n expireTimeMillis: now + timeToLiveAsNumber,\n issuedAtTimeMillis: now\n };\n}\nfunction getExchangeRecaptchaV3TokenRequest(app, reCAPTCHAToken) {\n const {\n projectId,\n appId,\n apiKey\n } = app.options;\n return {\n url: `${BASE_ENDPOINT}/projects/${projectId}/apps/${appId}:${EXCHANGE_RECAPTCHA_TOKEN_METHOD}?key=${apiKey}`,\n body: {\n 'recaptcha_v3_token': reCAPTCHAToken\n }\n };\n}\nfunction getExchangeRecaptchaEnterpriseTokenRequest(app, reCAPTCHAToken) {\n const {\n projectId,\n appId,\n apiKey\n } = app.options;\n return {\n url: `${BASE_ENDPOINT}/projects/${projectId}/apps/${appId}:${EXCHANGE_RECAPTCHA_ENTERPRISE_TOKEN_METHOD}?key=${apiKey}`,\n body: {\n 'recaptcha_enterprise_token': reCAPTCHAToken\n }\n };\n}\nfunction getExchangeDebugTokenRequest(app, debugToken) {\n const {\n projectId,\n appId,\n apiKey\n } = app.options;\n return {\n url: `${BASE_ENDPOINT}/projects/${projectId}/apps/${appId}:${EXCHANGE_DEBUG_TOKEN_METHOD}?key=${apiKey}`,\n body: {\n // eslint-disable-next-line\n debug_token: debugToken\n }\n };\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst DB_NAME = 'firebase-app-check-database';\nconst DB_VERSION = 1;\nconst STORE_NAME = 'firebase-app-check-store';\nconst DEBUG_TOKEN_KEY = 'debug-token';\nlet dbPromise = null;\nfunction getDBPromise() {\n if (dbPromise) {\n return dbPromise;\n }\n dbPromise = new Promise((resolve, reject) => {\n try {\n const request = indexedDB.open(DB_NAME, DB_VERSION);\n request.onsuccess = event => {\n resolve(event.target.result);\n };\n request.onerror = event => {\n var _a;\n reject(ERROR_FACTORY.create(\"storage-open\" /* AppCheckError.STORAGE_OPEN */, {\n originalErrorMessage: (_a = event.target.error) === null || _a === void 0 ? void 0 : _a.message\n }));\n };\n request.onupgradeneeded = event => {\n const db = event.target.result;\n // We don't use 'break' in this switch statement, the fall-through\n // behavior is what we want, because if there are multiple versions between\n // the old version and the current version, we want ALL the migrations\n // that correspond to those versions to run, not only the last one.\n // eslint-disable-next-line default-case\n switch (event.oldVersion) {\n case 0:\n db.createObjectStore(STORE_NAME, {\n keyPath: 'compositeKey'\n });\n }\n };\n } catch (e) {\n reject(ERROR_FACTORY.create(\"storage-open\" /* AppCheckError.STORAGE_OPEN */, {\n originalErrorMessage: e === null || e === void 0 ? void 0 : e.message\n }));\n }\n });\n return dbPromise;\n}\nfunction readTokenFromIndexedDB(app) {\n return read(computeKey(app));\n}\nfunction writeTokenToIndexedDB(app, token) {\n return write(computeKey(app), token);\n}\nfunction writeDebugTokenToIndexedDB(token) {\n return write(DEBUG_TOKEN_KEY, token);\n}\nfunction readDebugTokenFromIndexedDB() {\n return read(DEBUG_TOKEN_KEY);\n}\nasync function write(key, value) {\n const db = await getDBPromise();\n const transaction = db.transaction(STORE_NAME, 'readwrite');\n const store = transaction.objectStore(STORE_NAME);\n const request = store.put({\n compositeKey: key,\n value\n });\n return new Promise((resolve, reject) => {\n request.onsuccess = _event => {\n resolve();\n };\n transaction.onerror = event => {\n var _a;\n reject(ERROR_FACTORY.create(\"storage-set\" /* AppCheckError.STORAGE_WRITE */, {\n originalErrorMessage: (_a = event.target.error) === null || _a === void 0 ? void 0 : _a.message\n }));\n };\n });\n}\nasync function read(key) {\n const db = await getDBPromise();\n const transaction = db.transaction(STORE_NAME, 'readonly');\n const store = transaction.objectStore(STORE_NAME);\n const request = store.get(key);\n return new Promise((resolve, reject) => {\n request.onsuccess = event => {\n const result = event.target.result;\n if (result) {\n resolve(result.value);\n } else {\n resolve(undefined);\n }\n };\n transaction.onerror = event => {\n var _a;\n reject(ERROR_FACTORY.create(\"storage-get\" /* AppCheckError.STORAGE_GET */, {\n originalErrorMessage: (_a = event.target.error) === null || _a === void 0 ? void 0 : _a.message\n }));\n };\n });\n}\nfunction computeKey(app) {\n return `${app.options.appId}-${app.name}`;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst logger = new Logger('@firebase/app-check');\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Always resolves. In case of an error reading from indexeddb, resolve with undefined\r\n */\nasync function readTokenFromStorage(app) {\n if (isIndexedDBAvailable()) {\n let token = undefined;\n try {\n token = await readTokenFromIndexedDB(app);\n } catch (e) {\n // swallow the error and return undefined\n logger.warn(`Failed to read token from IndexedDB. Error: ${e}`);\n }\n return token;\n }\n return undefined;\n}\n/**\r\n * Always resolves. In case of an error writing to indexeddb, print a warning and resolve the promise\r\n */\nfunction writeTokenToStorage(app, token) {\n if (isIndexedDBAvailable()) {\n return writeTokenToIndexedDB(app, token).catch(e => {\n // swallow the error and resolve the promise\n logger.warn(`Failed to write token to IndexedDB. Error: ${e}`);\n });\n }\n return Promise.resolve();\n}\nasync function readOrCreateDebugTokenFromStorage() {\n /**\r\n * Theoretically race condition can happen if we read, then write in 2 separate transactions.\r\n * But it won't happen here, because this function will be called exactly once.\r\n */\n let existingDebugToken = undefined;\n try {\n existingDebugToken = await readDebugTokenFromIndexedDB();\n } catch (_e) {\n // failed to read from indexeddb. We assume there is no existing debug token, and generate a new one.\n }\n if (!existingDebugToken) {\n // create a new debug token\n const newToken = uuidv4();\n // We don't need to block on writing to indexeddb\n // In case persistence failed, a new debug token will be generated everytime the page is refreshed.\n // It renders the debug token useless because you have to manually register(whitelist) the new token in the firebase console again and again.\n // If you see this error trying to use debug token, it probably means you are using a browser that doesn't support indexeddb.\n // You should switch to a different browser that supports indexeddb\n writeDebugTokenToIndexedDB(newToken).catch(e => logger.warn(`Failed to persist debug token to IndexedDB. Error: ${e}`));\n return newToken;\n } else {\n return existingDebugToken;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction isDebugMode() {\n const debugState = getDebugState();\n return debugState.enabled;\n}\nasync function getDebugToken() {\n const state = getDebugState();\n if (state.enabled && state.token) {\n return state.token.promise;\n } else {\n // should not happen!\n throw Error(`\n Can't get debug token in production mode.\n `);\n }\n}\nfunction initializeDebugMode() {\n const globals = getGlobal();\n const debugState = getDebugState();\n // Set to true if this function has been called, whether or not\n // it enabled debug mode.\n debugState.initialized = true;\n if (typeof globals.FIREBASE_APPCHECK_DEBUG_TOKEN !== 'string' && globals.FIREBASE_APPCHECK_DEBUG_TOKEN !== true) {\n return;\n }\n debugState.enabled = true;\n const deferredToken = new Deferred();\n debugState.token = deferredToken;\n if (typeof globals.FIREBASE_APPCHECK_DEBUG_TOKEN === 'string') {\n deferredToken.resolve(globals.FIREBASE_APPCHECK_DEBUG_TOKEN);\n } else {\n deferredToken.resolve(readOrCreateDebugTokenFromStorage());\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// Initial hardcoded value agreed upon across platforms for initial launch.\n// Format left open for possible dynamic error values and other fields in the future.\nconst defaultTokenErrorData = {\n error: 'UNKNOWN_ERROR'\n};\n/**\r\n * Stringify and base64 encode token error data.\r\n *\r\n * @param tokenError Error data, currently hardcoded.\r\n */\nfunction formatDummyToken(tokenErrorData) {\n return base64.encodeString(JSON.stringify(tokenErrorData), /* webSafe= */false);\n}\n/**\r\n * This function always resolves.\r\n * The result will contain an error field if there is any error.\r\n * In case there is an error, the token field in the result will be populated with a dummy value\r\n */\nasync function getToken$2(appCheck, forceRefresh = false) {\n const app = appCheck.app;\n ensureActivated(app);\n const state = getStateReference(app);\n /**\r\n * First check if there is a token in memory from a previous `getToken()` call.\r\n */\n let token = state.token;\n let error = undefined;\n /**\r\n * If an invalid token was found in memory, clear token from\r\n * memory and unset the local variable `token`.\r\n */\n if (token && !isValid(token)) {\n state.token = undefined;\n token = undefined;\n }\n /**\r\n * If there is no valid token in memory, try to load token from indexedDB.\r\n */\n if (!token) {\n // cachedTokenPromise contains the token found in IndexedDB or undefined if not found.\n const cachedToken = await state.cachedTokenPromise;\n if (cachedToken) {\n if (isValid(cachedToken)) {\n token = cachedToken;\n } else {\n // If there was an invalid token in the indexedDB cache, clear it.\n await writeTokenToStorage(app, undefined);\n }\n }\n }\n // Return the cached token (from either memory or indexedDB) if it's valid\n if (!forceRefresh && token && isValid(token)) {\n return {\n token: token.token\n };\n }\n // Only set to true if this `getToken()` call is making the actual\n // REST call to the exchange endpoint, versus waiting for an already\n // in-flight call (see debug and regular exchange endpoint paths below)\n let shouldCallListeners = false;\n /**\r\n * DEBUG MODE\r\n * If debug mode is set, and there is no cached token, fetch a new App\r\n * Check token using the debug token, and return it directly.\r\n */\n if (isDebugMode()) {\n // Avoid making another call to the exchange endpoint if one is in flight.\n if (!state.exchangeTokenPromise) {\n state.exchangeTokenPromise = exchangeToken(getExchangeDebugTokenRequest(app, await getDebugToken()), appCheck.heartbeatServiceProvider).finally(() => {\n // Clear promise when settled - either resolved or rejected.\n state.exchangeTokenPromise = undefined;\n });\n shouldCallListeners = true;\n }\n const tokenFromDebugExchange = await state.exchangeTokenPromise;\n // Write debug token to indexedDB.\n await writeTokenToStorage(app, tokenFromDebugExchange);\n // Write debug token to state.\n state.token = tokenFromDebugExchange;\n return {\n token: tokenFromDebugExchange.token\n };\n }\n /**\r\n * There are no valid tokens in memory or indexedDB and we are not in\r\n * debug mode.\r\n * Request a new token from the exchange endpoint.\r\n */\n try {\n // Avoid making another call to the exchange endpoint if one is in flight.\n if (!state.exchangeTokenPromise) {\n // state.provider is populated in initializeAppCheck()\n // ensureActivated() at the top of this function checks that\n // initializeAppCheck() has been called.\n state.exchangeTokenPromise = state.provider.getToken().finally(() => {\n // Clear promise when settled - either resolved or rejected.\n state.exchangeTokenPromise = undefined;\n });\n shouldCallListeners = true;\n }\n token = await getStateReference(app).exchangeTokenPromise;\n } catch (e) {\n if (e.code === `appCheck/${\"throttled\" /* AppCheckError.THROTTLED */}`) {\n // Warn if throttled, but do not treat it as an error.\n logger.warn(e.message);\n } else {\n // `getToken()` should never throw, but logging error text to console will aid debugging.\n logger.error(e);\n }\n // Always save error to be added to dummy token.\n error = e;\n }\n let interopTokenResult;\n if (!token) {\n // If token is undefined, there must be an error.\n // Return a dummy token along with the error.\n interopTokenResult = makeDummyTokenResult(error);\n } else if (error) {\n if (isValid(token)) {\n // It's also possible a valid token exists, but there's also an error.\n // (Such as if the token is almost expired, tries to refresh, and\n // the exchange request fails.)\n // We add a special error property here so that the refresher will\n // count this as a failed attempt and use the backoff instead of\n // retrying repeatedly with no delay, but any 3P listeners will not\n // be hindered in getting the still-valid token.\n interopTokenResult = {\n token: token.token,\n internalError: error\n };\n } else {\n // No invalid tokens should make it to this step. Memory and cached tokens\n // are checked. Other tokens are from fresh exchanges. But just in case.\n interopTokenResult = makeDummyTokenResult(error);\n }\n } else {\n interopTokenResult = {\n token: token.token\n };\n // write the new token to the memory state as well as the persistent storage.\n // Only do it if we got a valid new token\n state.token = token;\n await writeTokenToStorage(app, token);\n }\n if (shouldCallListeners) {\n notifyTokenListeners(app, interopTokenResult);\n }\n return interopTokenResult;\n}\n/**\r\n * Internal API for limited use tokens. Skips all FAC state and simply calls\r\n * the underlying provider.\r\n */\nasync function getLimitedUseToken$1(appCheck) {\n const app = appCheck.app;\n ensureActivated(app);\n const {\n provider\n } = getStateReference(app);\n if (isDebugMode()) {\n const debugToken = await getDebugToken();\n const {\n token\n } = await exchangeToken(getExchangeDebugTokenRequest(app, debugToken), appCheck.heartbeatServiceProvider);\n return {\n token\n };\n } else {\n // provider is definitely valid since we ensure AppCheck was activated\n const {\n token\n } = await provider.getToken();\n return {\n token\n };\n }\n}\nfunction addTokenListener(appCheck, type, listener, onError) {\n const {\n app\n } = appCheck;\n const state = getStateReference(app);\n const tokenObserver = {\n next: listener,\n error: onError,\n type\n };\n state.tokenObservers = [...state.tokenObservers, tokenObserver];\n // Invoke the listener async immediately if there is a valid token\n // in memory.\n if (state.token && isValid(state.token)) {\n const validToken = state.token;\n Promise.resolve().then(() => {\n listener({\n token: validToken.token\n });\n initTokenRefresher(appCheck);\n }).catch(() => {\n /* we don't care about exceptions thrown in listeners */\n });\n }\n /**\r\n * Wait for any cached token promise to resolve before starting the token\r\n * refresher. The refresher checks to see if there is an existing token\r\n * in state and calls the exchange endpoint if not. We should first let the\r\n * IndexedDB check have a chance to populate state if it can.\r\n *\r\n * Listener call isn't needed here because cachedTokenPromise will call any\r\n * listeners that exist when it resolves.\r\n */\n // state.cachedTokenPromise is always populated in `activate()`.\n void state.cachedTokenPromise.then(() => initTokenRefresher(appCheck));\n}\nfunction removeTokenListener(app, listener) {\n const state = getStateReference(app);\n const newObservers = state.tokenObservers.filter(tokenObserver => tokenObserver.next !== listener);\n if (newObservers.length === 0 && state.tokenRefresher && state.tokenRefresher.isRunning()) {\n state.tokenRefresher.stop();\n }\n state.tokenObservers = newObservers;\n}\n/**\r\n * Logic to create and start refresher as needed.\r\n */\nfunction initTokenRefresher(appCheck) {\n const {\n app\n } = appCheck;\n const state = getStateReference(app);\n // Create the refresher but don't start it if `isTokenAutoRefreshEnabled`\n // is not true.\n let refresher = state.tokenRefresher;\n if (!refresher) {\n refresher = createTokenRefresher(appCheck);\n state.tokenRefresher = refresher;\n }\n if (!refresher.isRunning() && state.isTokenAutoRefreshEnabled) {\n refresher.start();\n }\n}\nfunction createTokenRefresher(appCheck) {\n const {\n app\n } = appCheck;\n return new Refresher(\n // Keep in mind when this fails for any reason other than the ones\n // for which we should retry, it will effectively stop the proactive refresh.\n async () => {\n const state = getStateReference(app);\n // If there is no token, we will try to load it from storage and use it\n // If there is a token, we force refresh it because we know it's going to expire soon\n let result;\n if (!state.token) {\n result = await getToken$2(appCheck);\n } else {\n result = await getToken$2(appCheck, true);\n }\n /**\r\n * getToken() always resolves. In case the result has an error field defined, it means\r\n * the operation failed, and we should retry.\r\n */\n if (result.error) {\n throw result.error;\n }\n /**\r\n * A special `internalError` field reflects that there was an error\r\n * getting a new token from the exchange endpoint, but there's still a\r\n * previous token that's valid for now and this should be passed to 2P/3P\r\n * requests for a token. But we want this callback (`this.operation` in\r\n * `Refresher`) to throw in order to kick off the Refresher's retry\r\n * backoff. (Setting `hasSucceeded` to false.)\r\n */\n if (result.internalError) {\n throw result.internalError;\n }\n }, () => {\n return true;\n }, () => {\n const state = getStateReference(app);\n if (state.token) {\n // issuedAtTime + (50% * total TTL) + 5 minutes\n let nextRefreshTimeMillis = state.token.issuedAtTimeMillis + (state.token.expireTimeMillis - state.token.issuedAtTimeMillis) * 0.5 + 5 * 60 * 1000;\n // Do not allow refresh time to be past (expireTime - 5 minutes)\n const latestAllowableRefresh = state.token.expireTimeMillis - 5 * 60 * 1000;\n nextRefreshTimeMillis = Math.min(nextRefreshTimeMillis, latestAllowableRefresh);\n return Math.max(0, nextRefreshTimeMillis - Date.now());\n } else {\n return 0;\n }\n }, TOKEN_REFRESH_TIME.RETRIAL_MIN_WAIT, TOKEN_REFRESH_TIME.RETRIAL_MAX_WAIT);\n}\nfunction notifyTokenListeners(app, token) {\n const observers = getStateReference(app).tokenObservers;\n for (const observer of observers) {\n try {\n if (observer.type === \"EXTERNAL\" /* ListenerType.EXTERNAL */ && token.error != null) {\n // If this listener was added by a 3P call, send any token error to\n // the supplied error handler. A 3P observer always has an error\n // handler.\n observer.error(token.error);\n } else {\n // If the token has no error field, always return the token.\n // If this is a 2P listener, return the token, whether or not it\n // has an error field.\n observer.next(token);\n }\n } catch (e) {\n // Errors in the listener function itself are always ignored.\n }\n }\n}\nfunction isValid(token) {\n return token.expireTimeMillis - Date.now() > 0;\n}\nfunction makeDummyTokenResult(error) {\n return {\n token: formatDummyToken(defaultTokenErrorData),\n error\n };\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * AppCheck Service class.\r\n */\nclass AppCheckService {\n constructor(app, heartbeatServiceProvider) {\n this.app = app;\n this.heartbeatServiceProvider = heartbeatServiceProvider;\n }\n _delete() {\n const {\n tokenObservers\n } = getStateReference(this.app);\n for (const tokenObserver of tokenObservers) {\n removeTokenListener(this.app, tokenObserver.next);\n }\n return Promise.resolve();\n }\n}\nfunction factory(app, heartbeatServiceProvider) {\n return new AppCheckService(app, heartbeatServiceProvider);\n}\nfunction internalFactory(appCheck) {\n return {\n getToken: forceRefresh => getToken$2(appCheck, forceRefresh),\n getLimitedUseToken: () => getLimitedUseToken$1(appCheck),\n addTokenListener: listener => addTokenListener(appCheck, \"INTERNAL\" /* ListenerType.INTERNAL */, listener),\n removeTokenListener: listener => removeTokenListener(appCheck.app, listener)\n };\n}\nconst name = \"@firebase/app-check\";\nconst version = \"0.8.1\";\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst RECAPTCHA_URL = 'https://www.google.com/recaptcha/api.js';\nconst RECAPTCHA_ENTERPRISE_URL = 'https://www.google.com/recaptcha/enterprise.js';\nfunction initializeV3(app, siteKey) {\n const initialized = new Deferred();\n const state = getStateReference(app);\n state.reCAPTCHAState = {\n initialized\n };\n const divId = makeDiv(app);\n const grecaptcha = getRecaptcha(false);\n if (!grecaptcha) {\n loadReCAPTCHAV3Script(() => {\n const grecaptcha = getRecaptcha(false);\n if (!grecaptcha) {\n // it shouldn't happen.\n throw new Error('no recaptcha');\n }\n queueWidgetRender(app, siteKey, grecaptcha, divId, initialized);\n });\n } else {\n queueWidgetRender(app, siteKey, grecaptcha, divId, initialized);\n }\n return initialized.promise;\n}\nfunction initializeEnterprise(app, siteKey) {\n const initialized = new Deferred();\n const state = getStateReference(app);\n state.reCAPTCHAState = {\n initialized\n };\n const divId = makeDiv(app);\n const grecaptcha = getRecaptcha(true);\n if (!grecaptcha) {\n loadReCAPTCHAEnterpriseScript(() => {\n const grecaptcha = getRecaptcha(true);\n if (!grecaptcha) {\n // it shouldn't happen.\n throw new Error('no recaptcha');\n }\n queueWidgetRender(app, siteKey, grecaptcha, divId, initialized);\n });\n } else {\n queueWidgetRender(app, siteKey, grecaptcha, divId, initialized);\n }\n return initialized.promise;\n}\n/**\r\n * Add listener to render the widget and resolve the promise when\r\n * the grecaptcha.ready() event fires.\r\n */\nfunction queueWidgetRender(app, siteKey, grecaptcha, container, initialized) {\n grecaptcha.ready(() => {\n // Invisible widgets allow us to set a different siteKey for each widget,\n // so we use them to support multiple apps\n renderInvisibleWidget(app, siteKey, grecaptcha, container);\n initialized.resolve(grecaptcha);\n });\n}\n/**\r\n * Add invisible div to page.\r\n */\nfunction makeDiv(app) {\n const divId = `fire_app_check_${app.name}`;\n const invisibleDiv = document.createElement('div');\n invisibleDiv.id = divId;\n invisibleDiv.style.display = 'none';\n document.body.appendChild(invisibleDiv);\n return divId;\n}\nasync function getToken$1(app) {\n ensureActivated(app);\n // ensureActivated() guarantees that reCAPTCHAState is set\n const reCAPTCHAState = getStateReference(app).reCAPTCHAState;\n const recaptcha = await reCAPTCHAState.initialized.promise;\n return new Promise((resolve, _reject) => {\n // Updated after initialization is complete.\n const reCAPTCHAState = getStateReference(app).reCAPTCHAState;\n recaptcha.ready(() => {\n resolve(\n // widgetId is guaranteed to be available if reCAPTCHAState.initialized.promise resolved.\n recaptcha.execute(reCAPTCHAState.widgetId, {\n action: 'fire_app_check'\n }));\n });\n });\n}\n/**\r\n *\r\n * @param app\r\n * @param container - Id of a HTML element.\r\n */\nfunction renderInvisibleWidget(app, siteKey, grecaptcha, container) {\n const widgetId = grecaptcha.render(container, {\n sitekey: siteKey,\n size: 'invisible',\n // Success callback - set state\n callback: () => {\n getStateReference(app).reCAPTCHAState.succeeded = true;\n },\n // Failure callback - set state\n 'error-callback': () => {\n getStateReference(app).reCAPTCHAState.succeeded = false;\n }\n });\n const state = getStateReference(app);\n state.reCAPTCHAState = Object.assign(Object.assign({}, state.reCAPTCHAState), {\n // state.reCAPTCHAState is set in the initialize()\n widgetId\n });\n}\nfunction loadReCAPTCHAV3Script(onload) {\n const script = document.createElement('script');\n script.src = RECAPTCHA_URL;\n script.onload = onload;\n document.head.appendChild(script);\n}\nfunction loadReCAPTCHAEnterpriseScript(onload) {\n const script = document.createElement('script');\n script.src = RECAPTCHA_ENTERPRISE_URL;\n script.onload = onload;\n document.head.appendChild(script);\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * App Check provider that can obtain a reCAPTCHA V3 token and exchange it\r\n * for an App Check token.\r\n *\r\n * @public\r\n */\nclass ReCaptchaV3Provider {\n /**\r\n * Create a ReCaptchaV3Provider instance.\r\n * @param siteKey - ReCAPTCHA V3 siteKey.\r\n */\n constructor(_siteKey) {\n this._siteKey = _siteKey;\n /**\r\n * Throttle requests on certain error codes to prevent too many retries\r\n * in a short time.\r\n */\n this._throttleData = null;\n }\n /**\r\n * Returns an App Check token.\r\n * @internal\r\n */\n async getToken() {\n var _a, _b, _c;\n throwIfThrottled(this._throttleData);\n // Top-level `getToken()` has already checked that App Check is initialized\n // and therefore this._app and this._heartbeatServiceProvider are available.\n const attestedClaimsToken = await getToken$1(this._app).catch(_e => {\n // reCaptcha.execute() throws null which is not very descriptive.\n throw ERROR_FACTORY.create(\"recaptcha-error\" /* AppCheckError.RECAPTCHA_ERROR */);\n });\n // Check if a failure state was set by the recaptcha \"error-callback\".\n if (!((_a = getStateReference(this._app).reCAPTCHAState) === null || _a === void 0 ? void 0 : _a.succeeded)) {\n throw ERROR_FACTORY.create(\"recaptcha-error\" /* AppCheckError.RECAPTCHA_ERROR */);\n }\n let result;\n try {\n result = await exchangeToken(getExchangeRecaptchaV3TokenRequest(this._app, attestedClaimsToken), this._heartbeatServiceProvider);\n } catch (e) {\n if ((_b = e.code) === null || _b === void 0 ? void 0 : _b.includes(\"fetch-status-error\" /* AppCheckError.FETCH_STATUS_ERROR */)) {\n this._throttleData = setBackoff(Number((_c = e.customData) === null || _c === void 0 ? void 0 : _c.httpStatus), this._throttleData);\n throw ERROR_FACTORY.create(\"throttled\" /* AppCheckError.THROTTLED */, {\n time: getDurationString(this._throttleData.allowRequestsAfter - Date.now()),\n httpStatus: this._throttleData.httpStatus\n });\n } else {\n throw e;\n }\n }\n // If successful, clear throttle data.\n this._throttleData = null;\n return result;\n }\n /**\r\n * @internal\r\n */\n initialize(app) {\n this._app = app;\n this._heartbeatServiceProvider = _getProvider(app, 'heartbeat');\n initializeV3(app, this._siteKey).catch(() => {\n /* we don't care about the initialization result */\n });\n }\n /**\r\n * @internal\r\n */\n isEqual(otherProvider) {\n if (otherProvider instanceof ReCaptchaV3Provider) {\n return this._siteKey === otherProvider._siteKey;\n } else {\n return false;\n }\n }\n}\n/**\r\n * App Check provider that can obtain a reCAPTCHA Enterprise token and exchange it\r\n * for an App Check token.\r\n *\r\n * @public\r\n */\nclass ReCaptchaEnterpriseProvider {\n /**\r\n * Create a ReCaptchaEnterpriseProvider instance.\r\n * @param siteKey - reCAPTCHA Enterprise score-based site key.\r\n */\n constructor(_siteKey) {\n this._siteKey = _siteKey;\n /**\r\n * Throttle requests on certain error codes to prevent too many retries\r\n * in a short time.\r\n */\n this._throttleData = null;\n }\n /**\r\n * Returns an App Check token.\r\n * @internal\r\n */\n async getToken() {\n var _a, _b, _c;\n throwIfThrottled(this._throttleData);\n // Top-level `getToken()` has already checked that App Check is initialized\n // and therefore this._app and this._heartbeatServiceProvider are available.\n const attestedClaimsToken = await getToken$1(this._app).catch(_e => {\n // reCaptcha.execute() throws null which is not very descriptive.\n throw ERROR_FACTORY.create(\"recaptcha-error\" /* AppCheckError.RECAPTCHA_ERROR */);\n });\n // Check if a failure state was set by the recaptcha \"error-callback\".\n if (!((_a = getStateReference(this._app).reCAPTCHAState) === null || _a === void 0 ? void 0 : _a.succeeded)) {\n throw ERROR_FACTORY.create(\"recaptcha-error\" /* AppCheckError.RECAPTCHA_ERROR */);\n }\n let result;\n try {\n result = await exchangeToken(getExchangeRecaptchaEnterpriseTokenRequest(this._app, attestedClaimsToken), this._heartbeatServiceProvider);\n } catch (e) {\n if ((_b = e.code) === null || _b === void 0 ? void 0 : _b.includes(\"fetch-status-error\" /* AppCheckError.FETCH_STATUS_ERROR */)) {\n this._throttleData = setBackoff(Number((_c = e.customData) === null || _c === void 0 ? void 0 : _c.httpStatus), this._throttleData);\n throw ERROR_FACTORY.create(\"throttled\" /* AppCheckError.THROTTLED */, {\n time: getDurationString(this._throttleData.allowRequestsAfter - Date.now()),\n httpStatus: this._throttleData.httpStatus\n });\n } else {\n throw e;\n }\n }\n // If successful, clear throttle data.\n this._throttleData = null;\n return result;\n }\n /**\r\n * @internal\r\n */\n initialize(app) {\n this._app = app;\n this._heartbeatServiceProvider = _getProvider(app, 'heartbeat');\n initializeEnterprise(app, this._siteKey).catch(() => {\n /* we don't care about the initialization result */\n });\n }\n /**\r\n * @internal\r\n */\n isEqual(otherProvider) {\n if (otherProvider instanceof ReCaptchaEnterpriseProvider) {\n return this._siteKey === otherProvider._siteKey;\n } else {\n return false;\n }\n }\n}\n/**\r\n * Custom provider class.\r\n * @public\r\n */\nclass CustomProvider {\n constructor(_customProviderOptions) {\n this._customProviderOptions = _customProviderOptions;\n }\n /**\r\n * @internal\r\n */\n async getToken() {\n // custom provider\n const customToken = await this._customProviderOptions.getToken();\n // Try to extract IAT from custom token, in case this token is not\n // being newly issued. JWT timestamps are in seconds since epoch.\n const issuedAtTimeSeconds = issuedAtTime(customToken.token);\n // Very basic validation, use current timestamp as IAT if JWT\n // has no `iat` field or value is out of bounds.\n const issuedAtTimeMillis = issuedAtTimeSeconds !== null && issuedAtTimeSeconds < Date.now() && issuedAtTimeSeconds > 0 ? issuedAtTimeSeconds * 1000 : Date.now();\n return Object.assign(Object.assign({}, customToken), {\n issuedAtTimeMillis\n });\n }\n /**\r\n * @internal\r\n */\n initialize(app) {\n this._app = app;\n }\n /**\r\n * @internal\r\n */\n isEqual(otherProvider) {\n if (otherProvider instanceof CustomProvider) {\n return this._customProviderOptions.getToken.toString() === otherProvider._customProviderOptions.getToken.toString();\n } else {\n return false;\n }\n }\n}\n/**\r\n * Set throttle data to block requests until after a certain time\r\n * depending on the failed request's status code.\r\n * @param httpStatus - Status code of failed request.\r\n * @param throttleData - `ThrottleData` object containing previous throttle\r\n * data state.\r\n * @returns Data about current throttle state and expiration time.\r\n */\nfunction setBackoff(httpStatus, throttleData) {\n /**\r\n * Block retries for 1 day for the following error codes:\r\n *\r\n * 404: Likely malformed URL.\r\n *\r\n * 403:\r\n * - Attestation failed\r\n * - Wrong API key\r\n * - Project deleted\r\n */\n if (httpStatus === 404 || httpStatus === 403) {\n return {\n backoffCount: 1,\n allowRequestsAfter: Date.now() + ONE_DAY,\n httpStatus\n };\n } else {\n /**\r\n * For all other error codes, the time when it is ok to retry again\r\n * is based on exponential backoff.\r\n */\n const backoffCount = throttleData ? throttleData.backoffCount : 0;\n const backoffMillis = calculateBackoffMillis(backoffCount, 1000, 2);\n return {\n backoffCount: backoffCount + 1,\n allowRequestsAfter: Date.now() + backoffMillis,\n httpStatus\n };\n }\n}\nfunction throwIfThrottled(throttleData) {\n if (throttleData) {\n if (Date.now() - throttleData.allowRequestsAfter <= 0) {\n // If before, throw.\n throw ERROR_FACTORY.create(\"throttled\" /* AppCheckError.THROTTLED */, {\n time: getDurationString(throttleData.allowRequestsAfter - Date.now()),\n httpStatus: throttleData.httpStatus\n });\n }\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Activate App Check for the given app. Can be called only once per app.\r\n * @param app - the {@link @firebase/app#FirebaseApp} to activate App Check for\r\n * @param options - App Check initialization options\r\n * @public\r\n */\nfunction initializeAppCheck(app = getApp(), options) {\n app = getModularInstance(app);\n const provider = _getProvider(app, 'app-check');\n // Ensure initializeDebugMode() is only called once.\n if (!getDebugState().initialized) {\n initializeDebugMode();\n }\n // Log a message containing the debug token when `initializeAppCheck()`\n // is called in debug mode.\n if (isDebugMode()) {\n // Do not block initialization to get the token for the message.\n void getDebugToken().then(token =>\n // Not using logger because I don't think we ever want this accidentally hidden.\n console.log(`App Check debug token: ${token}. You will need to add it to your app's App Check settings in the Firebase console for it to work.`));\n }\n if (provider.isInitialized()) {\n const existingInstance = provider.getImmediate();\n const initialOptions = provider.getOptions();\n if (initialOptions.isTokenAutoRefreshEnabled === options.isTokenAutoRefreshEnabled && initialOptions.provider.isEqual(options.provider)) {\n return existingInstance;\n } else {\n throw ERROR_FACTORY.create(\"already-initialized\" /* AppCheckError.ALREADY_INITIALIZED */, {\n appName: app.name\n });\n }\n }\n const appCheck = provider.initialize({\n options\n });\n _activate(app, options.provider, options.isTokenAutoRefreshEnabled);\n // If isTokenAutoRefreshEnabled is false, do not send any requests to the\n // exchange endpoint without an explicit call from the user either directly\n // or through another Firebase library (storage, functions, etc.)\n if (getStateReference(app).isTokenAutoRefreshEnabled) {\n // Adding a listener will start the refresher and fetch a token if needed.\n // This gets a token ready and prevents a delay when an internal library\n // requests the token.\n // Listener function does not need to do anything, its base functionality\n // of calling getToken() already fetches token and writes it to memory/storage.\n addTokenListener(appCheck, \"INTERNAL\" /* ListenerType.INTERNAL */, () => {});\n }\n return appCheck;\n}\n/**\r\n * Activate App Check\r\n * @param app - Firebase app to activate App Check for.\r\n * @param provider - reCAPTCHA v3 provider or\r\n * custom token provider.\r\n * @param isTokenAutoRefreshEnabled - If true, the SDK automatically\r\n * refreshes App Check tokens as needed. If undefined, defaults to the\r\n * value of `app.automaticDataCollectionEnabled`, which defaults to\r\n * false and can be set in the app config.\r\n */\nfunction _activate(app, provider, isTokenAutoRefreshEnabled) {\n // Create an entry in the APP_CHECK_STATES map. Further changes should\n // directly mutate this object.\n const state = setInitialState(app, Object.assign({}, DEFAULT_STATE));\n state.activated = true;\n state.provider = provider; // Read cached token from storage if it exists and store it in memory.\n state.cachedTokenPromise = readTokenFromStorage(app).then(cachedToken => {\n if (cachedToken && isValid(cachedToken)) {\n state.token = cachedToken;\n // notify all listeners with the cached token\n notifyTokenListeners(app, {\n token: cachedToken.token\n });\n }\n return cachedToken;\n });\n // Use value of global `automaticDataCollectionEnabled` (which\n // itself defaults to false if not specified in config) if\n // `isTokenAutoRefreshEnabled` param was not provided by user.\n state.isTokenAutoRefreshEnabled = isTokenAutoRefreshEnabled === undefined ? app.automaticDataCollectionEnabled : isTokenAutoRefreshEnabled;\n state.provider.initialize(app);\n}\n/**\r\n * Set whether App Check will automatically refresh tokens as needed.\r\n *\r\n * @param appCheckInstance - The App Check service instance.\r\n * @param isTokenAutoRefreshEnabled - If true, the SDK automatically\r\n * refreshes App Check tokens as needed. This overrides any value set\r\n * during `initializeAppCheck()`.\r\n * @public\r\n */\nfunction setTokenAutoRefreshEnabled(appCheckInstance, isTokenAutoRefreshEnabled) {\n const app = appCheckInstance.app;\n const state = getStateReference(app);\n // This will exist if any product libraries have called\n // `addTokenListener()`\n if (state.tokenRefresher) {\n if (isTokenAutoRefreshEnabled === true) {\n state.tokenRefresher.start();\n } else {\n state.tokenRefresher.stop();\n }\n }\n state.isTokenAutoRefreshEnabled = isTokenAutoRefreshEnabled;\n}\n/**\r\n * Get the current App Check token. Attaches to the most recent\r\n * in-flight request if one is present. Returns null if no token\r\n * is present and no token requests are in-flight.\r\n *\r\n * @param appCheckInstance - The App Check service instance.\r\n * @param forceRefresh - If true, will always try to fetch a fresh token.\r\n * If false, will use a cached token if found in storage.\r\n * @public\r\n */\nasync function getToken(appCheckInstance, forceRefresh) {\n const result = await getToken$2(appCheckInstance, forceRefresh);\n if (result.error) {\n throw result.error;\n }\n return {\n token: result.token\n };\n}\n/**\r\n * Requests a Firebase App Check token. This method should be used\r\n * only if you need to authorize requests to a non-Firebase backend.\r\n *\r\n * Returns limited-use tokens that are intended for use with your\r\n * non-Firebase backend endpoints that are protected with\r\n * \r\n * Replay Protection . This method\r\n * does not affect the token generation behavior of the\r\n * #getAppCheckToken() method.\r\n *\r\n * @param appCheckInstance - The App Check service instance.\r\n * @returns The limited use token.\r\n * @public\r\n */\nfunction getLimitedUseToken(appCheckInstance) {\n return getLimitedUseToken$1(appCheckInstance);\n}\n/**\r\n * Wraps `addTokenListener`/`removeTokenListener` methods in an `Observer`\r\n * pattern for public use.\r\n */\nfunction onTokenChanged(appCheckInstance, onNextOrObserver, onError,\n/**\r\n * NOTE: Although an `onCompletion` callback can be provided, it will\r\n * never be called because the token stream is never-ending.\r\n * It is added only for API consistency with the observer pattern, which\r\n * we follow in JS APIs.\r\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nonCompletion) {\n let nextFn = () => {};\n let errorFn = () => {};\n if (onNextOrObserver.next != null) {\n nextFn = onNextOrObserver.next.bind(onNextOrObserver);\n } else {\n nextFn = onNextOrObserver;\n }\n if (onNextOrObserver.error != null) {\n errorFn = onNextOrObserver.error.bind(onNextOrObserver);\n } else if (onError) {\n errorFn = onError;\n }\n addTokenListener(appCheckInstance, \"EXTERNAL\" /* ListenerType.EXTERNAL */, nextFn, errorFn);\n return () => removeTokenListener(appCheckInstance.app, nextFn);\n}\n\n/**\r\n * The Firebase App Check Web SDK.\r\n *\r\n * @remarks\r\n * Firebase App Check does not work in a Node.js environment using `ReCaptchaV3Provider` or\r\n * `ReCaptchaEnterpriseProvider`, but can be used in Node.js if you use\r\n * `CustomProvider` and write your own attestation method.\r\n *\r\n * @packageDocumentation\r\n */\nconst APP_CHECK_NAME = 'app-check';\nconst APP_CHECK_NAME_INTERNAL = 'app-check-internal';\nfunction registerAppCheck() {\n // The public interface\n _registerComponent(new Component(APP_CHECK_NAME, container => {\n // getImmediate for FirebaseApp will always succeed\n const app = container.getProvider('app').getImmediate();\n const heartbeatServiceProvider = container.getProvider('heartbeat');\n return factory(app, heartbeatServiceProvider);\n }, \"PUBLIC\" /* ComponentType.PUBLIC */).setInstantiationMode(\"EXPLICIT\" /* InstantiationMode.EXPLICIT */)\n /**\r\n * Initialize app-check-internal after app-check is initialized to make AppCheck available to\r\n * other Firebase SDKs\r\n */.setInstanceCreatedCallback((container, _identifier, _appcheckService) => {\n container.getProvider(APP_CHECK_NAME_INTERNAL).initialize();\n }));\n // The internal interface used by other Firebase products\n _registerComponent(new Component(APP_CHECK_NAME_INTERNAL, container => {\n const appCheck = container.getProvider('app-check').getImmediate();\n return internalFactory(appCheck);\n }, \"PUBLIC\" /* ComponentType.PUBLIC */).setInstantiationMode(\"EXPLICIT\" /* InstantiationMode.EXPLICIT */));\n registerVersion(name, version);\n}\nregisterAppCheck();\nexport { CustomProvider, ReCaptchaEnterpriseProvider, ReCaptchaV3Provider, getLimitedUseToken, getToken, initializeAppCheck, onTokenChanged, setTokenAutoRefreshEnabled };\n","import { ɵAPP_CHECK_PROVIDER_NAME, ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, ɵAppCheckInstances, VERSION, ɵAngularFireSchedulers, ɵzoneWrap } from '@angular/fire';\nexport { ɵAppCheckInstances as AppCheckInstances } from '@angular/fire';\nimport { from, timer } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\nimport { isPlatformServer } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, isDevMode, Optional, PLATFORM_ID, NgModule, NgZone, Injector } from '@angular/core';\nimport { FirebaseApp, FirebaseApps } from '@angular/fire/app';\nimport { registerVersion } from 'firebase/app';\nimport { getLimitedUseToken as getLimitedUseToken$1, getToken as getToken$1, initializeAppCheck as initializeAppCheck$1, onTokenChanged as onTokenChanged$1, setTokenAutoRefreshEnabled as setTokenAutoRefreshEnabled$1 } from 'firebase/app-check';\nexport * from 'firebase/app-check';\nclass AppCheck {\n constructor(appCheck) {\n return appCheck;\n }\n}\nconst appCheckInstance$ = /*#__PURE__*/ /*#__PURE__*/timer(0, 300).pipe( /*#__PURE__*/concatMap(() => from(ɵgetAllInstancesOf(ɵAPP_CHECK_PROVIDER_NAME))), /*#__PURE__*/distinct());\nconst PROVIDED_APP_CHECK_INSTANCES = /*#__PURE__*/new InjectionToken('angularfire2.app-check-instances');\nfunction defaultAppCheckInstanceFactory(provided, defaultApp) {\n const defaultAppCheck = ɵgetDefaultInstanceOf(ɵAPP_CHECK_PROVIDER_NAME, provided, defaultApp);\n return defaultAppCheck && new AppCheck(defaultAppCheck);\n}\nconst LOCALHOSTS = ['localhost', '0.0.0.0', '127.0.0.1'];\nconst isLocalhost = typeof window !== 'undefined' && /*#__PURE__*/LOCALHOSTS.includes(window.location.hostname);\nfunction appCheckInstanceFactory(fn) {\n return (zone, injector, platformId) => {\n // Node should use admin token provider, browser devmode and localhost should use debug token\n if (!isPlatformServer(platformId) && (isDevMode() || isLocalhost)) {\n globalThis.FIREBASE_APPCHECK_DEBUG_TOKEN ??= true;\n }\n const appCheck = zone.runOutsideAngular(() => fn(injector));\n return new AppCheck(appCheck);\n };\n}\nconst APP_CHECK_INSTANCES_PROVIDER = {\n provide: ɵAppCheckInstances,\n deps: [[/*#__PURE__*/new Optional(), PROVIDED_APP_CHECK_INSTANCES]]\n};\nconst DEFAULT_APP_CHECK_INSTANCE_PROVIDER = {\n provide: AppCheck,\n useFactory: defaultAppCheckInstanceFactory,\n deps: [[/*#__PURE__*/new Optional(), PROVIDED_APP_CHECK_INSTANCES], FirebaseApp, PLATFORM_ID]\n};\nlet AppCheckModule = /*#__PURE__*/(() => {\n class AppCheckModule {\n constructor() {\n registerVersion('angularfire', VERSION.full, 'app-check');\n }\n static ɵfac = function AppCheckModule_Factory(t) {\n return new (t || AppCheckModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: AppCheckModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [DEFAULT_APP_CHECK_INSTANCE_PROVIDER, APP_CHECK_INSTANCES_PROVIDER]\n });\n }\n return AppCheckModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction provideAppCheck(fn, ...deps) {\n return {\n ngModule: AppCheckModule,\n providers: [{\n provide: PROVIDED_APP_CHECK_INSTANCES,\n useFactory: appCheckInstanceFactory(fn),\n multi: true,\n deps: [NgZone, Injector, PLATFORM_ID, ɵAngularFireSchedulers, FirebaseApps, ...deps]\n }]\n };\n}\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nconst getLimitedUseToken = /*#__PURE__*/ɵzoneWrap(getLimitedUseToken$1, true);\nconst getToken = /*#__PURE__*/ɵzoneWrap(getToken$1, true);\nconst initializeAppCheck = /*#__PURE__*/ɵzoneWrap(initializeAppCheck$1, true);\nconst onTokenChanged = /*#__PURE__*/ɵzoneWrap(onTokenChanged$1, true);\nconst setTokenAutoRefreshEnabled = /*#__PURE__*/ɵzoneWrap(setTokenAutoRefreshEnabled$1, true);\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AppCheck, AppCheckModule, appCheckInstance$, getLimitedUseToken, getToken, initializeAppCheck, onTokenChanged, provideAppCheck, setTokenAutoRefreshEnabled };\n","import firebase from '@firebase/app-compat';\nexport { default } from '@firebase/app-compat';\nvar name = \"firebase\";\nvar version = \"10.7.1\";\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfirebase.registerVersion(name, version, 'app-compat');\n","import * as i0 from '@angular/core';\nimport { InjectionToken, isDevMode, NgZone, Optional, VERSION as VERSION$1, PLATFORM_ID, NgModule, Inject } from '@angular/core';\nimport { VERSION } from '@angular/fire';\nimport firebase from 'firebase/compat/app';\n\n// DEBUG quick debugger function for inline logging that typescript doesn't complain about\n// wrote it for debugging the ɵlazySDKProxy, commenting out for now; should consider exposing a\n// verbose mode for AngularFire in a future release that uses something like this in multiple places\n// usage: () => log('something') || returnValue\n// const log = (...args: any[]): false => { console.log(...args); return false }\n// The problem here are things like ngOnDestroy are missing, then triggering the service\n// rather than dig too far; I'm capturing these as I go.\nconst noopFunctions = ['ngOnDestroy'];\n// INVESTIGATE should we make the Proxy revokable and do some cleanup?\n// right now it's fairly simple but I'm sure this will grow in complexity\nconst ɵlazySDKProxy = (klass, observable, zone, options = {}) => {\n return new Proxy(klass, {\n get: (_, name) => zone.runOutsideAngular(() => {\n if (klass[name]) {\n if (options?.spy?.get) {\n options.spy.get(name, klass[name]);\n }\n return klass[name];\n }\n if (noopFunctions.indexOf(name) > -1) {\n return () => undefined;\n }\n const promise = observable.toPromise().then(mod => {\n const ret = mod?.[name];\n // TODO move to proper type guards\n if (typeof ret === 'function') {\n return ret.bind(mod);\n } else if (ret?.then) {\n return ret.then(res => zone.run(() => res));\n } else {\n return zone.run(() => ret);\n }\n });\n // recurse the proxy\n return new Proxy(() => undefined, {\n get: (_, name) => promise[name],\n // TODO handle callbacks as transparently as I can\n apply: (self, _, args) => promise.then(it => {\n const res = it?.(...args);\n if (options?.spy?.apply) {\n options.spy.apply(name, args, res);\n }\n return res;\n })\n });\n })\n });\n};\nconst ɵapplyMixins = (derivedCtor, constructors) => {\n constructors.forEach(baseCtor => {\n Object.getOwnPropertyNames(baseCtor.prototype || baseCtor).forEach(name => {\n Object.defineProperty(derivedCtor.prototype, name, Object.getOwnPropertyDescriptor(baseCtor.prototype || baseCtor, name));\n });\n });\n};\nclass FirebaseApp {\n constructor(app) {\n return app;\n }\n}\nconst FIREBASE_OPTIONS = /*#__PURE__*/new InjectionToken('angularfire2.app.options');\nconst FIREBASE_APP_NAME = /*#__PURE__*/new InjectionToken('angularfire2.app.name');\nfunction ɵfirebaseAppFactory(options, zone, nameOrConfig) {\n const name = typeof nameOrConfig === 'string' && nameOrConfig || '[DEFAULT]';\n const config = typeof nameOrConfig === 'object' && nameOrConfig || {};\n config.name = config.name || name;\n // Added any due to some inconsistency between @firebase/app and firebase types\n const existingApp = firebase.apps.filter(app => app && app.name === config.name)[0];\n // We support FirebaseConfig, initializeApp's public type only accepts string; need to cast as any\n // Could be solved with https://github.com/firebase/firebase-js-sdk/pull/1206\n const app = existingApp || zone.runOutsideAngular(() => firebase.initializeApp(options, config));\n try {\n if (JSON.stringify(options) !== JSON.stringify(app.options)) {\n const hmr = !!module.hot;\n log$1('error', `${app.name} Firebase App already initialized with different options${hmr ? ', you may need to reload as Firebase is not HMR aware.' : '.'}`);\n }\n } catch (e) {/* empty */}\n return new FirebaseApp(app);\n}\nconst log$1 = (level, ...args) => {\n if (isDevMode() && typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console[level](...args);\n }\n};\nconst FIREBASE_APP_PROVIDER = {\n provide: FirebaseApp,\n useFactory: ɵfirebaseAppFactory,\n deps: [FIREBASE_OPTIONS, NgZone, [/*#__PURE__*/new Optional(), FIREBASE_APP_NAME]]\n};\nlet AngularFireModule = /*#__PURE__*/(() => {\n class AngularFireModule {\n static initializeApp(options, nameOrConfig) {\n return {\n ngModule: AngularFireModule,\n providers: [{\n provide: FIREBASE_OPTIONS,\n useValue: options\n }, {\n provide: FIREBASE_APP_NAME,\n useValue: nameOrConfig\n }]\n };\n }\n // eslint-disable-next-line @typescript-eslint/ban-types\n constructor(platformId) {\n firebase.registerVersion('angularfire', VERSION.full, 'core');\n firebase.registerVersion('angularfire', VERSION.full, 'app-compat');\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n firebase.registerVersion('angular', VERSION$1.full, platformId.toString());\n }\n static ɵfac = function AngularFireModule_Factory(t) {\n return new (t || AngularFireModule)(i0.ɵɵinject(PLATFORM_ID));\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: AngularFireModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [FIREBASE_APP_PROVIDER]\n });\n }\n return AngularFireModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction ɵcacheInstance(cacheKey, moduleName, appName, fn, deps) {\n const [, instance, cachedDeps] = globalThis.ɵAngularfireInstanceCache.find(it => it[0] === cacheKey) || [];\n if (instance) {\n if (!matchDep(deps, cachedDeps)) {\n log('error', `${moduleName} was already initialized on the ${appName} Firebase App with different settings.${IS_HMR ? ' You may need to reload as Firebase is not HMR aware.' : ''}`);\n log('warn', {\n is: deps,\n was: cachedDeps\n });\n }\n return instance;\n } else {\n const newInstance = fn();\n globalThis.ɵAngularfireInstanceCache.push([cacheKey, newInstance, deps]);\n return newInstance;\n }\n}\nfunction matchDep(a, b) {\n try {\n return a.toString() === b.toString();\n } catch (_) {\n return a === b;\n }\n}\nconst IS_HMR = typeof module !== 'undefined' && !!module.hot;\nconst log = (level, ...args) => {\n if (isDevMode() && typeof console !== 'undefined') {\n // eslint-disable-next-line no-console\n console[level](...args);\n }\n};\nglobalThis.ɵAngularfireInstanceCache ||= [];\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AngularFireModule, FIREBASE_APP_NAME, FIREBASE_OPTIONS, FirebaseApp, ɵapplyMixins, ɵcacheInstance, ɵfirebaseAppFactory, ɵlazySDKProxy };\n","import 'firebase/compat/auth';\nimport { isPlatformServer } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, NgModule } from '@angular/core';\nimport * as i1 from '@angular/fire';\nimport { keepUnstableUntilFirst, VERSION } from '@angular/fire';\nimport * as i2 from '@angular/fire/app-check';\nimport { ɵcacheInstance, ɵfirebaseAppFactory, ɵlazySDKProxy, FIREBASE_OPTIONS, FIREBASE_APP_NAME, ɵapplyMixins } from '@angular/fire/compat';\nimport { Subject, of, Observable, from, merge } from 'rxjs';\nimport { observeOn, switchMap, map, shareReplay, first, switchMapTo, subscribeOn, filter } from 'rxjs/operators';\nimport firebase from 'firebase/compat/app';\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\n// Export a null object with the same keys as firebase/compat/auth, so Proxy can work with proxy-polyfill in Internet Explorer\nconst proxyPolyfillCompat = {\n name: null,\n config: null,\n emulatorConfig: null,\n app: null,\n applyActionCode: null,\n checkActionCode: null,\n confirmPasswordReset: null,\n createUserWithEmailAndPassword: null,\n currentUser: null,\n fetchSignInMethodsForEmail: null,\n isSignInWithEmailLink: null,\n getRedirectResult: null,\n languageCode: null,\n settings: null,\n onAuthStateChanged: null,\n onIdTokenChanged: null,\n sendSignInLinkToEmail: null,\n sendPasswordResetEmail: null,\n setPersistence: null,\n signInAndRetrieveDataWithCredential: null,\n signInAnonymously: null,\n signInWithCredential: null,\n signInWithCustomToken: null,\n signInWithEmailAndPassword: null,\n signInWithPhoneNumber: null,\n signInWithEmailLink: null,\n signInWithPopup: null,\n signInWithRedirect: null,\n signOut: null,\n tenantId: null,\n updateCurrentUser: null,\n useDeviceLanguage: null,\n useEmulator: null,\n verifyPasswordResetCode: null\n};\nconst USE_EMULATOR = /*#__PURE__*/new InjectionToken('angularfire2.auth.use-emulator');\nconst SETTINGS = /*#__PURE__*/new InjectionToken('angularfire2.auth.settings');\nconst TENANT_ID = /*#__PURE__*/new InjectionToken('angularfire2.auth.tenant-id');\nconst LANGUAGE_CODE = /*#__PURE__*/new InjectionToken('angularfire2.auth.langugage-code');\nconst USE_DEVICE_LANGUAGE = /*#__PURE__*/new InjectionToken('angularfire2.auth.use-device-language');\nconst PERSISTENCE = /*#__PURE__*/new InjectionToken('angularfire.auth.persistence');\nconst ɵauthFactory = (app, zone, useEmulator, tenantId, languageCode, useDeviceLanguage, settings, persistence) => ɵcacheInstance(`${app.name}.auth`, 'AngularFireAuth', app.name, () => {\n const auth = zone.runOutsideAngular(() => app.auth());\n if (useEmulator) {\n auth.useEmulator(...useEmulator);\n }\n if (tenantId) {\n auth.tenantId = tenantId;\n }\n auth.languageCode = languageCode;\n if (useDeviceLanguage) {\n auth.useDeviceLanguage();\n }\n if (settings) {\n for (const [k, v] of Object.entries(settings)) {\n auth.settings[k] = v;\n }\n }\n if (persistence) {\n auth.setPersistence(persistence);\n }\n return auth;\n}, [useEmulator, tenantId, languageCode, useDeviceLanguage, settings, persistence]);\nlet AngularFireAuth = /*#__PURE__*/(() => {\n class AngularFireAuth {\n /**\n * Observable of authentication state; as of Firebase 4.0 this is only triggered via sign-in/out\n */\n authState;\n /**\n * Observable of the currently signed-in user's JWT token used to identify the user to a Firebase service (or null).\n */\n idToken;\n /**\n * Observable of the currently signed-in user (or null).\n */\n user;\n /**\n * Observable of the currently signed-in user's IdTokenResult object which contains the ID token JWT string and other\n * helper properties for getting different data associated with the token as well as all the decoded payload claims\n * (or null).\n */\n idTokenResult;\n /**\n * Observable of the currently signed-in user's credential, or null\n */\n credential;\n constructor(options, name,\n // eslint-disable-next-line @typescript-eslint/ban-types\n platformId, zone, schedulers, useEmulator,\n // can't use the tuple here\n settings,\n // can't use firebase.auth.AuthSettings here\n tenantId, languageCode, useDeviceLanguage, persistence, _appCheckInstances) {\n const logins = new Subject();\n const auth = of(undefined).pipe(observeOn(schedulers.outsideAngular), switchMap(() => zone.runOutsideAngular(() => import('firebase/compat/auth'))), map(() => ɵfirebaseAppFactory(options, zone, name)), map(app => ɵauthFactory(app, zone, useEmulator, tenantId, languageCode, useDeviceLanguage, settings, persistence)), shareReplay({\n bufferSize: 1,\n refCount: false\n }));\n if (isPlatformServer(platformId)) {\n this.authState = this.user = this.idToken = this.idTokenResult = this.credential = of(null);\n } else {\n // HACK, as we're exporting auth.Auth, rather than auth, developers importing firebase.auth\n // (e.g, `import { auth } from 'firebase/compat/app'`) are getting an undefined auth object unexpectedly\n // as we're completely lazy. Let's eagerly load the Auth SDK here.\n // There could potentially be race conditions still... but this greatly decreases the odds while\n // we reevaluate the API.\n auth.pipe(first()).subscribe();\n const redirectResult = auth.pipe(switchMap(auth => auth.getRedirectResult().then(it => it, () => null)), keepUnstableUntilFirst, shareReplay({\n bufferSize: 1,\n refCount: false\n }));\n const authStateChanged = auth.pipe(switchMap(auth => new Observable(sub => ({\n unsubscribe: zone.runOutsideAngular(() => auth.onAuthStateChanged(next => sub.next(next), err => sub.error(err), () => sub.complete()))\n }))));\n const idTokenChanged = auth.pipe(switchMap(auth => new Observable(sub => ({\n unsubscribe: zone.runOutsideAngular(() => auth.onIdTokenChanged(next => sub.next(next), err => sub.error(err), () => sub.complete()))\n }))));\n this.authState = redirectResult.pipe(switchMapTo(authStateChanged), subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular));\n this.user = redirectResult.pipe(switchMapTo(idTokenChanged), subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular));\n this.idToken = this.user.pipe(switchMap(user => user ? from(user.getIdToken()) : of(null)));\n this.idTokenResult = this.user.pipe(switchMap(user => user ? from(user.getIdTokenResult()) : of(null)));\n this.credential = merge(redirectResult, logins,\n // pipe in null authState to make credential zipable, just a weird devexp if\n // authState and user go null to still have a credential\n this.authState.pipe(filter(it => !it))).pipe(\n // handle the { user: { } } when a user is already logged in, rather have null\n // TODO handle the type corcersion better\n map(credential => credential?.user ? credential : null), subscribeOn(schedulers.outsideAngular), observeOn(schedulers.insideAngular));\n }\n return ɵlazySDKProxy(this, auth, zone, {\n spy: {\n apply: (name, _, val) => {\n // If they call a signIn or createUser function listen into the promise\n // this will give us the user credential, push onto the logins Subject\n // to be consumed in .credential\n if (name.startsWith('signIn') || name.startsWith('createUser')) {\n // TODO fix the types, the trouble is UserCredential has everything optional\n val.then(user => logins.next(user));\n }\n }\n }\n });\n }\n static ɵfac = function AngularFireAuth_Factory(t) {\n return new (t || AngularFireAuth)(i0.ɵɵinject(FIREBASE_OPTIONS), i0.ɵɵinject(FIREBASE_APP_NAME, 8), i0.ɵɵinject(PLATFORM_ID), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i1.ɵAngularFireSchedulers), i0.ɵɵinject(USE_EMULATOR, 8), i0.ɵɵinject(SETTINGS, 8), i0.ɵɵinject(TENANT_ID, 8), i0.ɵɵinject(LANGUAGE_CODE, 8), i0.ɵɵinject(USE_DEVICE_LANGUAGE, 8), i0.ɵɵinject(PERSISTENCE, 8), i0.ɵɵinject(i2.AppCheckInstances, 8));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: AngularFireAuth,\n factory: AngularFireAuth.ɵfac,\n providedIn: 'any'\n });\n }\n return AngularFireAuth;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/*#__PURE__*/ɵapplyMixins(AngularFireAuth, [proxyPolyfillCompat]);\nlet AngularFireAuthModule = /*#__PURE__*/(() => {\n class AngularFireAuthModule {\n constructor() {\n firebase.registerVersion('angularfire', VERSION.full, 'auth-compat');\n }\n static ɵfac = function AngularFireAuthModule_Factory(t) {\n return new (t || AngularFireAuthModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: AngularFireAuthModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [AngularFireAuth]\n });\n }\n return AngularFireAuthModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AngularFireAuth, AngularFireAuthModule, LANGUAGE_CODE, PERSISTENCE, SETTINGS, TENANT_ID, USE_DEVICE_LANGUAGE, USE_EMULATOR, ɵauthFactory };\n","var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\nvar esm = {};\n\n/*\n\n Copyright The Closure Library Authors.\n SPDX-License-Identifier: Apache-2.0\n*/\n\nvar k,\n goog = goog || {},\n l = commonjsGlobal || self;\nfunction aa(a) {\n var b = typeof a;\n b = \"object\" != b ? b : a ? Array.isArray(a) ? \"array\" : b : \"null\";\n return \"array\" == b || \"object\" == b && \"number\" == typeof a.length;\n}\nfunction p(a) {\n var b = typeof a;\n return \"object\" == b && null != a || \"function\" == b;\n}\nfunction ba(a) {\n return Object.prototype.hasOwnProperty.call(a, ca) && a[ca] || (a[ca] = ++da);\n}\nvar ca = \"closure_uid_\" + (1E9 * Math.random() >>> 0),\n da = 0;\nfunction ea(a, b, c) {\n return a.call.apply(a.bind, arguments);\n}\nfunction fa(a, b, c) {\n if (!a) throw Error();\n if (2 < arguments.length) {\n var d = Array.prototype.slice.call(arguments, 2);\n return function () {\n var e = Array.prototype.slice.call(arguments);\n Array.prototype.unshift.apply(e, d);\n return a.apply(b, e);\n };\n }\n return function () {\n return a.apply(b, arguments);\n };\n}\nfunction q(a, b, c) {\n Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf(\"native code\") ? q = ea : q = fa;\n return q.apply(null, arguments);\n}\nfunction ha(a, b) {\n var c = Array.prototype.slice.call(arguments, 1);\n return function () {\n var d = c.slice();\n d.push.apply(d, arguments);\n return a.apply(this, d);\n };\n}\nfunction r(a, b) {\n function c() {}\n c.prototype = b.prototype;\n a.$ = b.prototype;\n a.prototype = new c();\n a.prototype.constructor = a;\n a.ac = function (d, e, f) {\n for (var h = Array(arguments.length - 2), n = 2; n < arguments.length; n++) h[n - 2] = arguments[n];\n return b.prototype[e].apply(d, h);\n };\n}\nfunction v() {\n this.s = this.s;\n this.o = this.o;\n}\nvar ia = 0;\nv.prototype.s = !1;\nv.prototype.sa = function () {\n if (!this.s && (this.s = !0, this.N(), 0 != ia)) {\n ba(this);\n }\n};\nv.prototype.N = function () {\n if (this.o) for (; this.o.length;) this.o.shift()();\n};\nconst ka = Array.prototype.indexOf ? function (a, b) {\n return Array.prototype.indexOf.call(a, b, void 0);\n} : function (a, b) {\n if (\"string\" === typeof a) return \"string\" !== typeof b || 1 != b.length ? -1 : a.indexOf(b, 0);\n for (let c = 0; c < a.length; c++) if (c in a && a[c] === b) return c;\n return -1;\n};\nfunction ma(a) {\n const b = a.length;\n if (0 < b) {\n const c = Array(b);\n for (let d = 0; d < b; d++) c[d] = a[d];\n return c;\n }\n return [];\n}\nfunction na(a, b) {\n for (let c = 1; c < arguments.length; c++) {\n const d = arguments[c];\n if (aa(d)) {\n const e = a.length || 0,\n f = d.length || 0;\n a.length = e + f;\n for (let h = 0; h < f; h++) a[e + h] = d[h];\n } else a.push(d);\n }\n}\nfunction w(a, b) {\n this.type = a;\n this.g = this.target = b;\n this.defaultPrevented = !1;\n}\nw.prototype.h = function () {\n this.defaultPrevented = !0;\n};\nvar oa = function () {\n if (!l.addEventListener || !Object.defineProperty) return !1;\n var a = !1,\n b = Object.defineProperty({}, \"passive\", {\n get: function () {\n a = !0;\n }\n });\n try {\n const c = () => {};\n l.addEventListener(\"test\", c, b);\n l.removeEventListener(\"test\", c, b);\n } catch (c) {}\n return a;\n}();\nfunction x(a) {\n return /^[\\s\\xa0]*$/.test(a);\n}\nfunction pa() {\n var a = l.navigator;\n return a && (a = a.userAgent) ? a : \"\";\n}\nfunction y(a) {\n return -1 != pa().indexOf(a);\n}\nfunction qa(a) {\n qa[\" \"](a);\n return a;\n}\nqa[\" \"] = function () {};\nfunction ra(a, b) {\n var c = sa;\n return Object.prototype.hasOwnProperty.call(c, a) ? c[a] : c[a] = b(a);\n}\nvar ta = y(\"Opera\"),\n z = y(\"Trident\") || y(\"MSIE\"),\n ua = y(\"Edge\"),\n va = ua || z,\n wa = y(\"Gecko\") && !(-1 != pa().toLowerCase().indexOf(\"webkit\") && !y(\"Edge\")) && !(y(\"Trident\") || y(\"MSIE\")) && !y(\"Edge\"),\n xa = -1 != pa().toLowerCase().indexOf(\"webkit\") && !y(\"Edge\");\nfunction ya() {\n var a = l.document;\n return a ? a.documentMode : void 0;\n}\nvar za;\na: {\n var Aa = \"\",\n Ba = function () {\n var a = pa();\n if (wa) return /rv:([^\\);]+)(\\)|;)/.exec(a);\n if (ua) return /Edge\\/([\\d\\.]+)/.exec(a);\n if (z) return /\\b(?:MSIE|rv)[: ]([^\\);]+)(\\)|;)/.exec(a);\n if (xa) return /WebKit\\/(\\S+)/.exec(a);\n if (ta) return /(?:Version)[ \\/]?(\\S+)/.exec(a);\n }();\n Ba && (Aa = Ba ? Ba[1] : \"\");\n if (z) {\n var Ca = ya();\n if (null != Ca && Ca > parseFloat(Aa)) {\n za = String(Ca);\n break a;\n }\n }\n za = Aa;\n}\nvar Da;\nif (l.document && z) {\n var Ea = ya();\n Da = Ea ? Ea : parseInt(za, 10) || void 0;\n} else Da = void 0;\nvar Fa = Da;\nfunction A(a, b) {\n w.call(this, a ? a.type : \"\");\n this.relatedTarget = this.g = this.target = null;\n this.button = this.screenY = this.screenX = this.clientY = this.clientX = 0;\n this.key = \"\";\n this.metaKey = this.shiftKey = this.altKey = this.ctrlKey = !1;\n this.state = null;\n this.pointerId = 0;\n this.pointerType = \"\";\n this.i = null;\n if (a) {\n var c = this.type = a.type,\n d = a.changedTouches && a.changedTouches.length ? a.changedTouches[0] : null;\n this.target = a.target || a.srcElement;\n this.g = b;\n if (b = a.relatedTarget) {\n if (wa) {\n a: {\n try {\n qa(b.nodeName);\n var e = !0;\n break a;\n } catch (f) {}\n e = !1;\n }\n e || (b = null);\n }\n } else \"mouseover\" == c ? b = a.fromElement : \"mouseout\" == c && (b = a.toElement);\n this.relatedTarget = b;\n d ? (this.clientX = void 0 !== d.clientX ? d.clientX : d.pageX, this.clientY = void 0 !== d.clientY ? d.clientY : d.pageY, this.screenX = d.screenX || 0, this.screenY = d.screenY || 0) : (this.clientX = void 0 !== a.clientX ? a.clientX : a.pageX, this.clientY = void 0 !== a.clientY ? a.clientY : a.pageY, this.screenX = a.screenX || 0, this.screenY = a.screenY || 0);\n this.button = a.button;\n this.key = a.key || \"\";\n this.ctrlKey = a.ctrlKey;\n this.altKey = a.altKey;\n this.shiftKey = a.shiftKey;\n this.metaKey = a.metaKey;\n this.pointerId = a.pointerId || 0;\n this.pointerType = \"string\" === typeof a.pointerType ? a.pointerType : Ga[a.pointerType] || \"\";\n this.state = a.state;\n this.i = a;\n a.defaultPrevented && A.$.h.call(this);\n }\n}\nr(A, w);\nvar Ga = {\n 2: \"touch\",\n 3: \"pen\",\n 4: \"mouse\"\n};\nA.prototype.h = function () {\n A.$.h.call(this);\n var a = this.i;\n a.preventDefault ? a.preventDefault() : a.returnValue = !1;\n};\nvar Ha = \"closure_listenable_\" + (1E6 * Math.random() | 0);\nvar Ia = 0;\nfunction Ja(a, b, c, d, e) {\n this.listener = a;\n this.proxy = null;\n this.src = b;\n this.type = c;\n this.capture = !!d;\n this.la = e;\n this.key = ++Ia;\n this.fa = this.ia = !1;\n}\nfunction Ma(a) {\n a.fa = !0;\n a.listener = null;\n a.proxy = null;\n a.src = null;\n a.la = null;\n}\nfunction Na(a, b, c) {\n for (const d in a) b.call(c, a[d], d, a);\n}\nfunction Oa(a, b) {\n for (const c in a) b.call(void 0, a[c], c, a);\n}\nfunction Pa(a) {\n const b = {};\n for (const c in a) b[c] = a[c];\n return b;\n}\nconst Qa = \"constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf\".split(\" \");\nfunction Ra(a, b) {\n let c, d;\n for (let e = 1; e < arguments.length; e++) {\n d = arguments[e];\n for (c in d) a[c] = d[c];\n for (let f = 0; f < Qa.length; f++) c = Qa[f], Object.prototype.hasOwnProperty.call(d, c) && (a[c] = d[c]);\n }\n}\nfunction Sa(a) {\n this.src = a;\n this.g = {};\n this.h = 0;\n}\nSa.prototype.add = function (a, b, c, d, e) {\n var f = a.toString();\n a = this.g[f];\n a || (a = this.g[f] = [], this.h++);\n var h = Ta(a, b, d, e);\n -1 < h ? (b = a[h], c || (b.ia = !1)) : (b = new Ja(b, this.src, f, !!d, e), b.ia = c, a.push(b));\n return b;\n};\nfunction Ua(a, b) {\n var c = b.type;\n if (c in a.g) {\n var d = a.g[c],\n e = ka(d, b),\n f;\n (f = 0 <= e) && Array.prototype.splice.call(d, e, 1);\n f && (Ma(b), 0 == a.g[c].length && (delete a.g[c], a.h--));\n }\n}\nfunction Ta(a, b, c, d) {\n for (var e = 0; e < a.length; ++e) {\n var f = a[e];\n if (!f.fa && f.listener == b && f.capture == !!c && f.la == d) return e;\n }\n return -1;\n}\nvar Va = \"closure_lm_\" + (1E6 * Math.random() | 0),\n Wa = {};\nfunction Ya(a, b, c, d, e) {\n if (d && d.once) return Za(a, b, c, d, e);\n if (Array.isArray(b)) {\n for (var f = 0; f < b.length; f++) Ya(a, b[f], c, d, e);\n return null;\n }\n c = $a(c);\n return a && a[Ha] ? a.O(b, c, p(d) ? !!d.capture : !!d, e) : ab(a, b, c, !1, d, e);\n}\nfunction ab(a, b, c, d, e, f) {\n if (!b) throw Error(\"Invalid event type\");\n var h = p(e) ? !!e.capture : !!e,\n n = bb(a);\n n || (a[Va] = n = new Sa(a));\n c = n.add(b, c, d, h, f);\n if (c.proxy) return c;\n d = cb();\n c.proxy = d;\n d.src = a;\n d.listener = c;\n if (a.addEventListener) oa || (e = h), void 0 === e && (e = !1), a.addEventListener(b.toString(), d, e);else if (a.attachEvent) a.attachEvent(db(b.toString()), d);else if (a.addListener && a.removeListener) a.addListener(d);else throw Error(\"addEventListener and attachEvent are unavailable.\");\n return c;\n}\nfunction cb() {\n function a(c) {\n return b.call(a.src, a.listener, c);\n }\n const b = eb;\n return a;\n}\nfunction Za(a, b, c, d, e) {\n if (Array.isArray(b)) {\n for (var f = 0; f < b.length; f++) Za(a, b[f], c, d, e);\n return null;\n }\n c = $a(c);\n return a && a[Ha] ? a.P(b, c, p(d) ? !!d.capture : !!d, e) : ab(a, b, c, !0, d, e);\n}\nfunction fb(a, b, c, d, e) {\n if (Array.isArray(b)) for (var f = 0; f < b.length; f++) fb(a, b[f], c, d, e);else (d = p(d) ? !!d.capture : !!d, c = $a(c), a && a[Ha]) ? (a = a.i, b = String(b).toString(), b in a.g && (f = a.g[b], c = Ta(f, c, d, e), -1 < c && (Ma(f[c]), Array.prototype.splice.call(f, c, 1), 0 == f.length && (delete a.g[b], a.h--)))) : a && (a = bb(a)) && (b = a.g[b.toString()], a = -1, b && (a = Ta(b, c, d, e)), (c = -1 < a ? b[a] : null) && gb(c));\n}\nfunction gb(a) {\n if (\"number\" !== typeof a && a && !a.fa) {\n var b = a.src;\n if (b && b[Ha]) Ua(b.i, a);else {\n var c = a.type,\n d = a.proxy;\n b.removeEventListener ? b.removeEventListener(c, d, a.capture) : b.detachEvent ? b.detachEvent(db(c), d) : b.addListener && b.removeListener && b.removeListener(d);\n (c = bb(b)) ? (Ua(c, a), 0 == c.h && (c.src = null, b[Va] = null)) : Ma(a);\n }\n }\n}\nfunction db(a) {\n return a in Wa ? Wa[a] : Wa[a] = \"on\" + a;\n}\nfunction eb(a, b) {\n if (a.fa) a = !0;else {\n b = new A(b, this);\n var c = a.listener,\n d = a.la || a.src;\n a.ia && gb(a);\n a = c.call(d, b);\n }\n return a;\n}\nfunction bb(a) {\n a = a[Va];\n return a instanceof Sa ? a : null;\n}\nvar hb = \"__closure_events_fn_\" + (1E9 * Math.random() >>> 0);\nfunction $a(a) {\n if (\"function\" === typeof a) return a;\n a[hb] || (a[hb] = function (b) {\n return a.handleEvent(b);\n });\n return a[hb];\n}\nfunction B() {\n v.call(this);\n this.i = new Sa(this);\n this.S = this;\n this.J = null;\n}\nr(B, v);\nB.prototype[Ha] = !0;\nB.prototype.removeEventListener = function (a, b, c, d) {\n fb(this, a, b, c, d);\n};\nfunction C(a, b) {\n var c,\n d = a.J;\n if (d) for (c = []; d; d = d.J) c.push(d);\n a = a.S;\n d = b.type || b;\n if (\"string\" === typeof b) b = new w(b, a);else if (b instanceof w) b.target = b.target || a;else {\n var e = b;\n b = new w(d, a);\n Ra(b, e);\n }\n e = !0;\n if (c) for (var f = c.length - 1; 0 <= f; f--) {\n var h = b.g = c[f];\n e = ib(h, d, !0, b) && e;\n }\n h = b.g = a;\n e = ib(h, d, !0, b) && e;\n e = ib(h, d, !1, b) && e;\n if (c) for (f = 0; f < c.length; f++) h = b.g = c[f], e = ib(h, d, !1, b) && e;\n}\nB.prototype.N = function () {\n B.$.N.call(this);\n if (this.i) {\n var a = this.i,\n c;\n for (c in a.g) {\n for (var d = a.g[c], e = 0; e < d.length; e++) Ma(d[e]);\n delete a.g[c];\n a.h--;\n }\n }\n this.J = null;\n};\nB.prototype.O = function (a, b, c, d) {\n return this.i.add(String(a), b, !1, c, d);\n};\nB.prototype.P = function (a, b, c, d) {\n return this.i.add(String(a), b, !0, c, d);\n};\nfunction ib(a, b, c, d) {\n b = a.i.g[String(b)];\n if (!b) return !0;\n b = b.concat();\n for (var e = !0, f = 0; f < b.length; ++f) {\n var h = b[f];\n if (h && !h.fa && h.capture == c) {\n var n = h.listener,\n t = h.la || h.src;\n h.ia && Ua(a.i, h);\n e = !1 !== n.call(t, d) && e;\n }\n }\n return e && !d.defaultPrevented;\n}\nvar jb = l.JSON.stringify;\nclass kb {\n constructor(a, b) {\n this.i = a;\n this.j = b;\n this.h = 0;\n this.g = null;\n }\n get() {\n let a;\n 0 < this.h ? (this.h--, a = this.g, this.g = a.next, a.next = null) : a = this.i();\n return a;\n }\n}\nfunction lb() {\n var a = mb;\n let b = null;\n a.g && (b = a.g, a.g = a.g.next, a.g || (a.h = null), b.next = null);\n return b;\n}\nclass nb {\n constructor() {\n this.h = this.g = null;\n }\n add(a, b) {\n const c = ob.get();\n c.set(a, b);\n this.h ? this.h.next = c : this.g = c;\n this.h = c;\n }\n}\nvar ob = new kb(() => new pb(), a => a.reset());\nclass pb {\n constructor() {\n this.next = this.g = this.h = null;\n }\n set(a, b) {\n this.h = a;\n this.g = b;\n this.next = null;\n }\n reset() {\n this.next = this.g = this.h = null;\n }\n}\nfunction qb(a) {\n var b = 1;\n a = a.split(\":\");\n const c = [];\n for (; 0 < b && a.length;) c.push(a.shift()), b--;\n a.length && c.push(a.join(\":\"));\n return c;\n}\nfunction rb(a) {\n l.setTimeout(() => {\n throw a;\n }, 0);\n}\nlet sb,\n tb = !1,\n mb = new nb(),\n vb = () => {\n const a = l.Promise.resolve(void 0);\n sb = () => {\n a.then(ub);\n };\n };\nvar ub = () => {\n for (var a; a = lb();) {\n try {\n a.h.call(a.g);\n } catch (c) {\n rb(c);\n }\n var b = ob;\n b.j(a);\n 100 > b.h && (b.h++, a.next = b.g, b.g = a);\n }\n tb = !1;\n};\nfunction wb(a, b) {\n B.call(this);\n this.h = a || 1;\n this.g = b || l;\n this.j = q(this.qb, this);\n this.l = Date.now();\n}\nr(wb, B);\nk = wb.prototype;\nk.ga = !1;\nk.T = null;\nk.qb = function () {\n if (this.ga) {\n var a = Date.now() - this.l;\n 0 < a && a < .8 * this.h ? this.T = this.g.setTimeout(this.j, this.h - a) : (this.T && (this.g.clearTimeout(this.T), this.T = null), C(this, \"tick\"), this.ga && (xb(this), this.start()));\n }\n};\nk.start = function () {\n this.ga = !0;\n this.T || (this.T = this.g.setTimeout(this.j, this.h), this.l = Date.now());\n};\nfunction xb(a) {\n a.ga = !1;\n a.T && (a.g.clearTimeout(a.T), a.T = null);\n}\nk.N = function () {\n wb.$.N.call(this);\n xb(this);\n delete this.g;\n};\nfunction yb(a, b, c) {\n if (\"function\" === typeof a) c && (a = q(a, c));else if (a && \"function\" == typeof a.handleEvent) a = q(a.handleEvent, a);else throw Error(\"Invalid listener argument\");\n return 2147483647 < Number(b) ? -1 : l.setTimeout(a, b || 0);\n}\nfunction zb(a) {\n a.g = yb(() => {\n a.g = null;\n a.i && (a.i = !1, zb(a));\n }, a.j);\n const b = a.h;\n a.h = null;\n a.m.apply(null, b);\n}\nclass Ab extends v {\n constructor(a, b) {\n super();\n this.m = a;\n this.j = b;\n this.h = null;\n this.i = !1;\n this.g = null;\n }\n l(a) {\n this.h = arguments;\n this.g ? this.i = !0 : zb(this);\n }\n N() {\n super.N();\n this.g && (l.clearTimeout(this.g), this.g = null, this.i = !1, this.h = null);\n }\n}\nfunction Bb(a) {\n v.call(this);\n this.h = a;\n this.g = {};\n}\nr(Bb, v);\nvar Cb = [];\nfunction Eb(a, b, c, d) {\n Array.isArray(c) || (c && (Cb[0] = c.toString()), c = Cb);\n for (var e = 0; e < c.length; e++) {\n var f = Ya(b, c[e], d || a.handleEvent, !1, a.h || a);\n if (!f) break;\n a.g[f.key] = f;\n }\n}\nfunction Fb(a) {\n Na(a.g, function (b, c) {\n this.g.hasOwnProperty(c) && gb(b);\n }, a);\n a.g = {};\n}\nBb.prototype.N = function () {\n Bb.$.N.call(this);\n Fb(this);\n};\nBb.prototype.handleEvent = function () {\n throw Error(\"EventHandler.handleEvent not implemented\");\n};\nfunction Gb() {\n this.g = !0;\n}\nGb.prototype.Ea = function () {\n this.g = !1;\n};\nfunction Hb(a, b, c, d, e, f) {\n a.info(function () {\n if (a.g) {\n if (f) {\n var h = \"\";\n for (var n = f.split(\"&\"), t = 0; t < n.length; t++) {\n var m = n[t].split(\"=\");\n if (1 < m.length) {\n var u = m[0];\n m = m[1];\n var L = u.split(\"_\");\n h = 2 <= L.length && \"type\" == L[1] ? h + (u + \"=\" + m + \"&\") : h + (u + \"=redacted&\");\n }\n }\n } else h = null;\n } else h = f;\n return \"XMLHTTP REQ (\" + d + \") [attempt \" + e + \"]: \" + b + \"\\n\" + c + \"\\n\" + h;\n });\n}\nfunction Ib(a, b, c, d, e, f, h) {\n a.info(function () {\n return \"XMLHTTP RESP (\" + d + \") [ attempt \" + e + \"]: \" + b + \"\\n\" + c + \"\\n\" + f + \" \" + h;\n });\n}\nfunction D(a, b, c, d) {\n a.info(function () {\n return \"XMLHTTP TEXT (\" + b + \"): \" + Jb(a, c) + (d ? \" \" + d : \"\");\n });\n}\nfunction Kb(a, b) {\n a.info(function () {\n return \"TIMEOUT: \" + b;\n });\n}\nGb.prototype.info = function () {};\nfunction Jb(a, b) {\n if (!a.g) return b;\n if (!b) return null;\n try {\n var c = JSON.parse(b);\n if (c) for (a = 0; a < c.length; a++) if (Array.isArray(c[a])) {\n var d = c[a];\n if (!(2 > d.length)) {\n var e = d[1];\n if (Array.isArray(e) && !(1 > e.length)) {\n var f = e[0];\n if (\"noop\" != f && \"stop\" != f && \"close\" != f) for (var h = 1; h < e.length; h++) e[h] = \"\";\n }\n }\n }\n return jb(c);\n } catch (n) {\n return b;\n }\n}\nvar E = {},\n Lb = null;\nfunction Mb() {\n return Lb = Lb || new B();\n}\nE.Ta = \"serverreachability\";\nfunction Nb(a) {\n w.call(this, E.Ta, a);\n}\nr(Nb, w);\nfunction Ob(a) {\n const b = Mb();\n C(b, new Nb(b));\n}\nE.STAT_EVENT = \"statevent\";\nfunction Pb(a, b) {\n w.call(this, E.STAT_EVENT, a);\n this.stat = b;\n}\nr(Pb, w);\nfunction F(a) {\n const b = Mb();\n C(b, new Pb(b, a));\n}\nE.Ua = \"timingevent\";\nfunction Qb(a, b) {\n w.call(this, E.Ua, a);\n this.size = b;\n}\nr(Qb, w);\nfunction Rb(a, b) {\n if (\"function\" !== typeof a) throw Error(\"Fn must not be null and must be a function\");\n return l.setTimeout(function () {\n a();\n }, b);\n}\nvar Sb = {\n NO_ERROR: 0,\n rb: 1,\n Eb: 2,\n Db: 3,\n yb: 4,\n Cb: 5,\n Fb: 6,\n Qa: 7,\n TIMEOUT: 8,\n Ib: 9\n};\nvar Tb = {\n wb: \"complete\",\n Sb: \"success\",\n Ra: \"error\",\n Qa: \"abort\",\n Kb: \"ready\",\n Lb: \"readystatechange\",\n TIMEOUT: \"timeout\",\n Gb: \"incrementaldata\",\n Jb: \"progress\",\n zb: \"downloadprogress\",\n $b: \"uploadprogress\"\n};\nfunction Ub() {}\nUb.prototype.h = null;\nfunction Vb(a) {\n return a.h || (a.h = a.i());\n}\nfunction Wb() {}\nvar Xb = {\n OPEN: \"a\",\n vb: \"b\",\n Ra: \"c\",\n Hb: \"d\"\n};\nfunction Yb() {\n w.call(this, \"d\");\n}\nr(Yb, w);\nfunction Zb() {\n w.call(this, \"c\");\n}\nr(Zb, w);\nvar $b;\nfunction ac() {}\nr(ac, Ub);\nac.prototype.g = function () {\n return new XMLHttpRequest();\n};\nac.prototype.i = function () {\n return {};\n};\n$b = new ac();\nfunction bc(a, b, c, d) {\n this.l = a;\n this.j = b;\n this.m = c;\n this.W = d || 1;\n this.U = new Bb(this);\n this.P = cc;\n a = va ? 125 : void 0;\n this.V = new wb(a);\n this.I = null;\n this.i = !1;\n this.u = this.B = this.A = this.L = this.G = this.Y = this.C = null;\n this.F = [];\n this.g = null;\n this.o = 0;\n this.s = this.v = null;\n this.ca = -1;\n this.J = !1;\n this.O = 0;\n this.M = null;\n this.ba = this.K = this.aa = this.S = !1;\n this.h = new dc();\n}\nfunction dc() {\n this.i = null;\n this.g = \"\";\n this.h = !1;\n}\nvar cc = 45E3,\n ec = {},\n fc = {};\nk = bc.prototype;\nk.setTimeout = function (a) {\n this.P = a;\n};\nfunction gc(a, b, c) {\n a.L = 1;\n a.A = hc(G(b));\n a.u = c;\n a.S = !0;\n ic(a, null);\n}\nfunction ic(a, b) {\n a.G = Date.now();\n jc(a);\n a.B = G(a.A);\n var c = a.B,\n d = a.W;\n Array.isArray(d) || (d = [String(d)]);\n kc(c.i, \"t\", d);\n a.o = 0;\n c = a.l.J;\n a.h = new dc();\n a.g = lc(a.l, c ? b : null, !a.u);\n 0 < a.O && (a.M = new Ab(q(a.Pa, a, a.g), a.O));\n Eb(a.U, a.g, \"readystatechange\", a.nb);\n b = a.I ? Pa(a.I) : {};\n a.u ? (a.v || (a.v = \"POST\"), b[\"Content-Type\"] = \"application/x-www-form-urlencoded\", a.g.ha(a.B, a.v, a.u, b)) : (a.v = \"GET\", a.g.ha(a.B, a.v, null, b));\n Ob();\n Hb(a.j, a.v, a.B, a.m, a.W, a.u);\n}\nk.nb = function (a) {\n a = a.target;\n const b = this.M;\n b && 3 == H(a) ? b.l() : this.Pa(a);\n};\nk.Pa = function (a) {\n try {\n if (a == this.g) a: {\n const u = H(this.g);\n var b = this.g.Ia();\n const L = this.g.da();\n if (!(3 > u) && (3 != u || va || this.g && (this.h.h || this.g.ja() || mc(this.g)))) {\n this.J || 4 != u || 7 == b || (8 == b || 0 >= L ? Ob(3) : Ob(2));\n nc(this);\n var c = this.g.da();\n this.ca = c;\n b: if (oc(this)) {\n var d = mc(this.g);\n a = \"\";\n var e = d.length,\n f = 4 == H(this.g);\n if (!this.h.i) {\n if (\"undefined\" === typeof TextDecoder) {\n I(this);\n pc(this);\n var h = \"\";\n break b;\n }\n this.h.i = new l.TextDecoder();\n }\n for (b = 0; b < e; b++) this.h.h = !0, a += this.h.i.decode(d[b], {\n stream: f && b == e - 1\n });\n d.length = 0;\n this.h.g += a;\n this.o = 0;\n h = this.h.g;\n } else h = this.g.ja();\n this.i = 200 == c;\n Ib(this.j, this.v, this.B, this.m, this.W, u, c);\n if (this.i) {\n if (this.aa && !this.K) {\n b: {\n if (this.g) {\n var n,\n t = this.g;\n if ((n = t.g ? t.g.getResponseHeader(\"X-HTTP-Initial-Response\") : null) && !x(n)) {\n var m = n;\n break b;\n }\n }\n m = null;\n }\n if (c = m) D(this.j, this.m, c, \"Initial handshake response via X-HTTP-Initial-Response\"), this.K = !0, qc(this, c);else {\n this.i = !1;\n this.s = 3;\n F(12);\n I(this);\n pc(this);\n break a;\n }\n }\n this.S ? (rc(this, u, h), va && this.i && 3 == u && (Eb(this.U, this.V, \"tick\", this.mb), this.V.start())) : (D(this.j, this.m, h, null), qc(this, h));\n 4 == u && I(this);\n this.i && !this.J && (4 == u ? sc(this.l, this) : (this.i = !1, jc(this)));\n } else tc(this.g), 400 == c && 0 < h.indexOf(\"Unknown SID\") ? (this.s = 3, F(12)) : (this.s = 0, F(13)), I(this), pc(this);\n }\n }\n } catch (u) {} finally {}\n};\nfunction oc(a) {\n return a.g ? \"GET\" == a.v && 2 != a.L && a.l.Ha : !1;\n}\nfunction rc(a, b, c) {\n let d = !0,\n e;\n for (; !a.J && a.o < c.length;) if (e = uc(a, c), e == fc) {\n 4 == b && (a.s = 4, F(14), d = !1);\n D(a.j, a.m, null, \"[Incomplete Response]\");\n break;\n } else if (e == ec) {\n a.s = 4;\n F(15);\n D(a.j, a.m, c, \"[Invalid Chunk]\");\n d = !1;\n break;\n } else D(a.j, a.m, e, null), qc(a, e);\n oc(a) && 0 != a.o && (a.h.g = a.h.g.slice(a.o), a.o = 0);\n 4 != b || 0 != c.length || a.h.h || (a.s = 1, F(16), d = !1);\n a.i = a.i && d;\n d ? 0 < c.length && !a.ba && (a.ba = !0, b = a.l, b.g == a && b.ca && !b.M && (b.l.info(\"Great, no buffering proxy detected. Bytes received: \" + c.length), vc(b), b.M = !0, F(11))) : (D(a.j, a.m, c, \"[Invalid Chunked Response]\"), I(a), pc(a));\n}\nk.mb = function () {\n if (this.g) {\n var a = H(this.g),\n b = this.g.ja();\n this.o < b.length && (nc(this), rc(this, a, b), this.i && 4 != a && jc(this));\n }\n};\nfunction uc(a, b) {\n var c = a.o,\n d = b.indexOf(\"\\n\", c);\n if (-1 == d) return fc;\n c = Number(b.substring(c, d));\n if (isNaN(c)) return ec;\n d += 1;\n if (d + c > b.length) return fc;\n b = b.slice(d, d + c);\n a.o = d + c;\n return b;\n}\nk.cancel = function () {\n this.J = !0;\n I(this);\n};\nfunction jc(a) {\n a.Y = Date.now() + a.P;\n wc(a, a.P);\n}\nfunction wc(a, b) {\n if (null != a.C) throw Error(\"WatchDog timer not null\");\n a.C = Rb(q(a.lb, a), b);\n}\nfunction nc(a) {\n a.C && (l.clearTimeout(a.C), a.C = null);\n}\nk.lb = function () {\n this.C = null;\n const a = Date.now();\n 0 <= a - this.Y ? (Kb(this.j, this.B), 2 != this.L && (Ob(), F(17)), I(this), this.s = 2, pc(this)) : wc(this, this.Y - a);\n};\nfunction pc(a) {\n 0 == a.l.H || a.J || sc(a.l, a);\n}\nfunction I(a) {\n nc(a);\n var b = a.M;\n b && \"function\" == typeof b.sa && b.sa();\n a.M = null;\n xb(a.V);\n Fb(a.U);\n a.g && (b = a.g, a.g = null, b.abort(), b.sa());\n}\nfunction qc(a, b) {\n try {\n var c = a.l;\n if (0 != c.H && (c.g == a || xc(c.i, a))) if (!a.K && xc(c.i, a) && 3 == c.H) {\n try {\n var d = c.Ja.g.parse(b);\n } catch (m) {\n d = null;\n }\n if (Array.isArray(d) && 3 == d.length) {\n var e = d;\n if (0 == e[0]) a: {\n if (!c.u) {\n if (c.g) if (c.g.G + 3E3 < a.G) yc(c), zc(c);else break a;\n Ac(c);\n F(18);\n }\n } else c.Fa = e[1], 0 < c.Fa - c.V && 37500 > e[2] && c.G && 0 == c.A && !c.v && (c.v = Rb(q(c.ib, c), 6E3));\n if (1 >= Bc(c.i) && c.oa) {\n try {\n c.oa();\n } catch (m) {}\n c.oa = void 0;\n }\n } else J(c, 11);\n } else if ((a.K || c.g == a) && yc(c), !x(b)) for (e = c.Ja.g.parse(b), b = 0; b < e.length; b++) {\n let m = e[b];\n c.V = m[0];\n m = m[1];\n if (2 == c.H) {\n if (\"c\" == m[0]) {\n c.K = m[1];\n c.pa = m[2];\n const u = m[3];\n null != u && (c.ra = u, c.l.info(\"VER=\" + c.ra));\n const L = m[4];\n null != L && (c.Ga = L, c.l.info(\"SVER=\" + c.Ga));\n const Ka = m[5];\n null != Ka && \"number\" === typeof Ka && 0 < Ka && (d = 1.5 * Ka, c.L = d, c.l.info(\"backChannelRequestTimeoutMs_=\" + d));\n d = c;\n const la = a.g;\n if (la) {\n const La = la.g ? la.g.getResponseHeader(\"X-Client-Wire-Protocol\") : null;\n if (La) {\n var f = d.i;\n f.g || -1 == La.indexOf(\"spdy\") && -1 == La.indexOf(\"quic\") && -1 == La.indexOf(\"h2\") || (f.j = f.l, f.g = new Set(), f.h && (Cc(f, f.h), f.h = null));\n }\n if (d.F) {\n const Db = la.g ? la.g.getResponseHeader(\"X-HTTP-Session-Id\") : null;\n Db && (d.Da = Db, K(d.I, d.F, Db));\n }\n }\n c.H = 3;\n c.h && c.h.Ba();\n c.ca && (c.S = Date.now() - a.G, c.l.info(\"Handshake RTT: \" + c.S + \"ms\"));\n d = c;\n var h = a;\n d.wa = Dc(d, d.J ? d.pa : null, d.Y);\n if (h.K) {\n Ec(d.i, h);\n var n = h,\n t = d.L;\n t && n.setTimeout(t);\n n.C && (nc(n), jc(n));\n d.g = h;\n } else Fc(d);\n 0 < c.j.length && Gc(c);\n } else \"stop\" != m[0] && \"close\" != m[0] || J(c, 7);\n } else 3 == c.H && (\"stop\" == m[0] || \"close\" == m[0] ? \"stop\" == m[0] ? J(c, 7) : Hc(c) : \"noop\" != m[0] && c.h && c.h.Aa(m), c.A = 0);\n }\n Ob(4);\n } catch (m) {}\n}\nfunction Ic(a) {\n if (a.Z && \"function\" == typeof a.Z) return a.Z();\n if (\"undefined\" !== typeof Map && a instanceof Map || \"undefined\" !== typeof Set && a instanceof Set) return Array.from(a.values());\n if (\"string\" === typeof a) return a.split(\"\");\n if (aa(a)) {\n for (var b = [], c = a.length, d = 0; d < c; d++) b.push(a[d]);\n return b;\n }\n b = [];\n c = 0;\n for (d in a) b[c++] = a[d];\n return b;\n}\nfunction Jc(a) {\n if (a.ta && \"function\" == typeof a.ta) return a.ta();\n if (!a.Z || \"function\" != typeof a.Z) {\n if (\"undefined\" !== typeof Map && a instanceof Map) return Array.from(a.keys());\n if (!(\"undefined\" !== typeof Set && a instanceof Set)) {\n if (aa(a) || \"string\" === typeof a) {\n var b = [];\n a = a.length;\n for (var c = 0; c < a; c++) b.push(c);\n return b;\n }\n b = [];\n c = 0;\n for (const d in a) b[c++] = d;\n return b;\n }\n }\n}\nfunction Kc(a, b) {\n if (a.forEach && \"function\" == typeof a.forEach) a.forEach(b, void 0);else if (aa(a) || \"string\" === typeof a) Array.prototype.forEach.call(a, b, void 0);else for (var c = Jc(a), d = Ic(a), e = d.length, f = 0; f < e; f++) b.call(void 0, d[f], c && c[f], a);\n}\nvar Lc = RegExp(\"^(?:([^:/?#.]+):)?(?://(?:([^\\\\\\\\/?#]*)@)?([^\\\\\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\\\\\/?#]|$))?([^?#]+)?(?:\\\\?([^#]*))?(?:#([\\\\s\\\\S]*))?$\");\nfunction Mc(a, b) {\n if (a) {\n a = a.split(\"&\");\n for (var c = 0; c < a.length; c++) {\n var d = a[c].indexOf(\"=\"),\n e = null;\n if (0 <= d) {\n var f = a[c].substring(0, d);\n e = a[c].substring(d + 1);\n } else f = a[c];\n b(f, e ? decodeURIComponent(e.replace(/\\+/g, \" \")) : \"\");\n }\n }\n}\nfunction M(a) {\n this.g = this.s = this.j = \"\";\n this.m = null;\n this.o = this.l = \"\";\n this.h = !1;\n if (a instanceof M) {\n this.h = a.h;\n Nc(this, a.j);\n this.s = a.s;\n this.g = a.g;\n Oc(this, a.m);\n this.l = a.l;\n var b = a.i;\n var c = new Pc();\n c.i = b.i;\n b.g && (c.g = new Map(b.g), c.h = b.h);\n Qc(this, c);\n this.o = a.o;\n } else a && (b = String(a).match(Lc)) ? (this.h = !1, Nc(this, b[1] || \"\", !0), this.s = Rc(b[2] || \"\"), this.g = Rc(b[3] || \"\", !0), Oc(this, b[4]), this.l = Rc(b[5] || \"\", !0), Qc(this, b[6] || \"\", !0), this.o = Rc(b[7] || \"\")) : (this.h = !1, this.i = new Pc(null, this.h));\n}\nM.prototype.toString = function () {\n var a = [],\n b = this.j;\n b && a.push(Sc(b, Tc, !0), \":\");\n var c = this.g;\n if (c || \"file\" == b) a.push(\"//\"), (b = this.s) && a.push(Sc(b, Tc, !0), \"@\"), a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g, \"%$1\")), c = this.m, null != c && a.push(\":\", String(c));\n if (c = this.l) this.g && \"/\" != c.charAt(0) && a.push(\"/\"), a.push(Sc(c, \"/\" == c.charAt(0) ? Uc : Vc, !0));\n (c = this.i.toString()) && a.push(\"?\", c);\n (c = this.o) && a.push(\"#\", Sc(c, Wc));\n return a.join(\"\");\n};\nfunction G(a) {\n return new M(a);\n}\nfunction Nc(a, b, c) {\n a.j = c ? Rc(b, !0) : b;\n a.j && (a.j = a.j.replace(/:$/, \"\"));\n}\nfunction Oc(a, b) {\n if (b) {\n b = Number(b);\n if (isNaN(b) || 0 > b) throw Error(\"Bad port number \" + b);\n a.m = b;\n } else a.m = null;\n}\nfunction Qc(a, b, c) {\n b instanceof Pc ? (a.i = b, Xc(a.i, a.h)) : (c || (b = Sc(b, Yc)), a.i = new Pc(b, a.h));\n}\nfunction K(a, b, c) {\n a.i.set(b, c);\n}\nfunction hc(a) {\n K(a, \"zx\", Math.floor(2147483648 * Math.random()).toString(36) + Math.abs(Math.floor(2147483648 * Math.random()) ^ Date.now()).toString(36));\n return a;\n}\nfunction Rc(a, b) {\n return a ? b ? decodeURI(a.replace(/%25/g, \"%2525\")) : decodeURIComponent(a) : \"\";\n}\nfunction Sc(a, b, c) {\n return \"string\" === typeof a ? (a = encodeURI(a).replace(b, Zc), c && (a = a.replace(/%25([0-9a-fA-F]{2})/g, \"%$1\")), a) : null;\n}\nfunction Zc(a) {\n a = a.charCodeAt(0);\n return \"%\" + (a >> 4 & 15).toString(16) + (a & 15).toString(16);\n}\nvar Tc = /[#\\/\\?@]/g,\n Vc = /[#\\?:]/g,\n Uc = /[#\\?]/g,\n Yc = /[#\\?@]/g,\n Wc = /#/g;\nfunction Pc(a, b) {\n this.h = this.g = null;\n this.i = a || null;\n this.j = !!b;\n}\nfunction N(a) {\n a.g || (a.g = new Map(), a.h = 0, a.i && Mc(a.i, function (b, c) {\n a.add(decodeURIComponent(b.replace(/\\+/g, \" \")), c);\n }));\n}\nk = Pc.prototype;\nk.add = function (a, b) {\n N(this);\n this.i = null;\n a = O(this, a);\n var c = this.g.get(a);\n c || this.g.set(a, c = []);\n c.push(b);\n this.h += 1;\n return this;\n};\nfunction $c(a, b) {\n N(a);\n b = O(a, b);\n a.g.has(b) && (a.i = null, a.h -= a.g.get(b).length, a.g.delete(b));\n}\nfunction ad(a, b) {\n N(a);\n b = O(a, b);\n return a.g.has(b);\n}\nk.forEach = function (a, b) {\n N(this);\n this.g.forEach(function (c, d) {\n c.forEach(function (e) {\n a.call(b, e, d, this);\n }, this);\n }, this);\n};\nk.ta = function () {\n N(this);\n const a = Array.from(this.g.values()),\n b = Array.from(this.g.keys()),\n c = [];\n for (let d = 0; d < b.length; d++) {\n const e = a[d];\n for (let f = 0; f < e.length; f++) c.push(b[d]);\n }\n return c;\n};\nk.Z = function (a) {\n N(this);\n let b = [];\n if (\"string\" === typeof a) ad(this, a) && (b = b.concat(this.g.get(O(this, a))));else {\n a = Array.from(this.g.values());\n for (let c = 0; c < a.length; c++) b = b.concat(a[c]);\n }\n return b;\n};\nk.set = function (a, b) {\n N(this);\n this.i = null;\n a = O(this, a);\n ad(this, a) && (this.h -= this.g.get(a).length);\n this.g.set(a, [b]);\n this.h += 1;\n return this;\n};\nk.get = function (a, b) {\n if (!a) return b;\n a = this.Z(a);\n return 0 < a.length ? String(a[0]) : b;\n};\nfunction kc(a, b, c) {\n $c(a, b);\n 0 < c.length && (a.i = null, a.g.set(O(a, b), ma(c)), a.h += c.length);\n}\nk.toString = function () {\n if (this.i) return this.i;\n if (!this.g) return \"\";\n const a = [],\n b = Array.from(this.g.keys());\n for (var c = 0; c < b.length; c++) {\n var d = b[c];\n const f = encodeURIComponent(String(d)),\n h = this.Z(d);\n for (d = 0; d < h.length; d++) {\n var e = f;\n \"\" !== h[d] && (e += \"=\" + encodeURIComponent(String(h[d])));\n a.push(e);\n }\n }\n return this.i = a.join(\"&\");\n};\nfunction O(a, b) {\n b = String(b);\n a.j && (b = b.toLowerCase());\n return b;\n}\nfunction Xc(a, b) {\n b && !a.j && (N(a), a.i = null, a.g.forEach(function (c, d) {\n var e = d.toLowerCase();\n d != e && ($c(this, d), kc(this, e, c));\n }, a));\n a.j = b;\n}\nvar bd = class {\n constructor(a, b) {\n this.g = a;\n this.map = b;\n }\n};\nfunction cd(a) {\n this.l = a || dd;\n l.PerformanceNavigationTiming ? (a = l.performance.getEntriesByType(\"navigation\"), a = 0 < a.length && (\"hq\" == a[0].nextHopProtocol || \"h2\" == a[0].nextHopProtocol)) : a = !!(l.g && l.g.Ka && l.g.Ka() && l.g.Ka().dc);\n this.j = a ? this.l : 1;\n this.g = null;\n 1 < this.j && (this.g = new Set());\n this.h = null;\n this.i = [];\n}\nvar dd = 10;\nfunction ed(a) {\n return a.h ? !0 : a.g ? a.g.size >= a.j : !1;\n}\nfunction Bc(a) {\n return a.h ? 1 : a.g ? a.g.size : 0;\n}\nfunction xc(a, b) {\n return a.h ? a.h == b : a.g ? a.g.has(b) : !1;\n}\nfunction Cc(a, b) {\n a.g ? a.g.add(b) : a.h = b;\n}\nfunction Ec(a, b) {\n a.h && a.h == b ? a.h = null : a.g && a.g.has(b) && a.g.delete(b);\n}\ncd.prototype.cancel = function () {\n this.i = fd(this);\n if (this.h) this.h.cancel(), this.h = null;else if (this.g && 0 !== this.g.size) {\n for (const a of this.g.values()) a.cancel();\n this.g.clear();\n }\n};\nfunction fd(a) {\n if (null != a.h) return a.i.concat(a.h.F);\n if (null != a.g && 0 !== a.g.size) {\n let b = a.i;\n for (const c of a.g.values()) b = b.concat(c.F);\n return b;\n }\n return ma(a.i);\n}\nvar gd = class {\n stringify(a) {\n return l.JSON.stringify(a, void 0);\n }\n parse(a) {\n return l.JSON.parse(a, void 0);\n }\n};\nfunction hd() {\n this.g = new gd();\n}\nfunction id(a, b, c) {\n const d = c || \"\";\n try {\n Kc(a, function (e, f) {\n let h = e;\n p(e) && (h = jb(e));\n b.push(d + f + \"=\" + encodeURIComponent(h));\n });\n } catch (e) {\n throw b.push(d + \"type=\" + encodeURIComponent(\"_badmap\")), e;\n }\n}\nfunction jd(a, b) {\n const c = new Gb();\n if (l.Image) {\n const d = new Image();\n d.onload = ha(kd, c, d, \"TestLoadImage: loaded\", !0, b);\n d.onerror = ha(kd, c, d, \"TestLoadImage: error\", !1, b);\n d.onabort = ha(kd, c, d, \"TestLoadImage: abort\", !1, b);\n d.ontimeout = ha(kd, c, d, \"TestLoadImage: timeout\", !1, b);\n l.setTimeout(function () {\n if (d.ontimeout) d.ontimeout();\n }, 1E4);\n d.src = a;\n } else b(!1);\n}\nfunction kd(a, b, c, d, e) {\n try {\n b.onload = null, b.onerror = null, b.onabort = null, b.ontimeout = null, e(d);\n } catch (f) {}\n}\nfunction ld(a) {\n this.l = a.ec || null;\n this.j = a.ob || !1;\n}\nr(ld, Ub);\nld.prototype.g = function () {\n return new md(this.l, this.j);\n};\nld.prototype.i = function (a) {\n return function () {\n return a;\n };\n}({});\nfunction md(a, b) {\n B.call(this);\n this.F = a;\n this.u = b;\n this.m = void 0;\n this.readyState = nd;\n this.status = 0;\n this.responseType = this.responseText = this.response = this.statusText = \"\";\n this.onreadystatechange = null;\n this.v = new Headers();\n this.h = null;\n this.C = \"GET\";\n this.B = \"\";\n this.g = !1;\n this.A = this.j = this.l = null;\n}\nr(md, B);\nvar nd = 0;\nk = md.prototype;\nk.open = function (a, b) {\n if (this.readyState != nd) throw this.abort(), Error(\"Error reopening a connection\");\n this.C = a;\n this.B = b;\n this.readyState = 1;\n od(this);\n};\nk.send = function (a) {\n if (1 != this.readyState) throw this.abort(), Error(\"need to call open() first. \");\n this.g = !0;\n const b = {\n headers: this.v,\n method: this.C,\n credentials: this.m,\n cache: void 0\n };\n a && (b.body = a);\n (this.F || l).fetch(new Request(this.B, b)).then(this.$a.bind(this), this.ka.bind(this));\n};\nk.abort = function () {\n this.response = this.responseText = \"\";\n this.v = new Headers();\n this.status = 0;\n this.j && this.j.cancel(\"Request was aborted.\").catch(() => {});\n 1 <= this.readyState && this.g && 4 != this.readyState && (this.g = !1, pd(this));\n this.readyState = nd;\n};\nk.$a = function (a) {\n if (this.g && (this.l = a, this.h || (this.status = this.l.status, this.statusText = this.l.statusText, this.h = a.headers, this.readyState = 2, od(this)), this.g && (this.readyState = 3, od(this), this.g))) if (\"arraybuffer\" === this.responseType) a.arrayBuffer().then(this.Ya.bind(this), this.ka.bind(this));else if (\"undefined\" !== typeof l.ReadableStream && \"body\" in a) {\n this.j = a.body.getReader();\n if (this.u) {\n if (this.responseType) throw Error('responseType must be empty for \"streamBinaryChunks\" mode responses.');\n this.response = [];\n } else this.response = this.responseText = \"\", this.A = new TextDecoder();\n qd(this);\n } else a.text().then(this.Za.bind(this), this.ka.bind(this));\n};\nfunction qd(a) {\n a.j.read().then(a.Xa.bind(a)).catch(a.ka.bind(a));\n}\nk.Xa = function (a) {\n if (this.g) {\n if (this.u && a.value) this.response.push(a.value);else if (!this.u) {\n var b = a.value ? a.value : new Uint8Array(0);\n if (b = this.A.decode(b, {\n stream: !a.done\n })) this.response = this.responseText += b;\n }\n a.done ? pd(this) : od(this);\n 3 == this.readyState && qd(this);\n }\n};\nk.Za = function (a) {\n this.g && (this.response = this.responseText = a, pd(this));\n};\nk.Ya = function (a) {\n this.g && (this.response = a, pd(this));\n};\nk.ka = function () {\n this.g && pd(this);\n};\nfunction pd(a) {\n a.readyState = 4;\n a.l = null;\n a.j = null;\n a.A = null;\n od(a);\n}\nk.setRequestHeader = function (a, b) {\n this.v.append(a, b);\n};\nk.getResponseHeader = function (a) {\n return this.h ? this.h.get(a.toLowerCase()) || \"\" : \"\";\n};\nk.getAllResponseHeaders = function () {\n if (!this.h) return \"\";\n const a = [],\n b = this.h.entries();\n for (var c = b.next(); !c.done;) c = c.value, a.push(c[0] + \": \" + c[1]), c = b.next();\n return a.join(\"\\r\\n\");\n};\nfunction od(a) {\n a.onreadystatechange && a.onreadystatechange.call(a);\n}\nObject.defineProperty(md.prototype, \"withCredentials\", {\n get: function () {\n return \"include\" === this.m;\n },\n set: function (a) {\n this.m = a ? \"include\" : \"same-origin\";\n }\n});\nvar rd = l.JSON.parse;\nfunction P(a) {\n B.call(this);\n this.headers = new Map();\n this.u = a || null;\n this.h = !1;\n this.C = this.g = null;\n this.I = \"\";\n this.m = 0;\n this.j = \"\";\n this.l = this.G = this.v = this.F = !1;\n this.B = 0;\n this.A = null;\n this.K = sd;\n this.L = this.M = !1;\n}\nr(P, B);\nvar sd = \"\",\n td = /^https?$/i,\n ud = [\"POST\", \"PUT\"];\nk = P.prototype;\nk.Oa = function (a) {\n this.M = a;\n};\nk.ha = function (a, b, c, d) {\n if (this.g) throw Error(\"[goog.net.XhrIo] Object is active with another request=\" + this.I + \"; newUri=\" + a);\n b = b ? b.toUpperCase() : \"GET\";\n this.I = a;\n this.j = \"\";\n this.m = 0;\n this.F = !1;\n this.h = !0;\n this.g = this.u ? this.u.g() : $b.g();\n this.C = this.u ? Vb(this.u) : Vb($b);\n this.g.onreadystatechange = q(this.La, this);\n try {\n this.G = !0, this.g.open(b, String(a), !0), this.G = !1;\n } catch (f) {\n vd(this, f);\n return;\n }\n a = c || \"\";\n c = new Map(this.headers);\n if (d) if (Object.getPrototypeOf(d) === Object.prototype) for (var e in d) c.set(e, d[e]);else if (\"function\" === typeof d.keys && \"function\" === typeof d.get) for (const f of d.keys()) c.set(f, d.get(f));else throw Error(\"Unknown input type for opt_headers: \" + String(d));\n d = Array.from(c.keys()).find(f => \"content-type\" == f.toLowerCase());\n e = l.FormData && a instanceof l.FormData;\n !(0 <= ka(ud, b)) || d || e || c.set(\"Content-Type\", \"application/x-www-form-urlencoded;charset=utf-8\");\n for (const [f, h] of c) this.g.setRequestHeader(f, h);\n this.K && (this.g.responseType = this.K);\n \"withCredentials\" in this.g && this.g.withCredentials !== this.M && (this.g.withCredentials = this.M);\n try {\n wd(this), 0 < this.B && ((this.L = xd(this.g)) ? (this.g.timeout = this.B, this.g.ontimeout = q(this.ua, this)) : this.A = yb(this.ua, this.B, this)), this.v = !0, this.g.send(a), this.v = !1;\n } catch (f) {\n vd(this, f);\n }\n};\nfunction xd(a) {\n return z && \"number\" === typeof a.timeout && void 0 !== a.ontimeout;\n}\nk.ua = function () {\n \"undefined\" != typeof goog && this.g && (this.j = \"Timed out after \" + this.B + \"ms, aborting\", this.m = 8, C(this, \"timeout\"), this.abort(8));\n};\nfunction vd(a, b) {\n a.h = !1;\n a.g && (a.l = !0, a.g.abort(), a.l = !1);\n a.j = b;\n a.m = 5;\n yd(a);\n zd(a);\n}\nfunction yd(a) {\n a.F || (a.F = !0, C(a, \"complete\"), C(a, \"error\"));\n}\nk.abort = function (a) {\n this.g && this.h && (this.h = !1, this.l = !0, this.g.abort(), this.l = !1, this.m = a || 7, C(this, \"complete\"), C(this, \"abort\"), zd(this));\n};\nk.N = function () {\n this.g && (this.h && (this.h = !1, this.l = !0, this.g.abort(), this.l = !1), zd(this, !0));\n P.$.N.call(this);\n};\nk.La = function () {\n this.s || (this.G || this.v || this.l ? Ad(this) : this.kb());\n};\nk.kb = function () {\n Ad(this);\n};\nfunction Ad(a) {\n if (a.h && \"undefined\" != typeof goog && (!a.C[1] || 4 != H(a) || 2 != a.da())) if (a.v && 4 == H(a)) yb(a.La, 0, a);else if (C(a, \"readystatechange\"), 4 == H(a)) {\n a.h = !1;\n try {\n const h = a.da();\n a: switch (h) {\n case 200:\n case 201:\n case 202:\n case 204:\n case 206:\n case 304:\n case 1223:\n var b = !0;\n break a;\n default:\n b = !1;\n }\n var c;\n if (!(c = b)) {\n var d;\n if (d = 0 === h) {\n var e = String(a.I).match(Lc)[1] || null;\n !e && l.self && l.self.location && (e = l.self.location.protocol.slice(0, -1));\n d = !td.test(e ? e.toLowerCase() : \"\");\n }\n c = d;\n }\n if (c) C(a, \"complete\"), C(a, \"success\");else {\n a.m = 6;\n try {\n var f = 2 < H(a) ? a.g.statusText : \"\";\n } catch (n) {\n f = \"\";\n }\n a.j = f + \" [\" + a.da() + \"]\";\n yd(a);\n }\n } finally {\n zd(a);\n }\n }\n}\nfunction zd(a, b) {\n if (a.g) {\n wd(a);\n const c = a.g,\n d = a.C[0] ? () => {} : null;\n a.g = null;\n a.C = null;\n b || C(a, \"ready\");\n try {\n c.onreadystatechange = d;\n } catch (e) {}\n }\n}\nfunction wd(a) {\n a.g && a.L && (a.g.ontimeout = null);\n a.A && (l.clearTimeout(a.A), a.A = null);\n}\nk.isActive = function () {\n return !!this.g;\n};\nfunction H(a) {\n return a.g ? a.g.readyState : 0;\n}\nk.da = function () {\n try {\n return 2 < H(this) ? this.g.status : -1;\n } catch (a) {\n return -1;\n }\n};\nk.ja = function () {\n try {\n return this.g ? this.g.responseText : \"\";\n } catch (a) {\n return \"\";\n }\n};\nk.Wa = function (a) {\n if (this.g) {\n var b = this.g.responseText;\n a && 0 == b.indexOf(a) && (b = b.substring(a.length));\n return rd(b);\n }\n};\nfunction mc(a) {\n try {\n if (!a.g) return null;\n if (\"response\" in a.g) return a.g.response;\n switch (a.K) {\n case sd:\n case \"text\":\n return a.g.responseText;\n case \"arraybuffer\":\n if (\"mozResponseArrayBuffer\" in a.g) return a.g.mozResponseArrayBuffer;\n }\n return null;\n } catch (b) {\n return null;\n }\n}\nfunction tc(a) {\n const b = {};\n a = (a.g && 2 <= H(a) ? a.g.getAllResponseHeaders() || \"\" : \"\").split(\"\\r\\n\");\n for (let d = 0; d < a.length; d++) {\n if (x(a[d])) continue;\n var c = qb(a[d]);\n const e = c[0];\n c = c[1];\n if (\"string\" !== typeof c) continue;\n c = c.trim();\n const f = b[e] || [];\n b[e] = f;\n f.push(c);\n }\n Oa(b, function (d) {\n return d.join(\", \");\n });\n}\nk.Ia = function () {\n return this.m;\n};\nk.Sa = function () {\n return \"string\" === typeof this.j ? this.j : String(this.j);\n};\nfunction Bd(a) {\n let b = \"\";\n Na(a, function (c, d) {\n b += d;\n b += \":\";\n b += c;\n b += \"\\r\\n\";\n });\n return b;\n}\nfunction Cd(a, b, c) {\n a: {\n for (d in c) {\n var d = !1;\n break a;\n }\n d = !0;\n }\n d || (c = Bd(c), \"string\" === typeof a ? null != c && encodeURIComponent(String(c)) : K(a, b, c));\n}\nfunction Dd(a, b, c) {\n return c && c.internalChannelParams ? c.internalChannelParams[a] || b : b;\n}\nfunction Ed(a) {\n this.Ga = 0;\n this.j = [];\n this.l = new Gb();\n this.pa = this.wa = this.I = this.Y = this.g = this.Da = this.F = this.na = this.o = this.U = this.s = null;\n this.fb = this.W = 0;\n this.cb = Dd(\"failFast\", !1, a);\n this.G = this.v = this.u = this.m = this.h = null;\n this.aa = !0;\n this.Fa = this.V = -1;\n this.ba = this.A = this.C = 0;\n this.ab = Dd(\"baseRetryDelayMs\", 5E3, a);\n this.hb = Dd(\"retryDelaySeedMs\", 1E4, a);\n this.eb = Dd(\"forwardChannelMaxRetries\", 2, a);\n this.xa = Dd(\"forwardChannelRequestTimeoutMs\", 2E4, a);\n this.va = a && a.xmlHttpFactory || void 0;\n this.Ha = a && a.useFetchStreams || !1;\n this.L = void 0;\n this.J = a && a.supportsCrossDomainXhr || !1;\n this.K = \"\";\n this.i = new cd(a && a.concurrentRequestLimit);\n this.Ja = new hd();\n this.P = a && a.fastHandshake || !1;\n this.O = a && a.encodeInitMessageHeaders || !1;\n this.P && this.O && (this.O = !1);\n this.bb = a && a.bc || !1;\n a && a.Ea && this.l.Ea();\n a && a.forceLongPolling && (this.aa = !1);\n this.ca = !this.P && this.aa && a && a.detectBufferingProxy || !1;\n this.qa = void 0;\n a && a.longPollingTimeout && 0 < a.longPollingTimeout && (this.qa = a.longPollingTimeout);\n this.oa = void 0;\n this.S = 0;\n this.M = !1;\n this.ma = this.B = null;\n}\nk = Ed.prototype;\nk.ra = 8;\nk.H = 1;\nfunction Hc(a) {\n Fd(a);\n if (3 == a.H) {\n var b = a.W++,\n c = G(a.I);\n K(c, \"SID\", a.K);\n K(c, \"RID\", b);\n K(c, \"TYPE\", \"terminate\");\n Gd(a, c);\n b = new bc(a, a.l, b);\n b.L = 2;\n b.A = hc(G(c));\n c = !1;\n if (l.navigator && l.navigator.sendBeacon) try {\n c = l.navigator.sendBeacon(b.A.toString(), \"\");\n } catch (d) {}\n !c && l.Image && (new Image().src = b.A, c = !0);\n c || (b.g = lc(b.l, null), b.g.ha(b.A));\n b.G = Date.now();\n jc(b);\n }\n Hd(a);\n}\nfunction zc(a) {\n a.g && (vc(a), a.g.cancel(), a.g = null);\n}\nfunction Fd(a) {\n zc(a);\n a.u && (l.clearTimeout(a.u), a.u = null);\n yc(a);\n a.i.cancel();\n a.m && (\"number\" === typeof a.m && l.clearTimeout(a.m), a.m = null);\n}\nfunction Gc(a) {\n if (!ed(a.i) && !a.m) {\n a.m = !0;\n var b = a.Na;\n sb || vb();\n tb || (sb(), tb = !0);\n mb.add(b, a);\n a.C = 0;\n }\n}\nfunction Id(a, b) {\n if (Bc(a.i) >= a.i.j - (a.m ? 1 : 0)) return !1;\n if (a.m) return a.j = b.F.concat(a.j), !0;\n if (1 == a.H || 2 == a.H || a.C >= (a.cb ? 0 : a.eb)) return !1;\n a.m = Rb(q(a.Na, a, b), Jd(a, a.C));\n a.C++;\n return !0;\n}\nk.Na = function (a) {\n if (this.m) if (this.m = null, 1 == this.H) {\n if (!a) {\n this.W = Math.floor(1E5 * Math.random());\n a = this.W++;\n const e = new bc(this, this.l, a);\n let f = this.s;\n this.U && (f ? (f = Pa(f), Ra(f, this.U)) : f = this.U);\n null !== this.o || this.O || (e.I = f, f = null);\n if (this.P) a: {\n var b = 0;\n for (var c = 0; c < this.j.length; c++) {\n b: {\n var d = this.j[c];\n if (\"__data__\" in d.map && (d = d.map.__data__, \"string\" === typeof d)) {\n d = d.length;\n break b;\n }\n d = void 0;\n }\n if (void 0 === d) break;\n b += d;\n if (4096 < b) {\n b = c;\n break a;\n }\n if (4096 === b || c === this.j.length - 1) {\n b = c + 1;\n break a;\n }\n }\n b = 1E3;\n } else b = 1E3;\n b = Kd(this, e, b);\n c = G(this.I);\n K(c, \"RID\", a);\n K(c, \"CVER\", 22);\n this.F && K(c, \"X-HTTP-Session-Id\", this.F);\n Gd(this, c);\n f && (this.O ? b = \"headers=\" + encodeURIComponent(String(Bd(f))) + \"&\" + b : this.o && Cd(c, this.o, f));\n Cc(this.i, e);\n this.bb && K(c, \"TYPE\", \"init\");\n this.P ? (K(c, \"$req\", b), K(c, \"SID\", \"null\"), e.aa = !0, gc(e, c, null)) : gc(e, c, b);\n this.H = 2;\n }\n } else 3 == this.H && (a ? Ld(this, a) : 0 == this.j.length || ed(this.i) || Ld(this));\n};\nfunction Ld(a, b) {\n var c;\n b ? c = b.m : c = a.W++;\n const d = G(a.I);\n K(d, \"SID\", a.K);\n K(d, \"RID\", c);\n K(d, \"AID\", a.V);\n Gd(a, d);\n a.o && a.s && Cd(d, a.o, a.s);\n c = new bc(a, a.l, c, a.C + 1);\n null === a.o && (c.I = a.s);\n b && (a.j = b.F.concat(a.j));\n b = Kd(a, c, 1E3);\n c.setTimeout(Math.round(.5 * a.xa) + Math.round(.5 * a.xa * Math.random()));\n Cc(a.i, c);\n gc(c, d, b);\n}\nfunction Gd(a, b) {\n a.na && Na(a.na, function (c, d) {\n K(b, d, c);\n });\n a.h && Kc({}, function (c, d) {\n K(b, d, c);\n });\n}\nfunction Kd(a, b, c) {\n c = Math.min(a.j.length, c);\n var d = a.h ? q(a.h.Va, a.h, a) : null;\n a: {\n var e = a.j;\n let f = -1;\n for (;;) {\n const h = [\"count=\" + c];\n -1 == f ? 0 < c ? (f = e[0].g, h.push(\"ofs=\" + f)) : f = 0 : h.push(\"ofs=\" + f);\n let n = !0;\n for (let t = 0; t < c; t++) {\n let m = e[t].g;\n const u = e[t].map;\n m -= f;\n if (0 > m) f = Math.max(0, e[t].g - 100), n = !1;else try {\n id(u, h, \"req\" + m + \"_\");\n } catch (L) {\n d && d(u);\n }\n }\n if (n) {\n d = h.join(\"&\");\n break a;\n }\n }\n }\n a = a.j.splice(0, c);\n b.F = a;\n return d;\n}\nfunction Fc(a) {\n if (!a.g && !a.u) {\n a.ba = 1;\n var b = a.Ma;\n sb || vb();\n tb || (sb(), tb = !0);\n mb.add(b, a);\n a.A = 0;\n }\n}\nfunction Ac(a) {\n if (a.g || a.u || 3 <= a.A) return !1;\n a.ba++;\n a.u = Rb(q(a.Ma, a), Jd(a, a.A));\n a.A++;\n return !0;\n}\nk.Ma = function () {\n this.u = null;\n Md(this);\n if (this.ca && !(this.M || null == this.g || 0 >= this.S)) {\n var a = 2 * this.S;\n this.l.info(\"BP detection timer enabled: \" + a);\n this.B = Rb(q(this.jb, this), a);\n }\n};\nk.jb = function () {\n this.B && (this.B = null, this.l.info(\"BP detection timeout reached.\"), this.l.info(\"Buffering proxy detected and switch to long-polling!\"), this.G = !1, this.M = !0, F(10), zc(this), Md(this));\n};\nfunction vc(a) {\n null != a.B && (l.clearTimeout(a.B), a.B = null);\n}\nfunction Md(a) {\n a.g = new bc(a, a.l, \"rpc\", a.ba);\n null === a.o && (a.g.I = a.s);\n a.g.O = 0;\n var b = G(a.wa);\n K(b, \"RID\", \"rpc\");\n K(b, \"SID\", a.K);\n K(b, \"AID\", a.V);\n K(b, \"CI\", a.G ? \"0\" : \"1\");\n !a.G && a.qa && K(b, \"TO\", a.qa);\n K(b, \"TYPE\", \"xmlhttp\");\n Gd(a, b);\n a.o && a.s && Cd(b, a.o, a.s);\n a.L && a.g.setTimeout(a.L);\n var c = a.g;\n a = a.pa;\n c.L = 1;\n c.A = hc(G(b));\n c.u = null;\n c.S = !0;\n ic(c, a);\n}\nk.ib = function () {\n null != this.v && (this.v = null, zc(this), Ac(this), F(19));\n};\nfunction yc(a) {\n null != a.v && (l.clearTimeout(a.v), a.v = null);\n}\nfunction sc(a, b) {\n var c = null;\n if (a.g == b) {\n yc(a);\n vc(a);\n a.g = null;\n var d = 2;\n } else if (xc(a.i, b)) c = b.F, Ec(a.i, b), d = 1;else return;\n if (0 != a.H) if (b.i) {\n if (1 == d) {\n c = b.u ? b.u.length : 0;\n b = Date.now() - b.G;\n var e = a.C;\n d = Mb();\n C(d, new Qb(d, c));\n Gc(a);\n } else Fc(a);\n } else if (e = b.s, 3 == e || 0 == e && 0 < b.ca || !(1 == d && Id(a, b) || 2 == d && Ac(a))) switch (c && 0 < c.length && (b = a.i, b.i = b.i.concat(c)), e) {\n case 1:\n J(a, 5);\n break;\n case 4:\n J(a, 10);\n break;\n case 3:\n J(a, 6);\n break;\n default:\n J(a, 2);\n }\n}\nfunction Jd(a, b) {\n let c = a.ab + Math.floor(Math.random() * a.hb);\n a.isActive() || (c *= 2);\n return c * b;\n}\nfunction J(a, b) {\n a.l.info(\"Error code \" + b);\n if (2 == b) {\n var c = null;\n a.h && (c = null);\n var d = q(a.pb, a);\n c || (c = new M(\"//www.google.com/images/cleardot.gif\"), l.location && \"http\" == l.location.protocol || Nc(c, \"https\"), hc(c));\n jd(c.toString(), d);\n } else F(2);\n a.H = 0;\n a.h && a.h.za(b);\n Hd(a);\n Fd(a);\n}\nk.pb = function (a) {\n a ? (this.l.info(\"Successfully pinged google.com\"), F(2)) : (this.l.info(\"Failed to ping google.com\"), F(1));\n};\nfunction Hd(a) {\n a.H = 0;\n a.ma = [];\n if (a.h) {\n const b = fd(a.i);\n if (0 != b.length || 0 != a.j.length) na(a.ma, b), na(a.ma, a.j), a.i.i.length = 0, ma(a.j), a.j.length = 0;\n a.h.ya();\n }\n}\nfunction Dc(a, b, c) {\n var d = c instanceof M ? G(c) : new M(c);\n if (\"\" != d.g) b && (d.g = b + \".\" + d.g), Oc(d, d.m);else {\n var e = l.location;\n d = e.protocol;\n b = b ? b + \".\" + e.hostname : e.hostname;\n e = +e.port;\n var f = new M(null);\n d && Nc(f, d);\n b && (f.g = b);\n e && Oc(f, e);\n c && (f.l = c);\n d = f;\n }\n c = a.F;\n b = a.Da;\n c && b && K(d, c, b);\n K(d, \"VER\", a.ra);\n Gd(a, d);\n return d;\n}\nfunction lc(a, b, c) {\n if (b && !a.J) throw Error(\"Can't create secondary domain capable XhrIo object.\");\n b = a.Ha && !a.va ? new P(new ld({\n ob: c\n })) : new P(a.va);\n b.Oa(a.J);\n return b;\n}\nk.isActive = function () {\n return !!this.h && this.h.isActive(this);\n};\nfunction Nd() {}\nk = Nd.prototype;\nk.Ba = function () {};\nk.Aa = function () {};\nk.za = function () {};\nk.ya = function () {};\nk.isActive = function () {\n return !0;\n};\nk.Va = function () {};\nfunction Od() {\n if (z && !(10 <= Number(Fa))) throw Error(\"Environmental error: no available transport.\");\n}\nOd.prototype.g = function (a, b) {\n return new Q(a, b);\n};\nfunction Q(a, b) {\n B.call(this);\n this.g = new Ed(b);\n this.l = a;\n this.h = b && b.messageUrlParams || null;\n a = b && b.messageHeaders || null;\n b && b.clientProtocolHeaderRequired && (a ? a[\"X-Client-Protocol\"] = \"webchannel\" : a = {\n \"X-Client-Protocol\": \"webchannel\"\n });\n this.g.s = a;\n a = b && b.initMessageHeaders || null;\n b && b.messageContentType && (a ? a[\"X-WebChannel-Content-Type\"] = b.messageContentType : a = {\n \"X-WebChannel-Content-Type\": b.messageContentType\n });\n b && b.Ca && (a ? a[\"X-WebChannel-Client-Profile\"] = b.Ca : a = {\n \"X-WebChannel-Client-Profile\": b.Ca\n });\n this.g.U = a;\n (a = b && b.cc) && !x(a) && (this.g.o = a);\n this.A = b && b.supportsCrossDomainXhr || !1;\n this.v = b && b.sendRawJson || !1;\n (b = b && b.httpSessionIdParam) && !x(b) && (this.g.F = b, a = this.h, null !== a && b in a && (a = this.h, b in a && delete a[b]));\n this.j = new R(this);\n}\nr(Q, B);\nQ.prototype.m = function () {\n this.g.h = this.j;\n this.A && (this.g.J = !0);\n var a = this.g,\n b = this.l,\n c = this.h || void 0;\n F(0);\n a.Y = b;\n a.na = c || {};\n a.G = a.aa;\n a.I = Dc(a, null, a.Y);\n Gc(a);\n};\nQ.prototype.close = function () {\n Hc(this.g);\n};\nQ.prototype.u = function (a) {\n var b = this.g;\n if (\"string\" === typeof a) {\n var c = {};\n c.__data__ = a;\n a = c;\n } else this.v && (c = {}, c.__data__ = jb(a), a = c);\n b.j.push(new bd(b.fb++, a));\n 3 == b.H && Gc(b);\n};\nQ.prototype.N = function () {\n this.g.h = null;\n delete this.j;\n Hc(this.g);\n delete this.g;\n Q.$.N.call(this);\n};\nfunction Pd(a) {\n Yb.call(this);\n a.__headers__ && (this.headers = a.__headers__, this.statusCode = a.__status__, delete a.__headers__, delete a.__status__);\n var b = a.__sm__;\n if (b) {\n a: {\n for (const c in b) {\n a = c;\n break a;\n }\n a = void 0;\n }\n if (this.i = a) a = this.i, b = null !== b && a in b ? b[a] : void 0;\n this.data = b;\n } else this.data = a;\n}\nr(Pd, Yb);\nfunction Qd() {\n Zb.call(this);\n this.status = 1;\n}\nr(Qd, Zb);\nfunction R(a) {\n this.g = a;\n}\nr(R, Nd);\nR.prototype.Ba = function () {\n C(this.g, \"a\");\n};\nR.prototype.Aa = function (a) {\n C(this.g, new Pd(a));\n};\nR.prototype.za = function (a) {\n C(this.g, new Qd());\n};\nR.prototype.ya = function () {\n C(this.g, \"b\");\n};\nfunction Rd() {\n this.blockSize = -1;\n}\nfunction S() {\n this.blockSize = -1;\n this.blockSize = 64;\n this.g = Array(4);\n this.m = Array(this.blockSize);\n this.i = this.h = 0;\n this.reset();\n}\nr(S, Rd);\nS.prototype.reset = function () {\n this.g[0] = 1732584193;\n this.g[1] = 4023233417;\n this.g[2] = 2562383102;\n this.g[3] = 271733878;\n this.i = this.h = 0;\n};\nfunction Sd(a, b, c) {\n c || (c = 0);\n var d = Array(16);\n if (\"string\" === typeof b) for (var e = 0; 16 > e; ++e) d[e] = b.charCodeAt(c++) | b.charCodeAt(c++) << 8 | b.charCodeAt(c++) << 16 | b.charCodeAt(c++) << 24;else for (e = 0; 16 > e; ++e) d[e] = b[c++] | b[c++] << 8 | b[c++] << 16 | b[c++] << 24;\n b = a.g[0];\n c = a.g[1];\n e = a.g[2];\n var f = a.g[3];\n var h = b + (f ^ c & (e ^ f)) + d[0] + 3614090360 & 4294967295;\n b = c + (h << 7 & 4294967295 | h >>> 25);\n h = f + (e ^ b & (c ^ e)) + d[1] + 3905402710 & 4294967295;\n f = b + (h << 12 & 4294967295 | h >>> 20);\n h = e + (c ^ f & (b ^ c)) + d[2] + 606105819 & 4294967295;\n e = f + (h << 17 & 4294967295 | h >>> 15);\n h = c + (b ^ e & (f ^ b)) + d[3] + 3250441966 & 4294967295;\n c = e + (h << 22 & 4294967295 | h >>> 10);\n h = b + (f ^ c & (e ^ f)) + d[4] + 4118548399 & 4294967295;\n b = c + (h << 7 & 4294967295 | h >>> 25);\n h = f + (e ^ b & (c ^ e)) + d[5] + 1200080426 & 4294967295;\n f = b + (h << 12 & 4294967295 | h >>> 20);\n h = e + (c ^ f & (b ^ c)) + d[6] + 2821735955 & 4294967295;\n e = f + (h << 17 & 4294967295 | h >>> 15);\n h = c + (b ^ e & (f ^ b)) + d[7] + 4249261313 & 4294967295;\n c = e + (h << 22 & 4294967295 | h >>> 10);\n h = b + (f ^ c & (e ^ f)) + d[8] + 1770035416 & 4294967295;\n b = c + (h << 7 & 4294967295 | h >>> 25);\n h = f + (e ^ b & (c ^ e)) + d[9] + 2336552879 & 4294967295;\n f = b + (h << 12 & 4294967295 | h >>> 20);\n h = e + (c ^ f & (b ^ c)) + d[10] + 4294925233 & 4294967295;\n e = f + (h << 17 & 4294967295 | h >>> 15);\n h = c + (b ^ e & (f ^ b)) + d[11] + 2304563134 & 4294967295;\n c = e + (h << 22 & 4294967295 | h >>> 10);\n h = b + (f ^ c & (e ^ f)) + d[12] + 1804603682 & 4294967295;\n b = c + (h << 7 & 4294967295 | h >>> 25);\n h = f + (e ^ b & (c ^ e)) + d[13] + 4254626195 & 4294967295;\n f = b + (h << 12 & 4294967295 | h >>> 20);\n h = e + (c ^ f & (b ^ c)) + d[14] + 2792965006 & 4294967295;\n e = f + (h << 17 & 4294967295 | h >>> 15);\n h = c + (b ^ e & (f ^ b)) + d[15] + 1236535329 & 4294967295;\n c = e + (h << 22 & 4294967295 | h >>> 10);\n h = b + (e ^ f & (c ^ e)) + d[1] + 4129170786 & 4294967295;\n b = c + (h << 5 & 4294967295 | h >>> 27);\n h = f + (c ^ e & (b ^ c)) + d[6] + 3225465664 & 4294967295;\n f = b + (h << 9 & 4294967295 | h >>> 23);\n h = e + (b ^ c & (f ^ b)) + d[11] + 643717713 & 4294967295;\n e = f + (h << 14 & 4294967295 | h >>> 18);\n h = c + (f ^ b & (e ^ f)) + d[0] + 3921069994 & 4294967295;\n c = e + (h << 20 & 4294967295 | h >>> 12);\n h = b + (e ^ f & (c ^ e)) + d[5] + 3593408605 & 4294967295;\n b = c + (h << 5 & 4294967295 | h >>> 27);\n h = f + (c ^ e & (b ^ c)) + d[10] + 38016083 & 4294967295;\n f = b + (h << 9 & 4294967295 | h >>> 23);\n h = e + (b ^ c & (f ^ b)) + d[15] + 3634488961 & 4294967295;\n e = f + (h << 14 & 4294967295 | h >>> 18);\n h = c + (f ^ b & (e ^ f)) + d[4] + 3889429448 & 4294967295;\n c = e + (h << 20 & 4294967295 | h >>> 12);\n h = b + (e ^ f & (c ^ e)) + d[9] + 568446438 & 4294967295;\n b = c + (h << 5 & 4294967295 | h >>> 27);\n h = f + (c ^ e & (b ^ c)) + d[14] + 3275163606 & 4294967295;\n f = b + (h << 9 & 4294967295 | h >>> 23);\n h = e + (b ^ c & (f ^ b)) + d[3] + 4107603335 & 4294967295;\n e = f + (h << 14 & 4294967295 | h >>> 18);\n h = c + (f ^ b & (e ^ f)) + d[8] + 1163531501 & 4294967295;\n c = e + (h << 20 & 4294967295 | h >>> 12);\n h = b + (e ^ f & (c ^ e)) + d[13] + 2850285829 & 4294967295;\n b = c + (h << 5 & 4294967295 | h >>> 27);\n h = f + (c ^ e & (b ^ c)) + d[2] + 4243563512 & 4294967295;\n f = b + (h << 9 & 4294967295 | h >>> 23);\n h = e + (b ^ c & (f ^ b)) + d[7] + 1735328473 & 4294967295;\n e = f + (h << 14 & 4294967295 | h >>> 18);\n h = c + (f ^ b & (e ^ f)) + d[12] + 2368359562 & 4294967295;\n c = e + (h << 20 & 4294967295 | h >>> 12);\n h = b + (c ^ e ^ f) + d[5] + 4294588738 & 4294967295;\n b = c + (h << 4 & 4294967295 | h >>> 28);\n h = f + (b ^ c ^ e) + d[8] + 2272392833 & 4294967295;\n f = b + (h << 11 & 4294967295 | h >>> 21);\n h = e + (f ^ b ^ c) + d[11] + 1839030562 & 4294967295;\n e = f + (h << 16 & 4294967295 | h >>> 16);\n h = c + (e ^ f ^ b) + d[14] + 4259657740 & 4294967295;\n c = e + (h << 23 & 4294967295 | h >>> 9);\n h = b + (c ^ e ^ f) + d[1] + 2763975236 & 4294967295;\n b = c + (h << 4 & 4294967295 | h >>> 28);\n h = f + (b ^ c ^ e) + d[4] + 1272893353 & 4294967295;\n f = b + (h << 11 & 4294967295 | h >>> 21);\n h = e + (f ^ b ^ c) + d[7] + 4139469664 & 4294967295;\n e = f + (h << 16 & 4294967295 | h >>> 16);\n h = c + (e ^ f ^ b) + d[10] + 3200236656 & 4294967295;\n c = e + (h << 23 & 4294967295 | h >>> 9);\n h = b + (c ^ e ^ f) + d[13] + 681279174 & 4294967295;\n b = c + (h << 4 & 4294967295 | h >>> 28);\n h = f + (b ^ c ^ e) + d[0] + 3936430074 & 4294967295;\n f = b + (h << 11 & 4294967295 | h >>> 21);\n h = e + (f ^ b ^ c) + d[3] + 3572445317 & 4294967295;\n e = f + (h << 16 & 4294967295 | h >>> 16);\n h = c + (e ^ f ^ b) + d[6] + 76029189 & 4294967295;\n c = e + (h << 23 & 4294967295 | h >>> 9);\n h = b + (c ^ e ^ f) + d[9] + 3654602809 & 4294967295;\n b = c + (h << 4 & 4294967295 | h >>> 28);\n h = f + (b ^ c ^ e) + d[12] + 3873151461 & 4294967295;\n f = b + (h << 11 & 4294967295 | h >>> 21);\n h = e + (f ^ b ^ c) + d[15] + 530742520 & 4294967295;\n e = f + (h << 16 & 4294967295 | h >>> 16);\n h = c + (e ^ f ^ b) + d[2] + 3299628645 & 4294967295;\n c = e + (h << 23 & 4294967295 | h >>> 9);\n h = b + (e ^ (c | ~f)) + d[0] + 4096336452 & 4294967295;\n b = c + (h << 6 & 4294967295 | h >>> 26);\n h = f + (c ^ (b | ~e)) + d[7] + 1126891415 & 4294967295;\n f = b + (h << 10 & 4294967295 | h >>> 22);\n h = e + (b ^ (f | ~c)) + d[14] + 2878612391 & 4294967295;\n e = f + (h << 15 & 4294967295 | h >>> 17);\n h = c + (f ^ (e | ~b)) + d[5] + 4237533241 & 4294967295;\n c = e + (h << 21 & 4294967295 | h >>> 11);\n h = b + (e ^ (c | ~f)) + d[12] + 1700485571 & 4294967295;\n b = c + (h << 6 & 4294967295 | h >>> 26);\n h = f + (c ^ (b | ~e)) + d[3] + 2399980690 & 4294967295;\n f = b + (h << 10 & 4294967295 | h >>> 22);\n h = e + (b ^ (f | ~c)) + d[10] + 4293915773 & 4294967295;\n e = f + (h << 15 & 4294967295 | h >>> 17);\n h = c + (f ^ (e | ~b)) + d[1] + 2240044497 & 4294967295;\n c = e + (h << 21 & 4294967295 | h >>> 11);\n h = b + (e ^ (c | ~f)) + d[8] + 1873313359 & 4294967295;\n b = c + (h << 6 & 4294967295 | h >>> 26);\n h = f + (c ^ (b | ~e)) + d[15] + 4264355552 & 4294967295;\n f = b + (h << 10 & 4294967295 | h >>> 22);\n h = e + (b ^ (f | ~c)) + d[6] + 2734768916 & 4294967295;\n e = f + (h << 15 & 4294967295 | h >>> 17);\n h = c + (f ^ (e | ~b)) + d[13] + 1309151649 & 4294967295;\n c = e + (h << 21 & 4294967295 | h >>> 11);\n h = b + (e ^ (c | ~f)) + d[4] + 4149444226 & 4294967295;\n b = c + (h << 6 & 4294967295 | h >>> 26);\n h = f + (c ^ (b | ~e)) + d[11] + 3174756917 & 4294967295;\n f = b + (h << 10 & 4294967295 | h >>> 22);\n h = e + (b ^ (f | ~c)) + d[2] + 718787259 & 4294967295;\n e = f + (h << 15 & 4294967295 | h >>> 17);\n h = c + (f ^ (e | ~b)) + d[9] + 3951481745 & 4294967295;\n a.g[0] = a.g[0] + b & 4294967295;\n a.g[1] = a.g[1] + (e + (h << 21 & 4294967295 | h >>> 11)) & 4294967295;\n a.g[2] = a.g[2] + e & 4294967295;\n a.g[3] = a.g[3] + f & 4294967295;\n}\nS.prototype.j = function (a, b) {\n void 0 === b && (b = a.length);\n for (var c = b - this.blockSize, d = this.m, e = this.h, f = 0; f < b;) {\n if (0 == e) for (; f <= c;) Sd(this, a, f), f += this.blockSize;\n if (\"string\" === typeof a) for (; f < b;) {\n if (d[e++] = a.charCodeAt(f++), e == this.blockSize) {\n Sd(this, d);\n e = 0;\n break;\n }\n } else for (; f < b;) if (d[e++] = a[f++], e == this.blockSize) {\n Sd(this, d);\n e = 0;\n break;\n }\n }\n this.h = e;\n this.i += b;\n};\nS.prototype.l = function () {\n var a = Array((56 > this.h ? this.blockSize : 2 * this.blockSize) - this.h);\n a[0] = 128;\n for (var b = 1; b < a.length - 8; ++b) a[b] = 0;\n var c = 8 * this.i;\n for (b = a.length - 8; b < a.length; ++b) a[b] = c & 255, c /= 256;\n this.j(a);\n a = Array(16);\n for (b = c = 0; 4 > b; ++b) for (var d = 0; 32 > d; d += 8) a[c++] = this.g[b] >>> d & 255;\n return a;\n};\nfunction T(a, b) {\n this.h = b;\n for (var c = [], d = !0, e = a.length - 1; 0 <= e; e--) {\n var f = a[e] | 0;\n d && f == b || (c[e] = f, d = !1);\n }\n this.g = c;\n}\nvar sa = {};\nfunction Td(a) {\n return -128 <= a && 128 > a ? ra(a, function (b) {\n return new T([b | 0], 0 > b ? -1 : 0);\n }) : new T([a | 0], 0 > a ? -1 : 0);\n}\nfunction U(a) {\n if (isNaN(a) || !isFinite(a)) return V;\n if (0 > a) return W(U(-a));\n for (var b = [], c = 1, d = 0; a >= c; d++) b[d] = a / c | 0, c *= Ud;\n return new T(b, 0);\n}\nfunction Vd(a, b) {\n if (0 == a.length) throw Error(\"number format error: empty string\");\n b = b || 10;\n if (2 > b || 36 < b) throw Error(\"radix out of range: \" + b);\n if (\"-\" == a.charAt(0)) return W(Vd(a.substring(1), b));\n if (0 <= a.indexOf(\"-\")) throw Error('number format error: interior \"-\" character');\n for (var c = U(Math.pow(b, 8)), d = V, e = 0; e < a.length; e += 8) {\n var f = Math.min(8, a.length - e),\n h = parseInt(a.substring(e, e + f), b);\n 8 > f ? (f = U(Math.pow(b, f)), d = d.R(f).add(U(h))) : (d = d.R(c), d = d.add(U(h)));\n }\n return d;\n}\nvar Ud = 4294967296,\n V = Td(0),\n Wd = Td(1),\n Xd = Td(16777216);\nk = T.prototype;\nk.ea = function () {\n if (X(this)) return -W(this).ea();\n for (var a = 0, b = 1, c = 0; c < this.g.length; c++) {\n var d = this.D(c);\n a += (0 <= d ? d : Ud + d) * b;\n b *= Ud;\n }\n return a;\n};\nk.toString = function (a) {\n a = a || 10;\n if (2 > a || 36 < a) throw Error(\"radix out of range: \" + a);\n if (Y(this)) return \"0\";\n if (X(this)) return \"-\" + W(this).toString(a);\n for (var b = U(Math.pow(a, 6)), c = this, d = \"\";;) {\n var e = Yd(c, b).g;\n c = Zd(c, e.R(b));\n var f = ((0 < c.g.length ? c.g[0] : c.h) >>> 0).toString(a);\n c = e;\n if (Y(c)) return f + d;\n for (; 6 > f.length;) f = \"0\" + f;\n d = f + d;\n }\n};\nk.D = function (a) {\n return 0 > a ? 0 : a < this.g.length ? this.g[a] : this.h;\n};\nfunction Y(a) {\n if (0 != a.h) return !1;\n for (var b = 0; b < a.g.length; b++) if (0 != a.g[b]) return !1;\n return !0;\n}\nfunction X(a) {\n return -1 == a.h;\n}\nk.X = function (a) {\n a = Zd(this, a);\n return X(a) ? -1 : Y(a) ? 0 : 1;\n};\nfunction W(a) {\n for (var b = a.g.length, c = [], d = 0; d < b; d++) c[d] = ~a.g[d];\n return new T(c, ~a.h).add(Wd);\n}\nk.abs = function () {\n return X(this) ? W(this) : this;\n};\nk.add = function (a) {\n for (var b = Math.max(this.g.length, a.g.length), c = [], d = 0, e = 0; e <= b; e++) {\n var f = d + (this.D(e) & 65535) + (a.D(e) & 65535),\n h = (f >>> 16) + (this.D(e) >>> 16) + (a.D(e) >>> 16);\n d = h >>> 16;\n f &= 65535;\n h &= 65535;\n c[e] = h << 16 | f;\n }\n return new T(c, c[c.length - 1] & -2147483648 ? -1 : 0);\n};\nfunction Zd(a, b) {\n return a.add(W(b));\n}\nk.R = function (a) {\n if (Y(this) || Y(a)) return V;\n if (X(this)) return X(a) ? W(this).R(W(a)) : W(W(this).R(a));\n if (X(a)) return W(this.R(W(a)));\n if (0 > this.X(Xd) && 0 > a.X(Xd)) return U(this.ea() * a.ea());\n for (var b = this.g.length + a.g.length, c = [], d = 0; d < 2 * b; d++) c[d] = 0;\n for (d = 0; d < this.g.length; d++) for (var e = 0; e < a.g.length; e++) {\n var f = this.D(d) >>> 16,\n h = this.D(d) & 65535,\n n = a.D(e) >>> 16,\n t = a.D(e) & 65535;\n c[2 * d + 2 * e] += h * t;\n $d(c, 2 * d + 2 * e);\n c[2 * d + 2 * e + 1] += f * t;\n $d(c, 2 * d + 2 * e + 1);\n c[2 * d + 2 * e + 1] += h * n;\n $d(c, 2 * d + 2 * e + 1);\n c[2 * d + 2 * e + 2] += f * n;\n $d(c, 2 * d + 2 * e + 2);\n }\n for (d = 0; d < b; d++) c[d] = c[2 * d + 1] << 16 | c[2 * d];\n for (d = b; d < 2 * b; d++) c[d] = 0;\n return new T(c, 0);\n};\nfunction $d(a, b) {\n for (; (a[b] & 65535) != a[b];) a[b + 1] += a[b] >>> 16, a[b] &= 65535, b++;\n}\nfunction ae(a, b) {\n this.g = a;\n this.h = b;\n}\nfunction Yd(a, b) {\n if (Y(b)) throw Error(\"division by zero\");\n if (Y(a)) return new ae(V, V);\n if (X(a)) return b = Yd(W(a), b), new ae(W(b.g), W(b.h));\n if (X(b)) return b = Yd(a, W(b)), new ae(W(b.g), b.h);\n if (30 < a.g.length) {\n if (X(a) || X(b)) throw Error(\"slowDivide_ only works with positive integers.\");\n for (var c = Wd, d = b; 0 >= d.X(a);) c = be(c), d = be(d);\n var e = Z(c, 1),\n f = Z(d, 1);\n d = Z(d, 2);\n for (c = Z(c, 2); !Y(d);) {\n var h = f.add(d);\n 0 >= h.X(a) && (e = e.add(c), f = h);\n d = Z(d, 1);\n c = Z(c, 1);\n }\n b = Zd(a, e.R(b));\n return new ae(e, b);\n }\n for (e = V; 0 <= a.X(b);) {\n c = Math.max(1, Math.floor(a.ea() / b.ea()));\n d = Math.ceil(Math.log(c) / Math.LN2);\n d = 48 >= d ? 1 : Math.pow(2, d - 48);\n f = U(c);\n for (h = f.R(b); X(h) || 0 < h.X(a);) c -= d, f = U(c), h = f.R(b);\n Y(f) && (f = Wd);\n e = e.add(f);\n a = Zd(a, h);\n }\n return new ae(e, a);\n}\nk.gb = function (a) {\n return Yd(this, a).h;\n};\nk.and = function (a) {\n for (var b = Math.max(this.g.length, a.g.length), c = [], d = 0; d < b; d++) c[d] = this.D(d) & a.D(d);\n return new T(c, this.h & a.h);\n};\nk.or = function (a) {\n for (var b = Math.max(this.g.length, a.g.length), c = [], d = 0; d < b; d++) c[d] = this.D(d) | a.D(d);\n return new T(c, this.h | a.h);\n};\nk.xor = function (a) {\n for (var b = Math.max(this.g.length, a.g.length), c = [], d = 0; d < b; d++) c[d] = this.D(d) ^ a.D(d);\n return new T(c, this.h ^ a.h);\n};\nfunction be(a) {\n for (var b = a.g.length + 1, c = [], d = 0; d < b; d++) c[d] = a.D(d) << 1 | a.D(d - 1) >>> 31;\n return new T(c, a.h);\n}\nfunction Z(a, b) {\n var c = b >> 5;\n b %= 32;\n for (var d = a.g.length - c, e = [], f = 0; f < d; f++) e[f] = 0 < b ? a.D(f + c) >>> b | a.D(f + c + 1) << 32 - b : a.D(f + c);\n return new T(e, a.h);\n}\nOd.prototype.createWebChannel = Od.prototype.g;\nQ.prototype.send = Q.prototype.u;\nQ.prototype.open = Q.prototype.m;\nQ.prototype.close = Q.prototype.close;\nSb.NO_ERROR = 0;\nSb.TIMEOUT = 8;\nSb.HTTP_ERROR = 6;\nTb.COMPLETE = \"complete\";\nWb.EventType = Xb;\nXb.OPEN = \"a\";\nXb.CLOSE = \"b\";\nXb.ERROR = \"c\";\nXb.MESSAGE = \"d\";\nB.prototype.listen = B.prototype.O;\nP.prototype.listenOnce = P.prototype.P;\nP.prototype.getLastError = P.prototype.Sa;\nP.prototype.getLastErrorCode = P.prototype.Ia;\nP.prototype.getStatus = P.prototype.da;\nP.prototype.getResponseJson = P.prototype.Wa;\nP.prototype.getResponseText = P.prototype.ja;\nP.prototype.send = P.prototype.ha;\nP.prototype.setWithCredentials = P.prototype.Oa;\nS.prototype.digest = S.prototype.l;\nS.prototype.reset = S.prototype.reset;\nS.prototype.update = S.prototype.j;\nT.prototype.add = T.prototype.add;\nT.prototype.multiply = T.prototype.R;\nT.prototype.modulo = T.prototype.gb;\nT.prototype.compare = T.prototype.X;\nT.prototype.toNumber = T.prototype.ea;\nT.prototype.toString = T.prototype.toString;\nT.prototype.getBits = T.prototype.D;\nT.fromNumber = U;\nT.fromString = Vd;\nvar createWebChannelTransport = esm.createWebChannelTransport = function () {\n return new Od();\n};\nvar getStatEventTarget = esm.getStatEventTarget = function () {\n return Mb();\n};\nvar ErrorCode = esm.ErrorCode = Sb;\nvar EventType = esm.EventType = Tb;\nvar Event = esm.Event = E;\nvar Stat = esm.Stat = {\n xb: 0,\n Ab: 1,\n Bb: 2,\n Ub: 3,\n Zb: 4,\n Wb: 5,\n Xb: 6,\n Vb: 7,\n Tb: 8,\n Yb: 9,\n PROXY: 10,\n NOPROXY: 11,\n Rb: 12,\n Nb: 13,\n Ob: 14,\n Mb: 15,\n Pb: 16,\n Qb: 17,\n tb: 18,\n sb: 19,\n ub: 20\n};\nvar FetchXmlHttpFactory = esm.FetchXmlHttpFactory = ld;\nvar WebChannel = esm.WebChannel = Wb;\nvar XhrIo = esm.XhrIo = P;\nvar Md5 = esm.Md5 = S;\nvar Integer = esm.Integer = T;\nexport { ErrorCode, Event, EventType, FetchXmlHttpFactory, Integer, Md5, Stat, WebChannel, XhrIo, createWebChannelTransport, esm as default, getStatEventTarget };\n","import { _registerComponent, registerVersion, _getProvider, getApp, _removeServiceInstance, SDK_VERSION } from '@firebase/app';\nimport { Component } from '@firebase/component';\nimport { Logger, LogLevel } from '@firebase/logger';\nimport { FirebaseError, createMockUserToken, getModularInstance, deepEqual, getDefaultEmulatorHostnameAndPort, getUA, isIndexedDBAvailable, isSafari } from '@firebase/util';\nimport { Integer, XhrIo, EventType, ErrorCode, createWebChannelTransport, getStatEventTarget, WebChannel, Event, Stat, Md5 } from '@firebase/webchannel-wrapper';\nconst w = \"@firebase/firestore\";\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Simple wrapper around a nullable UID. Mostly exists to make code more\n * readable.\n */\nclass User {\n constructor(e) {\n this.uid = e;\n }\n isAuthenticated() {\n return null != this.uid;\n }\n /**\n * Returns a key representing this user, suitable for inclusion in a\n * dictionary.\n */\n toKey() {\n return this.isAuthenticated() ? \"uid:\" + this.uid : \"anonymous-user\";\n }\n isEqual(e) {\n return e.uid === this.uid;\n }\n}\n\n/** A user with a null UID. */\nUser.UNAUTHENTICATED = new User(null),\n// TODO(mikelehen): Look into getting a proper uid-equivalent for\n// non-FirebaseAuth providers.\nUser.GOOGLE_CREDENTIALS = new User(\"google-credentials-uid\"), User.FIRST_PARTY = new User(\"first-party-uid\"), User.MOCK_USER = new User(\"mock-user\");\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nlet S = \"10.7.0\";\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst b = new Logger(\"@firebase/firestore\");\n\n// Helper methods are needed because variables can't be exported as read/write\nfunction __PRIVATE_getLogLevel() {\n return b.logLevel;\n}\n\n/**\n * Sets the verbosity of Cloud Firestore logs (debug, error, or silent).\n *\n * @param logLevel - The verbosity you set for activity and error logging. Can\n * be any of the following values:\n *\n * \n * `debug` for the most verbose logging level, primarily for\n * debugging. \n * `error` to log errors only. \n * `silent` to turn off logging.
\n * \n */\nfunction setLogLevel(e) {\n b.setLogLevel(e);\n}\nfunction __PRIVATE_logDebug(e, ...t) {\n if (b.logLevel <= LogLevel.DEBUG) {\n const n = t.map(__PRIVATE_argToString);\n b.debug(`Firestore (${S}): ${e}`, ...n);\n }\n}\nfunction __PRIVATE_logError(e, ...t) {\n if (b.logLevel <= LogLevel.ERROR) {\n const n = t.map(__PRIVATE_argToString);\n b.error(`Firestore (${S}): ${e}`, ...n);\n }\n}\n\n/**\n * @internal\n */\nfunction __PRIVATE_logWarn(e, ...t) {\n if (b.logLevel <= LogLevel.WARN) {\n const n = t.map(__PRIVATE_argToString);\n b.warn(`Firestore (${S}): ${e}`, ...n);\n }\n}\n\n/**\n * Converts an additional log parameter to a string representation.\n */\nfunction __PRIVATE_argToString(e) {\n if (\"string\" == typeof e) return e;\n try {\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /** Formats an object as a JSON string, suitable for logging. */\n return function __PRIVATE_formatJSON(e) {\n return JSON.stringify(e);\n }(e);\n } catch (t) {\n // Converting to JSON failed, just log the object directly\n return e;\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Unconditionally fails, throwing an Error with the given message.\n * Messages are stripped in production builds.\n *\n * Returns `never` and can be used in expressions:\n * @example\n * let futureVar = fail('not implemented yet');\n */\nfunction fail(e = \"Unexpected state\") {\n // Log the failure in addition to throw an exception, just in case the\n // exception is swallowed.\n const t = `FIRESTORE (${S}) INTERNAL ASSERTION FAILED: ` + e;\n // NOTE: We don't use FirestoreError here because these are internal failures\n // that cannot be handled by the user. (Also it would create a circular\n // dependency between the error and assert modules which doesn't work.)\n throw __PRIVATE_logError(t), new Error(t);\n}\n\n/**\n * Fails if the given assertion condition is false, throwing an Error with the\n * given message if it did.\n *\n * Messages are stripped in production builds.\n */\nfunction __PRIVATE_hardAssert(e, t) {\n e || fail();\n}\n\n/**\n * Fails if the given assertion condition is false, throwing an Error with the\n * given message if it did.\n *\n * The code of callsites invoking this function are stripped out in production\n * builds. Any side-effects of code within the debugAssert() invocation will not\n * happen in this case.\n *\n * @internal\n */\nfunction __PRIVATE_debugAssert(e, t) {\n e || fail();\n}\n\n/**\n * Casts `obj` to `T`. In non-production builds, verifies that `obj` is an\n * instance of `T` before casting.\n */\nfunction __PRIVATE_debugCast(e,\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nt) {\n return e;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst D = {\n // Causes are copied from:\n // https://github.com/grpc/grpc/blob/bceec94ea4fc5f0085d81235d8e1c06798dc341a/include/grpc%2B%2B/impl/codegen/status_code_enum.h\n /** Not an error; returned on success. */\n OK: \"ok\",\n /** The operation was cancelled (typically by the caller). */\n CANCELLED: \"cancelled\",\n /** Unknown error or an error from a different error domain. */\n UNKNOWN: \"unknown\",\n /**\n * Client specified an invalid argument. Note that this differs from\n * FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are\n * problematic regardless of the state of the system (e.g., a malformed file\n * name).\n */\n INVALID_ARGUMENT: \"invalid-argument\",\n /**\n * Deadline expired before operation could complete. For operations that\n * change the state of the system, this error may be returned even if the\n * operation has completed successfully. For example, a successful response\n * from a server could have been delayed long enough for the deadline to\n * expire.\n */\n DEADLINE_EXCEEDED: \"deadline-exceeded\",\n /** Some requested entity (e.g., file or directory) was not found. */\n NOT_FOUND: \"not-found\",\n /**\n * Some entity that we attempted to create (e.g., file or directory) already\n * exists.\n */\n ALREADY_EXISTS: \"already-exists\",\n /**\n * The caller does not have permission to execute the specified operation.\n * PERMISSION_DENIED must not be used for rejections caused by exhausting\n * some resource (use RESOURCE_EXHAUSTED instead for those errors).\n * PERMISSION_DENIED must not be used if the caller can not be identified\n * (use UNAUTHENTICATED instead for those errors).\n */\n PERMISSION_DENIED: \"permission-denied\",\n /**\n * The request does not have valid authentication credentials for the\n * operation.\n */\n UNAUTHENTICATED: \"unauthenticated\",\n /**\n * Some resource has been exhausted, perhaps a per-user quota, or perhaps the\n * entire file system is out of space.\n */\n RESOURCE_EXHAUSTED: \"resource-exhausted\",\n /**\n * Operation was rejected because the system is not in a state required for\n * the operation's execution. For example, directory to be deleted may be\n * non-empty, an rmdir operation is applied to a non-directory, etc.\n *\n * A litmus test that may help a service implementor in deciding\n * between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE:\n * (a) Use UNAVAILABLE if the client can retry just the failing call.\n * (b) Use ABORTED if the client should retry at a higher-level\n * (e.g., restarting a read-modify-write sequence).\n * (c) Use FAILED_PRECONDITION if the client should not retry until\n * the system state has been explicitly fixed. E.g., if an \"rmdir\"\n * fails because the directory is non-empty, FAILED_PRECONDITION\n * should be returned since the client should not retry unless\n * they have first fixed up the directory by deleting files from it.\n * (d) Use FAILED_PRECONDITION if the client performs conditional\n * REST Get/Update/Delete on a resource and the resource on the\n * server does not match the condition. E.g., conflicting\n * read-modify-write on the same resource.\n */\n FAILED_PRECONDITION: \"failed-precondition\",\n /**\n * The operation was aborted, typically due to a concurrency issue like\n * sequencer check failures, transaction aborts, etc.\n *\n * See litmus test above for deciding between FAILED_PRECONDITION, ABORTED,\n * and UNAVAILABLE.\n */\n ABORTED: \"aborted\",\n /**\n * Operation was attempted past the valid range. E.g., seeking or reading\n * past end of file.\n *\n * Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed\n * if the system state changes. For example, a 32-bit file system will\n * generate INVALID_ARGUMENT if asked to read at an offset that is not in the\n * range [0,2^32-1], but it will generate OUT_OF_RANGE if asked to read from\n * an offset past the current file size.\n *\n * There is a fair bit of overlap between FAILED_PRECONDITION and\n * OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific error)\n * when it applies so that callers who are iterating through a space can\n * easily look for an OUT_OF_RANGE error to detect when they are done.\n */\n OUT_OF_RANGE: \"out-of-range\",\n /** Operation is not implemented or not supported/enabled in this service. */\n UNIMPLEMENTED: \"unimplemented\",\n /**\n * Internal errors. Means some invariants expected by underlying System has\n * been broken. If you see one of these errors, Something is very broken.\n */\n INTERNAL: \"internal\",\n /**\n * The service is currently unavailable. This is a most likely a transient\n * condition and may be corrected by retrying with a backoff.\n *\n * See litmus test above for deciding between FAILED_PRECONDITION, ABORTED,\n * and UNAVAILABLE.\n */\n UNAVAILABLE: \"unavailable\",\n /** Unrecoverable data loss or corruption. */\n DATA_LOSS: \"data-loss\"\n};\n\n/** An error returned by a Firestore operation. */\nclass FirestoreError extends FirebaseError {\n /** @hideconstructor */\n constructor(\n /**\n * The backend error code associated with this error.\n */\n e,\n /**\n * A custom error description.\n */\n t) {\n super(e, t), this.code = e, this.message = t,\n // HACK: We write a toString property directly because Error is not a real\n // class and so inheritance does not work correctly. We could alternatively\n // do the same \"back-door inheritance\" trick that FirebaseError does.\n this.toString = () => `${this.name}: [code=${this.code}]: ${this.message}`;\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass __PRIVATE_Deferred {\n constructor() {\n this.promise = new Promise((e, t) => {\n this.resolve = e, this.reject = t;\n });\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass __PRIVATE_OAuthToken {\n constructor(e, t) {\n this.user = t, this.type = \"OAuth\", this.headers = new Map(), this.headers.set(\"Authorization\", `Bearer ${e}`);\n }\n}\n\n/**\n * A CredentialsProvider that always yields an empty token.\n * @internal\n */\nclass __PRIVATE_EmptyAuthCredentialsProvider {\n getToken() {\n return Promise.resolve(null);\n }\n invalidateToken() {}\n start(e, t) {\n // Fire with initial user.\n e.enqueueRetryable(() => t(User.UNAUTHENTICATED));\n }\n shutdown() {}\n}\n\n/**\n * A CredentialsProvider that always returns a constant token. Used for\n * emulator token mocking.\n */\nclass __PRIVATE_EmulatorAuthCredentialsProvider {\n constructor(e) {\n this.token = e,\n /**\n * Stores the listener registered with setChangeListener()\n * This isn't actually necessary since the UID never changes, but we use this\n * to verify the listen contract is adhered to in tests.\n */\n this.changeListener = null;\n }\n getToken() {\n return Promise.resolve(this.token);\n }\n invalidateToken() {}\n start(e, t) {\n this.changeListener = t,\n // Fire with initial user.\n e.enqueueRetryable(() => t(this.token.user));\n }\n shutdown() {\n this.changeListener = null;\n }\n}\nclass __PRIVATE_FirebaseAuthCredentialsProvider {\n constructor(e) {\n this.t = e, /** Tracks the current User. */\n this.currentUser = User.UNAUTHENTICATED,\n /**\n * Counter used to detect if the token changed while a getToken request was\n * outstanding.\n */\n this.i = 0, this.forceRefresh = !1, this.auth = null;\n }\n start(e, t) {\n let n = this.i;\n // A change listener that prevents double-firing for the same token change.\n const __PRIVATE_guardedChangeListener = e => this.i !== n ? (n = this.i, t(e)) : Promise.resolve();\n // A promise that can be waited on to block on the next token change.\n // This promise is re-created after each change.\n let r = new __PRIVATE_Deferred();\n this.o = () => {\n this.i++, this.currentUser = this.u(), r.resolve(), r = new __PRIVATE_Deferred(), e.enqueueRetryable(() => __PRIVATE_guardedChangeListener(this.currentUser));\n };\n const __PRIVATE_awaitNextToken = () => {\n const t = r;\n e.enqueueRetryable(async () => {\n await t.promise, await __PRIVATE_guardedChangeListener(this.currentUser);\n });\n },\n __PRIVATE_registerAuth = e => {\n __PRIVATE_logDebug(\"FirebaseAuthCredentialsProvider\", \"Auth detected\"), this.auth = e, this.auth.addAuthTokenListener(this.o), __PRIVATE_awaitNextToken();\n };\n this.t.onInit(e => __PRIVATE_registerAuth(e)),\n // Our users can initialize Auth right after Firestore, so we give it\n // a chance to register itself with the component framework before we\n // determine whether to start up in unauthenticated mode.\n setTimeout(() => {\n if (!this.auth) {\n const e = this.t.getImmediate({\n optional: !0\n });\n e ? __PRIVATE_registerAuth(e) : (\n // If auth is still not available, proceed with `null` user\n __PRIVATE_logDebug(\"FirebaseAuthCredentialsProvider\", \"Auth not yet detected\"), r.resolve(), r = new __PRIVATE_Deferred());\n }\n }, 0), __PRIVATE_awaitNextToken();\n }\n getToken() {\n // Take note of the current value of the tokenCounter so that this method\n // can fail (with an ABORTED error) if there is a token change while the\n // request is outstanding.\n const e = this.i,\n t = this.forceRefresh;\n return this.forceRefresh = !1, this.auth ? this.auth.getToken(t).then(t =>\n // Cancel the request since the token changed while the request was\n // outstanding so the response is potentially for a previous user (which\n // user, we can't be sure).\n this.i !== e ? (__PRIVATE_logDebug(\"FirebaseAuthCredentialsProvider\", \"getToken aborted due to token change.\"), this.getToken()) : t ? (__PRIVATE_hardAssert(\"string\" == typeof t.accessToken), new __PRIVATE_OAuthToken(t.accessToken, this.currentUser)) : null) : Promise.resolve(null);\n }\n invalidateToken() {\n this.forceRefresh = !0;\n }\n shutdown() {\n this.auth && this.auth.removeAuthTokenListener(this.o);\n }\n // Auth.getUid() can return null even with a user logged in. It is because\n // getUid() is synchronous, but the auth code populating Uid is asynchronous.\n // This method should only be called in the AuthTokenListener callback\n // to guarantee to get the actual user.\n u() {\n const e = this.auth && this.auth.getUid();\n return __PRIVATE_hardAssert(null === e || \"string\" == typeof e), new User(e);\n }\n}\n\n/*\n * FirstPartyToken provides a fresh token each time its value\n * is requested, because if the token is too old, requests will be rejected.\n * Technically this may no longer be necessary since the SDK should gracefully\n * recover from unauthenticated errors (see b/33147818 for context), but it's\n * safer to keep the implementation as-is.\n */\nclass __PRIVATE_FirstPartyToken {\n constructor(e, t, n) {\n this.l = e, this.h = t, this.P = n, this.type = \"FirstParty\", this.user = User.FIRST_PARTY, this.I = new Map();\n }\n /**\n * Gets an authorization token, using a provided factory function, or return\n * null.\n */\n T() {\n return this.P ? this.P() : null;\n }\n get headers() {\n this.I.set(\"X-Goog-AuthUser\", this.l);\n // Use array notation to prevent minification\n const e = this.T();\n return e && this.I.set(\"Authorization\", e), this.h && this.I.set(\"X-Goog-Iam-Authorization-Token\", this.h), this.I;\n }\n}\n\n/*\n * Provides user credentials required for the Firestore JavaScript SDK\n * to authenticate the user, using technique that is only available\n * to applications hosted by Google.\n */\nclass __PRIVATE_FirstPartyAuthCredentialsProvider {\n constructor(e, t, n) {\n this.l = e, this.h = t, this.P = n;\n }\n getToken() {\n return Promise.resolve(new __PRIVATE_FirstPartyToken(this.l, this.h, this.P));\n }\n start(e, t) {\n // Fire with initial uid.\n e.enqueueRetryable(() => t(User.FIRST_PARTY));\n }\n shutdown() {}\n invalidateToken() {}\n}\nclass AppCheckToken {\n constructor(e) {\n this.value = e, this.type = \"AppCheck\", this.headers = new Map(), e && e.length > 0 && this.headers.set(\"x-firebase-appcheck\", this.value);\n }\n}\nclass __PRIVATE_FirebaseAppCheckTokenProvider {\n constructor(e) {\n this.A = e, this.forceRefresh = !1, this.appCheck = null, this.R = null;\n }\n start(e, t) {\n const onTokenChanged = e => {\n null != e.error && __PRIVATE_logDebug(\"FirebaseAppCheckTokenProvider\", `Error getting App Check token; using placeholder token instead. Error: ${e.error.message}`);\n const n = e.token !== this.R;\n return this.R = e.token, __PRIVATE_logDebug(\"FirebaseAppCheckTokenProvider\", `Received ${n ? \"new\" : \"existing\"} token.`), n ? t(e.token) : Promise.resolve();\n };\n this.o = t => {\n e.enqueueRetryable(() => onTokenChanged(t));\n };\n const __PRIVATE_registerAppCheck = e => {\n __PRIVATE_logDebug(\"FirebaseAppCheckTokenProvider\", \"AppCheck detected\"), this.appCheck = e, this.appCheck.addTokenListener(this.o);\n };\n this.A.onInit(e => __PRIVATE_registerAppCheck(e)),\n // Our users can initialize AppCheck after Firestore, so we give it\n // a chance to register itself with the component framework.\n setTimeout(() => {\n if (!this.appCheck) {\n const e = this.A.getImmediate({\n optional: !0\n });\n e ? __PRIVATE_registerAppCheck(e) :\n // If AppCheck is still not available, proceed without it.\n __PRIVATE_logDebug(\"FirebaseAppCheckTokenProvider\", \"AppCheck not yet detected\");\n }\n }, 0);\n }\n getToken() {\n const e = this.forceRefresh;\n return this.forceRefresh = !1, this.appCheck ? this.appCheck.getToken(e).then(e => e ? (__PRIVATE_hardAssert(\"string\" == typeof e.token), this.R = e.token, new AppCheckToken(e.token)) : null) : Promise.resolve(null);\n }\n invalidateToken() {\n this.forceRefresh = !0;\n }\n shutdown() {\n this.appCheck && this.appCheck.removeTokenListener(this.o);\n }\n}\n\n/**\n * An AppCheck token provider that always yields an empty token.\n * @internal\n */\nclass __PRIVATE_EmptyAppCheckTokenProvider {\n getToken() {\n return Promise.resolve(new AppCheckToken(\"\"));\n }\n invalidateToken() {}\n start(e, t) {}\n shutdown() {}\n}\n\n/**\n * Builds a CredentialsProvider depending on the type of\n * the credentials passed in.\n */\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Generates `nBytes` of random bytes.\n *\n * If `nBytes < 0` , an error will be thrown.\n */\nfunction __PRIVATE_randomBytes(e) {\n // Polyfills for IE and WebWorker by using `self` and `msCrypto` when `crypto` is not available.\n const t =\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n \"undefined\" != typeof self && (self.crypto || self.msCrypto),\n n = new Uint8Array(e);\n if (t && \"function\" == typeof t.getRandomValues) t.getRandomValues(n);else\n // Falls back to Math.random\n for (let t = 0; t < e; t++) n[t] = Math.floor(256 * Math.random());\n return n;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A utility class for generating unique alphanumeric IDs of a specified length.\n *\n * @internal\n * Exported internally for testing purposes.\n */\nclass __PRIVATE_AutoId {\n static newId() {\n // Alphanumeric characters\n const e = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\",\n t = Math.floor(256 / e.length) * e.length;\n // The largest byte value that is a multiple of `char.length`.\n let n = \"\";\n for (; n.length < 20;) {\n const r = __PRIVATE_randomBytes(40);\n for (let i = 0; i < r.length; ++i)\n // Only accept values that are [0, maxMultiple), this ensures they can\n // be evenly mapped to indices of `chars` via a modulo operation.\n n.length < 20 && r[i] < t && (n += e.charAt(r[i] % e.length));\n }\n return n;\n }\n}\nfunction __PRIVATE_primitiveComparator(e, t) {\n return e < t ? -1 : e > t ? 1 : 0;\n}\n\n/** Helper to compare arrays using isEqual(). */\nfunction __PRIVATE_arrayEquals(e, t, n) {\n return e.length === t.length && e.every((e, r) => n(e, t[r]));\n}\n\n/**\n * Returns the immediate lexicographically-following string. This is useful to\n * construct an inclusive range for indexeddb iterators.\n */\nfunction __PRIVATE_immediateSuccessor(e) {\n // Return the input string, with an additional NUL byte appended.\n return e + \"\\0\";\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// The earliest date supported by Firestore timestamps (0001-01-01T00:00:00Z).\n/**\n * A `Timestamp` represents a point in time independent of any time zone or\n * calendar, represented as seconds and fractions of seconds at nanosecond\n * resolution in UTC Epoch time.\n *\n * It is encoded using the Proleptic Gregorian Calendar which extends the\n * Gregorian calendar backwards to year one. It is encoded assuming all minutes\n * are 60 seconds long, i.e. leap seconds are \"smeared\" so that no leap second\n * table is needed for interpretation. Range is from 0001-01-01T00:00:00Z to\n * 9999-12-31T23:59:59.999999999Z.\n *\n * For examples and further specifications, refer to the\n * {@link https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto | Timestamp definition}.\n */\nclass Timestamp {\n /**\n * Creates a new timestamp.\n *\n * @param seconds - The number of seconds of UTC time since Unix epoch\n * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n * 9999-12-31T23:59:59Z inclusive.\n * @param nanoseconds - The non-negative fractions of a second at nanosecond\n * resolution. Negative second values with fractions must still have\n * non-negative nanoseconds values that count forward in time. Must be\n * from 0 to 999,999,999 inclusive.\n */\n constructor(\n /**\n * The number of seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.\n */\n e,\n /**\n * The fractions of a second at nanosecond resolution.*\n */\n t) {\n if (this.seconds = e, this.nanoseconds = t, t < 0) throw new FirestoreError(D.INVALID_ARGUMENT, \"Timestamp nanoseconds out of range: \" + t);\n if (t >= 1e9) throw new FirestoreError(D.INVALID_ARGUMENT, \"Timestamp nanoseconds out of range: \" + t);\n if (e < -62135596800) throw new FirestoreError(D.INVALID_ARGUMENT, \"Timestamp seconds out of range: \" + e);\n // This will break in the year 10,000.\n if (e >= 253402300800) throw new FirestoreError(D.INVALID_ARGUMENT, \"Timestamp seconds out of range: \" + e);\n }\n /**\n * Creates a new timestamp with the current date, with millisecond precision.\n *\n * @returns a new timestamp representing the current date.\n */\n static now() {\n return Timestamp.fromMillis(Date.now());\n }\n /**\n * Creates a new timestamp from the given date.\n *\n * @param date - The date to initialize the `Timestamp` from.\n * @returns A new `Timestamp` representing the same point in time as the given\n * date.\n */\n static fromDate(e) {\n return Timestamp.fromMillis(e.getTime());\n }\n /**\n * Creates a new timestamp from the given number of milliseconds.\n *\n * @param milliseconds - Number of milliseconds since Unix epoch\n * 1970-01-01T00:00:00Z.\n * @returns A new `Timestamp` representing the same point in time as the given\n * number of milliseconds.\n */\n static fromMillis(e) {\n const t = Math.floor(e / 1e3),\n n = Math.floor(1e6 * (e - 1e3 * t));\n return new Timestamp(t, n);\n }\n /**\n * Converts a `Timestamp` to a JavaScript `Date` object. This conversion\n * causes a loss of precision since `Date` objects only support millisecond\n * precision.\n *\n * @returns JavaScript `Date` object representing the same point in time as\n * this `Timestamp`, with millisecond precision.\n */\n toDate() {\n return new Date(this.toMillis());\n }\n /**\n * Converts a `Timestamp` to a numeric timestamp (in milliseconds since\n * epoch). This operation causes a loss of precision.\n *\n * @returns The point in time corresponding to this timestamp, represented as\n * the number of milliseconds since Unix epoch 1970-01-01T00:00:00Z.\n */\n toMillis() {\n return 1e3 * this.seconds + this.nanoseconds / 1e6;\n }\n _compareTo(e) {\n return this.seconds === e.seconds ? __PRIVATE_primitiveComparator(this.nanoseconds, e.nanoseconds) : __PRIVATE_primitiveComparator(this.seconds, e.seconds);\n }\n /**\n * Returns true if this `Timestamp` is equal to the provided one.\n *\n * @param other - The `Timestamp` to compare against.\n * @returns true if this `Timestamp` is equal to the provided one.\n */\n isEqual(e) {\n return e.seconds === this.seconds && e.nanoseconds === this.nanoseconds;\n }\n /** Returns a textual representation of this `Timestamp`. */\n toString() {\n return \"Timestamp(seconds=\" + this.seconds + \", nanoseconds=\" + this.nanoseconds + \")\";\n }\n /** Returns a JSON-serializable representation of this `Timestamp`. */\n toJSON() {\n return {\n seconds: this.seconds,\n nanoseconds: this.nanoseconds\n };\n }\n /**\n * Converts this object to a primitive string, which allows `Timestamp` objects\n * to be compared using the `>`, `<=`, `>=` and `>` operators.\n */\n valueOf() {\n // This method returns a string of the form . where\n // is translated to have a non-negative value and both \n // and are left-padded with zeroes to be a consistent length.\n // Strings with this format then have a lexiographical ordering that matches\n // the expected ordering. The translation is done to avoid having\n // a leading negative sign (i.e. a leading '-' character) in its string\n // representation, which would affect its lexiographical ordering.\n const e = this.seconds - -62135596800;\n // Note: Up to 12 decimal digits are required to represent all valid\n // 'seconds' values.\n return String(e).padStart(12, \"0\") + \".\" + String(this.nanoseconds).padStart(9, \"0\");\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A version of a document in Firestore. This corresponds to the version\n * timestamp, such as update_time or read_time.\n */\nclass SnapshotVersion {\n constructor(e) {\n this.timestamp = e;\n }\n static fromTimestamp(e) {\n return new SnapshotVersion(e);\n }\n static min() {\n return new SnapshotVersion(new Timestamp(0, 0));\n }\n static max() {\n return new SnapshotVersion(new Timestamp(253402300799, 999999999));\n }\n compareTo(e) {\n return this.timestamp._compareTo(e.timestamp);\n }\n isEqual(e) {\n return this.timestamp.isEqual(e.timestamp);\n }\n /** Returns a number representation of the version for use in spec tests. */\n toMicroseconds() {\n // Convert to microseconds.\n return 1e6 * this.timestamp.seconds + this.timestamp.nanoseconds / 1e3;\n }\n toString() {\n return \"SnapshotVersion(\" + this.timestamp.toString() + \")\";\n }\n toTimestamp() {\n return this.timestamp;\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Path represents an ordered sequence of string segments.\n */\nclass BasePath {\n constructor(e, t, n) {\n void 0 === t ? t = 0 : t > e.length && fail(), void 0 === n ? n = e.length - t : n > e.length - t && fail(), this.segments = e, this.offset = t, this.len = n;\n }\n get length() {\n return this.len;\n }\n isEqual(e) {\n return 0 === BasePath.comparator(this, e);\n }\n child(e) {\n const t = this.segments.slice(this.offset, this.limit());\n return e instanceof BasePath ? e.forEach(e => {\n t.push(e);\n }) : t.push(e), this.construct(t);\n }\n /** The index of one past the last segment of the path. */\n limit() {\n return this.offset + this.length;\n }\n popFirst(e) {\n return e = void 0 === e ? 1 : e, this.construct(this.segments, this.offset + e, this.length - e);\n }\n popLast() {\n return this.construct(this.segments, this.offset, this.length - 1);\n }\n firstSegment() {\n return this.segments[this.offset];\n }\n lastSegment() {\n return this.get(this.length - 1);\n }\n get(e) {\n return this.segments[this.offset + e];\n }\n isEmpty() {\n return 0 === this.length;\n }\n isPrefixOf(e) {\n if (e.length < this.length) return !1;\n for (let t = 0; t < this.length; t++) if (this.get(t) !== e.get(t)) return !1;\n return !0;\n }\n isImmediateParentOf(e) {\n if (this.length + 1 !== e.length) return !1;\n for (let t = 0; t < this.length; t++) if (this.get(t) !== e.get(t)) return !1;\n return !0;\n }\n forEach(e) {\n for (let t = this.offset, n = this.limit(); t < n; t++) e(this.segments[t]);\n }\n toArray() {\n return this.segments.slice(this.offset, this.limit());\n }\n static comparator(e, t) {\n const n = Math.min(e.length, t.length);\n for (let r = 0; r < n; r++) {\n const n = e.get(r),\n i = t.get(r);\n if (n < i) return -1;\n if (n > i) return 1;\n }\n return e.length < t.length ? -1 : e.length > t.length ? 1 : 0;\n }\n}\n\n/**\n * A slash-separated path for navigating resources (documents and collections)\n * within Firestore.\n *\n * @internal\n */\nclass ResourcePath extends BasePath {\n construct(e, t, n) {\n return new ResourcePath(e, t, n);\n }\n canonicalString() {\n // NOTE: The client is ignorant of any path segments containing escape\n // sequences (e.g. __id123__) and just passes them through raw (they exist\n // for legacy reasons and should not be used frequently).\n return this.toArray().join(\"/\");\n }\n toString() {\n return this.canonicalString();\n }\n /**\n * Creates a resource path from the given slash-delimited string. If multiple\n * arguments are provided, all components are combined. Leading and trailing\n * slashes from all components are ignored.\n */\n static fromString(...e) {\n // NOTE: The client is ignorant of any path segments containing escape\n // sequences (e.g. __id123__) and just passes them through raw (they exist\n // for legacy reasons and should not be used frequently).\n const t = [];\n for (const n of e) {\n if (n.indexOf(\"//\") >= 0) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid segment (${n}). Paths must not contain // in them.`);\n // Strip leading and traling slashed.\n t.push(...n.split(\"/\").filter(e => e.length > 0));\n }\n return new ResourcePath(t);\n }\n static emptyPath() {\n return new ResourcePath([]);\n }\n}\nconst C = /^[_a-zA-Z][_a-zA-Z0-9]*$/;\n\n/**\n * A dot-separated path for navigating sub-objects within a document.\n * @internal\n */\nclass FieldPath$1 extends BasePath {\n construct(e, t, n) {\n return new FieldPath$1(e, t, n);\n }\n /**\n * Returns true if the string could be used as a segment in a field path\n * without escaping.\n */\n static isValidIdentifier(e) {\n return C.test(e);\n }\n canonicalString() {\n return this.toArray().map(e => (e = e.replace(/\\\\/g, \"\\\\\\\\\").replace(/`/g, \"\\\\`\"), FieldPath$1.isValidIdentifier(e) || (e = \"`\" + e + \"`\"), e)).join(\".\");\n }\n toString() {\n return this.canonicalString();\n }\n /**\n * Returns true if this field references the key of a document.\n */\n isKeyField() {\n return 1 === this.length && \"__name__\" === this.get(0);\n }\n /**\n * The field designating the key of a document.\n */\n static keyField() {\n return new FieldPath$1([\"__name__\"]);\n }\n /**\n * Parses a field string from the given server-formatted string.\n *\n * - Splitting the empty string is not allowed (for now at least).\n * - Empty segments within the string (e.g. if there are two consecutive\n * separators) are not allowed.\n *\n * TODO(b/37244157): we should make this more strict. Right now, it allows\n * non-identifier path components, even if they aren't escaped.\n */\n static fromServerFormat(e) {\n const t = [];\n let n = \"\",\n r = 0;\n const __PRIVATE_addCurrentSegment = () => {\n if (0 === n.length) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid field path (${e}). Paths must not be empty, begin with '.', end with '.', or contain '..'`);\n t.push(n), n = \"\";\n };\n let i = !1;\n for (; r < e.length;) {\n const t = e[r];\n if (\"\\\\\" === t) {\n if (r + 1 === e.length) throw new FirestoreError(D.INVALID_ARGUMENT, \"Path has trailing escape character: \" + e);\n const t = e[r + 1];\n if (\"\\\\\" !== t && \".\" !== t && \"`\" !== t) throw new FirestoreError(D.INVALID_ARGUMENT, \"Path has invalid escape sequence: \" + e);\n n += t, r += 2;\n } else \"`\" === t ? (i = !i, r++) : \".\" !== t || i ? (n += t, r++) : (__PRIVATE_addCurrentSegment(), r++);\n }\n if (__PRIVATE_addCurrentSegment(), i) throw new FirestoreError(D.INVALID_ARGUMENT, \"Unterminated ` in path: \" + e);\n return new FieldPath$1(t);\n }\n static emptyPath() {\n return new FieldPath$1([]);\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @internal\n */\nclass DocumentKey {\n constructor(e) {\n this.path = e;\n }\n static fromPath(e) {\n return new DocumentKey(ResourcePath.fromString(e));\n }\n static fromName(e) {\n return new DocumentKey(ResourcePath.fromString(e).popFirst(5));\n }\n static empty() {\n return new DocumentKey(ResourcePath.emptyPath());\n }\n get collectionGroup() {\n return this.path.popLast().lastSegment();\n }\n /** Returns true if the document is in the specified collectionId. */\n hasCollectionId(e) {\n return this.path.length >= 2 && this.path.get(this.path.length - 2) === e;\n }\n /** Returns the collection group (i.e. the name of the parent collection) for this key. */\n getCollectionGroup() {\n return this.path.get(this.path.length - 2);\n }\n /** Returns the fully qualified path to the parent collection. */\n getCollectionPath() {\n return this.path.popLast();\n }\n isEqual(e) {\n return null !== e && 0 === ResourcePath.comparator(this.path, e.path);\n }\n toString() {\n return this.path.toString();\n }\n static comparator(e, t) {\n return ResourcePath.comparator(e.path, t.path);\n }\n static isDocumentKey(e) {\n return e.length % 2 == 0;\n }\n /**\n * Creates and returns a new document key with the given segments.\n *\n * @param segments - The segments of the path to the document\n * @returns A new instance of DocumentKey\n */\n static fromSegments(e) {\n return new DocumentKey(new ResourcePath(e.slice()));\n }\n}\n\n/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The initial mutation batch id for each index. Gets updated during index\n * backfill.\n */\n/**\n * An index definition for field indexes in Firestore.\n *\n * Every index is associated with a collection. The definition contains a list\n * of fields and their index kind (which can be `ASCENDING`, `DESCENDING` or\n * `CONTAINS` for ArrayContains/ArrayContainsAny queries).\n *\n * Unlike the backend, the SDK does not differentiate between collection or\n * collection group-scoped indices. Every index can be used for both single\n * collection and collection group queries.\n */\nclass FieldIndex {\n constructor(\n /**\n * The index ID. Returns -1 if the index ID is not available (e.g. the index\n * has not yet been persisted).\n */\n e, /** The collection ID this index applies to. */\n t, /** The field segments for this index. */\n n, /** Shows how up-to-date the index is for the current user. */\n r) {\n this.indexId = e, this.collectionGroup = t, this.fields = n, this.indexState = r;\n }\n}\n\n/** An ID for an index that has not yet been added to persistence. */\n/** Returns the ArrayContains/ArrayContainsAny segment for this index. */\nfunction __PRIVATE_fieldIndexGetArraySegment(e) {\n return e.fields.find(e => 2 /* IndexKind.CONTAINS */ === e.kind);\n}\n\n/** Returns all directional (ascending/descending) segments for this index. */\nfunction __PRIVATE_fieldIndexGetDirectionalSegments(e) {\n return e.fields.filter(e => 2 /* IndexKind.CONTAINS */ !== e.kind);\n}\n\n/**\n * Returns the order of the document key component for the given index.\n *\n * PORTING NOTE: This is only used in the Web IndexedDb implementation.\n */\n/**\n * Compares indexes by collection group and segments. Ignores update time and\n * index ID.\n */\nfunction __PRIVATE_fieldIndexSemanticComparator(e, t) {\n let n = __PRIVATE_primitiveComparator(e.collectionGroup, t.collectionGroup);\n if (0 !== n) return n;\n for (let r = 0; r < Math.min(e.fields.length, t.fields.length); ++r) if (n = __PRIVATE_indexSegmentComparator(e.fields[r], t.fields[r]), 0 !== n) return n;\n return __PRIVATE_primitiveComparator(e.fields.length, t.fields.length);\n}\n\n/** Returns a debug representation of the field index */\nFieldIndex.UNKNOWN_ID = -1;\n\n/** An index component consisting of field path and index type. */\nclass IndexSegment {\n constructor( /** The field path of the component. */\n e, /** The fields sorting order. */\n t) {\n this.fieldPath = e, this.kind = t;\n }\n}\nfunction __PRIVATE_indexSegmentComparator(e, t) {\n const n = FieldPath$1.comparator(e.fieldPath, t.fieldPath);\n return 0 !== n ? n : __PRIVATE_primitiveComparator(e.kind, t.kind);\n}\n\n/**\n * Stores the \"high water mark\" that indicates how updated the Index is for the\n * current user.\n */\nclass IndexState {\n constructor(\n /**\n * Indicates when the index was last updated (relative to other indexes).\n */\n e, /** The the latest indexed read time, document and batch id. */\n t) {\n this.sequenceNumber = e, this.offset = t;\n }\n /** The state of an index that has not yet been backfilled. */\n static empty() {\n return new IndexState(0, IndexOffset.min());\n }\n}\n\n/**\n * Creates an offset that matches all documents with a read time higher than\n * `readTime`.\n */\nfunction __PRIVATE_newIndexOffsetSuccessorFromReadTime(e, t) {\n // We want to create an offset that matches all documents with a read time\n // greater than the provided read time. To do so, we technically need to\n // create an offset for `(readTime, MAX_DOCUMENT_KEY)`. While we could use\n // Unicode codepoints to generate MAX_DOCUMENT_KEY, it is much easier to use\n // `(readTime + 1, DocumentKey.empty())` since `> DocumentKey.empty()` matches\n // all valid document IDs.\n const n = e.toTimestamp().seconds,\n r = e.toTimestamp().nanoseconds + 1,\n i = SnapshotVersion.fromTimestamp(1e9 === r ? new Timestamp(n + 1, 0) : new Timestamp(n, r));\n return new IndexOffset(i, DocumentKey.empty(), t);\n}\n\n/** Creates a new offset based on the provided document. */\nfunction __PRIVATE_newIndexOffsetFromDocument(e) {\n return new IndexOffset(e.readTime, e.key, -1);\n}\n\n/**\n * Stores the latest read time, document and batch ID that were processed for an\n * index.\n */\nclass IndexOffset {\n constructor(\n /**\n * The latest read time version that has been indexed by Firestore for this\n * field index.\n */\n e,\n /**\n * The key of the last document that was indexed for this query. Use\n * `DocumentKey.empty()` if no document has been indexed.\n */\n t,\n /*\n * The largest mutation batch id that's been processed by Firestore.\n */\n n) {\n this.readTime = e, this.documentKey = t, this.largestBatchId = n;\n }\n /** Returns an offset that sorts before all regular offsets. */\n static min() {\n return new IndexOffset(SnapshotVersion.min(), DocumentKey.empty(), -1);\n }\n /** Returns an offset that sorts after all regular offsets. */\n static max() {\n return new IndexOffset(SnapshotVersion.max(), DocumentKey.empty(), -1);\n }\n}\nfunction __PRIVATE_indexOffsetComparator(e, t) {\n let n = e.readTime.compareTo(t.readTime);\n return 0 !== n ? n : (n = DocumentKey.comparator(e.documentKey, t.documentKey), 0 !== n ? n : __PRIVATE_primitiveComparator(e.largestBatchId, t.largestBatchId));\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst v = \"The current tab is not in the required state to perform this operation. It might be necessary to refresh the browser tab.\";\n\n/**\n * A base class representing a persistence transaction, encapsulating both the\n * transaction's sequence numbers as well as a list of onCommitted listeners.\n *\n * When you call Persistence.runTransaction(), it will create a transaction and\n * pass it to your callback. You then pass it to any method that operates\n * on persistence.\n */\nclass PersistenceTransaction {\n constructor() {\n this.onCommittedListeners = [];\n }\n addOnCommittedListener(e) {\n this.onCommittedListeners.push(e);\n }\n raiseOnCommittedEvent() {\n this.onCommittedListeners.forEach(e => e());\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Verifies the error thrown by a LocalStore operation. If a LocalStore\n * operation fails because the primary lease has been taken by another client,\n * we ignore the error (the persistence layer will immediately call\n * `applyPrimaryLease` to propagate the primary state change). All other errors\n * are re-thrown.\n *\n * @param err - An error returned by a LocalStore operation.\n * @returns A Promise that resolves after we recovered, or the original error.\n */\nasync function __PRIVATE_ignoreIfPrimaryLeaseLoss(e) {\n if (e.code !== D.FAILED_PRECONDITION || e.message !== v) throw e;\n __PRIVATE_logDebug(\"LocalStore\", \"Unexpectedly lost primary lease\");\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * PersistencePromise is essentially a re-implementation of Promise except\n * it has a .next() method instead of .then() and .next() and .catch() callbacks\n * are executed synchronously when a PersistencePromise resolves rather than\n * asynchronously (Promise implementations use setImmediate() or similar).\n *\n * This is necessary to interoperate with IndexedDB which will automatically\n * commit transactions if control is returned to the event loop without\n * synchronously initiating another operation on the transaction.\n *\n * NOTE: .then() and .catch() only allow a single consumer, unlike normal\n * Promises.\n */\nclass PersistencePromise {\n constructor(e) {\n // NOTE: next/catchCallback will always point to our own wrapper functions,\n // not the user's raw next() or catch() callbacks.\n this.nextCallback = null, this.catchCallback = null,\n // When the operation resolves, we'll set result or error and mark isDone.\n this.result = void 0, this.error = void 0, this.isDone = !1,\n // Set to true when .then() or .catch() are called and prevents additional\n // chaining.\n this.callbackAttached = !1, e(e => {\n this.isDone = !0, this.result = e, this.nextCallback &&\n // value should be defined unless T is Void, but we can't express\n // that in the type system.\n this.nextCallback(e);\n }, e => {\n this.isDone = !0, this.error = e, this.catchCallback && this.catchCallback(e);\n });\n }\n catch(e) {\n return this.next(void 0, e);\n }\n next(e, t) {\n return this.callbackAttached && fail(), this.callbackAttached = !0, this.isDone ? this.error ? this.wrapFailure(t, this.error) : this.wrapSuccess(e, this.result) : new PersistencePromise((n, r) => {\n this.nextCallback = t => {\n this.wrapSuccess(e, t).next(n, r);\n }, this.catchCallback = e => {\n this.wrapFailure(t, e).next(n, r);\n };\n });\n }\n toPromise() {\n return new Promise((e, t) => {\n this.next(e, t);\n });\n }\n wrapUserFunction(e) {\n try {\n const t = e();\n return t instanceof PersistencePromise ? t : PersistencePromise.resolve(t);\n } catch (e) {\n return PersistencePromise.reject(e);\n }\n }\n wrapSuccess(e, t) {\n return e ? this.wrapUserFunction(() => e(t)) : PersistencePromise.resolve(t);\n }\n wrapFailure(e, t) {\n return e ? this.wrapUserFunction(() => e(t)) : PersistencePromise.reject(t);\n }\n static resolve(e) {\n return new PersistencePromise((t, n) => {\n t(e);\n });\n }\n static reject(e) {\n return new PersistencePromise((t, n) => {\n n(e);\n });\n }\n static waitFor(\n // Accept all Promise types in waitFor().\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n e) {\n return new PersistencePromise((t, n) => {\n let r = 0,\n i = 0,\n s = !1;\n e.forEach(e => {\n ++r, e.next(() => {\n ++i, s && i === r && t();\n }, e => n(e));\n }), s = !0, i === r && t();\n });\n }\n /**\n * Given an array of predicate functions that asynchronously evaluate to a\n * boolean, implements a short-circuiting `or` between the results. Predicates\n * will be evaluated until one of them returns `true`, then stop. The final\n * result will be whether any of them returned `true`.\n */\n static or(e) {\n let t = PersistencePromise.resolve(!1);\n for (const n of e) t = t.next(e => e ? PersistencePromise.resolve(e) : n());\n return t;\n }\n static forEach(e, t) {\n const n = [];\n return e.forEach((e, r) => {\n n.push(t.call(this, e, r));\n }), this.waitFor(n);\n }\n /**\n * Concurrently map all array elements through asynchronous function.\n */\n static mapArray(e, t) {\n return new PersistencePromise((n, r) => {\n const i = e.length,\n s = new Array(i);\n let o = 0;\n for (let _ = 0; _ < i; _++) {\n const a = _;\n t(e[a]).next(e => {\n s[a] = e, ++o, o === i && n(s);\n }, e => r(e));\n }\n });\n }\n /**\n * An alternative to recursive PersistencePromise calls, that avoids\n * potential memory problems from unbounded chains of promises.\n *\n * The `action` will be called repeatedly while `condition` is true.\n */\n static doWhile(e, t) {\n return new PersistencePromise((n, r) => {\n const process = () => {\n !0 === e() ? t().next(() => {\n process();\n }, r) : n();\n };\n process();\n });\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// References to `window` are guarded by SimpleDb.isAvailable()\n/* eslint-disable no-restricted-globals */\n/**\n * Wraps an IDBTransaction and exposes a store() method to get a handle to a\n * specific object store.\n */\nclass __PRIVATE_SimpleDbTransaction {\n constructor(e, t) {\n this.action = e, this.transaction = t, this.aborted = !1,\n /**\n * A `Promise` that resolves with the result of the IndexedDb transaction.\n */\n this.V = new __PRIVATE_Deferred(), this.transaction.oncomplete = () => {\n this.V.resolve();\n }, this.transaction.onabort = () => {\n t.error ? this.V.reject(new __PRIVATE_IndexedDbTransactionError(e, t.error)) : this.V.resolve();\n }, this.transaction.onerror = t => {\n const n = __PRIVATE_checkForAndReportiOSError(t.target.error);\n this.V.reject(new __PRIVATE_IndexedDbTransactionError(e, n));\n };\n }\n static open(e, t, n, r) {\n try {\n return new __PRIVATE_SimpleDbTransaction(t, e.transaction(r, n));\n } catch (e) {\n throw new __PRIVATE_IndexedDbTransactionError(t, e);\n }\n }\n get m() {\n return this.V.promise;\n }\n abort(e) {\n e && this.V.reject(e), this.aborted || (__PRIVATE_logDebug(\"SimpleDb\", \"Aborting transaction:\", e ? e.message : \"Client-initiated abort\"), this.aborted = !0, this.transaction.abort());\n }\n g() {\n // If the browser supports V3 IndexedDB, we invoke commit() explicitly to\n // speed up index DB processing if the event loop remains blocks.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const e = this.transaction;\n this.aborted || \"function\" != typeof e.commit || e.commit();\n }\n /**\n * Returns a SimpleDbStore for the specified store. All\n * operations performed on the SimpleDbStore happen within the context of this\n * transaction and it cannot be used anymore once the transaction is\n * completed.\n *\n * Note that we can't actually enforce that the KeyType and ValueType are\n * correct, but they allow type safety through the rest of the consuming code.\n */\n store(e) {\n const t = this.transaction.objectStore(e);\n return new __PRIVATE_SimpleDbStore(t);\n }\n}\n\n/**\n * Provides a wrapper around IndexedDb with a simplified interface that uses\n * Promise-like return values to chain operations. Real promises cannot be used\n * since .then() continuations are executed asynchronously (e.g. via\n * .setImmediate), which would cause IndexedDB to end the transaction.\n * See PersistencePromise for more details.\n */\nclass __PRIVATE_SimpleDb {\n /*\n * Creates a new SimpleDb wrapper for IndexedDb database `name`.\n *\n * Note that `version` must not be a downgrade. IndexedDB does not support\n * downgrading the schema version. We currently do not support any way to do\n * versioning outside of IndexedDB's versioning mechanism, as only\n * version-upgrade transactions are allowed to do things like create\n * objectstores.\n */\n constructor(e, t, n) {\n this.name = e, this.version = t, this.p = n;\n // NOTE: According to https://bugs.webkit.org/show_bug.cgi?id=197050, the\n // bug we're checking for should exist in iOS >= 12.2 and < 13, but for\n // whatever reason it's much harder to hit after 12.2 so we only proactively\n // log on 12.2.\n 12.2 === __PRIVATE_SimpleDb.S(getUA()) && __PRIVATE_logError(\"Firestore persistence suffers from a bug in iOS 12.2 Safari that may cause your app to stop working. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.\");\n }\n /** Deletes the specified database. */\n static delete(e) {\n return __PRIVATE_logDebug(\"SimpleDb\", \"Removing database:\", e), __PRIVATE_wrapRequest(window.indexedDB.deleteDatabase(e)).toPromise();\n }\n /** Returns true if IndexedDB is available in the current environment. */\n static D() {\n if (!isIndexedDBAvailable()) return !1;\n if (__PRIVATE_SimpleDb.C()) return !0;\n // We extensively use indexed array values and compound keys,\n // which IE and Edge do not support. However, they still have indexedDB\n // defined on the window, so we need to check for them here and make sure\n // to return that persistence is not enabled for those browsers.\n // For tracking support of this feature, see here:\n // https://developer.microsoft.com/en-us/microsoft-edge/platform/status/indexeddbarraysandmultientrysupport/\n // Check the UA string to find out the browser.\n const e = getUA(),\n t = __PRIVATE_SimpleDb.S(e),\n n = 0 < t && t < 10,\n r = __PRIVATE_SimpleDb.v(e),\n i = 0 < r && r < 4.5;\n // IE 10\n // ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)';\n // IE 11\n // ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko';\n // Edge\n // ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML,\n // like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0';\n // iOS Safari: Disable for users running iOS version < 10.\n return !(e.indexOf(\"MSIE \") > 0 || e.indexOf(\"Trident/\") > 0 || e.indexOf(\"Edge/\") > 0 || n || i);\n }\n /**\n * Returns true if the backing IndexedDB store is the Node IndexedDBShim\n * (see https://github.com/axemclion/IndexedDBShim).\n */\n static C() {\n var e;\n return \"undefined\" != typeof process && \"YES\" === (null === (e = process.env) || void 0 === e ? void 0 : e.F);\n }\n /** Helper to get a typed SimpleDbStore from a transaction. */\n static M(e, t) {\n return e.store(t);\n }\n // visible for testing\n /** Parse User Agent to determine iOS version. Returns -1 if not found. */\n static S(e) {\n const t = e.match(/i(?:phone|pad|pod) os ([\\d_]+)/i),\n n = t ? t[1].split(\"_\").slice(0, 2).join(\".\") : \"-1\";\n return Number(n);\n }\n // visible for testing\n /** Parse User Agent to determine Android version. Returns -1 if not found. */\n static v(e) {\n const t = e.match(/Android ([\\d.]+)/i),\n n = t ? t[1].split(\".\").slice(0, 2).join(\".\") : \"-1\";\n return Number(n);\n }\n /**\n * Opens the specified database, creating or upgrading it if necessary.\n */\n async O(e) {\n return this.db || (__PRIVATE_logDebug(\"SimpleDb\", \"Opening database:\", this.name), this.db = await new Promise((t, n) => {\n // TODO(mikelehen): Investigate browser compatibility.\n // https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB\n // suggests IE9 and older WebKit browsers handle upgrade\n // differently. They expect setVersion, as described here:\n // https://developer.mozilla.org/en-US/docs/Web/API/IDBVersionChangeRequest/setVersion\n const r = indexedDB.open(this.name, this.version);\n r.onsuccess = e => {\n const n = e.target.result;\n t(n);\n }, r.onblocked = () => {\n n(new __PRIVATE_IndexedDbTransactionError(e, \"Cannot upgrade IndexedDB schema while another tab is open. Close all tabs that access Firestore and reload this page to proceed.\"));\n }, r.onerror = t => {\n const r = t.target.error;\n \"VersionError\" === r.name ? n(new FirestoreError(D.FAILED_PRECONDITION, \"A newer version of the Firestore SDK was previously used and so the persisted data is not compatible with the version of the SDK you are now using. The SDK will operate with persistence disabled. If you need persistence, please re-upgrade to a newer version of the SDK or else clear the persisted IndexedDB data for your app to start fresh.\")) : \"InvalidStateError\" === r.name ? n(new FirestoreError(D.FAILED_PRECONDITION, \"Unable to open an IndexedDB connection. This could be due to running in a private browsing session on a browser whose private browsing sessions do not support IndexedDB: \" + r)) : n(new __PRIVATE_IndexedDbTransactionError(e, r));\n }, r.onupgradeneeded = e => {\n __PRIVATE_logDebug(\"SimpleDb\", 'Database \"' + this.name + '\" requires upgrade from version:', e.oldVersion);\n const t = e.target.result;\n this.p.N(t, r.transaction, e.oldVersion, this.version).next(() => {\n __PRIVATE_logDebug(\"SimpleDb\", \"Database upgrade to version \" + this.version + \" complete\");\n });\n };\n })), this.B && (this.db.onversionchange = e => this.B(e)), this.db;\n }\n L(e) {\n this.B = e, this.db && (this.db.onversionchange = t => e(t));\n }\n async runTransaction(e, t, n, r) {\n const i = \"readonly\" === t;\n let s = 0;\n for (;;) {\n ++s;\n try {\n this.db = await this.O(e);\n const t = __PRIVATE_SimpleDbTransaction.open(this.db, e, i ? \"readonly\" : \"readwrite\", n),\n s = r(t).next(e => (t.g(), e)).catch(e => (\n // Abort the transaction if there was an error.\n t.abort(e), PersistencePromise.reject(e))).toPromise();\n // As noted above, errors are propagated by aborting the transaction. So\n // we swallow any error here to avoid the browser logging it as unhandled.\n return s.catch(() => {}),\n // Wait for the transaction to complete (i.e. IndexedDb's onsuccess event to\n // fire), but still return the original transactionFnResult back to the\n // caller.\n await t.m, s;\n } catch (e) {\n const t = e,\n n = \"FirebaseError\" !== t.name && s < 3;\n // TODO(schmidt-sebastian): We could probably be smarter about this and\n // not retry exceptions that are likely unrecoverable (such as quota\n // exceeded errors).\n // Note: We cannot use an instanceof check for FirestoreException, since the\n // exception is wrapped in a generic error by our async/await handling.\n if (__PRIVATE_logDebug(\"SimpleDb\", \"Transaction failed with error:\", t.message, \"Retrying:\", n), this.close(), !n) return Promise.reject(t);\n }\n }\n }\n close() {\n this.db && this.db.close(), this.db = void 0;\n }\n}\n\n/**\n * A controller for iterating over a key range or index. It allows an iterate\n * callback to delete the currently-referenced object, or jump to a new key\n * within the key range or index.\n */\nclass __PRIVATE_IterationController {\n constructor(e) {\n this.k = e, this.q = !1, this.K = null;\n }\n get isDone() {\n return this.q;\n }\n get $() {\n return this.K;\n }\n set cursor(e) {\n this.k = e;\n }\n /**\n * This function can be called to stop iteration at any point.\n */\n done() {\n this.q = !0;\n }\n /**\n * This function can be called to skip to that next key, which could be\n * an index or a primary key.\n */\n U(e) {\n this.K = e;\n }\n /**\n * Delete the current cursor value from the object store.\n *\n * NOTE: You CANNOT do this with a keysOnly query.\n */\n delete() {\n return __PRIVATE_wrapRequest(this.k.delete());\n }\n}\n\n/** An error that wraps exceptions that thrown during IndexedDB execution. */\nclass __PRIVATE_IndexedDbTransactionError extends FirestoreError {\n constructor(e, t) {\n super(D.UNAVAILABLE, `IndexedDB transaction '${e}' failed: ${t}`), this.name = \"IndexedDbTransactionError\";\n }\n}\n\n/** Verifies whether `e` is an IndexedDbTransactionError. */\nfunction __PRIVATE_isIndexedDbTransactionError(e) {\n // Use name equality, as instanceof checks on errors don't work with errors\n // that wrap other errors.\n return \"IndexedDbTransactionError\" === e.name;\n}\n\n/**\n * A wrapper around an IDBObjectStore providing an API that:\n *\n * 1) Has generic KeyType / ValueType parameters to provide strongly-typed\n * methods for acting against the object store.\n * 2) Deals with IndexedDB's onsuccess / onerror event callbacks, making every\n * method return a PersistencePromise instead.\n * 3) Provides a higher-level API to avoid needing to do excessive wrapping of\n * intermediate IndexedDB types (IDBCursorWithValue, etc.)\n */\nclass __PRIVATE_SimpleDbStore {\n constructor(e) {\n this.store = e;\n }\n put(e, t) {\n let n;\n return void 0 !== t ? (__PRIVATE_logDebug(\"SimpleDb\", \"PUT\", this.store.name, e, t), n = this.store.put(t, e)) : (__PRIVATE_logDebug(\"SimpleDb\", \"PUT\", this.store.name, \"\", e), n = this.store.put(e)), __PRIVATE_wrapRequest(n);\n }\n /**\n * Adds a new value into an Object Store and returns the new key. Similar to\n * IndexedDb's `add()`, this method will fail on primary key collisions.\n *\n * @param value - The object to write.\n * @returns The key of the value to add.\n */\n add(e) {\n __PRIVATE_logDebug(\"SimpleDb\", \"ADD\", this.store.name, e, e);\n return __PRIVATE_wrapRequest(this.store.add(e));\n }\n /**\n * Gets the object with the specified key from the specified store, or null\n * if no object exists with the specified key.\n *\n * @key The key of the object to get.\n * @returns The object with the specified key or null if no object exists.\n */\n get(e) {\n // We're doing an unsafe cast to ValueType.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return __PRIVATE_wrapRequest(this.store.get(e)).next(t => (\n // Normalize nonexistence to null.\n void 0 === t && (t = null), __PRIVATE_logDebug(\"SimpleDb\", \"GET\", this.store.name, e, t), t));\n }\n delete(e) {\n __PRIVATE_logDebug(\"SimpleDb\", \"DELETE\", this.store.name, e);\n return __PRIVATE_wrapRequest(this.store.delete(e));\n }\n /**\n * If we ever need more of the count variants, we can add overloads. For now,\n * all we need is to count everything in a store.\n *\n * Returns the number of rows in the store.\n */\n count() {\n __PRIVATE_logDebug(\"SimpleDb\", \"COUNT\", this.store.name);\n return __PRIVATE_wrapRequest(this.store.count());\n }\n W(e, t) {\n const n = this.options(e, t);\n // Use `getAll()` if the browser supports IndexedDB v3, as it is roughly\n // 20% faster. Unfortunately, getAll() does not support custom indices.\n if (n.index || \"function\" != typeof this.store.getAll) {\n const e = this.cursor(n),\n t = [];\n return this.G(e, (e, n) => {\n t.push(n);\n }).next(() => t);\n }\n {\n const e = this.store.getAll(n.range);\n return new PersistencePromise((t, n) => {\n e.onerror = e => {\n n(e.target.error);\n }, e.onsuccess = e => {\n t(e.target.result);\n };\n });\n }\n }\n /**\n * Loads the first `count` elements from the provided index range. Loads all\n * elements if no limit is provided.\n */\n j(e, t) {\n const n = this.store.getAll(e, null === t ? void 0 : t);\n return new PersistencePromise((e, t) => {\n n.onerror = e => {\n t(e.target.error);\n }, n.onsuccess = t => {\n e(t.target.result);\n };\n });\n }\n H(e, t) {\n __PRIVATE_logDebug(\"SimpleDb\", \"DELETE ALL\", this.store.name);\n const n = this.options(e, t);\n n.J = !1;\n const r = this.cursor(n);\n return this.G(r, (e, t, n) => n.delete());\n }\n Y(e, t) {\n let n;\n t ? n = e : (n = {}, t = e);\n const r = this.cursor(n);\n return this.G(r, t);\n }\n /**\n * Iterates over a store, but waits for the given callback to complete for\n * each entry before iterating the next entry. This allows the callback to do\n * asynchronous work to determine if this iteration should continue.\n *\n * The provided callback should return `true` to continue iteration, and\n * `false` otherwise.\n */\n Z(e) {\n const t = this.cursor({});\n return new PersistencePromise((n, r) => {\n t.onerror = e => {\n const t = __PRIVATE_checkForAndReportiOSError(e.target.error);\n r(t);\n }, t.onsuccess = t => {\n const r = t.target.result;\n r ? e(r.primaryKey, r.value).next(e => {\n e ? r.continue() : n();\n }) : n();\n };\n });\n }\n G(e, t) {\n const n = [];\n return new PersistencePromise((r, i) => {\n e.onerror = e => {\n i(e.target.error);\n }, e.onsuccess = e => {\n const i = e.target.result;\n if (!i) return void r();\n const s = new __PRIVATE_IterationController(i),\n o = t(i.primaryKey, i.value, s);\n if (o instanceof PersistencePromise) {\n const e = o.catch(e => (s.done(), PersistencePromise.reject(e)));\n n.push(e);\n }\n s.isDone ? r() : null === s.$ ? i.continue() : i.continue(s.$);\n };\n }).next(() => PersistencePromise.waitFor(n));\n }\n options(e, t) {\n let n;\n return void 0 !== e && (\"string\" == typeof e ? n = e : t = e), {\n index: n,\n range: t\n };\n }\n cursor(e) {\n let t = \"next\";\n if (e.reverse && (t = \"prev\"), e.index) {\n const n = this.store.index(e.index);\n return e.J ? n.openKeyCursor(e.range, t) : n.openCursor(e.range, t);\n }\n return this.store.openCursor(e.range, t);\n }\n}\n\n/**\n * Wraps an IDBRequest in a PersistencePromise, using the onsuccess / onerror\n * handlers to resolve / reject the PersistencePromise as appropriate.\n */\nfunction __PRIVATE_wrapRequest(e) {\n return new PersistencePromise((t, n) => {\n e.onsuccess = e => {\n const n = e.target.result;\n t(n);\n }, e.onerror = e => {\n const t = __PRIVATE_checkForAndReportiOSError(e.target.error);\n n(t);\n };\n });\n}\n\n// Guard so we only report the error once.\nlet F = !1;\nfunction __PRIVATE_checkForAndReportiOSError(e) {\n const t = __PRIVATE_SimpleDb.S(getUA());\n if (t >= 12.2 && t < 13) {\n const t = \"An internal error was encountered in the Indexed Database server\";\n if (e.message.indexOf(t) >= 0) {\n // Wrap error in a more descriptive one.\n const e = new FirestoreError(\"internal\", `IOS_INDEXEDDB_BUG1: IndexedDb has thrown '${t}'. This is likely due to an unavoidable bug in iOS. See https://stackoverflow.com/q/56496296/110915 for details and a potential workaround.`);\n return F || (F = !0,\n // Throw a global exception outside of this promise chain, for the user to\n // potentially catch.\n setTimeout(() => {\n throw e;\n }, 0)), e;\n }\n }\n return e;\n}\n\n/** This class is responsible for the scheduling of Index Backfiller. */\nclass __PRIVATE_IndexBackfillerScheduler {\n constructor(e, t) {\n this.asyncQueue = e, this.X = t, this.task = null;\n }\n start() {\n this.ee(15e3);\n }\n stop() {\n this.task && (this.task.cancel(), this.task = null);\n }\n get started() {\n return null !== this.task;\n }\n ee(e) {\n __PRIVATE_logDebug(\"IndexBackiller\", `Scheduled in ${e}ms`), this.task = this.asyncQueue.enqueueAfterDelay(\"index_backfill\" /* TimerId.IndexBackfill */, e, async () => {\n this.task = null;\n try {\n __PRIVATE_logDebug(\"IndexBackiller\", `Documents written: ${await this.X.te()}`);\n } catch (e) {\n __PRIVATE_isIndexedDbTransactionError(e) ? __PRIVATE_logDebug(\"IndexBackiller\", \"Ignoring IndexedDB error during index backfill: \", e) : await __PRIVATE_ignoreIfPrimaryLeaseLoss(e);\n }\n await this.ee(6e4);\n });\n }\n}\n\n/** Implements the steps for backfilling indexes. */\nclass __PRIVATE_IndexBackfiller {\n constructor(\n /**\n * LocalStore provides access to IndexManager and LocalDocumentView.\n * These properties will update when the user changes. Consequently,\n * making a local copy of IndexManager and LocalDocumentView will require\n * updates over time. The simpler solution is to rely on LocalStore to have\n * an up-to-date references to IndexManager and LocalDocumentStore.\n */\n e, t) {\n this.localStore = e, this.persistence = t;\n }\n async te(e = 50) {\n return this.persistence.runTransaction(\"Backfill Indexes\", \"readwrite-primary\", t => this.ne(t, e));\n }\n /** Writes index entries until the cap is reached. Returns the number of documents processed. */\n ne(e, t) {\n const n = new Set();\n let r = t,\n i = !0;\n return PersistencePromise.doWhile(() => !0 === i && r > 0, () => this.localStore.indexManager.getNextCollectionGroupToUpdate(e).next(t => {\n if (null !== t && !n.has(t)) return __PRIVATE_logDebug(\"IndexBackiller\", `Processing collection: ${t}`), this.re(e, t, r).next(e => {\n r -= e, n.add(t);\n });\n i = !1;\n })).next(() => t - r);\n }\n /**\n * Writes entries for the provided collection group. Returns the number of documents processed.\n */\n re(e, t, n) {\n // Use the earliest offset of all field indexes to query the local cache.\n return this.localStore.indexManager.getMinOffsetFromCollectionGroup(e, t).next(r => this.localStore.localDocuments.getNextDocuments(e, t, r, n).next(n => {\n const i = n.changes;\n return this.localStore.indexManager.updateIndexEntries(e, i).next(() => this.ie(r, n)).next(n => (__PRIVATE_logDebug(\"IndexBackiller\", `Updating offset: ${n}`), this.localStore.indexManager.updateCollectionGroup(e, t, n))).next(() => i.size);\n }));\n }\n /** Returns the next offset based on the provided documents. */\n ie(e, t) {\n let n = e;\n return t.changes.forEach((e, t) => {\n const r = __PRIVATE_newIndexOffsetFromDocument(t);\n __PRIVATE_indexOffsetComparator(r, n) > 0 && (n = r);\n }), new IndexOffset(n.readTime, n.documentKey, Math.max(t.batchId, e.largestBatchId));\n }\n}\n\n/**\n * @license\n * Copyright 2018 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * `ListenSequence` is a monotonic sequence. It is initialized with a minimum value to\n * exceed. All subsequent calls to next will return increasing values. If provided with a\n * `SequenceNumberSyncer`, it will additionally bump its next value when told of a new value, as\n * well as write out sequence numbers that it produces via `next()`.\n */\nlet __PRIVATE_ListenSequence = /*#__PURE__*/(() => {\n class __PRIVATE_ListenSequence {\n constructor(e, t) {\n this.previousValue = e, t && (t.sequenceNumberHandler = e => this.se(e), this.oe = e => t.writeSequenceNumber(e));\n }\n se(e) {\n return this.previousValue = Math.max(e, this.previousValue), this.previousValue;\n }\n next() {\n const e = ++this.previousValue;\n return this.oe && this.oe(e), e;\n }\n }\n __PRIVATE_ListenSequence._e = -1;\n\n /**\n * Returns whether a variable is either undefined or null.\n */\n return __PRIVATE_ListenSequence;\n})();\nfunction __PRIVATE_isNullOrUndefined(e) {\n return null == e;\n}\n\n/** Returns whether the value represents -0. */\nfunction __PRIVATE_isNegativeZero(e) {\n // Detect if the value is -0.0. Based on polyfill from\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n return 0 === e && 1 / e == -1 / 0;\n}\n\n/**\n * Returns whether a value is an integer and in the safe integer range\n * @param value - The value to test for being an integer and in the safe range\n */\nfunction isSafeInteger(e) {\n return \"number\" == typeof e && Number.isInteger(e) && !__PRIVATE_isNegativeZero(e) && e <= Number.MAX_SAFE_INTEGER && e >= Number.MIN_SAFE_INTEGER;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Encodes a resource path into a IndexedDb-compatible string form.\n */\nfunction __PRIVATE_encodeResourcePath(e) {\n let t = \"\";\n for (let n = 0; n < e.length; n++) t.length > 0 && (t = __PRIVATE_encodeSeparator(t)), t = __PRIVATE_encodeSegment(e.get(n), t);\n return __PRIVATE_encodeSeparator(t);\n}\n\n/** Encodes a single segment of a resource path into the given result */\nfunction __PRIVATE_encodeSegment(e, t) {\n let n = t;\n const r = e.length;\n for (let t = 0; t < r; t++) {\n const r = e.charAt(t);\n switch (r) {\n case \"\\0\":\n n += \"\u0001\u0010\";\n break;\n case \"\u0001\":\n n += \"\u0001\u0011\";\n break;\n default:\n n += r;\n }\n }\n return n;\n}\n\n/** Encodes a path separator into the given result */\nfunction __PRIVATE_encodeSeparator(e) {\n return e + \"\u0001\u0001\";\n}\n\n/**\n * Decodes the given IndexedDb-compatible string form of a resource path into\n * a ResourcePath instance. Note that this method is not suitable for use with\n * decoding resource names from the server; those are One Platform format\n * strings.\n */\nfunction __PRIVATE_decodeResourcePath(e) {\n // Event the empty path must encode as a path of at least length 2. A path\n // with exactly 2 must be the empty path.\n const t = e.length;\n if (__PRIVATE_hardAssert(t >= 2), 2 === t) return __PRIVATE_hardAssert(\"\u0001\" === e.charAt(0) && \"\u0001\" === e.charAt(1)), ResourcePath.emptyPath();\n // Escape characters cannot exist past the second-to-last position in the\n // source value.\n const __PRIVATE_lastReasonableEscapeIndex = t - 2,\n n = [];\n let r = \"\";\n for (let i = 0; i < t;) {\n // The last two characters of a valid encoded path must be a separator, so\n // there must be an end to this segment.\n const t = e.indexOf(\"\u0001\", i);\n (t < 0 || t > __PRIVATE_lastReasonableEscapeIndex) && fail();\n switch (e.charAt(t + 1)) {\n case \"\u0001\":\n const s = e.substring(i, t);\n let o;\n 0 === r.length ?\n // Avoid copying for the common case of a segment that excludes \\0\n // and \\001\n o = s : (r += s, o = r, r = \"\"), n.push(o);\n break;\n case \"\u0010\":\n r += e.substring(i, t), r += \"\\0\";\n break;\n case \"\u0011\":\n // The escape character can be used in the output to encode itself.\n r += e.substring(i, t + 1);\n break;\n default:\n fail();\n }\n i = t + 2;\n }\n return new ResourcePath(n);\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst M = [\"userId\", \"batchId\"];\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Name of the IndexedDb object store.\n *\n * Note that the name 'owner' is chosen to ensure backwards compatibility with\n * older clients that only supported single locked access to the persistence\n * layer.\n */\n/**\n * Creates a [userId, encodedPath] key for use in the DbDocumentMutations\n * index to iterate over all at document mutations for a given path or lower.\n */\nfunction __PRIVATE_newDbDocumentMutationPrefixForPath(e, t) {\n return [e, __PRIVATE_encodeResourcePath(t)];\n}\n\n/**\n * Creates a full index key of [userId, encodedPath, batchId] for inserting\n * and deleting into the DbDocumentMutations index.\n */\nfunction __PRIVATE_newDbDocumentMutationKey(e, t, n) {\n return [e, __PRIVATE_encodeResourcePath(t), n];\n}\n\n/**\n * Because we store all the useful information for this store in the key,\n * there is no useful information to store as the value. The raw (unencoded)\n * path cannot be stored because IndexedDb doesn't store prototype\n * information.\n */\nconst x = {},\n O = [\"prefixPath\", \"collectionGroup\", \"readTime\", \"documentId\"],\n N = [\"prefixPath\", \"collectionGroup\", \"documentId\"],\n B = [\"collectionGroup\", \"readTime\", \"prefixPath\", \"documentId\"],\n L = [\"canonicalId\", \"targetId\"],\n k = [\"targetId\", \"path\"],\n q = [\"path\", \"targetId\"],\n Q = [\"collectionId\", \"parent\"],\n K = [\"indexId\", \"uid\"],\n $ = [\"uid\", \"sequenceNumber\"],\n U = [\"indexId\", \"uid\", \"arrayValue\", \"directionalValue\", \"orderedDocumentKey\", \"documentKey\"],\n W = [\"indexId\", \"uid\", \"orderedDocumentKey\"],\n G = [\"userId\", \"collectionPath\", \"documentId\"],\n z = [\"userId\", \"collectionPath\", \"largestBatchId\"],\n j = [\"userId\", \"collectionGroup\", \"largestBatchId\"],\n H = [...[...[...[...[\"mutationQueues\", \"mutations\", \"documentMutations\", \"remoteDocuments\", \"targets\", \"owner\", \"targetGlobal\", \"targetDocuments\"], \"clientMetadata\"], \"remoteDocumentGlobal\"], \"collectionParents\"], \"bundles\", \"namedQueries\"],\n J = [...H, \"documentOverlays\"],\n Y = [\"mutationQueues\", \"mutations\", \"documentMutations\", \"remoteDocumentsV14\", \"targets\", \"owner\", \"targetGlobal\", \"targetDocuments\", \"clientMetadata\", \"remoteDocumentGlobal\", \"collectionParents\", \"bundles\", \"namedQueries\", \"documentOverlays\"],\n Z = Y,\n X = [...Z, \"indexConfiguration\", \"indexState\", \"indexEntries\"];\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass __PRIVATE_IndexedDbTransaction extends PersistenceTransaction {\n constructor(e, t) {\n super(), this.ae = e, this.currentSequenceNumber = t;\n }\n}\nfunction __PRIVATE_getStore(e, t) {\n const n = __PRIVATE_debugCast(e);\n return __PRIVATE_SimpleDb.M(n.ae, t);\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction __PRIVATE_objectSize(e) {\n let t = 0;\n for (const n in e) Object.prototype.hasOwnProperty.call(e, n) && t++;\n return t;\n}\nfunction forEach(e, t) {\n for (const n in e) Object.prototype.hasOwnProperty.call(e, n) && t(n, e[n]);\n}\nfunction isEmpty(e) {\n for (const t in e) if (Object.prototype.hasOwnProperty.call(e, t)) return !1;\n return !0;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// An immutable sorted map implementation, based on a Left-leaning Red-Black\n// tree.\nclass SortedMap {\n constructor(e, t) {\n this.comparator = e, this.root = t || LLRBNode.EMPTY;\n }\n // Returns a copy of the map, with the specified key/value added or replaced.\n insert(e, t) {\n return new SortedMap(this.comparator, this.root.insert(e, t, this.comparator).copy(null, null, LLRBNode.BLACK, null, null));\n }\n // Returns a copy of the map, with the specified key removed.\n remove(e) {\n return new SortedMap(this.comparator, this.root.remove(e, this.comparator).copy(null, null, LLRBNode.BLACK, null, null));\n }\n // Returns the value of the node with the given key, or null.\n get(e) {\n let t = this.root;\n for (; !t.isEmpty();) {\n const n = this.comparator(e, t.key);\n if (0 === n) return t.value;\n n < 0 ? t = t.left : n > 0 && (t = t.right);\n }\n return null;\n }\n // Returns the index of the element in this sorted map, or -1 if it doesn't\n // exist.\n indexOf(e) {\n // Number of nodes that were pruned when descending right\n let t = 0,\n n = this.root;\n for (; !n.isEmpty();) {\n const r = this.comparator(e, n.key);\n if (0 === r) return t + n.left.size;\n r < 0 ? n = n.left : (\n // Count all nodes left of the node plus the node itself\n t += n.left.size + 1, n = n.right);\n }\n // Node not found\n return -1;\n }\n isEmpty() {\n return this.root.isEmpty();\n }\n // Returns the total number of nodes in the map.\n get size() {\n return this.root.size;\n }\n // Returns the minimum key in the map.\n minKey() {\n return this.root.minKey();\n }\n // Returns the maximum key in the map.\n maxKey() {\n return this.root.maxKey();\n }\n // Traverses the map in key order and calls the specified action function\n // for each key/value pair. If action returns true, traversal is aborted.\n // Returns the first truthy value returned by action, or the last falsey\n // value returned by action.\n inorderTraversal(e) {\n return this.root.inorderTraversal(e);\n }\n forEach(e) {\n this.inorderTraversal((t, n) => (e(t, n), !1));\n }\n toString() {\n const e = [];\n return this.inorderTraversal((t, n) => (e.push(`${t}:${n}`), !1)), `{${e.join(\", \")}}`;\n }\n // Traverses the map in reverse key order and calls the specified action\n // function for each key/value pair. If action returns true, traversal is\n // aborted.\n // Returns the first truthy value returned by action, or the last falsey\n // value returned by action.\n reverseTraversal(e) {\n return this.root.reverseTraversal(e);\n }\n // Returns an iterator over the SortedMap.\n getIterator() {\n return new SortedMapIterator(this.root, null, this.comparator, !1);\n }\n getIteratorFrom(e) {\n return new SortedMapIterator(this.root, e, this.comparator, !1);\n }\n getReverseIterator() {\n return new SortedMapIterator(this.root, null, this.comparator, !0);\n }\n getReverseIteratorFrom(e) {\n return new SortedMapIterator(this.root, e, this.comparator, !0);\n }\n}\n\n// end SortedMap\n// An iterator over an LLRBNode.\nclass SortedMapIterator {\n constructor(e, t, n, r) {\n this.isReverse = r, this.nodeStack = [];\n let i = 1;\n for (; !e.isEmpty();) if (i = t ? n(e.key, t) : 1,\n // flip the comparison if we're going in reverse\n t && r && (i *= -1), i < 0)\n // This node is less than our start key. ignore it\n e = this.isReverse ? e.left : e.right;else {\n if (0 === i) {\n // This node is exactly equal to our start key. Push it on the stack,\n // but stop iterating;\n this.nodeStack.push(e);\n break;\n }\n // This node is greater than our start key, add it to the stack and move\n // to the next one\n this.nodeStack.push(e), e = this.isReverse ? e.right : e.left;\n }\n }\n getNext() {\n let e = this.nodeStack.pop();\n const t = {\n key: e.key,\n value: e.value\n };\n if (this.isReverse) for (e = e.left; !e.isEmpty();) this.nodeStack.push(e), e = e.right;else for (e = e.right; !e.isEmpty();) this.nodeStack.push(e), e = e.left;\n return t;\n }\n hasNext() {\n return this.nodeStack.length > 0;\n }\n peek() {\n if (0 === this.nodeStack.length) return null;\n const e = this.nodeStack[this.nodeStack.length - 1];\n return {\n key: e.key,\n value: e.value\n };\n }\n}\n\n// end SortedMapIterator\n// Represents a node in a Left-leaning Red-Black tree.\nclass LLRBNode {\n constructor(e, t, n, r, i) {\n this.key = e, this.value = t, this.color = null != n ? n : LLRBNode.RED, this.left = null != r ? r : LLRBNode.EMPTY, this.right = null != i ? i : LLRBNode.EMPTY, this.size = this.left.size + 1 + this.right.size;\n }\n // Returns a copy of the current node, optionally replacing pieces of it.\n copy(e, t, n, r, i) {\n return new LLRBNode(null != e ? e : this.key, null != t ? t : this.value, null != n ? n : this.color, null != r ? r : this.left, null != i ? i : this.right);\n }\n isEmpty() {\n return !1;\n }\n // Traverses the tree in key order and calls the specified action function\n // for each node. If action returns true, traversal is aborted.\n // Returns the first truthy value returned by action, or the last falsey\n // value returned by action.\n inorderTraversal(e) {\n return this.left.inorderTraversal(e) || e(this.key, this.value) || this.right.inorderTraversal(e);\n }\n // Traverses the tree in reverse key order and calls the specified action\n // function for each node. If action returns true, traversal is aborted.\n // Returns the first truthy value returned by action, or the last falsey\n // value returned by action.\n reverseTraversal(e) {\n return this.right.reverseTraversal(e) || e(this.key, this.value) || this.left.reverseTraversal(e);\n }\n // Returns the minimum node in the tree.\n min() {\n return this.left.isEmpty() ? this : this.left.min();\n }\n // Returns the maximum key in the tree.\n minKey() {\n return this.min().key;\n }\n // Returns the maximum key in the tree.\n maxKey() {\n return this.right.isEmpty() ? this.key : this.right.maxKey();\n }\n // Returns new tree, with the key/value added.\n insert(e, t, n) {\n let r = this;\n const i = n(e, r.key);\n return r = i < 0 ? r.copy(null, null, null, r.left.insert(e, t, n), null) : 0 === i ? r.copy(null, t, null, null, null) : r.copy(null, null, null, null, r.right.insert(e, t, n)), r.fixUp();\n }\n removeMin() {\n if (this.left.isEmpty()) return LLRBNode.EMPTY;\n let e = this;\n return e.left.isRed() || e.left.left.isRed() || (e = e.moveRedLeft()), e = e.copy(null, null, null, e.left.removeMin(), null), e.fixUp();\n }\n // Returns new tree, with the specified item removed.\n remove(e, t) {\n let n,\n r = this;\n if (t(e, r.key) < 0) r.left.isEmpty() || r.left.isRed() || r.left.left.isRed() || (r = r.moveRedLeft()), r = r.copy(null, null, null, r.left.remove(e, t), null);else {\n if (r.left.isRed() && (r = r.rotateRight()), r.right.isEmpty() || r.right.isRed() || r.right.left.isRed() || (r = r.moveRedRight()), 0 === t(e, r.key)) {\n if (r.right.isEmpty()) return LLRBNode.EMPTY;\n n = r.right.min(), r = r.copy(n.key, n.value, null, null, r.right.removeMin());\n }\n r = r.copy(null, null, null, null, r.right.remove(e, t));\n }\n return r.fixUp();\n }\n isRed() {\n return this.color;\n }\n // Returns new tree after performing any needed rotations.\n fixUp() {\n let e = this;\n return e.right.isRed() && !e.left.isRed() && (e = e.rotateLeft()), e.left.isRed() && e.left.left.isRed() && (e = e.rotateRight()), e.left.isRed() && e.right.isRed() && (e = e.colorFlip()), e;\n }\n moveRedLeft() {\n let e = this.colorFlip();\n return e.right.left.isRed() && (e = e.copy(null, null, null, null, e.right.rotateRight()), e = e.rotateLeft(), e = e.colorFlip()), e;\n }\n moveRedRight() {\n let e = this.colorFlip();\n return e.left.left.isRed() && (e = e.rotateRight(), e = e.colorFlip()), e;\n }\n rotateLeft() {\n const e = this.copy(null, null, LLRBNode.RED, null, this.right.left);\n return this.right.copy(null, null, this.color, e, null);\n }\n rotateRight() {\n const e = this.copy(null, null, LLRBNode.RED, this.left.right, null);\n return this.left.copy(null, null, this.color, null, e);\n }\n colorFlip() {\n const e = this.left.copy(null, null, !this.left.color, null, null),\n t = this.right.copy(null, null, !this.right.color, null, null);\n return this.copy(null, null, !this.color, e, t);\n }\n // For testing.\n checkMaxDepth() {\n const e = this.check();\n return Math.pow(2, e) <= this.size + 1;\n }\n // In a balanced RB tree, the black-depth (number of black nodes) from root to\n // leaves is equal on both sides. This function verifies that or asserts.\n check() {\n if (this.isRed() && this.left.isRed()) throw fail();\n if (this.right.isRed()) throw fail();\n const e = this.left.check();\n if (e !== this.right.check()) throw fail();\n return e + (this.isRed() ? 0 : 1);\n }\n}\n\n// end LLRBNode\n// Empty node is shared between all LLRB trees.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nLLRBNode.EMPTY = null, LLRBNode.RED = !0, LLRBNode.BLACK = !1;\n\n// end LLRBEmptyNode\nLLRBNode.EMPTY = new\n// Represents an empty node (a leaf node in the Red-Black Tree).\nclass LLRBEmptyNode {\n constructor() {\n this.size = 0;\n }\n get key() {\n throw fail();\n }\n get value() {\n throw fail();\n }\n get color() {\n throw fail();\n }\n get left() {\n throw fail();\n }\n get right() {\n throw fail();\n }\n // Returns a copy of the current node.\n copy(e, t, n, r, i) {\n return this;\n }\n // Returns a copy of the tree, with the specified key/value added.\n insert(e, t, n) {\n return new LLRBNode(e, t);\n }\n // Returns a copy of the tree, with the specified key removed.\n remove(e, t) {\n return this;\n }\n isEmpty() {\n return !0;\n }\n inorderTraversal(e) {\n return !1;\n }\n reverseTraversal(e) {\n return !1;\n }\n minKey() {\n return null;\n }\n maxKey() {\n return null;\n }\n isRed() {\n return !1;\n }\n // For testing.\n checkMaxDepth() {\n return !0;\n }\n check() {\n return 0;\n }\n}();\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * SortedSet is an immutable (copy-on-write) collection that holds elements\n * in order specified by the provided comparator.\n *\n * NOTE: if provided comparator returns 0 for two elements, we consider them to\n * be equal!\n */\nclass SortedSet {\n constructor(e) {\n this.comparator = e, this.data = new SortedMap(this.comparator);\n }\n has(e) {\n return null !== this.data.get(e);\n }\n first() {\n return this.data.minKey();\n }\n last() {\n return this.data.maxKey();\n }\n get size() {\n return this.data.size;\n }\n indexOf(e) {\n return this.data.indexOf(e);\n }\n /** Iterates elements in order defined by \"comparator\" */\n forEach(e) {\n this.data.inorderTraversal((t, n) => (e(t), !1));\n }\n /** Iterates over `elem`s such that: range[0] <= elem < range[1]. */\n forEachInRange(e, t) {\n const n = this.data.getIteratorFrom(e[0]);\n for (; n.hasNext();) {\n const r = n.getNext();\n if (this.comparator(r.key, e[1]) >= 0) return;\n t(r.key);\n }\n }\n /**\n * Iterates over `elem`s such that: start <= elem until false is returned.\n */\n forEachWhile(e, t) {\n let n;\n for (n = void 0 !== t ? this.data.getIteratorFrom(t) : this.data.getIterator(); n.hasNext();) {\n if (!e(n.getNext().key)) return;\n }\n }\n /** Finds the least element greater than or equal to `elem`. */\n firstAfterOrEqual(e) {\n const t = this.data.getIteratorFrom(e);\n return t.hasNext() ? t.getNext().key : null;\n }\n getIterator() {\n return new SortedSetIterator(this.data.getIterator());\n }\n getIteratorFrom(e) {\n return new SortedSetIterator(this.data.getIteratorFrom(e));\n }\n /** Inserts or updates an element */\n add(e) {\n return this.copy(this.data.remove(e).insert(e, !0));\n }\n /** Deletes an element */\n delete(e) {\n return this.has(e) ? this.copy(this.data.remove(e)) : this;\n }\n isEmpty() {\n return this.data.isEmpty();\n }\n unionWith(e) {\n let t = this;\n // Make sure `result` always refers to the larger one of the two sets.\n return t.size < e.size && (t = e, e = this), e.forEach(e => {\n t = t.add(e);\n }), t;\n }\n isEqual(e) {\n if (!(e instanceof SortedSet)) return !1;\n if (this.size !== e.size) return !1;\n const t = this.data.getIterator(),\n n = e.data.getIterator();\n for (; t.hasNext();) {\n const e = t.getNext().key,\n r = n.getNext().key;\n if (0 !== this.comparator(e, r)) return !1;\n }\n return !0;\n }\n toArray() {\n const e = [];\n return this.forEach(t => {\n e.push(t);\n }), e;\n }\n toString() {\n const e = [];\n return this.forEach(t => e.push(t)), \"SortedSet(\" + e.toString() + \")\";\n }\n copy(e) {\n const t = new SortedSet(this.comparator);\n return t.data = e, t;\n }\n}\nclass SortedSetIterator {\n constructor(e) {\n this.iter = e;\n }\n getNext() {\n return this.iter.getNext().key;\n }\n hasNext() {\n return this.iter.hasNext();\n }\n}\n\n/**\n * Compares two sorted sets for equality using their natural ordering. The\n * method computes the intersection and invokes `onAdd` for every element that\n * is in `after` but not `before`. `onRemove` is invoked for every element in\n * `before` but missing from `after`.\n *\n * The method creates a copy of both `before` and `after` and runs in O(n log\n * n), where n is the size of the two lists.\n *\n * @param before - The elements that exist in the original set.\n * @param after - The elements to diff against the original set.\n * @param comparator - The comparator for the elements in before and after.\n * @param onAdd - A function to invoke for every element that is part of `\n * after` but not `before`.\n * @param onRemove - A function to invoke for every element that is part of\n * `before` but not `after`.\n */\n/**\n * Returns the next element from the iterator or `undefined` if none available.\n */\nfunction __PRIVATE_advanceIterator(e) {\n return e.hasNext() ? e.getNext() : void 0;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Provides a set of fields that can be used to partially patch a document.\n * FieldMask is used in conjunction with ObjectValue.\n * Examples:\n * foo - Overwrites foo entirely with the provided value. If foo is not\n * present in the companion ObjectValue, the field is deleted.\n * foo.bar - Overwrites only the field bar of the object foo.\n * If foo is not an object, foo is replaced with an object\n * containing foo\n */\nclass FieldMask {\n constructor(e) {\n this.fields = e,\n // TODO(dimond): validation of FieldMask\n // Sort the field mask to support `FieldMask.isEqual()` and assert below.\n e.sort(FieldPath$1.comparator);\n }\n static empty() {\n return new FieldMask([]);\n }\n /**\n * Returns a new FieldMask object that is the result of adding all the given\n * fields paths to this field mask.\n */\n unionWith(e) {\n let t = new SortedSet(FieldPath$1.comparator);\n for (const e of this.fields) t = t.add(e);\n for (const n of e) t = t.add(n);\n return new FieldMask(t.toArray());\n }\n /**\n * Verifies that `fieldPath` is included by at least one field in this field\n * mask.\n *\n * This is an O(n) operation, where `n` is the size of the field mask.\n */\n covers(e) {\n for (const t of this.fields) if (t.isPrefixOf(e)) return !0;\n return !1;\n }\n isEqual(e) {\n return __PRIVATE_arrayEquals(this.fields, e.fields, (e, t) => e.isEqual(t));\n }\n}\n\n/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An error encountered while decoding base64 string.\n */\nclass __PRIVATE_Base64DecodeError extends Error {\n constructor() {\n super(...arguments), this.name = \"Base64DecodeError\";\n }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Converts a Base64 encoded string to a binary string. */\n/** True if and only if the Base64 conversion functions are available. */\nfunction __PRIVATE_isBase64Available() {\n return \"undefined\" != typeof atob;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Immutable class that represents a \"proto\" byte string.\n *\n * Proto byte strings can either be Base64-encoded strings or Uint8Arrays when\n * sent on the wire. This class abstracts away this differentiation by holding\n * the proto byte string in a common class that must be converted into a string\n * before being sent as a proto.\n * @internal\n */\nclass ByteString {\n constructor(e) {\n this.binaryString = e;\n }\n static fromBase64String(e) {\n const t = function __PRIVATE_decodeBase64(e) {\n try {\n return atob(e);\n } catch (e) {\n // Check that `DOMException` is defined before using it to avoid\n // \"ReferenceError: Property 'DOMException' doesn't exist\" in react-native.\n // (https://github.com/firebase/firebase-js-sdk/issues/7115)\n throw \"undefined\" != typeof DOMException && e instanceof DOMException ? new __PRIVATE_Base64DecodeError(\"Invalid base64 string: \" + e) : e;\n }\n }\n /** Converts a binary string to a Base64 encoded string. */(e);\n return new ByteString(t);\n }\n static fromUint8Array(e) {\n // TODO(indexing); Remove the copy of the byte string here as this method\n // is frequently called during indexing.\n const t =\n /**\n * Helper function to convert an Uint8array to a binary string.\n */\n function __PRIVATE_binaryStringFromUint8Array(e) {\n let t = \"\";\n for (let n = 0; n < e.length; ++n) t += String.fromCharCode(e[n]);\n return t;\n }\n /**\n * Helper function to convert a binary string to an Uint8Array.\n */(e);\n return new ByteString(t);\n }\n [Symbol.iterator]() {\n let e = 0;\n return {\n next: () => e < this.binaryString.length ? {\n value: this.binaryString.charCodeAt(e++),\n done: !1\n } : {\n value: void 0,\n done: !0\n }\n };\n }\n toBase64() {\n return function __PRIVATE_encodeBase64(e) {\n return btoa(e);\n }(this.binaryString);\n }\n toUint8Array() {\n return function __PRIVATE_uint8ArrayFromBinaryString(e) {\n const t = new Uint8Array(e.length);\n for (let n = 0; n < e.length; n++) t[n] = e.charCodeAt(n);\n return t;\n }\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n // A RegExp matching ISO 8601 UTC timestamps with optional fraction.\n (this.binaryString);\n }\n approximateByteSize() {\n return 2 * this.binaryString.length;\n }\n compareTo(e) {\n return __PRIVATE_primitiveComparator(this.binaryString, e.binaryString);\n }\n isEqual(e) {\n return this.binaryString === e.binaryString;\n }\n}\nByteString.EMPTY_BYTE_STRING = new ByteString(\"\");\nconst ee = new RegExp(/^\\d{4}-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d(?:\\.(\\d+))?Z$/);\n\n/**\n * Converts the possible Proto values for a timestamp value into a \"seconds and\n * nanos\" representation.\n */\nfunction __PRIVATE_normalizeTimestamp(e) {\n // The json interface (for the browser) will return an iso timestamp string,\n // while the proto js library (for node) will return a\n // google.protobuf.Timestamp instance.\n if (__PRIVATE_hardAssert(!!e), \"string\" == typeof e) {\n // The date string can have higher precision (nanos) than the Date class\n // (millis), so we do some custom parsing here.\n // Parse the nanos right out of the string.\n let t = 0;\n const n = ee.exec(e);\n if (__PRIVATE_hardAssert(!!n), n[1]) {\n // Pad the fraction out to 9 digits (nanos).\n let e = n[1];\n e = (e + \"000000000\").substr(0, 9), t = Number(e);\n }\n // Parse the date to get the seconds.\n const r = new Date(e);\n return {\n seconds: Math.floor(r.getTime() / 1e3),\n nanos: t\n };\n }\n return {\n seconds: __PRIVATE_normalizeNumber(e.seconds),\n nanos: __PRIVATE_normalizeNumber(e.nanos)\n };\n}\n\n/**\n * Converts the possible Proto types for numbers into a JavaScript number.\n * Returns 0 if the value is not numeric.\n */\nfunction __PRIVATE_normalizeNumber(e) {\n // TODO(bjornick): Handle int64 greater than 53 bits.\n return \"number\" == typeof e ? e : \"string\" == typeof e ? Number(e) : 0;\n}\n\n/** Converts the possible Proto types for Blobs into a ByteString. */\nfunction __PRIVATE_normalizeByteString(e) {\n return \"string\" == typeof e ? ByteString.fromBase64String(e) : ByteString.fromUint8Array(e);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Represents a locally-applied ServerTimestamp.\n *\n * Server Timestamps are backed by MapValues that contain an internal field\n * `__type__` with a value of `server_timestamp`. The previous value and local\n * write time are stored in its `__previous_value__` and `__local_write_time__`\n * fields respectively.\n *\n * Notes:\n * - ServerTimestampValue instances are created as the result of applying a\n * transform. They can only exist in the local view of a document. Therefore\n * they do not need to be parsed or serialized.\n * - When evaluated locally (e.g. for snapshot.data()), they by default\n * evaluate to `null`. This behavior can be configured by passing custom\n * FieldValueOptions to value().\n * - With respect to other ServerTimestampValues, they sort by their\n * localWriteTime.\n */\nfunction __PRIVATE_isServerTimestamp(e) {\n var t, n;\n return \"server_timestamp\" === (null === (n = ((null === (t = null == e ? void 0 : e.mapValue) || void 0 === t ? void 0 : t.fields) || {}).__type__) || void 0 === n ? void 0 : n.stringValue);\n}\n\n/**\n * Creates a new ServerTimestamp proto value (using the internal format).\n */\n/**\n * Returns the value of the field before this ServerTimestamp was set.\n *\n * Preserving the previous values allows the user to display the last resoled\n * value until the backend responds with the timestamp.\n */\nfunction __PRIVATE_getPreviousValue(e) {\n const t = e.mapValue.fields.__previous_value__;\n return __PRIVATE_isServerTimestamp(t) ? __PRIVATE_getPreviousValue(t) : t;\n}\n\n/**\n * Returns the local time at which this timestamp was first set.\n */\nfunction __PRIVATE_getLocalWriteTime(e) {\n const t = __PRIVATE_normalizeTimestamp(e.mapValue.fields.__local_write_time__.timestampValue);\n return new Timestamp(t.seconds, t.nanos);\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass DatabaseInfo {\n /**\n * Constructs a DatabaseInfo using the provided host, databaseId and\n * persistenceKey.\n *\n * @param databaseId - The database to use.\n * @param appId - The Firebase App Id.\n * @param persistenceKey - A unique identifier for this Firestore's local\n * storage (used in conjunction with the databaseId).\n * @param host - The Firestore backend host to connect to.\n * @param ssl - Whether to use SSL when connecting.\n * @param forceLongPolling - Whether to use the forceLongPolling option\n * when using WebChannel as the network transport.\n * @param autoDetectLongPolling - Whether to use the detectBufferingProxy\n * option when using WebChannel as the network transport.\n * @param longPollingOptions Options that configure long-polling.\n * @param useFetchStreams Whether to use the Fetch API instead of\n * XMLHTTPRequest\n */\n constructor(e, t, n, r, i, s, o, _, a) {\n this.databaseId = e, this.appId = t, this.persistenceKey = n, this.host = r, this.ssl = i, this.forceLongPolling = s, this.autoDetectLongPolling = o, this.longPollingOptions = _, this.useFetchStreams = a;\n }\n}\n\n/** The default database name for a project. */\n/**\n * Represents the database ID a Firestore client is associated with.\n * @internal\n */\nclass DatabaseId {\n constructor(e, t) {\n this.projectId = e, this.database = t || \"(default)\";\n }\n static empty() {\n return new DatabaseId(\"\", \"\");\n }\n get isDefaultDatabase() {\n return \"(default)\" === this.database;\n }\n isEqual(e) {\n return e instanceof DatabaseId && e.projectId === this.projectId && e.database === this.database;\n }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst te = {\n mapValue: {\n fields: {\n __type__: {\n stringValue: \"__max__\"\n }\n }\n }\n },\n ne = {\n nullValue: \"NULL_VALUE\"\n };\n\n/** Extracts the backend's type order for the provided value. */\nfunction __PRIVATE_typeOrder(e) {\n return \"nullValue\" in e ? 0 /* TypeOrder.NullValue */ : \"booleanValue\" in e ? 1 /* TypeOrder.BooleanValue */ : \"integerValue\" in e || \"doubleValue\" in e ? 2 /* TypeOrder.NumberValue */ : \"timestampValue\" in e ? 3 /* TypeOrder.TimestampValue */ : \"stringValue\" in e ? 5 /* TypeOrder.StringValue */ : \"bytesValue\" in e ? 6 /* TypeOrder.BlobValue */ : \"referenceValue\" in e ? 7 /* TypeOrder.RefValue */ : \"geoPointValue\" in e ? 8 /* TypeOrder.GeoPointValue */ : \"arrayValue\" in e ? 9 /* TypeOrder.ArrayValue */ : \"mapValue\" in e ? __PRIVATE_isServerTimestamp(e) ? 4 /* TypeOrder.ServerTimestampValue */ : __PRIVATE_isMaxValue(e) ? 9007199254740991 /* TypeOrder.MaxValue */ : 10 /* TypeOrder.ObjectValue */ : fail();\n}\n\n/** Tests `left` and `right` for equality based on the backend semantics. */\nfunction __PRIVATE_valueEquals(e, t) {\n if (e === t) return !0;\n const n = __PRIVATE_typeOrder(e);\n if (n !== __PRIVATE_typeOrder(t)) return !1;\n switch (n) {\n case 0 /* TypeOrder.NullValue */:\n case 9007199254740991 /* TypeOrder.MaxValue */:\n return !0;\n case 1 /* TypeOrder.BooleanValue */:\n return e.booleanValue === t.booleanValue;\n case 4 /* TypeOrder.ServerTimestampValue */:\n return __PRIVATE_getLocalWriteTime(e).isEqual(__PRIVATE_getLocalWriteTime(t));\n case 3 /* TypeOrder.TimestampValue */:\n return function __PRIVATE_timestampEquals(e, t) {\n if (\"string\" == typeof e.timestampValue && \"string\" == typeof t.timestampValue && e.timestampValue.length === t.timestampValue.length)\n // Use string equality for ISO 8601 timestamps\n return e.timestampValue === t.timestampValue;\n const n = __PRIVATE_normalizeTimestamp(e.timestampValue),\n r = __PRIVATE_normalizeTimestamp(t.timestampValue);\n return n.seconds === r.seconds && n.nanos === r.nanos;\n }(e, t);\n case 5 /* TypeOrder.StringValue */:\n return e.stringValue === t.stringValue;\n case 6 /* TypeOrder.BlobValue */:\n return function __PRIVATE_blobEquals(e, t) {\n return __PRIVATE_normalizeByteString(e.bytesValue).isEqual(__PRIVATE_normalizeByteString(t.bytesValue));\n }(e, t);\n case 7 /* TypeOrder.RefValue */:\n return e.referenceValue === t.referenceValue;\n case 8 /* TypeOrder.GeoPointValue */:\n return function __PRIVATE_geoPointEquals(e, t) {\n return __PRIVATE_normalizeNumber(e.geoPointValue.latitude) === __PRIVATE_normalizeNumber(t.geoPointValue.latitude) && __PRIVATE_normalizeNumber(e.geoPointValue.longitude) === __PRIVATE_normalizeNumber(t.geoPointValue.longitude);\n }(e, t);\n case 2 /* TypeOrder.NumberValue */:\n return function __PRIVATE_numberEquals(e, t) {\n if (\"integerValue\" in e && \"integerValue\" in t) return __PRIVATE_normalizeNumber(e.integerValue) === __PRIVATE_normalizeNumber(t.integerValue);\n if (\"doubleValue\" in e && \"doubleValue\" in t) {\n const n = __PRIVATE_normalizeNumber(e.doubleValue),\n r = __PRIVATE_normalizeNumber(t.doubleValue);\n return n === r ? __PRIVATE_isNegativeZero(n) === __PRIVATE_isNegativeZero(r) : isNaN(n) && isNaN(r);\n }\n return !1;\n }(e, t);\n case 9 /* TypeOrder.ArrayValue */:\n return __PRIVATE_arrayEquals(e.arrayValue.values || [], t.arrayValue.values || [], __PRIVATE_valueEquals);\n case 10 /* TypeOrder.ObjectValue */:\n return function __PRIVATE_objectEquals(e, t) {\n const n = e.mapValue.fields || {},\n r = t.mapValue.fields || {};\n if (__PRIVATE_objectSize(n) !== __PRIVATE_objectSize(r)) return !1;\n for (const e in n) if (n.hasOwnProperty(e) && (void 0 === r[e] || !__PRIVATE_valueEquals(n[e], r[e]))) return !1;\n return !0;\n }\n /** Returns true if the ArrayValue contains the specified element. */(e, t);\n default:\n return fail();\n }\n}\nfunction __PRIVATE_arrayValueContains(e, t) {\n return void 0 !== (e.values || []).find(e => __PRIVATE_valueEquals(e, t));\n}\nfunction __PRIVATE_valueCompare(e, t) {\n if (e === t) return 0;\n const n = __PRIVATE_typeOrder(e),\n r = __PRIVATE_typeOrder(t);\n if (n !== r) return __PRIVATE_primitiveComparator(n, r);\n switch (n) {\n case 0 /* TypeOrder.NullValue */:\n case 9007199254740991 /* TypeOrder.MaxValue */:\n return 0;\n case 1 /* TypeOrder.BooleanValue */:\n return __PRIVATE_primitiveComparator(e.booleanValue, t.booleanValue);\n case 2 /* TypeOrder.NumberValue */:\n return function __PRIVATE_compareNumbers(e, t) {\n const n = __PRIVATE_normalizeNumber(e.integerValue || e.doubleValue),\n r = __PRIVATE_normalizeNumber(t.integerValue || t.doubleValue);\n return n < r ? -1 : n > r ? 1 : n === r ? 0 :\n // one or both are NaN.\n isNaN(n) ? isNaN(r) ? 0 : -1 : 1;\n }(e, t);\n case 3 /* TypeOrder.TimestampValue */:\n return __PRIVATE_compareTimestamps(e.timestampValue, t.timestampValue);\n case 4 /* TypeOrder.ServerTimestampValue */:\n return __PRIVATE_compareTimestamps(__PRIVATE_getLocalWriteTime(e), __PRIVATE_getLocalWriteTime(t));\n case 5 /* TypeOrder.StringValue */:\n return __PRIVATE_primitiveComparator(e.stringValue, t.stringValue);\n case 6 /* TypeOrder.BlobValue */:\n return function __PRIVATE_compareBlobs(e, t) {\n const n = __PRIVATE_normalizeByteString(e),\n r = __PRIVATE_normalizeByteString(t);\n return n.compareTo(r);\n }(e.bytesValue, t.bytesValue);\n case 7 /* TypeOrder.RefValue */:\n return function __PRIVATE_compareReferences(e, t) {\n const n = e.split(\"/\"),\n r = t.split(\"/\");\n for (let e = 0; e < n.length && e < r.length; e++) {\n const t = __PRIVATE_primitiveComparator(n[e], r[e]);\n if (0 !== t) return t;\n }\n return __PRIVATE_primitiveComparator(n.length, r.length);\n }(e.referenceValue, t.referenceValue);\n case 8 /* TypeOrder.GeoPointValue */:\n return function __PRIVATE_compareGeoPoints(e, t) {\n const n = __PRIVATE_primitiveComparator(__PRIVATE_normalizeNumber(e.latitude), __PRIVATE_normalizeNumber(t.latitude));\n if (0 !== n) return n;\n return __PRIVATE_primitiveComparator(__PRIVATE_normalizeNumber(e.longitude), __PRIVATE_normalizeNumber(t.longitude));\n }(e.geoPointValue, t.geoPointValue);\n case 9 /* TypeOrder.ArrayValue */:\n return function __PRIVATE_compareArrays(e, t) {\n const n = e.values || [],\n r = t.values || [];\n for (let e = 0; e < n.length && e < r.length; ++e) {\n const t = __PRIVATE_valueCompare(n[e], r[e]);\n if (t) return t;\n }\n return __PRIVATE_primitiveComparator(n.length, r.length);\n }(e.arrayValue, t.arrayValue);\n case 10 /* TypeOrder.ObjectValue */:\n return function __PRIVATE_compareMaps(e, t) {\n if (e === te.mapValue && t === te.mapValue) return 0;\n if (e === te.mapValue) return 1;\n if (t === te.mapValue) return -1;\n const n = e.fields || {},\n r = Object.keys(n),\n i = t.fields || {},\n s = Object.keys(i);\n // Even though MapValues are likely sorted correctly based on their insertion\n // order (e.g. when received from the backend), local modifications can bring\n // elements out of order. We need to re-sort the elements to ensure that\n // canonical IDs are independent of insertion order.\n r.sort(), s.sort();\n for (let e = 0; e < r.length && e < s.length; ++e) {\n const t = __PRIVATE_primitiveComparator(r[e], s[e]);\n if (0 !== t) return t;\n const o = __PRIVATE_valueCompare(n[r[e]], i[s[e]]);\n if (0 !== o) return o;\n }\n return __PRIVATE_primitiveComparator(r.length, s.length);\n }\n /**\n * Generates the canonical ID for the provided field value (as used in Target\n * serialization).\n */(e.mapValue, t.mapValue);\n default:\n throw fail();\n }\n}\nfunction __PRIVATE_compareTimestamps(e, t) {\n if (\"string\" == typeof e && \"string\" == typeof t && e.length === t.length) return __PRIVATE_primitiveComparator(e, t);\n const n = __PRIVATE_normalizeTimestamp(e),\n r = __PRIVATE_normalizeTimestamp(t),\n i = __PRIVATE_primitiveComparator(n.seconds, r.seconds);\n return 0 !== i ? i : __PRIVATE_primitiveComparator(n.nanos, r.nanos);\n}\nfunction canonicalId(e) {\n return __PRIVATE_canonifyValue(e);\n}\nfunction __PRIVATE_canonifyValue(e) {\n return \"nullValue\" in e ? \"null\" : \"booleanValue\" in e ? \"\" + e.booleanValue : \"integerValue\" in e ? \"\" + e.integerValue : \"doubleValue\" in e ? \"\" + e.doubleValue : \"timestampValue\" in e ? function __PRIVATE_canonifyTimestamp(e) {\n const t = __PRIVATE_normalizeTimestamp(e);\n return `time(${t.seconds},${t.nanos})`;\n }(e.timestampValue) : \"stringValue\" in e ? e.stringValue : \"bytesValue\" in e ? function __PRIVATE_canonifyByteString(e) {\n return __PRIVATE_normalizeByteString(e).toBase64();\n }(e.bytesValue) : \"referenceValue\" in e ? function __PRIVATE_canonifyReference(e) {\n return DocumentKey.fromName(e).toString();\n }(e.referenceValue) : \"geoPointValue\" in e ? function __PRIVATE_canonifyGeoPoint(e) {\n return `geo(${e.latitude},${e.longitude})`;\n }(e.geoPointValue) : \"arrayValue\" in e ? function __PRIVATE_canonifyArray(e) {\n let t = \"[\",\n n = !0;\n for (const r of e.values || []) n ? n = !1 : t += \",\", t += __PRIVATE_canonifyValue(r);\n return t + \"]\";\n }\n /**\n * Returns an approximate (and wildly inaccurate) in-memory size for the field\n * value.\n *\n * The memory size takes into account only the actual user data as it resides\n * in memory and ignores object overhead.\n */(e.arrayValue) : \"mapValue\" in e ? function __PRIVATE_canonifyMap(e) {\n // Iteration order in JavaScript is not guaranteed. To ensure that we generate\n // matching canonical IDs for identical maps, we need to sort the keys.\n const t = Object.keys(e.fields || {}).sort();\n let n = \"{\",\n r = !0;\n for (const i of t) r ? r = !1 : n += \",\", n += `${i}:${__PRIVATE_canonifyValue(e.fields[i])}`;\n return n + \"}\";\n }(e.mapValue) : fail();\n}\nfunction __PRIVATE_estimateByteSize(e) {\n switch (__PRIVATE_typeOrder(e)) {\n case 0 /* TypeOrder.NullValue */:\n case 1 /* TypeOrder.BooleanValue */:\n return 4;\n case 2 /* TypeOrder.NumberValue */:\n return 8;\n case 3 /* TypeOrder.TimestampValue */:\n case 8 /* TypeOrder.GeoPointValue */:\n // GeoPoints are made up of two distinct numbers (latitude + longitude)\n return 16;\n case 4 /* TypeOrder.ServerTimestampValue */:\n const t = __PRIVATE_getPreviousValue(e);\n return t ? 16 + __PRIVATE_estimateByteSize(t) : 16;\n case 5 /* TypeOrder.StringValue */:\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures:\n // \"JavaScript's String type is [...] a set of elements of 16-bit unsigned\n // integer values\"\n return 2 * e.stringValue.length;\n case 6 /* TypeOrder.BlobValue */:\n return __PRIVATE_normalizeByteString(e.bytesValue).approximateByteSize();\n case 7 /* TypeOrder.RefValue */:\n return e.referenceValue.length;\n case 9 /* TypeOrder.ArrayValue */:\n return function __PRIVATE_estimateArrayByteSize(e) {\n return (e.values || []).reduce((e, t) => e + __PRIVATE_estimateByteSize(t), 0);\n }\n /** Returns a reference value for the provided database and key. */(e.arrayValue);\n case 10 /* TypeOrder.ObjectValue */:\n return function __PRIVATE_estimateMapByteSize(e) {\n let t = 0;\n return forEach(e.fields, (e, n) => {\n t += e.length + __PRIVATE_estimateByteSize(n);\n }), t;\n }(e.mapValue);\n default:\n throw fail();\n }\n}\nfunction __PRIVATE_refValue(e, t) {\n return {\n referenceValue: `projects/${e.projectId}/databases/${e.database}/documents/${t.path.canonicalString()}`\n };\n}\n\n/** Returns true if `value` is an IntegerValue . */\nfunction isInteger(e) {\n return !!e && \"integerValue\" in e;\n}\n\n/** Returns true if `value` is a DoubleValue. */\n/** Returns true if `value` is an ArrayValue. */\nfunction isArray(e) {\n return !!e && \"arrayValue\" in e;\n}\n\n/** Returns true if `value` is a NullValue. */\nfunction __PRIVATE_isNullValue(e) {\n return !!e && \"nullValue\" in e;\n}\n\n/** Returns true if `value` is NaN. */\nfunction __PRIVATE_isNanValue(e) {\n return !!e && \"doubleValue\" in e && isNaN(Number(e.doubleValue));\n}\n\n/** Returns true if `value` is a MapValue. */\nfunction __PRIVATE_isMapValue(e) {\n return !!e && \"mapValue\" in e;\n}\n\n/** Creates a deep copy of `source`. */\nfunction __PRIVATE_deepClone(e) {\n if (e.geoPointValue) return {\n geoPointValue: Object.assign({}, e.geoPointValue)\n };\n if (e.timestampValue && \"object\" == typeof e.timestampValue) return {\n timestampValue: Object.assign({}, e.timestampValue)\n };\n if (e.mapValue) {\n const t = {\n mapValue: {\n fields: {}\n }\n };\n return forEach(e.mapValue.fields, (e, n) => t.mapValue.fields[e] = __PRIVATE_deepClone(n)), t;\n }\n if (e.arrayValue) {\n const t = {\n arrayValue: {\n values: []\n }\n };\n for (let n = 0; n < (e.arrayValue.values || []).length; ++n) t.arrayValue.values[n] = __PRIVATE_deepClone(e.arrayValue.values[n]);\n return t;\n }\n return Object.assign({}, e);\n}\n\n/** Returns true if the Value represents the canonical {@link #MAX_VALUE} . */\nfunction __PRIVATE_isMaxValue(e) {\n return \"__max__\" === (((e.mapValue || {}).fields || {}).__type__ || {}).stringValue;\n}\n\n/** Returns the lowest value for the given value type (inclusive). */\nfunction __PRIVATE_valuesGetLowerBound(e) {\n return \"nullValue\" in e ? ne : \"booleanValue\" in e ? {\n booleanValue: !1\n } : \"integerValue\" in e || \"doubleValue\" in e ? {\n doubleValue: NaN\n } : \"timestampValue\" in e ? {\n timestampValue: {\n seconds: Number.MIN_SAFE_INTEGER\n }\n } : \"stringValue\" in e ? {\n stringValue: \"\"\n } : \"bytesValue\" in e ? {\n bytesValue: \"\"\n } : \"referenceValue\" in e ? __PRIVATE_refValue(DatabaseId.empty(), DocumentKey.empty()) : \"geoPointValue\" in e ? {\n geoPointValue: {\n latitude: -90,\n longitude: -180\n }\n } : \"arrayValue\" in e ? {\n arrayValue: {}\n } : \"mapValue\" in e ? {\n mapValue: {}\n } : fail();\n}\n\n/** Returns the largest value for the given value type (exclusive). */\nfunction __PRIVATE_valuesGetUpperBound(e) {\n return \"nullValue\" in e ? {\n booleanValue: !1\n } : \"booleanValue\" in e ? {\n doubleValue: NaN\n } : \"integerValue\" in e || \"doubleValue\" in e ? {\n timestampValue: {\n seconds: Number.MIN_SAFE_INTEGER\n }\n } : \"timestampValue\" in e ? {\n stringValue: \"\"\n } : \"stringValue\" in e ? {\n bytesValue: \"\"\n } : \"bytesValue\" in e ? __PRIVATE_refValue(DatabaseId.empty(), DocumentKey.empty()) : \"referenceValue\" in e ? {\n geoPointValue: {\n latitude: -90,\n longitude: -180\n }\n } : \"geoPointValue\" in e ? {\n arrayValue: {}\n } : \"arrayValue\" in e ? {\n mapValue: {}\n } : \"mapValue\" in e ? te : fail();\n}\nfunction __PRIVATE_lowerBoundCompare(e, t) {\n const n = __PRIVATE_valueCompare(e.value, t.value);\n return 0 !== n ? n : e.inclusive && !t.inclusive ? -1 : !e.inclusive && t.inclusive ? 1 : 0;\n}\nfunction __PRIVATE_upperBoundCompare(e, t) {\n const n = __PRIVATE_valueCompare(e.value, t.value);\n return 0 !== n ? n : e.inclusive && !t.inclusive ? 1 : !e.inclusive && t.inclusive ? -1 : 0;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An ObjectValue represents a MapValue in the Firestore Proto and offers the\n * ability to add and remove fields (via the ObjectValueBuilder).\n */\nclass ObjectValue {\n constructor(e) {\n this.value = e;\n }\n static empty() {\n return new ObjectValue({\n mapValue: {}\n });\n }\n /**\n * Returns the value at the given path or null.\n *\n * @param path - the path to search\n * @returns The value at the path or null if the path is not set.\n */\n field(e) {\n if (e.isEmpty()) return this.value;\n {\n let t = this.value;\n for (let n = 0; n < e.length - 1; ++n) if (t = (t.mapValue.fields || {})[e.get(n)], !__PRIVATE_isMapValue(t)) return null;\n return t = (t.mapValue.fields || {})[e.lastSegment()], t || null;\n }\n }\n /**\n * Sets the field to the provided value.\n *\n * @param path - The field path to set.\n * @param value - The value to set.\n */\n set(e, t) {\n this.getFieldsMap(e.popLast())[e.lastSegment()] = __PRIVATE_deepClone(t);\n }\n /**\n * Sets the provided fields to the provided values.\n *\n * @param data - A map of fields to values (or null for deletes).\n */\n setAll(e) {\n let t = FieldPath$1.emptyPath(),\n n = {},\n r = [];\n e.forEach((e, i) => {\n if (!t.isImmediateParentOf(i)) {\n // Insert the accumulated changes at this parent location\n const e = this.getFieldsMap(t);\n this.applyChanges(e, n, r), n = {}, r = [], t = i.popLast();\n }\n e ? n[i.lastSegment()] = __PRIVATE_deepClone(e) : r.push(i.lastSegment());\n });\n const i = this.getFieldsMap(t);\n this.applyChanges(i, n, r);\n }\n /**\n * Removes the field at the specified path. If there is no field at the\n * specified path, nothing is changed.\n *\n * @param path - The field path to remove.\n */\n delete(e) {\n const t = this.field(e.popLast());\n __PRIVATE_isMapValue(t) && t.mapValue.fields && delete t.mapValue.fields[e.lastSegment()];\n }\n isEqual(e) {\n return __PRIVATE_valueEquals(this.value, e.value);\n }\n /**\n * Returns the map that contains the leaf element of `path`. If the parent\n * entry does not yet exist, or if it is not a map, a new map will be created.\n */\n getFieldsMap(e) {\n let t = this.value;\n t.mapValue.fields || (t.mapValue = {\n fields: {}\n });\n for (let n = 0; n < e.length; ++n) {\n let r = t.mapValue.fields[e.get(n)];\n __PRIVATE_isMapValue(r) && r.mapValue.fields || (r = {\n mapValue: {\n fields: {}\n }\n }, t.mapValue.fields[e.get(n)] = r), t = r;\n }\n return t.mapValue.fields;\n }\n /**\n * Modifies `fieldsMap` by adding, replacing or deleting the specified\n * entries.\n */\n applyChanges(e, t, n) {\n forEach(t, (t, n) => e[t] = n);\n for (const t of n) delete e[t];\n }\n clone() {\n return new ObjectValue(__PRIVATE_deepClone(this.value));\n }\n}\n\n/**\n * Returns a FieldMask built from all fields in a MapValue.\n */\nfunction __PRIVATE_extractFieldMask(e) {\n const t = [];\n return forEach(e.fields, (e, n) => {\n const r = new FieldPath$1([e]);\n if (__PRIVATE_isMapValue(n)) {\n const e = __PRIVATE_extractFieldMask(n.mapValue).fields;\n if (0 === e.length)\n // Preserve the empty map by adding it to the FieldMask.\n t.push(r);else\n // For nested and non-empty ObjectValues, add the FieldPath of the\n // leaf nodes.\n for (const n of e) t.push(r.child(n));\n } else\n // For nested and non-empty ObjectValues, add the FieldPath of the leaf\n // nodes.\n t.push(r);\n }), new FieldMask(t);\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Represents a document in Firestore with a key, version, data and whether it\n * has local mutations applied to it.\n *\n * Documents can transition between states via `convertToFoundDocument()`,\n * `convertToNoDocument()` and `convertToUnknownDocument()`. If a document does\n * not transition to one of these states even after all mutations have been\n * applied, `isValidDocument()` returns false and the document should be removed\n * from all views.\n */\nclass MutableDocument {\n constructor(e, t, n, r, i, s, o) {\n this.key = e, this.documentType = t, this.version = n, this.readTime = r, this.createTime = i, this.data = s, this.documentState = o;\n }\n /**\n * Creates a document with no known version or data, but which can serve as\n * base document for mutations.\n */\n static newInvalidDocument(e) {\n return new MutableDocument(e, 0 /* DocumentType.INVALID */, /* version */SnapshotVersion.min(), /* readTime */SnapshotVersion.min(), /* createTime */SnapshotVersion.min(), ObjectValue.empty(), 0 /* DocumentState.SYNCED */);\n }\n /**\n * Creates a new document that is known to exist with the given data at the\n * given version.\n */\n static newFoundDocument(e, t, n, r) {\n return new MutableDocument(e, 1 /* DocumentType.FOUND_DOCUMENT */, /* version */t, /* readTime */SnapshotVersion.min(), /* createTime */n, r, 0 /* DocumentState.SYNCED */);\n }\n /** Creates a new document that is known to not exist at the given version. */\n static newNoDocument(e, t) {\n return new MutableDocument(e, 2 /* DocumentType.NO_DOCUMENT */, /* version */t, /* readTime */SnapshotVersion.min(), /* createTime */SnapshotVersion.min(), ObjectValue.empty(), 0 /* DocumentState.SYNCED */);\n }\n /**\n * Creates a new document that is known to exist at the given version but\n * whose data is not known (e.g. a document that was updated without a known\n * base document).\n */\n static newUnknownDocument(e, t) {\n return new MutableDocument(e, 3 /* DocumentType.UNKNOWN_DOCUMENT */, /* version */t, /* readTime */SnapshotVersion.min(), /* createTime */SnapshotVersion.min(), ObjectValue.empty(), 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */);\n }\n /**\n * Changes the document type to indicate that it exists and that its version\n * and data are known.\n */\n convertToFoundDocument(e, t) {\n // If a document is switching state from being an invalid or deleted\n // document to a valid (FOUND_DOCUMENT) document, either due to receiving an\n // update from Watch or due to applying a local set mutation on top\n // of a deleted document, our best guess about its createTime would be the\n // version at which the document transitioned to a FOUND_DOCUMENT.\n return !this.createTime.isEqual(SnapshotVersion.min()) || 2 /* DocumentType.NO_DOCUMENT */ !== this.documentType && 0 /* DocumentType.INVALID */ !== this.documentType || (this.createTime = e), this.version = e, this.documentType = 1 /* DocumentType.FOUND_DOCUMENT */, this.data = t, this.documentState = 0 /* DocumentState.SYNCED */, this;\n }\n /**\n * Changes the document type to indicate that it doesn't exist at the given\n * version.\n */\n convertToNoDocument(e) {\n return this.version = e, this.documentType = 2 /* DocumentType.NO_DOCUMENT */, this.data = ObjectValue.empty(), this.documentState = 0 /* DocumentState.SYNCED */, this;\n }\n /**\n * Changes the document type to indicate that it exists at a given version but\n * that its data is not known (e.g. a document that was updated without a known\n * base document).\n */\n convertToUnknownDocument(e) {\n return this.version = e, this.documentType = 3 /* DocumentType.UNKNOWN_DOCUMENT */, this.data = ObjectValue.empty(), this.documentState = 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */, this;\n }\n setHasCommittedMutations() {\n return this.documentState = 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */, this;\n }\n setHasLocalMutations() {\n return this.documentState = 1 /* DocumentState.HAS_LOCAL_MUTATIONS */, this.version = SnapshotVersion.min(), this;\n }\n setReadTime(e) {\n return this.readTime = e, this;\n }\n get hasLocalMutations() {\n return 1 /* DocumentState.HAS_LOCAL_MUTATIONS */ === this.documentState;\n }\n get hasCommittedMutations() {\n return 2 /* DocumentState.HAS_COMMITTED_MUTATIONS */ === this.documentState;\n }\n get hasPendingWrites() {\n return this.hasLocalMutations || this.hasCommittedMutations;\n }\n isValidDocument() {\n return 0 /* DocumentType.INVALID */ !== this.documentType;\n }\n isFoundDocument() {\n return 1 /* DocumentType.FOUND_DOCUMENT */ === this.documentType;\n }\n isNoDocument() {\n return 2 /* DocumentType.NO_DOCUMENT */ === this.documentType;\n }\n isUnknownDocument() {\n return 3 /* DocumentType.UNKNOWN_DOCUMENT */ === this.documentType;\n }\n isEqual(e) {\n return e instanceof MutableDocument && this.key.isEqual(e.key) && this.version.isEqual(e.version) && this.documentType === e.documentType && this.documentState === e.documentState && this.data.isEqual(e.data);\n }\n mutableCopy() {\n return new MutableDocument(this.key, this.documentType, this.version, this.readTime, this.createTime, this.data.clone(), this.documentState);\n }\n toString() {\n return `Document(${this.key}, ${this.version}, ${JSON.stringify(this.data.value)}, {createTime: ${this.createTime}}), {documentType: ${this.documentType}}), {documentState: ${this.documentState}})`;\n }\n}\n\n/**\n * Compares the value for field `field` in the provided documents. Throws if\n * the field does not exist in both documents.\n */\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Represents a bound of a query.\n *\n * The bound is specified with the given components representing a position and\n * whether it's just before or just after the position (relative to whatever the\n * query order is).\n *\n * The position represents a logical index position for a query. It's a prefix\n * of values for the (potentially implicit) order by clauses of a query.\n *\n * Bound provides a function to determine whether a document comes before or\n * after a bound. This is influenced by whether the position is just before or\n * just after the provided values.\n */\nclass Bound {\n constructor(e, t) {\n this.position = e, this.inclusive = t;\n }\n}\nfunction __PRIVATE_boundCompareToDocument(e, t, n) {\n let r = 0;\n for (let i = 0; i < e.position.length; i++) {\n const s = t[i],\n o = e.position[i];\n if (s.field.isKeyField()) r = DocumentKey.comparator(DocumentKey.fromName(o.referenceValue), n.key);else {\n r = __PRIVATE_valueCompare(o, n.data.field(s.field));\n }\n if (\"desc\" /* Direction.DESCENDING */ === s.dir && (r *= -1), 0 !== r) break;\n }\n return r;\n}\n\n/**\n * Returns true if a document sorts after a bound using the provided sort\n * order.\n */\nfunction __PRIVATE_boundEquals(e, t) {\n if (null === e) return null === t;\n if (null === t) return !1;\n if (e.inclusive !== t.inclusive || e.position.length !== t.position.length) return !1;\n for (let n = 0; n < e.position.length; n++) {\n if (!__PRIVATE_valueEquals(e.position[n], t.position[n])) return !1;\n }\n return !0;\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An ordering on a field, in some Direction. Direction defaults to ASCENDING.\n */\nclass OrderBy {\n constructor(e, t = \"asc\" /* Direction.ASCENDING */) {\n this.field = e, this.dir = t;\n }\n}\nfunction __PRIVATE_orderByEquals(e, t) {\n return e.dir === t.dir && e.field.isEqual(t.field);\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass Filter {}\nclass FieldFilter extends Filter {\n constructor(e, t, n) {\n super(), this.field = e, this.op = t, this.value = n;\n }\n /**\n * Creates a filter based on the provided arguments.\n */\n static create(e, t, n) {\n return e.isKeyField() ? \"in\" /* Operator.IN */ === t || \"not-in\" /* Operator.NOT_IN */ === t ? this.createKeyFieldInFilter(e, t, n) : new __PRIVATE_KeyFieldFilter(e, t, n) : \"array-contains\" /* Operator.ARRAY_CONTAINS */ === t ? new __PRIVATE_ArrayContainsFilter(e, n) : \"in\" /* Operator.IN */ === t ? new __PRIVATE_InFilter(e, n) : \"not-in\" /* Operator.NOT_IN */ === t ? new __PRIVATE_NotInFilter(e, n) : \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */ === t ? new __PRIVATE_ArrayContainsAnyFilter(e, n) : new FieldFilter(e, t, n);\n }\n static createKeyFieldInFilter(e, t, n) {\n return \"in\" /* Operator.IN */ === t ? new __PRIVATE_KeyFieldInFilter(e, n) : new __PRIVATE_KeyFieldNotInFilter(e, n);\n }\n matches(e) {\n const t = e.data.field(this.field);\n // Types do not have to match in NOT_EQUAL filters.\n return \"!=\" /* Operator.NOT_EQUAL */ === this.op ? null !== t && this.matchesComparison(__PRIVATE_valueCompare(t, this.value)) : null !== t && __PRIVATE_typeOrder(this.value) === __PRIVATE_typeOrder(t) && this.matchesComparison(__PRIVATE_valueCompare(t, this.value));\n // Only compare types with matching backend order (such as double and int).\n }\n matchesComparison(e) {\n switch (this.op) {\n case \"<\" /* Operator.LESS_THAN */:\n return e < 0;\n case \"<=\" /* Operator.LESS_THAN_OR_EQUAL */:\n return e <= 0;\n case \"==\" /* Operator.EQUAL */:\n return 0 === e;\n case \"!=\" /* Operator.NOT_EQUAL */:\n return 0 !== e;\n case \">\" /* Operator.GREATER_THAN */:\n return e > 0;\n case \">=\" /* Operator.GREATER_THAN_OR_EQUAL */:\n return e >= 0;\n default:\n return fail();\n }\n }\n isInequality() {\n return [\"<\" /* Operator.LESS_THAN */, \"<=\" /* Operator.LESS_THAN_OR_EQUAL */, \">\" /* Operator.GREATER_THAN */, \">=\" /* Operator.GREATER_THAN_OR_EQUAL */, \"!=\" /* Operator.NOT_EQUAL */, \"not-in\" /* Operator.NOT_IN */].indexOf(this.op) >= 0;\n }\n getFlattenedFilters() {\n return [this];\n }\n getFilters() {\n return [this];\n }\n}\nclass CompositeFilter extends Filter {\n constructor(e, t) {\n super(), this.filters = e, this.op = t, this.ue = null;\n }\n /**\n * Creates a filter based on the provided arguments.\n */\n static create(e, t) {\n return new CompositeFilter(e, t);\n }\n matches(e) {\n return __PRIVATE_compositeFilterIsConjunction(this) ? void 0 === this.filters.find(t => !t.matches(e)) : void 0 !== this.filters.find(t => t.matches(e));\n }\n getFlattenedFilters() {\n return null !== this.ue || (this.ue = this.filters.reduce((e, t) => e.concat(t.getFlattenedFilters()), [])), this.ue;\n }\n // Returns a mutable copy of `this.filters`\n getFilters() {\n return Object.assign([], this.filters);\n }\n}\nfunction __PRIVATE_compositeFilterIsConjunction(e) {\n return \"and\" /* CompositeOperator.AND */ === e.op;\n}\nfunction __PRIVATE_compositeFilterIsDisjunction(e) {\n return \"or\" /* CompositeOperator.OR */ === e.op;\n}\n\n/**\n * Returns true if this filter is a conjunction of field filters only. Returns false otherwise.\n */\nfunction __PRIVATE_compositeFilterIsFlatConjunction(e) {\n return __PRIVATE_compositeFilterIsFlat(e) && __PRIVATE_compositeFilterIsConjunction(e);\n}\n\n/**\n * Returns true if this filter does not contain any composite filters. Returns false otherwise.\n */\nfunction __PRIVATE_compositeFilterIsFlat(e) {\n for (const t of e.filters) if (t instanceof CompositeFilter) return !1;\n return !0;\n}\nfunction __PRIVATE_canonifyFilter(e) {\n if (e instanceof FieldFilter)\n // TODO(b/29183165): Technically, this won't be unique if two values have\n // the same description, such as the int 3 and the string \"3\". So we should\n // add the types in here somehow, too.\n return e.field.canonicalString() + e.op.toString() + canonicalId(e.value);\n if (__PRIVATE_compositeFilterIsFlatConjunction(e))\n // Older SDK versions use an implicit AND operation between their filters.\n // In the new SDK versions, the developer may use an explicit AND filter.\n // To stay consistent with the old usages, we add a special case to ensure\n // the canonical ID for these two are the same. For example:\n // `col.whereEquals(\"a\", 1).whereEquals(\"b\", 2)` should have the same\n // canonical ID as `col.where(and(equals(\"a\",1), equals(\"b\",2)))`.\n return e.filters.map(e => __PRIVATE_canonifyFilter(e)).join(\",\");\n {\n // filter instanceof CompositeFilter\n const t = e.filters.map(e => __PRIVATE_canonifyFilter(e)).join(\",\");\n return `${e.op}(${t})`;\n }\n}\nfunction __PRIVATE_filterEquals(e, t) {\n return e instanceof FieldFilter ? function __PRIVATE_fieldFilterEquals(e, t) {\n return t instanceof FieldFilter && e.op === t.op && e.field.isEqual(t.field) && __PRIVATE_valueEquals(e.value, t.value);\n }(e, t) : e instanceof CompositeFilter ? function __PRIVATE_compositeFilterEquals(e, t) {\n if (t instanceof CompositeFilter && e.op === t.op && e.filters.length === t.filters.length) {\n return e.filters.reduce((e, n, r) => e && __PRIVATE_filterEquals(n, t.filters[r]), !0);\n }\n return !1;\n }\n /**\n * Returns a new composite filter that contains all filter from\n * `compositeFilter` plus all the given filters in `otherFilters`.\n */(e, t) : void fail();\n}\nfunction __PRIVATE_compositeFilterWithAddedFilters(e, t) {\n const n = e.filters.concat(t);\n return CompositeFilter.create(n, e.op);\n}\n\n/** Returns a debug description for `filter`. */\nfunction __PRIVATE_stringifyFilter(e) {\n return e instanceof FieldFilter ? function __PRIVATE_stringifyFieldFilter(e) {\n return `${e.field.canonicalString()} ${e.op} ${canonicalId(e.value)}`;\n }\n /** Filter that matches on key fields (i.e. '__name__'). */(e) : e instanceof CompositeFilter ? function __PRIVATE_stringifyCompositeFilter(e) {\n return e.op.toString() + \" {\" + e.getFilters().map(__PRIVATE_stringifyFilter).join(\" ,\") + \"}\";\n }(e) : \"Filter\";\n}\nclass __PRIVATE_KeyFieldFilter extends FieldFilter {\n constructor(e, t, n) {\n super(e, t, n), this.key = DocumentKey.fromName(n.referenceValue);\n }\n matches(e) {\n const t = DocumentKey.comparator(e.key, this.key);\n return this.matchesComparison(t);\n }\n}\n\n/** Filter that matches on key fields within an array. */\nclass __PRIVATE_KeyFieldInFilter extends FieldFilter {\n constructor(e, t) {\n super(e, \"in\" /* Operator.IN */, t), this.keys = __PRIVATE_extractDocumentKeysFromArrayValue(\"in\" /* Operator.IN */, t);\n }\n matches(e) {\n return this.keys.some(t => t.isEqual(e.key));\n }\n}\n\n/** Filter that matches on key fields not present within an array. */\nclass __PRIVATE_KeyFieldNotInFilter extends FieldFilter {\n constructor(e, t) {\n super(e, \"not-in\" /* Operator.NOT_IN */, t), this.keys = __PRIVATE_extractDocumentKeysFromArrayValue(\"not-in\" /* Operator.NOT_IN */, t);\n }\n matches(e) {\n return !this.keys.some(t => t.isEqual(e.key));\n }\n}\nfunction __PRIVATE_extractDocumentKeysFromArrayValue(e, t) {\n var n;\n return ((null === (n = t.arrayValue) || void 0 === n ? void 0 : n.values) || []).map(e => DocumentKey.fromName(e.referenceValue));\n}\n\n/** A Filter that implements the array-contains operator. */\nclass __PRIVATE_ArrayContainsFilter extends FieldFilter {\n constructor(e, t) {\n super(e, \"array-contains\" /* Operator.ARRAY_CONTAINS */, t);\n }\n matches(e) {\n const t = e.data.field(this.field);\n return isArray(t) && __PRIVATE_arrayValueContains(t.arrayValue, this.value);\n }\n}\n\n/** A Filter that implements the IN operator. */\nclass __PRIVATE_InFilter extends FieldFilter {\n constructor(e, t) {\n super(e, \"in\" /* Operator.IN */, t);\n }\n matches(e) {\n const t = e.data.field(this.field);\n return null !== t && __PRIVATE_arrayValueContains(this.value.arrayValue, t);\n }\n}\n\n/** A Filter that implements the not-in operator. */\nclass __PRIVATE_NotInFilter extends FieldFilter {\n constructor(e, t) {\n super(e, \"not-in\" /* Operator.NOT_IN */, t);\n }\n matches(e) {\n if (__PRIVATE_arrayValueContains(this.value.arrayValue, {\n nullValue: \"NULL_VALUE\"\n })) return !1;\n const t = e.data.field(this.field);\n return null !== t && !__PRIVATE_arrayValueContains(this.value.arrayValue, t);\n }\n}\n\n/** A Filter that implements the array-contains-any operator. */\nclass __PRIVATE_ArrayContainsAnyFilter extends FieldFilter {\n constructor(e, t) {\n super(e, \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */, t);\n }\n matches(e) {\n const t = e.data.field(this.field);\n return !(!isArray(t) || !t.arrayValue.values) && t.arrayValue.values.some(e => __PRIVATE_arrayValueContains(this.value.arrayValue, e));\n }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Visible for testing\nclass __PRIVATE_TargetImpl {\n constructor(e, t = null, n = [], r = [], i = null, s = null, o = null) {\n this.path = e, this.collectionGroup = t, this.orderBy = n, this.filters = r, this.limit = i, this.startAt = s, this.endAt = o, this.ce = null;\n }\n}\n\n/**\n * Initializes a Target with a path and optional additional query constraints.\n * Path must currently be empty if this is a collection group query.\n *\n * NOTE: you should always construct `Target` from `Query.toTarget` instead of\n * using this factory method, because `Query` provides an implicit `orderBy`\n * property.\n */\nfunction __PRIVATE_newTarget(e, t = null, n = [], r = [], i = null, s = null, o = null) {\n return new __PRIVATE_TargetImpl(e, t, n, r, i, s, o);\n}\nfunction __PRIVATE_canonifyTarget(e) {\n const t = __PRIVATE_debugCast(e);\n if (null === t.ce) {\n let e = t.path.canonicalString();\n null !== t.collectionGroup && (e += \"|cg:\" + t.collectionGroup), e += \"|f:\", e += t.filters.map(e => __PRIVATE_canonifyFilter(e)).join(\",\"), e += \"|ob:\", e += t.orderBy.map(e => function __PRIVATE_canonifyOrderBy(e) {\n // TODO(b/29183165): Make this collision robust.\n return e.field.canonicalString() + e.dir;\n }(e)).join(\",\"), __PRIVATE_isNullOrUndefined(t.limit) || (e += \"|l:\", e += t.limit), t.startAt && (e += \"|lb:\", e += t.startAt.inclusive ? \"b:\" : \"a:\", e += t.startAt.position.map(e => canonicalId(e)).join(\",\")), t.endAt && (e += \"|ub:\", e += t.endAt.inclusive ? \"a:\" : \"b:\", e += t.endAt.position.map(e => canonicalId(e)).join(\",\")), t.ce = e;\n }\n return t.ce;\n}\nfunction __PRIVATE_targetEquals(e, t) {\n if (e.limit !== t.limit) return !1;\n if (e.orderBy.length !== t.orderBy.length) return !1;\n for (let n = 0; n < e.orderBy.length; n++) if (!__PRIVATE_orderByEquals(e.orderBy[n], t.orderBy[n])) return !1;\n if (e.filters.length !== t.filters.length) return !1;\n for (let n = 0; n < e.filters.length; n++) if (!__PRIVATE_filterEquals(e.filters[n], t.filters[n])) return !1;\n return e.collectionGroup === t.collectionGroup && !!e.path.isEqual(t.path) && !!__PRIVATE_boundEquals(e.startAt, t.startAt) && __PRIVATE_boundEquals(e.endAt, t.endAt);\n}\nfunction __PRIVATE_targetIsDocumentTarget(e) {\n return DocumentKey.isDocumentKey(e.path) && null === e.collectionGroup && 0 === e.filters.length;\n}\n\n/** Returns the field filters that target the given field path. */\nfunction __PRIVATE_targetGetFieldFiltersForPath(e, t) {\n return e.filters.filter(e => e instanceof FieldFilter && e.field.isEqual(t));\n}\n\n/**\n * Returns the values that are used in ARRAY_CONTAINS or ARRAY_CONTAINS_ANY\n * filters. Returns `null` if there are no such filters.\n */\n/**\n * Returns the value to use as the lower bound for ascending index segment at\n * the provided `fieldPath` (or the upper bound for an descending segment).\n */\nfunction __PRIVATE_targetGetAscendingBound(e, t, n) {\n let r = ne,\n i = !0;\n // Process all filters to find a value for the current field segment\n for (const n of __PRIVATE_targetGetFieldFiltersForPath(e, t)) {\n let e = ne,\n t = !0;\n switch (n.op) {\n case \"<\" /* Operator.LESS_THAN */:\n case \"<=\" /* Operator.LESS_THAN_OR_EQUAL */:\n e = __PRIVATE_valuesGetLowerBound(n.value);\n break;\n case \"==\" /* Operator.EQUAL */:\n case \"in\" /* Operator.IN */:\n case \">=\" /* Operator.GREATER_THAN_OR_EQUAL */:\n e = n.value;\n break;\n case \">\" /* Operator.GREATER_THAN */:\n e = n.value, t = !1;\n break;\n case \"!=\" /* Operator.NOT_EQUAL */:\n case \"not-in\" /* Operator.NOT_IN */:\n e = ne;\n // Remaining filters cannot be used as lower bounds.\n }\n __PRIVATE_lowerBoundCompare({\n value: r,\n inclusive: i\n }, {\n value: e,\n inclusive: t\n }) < 0 && (r = e, i = t);\n }\n // If there is an additional bound, compare the values against the existing\n // range to see if we can narrow the scope.\n if (null !== n) for (let s = 0; s < e.orderBy.length; ++s) {\n if (e.orderBy[s].field.isEqual(t)) {\n const e = n.position[s];\n __PRIVATE_lowerBoundCompare({\n value: r,\n inclusive: i\n }, {\n value: e,\n inclusive: n.inclusive\n }) < 0 && (r = e, i = n.inclusive);\n break;\n }\n }\n return {\n value: r,\n inclusive: i\n };\n}\n\n/**\n * Returns the value to use as the upper bound for ascending index segment at\n * the provided `fieldPath` (or the lower bound for a descending segment).\n */\nfunction __PRIVATE_targetGetDescendingBound(e, t, n) {\n let r = te,\n i = !0;\n // Process all filters to find a value for the current field segment\n for (const n of __PRIVATE_targetGetFieldFiltersForPath(e, t)) {\n let e = te,\n t = !0;\n switch (n.op) {\n case \">=\" /* Operator.GREATER_THAN_OR_EQUAL */:\n case \">\" /* Operator.GREATER_THAN */:\n e = __PRIVATE_valuesGetUpperBound(n.value), t = !1;\n break;\n case \"==\" /* Operator.EQUAL */:\n case \"in\" /* Operator.IN */:\n case \"<=\" /* Operator.LESS_THAN_OR_EQUAL */:\n e = n.value;\n break;\n case \"<\" /* Operator.LESS_THAN */:\n e = n.value, t = !1;\n break;\n case \"!=\" /* Operator.NOT_EQUAL */:\n case \"not-in\" /* Operator.NOT_IN */:\n e = te;\n // Remaining filters cannot be used as upper bounds.\n }\n __PRIVATE_upperBoundCompare({\n value: r,\n inclusive: i\n }, {\n value: e,\n inclusive: t\n }) > 0 && (r = e, i = t);\n }\n // If there is an additional bound, compare the values against the existing\n // range to see if we can narrow the scope.\n if (null !== n) for (let s = 0; s < e.orderBy.length; ++s) {\n if (e.orderBy[s].field.isEqual(t)) {\n const e = n.position[s];\n __PRIVATE_upperBoundCompare({\n value: r,\n inclusive: i\n }, {\n value: e,\n inclusive: n.inclusive\n }) > 0 && (r = e, i = n.inclusive);\n break;\n }\n }\n return {\n value: r,\n inclusive: i\n };\n}\n\n/** Returns the number of segments of a perfect index for this target. */\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Query encapsulates all the query attributes we support in the SDK. It can\n * be run against the LocalStore, as well as be converted to a `Target` to\n * query the RemoteStore results.\n *\n * Visible for testing.\n */\nclass __PRIVATE_QueryImpl {\n /**\n * Initializes a Query with a path and optional additional query constraints.\n * Path must currently be empty if this is a collection group query.\n */\n constructor(e, t = null, n = [], r = [], i = null, s = \"F\" /* LimitType.First */, o = null, _ = null) {\n this.path = e, this.collectionGroup = t, this.explicitOrderBy = n, this.filters = r, this.limit = i, this.limitType = s, this.startAt = o, this.endAt = _, this.le = null,\n // The corresponding `Target` of this `Query` instance, for use with\n // non-aggregate queries.\n this.he = null,\n // The corresponding `Target` of this `Query` instance, for use with\n // aggregate queries. Unlike targets for non-aggregate queries,\n // aggregate query targets do not contain normalized order-bys, they only\n // contain explicit order-bys.\n this.Pe = null, this.startAt, this.endAt;\n }\n}\n\n/** Creates a new Query instance with the options provided. */\nfunction __PRIVATE_newQuery(e, t, n, r, i, s, o, _) {\n return new __PRIVATE_QueryImpl(e, t, n, r, i, s, o, _);\n}\n\n/** Creates a new Query for a query that matches all documents at `path` */\nfunction __PRIVATE_newQueryForPath(e) {\n return new __PRIVATE_QueryImpl(e);\n}\n\n/**\n * Helper to convert a collection group query into a collection query at a\n * specific path. This is used when executing collection group queries, since\n * we have to split the query into a set of collection queries at multiple\n * paths.\n */\n/**\n * Returns true if this query does not specify any query constraints that\n * could remove results.\n */\nfunction __PRIVATE_queryMatchesAllDocuments(e) {\n return 0 === e.filters.length && null === e.limit && null == e.startAt && null == e.endAt && (0 === e.explicitOrderBy.length || 1 === e.explicitOrderBy.length && e.explicitOrderBy[0].field.isKeyField());\n}\n\n// Returns the sorted set of inequality filter fields used in this query.\n/**\n * Returns whether the query matches a collection group rather than a specific\n * collection.\n */\nfunction __PRIVATE_isCollectionGroupQuery(e) {\n return null !== e.collectionGroup;\n}\n\n/**\n * Returns the normalized order-by constraint that is used to execute the Query,\n * which can be different from the order-by constraints the user provided (e.g.\n * the SDK and backend always orders by `__name__`). The normalized order-by\n * includes implicit order-bys in addition to the explicit user provided\n * order-bys.\n */\nfunction __PRIVATE_queryNormalizedOrderBy(e) {\n const t = __PRIVATE_debugCast(e);\n if (null === t.le) {\n t.le = [];\n const e = new Set();\n // Any explicit order by fields should be added as is.\n for (const n of t.explicitOrderBy) t.le.push(n), e.add(n.field.canonicalString());\n // The order of the implicit ordering always matches the last explicit order by.\n const n = t.explicitOrderBy.length > 0 ? t.explicitOrderBy[t.explicitOrderBy.length - 1].dir : \"asc\" /* Direction.ASCENDING */,\n r = function __PRIVATE_getInequalityFilterFields(e) {\n let t = new SortedSet(FieldPath$1.comparator);\n return e.filters.forEach(e => {\n e.getFlattenedFilters().forEach(e => {\n e.isInequality() && (t = t.add(e.field));\n });\n }), t;\n }\n /**\n * Creates a new Query for a collection group query that matches all documents\n * within the provided collection group.\n */(t);\n // Any inequality fields not explicitly ordered should be implicitly ordered in a lexicographical\n // order. When there are multiple inequality filters on the same field, the field should be added\n // only once.\n // Note: `SortedSet` sorts the key field before other fields. However, we want the key\n // field to be sorted last.\n r.forEach(r => {\n e.has(r.canonicalString()) || r.isKeyField() || t.le.push(new OrderBy(r, n));\n }),\n // Add the document key field to the last if it is not explicitly ordered.\n e.has(FieldPath$1.keyField().canonicalString()) || t.le.push(new OrderBy(FieldPath$1.keyField(), n));\n }\n return t.le;\n}\n\n/**\n * Converts this `Query` instance to its corresponding `Target` representation.\n */\nfunction __PRIVATE_queryToTarget(e) {\n const t = __PRIVATE_debugCast(e);\n return t.he || (t.he = __PRIVATE__queryToTarget(t, __PRIVATE_queryNormalizedOrderBy(e))), t.he;\n}\n\n/**\n * Converts this `Query` instance to its corresponding `Target` representation,\n * for use within an aggregate query. Unlike targets for non-aggregate queries,\n * aggregate query targets do not contain normalized order-bys, they only\n * contain explicit order-bys.\n */\nfunction __PRIVATE__queryToTarget(e, t) {\n if (\"F\" /* LimitType.First */ === e.limitType) return __PRIVATE_newTarget(e.path, e.collectionGroup, t, e.filters, e.limit, e.startAt, e.endAt);\n {\n // Flip the orderBy directions since we want the last results\n t = t.map(e => {\n const t = \"desc\" /* Direction.DESCENDING */ === e.dir ? \"asc\" /* Direction.ASCENDING */ : \"desc\" /* Direction.DESCENDING */;\n return new OrderBy(e.field, t);\n });\n // We need to swap the cursors to match the now-flipped query ordering.\n const n = e.endAt ? new Bound(e.endAt.position, e.endAt.inclusive) : null,\n r = e.startAt ? new Bound(e.startAt.position, e.startAt.inclusive) : null;\n // Now return as a LimitType.First query.\n return __PRIVATE_newTarget(e.path, e.collectionGroup, t, e.filters, e.limit, n, r);\n }\n}\nfunction __PRIVATE_queryWithAddedFilter(e, t) {\n const n = e.filters.concat([t]);\n return new __PRIVATE_QueryImpl(e.path, e.collectionGroup, e.explicitOrderBy.slice(), n, e.limit, e.limitType, e.startAt, e.endAt);\n}\nfunction __PRIVATE_queryWithLimit(e, t, n) {\n return new __PRIVATE_QueryImpl(e.path, e.collectionGroup, e.explicitOrderBy.slice(), e.filters.slice(), t, n, e.startAt, e.endAt);\n}\nfunction __PRIVATE_queryEquals(e, t) {\n return __PRIVATE_targetEquals(__PRIVATE_queryToTarget(e), __PRIVATE_queryToTarget(t)) && e.limitType === t.limitType;\n}\n\n// TODO(b/29183165): This is used to get a unique string from a query to, for\n// example, use as a dictionary key, but the implementation is subject to\n// collisions. Make it collision-free.\nfunction __PRIVATE_canonifyQuery(e) {\n return `${__PRIVATE_canonifyTarget(__PRIVATE_queryToTarget(e))}|lt:${e.limitType}`;\n}\nfunction __PRIVATE_stringifyQuery(e) {\n return `Query(target=${function __PRIVATE_stringifyTarget(e) {\n let t = e.path.canonicalString();\n return null !== e.collectionGroup && (t += \" collectionGroup=\" + e.collectionGroup), e.filters.length > 0 && (t += `, filters: [${e.filters.map(e => __PRIVATE_stringifyFilter(e)).join(\", \")}]`), __PRIVATE_isNullOrUndefined(e.limit) || (t += \", limit: \" + e.limit), e.orderBy.length > 0 && (t += `, orderBy: [${e.orderBy.map(e => function __PRIVATE_stringifyOrderBy(e) {\n return `${e.field.canonicalString()} (${e.dir})`;\n }(e)).join(\", \")}]`), e.startAt && (t += \", startAt: \", t += e.startAt.inclusive ? \"b:\" : \"a:\", t += e.startAt.position.map(e => canonicalId(e)).join(\",\")), e.endAt && (t += \", endAt: \", t += e.endAt.inclusive ? \"a:\" : \"b:\", t += e.endAt.position.map(e => canonicalId(e)).join(\",\")), `Target(${t})`;\n }(__PRIVATE_queryToTarget(e))}; limitType=${e.limitType})`;\n}\n\n/** Returns whether `doc` matches the constraints of `query`. */\nfunction __PRIVATE_queryMatches(e, t) {\n return t.isFoundDocument() && function __PRIVATE_queryMatchesPathAndCollectionGroup(e, t) {\n const n = t.key.path;\n return null !== e.collectionGroup ? t.key.hasCollectionId(e.collectionGroup) && e.path.isPrefixOf(n) : DocumentKey.isDocumentKey(e.path) ? e.path.isEqual(n) : e.path.isImmediateParentOf(n);\n }\n /**\n * A document must have a value for every ordering clause in order to show up\n * in the results.\n */(e, t) && function __PRIVATE_queryMatchesOrderBy(e, t) {\n // We must use `queryNormalizedOrderBy()` to get the list of all orderBys (both implicit and explicit).\n // Note that for OR queries, orderBy applies to all disjunction terms and implicit orderBys must\n // be taken into account. For example, the query \"a > 1 || b==1\" has an implicit \"orderBy a\" due\n // to the inequality, and is evaluated as \"a > 1 orderBy a || b==1 orderBy a\".\n // A document with content of {b:1} matches the filters, but does not match the orderBy because\n // it's missing the field 'a'.\n for (const n of __PRIVATE_queryNormalizedOrderBy(e))\n // order-by key always matches\n if (!n.field.isKeyField() && null === t.data.field(n.field)) return !1;\n return !0;\n }(e, t) && function __PRIVATE_queryMatchesFilters(e, t) {\n for (const n of e.filters) if (!n.matches(t)) return !1;\n return !0;\n }\n /** Makes sure a document is within the bounds, if provided. */(e, t) && function __PRIVATE_queryMatchesBounds(e, t) {\n if (e.startAt && !\n /**\n * Returns true if a document sorts before a bound using the provided sort\n * order.\n */\n function __PRIVATE_boundSortsBeforeDocument(e, t, n) {\n const r = __PRIVATE_boundCompareToDocument(e, t, n);\n return e.inclusive ? r <= 0 : r < 0;\n }(e.startAt, __PRIVATE_queryNormalizedOrderBy(e), t)) return !1;\n if (e.endAt && !function __PRIVATE_boundSortsAfterDocument(e, t, n) {\n const r = __PRIVATE_boundCompareToDocument(e, t, n);\n return e.inclusive ? r >= 0 : r > 0;\n }(e.endAt, __PRIVATE_queryNormalizedOrderBy(e), t)) return !1;\n return !0;\n }\n /**\n * Returns the collection group that this query targets.\n *\n * PORTING NOTE: This is only used in the Web SDK to facilitate multi-tab\n * synchronization for query results.\n */(e, t);\n}\nfunction __PRIVATE_queryCollectionGroup(e) {\n return e.collectionGroup || (e.path.length % 2 == 1 ? e.path.lastSegment() : e.path.get(e.path.length - 2));\n}\n\n/**\n * Returns a new comparator function that can be used to compare two documents\n * based on the Query's ordering constraint.\n */\nfunction __PRIVATE_newQueryComparator(e) {\n return (t, n) => {\n let r = !1;\n for (const i of __PRIVATE_queryNormalizedOrderBy(e)) {\n const e = __PRIVATE_compareDocs(i, t, n);\n if (0 !== e) return e;\n r = r || i.field.isKeyField();\n }\n return 0;\n };\n}\nfunction __PRIVATE_compareDocs(e, t, n) {\n const r = e.field.isKeyField() ? DocumentKey.comparator(t.key, n.key) : function __PRIVATE_compareDocumentsByField(e, t, n) {\n const r = t.data.field(e),\n i = n.data.field(e);\n return null !== r && null !== i ? __PRIVATE_valueCompare(r, i) : fail();\n }(e.field, t, n);\n switch (e.dir) {\n case \"asc\" /* Direction.ASCENDING */:\n return r;\n case \"desc\" /* Direction.DESCENDING */:\n return -1 * r;\n default:\n return fail();\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A map implementation that uses objects as keys. Objects must have an\n * associated equals function and must be immutable. Entries in the map are\n * stored together with the key being produced from the mapKeyFn. This map\n * automatically handles collisions of keys.\n */\nclass ObjectMap {\n constructor(e, t) {\n this.mapKeyFn = e, this.equalsFn = t,\n /**\n * The inner map for a key/value pair. Due to the possibility of collisions we\n * keep a list of entries that we do a linear search through to find an actual\n * match. Note that collisions should be rare, so we still expect near\n * constant time lookups in practice.\n */\n this.inner = {}, /** The number of entries stored in the map */\n this.innerSize = 0;\n }\n /** Get a value for this key, or undefined if it does not exist. */\n get(e) {\n const t = this.mapKeyFn(e),\n n = this.inner[t];\n if (void 0 !== n) for (const [t, r] of n) if (this.equalsFn(t, e)) return r;\n }\n has(e) {\n return void 0 !== this.get(e);\n }\n /** Put this key and value in the map. */\n set(e, t) {\n const n = this.mapKeyFn(e),\n r = this.inner[n];\n if (void 0 === r) return this.inner[n] = [[e, t]], void this.innerSize++;\n for (let n = 0; n < r.length; n++) if (this.equalsFn(r[n][0], e))\n // This is updating an existing entry and does not increase `innerSize`.\n return void (r[n] = [e, t]);\n r.push([e, t]), this.innerSize++;\n }\n /**\n * Remove this key from the map. Returns a boolean if anything was deleted.\n */\n delete(e) {\n const t = this.mapKeyFn(e),\n n = this.inner[t];\n if (void 0 === n) return !1;\n for (let r = 0; r < n.length; r++) if (this.equalsFn(n[r][0], e)) return 1 === n.length ? delete this.inner[t] : n.splice(r, 1), this.innerSize--, !0;\n return !1;\n }\n forEach(e) {\n forEach(this.inner, (t, n) => {\n for (const [t, r] of n) e(t, r);\n });\n }\n isEmpty() {\n return isEmpty(this.inner);\n }\n size() {\n return this.innerSize;\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst re = new SortedMap(DocumentKey.comparator);\nfunction __PRIVATE_mutableDocumentMap() {\n return re;\n}\nconst ie = new SortedMap(DocumentKey.comparator);\nfunction documentMap(...e) {\n let t = ie;\n for (const n of e) t = t.insert(n.key, n);\n return t;\n}\nfunction __PRIVATE_convertOverlayedDocumentMapToDocumentMap(e) {\n let t = ie;\n return e.forEach((e, n) => t = t.insert(e, n.overlayedDocument)), t;\n}\nfunction __PRIVATE_newOverlayMap() {\n return __PRIVATE_newDocumentKeyMap();\n}\nfunction __PRIVATE_newMutationMap() {\n return __PRIVATE_newDocumentKeyMap();\n}\nfunction __PRIVATE_newDocumentKeyMap() {\n return new ObjectMap(e => e.toString(), (e, t) => e.isEqual(t));\n}\nconst se = new SortedMap(DocumentKey.comparator);\nconst oe = new SortedSet(DocumentKey.comparator);\nfunction __PRIVATE_documentKeySet(...e) {\n let t = oe;\n for (const n of e) t = t.add(n);\n return t;\n}\nconst _e = new SortedSet(__PRIVATE_primitiveComparator);\nfunction __PRIVATE_targetIdSet() {\n return _e;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Returns an DoubleValue for `value` that is encoded based the serializer's\n * `useProto3Json` setting.\n */\nfunction __PRIVATE_toDouble(e, t) {\n if (e.useProto3Json) {\n if (isNaN(t)) return {\n doubleValue: \"NaN\"\n };\n if (t === 1 / 0) return {\n doubleValue: \"Infinity\"\n };\n if (t === -1 / 0) return {\n doubleValue: \"-Infinity\"\n };\n }\n return {\n doubleValue: __PRIVATE_isNegativeZero(t) ? \"-0\" : t\n };\n}\n\n/**\n * Returns an IntegerValue for `value`.\n */\nfunction __PRIVATE_toInteger(e) {\n return {\n integerValue: \"\" + e\n };\n}\n\n/**\n * Returns a value for a number that's appropriate to put into a proto.\n * The return value is an IntegerValue if it can safely represent the value,\n * otherwise a DoubleValue is returned.\n */\nfunction toNumber(e, t) {\n return isSafeInteger(t) ? __PRIVATE_toInteger(t) : __PRIVATE_toDouble(e, t);\n}\n\n/**\n * @license\n * Copyright 2018 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Used to represent a field transform on a mutation. */\nclass TransformOperation {\n constructor() {\n // Make sure that the structural type of `TransformOperation` is unique.\n // See https://github.com/microsoft/TypeScript/issues/5451\n this._ = void 0;\n }\n}\n\n/**\n * Computes the local transform result against the provided `previousValue`,\n * optionally using the provided localWriteTime.\n */\nfunction __PRIVATE_applyTransformOperationToLocalView(e, t, n) {\n return e instanceof __PRIVATE_ServerTimestampTransform ? function serverTimestamp$1(e, t) {\n const n = {\n fields: {\n __type__: {\n stringValue: \"server_timestamp\"\n },\n __local_write_time__: {\n timestampValue: {\n seconds: e.seconds,\n nanos: e.nanoseconds\n }\n }\n }\n };\n // We should avoid storing deeply nested server timestamp map values\n // because we never use the intermediate \"previous values\".\n // For example:\n // previous: 42L, add: t1, result: t1 -> 42L\n // previous: t1, add: t2, result: t2 -> 42L (NOT t2 -> t1 -> 42L)\n // previous: t2, add: t3, result: t3 -> 42L (NOT t3 -> t2 -> t1 -> 42L)\n // `getPreviousValue` recursively traverses server timestamps to find the\n // least recent Value.\n return t && __PRIVATE_isServerTimestamp(t) && (t = __PRIVATE_getPreviousValue(t)), t && (n.fields.__previous_value__ = t), {\n mapValue: n\n };\n }(n, t) : e instanceof __PRIVATE_ArrayUnionTransformOperation ? __PRIVATE_applyArrayUnionTransformOperation(e, t) : e instanceof __PRIVATE_ArrayRemoveTransformOperation ? __PRIVATE_applyArrayRemoveTransformOperation(e, t) : function __PRIVATE_applyNumericIncrementTransformOperationToLocalView(e, t) {\n // PORTING NOTE: Since JavaScript's integer arithmetic is limited to 53 bit\n // precision and resolves overflows by reducing precision, we do not\n // manually cap overflows at 2^63.\n const n = __PRIVATE_computeTransformOperationBaseValue(e, t),\n r = asNumber(n) + asNumber(e.Ie);\n return isInteger(n) && isInteger(e.Ie) ? __PRIVATE_toInteger(r) : __PRIVATE_toDouble(e.serializer, r);\n }(e, t);\n}\n\n/**\n * Computes a final transform result after the transform has been acknowledged\n * by the server, potentially using the server-provided transformResult.\n */\nfunction __PRIVATE_applyTransformOperationToRemoteDocument(e, t, n) {\n // The server just sends null as the transform result for array operations,\n // so we have to calculate a result the same as we do for local\n // applications.\n return e instanceof __PRIVATE_ArrayUnionTransformOperation ? __PRIVATE_applyArrayUnionTransformOperation(e, t) : e instanceof __PRIVATE_ArrayRemoveTransformOperation ? __PRIVATE_applyArrayRemoveTransformOperation(e, t) : n;\n}\n\n/**\n * If this transform operation is not idempotent, returns the base value to\n * persist for this transform. If a base value is returned, the transform\n * operation is always applied to this base value, even if document has\n * already been updated.\n *\n * Base values provide consistent behavior for non-idempotent transforms and\n * allow us to return the same latency-compensated value even if the backend\n * has already applied the transform operation. The base value is null for\n * idempotent transforms, as they can be re-played even if the backend has\n * already applied them.\n *\n * @returns a base value to store along with the mutation, or null for\n * idempotent transforms.\n */\nfunction __PRIVATE_computeTransformOperationBaseValue(e, t) {\n return e instanceof __PRIVATE_NumericIncrementTransformOperation ? /** Returns true if `value` is either an IntegerValue or a DoubleValue. */\n function __PRIVATE_isNumber(e) {\n return isInteger(e) || function __PRIVATE_isDouble(e) {\n return !!e && \"doubleValue\" in e;\n }(e);\n }(t) ? t : {\n integerValue: 0\n } : null;\n}\n\n/** Transforms a value into a server-generated timestamp. */\nclass __PRIVATE_ServerTimestampTransform extends TransformOperation {}\n\n/** Transforms an array value via a union operation. */\nclass __PRIVATE_ArrayUnionTransformOperation extends TransformOperation {\n constructor(e) {\n super(), this.elements = e;\n }\n}\nfunction __PRIVATE_applyArrayUnionTransformOperation(e, t) {\n const n = __PRIVATE_coercedFieldValuesArray(t);\n for (const t of e.elements) n.some(e => __PRIVATE_valueEquals(e, t)) || n.push(t);\n return {\n arrayValue: {\n values: n\n }\n };\n}\n\n/** Transforms an array value via a remove operation. */\nclass __PRIVATE_ArrayRemoveTransformOperation extends TransformOperation {\n constructor(e) {\n super(), this.elements = e;\n }\n}\nfunction __PRIVATE_applyArrayRemoveTransformOperation(e, t) {\n let n = __PRIVATE_coercedFieldValuesArray(t);\n for (const t of e.elements) n = n.filter(e => !__PRIVATE_valueEquals(e, t));\n return {\n arrayValue: {\n values: n\n }\n };\n}\n\n/**\n * Implements the backend semantics for locally computed NUMERIC_ADD (increment)\n * transforms. Converts all field values to integers or doubles, but unlike the\n * backend does not cap integer values at 2^63. Instead, JavaScript number\n * arithmetic is used and precision loss can occur for values greater than 2^53.\n */\nclass __PRIVATE_NumericIncrementTransformOperation extends TransformOperation {\n constructor(e, t) {\n super(), this.serializer = e, this.Ie = t;\n }\n}\nfunction asNumber(e) {\n return __PRIVATE_normalizeNumber(e.integerValue || e.doubleValue);\n}\nfunction __PRIVATE_coercedFieldValuesArray(e) {\n return isArray(e) && e.arrayValue.values ? e.arrayValue.values.slice() : [];\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** A field path and the TransformOperation to perform upon it. */\nclass FieldTransform {\n constructor(e, t) {\n this.field = e, this.transform = t;\n }\n}\nfunction __PRIVATE_fieldTransformEquals(e, t) {\n return e.field.isEqual(t.field) && function __PRIVATE_transformOperationEquals(e, t) {\n return e instanceof __PRIVATE_ArrayUnionTransformOperation && t instanceof __PRIVATE_ArrayUnionTransformOperation || e instanceof __PRIVATE_ArrayRemoveTransformOperation && t instanceof __PRIVATE_ArrayRemoveTransformOperation ? __PRIVATE_arrayEquals(e.elements, t.elements, __PRIVATE_valueEquals) : e instanceof __PRIVATE_NumericIncrementTransformOperation && t instanceof __PRIVATE_NumericIncrementTransformOperation ? __PRIVATE_valueEquals(e.Ie, t.Ie) : e instanceof __PRIVATE_ServerTimestampTransform && t instanceof __PRIVATE_ServerTimestampTransform;\n }(e.transform, t.transform);\n}\n\n/** The result of successfully applying a mutation to the backend. */\nclass MutationResult {\n constructor(\n /**\n * The version at which the mutation was committed:\n *\n * - For most operations, this is the updateTime in the WriteResult.\n * - For deletes, the commitTime of the WriteResponse (because deletes are\n * not stored and have no updateTime).\n *\n * Note that these versions can be different: No-op writes will not change\n * the updateTime even though the commitTime advances.\n */\n e,\n /**\n * The resulting fields returned from the backend after a mutation\n * containing field transforms has been committed. Contains one FieldValue\n * for each FieldTransform that was in the mutation.\n *\n * Will be empty if the mutation did not contain any field transforms.\n */\n t) {\n this.version = e, this.transformResults = t;\n }\n}\n\n/**\n * Encodes a precondition for a mutation. This follows the model that the\n * backend accepts with the special case of an explicit \"empty\" precondition\n * (meaning no precondition).\n */\nclass Precondition {\n constructor(e, t) {\n this.updateTime = e, this.exists = t;\n }\n /** Creates a new empty Precondition. */\n static none() {\n return new Precondition();\n }\n /** Creates a new Precondition with an exists flag. */\n static exists(e) {\n return new Precondition(void 0, e);\n }\n /** Creates a new Precondition based on a version a document exists at. */\n static updateTime(e) {\n return new Precondition(e);\n }\n /** Returns whether this Precondition is empty. */\n get isNone() {\n return void 0 === this.updateTime && void 0 === this.exists;\n }\n isEqual(e) {\n return this.exists === e.exists && (this.updateTime ? !!e.updateTime && this.updateTime.isEqual(e.updateTime) : !e.updateTime);\n }\n}\n\n/** Returns true if the preconditions is valid for the given document. */\nfunction __PRIVATE_preconditionIsValidForDocument(e, t) {\n return void 0 !== e.updateTime ? t.isFoundDocument() && t.version.isEqual(e.updateTime) : void 0 === e.exists || e.exists === t.isFoundDocument();\n}\n\n/**\n * A mutation describes a self-contained change to a document. Mutations can\n * create, replace, delete, and update subsets of documents.\n *\n * Mutations not only act on the value of the document but also its version.\n *\n * For local mutations (mutations that haven't been committed yet), we preserve\n * the existing version for Set and Patch mutations. For Delete mutations, we\n * reset the version to 0.\n *\n * Here's the expected transition table.\n *\n * MUTATION APPLIED TO RESULTS IN\n *\n * SetMutation Document(v3) Document(v3)\n * SetMutation NoDocument(v3) Document(v0)\n * SetMutation InvalidDocument(v0) Document(v0)\n * PatchMutation Document(v3) Document(v3)\n * PatchMutation NoDocument(v3) NoDocument(v3)\n * PatchMutation InvalidDocument(v0) UnknownDocument(v3)\n * DeleteMutation Document(v3) NoDocument(v0)\n * DeleteMutation NoDocument(v3) NoDocument(v0)\n * DeleteMutation InvalidDocument(v0) NoDocument(v0)\n *\n * For acknowledged mutations, we use the updateTime of the WriteResponse as\n * the resulting version for Set and Patch mutations. As deletes have no\n * explicit update time, we use the commitTime of the WriteResponse for\n * Delete mutations.\n *\n * If a mutation is acknowledged by the backend but fails the precondition check\n * locally, we transition to an `UnknownDocument` and rely on Watch to send us\n * the updated version.\n *\n * Field transforms are used only with Patch and Set Mutations. We use the\n * `updateTransforms` message to store transforms, rather than the `transforms`s\n * messages.\n *\n * ## Subclassing Notes\n *\n * Every type of mutation needs to implement its own applyToRemoteDocument() and\n * applyToLocalView() to implement the actual behavior of applying the mutation\n * to some source document (see `setMutationApplyToRemoteDocument()` for an\n * example).\n */\nclass Mutation {}\n\n/**\n * A utility method to calculate a `Mutation` representing the overlay from the\n * final state of the document, and a `FieldMask` representing the fields that\n * are mutated by the local mutations.\n */\nfunction __PRIVATE_calculateOverlayMutation(e, t) {\n if (!e.hasLocalMutations || t && 0 === t.fields.length) return null;\n // mask is null when sets or deletes are applied to the current document.\n if (null === t) return e.isNoDocument() ? new __PRIVATE_DeleteMutation(e.key, Precondition.none()) : new __PRIVATE_SetMutation(e.key, e.data, Precondition.none());\n {\n const n = e.data,\n r = ObjectValue.empty();\n let i = new SortedSet(FieldPath$1.comparator);\n for (let e of t.fields) if (!i.has(e)) {\n let t = n.field(e);\n // If we are deleting a nested field, we take the immediate parent as\n // the mask used to construct the resulting mutation.\n // Justification: Nested fields can create parent fields implicitly. If\n // only a leaf entry is deleted in later mutations, the parent field\n // should still remain, but we may have lost this information.\n // Consider mutation (foo.bar 1), then mutation (foo.bar delete()).\n // This leaves the final result (foo, {}). Despite the fact that `doc`\n // has the correct result, `foo` is not in `mask`, and the resulting\n // mutation would miss `foo`.\n null === t && e.length > 1 && (e = e.popLast(), t = n.field(e)), null === t ? r.delete(e) : r.set(e, t), i = i.add(e);\n }\n return new __PRIVATE_PatchMutation(e.key, r, new FieldMask(i.toArray()), Precondition.none());\n }\n}\n\n/**\n * Applies this mutation to the given document for the purposes of computing a\n * new remote document. If the input document doesn't match the expected state\n * (e.g. it is invalid or outdated), the document type may transition to\n * unknown.\n *\n * @param mutation - The mutation to apply.\n * @param document - The document to mutate. The input document can be an\n * invalid document if the client has no knowledge of the pre-mutation state\n * of the document.\n * @param mutationResult - The result of applying the mutation from the backend.\n */\nfunction __PRIVATE_mutationApplyToRemoteDocument(e, t, n) {\n e instanceof __PRIVATE_SetMutation ? function __PRIVATE_setMutationApplyToRemoteDocument(e, t, n) {\n // Unlike setMutationApplyToLocalView, if we're applying a mutation to a\n // remote document the server has accepted the mutation so the precondition\n // must have held.\n const r = e.value.clone(),\n i = __PRIVATE_serverTransformResults(e.fieldTransforms, t, n.transformResults);\n r.setAll(i), t.convertToFoundDocument(n.version, r).setHasCommittedMutations();\n }(e, t, n) : e instanceof __PRIVATE_PatchMutation ? function __PRIVATE_patchMutationApplyToRemoteDocument(e, t, n) {\n if (!__PRIVATE_preconditionIsValidForDocument(e.precondition, t))\n // Since the mutation was not rejected, we know that the precondition\n // matched on the backend. We therefore must not have the expected version\n // of the document in our cache and convert to an UnknownDocument with a\n // known updateTime.\n return void t.convertToUnknownDocument(n.version);\n const r = __PRIVATE_serverTransformResults(e.fieldTransforms, t, n.transformResults),\n i = t.data;\n i.setAll(__PRIVATE_getPatch(e)), i.setAll(r), t.convertToFoundDocument(n.version, i).setHasCommittedMutations();\n }(e, t, n) : function __PRIVATE_deleteMutationApplyToRemoteDocument(e, t, n) {\n // Unlike applyToLocalView, if we're applying a mutation to a remote\n // document the server has accepted the mutation so the precondition must\n // have held.\n t.convertToNoDocument(n.version).setHasCommittedMutations();\n }(0, t, n);\n}\n\n/**\n * Applies this mutation to the given document for the purposes of computing\n * the new local view of a document. If the input document doesn't match the\n * expected state, the document is not modified.\n *\n * @param mutation - The mutation to apply.\n * @param document - The document to mutate. The input document can be an\n * invalid document if the client has no knowledge of the pre-mutation state\n * of the document.\n * @param previousMask - The fields that have been updated before applying this mutation.\n * @param localWriteTime - A timestamp indicating the local write time of the\n * batch this mutation is a part of.\n * @returns A `FieldMask` representing the fields that are changed by applying this mutation.\n */\nfunction __PRIVATE_mutationApplyToLocalView(e, t, n, r) {\n return e instanceof __PRIVATE_SetMutation ? function __PRIVATE_setMutationApplyToLocalView(e, t, n, r) {\n if (!__PRIVATE_preconditionIsValidForDocument(e.precondition, t))\n // The mutation failed to apply (e.g. a document ID created with add()\n // caused a name collision).\n return n;\n const i = e.value.clone(),\n s = __PRIVATE_localTransformResults(e.fieldTransforms, r, t);\n return i.setAll(s), t.convertToFoundDocument(t.version, i).setHasLocalMutations(), null;\n // SetMutation overwrites all fields.\n }\n /**\n * A mutation that modifies fields of the document at the given key with the\n * given values. The values are applied through a field mask:\n *\n * * When a field is in both the mask and the values, the corresponding field\n * is updated.\n * * When a field is in neither the mask nor the values, the corresponding\n * field is unmodified.\n * * When a field is in the mask but not in the values, the corresponding field\n * is deleted.\n * * When a field is not in the mask but is in the values, the values map is\n * ignored.\n */(e, t, n, r) : e instanceof __PRIVATE_PatchMutation ? function __PRIVATE_patchMutationApplyToLocalView(e, t, n, r) {\n if (!__PRIVATE_preconditionIsValidForDocument(e.precondition, t)) return n;\n const i = __PRIVATE_localTransformResults(e.fieldTransforms, r, t),\n s = t.data;\n if (s.setAll(__PRIVATE_getPatch(e)), s.setAll(i), t.convertToFoundDocument(t.version, s).setHasLocalMutations(), null === n) return null;\n return n.unionWith(e.fieldMask.fields).unionWith(e.fieldTransforms.map(e => e.field));\n }\n /**\n * Returns a FieldPath/Value map with the content of the PatchMutation.\n */(e, t, n, r) : function __PRIVATE_deleteMutationApplyToLocalView(e, t, n) {\n if (__PRIVATE_preconditionIsValidForDocument(e.precondition, t)) return t.convertToNoDocument(t.version).setHasLocalMutations(), null;\n return n;\n }\n /**\n * A mutation that verifies the existence of the document at the given key with\n * the provided precondition.\n *\n * The `verify` operation is only used in Transactions, and this class serves\n * primarily to facilitate serialization into protos.\n */(e, t, n);\n}\n\n/**\n * If this mutation is not idempotent, returns the base value to persist with\n * this mutation. If a base value is returned, the mutation is always applied\n * to this base value, even if document has already been updated.\n *\n * The base value is a sparse object that consists of only the document\n * fields for which this mutation contains a non-idempotent transformation\n * (e.g. a numeric increment). The provided value guarantees consistent\n * behavior for non-idempotent transforms and allow us to return the same\n * latency-compensated value even if the backend has already applied the\n * mutation. The base value is null for idempotent mutations, as they can be\n * re-played even if the backend has already applied them.\n *\n * @returns a base value to store along with the mutation, or null for\n * idempotent mutations.\n */\nfunction __PRIVATE_mutationExtractBaseValue(e, t) {\n let n = null;\n for (const r of e.fieldTransforms) {\n const e = t.data.field(r.field),\n i = __PRIVATE_computeTransformOperationBaseValue(r.transform, e || null);\n null != i && (null === n && (n = ObjectValue.empty()), n.set(r.field, i));\n }\n return n || null;\n}\nfunction __PRIVATE_mutationEquals(e, t) {\n return e.type === t.type && !!e.key.isEqual(t.key) && !!e.precondition.isEqual(t.precondition) && !!function __PRIVATE_fieldTransformsAreEqual(e, t) {\n return void 0 === e && void 0 === t || !(!e || !t) && __PRIVATE_arrayEquals(e, t, (e, t) => __PRIVATE_fieldTransformEquals(e, t));\n }(e.fieldTransforms, t.fieldTransforms) && (0 /* MutationType.Set */ === e.type ? e.value.isEqual(t.value) : 1 /* MutationType.Patch */ !== e.type || e.data.isEqual(t.data) && e.fieldMask.isEqual(t.fieldMask));\n}\n\n/**\n * A mutation that creates or replaces the document at the given key with the\n * object value contents.\n */\nclass __PRIVATE_SetMutation extends Mutation {\n constructor(e, t, n, r = []) {\n super(), this.key = e, this.value = t, this.precondition = n, this.fieldTransforms = r, this.type = 0 /* MutationType.Set */;\n }\n getFieldMask() {\n return null;\n }\n}\nclass __PRIVATE_PatchMutation extends Mutation {\n constructor(e, t, n, r, i = []) {\n super(), this.key = e, this.data = t, this.fieldMask = n, this.precondition = r, this.fieldTransforms = i, this.type = 1 /* MutationType.Patch */;\n }\n getFieldMask() {\n return this.fieldMask;\n }\n}\nfunction __PRIVATE_getPatch(e) {\n const t = new Map();\n return e.fieldMask.fields.forEach(n => {\n if (!n.isEmpty()) {\n const r = e.data.field(n);\n t.set(n, r);\n }\n }), t;\n}\n\n/**\n * Creates a list of \"transform results\" (a transform result is a field value\n * representing the result of applying a transform) for use after a mutation\n * containing transforms has been acknowledged by the server.\n *\n * @param fieldTransforms - The field transforms to apply the result to.\n * @param mutableDocument - The current state of the document after applying all\n * previous mutations.\n * @param serverTransformResults - The transform results received by the server.\n * @returns The transform results list.\n */\nfunction __PRIVATE_serverTransformResults(e, t, n) {\n const r = new Map();\n __PRIVATE_hardAssert(e.length === n.length);\n for (let i = 0; i < n.length; i++) {\n const s = e[i],\n o = s.transform,\n _ = t.data.field(s.field);\n r.set(s.field, __PRIVATE_applyTransformOperationToRemoteDocument(o, _, n[i]));\n }\n return r;\n}\n\n/**\n * Creates a list of \"transform results\" (a transform result is a field value\n * representing the result of applying a transform) for use when applying a\n * transform locally.\n *\n * @param fieldTransforms - The field transforms to apply the result to.\n * @param localWriteTime - The local time of the mutation (used to\n * generate ServerTimestampValues).\n * @param mutableDocument - The document to apply transforms on.\n * @returns The transform results list.\n */\nfunction __PRIVATE_localTransformResults(e, t, n) {\n const r = new Map();\n for (const i of e) {\n const e = i.transform,\n s = n.data.field(i.field);\n r.set(i.field, __PRIVATE_applyTransformOperationToLocalView(e, s, t));\n }\n return r;\n}\n\n/** A mutation that deletes the document at the given key. */\nclass __PRIVATE_DeleteMutation extends Mutation {\n constructor(e, t) {\n super(), this.key = e, this.precondition = t, this.type = 2 /* MutationType.Delete */, this.fieldTransforms = [];\n }\n getFieldMask() {\n return null;\n }\n}\nclass __PRIVATE_VerifyMutation extends Mutation {\n constructor(e, t) {\n super(), this.key = e, this.precondition = t, this.type = 3 /* MutationType.Verify */, this.fieldTransforms = [];\n }\n getFieldMask() {\n return null;\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A batch of mutations that will be sent as one unit to the backend.\n */\nclass MutationBatch {\n /**\n * @param batchId - The unique ID of this mutation batch.\n * @param localWriteTime - The original write time of this mutation.\n * @param baseMutations - Mutations that are used to populate the base\n * values when this mutation is applied locally. This can be used to locally\n * overwrite values that are persisted in the remote document cache. Base\n * mutations are never sent to the backend.\n * @param mutations - The user-provided mutations in this mutation batch.\n * User-provided mutations are applied both locally and remotely on the\n * backend.\n */\n constructor(e, t, n, r) {\n this.batchId = e, this.localWriteTime = t, this.baseMutations = n, this.mutations = r;\n }\n /**\n * Applies all the mutations in this MutationBatch to the specified document\n * to compute the state of the remote document\n *\n * @param document - The document to apply mutations to.\n * @param batchResult - The result of applying the MutationBatch to the\n * backend.\n */\n applyToRemoteDocument(e, t) {\n const n = t.mutationResults;\n for (let t = 0; t < this.mutations.length; t++) {\n const r = this.mutations[t];\n if (r.key.isEqual(e.key)) {\n __PRIVATE_mutationApplyToRemoteDocument(r, e, n[t]);\n }\n }\n }\n /**\n * Computes the local view of a document given all the mutations in this\n * batch.\n *\n * @param document - The document to apply mutations to.\n * @param mutatedFields - Fields that have been updated before applying this mutation batch.\n * @returns A `FieldMask` representing all the fields that are mutated.\n */\n applyToLocalView(e, t) {\n // First, apply the base state. This allows us to apply non-idempotent\n // transform against a consistent set of values.\n for (const n of this.baseMutations) n.key.isEqual(e.key) && (t = __PRIVATE_mutationApplyToLocalView(n, e, t, this.localWriteTime));\n // Second, apply all user-provided mutations.\n for (const n of this.mutations) n.key.isEqual(e.key) && (t = __PRIVATE_mutationApplyToLocalView(n, e, t, this.localWriteTime));\n return t;\n }\n /**\n * Computes the local view for all provided documents given the mutations in\n * this batch. Returns a `DocumentKey` to `Mutation` map which can be used to\n * replace all the mutation applications.\n */\n applyToLocalDocumentSet(e, t) {\n // TODO(mrschmidt): This implementation is O(n^2). If we apply the mutations\n // directly (as done in `applyToLocalView()`), we can reduce the complexity\n // to O(n).\n const n = __PRIVATE_newMutationMap();\n return this.mutations.forEach(r => {\n const i = e.get(r.key),\n s = i.overlayedDocument;\n // TODO(mutabledocuments): This method should take a MutableDocumentMap\n // and we should remove this cast.\n let o = this.applyToLocalView(s, i.mutatedFields);\n // Set mutatedFields to null if the document is only from local mutations.\n // This creates a Set or Delete mutation, instead of trying to create a\n // patch mutation as the overlay.\n o = t.has(r.key) ? null : o;\n const _ = __PRIVATE_calculateOverlayMutation(s, o);\n null !== _ && n.set(r.key, _), s.isValidDocument() || s.convertToNoDocument(SnapshotVersion.min());\n }), n;\n }\n keys() {\n return this.mutations.reduce((e, t) => e.add(t.key), __PRIVATE_documentKeySet());\n }\n isEqual(e) {\n return this.batchId === e.batchId && __PRIVATE_arrayEquals(this.mutations, e.mutations, (e, t) => __PRIVATE_mutationEquals(e, t)) && __PRIVATE_arrayEquals(this.baseMutations, e.baseMutations, (e, t) => __PRIVATE_mutationEquals(e, t));\n }\n}\n\n/** The result of applying a mutation batch to the backend. */\nclass MutationBatchResult {\n constructor(e, t, n,\n /**\n * A pre-computed mapping from each mutated document to the resulting\n * version.\n */\n r) {\n this.batch = e, this.commitVersion = t, this.mutationResults = n, this.docVersions = r;\n }\n /**\n * Creates a new MutationBatchResult for the given batch and results. There\n * must be one result for each mutation in the batch. This static factory\n * caches a document=>version mapping (docVersions).\n */\n static from(e, t, n) {\n __PRIVATE_hardAssert(e.mutations.length === n.length);\n let r = function __PRIVATE_documentVersionMap() {\n return se;\n }();\n const i = e.mutations;\n for (let e = 0; e < i.length; e++) r = r.insert(i[e].key, n[e].version);\n return new MutationBatchResult(e, t, n, r);\n }\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Representation of an overlay computed by Firestore.\n *\n * Holds information about a mutation and the largest batch id in Firestore when\n * the mutation was created.\n */\nclass Overlay {\n constructor(e, t) {\n this.largestBatchId = e, this.mutation = t;\n }\n getKey() {\n return this.mutation.key;\n }\n isEqual(e) {\n return null !== e && this.mutation === e.mutation;\n }\n toString() {\n return `Overlay{\\n largestBatchId: ${this.largestBatchId},\\n mutation: ${this.mutation.toString()}\\n }`;\n }\n}\n\n/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Concrete implementation of the Aggregate type.\n */\nclass __PRIVATE_AggregateImpl {\n constructor(e, t, n) {\n this.alias = e, this.aggregateType = t, this.fieldPath = n;\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass ExistenceFilter {\n constructor(e, t) {\n this.count = e, this.unchangedNames = t;\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Error Codes describing the different ways GRPC can fail. These are copied\n * directly from GRPC's sources here:\n *\n * https://github.com/grpc/grpc/blob/bceec94ea4fc5f0085d81235d8e1c06798dc341a/include/grpc%2B%2B/impl/codegen/status_code_enum.h\n *\n * Important! The names of these identifiers matter because the string forms\n * are used for reverse lookups from the webchannel stream. Do NOT change the\n * names of these identifiers or change this into a const enum.\n */\nvar ae, ue;\n\n/**\n * Determines whether an error code represents a permanent error when received\n * in response to a non-write operation.\n *\n * See isPermanentWriteError for classifying write errors.\n */\nfunction __PRIVATE_isPermanentError(e) {\n switch (e) {\n default:\n return fail();\n case D.CANCELLED:\n case D.UNKNOWN:\n case D.DEADLINE_EXCEEDED:\n case D.RESOURCE_EXHAUSTED:\n case D.INTERNAL:\n case D.UNAVAILABLE:\n // Unauthenticated means something went wrong with our token and we need\n // to retry with new credentials which will happen automatically.\n case D.UNAUTHENTICATED:\n return !1;\n case D.INVALID_ARGUMENT:\n case D.NOT_FOUND:\n case D.ALREADY_EXISTS:\n case D.PERMISSION_DENIED:\n case D.FAILED_PRECONDITION:\n // Aborted might be retried in some scenarios, but that is dependant on\n // the context and should handled individually by the calling code.\n // See https://cloud.google.com/apis/design/errors.\n case D.ABORTED:\n case D.OUT_OF_RANGE:\n case D.UNIMPLEMENTED:\n case D.DATA_LOSS:\n return !0;\n }\n}\n\n/**\n * Determines whether an error code represents a permanent error when received\n * in response to a write operation.\n *\n * Write operations must be handled specially because as of b/119437764, ABORTED\n * errors on the write stream should be retried too (even though ABORTED errors\n * are not generally retryable).\n *\n * Note that during the initial handshake on the write stream an ABORTED error\n * signals that we should discard our stream token (i.e. it is permanent). This\n * means a handshake error should be classified with isPermanentError, above.\n */\n/**\n * Maps an error Code from GRPC status code number, like 0, 1, or 14. These\n * are not the same as HTTP status codes.\n *\n * @returns The Code equivalent to the given GRPC status code. Fails if there\n * is no match.\n */\nfunction __PRIVATE_mapCodeFromRpcCode(e) {\n if (void 0 === e)\n // This shouldn't normally happen, but in certain error cases (like trying\n // to send invalid proto messages) we may get an error with no GRPC code.\n return __PRIVATE_logError(\"GRPC error has no .code\"), D.UNKNOWN;\n switch (e) {\n case ae.OK:\n return D.OK;\n case ae.CANCELLED:\n return D.CANCELLED;\n case ae.UNKNOWN:\n return D.UNKNOWN;\n case ae.DEADLINE_EXCEEDED:\n return D.DEADLINE_EXCEEDED;\n case ae.RESOURCE_EXHAUSTED:\n return D.RESOURCE_EXHAUSTED;\n case ae.INTERNAL:\n return D.INTERNAL;\n case ae.UNAVAILABLE:\n return D.UNAVAILABLE;\n case ae.UNAUTHENTICATED:\n return D.UNAUTHENTICATED;\n case ae.INVALID_ARGUMENT:\n return D.INVALID_ARGUMENT;\n case ae.NOT_FOUND:\n return D.NOT_FOUND;\n case ae.ALREADY_EXISTS:\n return D.ALREADY_EXISTS;\n case ae.PERMISSION_DENIED:\n return D.PERMISSION_DENIED;\n case ae.FAILED_PRECONDITION:\n return D.FAILED_PRECONDITION;\n case ae.ABORTED:\n return D.ABORTED;\n case ae.OUT_OF_RANGE:\n return D.OUT_OF_RANGE;\n case ae.UNIMPLEMENTED:\n return D.UNIMPLEMENTED;\n case ae.DATA_LOSS:\n return D.DATA_LOSS;\n default:\n return fail();\n }\n}\n\n/**\n * Converts an HTTP response's error status to the equivalent error code.\n *\n * @param status - An HTTP error response status (\"FAILED_PRECONDITION\",\n * \"UNKNOWN\", etc.)\n * @returns The equivalent Code. Non-matching responses are mapped to\n * Code.UNKNOWN.\n */\n(ue = ae || (ae = {}))[ue.OK = 0] = \"OK\", ue[ue.CANCELLED = 1] = \"CANCELLED\", ue[ue.UNKNOWN = 2] = \"UNKNOWN\", ue[ue.INVALID_ARGUMENT = 3] = \"INVALID_ARGUMENT\", ue[ue.DEADLINE_EXCEEDED = 4] = \"DEADLINE_EXCEEDED\", ue[ue.NOT_FOUND = 5] = \"NOT_FOUND\", ue[ue.ALREADY_EXISTS = 6] = \"ALREADY_EXISTS\", ue[ue.PERMISSION_DENIED = 7] = \"PERMISSION_DENIED\", ue[ue.UNAUTHENTICATED = 16] = \"UNAUTHENTICATED\", ue[ue.RESOURCE_EXHAUSTED = 8] = \"RESOURCE_EXHAUSTED\", ue[ue.FAILED_PRECONDITION = 9] = \"FAILED_PRECONDITION\", ue[ue.ABORTED = 10] = \"ABORTED\", ue[ue.OUT_OF_RANGE = 11] = \"OUT_OF_RANGE\", ue[ue.UNIMPLEMENTED = 12] = \"UNIMPLEMENTED\", ue[ue.INTERNAL = 13] = \"INTERNAL\", ue[ue.UNAVAILABLE = 14] = \"UNAVAILABLE\", ue[ue.DATA_LOSS = 15] = \"DATA_LOSS\";\n\n/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The global, singleton instance of TestingHooksSpi.\n *\n * This variable will be `null` in all cases _except_ when running from\n * integration tests that have registered callbacks to be notified of events\n * that happen during the test execution.\n */\nlet ce = null;\n\n/**\n * Sets the value of the `testingHooksSpi` object.\n * @param instance the instance to set.\n */\n/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An instance of the Platform's 'TextEncoder' implementation.\n */\nfunction __PRIVATE_newTextEncoder() {\n return new TextEncoder();\n}\n\n/**\n * An instance of the Platform's 'TextDecoder' implementation.\n */\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst le = new Integer([4294967295, 4294967295], 0);\n\n// Hash a string using md5 hashing algorithm.\nfunction __PRIVATE_getMd5HashValue(e) {\n const t = __PRIVATE_newTextEncoder().encode(e),\n n = new Md5();\n return n.update(t), new Uint8Array(n.digest());\n}\n\n// Interpret the 16 bytes array as two 64-bit unsigned integers, encoded using\n// 2’s complement using little endian.\nfunction __PRIVATE_get64BitUints(e) {\n const t = new DataView(e.buffer),\n n = t.getUint32(0, /* littleEndian= */!0),\n r = t.getUint32(4, /* littleEndian= */!0),\n i = t.getUint32(8, /* littleEndian= */!0),\n s = t.getUint32(12, /* littleEndian= */!0);\n return [new Integer([n, r], 0), new Integer([i, s], 0)];\n}\nclass BloomFilter {\n constructor(e, t, n) {\n if (this.bitmap = e, this.padding = t, this.hashCount = n, t < 0 || t >= 8) throw new __PRIVATE_BloomFilterError(`Invalid padding: ${t}`);\n if (n < 0) throw new __PRIVATE_BloomFilterError(`Invalid hash count: ${n}`);\n if (e.length > 0 && 0 === this.hashCount)\n // Only empty bloom filter can have 0 hash count.\n throw new __PRIVATE_BloomFilterError(`Invalid hash count: ${n}`);\n if (0 === e.length && 0 !== t)\n // Empty bloom filter should have 0 padding.\n throw new __PRIVATE_BloomFilterError(`Invalid padding when bitmap length is 0: ${t}`);\n this.Te = 8 * e.length - t,\n // Set the bit count in Integer to avoid repetition in mightContain().\n this.Ee = Integer.fromNumber(this.Te);\n }\n // Calculate the ith hash value based on the hashed 64bit integers,\n // and calculate its corresponding bit index in the bitmap to be checked.\n de(e, t, n) {\n // Calculate hashed value h(i) = h1 + (i * h2).\n let r = e.add(t.multiply(Integer.fromNumber(n)));\n // Wrap if hash value overflow 64bit.\n return 1 === r.compare(le) && (r = new Integer([r.getBits(0), r.getBits(1)], 0)), r.modulo(this.Ee).toNumber();\n }\n // Return whether the bit on the given index in the bitmap is set to 1.\n Ae(e) {\n return 0 != (this.bitmap[Math.floor(e / 8)] & 1 << e % 8);\n }\n mightContain(e) {\n // Empty bitmap should always return false on membership check.\n if (0 === this.Te) return !1;\n const t = __PRIVATE_getMd5HashValue(e),\n [n, r] = __PRIVATE_get64BitUints(t);\n for (let e = 0; e < this.hashCount; e++) {\n const t = this.de(n, r, e);\n if (!this.Ae(t)) return !1;\n }\n return !0;\n }\n /** Create bloom filter for testing purposes only. */\n static create(e, t, n) {\n const r = e % 8 == 0 ? 0 : 8 - e % 8,\n i = new Uint8Array(Math.ceil(e / 8)),\n s = new BloomFilter(i, r, t);\n return n.forEach(e => s.insert(e)), s;\n }\n insert(e) {\n if (0 === this.Te) return;\n const t = __PRIVATE_getMd5HashValue(e),\n [n, r] = __PRIVATE_get64BitUints(t);\n for (let e = 0; e < this.hashCount; e++) {\n const t = this.de(n, r, e);\n this.Re(t);\n }\n }\n Re(e) {\n const t = Math.floor(e / 8),\n n = e % 8;\n this.bitmap[t] |= 1 << n;\n }\n}\nclass __PRIVATE_BloomFilterError extends Error {\n constructor() {\n super(...arguments), this.name = \"BloomFilterError\";\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An event from the RemoteStore. It is split into targetChanges (changes to the\n * state or the set of documents in our watched targets) and documentUpdates\n * (changes to the actual documents).\n */\nclass RemoteEvent {\n constructor(\n /**\n * The snapshot version this event brings us up to, or MIN if not set.\n */\n e,\n /**\n * A map from target to changes to the target. See TargetChange.\n */\n t,\n /**\n * A map of targets that is known to be inconsistent, and the purpose for\n * re-listening. Listens for these targets should be re-established without\n * resume tokens.\n */\n n,\n /**\n * A set of which documents have changed or been deleted, along with the\n * doc's new values (if not deleted).\n */\n r,\n /**\n * A set of which document updates are due only to limbo resolution targets.\n */\n i) {\n this.snapshotVersion = e, this.targetChanges = t, this.targetMismatches = n, this.documentUpdates = r, this.resolvedLimboDocuments = i;\n }\n /**\n * HACK: Views require RemoteEvents in order to determine whether the view is\n * CURRENT, but secondary tabs don't receive remote events. So this method is\n * used to create a synthesized RemoteEvent that can be used to apply a\n * CURRENT status change to a View, for queries executed in a different tab.\n */\n // PORTING NOTE: Multi-tab only\n static createSynthesizedRemoteEventForCurrentChange(e, t, n) {\n const r = new Map();\n return r.set(e, TargetChange.createSynthesizedTargetChangeForCurrentChange(e, t, n)), new RemoteEvent(SnapshotVersion.min(), r, new SortedMap(__PRIVATE_primitiveComparator), __PRIVATE_mutableDocumentMap(), __PRIVATE_documentKeySet());\n }\n}\n\n/**\n * A TargetChange specifies the set of changes for a specific target as part of\n * a RemoteEvent. These changes track which documents are added, modified or\n * removed, as well as the target's resume token and whether the target is\n * marked CURRENT.\n * The actual changes *to* documents are not part of the TargetChange since\n * documents may be part of multiple targets.\n */\nclass TargetChange {\n constructor(\n /**\n * An opaque, server-assigned token that allows watching a query to be resumed\n * after disconnecting without retransmitting all the data that matches the\n * query. The resume token essentially identifies a point in time from which\n * the server should resume sending results.\n */\n e,\n /**\n * The \"current\" (synced) status of this target. Note that \"current\"\n * has special meaning in the RPC protocol that implies that a target is\n * both up-to-date and consistent with the rest of the watch stream.\n */\n t,\n /**\n * The set of documents that were newly assigned to this target as part of\n * this remote event.\n */\n n,\n /**\n * The set of documents that were already assigned to this target but received\n * an update during this remote event.\n */\n r,\n /**\n * The set of documents that were removed from this target as part of this\n * remote event.\n */\n i) {\n this.resumeToken = e, this.current = t, this.addedDocuments = n, this.modifiedDocuments = r, this.removedDocuments = i;\n }\n /**\n * This method is used to create a synthesized TargetChanges that can be used to\n * apply a CURRENT status change to a View (for queries executed in a different\n * tab) or for new queries (to raise snapshots with correct CURRENT status).\n */\n static createSynthesizedTargetChangeForCurrentChange(e, t, n) {\n return new TargetChange(n, t, __PRIVATE_documentKeySet(), __PRIVATE_documentKeySet(), __PRIVATE_documentKeySet());\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Represents a changed document and a list of target ids to which this change\n * applies.\n *\n * If document has been deleted NoDocument will be provided.\n */\nclass __PRIVATE_DocumentWatchChange {\n constructor( /** The new document applies to all of these targets. */\n e, /** The new document is removed from all of these targets. */\n t, /** The key of the document for this change. */\n n,\n /**\n * The new document or NoDocument if it was deleted. Is null if the\n * document went out of view without the server sending a new document.\n */\n r) {\n this.Ve = e, this.removedTargetIds = t, this.key = n, this.me = r;\n }\n}\nclass __PRIVATE_ExistenceFilterChange {\n constructor(e, t) {\n this.targetId = e, this.fe = t;\n }\n}\nclass __PRIVATE_WatchTargetChange {\n constructor( /** What kind of change occurred to the watch target. */\n e, /** The target IDs that were added/removed/set. */\n t,\n /**\n * An opaque, server-assigned token that allows watching a target to be\n * resumed after disconnecting without retransmitting all the data that\n * matches the target. The resume token essentially identifies a point in\n * time from which the server should resume sending results.\n */\n n = ByteString.EMPTY_BYTE_STRING\n /** An RPC error indicating why the watch failed. */, r = null) {\n this.state = e, this.targetIds = t, this.resumeToken = n, this.cause = r;\n }\n}\n\n/** Tracks the internal state of a Watch target. */\nclass __PRIVATE_TargetState {\n constructor() {\n /**\n * The number of pending responses (adds or removes) that we are waiting on.\n * We only consider targets active that have no pending responses.\n */\n this.ge = 0,\n /**\n * Keeps track of the document changes since the last raised snapshot.\n *\n * These changes are continuously updated as we receive document updates and\n * always reflect the current set of changes against the last issued snapshot.\n */\n this.pe = __PRIVATE_snapshotChangesMap(), /** See public getters for explanations of these fields. */\n this.ye = ByteString.EMPTY_BYTE_STRING, this.we = !1,\n /**\n * Whether this target state should be included in the next snapshot. We\n * initialize to true so that newly-added targets are included in the next\n * RemoteEvent.\n */\n this.Se = !0;\n }\n /**\n * Whether this target has been marked 'current'.\n *\n * 'Current' has special meaning in the RPC protocol: It implies that the\n * Watch backend has sent us all changes up to the point at which the target\n * was added and that the target is consistent with the rest of the watch\n * stream.\n */\n get current() {\n return this.we;\n }\n /** The last resume token sent to us for this target. */\n get resumeToken() {\n return this.ye;\n }\n /** Whether this target has pending target adds or target removes. */\n get be() {\n return 0 !== this.ge;\n }\n /** Whether we have modified any state that should trigger a snapshot. */\n get De() {\n return this.Se;\n }\n /**\n * Applies the resume token to the TargetChange, but only when it has a new\n * value. Empty resumeTokens are discarded.\n */\n Ce(e) {\n e.approximateByteSize() > 0 && (this.Se = !0, this.ye = e);\n }\n /**\n * Creates a target change from the current set of changes.\n *\n * To reset the document changes after raising this snapshot, call\n * `clearPendingChanges()`.\n */\n ve() {\n let e = __PRIVATE_documentKeySet(),\n t = __PRIVATE_documentKeySet(),\n n = __PRIVATE_documentKeySet();\n return this.pe.forEach((r, i) => {\n switch (i) {\n case 0 /* ChangeType.Added */:\n e = e.add(r);\n break;\n case 2 /* ChangeType.Modified */:\n t = t.add(r);\n break;\n case 1 /* ChangeType.Removed */:\n n = n.add(r);\n break;\n default:\n fail();\n }\n }), new TargetChange(this.ye, this.we, e, t, n);\n }\n /**\n * Resets the document changes and sets `hasPendingChanges` to false.\n */\n Fe() {\n this.Se = !1, this.pe = __PRIVATE_snapshotChangesMap();\n }\n Me(e, t) {\n this.Se = !0, this.pe = this.pe.insert(e, t);\n }\n xe(e) {\n this.Se = !0, this.pe = this.pe.remove(e);\n }\n Oe() {\n this.ge += 1;\n }\n Ne() {\n this.ge -= 1, __PRIVATE_hardAssert(this.ge >= 0);\n }\n Be() {\n this.Se = !0, this.we = !0;\n }\n}\n\n/**\n * A helper class to accumulate watch changes into a RemoteEvent.\n */\nclass __PRIVATE_WatchChangeAggregator {\n constructor(e) {\n this.Le = e, /** The internal state of all tracked targets. */\n this.ke = new Map(), /** Keeps track of the documents to update since the last raised snapshot. */\n this.qe = __PRIVATE_mutableDocumentMap(), /** A mapping of document keys to their set of target IDs. */\n this.Qe = __PRIVATE_documentTargetMap(),\n /**\n * A map of targets with existence filter mismatches. These targets are\n * known to be inconsistent and their listens needs to be re-established by\n * RemoteStore.\n */\n this.Ke = new SortedMap(__PRIVATE_primitiveComparator);\n }\n /**\n * Processes and adds the DocumentWatchChange to the current set of changes.\n */\n $e(e) {\n for (const t of e.Ve) e.me && e.me.isFoundDocument() ? this.Ue(t, e.me) : this.We(t, e.key, e.me);\n for (const t of e.removedTargetIds) this.We(t, e.key, e.me);\n }\n /** Processes and adds the WatchTargetChange to the current set of changes. */\n Ge(e) {\n this.forEachTarget(e, t => {\n const n = this.ze(t);\n switch (e.state) {\n case 0 /* WatchTargetChangeState.NoChange */:\n this.je(t) && n.Ce(e.resumeToken);\n break;\n case 1 /* WatchTargetChangeState.Added */:\n // We need to decrement the number of pending acks needed from watch\n // for this targetId.\n n.Ne(), n.be ||\n // We have a freshly added target, so we need to reset any state\n // that we had previously. This can happen e.g. when remove and add\n // back a target for existence filter mismatches.\n n.Fe(), n.Ce(e.resumeToken);\n break;\n case 2 /* WatchTargetChangeState.Removed */:\n // We need to keep track of removed targets to we can post-filter and\n // remove any target changes.\n // We need to decrement the number of pending acks needed from watch\n // for this targetId.\n n.Ne(), n.be || this.removeTarget(t);\n break;\n case 3 /* WatchTargetChangeState.Current */:\n this.je(t) && (n.Be(), n.Ce(e.resumeToken));\n break;\n case 4 /* WatchTargetChangeState.Reset */:\n this.je(t) && (\n // Reset the target and synthesizes removes for all existing\n // documents. The backend will re-add any documents that still\n // match the target before it sends the next global snapshot.\n this.He(t), n.Ce(e.resumeToken));\n break;\n default:\n fail();\n }\n });\n }\n /**\n * Iterates over all targetIds that the watch change applies to: either the\n * targetIds explicitly listed in the change or the targetIds of all currently\n * active targets.\n */\n forEachTarget(e, t) {\n e.targetIds.length > 0 ? e.targetIds.forEach(t) : this.ke.forEach((e, n) => {\n this.je(n) && t(n);\n });\n }\n /**\n * Handles existence filters and synthesizes deletes for filter mismatches.\n * Targets that are invalidated by filter mismatches are added to\n * `pendingTargetResets`.\n */\n Je(e) {\n const t = e.targetId,\n n = e.fe.count,\n r = this.Ye(t);\n if (r) {\n const i = r.target;\n if (__PRIVATE_targetIsDocumentTarget(i)) {\n if (0 === n) {\n // The existence filter told us the document does not exist. We deduce\n // that this document does not exist and apply a deleted document to\n // our updates. Without applying this deleted document there might be\n // another query that will raise this document as part of a snapshot\n // until it is resolved, essentially exposing inconsistency between\n // queries.\n const e = new DocumentKey(i.path);\n this.We(t, e, MutableDocument.newNoDocument(e, SnapshotVersion.min()));\n } else __PRIVATE_hardAssert(1 === n);\n } else {\n const r = this.Ze(t);\n // Existence filter mismatch. Mark the documents as being in limbo, and\n // raise a snapshot with `isFromCache:true`.\n if (r !== n) {\n // Apply bloom filter to identify and mark removed documents.\n const n = this.Xe(e),\n i = n ? this.et(n, e, r) : 1 /* BloomFilterApplicationStatus.Skipped */;\n if (0 /* BloomFilterApplicationStatus.Success */ !== i) {\n // If bloom filter application fails, we reset the mapping and\n // trigger re-run of the query.\n this.He(t);\n const e = 2 /* BloomFilterApplicationStatus.FalsePositive */ === i ? \"TargetPurposeExistenceFilterMismatchBloom\" /* TargetPurpose.ExistenceFilterMismatchBloom */ : \"TargetPurposeExistenceFilterMismatch\" /* TargetPurpose.ExistenceFilterMismatch */;\n this.Ke = this.Ke.insert(t, e);\n }\n null == ce || ce.tt(function __PRIVATE_createExistenceFilterMismatchInfoForTestingHooks(e, t, n, r, i) {\n var s, o, _, a, u, c;\n const l = {\n localCacheCount: e,\n existenceFilterCount: t.count,\n databaseId: n.database,\n projectId: n.projectId\n },\n h = t.unchangedNames;\n h && (l.bloomFilter = {\n applied: 0 /* BloomFilterApplicationStatus.Success */ === i,\n hashCount: null !== (s = null == h ? void 0 : h.hashCount) && void 0 !== s ? s : 0,\n bitmapLength: null !== (a = null === (_ = null === (o = null == h ? void 0 : h.bits) || void 0 === o ? void 0 : o.bitmap) || void 0 === _ ? void 0 : _.length) && void 0 !== a ? a : 0,\n padding: null !== (c = null === (u = null == h ? void 0 : h.bits) || void 0 === u ? void 0 : u.padding) && void 0 !== c ? c : 0,\n mightContain: e => {\n var t;\n return null !== (t = null == r ? void 0 : r.mightContain(e)) && void 0 !== t && t;\n }\n });\n return l;\n }\n /**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */(r, e.fe, this.Le.nt(), n, i));\n }\n }\n }\n }\n /**\n * Parse the bloom filter from the \"unchanged_names\" field of an existence\n * filter.\n */\n Xe(e) {\n const t = e.fe.unchangedNames;\n if (!t || !t.bits) return null;\n const {\n bits: {\n bitmap: n = \"\",\n padding: r = 0\n },\n hashCount: i = 0\n } = t;\n let s, o;\n try {\n s = __PRIVATE_normalizeByteString(n).toUint8Array();\n } catch (e) {\n if (e instanceof __PRIVATE_Base64DecodeError) return __PRIVATE_logWarn(\"Decoding the base64 bloom filter in existence filter failed (\" + e.message + \"); ignoring the bloom filter and falling back to full re-query.\"), null;\n throw e;\n }\n try {\n // BloomFilter throws error if the inputs are invalid.\n o = new BloomFilter(s, r, i);\n } catch (e) {\n return __PRIVATE_logWarn(e instanceof __PRIVATE_BloomFilterError ? \"BloomFilter error: \" : \"Applying bloom filter failed: \", e), null;\n }\n return 0 === o.Te ? null : o;\n }\n /**\n * Apply bloom filter to remove the deleted documents, and return the\n * application status.\n */\n et(e, t, n) {\n return t.fe.count === n - this.rt(e, t.targetId) ? 0 /* BloomFilterApplicationStatus.Success */ : 2 /* BloomFilterApplicationStatus.FalsePositive */;\n }\n /**\n * Filter out removed documents based on bloom filter membership result and\n * return number of documents removed.\n */\n rt(e, t) {\n const n = this.Le.getRemoteKeysForTarget(t);\n let r = 0;\n return n.forEach(n => {\n const i = this.Le.nt(),\n s = `projects/${i.projectId}/databases/${i.database}/documents/${n.path.canonicalString()}`;\n e.mightContain(s) || (this.We(t, n, /*updatedDocument=*/null), r++);\n }), r;\n }\n /**\n * Converts the currently accumulated state into a remote event at the\n * provided snapshot version. Resets the accumulated changes before returning.\n */\n it(e) {\n const t = new Map();\n this.ke.forEach((n, r) => {\n const i = this.Ye(r);\n if (i) {\n if (n.current && __PRIVATE_targetIsDocumentTarget(i.target)) {\n // Document queries for document that don't exist can produce an empty\n // result set. To update our local cache, we synthesize a document\n // delete if we have not previously received the document. This\n // resolves the limbo state of the document, removing it from\n // limboDocumentRefs.\n // TODO(dimond): Ideally we would have an explicit lookup target\n // instead resulting in an explicit delete message and we could\n // remove this special logic.\n const t = new DocumentKey(i.target.path);\n null !== this.qe.get(t) || this.st(r, t) || this.We(r, t, MutableDocument.newNoDocument(t, e));\n }\n n.De && (t.set(r, n.ve()), n.Fe());\n }\n });\n let n = __PRIVATE_documentKeySet();\n // We extract the set of limbo-only document updates as the GC logic\n // special-cases documents that do not appear in the target cache.\n\n // TODO(gsoltis): Expand on this comment once GC is available in the JS\n // client.\n this.Qe.forEach((e, t) => {\n let r = !0;\n t.forEachWhile(e => {\n const t = this.Ye(e);\n return !t || \"TargetPurposeLimboResolution\" /* TargetPurpose.LimboResolution */ === t.purpose || (r = !1, !1);\n }), r && (n = n.add(e));\n }), this.qe.forEach((t, n) => n.setReadTime(e));\n const r = new RemoteEvent(e, t, this.Ke, this.qe, n);\n return this.qe = __PRIVATE_mutableDocumentMap(), this.Qe = __PRIVATE_documentTargetMap(), this.Ke = new SortedMap(__PRIVATE_primitiveComparator), r;\n }\n /**\n * Adds the provided document to the internal list of document updates and\n * its document key to the given target's mapping.\n */\n // Visible for testing.\n Ue(e, t) {\n if (!this.je(e)) return;\n const n = this.st(e, t.key) ? 2 /* ChangeType.Modified */ : 0 /* ChangeType.Added */;\n this.ze(e).Me(t.key, n), this.qe = this.qe.insert(t.key, t), this.Qe = this.Qe.insert(t.key, this.ot(t.key).add(e));\n }\n /**\n * Removes the provided document from the target mapping. If the\n * document no longer matches the target, but the document's state is still\n * known (e.g. we know that the document was deleted or we received the change\n * that caused the filter mismatch), the new document can be provided\n * to update the remote document cache.\n */\n // Visible for testing.\n We(e, t, n) {\n if (!this.je(e)) return;\n const r = this.ze(e);\n this.st(e, t) ? r.Me(t, 1 /* ChangeType.Removed */) :\n // The document may have entered and left the target before we raised a\n // snapshot, so we can just ignore the change.\n r.xe(t), this.Qe = this.Qe.insert(t, this.ot(t).delete(e)), n && (this.qe = this.qe.insert(t, n));\n }\n removeTarget(e) {\n this.ke.delete(e);\n }\n /**\n * Returns the current count of documents in the target. This includes both\n * the number of documents that the LocalStore considers to be part of the\n * target as well as any accumulated changes.\n */\n Ze(e) {\n const t = this.ze(e).ve();\n return this.Le.getRemoteKeysForTarget(e).size + t.addedDocuments.size - t.removedDocuments.size;\n }\n /**\n * Increment the number of acks needed from watch before we can consider the\n * server to be 'in-sync' with the client's active targets.\n */\n Oe(e) {\n this.ze(e).Oe();\n }\n ze(e) {\n let t = this.ke.get(e);\n return t || (t = new __PRIVATE_TargetState(), this.ke.set(e, t)), t;\n }\n ot(e) {\n let t = this.Qe.get(e);\n return t || (t = new SortedSet(__PRIVATE_primitiveComparator), this.Qe = this.Qe.insert(e, t)), t;\n }\n /**\n * Verifies that the user is still interested in this target (by calling\n * `getTargetDataForTarget()`) and that we are not waiting for pending ADDs\n * from watch.\n */\n je(e) {\n const t = null !== this.Ye(e);\n return t || __PRIVATE_logDebug(\"WatchChangeAggregator\", \"Detected inactive target\", e), t;\n }\n /**\n * Returns the TargetData for an active target (i.e. a target that the user\n * is still interested in that has no outstanding target change requests).\n */\n Ye(e) {\n const t = this.ke.get(e);\n return t && t.be ? null : this.Le._t(e);\n }\n /**\n * Resets the state of a Watch target to its initial state (e.g. sets\n * 'current' to false, clears the resume token and removes its target mapping\n * from all documents).\n */\n He(e) {\n this.ke.set(e, new __PRIVATE_TargetState());\n this.Le.getRemoteKeysForTarget(e).forEach(t => {\n this.We(e, t, /*updatedDocument=*/null);\n });\n }\n /**\n * Returns whether the LocalStore considers the document to be part of the\n * specified target.\n */\n st(e, t) {\n return this.Le.getRemoteKeysForTarget(e).has(t);\n }\n}\nfunction __PRIVATE_documentTargetMap() {\n return new SortedMap(DocumentKey.comparator);\n}\nfunction __PRIVATE_snapshotChangesMap() {\n return new SortedMap(DocumentKey.comparator);\n}\nconst he = (() => {\n const e = {\n asc: \"ASCENDING\",\n desc: \"DESCENDING\"\n };\n return e;\n })(),\n Pe = (() => {\n const e = {\n \"<\": \"LESS_THAN\",\n \"<=\": \"LESS_THAN_OR_EQUAL\",\n \">\": \"GREATER_THAN\",\n \">=\": \"GREATER_THAN_OR_EQUAL\",\n \"==\": \"EQUAL\",\n \"!=\": \"NOT_EQUAL\",\n \"array-contains\": \"ARRAY_CONTAINS\",\n in: \"IN\",\n \"not-in\": \"NOT_IN\",\n \"array-contains-any\": \"ARRAY_CONTAINS_ANY\"\n };\n return e;\n })(),\n Ie = (() => {\n const e = {\n and: \"AND\",\n or: \"OR\"\n };\n return e;\n })();\n\n/**\n * This class generates JsonObject values for the Datastore API suitable for\n * sending to either GRPC stub methods or via the JSON/HTTP REST API.\n *\n * The serializer supports both Protobuf.js and Proto3 JSON formats. By\n * setting `useProto3Json` to true, the serializer will use the Proto3 JSON\n * format.\n *\n * For a description of the Proto3 JSON format check\n * https://developers.google.com/protocol-buffers/docs/proto3#json\n *\n * TODO(klimt): We can remove the databaseId argument if we keep the full\n * resource name in documents.\n */\nclass JsonProtoSerializer {\n constructor(e, t) {\n this.databaseId = e, this.useProto3Json = t;\n }\n}\n\n/**\n * Returns a value for a number (or null) that's appropriate to put into\n * a google.protobuf.Int32Value proto.\n * DO NOT USE THIS FOR ANYTHING ELSE.\n * This method cheats. It's typed as returning \"number\" because that's what\n * our generated proto interfaces say Int32Value must be. But GRPC actually\n * expects a { value: } struct.\n */\nfunction __PRIVATE_toInt32Proto(e, t) {\n return e.useProto3Json || __PRIVATE_isNullOrUndefined(t) ? t : {\n value: t\n };\n}\n\n/**\n * Returns a number (or null) from a google.protobuf.Int32Value proto.\n */\n/**\n * Returns a value for a Date that's appropriate to put into a proto.\n */\nfunction toTimestamp(e, t) {\n if (e.useProto3Json) {\n return `${new Date(1e3 * t.seconds).toISOString().replace(/\\.\\d*/, \"\").replace(\"Z\", \"\")}.${(\"000000000\" + t.nanoseconds).slice(-9)}Z`;\n }\n return {\n seconds: \"\" + t.seconds,\n nanos: t.nanoseconds\n };\n}\n\n/**\n * Returns a value for bytes that's appropriate to put in a proto.\n *\n * Visible for testing.\n */\nfunction __PRIVATE_toBytes(e, t) {\n return e.useProto3Json ? t.toBase64() : t.toUint8Array();\n}\n\n/**\n * Returns a ByteString based on the proto string value.\n */\nfunction __PRIVATE_toVersion(e, t) {\n return toTimestamp(e, t.toTimestamp());\n}\nfunction __PRIVATE_fromVersion(e) {\n return __PRIVATE_hardAssert(!!e), SnapshotVersion.fromTimestamp(function fromTimestamp(e) {\n const t = __PRIVATE_normalizeTimestamp(e);\n return new Timestamp(t.seconds, t.nanos);\n }(e));\n}\nfunction __PRIVATE_toResourceName(e, t) {\n return function __PRIVATE_fullyQualifiedPrefixPath(e) {\n return new ResourcePath([\"projects\", e.projectId, \"databases\", e.database]);\n }(e).child(\"documents\").child(t).canonicalString();\n}\nfunction __PRIVATE_fromResourceName(e) {\n const t = ResourcePath.fromString(e);\n return __PRIVATE_hardAssert(__PRIVATE_isValidResourceName(t)), t;\n}\nfunction __PRIVATE_toName(e, t) {\n return __PRIVATE_toResourceName(e.databaseId, t.path);\n}\nfunction fromName(e, t) {\n const n = __PRIVATE_fromResourceName(t);\n if (n.get(1) !== e.databaseId.projectId) throw new FirestoreError(D.INVALID_ARGUMENT, \"Tried to deserialize key from different project: \" + n.get(1) + \" vs \" + e.databaseId.projectId);\n if (n.get(3) !== e.databaseId.database) throw new FirestoreError(D.INVALID_ARGUMENT, \"Tried to deserialize key from different database: \" + n.get(3) + \" vs \" + e.databaseId.database);\n return new DocumentKey(__PRIVATE_extractLocalPathFromResourceName(n));\n}\nfunction __PRIVATE_toQueryPath(e, t) {\n return __PRIVATE_toResourceName(e.databaseId, t);\n}\nfunction __PRIVATE_fromQueryPath(e) {\n const t = __PRIVATE_fromResourceName(e);\n // In v1beta1 queries for collections at the root did not have a trailing\n // \"/documents\". In v1 all resource paths contain \"/documents\". Preserve the\n // ability to read the v1beta1 form for compatibility with queries persisted\n // in the local target cache.\n return 4 === t.length ? ResourcePath.emptyPath() : __PRIVATE_extractLocalPathFromResourceName(t);\n}\nfunction __PRIVATE_getEncodedDatabaseId(e) {\n return new ResourcePath([\"projects\", e.databaseId.projectId, \"databases\", e.databaseId.database]).canonicalString();\n}\nfunction __PRIVATE_extractLocalPathFromResourceName(e) {\n return __PRIVATE_hardAssert(e.length > 4 && \"documents\" === e.get(4)), e.popFirst(5);\n}\n\n/** Creates a Document proto from key and fields (but no create/update time) */\nfunction __PRIVATE_toMutationDocument(e, t, n) {\n return {\n name: __PRIVATE_toName(e, t),\n fields: n.value.mapValue.fields\n };\n}\nfunction __PRIVATE_fromDocument(e, t, n) {\n const r = fromName(e, t.name),\n i = __PRIVATE_fromVersion(t.updateTime),\n s = t.createTime ? __PRIVATE_fromVersion(t.createTime) : SnapshotVersion.min(),\n o = new ObjectValue({\n mapValue: {\n fields: t.fields\n }\n }),\n _ = MutableDocument.newFoundDocument(r, i, s, o);\n return n && _.setHasCommittedMutations(), n ? _.setHasCommittedMutations() : _;\n}\nfunction __PRIVATE_fromBatchGetDocumentsResponse(e, t) {\n return \"found\" in t ? function __PRIVATE_fromFound(e, t) {\n __PRIVATE_hardAssert(!!t.found), t.found.name, t.found.updateTime;\n const n = fromName(e, t.found.name),\n r = __PRIVATE_fromVersion(t.found.updateTime),\n i = t.found.createTime ? __PRIVATE_fromVersion(t.found.createTime) : SnapshotVersion.min(),\n s = new ObjectValue({\n mapValue: {\n fields: t.found.fields\n }\n });\n return MutableDocument.newFoundDocument(n, r, i, s);\n }(e, t) : \"missing\" in t ? function __PRIVATE_fromMissing(e, t) {\n __PRIVATE_hardAssert(!!t.missing), __PRIVATE_hardAssert(!!t.readTime);\n const n = fromName(e, t.missing),\n r = __PRIVATE_fromVersion(t.readTime);\n return MutableDocument.newNoDocument(n, r);\n }(e, t) : fail();\n}\nfunction __PRIVATE_fromWatchChange(e, t) {\n let n;\n if (\"targetChange\" in t) {\n t.targetChange;\n // proto3 default value is unset in JSON (undefined), so use 'NO_CHANGE'\n // if unset\n const r = function __PRIVATE_fromWatchTargetChangeState(e) {\n return \"NO_CHANGE\" === e ? 0 /* WatchTargetChangeState.NoChange */ : \"ADD\" === e ? 1 /* WatchTargetChangeState.Added */ : \"REMOVE\" === e ? 2 /* WatchTargetChangeState.Removed */ : \"CURRENT\" === e ? 3 /* WatchTargetChangeState.Current */ : \"RESET\" === e ? 4 /* WatchTargetChangeState.Reset */ : fail();\n }(t.targetChange.targetChangeType || \"NO_CHANGE\"),\n i = t.targetChange.targetIds || [],\n s = function __PRIVATE_fromBytes(e, t) {\n return e.useProto3Json ? (__PRIVATE_hardAssert(void 0 === t || \"string\" == typeof t), ByteString.fromBase64String(t || \"\")) : (__PRIVATE_hardAssert(void 0 === t || t instanceof Uint8Array), ByteString.fromUint8Array(t || new Uint8Array()));\n }(e, t.targetChange.resumeToken),\n o = t.targetChange.cause,\n _ = o && function __PRIVATE_fromRpcStatus(e) {\n const t = void 0 === e.code ? D.UNKNOWN : __PRIVATE_mapCodeFromRpcCode(e.code);\n return new FirestoreError(t, e.message || \"\");\n }(o);\n n = new __PRIVATE_WatchTargetChange(r, i, s, _ || null);\n } else if (\"documentChange\" in t) {\n t.documentChange;\n const r = t.documentChange;\n r.document, r.document.name, r.document.updateTime;\n const i = fromName(e, r.document.name),\n s = __PRIVATE_fromVersion(r.document.updateTime),\n o = r.document.createTime ? __PRIVATE_fromVersion(r.document.createTime) : SnapshotVersion.min(),\n _ = new ObjectValue({\n mapValue: {\n fields: r.document.fields\n }\n }),\n a = MutableDocument.newFoundDocument(i, s, o, _),\n u = r.targetIds || [],\n c = r.removedTargetIds || [];\n n = new __PRIVATE_DocumentWatchChange(u, c, a.key, a);\n } else if (\"documentDelete\" in t) {\n t.documentDelete;\n const r = t.documentDelete;\n r.document;\n const i = fromName(e, r.document),\n s = r.readTime ? __PRIVATE_fromVersion(r.readTime) : SnapshotVersion.min(),\n o = MutableDocument.newNoDocument(i, s),\n _ = r.removedTargetIds || [];\n n = new __PRIVATE_DocumentWatchChange([], _, o.key, o);\n } else if (\"documentRemove\" in t) {\n t.documentRemove;\n const r = t.documentRemove;\n r.document;\n const i = fromName(e, r.document),\n s = r.removedTargetIds || [];\n n = new __PRIVATE_DocumentWatchChange([], s, i, null);\n } else {\n if (!(\"filter\" in t)) return fail();\n {\n t.filter;\n const e = t.filter;\n e.targetId;\n const {\n count: r = 0,\n unchangedNames: i\n } = e,\n s = new ExistenceFilter(r, i),\n o = e.targetId;\n n = new __PRIVATE_ExistenceFilterChange(o, s);\n }\n }\n return n;\n}\nfunction toMutation(e, t) {\n let n;\n if (t instanceof __PRIVATE_SetMutation) n = {\n update: __PRIVATE_toMutationDocument(e, t.key, t.value)\n };else if (t instanceof __PRIVATE_DeleteMutation) n = {\n delete: __PRIVATE_toName(e, t.key)\n };else if (t instanceof __PRIVATE_PatchMutation) n = {\n update: __PRIVATE_toMutationDocument(e, t.key, t.data),\n updateMask: __PRIVATE_toDocumentMask(t.fieldMask)\n };else {\n if (!(t instanceof __PRIVATE_VerifyMutation)) return fail();\n n = {\n verify: __PRIVATE_toName(e, t.key)\n };\n }\n return t.fieldTransforms.length > 0 && (n.updateTransforms = t.fieldTransforms.map(e => function __PRIVATE_toFieldTransform(e, t) {\n const n = t.transform;\n if (n instanceof __PRIVATE_ServerTimestampTransform) return {\n fieldPath: t.field.canonicalString(),\n setToServerValue: \"REQUEST_TIME\"\n };\n if (n instanceof __PRIVATE_ArrayUnionTransformOperation) return {\n fieldPath: t.field.canonicalString(),\n appendMissingElements: {\n values: n.elements\n }\n };\n if (n instanceof __PRIVATE_ArrayRemoveTransformOperation) return {\n fieldPath: t.field.canonicalString(),\n removeAllFromArray: {\n values: n.elements\n }\n };\n if (n instanceof __PRIVATE_NumericIncrementTransformOperation) return {\n fieldPath: t.field.canonicalString(),\n increment: n.Ie\n };\n throw fail();\n }(0, e))), t.precondition.isNone || (n.currentDocument = function __PRIVATE_toPrecondition(e, t) {\n return void 0 !== t.updateTime ? {\n updateTime: __PRIVATE_toVersion(e, t.updateTime)\n } : void 0 !== t.exists ? {\n exists: t.exists\n } : fail();\n }(e, t.precondition)), n;\n}\nfunction __PRIVATE_fromMutation(e, t) {\n const n = t.currentDocument ? function __PRIVATE_fromPrecondition(e) {\n return void 0 !== e.updateTime ? Precondition.updateTime(__PRIVATE_fromVersion(e.updateTime)) : void 0 !== e.exists ? Precondition.exists(e.exists) : Precondition.none();\n }(t.currentDocument) : Precondition.none(),\n r = t.updateTransforms ? t.updateTransforms.map(t => function __PRIVATE_fromFieldTransform(e, t) {\n let n = null;\n if (\"setToServerValue\" in t) __PRIVATE_hardAssert(\"REQUEST_TIME\" === t.setToServerValue), n = new __PRIVATE_ServerTimestampTransform();else if (\"appendMissingElements\" in t) {\n const e = t.appendMissingElements.values || [];\n n = new __PRIVATE_ArrayUnionTransformOperation(e);\n } else if (\"removeAllFromArray\" in t) {\n const e = t.removeAllFromArray.values || [];\n n = new __PRIVATE_ArrayRemoveTransformOperation(e);\n } else \"increment\" in t ? n = new __PRIVATE_NumericIncrementTransformOperation(e, t.increment) : fail();\n const r = FieldPath$1.fromServerFormat(t.fieldPath);\n return new FieldTransform(r, n);\n }(e, t)) : [];\n if (t.update) {\n t.update.name;\n const i = fromName(e, t.update.name),\n s = new ObjectValue({\n mapValue: {\n fields: t.update.fields\n }\n });\n if (t.updateMask) {\n const e = function __PRIVATE_fromDocumentMask(e) {\n const t = e.fieldPaths || [];\n return new FieldMask(t.map(e => FieldPath$1.fromServerFormat(e)));\n }(t.updateMask);\n return new __PRIVATE_PatchMutation(i, s, e, n, r);\n }\n return new __PRIVATE_SetMutation(i, s, n, r);\n }\n if (t.delete) {\n const r = fromName(e, t.delete);\n return new __PRIVATE_DeleteMutation(r, n);\n }\n if (t.verify) {\n const r = fromName(e, t.verify);\n return new __PRIVATE_VerifyMutation(r, n);\n }\n return fail();\n}\nfunction __PRIVATE_fromWriteResults(e, t) {\n return e && e.length > 0 ? (__PRIVATE_hardAssert(void 0 !== t), e.map(e => function __PRIVATE_fromWriteResult(e, t) {\n // NOTE: Deletes don't have an updateTime.\n let n = e.updateTime ? __PRIVATE_fromVersion(e.updateTime) : __PRIVATE_fromVersion(t);\n return n.isEqual(SnapshotVersion.min()) && (\n // The Firestore Emulator currently returns an update time of 0 for\n // deletes of non-existing documents (rather than null). This breaks the\n // test \"get deleted doc while offline with source=cache\" as NoDocuments\n // with version 0 are filtered by IndexedDb's RemoteDocumentCache.\n // TODO(#2149): Remove this when Emulator is fixed\n n = __PRIVATE_fromVersion(t)), new MutationResult(n, e.transformResults || []);\n }(e, t))) : [];\n}\nfunction __PRIVATE_toDocumentsTarget(e, t) {\n return {\n documents: [__PRIVATE_toQueryPath(e, t.path)]\n };\n}\nfunction __PRIVATE_toQueryTarget(e, t) {\n // Dissect the path into parent, collectionId, and optional key filter.\n const n = {\n structuredQuery: {}\n },\n r = t.path;\n null !== t.collectionGroup ? (n.parent = __PRIVATE_toQueryPath(e, r), n.structuredQuery.from = [{\n collectionId: t.collectionGroup,\n allDescendants: !0\n }]) : (n.parent = __PRIVATE_toQueryPath(e, r.popLast()), n.structuredQuery.from = [{\n collectionId: r.lastSegment()\n }]);\n const i = function __PRIVATE_toFilters(e) {\n if (0 === e.length) return;\n return __PRIVATE_toFilter(CompositeFilter.create(e, \"and\" /* CompositeOperator.AND */));\n }(t.filters);\n i && (n.structuredQuery.where = i);\n const s = function __PRIVATE_toOrder(e) {\n if (0 === e.length) return;\n return e.map(e =>\n // visible for testing\n function __PRIVATE_toPropertyOrder(e) {\n return {\n field: __PRIVATE_toFieldPathReference(e.field),\n direction: __PRIVATE_toDirection(e.dir)\n };\n }(e));\n }(t.orderBy);\n s && (n.structuredQuery.orderBy = s);\n const o = __PRIVATE_toInt32Proto(e, t.limit);\n return null !== o && (n.structuredQuery.limit = o), t.startAt && (n.structuredQuery.startAt = function __PRIVATE_toStartAtCursor(e) {\n return {\n before: e.inclusive,\n values: e.position\n };\n }(t.startAt)), t.endAt && (n.structuredQuery.endAt = function __PRIVATE_toEndAtCursor(e) {\n return {\n before: !e.inclusive,\n values: e.position\n };\n }(t.endAt)), n;\n}\nfunction __PRIVATE_convertQueryTargetToQuery(e) {\n let t = __PRIVATE_fromQueryPath(e.parent);\n const n = e.structuredQuery,\n r = n.from ? n.from.length : 0;\n let i = null;\n if (r > 0) {\n __PRIVATE_hardAssert(1 === r);\n const e = n.from[0];\n e.allDescendants ? i = e.collectionId : t = t.child(e.collectionId);\n }\n let s = [];\n n.where && (s = function __PRIVATE_fromFilters(e) {\n const t = __PRIVATE_fromFilter(e);\n if (t instanceof CompositeFilter && __PRIVATE_compositeFilterIsFlatConjunction(t)) return t.getFilters();\n return [t];\n }(n.where));\n let o = [];\n n.orderBy && (o = function __PRIVATE_fromOrder(e) {\n return e.map(e => function __PRIVATE_fromPropertyOrder(e) {\n return new OrderBy(__PRIVATE_fromFieldPathReference(e.field),\n // visible for testing\n function __PRIVATE_fromDirection(e) {\n switch (e) {\n case \"ASCENDING\":\n return \"asc\" /* Direction.ASCENDING */;\n case \"DESCENDING\":\n return \"desc\" /* Direction.DESCENDING */;\n default:\n return;\n }\n }\n // visible for testing\n (e.direction));\n }\n // visible for testing\n (e));\n }(n.orderBy));\n let _ = null;\n n.limit && (_ = function __PRIVATE_fromInt32Proto(e) {\n let t;\n return t = \"object\" == typeof e ? e.value : e, __PRIVATE_isNullOrUndefined(t) ? null : t;\n }(n.limit));\n let a = null;\n n.startAt && (a = function __PRIVATE_fromStartAtCursor(e) {\n const t = !!e.before,\n n = e.values || [];\n return new Bound(n, t);\n }(n.startAt));\n let u = null;\n return n.endAt && (u = function __PRIVATE_fromEndAtCursor(e) {\n const t = !e.before,\n n = e.values || [];\n return new Bound(n, t);\n }\n // visible for testing\n (n.endAt)), __PRIVATE_newQuery(t, i, o, s, _, \"F\" /* LimitType.First */, a, u);\n}\nfunction __PRIVATE_toListenRequestLabels(e, t) {\n const n = function __PRIVATE_toLabel(e) {\n switch (e) {\n case \"TargetPurposeListen\" /* TargetPurpose.Listen */:\n return null;\n case \"TargetPurposeExistenceFilterMismatch\" /* TargetPurpose.ExistenceFilterMismatch */:\n return \"existence-filter-mismatch\";\n case \"TargetPurposeExistenceFilterMismatchBloom\" /* TargetPurpose.ExistenceFilterMismatchBloom */:\n return \"existence-filter-mismatch-bloom\";\n case \"TargetPurposeLimboResolution\" /* TargetPurpose.LimboResolution */:\n return \"limbo-document\";\n default:\n return fail();\n }\n }(t.purpose);\n return null == n ? null : {\n \"goog-listen-tags\": n\n };\n}\nfunction __PRIVATE_fromFilter(e) {\n return void 0 !== e.unaryFilter ? function __PRIVATE_fromUnaryFilter(e) {\n switch (e.unaryFilter.op) {\n case \"IS_NAN\":\n const t = __PRIVATE_fromFieldPathReference(e.unaryFilter.field);\n return FieldFilter.create(t, \"==\" /* Operator.EQUAL */, {\n doubleValue: NaN\n });\n case \"IS_NULL\":\n const n = __PRIVATE_fromFieldPathReference(e.unaryFilter.field);\n return FieldFilter.create(n, \"==\" /* Operator.EQUAL */, {\n nullValue: \"NULL_VALUE\"\n });\n case \"IS_NOT_NAN\":\n const r = __PRIVATE_fromFieldPathReference(e.unaryFilter.field);\n return FieldFilter.create(r, \"!=\" /* Operator.NOT_EQUAL */, {\n doubleValue: NaN\n });\n case \"IS_NOT_NULL\":\n const i = __PRIVATE_fromFieldPathReference(e.unaryFilter.field);\n return FieldFilter.create(i, \"!=\" /* Operator.NOT_EQUAL */, {\n nullValue: \"NULL_VALUE\"\n });\n default:\n return fail();\n }\n }(e) : void 0 !== e.fieldFilter ? function __PRIVATE_fromFieldFilter(e) {\n return FieldFilter.create(__PRIVATE_fromFieldPathReference(e.fieldFilter.field), function __PRIVATE_fromOperatorName(e) {\n switch (e) {\n case \"EQUAL\":\n return \"==\" /* Operator.EQUAL */;\n case \"NOT_EQUAL\":\n return \"!=\" /* Operator.NOT_EQUAL */;\n case \"GREATER_THAN\":\n return \">\" /* Operator.GREATER_THAN */;\n case \"GREATER_THAN_OR_EQUAL\":\n return \">=\" /* Operator.GREATER_THAN_OR_EQUAL */;\n case \"LESS_THAN\":\n return \"<\" /* Operator.LESS_THAN */;\n case \"LESS_THAN_OR_EQUAL\":\n return \"<=\" /* Operator.LESS_THAN_OR_EQUAL */;\n case \"ARRAY_CONTAINS\":\n return \"array-contains\" /* Operator.ARRAY_CONTAINS */;\n case \"IN\":\n return \"in\" /* Operator.IN */;\n case \"NOT_IN\":\n return \"not-in\" /* Operator.NOT_IN */;\n case \"ARRAY_CONTAINS_ANY\":\n return \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */;\n default:\n return fail();\n }\n }(e.fieldFilter.op), e.fieldFilter.value);\n }(e) : void 0 !== e.compositeFilter ? function __PRIVATE_fromCompositeFilter(e) {\n return CompositeFilter.create(e.compositeFilter.filters.map(e => __PRIVATE_fromFilter(e)), function __PRIVATE_fromCompositeOperatorName(e) {\n switch (e) {\n case \"AND\":\n return \"and\" /* CompositeOperator.AND */;\n case \"OR\":\n return \"or\" /* CompositeOperator.OR */;\n default:\n return fail();\n }\n }(e.compositeFilter.op));\n }(e) : fail();\n}\nfunction __PRIVATE_toDirection(e) {\n return he[e];\n}\nfunction __PRIVATE_toOperatorName(e) {\n return Pe[e];\n}\nfunction __PRIVATE_toCompositeOperatorName(e) {\n return Ie[e];\n}\nfunction __PRIVATE_toFieldPathReference(e) {\n return {\n fieldPath: e.canonicalString()\n };\n}\nfunction __PRIVATE_fromFieldPathReference(e) {\n return FieldPath$1.fromServerFormat(e.fieldPath);\n}\nfunction __PRIVATE_toFilter(e) {\n return e instanceof FieldFilter ? function __PRIVATE_toUnaryOrFieldFilter(e) {\n if (\"==\" /* Operator.EQUAL */ === e.op) {\n if (__PRIVATE_isNanValue(e.value)) return {\n unaryFilter: {\n field: __PRIVATE_toFieldPathReference(e.field),\n op: \"IS_NAN\"\n }\n };\n if (__PRIVATE_isNullValue(e.value)) return {\n unaryFilter: {\n field: __PRIVATE_toFieldPathReference(e.field),\n op: \"IS_NULL\"\n }\n };\n } else if (\"!=\" /* Operator.NOT_EQUAL */ === e.op) {\n if (__PRIVATE_isNanValue(e.value)) return {\n unaryFilter: {\n field: __PRIVATE_toFieldPathReference(e.field),\n op: \"IS_NOT_NAN\"\n }\n };\n if (__PRIVATE_isNullValue(e.value)) return {\n unaryFilter: {\n field: __PRIVATE_toFieldPathReference(e.field),\n op: \"IS_NOT_NULL\"\n }\n };\n }\n return {\n fieldFilter: {\n field: __PRIVATE_toFieldPathReference(e.field),\n op: __PRIVATE_toOperatorName(e.op),\n value: e.value\n }\n };\n }(e) : e instanceof CompositeFilter ? function __PRIVATE_toCompositeFilter(e) {\n const t = e.getFilters().map(e => __PRIVATE_toFilter(e));\n if (1 === t.length) return t[0];\n return {\n compositeFilter: {\n op: __PRIVATE_toCompositeOperatorName(e.op),\n filters: t\n }\n };\n }(e) : fail();\n}\nfunction __PRIVATE_toDocumentMask(e) {\n const t = [];\n return e.fields.forEach(e => t.push(e.canonicalString())), {\n fieldPaths: t\n };\n}\nfunction __PRIVATE_isValidResourceName(e) {\n // Resource names have at least 4 components (project ID, database ID)\n return e.length >= 4 && \"projects\" === e.get(0) && \"databases\" === e.get(2);\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An immutable set of metadata that the local store tracks for each target.\n */\nclass TargetData {\n constructor( /** The target being listened to. */\n e,\n /**\n * The target ID to which the target corresponds; Assigned by the\n * LocalStore for user listens and by the SyncEngine for limbo watches.\n */\n t, /** The purpose of the target. */\n n,\n /**\n * The sequence number of the last transaction during which this target data\n * was modified.\n */\n r, /** The latest snapshot version seen for this target. */\n i = SnapshotVersion.min()\n /**\n * The maximum snapshot version at which the associated view\n * contained no limbo documents.\n */, s = SnapshotVersion.min()\n /**\n * An opaque, server-assigned token that allows watching a target to be\n * resumed after disconnecting without retransmitting all the data that\n * matches the target. The resume token essentially identifies a point in\n * time from which the server should resume sending results.\n */, o = ByteString.EMPTY_BYTE_STRING\n /**\n * The number of documents that last matched the query at the resume token or\n * read time. Documents are counted only when making a listen request with\n * resume token or read time, otherwise, keep it null.\n */, _ = null) {\n this.target = e, this.targetId = t, this.purpose = n, this.sequenceNumber = r, this.snapshotVersion = i, this.lastLimboFreeSnapshotVersion = s, this.resumeToken = o, this.expectedCount = _;\n }\n /** Creates a new target data instance with an updated sequence number. */\n withSequenceNumber(e) {\n return new TargetData(this.target, this.targetId, this.purpose, e, this.snapshotVersion, this.lastLimboFreeSnapshotVersion, this.resumeToken, this.expectedCount);\n }\n /**\n * Creates a new target data instance with an updated resume token and\n * snapshot version.\n */\n withResumeToken(e, t) {\n return new TargetData(this.target, this.targetId, this.purpose, this.sequenceNumber, t, this.lastLimboFreeSnapshotVersion, e, /* expectedCount= */null);\n }\n /**\n * Creates a new target data instance with an updated expected count.\n */\n withExpectedCount(e) {\n return new TargetData(this.target, this.targetId, this.purpose, this.sequenceNumber, this.snapshotVersion, this.lastLimboFreeSnapshotVersion, this.resumeToken, e);\n }\n /**\n * Creates a new target data instance with an updated last limbo free\n * snapshot version number.\n */\n withLastLimboFreeSnapshotVersion(e) {\n return new TargetData(this.target, this.targetId, this.purpose, this.sequenceNumber, this.snapshotVersion, e, this.resumeToken, this.expectedCount);\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Serializer for values stored in the LocalStore. */\nclass __PRIVATE_LocalSerializer {\n constructor(e) {\n this.ut = e;\n }\n}\n\n/** Decodes a remote document from storage locally to a Document. */\nfunction __PRIVATE_fromDbRemoteDocument(e, t) {\n let n;\n if (t.document) n = __PRIVATE_fromDocument(e.ut, t.document, !!t.hasCommittedMutations);else if (t.noDocument) {\n const e = DocumentKey.fromSegments(t.noDocument.path),\n r = __PRIVATE_fromDbTimestamp(t.noDocument.readTime);\n n = MutableDocument.newNoDocument(e, r), t.hasCommittedMutations && n.setHasCommittedMutations();\n } else {\n if (!t.unknownDocument) return fail();\n {\n const e = DocumentKey.fromSegments(t.unknownDocument.path),\n r = __PRIVATE_fromDbTimestamp(t.unknownDocument.version);\n n = MutableDocument.newUnknownDocument(e, r);\n }\n }\n return t.readTime && n.setReadTime(function __PRIVATE_fromDbTimestampKey(e) {\n const t = new Timestamp(e[0], e[1]);\n return SnapshotVersion.fromTimestamp(t);\n }(t.readTime)), n;\n}\n\n/** Encodes a document for storage locally. */\nfunction __PRIVATE_toDbRemoteDocument(e, t) {\n const n = t.key,\n r = {\n prefixPath: n.getCollectionPath().popLast().toArray(),\n collectionGroup: n.collectionGroup,\n documentId: n.path.lastSegment(),\n readTime: __PRIVATE_toDbTimestampKey(t.readTime),\n hasCommittedMutations: t.hasCommittedMutations\n };\n if (t.isFoundDocument()) r.document = function __PRIVATE_toDocument(e, t) {\n return {\n name: __PRIVATE_toName(e, t.key),\n fields: t.data.value.mapValue.fields,\n updateTime: toTimestamp(e, t.version.toTimestamp()),\n createTime: toTimestamp(e, t.createTime.toTimestamp())\n };\n }(e.ut, t);else if (t.isNoDocument()) r.noDocument = {\n path: n.path.toArray(),\n readTime: __PRIVATE_toDbTimestamp(t.version)\n };else {\n if (!t.isUnknownDocument()) return fail();\n r.unknownDocument = {\n path: n.path.toArray(),\n version: __PRIVATE_toDbTimestamp(t.version)\n };\n }\n return r;\n}\nfunction __PRIVATE_toDbTimestampKey(e) {\n const t = e.toTimestamp();\n return [t.seconds, t.nanoseconds];\n}\nfunction __PRIVATE_toDbTimestamp(e) {\n const t = e.toTimestamp();\n return {\n seconds: t.seconds,\n nanoseconds: t.nanoseconds\n };\n}\nfunction __PRIVATE_fromDbTimestamp(e) {\n const t = new Timestamp(e.seconds, e.nanoseconds);\n return SnapshotVersion.fromTimestamp(t);\n}\n\n/** Encodes a batch of mutations into a DbMutationBatch for local storage. */\n/** Decodes a DbMutationBatch into a MutationBatch */\nfunction __PRIVATE_fromDbMutationBatch(e, t) {\n const n = (t.baseMutations || []).map(t => __PRIVATE_fromMutation(e.ut, t));\n // Squash old transform mutations into existing patch or set mutations.\n // The replacement of representing `transforms` with `update_transforms`\n // on the SDK means that old `transform` mutations stored in IndexedDB need\n // to be updated to `update_transforms`.\n // TODO(b/174608374): Remove this code once we perform a schema migration.\n for (let e = 0; e < t.mutations.length - 1; ++e) {\n const n = t.mutations[e];\n if (e + 1 < t.mutations.length && void 0 !== t.mutations[e + 1].transform) {\n const r = t.mutations[e + 1];\n n.updateTransforms = r.transform.fieldTransforms, t.mutations.splice(e + 1, 1), ++e;\n }\n }\n const r = t.mutations.map(t => __PRIVATE_fromMutation(e.ut, t)),\n i = Timestamp.fromMillis(t.localWriteTimeMs);\n return new MutationBatch(t.batchId, i, n, r);\n}\n\n/** Decodes a DbTarget into TargetData */\nfunction __PRIVATE_fromDbTarget(e) {\n const t = __PRIVATE_fromDbTimestamp(e.readTime),\n n = void 0 !== e.lastLimboFreeSnapshotVersion ? __PRIVATE_fromDbTimestamp(e.lastLimboFreeSnapshotVersion) : SnapshotVersion.min();\n let r;\n return r =\n /**\n * A helper function for figuring out what kind of query has been stored.\n */\n function __PRIVATE_isDocumentQuery(e) {\n return void 0 !== e.documents;\n }\n /** Encodes a DbBundle to a BundleMetadata object. */(e.query) ? function __PRIVATE_fromDocumentsTarget(e) {\n return __PRIVATE_hardAssert(1 === e.documents.length), __PRIVATE_queryToTarget(__PRIVATE_newQueryForPath(__PRIVATE_fromQueryPath(e.documents[0])));\n }(e.query) : function __PRIVATE_fromQueryTarget(e) {\n return __PRIVATE_queryToTarget(__PRIVATE_convertQueryTargetToQuery(e));\n }(e.query), new TargetData(r, e.targetId, \"TargetPurposeListen\" /* TargetPurpose.Listen */, e.lastListenSequenceNumber, t, n, ByteString.fromBase64String(e.resumeToken));\n}\n\n/** Encodes TargetData into a DbTarget for storage locally. */\nfunction __PRIVATE_toDbTarget(e, t) {\n const n = __PRIVATE_toDbTimestamp(t.snapshotVersion),\n r = __PRIVATE_toDbTimestamp(t.lastLimboFreeSnapshotVersion);\n let i;\n i = __PRIVATE_targetIsDocumentTarget(t.target) ? __PRIVATE_toDocumentsTarget(e.ut, t.target) : __PRIVATE_toQueryTarget(e.ut, t.target);\n // We can't store the resumeToken as a ByteString in IndexedDb, so we\n // convert it to a base64 string for storage.\n const s = t.resumeToken.toBase64();\n // lastListenSequenceNumber is always 0 until we do real GC.\n return {\n targetId: t.targetId,\n canonicalId: __PRIVATE_canonifyTarget(t.target),\n readTime: n,\n resumeToken: s,\n lastListenSequenceNumber: t.sequenceNumber,\n lastLimboFreeSnapshotVersion: r,\n query: i\n };\n}\n\n/**\n * Encodes a `BundledQuery` from bundle proto to a Query object.\n *\n * This reconstructs the original query used to build the bundle being loaded,\n * including features exists only in SDKs (for example: limit-to-last).\n */\nfunction __PRIVATE_fromBundledQuery(e) {\n const t = __PRIVATE_convertQueryTargetToQuery({\n parent: e.parent,\n structuredQuery: e.structuredQuery\n });\n return \"LAST\" === e.limitType ? __PRIVATE_queryWithLimit(t, t.limit, \"L\" /* LimitType.Last */) : t;\n}\n\n/** Encodes a NamedQuery proto object to a NamedQuery model object. */\n/** Encodes a DbDocumentOverlay object to an Overlay model object. */\nfunction __PRIVATE_fromDbDocumentOverlay(e, t) {\n return new Overlay(t.largestBatchId, __PRIVATE_fromMutation(e.ut, t.overlayMutation));\n}\n\n/** Decodes an Overlay model object into a DbDocumentOverlay object. */\n/**\n * Returns the DbDocumentOverlayKey corresponding to the given user and\n * document key.\n */\nfunction __PRIVATE_toDbDocumentOverlayKey(e, t) {\n const n = t.path.lastSegment();\n return [e, __PRIVATE_encodeResourcePath(t.path.popLast()), n];\n}\nfunction __PRIVATE_toDbIndexState(e, t, n, r) {\n return {\n indexId: e,\n uid: t.uid || \"\",\n sequenceNumber: n,\n readTime: __PRIVATE_toDbTimestamp(r.readTime),\n documentKey: __PRIVATE_encodeResourcePath(r.documentKey.path),\n largestBatchId: r.largestBatchId\n };\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass __PRIVATE_IndexedDbBundleCache {\n getBundleMetadata(e, t) {\n return __PRIVATE_bundlesStore(e).get(t).next(e => {\n if (e) return function __PRIVATE_fromDbBundle(e) {\n return {\n id: e.bundleId,\n createTime: __PRIVATE_fromDbTimestamp(e.createTime),\n version: e.version\n };\n }\n /** Encodes a BundleMetadata to a DbBundle. */(e);\n });\n }\n saveBundleMetadata(e, t) {\n return __PRIVATE_bundlesStore(e).put(function __PRIVATE_toDbBundle(e) {\n return {\n bundleId: e.id,\n createTime: __PRIVATE_toDbTimestamp(__PRIVATE_fromVersion(e.createTime)),\n version: e.version\n };\n }\n /** Encodes a DbNamedQuery to a NamedQuery. */(t));\n }\n getNamedQuery(e, t) {\n return __PRIVATE_namedQueriesStore(e).get(t).next(e => {\n if (e) return function __PRIVATE_fromDbNamedQuery(e) {\n return {\n name: e.name,\n query: __PRIVATE_fromBundledQuery(e.bundledQuery),\n readTime: __PRIVATE_fromDbTimestamp(e.readTime)\n };\n }\n /** Encodes a NamedQuery from a bundle proto to a DbNamedQuery. */(e);\n });\n }\n saveNamedQuery(e, t) {\n return __PRIVATE_namedQueriesStore(e).put(function __PRIVATE_toDbNamedQuery(e) {\n return {\n name: e.name,\n readTime: __PRIVATE_toDbTimestamp(__PRIVATE_fromVersion(e.readTime)),\n bundledQuery: e.bundledQuery\n };\n }(t));\n }\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the bundles object store.\n */\nfunction __PRIVATE_bundlesStore(e) {\n return __PRIVATE_getStore(e, \"bundles\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the namedQueries object store.\n */\nfunction __PRIVATE_namedQueriesStore(e) {\n return __PRIVATE_getStore(e, \"namedQueries\");\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Implementation of DocumentOverlayCache using IndexedDb.\n */\nclass __PRIVATE_IndexedDbDocumentOverlayCache {\n /**\n * @param serializer - The document serializer.\n * @param userId - The userId for which we are accessing overlays.\n */\n constructor(e, t) {\n this.serializer = e, this.userId = t;\n }\n static ct(e, t) {\n const n = t.uid || \"\";\n return new __PRIVATE_IndexedDbDocumentOverlayCache(e, n);\n }\n getOverlay(e, t) {\n return __PRIVATE_documentOverlayStore(e).get(__PRIVATE_toDbDocumentOverlayKey(this.userId, t)).next(e => e ? __PRIVATE_fromDbDocumentOverlay(this.serializer, e) : null);\n }\n getOverlays(e, t) {\n const n = __PRIVATE_newOverlayMap();\n return PersistencePromise.forEach(t, t => this.getOverlay(e, t).next(e => {\n null !== e && n.set(t, e);\n })).next(() => n);\n }\n saveOverlays(e, t, n) {\n const r = [];\n return n.forEach((n, i) => {\n const s = new Overlay(t, i);\n r.push(this.lt(e, s));\n }), PersistencePromise.waitFor(r);\n }\n removeOverlaysForBatchId(e, t, n) {\n const r = new Set();\n // Get the set of unique collection paths.\n t.forEach(e => r.add(__PRIVATE_encodeResourcePath(e.getCollectionPath())));\n const i = [];\n return r.forEach(t => {\n const r = IDBKeyRange.bound([this.userId, t, n], [this.userId, t, n + 1], /*lowerOpen=*/!1, /*upperOpen=*/!0);\n i.push(__PRIVATE_documentOverlayStore(e).H(\"collectionPathOverlayIndex\", r));\n }), PersistencePromise.waitFor(i);\n }\n getOverlaysForCollection(e, t, n) {\n const r = __PRIVATE_newOverlayMap(),\n i = __PRIVATE_encodeResourcePath(t),\n s = IDBKeyRange.bound([this.userId, i, n], [this.userId, i, Number.POSITIVE_INFINITY], /*lowerOpen=*/!0);\n return __PRIVATE_documentOverlayStore(e).W(\"collectionPathOverlayIndex\", s).next(e => {\n for (const t of e) {\n const e = __PRIVATE_fromDbDocumentOverlay(this.serializer, t);\n r.set(e.getKey(), e);\n }\n return r;\n });\n }\n getOverlaysForCollectionGroup(e, t, n, r) {\n const i = __PRIVATE_newOverlayMap();\n let s;\n // We want batch IDs larger than `sinceBatchId`, and so the lower bound\n // is not inclusive.\n const o = IDBKeyRange.bound([this.userId, t, n], [this.userId, t, Number.POSITIVE_INFINITY], /*lowerOpen=*/!0);\n return __PRIVATE_documentOverlayStore(e).Y({\n index: \"collectionGroupOverlayIndex\",\n range: o\n }, (e, t, n) => {\n // We do not want to return partial batch overlays, even if the size\n // of the result set exceeds the given `count` argument. Therefore, we\n // continue to aggregate results even after the result size exceeds\n // `count` if there are more overlays from the `currentBatchId`.\n const o = __PRIVATE_fromDbDocumentOverlay(this.serializer, t);\n i.size() < r || o.largestBatchId === s ? (i.set(o.getKey(), o), s = o.largestBatchId) : n.done();\n }).next(() => i);\n }\n lt(e, t) {\n return __PRIVATE_documentOverlayStore(e).put(function __PRIVATE_toDbDocumentOverlay(e, t, n) {\n const [r, i, s] = __PRIVATE_toDbDocumentOverlayKey(t, n.mutation.key);\n return {\n userId: t,\n collectionPath: i,\n documentId: s,\n collectionGroup: n.mutation.key.getCollectionGroup(),\n largestBatchId: n.largestBatchId,\n overlayMutation: toMutation(e.ut, n.mutation)\n };\n }(this.serializer, this.userId, t));\n }\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the document overlay object store.\n */\nfunction __PRIVATE_documentOverlayStore(e) {\n return __PRIVATE_getStore(e, \"documentOverlays\");\n}\n\n/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Note: This code is copied from the backend. Code that is not used by\n// Firestore was removed.\n/** Firestore index value writer. */\nclass __PRIVATE_FirestoreIndexValueWriter {\n constructor() {}\n // The write methods below short-circuit writing terminators for values\n // containing a (terminating) truncated value.\n // As an example, consider the resulting encoding for:\n // [\"bar\", [2, \"foo\"]] -> (STRING, \"bar\", TERM, ARRAY, NUMBER, 2, STRING, \"foo\", TERM, TERM, TERM)\n // [\"bar\", [2, truncated(\"foo\")]] -> (STRING, \"bar\", TERM, ARRAY, NUMBER, 2, STRING, \"foo\", TRUNC)\n // [\"bar\", truncated([\"foo\"])] -> (STRING, \"bar\", TERM, ARRAY. STRING, \"foo\", TERM, TRUNC)\n /** Writes an index value. */\n ht(e, t) {\n this.Pt(e, t),\n // Write separator to split index values\n // (see go/firestore-storage-format#encodings).\n t.It();\n }\n Pt(e, t) {\n if (\"nullValue\" in e) this.Tt(t, 5);else if (\"booleanValue\" in e) this.Tt(t, 10), t.Et(e.booleanValue ? 1 : 0);else if (\"integerValue\" in e) this.Tt(t, 15), t.Et(__PRIVATE_normalizeNumber(e.integerValue));else if (\"doubleValue\" in e) {\n const n = __PRIVATE_normalizeNumber(e.doubleValue);\n isNaN(n) ? this.Tt(t, 13) : (this.Tt(t, 15), __PRIVATE_isNegativeZero(n) ?\n // -0.0, 0 and 0.0 are all considered the same\n t.Et(0) : t.Et(n));\n } else if (\"timestampValue\" in e) {\n const n = e.timestampValue;\n this.Tt(t, 20), \"string\" == typeof n ? t.dt(n) : (t.dt(`${n.seconds || \"\"}`), t.Et(n.nanos || 0));\n } else if (\"stringValue\" in e) this.At(e.stringValue, t), this.Rt(t);else if (\"bytesValue\" in e) this.Tt(t, 30), t.Vt(__PRIVATE_normalizeByteString(e.bytesValue)), this.Rt(t);else if (\"referenceValue\" in e) this.ft(e.referenceValue, t);else if (\"geoPointValue\" in e) {\n const n = e.geoPointValue;\n this.Tt(t, 45), t.Et(n.latitude || 0), t.Et(n.longitude || 0);\n } else \"mapValue\" in e ? __PRIVATE_isMaxValue(e) ? this.Tt(t, Number.MAX_SAFE_INTEGER) : (this.gt(e.mapValue, t), this.Rt(t)) : \"arrayValue\" in e ? (this.yt(e.arrayValue, t), this.Rt(t)) : fail();\n }\n At(e, t) {\n this.Tt(t, 25), this.wt(e, t);\n }\n wt(e, t) {\n t.dt(e);\n }\n gt(e, t) {\n const n = e.fields || {};\n this.Tt(t, 55);\n for (const e of Object.keys(n)) this.At(e, t), this.Pt(n[e], t);\n }\n yt(e, t) {\n const n = e.values || [];\n this.Tt(t, 50);\n for (const e of n) this.Pt(e, t);\n }\n ft(e, t) {\n this.Tt(t, 37);\n DocumentKey.fromName(e).path.forEach(e => {\n this.Tt(t, 60), this.wt(e, t);\n });\n }\n Tt(e, t) {\n e.Et(t);\n }\n Rt(e) {\n // While the SDK does not implement truncation, the truncation marker is\n // used to terminate all variable length values (which are strings, bytes,\n // references, arrays and maps).\n e.Et(2);\n }\n}\n__PRIVATE_FirestoreIndexValueWriter.St = new __PRIVATE_FirestoreIndexValueWriter();\n\n/**\n * Counts the number of zeros in a byte.\n *\n * Visible for testing.\n */\nfunction __PRIVATE_numberOfLeadingZerosInByte(e) {\n if (0 === e) return 8;\n let t = 0;\n return e >> 4 == 0 && (\n // Test if the first four bits are zero.\n t += 4, e <<= 4), e >> 6 == 0 && (\n // Test if the first two (or next two) bits are zero.\n t += 2, e <<= 2), e >> 7 == 0 && (\n // Test if the remaining bit is zero.\n t += 1), t;\n}\n\n/** Counts the number of leading zeros in the given byte array. */\n/**\n * Returns the number of bytes required to store \"value\". Leading zero bytes\n * are skipped.\n */\nfunction __PRIVATE_unsignedNumLength(e) {\n // This is just the number of bytes for the unsigned representation of the number.\n const t = 64 - function __PRIVATE_numberOfLeadingZeros(e) {\n let t = 0;\n for (let n = 0; n < 8; ++n) {\n const r = __PRIVATE_numberOfLeadingZerosInByte(255 & e[n]);\n if (t += r, 8 !== r) break;\n }\n return t;\n }(e);\n return Math.ceil(t / 8);\n}\n\n/**\n * OrderedCodeWriter is a minimal-allocation implementation of the writing\n * behavior defined by the backend.\n *\n * The code is ported from its Java counterpart.\n */\nclass __PRIVATE_OrderedCodeWriter {\n constructor() {\n this.buffer = new Uint8Array(1024), this.position = 0;\n }\n bt(e) {\n const t = e[Symbol.iterator]();\n let n = t.next();\n for (; !n.done;) this.Dt(n.value), n = t.next();\n this.Ct();\n }\n vt(e) {\n const t = e[Symbol.iterator]();\n let n = t.next();\n for (; !n.done;) this.Ft(n.value), n = t.next();\n this.Mt();\n }\n /** Writes utf8 bytes into this byte sequence, ascending. */\n xt(e) {\n for (const t of e) {\n const e = t.charCodeAt(0);\n if (e < 128) this.Dt(e);else if (e < 2048) this.Dt(960 | e >>> 6), this.Dt(128 | 63 & e);else if (t < \"\\ud800\" || \"\\udbff\" < t) this.Dt(480 | e >>> 12), this.Dt(128 | 63 & e >>> 6), this.Dt(128 | 63 & e);else {\n const e = t.codePointAt(0);\n this.Dt(240 | e >>> 18), this.Dt(128 | 63 & e >>> 12), this.Dt(128 | 63 & e >>> 6), this.Dt(128 | 63 & e);\n }\n }\n this.Ct();\n }\n /** Writes utf8 bytes into this byte sequence, descending */\n Ot(e) {\n for (const t of e) {\n const e = t.charCodeAt(0);\n if (e < 128) this.Ft(e);else if (e < 2048) this.Ft(960 | e >>> 6), this.Ft(128 | 63 & e);else if (t < \"\\ud800\" || \"\\udbff\" < t) this.Ft(480 | e >>> 12), this.Ft(128 | 63 & e >>> 6), this.Ft(128 | 63 & e);else {\n const e = t.codePointAt(0);\n this.Ft(240 | e >>> 18), this.Ft(128 | 63 & e >>> 12), this.Ft(128 | 63 & e >>> 6), this.Ft(128 | 63 & e);\n }\n }\n this.Mt();\n }\n Nt(e) {\n // Values are encoded with a single byte length prefix, followed by the\n // actual value in big-endian format with leading 0 bytes dropped.\n const t = this.Bt(e),\n n = __PRIVATE_unsignedNumLength(t);\n this.Lt(1 + n), this.buffer[this.position++] = 255 & n;\n // Write the length\n for (let e = t.length - n; e < t.length; ++e) this.buffer[this.position++] = 255 & t[e];\n }\n kt(e) {\n // Values are encoded with a single byte length prefix, followed by the\n // inverted value in big-endian format with leading 0 bytes dropped.\n const t = this.Bt(e),\n n = __PRIVATE_unsignedNumLength(t);\n this.Lt(1 + n), this.buffer[this.position++] = ~(255 & n);\n // Write the length\n for (let e = t.length - n; e < t.length; ++e) this.buffer[this.position++] = ~(255 & t[e]);\n }\n /**\n * Writes the \"infinity\" byte sequence that sorts after all other byte\n * sequences written in ascending order.\n */\n qt() {\n this.Qt(255), this.Qt(255);\n }\n /**\n * Writes the \"infinity\" byte sequence that sorts before all other byte\n * sequences written in descending order.\n */\n Kt() {\n this.$t(255), this.$t(255);\n }\n /**\n * Resets the buffer such that it is the same as when it was newly\n * constructed.\n */\n reset() {\n this.position = 0;\n }\n seed(e) {\n this.Lt(e.length), this.buffer.set(e, this.position), this.position += e.length;\n }\n /** Makes a copy of the encoded bytes in this buffer. */\n Ut() {\n return this.buffer.slice(0, this.position);\n }\n /**\n * Encodes `val` into an encoding so that the order matches the IEEE 754\n * floating-point comparison results with the following exceptions:\n * -0.0 < 0.0\n * all non-NaN < NaN\n * NaN = NaN\n */\n Bt(e) {\n const t = /** Converts a JavaScript number to a byte array (using big endian encoding). */\n function __PRIVATE_doubleToLongBits(e) {\n const t = new DataView(new ArrayBuffer(8));\n return t.setFloat64(0, e, /* littleEndian= */!1), new Uint8Array(t.buffer);\n }(e),\n n = 0 != (128 & t[0]);\n // Check if the first bit is set. We use a bit mask since value[0] is\n // encoded as a number from 0 to 255.\n // Revert the two complement to get natural ordering\n t[0] ^= n ? 255 : 128;\n for (let e = 1; e < t.length; ++e) t[e] ^= n ? 255 : 0;\n return t;\n }\n /** Writes a single byte ascending to the buffer. */\n Dt(e) {\n const t = 255 & e;\n 0 === t ? (this.Qt(0), this.Qt(255)) : 255 === t ? (this.Qt(255), this.Qt(0)) : this.Qt(t);\n }\n /** Writes a single byte descending to the buffer. */\n Ft(e) {\n const t = 255 & e;\n 0 === t ? (this.$t(0), this.$t(255)) : 255 === t ? (this.$t(255), this.$t(0)) : this.$t(e);\n }\n Ct() {\n this.Qt(0), this.Qt(1);\n }\n Mt() {\n this.$t(0), this.$t(1);\n }\n Qt(e) {\n this.Lt(1), this.buffer[this.position++] = e;\n }\n $t(e) {\n this.Lt(1), this.buffer[this.position++] = ~e;\n }\n Lt(e) {\n const t = e + this.position;\n if (t <= this.buffer.length) return;\n // Try doubling.\n let n = 2 * this.buffer.length;\n // Still not big enough? Just allocate the right size.\n n < t && (n = t);\n // Create the new buffer.\n const r = new Uint8Array(n);\n r.set(this.buffer),\n // copy old data\n this.buffer = r;\n }\n}\nclass __PRIVATE_AscendingIndexByteEncoder {\n constructor(e) {\n this.Wt = e;\n }\n Vt(e) {\n this.Wt.bt(e);\n }\n dt(e) {\n this.Wt.xt(e);\n }\n Et(e) {\n this.Wt.Nt(e);\n }\n It() {\n this.Wt.qt();\n }\n}\nclass __PRIVATE_DescendingIndexByteEncoder {\n constructor(e) {\n this.Wt = e;\n }\n Vt(e) {\n this.Wt.vt(e);\n }\n dt(e) {\n this.Wt.Ot(e);\n }\n Et(e) {\n this.Wt.kt(e);\n }\n It() {\n this.Wt.Kt();\n }\n}\n\n/**\n * Implements `DirectionalIndexByteEncoder` using `OrderedCodeWriter` for the\n * actual encoding.\n */\nclass __PRIVATE_IndexByteEncoder {\n constructor() {\n this.Wt = new __PRIVATE_OrderedCodeWriter(), this.Gt = new __PRIVATE_AscendingIndexByteEncoder(this.Wt), this.zt = new __PRIVATE_DescendingIndexByteEncoder(this.Wt);\n }\n seed(e) {\n this.Wt.seed(e);\n }\n jt(e) {\n return 0 /* IndexKind.ASCENDING */ === e ? this.Gt : this.zt;\n }\n Ut() {\n return this.Wt.Ut();\n }\n reset() {\n this.Wt.reset();\n }\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Represents an index entry saved by the SDK in persisted storage. */\nclass __PRIVATE_IndexEntry {\n constructor(e, t, n, r) {\n this.indexId = e, this.documentKey = t, this.arrayValue = n, this.directionalValue = r;\n }\n /**\n * Returns an IndexEntry entry that sorts immediately after the current\n * directional value.\n */\n Ht() {\n const e = this.directionalValue.length,\n t = 0 === e || 255 === this.directionalValue[e - 1] ? e + 1 : e,\n n = new Uint8Array(t);\n return n.set(this.directionalValue, 0), t !== e ? n.set([0], this.directionalValue.length) : ++n[n.length - 1], new __PRIVATE_IndexEntry(this.indexId, this.documentKey, this.arrayValue, n);\n }\n}\nfunction __PRIVATE_indexEntryComparator(e, t) {\n let n = e.indexId - t.indexId;\n return 0 !== n ? n : (n = __PRIVATE_compareByteArrays(e.arrayValue, t.arrayValue), 0 !== n ? n : (n = __PRIVATE_compareByteArrays(e.directionalValue, t.directionalValue), 0 !== n ? n : DocumentKey.comparator(e.documentKey, t.documentKey)));\n}\nfunction __PRIVATE_compareByteArrays(e, t) {\n for (let n = 0; n < e.length && n < t.length; ++n) {\n const r = e[n] - t[n];\n if (0 !== r) return r;\n }\n return e.length - t.length;\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A light query planner for Firestore.\n *\n * This class matches a `FieldIndex` against a Firestore Query `Target`. It\n * determines whether a given index can be used to serve the specified target.\n *\n * The following table showcases some possible index configurations:\n *\n * Query | Index\n * -----------------------------------------------------------------------------\n * where('a', '==', 'a').where('b', '==', 'b') | a ASC, b DESC\n * where('a', '==', 'a').where('b', '==', 'b') | a ASC\n * where('a', '==', 'a').where('b', '==', 'b') | b DESC\n * where('a', '>=', 'a').orderBy('a') | a ASC\n * where('a', '>=', 'a').orderBy('a', 'desc') | a DESC\n * where('a', '>=', 'a').orderBy('a').orderBy('b') | a ASC, b ASC\n * where('a', '>=', 'a').orderBy('a').orderBy('b') | a ASC\n * where('a', 'array-contains', 'a').orderBy('b') | a CONTAINS, b ASCENDING\n * where('a', 'array-contains', 'a').orderBy('b') | a CONTAINS\n */\nclass __PRIVATE_TargetIndexMatcher {\n constructor(e) {\n // The inequality filters of the target (if it exists).\n // Note: The sort on FieldFilters is not required. Using SortedSet here just to utilize the custom\n // comparator.\n this.Jt = new SortedSet((e, t) => FieldPath$1.comparator(e.field, t.field)), this.collectionId = null != e.collectionGroup ? e.collectionGroup : e.path.lastSegment(), this.Yt = e.orderBy, this.Zt = [];\n for (const t of e.filters) {\n const e = t;\n e.isInequality() ? this.Jt = this.Jt.add(e) : this.Zt.push(e);\n }\n }\n get Xt() {\n return this.Jt.size > 1;\n }\n /**\n * Returns whether the index can be used to serve the TargetIndexMatcher's\n * target.\n *\n * An index is considered capable of serving the target when:\n * - The target uses all index segments for its filters and orderBy clauses.\n * The target can have additional filter and orderBy clauses, but not\n * fewer.\n * - If an ArrayContains/ArrayContainsAnyfilter is used, the index must also\n * have a corresponding `CONTAINS` segment.\n * - All directional index segments can be mapped to the target as a series of\n * equality filters, a single inequality filter and a series of orderBy\n * clauses.\n * - The segments that represent the equality filters may appear out of order.\n * - The optional segment for the inequality filter must appear after all\n * equality segments.\n * - The segments that represent that orderBy clause of the target must appear\n * in order after all equality and inequality segments. Single orderBy\n * clauses cannot be skipped, but a continuous orderBy suffix may be\n * omitted.\n */\n en(e) {\n if (__PRIVATE_hardAssert(e.collectionGroup === this.collectionId), this.Xt)\n // Only single inequality is supported for now.\n // TODO(Add support for multiple inequality query): b/298441043\n return !1;\n // If there is an array element, find a matching filter.\n const t = __PRIVATE_fieldIndexGetArraySegment(e);\n if (void 0 !== t && !this.tn(t)) return !1;\n const n = __PRIVATE_fieldIndexGetDirectionalSegments(e);\n let r = new Set(),\n i = 0,\n s = 0;\n // Process all equalities first. Equalities can appear out of order.\n for (; i < n.length && this.tn(n[i]); ++i) r = r.add(n[i].fieldPath.canonicalString());\n // If we already have processed all segments, all segments are used to serve\n // the equality filters and we do not need to map any segments to the\n // target's inequality and orderBy clauses.\n if (i === n.length) return !0;\n if (this.Jt.size > 0) {\n // Only a single inequality is currently supported. Get the only entry in the set.\n const e = this.Jt.getIterator().getNext();\n // If there is an inequality filter and the field was not in one of the\n // equality filters above, the next segment must match both the filter\n // and the first orderBy clause.\n if (!r.has(e.field.canonicalString())) {\n const t = n[i];\n if (!this.nn(e, t) || !this.rn(this.Yt[s++], t)) return !1;\n }\n ++i;\n }\n // All remaining segments need to represent the prefix of the target's\n // orderBy.\n for (; i < n.length; ++i) {\n const e = n[i];\n if (s >= this.Yt.length || !this.rn(this.Yt[s++], e)) return !1;\n }\n return !0;\n }\n /**\n * Returns a full matched field index for this target. Currently multiple\n * inequality query is not supported so function returns null.\n */\n sn() {\n if (this.Xt) return null;\n // We want to make sure only one segment created for one field. For example,\n // in case like a == 3 and a > 2, Index {a ASCENDING} will only be created\n // once.\n let e = new SortedSet(FieldPath$1.comparator);\n const t = [];\n for (const n of this.Zt) {\n if (n.field.isKeyField()) continue;\n if (\"array-contains\" /* Operator.ARRAY_CONTAINS */ === n.op || \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */ === n.op) t.push(new IndexSegment(n.field, 2 /* IndexKind.CONTAINS */));else {\n if (e.has(n.field)) continue;\n e = e.add(n.field), t.push(new IndexSegment(n.field, 0 /* IndexKind.ASCENDING */));\n }\n }\n // Note: We do not explicitly check `this.inequalityFilter` but rather rely\n // on the target defining an appropriate \"order by\" to ensure that the\n // required index segment is added. The query engine would reject a query\n // with an inequality filter that lacks the required order-by clause.\n for (const n of this.Yt)\n // Stop adding more segments if we see a order-by on key. Typically this\n // is the default implicit order-by which is covered in the index_entry\n // table as a separate column. If it is not the default order-by, the\n // generated index will be missing some segments optimized for order-bys,\n // which is probably fine.\n n.field.isKeyField() || e.has(n.field) || (e = e.add(n.field), t.push(new IndexSegment(n.field, \"asc\" /* Direction.ASCENDING */ === n.dir ? 0 /* IndexKind.ASCENDING */ : 1 /* IndexKind.DESCENDING */)));\n return new FieldIndex(FieldIndex.UNKNOWN_ID, this.collectionId, t, IndexState.empty());\n }\n tn(e) {\n for (const t of this.Zt) if (this.nn(t, e)) return !0;\n return !1;\n }\n nn(e, t) {\n if (void 0 === e || !e.field.isEqual(t.fieldPath)) return !1;\n const n = \"array-contains\" /* Operator.ARRAY_CONTAINS */ === e.op || \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */ === e.op;\n return 2 /* IndexKind.CONTAINS */ === t.kind === n;\n }\n rn(e, t) {\n return !!e.field.isEqual(t.fieldPath) && (0 /* IndexKind.ASCENDING */ === t.kind && \"asc\" /* Direction.ASCENDING */ === e.dir || 1 /* IndexKind.DESCENDING */ === t.kind && \"desc\" /* Direction.DESCENDING */ === e.dir);\n }\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Provides utility functions that help with boolean logic transformations needed for handling\n * complex filters used in queries.\n */\n/**\n * The `in` filter is only a syntactic sugar over a disjunction of equalities. For instance: `a in\n * [1,2,3]` is in fact `a==1 || a==2 || a==3`. This method expands any `in` filter in the given\n * input into a disjunction of equality filters and returns the expanded filter.\n */\nfunction __PRIVATE_computeInExpansion(e) {\n var t, n;\n if (__PRIVATE_hardAssert(e instanceof FieldFilter || e instanceof CompositeFilter), e instanceof FieldFilter) {\n if (e instanceof __PRIVATE_InFilter) {\n const r = (null === (n = null === (t = e.value.arrayValue) || void 0 === t ? void 0 : t.values) || void 0 === n ? void 0 : n.map(t => FieldFilter.create(e.field, \"==\" /* Operator.EQUAL */, t))) || [];\n return CompositeFilter.create(r, \"or\" /* CompositeOperator.OR */);\n }\n // We have reached other kinds of field filters.\n return e;\n }\n // We have a composite filter.\n const r = e.filters.map(e => __PRIVATE_computeInExpansion(e));\n return CompositeFilter.create(r, e.op);\n}\n\n/**\n * Given a composite filter, returns the list of terms in its disjunctive normal form.\n *\n * Each element in the return value is one term of the resulting DNF. For instance: For the\n * input: (A || B) && C, the DNF form is: (A && C) || (B && C), and the return value is a list\n * with two elements: a composite filter that performs (A && C), and a composite filter that\n * performs (B && C).\n *\n * @param filter the composite filter to calculate DNF transform for.\n * @return the terms in the DNF transform.\n */\nfunction __PRIVATE_getDnfTerms(e) {\n if (0 === e.getFilters().length) return [];\n const t = __PRIVATE_computeDistributedNormalForm(__PRIVATE_computeInExpansion(e));\n return __PRIVATE_hardAssert(__PRIVATE_isDisjunctiveNormalForm(t)), __PRIVATE_isSingleFieldFilter(t) || __PRIVATE_isFlatConjunction(t) ? [t] : t.getFilters();\n}\n\n/** Returns true if the given filter is a single field filter. e.g. (a == 10). */\nfunction __PRIVATE_isSingleFieldFilter(e) {\n return e instanceof FieldFilter;\n}\n\n/**\n * Returns true if the given filter is the conjunction of one or more field filters. e.g. (a == 10\n * && b == 20)\n */\nfunction __PRIVATE_isFlatConjunction(e) {\n return e instanceof CompositeFilter && __PRIVATE_compositeFilterIsFlatConjunction(e);\n}\n\n/**\n * Returns whether or not the given filter is in disjunctive normal form (DNF).\n *\n *
In boolean logic, a disjunctive normal form (DNF) is a canonical normal form of a logical\n * formula consisting of a disjunction of conjunctions; it can also be described as an OR of ANDs.\n *\n *
For more info, visit: https://en.wikipedia.org/wiki/Disjunctive_normal_form\n */\nfunction __PRIVATE_isDisjunctiveNormalForm(e) {\n return __PRIVATE_isSingleFieldFilter(e) || __PRIVATE_isFlatConjunction(e) ||\n /**\n * Returns true if the given filter is the disjunction of one or more \"flat conjunctions\" and\n * field filters. e.g. (a == 10) || (b==20 && c==30)\n */\n function __PRIVATE_isDisjunctionOfFieldFiltersAndFlatConjunctions(e) {\n if (e instanceof CompositeFilter && __PRIVATE_compositeFilterIsDisjunction(e)) {\n for (const t of e.getFilters()) if (!__PRIVATE_isSingleFieldFilter(t) && !__PRIVATE_isFlatConjunction(t)) return !1;\n return !0;\n }\n return !1;\n }(e);\n}\nfunction __PRIVATE_computeDistributedNormalForm(e) {\n if (__PRIVATE_hardAssert(e instanceof FieldFilter || e instanceof CompositeFilter), e instanceof FieldFilter) return e;\n if (1 === e.filters.length) return __PRIVATE_computeDistributedNormalForm(e.filters[0]);\n // Compute DNF for each of the subfilters first\n const t = e.filters.map(e => __PRIVATE_computeDistributedNormalForm(e));\n let n = CompositeFilter.create(t, e.op);\n return n = __PRIVATE_applyAssociation(n), __PRIVATE_isDisjunctiveNormalForm(n) ? n : (__PRIVATE_hardAssert(n instanceof CompositeFilter), __PRIVATE_hardAssert(__PRIVATE_compositeFilterIsConjunction(n)), __PRIVATE_hardAssert(n.filters.length > 1), n.filters.reduce((e, t) => __PRIVATE_applyDistribution(e, t)));\n}\nfunction __PRIVATE_applyDistribution(e, t) {\n let n;\n return __PRIVATE_hardAssert(e instanceof FieldFilter || e instanceof CompositeFilter), __PRIVATE_hardAssert(t instanceof FieldFilter || t instanceof CompositeFilter),\n // FieldFilter FieldFilter\n n = e instanceof FieldFilter ? t instanceof FieldFilter ? function __PRIVATE_applyDistributionFieldFilters(e, t) {\n // Conjunction distribution for two field filters is the conjunction of them.\n return CompositeFilter.create([e, t], \"and\" /* CompositeOperator.AND */);\n }(e, t) : __PRIVATE_applyDistributionFieldAndCompositeFilters(e, t) : t instanceof FieldFilter ? __PRIVATE_applyDistributionFieldAndCompositeFilters(t, e) : function __PRIVATE_applyDistributionCompositeFilters(e, t) {\n // There are four cases:\n // (A & B) & (C & D) --> (A & B & C & D)\n // (A & B) & (C | D) --> (A & B & C) | (A & B & D)\n // (A | B) & (C & D) --> (C & D & A) | (C & D & B)\n // (A | B) & (C | D) --> (A & C) | (A & D) | (B & C) | (B & D)\n // Case 1 is a merge.\n if (__PRIVATE_hardAssert(e.filters.length > 0 && t.filters.length > 0), __PRIVATE_compositeFilterIsConjunction(e) && __PRIVATE_compositeFilterIsConjunction(t)) return __PRIVATE_compositeFilterWithAddedFilters(e, t.getFilters());\n // Case 2,3,4 all have at least one side (lhs or rhs) that is a disjunction. In all three cases\n // we should take each element of the disjunction and distribute it over the other side, and\n // return the disjunction of the distribution results.\n const n = __PRIVATE_compositeFilterIsDisjunction(e) ? e : t,\n r = __PRIVATE_compositeFilterIsDisjunction(e) ? t : e,\n i = n.filters.map(e => __PRIVATE_applyDistribution(e, r));\n return CompositeFilter.create(i, \"or\" /* CompositeOperator.OR */);\n }(e, t), __PRIVATE_applyAssociation(n);\n}\nfunction __PRIVATE_applyDistributionFieldAndCompositeFilters(e, t) {\n // There are two cases:\n // A & (B & C) --> (A & B & C)\n // A & (B | C) --> (A & B) | (A & C)\n if (__PRIVATE_compositeFilterIsConjunction(t))\n // Case 1\n return __PRIVATE_compositeFilterWithAddedFilters(t, e.getFilters());\n {\n // Case 2\n const n = t.filters.map(t => __PRIVATE_applyDistribution(e, t));\n return CompositeFilter.create(n, \"or\" /* CompositeOperator.OR */);\n }\n}\n\n/**\n * Applies the associativity property to the given filter and returns the resulting filter.\n *\n *
\n * A | (B | C) == (A | B) | C == (A | B | C)\n * A & (B & C) == (A & B) & C == (A & B & C)\n * \n *\n * For more info, visit: https://en.wikipedia.org/wiki/Associative_property#Propositional_logic\n */\nfunction __PRIVATE_applyAssociation(e) {\n if (__PRIVATE_hardAssert(e instanceof FieldFilter || e instanceof CompositeFilter), e instanceof FieldFilter) return e;\n const t = e.getFilters();\n // If the composite filter only contains 1 filter, apply associativity to it.\n if (1 === t.length) return __PRIVATE_applyAssociation(t[0]);\n // Associativity applied to a flat composite filter results is itself.\n if (__PRIVATE_compositeFilterIsFlat(e)) return e;\n // First apply associativity to all subfilters. This will in turn recursively apply\n // associativity to all nested composite filters and field filters.\n const n = t.map(e => __PRIVATE_applyAssociation(e)),\n r = [];\n // For composite subfilters that perform the same kind of logical operation as `compositeFilter`\n // take out their filters and add them to `compositeFilter`. For example:\n // compositeFilter = (A | (B | C | D))\n // compositeSubfilter = (B | C | D)\n // Result: (A | B | C | D)\n // Note that the `compositeSubfilter` has been eliminated, and its filters (B, C, D) have been\n // added to the top-level \"compositeFilter\".\n return n.forEach(t => {\n t instanceof FieldFilter ? r.push(t) : t instanceof CompositeFilter && (t.op === e.op ?\n // compositeFilter: (A | (B | C))\n // compositeSubfilter: (B | C)\n // Result: (A | B | C)\n r.push(...t.filters) :\n // compositeFilter: (A | (B & C))\n // compositeSubfilter: (B & C)\n // Result: (A | (B & C))\n r.push(t));\n }), 1 === r.length ? r[0] : CompositeFilter.create(r, e.op);\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An in-memory implementation of IndexManager.\n */\nclass __PRIVATE_MemoryIndexManager {\n constructor() {\n this.on = new __PRIVATE_MemoryCollectionParentIndex();\n }\n addToCollectionParentIndex(e, t) {\n return this.on.add(t), PersistencePromise.resolve();\n }\n getCollectionParents(e, t) {\n return PersistencePromise.resolve(this.on.getEntries(t));\n }\n addFieldIndex(e, t) {\n // Field indices are not supported with memory persistence.\n return PersistencePromise.resolve();\n }\n deleteFieldIndex(e, t) {\n // Field indices are not supported with memory persistence.\n return PersistencePromise.resolve();\n }\n deleteAllFieldIndexes(e) {\n // Field indices are not supported with memory persistence.\n return PersistencePromise.resolve();\n }\n createTargetIndexes(e, t) {\n // Field indices are not supported with memory persistence.\n return PersistencePromise.resolve();\n }\n getDocumentsMatchingTarget(e, t) {\n // Field indices are not supported with memory persistence.\n return PersistencePromise.resolve(null);\n }\n getIndexType(e, t) {\n // Field indices are not supported with memory persistence.\n return PersistencePromise.resolve(0 /* IndexType.NONE */);\n }\n getFieldIndexes(e, t) {\n // Field indices are not supported with memory persistence.\n return PersistencePromise.resolve([]);\n }\n getNextCollectionGroupToUpdate(e) {\n // Field indices are not supported with memory persistence.\n return PersistencePromise.resolve(null);\n }\n getMinOffset(e, t) {\n return PersistencePromise.resolve(IndexOffset.min());\n }\n getMinOffsetFromCollectionGroup(e, t) {\n return PersistencePromise.resolve(IndexOffset.min());\n }\n updateCollectionGroup(e, t, n) {\n // Field indices are not supported with memory persistence.\n return PersistencePromise.resolve();\n }\n updateIndexEntries(e, t) {\n // Field indices are not supported with memory persistence.\n return PersistencePromise.resolve();\n }\n}\n\n/**\n * Internal implementation of the collection-parent index exposed by MemoryIndexManager.\n * Also used for in-memory caching by IndexedDbIndexManager and initial index population\n * in indexeddb_schema.ts\n */\nclass __PRIVATE_MemoryCollectionParentIndex {\n constructor() {\n this.index = {};\n }\n // Returns false if the entry already existed.\n add(e) {\n const t = e.lastSegment(),\n n = e.popLast(),\n r = this.index[t] || new SortedSet(ResourcePath.comparator),\n i = !r.has(n);\n return this.index[t] = r.add(n), i;\n }\n has(e) {\n const t = e.lastSegment(),\n n = e.popLast(),\n r = this.index[t];\n return r && r.has(n);\n }\n getEntries(e) {\n return (this.index[e] || new SortedSet(ResourcePath.comparator)).toArray();\n }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst Te = new Uint8Array(0);\n\n/**\n * A persisted implementation of IndexManager.\n *\n * PORTING NOTE: Unlike iOS and Android, the Web SDK does not memoize index\n * data as it supports multi-tab access.\n */\nclass __PRIVATE_IndexedDbIndexManager {\n constructor(e, t) {\n this.user = e, this.databaseId = t,\n /**\n * An in-memory copy of the index entries we've already written since the SDK\n * launched. Used to avoid re-writing the same entry repeatedly.\n *\n * This is *NOT* a complete cache of what's in persistence and so can never be\n * used to satisfy reads.\n */\n this._n = new __PRIVATE_MemoryCollectionParentIndex(),\n /**\n * Maps from a target to its equivalent list of sub-targets. Each sub-target\n * contains only one term from the target's disjunctive normal form (DNF).\n */\n this.an = new ObjectMap(e => __PRIVATE_canonifyTarget(e), (e, t) => __PRIVATE_targetEquals(e, t)), this.uid = e.uid || \"\";\n }\n /**\n * Adds a new entry to the collection parent index.\n *\n * Repeated calls for the same collectionPath should be avoided within a\n * transaction as IndexedDbIndexManager only caches writes once a transaction\n * has been committed.\n */\n addToCollectionParentIndex(e, t) {\n if (!this._n.has(t)) {\n const n = t.lastSegment(),\n r = t.popLast();\n e.addOnCommittedListener(() => {\n // Add the collection to the in memory cache only if the transaction was\n // successfully committed.\n this._n.add(t);\n });\n const i = {\n collectionId: n,\n parent: __PRIVATE_encodeResourcePath(r)\n };\n return __PRIVATE_collectionParentsStore(e).put(i);\n }\n return PersistencePromise.resolve();\n }\n getCollectionParents(e, t) {\n const n = [],\n r = IDBKeyRange.bound([t, \"\"], [__PRIVATE_immediateSuccessor(t), \"\"], /*lowerOpen=*/!1, /*upperOpen=*/!0);\n return __PRIVATE_collectionParentsStore(e).W(r).next(e => {\n for (const r of e) {\n // This collectionId guard shouldn't be necessary (and isn't as long\n // as we're running in a real browser), but there's a bug in\n // indexeddbshim that breaks our range in our tests running in node:\n // https://github.com/axemclion/IndexedDBShim/issues/334\n if (r.collectionId !== t) break;\n n.push(__PRIVATE_decodeResourcePath(r.parent));\n }\n return n;\n });\n }\n addFieldIndex(e, t) {\n // TODO(indexing): Verify that the auto-incrementing index ID works in\n // Safari & Firefox.\n const n = __PRIVATE_indexConfigurationStore(e),\n r = function __PRIVATE_toDbIndexConfiguration(e) {\n return {\n indexId: e.indexId,\n collectionGroup: e.collectionGroup,\n fields: e.fields.map(e => [e.fieldPath.canonicalString(), e.kind])\n };\n }(t);\n delete r.indexId;\n // `indexId` is auto-populated by IndexedDb\n const i = n.add(r);\n if (t.indexState) {\n const n = __PRIVATE_indexStateStore(e);\n return i.next(e => {\n n.put(__PRIVATE_toDbIndexState(e, this.user, t.indexState.sequenceNumber, t.indexState.offset));\n });\n }\n return i.next();\n }\n deleteFieldIndex(e, t) {\n const n = __PRIVATE_indexConfigurationStore(e),\n r = __PRIVATE_indexStateStore(e),\n i = __PRIVATE_indexEntriesStore(e);\n return n.delete(t.indexId).next(() => r.delete(IDBKeyRange.bound([t.indexId], [t.indexId + 1], /*lowerOpen=*/!1, /*upperOpen=*/!0))).next(() => i.delete(IDBKeyRange.bound([t.indexId], [t.indexId + 1], /*lowerOpen=*/!1, /*upperOpen=*/!0)));\n }\n deleteAllFieldIndexes(e) {\n const t = __PRIVATE_indexConfigurationStore(e),\n n = __PRIVATE_indexEntriesStore(e),\n r = __PRIVATE_indexStateStore(e);\n return t.H().next(() => n.H()).next(() => r.H());\n }\n createTargetIndexes(e, t) {\n return PersistencePromise.forEach(this.un(t), t => this.getIndexType(e, t).next(n => {\n if (0 /* IndexType.NONE */ === n || 1 /* IndexType.PARTIAL */ === n) {\n const n = new __PRIVATE_TargetIndexMatcher(t).sn();\n if (null != n) return this.addFieldIndex(e, n);\n }\n }));\n }\n getDocumentsMatchingTarget(e, t) {\n const n = __PRIVATE_indexEntriesStore(e);\n let r = !0;\n const i = new Map();\n return PersistencePromise.forEach(this.un(t), t => this.cn(e, t).next(e => {\n r && (r = !!e), i.set(t, e);\n })).next(() => {\n if (r) {\n let e = __PRIVATE_documentKeySet();\n const r = [];\n return PersistencePromise.forEach(i, (i, s) => {\n __PRIVATE_logDebug(\"IndexedDbIndexManager\", `Using index ${function __PRIVATE_fieldIndexToString(e) {\n return `id=${e.indexId}|cg=${e.collectionGroup}|f=${e.fields.map(e => `${e.fieldPath}:${e.kind}`).join(\",\")}`;\n }(i)} to execute ${__PRIVATE_canonifyTarget(t)}`);\n const o = function __PRIVATE_targetGetArrayValues(e, t) {\n const n = __PRIVATE_fieldIndexGetArraySegment(t);\n if (void 0 === n) return null;\n for (const t of __PRIVATE_targetGetFieldFiltersForPath(e, n.fieldPath)) switch (t.op) {\n case \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */:\n return t.value.arrayValue.values || [];\n case \"array-contains\" /* Operator.ARRAY_CONTAINS */:\n return [t.value];\n // Remaining filters are not array filters.\n }\n return null;\n }\n /**\n * Returns the list of values that are used in != or NOT_IN filters. Returns\n * `null` if there are no such filters.\n */(s, i),\n _ = function __PRIVATE_targetGetNotInValues(e, t) {\n const n = new Map();\n for (const r of __PRIVATE_fieldIndexGetDirectionalSegments(t)) for (const t of __PRIVATE_targetGetFieldFiltersForPath(e, r.fieldPath)) switch (t.op) {\n case \"==\" /* Operator.EQUAL */:\n case \"in\" /* Operator.IN */:\n // Encode equality prefix, which is encoded in the index value before\n // the inequality (e.g. `a == 'a' && b != 'b'` is encoded to\n // `value != 'ab'`).\n n.set(r.fieldPath.canonicalString(), t.value);\n break;\n case \"not-in\" /* Operator.NOT_IN */:\n case \"!=\" /* Operator.NOT_EQUAL */:\n // NotIn/NotEqual is always a suffix. There cannot be any remaining\n // segments and hence we can return early here.\n return n.set(r.fieldPath.canonicalString(), t.value), Array.from(n.values());\n // Remaining filters cannot be used as notIn bounds.\n }\n return null;\n }\n /**\n * Returns a lower bound of field values that can be used as a starting point to\n * scan the index defined by `fieldIndex`. Returns `MIN_VALUE` if no lower bound\n * exists.\n */(s, i),\n a = function __PRIVATE_targetGetLowerBound(e, t) {\n const n = [];\n let r = !0;\n // For each segment, retrieve a lower bound if there is a suitable filter or\n // startAt.\n for (const i of __PRIVATE_fieldIndexGetDirectionalSegments(t)) {\n const t = 0 /* IndexKind.ASCENDING */ === i.kind ? __PRIVATE_targetGetAscendingBound(e, i.fieldPath, e.startAt) : __PRIVATE_targetGetDescendingBound(e, i.fieldPath, e.startAt);\n n.push(t.value), r && (r = t.inclusive);\n }\n return new Bound(n, r);\n }\n /**\n * Returns an upper bound of field values that can be used as an ending point\n * when scanning the index defined by `fieldIndex`. Returns `MAX_VALUE` if no\n * upper bound exists.\n */(s, i),\n u = function __PRIVATE_targetGetUpperBound(e, t) {\n const n = [];\n let r = !0;\n // For each segment, retrieve an upper bound if there is a suitable filter or\n // endAt.\n for (const i of __PRIVATE_fieldIndexGetDirectionalSegments(t)) {\n const t = 0 /* IndexKind.ASCENDING */ === i.kind ? __PRIVATE_targetGetDescendingBound(e, i.fieldPath, e.endAt) : __PRIVATE_targetGetAscendingBound(e, i.fieldPath, e.endAt);\n n.push(t.value), r && (r = t.inclusive);\n }\n return new Bound(n, r);\n }(s, i),\n c = this.ln(i, s, a),\n l = this.ln(i, s, u),\n h = this.hn(i, s, _),\n P = this.Pn(i.indexId, o, c, a.inclusive, l, u.inclusive, h);\n return PersistencePromise.forEach(P, i => n.j(i, t.limit).next(t => {\n t.forEach(t => {\n const n = DocumentKey.fromSegments(t.documentKey);\n e.has(n) || (e = e.add(n), r.push(n));\n });\n }));\n }).next(() => r);\n }\n return PersistencePromise.resolve(null);\n });\n }\n un(e) {\n let t = this.an.get(e);\n if (t) return t;\n if (0 === e.filters.length) t = [e];else {\n t = __PRIVATE_getDnfTerms(CompositeFilter.create(e.filters, \"and\" /* CompositeOperator.AND */)).map(t => __PRIVATE_newTarget(e.path, e.collectionGroup, e.orderBy, t.getFilters(), e.limit, e.startAt, e.endAt));\n }\n return this.an.set(e, t), t;\n }\n /**\n * Constructs a key range query on `DbIndexEntryStore` that unions all\n * bounds.\n */\n Pn(e, t, n, r, i, s, o) {\n // The number of total index scans we union together. This is similar to a\n // distributed normal form, but adapted for array values. We create a single\n // index range per value in an ARRAY_CONTAINS or ARRAY_CONTAINS_ANY filter\n // combined with the values from the query bounds.\n const _ = (null != t ? t.length : 1) * Math.max(n.length, i.length),\n a = _ / (null != t ? t.length : 1),\n u = [];\n for (let c = 0; c < _; ++c) {\n const _ = t ? this.In(t[c / a]) : Te,\n l = this.Tn(e, _, n[c % a], r),\n h = this.En(e, _, i[c % a], s),\n P = o.map(t => this.Tn(e, _, t, /* inclusive= */!0));\n u.push(...this.createRange(l, h, P));\n }\n return u;\n }\n /** Generates the lower bound for `arrayValue` and `directionalValue`. */\n Tn(e, t, n, r) {\n const i = new __PRIVATE_IndexEntry(e, DocumentKey.empty(), t, n);\n return r ? i : i.Ht();\n }\n /** Generates the upper bound for `arrayValue` and `directionalValue`. */\n En(e, t, n, r) {\n const i = new __PRIVATE_IndexEntry(e, DocumentKey.empty(), t, n);\n return r ? i.Ht() : i;\n }\n cn(e, t) {\n const n = new __PRIVATE_TargetIndexMatcher(t),\n r = null != t.collectionGroup ? t.collectionGroup : t.path.lastSegment();\n return this.getFieldIndexes(e, r).next(e => {\n // Return the index with the most number of segments.\n let t = null;\n for (const r of e) {\n n.en(r) && (!t || r.fields.length > t.fields.length) && (t = r);\n }\n return t;\n });\n }\n getIndexType(e, t) {\n let n = 2 /* IndexType.FULL */;\n const r = this.un(t);\n return PersistencePromise.forEach(r, t => this.cn(e, t).next(e => {\n e ? 0 /* IndexType.NONE */ !== n && e.fields.length < function __PRIVATE_targetGetSegmentCount(e) {\n let t = new SortedSet(FieldPath$1.comparator),\n n = !1;\n for (const r of e.filters) for (const e of r.getFlattenedFilters())\n // __name__ is not an explicit segment of any index, so we don't need to\n // count it.\n e.field.isKeyField() || (\n // ARRAY_CONTAINS or ARRAY_CONTAINS_ANY filters must be counted separately.\n // For instance, it is possible to have an index for \"a ARRAY a ASC\". Even\n // though these are on the same field, they should be counted as two\n // separate segments in an index.\n \"array-contains\" /* Operator.ARRAY_CONTAINS */ === e.op || \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */ === e.op ? n = !0 : t = t.add(e.field));\n for (const n of e.orderBy)\n // __name__ is not an explicit segment of any index, so we don't need to\n // count it.\n n.field.isKeyField() || (t = t.add(n.field));\n return t.size + (n ? 1 : 0);\n }(t) && (n = 1 /* IndexType.PARTIAL */) : n = 0 /* IndexType.NONE */;\n })).next(() =>\n // OR queries have more than one sub-target (one sub-target per DNF term). We currently consider\n // OR queries that have a `limit` to have a partial index. For such queries we perform sorting\n // and apply the limit in memory as a post-processing step.\n function __PRIVATE_targetHasLimit(e) {\n return null !== e.limit;\n }(t) && r.length > 1 && 2 /* IndexType.FULL */ === n ? 1 /* IndexType.PARTIAL */ : n);\n }\n /**\n * Returns the byte encoded form of the directional values in the field index.\n * Returns `null` if the document does not have all fields specified in the\n * index.\n */\n dn(e, t) {\n const n = new __PRIVATE_IndexByteEncoder();\n for (const r of __PRIVATE_fieldIndexGetDirectionalSegments(e)) {\n const e = t.data.field(r.fieldPath);\n if (null == e) return null;\n const i = n.jt(r.kind);\n __PRIVATE_FirestoreIndexValueWriter.St.ht(e, i);\n }\n return n.Ut();\n }\n /** Encodes a single value to the ascending index format. */\n In(e) {\n const t = new __PRIVATE_IndexByteEncoder();\n return __PRIVATE_FirestoreIndexValueWriter.St.ht(e, t.jt(0 /* IndexKind.ASCENDING */)), t.Ut();\n }\n /**\n * Returns an encoded form of the document key that sorts based on the key\n * ordering of the field index.\n */\n An(e, t) {\n const n = new __PRIVATE_IndexByteEncoder();\n return __PRIVATE_FirestoreIndexValueWriter.St.ht(__PRIVATE_refValue(this.databaseId, t), n.jt(function __PRIVATE_fieldIndexGetKeyOrder(e) {\n const t = __PRIVATE_fieldIndexGetDirectionalSegments(e);\n return 0 === t.length ? 0 /* IndexKind.ASCENDING */ : t[t.length - 1].kind;\n }(e))), n.Ut();\n }\n /**\n * Encodes the given field values according to the specification in `target`.\n * For IN queries, a list of possible values is returned.\n */\n hn(e, t, n) {\n if (null === n) return [];\n let r = [];\n r.push(new __PRIVATE_IndexByteEncoder());\n let i = 0;\n for (const s of __PRIVATE_fieldIndexGetDirectionalSegments(e)) {\n const e = n[i++];\n for (const n of r) if (this.Rn(t, s.fieldPath) && isArray(e)) r = this.Vn(r, s, e);else {\n const t = n.jt(s.kind);\n __PRIVATE_FirestoreIndexValueWriter.St.ht(e, t);\n }\n }\n return this.mn(r);\n }\n /**\n * Encodes the given bounds according to the specification in `target`. For IN\n * queries, a list of possible values is returned.\n */\n ln(e, t, n) {\n return this.hn(e, t, n.position);\n }\n /** Returns the byte representation for the provided encoders. */\n mn(e) {\n const t = [];\n for (let n = 0; n < e.length; ++n) t[n] = e[n].Ut();\n return t;\n }\n /**\n * Creates a separate encoder for each element of an array.\n *\n * The method appends each value to all existing encoders (e.g. filter(\"a\",\n * \"==\", \"a1\").filter(\"b\", \"in\", [\"b1\", \"b2\"]) becomes [\"a1,b1\", \"a1,b2\"]). A\n * list of new encoders is returned.\n */\n Vn(e, t, n) {\n const r = [...e],\n i = [];\n for (const e of n.arrayValue.values || []) for (const n of r) {\n const r = new __PRIVATE_IndexByteEncoder();\n r.seed(n.Ut()), __PRIVATE_FirestoreIndexValueWriter.St.ht(e, r.jt(t.kind)), i.push(r);\n }\n return i;\n }\n Rn(e, t) {\n return !!e.filters.find(e => e instanceof FieldFilter && e.field.isEqual(t) && (\"in\" /* Operator.IN */ === e.op || \"not-in\" /* Operator.NOT_IN */ === e.op));\n }\n getFieldIndexes(e, t) {\n const n = __PRIVATE_indexConfigurationStore(e),\n r = __PRIVATE_indexStateStore(e);\n return (t ? n.W(\"collectionGroupIndex\", IDBKeyRange.bound(t, t)) : n.W()).next(e => {\n const t = [];\n return PersistencePromise.forEach(e, e => r.get([e.indexId, this.uid]).next(n => {\n t.push(function __PRIVATE_fromDbIndexConfiguration(e, t) {\n const n = t ? new IndexState(t.sequenceNumber, new IndexOffset(__PRIVATE_fromDbTimestamp(t.readTime), new DocumentKey(__PRIVATE_decodeResourcePath(t.documentKey)), t.largestBatchId)) : IndexState.empty(),\n r = e.fields.map(([e, t]) => new IndexSegment(FieldPath$1.fromServerFormat(e), t));\n return new FieldIndex(e.indexId, e.collectionGroup, r, n);\n }(e, n));\n })).next(() => t);\n });\n }\n getNextCollectionGroupToUpdate(e) {\n return this.getFieldIndexes(e).next(e => 0 === e.length ? null : (e.sort((e, t) => {\n const n = e.indexState.sequenceNumber - t.indexState.sequenceNumber;\n return 0 !== n ? n : __PRIVATE_primitiveComparator(e.collectionGroup, t.collectionGroup);\n }), e[0].collectionGroup));\n }\n updateCollectionGroup(e, t, n) {\n const r = __PRIVATE_indexConfigurationStore(e),\n i = __PRIVATE_indexStateStore(e);\n return this.fn(e).next(e => r.W(\"collectionGroupIndex\", IDBKeyRange.bound(t, t)).next(t => PersistencePromise.forEach(t, t => i.put(__PRIVATE_toDbIndexState(t.indexId, this.user, e, n)))));\n }\n updateIndexEntries(e, t) {\n // Porting Note: `getFieldIndexes()` on Web does not cache index lookups as\n // it could be used across different IndexedDB transactions. As any cached\n // data might be invalidated by other multi-tab clients, we can only trust\n // data within a single IndexedDB transaction. We therefore add a cache\n // here.\n const n = new Map();\n return PersistencePromise.forEach(t, (t, r) => {\n const i = n.get(t.collectionGroup);\n return (i ? PersistencePromise.resolve(i) : this.getFieldIndexes(e, t.collectionGroup)).next(i => (n.set(t.collectionGroup, i), PersistencePromise.forEach(i, n => this.gn(e, t, n).next(t => {\n const i = this.pn(r, n);\n return t.isEqual(i) ? PersistencePromise.resolve() : this.yn(e, r, n, t, i);\n }))));\n });\n }\n wn(e, t, n, r) {\n return __PRIVATE_indexEntriesStore(e).put({\n indexId: r.indexId,\n uid: this.uid,\n arrayValue: r.arrayValue,\n directionalValue: r.directionalValue,\n orderedDocumentKey: this.An(n, t.key),\n documentKey: t.key.path.toArray()\n });\n }\n Sn(e, t, n, r) {\n return __PRIVATE_indexEntriesStore(e).delete([r.indexId, this.uid, r.arrayValue, r.directionalValue, this.An(n, t.key), t.key.path.toArray()]);\n }\n gn(e, t, n) {\n const r = __PRIVATE_indexEntriesStore(e);\n let i = new SortedSet(__PRIVATE_indexEntryComparator);\n return r.Y({\n index: \"documentKeyIndex\",\n range: IDBKeyRange.only([n.indexId, this.uid, this.An(n, t)])\n }, (e, r) => {\n i = i.add(new __PRIVATE_IndexEntry(n.indexId, t, r.arrayValue, r.directionalValue));\n }).next(() => i);\n }\n /** Creates the index entries for the given document. */\n pn(e, t) {\n let n = new SortedSet(__PRIVATE_indexEntryComparator);\n const r = this.dn(t, e);\n if (null == r) return n;\n const i = __PRIVATE_fieldIndexGetArraySegment(t);\n if (null != i) {\n const s = e.data.field(i.fieldPath);\n if (isArray(s)) for (const i of s.arrayValue.values || []) n = n.add(new __PRIVATE_IndexEntry(t.indexId, e.key, this.In(i), r));\n } else n = n.add(new __PRIVATE_IndexEntry(t.indexId, e.key, Te, r));\n return n;\n }\n /**\n * Updates the index entries for the provided document by deleting entries\n * that are no longer referenced in `newEntries` and adding all newly added\n * entries.\n */\n yn(e, t, n, r, i) {\n __PRIVATE_logDebug(\"IndexedDbIndexManager\", \"Updating index entries for document '%s'\", t.key);\n const s = [];\n return function __PRIVATE_diffSortedSets(e, t, n, r, i) {\n const s = e.getIterator(),\n o = t.getIterator();\n let _ = __PRIVATE_advanceIterator(s),\n a = __PRIVATE_advanceIterator(o);\n // Walk through the two sets at the same time, using the ordering defined by\n // `comparator`.\n for (; _ || a;) {\n let e = !1,\n t = !1;\n if (_ && a) {\n const r = n(_, a);\n r < 0 ?\n // The element was removed if the next element in our ordered\n // walkthrough is only in `before`.\n t = !0 : r > 0 && (\n // The element was added if the next element in our ordered walkthrough\n // is only in `after`.\n e = !0);\n } else null != _ ? t = !0 : e = !0;\n e ? (r(a), a = __PRIVATE_advanceIterator(o)) : t ? (i(_), _ = __PRIVATE_advanceIterator(s)) : (_ = __PRIVATE_advanceIterator(s), a = __PRIVATE_advanceIterator(o));\n }\n }(r, i, __PRIVATE_indexEntryComparator, /* onAdd= */r => {\n s.push(this.wn(e, t, n, r));\n }, /* onRemove= */r => {\n s.push(this.Sn(e, t, n, r));\n }), PersistencePromise.waitFor(s);\n }\n fn(e) {\n let t = 1;\n return __PRIVATE_indexStateStore(e).Y({\n index: \"sequenceNumberIndex\",\n reverse: !0,\n range: IDBKeyRange.upperBound([this.uid, Number.MAX_SAFE_INTEGER])\n }, (e, n, r) => {\n r.done(), t = n.sequenceNumber + 1;\n }).next(() => t);\n }\n /**\n * Returns a new set of IDB ranges that splits the existing range and excludes\n * any values that match the `notInValue` from these ranges. As an example,\n * '[foo > 2 && foo != 3]` becomes `[foo > 2 && < 3, foo > 3]`.\n */\n createRange(e, t, n) {\n // The notIn values need to be sorted and unique so that we can return a\n // sorted set of non-overlapping ranges.\n n = n.sort((e, t) => __PRIVATE_indexEntryComparator(e, t)).filter((e, t, n) => !t || 0 !== __PRIVATE_indexEntryComparator(e, n[t - 1]));\n const r = [];\n r.push(e);\n for (const i of n) {\n const n = __PRIVATE_indexEntryComparator(i, e),\n s = __PRIVATE_indexEntryComparator(i, t);\n if (0 === n)\n // `notInValue` is the lower bound. We therefore need to raise the bound\n // to the next value.\n r[0] = e.Ht();else if (n > 0 && s < 0)\n // `notInValue` is in the middle of the range\n r.push(i), r.push(i.Ht());else if (s > 0)\n // `notInValue` (and all following values) are out of the range\n break;\n }\n r.push(t);\n const i = [];\n for (let e = 0; e < r.length; e += 2) {\n // If we encounter two bounds that will create an unmatchable key range,\n // then we return an empty set of key ranges.\n if (this.bn(r[e], r[e + 1])) return [];\n const t = [r[e].indexId, this.uid, r[e].arrayValue, r[e].directionalValue, Te, []],\n n = [r[e + 1].indexId, this.uid, r[e + 1].arrayValue, r[e + 1].directionalValue, Te, []];\n i.push(IDBKeyRange.bound(t, n));\n }\n return i;\n }\n bn(e, t) {\n // If lower bound is greater than the upper bound, then the key\n // range can never be matched.\n return __PRIVATE_indexEntryComparator(e, t) > 0;\n }\n getMinOffsetFromCollectionGroup(e, t) {\n return this.getFieldIndexes(e, t).next(__PRIVATE_getMinOffsetFromFieldIndexes);\n }\n getMinOffset(e, t) {\n return PersistencePromise.mapArray(this.un(t), t => this.cn(e, t).next(e => e || fail())).next(__PRIVATE_getMinOffsetFromFieldIndexes);\n }\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the collectionParents\n * document store.\n */\nfunction __PRIVATE_collectionParentsStore(e) {\n return __PRIVATE_getStore(e, \"collectionParents\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the index entry object store.\n */\nfunction __PRIVATE_indexEntriesStore(e) {\n return __PRIVATE_getStore(e, \"indexEntries\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the index configuration object store.\n */\nfunction __PRIVATE_indexConfigurationStore(e) {\n return __PRIVATE_getStore(e, \"indexConfiguration\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the index state object store.\n */\nfunction __PRIVATE_indexStateStore(e) {\n return __PRIVATE_getStore(e, \"indexState\");\n}\nfunction __PRIVATE_getMinOffsetFromFieldIndexes(e) {\n __PRIVATE_hardAssert(0 !== e.length);\n let t = e[0].indexState.offset,\n n = t.largestBatchId;\n for (let r = 1; r < e.length; r++) {\n const i = e[r].indexState.offset;\n __PRIVATE_indexOffsetComparator(i, t) < 0 && (t = i), n < i.largestBatchId && (n = i.largestBatchId);\n }\n return new IndexOffset(t.readTime, t.documentKey, n);\n}\n\n/**\n * @license\n * Copyright 2018 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst Ee = {\n didRun: !1,\n sequenceNumbersCollected: 0,\n targetsRemoved: 0,\n documentsRemoved: 0\n};\nclass LruParams {\n constructor(\n // When we attempt to collect, we will only do so if the cache size is greater than this\n // threshold. Passing `COLLECTION_DISABLED` here will cause collection to always be skipped.\n e,\n // The percentage of sequence numbers that we will attempt to collect\n t,\n // A cap on the total number of sequence numbers that will be collected. This prevents\n // us from collecting a huge number of sequence numbers if the cache has grown very large.\n n) {\n this.cacheSizeCollectionThreshold = e, this.percentileToCollect = t, this.maximumSequenceNumbersToCollect = n;\n }\n static withCacheSize(e) {\n return new LruParams(e, LruParams.DEFAULT_COLLECTION_PERCENTILE, LruParams.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT);\n }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Delete a mutation batch and the associated document mutations.\n * @returns A PersistencePromise of the document mutations that were removed.\n */\nfunction removeMutationBatch(e, t, n) {\n const r = e.store(\"mutations\"),\n i = e.store(\"documentMutations\"),\n s = [],\n o = IDBKeyRange.only(n.batchId);\n let _ = 0;\n const a = r.Y({\n range: o\n }, (e, t, n) => (_++, n.delete()));\n s.push(a.next(() => {\n __PRIVATE_hardAssert(1 === _);\n }));\n const u = [];\n for (const e of n.mutations) {\n const r = __PRIVATE_newDbDocumentMutationKey(t, e.key.path, n.batchId);\n s.push(i.delete(r)), u.push(e.key);\n }\n return PersistencePromise.waitFor(s).next(() => u);\n}\n\n/**\n * Returns an approximate size for the given document.\n */\nfunction __PRIVATE_dbDocumentSize(e) {\n if (!e) return 0;\n let t;\n if (e.document) t = e.document;else if (e.unknownDocument) t = e.unknownDocument;else {\n if (!e.noDocument) throw fail();\n t = e.noDocument;\n }\n return JSON.stringify(t).length;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** A mutation queue for a specific user, backed by IndexedDB. */\nLruParams.DEFAULT_COLLECTION_PERCENTILE = 10, LruParams.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT = 1e3, LruParams.DEFAULT = new LruParams(41943040, LruParams.DEFAULT_COLLECTION_PERCENTILE, LruParams.DEFAULT_MAX_SEQUENCE_NUMBERS_TO_COLLECT), LruParams.DISABLED = new LruParams(-1, 0, 0);\nclass __PRIVATE_IndexedDbMutationQueue {\n constructor(\n /**\n * The normalized userId (e.g. null UID => \"\" userId) used to store /\n * retrieve mutations.\n */\n e, t, n, r) {\n this.userId = e, this.serializer = t, this.indexManager = n, this.referenceDelegate = r,\n /**\n * Caches the document keys for pending mutation batches. If the mutation\n * has been removed from IndexedDb, the cached value may continue to\n * be used to retrieve the batch's document keys. To remove a cached value\n * locally, `removeCachedMutationKeys()` should be invoked either directly\n * or through `removeMutationBatches()`.\n *\n * With multi-tab, when the primary client acknowledges or rejects a mutation,\n * this cache is used by secondary clients to invalidate the local\n * view of the documents that were previously affected by the mutation.\n */\n // PORTING NOTE: Multi-tab only.\n this.Dn = {};\n }\n /**\n * Creates a new mutation queue for the given user.\n * @param user - The user for which to create a mutation queue.\n * @param serializer - The serializer to use when persisting to IndexedDb.\n */\n static ct(e, t, n, r) {\n // TODO(mcg): Figure out what constraints there are on userIDs\n // In particular, are there any reserved characters? are empty ids allowed?\n // For the moment store these together in the same mutations table assuming\n // that empty userIDs aren't allowed.\n __PRIVATE_hardAssert(\"\" !== e.uid);\n const i = e.isAuthenticated() ? e.uid : \"\";\n return new __PRIVATE_IndexedDbMutationQueue(i, t, n, r);\n }\n checkEmpty(e) {\n let t = !0;\n const n = IDBKeyRange.bound([this.userId, Number.NEGATIVE_INFINITY], [this.userId, Number.POSITIVE_INFINITY]);\n return __PRIVATE_mutationsStore(e).Y({\n index: \"userMutationsIndex\",\n range: n\n }, (e, n, r) => {\n t = !1, r.done();\n }).next(() => t);\n }\n addMutationBatch(e, t, n, r) {\n const i = __PRIVATE_documentMutationsStore(e),\n s = __PRIVATE_mutationsStore(e);\n // The IndexedDb implementation in Chrome (and Firefox) does not handle\n // compound indices that include auto-generated keys correctly. To ensure\n // that the index entry is added correctly in all browsers, we perform two\n // writes: The first write is used to retrieve the next auto-generated Batch\n // ID, and the second write populates the index and stores the actual\n // mutation batch.\n // See: https://bugs.chromium.org/p/chromium/issues/detail?id=701972\n // We write an empty object to obtain key\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return s.add({}).next(o => {\n __PRIVATE_hardAssert(\"number\" == typeof o);\n const _ = new MutationBatch(o, t, n, r),\n a = function __PRIVATE_toDbMutationBatch(e, t, n) {\n const r = n.baseMutations.map(t => toMutation(e.ut, t)),\n i = n.mutations.map(t => toMutation(e.ut, t));\n return {\n userId: t,\n batchId: n.batchId,\n localWriteTimeMs: n.localWriteTime.toMillis(),\n baseMutations: r,\n mutations: i\n };\n }(this.serializer, this.userId, _),\n u = [];\n let c = new SortedSet((e, t) => __PRIVATE_primitiveComparator(e.canonicalString(), t.canonicalString()));\n for (const e of r) {\n const t = __PRIVATE_newDbDocumentMutationKey(this.userId, e.key.path, o);\n c = c.add(e.key.path.popLast()), u.push(s.put(a)), u.push(i.put(t, x));\n }\n return c.forEach(t => {\n u.push(this.indexManager.addToCollectionParentIndex(e, t));\n }), e.addOnCommittedListener(() => {\n this.Dn[o] = _.keys();\n }), PersistencePromise.waitFor(u).next(() => _);\n });\n }\n lookupMutationBatch(e, t) {\n return __PRIVATE_mutationsStore(e).get(t).next(e => e ? (__PRIVATE_hardAssert(e.userId === this.userId), __PRIVATE_fromDbMutationBatch(this.serializer, e)) : null);\n }\n /**\n * Returns the document keys for the mutation batch with the given batchId.\n * For primary clients, this method returns `null` after\n * `removeMutationBatches()` has been called. Secondary clients return a\n * cached result until `removeCachedMutationKeys()` is invoked.\n */\n // PORTING NOTE: Multi-tab only.\n Cn(e, t) {\n return this.Dn[t] ? PersistencePromise.resolve(this.Dn[t]) : this.lookupMutationBatch(e, t).next(e => {\n if (e) {\n const n = e.keys();\n return this.Dn[t] = n, n;\n }\n return null;\n });\n }\n getNextMutationBatchAfterBatchId(e, t) {\n const n = t + 1,\n r = IDBKeyRange.lowerBound([this.userId, n]);\n let i = null;\n return __PRIVATE_mutationsStore(e).Y({\n index: \"userMutationsIndex\",\n range: r\n }, (e, t, r) => {\n t.userId === this.userId && (__PRIVATE_hardAssert(t.batchId >= n), i = __PRIVATE_fromDbMutationBatch(this.serializer, t)), r.done();\n }).next(() => i);\n }\n getHighestUnacknowledgedBatchId(e) {\n const t = IDBKeyRange.upperBound([this.userId, Number.POSITIVE_INFINITY]);\n let n = -1;\n return __PRIVATE_mutationsStore(e).Y({\n index: \"userMutationsIndex\",\n range: t,\n reverse: !0\n }, (e, t, r) => {\n n = t.batchId, r.done();\n }).next(() => n);\n }\n getAllMutationBatches(e) {\n const t = IDBKeyRange.bound([this.userId, -1], [this.userId, Number.POSITIVE_INFINITY]);\n return __PRIVATE_mutationsStore(e).W(\"userMutationsIndex\", t).next(e => e.map(e => __PRIVATE_fromDbMutationBatch(this.serializer, e)));\n }\n getAllMutationBatchesAffectingDocumentKey(e, t) {\n // Scan the document-mutation index starting with a prefix starting with\n // the given documentKey.\n const n = __PRIVATE_newDbDocumentMutationPrefixForPath(this.userId, t.path),\n r = IDBKeyRange.lowerBound(n),\n i = [];\n return __PRIVATE_documentMutationsStore(e).Y({\n range: r\n }, (n, r, s) => {\n const [o, _, a] = n,\n u = __PRIVATE_decodeResourcePath(_);\n // Only consider rows matching exactly the specific key of\n // interest. Note that because we order by path first, and we\n // order terminators before path separators, we'll encounter all\n // the index rows for documentKey contiguously. In particular, all\n // the rows for documentKey will occur before any rows for\n // documents nested in a subcollection beneath documentKey so we\n // can stop as soon as we hit any such row.\n if (o === this.userId && t.path.isEqual(u))\n // Look up the mutation batch in the store.\n return __PRIVATE_mutationsStore(e).get(a).next(e => {\n if (!e) throw fail();\n __PRIVATE_hardAssert(e.userId === this.userId), i.push(__PRIVATE_fromDbMutationBatch(this.serializer, e));\n });\n s.done();\n }).next(() => i);\n }\n getAllMutationBatchesAffectingDocumentKeys(e, t) {\n let n = new SortedSet(__PRIVATE_primitiveComparator);\n const r = [];\n return t.forEach(t => {\n const i = __PRIVATE_newDbDocumentMutationPrefixForPath(this.userId, t.path),\n s = IDBKeyRange.lowerBound(i),\n o = __PRIVATE_documentMutationsStore(e).Y({\n range: s\n }, (e, r, i) => {\n const [s, o, _] = e,\n a = __PRIVATE_decodeResourcePath(o);\n // Only consider rows matching exactly the specific key of\n // interest. Note that because we order by path first, and we\n // order terminators before path separators, we'll encounter all\n // the index rows for documentKey contiguously. In particular, all\n // the rows for documentKey will occur before any rows for\n // documents nested in a subcollection beneath documentKey so we\n // can stop as soon as we hit any such row.\n s === this.userId && t.path.isEqual(a) ? n = n.add(_) : i.done();\n });\n r.push(o);\n }), PersistencePromise.waitFor(r).next(() => this.vn(e, n));\n }\n getAllMutationBatchesAffectingQuery(e, t) {\n const n = t.path,\n r = n.length + 1,\n i = __PRIVATE_newDbDocumentMutationPrefixForPath(this.userId, n),\n s = IDBKeyRange.lowerBound(i);\n // Collect up unique batchIDs encountered during a scan of the index. Use a\n // SortedSet to accumulate batch IDs so they can be traversed in order in a\n // scan of the main table.\n let o = new SortedSet(__PRIVATE_primitiveComparator);\n return __PRIVATE_documentMutationsStore(e).Y({\n range: s\n }, (e, t, i) => {\n const [s, _, a] = e,\n u = __PRIVATE_decodeResourcePath(_);\n s === this.userId && n.isPrefixOf(u) ?\n // Rows with document keys more than one segment longer than the\n // query path can't be matches. For example, a query on 'rooms'\n // can't match the document /rooms/abc/messages/xyx.\n // TODO(mcg): we'll need a different scanner when we implement\n // ancestor queries.\n u.length === r && (o = o.add(a)) : i.done();\n }).next(() => this.vn(e, o));\n }\n vn(e, t) {\n const n = [],\n r = [];\n // TODO(rockwood): Implement this using iterate.\n return t.forEach(t => {\n r.push(__PRIVATE_mutationsStore(e).get(t).next(e => {\n if (null === e) throw fail();\n __PRIVATE_hardAssert(e.userId === this.userId), n.push(__PRIVATE_fromDbMutationBatch(this.serializer, e));\n }));\n }), PersistencePromise.waitFor(r).next(() => n);\n }\n removeMutationBatch(e, t) {\n return removeMutationBatch(e.ae, this.userId, t).next(n => (e.addOnCommittedListener(() => {\n this.Fn(t.batchId);\n }), PersistencePromise.forEach(n, t => this.referenceDelegate.markPotentiallyOrphaned(e, t))));\n }\n /**\n * Clears the cached keys for a mutation batch. This method should be\n * called by secondary clients after they process mutation updates.\n *\n * Note that this method does not have to be called from primary clients as\n * the corresponding cache entries are cleared when an acknowledged or\n * rejected batch is removed from the mutation queue.\n */\n // PORTING NOTE: Multi-tab only\n Fn(e) {\n delete this.Dn[e];\n }\n performConsistencyCheck(e) {\n return this.checkEmpty(e).next(t => {\n if (!t) return PersistencePromise.resolve();\n // Verify that there are no entries in the documentMutations index if\n // the queue is empty.\n const n = IDBKeyRange.lowerBound(\n /**\n * Creates a [userId] key for use in the DbDocumentMutations index to iterate\n * over all of a user's document mutations.\n */\n function __PRIVATE_newDbDocumentMutationPrefixForUser(e) {\n return [e];\n }(this.userId)),\n r = [];\n return __PRIVATE_documentMutationsStore(e).Y({\n range: n\n }, (e, t, n) => {\n if (e[0] === this.userId) {\n const t = __PRIVATE_decodeResourcePath(e[1]);\n r.push(t);\n } else n.done();\n }).next(() => {\n __PRIVATE_hardAssert(0 === r.length);\n });\n });\n }\n containsKey(e, t) {\n return __PRIVATE_mutationQueueContainsKey(e, this.userId, t);\n }\n // PORTING NOTE: Multi-tab only (state is held in memory in other clients).\n /** Returns the mutation queue's metadata from IndexedDb. */\n Mn(e) {\n return __PRIVATE_mutationQueuesStore(e).get(this.userId).next(e => e || {\n userId: this.userId,\n lastAcknowledgedBatchId: -1,\n lastStreamToken: \"\"\n });\n }\n}\n\n/**\n * @returns true if the mutation queue for the given user contains a pending\n * mutation for the given key.\n */\nfunction __PRIVATE_mutationQueueContainsKey(e, t, n) {\n const r = __PRIVATE_newDbDocumentMutationPrefixForPath(t, n.path),\n i = r[1],\n s = IDBKeyRange.lowerBound(r);\n let o = !1;\n return __PRIVATE_documentMutationsStore(e).Y({\n range: s,\n J: !0\n }, (e, n, r) => {\n const [s, _, /*batchID*/a] = e;\n s === t && _ === i && (o = !0), r.done();\n }).next(() => o);\n}\n\n/** Returns true if any mutation queue contains the given document. */\n/**\n * Helper to get a typed SimpleDbStore for the mutations object store.\n */\nfunction __PRIVATE_mutationsStore(e) {\n return __PRIVATE_getStore(e, \"mutations\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the mutationQueues object store.\n */\nfunction __PRIVATE_documentMutationsStore(e) {\n return __PRIVATE_getStore(e, \"documentMutations\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the mutationQueues object store.\n */\nfunction __PRIVATE_mutationQueuesStore(e) {\n return __PRIVATE_getStore(e, \"mutationQueues\");\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Offset to ensure non-overlapping target ids. */\n/**\n * Generates monotonically increasing target IDs for sending targets to the\n * watch stream.\n *\n * The client constructs two generators, one for the target cache, and one for\n * for the sync engine (to generate limbo documents targets). These\n * generators produce non-overlapping IDs (by using even and odd IDs\n * respectively).\n *\n * By separating the target ID space, the query cache can generate target IDs\n * that persist across client restarts, while sync engine can independently\n * generate in-memory target IDs that are transient and can be reused after a\n * restart.\n */\nclass __PRIVATE_TargetIdGenerator {\n constructor(e) {\n this.xn = e;\n }\n next() {\n return this.xn += 2, this.xn;\n }\n static On() {\n // The target cache generator must return '2' in its first call to `next()`\n // as there is no differentiation in the protocol layer between an unset\n // number and the number '0'. If we were to sent a target with target ID\n // '0', the backend would consider it unset and replace it with its own ID.\n return new __PRIVATE_TargetIdGenerator(0);\n }\n static Nn() {\n // Sync engine assigns target IDs for limbo document detection.\n return new __PRIVATE_TargetIdGenerator(-1);\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass __PRIVATE_IndexedDbTargetCache {\n constructor(e, t) {\n this.referenceDelegate = e, this.serializer = t;\n }\n // PORTING NOTE: We don't cache global metadata for the target cache, since\n // some of it (in particular `highestTargetId`) can be modified by secondary\n // tabs. We could perhaps be more granular (and e.g. still cache\n // `lastRemoteSnapshotVersion` in memory) but for simplicity we currently go\n // to IndexedDb whenever we need to read metadata. We can revisit if it turns\n // out to have a meaningful performance impact.\n allocateTargetId(e) {\n return this.Bn(e).next(t => {\n const n = new __PRIVATE_TargetIdGenerator(t.highestTargetId);\n return t.highestTargetId = n.next(), this.Ln(e, t).next(() => t.highestTargetId);\n });\n }\n getLastRemoteSnapshotVersion(e) {\n return this.Bn(e).next(e => SnapshotVersion.fromTimestamp(new Timestamp(e.lastRemoteSnapshotVersion.seconds, e.lastRemoteSnapshotVersion.nanoseconds)));\n }\n getHighestSequenceNumber(e) {\n return this.Bn(e).next(e => e.highestListenSequenceNumber);\n }\n setTargetsMetadata(e, t, n) {\n return this.Bn(e).next(r => (r.highestListenSequenceNumber = t, n && (r.lastRemoteSnapshotVersion = n.toTimestamp()), t > r.highestListenSequenceNumber && (r.highestListenSequenceNumber = t), this.Ln(e, r)));\n }\n addTargetData(e, t) {\n return this.kn(e, t).next(() => this.Bn(e).next(n => (n.targetCount += 1, this.qn(t, n), this.Ln(e, n))));\n }\n updateTargetData(e, t) {\n return this.kn(e, t);\n }\n removeTargetData(e, t) {\n return this.removeMatchingKeysForTargetId(e, t.targetId).next(() => __PRIVATE_targetsStore(e).delete(t.targetId)).next(() => this.Bn(e)).next(t => (__PRIVATE_hardAssert(t.targetCount > 0), t.targetCount -= 1, this.Ln(e, t)));\n }\n /**\n * Drops any targets with sequence number less than or equal to the upper bound, excepting those\n * present in `activeTargetIds`. Document associations for the removed targets are also removed.\n * Returns the number of targets removed.\n */\n removeTargets(e, t, n) {\n let r = 0;\n const i = [];\n return __PRIVATE_targetsStore(e).Y((s, o) => {\n const _ = __PRIVATE_fromDbTarget(o);\n _.sequenceNumber <= t && null === n.get(_.targetId) && (r++, i.push(this.removeTargetData(e, _)));\n }).next(() => PersistencePromise.waitFor(i)).next(() => r);\n }\n /**\n * Call provided function with each `TargetData` that we have cached.\n */\n forEachTarget(e, t) {\n return __PRIVATE_targetsStore(e).Y((e, n) => {\n const r = __PRIVATE_fromDbTarget(n);\n t(r);\n });\n }\n Bn(e) {\n return __PRIVATE_globalTargetStore(e).get(\"targetGlobalKey\").next(e => (__PRIVATE_hardAssert(null !== e), e));\n }\n Ln(e, t) {\n return __PRIVATE_globalTargetStore(e).put(\"targetGlobalKey\", t);\n }\n kn(e, t) {\n return __PRIVATE_targetsStore(e).put(__PRIVATE_toDbTarget(this.serializer, t));\n }\n /**\n * In-place updates the provided metadata to account for values in the given\n * TargetData. Saving is done separately. Returns true if there were any\n * changes to the metadata.\n */\n qn(e, t) {\n let n = !1;\n return e.targetId > t.highestTargetId && (t.highestTargetId = e.targetId, n = !0), e.sequenceNumber > t.highestListenSequenceNumber && (t.highestListenSequenceNumber = e.sequenceNumber, n = !0), n;\n }\n getTargetCount(e) {\n return this.Bn(e).next(e => e.targetCount);\n }\n getTargetData(e, t) {\n // Iterating by the canonicalId may yield more than one result because\n // canonicalId values are not required to be unique per target. This query\n // depends on the queryTargets index to be efficient.\n const n = __PRIVATE_canonifyTarget(t),\n r = IDBKeyRange.bound([n, Number.NEGATIVE_INFINITY], [n, Number.POSITIVE_INFINITY]);\n let i = null;\n return __PRIVATE_targetsStore(e).Y({\n range: r,\n index: \"queryTargetsIndex\"\n }, (e, n, r) => {\n const s = __PRIVATE_fromDbTarget(n);\n // After finding a potential match, check that the target is\n // actually equal to the requested target.\n __PRIVATE_targetEquals(t, s.target) && (i = s, r.done());\n }).next(() => i);\n }\n addMatchingKeys(e, t, n) {\n // PORTING NOTE: The reverse index (documentsTargets) is maintained by\n // IndexedDb.\n const r = [],\n i = __PRIVATE_documentTargetStore(e);\n return t.forEach(t => {\n const s = __PRIVATE_encodeResourcePath(t.path);\n r.push(i.put({\n targetId: n,\n path: s\n })), r.push(this.referenceDelegate.addReference(e, n, t));\n }), PersistencePromise.waitFor(r);\n }\n removeMatchingKeys(e, t, n) {\n // PORTING NOTE: The reverse index (documentsTargets) is maintained by\n // IndexedDb.\n const r = __PRIVATE_documentTargetStore(e);\n return PersistencePromise.forEach(t, t => {\n const i = __PRIVATE_encodeResourcePath(t.path);\n return PersistencePromise.waitFor([r.delete([n, i]), this.referenceDelegate.removeReference(e, n, t)]);\n });\n }\n removeMatchingKeysForTargetId(e, t) {\n const n = __PRIVATE_documentTargetStore(e),\n r = IDBKeyRange.bound([t], [t + 1], /*lowerOpen=*/!1, /*upperOpen=*/!0);\n return n.delete(r);\n }\n getMatchingKeysForTargetId(e, t) {\n const n = IDBKeyRange.bound([t], [t + 1], /*lowerOpen=*/!1, /*upperOpen=*/!0),\n r = __PRIVATE_documentTargetStore(e);\n let i = __PRIVATE_documentKeySet();\n return r.Y({\n range: n,\n J: !0\n }, (e, t, n) => {\n const r = __PRIVATE_decodeResourcePath(e[1]),\n s = new DocumentKey(r);\n i = i.add(s);\n }).next(() => i);\n }\n containsKey(e, t) {\n const n = __PRIVATE_encodeResourcePath(t.path),\n r = IDBKeyRange.bound([n], [__PRIVATE_immediateSuccessor(n)], /*lowerOpen=*/!1, /*upperOpen=*/!0);\n let i = 0;\n return __PRIVATE_documentTargetStore(e).Y({\n index: \"documentTargetsIndex\",\n J: !0,\n range: r\n }, ([e, t], n, r) => {\n // Having a sentinel row for a document does not count as containing that document;\n // For the target cache, containing the document means the document is part of some\n // target.\n 0 !== e && (i++, r.done());\n }).next(() => i > 0);\n }\n /**\n * Looks up a TargetData entry by target ID.\n *\n * @param targetId - The target ID of the TargetData entry to look up.\n * @returns The cached TargetData entry, or null if the cache has no entry for\n * the target.\n */\n // PORTING NOTE: Multi-tab only.\n _t(e, t) {\n return __PRIVATE_targetsStore(e).get(t).next(e => e ? __PRIVATE_fromDbTarget(e) : null);\n }\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the queries object store.\n */\nfunction __PRIVATE_targetsStore(e) {\n return __PRIVATE_getStore(e, \"targets\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the target globals object store.\n */\nfunction __PRIVATE_globalTargetStore(e) {\n return __PRIVATE_getStore(e, \"targetGlobal\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the document target object store.\n */\nfunction __PRIVATE_documentTargetStore(e) {\n return __PRIVATE_getStore(e, \"targetDocuments\");\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction __PRIVATE_bufferEntryComparator([e, t], [n, r]) {\n const i = __PRIVATE_primitiveComparator(e, n);\n return 0 === i ? __PRIVATE_primitiveComparator(t, r) : i;\n}\n\n/**\n * Used to calculate the nth sequence number. Keeps a rolling buffer of the\n * lowest n values passed to `addElement`, and finally reports the largest of\n * them in `maxValue`.\n */\nclass __PRIVATE_RollingSequenceNumberBuffer {\n constructor(e) {\n this.Qn = e, this.buffer = new SortedSet(__PRIVATE_bufferEntryComparator), this.Kn = 0;\n }\n $n() {\n return ++this.Kn;\n }\n Un(e) {\n const t = [e, this.$n()];\n if (this.buffer.size < this.Qn) this.buffer = this.buffer.add(t);else {\n const e = this.buffer.last();\n __PRIVATE_bufferEntryComparator(t, e) < 0 && (this.buffer = this.buffer.delete(e).add(t));\n }\n }\n get maxValue() {\n // Guaranteed to be non-empty. If we decide we are not collecting any\n // sequence numbers, nthSequenceNumber below short-circuits. If we have\n // decided that we are collecting n sequence numbers, it's because n is some\n // percentage of the existing sequence numbers. That means we should never\n // be in a situation where we are collecting sequence numbers but don't\n // actually have any.\n return this.buffer.last()[0];\n }\n}\n\n/**\n * This class is responsible for the scheduling of LRU garbage collection. It handles checking\n * whether or not GC is enabled, as well as which delay to use before the next run.\n */\nclass __PRIVATE_LruScheduler {\n constructor(e, t, n) {\n this.garbageCollector = e, this.asyncQueue = t, this.localStore = n, this.Wn = null;\n }\n start() {\n -1 !== this.garbageCollector.params.cacheSizeCollectionThreshold && this.Gn(6e4);\n }\n stop() {\n this.Wn && (this.Wn.cancel(), this.Wn = null);\n }\n get started() {\n return null !== this.Wn;\n }\n Gn(e) {\n __PRIVATE_logDebug(\"LruGarbageCollector\", `Garbage collection scheduled in ${e}ms`), this.Wn = this.asyncQueue.enqueueAfterDelay(\"lru_garbage_collection\" /* TimerId.LruGarbageCollection */, e, async () => {\n this.Wn = null;\n try {\n await this.localStore.collectGarbage(this.garbageCollector);\n } catch (e) {\n __PRIVATE_isIndexedDbTransactionError(e) ? __PRIVATE_logDebug(\"LruGarbageCollector\", \"Ignoring IndexedDB error during garbage collection: \", e) : await __PRIVATE_ignoreIfPrimaryLeaseLoss(e);\n }\n await this.Gn(3e5);\n });\n }\n}\n\n/**\n * Implements the steps for LRU garbage collection.\n */\nclass __PRIVATE_LruGarbageCollectorImpl {\n constructor(e, t) {\n this.zn = e, this.params = t;\n }\n calculateTargetCount(e, t) {\n return this.zn.jn(e).next(e => Math.floor(t / 100 * e));\n }\n nthSequenceNumber(e, t) {\n if (0 === t) return PersistencePromise.resolve(__PRIVATE_ListenSequence._e);\n const n = new __PRIVATE_RollingSequenceNumberBuffer(t);\n return this.zn.forEachTarget(e, e => n.Un(e.sequenceNumber)).next(() => this.zn.Hn(e, e => n.Un(e))).next(() => n.maxValue);\n }\n removeTargets(e, t, n) {\n return this.zn.removeTargets(e, t, n);\n }\n removeOrphanedDocuments(e, t) {\n return this.zn.removeOrphanedDocuments(e, t);\n }\n collect(e, t) {\n return -1 === this.params.cacheSizeCollectionThreshold ? (__PRIVATE_logDebug(\"LruGarbageCollector\", \"Garbage collection skipped; disabled\"), PersistencePromise.resolve(Ee)) : this.getCacheSize(e).next(n => n < this.params.cacheSizeCollectionThreshold ? (__PRIVATE_logDebug(\"LruGarbageCollector\", `Garbage collection skipped; Cache size ${n} is lower than threshold ${this.params.cacheSizeCollectionThreshold}`), Ee) : this.Jn(e, t));\n }\n getCacheSize(e) {\n return this.zn.getCacheSize(e);\n }\n Jn(e, t) {\n let n, r, i, s, o, a, u;\n const c = Date.now();\n return this.calculateTargetCount(e, this.params.percentileToCollect).next(t => (\n // Cap at the configured max\n t > this.params.maximumSequenceNumbersToCollect ? (__PRIVATE_logDebug(\"LruGarbageCollector\", `Capping sequence numbers to collect down to the maximum of ${this.params.maximumSequenceNumbersToCollect} from ${t}`), r = this.params.maximumSequenceNumbersToCollect) : r = t, s = Date.now(), this.nthSequenceNumber(e, r))).next(r => (n = r, o = Date.now(), this.removeTargets(e, n, t))).next(t => (i = t, a = Date.now(), this.removeOrphanedDocuments(e, n))).next(e => {\n if (u = Date.now(), __PRIVATE_getLogLevel() <= LogLevel.DEBUG) {\n __PRIVATE_logDebug(\"LruGarbageCollector\", `LRU Garbage Collection\\n\\tCounted targets in ${s - c}ms\\n\\tDetermined least recently used ${r} in ` + (o - s) + \"ms\\n\" + `\\tRemoved ${i} targets in ` + (a - o) + \"ms\\n\" + `\\tRemoved ${e} documents in ` + (u - a) + \"ms\\n\" + `Total Duration: ${u - c}ms`);\n }\n return PersistencePromise.resolve({\n didRun: !0,\n sequenceNumbersCollected: r,\n targetsRemoved: i,\n documentsRemoved: e\n });\n });\n }\n}\nfunction __PRIVATE_newLruGarbageCollector(e, t) {\n return new __PRIVATE_LruGarbageCollectorImpl(e, t);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Provides LRU functionality for IndexedDB persistence. */\nclass __PRIVATE_IndexedDbLruDelegateImpl {\n constructor(e, t) {\n this.db = e, this.garbageCollector = __PRIVATE_newLruGarbageCollector(this, t);\n }\n jn(e) {\n const t = this.Yn(e);\n return this.db.getTargetCache().getTargetCount(e).next(e => t.next(t => e + t));\n }\n Yn(e) {\n let t = 0;\n return this.Hn(e, e => {\n t++;\n }).next(() => t);\n }\n forEachTarget(e, t) {\n return this.db.getTargetCache().forEachTarget(e, t);\n }\n Hn(e, t) {\n return this.Zn(e, (e, n) => t(n));\n }\n addReference(e, t, n) {\n return __PRIVATE_writeSentinelKey(e, n);\n }\n removeReference(e, t, n) {\n return __PRIVATE_writeSentinelKey(e, n);\n }\n removeTargets(e, t, n) {\n return this.db.getTargetCache().removeTargets(e, t, n);\n }\n markPotentiallyOrphaned(e, t) {\n return __PRIVATE_writeSentinelKey(e, t);\n }\n /**\n * Returns true if anything would prevent this document from being garbage\n * collected, given that the document in question is not present in any\n * targets and has a sequence number less than or equal to the upper bound for\n * the collection run.\n */\n Xn(e, t) {\n return function __PRIVATE_mutationQueuesContainKey(e, t) {\n let n = !1;\n return __PRIVATE_mutationQueuesStore(e).Z(r => __PRIVATE_mutationQueueContainsKey(e, r, t).next(e => (e && (n = !0), PersistencePromise.resolve(!e)))).next(() => n);\n }(e, t);\n }\n removeOrphanedDocuments(e, t) {\n const n = this.db.getRemoteDocumentCache().newChangeBuffer(),\n r = [];\n let i = 0;\n return this.Zn(e, (s, o) => {\n if (o <= t) {\n const t = this.Xn(e, s).next(t => {\n if (!t)\n // Our size accounting requires us to read all documents before\n // removing them.\n return i++, n.getEntry(e, s).next(() => (n.removeEntry(s, SnapshotVersion.min()), __PRIVATE_documentTargetStore(e).delete(function __PRIVATE_sentinelKey$1(e) {\n return [0, __PRIVATE_encodeResourcePath(e.path)];\n }\n /**\n * @returns A value suitable for writing a sentinel row in the target-document\n * store.\n */(s))));\n });\n r.push(t);\n }\n }).next(() => PersistencePromise.waitFor(r)).next(() => n.apply(e)).next(() => i);\n }\n removeTarget(e, t) {\n const n = t.withSequenceNumber(e.currentSequenceNumber);\n return this.db.getTargetCache().updateTargetData(e, n);\n }\n updateLimboDocument(e, t) {\n return __PRIVATE_writeSentinelKey(e, t);\n }\n /**\n * Call provided function for each document in the cache that is 'orphaned'. Orphaned\n * means not a part of any target, so the only entry in the target-document index for\n * that document will be the sentinel row (targetId 0), which will also have the sequence\n * number for the last time the document was accessed.\n */\n Zn(e, t) {\n const n = __PRIVATE_documentTargetStore(e);\n let r,\n i = __PRIVATE_ListenSequence._e;\n return n.Y({\n index: \"documentTargetsIndex\"\n }, ([e, n], {\n path: s,\n sequenceNumber: o\n }) => {\n 0 === e ? (\n // if nextToReport is valid, report it, this is a new key so the\n // last one must not be a member of any targets.\n i !== __PRIVATE_ListenSequence._e && t(new DocumentKey(__PRIVATE_decodeResourcePath(r)), i),\n // set nextToReport to be this sequence number. It's the next one we\n // might report, if we don't find any targets for this document.\n // Note that the sequence number must be defined when the targetId\n // is 0.\n i = o, r = s) :\n // set nextToReport to be invalid, we know we don't need to report\n // this one since we found a target for it.\n i = __PRIVATE_ListenSequence._e;\n }).next(() => {\n // Since we report sequence numbers after getting to the next key, we\n // need to check if the last key we iterated over was an orphaned\n // document and report it.\n i !== __PRIVATE_ListenSequence._e && t(new DocumentKey(__PRIVATE_decodeResourcePath(r)), i);\n });\n }\n getCacheSize(e) {\n return this.db.getRemoteDocumentCache().getSize(e);\n }\n}\nfunction __PRIVATE_writeSentinelKey(e, t) {\n return __PRIVATE_documentTargetStore(e).put(function __PRIVATE_sentinelRow(e, t) {\n return {\n targetId: 0,\n path: __PRIVATE_encodeResourcePath(e.path),\n sequenceNumber: t\n };\n }(t, e.currentSequenceNumber));\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An in-memory buffer of entries to be written to a RemoteDocumentCache.\n * It can be used to batch up a set of changes to be written to the cache, but\n * additionally supports reading entries back with the `getEntry()` method,\n * falling back to the underlying RemoteDocumentCache if no entry is\n * buffered.\n *\n * Entries added to the cache *must* be read first. This is to facilitate\n * calculating the size delta of the pending changes.\n *\n * PORTING NOTE: This class was implemented then removed from other platforms.\n * If byte-counting ends up being needed on the other platforms, consider\n * porting this class as part of that implementation work.\n */\nclass RemoteDocumentChangeBuffer {\n constructor() {\n // A mapping of document key to the new cache entry that should be written.\n this.changes = new ObjectMap(e => e.toString(), (e, t) => e.isEqual(t)), this.changesApplied = !1;\n }\n /**\n * Buffers a `RemoteDocumentCache.addEntry()` call.\n *\n * You can only modify documents that have already been retrieved via\n * `getEntry()/getEntries()` (enforced via IndexedDbs `apply()`).\n */\n addEntry(e) {\n this.assertNotApplied(), this.changes.set(e.key, e);\n }\n /**\n * Buffers a `RemoteDocumentCache.removeEntry()` call.\n *\n * You can only remove documents that have already been retrieved via\n * `getEntry()/getEntries()` (enforced via IndexedDbs `apply()`).\n */\n removeEntry(e, t) {\n this.assertNotApplied(), this.changes.set(e, MutableDocument.newInvalidDocument(e).setReadTime(t));\n }\n /**\n * Looks up an entry in the cache. The buffered changes will first be checked,\n * and if no buffered change applies, this will forward to\n * `RemoteDocumentCache.getEntry()`.\n *\n * @param transaction - The transaction in which to perform any persistence\n * operations.\n * @param documentKey - The key of the entry to look up.\n * @returns The cached document or an invalid document if we have nothing\n * cached.\n */\n getEntry(e, t) {\n this.assertNotApplied();\n const n = this.changes.get(t);\n return void 0 !== n ? PersistencePromise.resolve(n) : this.getFromCache(e, t);\n }\n /**\n * Looks up several entries in the cache, forwarding to\n * `RemoteDocumentCache.getEntry()`.\n *\n * @param transaction - The transaction in which to perform any persistence\n * operations.\n * @param documentKeys - The keys of the entries to look up.\n * @returns A map of cached documents, indexed by key. If an entry cannot be\n * found, the corresponding key will be mapped to an invalid document.\n */\n getEntries(e, t) {\n return this.getAllFromCache(e, t);\n }\n /**\n * Applies buffered changes to the underlying RemoteDocumentCache, using\n * the provided transaction.\n */\n apply(e) {\n return this.assertNotApplied(), this.changesApplied = !0, this.applyChanges(e);\n }\n /** Helper to assert this.changes is not null */\n assertNotApplied() {}\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The RemoteDocumentCache for IndexedDb. To construct, invoke\n * `newIndexedDbRemoteDocumentCache()`.\n */\nclass __PRIVATE_IndexedDbRemoteDocumentCacheImpl {\n constructor(e) {\n this.serializer = e;\n }\n setIndexManager(e) {\n this.indexManager = e;\n }\n /**\n * Adds the supplied entries to the cache.\n *\n * All calls of `addEntry` are required to go through the RemoteDocumentChangeBuffer\n * returned by `newChangeBuffer()` to ensure proper accounting of metadata.\n */\n addEntry(e, t, n) {\n return __PRIVATE_remoteDocumentsStore(e).put(n);\n }\n /**\n * Removes a document from the cache.\n *\n * All calls of `removeEntry` are required to go through the RemoteDocumentChangeBuffer\n * returned by `newChangeBuffer()` to ensure proper accounting of metadata.\n */\n removeEntry(e, t, n) {\n return __PRIVATE_remoteDocumentsStore(e).delete(\n /**\n * Returns a key that can be used for document lookups via the primary key of\n * the DbRemoteDocument object store.\n */\n function __PRIVATE_dbReadTimeKey(e, t) {\n const n = e.path.toArray();\n return [/* prefix path */n.slice(0, n.length - 2), /* collection id */n[n.length - 2], __PRIVATE_toDbTimestampKey(t), /* document id */n[n.length - 1]];\n }\n /**\n * Returns a key that can be used for document lookups on the\n * `DbRemoteDocumentDocumentCollectionGroupIndex` index.\n */(t, n));\n }\n /**\n * Updates the current cache size.\n *\n * Callers to `addEntry()` and `removeEntry()` *must* call this afterwards to update the\n * cache's metadata.\n */\n updateMetadata(e, t) {\n return this.getMetadata(e).next(n => (n.byteSize += t, this.er(e, n)));\n }\n getEntry(e, t) {\n let n = MutableDocument.newInvalidDocument(t);\n return __PRIVATE_remoteDocumentsStore(e).Y({\n index: \"documentKeyIndex\",\n range: IDBKeyRange.only(__PRIVATE_dbKey(t))\n }, (e, r) => {\n n = this.tr(t, r);\n }).next(() => n);\n }\n /**\n * Looks up an entry in the cache.\n *\n * @param documentKey - The key of the entry to look up.\n * @returns The cached document entry and its size.\n */\n nr(e, t) {\n let n = {\n size: 0,\n document: MutableDocument.newInvalidDocument(t)\n };\n return __PRIVATE_remoteDocumentsStore(e).Y({\n index: \"documentKeyIndex\",\n range: IDBKeyRange.only(__PRIVATE_dbKey(t))\n }, (e, r) => {\n n = {\n document: this.tr(t, r),\n size: __PRIVATE_dbDocumentSize(r)\n };\n }).next(() => n);\n }\n getEntries(e, t) {\n let n = __PRIVATE_mutableDocumentMap();\n return this.rr(e, t, (e, t) => {\n const r = this.tr(e, t);\n n = n.insert(e, r);\n }).next(() => n);\n }\n /**\n * Looks up several entries in the cache.\n *\n * @param documentKeys - The set of keys entries to look up.\n * @returns A map of documents indexed by key and a map of sizes indexed by\n * key (zero if the document does not exist).\n */\n ir(e, t) {\n let n = __PRIVATE_mutableDocumentMap(),\n r = new SortedMap(DocumentKey.comparator);\n return this.rr(e, t, (e, t) => {\n const i = this.tr(e, t);\n n = n.insert(e, i), r = r.insert(e, __PRIVATE_dbDocumentSize(t));\n }).next(() => ({\n documents: n,\n sr: r\n }));\n }\n rr(e, t, n) {\n if (t.isEmpty()) return PersistencePromise.resolve();\n let r = new SortedSet(__PRIVATE_dbKeyComparator);\n t.forEach(e => r = r.add(e));\n const i = IDBKeyRange.bound(__PRIVATE_dbKey(r.first()), __PRIVATE_dbKey(r.last())),\n s = r.getIterator();\n let o = s.getNext();\n return __PRIVATE_remoteDocumentsStore(e).Y({\n index: \"documentKeyIndex\",\n range: i\n }, (e, t, r) => {\n const i = DocumentKey.fromSegments([...t.prefixPath, t.collectionGroup, t.documentId]);\n // Go through keys not found in cache.\n for (; o && __PRIVATE_dbKeyComparator(o, i) < 0;) n(o, null), o = s.getNext();\n o && o.isEqual(i) && (\n // Key found in cache.\n n(o, t), o = s.hasNext() ? s.getNext() : null),\n // Skip to the next key (if there is one).\n o ? r.U(__PRIVATE_dbKey(o)) : r.done();\n }).next(() => {\n // The rest of the keys are not in the cache. One case where `iterate`\n // above won't go through them is when the cache is empty.\n for (; o;) n(o, null), o = s.hasNext() ? s.getNext() : null;\n });\n }\n getDocumentsMatchingQuery(e, t, n, r, i) {\n const s = t.path,\n o = [s.popLast().toArray(), s.lastSegment(), __PRIVATE_toDbTimestampKey(n.readTime), n.documentKey.path.isEmpty() ? \"\" : n.documentKey.path.lastSegment()],\n _ = [s.popLast().toArray(), s.lastSegment(), [Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER], \"\"];\n return __PRIVATE_remoteDocumentsStore(e).W(IDBKeyRange.bound(o, _, !0)).next(e => {\n null == i || i.incrementDocumentReadCount(e.length);\n let n = __PRIVATE_mutableDocumentMap();\n for (const i of e) {\n const e = this.tr(DocumentKey.fromSegments(i.prefixPath.concat(i.collectionGroup, i.documentId)), i);\n e.isFoundDocument() && (__PRIVATE_queryMatches(t, e) || r.has(e.key)) && (\n // Either the document matches the given query, or it is mutated.\n n = n.insert(e.key, e));\n }\n return n;\n });\n }\n getAllFromCollectionGroup(e, t, n, r) {\n let i = __PRIVATE_mutableDocumentMap();\n const s = __PRIVATE_dbCollectionGroupKey(t, n),\n o = __PRIVATE_dbCollectionGroupKey(t, IndexOffset.max());\n return __PRIVATE_remoteDocumentsStore(e).Y({\n index: \"collectionGroupIndex\",\n range: IDBKeyRange.bound(s, o, !0)\n }, (e, t, n) => {\n const s = this.tr(DocumentKey.fromSegments(t.prefixPath.concat(t.collectionGroup, t.documentId)), t);\n i = i.insert(s.key, s), i.size === r && n.done();\n }).next(() => i);\n }\n newChangeBuffer(e) {\n return new __PRIVATE_IndexedDbRemoteDocumentChangeBuffer(this, !!e && e.trackRemovals);\n }\n getSize(e) {\n return this.getMetadata(e).next(e => e.byteSize);\n }\n getMetadata(e) {\n return __PRIVATE_documentGlobalStore(e).get(\"remoteDocumentGlobalKey\").next(e => (__PRIVATE_hardAssert(!!e), e));\n }\n er(e, t) {\n return __PRIVATE_documentGlobalStore(e).put(\"remoteDocumentGlobalKey\", t);\n }\n /**\n * Decodes `dbRemoteDoc` and returns the document (or an invalid document if\n * the document corresponds to the format used for sentinel deletes).\n */\n tr(e, t) {\n if (t) {\n const e = __PRIVATE_fromDbRemoteDocument(this.serializer, t);\n // Whether the document is a sentinel removal and should only be used in the\n // `getNewDocumentChanges()`\n if (!(e.isNoDocument() && e.version.isEqual(SnapshotVersion.min()))) return e;\n }\n return MutableDocument.newInvalidDocument(e);\n }\n}\n\n/** Creates a new IndexedDbRemoteDocumentCache. */\nfunction __PRIVATE_newIndexedDbRemoteDocumentCache(e) {\n return new __PRIVATE_IndexedDbRemoteDocumentCacheImpl(e);\n}\n\n/**\n * Handles the details of adding and updating documents in the IndexedDbRemoteDocumentCache.\n *\n * Unlike the MemoryRemoteDocumentChangeBuffer, the IndexedDb implementation computes the size\n * delta for all submitted changes. This avoids having to re-read all documents from IndexedDb\n * when we apply the changes.\n */\nclass __PRIVATE_IndexedDbRemoteDocumentChangeBuffer extends RemoteDocumentChangeBuffer {\n /**\n * @param documentCache - The IndexedDbRemoteDocumentCache to apply the changes to.\n * @param trackRemovals - Whether to create sentinel deletes that can be tracked by\n * `getNewDocumentChanges()`.\n */\n constructor(e, t) {\n super(), this._r = e, this.trackRemovals = t,\n // A map of document sizes and read times prior to applying the changes in\n // this buffer.\n this.ar = new ObjectMap(e => e.toString(), (e, t) => e.isEqual(t));\n }\n applyChanges(e) {\n const t = [];\n let n = 0,\n r = new SortedSet((e, t) => __PRIVATE_primitiveComparator(e.canonicalString(), t.canonicalString()));\n return this.changes.forEach((i, s) => {\n const o = this.ar.get(i);\n if (t.push(this._r.removeEntry(e, i, o.readTime)), s.isValidDocument()) {\n const _ = __PRIVATE_toDbRemoteDocument(this._r.serializer, s);\n r = r.add(i.path.popLast());\n const a = __PRIVATE_dbDocumentSize(_);\n n += a - o.size, t.push(this._r.addEntry(e, i, _));\n } else if (n -= o.size, this.trackRemovals) {\n // In order to track removals, we store a \"sentinel delete\" in the\n // RemoteDocumentCache. This entry is represented by a NoDocument\n // with a version of 0 and ignored by `maybeDecodeDocument()` but\n // preserved in `getNewDocumentChanges()`.\n const n = __PRIVATE_toDbRemoteDocument(this._r.serializer, s.convertToNoDocument(SnapshotVersion.min()));\n t.push(this._r.addEntry(e, i, n));\n }\n }), r.forEach(n => {\n t.push(this._r.indexManager.addToCollectionParentIndex(e, n));\n }), t.push(this._r.updateMetadata(e, n)), PersistencePromise.waitFor(t);\n }\n getFromCache(e, t) {\n // Record the size of everything we load from the cache so we can compute a delta later.\n return this._r.nr(e, t).next(e => (this.ar.set(t, {\n size: e.size,\n readTime: e.document.readTime\n }), e.document));\n }\n getAllFromCache(e, t) {\n // Record the size of everything we load from the cache so we can compute\n // a delta later.\n return this._r.ir(e, t).next(({\n documents: e,\n sr: t\n }) => (\n // Note: `getAllFromCache` returns two maps instead of a single map from\n // keys to `DocumentSizeEntry`s. This is to allow returning the\n // `MutableDocumentMap` directly, without a conversion.\n t.forEach((t, n) => {\n this.ar.set(t, {\n size: n,\n readTime: e.get(t).readTime\n });\n }), e));\n }\n}\nfunction __PRIVATE_documentGlobalStore(e) {\n return __PRIVATE_getStore(e, \"remoteDocumentGlobal\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the remoteDocuments object store.\n */\nfunction __PRIVATE_remoteDocumentsStore(e) {\n return __PRIVATE_getStore(e, \"remoteDocumentsV14\");\n}\n\n/**\n * Returns a key that can be used for document lookups on the\n * `DbRemoteDocumentDocumentKeyIndex` index.\n */\nfunction __PRIVATE_dbKey(e) {\n const t = e.path.toArray();\n return [/* prefix path */t.slice(0, t.length - 2), /* collection id */t[t.length - 2], /* document id */t[t.length - 1]];\n}\nfunction __PRIVATE_dbCollectionGroupKey(e, t) {\n const n = t.documentKey.path.toArray();\n return [/* collection id */e, __PRIVATE_toDbTimestampKey(t.readTime), /* prefix path */n.slice(0, n.length - 2), /* document id */n.length > 0 ? n[n.length - 1] : \"\"];\n}\n\n/**\n * Comparator that compares document keys according to the primary key sorting\n * used by the `DbRemoteDocumentDocument` store (by prefix path, collection id\n * and then document ID).\n *\n * Visible for testing.\n */\nfunction __PRIVATE_dbKeyComparator(e, t) {\n const n = e.path.toArray(),\n r = t.path.toArray();\n // The ordering is based on https://chromium.googlesource.com/chromium/blink/+/fe5c21fef94dae71c1c3344775b8d8a7f7e6d9ec/Source/modules/indexeddb/IDBKey.cpp#74\n let i = 0;\n for (let e = 0; e < n.length - 2 && e < r.length - 2; ++e) if (i = __PRIVATE_primitiveComparator(n[e], r[e]), i) return i;\n return i = __PRIVATE_primitiveComparator(n.length, r.length), i || (i = __PRIVATE_primitiveComparator(n[n.length - 2], r[r.length - 2]), i || __PRIVATE_primitiveComparator(n[n.length - 1], r[r.length - 1]));\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Schema Version for the Web client:\n * 1. Initial version including Mutation Queue, Query Cache, and Remote\n * Document Cache\n * 2. Used to ensure a targetGlobal object exists and add targetCount to it. No\n * longer required because migration 3 unconditionally clears it.\n * 3. Dropped and re-created Query Cache to deal with cache corruption related\n * to limbo resolution. Addresses\n * https://github.com/firebase/firebase-ios-sdk/issues/1548\n * 4. Multi-Tab Support.\n * 5. Removal of held write acks.\n * 6. Create document global for tracking document cache size.\n * 7. Ensure every cached document has a sentinel row with a sequence number.\n * 8. Add collection-parent index for Collection Group queries.\n * 9. Change RemoteDocumentChanges store to be keyed by readTime rather than\n * an auto-incrementing ID. This is required for Index-Free queries.\n * 10. Rewrite the canonical IDs to the explicit Protobuf-based format.\n * 11. Add bundles and named_queries for bundle support.\n * 12. Add document overlays.\n * 13. Rewrite the keys of the remote document cache to allow for efficient\n * document lookup via `getAll()`.\n * 14. Add overlays.\n * 15. Add indexing support.\n */\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Represents a local view (overlay) of a document, and the fields that are\n * locally mutated.\n */\nclass OverlayedDocument {\n constructor(e,\n /**\n * The fields that are locally mutated by patch mutations.\n *\n * If the overlayed\tdocument is from set or delete mutations, this is `null`.\n * If there is no overlay (mutation) for the document, this is an empty `FieldMask`.\n */\n t) {\n this.overlayedDocument = e, this.mutatedFields = t;\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A readonly view of the local state of all documents we're tracking (i.e. we\n * have a cached version in remoteDocumentCache or local mutations for the\n * document). The view is computed by applying the mutations in the\n * MutationQueue to the RemoteDocumentCache.\n */\nclass LocalDocumentsView {\n constructor(e, t, n, r) {\n this.remoteDocumentCache = e, this.mutationQueue = t, this.documentOverlayCache = n, this.indexManager = r;\n }\n /**\n * Get the local view of the document identified by `key`.\n *\n * @returns Local view of the document or null if we don't have any cached\n * state for it.\n */\n getDocument(e, t) {\n let n = null;\n return this.documentOverlayCache.getOverlay(e, t).next(r => (n = r, this.remoteDocumentCache.getEntry(e, t))).next(e => (null !== n && __PRIVATE_mutationApplyToLocalView(n.mutation, e, FieldMask.empty(), Timestamp.now()), e));\n }\n /**\n * Gets the local view of the documents identified by `keys`.\n *\n * If we don't have cached state for a document in `keys`, a NoDocument will\n * be stored for that key in the resulting set.\n */\n getDocuments(e, t) {\n return this.remoteDocumentCache.getEntries(e, t).next(t => this.getLocalViewOfDocuments(e, t, __PRIVATE_documentKeySet()).next(() => t));\n }\n /**\n * Similar to `getDocuments`, but creates the local view from the given\n * `baseDocs` without retrieving documents from the local store.\n *\n * @param transaction - The transaction this operation is scoped to.\n * @param docs - The documents to apply local mutations to get the local views.\n * @param existenceStateChanged - The set of document keys whose existence state\n * is changed. This is useful to determine if some documents overlay needs\n * to be recalculated.\n */\n getLocalViewOfDocuments(e, t, n = __PRIVATE_documentKeySet()) {\n const r = __PRIVATE_newOverlayMap();\n return this.populateOverlays(e, r, t).next(() => this.computeViews(e, t, r, n).next(e => {\n let t = documentMap();\n return e.forEach((e, n) => {\n t = t.insert(e, n.overlayedDocument);\n }), t;\n }));\n }\n /**\n * Gets the overlayed documents for the given document map, which will include\n * the local view of those documents and a `FieldMask` indicating which fields\n * are mutated locally, `null` if overlay is a Set or Delete mutation.\n */\n getOverlayedDocuments(e, t) {\n const n = __PRIVATE_newOverlayMap();\n return this.populateOverlays(e, n, t).next(() => this.computeViews(e, t, n, __PRIVATE_documentKeySet()));\n }\n /**\n * Fetches the overlays for {@code docs} and adds them to provided overlay map\n * if the map does not already contain an entry for the given document key.\n */\n populateOverlays(e, t, n) {\n const r = [];\n return n.forEach(e => {\n t.has(e) || r.push(e);\n }), this.documentOverlayCache.getOverlays(e, r).next(e => {\n e.forEach((e, n) => {\n t.set(e, n);\n });\n });\n }\n /**\n * Computes the local view for the given documents.\n *\n * @param docs - The documents to compute views for. It also has the base\n * version of the documents.\n * @param overlays - The overlays that need to be applied to the given base\n * version of the documents.\n * @param existenceStateChanged - A set of documents whose existence states\n * might have changed. This is used to determine if we need to re-calculate\n * overlays from mutation queues.\n * @return A map represents the local documents view.\n */\n computeViews(e, t, n, r) {\n let i = __PRIVATE_mutableDocumentMap();\n const s = __PRIVATE_newDocumentKeyMap(),\n o = function __PRIVATE_newOverlayedDocumentMap() {\n return __PRIVATE_newDocumentKeyMap();\n }();\n return t.forEach((e, t) => {\n const o = n.get(t.key);\n // Recalculate an overlay if the document's existence state changed due to\n // a remote event *and* the overlay is a PatchMutation. This is because\n // document existence state can change if some patch mutation's\n // preconditions are met.\n // NOTE: we recalculate when `overlay` is undefined as well, because there\n // might be a patch mutation whose precondition does not match before the\n // change (hence overlay is undefined), but would now match.\n r.has(t.key) && (void 0 === o || o.mutation instanceof __PRIVATE_PatchMutation) ? i = i.insert(t.key, t) : void 0 !== o ? (s.set(t.key, o.mutation.getFieldMask()), __PRIVATE_mutationApplyToLocalView(o.mutation, t, o.mutation.getFieldMask(), Timestamp.now())) :\n // no overlay exists\n // Using EMPTY to indicate there is no overlay for the document.\n s.set(t.key, FieldMask.empty());\n }), this.recalculateAndSaveOverlays(e, i).next(e => (e.forEach((e, t) => s.set(e, t)), t.forEach((e, t) => {\n var n;\n return o.set(e, new OverlayedDocument(t, null !== (n = s.get(e)) && void 0 !== n ? n : null));\n }), o));\n }\n recalculateAndSaveOverlays(e, t) {\n const n = __PRIVATE_newDocumentKeyMap();\n // A reverse lookup map from batch id to the documents within that batch.\n let r = new SortedMap((e, t) => e - t),\n i = __PRIVATE_documentKeySet();\n return this.mutationQueue.getAllMutationBatchesAffectingDocumentKeys(e, t).next(e => {\n for (const i of e) i.keys().forEach(e => {\n const s = t.get(e);\n if (null === s) return;\n let o = n.get(e) || FieldMask.empty();\n o = i.applyToLocalView(s, o), n.set(e, o);\n const _ = (r.get(i.batchId) || __PRIVATE_documentKeySet()).add(e);\n r = r.insert(i.batchId, _);\n });\n }).next(() => {\n const s = [],\n o = r.getReverseIterator();\n // Iterate in descending order of batch IDs, and skip documents that are\n // already saved.\n for (; o.hasNext();) {\n const r = o.getNext(),\n _ = r.key,\n a = r.value,\n u = __PRIVATE_newMutationMap();\n a.forEach(e => {\n if (!i.has(e)) {\n const r = __PRIVATE_calculateOverlayMutation(t.get(e), n.get(e));\n null !== r && u.set(e, r), i = i.add(e);\n }\n }), s.push(this.documentOverlayCache.saveOverlays(e, _, u));\n }\n return PersistencePromise.waitFor(s);\n }).next(() => n);\n }\n /**\n * Recalculates overlays by reading the documents from remote document cache\n * first, and saves them after they are calculated.\n */\n recalculateAndSaveOverlaysForDocumentKeys(e, t) {\n return this.remoteDocumentCache.getEntries(e, t).next(t => this.recalculateAndSaveOverlays(e, t));\n }\n /**\n * Performs a query against the local view of all documents.\n *\n * @param transaction - The persistence transaction.\n * @param query - The query to match documents against.\n * @param offset - Read time and key to start scanning by (exclusive).\n * @param context - A optional tracker to keep a record of important details\n * during database local query execution.\n */\n getDocumentsMatchingQuery(e, t, n, r) {\n /**\n * Returns whether the query matches a single document by path (rather than a\n * collection).\n */\n return function __PRIVATE_isDocumentQuery$1(e) {\n return DocumentKey.isDocumentKey(e.path) && null === e.collectionGroup && 0 === e.filters.length;\n }(t) ? this.getDocumentsMatchingDocumentQuery(e, t.path) : __PRIVATE_isCollectionGroupQuery(t) ? this.getDocumentsMatchingCollectionGroupQuery(e, t, n, r) : this.getDocumentsMatchingCollectionQuery(e, t, n, r);\n }\n /**\n * Given a collection group, returns the next documents that follow the provided offset, along\n * with an updated batch ID.\n *\n *
The documents returned by this method are ordered by remote version from the provided\n * offset. If there are no more remote documents after the provided offset, documents with\n * mutations in order of batch id from the offset are returned. Since all documents in a batch are\n * returned together, the total number of documents returned can exceed {@code count}.\n *\n * @param transaction\n * @param collectionGroup The collection group for the documents.\n * @param offset The offset to index into.\n * @param count The number of documents to return\n * @return A LocalWriteResult with the documents that follow the provided offset and the last processed batch id.\n */\n getNextDocuments(e, t, n, r) {\n return this.remoteDocumentCache.getAllFromCollectionGroup(e, t, n, r).next(i => {\n const s = r - i.size > 0 ? this.documentOverlayCache.getOverlaysForCollectionGroup(e, t, n.largestBatchId, r - i.size) : PersistencePromise.resolve(__PRIVATE_newOverlayMap());\n // The callsite will use the largest batch ID together with the latest read time to create\n // a new index offset. Since we only process batch IDs if all remote documents have been read,\n // no overlay will increase the overall read time. This is why we only need to special case\n // the batch id.\n let o = -1,\n _ = i;\n return s.next(t => PersistencePromise.forEach(t, (t, n) => (o < n.largestBatchId && (o = n.largestBatchId), i.get(t) ? PersistencePromise.resolve() : this.remoteDocumentCache.getEntry(e, t).next(e => {\n _ = _.insert(t, e);\n }))).next(() => this.populateOverlays(e, t, i)).next(() => this.computeViews(e, _, t, __PRIVATE_documentKeySet())).next(e => ({\n batchId: o,\n changes: __PRIVATE_convertOverlayedDocumentMapToDocumentMap(e)\n })));\n });\n }\n getDocumentsMatchingDocumentQuery(e, t) {\n // Just do a simple document lookup.\n return this.getDocument(e, new DocumentKey(t)).next(e => {\n let t = documentMap();\n return e.isFoundDocument() && (t = t.insert(e.key, e)), t;\n });\n }\n getDocumentsMatchingCollectionGroupQuery(e, t, n, r) {\n const i = t.collectionGroup;\n let s = documentMap();\n return this.indexManager.getCollectionParents(e, i).next(o => PersistencePromise.forEach(o, o => {\n const _ = function __PRIVATE_asCollectionQueryAtPath(e, t) {\n return new __PRIVATE_QueryImpl(t, /*collectionGroup=*/null, e.explicitOrderBy.slice(), e.filters.slice(), e.limit, e.limitType, e.startAt, e.endAt);\n }(t, o.child(i));\n return this.getDocumentsMatchingCollectionQuery(e, _, n, r).next(e => {\n e.forEach((e, t) => {\n s = s.insert(e, t);\n });\n });\n }).next(() => s));\n }\n getDocumentsMatchingCollectionQuery(e, t, n, r) {\n // Query the remote documents and overlay mutations.\n let i;\n return this.documentOverlayCache.getOverlaysForCollection(e, t.path, n.largestBatchId).next(s => (i = s, this.remoteDocumentCache.getDocumentsMatchingQuery(e, t, n, i, r))).next(e => {\n // As documents might match the query because of their overlay we need to\n // include documents for all overlays in the initial document set.\n i.forEach((t, n) => {\n const r = n.getKey();\n null === e.get(r) && (e = e.insert(r, MutableDocument.newInvalidDocument(r)));\n });\n // Apply the overlays and match against the query.\n let n = documentMap();\n return e.forEach((e, r) => {\n const s = i.get(e);\n void 0 !== s && __PRIVATE_mutationApplyToLocalView(s.mutation, r, FieldMask.empty(), Timestamp.now()),\n // Finally, insert the documents that still match the query\n __PRIVATE_queryMatches(t, r) && (n = n.insert(e, r));\n }), n;\n });\n }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass __PRIVATE_MemoryBundleCache {\n constructor(e) {\n this.serializer = e, this.ur = new Map(), this.cr = new Map();\n }\n getBundleMetadata(e, t) {\n return PersistencePromise.resolve(this.ur.get(t));\n }\n saveBundleMetadata(e, t) {\n return this.ur.set(t.id, /** Decodes a BundleMetadata proto into a BundleMetadata object. */\n function __PRIVATE_fromBundleMetadata(e) {\n return {\n id: e.id,\n version: e.version,\n createTime: __PRIVATE_fromVersion(e.createTime)\n };\n }(t)), PersistencePromise.resolve();\n }\n getNamedQuery(e, t) {\n return PersistencePromise.resolve(this.cr.get(t));\n }\n saveNamedQuery(e, t) {\n return this.cr.set(t.name, function __PRIVATE_fromProtoNamedQuery(e) {\n return {\n name: e.name,\n query: __PRIVATE_fromBundledQuery(e.bundledQuery),\n readTime: __PRIVATE_fromVersion(e.readTime)\n };\n }(t)), PersistencePromise.resolve();\n }\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An in-memory implementation of DocumentOverlayCache.\n */\nclass __PRIVATE_MemoryDocumentOverlayCache {\n constructor() {\n // A map sorted by DocumentKey, whose value is a pair of the largest batch id\n // for the overlay and the overlay itself.\n this.overlays = new SortedMap(DocumentKey.comparator), this.lr = new Map();\n }\n getOverlay(e, t) {\n return PersistencePromise.resolve(this.overlays.get(t));\n }\n getOverlays(e, t) {\n const n = __PRIVATE_newOverlayMap();\n return PersistencePromise.forEach(t, t => this.getOverlay(e, t).next(e => {\n null !== e && n.set(t, e);\n })).next(() => n);\n }\n saveOverlays(e, t, n) {\n return n.forEach((n, r) => {\n this.lt(e, t, r);\n }), PersistencePromise.resolve();\n }\n removeOverlaysForBatchId(e, t, n) {\n const r = this.lr.get(n);\n return void 0 !== r && (r.forEach(e => this.overlays = this.overlays.remove(e)), this.lr.delete(n)), PersistencePromise.resolve();\n }\n getOverlaysForCollection(e, t, n) {\n const r = __PRIVATE_newOverlayMap(),\n i = t.length + 1,\n s = new DocumentKey(t.child(\"\")),\n o = this.overlays.getIteratorFrom(s);\n for (; o.hasNext();) {\n const e = o.getNext().value,\n s = e.getKey();\n if (!t.isPrefixOf(s.path)) break;\n // Documents from sub-collections\n s.path.length === i && e.largestBatchId > n && r.set(e.getKey(), e);\n }\n return PersistencePromise.resolve(r);\n }\n getOverlaysForCollectionGroup(e, t, n, r) {\n let i = new SortedMap((e, t) => e - t);\n const s = this.overlays.getIterator();\n for (; s.hasNext();) {\n const e = s.getNext().value;\n if (e.getKey().getCollectionGroup() === t && e.largestBatchId > n) {\n let t = i.get(e.largestBatchId);\n null === t && (t = __PRIVATE_newOverlayMap(), i = i.insert(e.largestBatchId, t)), t.set(e.getKey(), e);\n }\n }\n const o = __PRIVATE_newOverlayMap(),\n _ = i.getIterator();\n for (; _.hasNext();) {\n if (_.getNext().value.forEach((e, t) => o.set(e, t)), o.size() >= r) break;\n }\n return PersistencePromise.resolve(o);\n }\n lt(e, t, n) {\n // Remove the association of the overlay to its batch id.\n const r = this.overlays.get(n.key);\n if (null !== r) {\n const e = this.lr.get(r.largestBatchId).delete(n.key);\n this.lr.set(r.largestBatchId, e);\n }\n this.overlays = this.overlays.insert(n.key, new Overlay(t, n));\n // Create the association of this overlay to the given largestBatchId.\n let i = this.lr.get(t);\n void 0 === i && (i = __PRIVATE_documentKeySet(), this.lr.set(t, i)), this.lr.set(t, i.add(n.key));\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A collection of references to a document from some kind of numbered entity\n * (either a target ID or batch ID). As references are added to or removed from\n * the set corresponding events are emitted to a registered garbage collector.\n *\n * Each reference is represented by a DocumentReference object. Each of them\n * contains enough information to uniquely identify the reference. They are all\n * stored primarily in a set sorted by key. A document is considered garbage if\n * there's no references in that set (this can be efficiently checked thanks to\n * sorting by key).\n *\n * ReferenceSet also keeps a secondary set that contains references sorted by\n * IDs. This one is used to efficiently implement removal of all references by\n * some target ID.\n */\nclass __PRIVATE_ReferenceSet {\n constructor() {\n // A set of outstanding references to a document sorted by key.\n this.hr = new SortedSet(__PRIVATE_DocReference.Pr),\n // A set of outstanding references to a document sorted by target id.\n this.Ir = new SortedSet(__PRIVATE_DocReference.Tr);\n }\n /** Returns true if the reference set contains no references. */\n isEmpty() {\n return this.hr.isEmpty();\n }\n /** Adds a reference to the given document key for the given ID. */\n addReference(e, t) {\n const n = new __PRIVATE_DocReference(e, t);\n this.hr = this.hr.add(n), this.Ir = this.Ir.add(n);\n }\n /** Add references to the given document keys for the given ID. */\n Er(e, t) {\n e.forEach(e => this.addReference(e, t));\n }\n /**\n * Removes a reference to the given document key for the given\n * ID.\n */\n removeReference(e, t) {\n this.dr(new __PRIVATE_DocReference(e, t));\n }\n Ar(e, t) {\n e.forEach(e => this.removeReference(e, t));\n }\n /**\n * Clears all references with a given ID. Calls removeRef() for each key\n * removed.\n */\n Rr(e) {\n const t = new DocumentKey(new ResourcePath([])),\n n = new __PRIVATE_DocReference(t, e),\n r = new __PRIVATE_DocReference(t, e + 1),\n i = [];\n return this.Ir.forEachInRange([n, r], e => {\n this.dr(e), i.push(e.key);\n }), i;\n }\n Vr() {\n this.hr.forEach(e => this.dr(e));\n }\n dr(e) {\n this.hr = this.hr.delete(e), this.Ir = this.Ir.delete(e);\n }\n mr(e) {\n const t = new DocumentKey(new ResourcePath([])),\n n = new __PRIVATE_DocReference(t, e),\n r = new __PRIVATE_DocReference(t, e + 1);\n let i = __PRIVATE_documentKeySet();\n return this.Ir.forEachInRange([n, r], e => {\n i = i.add(e.key);\n }), i;\n }\n containsKey(e) {\n const t = new __PRIVATE_DocReference(e, 0),\n n = this.hr.firstAfterOrEqual(t);\n return null !== n && e.isEqual(n.key);\n }\n}\nclass __PRIVATE_DocReference {\n constructor(e, t) {\n this.key = e, this.gr = t;\n }\n /** Compare by key then by ID */\n static Pr(e, t) {\n return DocumentKey.comparator(e.key, t.key) || __PRIVATE_primitiveComparator(e.gr, t.gr);\n }\n /** Compare by ID then by key */\n static Tr(e, t) {\n return __PRIVATE_primitiveComparator(e.gr, t.gr) || DocumentKey.comparator(e.key, t.key);\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass __PRIVATE_MemoryMutationQueue {\n constructor(e, t) {\n this.indexManager = e, this.referenceDelegate = t,\n /**\n * The set of all mutations that have been sent but not yet been applied to\n * the backend.\n */\n this.mutationQueue = [], /** Next value to use when assigning sequential IDs to each mutation batch. */\n this.pr = 1, /** An ordered mapping between documents and the mutations batch IDs. */\n this.yr = new SortedSet(__PRIVATE_DocReference.Pr);\n }\n checkEmpty(e) {\n return PersistencePromise.resolve(0 === this.mutationQueue.length);\n }\n addMutationBatch(e, t, n, r) {\n const i = this.pr;\n this.pr++, this.mutationQueue.length > 0 && this.mutationQueue[this.mutationQueue.length - 1];\n const s = new MutationBatch(i, t, n, r);\n this.mutationQueue.push(s);\n // Track references by document key and index collection parents.\n for (const t of r) this.yr = this.yr.add(new __PRIVATE_DocReference(t.key, i)), this.indexManager.addToCollectionParentIndex(e, t.key.path.popLast());\n return PersistencePromise.resolve(s);\n }\n lookupMutationBatch(e, t) {\n return PersistencePromise.resolve(this.wr(t));\n }\n getNextMutationBatchAfterBatchId(e, t) {\n const n = t + 1,\n r = this.Sr(n),\n i = r < 0 ? 0 : r;\n // The requested batchId may still be out of range so normalize it to the\n // start of the queue.\n return PersistencePromise.resolve(this.mutationQueue.length > i ? this.mutationQueue[i] : null);\n }\n getHighestUnacknowledgedBatchId() {\n return PersistencePromise.resolve(0 === this.mutationQueue.length ? -1 : this.pr - 1);\n }\n getAllMutationBatches(e) {\n return PersistencePromise.resolve(this.mutationQueue.slice());\n }\n getAllMutationBatchesAffectingDocumentKey(e, t) {\n const n = new __PRIVATE_DocReference(t, 0),\n r = new __PRIVATE_DocReference(t, Number.POSITIVE_INFINITY),\n i = [];\n return this.yr.forEachInRange([n, r], e => {\n const t = this.wr(e.gr);\n i.push(t);\n }), PersistencePromise.resolve(i);\n }\n getAllMutationBatchesAffectingDocumentKeys(e, t) {\n let n = new SortedSet(__PRIVATE_primitiveComparator);\n return t.forEach(e => {\n const t = new __PRIVATE_DocReference(e, 0),\n r = new __PRIVATE_DocReference(e, Number.POSITIVE_INFINITY);\n this.yr.forEachInRange([t, r], e => {\n n = n.add(e.gr);\n });\n }), PersistencePromise.resolve(this.br(n));\n }\n getAllMutationBatchesAffectingQuery(e, t) {\n // Use the query path as a prefix for testing if a document matches the\n // query.\n const n = t.path,\n r = n.length + 1;\n // Construct a document reference for actually scanning the index. Unlike\n // the prefix the document key in this reference must have an even number of\n // segments. The empty segment can be used a suffix of the query path\n // because it precedes all other segments in an ordered traversal.\n let i = n;\n DocumentKey.isDocumentKey(i) || (i = i.child(\"\"));\n const s = new __PRIVATE_DocReference(new DocumentKey(i), 0);\n // Find unique batchIDs referenced by all documents potentially matching the\n // query.\n let o = new SortedSet(__PRIVATE_primitiveComparator);\n return this.yr.forEachWhile(e => {\n const t = e.key.path;\n return !!n.isPrefixOf(t) && (\n // Rows with document keys more than one segment longer than the query\n // path can't be matches. For example, a query on 'rooms' can't match\n // the document /rooms/abc/messages/xyx.\n // TODO(mcg): we'll need a different scanner when we implement\n // ancestor queries.\n t.length === r && (o = o.add(e.gr)), !0);\n }, s), PersistencePromise.resolve(this.br(o));\n }\n br(e) {\n // Construct an array of matching batches, sorted by batchID to ensure that\n // multiple mutations affecting the same document key are applied in order.\n const t = [];\n return e.forEach(e => {\n const n = this.wr(e);\n null !== n && t.push(n);\n }), t;\n }\n removeMutationBatch(e, t) {\n __PRIVATE_hardAssert(0 === this.Dr(t.batchId, \"removed\")), this.mutationQueue.shift();\n let n = this.yr;\n return PersistencePromise.forEach(t.mutations, r => {\n const i = new __PRIVATE_DocReference(r.key, t.batchId);\n return n = n.delete(i), this.referenceDelegate.markPotentiallyOrphaned(e, r.key);\n }).next(() => {\n this.yr = n;\n });\n }\n Fn(e) {\n // No-op since the memory mutation queue does not maintain a separate cache.\n }\n containsKey(e, t) {\n const n = new __PRIVATE_DocReference(t, 0),\n r = this.yr.firstAfterOrEqual(n);\n return PersistencePromise.resolve(t.isEqual(r && r.key));\n }\n performConsistencyCheck(e) {\n return this.mutationQueue.length, PersistencePromise.resolve();\n }\n /**\n * Finds the index of the given batchId in the mutation queue and asserts that\n * the resulting index is within the bounds of the queue.\n *\n * @param batchId - The batchId to search for\n * @param action - A description of what the caller is doing, phrased in passive\n * form (e.g. \"acknowledged\" in a routine that acknowledges batches).\n */\n Dr(e, t) {\n return this.Sr(e);\n }\n /**\n * Finds the index of the given batchId in the mutation queue. This operation\n * is O(1).\n *\n * @returns The computed index of the batch with the given batchId, based on\n * the state of the queue. Note this index can be negative if the requested\n * batchId has already been remvoed from the queue or past the end of the\n * queue if the batchId is larger than the last added batch.\n */\n Sr(e) {\n if (0 === this.mutationQueue.length)\n // As an index this is past the end of the queue\n return 0;\n // Examine the front of the queue to figure out the difference between the\n // batchId and indexes in the array. Note that since the queue is ordered\n // by batchId, if the first batch has a larger batchId then the requested\n // batchId doesn't exist in the queue.\n return e - this.mutationQueue[0].batchId;\n }\n /**\n * A version of lookupMutationBatch that doesn't return a promise, this makes\n * other functions that uses this code easier to read and more efficent.\n */\n wr(e) {\n const t = this.Sr(e);\n if (t < 0 || t >= this.mutationQueue.length) return null;\n return this.mutationQueue[t];\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The memory-only RemoteDocumentCache for IndexedDb. To construct, invoke\n * `newMemoryRemoteDocumentCache()`.\n */\nclass __PRIVATE_MemoryRemoteDocumentCacheImpl {\n /**\n * @param sizer - Used to assess the size of a document. For eager GC, this is\n * expected to just return 0 to avoid unnecessarily doing the work of\n * calculating the size.\n */\n constructor(e) {\n this.Cr = e, /** Underlying cache of documents and their read times. */\n this.docs = function __PRIVATE_documentEntryMap() {\n return new SortedMap(DocumentKey.comparator);\n }(), /** Size of all cached documents. */\n this.size = 0;\n }\n setIndexManager(e) {\n this.indexManager = e;\n }\n /**\n * Adds the supplied entry to the cache and updates the cache size as appropriate.\n *\n * All calls of `addEntry` are required to go through the RemoteDocumentChangeBuffer\n * returned by `newChangeBuffer()`.\n */\n addEntry(e, t) {\n const n = t.key,\n r = this.docs.get(n),\n i = r ? r.size : 0,\n s = this.Cr(t);\n return this.docs = this.docs.insert(n, {\n document: t.mutableCopy(),\n size: s\n }), this.size += s - i, this.indexManager.addToCollectionParentIndex(e, n.path.popLast());\n }\n /**\n * Removes the specified entry from the cache and updates the cache size as appropriate.\n *\n * All calls of `removeEntry` are required to go through the RemoteDocumentChangeBuffer\n * returned by `newChangeBuffer()`.\n */\n removeEntry(e) {\n const t = this.docs.get(e);\n t && (this.docs = this.docs.remove(e), this.size -= t.size);\n }\n getEntry(e, t) {\n const n = this.docs.get(t);\n return PersistencePromise.resolve(n ? n.document.mutableCopy() : MutableDocument.newInvalidDocument(t));\n }\n getEntries(e, t) {\n let n = __PRIVATE_mutableDocumentMap();\n return t.forEach(e => {\n const t = this.docs.get(e);\n n = n.insert(e, t ? t.document.mutableCopy() : MutableDocument.newInvalidDocument(e));\n }), PersistencePromise.resolve(n);\n }\n getDocumentsMatchingQuery(e, t, n, r) {\n let i = __PRIVATE_mutableDocumentMap();\n // Documents are ordered by key, so we can use a prefix scan to narrow down\n // the documents we need to match the query against.\n const s = t.path,\n o = new DocumentKey(s.child(\"\")),\n _ = this.docs.getIteratorFrom(o);\n for (; _.hasNext();) {\n const {\n key: e,\n value: {\n document: o\n }\n } = _.getNext();\n if (!s.isPrefixOf(e.path)) break;\n e.path.length > s.length + 1 || __PRIVATE_indexOffsetComparator(__PRIVATE_newIndexOffsetFromDocument(o), n) <= 0 || (r.has(o.key) || __PRIVATE_queryMatches(t, o)) && (i = i.insert(o.key, o.mutableCopy()));\n }\n return PersistencePromise.resolve(i);\n }\n getAllFromCollectionGroup(e, t, n, r) {\n // This method should only be called from the IndexBackfiller if persistence\n // is enabled.\n fail();\n }\n vr(e, t) {\n return PersistencePromise.forEach(this.docs, e => t(e));\n }\n newChangeBuffer(e) {\n // `trackRemovals` is ignores since the MemoryRemoteDocumentCache keeps\n // a separate changelog and does not need special handling for removals.\n return new __PRIVATE_MemoryRemoteDocumentChangeBuffer(this);\n }\n getSize(e) {\n return PersistencePromise.resolve(this.size);\n }\n}\n\n/**\n * Creates a new memory-only RemoteDocumentCache.\n *\n * @param sizer - Used to assess the size of a document. For eager GC, this is\n * expected to just return 0 to avoid unnecessarily doing the work of\n * calculating the size.\n */\n/**\n * Handles the details of adding and updating documents in the MemoryRemoteDocumentCache.\n */\nclass __PRIVATE_MemoryRemoteDocumentChangeBuffer extends RemoteDocumentChangeBuffer {\n constructor(e) {\n super(), this._r = e;\n }\n applyChanges(e) {\n const t = [];\n return this.changes.forEach((n, r) => {\n r.isValidDocument() ? t.push(this._r.addEntry(e, r)) : this._r.removeEntry(n);\n }), PersistencePromise.waitFor(t);\n }\n getFromCache(e, t) {\n return this._r.getEntry(e, t);\n }\n getAllFromCache(e, t) {\n return this._r.getEntries(e, t);\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass __PRIVATE_MemoryTargetCache {\n constructor(e) {\n this.persistence = e,\n /**\n * Maps a target to the data about that target\n */\n this.Fr = new ObjectMap(e => __PRIVATE_canonifyTarget(e), __PRIVATE_targetEquals), /** The last received snapshot version. */\n this.lastRemoteSnapshotVersion = SnapshotVersion.min(), /** The highest numbered target ID encountered. */\n this.highestTargetId = 0, /** The highest sequence number encountered. */\n this.Mr = 0,\n /**\n * A ordered bidirectional mapping between documents and the remote target\n * IDs.\n */\n this.Or = new __PRIVATE_ReferenceSet(), this.targetCount = 0, this.Nr = __PRIVATE_TargetIdGenerator.On();\n }\n forEachTarget(e, t) {\n return this.Fr.forEach((e, n) => t(n)), PersistencePromise.resolve();\n }\n getLastRemoteSnapshotVersion(e) {\n return PersistencePromise.resolve(this.lastRemoteSnapshotVersion);\n }\n getHighestSequenceNumber(e) {\n return PersistencePromise.resolve(this.Mr);\n }\n allocateTargetId(e) {\n return this.highestTargetId = this.Nr.next(), PersistencePromise.resolve(this.highestTargetId);\n }\n setTargetsMetadata(e, t, n) {\n return n && (this.lastRemoteSnapshotVersion = n), t > this.Mr && (this.Mr = t), PersistencePromise.resolve();\n }\n kn(e) {\n this.Fr.set(e.target, e);\n const t = e.targetId;\n t > this.highestTargetId && (this.Nr = new __PRIVATE_TargetIdGenerator(t), this.highestTargetId = t), e.sequenceNumber > this.Mr && (this.Mr = e.sequenceNumber);\n }\n addTargetData(e, t) {\n return this.kn(t), this.targetCount += 1, PersistencePromise.resolve();\n }\n updateTargetData(e, t) {\n return this.kn(t), PersistencePromise.resolve();\n }\n removeTargetData(e, t) {\n return this.Fr.delete(t.target), this.Or.Rr(t.targetId), this.targetCount -= 1, PersistencePromise.resolve();\n }\n removeTargets(e, t, n) {\n let r = 0;\n const i = [];\n return this.Fr.forEach((s, o) => {\n o.sequenceNumber <= t && null === n.get(o.targetId) && (this.Fr.delete(s), i.push(this.removeMatchingKeysForTargetId(e, o.targetId)), r++);\n }), PersistencePromise.waitFor(i).next(() => r);\n }\n getTargetCount(e) {\n return PersistencePromise.resolve(this.targetCount);\n }\n getTargetData(e, t) {\n const n = this.Fr.get(t) || null;\n return PersistencePromise.resolve(n);\n }\n addMatchingKeys(e, t, n) {\n return this.Or.Er(t, n), PersistencePromise.resolve();\n }\n removeMatchingKeys(e, t, n) {\n this.Or.Ar(t, n);\n const r = this.persistence.referenceDelegate,\n i = [];\n return r && t.forEach(t => {\n i.push(r.markPotentiallyOrphaned(e, t));\n }), PersistencePromise.waitFor(i);\n }\n removeMatchingKeysForTargetId(e, t) {\n return this.Or.Rr(t), PersistencePromise.resolve();\n }\n getMatchingKeysForTargetId(e, t) {\n const n = this.Or.mr(t);\n return PersistencePromise.resolve(n);\n }\n containsKey(e, t) {\n return PersistencePromise.resolve(this.Or.containsKey(t));\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A memory-backed instance of Persistence. Data is stored only in RAM and\n * not persisted across sessions.\n */\nclass __PRIVATE_MemoryPersistence {\n /**\n * The constructor accepts a factory for creating a reference delegate. This\n * allows both the delegate and this instance to have strong references to\n * each other without having nullable fields that would then need to be\n * checked or asserted on every access.\n */\n constructor(e, t) {\n this.Br = {}, this.overlays = {}, this.Lr = new __PRIVATE_ListenSequence(0), this.kr = !1, this.kr = !0, this.referenceDelegate = e(this), this.qr = new __PRIVATE_MemoryTargetCache(this);\n this.indexManager = new __PRIVATE_MemoryIndexManager(), this.remoteDocumentCache = function __PRIVATE_newMemoryRemoteDocumentCache(e) {\n return new __PRIVATE_MemoryRemoteDocumentCacheImpl(e);\n }(e => this.referenceDelegate.Qr(e)), this.serializer = new __PRIVATE_LocalSerializer(t), this.Kr = new __PRIVATE_MemoryBundleCache(this.serializer);\n }\n start() {\n return Promise.resolve();\n }\n shutdown() {\n // No durable state to ensure is closed on shutdown.\n return this.kr = !1, Promise.resolve();\n }\n get started() {\n return this.kr;\n }\n setDatabaseDeletedListener() {\n // No op.\n }\n setNetworkEnabled() {\n // No op.\n }\n getIndexManager(e) {\n // We do not currently support indices for memory persistence, so we can\n // return the same shared instance of the memory index manager.\n return this.indexManager;\n }\n getDocumentOverlayCache(e) {\n let t = this.overlays[e.toKey()];\n return t || (t = new __PRIVATE_MemoryDocumentOverlayCache(), this.overlays[e.toKey()] = t), t;\n }\n getMutationQueue(e, t) {\n let n = this.Br[e.toKey()];\n return n || (n = new __PRIVATE_MemoryMutationQueue(t, this.referenceDelegate), this.Br[e.toKey()] = n), n;\n }\n getTargetCache() {\n return this.qr;\n }\n getRemoteDocumentCache() {\n return this.remoteDocumentCache;\n }\n getBundleCache() {\n return this.Kr;\n }\n runTransaction(e, t, n) {\n __PRIVATE_logDebug(\"MemoryPersistence\", \"Starting transaction:\", e);\n const r = new __PRIVATE_MemoryTransaction(this.Lr.next());\n return this.referenceDelegate.$r(), n(r).next(e => this.referenceDelegate.Ur(r).next(() => e)).toPromise().then(e => (r.raiseOnCommittedEvent(), e));\n }\n Wr(e, t) {\n return PersistencePromise.or(Object.values(this.Br).map(n => () => n.containsKey(e, t)));\n }\n}\n\n/**\n * Memory persistence is not actually transactional, but future implementations\n * may have transaction-scoped state.\n */\nclass __PRIVATE_MemoryTransaction extends PersistenceTransaction {\n constructor(e) {\n super(), this.currentSequenceNumber = e;\n }\n}\nclass __PRIVATE_MemoryEagerDelegate {\n constructor(e) {\n this.persistence = e, /** Tracks all documents that are active in Query views. */\n this.Gr = new __PRIVATE_ReferenceSet(), /** The list of documents that are potentially GCed after each transaction. */\n this.zr = null;\n }\n static jr(e) {\n return new __PRIVATE_MemoryEagerDelegate(e);\n }\n get Hr() {\n if (this.zr) return this.zr;\n throw fail();\n }\n addReference(e, t, n) {\n return this.Gr.addReference(n, t), this.Hr.delete(n.toString()), PersistencePromise.resolve();\n }\n removeReference(e, t, n) {\n return this.Gr.removeReference(n, t), this.Hr.add(n.toString()), PersistencePromise.resolve();\n }\n markPotentiallyOrphaned(e, t) {\n return this.Hr.add(t.toString()), PersistencePromise.resolve();\n }\n removeTarget(e, t) {\n this.Gr.Rr(t.targetId).forEach(e => this.Hr.add(e.toString()));\n const n = this.persistence.getTargetCache();\n return n.getMatchingKeysForTargetId(e, t.targetId).next(e => {\n e.forEach(e => this.Hr.add(e.toString()));\n }).next(() => n.removeTargetData(e, t));\n }\n $r() {\n this.zr = new Set();\n }\n Ur(e) {\n // Remove newly orphaned documents.\n const t = this.persistence.getRemoteDocumentCache().newChangeBuffer();\n return PersistencePromise.forEach(this.Hr, n => {\n const r = DocumentKey.fromPath(n);\n return this.Jr(e, r).next(e => {\n e || t.removeEntry(r, SnapshotVersion.min());\n });\n }).next(() => (this.zr = null, t.apply(e)));\n }\n updateLimboDocument(e, t) {\n return this.Jr(e, t).next(e => {\n e ? this.Hr.delete(t.toString()) : this.Hr.add(t.toString());\n });\n }\n Qr(e) {\n // For eager GC, we don't care about the document size, there are no size thresholds.\n return 0;\n }\n Jr(e, t) {\n return PersistencePromise.or([() => PersistencePromise.resolve(this.Gr.containsKey(t)), () => this.persistence.getTargetCache().containsKey(e, t), () => this.persistence.Wr(e, t)]);\n }\n}\nclass __PRIVATE_MemoryLruDelegate {\n constructor(e, t) {\n this.persistence = e, this.Yr = new ObjectMap(e => __PRIVATE_encodeResourcePath(e.path), (e, t) => e.isEqual(t)), this.garbageCollector = __PRIVATE_newLruGarbageCollector(this, t);\n }\n static jr(e, t) {\n return new __PRIVATE_MemoryLruDelegate(e, t);\n }\n // No-ops, present so memory persistence doesn't have to care which delegate\n // it has.\n $r() {}\n Ur(e) {\n return PersistencePromise.resolve();\n }\n forEachTarget(e, t) {\n return this.persistence.getTargetCache().forEachTarget(e, t);\n }\n jn(e) {\n const t = this.Yn(e);\n return this.persistence.getTargetCache().getTargetCount(e).next(e => t.next(t => e + t));\n }\n Yn(e) {\n let t = 0;\n return this.Hn(e, e => {\n t++;\n }).next(() => t);\n }\n Hn(e, t) {\n return PersistencePromise.forEach(this.Yr, (n, r) => this.Xn(e, n, r).next(e => e ? PersistencePromise.resolve() : t(r)));\n }\n removeTargets(e, t, n) {\n return this.persistence.getTargetCache().removeTargets(e, t, n);\n }\n removeOrphanedDocuments(e, t) {\n let n = 0;\n const r = this.persistence.getRemoteDocumentCache(),\n i = r.newChangeBuffer();\n return r.vr(e, r => this.Xn(e, r, t).next(e => {\n e || (n++, i.removeEntry(r, SnapshotVersion.min()));\n })).next(() => i.apply(e)).next(() => n);\n }\n markPotentiallyOrphaned(e, t) {\n return this.Yr.set(t, e.currentSequenceNumber), PersistencePromise.resolve();\n }\n removeTarget(e, t) {\n const n = t.withSequenceNumber(e.currentSequenceNumber);\n return this.persistence.getTargetCache().updateTargetData(e, n);\n }\n addReference(e, t, n) {\n return this.Yr.set(n, e.currentSequenceNumber), PersistencePromise.resolve();\n }\n removeReference(e, t, n) {\n return this.Yr.set(n, e.currentSequenceNumber), PersistencePromise.resolve();\n }\n updateLimboDocument(e, t) {\n return this.Yr.set(t, e.currentSequenceNumber), PersistencePromise.resolve();\n }\n Qr(e) {\n let t = e.key.toString().length;\n return e.isFoundDocument() && (t += __PRIVATE_estimateByteSize(e.data.value)), t;\n }\n Xn(e, t, n) {\n return PersistencePromise.or([() => this.persistence.Wr(e, t), () => this.persistence.getTargetCache().containsKey(e, t), () => {\n const e = this.Yr.get(t);\n return PersistencePromise.resolve(void 0 !== e && e > n);\n }]);\n }\n getCacheSize(e) {\n return this.persistence.getRemoteDocumentCache().getSize(e);\n }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Performs database creation and schema upgrades. */\nclass __PRIVATE_SchemaConverter {\n constructor(e) {\n this.serializer = e;\n }\n /**\n * Performs database creation and schema upgrades.\n *\n * Note that in production, this method is only ever used to upgrade the schema\n * to SCHEMA_VERSION. Different values of toVersion are only used for testing\n * and local feature development.\n */\n N(e, t, n, r) {\n const i = new __PRIVATE_SimpleDbTransaction(\"createOrUpgrade\", t);\n n < 1 && r >= 1 && (!function __PRIVATE_createPrimaryClientStore(e) {\n e.createObjectStore(\"owner\");\n }(e), function __PRIVATE_createMutationQueue(e) {\n e.createObjectStore(\"mutationQueues\", {\n keyPath: \"userId\"\n });\n e.createObjectStore(\"mutations\", {\n keyPath: \"batchId\",\n autoIncrement: !0\n }).createIndex(\"userMutationsIndex\", M, {\n unique: !0\n }), e.createObjectStore(\"documentMutations\");\n }\n /**\n * Upgrade function to migrate the 'mutations' store from V1 to V3. Loads\n * and rewrites all data.\n */(e), __PRIVATE_createQueryCache(e), function __PRIVATE_createLegacyRemoteDocumentCache(e) {\n e.createObjectStore(\"remoteDocuments\");\n }(e));\n // Migration 2 to populate the targetGlobal object no longer needed since\n // migration 3 unconditionally clears it.\n let s = PersistencePromise.resolve();\n return n < 3 && r >= 3 && (\n // Brand new clients don't need to drop and recreate--only clients that\n // potentially have corrupt data.\n 0 !== n && (!function __PRIVATE_dropQueryCache(e) {\n e.deleteObjectStore(\"targetDocuments\"), e.deleteObjectStore(\"targets\"), e.deleteObjectStore(\"targetGlobal\");\n }(e), __PRIVATE_createQueryCache(e)), s = s.next(() =>\n /**\n * Creates the target global singleton row.\n *\n * @param txn - The version upgrade transaction for indexeddb\n */\n function __PRIVATE_writeEmptyTargetGlobalEntry(e) {\n const t = e.store(\"targetGlobal\"),\n n = {\n highestTargetId: 0,\n highestListenSequenceNumber: 0,\n lastRemoteSnapshotVersion: SnapshotVersion.min().toTimestamp(),\n targetCount: 0\n };\n return t.put(\"targetGlobalKey\", n);\n }(i))), n < 4 && r >= 4 && (0 !== n && (\n // Schema version 3 uses auto-generated keys to generate globally unique\n // mutation batch IDs (this was previously ensured internally by the\n // client). To migrate to the new schema, we have to read all mutations\n // and write them back out. We preserve the existing batch IDs to guarantee\n // consistency with other object stores. Any further mutation batch IDs will\n // be auto-generated.\n s = s.next(() => function __PRIVATE_upgradeMutationBatchSchemaAndMigrateData(e, t) {\n return t.store(\"mutations\").W().next(n => {\n e.deleteObjectStore(\"mutations\");\n e.createObjectStore(\"mutations\", {\n keyPath: \"batchId\",\n autoIncrement: !0\n }).createIndex(\"userMutationsIndex\", M, {\n unique: !0\n });\n const r = t.store(\"mutations\"),\n i = n.map(e => r.put(e));\n return PersistencePromise.waitFor(i);\n });\n }(e, i))), s = s.next(() => {\n !function __PRIVATE_createClientMetadataStore(e) {\n e.createObjectStore(\"clientMetadata\", {\n keyPath: \"clientId\"\n });\n }(e);\n })), n < 5 && r >= 5 && (s = s.next(() => this.Zr(i))), n < 6 && r >= 6 && (s = s.next(() => (function __PRIVATE_createDocumentGlobalStore(e) {\n e.createObjectStore(\"remoteDocumentGlobal\");\n }(e), this.Xr(i)))), n < 7 && r >= 7 && (s = s.next(() => this.ei(i))), n < 8 && r >= 8 && (s = s.next(() => this.ti(e, i))), n < 9 && r >= 9 && (s = s.next(() => {\n // Multi-Tab used to manage its own changelog, but this has been moved\n // to the DbRemoteDocument object store itself. Since the previous change\n // log only contained transient data, we can drop its object store.\n !function __PRIVATE_dropRemoteDocumentChangesStore(e) {\n e.objectStoreNames.contains(\"remoteDocumentChanges\") && e.deleteObjectStore(\"remoteDocumentChanges\");\n }(e);\n // Note: Schema version 9 used to create a read time index for the\n // RemoteDocumentCache. This is now done with schema version 13.\n })), n < 10 && r >= 10 && (s = s.next(() => this.ni(i))), n < 11 && r >= 11 && (s = s.next(() => {\n !function __PRIVATE_createBundlesStore(e) {\n e.createObjectStore(\"bundles\", {\n keyPath: \"bundleId\"\n });\n }(e), function __PRIVATE_createNamedQueriesStore(e) {\n e.createObjectStore(\"namedQueries\", {\n keyPath: \"name\"\n });\n }(e);\n })), n < 12 && r >= 12 && (s = s.next(() => {\n !function __PRIVATE_createDocumentOverlayStore(e) {\n const t = e.createObjectStore(\"documentOverlays\", {\n keyPath: G\n });\n t.createIndex(\"collectionPathOverlayIndex\", z, {\n unique: !1\n }), t.createIndex(\"collectionGroupOverlayIndex\", j, {\n unique: !1\n });\n }(e);\n })), n < 13 && r >= 13 && (s = s.next(() => function __PRIVATE_createRemoteDocumentCache(e) {\n const t = e.createObjectStore(\"remoteDocumentsV14\", {\n keyPath: O\n });\n t.createIndex(\"documentKeyIndex\", N), t.createIndex(\"collectionGroupIndex\", B);\n }(e)).next(() => this.ri(e, i)).next(() => e.deleteObjectStore(\"remoteDocuments\"))), n < 14 && r >= 14 && (s = s.next(() => this.ii(e, i))), n < 15 && r >= 15 && (s = s.next(() => function __PRIVATE_createFieldIndex(e) {\n e.createObjectStore(\"indexConfiguration\", {\n keyPath: \"indexId\",\n autoIncrement: !0\n }).createIndex(\"collectionGroupIndex\", \"collectionGroup\", {\n unique: !1\n });\n e.createObjectStore(\"indexState\", {\n keyPath: K\n }).createIndex(\"sequenceNumberIndex\", $, {\n unique: !1\n });\n e.createObjectStore(\"indexEntries\", {\n keyPath: U\n }).createIndex(\"documentKeyIndex\", W, {\n unique: !1\n });\n }(e))), s;\n }\n Xr(e) {\n let t = 0;\n return e.store(\"remoteDocuments\").Y((e, n) => {\n t += __PRIVATE_dbDocumentSize(n);\n }).next(() => {\n const n = {\n byteSize: t\n };\n return e.store(\"remoteDocumentGlobal\").put(\"remoteDocumentGlobalKey\", n);\n });\n }\n Zr(e) {\n const t = e.store(\"mutationQueues\"),\n n = e.store(\"mutations\");\n return t.W().next(t => PersistencePromise.forEach(t, t => {\n const r = IDBKeyRange.bound([t.userId, -1], [t.userId, t.lastAcknowledgedBatchId]);\n return n.W(\"userMutationsIndex\", r).next(n => PersistencePromise.forEach(n, n => {\n __PRIVATE_hardAssert(n.userId === t.userId);\n const r = __PRIVATE_fromDbMutationBatch(this.serializer, n);\n return removeMutationBatch(e, t.userId, r).next(() => {});\n }));\n }));\n }\n /**\n * Ensures that every document in the remote document cache has a corresponding sentinel row\n * with a sequence number. Missing rows are given the most recently used sequence number.\n */\n ei(e) {\n const t = e.store(\"targetDocuments\"),\n n = e.store(\"remoteDocuments\");\n return e.store(\"targetGlobal\").get(\"targetGlobalKey\").next(e => {\n const r = [];\n return n.Y((n, i) => {\n const s = new ResourcePath(n),\n o = function __PRIVATE_sentinelKey(e) {\n return [0, __PRIVATE_encodeResourcePath(e)];\n }(s);\n r.push(t.get(o).next(n => n ? PersistencePromise.resolve() : (n => t.put({\n targetId: 0,\n path: __PRIVATE_encodeResourcePath(n),\n sequenceNumber: e.highestListenSequenceNumber\n }))(s)));\n }).next(() => PersistencePromise.waitFor(r));\n });\n }\n ti(e, t) {\n // Create the index.\n e.createObjectStore(\"collectionParents\", {\n keyPath: Q\n });\n const n = t.store(\"collectionParents\"),\n r = new __PRIVATE_MemoryCollectionParentIndex(),\n addEntry = e => {\n if (r.add(e)) {\n const t = e.lastSegment(),\n r = e.popLast();\n return n.put({\n collectionId: t,\n parent: __PRIVATE_encodeResourcePath(r)\n });\n }\n };\n // Helper to add an index entry iff we haven't already written it.\n // Index existing remote documents.\n return t.store(\"remoteDocuments\").Y({\n J: !0\n }, (e, t) => {\n const n = new ResourcePath(e);\n return addEntry(n.popLast());\n }).next(() => t.store(\"documentMutations\").Y({\n J: !0\n }, ([e, t, n], r) => {\n const i = __PRIVATE_decodeResourcePath(t);\n return addEntry(i.popLast());\n }));\n }\n ni(e) {\n const t = e.store(\"targets\");\n return t.Y((e, n) => {\n const r = __PRIVATE_fromDbTarget(n),\n i = __PRIVATE_toDbTarget(this.serializer, r);\n return t.put(i);\n });\n }\n ri(e, t) {\n const n = t.store(\"remoteDocuments\"),\n r = [];\n return n.Y((e, n) => {\n const i = t.store(\"remoteDocumentsV14\"),\n s = function __PRIVATE_extractKey(e) {\n return e.document ? new DocumentKey(ResourcePath.fromString(e.document.name).popFirst(5)) : e.noDocument ? DocumentKey.fromSegments(e.noDocument.path) : e.unknownDocument ? DocumentKey.fromSegments(e.unknownDocument.path) : fail();\n }\n /**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */(n).path.toArray(),\n o = {\n prefixPath: s.slice(0, s.length - 2),\n collectionGroup: s[s.length - 2],\n documentId: s[s.length - 1],\n readTime: n.readTime || [0, 0],\n unknownDocument: n.unknownDocument,\n noDocument: n.noDocument,\n document: n.document,\n hasCommittedMutations: !!n.hasCommittedMutations\n };\n r.push(i.put(o));\n }).next(() => PersistencePromise.waitFor(r));\n }\n ii(e, t) {\n const n = t.store(\"mutations\"),\n r = __PRIVATE_newIndexedDbRemoteDocumentCache(this.serializer),\n i = new __PRIVATE_MemoryPersistence(__PRIVATE_MemoryEagerDelegate.jr, this.serializer.ut);\n return n.W().next(e => {\n const n = new Map();\n return e.forEach(e => {\n var t;\n let r = null !== (t = n.get(e.userId)) && void 0 !== t ? t : __PRIVATE_documentKeySet();\n __PRIVATE_fromDbMutationBatch(this.serializer, e).keys().forEach(e => r = r.add(e)), n.set(e.userId, r);\n }), PersistencePromise.forEach(n, (e, n) => {\n const s = new User(n),\n o = __PRIVATE_IndexedDbDocumentOverlayCache.ct(this.serializer, s),\n _ = i.getIndexManager(s),\n a = __PRIVATE_IndexedDbMutationQueue.ct(s, this.serializer, _, i.referenceDelegate);\n return new LocalDocumentsView(r, a, o, _).recalculateAndSaveOverlaysForDocumentKeys(new __PRIVATE_IndexedDbTransaction(t, __PRIVATE_ListenSequence._e), e).next();\n });\n });\n }\n}\nfunction __PRIVATE_createQueryCache(e) {\n e.createObjectStore(\"targetDocuments\", {\n keyPath: k\n }).createIndex(\"documentTargetsIndex\", q, {\n unique: !0\n });\n // NOTE: This is unique only because the TargetId is the suffix.\n e.createObjectStore(\"targets\", {\n keyPath: \"targetId\"\n }).createIndex(\"queryTargetsIndex\", L, {\n unique: !0\n }), e.createObjectStore(\"targetGlobal\");\n}\nconst de = \"Failed to obtain exclusive access to the persistence layer. To allow shared access, multi-tab synchronization has to be enabled in all tabs. If you are using `experimentalForceOwningTab:true`, make sure that only one tab has persistence enabled at any given time.\";\n\n/**\n * Oldest acceptable age in milliseconds for client metadata before the client\n * is considered inactive and its associated data is garbage collected.\n */\n/**\n * An IndexedDB-backed instance of Persistence. Data is stored persistently\n * across sessions.\n *\n * On Web only, the Firestore SDKs support shared access to its persistence\n * layer. This allows multiple browser tabs to read and write to IndexedDb and\n * to synchronize state even without network connectivity. Shared access is\n * currently optional and not enabled unless all clients invoke\n * `enablePersistence()` with `{synchronizeTabs:true}`.\n *\n * In multi-tab mode, if multiple clients are active at the same time, the SDK\n * will designate one client as the “primary client”. An effort is made to pick\n * a visible, network-connected and active client, and this client is\n * responsible for letting other clients know about its presence. The primary\n * client writes a unique client-generated identifier (the client ID) to\n * IndexedDb’s “owner” store every 4 seconds. If the primary client fails to\n * update this entry, another client can acquire the lease and take over as\n * primary.\n *\n * Some persistence operations in the SDK are designated as primary-client only\n * operations. This includes the acknowledgment of mutations and all updates of\n * remote documents. The effects of these operations are written to persistence\n * and then broadcast to other tabs via LocalStorage (see\n * `WebStorageSharedClientState`), which then refresh their state from\n * persistence.\n *\n * Similarly, the primary client listens to notifications sent by secondary\n * clients to discover persistence changes written by secondary clients, such as\n * the addition of new mutations and query targets.\n *\n * If multi-tab is not enabled and another tab already obtained the primary\n * lease, IndexedDbPersistence enters a failed state and all subsequent\n * operations will automatically fail.\n *\n * Additionally, there is an optimization so that when a tab is closed, the\n * primary lease is released immediately (this is especially important to make\n * sure that a refreshed tab is able to immediately re-acquire the primary\n * lease). Unfortunately, IndexedDB cannot be reliably used in window.unload\n * since it is an asynchronous API. So in addition to attempting to give up the\n * lease, the leaseholder writes its client ID to a \"zombiedClient\" entry in\n * LocalStorage which acts as an indicator that another tab should go ahead and\n * take the primary lease immediately regardless of the current lease timestamp.\n *\n * TODO(b/114226234): Remove `synchronizeTabs` section when multi-tab is no\n * longer optional.\n */\nclass __PRIVATE_IndexedDbPersistence {\n constructor(\n /**\n * Whether to synchronize the in-memory state of multiple tabs and share\n * access to local persistence.\n */\n e, t, n, r, i, s, o, _, a,\n /**\n * If set to true, forcefully obtains database access. Existing tabs will\n * no longer be able to access IndexedDB.\n */\n u, c = 15) {\n if (this.allowTabSynchronization = e, this.persistenceKey = t, this.clientId = n, this.si = i, this.window = s, this.document = o, this.oi = a, this._i = u, this.ai = c, this.Lr = null, this.kr = !1, this.isPrimary = !1, this.networkEnabled = !0, /** Our window.unload handler, if registered. */\n this.ui = null, this.inForeground = !1, /** Our 'visibilitychange' listener if registered. */\n this.ci = null, /** The client metadata refresh task. */\n this.li = null, /** The last time we garbage collected the client metadata object store. */\n this.hi = Number.NEGATIVE_INFINITY, /** A listener to notify on primary state changes. */\n this.Pi = e => Promise.resolve(), !__PRIVATE_IndexedDbPersistence.D()) throw new FirestoreError(D.UNIMPLEMENTED, \"This platform is either missing IndexedDB or is known to have an incomplete implementation. Offline persistence has been disabled.\");\n this.referenceDelegate = new __PRIVATE_IndexedDbLruDelegateImpl(this, r), this.Ii = t + \"main\", this.serializer = new __PRIVATE_LocalSerializer(_), this.Ti = new __PRIVATE_SimpleDb(this.Ii, this.ai, new __PRIVATE_SchemaConverter(this.serializer)), this.qr = new __PRIVATE_IndexedDbTargetCache(this.referenceDelegate, this.serializer), this.remoteDocumentCache = __PRIVATE_newIndexedDbRemoteDocumentCache(this.serializer), this.Kr = new __PRIVATE_IndexedDbBundleCache(), this.window && this.window.localStorage ? this.Ei = this.window.localStorage : (this.Ei = null, !1 === u && __PRIVATE_logError(\"IndexedDbPersistence\", \"LocalStorage is unavailable. As a result, persistence may not work reliably. In particular enablePersistence() could fail immediately after refreshing the page.\"));\n }\n /**\n * Attempt to start IndexedDb persistence.\n *\n * @returns Whether persistence was enabled.\n */\n start() {\n // NOTE: This is expected to fail sometimes (in the case of another tab\n // already having the persistence lock), so it's the first thing we should\n // do.\n return this.di().then(() => {\n if (!this.isPrimary && !this.allowTabSynchronization)\n // Fail `start()` if `synchronizeTabs` is disabled and we cannot\n // obtain the primary lease.\n throw new FirestoreError(D.FAILED_PRECONDITION, de);\n return this.Ai(), this.Ri(), this.Vi(), this.runTransaction(\"getHighestListenSequenceNumber\", \"readonly\", e => this.qr.getHighestSequenceNumber(e));\n }).then(e => {\n this.Lr = new __PRIVATE_ListenSequence(e, this.oi);\n }).then(() => {\n this.kr = !0;\n }).catch(e => (this.Ti && this.Ti.close(), Promise.reject(e)));\n }\n /**\n * Registers a listener that gets called when the primary state of the\n * instance changes. Upon registering, this listener is invoked immediately\n * with the current primary state.\n *\n * PORTING NOTE: This is only used for Web multi-tab.\n */\n mi(e) {\n return this.Pi = async t => {\n if (this.started) return e(t);\n }, e(this.isPrimary);\n }\n /**\n * Registers a listener that gets called when the database receives a\n * version change event indicating that it has deleted.\n *\n * PORTING NOTE: This is only used for Web multi-tab.\n */\n setDatabaseDeletedListener(e) {\n this.Ti.L(async t => {\n // Check if an attempt is made to delete IndexedDB.\n null === t.newVersion && (await e());\n });\n }\n /**\n * Adjusts the current network state in the client's metadata, potentially\n * affecting the primary lease.\n *\n * PORTING NOTE: This is only used for Web multi-tab.\n */\n setNetworkEnabled(e) {\n this.networkEnabled !== e && (this.networkEnabled = e,\n // Schedule a primary lease refresh for immediate execution. The eventual\n // lease update will be propagated via `primaryStateListener`.\n this.si.enqueueAndForget(async () => {\n this.started && (await this.di());\n }));\n }\n /**\n * Updates the client metadata in IndexedDb and attempts to either obtain or\n * extend the primary lease for the local client. Asynchronously notifies the\n * primary state listener if the client either newly obtained or released its\n * primary lease.\n */\n di() {\n return this.runTransaction(\"updateClientMetadataAndTryBecomePrimary\", \"readwrite\", e => __PRIVATE_clientMetadataStore(e).put({\n clientId: this.clientId,\n updateTimeMs: Date.now(),\n networkEnabled: this.networkEnabled,\n inForeground: this.inForeground\n }).next(() => {\n if (this.isPrimary) return this.fi(e).next(e => {\n e || (this.isPrimary = !1, this.si.enqueueRetryable(() => this.Pi(!1)));\n });\n }).next(() => this.gi(e)).next(t => this.isPrimary && !t ? this.pi(e).next(() => !1) : !!t && this.yi(e).next(() => !0))).catch(e => {\n if (__PRIVATE_isIndexedDbTransactionError(e))\n // Proceed with the existing state. Any subsequent access to\n // IndexedDB will verify the lease.\n return __PRIVATE_logDebug(\"IndexedDbPersistence\", \"Failed to extend owner lease: \", e), this.isPrimary;\n if (!this.allowTabSynchronization) throw e;\n return __PRIVATE_logDebug(\"IndexedDbPersistence\", \"Releasing owner lease after error during lease refresh\", e), /* isPrimary= */!1;\n }).then(e => {\n this.isPrimary !== e && this.si.enqueueRetryable(() => this.Pi(e)), this.isPrimary = e;\n });\n }\n fi(e) {\n return __PRIVATE_primaryClientStore(e).get(\"owner\").next(e => PersistencePromise.resolve(this.wi(e)));\n }\n Si(e) {\n return __PRIVATE_clientMetadataStore(e).delete(this.clientId);\n }\n /**\n * If the garbage collection threshold has passed, prunes the\n * RemoteDocumentChanges and the ClientMetadata store based on the last update\n * time of all clients.\n */\n async bi() {\n if (this.isPrimary && !this.Di(this.hi, 18e5)) {\n this.hi = Date.now();\n const e = await this.runTransaction(\"maybeGarbageCollectMultiClientState\", \"readwrite-primary\", e => {\n const t = __PRIVATE_getStore(e, \"clientMetadata\");\n return t.W().next(e => {\n const n = this.Ci(e, 18e5),\n r = e.filter(e => -1 === n.indexOf(e));\n // Delete metadata for clients that are no longer considered active.\n return PersistencePromise.forEach(r, e => t.delete(e.clientId)).next(() => r);\n });\n }).catch(() => []);\n // Delete potential leftover entries that may continue to mark the\n // inactive clients as zombied in LocalStorage.\n // Ideally we'd delete the IndexedDb and LocalStorage zombie entries for\n // the client atomically, but we can't. So we opt to delete the IndexedDb\n // entries first to avoid potentially reviving a zombied client.\n if (this.Ei) for (const t of e) this.Ei.removeItem(this.vi(t.clientId));\n }\n }\n /**\n * Schedules a recurring timer to update the client metadata and to either\n * extend or acquire the primary lease if the client is eligible.\n */\n Vi() {\n this.li = this.si.enqueueAfterDelay(\"client_metadata_refresh\" /* TimerId.ClientMetadataRefresh */, 4e3, () => this.di().then(() => this.bi()).then(() => this.Vi()));\n }\n /** Checks whether `client` is the local client. */\n wi(e) {\n return !!e && e.ownerId === this.clientId;\n }\n /**\n * Evaluate the state of all active clients and determine whether the local\n * client is or can act as the holder of the primary lease. Returns whether\n * the client is eligible for the lease, but does not actually acquire it.\n * May return 'false' even if there is no active leaseholder and another\n * (foreground) client should become leaseholder instead.\n */\n gi(e) {\n if (this._i) return PersistencePromise.resolve(!0);\n return __PRIVATE_primaryClientStore(e).get(\"owner\").next(t => {\n // A client is eligible for the primary lease if:\n // - its network is enabled and the client's tab is in the foreground.\n // - its network is enabled and no other client's tab is in the\n // foreground.\n // - every clients network is disabled and the client's tab is in the\n // foreground.\n // - every clients network is disabled and no other client's tab is in\n // the foreground.\n // - the `forceOwningTab` setting was passed in.\n if (null !== t && this.Di(t.leaseTimestampMs, 5e3) && !this.Fi(t.ownerId)) {\n if (this.wi(t) && this.networkEnabled) return !0;\n if (!this.wi(t)) {\n if (!t.allowTabSynchronization)\n // Fail the `canActAsPrimary` check if the current leaseholder has\n // not opted into multi-tab synchronization. If this happens at\n // client startup, we reject the Promise returned by\n // `enablePersistence()` and the user can continue to use Firestore\n // with in-memory persistence.\n // If this fails during a lease refresh, we will instead block the\n // AsyncQueue from executing further operations. Note that this is\n // acceptable since mixing & matching different `synchronizeTabs`\n // settings is not supported.\n // TODO(b/114226234): Remove this check when `synchronizeTabs` can\n // no longer be turned off.\n throw new FirestoreError(D.FAILED_PRECONDITION, de);\n return !1;\n }\n }\n return !(!this.networkEnabled || !this.inForeground) || __PRIVATE_clientMetadataStore(e).W().next(e => void 0 === this.Ci(e, 5e3).find(e => {\n if (this.clientId !== e.clientId) {\n const t = !this.networkEnabled && e.networkEnabled,\n n = !this.inForeground && e.inForeground,\n r = this.networkEnabled === e.networkEnabled;\n if (t || n && r) return !0;\n }\n return !1;\n }));\n }).next(e => (this.isPrimary !== e && __PRIVATE_logDebug(\"IndexedDbPersistence\", `Client ${e ? \"is\" : \"is not\"} eligible for a primary lease.`), e));\n }\n async shutdown() {\n // The shutdown() operations are idempotent and can be called even when\n // start() aborted (e.g. because it couldn't acquire the persistence lease).\n this.kr = !1, this.Mi(), this.li && (this.li.cancel(), this.li = null), this.xi(), this.Oi(),\n // Use `SimpleDb.runTransaction` directly to avoid failing if another tab\n // has obtained the primary lease.\n await this.Ti.runTransaction(\"shutdown\", \"readwrite\", [\"owner\", \"clientMetadata\"], e => {\n const t = new __PRIVATE_IndexedDbTransaction(e, __PRIVATE_ListenSequence._e);\n return this.pi(t).next(() => this.Si(t));\n }), this.Ti.close(),\n // Remove the entry marking the client as zombied from LocalStorage since\n // we successfully deleted its metadata from IndexedDb.\n this.Ni();\n }\n /**\n * Returns clients that are not zombied and have an updateTime within the\n * provided threshold.\n */\n Ci(e, t) {\n return e.filter(e => this.Di(e.updateTimeMs, t) && !this.Fi(e.clientId));\n }\n /**\n * Returns the IDs of the clients that are currently active. If multi-tab\n * is not supported, returns an array that only contains the local client's\n * ID.\n *\n * PORTING NOTE: This is only used for Web multi-tab.\n */\n Bi() {\n return this.runTransaction(\"getActiveClients\", \"readonly\", e => __PRIVATE_clientMetadataStore(e).W().next(e => this.Ci(e, 18e5).map(e => e.clientId)));\n }\n get started() {\n return this.kr;\n }\n getMutationQueue(e, t) {\n return __PRIVATE_IndexedDbMutationQueue.ct(e, this.serializer, t, this.referenceDelegate);\n }\n getTargetCache() {\n return this.qr;\n }\n getRemoteDocumentCache() {\n return this.remoteDocumentCache;\n }\n getIndexManager(e) {\n return new __PRIVATE_IndexedDbIndexManager(e, this.serializer.ut.databaseId);\n }\n getDocumentOverlayCache(e) {\n return __PRIVATE_IndexedDbDocumentOverlayCache.ct(this.serializer, e);\n }\n getBundleCache() {\n return this.Kr;\n }\n runTransaction(e, t, n) {\n __PRIVATE_logDebug(\"IndexedDbPersistence\", \"Starting transaction:\", e);\n const r = \"readonly\" === t ? \"readonly\" : \"readwrite\",\n i = /** Returns the object stores for the provided schema. */\n function __PRIVATE_getObjectStores(e) {\n return 15 === e ? X : 14 === e ? Z : 13 === e ? Y : 12 === e ? J : 11 === e ? H : void fail();\n }(this.ai);\n let s;\n // Do all transactions as readwrite against all object stores, since we\n // are the only reader/writer.\n return this.Ti.runTransaction(e, r, i, r => (s = new __PRIVATE_IndexedDbTransaction(r, this.Lr ? this.Lr.next() : __PRIVATE_ListenSequence._e), \"readwrite-primary\" === t ? this.fi(s).next(e => !!e || this.gi(s)).next(t => {\n if (!t) throw __PRIVATE_logError(`Failed to obtain primary lease for action '${e}'.`), this.isPrimary = !1, this.si.enqueueRetryable(() => this.Pi(!1)), new FirestoreError(D.FAILED_PRECONDITION, v);\n return n(s);\n }).next(e => this.yi(s).next(() => e)) : this.Li(s).next(() => n(s)))).then(e => (s.raiseOnCommittedEvent(), e));\n }\n /**\n * Verifies that the current tab is the primary leaseholder or alternatively\n * that the leaseholder has opted into multi-tab synchronization.\n */\n // TODO(b/114226234): Remove this check when `synchronizeTabs` can no longer\n // be turned off.\n Li(e) {\n return __PRIVATE_primaryClientStore(e).get(\"owner\").next(e => {\n if (null !== e && this.Di(e.leaseTimestampMs, 5e3) && !this.Fi(e.ownerId) && !this.wi(e) && !(this._i || this.allowTabSynchronization && e.allowTabSynchronization)) throw new FirestoreError(D.FAILED_PRECONDITION, de);\n });\n }\n /**\n * Obtains or extends the new primary lease for the local client. This\n * method does not verify that the client is eligible for this lease.\n */\n yi(e) {\n const t = {\n ownerId: this.clientId,\n allowTabSynchronization: this.allowTabSynchronization,\n leaseTimestampMs: Date.now()\n };\n return __PRIVATE_primaryClientStore(e).put(\"owner\", t);\n }\n static D() {\n return __PRIVATE_SimpleDb.D();\n }\n /** Checks the primary lease and removes it if we are the current primary. */\n pi(e) {\n const t = __PRIVATE_primaryClientStore(e);\n return t.get(\"owner\").next(e => this.wi(e) ? (__PRIVATE_logDebug(\"IndexedDbPersistence\", \"Releasing primary lease.\"), t.delete(\"owner\")) : PersistencePromise.resolve());\n }\n /** Verifies that `updateTimeMs` is within `maxAgeMs`. */\n Di(e, t) {\n const n = Date.now();\n return !(e < n - t) && (!(e > n) || (__PRIVATE_logError(`Detected an update time that is in the future: ${e} > ${n}`), !1));\n }\n Ai() {\n null !== this.document && \"function\" == typeof this.document.addEventListener && (this.ci = () => {\n this.si.enqueueAndForget(() => (this.inForeground = \"visible\" === this.document.visibilityState, this.di()));\n }, this.document.addEventListener(\"visibilitychange\", this.ci), this.inForeground = \"visible\" === this.document.visibilityState);\n }\n xi() {\n this.ci && (this.document.removeEventListener(\"visibilitychange\", this.ci), this.ci = null);\n }\n /**\n * Attaches a window.unload handler that will synchronously write our\n * clientId to a \"zombie client id\" location in LocalStorage. This can be used\n * by tabs trying to acquire the primary lease to determine that the lease\n * is no longer valid even if the timestamp is recent. This is particularly\n * important for the refresh case (so the tab correctly re-acquires the\n * primary lease). LocalStorage is used for this rather than IndexedDb because\n * it is a synchronous API and so can be used reliably from an unload\n * handler.\n */\n Ri() {\n var e;\n \"function\" == typeof (null === (e = this.window) || void 0 === e ? void 0 : e.addEventListener) && (this.ui = () => {\n // Note: In theory, this should be scheduled on the AsyncQueue since it\n // accesses internal state. We execute this code directly during shutdown\n // to make sure it gets a chance to run.\n this.Mi();\n const e = /(?:Version|Mobile)\\/1[456]/;\n isSafari() && (navigator.appVersion.match(e) || navigator.userAgent.match(e)) &&\n // On Safari 14, 15, and 16, we do not run any cleanup actions as it might\n // trigger a bug that prevents Safari from re-opening IndexedDB during\n // the next page load.\n // See https://bugs.webkit.org/show_bug.cgi?id=226547\n this.si.enterRestrictedMode( /* purgeExistingTasks= */!0), this.si.enqueueAndForget(() => this.shutdown());\n }, this.window.addEventListener(\"pagehide\", this.ui));\n }\n Oi() {\n this.ui && (this.window.removeEventListener(\"pagehide\", this.ui), this.ui = null);\n }\n /**\n * Returns whether a client is \"zombied\" based on its LocalStorage entry.\n * Clients become zombied when their tab closes without running all of the\n * cleanup logic in `shutdown()`.\n */\n Fi(e) {\n var t;\n try {\n const n = null !== (null === (t = this.Ei) || void 0 === t ? void 0 : t.getItem(this.vi(e)));\n return __PRIVATE_logDebug(\"IndexedDbPersistence\", `Client '${e}' ${n ? \"is\" : \"is not\"} zombied in LocalStorage`), n;\n } catch (e) {\n // Gracefully handle if LocalStorage isn't working.\n return __PRIVATE_logError(\"IndexedDbPersistence\", \"Failed to get zombied client id.\", e), !1;\n }\n }\n /**\n * Record client as zombied (a client that had its tab closed). Zombied\n * clients are ignored during primary tab selection.\n */\n Mi() {\n if (this.Ei) try {\n this.Ei.setItem(this.vi(this.clientId), String(Date.now()));\n } catch (e) {\n // Gracefully handle if LocalStorage isn't available / working.\n __PRIVATE_logError(\"Failed to set zombie client id.\", e);\n }\n }\n /** Removes the zombied client entry if it exists. */\n Ni() {\n if (this.Ei) try {\n this.Ei.removeItem(this.vi(this.clientId));\n } catch (e) {\n // Ignore\n }\n }\n vi(e) {\n return `firestore_zombie_${this.persistenceKey}_${e}`;\n }\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the primary client object store.\n */\nfunction __PRIVATE_primaryClientStore(e) {\n return __PRIVATE_getStore(e, \"owner\");\n}\n\n/**\n * Helper to get a typed SimpleDbStore for the client metadata object store.\n */\nfunction __PRIVATE_clientMetadataStore(e) {\n return __PRIVATE_getStore(e, \"clientMetadata\");\n}\n\n/**\n * Generates a string used as a prefix when storing data in IndexedDB and\n * LocalStorage.\n */\nfunction __PRIVATE_indexedDbStoragePrefix(e, t) {\n // Use two different prefix formats:\n // * firestore / persistenceKey / projectID . databaseID / ...\n // * firestore / persistenceKey / projectID / ...\n // projectIDs are DNS-compatible names and cannot contain dots\n // so there's no danger of collisions.\n let n = e.projectId;\n return e.isDefaultDatabase || (n += \".\" + e.database), \"firestore/\" + t + \"/\" + n + \"/\";\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A set of changes to what documents are currently in view and out of view for\n * a given query. These changes are sent to the LocalStore by the View (via\n * the SyncEngine) and are used to pin / unpin documents as appropriate.\n */\nclass __PRIVATE_LocalViewChanges {\n constructor(e, t, n, r) {\n this.targetId = e, this.fromCache = t, this.ki = n, this.qi = r;\n }\n static Qi(e, t) {\n let n = __PRIVATE_documentKeySet(),\n r = __PRIVATE_documentKeySet();\n for (const e of t.docChanges) switch (e.type) {\n case 0 /* ChangeType.Added */:\n n = n.add(e.doc.key);\n break;\n case 1 /* ChangeType.Removed */:\n r = r.add(e.doc.key);\n // do nothing\n }\n return new __PRIVATE_LocalViewChanges(e, t.fromCache, n, r);\n }\n}\n\n/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A tracker to keep a record of important details during database local query\n * execution.\n */\nclass QueryContext {\n constructor() {\n /**\n * Counts the number of documents passed through during local query execution.\n */\n this._documentReadCount = 0;\n }\n get documentReadCount() {\n return this._documentReadCount;\n }\n incrementDocumentReadCount(e) {\n this._documentReadCount += e;\n }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The Firestore query engine.\n *\n * Firestore queries can be executed in three modes. The Query Engine determines\n * what mode to use based on what data is persisted. The mode only determines\n * the runtime complexity of the query - the result set is equivalent across all\n * implementations.\n *\n * The Query engine will use indexed-based execution if a user has configured\n * any index that can be used to execute query (via `setIndexConfiguration()`).\n * Otherwise, the engine will try to optimize the query by re-using a previously\n * persisted query result. If that is not possible, the query will be executed\n * via a full collection scan.\n *\n * Index-based execution is the default when available. The query engine\n * supports partial indexed execution and merges the result from the index\n * lookup with documents that have not yet been indexed. The index evaluation\n * matches the backend's format and as such, the SDK can use indexing for all\n * queries that the backend supports.\n *\n * If no index exists, the query engine tries to take advantage of the target\n * document mapping in the TargetCache. These mappings exists for all queries\n * that have been synced with the backend at least once and allow the query\n * engine to only read documents that previously matched a query plus any\n * documents that were edited after the query was last listened to.\n *\n * There are some cases when this optimization is not guaranteed to produce\n * the same results as full collection scans. In these cases, query\n * processing falls back to full scans. These cases are:\n *\n * - Limit queries where a document that matched the query previously no longer\n * matches the query.\n *\n * - Limit queries where a document edit may cause the document to sort below\n * another document that is in the local cache.\n *\n * - Queries that have never been CURRENT or free of limbo documents.\n */\nclass __PRIVATE_QueryEngine {\n constructor() {\n this.Ki = !1, this.$i = !1,\n /**\n * SDK only decides whether it should create index when collection size is\n * larger than this.\n */\n this.Ui = 100, this.Wi = 8;\n }\n /** Sets the document view to query against. */\n initialize(e, t) {\n this.Gi = e, this.indexManager = t, this.Ki = !0;\n }\n /** Returns all local documents matching the specified query. */\n getDocumentsMatchingQuery(e, t, n, r) {\n // Stores the result from executing the query; using this object is more\n // convenient than passing the result between steps of the persistence\n // transaction and improves readability comparatively.\n const i = {\n result: null\n };\n return this.zi(e, t).next(e => {\n i.result = e;\n }).next(() => {\n if (!i.result) return this.ji(e, t, r, n).next(e => {\n i.result = e;\n });\n }).next(() => {\n if (i.result) return;\n const n = new QueryContext();\n return this.Hi(e, t, n).next(r => {\n if (i.result = r, this.$i) return this.Ji(e, t, n, r.size);\n });\n }).next(() => i.result);\n }\n Ji(e, t, n, r) {\n return n.documentReadCount < this.Ui ? (__PRIVATE_getLogLevel() <= LogLevel.DEBUG && __PRIVATE_logDebug(\"QueryEngine\", \"SDK will not create cache indexes for query:\", __PRIVATE_stringifyQuery(t), \"since it only creates cache indexes for collection contains\", \"more than or equal to\", this.Ui, \"documents\"), PersistencePromise.resolve()) : (__PRIVATE_getLogLevel() <= LogLevel.DEBUG && __PRIVATE_logDebug(\"QueryEngine\", \"Query:\", __PRIVATE_stringifyQuery(t), \"scans\", n.documentReadCount, \"local documents and returns\", r, \"documents as results.\"), n.documentReadCount > this.Wi * r ? (__PRIVATE_getLogLevel() <= LogLevel.DEBUG && __PRIVATE_logDebug(\"QueryEngine\", \"The SDK decides to create cache indexes for query:\", __PRIVATE_stringifyQuery(t), \"as using cache indexes may help improve performance.\"), this.indexManager.createTargetIndexes(e, __PRIVATE_queryToTarget(t))) : PersistencePromise.resolve());\n }\n /**\n * Performs an indexed query that evaluates the query based on a collection's\n * persisted index values. Returns `null` if an index is not available.\n */\n zi(e, t) {\n if (__PRIVATE_queryMatchesAllDocuments(t))\n // Queries that match all documents don't benefit from using\n // key-based lookups. It is more efficient to scan all documents in a\n // collection, rather than to perform individual lookups.\n return PersistencePromise.resolve(null);\n let n = __PRIVATE_queryToTarget(t);\n return this.indexManager.getIndexType(e, n).next(r => 0 /* IndexType.NONE */ === r ? null : (null !== t.limit && 1 /* IndexType.PARTIAL */ === r && (\n // We cannot apply a limit for targets that are served using a partial\n // index. If a partial index will be used to serve the target, the\n // query may return a superset of documents that match the target\n // (e.g. if the index doesn't include all the target's filters), or\n // may return the correct set of documents in the wrong order (e.g. if\n // the index doesn't include a segment for one of the orderBys).\n // Therefore, a limit should not be applied in such cases.\n t = __PRIVATE_queryWithLimit(t, null, \"F\" /* LimitType.First */), n = __PRIVATE_queryToTarget(t)), this.indexManager.getDocumentsMatchingTarget(e, n).next(r => {\n const i = __PRIVATE_documentKeySet(...r);\n return this.Gi.getDocuments(e, i).next(r => this.indexManager.getMinOffset(e, n).next(n => {\n const s = this.Yi(t, r);\n return this.Zi(t, s, i, n.readTime) ? this.zi(e, __PRIVATE_queryWithLimit(t, null, \"F\" /* LimitType.First */)) : this.Xi(e, s, t, n);\n }));\n })));\n }\n /**\n * Performs a query based on the target's persisted query mapping. Returns\n * `null` if the mapping is not available or cannot be used.\n */\n ji(e, t, n, r) {\n return __PRIVATE_queryMatchesAllDocuments(t) || r.isEqual(SnapshotVersion.min()) ? PersistencePromise.resolve(null) : this.Gi.getDocuments(e, n).next(i => {\n const s = this.Yi(t, i);\n return this.Zi(t, s, n, r) ? PersistencePromise.resolve(null) : (__PRIVATE_getLogLevel() <= LogLevel.DEBUG && __PRIVATE_logDebug(\"QueryEngine\", \"Re-using previous result from %s to execute query: %s\", r.toString(), __PRIVATE_stringifyQuery(t)), this.Xi(e, s, t, __PRIVATE_newIndexOffsetSuccessorFromReadTime(r, -1)).next(e => e));\n });\n // Queries that have never seen a snapshot without limbo free documents\n // should also be run as a full collection scan.\n }\n /** Applies the query filter and sorting to the provided documents. */\n Yi(e, t) {\n // Sort the documents and re-apply the query filter since previously\n // matching documents do not necessarily still match the query.\n let n = new SortedSet(__PRIVATE_newQueryComparator(e));\n return t.forEach((t, r) => {\n __PRIVATE_queryMatches(e, r) && (n = n.add(r));\n }), n;\n }\n /**\n * Determines if a limit query needs to be refilled from cache, making it\n * ineligible for index-free execution.\n *\n * @param query - The query.\n * @param sortedPreviousResults - The documents that matched the query when it\n * was last synchronized, sorted by the query's comparator.\n * @param remoteKeys - The document keys that matched the query at the last\n * snapshot.\n * @param limboFreeSnapshotVersion - The version of the snapshot when the\n * query was last synchronized.\n */\n Zi(e, t, n, r) {\n if (null === e.limit)\n // Queries without limits do not need to be refilled.\n return !1;\n if (n.size !== t.size)\n // The query needs to be refilled if a previously matching document no\n // longer matches.\n return !0;\n // Limit queries are not eligible for index-free query execution if there is\n // a potential that an older document from cache now sorts before a document\n // that was previously part of the limit. This, however, can only happen if\n // the document at the edge of the limit goes out of limit.\n // If a document that is not the limit boundary sorts differently,\n // the boundary of the limit itself did not change and documents from cache\n // will continue to be \"rejected\" by this boundary. Therefore, we can ignore\n // any modifications that don't affect the last document.\n const i = \"F\" /* LimitType.First */ === e.limitType ? t.last() : t.first();\n return !!i && (i.hasPendingWrites || i.version.compareTo(r) > 0);\n }\n Hi(e, t, n) {\n return __PRIVATE_getLogLevel() <= LogLevel.DEBUG && __PRIVATE_logDebug(\"QueryEngine\", \"Using full collection scan to execute query:\", __PRIVATE_stringifyQuery(t)), this.Gi.getDocumentsMatchingQuery(e, t, IndexOffset.min(), n);\n }\n /**\n * Combines the results from an indexed execution with the remaining documents\n * that have not yet been indexed.\n */\n Xi(e, t, n, r) {\n // Retrieve all results for documents that were updated since the offset.\n return this.Gi.getDocumentsMatchingQuery(e, n, r).next(e => (\n // Merge with existing results\n t.forEach(t => {\n e = e.insert(t.key, t);\n }), e));\n }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Implements `LocalStore` interface.\n *\n * Note: some field defined in this class might have public access level, but\n * the class is not exported so they are only accessible from this module.\n * This is useful to implement optional features (like bundles) in free\n * functions, such that they are tree-shakeable.\n */\nclass __PRIVATE_LocalStoreImpl {\n constructor( /** Manages our in-memory or durable persistence. */\n e, t, n, r) {\n this.persistence = e, this.es = t, this.serializer = r,\n /**\n * Maps a targetID to data about its target.\n *\n * PORTING NOTE: We are using an immutable data structure on Web to make re-runs\n * of `applyRemoteEvent()` idempotent.\n */\n this.ts = new SortedMap(__PRIVATE_primitiveComparator), /** Maps a target to its targetID. */\n // TODO(wuandy): Evaluate if TargetId can be part of Target.\n this.ns = new ObjectMap(e => __PRIVATE_canonifyTarget(e), __PRIVATE_targetEquals),\n /**\n * A per collection group index of the last read time processed by\n * `getNewDocumentChanges()`.\n *\n * PORTING NOTE: This is only used for multi-tab synchronization.\n */\n this.rs = new Map(), this.ss = e.getRemoteDocumentCache(), this.qr = e.getTargetCache(), this.Kr = e.getBundleCache(), this.os(n);\n }\n os(e) {\n // TODO(indexing): Add spec tests that test these components change after a\n // user change\n this.documentOverlayCache = this.persistence.getDocumentOverlayCache(e), this.indexManager = this.persistence.getIndexManager(e), this.mutationQueue = this.persistence.getMutationQueue(e, this.indexManager), this.localDocuments = new LocalDocumentsView(this.ss, this.mutationQueue, this.documentOverlayCache, this.indexManager), this.ss.setIndexManager(this.indexManager), this.es.initialize(this.localDocuments, this.indexManager);\n }\n collectGarbage(e) {\n return this.persistence.runTransaction(\"Collect garbage\", \"readwrite-primary\", t => e.collect(t, this.ts));\n }\n}\nfunction __PRIVATE_newLocalStore( /** Manages our in-memory or durable persistence. */\ne, t, n, r) {\n return new __PRIVATE_LocalStoreImpl(e, t, n, r);\n}\n\n/**\n * Tells the LocalStore that the currently authenticated user has changed.\n *\n * In response the local store switches the mutation queue to the new user and\n * returns any resulting document changes.\n */\n// PORTING NOTE: Android and iOS only return the documents affected by the\n// change.\nasync function __PRIVATE_localStoreHandleUserChange(e, t) {\n const n = __PRIVATE_debugCast(e);\n return await n.persistence.runTransaction(\"Handle user change\", \"readonly\", e => {\n // Swap out the mutation queue, grabbing the pending mutation batches\n // before and after.\n let r;\n return n.mutationQueue.getAllMutationBatches(e).next(i => (r = i, n.os(t), n.mutationQueue.getAllMutationBatches(e))).next(t => {\n const i = [],\n s = [];\n // Union the old/new changed keys.\n let o = __PRIVATE_documentKeySet();\n for (const e of r) {\n i.push(e.batchId);\n for (const t of e.mutations) o = o.add(t.key);\n }\n for (const e of t) {\n s.push(e.batchId);\n for (const t of e.mutations) o = o.add(t.key);\n }\n // Return the set of all (potentially) changed documents and the list\n // of mutation batch IDs that were affected by change.\n return n.localDocuments.getDocuments(e, o).next(e => ({\n _s: e,\n removedBatchIds: i,\n addedBatchIds: s\n }));\n });\n });\n}\n\n/* Accepts locally generated Mutations and commit them to storage. */\n/**\n * Acknowledges the given batch.\n *\n * On the happy path when a batch is acknowledged, the local store will\n *\n * + remove the batch from the mutation queue;\n * + apply the changes to the remote document cache;\n * + recalculate the latency compensated view implied by those changes (there\n * may be mutations in the queue that affect the documents but haven't been\n * acknowledged yet); and\n * + give the changed documents back the sync engine\n *\n * @returns The resulting (modified) documents.\n */\nfunction __PRIVATE_localStoreAcknowledgeBatch(e, t) {\n const n = __PRIVATE_debugCast(e);\n return n.persistence.runTransaction(\"Acknowledge batch\", \"readwrite-primary\", e => {\n const r = t.batch.keys(),\n i = n.ss.newChangeBuffer({\n trackRemovals: !0\n });\n return function __PRIVATE_applyWriteToRemoteDocuments(e, t, n, r) {\n const i = n.batch,\n s = i.keys();\n let o = PersistencePromise.resolve();\n return s.forEach(e => {\n o = o.next(() => r.getEntry(t, e)).next(t => {\n const s = n.docVersions.get(e);\n __PRIVATE_hardAssert(null !== s), t.version.compareTo(s) < 0 && (i.applyToRemoteDocument(t, n), t.isValidDocument() && (\n // We use the commitVersion as the readTime rather than the\n // document's updateTime since the updateTime is not advanced\n // for updates that do not modify the underlying document.\n t.setReadTime(n.commitVersion), r.addEntry(t)));\n });\n }), o.next(() => e.mutationQueue.removeMutationBatch(t, i));\n }\n /** Returns the local view of the documents affected by a mutation batch. */\n // PORTING NOTE: Multi-Tab only.\n (n, e, t, i).next(() => i.apply(e)).next(() => n.mutationQueue.performConsistencyCheck(e)).next(() => n.documentOverlayCache.removeOverlaysForBatchId(e, r, t.batch.batchId)).next(() => n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e, function __PRIVATE_getKeysWithTransformResults(e) {\n let t = __PRIVATE_documentKeySet();\n for (let n = 0; n < e.mutationResults.length; ++n) {\n e.mutationResults[n].transformResults.length > 0 && (t = t.add(e.batch.mutations[n].key));\n }\n return t;\n }\n /**\n * Removes mutations from the MutationQueue for the specified batch;\n * LocalDocuments will be recalculated.\n *\n * @returns The resulting modified documents.\n */(t))).next(() => n.localDocuments.getDocuments(e, r));\n });\n}\n\n/**\n * Returns the last consistent snapshot processed (used by the RemoteStore to\n * determine whether to buffer incoming snapshots from the backend).\n */\nfunction __PRIVATE_localStoreGetLastRemoteSnapshotVersion(e) {\n const t = __PRIVATE_debugCast(e);\n return t.persistence.runTransaction(\"Get last remote snapshot version\", \"readonly\", e => t.qr.getLastRemoteSnapshotVersion(e));\n}\n\n/**\n * Updates the \"ground-state\" (remote) documents. We assume that the remote\n * event reflects any write batches that have been acknowledged or rejected\n * (i.e. we do not re-apply local mutations to updates from this event).\n *\n * LocalDocuments are re-calculated if there are remaining mutations in the\n * queue.\n */\nfunction __PRIVATE_localStoreApplyRemoteEventToLocalCache(e, t) {\n const n = __PRIVATE_debugCast(e),\n r = t.snapshotVersion;\n let i = n.ts;\n return n.persistence.runTransaction(\"Apply remote event\", \"readwrite-primary\", e => {\n const s = n.ss.newChangeBuffer({\n trackRemovals: !0\n });\n // Reset newTargetDataByTargetMap in case this transaction gets re-run.\n i = n.ts;\n const o = [];\n t.targetChanges.forEach((s, _) => {\n const a = i.get(_);\n if (!a) return;\n // Only update the remote keys if the target is still active. This\n // ensures that we can persist the updated target data along with\n // the updated assignment.\n o.push(n.qr.removeMatchingKeys(e, s.removedDocuments, _).next(() => n.qr.addMatchingKeys(e, s.addedDocuments, _)));\n let u = a.withSequenceNumber(e.currentSequenceNumber);\n null !== t.targetMismatches.get(_) ? u = u.withResumeToken(ByteString.EMPTY_BYTE_STRING, SnapshotVersion.min()).withLastLimboFreeSnapshotVersion(SnapshotVersion.min()) : s.resumeToken.approximateByteSize() > 0 && (u = u.withResumeToken(s.resumeToken, r)), i = i.insert(_, u),\n // Update the target data if there are target changes (or if\n // sufficient time has passed since the last update).\n /**\n * Returns true if the newTargetData should be persisted during an update of\n * an active target. TargetData should always be persisted when a target is\n * being released and should not call this function.\n *\n * While the target is active, TargetData updates can be omitted when nothing\n * about the target has changed except metadata like the resume token or\n * snapshot version. Occasionally it's worth the extra write to prevent these\n * values from getting too stale after a crash, but this doesn't have to be\n * too frequent.\n */\n function __PRIVATE_shouldPersistTargetData(e, t, n) {\n // Always persist target data if we don't already have a resume token.\n if (0 === e.resumeToken.approximateByteSize()) return !0;\n // Don't allow resume token changes to be buffered indefinitely. This\n // allows us to be reasonably up-to-date after a crash and avoids needing\n // to loop over all active queries on shutdown. Especially in the browser\n // we may not get time to do anything interesting while the current tab is\n // closing.\n if (t.snapshotVersion.toMicroseconds() - e.snapshotVersion.toMicroseconds() >= 3e8) return !0;\n // Otherwise if the only thing that has changed about a target is its resume\n // token it's not worth persisting. Note that the RemoteStore keeps an\n // in-memory view of the currently active targets which includes the current\n // resume token, so stream failure or user changes will still use an\n // up-to-date resume token regardless of what we do here.\n return n.addedDocuments.size + n.modifiedDocuments.size + n.removedDocuments.size > 0;\n }\n /**\n * Notifies local store of the changed views to locally pin documents.\n */(a, u, s) && o.push(n.qr.updateTargetData(e, u));\n });\n let _ = __PRIVATE_mutableDocumentMap(),\n a = __PRIVATE_documentKeySet();\n // HACK: The only reason we allow a null snapshot version is so that we\n // can synthesize remote events when we get permission denied errors while\n // trying to resolve the state of a locally cached document that is in\n // limbo.\n if (t.documentUpdates.forEach(r => {\n t.resolvedLimboDocuments.has(r) && o.push(n.persistence.referenceDelegate.updateLimboDocument(e, r));\n }),\n // Each loop iteration only affects its \"own\" doc, so it's safe to get all\n // the remote documents in advance in a single call.\n o.push(__PRIVATE_populateDocumentChangeBuffer(e, s, t.documentUpdates).next(e => {\n _ = e.us, a = e.cs;\n })), !r.isEqual(SnapshotVersion.min())) {\n const t = n.qr.getLastRemoteSnapshotVersion(e).next(t => n.qr.setTargetsMetadata(e, e.currentSequenceNumber, r));\n o.push(t);\n }\n return PersistencePromise.waitFor(o).next(() => s.apply(e)).next(() => n.localDocuments.getLocalViewOfDocuments(e, _, a)).next(() => _);\n }).then(e => (n.ts = i, e));\n}\n\n/**\n * Populates document change buffer with documents from backend or a bundle.\n * Returns the document changes resulting from applying those documents, and\n * also a set of documents whose existence state are changed as a result.\n *\n * @param txn - Transaction to use to read existing documents from storage.\n * @param documentBuffer - Document buffer to collect the resulted changes to be\n * applied to storage.\n * @param documents - Documents to be applied.\n */\nfunction __PRIVATE_populateDocumentChangeBuffer(e, t, n) {\n let r = __PRIVATE_documentKeySet(),\n i = __PRIVATE_documentKeySet();\n return n.forEach(e => r = r.add(e)), t.getEntries(e, r).next(e => {\n let r = __PRIVATE_mutableDocumentMap();\n return n.forEach((n, s) => {\n const o = e.get(n);\n // Check if see if there is a existence state change for this document.\n s.isFoundDocument() !== o.isFoundDocument() && (i = i.add(n)),\n // Note: The order of the steps below is important, since we want\n // to ensure that rejected limbo resolutions (which fabricate\n // NoDocuments with SnapshotVersion.min()) never add documents to\n // cache.\n s.isNoDocument() && s.version.isEqual(SnapshotVersion.min()) ? (\n // NoDocuments with SnapshotVersion.min() are used in manufactured\n // events. We remove these documents from cache since we lost\n // access.\n t.removeEntry(n, s.readTime), r = r.insert(n, s)) : !o.isValidDocument() || s.version.compareTo(o.version) > 0 || 0 === s.version.compareTo(o.version) && o.hasPendingWrites ? (t.addEntry(s), r = r.insert(n, s)) : __PRIVATE_logDebug(\"LocalStore\", \"Ignoring outdated watch update for \", n, \". Current version:\", o.version, \" Watch version:\", s.version);\n }), {\n us: r,\n cs: i\n };\n });\n}\n\n/**\n * Gets the mutation batch after the passed in batchId in the mutation queue\n * or null if empty.\n * @param afterBatchId - If provided, the batch to search after.\n * @returns The next mutation or null if there wasn't one.\n */\nfunction __PRIVATE_localStoreGetNextMutationBatch(e, t) {\n const n = __PRIVATE_debugCast(e);\n return n.persistence.runTransaction(\"Get next mutation batch\", \"readonly\", e => (void 0 === t && (t = -1), n.mutationQueue.getNextMutationBatchAfterBatchId(e, t)));\n}\n\n/**\n * Reads the current value of a Document with a given key or null if not\n * found - used for testing.\n */\n/**\n * Assigns the given target an internal ID so that its results can be pinned so\n * they don't get GC'd. A target must be allocated in the local store before\n * the store can be used to manage its view.\n *\n * Allocating an already allocated `Target` will return the existing `TargetData`\n * for that `Target`.\n */\nfunction __PRIVATE_localStoreAllocateTarget(e, t) {\n const n = __PRIVATE_debugCast(e);\n return n.persistence.runTransaction(\"Allocate target\", \"readwrite\", e => {\n let r;\n return n.qr.getTargetData(e, t).next(i => i ? (\n // This target has been listened to previously, so reuse the\n // previous targetID.\n // TODO(mcg): freshen last accessed date?\n r = i, PersistencePromise.resolve(r)) : n.qr.allocateTargetId(e).next(i => (r = new TargetData(t, i, \"TargetPurposeListen\" /* TargetPurpose.Listen */, e.currentSequenceNumber), n.qr.addTargetData(e, r).next(() => r))));\n }).then(e => {\n // If Multi-Tab is enabled, the existing target data may be newer than\n // the in-memory data\n const r = n.ts.get(e.targetId);\n return (null === r || e.snapshotVersion.compareTo(r.snapshotVersion) > 0) && (n.ts = n.ts.insert(e.targetId, e), n.ns.set(t, e.targetId)), e;\n });\n}\n\n/**\n * Returns the TargetData as seen by the LocalStore, including updates that may\n * have not yet been persisted to the TargetCache.\n */\n// Visible for testing.\n/**\n * Unpins all the documents associated with the given target. If\n * `keepPersistedTargetData` is set to false and Eager GC enabled, the method\n * directly removes the associated target data from the target cache.\n *\n * Releasing a non-existing `Target` is a no-op.\n */\n// PORTING NOTE: `keepPersistedTargetData` is multi-tab only.\nasync function __PRIVATE_localStoreReleaseTarget(e, t, n) {\n const r = __PRIVATE_debugCast(e),\n i = r.ts.get(t),\n s = n ? \"readwrite\" : \"readwrite-primary\";\n try {\n n || (await r.persistence.runTransaction(\"Release target\", s, e => r.persistence.referenceDelegate.removeTarget(e, i)));\n } catch (e) {\n if (!__PRIVATE_isIndexedDbTransactionError(e)) throw e;\n // All `releaseTarget` does is record the final metadata state for the\n // target, but we've been recording this periodically during target\n // activity. If we lose this write this could cause a very slight\n // difference in the order of target deletion during GC, but we\n // don't define exact LRU semantics so this is acceptable.\n __PRIVATE_logDebug(\"LocalStore\", `Failed to update sequence numbers for target ${t}: ${e}`);\n }\n r.ts = r.ts.remove(t), r.ns.delete(i.target);\n}\n\n/**\n * Runs the specified query against the local store and returns the results,\n * potentially taking advantage of query data from previous executions (such\n * as the set of remote keys).\n *\n * @param usePreviousResults - Whether results from previous executions can\n * be used to optimize this query execution.\n */\nfunction __PRIVATE_localStoreExecuteQuery(e, t, n) {\n const r = __PRIVATE_debugCast(e);\n let i = SnapshotVersion.min(),\n s = __PRIVATE_documentKeySet();\n return r.persistence.runTransaction(\"Execute query\", \"readwrite\",\n // Use readwrite instead of readonly so indexes can be created\n // Use readwrite instead of readonly so indexes can be created\n e => function __PRIVATE_localStoreGetTargetData(e, t, n) {\n const r = __PRIVATE_debugCast(e),\n i = r.ns.get(n);\n return void 0 !== i ? PersistencePromise.resolve(r.ts.get(i)) : r.qr.getTargetData(t, n);\n }(r, e, __PRIVATE_queryToTarget(t)).next(t => {\n if (t) return i = t.lastLimboFreeSnapshotVersion, r.qr.getMatchingKeysForTargetId(e, t.targetId).next(e => {\n s = e;\n });\n }).next(() => r.es.getDocumentsMatchingQuery(e, t, n ? i : SnapshotVersion.min(), n ? s : __PRIVATE_documentKeySet())).next(e => (__PRIVATE_setMaxReadTime(r, __PRIVATE_queryCollectionGroup(t), e), {\n documents: e,\n ls: s\n })));\n}\n\n// PORTING NOTE: Multi-Tab only.\nfunction __PRIVATE_localStoreGetCachedTarget(e, t) {\n const n = __PRIVATE_debugCast(e),\n r = __PRIVATE_debugCast(n.qr),\n i = n.ts.get(t);\n return i ? Promise.resolve(i.target) : n.persistence.runTransaction(\"Get target data\", \"readonly\", e => r._t(e, t).next(e => e ? e.target : null));\n}\n\n/**\n * Returns the set of documents that have been updated since the last call.\n * If this is the first call, returns the set of changes since client\n * initialization. Further invocations will return document that have changed\n * since the prior call.\n */\n// PORTING NOTE: Multi-Tab only.\nfunction __PRIVATE_localStoreGetNewDocumentChanges(e, t) {\n const n = __PRIVATE_debugCast(e),\n r = n.rs.get(t) || SnapshotVersion.min();\n // Get the current maximum read time for the collection. This should always\n // exist, but to reduce the chance for regressions we default to\n // SnapshotVersion.Min()\n // TODO(indexing): Consider removing the default value.\n return n.persistence.runTransaction(\"Get new document changes\", \"readonly\", e => n.ss.getAllFromCollectionGroup(e, t, __PRIVATE_newIndexOffsetSuccessorFromReadTime(r, -1), /* limit= */Number.MAX_SAFE_INTEGER)).then(e => (__PRIVATE_setMaxReadTime(n, t, e), e));\n}\n\n/** Sets the collection group's maximum read time from the given documents. */\n// PORTING NOTE: Multi-Tab only.\nfunction __PRIVATE_setMaxReadTime(e, t, n) {\n let r = e.rs.get(t) || SnapshotVersion.min();\n n.forEach((e, t) => {\n t.readTime.compareTo(r) > 0 && (r = t.readTime);\n }), e.rs.set(t, r);\n}\n\n/**\n * Creates a new target using the given bundle name, which will be used to\n * hold the keys of all documents from the bundle in query-document mappings.\n * This ensures that the loaded documents do not get garbage collected\n * right away.\n */\n/**\n * Applies the documents from a bundle to the \"ground-state\" (remote)\n * documents.\n *\n * LocalDocuments are re-calculated if there are remaining mutations in the\n * queue.\n */\nasync function __PRIVATE_localStoreApplyBundledDocuments(e, t, n, r) {\n const i = __PRIVATE_debugCast(e);\n let s = __PRIVATE_documentKeySet(),\n o = __PRIVATE_mutableDocumentMap();\n for (const e of n) {\n const n = t.hs(e.metadata.name);\n e.document && (s = s.add(n));\n const r = t.Ps(e);\n r.setReadTime(t.Is(e.metadata.readTime)), o = o.insert(n, r);\n }\n const _ = i.ss.newChangeBuffer({\n trackRemovals: !0\n }),\n a = await __PRIVATE_localStoreAllocateTarget(i, function __PRIVATE_umbrellaTarget(e) {\n // It is OK that the path used for the query is not valid, because this will\n // not be read and queried.\n return __PRIVATE_queryToTarget(__PRIVATE_newQueryForPath(ResourcePath.fromString(`__bundle__/docs/${e}`)));\n }(r));\n // Allocates a target to hold all document keys from the bundle, such that\n // they will not get garbage collected right away.\n return i.persistence.runTransaction(\"Apply bundle documents\", \"readwrite\", e => __PRIVATE_populateDocumentChangeBuffer(e, _, o).next(t => (_.apply(e), t)).next(t => i.qr.removeMatchingKeysForTargetId(e, a.targetId).next(() => i.qr.addMatchingKeys(e, s, a.targetId)).next(() => i.localDocuments.getLocalViewOfDocuments(e, t.us, t.cs)).next(() => t.us)));\n}\n\n/**\n * Returns a promise of a boolean to indicate if the given bundle has already\n * been loaded and the create time is newer than the current loading bundle.\n */\n/**\n * Saves the given `NamedQuery` to local persistence.\n */\nasync function __PRIVATE_localStoreSaveNamedQuery(e, t, n = __PRIVATE_documentKeySet()) {\n // Allocate a target for the named query such that it can be resumed\n // from associated read time if users use it to listen.\n // NOTE: this also means if no corresponding target exists, the new target\n // will remain active and will not get collected, unless users happen to\n // unlisten the query somehow.\n const r = await __PRIVATE_localStoreAllocateTarget(e, __PRIVATE_queryToTarget(__PRIVATE_fromBundledQuery(t.bundledQuery))),\n i = __PRIVATE_debugCast(e);\n return i.persistence.runTransaction(\"Save named query\", \"readwrite\", e => {\n const s = __PRIVATE_fromVersion(t.readTime);\n // Simply save the query itself if it is older than what the SDK already\n // has.\n if (r.snapshotVersion.compareTo(s) >= 0) return i.Kr.saveNamedQuery(e, t);\n // Update existing target data because the query from the bundle is newer.\n const o = r.withResumeToken(ByteString.EMPTY_BYTE_STRING, s);\n return i.ts = i.ts.insert(o.targetId, o), i.qr.updateTargetData(e, o).next(() => i.qr.removeMatchingKeysForTargetId(e, r.targetId)).next(() => i.qr.addMatchingKeys(e, n, r.targetId)).next(() => i.Kr.saveNamedQuery(e, t));\n });\n}\n\n/** Assembles the key for a client state in WebStorage */\nfunction createWebStorageClientStateKey(e, t) {\n return `firestore_clients_${e}_${t}`;\n}\n\n// The format of the WebStorage key that stores the mutation state is:\n// firestore_mutations__\n// (for unauthenticated users)\n// or: firestore_mutations___\n\n// 'user_uid' is last to avoid needing to escape '_' characters that it might\n// contain.\n/** Assembles the key for a mutation batch in WebStorage */\nfunction createWebStorageMutationBatchKey(e, t, n) {\n let r = `firestore_mutations_${e}_${n}`;\n return t.isAuthenticated() && (r += `_${t.uid}`), r;\n}\n\n// The format of the WebStorage key that stores a query target's metadata is:\n// firestore_targets__\n/** Assembles the key for a query state in WebStorage */\nfunction createWebStorageQueryTargetMetadataKey(e, t) {\n return `firestore_targets_${e}_${t}`;\n}\n\n// The WebStorage prefix that stores the primary tab's online state. The\n// format of the key is:\n// firestore_online_state_\n/**\n * Holds the state of a mutation batch, including its user ID, batch ID and\n * whether the batch is 'pending', 'acknowledged' or 'rejected'.\n */\n// Visible for testing\nclass __PRIVATE_MutationMetadata {\n constructor(e, t, n, r) {\n this.user = e, this.batchId = t, this.state = n, this.error = r;\n }\n /**\n * Parses a MutationMetadata from its JSON representation in WebStorage.\n * Logs a warning and returns null if the format of the data is not valid.\n */\n static Ts(e, t, n) {\n const r = JSON.parse(n);\n let i,\n s = \"object\" == typeof r && -1 !== [\"pending\", \"acknowledged\", \"rejected\"].indexOf(r.state) && (void 0 === r.error || \"object\" == typeof r.error);\n return s && r.error && (s = \"string\" == typeof r.error.message && \"string\" == typeof r.error.code, s && (i = new FirestoreError(r.error.code, r.error.message))), s ? new __PRIVATE_MutationMetadata(e, t, r.state, i) : (__PRIVATE_logError(\"SharedClientState\", `Failed to parse mutation state for ID '${t}': ${n}`), null);\n }\n Es() {\n const e = {\n state: this.state,\n updateTimeMs: Date.now()\n };\n return this.error && (e.error = {\n code: this.error.code,\n message: this.error.message\n }), JSON.stringify(e);\n }\n}\n\n/**\n * Holds the state of a query target, including its target ID and whether the\n * target is 'not-current', 'current' or 'rejected'.\n */\n// Visible for testing\nclass __PRIVATE_QueryTargetMetadata {\n constructor(e, t, n) {\n this.targetId = e, this.state = t, this.error = n;\n }\n /**\n * Parses a QueryTargetMetadata from its JSON representation in WebStorage.\n * Logs a warning and returns null if the format of the data is not valid.\n */\n static Ts(e, t) {\n const n = JSON.parse(t);\n let r,\n i = \"object\" == typeof n && -1 !== [\"not-current\", \"current\", \"rejected\"].indexOf(n.state) && (void 0 === n.error || \"object\" == typeof n.error);\n return i && n.error && (i = \"string\" == typeof n.error.message && \"string\" == typeof n.error.code, i && (r = new FirestoreError(n.error.code, n.error.message))), i ? new __PRIVATE_QueryTargetMetadata(e, n.state, r) : (__PRIVATE_logError(\"SharedClientState\", `Failed to parse target state for ID '${e}': ${t}`), null);\n }\n Es() {\n const e = {\n state: this.state,\n updateTimeMs: Date.now()\n };\n return this.error && (e.error = {\n code: this.error.code,\n message: this.error.message\n }), JSON.stringify(e);\n }\n}\n\n/**\n * This class represents the immutable ClientState for a client read from\n * WebStorage, containing the list of active query targets.\n */\nclass __PRIVATE_RemoteClientState {\n constructor(e, t) {\n this.clientId = e, this.activeTargetIds = t;\n }\n /**\n * Parses a RemoteClientState from the JSON representation in WebStorage.\n * Logs a warning and returns null if the format of the data is not valid.\n */\n static Ts(e, t) {\n const n = JSON.parse(t);\n let r = \"object\" == typeof n && n.activeTargetIds instanceof Array,\n i = __PRIVATE_targetIdSet();\n for (let e = 0; r && e < n.activeTargetIds.length; ++e) r = isSafeInteger(n.activeTargetIds[e]), i = i.add(n.activeTargetIds[e]);\n return r ? new __PRIVATE_RemoteClientState(e, i) : (__PRIVATE_logError(\"SharedClientState\", `Failed to parse client data for instance '${e}': ${t}`), null);\n }\n}\n\n/**\n * This class represents the online state for all clients participating in\n * multi-tab. The online state is only written to by the primary client, and\n * used in secondary clients to update their query views.\n */\nclass __PRIVATE_SharedOnlineState {\n constructor(e, t) {\n this.clientId = e, this.onlineState = t;\n }\n /**\n * Parses a SharedOnlineState from its JSON representation in WebStorage.\n * Logs a warning and returns null if the format of the data is not valid.\n */\n static Ts(e) {\n const t = JSON.parse(e);\n return \"object\" == typeof t && -1 !== [\"Unknown\", \"Online\", \"Offline\"].indexOf(t.onlineState) && \"string\" == typeof t.clientId ? new __PRIVATE_SharedOnlineState(t.clientId, t.onlineState) : (__PRIVATE_logError(\"SharedClientState\", `Failed to parse online state: ${e}`), null);\n }\n}\n\n/**\n * Metadata state of the local client. Unlike `RemoteClientState`, this class is\n * mutable and keeps track of all pending mutations, which allows us to\n * update the range of pending mutation batch IDs as new mutations are added or\n * removed.\n *\n * The data in `LocalClientState` is not read from WebStorage and instead\n * updated via its instance methods. The updated state can be serialized via\n * `toWebStorageJSON()`.\n */\n// Visible for testing.\nclass __PRIVATE_LocalClientState {\n constructor() {\n this.activeTargetIds = __PRIVATE_targetIdSet();\n }\n ds(e) {\n this.activeTargetIds = this.activeTargetIds.add(e);\n }\n As(e) {\n this.activeTargetIds = this.activeTargetIds.delete(e);\n }\n /**\n * Converts this entry into a JSON-encoded format we can use for WebStorage.\n * Does not encode `clientId` as it is part of the key in WebStorage.\n */\n Es() {\n const e = {\n activeTargetIds: this.activeTargetIds.toArray(),\n updateTimeMs: Date.now()\n };\n return JSON.stringify(e);\n }\n}\n\n/**\n * `WebStorageSharedClientState` uses WebStorage (window.localStorage) as the\n * backing store for the SharedClientState. It keeps track of all active\n * clients and supports modifications of the local client's data.\n */\nclass __PRIVATE_WebStorageSharedClientState {\n constructor(e, t, n, r, i) {\n this.window = e, this.si = t, this.persistenceKey = n, this.Rs = r, this.syncEngine = null, this.onlineStateHandler = null, this.sequenceNumberHandler = null, this.Vs = this.fs.bind(this), this.gs = new SortedMap(__PRIVATE_primitiveComparator), this.started = !1,\n /**\n * Captures WebStorage events that occur before `start()` is called. These\n * events are replayed once `WebStorageSharedClientState` is started.\n */\n this.ps = [];\n // Escape the special characters mentioned here:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions\n const s = n.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n this.storage = this.window.localStorage, this.currentUser = i, this.ys = createWebStorageClientStateKey(this.persistenceKey, this.Rs), this.ws = /** Assembles the key for the current sequence number. */\n function createWebStorageSequenceNumberKey(e) {\n return `firestore_sequence_number_${e}`;\n }\n /**\n * @license\n * Copyright 2018 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */(this.persistenceKey), this.gs = this.gs.insert(this.Rs, new __PRIVATE_LocalClientState()), this.Ss = new RegExp(`^firestore_clients_${s}_([^_]*)$`), this.bs = new RegExp(`^firestore_mutations_${s}_(\\\\d+)(?:_(.*))?$`), this.Ds = new RegExp(`^firestore_targets_${s}_(\\\\d+)$`), this.Cs = /** Assembles the key for the online state of the primary tab. */\n function createWebStorageOnlineStateKey(e) {\n return `firestore_online_state_${e}`;\n }\n // The WebStorage prefix that plays as a event to indicate the remote documents\n // might have changed due to some secondary tabs loading a bundle.\n // format of the key is:\n // firestore_bundle_loaded_v2_\n // The version ending with \"v2\" stores the list of modified collection groups.\n (this.persistenceKey), this.vs = function createBundleLoadedKey(e) {\n return `firestore_bundle_loaded_v2_${e}`;\n }\n // The WebStorage key prefix for the key that stores the last sequence number allocated. The key\n // looks like 'firestore_sequence_number_'.\n (this.persistenceKey),\n // Rather than adding the storage observer during start(), we add the\n // storage observer during initialization. This ensures that we collect\n // events before other components populate their initial state (during their\n // respective start() calls). Otherwise, we might for example miss a\n // mutation that is added after LocalStore's start() processed the existing\n // mutations but before we observe WebStorage events.\n this.window.addEventListener(\"storage\", this.Vs);\n }\n /** Returns 'true' if WebStorage is available in the current environment. */\n static D(e) {\n return !(!e || !e.localStorage);\n }\n async start() {\n // Retrieve the list of existing clients to backfill the data in\n // SharedClientState.\n const e = await this.syncEngine.Bi();\n for (const t of e) {\n if (t === this.Rs) continue;\n const e = this.getItem(createWebStorageClientStateKey(this.persistenceKey, t));\n if (e) {\n const n = __PRIVATE_RemoteClientState.Ts(t, e);\n n && (this.gs = this.gs.insert(n.clientId, n));\n }\n }\n this.Fs();\n // Check if there is an existing online state and call the callback handler\n // if applicable.\n const t = this.storage.getItem(this.Cs);\n if (t) {\n const e = this.Ms(t);\n e && this.xs(e);\n }\n for (const e of this.ps) this.fs(e);\n this.ps = [],\n // Register a window unload hook to remove the client metadata entry from\n // WebStorage even if `shutdown()` was not called.\n this.window.addEventListener(\"pagehide\", () => this.shutdown()), this.started = !0;\n }\n writeSequenceNumber(e) {\n this.setItem(this.ws, JSON.stringify(e));\n }\n getAllActiveQueryTargets() {\n return this.Os(this.gs);\n }\n isActiveQueryTarget(e) {\n let t = !1;\n return this.gs.forEach((n, r) => {\n r.activeTargetIds.has(e) && (t = !0);\n }), t;\n }\n addPendingMutation(e) {\n this.Ns(e, \"pending\");\n }\n updateMutationState(e, t, n) {\n this.Ns(e, t, n),\n // Once a final mutation result is observed by other clients, they no longer\n // access the mutation's metadata entry. Since WebStorage replays events\n // in order, it is safe to delete the entry right after updating it.\n this.Bs(e);\n }\n addLocalQueryTarget(e) {\n let t = \"not-current\";\n // Lookup an existing query state if the target ID was already registered\n // by another tab\n if (this.isActiveQueryTarget(e)) {\n const n = this.storage.getItem(createWebStorageQueryTargetMetadataKey(this.persistenceKey, e));\n if (n) {\n const r = __PRIVATE_QueryTargetMetadata.Ts(e, n);\n r && (t = r.state);\n }\n }\n return this.Ls.ds(e), this.Fs(), t;\n }\n removeLocalQueryTarget(e) {\n this.Ls.As(e), this.Fs();\n }\n isLocalQueryTarget(e) {\n return this.Ls.activeTargetIds.has(e);\n }\n clearQueryState(e) {\n this.removeItem(createWebStorageQueryTargetMetadataKey(this.persistenceKey, e));\n }\n updateQueryState(e, t, n) {\n this.ks(e, t, n);\n }\n handleUserChange(e, t, n) {\n t.forEach(e => {\n this.Bs(e);\n }), this.currentUser = e, n.forEach(e => {\n this.addPendingMutation(e);\n });\n }\n setOnlineState(e) {\n this.qs(e);\n }\n notifyBundleLoaded(e) {\n this.Qs(e);\n }\n shutdown() {\n this.started && (this.window.removeEventListener(\"storage\", this.Vs), this.removeItem(this.ys), this.started = !1);\n }\n getItem(e) {\n const t = this.storage.getItem(e);\n return __PRIVATE_logDebug(\"SharedClientState\", \"READ\", e, t), t;\n }\n setItem(e, t) {\n __PRIVATE_logDebug(\"SharedClientState\", \"SET\", e, t), this.storage.setItem(e, t);\n }\n removeItem(e) {\n __PRIVATE_logDebug(\"SharedClientState\", \"REMOVE\", e), this.storage.removeItem(e);\n }\n fs(e) {\n // Note: The function is typed to take Event to be interface-compatible with\n // `Window.addEventListener`.\n const t = e;\n if (t.storageArea === this.storage) {\n if (__PRIVATE_logDebug(\"SharedClientState\", \"EVENT\", t.key, t.newValue), t.key === this.ys) return void __PRIVATE_logError(\"Received WebStorage notification for local change. Another client might have garbage-collected our state\");\n this.si.enqueueRetryable(async () => {\n if (this.started) {\n if (null !== t.key) if (this.Ss.test(t.key)) {\n if (null == t.newValue) {\n const e = this.Ks(t.key);\n return this.$s(e, null);\n }\n {\n const e = this.Us(t.key, t.newValue);\n if (e) return this.$s(e.clientId, e);\n }\n } else if (this.bs.test(t.key)) {\n if (null !== t.newValue) {\n const e = this.Ws(t.key, t.newValue);\n if (e) return this.Gs(e);\n }\n } else if (this.Ds.test(t.key)) {\n if (null !== t.newValue) {\n const e = this.zs(t.key, t.newValue);\n if (e) return this.js(e);\n }\n } else if (t.key === this.Cs) {\n if (null !== t.newValue) {\n const e = this.Ms(t.newValue);\n if (e) return this.xs(e);\n }\n } else if (t.key === this.ws) {\n const e = function __PRIVATE_fromWebStorageSequenceNumber(e) {\n let t = __PRIVATE_ListenSequence._e;\n if (null != e) try {\n const n = JSON.parse(e);\n __PRIVATE_hardAssert(\"number\" == typeof n), t = n;\n } catch (e) {\n __PRIVATE_logError(\"SharedClientState\", \"Failed to read sequence number from WebStorage\", e);\n }\n return t;\n }\n /**\n * `MemorySharedClientState` is a simple implementation of SharedClientState for\n * clients using memory persistence. The state in this class remains fully\n * isolated and no synchronization is performed.\n */(t.newValue);\n e !== __PRIVATE_ListenSequence._e && this.sequenceNumberHandler(e);\n } else if (t.key === this.vs) {\n const e = this.Hs(t.newValue);\n await Promise.all(e.map(e => this.syncEngine.Js(e)));\n }\n } else this.ps.push(t);\n });\n }\n }\n get Ls() {\n return this.gs.get(this.Rs);\n }\n Fs() {\n this.setItem(this.ys, this.Ls.Es());\n }\n Ns(e, t, n) {\n const r = new __PRIVATE_MutationMetadata(this.currentUser, e, t, n),\n i = createWebStorageMutationBatchKey(this.persistenceKey, this.currentUser, e);\n this.setItem(i, r.Es());\n }\n Bs(e) {\n const t = createWebStorageMutationBatchKey(this.persistenceKey, this.currentUser, e);\n this.removeItem(t);\n }\n qs(e) {\n const t = {\n clientId: this.Rs,\n onlineState: e\n };\n this.storage.setItem(this.Cs, JSON.stringify(t));\n }\n ks(e, t, n) {\n const r = createWebStorageQueryTargetMetadataKey(this.persistenceKey, e),\n i = new __PRIVATE_QueryTargetMetadata(e, t, n);\n this.setItem(r, i.Es());\n }\n Qs(e) {\n const t = JSON.stringify(Array.from(e));\n this.setItem(this.vs, t);\n }\n /**\n * Parses a client state key in WebStorage. Returns null if the key does not\n * match the expected key format.\n */\n Ks(e) {\n const t = this.Ss.exec(e);\n return t ? t[1] : null;\n }\n /**\n * Parses a client state in WebStorage. Returns 'null' if the value could not\n * be parsed.\n */\n Us(e, t) {\n const n = this.Ks(e);\n return __PRIVATE_RemoteClientState.Ts(n, t);\n }\n /**\n * Parses a mutation batch state in WebStorage. Returns 'null' if the value\n * could not be parsed.\n */\n Ws(e, t) {\n const n = this.bs.exec(e),\n r = Number(n[1]),\n i = void 0 !== n[2] ? n[2] : null;\n return __PRIVATE_MutationMetadata.Ts(new User(i), r, t);\n }\n /**\n * Parses a query target state from WebStorage. Returns 'null' if the value\n * could not be parsed.\n */\n zs(e, t) {\n const n = this.Ds.exec(e),\n r = Number(n[1]);\n return __PRIVATE_QueryTargetMetadata.Ts(r, t);\n }\n /**\n * Parses an online state from WebStorage. Returns 'null' if the value\n * could not be parsed.\n */\n Ms(e) {\n return __PRIVATE_SharedOnlineState.Ts(e);\n }\n Hs(e) {\n return JSON.parse(e);\n }\n async Gs(e) {\n if (e.user.uid === this.currentUser.uid) return this.syncEngine.Ys(e.batchId, e.state, e.error);\n __PRIVATE_logDebug(\"SharedClientState\", `Ignoring mutation for non-active user ${e.user.uid}`);\n }\n js(e) {\n return this.syncEngine.Zs(e.targetId, e.state, e.error);\n }\n $s(e, t) {\n const n = t ? this.gs.insert(e, t) : this.gs.remove(e),\n r = this.Os(this.gs),\n i = this.Os(n),\n s = [],\n o = [];\n return i.forEach(e => {\n r.has(e) || s.push(e);\n }), r.forEach(e => {\n i.has(e) || o.push(e);\n }), this.syncEngine.Xs(s, o).then(() => {\n this.gs = n;\n });\n }\n xs(e) {\n // We check whether the client that wrote this online state is still active\n // by comparing its client ID to the list of clients kept active in\n // IndexedDb. If a client does not update their IndexedDb client state\n // within 5 seconds, it is considered inactive and we don't emit an online\n // state event.\n this.gs.get(e.clientId) && this.onlineStateHandler(e.onlineState);\n }\n Os(e) {\n let t = __PRIVATE_targetIdSet();\n return e.forEach((e, n) => {\n t = t.unionWith(n.activeTargetIds);\n }), t;\n }\n}\nclass __PRIVATE_MemorySharedClientState {\n constructor() {\n this.eo = new __PRIVATE_LocalClientState(), this.no = {}, this.onlineStateHandler = null, this.sequenceNumberHandler = null;\n }\n addPendingMutation(e) {\n // No op.\n }\n updateMutationState(e, t, n) {\n // No op.\n }\n addLocalQueryTarget(e) {\n return this.eo.ds(e), this.no[e] || \"not-current\";\n }\n updateQueryState(e, t, n) {\n this.no[e] = t;\n }\n removeLocalQueryTarget(e) {\n this.eo.As(e);\n }\n isLocalQueryTarget(e) {\n return this.eo.activeTargetIds.has(e);\n }\n clearQueryState(e) {\n delete this.no[e];\n }\n getAllActiveQueryTargets() {\n return this.eo.activeTargetIds;\n }\n isActiveQueryTarget(e) {\n return this.eo.activeTargetIds.has(e);\n }\n start() {\n return this.eo = new __PRIVATE_LocalClientState(), Promise.resolve();\n }\n handleUserChange(e, t, n) {\n // No op.\n }\n setOnlineState(e) {\n // No op.\n }\n shutdown() {}\n writeSequenceNumber(e) {}\n notifyBundleLoaded(e) {\n // No op.\n }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass __PRIVATE_NoopConnectivityMonitor {\n ro(e) {\n // No-op.\n }\n shutdown() {\n // No-op.\n }\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// References to `window` are guarded by BrowserConnectivityMonitor.isAvailable()\n/* eslint-disable no-restricted-globals */\n/**\n * Browser implementation of ConnectivityMonitor.\n */\nclass __PRIVATE_BrowserConnectivityMonitor {\n constructor() {\n this.io = () => this.so(), this.oo = () => this._o(), this.ao = [], this.uo();\n }\n ro(e) {\n this.ao.push(e);\n }\n shutdown() {\n window.removeEventListener(\"online\", this.io), window.removeEventListener(\"offline\", this.oo);\n }\n uo() {\n window.addEventListener(\"online\", this.io), window.addEventListener(\"offline\", this.oo);\n }\n so() {\n __PRIVATE_logDebug(\"ConnectivityMonitor\", \"Network connectivity changed: AVAILABLE\");\n for (const e of this.ao) e(0 /* NetworkStatus.AVAILABLE */);\n }\n _o() {\n __PRIVATE_logDebug(\"ConnectivityMonitor\", \"Network connectivity changed: UNAVAILABLE\");\n for (const e of this.ao) e(1 /* NetworkStatus.UNAVAILABLE */);\n }\n // TODO(chenbrian): Consider passing in window either into this component or\n // here for testing via FakeWindow.\n /** Checks that all used attributes of window are available. */\n static D() {\n return \"undefined\" != typeof window && void 0 !== window.addEventListener && void 0 !== window.removeEventListener;\n }\n}\n\n/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * The value returned from the most recent invocation of\n * `generateUniqueDebugId()`, or null if it has never been invoked.\n */\nlet Ae = null;\n\n/**\n * Generates and returns an initial value for `lastUniqueDebugId`.\n *\n * The returned value is randomly selected from a range of integers that are\n * represented as 8 hexadecimal digits. This means that (within reason) any\n * numbers generated by incrementing the returned number by 1 will also be\n * represented by 8 hexadecimal digits. This leads to all \"IDs\" having the same\n * length when converted to a hexadecimal string, making reading logs containing\n * these IDs easier to follow. And since the return value is randomly selected\n * it will help to differentiate between logs from different executions.\n */\n/**\n * Generates and returns a unique ID as a hexadecimal string.\n *\n * The returned ID is intended to be used in debug logging messages to help\n * correlate log messages that may be spatially separated in the logs, but\n * logically related. For example, a network connection could include the same\n * \"debug ID\" string in all of its log messages to help trace a specific\n * connection over time.\n *\n * @return the 10-character generated ID (e.g. \"0xa1b2c3d4\").\n */\nfunction __PRIVATE_generateUniqueDebugId() {\n return null === Ae ? Ae = function __PRIVATE_generateInitialUniqueDebugId() {\n return 268435456 + Math.round(2147483648 * Math.random());\n }() : Ae++, \"0x\" + Ae.toString(16);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst Re = {\n BatchGetDocuments: \"batchGet\",\n Commit: \"commit\",\n RunQuery: \"runQuery\",\n RunAggregationQuery: \"runAggregationQuery\"\n};\n\n/**\n * Maps RPC names to the corresponding REST endpoint name.\n *\n * We use array notation to avoid mangling.\n */\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Provides a simple helper class that implements the Stream interface to\n * bridge to other implementations that are streams but do not implement the\n * interface. The stream callbacks are invoked with the callOn... methods.\n */\nclass __PRIVATE_StreamBridge {\n constructor(e) {\n this.co = e.co, this.lo = e.lo;\n }\n ho(e) {\n this.Po = e;\n }\n Io(e) {\n this.To = e;\n }\n onMessage(e) {\n this.Eo = e;\n }\n close() {\n this.lo();\n }\n send(e) {\n this.co(e);\n }\n Ao() {\n this.Po();\n }\n Ro(e) {\n this.To(e);\n }\n Vo(e) {\n this.Eo(e);\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst Ve = \"WebChannelConnection\";\nclass __PRIVATE_WebChannelConnection extends\n/**\n * Base class for all Rest-based connections to the backend (WebChannel and\n * HTTP).\n */\nclass __PRIVATE_RestConnection {\n constructor(e) {\n this.databaseInfo = e, this.databaseId = e.databaseId;\n const t = e.ssl ? \"https\" : \"http\",\n n = encodeURIComponent(this.databaseId.projectId),\n r = encodeURIComponent(this.databaseId.database);\n this.mo = t + \"://\" + e.host, this.fo = `projects/${n}/databases/${r}`, this.po = \"(default)\" === this.databaseId.database ? `project_id=${n}` : `project_id=${n}&database_id=${r}`;\n }\n get yo() {\n // Both `invokeRPC()` and `invokeStreamingRPC()` use their `path` arguments to determine\n // where to run the query, and expect the `request` to NOT specify the \"path\".\n return !1;\n }\n wo(e, t, n, r, i) {\n const s = __PRIVATE_generateUniqueDebugId(),\n o = this.So(e, t);\n __PRIVATE_logDebug(\"RestConnection\", `Sending RPC '${e}' ${s}:`, o, n);\n const _ = {\n \"google-cloud-resource-prefix\": this.fo,\n \"x-goog-request-params\": this.po\n };\n return this.bo(_, r, i), this.Do(e, o, _, n).then(t => (__PRIVATE_logDebug(\"RestConnection\", `Received RPC '${e}' ${s}: `, t), t), t => {\n throw __PRIVATE_logWarn(\"RestConnection\", `RPC '${e}' ${s} failed with error: `, t, \"url: \", o, \"request:\", n), t;\n });\n }\n Co(e, t, n, r, i, s) {\n // The REST API automatically aggregates all of the streamed results, so we\n // can just use the normal invoke() method.\n return this.wo(e, t, n, r, i);\n }\n /**\n * Modifies the headers for a request, adding any authorization token if\n * present and any additional headers for the request.\n */\n bo(e, t, n) {\n e[\"X-Goog-Api-Client\"] =\n // SDK_VERSION is updated to different value at runtime depending on the entry point,\n // so we need to get its value when we need it in a function.\n function __PRIVATE_getGoogApiClientValue() {\n return \"gl-js/ fire/\" + S;\n }(),\n // Content-Type: text/plain will avoid preflight requests which might\n // mess with CORS and redirects by proxies. If we add custom headers\n // we will need to change this code to potentially use the $httpOverwrite\n // parameter supported by ESF to avoid triggering preflight requests.\n e[\"Content-Type\"] = \"text/plain\", this.databaseInfo.appId && (e[\"X-Firebase-GMPID\"] = this.databaseInfo.appId), t && t.headers.forEach((t, n) => e[n] = t), n && n.headers.forEach((t, n) => e[n] = t);\n }\n So(e, t) {\n const n = Re[e];\n return `${this.mo}/v1/${t}:${n}`;\n }\n} {\n constructor(e) {\n super(e), this.forceLongPolling = e.forceLongPolling, this.autoDetectLongPolling = e.autoDetectLongPolling, this.useFetchStreams = e.useFetchStreams, this.longPollingOptions = e.longPollingOptions;\n }\n Do(e, t, n, r) {\n const i = __PRIVATE_generateUniqueDebugId();\n return new Promise((s, o) => {\n const _ = new XhrIo();\n _.setWithCredentials(!0), _.listenOnce(EventType.COMPLETE, () => {\n try {\n switch (_.getLastErrorCode()) {\n case ErrorCode.NO_ERROR:\n const t = _.getResponseJson();\n __PRIVATE_logDebug(Ve, `XHR for RPC '${e}' ${i} received:`, JSON.stringify(t)), s(t);\n break;\n case ErrorCode.TIMEOUT:\n __PRIVATE_logDebug(Ve, `RPC '${e}' ${i} timed out`), o(new FirestoreError(D.DEADLINE_EXCEEDED, \"Request time out\"));\n break;\n case ErrorCode.HTTP_ERROR:\n const n = _.getStatus();\n if (__PRIVATE_logDebug(Ve, `RPC '${e}' ${i} failed with status:`, n, \"response text:\", _.getResponseText()), n > 0) {\n let e = _.getResponseJson();\n Array.isArray(e) && (e = e[0]);\n const t = null == e ? void 0 : e.error;\n if (t && t.status && t.message) {\n const e = function __PRIVATE_mapCodeFromHttpResponseErrorStatus(e) {\n const t = e.toLowerCase().replace(/_/g, \"-\");\n return Object.values(D).indexOf(t) >= 0 ? t : D.UNKNOWN;\n }(t.status);\n o(new FirestoreError(e, t.message));\n } else o(new FirestoreError(D.UNKNOWN, \"Server responded with status \" + _.getStatus()));\n } else\n // If we received an HTTP_ERROR but there's no status code,\n // it's most probably a connection issue\n o(new FirestoreError(D.UNAVAILABLE, \"Connection failed.\"));\n break;\n default:\n fail();\n }\n } finally {\n __PRIVATE_logDebug(Ve, `RPC '${e}' ${i} completed.`);\n }\n });\n const a = JSON.stringify(r);\n __PRIVATE_logDebug(Ve, `RPC '${e}' ${i} sending request:`, r), _.send(t, \"POST\", a, n, 15);\n });\n }\n vo(e, t, n) {\n const r = __PRIVATE_generateUniqueDebugId(),\n i = [this.mo, \"/\", \"google.firestore.v1.Firestore\", \"/\", e, \"/channel\"],\n s = createWebChannelTransport(),\n o = getStatEventTarget(),\n _ = {\n // Required for backend stickiness, routing behavior is based on this\n // parameter.\n httpSessionIdParam: \"gsessionid\",\n initMessageHeaders: {},\n messageUrlParams: {\n // This param is used to improve routing and project isolation by the\n // backend and must be included in every request.\n database: `projects/${this.databaseId.projectId}/databases/${this.databaseId.database}`\n },\n sendRawJson: !0,\n supportsCrossDomainXhr: !0,\n internalChannelParams: {\n // Override the default timeout (randomized between 10-20 seconds) since\n // a large write batch on a slow internet connection may take a long\n // time to send to the backend. Rather than have WebChannel impose a\n // tight timeout which could lead to infinite timeouts and retries, we\n // set it very large (5-10 minutes) and rely on the browser's builtin\n // timeouts to kick in if the request isn't working.\n forwardChannelRequestTimeoutMs: 6e5\n },\n forceLongPolling: this.forceLongPolling,\n detectBufferingProxy: this.autoDetectLongPolling\n },\n a = this.longPollingOptions.timeoutSeconds;\n void 0 !== a && (_.longPollingTimeout = Math.round(1e3 * a)), this.useFetchStreams && (_.useFetchStreams = !0), this.bo(_.initMessageHeaders, t, n),\n // Sending the custom headers we just added to request.initMessageHeaders\n // (Authorization, etc.) will trigger the browser to make a CORS preflight\n // request because the XHR will no longer meet the criteria for a \"simple\"\n // CORS request:\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Simple_requests\n // Therefore to avoid the CORS preflight request (an extra network\n // roundtrip), we use the encodeInitMessageHeaders option to specify that\n // the headers should instead be encoded in the request's POST payload,\n // which is recognized by the webchannel backend.\n _.encodeInitMessageHeaders = !0;\n const u = i.join(\"\");\n __PRIVATE_logDebug(Ve, `Creating RPC '${e}' stream ${r}: ${u}`, _);\n const c = s.createWebChannel(u, _);\n // WebChannel supports sending the first message with the handshake - saving\n // a network round trip. However, it will have to call send in the same\n // JS event loop as open. In order to enforce this, we delay actually\n // opening the WebChannel until send is called. Whether we have called\n // open is tracked with this variable.\n let l = !1,\n h = !1;\n // A flag to determine whether the stream was closed (by us or through an\n // error/close event) to avoid delivering multiple close events or sending\n // on a closed stream\n const P = new __PRIVATE_StreamBridge({\n co: t => {\n h ? __PRIVATE_logDebug(Ve, `Not sending because RPC '${e}' stream ${r} is closed:`, t) : (l || (__PRIVATE_logDebug(Ve, `Opening RPC '${e}' stream ${r} transport.`), c.open(), l = !0), __PRIVATE_logDebug(Ve, `RPC '${e}' stream ${r} sending:`, t), c.send(t));\n },\n lo: () => c.close()\n }),\n __PRIVATE_unguardedEventListen = (e, t, n) => {\n // TODO(dimond): closure typing seems broken because WebChannel does\n // not implement goog.events.Listenable\n e.listen(t, e => {\n try {\n n(e);\n } catch (e) {\n setTimeout(() => {\n throw e;\n }, 0);\n }\n });\n };\n // Closure events are guarded and exceptions are swallowed, so catch any\n // exception and rethrow using a setTimeout so they become visible again.\n // Note that eventually this function could go away if we are confident\n // enough the code is exception free.\n return __PRIVATE_unguardedEventListen(c, WebChannel.EventType.OPEN, () => {\n h || __PRIVATE_logDebug(Ve, `RPC '${e}' stream ${r} transport opened.`);\n }), __PRIVATE_unguardedEventListen(c, WebChannel.EventType.CLOSE, () => {\n h || (h = !0, __PRIVATE_logDebug(Ve, `RPC '${e}' stream ${r} transport closed`), P.Ro());\n }), __PRIVATE_unguardedEventListen(c, WebChannel.EventType.ERROR, t => {\n h || (h = !0, __PRIVATE_logWarn(Ve, `RPC '${e}' stream ${r} transport errored:`, t), P.Ro(new FirestoreError(D.UNAVAILABLE, \"The operation could not be completed\")));\n }), __PRIVATE_unguardedEventListen(c, WebChannel.EventType.MESSAGE, t => {\n var n;\n if (!h) {\n const i = t.data[0];\n __PRIVATE_hardAssert(!!i);\n // TODO(b/35143891): There is a bug in One Platform that caused errors\n // (and only errors) to be wrapped in an extra array. To be forward\n // compatible with the bug we need to check either condition. The latter\n // can be removed once the fix has been rolled out.\n // Use any because msgData.error is not typed.\n const s = i,\n o = s.error || (null === (n = s[0]) || void 0 === n ? void 0 : n.error);\n if (o) {\n __PRIVATE_logDebug(Ve, `RPC '${e}' stream ${r} received error:`, o);\n // error.status will be a string like 'OK' or 'NOT_FOUND'.\n const t = o.status;\n let n =\n /**\n * Maps an error Code from a GRPC status identifier like 'NOT_FOUND'.\n *\n * @returns The Code equivalent to the given status string or undefined if\n * there is no match.\n */\n function __PRIVATE_mapCodeFromRpcStatus(e) {\n // lookup by string\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const t = ae[e];\n if (void 0 !== t) return __PRIVATE_mapCodeFromRpcCode(t);\n }(t),\n i = o.message;\n void 0 === n && (n = D.INTERNAL, i = \"Unknown error status: \" + t + \" with message \" + o.message),\n // Mark closed so no further events are propagated\n h = !0, P.Ro(new FirestoreError(n, i)), c.close();\n } else __PRIVATE_logDebug(Ve, `RPC '${e}' stream ${r} received:`, i), P.Vo(i);\n }\n }), __PRIVATE_unguardedEventListen(o, Event.STAT_EVENT, t => {\n t.stat === Stat.PROXY ? __PRIVATE_logDebug(Ve, `RPC '${e}' stream ${r} detected buffering proxy`) : t.stat === Stat.NOPROXY && __PRIVATE_logDebug(Ve, `RPC '${e}' stream ${r} detected no buffering proxy`);\n }), setTimeout(() => {\n // Technically we could/should wait for the WebChannel opened event,\n // but because we want to send the first message with the WebChannel\n // handshake we pretend the channel opened here (asynchronously), and\n // then delay the actual open until the first message is sent.\n P.Ao();\n }, 0), P;\n }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Initializes the WebChannelConnection for the browser. */\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** The Platform's 'window' implementation or null if not available. */\nfunction __PRIVATE_getWindow() {\n // `window` is not always available, e.g. in ReactNative and WebWorkers.\n // eslint-disable-next-line no-restricted-globals\n return \"undefined\" != typeof window ? window : null;\n}\n\n/** The Platform's 'document' implementation or null if not available. */\nfunction getDocument() {\n // `document` is not always available, e.g. in ReactNative and WebWorkers.\n // eslint-disable-next-line no-restricted-globals\n return \"undefined\" != typeof document ? document : null;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction __PRIVATE_newSerializer(e) {\n return new JsonProtoSerializer(e, /* useProto3Json= */!0);\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A helper for running delayed tasks following an exponential backoff curve\n * between attempts.\n *\n * Each delay is made up of a \"base\" delay which follows the exponential\n * backoff curve, and a +/- 50% \"jitter\" that is calculated and added to the\n * base delay. This prevents clients from accidentally synchronizing their\n * delays causing spikes of load to the backend.\n */\nclass __PRIVATE_ExponentialBackoff {\n constructor(\n /**\n * The AsyncQueue to run backoff operations on.\n */\n e,\n /**\n * The ID to use when scheduling backoff operations on the AsyncQueue.\n */\n t,\n /**\n * The initial delay (used as the base delay on the first retry attempt).\n * Note that jitter will still be applied, so the actual delay could be as\n * little as 0.5*initialDelayMs.\n */\n n = 1e3\n /**\n * The multiplier to use to determine the extended base delay after each\n * attempt.\n */, r = 1.5\n /**\n * The maximum base delay after which no further backoff is performed.\n * Note that jitter will still be applied, so the actual delay could be as\n * much as 1.5*maxDelayMs.\n */, i = 6e4) {\n this.si = e, this.timerId = t, this.Fo = n, this.Mo = r, this.xo = i, this.Oo = 0, this.No = null, /** The last backoff attempt, as epoch milliseconds. */\n this.Bo = Date.now(), this.reset();\n }\n /**\n * Resets the backoff delay.\n *\n * The very next backoffAndWait() will have no delay. If it is called again\n * (i.e. due to an error), initialDelayMs (plus jitter) will be used, and\n * subsequent ones will increase according to the backoffFactor.\n */\n reset() {\n this.Oo = 0;\n }\n /**\n * Resets the backoff delay to the maximum delay (e.g. for use after a\n * RESOURCE_EXHAUSTED error).\n */\n Lo() {\n this.Oo = this.xo;\n }\n /**\n * Returns a promise that resolves after currentDelayMs, and increases the\n * delay for any subsequent attempts. If there was a pending backoff operation\n * already, it will be canceled.\n */\n ko(e) {\n // Cancel any pending backoff operation.\n this.cancel();\n // First schedule using the current base (which may be 0 and should be\n // honored as such).\n const t = Math.floor(this.Oo + this.qo()),\n n = Math.max(0, Date.now() - this.Bo),\n r = Math.max(0, t - n);\n // Guard against lastAttemptTime being in the future due to a clock change.\n r > 0 && __PRIVATE_logDebug(\"ExponentialBackoff\", `Backing off for ${r} ms (base delay: ${this.Oo} ms, delay with jitter: ${t} ms, last attempt: ${n} ms ago)`), this.No = this.si.enqueueAfterDelay(this.timerId, r, () => (this.Bo = Date.now(), e())),\n // Apply backoff factor to determine next delay and ensure it is within\n // bounds.\n this.Oo *= this.Mo, this.Oo < this.Fo && (this.Oo = this.Fo), this.Oo > this.xo && (this.Oo = this.xo);\n }\n Qo() {\n null !== this.No && (this.No.skipDelay(), this.No = null);\n }\n cancel() {\n null !== this.No && (this.No.cancel(), this.No = null);\n }\n /** Returns a random value in the range [-currentBaseMs/2, currentBaseMs/2] */\n qo() {\n return (Math.random() - .5) * this.Oo;\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A PersistentStream is an abstract base class that represents a streaming RPC\n * to the Firestore backend. It's built on top of the connections own support\n * for streaming RPCs, and adds several critical features for our clients:\n *\n * - Exponential backoff on failure\n * - Authentication via CredentialsProvider\n * - Dispatching all callbacks into the shared worker queue\n * - Closing idle streams after 60 seconds of inactivity\n *\n * Subclasses of PersistentStream implement serialization of models to and\n * from the JSON representation of the protocol buffers for a specific\n * streaming RPC.\n *\n * ## Starting and Stopping\n *\n * Streaming RPCs are stateful and need to be start()ed before messages can\n * be sent and received. The PersistentStream will call the onOpen() function\n * of the listener once the stream is ready to accept requests.\n *\n * Should a start() fail, PersistentStream will call the registered onClose()\n * listener with a FirestoreError indicating what went wrong.\n *\n * A PersistentStream can be started and stopped repeatedly.\n *\n * Generic types:\n * SendType: The type of the outgoing message of the underlying\n * connection stream\n * ReceiveType: The type of the incoming message of the underlying\n * connection stream\n * ListenerType: The type of the listener that will be used for callbacks\n */\nclass __PRIVATE_PersistentStream {\n constructor(e, t, n, r, i, s, o, _) {\n this.si = e, this.Ko = n, this.$o = r, this.connection = i, this.authCredentialsProvider = s, this.appCheckCredentialsProvider = o, this.listener = _, this.state = 0 /* PersistentStreamState.Initial */,\n /**\n * A close count that's incremented every time the stream is closed; used by\n * getCloseGuardedDispatcher() to invalidate callbacks that happen after\n * close.\n */\n this.Uo = 0, this.Wo = null, this.Go = null, this.stream = null, this.zo = new __PRIVATE_ExponentialBackoff(e, t);\n }\n /**\n * Returns true if start() has been called and no error has occurred. True\n * indicates the stream is open or in the process of opening (which\n * encompasses respecting backoff, getting auth tokens, and starting the\n * actual RPC). Use isOpen() to determine if the stream is open and ready for\n * outbound requests.\n */\n jo() {\n return 1 /* PersistentStreamState.Starting */ === this.state || 5 /* PersistentStreamState.Backoff */ === this.state || this.Ho();\n }\n /**\n * Returns true if the underlying RPC is open (the onOpen() listener has been\n * called) and the stream is ready for outbound requests.\n */\n Ho() {\n return 2 /* PersistentStreamState.Open */ === this.state || 3 /* PersistentStreamState.Healthy */ === this.state;\n }\n /**\n * Starts the RPC. Only allowed if isStarted() returns false. The stream is\n * not immediately ready for use: onOpen() will be invoked when the RPC is\n * ready for outbound requests, at which point isOpen() will return true.\n *\n * When start returns, isStarted() will return true.\n */\n start() {\n 4 /* PersistentStreamState.Error */ !== this.state ? this.auth() : this.Jo();\n }\n /**\n * Stops the RPC. This call is idempotent and allowed regardless of the\n * current isStarted() state.\n *\n * When stop returns, isStarted() and isOpen() will both return false.\n */\n async stop() {\n this.jo() && (await this.close(0 /* PersistentStreamState.Initial */));\n }\n /**\n * After an error the stream will usually back off on the next attempt to\n * start it. If the error warrants an immediate restart of the stream, the\n * sender can use this to indicate that the receiver should not back off.\n *\n * Each error will call the onClose() listener. That function can decide to\n * inhibit backoff if required.\n */\n Yo() {\n this.state = 0 /* PersistentStreamState.Initial */, this.zo.reset();\n }\n /**\n * Marks this stream as idle. If no further actions are performed on the\n * stream for one minute, the stream will automatically close itself and\n * notify the stream's onClose() handler with Status.OK. The stream will then\n * be in a !isStarted() state, requiring the caller to start the stream again\n * before further use.\n *\n * Only streams that are in state 'Open' can be marked idle, as all other\n * states imply pending network operations.\n */\n Zo() {\n // Starts the idle time if we are in state 'Open' and are not yet already\n // running a timer (in which case the previous idle timeout still applies).\n this.Ho() && null === this.Wo && (this.Wo = this.si.enqueueAfterDelay(this.Ko, 6e4, () => this.Xo()));\n }\n /** Sends a message to the underlying stream. */\n e_(e) {\n this.t_(), this.stream.send(e);\n }\n /** Called by the idle timer when the stream should close due to inactivity. */\n async Xo() {\n if (this.Ho())\n // When timing out an idle stream there's no reason to force the stream into backoff when\n // it restarts so set the stream state to Initial instead of Error.\n return this.close(0 /* PersistentStreamState.Initial */);\n }\n /** Marks the stream as active again. */\n t_() {\n this.Wo && (this.Wo.cancel(), this.Wo = null);\n }\n /** Cancels the health check delayed operation. */\n n_() {\n this.Go && (this.Go.cancel(), this.Go = null);\n }\n /**\n * Closes the stream and cleans up as necessary:\n *\n * * closes the underlying GRPC stream;\n * * calls the onClose handler with the given 'error';\n * * sets internal stream state to 'finalState';\n * * adjusts the backoff timer based on the error\n *\n * A new stream can be opened by calling start().\n *\n * @param finalState - the intended state of the stream after closing.\n * @param error - the error the connection was closed with.\n */\n async close(e, t) {\n // Cancel any outstanding timers (they're guaranteed not to execute).\n this.t_(), this.n_(), this.zo.cancel(),\n // Invalidates any stream-related callbacks (e.g. from auth or the\n // underlying stream), guaranteeing they won't execute.\n this.Uo++, 4 /* PersistentStreamState.Error */ !== e ?\n // If this is an intentional close ensure we don't delay our next connection attempt.\n this.zo.reset() : t && t.code === D.RESOURCE_EXHAUSTED ? (\n // Log the error. (Probably either 'quota exceeded' or 'max queue length reached'.)\n __PRIVATE_logError(t.toString()), __PRIVATE_logError(\"Using maximum backoff delay to prevent overloading the backend.\"), this.zo.Lo()) : t && t.code === D.UNAUTHENTICATED && 3 /* PersistentStreamState.Healthy */ !== this.state && (\n // \"unauthenticated\" error means the token was rejected. This should rarely\n // happen since both Auth and AppCheck ensure a sufficient TTL when we\n // request a token. If a user manually resets their system clock this can\n // fail, however. In this case, we should get a Code.UNAUTHENTICATED error\n // before we received the first message and we need to invalidate the token\n // to ensure that we fetch a new token.\n this.authCredentialsProvider.invalidateToken(), this.appCheckCredentialsProvider.invalidateToken()),\n // Clean up the underlying stream because we are no longer interested in events.\n null !== this.stream && (this.r_(), this.stream.close(), this.stream = null),\n // This state must be assigned before calling onClose() to allow the callback to\n // inhibit backoff or otherwise manipulate the state in its non-started state.\n this.state = e,\n // Notify the listener that the stream closed.\n await this.listener.Io(t);\n }\n /**\n * Can be overridden to perform additional cleanup before the stream is closed.\n * Calling super.tearDown() is not required.\n */\n r_() {}\n auth() {\n this.state = 1 /* PersistentStreamState.Starting */;\n const e = this.i_(this.Uo),\n t = this.Uo;\n // TODO(mikelehen): Just use dispatchIfNotClosed, but see TODO below.\n Promise.all([this.authCredentialsProvider.getToken(), this.appCheckCredentialsProvider.getToken()]).then(([e, n]) => {\n // Stream can be stopped while waiting for authentication.\n // TODO(mikelehen): We really should just use dispatchIfNotClosed\n // and let this dispatch onto the queue, but that opened a spec test can\n // of worms that I don't want to deal with in this PR.\n this.Uo === t &&\n // Normally we'd have to schedule the callback on the AsyncQueue.\n // However, the following calls are safe to be called outside the\n // AsyncQueue since they don't chain asynchronous calls\n this.s_(e, n);\n }, t => {\n e(() => {\n const e = new FirestoreError(D.UNKNOWN, \"Fetching auth token failed: \" + t.message);\n return this.o_(e);\n });\n });\n }\n s_(e, t) {\n const n = this.i_(this.Uo);\n this.stream = this.__(e, t), this.stream.ho(() => {\n n(() => (this.state = 2 /* PersistentStreamState.Open */, this.Go = this.si.enqueueAfterDelay(this.$o, 1e4, () => (this.Ho() && (this.state = 3 /* PersistentStreamState.Healthy */), Promise.resolve())), this.listener.ho()));\n }), this.stream.Io(e => {\n n(() => this.o_(e));\n }), this.stream.onMessage(e => {\n n(() => this.onMessage(e));\n });\n }\n Jo() {\n this.state = 5 /* PersistentStreamState.Backoff */, this.zo.ko(async () => {\n this.state = 0 /* PersistentStreamState.Initial */, this.start();\n });\n }\n // Visible for tests\n o_(e) {\n // In theory the stream could close cleanly, however, in our current model\n // we never expect this to happen because if we stop a stream ourselves,\n // this callback will never be called. To prevent cases where we retry\n // without a backoff accidentally, we set the stream to error in all cases.\n return __PRIVATE_logDebug(\"PersistentStream\", `close with error: ${e}`), this.stream = null, this.close(4 /* PersistentStreamState.Error */, e);\n }\n /**\n * Returns a \"dispatcher\" function that dispatches operations onto the\n * AsyncQueue but only runs them if closeCount remains unchanged. This allows\n * us to turn auth / stream callbacks into no-ops if the stream is closed /\n * re-opened, etc.\n */\n i_(e) {\n return t => {\n this.si.enqueueAndForget(() => this.Uo === e ? t() : (__PRIVATE_logDebug(\"PersistentStream\", \"stream callback skipped by getCloseGuardedDispatcher.\"), Promise.resolve()));\n };\n }\n}\n\n/**\n * A PersistentStream that implements the Listen RPC.\n *\n * Once the Listen stream has called the onOpen() listener, any number of\n * listen() and unlisten() calls can be made to control what changes will be\n * sent from the server for ListenResponses.\n */\nclass __PRIVATE_PersistentListenStream extends __PRIVATE_PersistentStream {\n constructor(e, t, n, r, i, s) {\n super(e, \"listen_stream_connection_backoff\" /* TimerId.ListenStreamConnectionBackoff */, \"listen_stream_idle\" /* TimerId.ListenStreamIdle */, \"health_check_timeout\" /* TimerId.HealthCheckTimeout */, t, n, r, s), this.serializer = i;\n }\n __(e, t) {\n return this.connection.vo(\"Listen\", e, t);\n }\n onMessage(e) {\n // A successful response means the stream is healthy\n this.zo.reset();\n const t = __PRIVATE_fromWatchChange(this.serializer, e),\n n = function __PRIVATE_versionFromListenResponse(e) {\n // We have only reached a consistent snapshot for the entire stream if there\n // is a read_time set and it applies to all targets (i.e. the list of\n // targets is empty). The backend is guaranteed to send such responses.\n if (!(\"targetChange\" in e)) return SnapshotVersion.min();\n const t = e.targetChange;\n return t.targetIds && t.targetIds.length ? SnapshotVersion.min() : t.readTime ? __PRIVATE_fromVersion(t.readTime) : SnapshotVersion.min();\n }(e);\n return this.listener.a_(t, n);\n }\n /**\n * Registers interest in the results of the given target. If the target\n * includes a resumeToken it will be included in the request. Results that\n * affect the target will be streamed back as WatchChange messages that\n * reference the targetId.\n */\n u_(e) {\n const t = {};\n t.database = __PRIVATE_getEncodedDatabaseId(this.serializer), t.addTarget = function __PRIVATE_toTarget(e, t) {\n let n;\n const r = t.target;\n if (n = __PRIVATE_targetIsDocumentTarget(r) ? {\n documents: __PRIVATE_toDocumentsTarget(e, r)\n } : {\n query: __PRIVATE_toQueryTarget(e, r)\n }, n.targetId = t.targetId, t.resumeToken.approximateByteSize() > 0) {\n n.resumeToken = __PRIVATE_toBytes(e, t.resumeToken);\n const r = __PRIVATE_toInt32Proto(e, t.expectedCount);\n null !== r && (n.expectedCount = r);\n } else if (t.snapshotVersion.compareTo(SnapshotVersion.min()) > 0) {\n // TODO(wuandy): Consider removing above check because it is most likely true.\n // Right now, many tests depend on this behaviour though (leaving min() out\n // of serialization).\n n.readTime = toTimestamp(e, t.snapshotVersion.toTimestamp());\n const r = __PRIVATE_toInt32Proto(e, t.expectedCount);\n null !== r && (n.expectedCount = r);\n }\n return n;\n }(this.serializer, e);\n const n = __PRIVATE_toListenRequestLabels(this.serializer, e);\n n && (t.labels = n), this.e_(t);\n }\n /**\n * Unregisters interest in the results of the target associated with the\n * given targetId.\n */\n c_(e) {\n const t = {};\n t.database = __PRIVATE_getEncodedDatabaseId(this.serializer), t.removeTarget = e, this.e_(t);\n }\n}\n\n/**\n * A Stream that implements the Write RPC.\n *\n * The Write RPC requires the caller to maintain special streamToken\n * state in between calls, to help the server understand which responses the\n * client has processed by the time the next request is made. Every response\n * will contain a streamToken; this value must be passed to the next\n * request.\n *\n * After calling start() on this stream, the next request must be a handshake,\n * containing whatever streamToken is on hand. Once a response to this\n * request is received, all pending mutations may be submitted. When\n * submitting multiple batches of mutations at the same time, it's\n * okay to use the same streamToken for the calls to writeMutations.\n *\n * TODO(b/33271235): Use proto types\n */\nclass __PRIVATE_PersistentWriteStream extends __PRIVATE_PersistentStream {\n constructor(e, t, n, r, i, s) {\n super(e, \"write_stream_connection_backoff\" /* TimerId.WriteStreamConnectionBackoff */, \"write_stream_idle\" /* TimerId.WriteStreamIdle */, \"health_check_timeout\" /* TimerId.HealthCheckTimeout */, t, n, r, s), this.serializer = i, this.l_ = !1;\n }\n /**\n * Tracks whether or not a handshake has been successfully exchanged and\n * the stream is ready to accept mutations.\n */\n get h_() {\n return this.l_;\n }\n // Override of PersistentStream.start\n start() {\n this.l_ = !1, this.lastStreamToken = void 0, super.start();\n }\n r_() {\n this.l_ && this.P_([]);\n }\n __(e, t) {\n return this.connection.vo(\"Write\", e, t);\n }\n onMessage(e) {\n if (\n // Always capture the last stream token.\n __PRIVATE_hardAssert(!!e.streamToken), this.lastStreamToken = e.streamToken, this.l_) {\n // A successful first write response means the stream is healthy,\n // Note, that we could consider a successful handshake healthy, however,\n // the write itself might be causing an error we want to back off from.\n this.zo.reset();\n const t = __PRIVATE_fromWriteResults(e.writeResults, e.commitTime),\n n = __PRIVATE_fromVersion(e.commitTime);\n return this.listener.I_(n, t);\n }\n // The first response is always the handshake response\n return __PRIVATE_hardAssert(!e.writeResults || 0 === e.writeResults.length), this.l_ = !0, this.listener.T_();\n }\n /**\n * Sends an initial streamToken to the server, performing the handshake\n * required to make the StreamingWrite RPC work. Subsequent\n * calls should wait until onHandshakeComplete was called.\n */\n E_() {\n // TODO(dimond): Support stream resumption. We intentionally do not set the\n // stream token on the handshake, ignoring any stream token we might have.\n const e = {};\n e.database = __PRIVATE_getEncodedDatabaseId(this.serializer), this.e_(e);\n }\n /** Sends a group of mutations to the Firestore backend to apply. */\n P_(e) {\n const t = {\n streamToken: this.lastStreamToken,\n writes: e.map(e => toMutation(this.serializer, e))\n };\n this.e_(t);\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Datastore and its related methods are a wrapper around the external Google\n * Cloud Datastore grpc API, which provides an interface that is more convenient\n * for the rest of the client SDK architecture to consume.\n */\n/**\n * An implementation of Datastore that exposes additional state for internal\n * consumption.\n */\nclass __PRIVATE_DatastoreImpl extends class Datastore {} {\n constructor(e, t, n, r) {\n super(), this.authCredentials = e, this.appCheckCredentials = t, this.connection = n, this.serializer = r, this.d_ = !1;\n }\n A_() {\n if (this.d_) throw new FirestoreError(D.FAILED_PRECONDITION, \"The client has already been terminated.\");\n }\n /** Invokes the provided RPC with auth and AppCheck tokens. */\n wo(e, t, n) {\n return this.A_(), Promise.all([this.authCredentials.getToken(), this.appCheckCredentials.getToken()]).then(([r, i]) => this.connection.wo(e, t, n, r, i)).catch(e => {\n throw \"FirebaseError\" === e.name ? (e.code === D.UNAUTHENTICATED && (this.authCredentials.invalidateToken(), this.appCheckCredentials.invalidateToken()), e) : new FirestoreError(D.UNKNOWN, e.toString());\n });\n }\n /** Invokes the provided RPC with streamed results with auth and AppCheck tokens. */\n Co(e, t, n, r) {\n return this.A_(), Promise.all([this.authCredentials.getToken(), this.appCheckCredentials.getToken()]).then(([i, s]) => this.connection.Co(e, t, n, i, s, r)).catch(e => {\n throw \"FirebaseError\" === e.name ? (e.code === D.UNAUTHENTICATED && (this.authCredentials.invalidateToken(), this.appCheckCredentials.invalidateToken()), e) : new FirestoreError(D.UNKNOWN, e.toString());\n });\n }\n terminate() {\n this.d_ = !0;\n }\n}\n\n// TODO(firestorexp): Make sure there is only one Datastore instance per\n// firestore-exp client.\nasync function __PRIVATE_invokeRunAggregationQueryRpc(e, t, n) {\n var r;\n const i = __PRIVATE_debugCast(e),\n {\n request: s,\n R_: o\n } = function __PRIVATE_toRunAggregationQueryRequest(e, t, n) {\n const r = __PRIVATE_toQueryTarget(e, t),\n i = {},\n s = [];\n let o = 0;\n return n.forEach(e => {\n // Map all client-side aliases to a unique short-form\n // alias. This avoids issues with client-side aliases that\n // exceed the 1500-byte string size limit.\n const t = \"aggregate_\" + o++;\n i[t] = e.alias, \"count\" === e.aggregateType ? s.push({\n alias: t,\n count: {}\n }) : \"avg\" === e.aggregateType ? s.push({\n alias: t,\n avg: {\n field: __PRIVATE_toFieldPathReference(e.fieldPath)\n }\n }) : \"sum\" === e.aggregateType && s.push({\n alias: t,\n sum: {\n field: __PRIVATE_toFieldPathReference(e.fieldPath)\n }\n });\n }), {\n request: {\n structuredAggregationQuery: {\n aggregations: s,\n structuredQuery: r.structuredQuery\n },\n parent: r.parent\n },\n R_: i\n };\n }(i.serializer, function __PRIVATE_queryToAggregateTarget(e) {\n const t = __PRIVATE_debugCast(e);\n return t.Pe || (\n // Do not include implicit order-bys for aggregate queries.\n t.Pe = __PRIVATE__queryToTarget(t, e.explicitOrderBy)), t.Pe;\n }(t), n),\n _ = s.parent;\n i.connection.yo || delete s.parent;\n const a = (await i.Co(\"RunAggregationQuery\", _, s, /*expectedResponseCount=*/1)).filter(e => !!e.result);\n // Omit RunAggregationQueryResponse that only contain readTimes.\n __PRIVATE_hardAssert(1 === a.length);\n // Remap the short-form aliases that were sent to the server\n // to the client-side aliases. Users will access the results\n // using the client-side alias.\n const u = null === (r = a[0].result) || void 0 === r ? void 0 : r.aggregateFields;\n return Object.keys(u).reduce((e, t) => (e[o[t]] = u[t], e), {});\n}\n\n/**\n * A component used by the RemoteStore to track the OnlineState (that is,\n * whether or not the client as a whole should be considered to be online or\n * offline), implementing the appropriate heuristics.\n *\n * In particular, when the client is trying to connect to the backend, we\n * allow up to MAX_WATCH_STREAM_FAILURES within ONLINE_STATE_TIMEOUT_MS for\n * a connection to succeed. If we have too many failures or the timeout elapses,\n * then we set the OnlineState to Offline, and the client will behave as if\n * it is offline (get()s will return cached data, etc.).\n */\nclass __PRIVATE_OnlineStateTracker {\n constructor(e, t) {\n this.asyncQueue = e, this.onlineStateHandler = t, /** The current OnlineState. */\n this.state = \"Unknown\" /* OnlineState.Unknown */,\n /**\n * A count of consecutive failures to open the stream. If it reaches the\n * maximum defined by MAX_WATCH_STREAM_FAILURES, we'll set the OnlineState to\n * Offline.\n */\n this.V_ = 0,\n /**\n * A timer that elapses after ONLINE_STATE_TIMEOUT_MS, at which point we\n * transition from OnlineState.Unknown to OnlineState.Offline without waiting\n * for the stream to actually fail (MAX_WATCH_STREAM_FAILURES times).\n */\n this.m_ = null,\n /**\n * Whether the client should log a warning message if it fails to connect to\n * the backend (initially true, cleared after a successful stream, or if we've\n * logged the message already).\n */\n this.f_ = !0;\n }\n /**\n * Called by RemoteStore when a watch stream is started (including on each\n * backoff attempt).\n *\n * If this is the first attempt, it sets the OnlineState to Unknown and starts\n * the onlineStateTimer.\n */\n g_() {\n 0 === this.V_ && (this.p_(\"Unknown\" /* OnlineState.Unknown */), this.m_ = this.asyncQueue.enqueueAfterDelay(\"online_state_timeout\" /* TimerId.OnlineStateTimeout */, 1e4, () => (this.m_ = null, this.y_(\"Backend didn't respond within 10 seconds.\"), this.p_(\"Offline\" /* OnlineState.Offline */), Promise.resolve())));\n }\n /**\n * Updates our OnlineState as appropriate after the watch stream reports a\n * failure. The first failure moves us to the 'Unknown' state. We then may\n * allow multiple failures (based on MAX_WATCH_STREAM_FAILURES) before we\n * actually transition to the 'Offline' state.\n */\n w_(e) {\n \"Online\" /* OnlineState.Online */ === this.state ? this.p_(\"Unknown\" /* OnlineState.Unknown */) : (this.V_++, this.V_ >= 1 && (this.S_(), this.y_(`Connection failed 1 times. Most recent error: ${e.toString()}`), this.p_(\"Offline\" /* OnlineState.Offline */)));\n }\n /**\n * Explicitly sets the OnlineState to the specified state.\n *\n * Note that this resets our timers / failure counters, etc. used by our\n * Offline heuristics, so must not be used in place of\n * handleWatchStreamStart() and handleWatchStreamFailure().\n */\n set(e) {\n this.S_(), this.V_ = 0, \"Online\" /* OnlineState.Online */ === e && (\n // We've connected to watch at least once. Don't warn the developer\n // about being offline going forward.\n this.f_ = !1), this.p_(e);\n }\n p_(e) {\n e !== this.state && (this.state = e, this.onlineStateHandler(e));\n }\n y_(e) {\n const t = `Could not reach Cloud Firestore backend. ${e}\\nThis typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.`;\n this.f_ ? (__PRIVATE_logError(t), this.f_ = !1) : __PRIVATE_logDebug(\"OnlineStateTracker\", t);\n }\n S_() {\n null !== this.m_ && (this.m_.cancel(), this.m_ = null);\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass __PRIVATE_RemoteStoreImpl {\n constructor(\n /**\n * The local store, used to fill the write pipeline with outbound mutations.\n */\n e, /** The client-side proxy for interacting with the backend. */\n t, n, r, i) {\n this.localStore = e, this.datastore = t, this.asyncQueue = n, this.remoteSyncer = {},\n /**\n * A list of up to MAX_PENDING_WRITES writes that we have fetched from the\n * LocalStore via fillWritePipeline() and have or will send to the write\n * stream.\n *\n * Whenever writePipeline.length > 0 the RemoteStore will attempt to start or\n * restart the write stream. When the stream is established the writes in the\n * pipeline will be sent in order.\n *\n * Writes remain in writePipeline until they are acknowledged by the backend\n * and thus will automatically be re-sent if the stream is interrupted /\n * restarted before they're acknowledged.\n *\n * Write responses from the backend are linked to their originating request\n * purely based on order, and so we can just shift() writes from the front of\n * the writePipeline as we receive responses.\n */\n this.b_ = [],\n /**\n * A mapping of watched targets that the client cares about tracking and the\n * user has explicitly called a 'listen' for this target.\n *\n * These targets may or may not have been sent to or acknowledged by the\n * server. On re-establishing the listen stream, these targets should be sent\n * to the server. The targets removed with unlistens are removed eagerly\n * without waiting for confirmation from the listen stream.\n */\n this.D_ = new Map(),\n /**\n * A set of reasons for why the RemoteStore may be offline. If empty, the\n * RemoteStore may start its network connections.\n */\n this.C_ = new Set(),\n /**\n * Event handlers that get called when the network is disabled or enabled.\n *\n * PORTING NOTE: These functions are used on the Web client to create the\n * underlying streams (to support tree-shakeable streams). On Android and iOS,\n * the streams are created during construction of RemoteStore.\n */\n this.v_ = [], this.F_ = i, this.F_.ro(e => {\n n.enqueueAndForget(async () => {\n // Porting Note: Unlike iOS, `restartNetwork()` is called even when the\n // network becomes unreachable as we don't have any other way to tear\n // down our streams.\n __PRIVATE_canUseNetwork(this) && (__PRIVATE_logDebug(\"RemoteStore\", \"Restarting streams for network reachability change.\"), await async function __PRIVATE_restartNetwork(e) {\n const t = __PRIVATE_debugCast(e);\n t.C_.add(4 /* OfflineCause.ConnectivityChange */), await __PRIVATE_disableNetworkInternal(t), t.M_.set(\"Unknown\" /* OnlineState.Unknown */), t.C_.delete(4 /* OfflineCause.ConnectivityChange */), await __PRIVATE_enableNetworkInternal(t);\n }(this));\n });\n }), this.M_ = new __PRIVATE_OnlineStateTracker(n, r);\n }\n}\nasync function __PRIVATE_enableNetworkInternal(e) {\n if (__PRIVATE_canUseNetwork(e)) for (const t of e.v_) await t( /* enabled= */!0);\n}\n\n/**\n * Temporarily disables the network. The network can be re-enabled using\n * enableNetwork().\n */\nasync function __PRIVATE_disableNetworkInternal(e) {\n for (const t of e.v_) await t( /* enabled= */!1);\n}\n\n/**\n * Starts new listen for the given target. Uses resume token if provided. It\n * is a no-op if the target of given `TargetData` is already being listened to.\n */\nfunction __PRIVATE_remoteStoreListen(e, t) {\n const n = __PRIVATE_debugCast(e);\n n.D_.has(t.targetId) || (\n // Mark this as something the client is currently listening for.\n n.D_.set(t.targetId, t), __PRIVATE_shouldStartWatchStream(n) ?\n // The listen will be sent in onWatchStreamOpen\n __PRIVATE_startWatchStream(n) : __PRIVATE_ensureWatchStream(n).Ho() && __PRIVATE_sendWatchRequest(n, t));\n}\n\n/**\n * Removes the listen from server. It is a no-op if the given target id is\n * not being listened to.\n */\nfunction __PRIVATE_remoteStoreUnlisten(e, t) {\n const n = __PRIVATE_debugCast(e),\n r = __PRIVATE_ensureWatchStream(n);\n n.D_.delete(t), r.Ho() && __PRIVATE_sendUnwatchRequest(n, t), 0 === n.D_.size && (r.Ho() ? r.Zo() : __PRIVATE_canUseNetwork(n) &&\n // Revert to OnlineState.Unknown if the watch stream is not open and we\n // have no listeners, since without any listens to send we cannot\n // confirm if the stream is healthy and upgrade to OnlineState.Online.\n n.M_.set(\"Unknown\" /* OnlineState.Unknown */));\n}\n\n/**\n * We need to increment the the expected number of pending responses we're due\n * from watch so we wait for the ack to process any messages from this target.\n */\nfunction __PRIVATE_sendWatchRequest(e, t) {\n if (e.x_.Oe(t.targetId), t.resumeToken.approximateByteSize() > 0 || t.snapshotVersion.compareTo(SnapshotVersion.min()) > 0) {\n const n = e.remoteSyncer.getRemoteKeysForTarget(t.targetId).size;\n t = t.withExpectedCount(n);\n }\n __PRIVATE_ensureWatchStream(e).u_(t);\n}\n\n/**\n * We need to increment the expected number of pending responses we're due\n * from watch so we wait for the removal on the server before we process any\n * messages from this target.\n */\nfunction __PRIVATE_sendUnwatchRequest(e, t) {\n e.x_.Oe(t), __PRIVATE_ensureWatchStream(e).c_(t);\n}\nfunction __PRIVATE_startWatchStream(e) {\n e.x_ = new __PRIVATE_WatchChangeAggregator({\n getRemoteKeysForTarget: t => e.remoteSyncer.getRemoteKeysForTarget(t),\n _t: t => e.D_.get(t) || null,\n nt: () => e.datastore.serializer.databaseId\n }), __PRIVATE_ensureWatchStream(e).start(), e.M_.g_();\n}\n\n/**\n * Returns whether the watch stream should be started because it's necessary\n * and has not yet been started.\n */\nfunction __PRIVATE_shouldStartWatchStream(e) {\n return __PRIVATE_canUseNetwork(e) && !__PRIVATE_ensureWatchStream(e).jo() && e.D_.size > 0;\n}\nfunction __PRIVATE_canUseNetwork(e) {\n return 0 === __PRIVATE_debugCast(e).C_.size;\n}\nfunction __PRIVATE_cleanUpWatchStreamState(e) {\n e.x_ = void 0;\n}\nasync function __PRIVATE_onWatchStreamOpen(e) {\n e.D_.forEach((t, n) => {\n __PRIVATE_sendWatchRequest(e, t);\n });\n}\nasync function __PRIVATE_onWatchStreamClose(e, t) {\n __PRIVATE_cleanUpWatchStreamState(e),\n // If we still need the watch stream, retry the connection.\n __PRIVATE_shouldStartWatchStream(e) ? (e.M_.w_(t), __PRIVATE_startWatchStream(e)) :\n // No need to restart watch stream because there are no active targets.\n // The online state is set to unknown because there is no active attempt\n // at establishing a connection\n e.M_.set(\"Unknown\" /* OnlineState.Unknown */);\n}\nasync function __PRIVATE_onWatchStreamChange(e, t, n) {\n if (\n // Mark the client as online since we got a message from the server\n e.M_.set(\"Online\" /* OnlineState.Online */), t instanceof __PRIVATE_WatchTargetChange && 2 /* WatchTargetChangeState.Removed */ === t.state && t.cause)\n // There was an error on a target, don't wait for a consistent snapshot\n // to raise events\n try {\n await /** Handles an error on a target */(\n async function __PRIVATE_handleTargetError(e, t) {\n const n = t.cause;\n for (const r of t.targetIds)\n // A watched target might have been removed already.\n e.D_.has(r) && (await e.remoteSyncer.rejectListen(r, n), e.D_.delete(r), e.x_.removeTarget(r));\n }\n /**\n * Attempts to fill our write pipeline with writes from the LocalStore.\n *\n * Called internally to bootstrap or refill the write pipeline and by\n * SyncEngine whenever there are new mutations to process.\n *\n * Starts the write stream if necessary.\n */(e, t)\n );\n } catch (n) {\n __PRIVATE_logDebug(\"RemoteStore\", \"Failed to remove targets %s: %s \", t.targetIds.join(\",\"), n), await __PRIVATE_disableNetworkUntilRecovery(e, n);\n } else if (t instanceof __PRIVATE_DocumentWatchChange ? e.x_.$e(t) : t instanceof __PRIVATE_ExistenceFilterChange ? e.x_.Je(t) : e.x_.Ge(t), !n.isEqual(SnapshotVersion.min())) try {\n const t = await __PRIVATE_localStoreGetLastRemoteSnapshotVersion(e.localStore);\n n.compareTo(t) >= 0 && (\n // We have received a target change with a global snapshot if the snapshot\n // version is not equal to SnapshotVersion.min().\n await (\n /**\n * Takes a batch of changes from the Datastore, repackages them as a\n * RemoteEvent, and passes that on to the listener, which is typically the\n * SyncEngine.\n */\n function __PRIVATE_raiseWatchSnapshot(e, t) {\n const n = e.x_.it(t);\n // Update in-memory resume tokens. LocalStore will update the\n // persistent view of these when applying the completed RemoteEvent.\n return n.targetChanges.forEach((n, r) => {\n if (n.resumeToken.approximateByteSize() > 0) {\n const i = e.D_.get(r);\n // A watched target might have been removed already.\n i && e.D_.set(r, i.withResumeToken(n.resumeToken, t));\n }\n }),\n // Re-establish listens for the targets that have been invalidated by\n // existence filter mismatches.\n n.targetMismatches.forEach((t, n) => {\n const r = e.D_.get(t);\n if (!r)\n // A watched target might have been removed already.\n return;\n // Clear the resume token for the target, since we're in a known mismatch\n // state.\n e.D_.set(t, r.withResumeToken(ByteString.EMPTY_BYTE_STRING, r.snapshotVersion)),\n // Cause a hard reset by unwatching and rewatching immediately, but\n // deliberately don't send a resume token so that we get a full update.\n __PRIVATE_sendUnwatchRequest(e, t);\n // Mark the target we send as being on behalf of an existence filter\n // mismatch, but don't actually retain that in listenTargets. This ensures\n // that we flag the first re-listen this way without impacting future\n // listens of this target (that might happen e.g. on reconnect).\n const i = new TargetData(r.target, t, n, r.sequenceNumber);\n __PRIVATE_sendWatchRequest(e, i);\n }), e.remoteSyncer.applyRemoteEvent(n);\n }(e, n)\n ));\n } catch (t) {\n __PRIVATE_logDebug(\"RemoteStore\", \"Failed to raise snapshot:\", t), await __PRIVATE_disableNetworkUntilRecovery(e, t);\n }\n}\n\n/**\n * Recovery logic for IndexedDB errors that takes the network offline until\n * `op` succeeds. Retries are scheduled with backoff using\n * `enqueueRetryable()`. If `op()` is not provided, IndexedDB access is\n * validated via a generic operation.\n *\n * The returned Promise is resolved once the network is disabled and before\n * any retry attempt.\n */\nasync function __PRIVATE_disableNetworkUntilRecovery(e, t, n) {\n if (!__PRIVATE_isIndexedDbTransactionError(t)) throw t;\n e.C_.add(1 /* OfflineCause.IndexedDbFailed */),\n // Disable network and raise offline snapshots\n await __PRIVATE_disableNetworkInternal(e), e.M_.set(\"Offline\" /* OnlineState.Offline */), n || (\n // Use a simple read operation to determine if IndexedDB recovered.\n // Ideally, we would expose a health check directly on SimpleDb, but\n // RemoteStore only has access to persistence through LocalStore.\n n = () => __PRIVATE_localStoreGetLastRemoteSnapshotVersion(e.localStore)),\n // Probe IndexedDB periodically and re-enable network\n e.asyncQueue.enqueueRetryable(async () => {\n __PRIVATE_logDebug(\"RemoteStore\", \"Retrying IndexedDB access\"), await n(), e.C_.delete(1 /* OfflineCause.IndexedDbFailed */), await __PRIVATE_enableNetworkInternal(e);\n });\n}\n\n/**\n * Executes `op`. If `op` fails, takes the network offline until `op`\n * succeeds. Returns after the first attempt.\n */\nfunction __PRIVATE_executeWithRecovery(e, t) {\n return t().catch(n => __PRIVATE_disableNetworkUntilRecovery(e, n, t));\n}\nasync function __PRIVATE_fillWritePipeline(e) {\n const t = __PRIVATE_debugCast(e),\n n = __PRIVATE_ensureWriteStream(t);\n let r = t.b_.length > 0 ? t.b_[t.b_.length - 1].batchId : -1;\n for (; __PRIVATE_canAddToWritePipeline(t);) try {\n const e = await __PRIVATE_localStoreGetNextMutationBatch(t.localStore, r);\n if (null === e) {\n 0 === t.b_.length && n.Zo();\n break;\n }\n r = e.batchId, __PRIVATE_addToWritePipeline(t, e);\n } catch (e) {\n await __PRIVATE_disableNetworkUntilRecovery(t, e);\n }\n __PRIVATE_shouldStartWriteStream(t) && __PRIVATE_startWriteStream(t);\n}\n\n/**\n * Returns true if we can add to the write pipeline (i.e. the network is\n * enabled and the write pipeline is not full).\n */\nfunction __PRIVATE_canAddToWritePipeline(e) {\n return __PRIVATE_canUseNetwork(e) && e.b_.length < 10;\n}\n\n/**\n * Queues additional writes to be sent to the write stream, sending them\n * immediately if the write stream is established.\n */\nfunction __PRIVATE_addToWritePipeline(e, t) {\n e.b_.push(t);\n const n = __PRIVATE_ensureWriteStream(e);\n n.Ho() && n.h_ && n.P_(t.mutations);\n}\nfunction __PRIVATE_shouldStartWriteStream(e) {\n return __PRIVATE_canUseNetwork(e) && !__PRIVATE_ensureWriteStream(e).jo() && e.b_.length > 0;\n}\nfunction __PRIVATE_startWriteStream(e) {\n __PRIVATE_ensureWriteStream(e).start();\n}\nasync function __PRIVATE_onWriteStreamOpen(e) {\n __PRIVATE_ensureWriteStream(e).E_();\n}\nasync function __PRIVATE_onWriteHandshakeComplete(e) {\n const t = __PRIVATE_ensureWriteStream(e);\n // Send the write pipeline now that the stream is established.\n for (const n of e.b_) t.P_(n.mutations);\n}\nasync function __PRIVATE_onMutationResult(e, t, n) {\n const r = e.b_.shift(),\n i = MutationBatchResult.from(r, t, n);\n await __PRIVATE_executeWithRecovery(e, () => e.remoteSyncer.applySuccessfulWrite(i)),\n // It's possible that with the completion of this mutation another\n // slot has freed up.\n await __PRIVATE_fillWritePipeline(e);\n}\nasync function __PRIVATE_onWriteStreamClose(e, t) {\n // If the write stream closed after the write handshake completes, a write\n // operation failed and we fail the pending operation.\n t && __PRIVATE_ensureWriteStream(e).h_ && (\n // This error affects the actual write.\n await async function __PRIVATE_handleWriteError(e, t) {\n // Only handle permanent errors here. If it's transient, just let the retry\n // logic kick in.\n if (function __PRIVATE_isPermanentWriteError(e) {\n return __PRIVATE_isPermanentError(e) && e !== D.ABORTED;\n }(t.code)) {\n // This was a permanent error, the request itself was the problem\n // so it's not going to succeed if we resend it.\n const n = e.b_.shift();\n // In this case it's also unlikely that the server itself is melting\n // down -- this was just a bad request so inhibit backoff on the next\n // restart.\n __PRIVATE_ensureWriteStream(e).Yo(), await __PRIVATE_executeWithRecovery(e, () => e.remoteSyncer.rejectFailedWrite(n.batchId, t)),\n // It's possible that with the completion of this mutation\n // another slot has freed up.\n await __PRIVATE_fillWritePipeline(e);\n }\n }(e, t)),\n // The write stream might have been started by refilling the write\n // pipeline for failed writes\n __PRIVATE_shouldStartWriteStream(e) && __PRIVATE_startWriteStream(e);\n}\nasync function __PRIVATE_remoteStoreHandleCredentialChange(e, t) {\n const n = __PRIVATE_debugCast(e);\n n.asyncQueue.verifyOperationInProgress(), __PRIVATE_logDebug(\"RemoteStore\", \"RemoteStore received new credentials\");\n const r = __PRIVATE_canUseNetwork(n);\n // Tear down and re-create our network streams. This will ensure we get a\n // fresh auth token for the new user and re-fill the write pipeline with\n // new mutations from the LocalStore (since mutations are per-user).\n n.C_.add(3 /* OfflineCause.CredentialChange */), await __PRIVATE_disableNetworkInternal(n), r &&\n // Don't set the network status to Unknown if we are offline.\n n.M_.set(\"Unknown\" /* OnlineState.Unknown */), await n.remoteSyncer.handleCredentialChange(t), n.C_.delete(3 /* OfflineCause.CredentialChange */), await __PRIVATE_enableNetworkInternal(n);\n}\n\n/**\n * Toggles the network state when the client gains or loses its primary lease.\n */\nasync function __PRIVATE_remoteStoreApplyPrimaryState(e, t) {\n const n = __PRIVATE_debugCast(e);\n t ? (n.C_.delete(2 /* OfflineCause.IsSecondary */), await __PRIVATE_enableNetworkInternal(n)) : t || (n.C_.add(2 /* OfflineCause.IsSecondary */), await __PRIVATE_disableNetworkInternal(n), n.M_.set(\"Unknown\" /* OnlineState.Unknown */));\n}\n\n/**\n * If not yet initialized, registers the WatchStream and its network state\n * callback with `remoteStoreImpl`. Returns the existing stream if one is\n * already available.\n *\n * PORTING NOTE: On iOS and Android, the WatchStream gets registered on startup.\n * This is not done on Web to allow it to be tree-shaken.\n */\nfunction __PRIVATE_ensureWatchStream(e) {\n return e.O_ || (\n // Create stream (but note that it is not started yet).\n e.O_ = function __PRIVATE_newPersistentWatchStream(e, t, n) {\n const r = __PRIVATE_debugCast(e);\n return r.A_(), new __PRIVATE_PersistentListenStream(t, r.connection, r.authCredentials, r.appCheckCredentials, r.serializer, n);\n }\n /**\n * @license\n * Copyright 2018 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */(e.datastore, e.asyncQueue, {\n ho: __PRIVATE_onWatchStreamOpen.bind(null, e),\n Io: __PRIVATE_onWatchStreamClose.bind(null, e),\n a_: __PRIVATE_onWatchStreamChange.bind(null, e)\n }), e.v_.push(async t => {\n t ? (e.O_.Yo(), __PRIVATE_shouldStartWatchStream(e) ? __PRIVATE_startWatchStream(e) : e.M_.set(\"Unknown\" /* OnlineState.Unknown */)) : (await e.O_.stop(), __PRIVATE_cleanUpWatchStreamState(e));\n })), e.O_;\n}\n\n/**\n * If not yet initialized, registers the WriteStream and its network state\n * callback with `remoteStoreImpl`. Returns the existing stream if one is\n * already available.\n *\n * PORTING NOTE: On iOS and Android, the WriteStream gets registered on startup.\n * This is not done on Web to allow it to be tree-shaken.\n */\nfunction __PRIVATE_ensureWriteStream(e) {\n return e.N_ || (\n // Create stream (but note that it is not started yet).\n e.N_ = function __PRIVATE_newPersistentWriteStream(e, t, n) {\n const r = __PRIVATE_debugCast(e);\n return r.A_(), new __PRIVATE_PersistentWriteStream(t, r.connection, r.authCredentials, r.appCheckCredentials, r.serializer, n);\n }(e.datastore, e.asyncQueue, {\n ho: __PRIVATE_onWriteStreamOpen.bind(null, e),\n Io: __PRIVATE_onWriteStreamClose.bind(null, e),\n T_: __PRIVATE_onWriteHandshakeComplete.bind(null, e),\n I_: __PRIVATE_onMutationResult.bind(null, e)\n }), e.v_.push(async t => {\n t ? (e.N_.Yo(),\n // This will start the write stream if necessary.\n await __PRIVATE_fillWritePipeline(e)) : (await e.N_.stop(), e.b_.length > 0 && (__PRIVATE_logDebug(\"RemoteStore\", `Stopping write stream with ${e.b_.length} pending writes`), e.b_ = []));\n })), e.N_;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Represents an operation scheduled to be run in the future on an AsyncQueue.\n *\n * It is created via DelayedOperation.createAndSchedule().\n *\n * Supports cancellation (via cancel()) and early execution (via skipDelay()).\n *\n * Note: We implement `PromiseLike` instead of `Promise`, as the `Promise` type\n * in newer versions of TypeScript defines `finally`, which is not available in\n * IE.\n */\nclass DelayedOperation {\n constructor(e, t, n, r, i) {\n this.asyncQueue = e, this.timerId = t, this.targetTimeMs = n, this.op = r, this.removalCallback = i, this.deferred = new __PRIVATE_Deferred(), this.then = this.deferred.promise.then.bind(this.deferred.promise),\n // It's normal for the deferred promise to be canceled (due to cancellation)\n // and so we attach a dummy catch callback to avoid\n // 'UnhandledPromiseRejectionWarning' log spam.\n this.deferred.promise.catch(e => {});\n }\n get promise() {\n return this.deferred.promise;\n }\n /**\n * Creates and returns a DelayedOperation that has been scheduled to be\n * executed on the provided asyncQueue after the provided delayMs.\n *\n * @param asyncQueue - The queue to schedule the operation on.\n * @param id - A Timer ID identifying the type of operation this is.\n * @param delayMs - The delay (ms) before the operation should be scheduled.\n * @param op - The operation to run.\n * @param removalCallback - A callback to be called synchronously once the\n * operation is executed or canceled, notifying the AsyncQueue to remove it\n * from its delayedOperations list.\n * PORTING NOTE: This exists to prevent making removeDelayedOperation() and\n * the DelayedOperation class public.\n */\n static createAndSchedule(e, t, n, r, i) {\n const s = Date.now() + n,\n o = new DelayedOperation(e, t, s, r, i);\n return o.start(n), o;\n }\n /**\n * Starts the timer. This is called immediately after construction by\n * createAndSchedule().\n */\n start(e) {\n this.timerHandle = setTimeout(() => this.handleDelayElapsed(), e);\n }\n /**\n * Queues the operation to run immediately (if it hasn't already been run or\n * canceled).\n */\n skipDelay() {\n return this.handleDelayElapsed();\n }\n /**\n * Cancels the operation if it hasn't already been executed or canceled. The\n * promise will be rejected.\n *\n * As long as the operation has not yet been run, calling cancel() provides a\n * guarantee that the operation will not be run.\n */\n cancel(e) {\n null !== this.timerHandle && (this.clearTimeout(), this.deferred.reject(new FirestoreError(D.CANCELLED, \"Operation cancelled\" + (e ? \": \" + e : \"\"))));\n }\n handleDelayElapsed() {\n this.asyncQueue.enqueueAndForget(() => null !== this.timerHandle ? (this.clearTimeout(), this.op().then(e => this.deferred.resolve(e))) : Promise.resolve());\n }\n clearTimeout() {\n null !== this.timerHandle && (this.removalCallback(this), clearTimeout(this.timerHandle), this.timerHandle = null);\n }\n}\n\n/**\n * Returns a FirestoreError that can be surfaced to the user if the provided\n * error is an IndexedDbTransactionError. Re-throws the error otherwise.\n */\nfunction __PRIVATE_wrapInUserErrorIfRecoverable(e, t) {\n if (__PRIVATE_logError(\"AsyncQueue\", `${t}: ${e}`), __PRIVATE_isIndexedDbTransactionError(e)) return new FirestoreError(D.UNAVAILABLE, `${t}: ${e}`);\n throw e;\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * DocumentSet is an immutable (copy-on-write) collection that holds documents\n * in order specified by the provided comparator. We always add a document key\n * comparator on top of what is provided to guarantee document equality based on\n * the key.\n */\nclass DocumentSet {\n /** The default ordering is by key if the comparator is omitted */\n constructor(e) {\n // We are adding document key comparator to the end as it's the only\n // guaranteed unique property of a document.\n this.comparator = e ? (t, n) => e(t, n) || DocumentKey.comparator(t.key, n.key) : (e, t) => DocumentKey.comparator(e.key, t.key), this.keyedMap = documentMap(), this.sortedSet = new SortedMap(this.comparator);\n }\n /**\n * Returns an empty copy of the existing DocumentSet, using the same\n * comparator.\n */\n static emptySet(e) {\n return new DocumentSet(e.comparator);\n }\n has(e) {\n return null != this.keyedMap.get(e);\n }\n get(e) {\n return this.keyedMap.get(e);\n }\n first() {\n return this.sortedSet.minKey();\n }\n last() {\n return this.sortedSet.maxKey();\n }\n isEmpty() {\n return this.sortedSet.isEmpty();\n }\n /**\n * Returns the index of the provided key in the document set, or -1 if the\n * document key is not present in the set;\n */\n indexOf(e) {\n const t = this.keyedMap.get(e);\n return t ? this.sortedSet.indexOf(t) : -1;\n }\n get size() {\n return this.sortedSet.size;\n }\n /** Iterates documents in order defined by \"comparator\" */\n forEach(e) {\n this.sortedSet.inorderTraversal((t, n) => (e(t), !1));\n }\n /** Inserts or updates a document with the same key */\n add(e) {\n // First remove the element if we have it.\n const t = this.delete(e.key);\n return t.copy(t.keyedMap.insert(e.key, e), t.sortedSet.insert(e, null));\n }\n /** Deletes a document with a given key */\n delete(e) {\n const t = this.get(e);\n return t ? this.copy(this.keyedMap.remove(e), this.sortedSet.remove(t)) : this;\n }\n isEqual(e) {\n if (!(e instanceof DocumentSet)) return !1;\n if (this.size !== e.size) return !1;\n const t = this.sortedSet.getIterator(),\n n = e.sortedSet.getIterator();\n for (; t.hasNext();) {\n const e = t.getNext().key,\n r = n.getNext().key;\n if (!e.isEqual(r)) return !1;\n }\n return !0;\n }\n toString() {\n const e = [];\n return this.forEach(t => {\n e.push(t.toString());\n }), 0 === e.length ? \"DocumentSet ()\" : \"DocumentSet (\\n \" + e.join(\" \\n\") + \"\\n)\";\n }\n copy(e, t) {\n const n = new DocumentSet();\n return n.comparator = this.comparator, n.keyedMap = e, n.sortedSet = t, n;\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * DocumentChangeSet keeps track of a set of changes to docs in a query, merging\n * duplicate events for the same doc.\n */\nclass __PRIVATE_DocumentChangeSet {\n constructor() {\n this.B_ = new SortedMap(DocumentKey.comparator);\n }\n track(e) {\n const t = e.doc.key,\n n = this.B_.get(t);\n n ?\n // Merge the new change with the existing change.\n 0 /* ChangeType.Added */ !== e.type && 3 /* ChangeType.Metadata */ === n.type ? this.B_ = this.B_.insert(t, e) : 3 /* ChangeType.Metadata */ === e.type && 1 /* ChangeType.Removed */ !== n.type ? this.B_ = this.B_.insert(t, {\n type: n.type,\n doc: e.doc\n }) : 2 /* ChangeType.Modified */ === e.type && 2 /* ChangeType.Modified */ === n.type ? this.B_ = this.B_.insert(t, {\n type: 2 /* ChangeType.Modified */,\n doc: e.doc\n }) : 2 /* ChangeType.Modified */ === e.type && 0 /* ChangeType.Added */ === n.type ? this.B_ = this.B_.insert(t, {\n type: 0 /* ChangeType.Added */,\n doc: e.doc\n }) : 1 /* ChangeType.Removed */ === e.type && 0 /* ChangeType.Added */ === n.type ? this.B_ = this.B_.remove(t) : 1 /* ChangeType.Removed */ === e.type && 2 /* ChangeType.Modified */ === n.type ? this.B_ = this.B_.insert(t, {\n type: 1 /* ChangeType.Removed */,\n doc: n.doc\n }) : 0 /* ChangeType.Added */ === e.type && 1 /* ChangeType.Removed */ === n.type ? this.B_ = this.B_.insert(t, {\n type: 2 /* ChangeType.Modified */,\n doc: e.doc\n }) :\n // This includes these cases, which don't make sense:\n // Added->Added\n // Removed->Removed\n // Modified->Added\n // Removed->Modified\n // Metadata->Added\n // Removed->Metadata\n fail() : this.B_ = this.B_.insert(t, e);\n }\n L_() {\n const e = [];\n return this.B_.inorderTraversal((t, n) => {\n e.push(n);\n }), e;\n }\n}\nclass ViewSnapshot {\n constructor(e, t, n, r, i, s, o, _, a) {\n this.query = e, this.docs = t, this.oldDocs = n, this.docChanges = r, this.mutatedKeys = i, this.fromCache = s, this.syncStateChanged = o, this.excludesMetadataChanges = _, this.hasCachedResults = a;\n }\n /** Returns a view snapshot as if all documents in the snapshot were added. */\n static fromInitialDocuments(e, t, n, r, i) {\n const s = [];\n return t.forEach(e => {\n s.push({\n type: 0 /* ChangeType.Added */,\n doc: e\n });\n }), new ViewSnapshot(e, t, DocumentSet.emptySet(t), s, n, r, /* syncStateChanged= */!0, /* excludesMetadataChanges= */!1, i);\n }\n get hasPendingWrites() {\n return !this.mutatedKeys.isEmpty();\n }\n isEqual(e) {\n if (!(this.fromCache === e.fromCache && this.hasCachedResults === e.hasCachedResults && this.syncStateChanged === e.syncStateChanged && this.mutatedKeys.isEqual(e.mutatedKeys) && __PRIVATE_queryEquals(this.query, e.query) && this.docs.isEqual(e.docs) && this.oldDocs.isEqual(e.oldDocs))) return !1;\n const t = this.docChanges,\n n = e.docChanges;\n if (t.length !== n.length) return !1;\n for (let e = 0; e < t.length; e++) if (t[e].type !== n[e].type || !t[e].doc.isEqual(n[e].doc)) return !1;\n return !0;\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Holds the listeners and the last received ViewSnapshot for a query being\n * tracked by EventManager.\n */\nclass __PRIVATE_QueryListenersInfo {\n constructor() {\n this.k_ = void 0, this.listeners = [];\n }\n}\nclass __PRIVATE_EventManagerImpl {\n constructor() {\n this.queries = new ObjectMap(e => __PRIVATE_canonifyQuery(e), __PRIVATE_queryEquals), this.onlineState = \"Unknown\" /* OnlineState.Unknown */, this.q_ = new Set();\n }\n}\nasync function __PRIVATE_eventManagerListen(e, t) {\n const n = __PRIVATE_debugCast(e),\n r = t.query;\n let i = !1,\n s = n.queries.get(r);\n if (s || (i = !0, s = new __PRIVATE_QueryListenersInfo()), i) try {\n s.k_ = await n.onListen(r);\n } catch (e) {\n const n = __PRIVATE_wrapInUserErrorIfRecoverable(e, `Initialization of query '${__PRIVATE_stringifyQuery(t.query)}' failed`);\n return void t.onError(n);\n }\n if (n.queries.set(r, s), s.listeners.push(t),\n // Run global snapshot listeners if a consistent snapshot has been emitted.\n t.Q_(n.onlineState), s.k_) {\n t.K_(s.k_) && __PRIVATE_raiseSnapshotsInSyncEvent(n);\n }\n}\nasync function __PRIVATE_eventManagerUnlisten(e, t) {\n const n = __PRIVATE_debugCast(e),\n r = t.query;\n let i = !1;\n const s = n.queries.get(r);\n if (s) {\n const e = s.listeners.indexOf(t);\n e >= 0 && (s.listeners.splice(e, 1), i = 0 === s.listeners.length);\n }\n if (i) return n.queries.delete(r), n.onUnlisten(r);\n}\nfunction __PRIVATE_eventManagerOnWatchChange(e, t) {\n const n = __PRIVATE_debugCast(e);\n let r = !1;\n for (const e of t) {\n const t = e.query,\n i = n.queries.get(t);\n if (i) {\n for (const t of i.listeners) t.K_(e) && (r = !0);\n i.k_ = e;\n }\n }\n r && __PRIVATE_raiseSnapshotsInSyncEvent(n);\n}\nfunction __PRIVATE_eventManagerOnWatchError(e, t, n) {\n const r = __PRIVATE_debugCast(e),\n i = r.queries.get(t);\n if (i) for (const e of i.listeners) e.onError(n);\n // Remove all listeners. NOTE: We don't need to call syncEngine.unlisten()\n // after an error.\n r.queries.delete(t);\n}\n\n// Call all global snapshot listeners that have been set.\nfunction __PRIVATE_raiseSnapshotsInSyncEvent(e) {\n e.q_.forEach(e => {\n e.next();\n });\n}\n\n/**\n * QueryListener takes a series of internal view snapshots and determines\n * when to raise the event.\n *\n * It uses an Observer to dispatch events.\n */\nclass __PRIVATE_QueryListener {\n constructor(e, t, n) {\n this.query = e, this.U_ = t,\n /**\n * Initial snapshots (e.g. from cache) may not be propagated to the wrapped\n * observer. This flag is set to true once we've actually raised an event.\n */\n this.W_ = !1, this.G_ = null, this.onlineState = \"Unknown\" /* OnlineState.Unknown */, this.options = n || {};\n }\n /**\n * Applies the new ViewSnapshot to this listener, raising a user-facing event\n * if applicable (depending on what changed, whether the user has opted into\n * metadata-only changes, etc.). Returns true if a user-facing event was\n * indeed raised.\n */\n K_(e) {\n if (!this.options.includeMetadataChanges) {\n // Remove the metadata only changes.\n const t = [];\n for (const n of e.docChanges) 3 /* ChangeType.Metadata */ !== n.type && t.push(n);\n e = new ViewSnapshot(e.query, e.docs, e.oldDocs, t, e.mutatedKeys, e.fromCache, e.syncStateChanged, /* excludesMetadataChanges= */!0, e.hasCachedResults);\n }\n let t = !1;\n return this.W_ ? this.z_(e) && (this.U_.next(e), t = !0) : this.j_(e, this.onlineState) && (this.H_(e), t = !0), this.G_ = e, t;\n }\n onError(e) {\n this.U_.error(e);\n }\n /** Returns whether a snapshot was raised. */\n Q_(e) {\n this.onlineState = e;\n let t = !1;\n return this.G_ && !this.W_ && this.j_(this.G_, e) && (this.H_(this.G_), t = !0), t;\n }\n j_(e, t) {\n // Always raise the first event when we're synced\n if (!e.fromCache) return !0;\n // NOTE: We consider OnlineState.Unknown as online (it should become Offline\n // or Online if we wait long enough).\n const n = \"Offline\" /* OnlineState.Offline */ !== t;\n // Don't raise the event if we're online, aren't synced yet (checked\n // above) and are waiting for a sync.\n return (!this.options.J_ || !n) && (!e.docs.isEmpty() || e.hasCachedResults || \"Offline\" /* OnlineState.Offline */ === t);\n // Raise data from cache if we have any documents, have cached results before,\n // or we are offline.\n }\n z_(e) {\n // We don't need to handle includeDocumentMetadataChanges here because\n // the Metadata only changes have already been stripped out if needed.\n // At this point the only changes we will see are the ones we should\n // propagate.\n if (e.docChanges.length > 0) return !0;\n const t = this.G_ && this.G_.hasPendingWrites !== e.hasPendingWrites;\n return !(!e.syncStateChanged && !t) && !0 === this.options.includeMetadataChanges;\n // Generally we should have hit one of the cases above, but it's possible\n // to get here if there were only metadata docChanges and they got\n // stripped out.\n }\n H_(e) {\n e = ViewSnapshot.fromInitialDocuments(e.query, e.docs, e.mutatedKeys, e.fromCache, e.hasCachedResults), this.W_ = !0, this.U_.next(e);\n }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A complete element in the bundle stream, together with the byte length it\n * occupies in the stream.\n */\nclass __PRIVATE_SizedBundleElement {\n constructor(e,\n // How many bytes this element takes to store in the bundle.\n t) {\n this.Y_ = e, this.byteLength = t;\n }\n Z_() {\n return \"metadata\" in this.Y_;\n }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Helper to convert objects from bundles to model objects in the SDK.\n */\nclass __PRIVATE_BundleConverterImpl {\n constructor(e) {\n this.serializer = e;\n }\n hs(e) {\n return fromName(this.serializer, e);\n }\n /**\n * Converts a BundleDocument to a MutableDocument.\n */\n Ps(e) {\n return e.metadata.exists ? __PRIVATE_fromDocument(this.serializer, e.document, !1) : MutableDocument.newNoDocument(this.hs(e.metadata.name), this.Is(e.metadata.readTime));\n }\n Is(e) {\n return __PRIVATE_fromVersion(e);\n }\n}\n\n/**\n * A class to process the elements from a bundle, load them into local\n * storage and provide progress update while loading.\n */\nclass __PRIVATE_BundleLoader {\n constructor(e, t, n) {\n this.X_ = e, this.localStore = t, this.serializer = n, /** Batched queries to be saved into storage */\n this.queries = [], /** Batched documents to be saved into storage */\n this.documents = [], /** The collection groups affected by this bundle. */\n this.collectionGroups = new Set(), this.progress = __PRIVATE_bundleInitialProgress(e);\n }\n /**\n * Adds an element from the bundle to the loader.\n *\n * Returns a new progress if adding the element leads to a new progress,\n * otherwise returns null.\n */\n ea(e) {\n this.progress.bytesLoaded += e.byteLength;\n let t = this.progress.documentsLoaded;\n if (e.Y_.namedQuery) this.queries.push(e.Y_.namedQuery);else if (e.Y_.documentMetadata) {\n this.documents.push({\n metadata: e.Y_.documentMetadata\n }), e.Y_.documentMetadata.exists || ++t;\n const n = ResourcePath.fromString(e.Y_.documentMetadata.name);\n this.collectionGroups.add(n.get(n.length - 2));\n } else e.Y_.document && (this.documents[this.documents.length - 1].document = e.Y_.document, ++t);\n return t !== this.progress.documentsLoaded ? (this.progress.documentsLoaded = t, Object.assign({}, this.progress)) : null;\n }\n ta(e) {\n const t = new Map(),\n n = new __PRIVATE_BundleConverterImpl(this.serializer);\n for (const r of e) if (r.metadata.queries) {\n const e = n.hs(r.metadata.name);\n for (const n of r.metadata.queries) {\n const r = (t.get(n) || __PRIVATE_documentKeySet()).add(e);\n t.set(n, r);\n }\n }\n return t;\n }\n /**\n * Update the progress to 'Success' and return the updated progress.\n */\n async complete() {\n const e = await __PRIVATE_localStoreApplyBundledDocuments(this.localStore, new __PRIVATE_BundleConverterImpl(this.serializer), this.documents, this.X_.id),\n t = this.ta(this.documents);\n for (const e of this.queries) await __PRIVATE_localStoreSaveNamedQuery(this.localStore, e, t.get(e.name));\n return this.progress.taskState = \"Success\", {\n progress: this.progress,\n na: this.collectionGroups,\n ra: e\n };\n }\n}\n\n/**\n * Returns a `LoadBundleTaskProgress` representing the initial progress of\n * loading a bundle.\n */\nfunction __PRIVATE_bundleInitialProgress(e) {\n return {\n taskState: \"Running\",\n documentsLoaded: 0,\n bytesLoaded: 0,\n totalDocuments: e.totalDocuments,\n totalBytes: e.totalBytes\n };\n}\n\n/**\n * Returns a `LoadBundleTaskProgress` representing the progress that the loading\n * has succeeded.\n */\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass __PRIVATE_AddedLimboDocument {\n constructor(e) {\n this.key = e;\n }\n}\nclass __PRIVATE_RemovedLimboDocument {\n constructor(e) {\n this.key = e;\n }\n}\n\n/**\n * View is responsible for computing the final merged truth of what docs are in\n * a query. It gets notified of local and remote changes to docs, and applies\n * the query filters and limits to determine the most correct possible results.\n */\nclass __PRIVATE_View {\n constructor(e, /** Documents included in the remote target */\n t) {\n this.query = e, this.ia = t, this.sa = null, this.hasCachedResults = !1,\n /**\n * A flag whether the view is current with the backend. A view is considered\n * current after it has seen the current flag from the backend and did not\n * lose consistency within the watch stream (e.g. because of an existence\n * filter mismatch).\n */\n this.current = !1, /** Documents in the view but not in the remote target */\n this.oa = __PRIVATE_documentKeySet(), /** Document Keys that have local changes */\n this.mutatedKeys = __PRIVATE_documentKeySet(), this._a = __PRIVATE_newQueryComparator(e), this.aa = new DocumentSet(this._a);\n }\n /**\n * The set of remote documents that the server has told us belongs to the target associated with\n * this view.\n */\n get ua() {\n return this.ia;\n }\n /**\n * Iterates over a set of doc changes, applies the query limit, and computes\n * what the new results should be, what the changes were, and whether we may\n * need to go back to the local cache for more results. Does not make any\n * changes to the view.\n * @param docChanges - The doc changes to apply to this view.\n * @param previousChanges - If this is being called with a refill, then start\n * with this set of docs and changes instead of the current view.\n * @returns a new set of docs, changes, and refill flag.\n */\n ca(e, t) {\n const n = t ? t.la : new __PRIVATE_DocumentChangeSet(),\n r = t ? t.aa : this.aa;\n let i = t ? t.mutatedKeys : this.mutatedKeys,\n s = r,\n o = !1;\n // Track the last doc in a (full) limit. This is necessary, because some\n // update (a delete, or an update moving a doc past the old limit) might\n // mean there is some other document in the local cache that either should\n // come (1) between the old last limit doc and the new last document, in the\n // case of updates, or (2) after the new last document, in the case of\n // deletes. So we keep this doc at the old limit to compare the updates to.\n // Note that this should never get used in a refill (when previousChanges is\n // set), because there will only be adds -- no deletes or updates.\n const _ = \"F\" /* LimitType.First */ === this.query.limitType && r.size === this.query.limit ? r.last() : null,\n a = \"L\" /* LimitType.Last */ === this.query.limitType && r.size === this.query.limit ? r.first() : null;\n // Drop documents out to meet limit/limitToLast requirement.\n if (e.inorderTraversal((e, t) => {\n const u = r.get(e),\n c = __PRIVATE_queryMatches(this.query, t) ? t : null,\n l = !!u && this.mutatedKeys.has(u.key),\n h = !!c && (c.hasLocalMutations ||\n // We only consider committed mutations for documents that were\n // mutated during the lifetime of the view.\n this.mutatedKeys.has(c.key) && c.hasCommittedMutations);\n let P = !1;\n // Calculate change\n if (u && c) {\n u.data.isEqual(c.data) ? l !== h && (n.track({\n type: 3 /* ChangeType.Metadata */,\n doc: c\n }), P = !0) : this.ha(u, c) || (n.track({\n type: 2 /* ChangeType.Modified */,\n doc: c\n }), P = !0, (_ && this._a(c, _) > 0 || a && this._a(c, a) < 0) && (\n // This doc moved from inside the limit to outside the limit.\n // That means there may be some other doc in the local cache\n // that should be included instead.\n o = !0));\n } else !u && c ? (n.track({\n type: 0 /* ChangeType.Added */,\n doc: c\n }), P = !0) : u && !c && (n.track({\n type: 1 /* ChangeType.Removed */,\n doc: u\n }), P = !0, (_ || a) && (\n // A doc was removed from a full limit query. We'll need to\n // requery from the local cache to see if we know about some other\n // doc that should be in the results.\n o = !0));\n P && (c ? (s = s.add(c), i = h ? i.add(e) : i.delete(e)) : (s = s.delete(e), i = i.delete(e)));\n }), null !== this.query.limit) for (; s.size > this.query.limit;) {\n const e = \"F\" /* LimitType.First */ === this.query.limitType ? s.last() : s.first();\n s = s.delete(e.key), i = i.delete(e.key), n.track({\n type: 1 /* ChangeType.Removed */,\n doc: e\n });\n }\n return {\n aa: s,\n la: n,\n Zi: o,\n mutatedKeys: i\n };\n }\n ha(e, t) {\n // We suppress the initial change event for documents that were modified as\n // part of a write acknowledgment (e.g. when the value of a server transform\n // is applied) as Watch will send us the same document again.\n // By suppressing the event, we only raise two user visible events (one with\n // `hasPendingWrites` and the final state of the document) instead of three\n // (one with `hasPendingWrites`, the modified document with\n // `hasPendingWrites` and the final state of the document).\n return e.hasLocalMutations && t.hasCommittedMutations && !t.hasLocalMutations;\n }\n /**\n * Updates the view with the given ViewDocumentChanges and optionally updates\n * limbo docs and sync state from the provided target change.\n * @param docChanges - The set of changes to make to the view's docs.\n * @param limboResolutionEnabled - Whether to update limbo documents based on\n * this change.\n * @param targetChange - A target change to apply for computing limbo docs and\n * sync state.\n * @param targetIsPendingReset - Whether the target is pending to reset due to\n * existence filter mismatch. If not explicitly specified, it is treated\n * equivalently to `false`.\n * @returns A new ViewChange with the given docs, changes, and sync state.\n */\n // PORTING NOTE: The iOS/Android clients always compute limbo document changes.\n applyChanges(e, t, n, r) {\n const i = this.aa;\n this.aa = e.aa, this.mutatedKeys = e.mutatedKeys;\n // Sort changes based on type and query comparator\n const s = e.la.L_();\n s.sort((e, t) => function __PRIVATE_compareChangeType(e, t) {\n const order = e => {\n switch (e) {\n case 0 /* ChangeType.Added */:\n return 1;\n case 2 /* ChangeType.Modified */:\n case 3 /* ChangeType.Metadata */:\n // A metadata change is converted to a modified change at the public\n // api layer. Since we sort by document key and then change type,\n // metadata and modified changes must be sorted equivalently.\n return 2;\n case 1 /* ChangeType.Removed */:\n return 0;\n default:\n return fail();\n }\n };\n return order(e) - order(t);\n }\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */(e.type, t.type) || this._a(e.doc, t.doc)), this.Pa(n), r = null != r && r;\n const o = t && !r ? this.Ia() : [],\n _ = 0 === this.oa.size && this.current && !r ? 1 /* SyncState.Synced */ : 0 /* SyncState.Local */,\n a = _ !== this.sa;\n // We are at synced state if there is no limbo docs are waiting to be resolved, view is current\n // with the backend, and the query is not pending to reset due to existence filter mismatch.\n if (this.sa = _, 0 !== s.length || a) {\n return {\n snapshot: new ViewSnapshot(this.query, e.aa, i, s, e.mutatedKeys, 0 /* SyncState.Local */ === _, a, /* excludesMetadataChanges= */!1, !!n && n.resumeToken.approximateByteSize() > 0),\n Ta: o\n };\n }\n // no changes\n return {\n Ta: o\n };\n }\n /**\n * Applies an OnlineState change to the view, potentially generating a\n * ViewChange if the view's syncState changes as a result.\n */\n Q_(e) {\n return this.current && \"Offline\" /* OnlineState.Offline */ === e ? (\n // If we're offline, set `current` to false and then call applyChanges()\n // to refresh our syncState and generate a ViewChange as appropriate. We\n // are guaranteed to get a new TargetChange that sets `current` back to\n // true once the client is back online.\n this.current = !1, this.applyChanges({\n aa: this.aa,\n la: new __PRIVATE_DocumentChangeSet(),\n mutatedKeys: this.mutatedKeys,\n Zi: !1\n }, /* limboResolutionEnabled= */!1)) : {\n Ta: []\n };\n }\n /**\n * Returns whether the doc for the given key should be in limbo.\n */\n Ea(e) {\n // If the remote end says it's part of this query, it's not in limbo.\n return !this.ia.has(e) &&\n // The local store doesn't think it's a result, so it shouldn't be in limbo.\n !!this.aa.has(e) && !this.aa.get(e).hasLocalMutations;\n }\n /**\n * Updates syncedDocuments, current, and limbo docs based on the given change.\n * Returns the list of changes to which docs are in limbo.\n */\n Pa(e) {\n e && (e.addedDocuments.forEach(e => this.ia = this.ia.add(e)), e.modifiedDocuments.forEach(e => {}), e.removedDocuments.forEach(e => this.ia = this.ia.delete(e)), this.current = e.current);\n }\n Ia() {\n // We can only determine limbo documents when we're in-sync with the server.\n if (!this.current) return [];\n // TODO(klimt): Do this incrementally so that it's not quadratic when\n // updating many documents.\n const e = this.oa;\n this.oa = __PRIVATE_documentKeySet(), this.aa.forEach(e => {\n this.Ea(e.key) && (this.oa = this.oa.add(e.key));\n });\n // Diff the new limbo docs with the old limbo docs.\n const t = [];\n return e.forEach(e => {\n this.oa.has(e) || t.push(new __PRIVATE_RemovedLimboDocument(e));\n }), this.oa.forEach(n => {\n e.has(n) || t.push(new __PRIVATE_AddedLimboDocument(n));\n }), t;\n }\n /**\n * Update the in-memory state of the current view with the state read from\n * persistence.\n *\n * We update the query view whenever a client's primary status changes:\n * - When a client transitions from primary to secondary, it can miss\n * LocalStorage updates and its query views may temporarily not be\n * synchronized with the state on disk.\n * - For secondary to primary transitions, the client needs to update the list\n * of `syncedDocuments` since secondary clients update their query views\n * based purely on synthesized RemoteEvents.\n *\n * @param queryResult.documents - The documents that match the query according\n * to the LocalStore.\n * @param queryResult.remoteKeys - The keys of the documents that match the\n * query according to the backend.\n *\n * @returns The ViewChange that resulted from this synchronization.\n */\n // PORTING NOTE: Multi-tab only.\n da(e) {\n this.ia = e.ls, this.oa = __PRIVATE_documentKeySet();\n const t = this.ca(e.documents);\n return this.applyChanges(t, /* limboResolutionEnabled= */!0);\n }\n /**\n * Returns a view snapshot as if this query was just listened to. Contains\n * a document add for every existing document and the `fromCache` and\n * `hasPendingWrites` status of the already established view.\n */\n // PORTING NOTE: Multi-tab only.\n Aa() {\n return ViewSnapshot.fromInitialDocuments(this.query, this.aa, this.mutatedKeys, 0 /* SyncState.Local */ === this.sa, this.hasCachedResults);\n }\n}\n\n/**\n * QueryView contains all of the data that SyncEngine needs to keep track of for\n * a particular query.\n */\nclass __PRIVATE_QueryView {\n constructor(\n /**\n * The query itself.\n */\n e,\n /**\n * The target number created by the client that is used in the watch\n * stream to identify this query.\n */\n t,\n /**\n * The view is responsible for computing the final merged truth of what\n * docs are in the query. It gets notified of local and remote changes,\n * and applies the query filters and limits to determine the most correct\n * possible results.\n */\n n) {\n this.query = e, this.targetId = t, this.view = n;\n }\n}\n\n/** Tracks a limbo resolution. */\nclass LimboResolution {\n constructor(e) {\n this.key = e,\n /**\n * Set to true once we've received a document. This is used in\n * getRemoteKeysForTarget() and ultimately used by WatchChangeAggregator to\n * decide whether it needs to manufacture a delete event for the target once\n * the target is CURRENT.\n */\n this.Ra = !1;\n }\n}\n\n/**\n * An implementation of `SyncEngine` coordinating with other parts of SDK.\n *\n * The parts of SyncEngine that act as a callback to RemoteStore need to be\n * registered individually. This is done in `syncEngineWrite()` and\n * `syncEngineListen()` (as well as `applyPrimaryState()`) as these methods\n * serve as entry points to RemoteStore's functionality.\n *\n * Note: some field defined in this class might have public access level, but\n * the class is not exported so they are only accessible from this module.\n * This is useful to implement optional features (like bundles) in free\n * functions, such that they are tree-shakeable.\n */\nclass __PRIVATE_SyncEngineImpl {\n constructor(e, t, n,\n // PORTING NOTE: Manages state synchronization in multi-tab environments.\n r, i, s) {\n this.localStore = e, this.remoteStore = t, this.eventManager = n, this.sharedClientState = r, this.currentUser = i, this.maxConcurrentLimboResolutions = s, this.Va = {}, this.ma = new ObjectMap(e => __PRIVATE_canonifyQuery(e), __PRIVATE_queryEquals), this.fa = new Map(),\n /**\n * The keys of documents that are in limbo for which we haven't yet started a\n * limbo resolution query. The strings in this set are the result of calling\n * `key.path.canonicalString()` where `key` is a `DocumentKey` object.\n *\n * The `Set` type was chosen because it provides efficient lookup and removal\n * of arbitrary elements and it also maintains insertion order, providing the\n * desired queue-like FIFO semantics.\n */\n this.ga = new Set(),\n /**\n * Keeps track of the target ID for each document that is in limbo with an\n * active target.\n */\n this.pa = new SortedMap(DocumentKey.comparator),\n /**\n * Keeps track of the information about an active limbo resolution for each\n * active target ID that was started for the purpose of limbo resolution.\n */\n this.ya = new Map(), this.wa = new __PRIVATE_ReferenceSet(), /** Stores user completion handlers, indexed by User and BatchId. */\n this.Sa = {}, /** Stores user callbacks waiting for all pending writes to be acknowledged. */\n this.ba = new Map(), this.Da = __PRIVATE_TargetIdGenerator.Nn(), this.onlineState = \"Unknown\" /* OnlineState.Unknown */,\n // The primary state is set to `true` or `false` immediately after Firestore\n // startup. In the interim, a client should only be considered primary if\n // `isPrimary` is true.\n this.Ca = void 0;\n }\n get isPrimaryClient() {\n return !0 === this.Ca;\n }\n}\n\n/**\n * Initiates the new listen, resolves promise when listen enqueued to the\n * server. All the subsequent view snapshots or errors are sent to the\n * subscribed handlers. Returns the initial snapshot.\n */\nasync function __PRIVATE_syncEngineListen(e, t) {\n const n = __PRIVATE_ensureWatchCallbacks(e);\n let r, i;\n const s = n.ma.get(t);\n if (s)\n // PORTING NOTE: With Multi-Tab Web, it is possible that a query view\n // already exists when EventManager calls us for the first time. This\n // happens when the primary tab is already listening to this query on\n // behalf of another tab and the user of the primary also starts listening\n // to the query. EventManager will not have an assigned target ID in this\n // case and calls `listen` to obtain this ID.\n r = s.targetId, n.sharedClientState.addLocalQueryTarget(r), i = s.view.Aa();else {\n const e = await __PRIVATE_localStoreAllocateTarget(n.localStore, __PRIVATE_queryToTarget(t)),\n s = n.sharedClientState.addLocalQueryTarget(e.targetId);\n r = e.targetId, i = await __PRIVATE_initializeViewAndComputeSnapshot(n, t, r, \"current\" === s, e.resumeToken), n.isPrimaryClient && __PRIVATE_remoteStoreListen(n.remoteStore, e);\n }\n return i;\n}\n\n/**\n * Registers a view for a previously unknown query and computes its initial\n * snapshot.\n */\nasync function __PRIVATE_initializeViewAndComputeSnapshot(e, t, n, r, i) {\n // PORTING NOTE: On Web only, we inject the code that registers new Limbo\n // targets based on view changes. This allows us to only depend on Limbo\n // changes when user code includes queries.\n e.va = (t, n, r) => async function __PRIVATE_applyDocChanges(e, t, n, r) {\n let i = t.view.ca(n);\n i.Zi && (\n // The query has a limit and some docs were removed, so we need\n // to re-run the query against the local store to make sure we\n // didn't lose any good docs that had been past the limit.\n i = await __PRIVATE_localStoreExecuteQuery(e.localStore, t.query, /* usePreviousResults= */!1).then(({\n documents: e\n }) => t.view.ca(e, i)));\n const s = r && r.targetChanges.get(t.targetId),\n o = r && null != r.targetMismatches.get(t.targetId),\n _ = t.view.applyChanges(i, /* limboResolutionEnabled= */e.isPrimaryClient, s, o);\n return __PRIVATE_updateTrackedLimbos(e, t.targetId, _.Ta), _.snapshot;\n }(e, t, n, r);\n const s = await __PRIVATE_localStoreExecuteQuery(e.localStore, t, /* usePreviousResults= */!0),\n o = new __PRIVATE_View(t, s.ls),\n _ = o.ca(s.documents),\n a = TargetChange.createSynthesizedTargetChangeForCurrentChange(n, r && \"Offline\" /* OnlineState.Offline */ !== e.onlineState, i),\n u = o.applyChanges(_, /* limboResolutionEnabled= */e.isPrimaryClient, a);\n __PRIVATE_updateTrackedLimbos(e, n, u.Ta);\n const c = new __PRIVATE_QueryView(t, n, o);\n return e.ma.set(t, c), e.fa.has(n) ? e.fa.get(n).push(t) : e.fa.set(n, [t]), u.snapshot;\n}\n\n/** Stops listening to the query. */\nasync function __PRIVATE_syncEngineUnlisten(e, t) {\n const n = __PRIVATE_debugCast(e),\n r = n.ma.get(t),\n i = n.fa.get(r.targetId);\n if (i.length > 1) return n.fa.set(r.targetId, i.filter(e => !__PRIVATE_queryEquals(e, t))), void n.ma.delete(t);\n // No other queries are mapped to the target, clean up the query and the target.\n if (n.isPrimaryClient) {\n // We need to remove the local query target first to allow us to verify\n // whether any other client is still interested in this target.\n n.sharedClientState.removeLocalQueryTarget(r.targetId);\n n.sharedClientState.isActiveQueryTarget(r.targetId) || (await __PRIVATE_localStoreReleaseTarget(n.localStore, r.targetId, /*keepPersistedTargetData=*/!1).then(() => {\n n.sharedClientState.clearQueryState(r.targetId), __PRIVATE_remoteStoreUnlisten(n.remoteStore, r.targetId), __PRIVATE_removeAndCleanupTarget(n, r.targetId);\n }).catch(__PRIVATE_ignoreIfPrimaryLeaseLoss));\n } else __PRIVATE_removeAndCleanupTarget(n, r.targetId), await __PRIVATE_localStoreReleaseTarget(n.localStore, r.targetId, /*keepPersistedTargetData=*/!0);\n}\n\n/**\n * Initiates the write of local mutation batch which involves adding the\n * writes to the mutation queue, notifying the remote store about new\n * mutations and raising events for any changes this write caused.\n *\n * The promise returned by this call is resolved when the above steps\n * have completed, *not* when the write was acked by the backend. The\n * userCallback is resolved once the write was acked/rejected by the\n * backend (or failed locally for any other reason).\n */\nasync function __PRIVATE_syncEngineWrite(e, t, n) {\n const r = __PRIVATE_syncEngineEnsureWriteCallbacks(e);\n try {\n const e = await function __PRIVATE_localStoreWriteLocally(e, t) {\n const n = __PRIVATE_debugCast(e),\n r = Timestamp.now(),\n i = t.reduce((e, t) => e.add(t.key), __PRIVATE_documentKeySet());\n let s, o;\n return n.persistence.runTransaction(\"Locally write mutations\", \"readwrite\", e => {\n // Figure out which keys do not have a remote version in the cache, this\n // is needed to create the right overlay mutation: if no remote version\n // presents, we do not need to create overlays as patch mutations.\n // TODO(Overlay): Is there a better way to determine this? Using the\n // document version does not work because local mutations set them back\n // to 0.\n let _ = __PRIVATE_mutableDocumentMap(),\n a = __PRIVATE_documentKeySet();\n return n.ss.getEntries(e, i).next(e => {\n _ = e, _.forEach((e, t) => {\n t.isValidDocument() || (a = a.add(e));\n });\n }).next(() => n.localDocuments.getOverlayedDocuments(e, _)).next(i => {\n s = i;\n // For non-idempotent mutations (such as `FieldValue.increment()`),\n // we record the base state in a separate patch mutation. This is\n // later used to guarantee consistent values and prevents flicker\n // even if the backend sends us an update that already includes our\n // transform.\n const o = [];\n for (const e of t) {\n const t = __PRIVATE_mutationExtractBaseValue(e, s.get(e.key).overlayedDocument);\n null != t &&\n // NOTE: The base state should only be applied if there's some\n // existing document to override, so use a Precondition of\n // exists=true\n o.push(new __PRIVATE_PatchMutation(e.key, t, __PRIVATE_extractFieldMask(t.value.mapValue), Precondition.exists(!0)));\n }\n return n.mutationQueue.addMutationBatch(e, r, o, t);\n }).next(t => {\n o = t;\n const r = t.applyToLocalDocumentSet(s, a);\n return n.documentOverlayCache.saveOverlays(e, t.batchId, r);\n });\n }).then(() => ({\n batchId: o.batchId,\n changes: __PRIVATE_convertOverlayedDocumentMapToDocumentMap(s)\n }));\n }(r.localStore, t);\n r.sharedClientState.addPendingMutation(e.batchId), function __PRIVATE_addMutationCallback(e, t, n) {\n let r = e.Sa[e.currentUser.toKey()];\n r || (r = new SortedMap(__PRIVATE_primitiveComparator));\n r = r.insert(t, n), e.Sa[e.currentUser.toKey()] = r;\n }\n /**\n * Resolves or rejects the user callback for the given batch and then discards\n * it.\n */(r, e.batchId, n), await __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore(r, e.changes), await __PRIVATE_fillWritePipeline(r.remoteStore);\n } catch (e) {\n // If we can't persist the mutation, we reject the user callback and\n // don't send the mutation. The user can then retry the write.\n const t = __PRIVATE_wrapInUserErrorIfRecoverable(e, \"Failed to persist write\");\n n.reject(t);\n }\n}\n\n/**\n * Applies one remote event to the sync engine, notifying any views of the\n * changes, and releasing any pending mutation batches that would become\n * visible because of the snapshot version the remote event contains.\n */\nasync function __PRIVATE_syncEngineApplyRemoteEvent(e, t) {\n const n = __PRIVATE_debugCast(e);\n try {\n const e = await __PRIVATE_localStoreApplyRemoteEventToLocalCache(n.localStore, t);\n // Update `receivedDocument` as appropriate for any limbo targets.\n t.targetChanges.forEach((e, t) => {\n const r = n.ya.get(t);\n r && (\n // Since this is a limbo resolution lookup, it's for a single document\n // and it could be added, modified, or removed, but not a combination.\n __PRIVATE_hardAssert(e.addedDocuments.size + e.modifiedDocuments.size + e.removedDocuments.size <= 1), e.addedDocuments.size > 0 ? r.Ra = !0 : e.modifiedDocuments.size > 0 ? __PRIVATE_hardAssert(r.Ra) : e.removedDocuments.size > 0 && (__PRIVATE_hardAssert(r.Ra), r.Ra = !1));\n }), await __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore(n, e, t);\n } catch (e) {\n await __PRIVATE_ignoreIfPrimaryLeaseLoss(e);\n }\n}\n\n/**\n * Applies an OnlineState change to the sync engine and notifies any views of\n * the change.\n */\nfunction __PRIVATE_syncEngineApplyOnlineStateChange(e, t, n) {\n const r = __PRIVATE_debugCast(e);\n // If we are the secondary client, we explicitly ignore the remote store's\n // online state (the local client may go offline, even though the primary\n // tab remains online) and only apply the primary tab's online state from\n // SharedClientState.\n if (r.isPrimaryClient && 0 /* OnlineStateSource.RemoteStore */ === n || !r.isPrimaryClient && 1 /* OnlineStateSource.SharedClientState */ === n) {\n const e = [];\n r.ma.forEach((n, r) => {\n const i = r.view.Q_(t);\n i.snapshot && e.push(i.snapshot);\n }), function __PRIVATE_eventManagerOnOnlineStateChange(e, t) {\n const n = __PRIVATE_debugCast(e);\n n.onlineState = t;\n let r = !1;\n n.queries.forEach((e, n) => {\n for (const e of n.listeners)\n // Run global snapshot listeners if a consistent snapshot has been emitted.\n e.Q_(t) && (r = !0);\n }), r && __PRIVATE_raiseSnapshotsInSyncEvent(n);\n }(r.eventManager, t), e.length && r.Va.a_(e), r.onlineState = t, r.isPrimaryClient && r.sharedClientState.setOnlineState(t);\n }\n}\n\n/**\n * Rejects the listen for the given targetID. This can be triggered by the\n * backend for any active target.\n *\n * @param syncEngine - The sync engine implementation.\n * @param targetId - The targetID corresponds to one previously initiated by the\n * user as part of TargetData passed to listen() on RemoteStore.\n * @param err - A description of the condition that has forced the rejection.\n * Nearly always this will be an indication that the user is no longer\n * authorized to see the data matching the target.\n */\nasync function __PRIVATE_syncEngineRejectListen(e, t, n) {\n const r = __PRIVATE_debugCast(e);\n // PORTING NOTE: Multi-tab only.\n r.sharedClientState.updateQueryState(t, \"rejected\", n);\n const i = r.ya.get(t),\n s = i && i.key;\n if (s) {\n // TODO(klimt): We really only should do the following on permission\n // denied errors, but we don't have the cause code here.\n // It's a limbo doc. Create a synthetic event saying it was deleted.\n // This is kind of a hack. Ideally, we would have a method in the local\n // store to purge a document. However, it would be tricky to keep all of\n // the local store's invariants with another method.\n let e = new SortedMap(DocumentKey.comparator);\n // TODO(b/217189216): This limbo document should ideally have a read time,\n // so that it is picked up by any read-time based scans. The backend,\n // however, does not send a read time for target removals.\n e = e.insert(s, MutableDocument.newNoDocument(s, SnapshotVersion.min()));\n const n = __PRIVATE_documentKeySet().add(s),\n i = new RemoteEvent(SnapshotVersion.min(), /* targetChanges= */new Map(), /* targetMismatches= */new SortedMap(__PRIVATE_primitiveComparator), e, n);\n await __PRIVATE_syncEngineApplyRemoteEvent(r, i),\n // Since this query failed, we won't want to manually unlisten to it.\n // We only remove it from bookkeeping after we successfully applied the\n // RemoteEvent. If `applyRemoteEvent()` throws, we want to re-listen to\n // this query when the RemoteStore restarts the Watch stream, which should\n // re-trigger the target failure.\n r.pa = r.pa.remove(s), r.ya.delete(t), __PRIVATE_pumpEnqueuedLimboResolutions(r);\n } else await __PRIVATE_localStoreReleaseTarget(r.localStore, t, /* keepPersistedTargetData */!1).then(() => __PRIVATE_removeAndCleanupTarget(r, t, n)).catch(__PRIVATE_ignoreIfPrimaryLeaseLoss);\n}\nasync function __PRIVATE_syncEngineApplySuccessfulWrite(e, t) {\n const n = __PRIVATE_debugCast(e),\n r = t.batch.batchId;\n try {\n const e = await __PRIVATE_localStoreAcknowledgeBatch(n.localStore, t);\n // The local store may or may not be able to apply the write result and\n // raise events immediately (depending on whether the watcher is caught\n // up), so we raise user callbacks first so that they consistently happen\n // before listen events.\n __PRIVATE_processUserCallback(n, r, /*error=*/null), __PRIVATE_triggerPendingWritesCallbacks(n, r), n.sharedClientState.updateMutationState(r, \"acknowledged\"), await __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore(n, e);\n } catch (e) {\n await __PRIVATE_ignoreIfPrimaryLeaseLoss(e);\n }\n}\nasync function __PRIVATE_syncEngineRejectFailedWrite(e, t, n) {\n const r = __PRIVATE_debugCast(e);\n try {\n const e = await function __PRIVATE_localStoreRejectBatch(e, t) {\n const n = __PRIVATE_debugCast(e);\n return n.persistence.runTransaction(\"Reject batch\", \"readwrite-primary\", e => {\n let r;\n return n.mutationQueue.lookupMutationBatch(e, t).next(t => (__PRIVATE_hardAssert(null !== t), r = t.keys(), n.mutationQueue.removeMutationBatch(e, t))).next(() => n.mutationQueue.performConsistencyCheck(e)).next(() => n.documentOverlayCache.removeOverlaysForBatchId(e, r, t)).next(() => n.localDocuments.recalculateAndSaveOverlaysForDocumentKeys(e, r)).next(() => n.localDocuments.getDocuments(e, r));\n });\n }\n /**\n * Returns the largest (latest) batch id in mutation queue that is pending\n * server response.\n *\n * Returns `BATCHID_UNKNOWN` if the queue is empty.\n */(r.localStore, t);\n // The local store may or may not be able to apply the write result and\n // raise events immediately (depending on whether the watcher is caught up),\n // so we raise user callbacks first so that they consistently happen before\n // listen events.\n __PRIVATE_processUserCallback(r, t, n), __PRIVATE_triggerPendingWritesCallbacks(r, t), r.sharedClientState.updateMutationState(t, \"rejected\", n), await __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore(r, e);\n } catch (n) {\n await __PRIVATE_ignoreIfPrimaryLeaseLoss(n);\n }\n}\n\n/**\n * Registers a user callback that resolves when all pending mutations at the moment of calling\n * are acknowledged .\n */\nasync function __PRIVATE_syncEngineRegisterPendingWritesCallback(e, t) {\n const n = __PRIVATE_debugCast(e);\n __PRIVATE_canUseNetwork(n.remoteStore) || __PRIVATE_logDebug(\"SyncEngine\", \"The network is disabled. The task returned by 'awaitPendingWrites()' will not complete until the network is enabled.\");\n try {\n const e = await function __PRIVATE_localStoreGetHighestUnacknowledgedBatchId(e) {\n const t = __PRIVATE_debugCast(e);\n return t.persistence.runTransaction(\"Get highest unacknowledged batch id\", \"readonly\", e => t.mutationQueue.getHighestUnacknowledgedBatchId(e));\n }(n.localStore);\n if (-1 === e)\n // Trigger the callback right away if there is no pending writes at the moment.\n return void t.resolve();\n const r = n.ba.get(e) || [];\n r.push(t), n.ba.set(e, r);\n } catch (e) {\n const n = __PRIVATE_wrapInUserErrorIfRecoverable(e, \"Initialization of waitForPendingWrites() operation failed\");\n t.reject(n);\n }\n}\n\n/**\n * Triggers the callbacks that are waiting for this batch id to get acknowledged by server,\n * if there are any.\n */\nfunction __PRIVATE_triggerPendingWritesCallbacks(e, t) {\n (e.ba.get(t) || []).forEach(e => {\n e.resolve();\n }), e.ba.delete(t);\n}\n\n/** Reject all outstanding callbacks waiting for pending writes to complete. */\nfunction __PRIVATE_processUserCallback(e, t, n) {\n const r = __PRIVATE_debugCast(e);\n let i = r.Sa[r.currentUser.toKey()];\n // NOTE: Mutations restored from persistence won't have callbacks, so it's\n // okay for there to be no callback for this ID.\n if (i) {\n const e = i.get(t);\n e && (n ? e.reject(n) : e.resolve(), i = i.remove(t)), r.Sa[r.currentUser.toKey()] = i;\n }\n}\nfunction __PRIVATE_removeAndCleanupTarget(e, t, n = null) {\n e.sharedClientState.removeLocalQueryTarget(t);\n for (const r of e.fa.get(t)) e.ma.delete(r), n && e.Va.Fa(r, n);\n if (e.fa.delete(t), e.isPrimaryClient) {\n e.wa.Rr(t).forEach(t => {\n e.wa.containsKey(t) ||\n // We removed the last reference for this key\n __PRIVATE_removeLimboTarget(e, t);\n });\n }\n}\nfunction __PRIVATE_removeLimboTarget(e, t) {\n e.ga.delete(t.path.canonicalString());\n // It's possible that the target already got removed because the query failed. In that case,\n // the key won't exist in `limboTargetsByKey`. Only do the cleanup if we still have the target.\n const n = e.pa.get(t);\n null !== n && (__PRIVATE_remoteStoreUnlisten(e.remoteStore, n), e.pa = e.pa.remove(t), e.ya.delete(n), __PRIVATE_pumpEnqueuedLimboResolutions(e));\n}\nfunction __PRIVATE_updateTrackedLimbos(e, t, n) {\n for (const r of n) if (r instanceof __PRIVATE_AddedLimboDocument) e.wa.addReference(r.key, t), __PRIVATE_trackLimboChange(e, r);else if (r instanceof __PRIVATE_RemovedLimboDocument) {\n __PRIVATE_logDebug(\"SyncEngine\", \"Document no longer in limbo: \" + r.key), e.wa.removeReference(r.key, t);\n e.wa.containsKey(r.key) ||\n // We removed the last reference for this key\n __PRIVATE_removeLimboTarget(e, r.key);\n } else fail();\n}\nfunction __PRIVATE_trackLimboChange(e, t) {\n const n = t.key,\n r = n.path.canonicalString();\n e.pa.get(n) || e.ga.has(r) || (__PRIVATE_logDebug(\"SyncEngine\", \"New document in limbo: \" + n), e.ga.add(r), __PRIVATE_pumpEnqueuedLimboResolutions(e));\n}\n\n/**\n * Starts listens for documents in limbo that are enqueued for resolution,\n * subject to a maximum number of concurrent resolutions.\n *\n * Without bounding the number of concurrent resolutions, the server can fail\n * with \"resource exhausted\" errors which can lead to pathological client\n * behavior as seen in https://github.com/firebase/firebase-js-sdk/issues/2683.\n */\nfunction __PRIVATE_pumpEnqueuedLimboResolutions(e) {\n for (; e.ga.size > 0 && e.pa.size < e.maxConcurrentLimboResolutions;) {\n const t = e.ga.values().next().value;\n e.ga.delete(t);\n const n = new DocumentKey(ResourcePath.fromString(t)),\n r = e.Da.next();\n e.ya.set(r, new LimboResolution(n)), e.pa = e.pa.insert(n, r), __PRIVATE_remoteStoreListen(e.remoteStore, new TargetData(__PRIVATE_queryToTarget(__PRIVATE_newQueryForPath(n.path)), r, \"TargetPurposeLimboResolution\" /* TargetPurpose.LimboResolution */, __PRIVATE_ListenSequence._e));\n }\n}\nasync function __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore(e, t, n) {\n const r = __PRIVATE_debugCast(e),\n i = [],\n s = [],\n o = [];\n r.ma.isEmpty() || (r.ma.forEach((e, _) => {\n o.push(r.va(_, t, n).then(e => {\n // Update views if there are actual changes.\n if (\n // If there are changes, or we are handling a global snapshot, notify\n // secondary clients to update query state.\n (e || n) && r.isPrimaryClient && r.sharedClientState.updateQueryState(_.targetId, (null == e ? void 0 : e.fromCache) ? \"not-current\" : \"current\"), e) {\n i.push(e);\n const t = __PRIVATE_LocalViewChanges.Qi(_.targetId, e);\n s.push(t);\n }\n }));\n }), await Promise.all(o), r.Va.a_(i), await async function __PRIVATE_localStoreNotifyLocalViewChanges(e, t) {\n const n = __PRIVATE_debugCast(e);\n try {\n await n.persistence.runTransaction(\"notifyLocalViewChanges\", \"readwrite\", e => PersistencePromise.forEach(t, t => PersistencePromise.forEach(t.ki, r => n.persistence.referenceDelegate.addReference(e, t.targetId, r)).next(() => PersistencePromise.forEach(t.qi, r => n.persistence.referenceDelegate.removeReference(e, t.targetId, r)))));\n } catch (e) {\n if (!__PRIVATE_isIndexedDbTransactionError(e)) throw e;\n // If `notifyLocalViewChanges` fails, we did not advance the sequence\n // number for the documents that were included in this transaction.\n // This might trigger them to be deleted earlier than they otherwise\n // would have, but it should not invalidate the integrity of the data.\n __PRIVATE_logDebug(\"LocalStore\", \"Failed to update sequence numbers: \" + e);\n }\n for (const e of t) {\n const t = e.targetId;\n if (!e.fromCache) {\n const e = n.ts.get(t),\n r = e.snapshotVersion,\n i = e.withLastLimboFreeSnapshotVersion(r);\n // Advance the last limbo free snapshot version\n n.ts = n.ts.insert(t, i);\n }\n }\n }(r.localStore, s));\n}\nasync function __PRIVATE_syncEngineHandleCredentialChange(e, t) {\n const n = __PRIVATE_debugCast(e);\n if (!n.currentUser.isEqual(t)) {\n __PRIVATE_logDebug(\"SyncEngine\", \"User change. New user:\", t.toKey());\n const e = await __PRIVATE_localStoreHandleUserChange(n.localStore, t);\n n.currentUser = t,\n // Fails tasks waiting for pending writes requested by previous user.\n function __PRIVATE_rejectOutstandingPendingWritesCallbacks(e, t) {\n e.ba.forEach(e => {\n e.forEach(e => {\n e.reject(new FirestoreError(D.CANCELLED, t));\n });\n }), e.ba.clear();\n }(n, \"'waitForPendingWrites' promise is rejected due to a user change.\"),\n // TODO(b/114226417): Consider calling this only in the primary tab.\n n.sharedClientState.handleUserChange(t, e.removedBatchIds, e.addedBatchIds), await __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore(n, e._s);\n }\n}\nfunction __PRIVATE_syncEngineGetRemoteKeysForTarget(e, t) {\n const n = __PRIVATE_debugCast(e),\n r = n.ya.get(t);\n if (r && r.Ra) return __PRIVATE_documentKeySet().add(r.key);\n {\n let e = __PRIVATE_documentKeySet();\n const r = n.fa.get(t);\n if (!r) return e;\n for (const t of r) {\n const r = n.ma.get(t);\n e = e.unionWith(r.view.ua);\n }\n return e;\n }\n}\n\n/**\n * Reconcile the list of synced documents in an existing view with those\n * from persistence.\n */\nasync function __PRIVATE_synchronizeViewAndComputeSnapshot(e, t) {\n const n = __PRIVATE_debugCast(e),\n r = await __PRIVATE_localStoreExecuteQuery(n.localStore, t.query, /* usePreviousResults= */!0),\n i = t.view.da(r);\n return n.isPrimaryClient && __PRIVATE_updateTrackedLimbos(n, t.targetId, i.Ta), i;\n}\n\n/**\n * Retrieves newly changed documents from remote document cache and raises\n * snapshots if needed.\n */\n// PORTING NOTE: Multi-Tab only.\nasync function __PRIVATE_syncEngineSynchronizeWithChangedDocuments(e, t) {\n const n = __PRIVATE_debugCast(e);\n return __PRIVATE_localStoreGetNewDocumentChanges(n.localStore, t).then(e => __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore(n, e));\n}\n\n/** Applies a mutation state to an existing batch. */\n// PORTING NOTE: Multi-Tab only.\nasync function __PRIVATE_syncEngineApplyBatchState(e, t, n, r) {\n const i = __PRIVATE_debugCast(e),\n s = await function __PRIVATE_localStoreLookupMutationDocuments(e, t) {\n const n = __PRIVATE_debugCast(e),\n r = __PRIVATE_debugCast(n.mutationQueue);\n return n.persistence.runTransaction(\"Lookup mutation documents\", \"readonly\", e => r.Cn(e, t).next(t => t ? n.localDocuments.getDocuments(e, t) : PersistencePromise.resolve(null)));\n }\n // PORTING NOTE: Multi-Tab only.\n (i.localStore, t);\n null !== s ? (\"pending\" === n ?\n // If we are the primary client, we need to send this write to the\n // backend. Secondary clients will ignore these writes since their remote\n // connection is disabled.\n await __PRIVATE_fillWritePipeline(i.remoteStore) : \"acknowledged\" === n || \"rejected\" === n ? (\n // NOTE: Both these methods are no-ops for batches that originated from\n // other clients.\n __PRIVATE_processUserCallback(i, t, r || null), __PRIVATE_triggerPendingWritesCallbacks(i, t), function __PRIVATE_localStoreRemoveCachedMutationBatchMetadata(e, t) {\n __PRIVATE_debugCast(__PRIVATE_debugCast(e).mutationQueue).Fn(t);\n }\n // PORTING NOTE: Multi-Tab only.\n (i.localStore, t)) : fail(), await __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore(i, s)) :\n // A throttled tab may not have seen the mutation before it was completed\n // and removed from the mutation queue, in which case we won't have cached\n // the affected documents. In this case we can safely ignore the update\n // since that means we didn't apply the mutation locally at all (if we\n // had, we would have cached the affected documents), and so we will just\n // see any resulting document changes via normal remote document updates\n // as applicable.\n __PRIVATE_logDebug(\"SyncEngine\", \"Cannot apply mutation batch with id: \" + t);\n}\n\n/** Applies a query target change from a different tab. */\n// PORTING NOTE: Multi-Tab only.\nasync function __PRIVATE_syncEngineApplyPrimaryState(e, t) {\n const n = __PRIVATE_debugCast(e);\n if (__PRIVATE_ensureWatchCallbacks(n), __PRIVATE_syncEngineEnsureWriteCallbacks(n), !0 === t && !0 !== n.Ca) {\n // Secondary tabs only maintain Views for their local listeners and the\n // Views internal state may not be 100% populated (in particular\n // secondary tabs don't track syncedDocuments, the set of documents the\n // server considers to be in the target). So when a secondary becomes\n // primary, we need to need to make sure that all views for all targets\n // match the state on disk.\n const e = n.sharedClientState.getAllActiveQueryTargets(),\n t = await __PRIVATE_synchronizeQueryViewsAndRaiseSnapshots(n, e.toArray());\n n.Ca = !0, await __PRIVATE_remoteStoreApplyPrimaryState(n.remoteStore, !0);\n for (const e of t) __PRIVATE_remoteStoreListen(n.remoteStore, e);\n } else if (!1 === t && !1 !== n.Ca) {\n const e = [];\n let t = Promise.resolve();\n n.fa.forEach((r, i) => {\n n.sharedClientState.isLocalQueryTarget(i) ? e.push(i) : t = t.then(() => (__PRIVATE_removeAndCleanupTarget(n, i), __PRIVATE_localStoreReleaseTarget(n.localStore, i, /*keepPersistedTargetData=*/!0))), __PRIVATE_remoteStoreUnlisten(n.remoteStore, i);\n }), await t, await __PRIVATE_synchronizeQueryViewsAndRaiseSnapshots(n, e),\n // PORTING NOTE: Multi-Tab only.\n function __PRIVATE_resetLimboDocuments(e) {\n const t = __PRIVATE_debugCast(e);\n t.ya.forEach((e, n) => {\n __PRIVATE_remoteStoreUnlisten(t.remoteStore, n);\n }), t.wa.Vr(), t.ya = new Map(), t.pa = new SortedMap(DocumentKey.comparator);\n }\n /**\n * Reconcile the query views of the provided query targets with the state from\n * persistence. Raises snapshots for any changes that affect the local\n * client and returns the updated state of all target's query data.\n *\n * @param syncEngine - The sync engine implementation\n * @param targets - the list of targets with views that need to be recomputed\n * @param transitionToPrimary - `true` iff the tab transitions from a secondary\n * tab to a primary tab\n */\n // PORTING NOTE: Multi-Tab only.\n (n), n.Ca = !1, await __PRIVATE_remoteStoreApplyPrimaryState(n.remoteStore, !1);\n }\n}\nasync function __PRIVATE_synchronizeQueryViewsAndRaiseSnapshots(e, t, n) {\n const r = __PRIVATE_debugCast(e),\n i = [],\n s = [];\n for (const e of t) {\n let t;\n const n = r.fa.get(e);\n if (n && 0 !== n.length) {\n // For queries that have a local View, we fetch their current state\n // from LocalStore (as the resume token and the snapshot version\n // might have changed) and reconcile their views with the persisted\n // state (the list of syncedDocuments may have gotten out of sync).\n t = await __PRIVATE_localStoreAllocateTarget(r.localStore, __PRIVATE_queryToTarget(n[0]));\n for (const e of n) {\n const t = r.ma.get(e),\n n = await __PRIVATE_synchronizeViewAndComputeSnapshot(r, t);\n n.snapshot && s.push(n.snapshot);\n }\n } else {\n // For queries that never executed on this client, we need to\n // allocate the target in LocalStore and initialize a new View.\n const n = await __PRIVATE_localStoreGetCachedTarget(r.localStore, e);\n t = await __PRIVATE_localStoreAllocateTarget(r.localStore, n), await __PRIVATE_initializeViewAndComputeSnapshot(r, __PRIVATE_synthesizeTargetToQuery(n), e, /*current=*/!1, t.resumeToken);\n }\n i.push(t);\n }\n return r.Va.a_(s), i;\n}\n\n/**\n * Creates a `Query` object from the specified `Target`. There is no way to\n * obtain the original `Query`, so we synthesize a `Query` from the `Target`\n * object.\n *\n * The synthesized result might be different from the original `Query`, but\n * since the synthesized `Query` should return the same results as the\n * original one (only the presentation of results might differ), the potential\n * difference will not cause issues.\n */\n// PORTING NOTE: Multi-Tab only.\nfunction __PRIVATE_synthesizeTargetToQuery(e) {\n return __PRIVATE_newQuery(e.path, e.collectionGroup, e.orderBy, e.filters, e.limit, \"F\" /* LimitType.First */, e.startAt, e.endAt);\n}\n\n/** Returns the IDs of the clients that are currently active. */\n// PORTING NOTE: Multi-Tab only.\nfunction __PRIVATE_syncEngineGetActiveClients(e) {\n return function __PRIVATE_localStoreGetActiveClients(e) {\n return __PRIVATE_debugCast(__PRIVATE_debugCast(e).persistence).Bi();\n }(__PRIVATE_debugCast(e).localStore);\n}\n\n/** Applies a query target change from a different tab. */\n// PORTING NOTE: Multi-Tab only.\nasync function __PRIVATE_syncEngineApplyTargetState(e, t, n, r) {\n const i = __PRIVATE_debugCast(e);\n if (i.Ca)\n // If we receive a target state notification via WebStorage, we are\n // either already secondary or another tab has taken the primary lease.\n return void __PRIVATE_logDebug(\"SyncEngine\", \"Ignoring unexpected query state notification.\");\n const s = i.fa.get(t);\n if (s && s.length > 0) switch (n) {\n case \"current\":\n case \"not-current\":\n {\n const e = await __PRIVATE_localStoreGetNewDocumentChanges(i.localStore, __PRIVATE_queryCollectionGroup(s[0])),\n r = RemoteEvent.createSynthesizedRemoteEventForCurrentChange(t, \"current\" === n, ByteString.EMPTY_BYTE_STRING);\n await __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore(i, e, r);\n break;\n }\n case \"rejected\":\n await __PRIVATE_localStoreReleaseTarget(i.localStore, t, /* keepPersistedTargetData */!0), __PRIVATE_removeAndCleanupTarget(i, t, r);\n break;\n default:\n fail();\n }\n}\n\n/** Adds or removes Watch targets for queries from different tabs. */\nasync function __PRIVATE_syncEngineApplyActiveTargetsChange(e, t, n) {\n const r = __PRIVATE_ensureWatchCallbacks(e);\n if (r.Ca) {\n for (const e of t) {\n if (r.fa.has(e)) {\n // A target might have been added in a previous attempt\n __PRIVATE_logDebug(\"SyncEngine\", \"Adding an already active target \" + e);\n continue;\n }\n const t = await __PRIVATE_localStoreGetCachedTarget(r.localStore, e),\n n = await __PRIVATE_localStoreAllocateTarget(r.localStore, t);\n await __PRIVATE_initializeViewAndComputeSnapshot(r, __PRIVATE_synthesizeTargetToQuery(t), n.targetId, /*current=*/!1, n.resumeToken), __PRIVATE_remoteStoreListen(r.remoteStore, n);\n }\n for (const e of n)\n // Check that the target is still active since the target might have been\n // removed if it has been rejected by the backend.\n r.fa.has(e) && (\n // Release queries that are still active.\n await __PRIVATE_localStoreReleaseTarget(r.localStore, e, /* keepPersistedTargetData */!1).then(() => {\n __PRIVATE_remoteStoreUnlisten(r.remoteStore, e), __PRIVATE_removeAndCleanupTarget(r, e);\n }).catch(__PRIVATE_ignoreIfPrimaryLeaseLoss));\n }\n}\nfunction __PRIVATE_ensureWatchCallbacks(e) {\n const t = __PRIVATE_debugCast(e);\n return t.remoteStore.remoteSyncer.applyRemoteEvent = __PRIVATE_syncEngineApplyRemoteEvent.bind(null, t), t.remoteStore.remoteSyncer.getRemoteKeysForTarget = __PRIVATE_syncEngineGetRemoteKeysForTarget.bind(null, t), t.remoteStore.remoteSyncer.rejectListen = __PRIVATE_syncEngineRejectListen.bind(null, t), t.Va.a_ = __PRIVATE_eventManagerOnWatchChange.bind(null, t.eventManager), t.Va.Fa = __PRIVATE_eventManagerOnWatchError.bind(null, t.eventManager), t;\n}\nfunction __PRIVATE_syncEngineEnsureWriteCallbacks(e) {\n const t = __PRIVATE_debugCast(e);\n return t.remoteStore.remoteSyncer.applySuccessfulWrite = __PRIVATE_syncEngineApplySuccessfulWrite.bind(null, t), t.remoteStore.remoteSyncer.rejectFailedWrite = __PRIVATE_syncEngineRejectFailedWrite.bind(null, t), t;\n}\n\n/**\n * Loads a Firestore bundle into the SDK. The returned promise resolves when\n * the bundle finished loading.\n *\n * @param syncEngine - SyncEngine to use.\n * @param bundleReader - Bundle to load into the SDK.\n * @param task - LoadBundleTask used to update the loading progress to public API.\n */\nfunction __PRIVATE_syncEngineLoadBundle(e, t, n) {\n const r = __PRIVATE_debugCast(e);\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n ( /** Loads a bundle and returns the list of affected collection groups. */\n async function __PRIVATE_loadBundleImpl(e, t, n) {\n try {\n const r = await t.getMetadata();\n if (await function __PRIVATE_localStoreHasNewerBundle(e, t) {\n const n = __PRIVATE_debugCast(e),\n r = __PRIVATE_fromVersion(t.createTime);\n return n.persistence.runTransaction(\"hasNewerBundle\", \"readonly\", e => n.Kr.getBundleMetadata(e, t.id)).then(e => !!e && e.createTime.compareTo(r) >= 0);\n }\n /**\n * Saves the given `BundleMetadata` to local persistence.\n */(e.localStore, r)) return await t.close(), n._completeWith(function __PRIVATE_bundleSuccessProgress(e) {\n return {\n taskState: \"Success\",\n documentsLoaded: e.totalDocuments,\n bytesLoaded: e.totalBytes,\n totalDocuments: e.totalDocuments,\n totalBytes: e.totalBytes\n };\n }(r)), Promise.resolve(new Set());\n n._updateProgress(__PRIVATE_bundleInitialProgress(r));\n const i = new __PRIVATE_BundleLoader(r, e.localStore, t.serializer);\n let s = await t.Ma();\n for (; s;) {\n const e = await i.ea(s);\n e && n._updateProgress(e), s = await t.Ma();\n }\n const o = await i.complete();\n return await __PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore(e, o.ra, /* remoteEvent */void 0),\n // Save metadata, so loading the same bundle will skip.\n await function __PRIVATE_localStoreSaveBundle(e, t) {\n const n = __PRIVATE_debugCast(e);\n return n.persistence.runTransaction(\"Save bundle\", \"readwrite\", e => n.Kr.saveBundleMetadata(e, t));\n }\n /**\n * Returns a promise of a `NamedQuery` associated with given query name. Promise\n * resolves to undefined if no persisted data can be found.\n */(e.localStore, r), n._completeWith(o.progress), Promise.resolve(o.na);\n } catch (e) {\n return __PRIVATE_logWarn(\"SyncEngine\", `Loading bundle failed with ${e}`), n._failWith(e), Promise.resolve(new Set());\n }\n }\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * Provides all components needed for Firestore with in-memory persistence.\n * Uses EagerGC garbage collection.\n */)(r, t, n).then(e => {\n r.sharedClientState.notifyBundleLoaded(e);\n });\n}\nclass MemoryOfflineComponentProvider {\n constructor() {\n this.synchronizeTabs = !1;\n }\n async initialize(e) {\n this.serializer = __PRIVATE_newSerializer(e.databaseInfo.databaseId), this.sharedClientState = this.createSharedClientState(e), this.persistence = this.createPersistence(e), await this.persistence.start(), this.localStore = this.createLocalStore(e), this.gcScheduler = this.createGarbageCollectionScheduler(e, this.localStore), this.indexBackfillerScheduler = this.createIndexBackfillerScheduler(e, this.localStore);\n }\n createGarbageCollectionScheduler(e, t) {\n return null;\n }\n createIndexBackfillerScheduler(e, t) {\n return null;\n }\n createLocalStore(e) {\n return __PRIVATE_newLocalStore(this.persistence, new __PRIVATE_QueryEngine(), e.initialUser, this.serializer);\n }\n createPersistence(e) {\n return new __PRIVATE_MemoryPersistence(__PRIVATE_MemoryEagerDelegate.jr, this.serializer);\n }\n createSharedClientState(e) {\n return new __PRIVATE_MemorySharedClientState();\n }\n async terminate() {\n this.gcScheduler && this.gcScheduler.stop(), await this.sharedClientState.shutdown(), await this.persistence.shutdown();\n }\n}\nclass __PRIVATE_LruGcMemoryOfflineComponentProvider extends MemoryOfflineComponentProvider {\n constructor(e) {\n super(), this.cacheSizeBytes = e;\n }\n createGarbageCollectionScheduler(e, t) {\n __PRIVATE_hardAssert(this.persistence.referenceDelegate instanceof __PRIVATE_MemoryLruDelegate);\n const n = this.persistence.referenceDelegate.garbageCollector;\n return new __PRIVATE_LruScheduler(n, e.asyncQueue, t);\n }\n createPersistence(e) {\n const t = void 0 !== this.cacheSizeBytes ? LruParams.withCacheSize(this.cacheSizeBytes) : LruParams.DEFAULT;\n return new __PRIVATE_MemoryPersistence(e => __PRIVATE_MemoryLruDelegate.jr(e, t), this.serializer);\n }\n}\n\n/**\n * Provides all components needed for Firestore with IndexedDB persistence.\n */\nclass __PRIVATE_IndexedDbOfflineComponentProvider extends MemoryOfflineComponentProvider {\n constructor(e, t, n) {\n super(), this.xa = e, this.cacheSizeBytes = t, this.forceOwnership = n, this.synchronizeTabs = !1;\n }\n async initialize(e) {\n await super.initialize(e), await this.xa.initialize(this, e),\n // Enqueue writes from a previous session\n await __PRIVATE_syncEngineEnsureWriteCallbacks(this.xa.syncEngine), await __PRIVATE_fillWritePipeline(this.xa.remoteStore),\n // NOTE: This will immediately call the listener, so we make sure to\n // set it after localStore / remoteStore are started.\n await this.persistence.mi(() => (this.gcScheduler && !this.gcScheduler.started && this.gcScheduler.start(), this.indexBackfillerScheduler && !this.indexBackfillerScheduler.started && this.indexBackfillerScheduler.start(), Promise.resolve()));\n }\n createLocalStore(e) {\n return __PRIVATE_newLocalStore(this.persistence, new __PRIVATE_QueryEngine(), e.initialUser, this.serializer);\n }\n createGarbageCollectionScheduler(e, t) {\n const n = this.persistence.referenceDelegate.garbageCollector;\n return new __PRIVATE_LruScheduler(n, e.asyncQueue, t);\n }\n createIndexBackfillerScheduler(e, t) {\n const n = new __PRIVATE_IndexBackfiller(t, this.persistence);\n return new __PRIVATE_IndexBackfillerScheduler(e.asyncQueue, n);\n }\n createPersistence(e) {\n const t = __PRIVATE_indexedDbStoragePrefix(e.databaseInfo.databaseId, e.databaseInfo.persistenceKey),\n n = void 0 !== this.cacheSizeBytes ? LruParams.withCacheSize(this.cacheSizeBytes) : LruParams.DEFAULT;\n return new __PRIVATE_IndexedDbPersistence(this.synchronizeTabs, t, e.clientId, n, e.asyncQueue, __PRIVATE_getWindow(), getDocument(), this.serializer, this.sharedClientState, !!this.forceOwnership);\n }\n createSharedClientState(e) {\n return new __PRIVATE_MemorySharedClientState();\n }\n}\n\n/**\n * Provides all components needed for Firestore with multi-tab IndexedDB\n * persistence.\n *\n * In the legacy client, this provider is used to provide both multi-tab and\n * non-multi-tab persistence since we cannot tell at build time whether\n * `synchronizeTabs` will be enabled.\n */\nclass __PRIVATE_MultiTabOfflineComponentProvider extends __PRIVATE_IndexedDbOfflineComponentProvider {\n constructor(e, t) {\n super(e, t, /* forceOwnership= */!1), this.xa = e, this.cacheSizeBytes = t, this.synchronizeTabs = !0;\n }\n async initialize(e) {\n await super.initialize(e);\n const t = this.xa.syncEngine;\n this.sharedClientState instanceof __PRIVATE_WebStorageSharedClientState && (this.sharedClientState.syncEngine = {\n Ys: __PRIVATE_syncEngineApplyBatchState.bind(null, t),\n Zs: __PRIVATE_syncEngineApplyTargetState.bind(null, t),\n Xs: __PRIVATE_syncEngineApplyActiveTargetsChange.bind(null, t),\n Bi: __PRIVATE_syncEngineGetActiveClients.bind(null, t),\n Js: __PRIVATE_syncEngineSynchronizeWithChangedDocuments.bind(null, t)\n }, await this.sharedClientState.start()),\n // NOTE: This will immediately call the listener, so we make sure to\n // set it after localStore / remoteStore are started.\n await this.persistence.mi(async e => {\n await __PRIVATE_syncEngineApplyPrimaryState(this.xa.syncEngine, e), this.gcScheduler && (e && !this.gcScheduler.started ? this.gcScheduler.start() : e || this.gcScheduler.stop()), this.indexBackfillerScheduler && (e && !this.indexBackfillerScheduler.started ? this.indexBackfillerScheduler.start() : e || this.indexBackfillerScheduler.stop());\n });\n }\n createSharedClientState(e) {\n const t = __PRIVATE_getWindow();\n if (!__PRIVATE_WebStorageSharedClientState.D(t)) throw new FirestoreError(D.UNIMPLEMENTED, \"IndexedDB persistence is only available on platforms that support LocalStorage.\");\n const n = __PRIVATE_indexedDbStoragePrefix(e.databaseInfo.databaseId, e.databaseInfo.persistenceKey);\n return new __PRIVATE_WebStorageSharedClientState(t, e.asyncQueue, n, e.clientId, e.initialUser);\n }\n}\n\n/**\n * Initializes and wires the components that are needed to interface with the\n * network.\n */\nclass OnlineComponentProvider {\n async initialize(e, t) {\n this.localStore || (this.localStore = e.localStore, this.sharedClientState = e.sharedClientState, this.datastore = this.createDatastore(t), this.remoteStore = this.createRemoteStore(t), this.eventManager = this.createEventManager(t), this.syncEngine = this.createSyncEngine(t, /* startAsPrimary=*/!e.synchronizeTabs), this.sharedClientState.onlineStateHandler = e => __PRIVATE_syncEngineApplyOnlineStateChange(this.syncEngine, e, 1 /* OnlineStateSource.SharedClientState */), this.remoteStore.remoteSyncer.handleCredentialChange = __PRIVATE_syncEngineHandleCredentialChange.bind(null, this.syncEngine), await __PRIVATE_remoteStoreApplyPrimaryState(this.remoteStore, this.syncEngine.isPrimaryClient));\n }\n createEventManager(e) {\n return function __PRIVATE_newEventManager() {\n return new __PRIVATE_EventManagerImpl();\n }();\n }\n createDatastore(e) {\n const t = __PRIVATE_newSerializer(e.databaseInfo.databaseId),\n n = function __PRIVATE_newConnection(e) {\n return new __PRIVATE_WebChannelConnection(e);\n }\n /** Return the Platform-specific connectivity monitor. */(e.databaseInfo);\n return function __PRIVATE_newDatastore(e, t, n, r) {\n return new __PRIVATE_DatastoreImpl(e, t, n, r);\n }(e.authCredentials, e.appCheckCredentials, n, t);\n }\n createRemoteStore(e) {\n return function __PRIVATE_newRemoteStore(e, t, n, r, i) {\n return new __PRIVATE_RemoteStoreImpl(e, t, n, r, i);\n }\n /** Re-enables the network. Idempotent. */(this.localStore, this.datastore, e.asyncQueue, e => __PRIVATE_syncEngineApplyOnlineStateChange(this.syncEngine, e, 0 /* OnlineStateSource.RemoteStore */), function __PRIVATE_newConnectivityMonitor() {\n return __PRIVATE_BrowserConnectivityMonitor.D() ? new __PRIVATE_BrowserConnectivityMonitor() : new __PRIVATE_NoopConnectivityMonitor();\n }());\n }\n createSyncEngine(e, t) {\n return function __PRIVATE_newSyncEngine(e, t, n,\n // PORTING NOTE: Manages state synchronization in multi-tab environments.\n r, i, s, o) {\n const _ = new __PRIVATE_SyncEngineImpl(e, t, n, r, i, s);\n return o && (_.Ca = !0), _;\n }(this.localStore, this.remoteStore, this.eventManager, this.sharedClientState, e.initialUser, e.maxConcurrentLimboResolutions, t);\n }\n terminate() {\n return async function __PRIVATE_remoteStoreShutdown(e) {\n const t = __PRIVATE_debugCast(e);\n __PRIVATE_logDebug(\"RemoteStore\", \"RemoteStore shutting down.\"), t.C_.add(5 /* OfflineCause.Shutdown */), await __PRIVATE_disableNetworkInternal(t), t.F_.shutdown(),\n // Set the OnlineState to Unknown (rather than Offline) to avoid potentially\n // triggering spurious listener events with cached data, etc.\n t.M_.set(\"Unknown\" /* OnlineState.Unknown */);\n }(this.remoteStore);\n }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * How many bytes to read each time when `ReadableStreamReader.read()` is\n * called. Only applicable for byte streams that we control (e.g. those backed\n * by an UInt8Array).\n */\n/**\n * Builds a `ByteStreamReader` from a UInt8Array.\n * @param source - The data source to use.\n * @param bytesPerRead - How many bytes each `read()` from the returned reader\n * will read.\n */\nfunction __PRIVATE_toByteStreamReaderHelper(e, t = 10240) {\n let n = 0;\n // The TypeScript definition for ReadableStreamReader changed. We use\n // `any` here to allow this code to compile with different versions.\n // See https://github.com/microsoft/TypeScript/issues/42970\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n async read() {\n if (n < e.byteLength) {\n const r = {\n value: e.slice(n, n + t),\n done: !1\n };\n return n += t, r;\n }\n return {\n done: !0\n };\n },\n async cancel() {},\n releaseLock() {},\n closed: Promise.resolve()\n };\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * On web, a `ReadableStream` is wrapped around by a `ByteStreamReader`.\n */\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/*\n * A wrapper implementation of Observer that will dispatch events\n * asynchronously. To allow immediate silencing, a mute call is added which\n * causes events scheduled to no longer be raised.\n */\nclass __PRIVATE_AsyncObserver {\n constructor(e) {\n this.observer = e,\n /**\n * When set to true, will not raise future events. Necessary to deal with\n * async detachment of listener.\n */\n this.muted = !1;\n }\n next(e) {\n this.observer.next && this.Oa(this.observer.next, e);\n }\n error(e) {\n this.observer.error ? this.Oa(this.observer.error, e) : __PRIVATE_logError(\"Uncaught Error in snapshot listener:\", e.toString());\n }\n Na() {\n this.muted = !0;\n }\n Oa(e, t) {\n this.muted || setTimeout(() => {\n this.muted || e(t);\n }, 0);\n }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A class representing a bundle.\n *\n * Takes a bundle stream or buffer, and presents abstractions to read bundled\n * elements out of the underlying content.\n */\nclass __PRIVATE_BundleReaderImpl {\n constructor( /** The reader to read from underlying binary bundle data source. */\n e, t) {\n this.Ba = e, this.serializer = t, /** Cached bundle metadata. */\n this.metadata = new __PRIVATE_Deferred(),\n /**\n * Internal buffer to hold bundle content, accumulating incomplete element\n * content.\n */\n this.buffer = new Uint8Array(), this.La = function __PRIVATE_newTextDecoder() {\n return new TextDecoder(\"utf-8\");\n }(),\n // Read the metadata (which is the first element).\n this.ka().then(e => {\n e && e.Z_() ? this.metadata.resolve(e.Y_.metadata) : this.metadata.reject(new Error(`The first element of the bundle is not a metadata, it is\\n ${JSON.stringify(null == e ? void 0 : e.Y_)}`));\n }, e => this.metadata.reject(e));\n }\n close() {\n return this.Ba.cancel();\n }\n async getMetadata() {\n return this.metadata.promise;\n }\n async Ma() {\n // Makes sure metadata is read before proceeding.\n return await this.getMetadata(), this.ka();\n }\n /**\n * Reads from the head of internal buffer, and pulling more data from\n * underlying stream if a complete element cannot be found, until an\n * element(including the prefixed length and the JSON string) is found.\n *\n * Once a complete element is read, it is dropped from internal buffer.\n *\n * Returns either the bundled element, or null if we have reached the end of\n * the stream.\n */\n async ka() {\n const e = await this.qa();\n if (null === e) return null;\n const t = this.La.decode(e),\n n = Number(t);\n isNaN(n) && this.Qa(`length string (${t}) is not valid number`);\n const r = await this.Ka(n);\n return new __PRIVATE_SizedBundleElement(JSON.parse(r), e.length + n);\n }\n /** First index of '{' from the underlying buffer. */\n $a() {\n return this.buffer.findIndex(e => e === \"{\".charCodeAt(0));\n }\n /**\n * Reads from the beginning of the internal buffer, until the first '{', and\n * return the content.\n *\n * If reached end of the stream, returns a null.\n */\n async qa() {\n for (; this.$a() < 0;) {\n if (await this.Ua()) break;\n }\n // Broke out of the loop because underlying stream is closed, and there\n // happens to be no more data to process.\n if (0 === this.buffer.length) return null;\n const e = this.$a();\n // Broke out of the loop because underlying stream is closed, but still\n // cannot find an open bracket.\n e < 0 && this.Qa(\"Reached the end of bundle when a length string is expected.\");\n const t = this.buffer.slice(0, e);\n // Update the internal buffer to drop the read length.\n return this.buffer = this.buffer.slice(e), t;\n }\n /**\n * Reads from a specified position from the internal buffer, for a specified\n * number of bytes, pulling more data from the underlying stream if needed.\n *\n * Returns a string decoded from the read bytes.\n */\n async Ka(e) {\n for (; this.buffer.length < e;) {\n (await this.Ua()) && this.Qa(\"Reached the end of bundle when more is expected.\");\n }\n const t = this.La.decode(this.buffer.slice(0, e));\n // Update the internal buffer to drop the read json string.\n return this.buffer = this.buffer.slice(e), t;\n }\n Qa(e) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n throw this.Ba.cancel(), new Error(`Invalid bundle format: ${e}`);\n }\n /**\n * Pulls more data from underlying stream to internal buffer.\n * Returns a boolean indicating whether the stream is finished.\n */\n async Ua() {\n const e = await this.Ba.read();\n if (!e.done) {\n const t = new Uint8Array(this.buffer.length + e.value.length);\n t.set(this.buffer), t.set(e.value, this.buffer.length), this.buffer = t;\n }\n return e.done;\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Internal transaction object responsible for accumulating the mutations to\n * perform and the base versions for any documents read.\n */\nclass Transaction$2 {\n constructor(e) {\n this.datastore = e,\n // The version of each document that was read during this transaction.\n this.readVersions = new Map(), this.mutations = [], this.committed = !1,\n /**\n * A deferred usage error that occurred previously in this transaction that\n * will cause the transaction to fail once it actually commits.\n */\n this.lastWriteError = null,\n /**\n * Set of documents that have been written in the transaction.\n *\n * When there's more than one write to the same key in a transaction, any\n * writes after the first are handled differently.\n */\n this.writtenDocs = new Set();\n }\n async lookup(e) {\n if (this.ensureCommitNotCalled(), this.mutations.length > 0) throw new FirestoreError(D.INVALID_ARGUMENT, \"Firestore transactions require all reads to be executed before all writes.\");\n const t = await async function __PRIVATE_invokeBatchGetDocumentsRpc(e, t) {\n const n = __PRIVATE_debugCast(e),\n r = __PRIVATE_getEncodedDatabaseId(n.serializer) + \"/documents\",\n i = {\n documents: t.map(e => __PRIVATE_toName(n.serializer, e))\n },\n s = await n.Co(\"BatchGetDocuments\", r, i, t.length),\n o = new Map();\n s.forEach(e => {\n const t = __PRIVATE_fromBatchGetDocumentsResponse(n.serializer, e);\n o.set(t.key.toString(), t);\n });\n const _ = [];\n return t.forEach(e => {\n const t = o.get(e.toString());\n __PRIVATE_hardAssert(!!t), _.push(t);\n }), _;\n }(this.datastore, e);\n return t.forEach(e => this.recordVersion(e)), t;\n }\n set(e, t) {\n this.write(t.toMutation(e, this.precondition(e))), this.writtenDocs.add(e.toString());\n }\n update(e, t) {\n try {\n this.write(t.toMutation(e, this.preconditionForUpdate(e)));\n } catch (e) {\n this.lastWriteError = e;\n }\n this.writtenDocs.add(e.toString());\n }\n delete(e) {\n this.write(new __PRIVATE_DeleteMutation(e, this.precondition(e))), this.writtenDocs.add(e.toString());\n }\n async commit() {\n if (this.ensureCommitNotCalled(), this.lastWriteError) throw this.lastWriteError;\n const e = this.readVersions;\n // For each mutation, note that the doc was written.\n this.mutations.forEach(t => {\n e.delete(t.key.toString());\n }),\n // For each document that was read but not written to, we want to perform\n // a `verify` operation.\n e.forEach((e, t) => {\n const n = DocumentKey.fromPath(t);\n this.mutations.push(new __PRIVATE_VerifyMutation(n, this.precondition(n)));\n }), await async function __PRIVATE_invokeCommitRpc(e, t) {\n const n = __PRIVATE_debugCast(e),\n r = __PRIVATE_getEncodedDatabaseId(n.serializer) + \"/documents\",\n i = {\n writes: t.map(e => toMutation(n.serializer, e))\n };\n await n.wo(\"Commit\", r, i);\n }(this.datastore, this.mutations), this.committed = !0;\n }\n recordVersion(e) {\n let t;\n if (e.isFoundDocument()) t = e.version;else {\n if (!e.isNoDocument()) throw fail();\n // Represent a deleted doc using SnapshotVersion.min().\n t = SnapshotVersion.min();\n }\n const n = this.readVersions.get(e.key.toString());\n if (n) {\n if (!t.isEqual(n))\n // This transaction will fail no matter what.\n throw new FirestoreError(D.ABORTED, \"Document version changed between two reads.\");\n } else this.readVersions.set(e.key.toString(), t);\n }\n /**\n * Returns the version of this document when it was read in this transaction,\n * as a precondition, or no precondition if it was not read.\n */\n precondition(e) {\n const t = this.readVersions.get(e.toString());\n return !this.writtenDocs.has(e.toString()) && t ? t.isEqual(SnapshotVersion.min()) ? Precondition.exists(!1) : Precondition.updateTime(t) : Precondition.none();\n }\n /**\n * Returns the precondition for a document if the operation is an update.\n */\n preconditionForUpdate(e) {\n const t = this.readVersions.get(e.toString());\n // The first time a document is written, we want to take into account the\n // read time and existence\n if (!this.writtenDocs.has(e.toString()) && t) {\n if (t.isEqual(SnapshotVersion.min()))\n // The document doesn't exist, so fail the transaction.\n // This has to be validated locally because you can't send a\n // precondition that a document does not exist without changing the\n // semantics of the backend write to be an insert. This is the reverse\n // of what we want, since we want to assert that the document doesn't\n // exist but then send the update and have it fail. Since we can't\n // express that to the backend, we have to validate locally.\n // Note: this can change once we can send separate verify writes in the\n // transaction.\n throw new FirestoreError(D.INVALID_ARGUMENT, \"Can't update a document that doesn't exist.\");\n // Document exists, base precondition on document update time.\n return Precondition.updateTime(t);\n }\n // Document was not read, so we just use the preconditions for a blind\n // update.\n return Precondition.exists(!0);\n }\n write(e) {\n this.ensureCommitNotCalled(), this.mutations.push(e);\n }\n ensureCommitNotCalled() {}\n}\n\n/**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * TransactionRunner encapsulates the logic needed to run and retry transactions\n * with backoff.\n */\nclass __PRIVATE_TransactionRunner {\n constructor(e, t, n, r, i) {\n this.asyncQueue = e, this.datastore = t, this.options = n, this.updateFunction = r, this.deferred = i, this.Wa = n.maxAttempts, this.zo = new __PRIVATE_ExponentialBackoff(this.asyncQueue, \"transaction_retry\" /* TimerId.TransactionRetry */);\n }\n /** Runs the transaction and sets the result on deferred. */\n run() {\n this.Wa -= 1, this.Ga();\n }\n Ga() {\n this.zo.ko(async () => {\n const e = new Transaction$2(this.datastore),\n t = this.za(e);\n t && t.then(t => {\n this.asyncQueue.enqueueAndForget(() => e.commit().then(() => {\n this.deferred.resolve(t);\n }).catch(e => {\n this.ja(e);\n }));\n }).catch(e => {\n this.ja(e);\n });\n });\n }\n za(e) {\n try {\n const t = this.updateFunction(e);\n return !__PRIVATE_isNullOrUndefined(t) && t.catch && t.then ? t : (this.deferred.reject(Error(\"Transaction callback must return a Promise\")), null);\n } catch (e) {\n // Do not retry errors thrown by user provided updateFunction.\n return this.deferred.reject(e), null;\n }\n }\n ja(e) {\n this.Wa > 0 && this.Ha(e) ? (this.Wa -= 1, this.asyncQueue.enqueueAndForget(() => (this.Ga(), Promise.resolve()))) : this.deferred.reject(e);\n }\n Ha(e) {\n if (\"FirebaseError\" === e.name) {\n // In transactions, the backend will fail outdated reads with FAILED_PRECONDITION and\n // non-matching document versions with ABORTED. These errors should be retried.\n const t = e.code;\n return \"aborted\" === t || \"failed-precondition\" === t || \"already-exists\" === t || !__PRIVATE_isPermanentError(t);\n }\n return !1;\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * FirestoreClient is a top-level class that constructs and owns all of the //\n * pieces of the client SDK architecture. It is responsible for creating the //\n * async queue that is shared by all of the other components in the system. //\n */\nclass FirestoreClient {\n constructor(e, t,\n /**\n * Asynchronous queue responsible for all of our internal processing. When\n * we get incoming work from the user (via public API) or the network\n * (incoming GRPC messages), we should always schedule onto this queue.\n * This ensures all of our work is properly serialized (e.g. we don't\n * start processing a new operation while the previous one is waiting for\n * an async I/O to complete).\n */\n n, r) {\n this.authCredentials = e, this.appCheckCredentials = t, this.asyncQueue = n, this.databaseInfo = r, this.user = User.UNAUTHENTICATED, this.clientId = __PRIVATE_AutoId.newId(), this.authCredentialListener = () => Promise.resolve(), this.appCheckCredentialListener = () => Promise.resolve(), this.authCredentials.start(n, async e => {\n __PRIVATE_logDebug(\"FirestoreClient\", \"Received user=\", e.uid), await this.authCredentialListener(e), this.user = e;\n }), this.appCheckCredentials.start(n, e => (__PRIVATE_logDebug(\"FirestoreClient\", \"Received new app check token=\", e), this.appCheckCredentialListener(e, this.user)));\n }\n async getConfiguration() {\n return {\n asyncQueue: this.asyncQueue,\n databaseInfo: this.databaseInfo,\n clientId: this.clientId,\n authCredentials: this.authCredentials,\n appCheckCredentials: this.appCheckCredentials,\n initialUser: this.user,\n maxConcurrentLimboResolutions: 100\n };\n }\n setCredentialChangeListener(e) {\n this.authCredentialListener = e;\n }\n setAppCheckTokenChangeListener(e) {\n this.appCheckCredentialListener = e;\n }\n /**\n * Checks that the client has not been terminated. Ensures that other methods on //\n * this class cannot be called after the client is terminated. //\n */\n verifyNotTerminated() {\n if (this.asyncQueue.isShuttingDown) throw new FirestoreError(D.FAILED_PRECONDITION, \"The client has already been terminated.\");\n }\n terminate() {\n this.asyncQueue.enterRestrictedMode();\n const e = new __PRIVATE_Deferred();\n return this.asyncQueue.enqueueAndForgetEvenWhileRestricted(async () => {\n try {\n this._onlineComponents && (await this._onlineComponents.terminate()), this._offlineComponents && (await this._offlineComponents.terminate()),\n // The credentials provider must be terminated after shutting down the\n // RemoteStore as it will prevent the RemoteStore from retrieving auth\n // tokens.\n this.authCredentials.shutdown(), this.appCheckCredentials.shutdown(), e.resolve();\n } catch (t) {\n const n = __PRIVATE_wrapInUserErrorIfRecoverable(t, \"Failed to shutdown persistence\");\n e.reject(n);\n }\n }), e.promise;\n }\n}\nasync function __PRIVATE_setOfflineComponentProvider(e, t) {\n e.asyncQueue.verifyOperationInProgress(), __PRIVATE_logDebug(\"FirestoreClient\", \"Initializing OfflineComponentProvider\");\n const n = await e.getConfiguration();\n await t.initialize(n);\n let r = n.initialUser;\n e.setCredentialChangeListener(async e => {\n r.isEqual(e) || (await __PRIVATE_localStoreHandleUserChange(t.localStore, e), r = e);\n }),\n // When a user calls clearPersistence() in one client, all other clients\n // need to be terminated to allow the delete to succeed.\n t.persistence.setDatabaseDeletedListener(() => e.terminate()), e._offlineComponents = t;\n}\nasync function __PRIVATE_setOnlineComponentProvider(e, t) {\n e.asyncQueue.verifyOperationInProgress();\n const n = await __PRIVATE_ensureOfflineComponents(e);\n __PRIVATE_logDebug(\"FirestoreClient\", \"Initializing OnlineComponentProvider\");\n const r = await e.getConfiguration();\n await t.initialize(n, r),\n // The CredentialChangeListener of the online component provider takes\n // precedence over the offline component provider.\n e.setCredentialChangeListener(e => __PRIVATE_remoteStoreHandleCredentialChange(t.remoteStore, e)), e.setAppCheckTokenChangeListener((e, n) => __PRIVATE_remoteStoreHandleCredentialChange(t.remoteStore, n)), e._onlineComponents = t;\n}\n\n/**\n * Decides whether the provided error allows us to gracefully disable\n * persistence (as opposed to crashing the client).\n */\nfunction __PRIVATE_canFallbackFromIndexedDbError(e) {\n return \"FirebaseError\" === e.name ? e.code === D.FAILED_PRECONDITION || e.code === D.UNIMPLEMENTED : !(\"undefined\" != typeof DOMException && e instanceof DOMException) ||\n // When the browser is out of quota we could get either quota exceeded\n // or an aborted error depending on whether the error happened during\n // schema migration.\n 22 === e.code || 20 === e.code ||\n // Firefox Private Browsing mode disables IndexedDb and returns\n // INVALID_STATE for any usage.\n 11 === e.code;\n}\nasync function __PRIVATE_ensureOfflineComponents(e) {\n if (!e._offlineComponents) if (e._uninitializedComponentsProvider) {\n __PRIVATE_logDebug(\"FirestoreClient\", \"Using user provided OfflineComponentProvider\");\n try {\n await __PRIVATE_setOfflineComponentProvider(e, e._uninitializedComponentsProvider._offline);\n } catch (t) {\n const n = t;\n if (!__PRIVATE_canFallbackFromIndexedDbError(n)) throw n;\n __PRIVATE_logWarn(\"Error using user provided cache. Falling back to memory cache: \" + n), await __PRIVATE_setOfflineComponentProvider(e, new MemoryOfflineComponentProvider());\n }\n } else __PRIVATE_logDebug(\"FirestoreClient\", \"Using default OfflineComponentProvider\"), await __PRIVATE_setOfflineComponentProvider(e, new MemoryOfflineComponentProvider());\n return e._offlineComponents;\n}\nasync function __PRIVATE_ensureOnlineComponents(e) {\n return e._onlineComponents || (e._uninitializedComponentsProvider ? (__PRIVATE_logDebug(\"FirestoreClient\", \"Using user provided OnlineComponentProvider\"), await __PRIVATE_setOnlineComponentProvider(e, e._uninitializedComponentsProvider._online)) : (__PRIVATE_logDebug(\"FirestoreClient\", \"Using default OnlineComponentProvider\"), await __PRIVATE_setOnlineComponentProvider(e, new OnlineComponentProvider()))), e._onlineComponents;\n}\nfunction __PRIVATE_getPersistence(e) {\n return __PRIVATE_ensureOfflineComponents(e).then(e => e.persistence);\n}\nfunction __PRIVATE_getLocalStore(e) {\n return __PRIVATE_ensureOfflineComponents(e).then(e => e.localStore);\n}\nfunction __PRIVATE_getRemoteStore(e) {\n return __PRIVATE_ensureOnlineComponents(e).then(e => e.remoteStore);\n}\nfunction __PRIVATE_getSyncEngine(e) {\n return __PRIVATE_ensureOnlineComponents(e).then(e => e.syncEngine);\n}\nfunction __PRIVATE_getDatastore(e) {\n return __PRIVATE_ensureOnlineComponents(e).then(e => e.datastore);\n}\nasync function __PRIVATE_getEventManager(e) {\n const t = await __PRIVATE_ensureOnlineComponents(e),\n n = t.eventManager;\n return n.onListen = __PRIVATE_syncEngineListen.bind(null, t.syncEngine), n.onUnlisten = __PRIVATE_syncEngineUnlisten.bind(null, t.syncEngine), n;\n}\n\n/** Enables the network connection and re-enqueues all pending operations. */\nfunction __PRIVATE_firestoreClientEnableNetwork(e) {\n return e.asyncQueue.enqueue(async () => {\n const t = await __PRIVATE_getPersistence(e),\n n = await __PRIVATE_getRemoteStore(e);\n return t.setNetworkEnabled(!0), function __PRIVATE_remoteStoreEnableNetwork(e) {\n const t = __PRIVATE_debugCast(e);\n return t.C_.delete(0 /* OfflineCause.UserDisabled */), __PRIVATE_enableNetworkInternal(t);\n }(n);\n });\n}\n\n/** Disables the network connection. Pending operations will not complete. */\nfunction __PRIVATE_firestoreClientDisableNetwork(e) {\n return e.asyncQueue.enqueue(async () => {\n const t = await __PRIVATE_getPersistence(e),\n n = await __PRIVATE_getRemoteStore(e);\n return t.setNetworkEnabled(!1), async function __PRIVATE_remoteStoreDisableNetwork(e) {\n const t = __PRIVATE_debugCast(e);\n t.C_.add(0 /* OfflineCause.UserDisabled */), await __PRIVATE_disableNetworkInternal(t),\n // Set the OnlineState to Offline so get()s return from cache, etc.\n t.M_.set(\"Offline\" /* OnlineState.Offline */);\n }(n);\n });\n}\n\n/**\n * Returns a Promise that resolves when all writes that were pending at the time\n * this method was called received server acknowledgement. An acknowledgement\n * can be either acceptance or rejection.\n */\nfunction __PRIVATE_firestoreClientGetDocumentFromLocalCache(e, t) {\n const n = new __PRIVATE_Deferred();\n return e.asyncQueue.enqueueAndForget(async () => async function __PRIVATE_readDocumentFromCache(e, t, n) {\n try {\n const r = await function __PRIVATE_localStoreReadDocument(e, t) {\n const n = __PRIVATE_debugCast(e);\n return n.persistence.runTransaction(\"read document\", \"readonly\", e => n.localDocuments.getDocument(e, t));\n }(e, t);\n r.isFoundDocument() ? n.resolve(r) : r.isNoDocument() ? n.resolve(null) : n.reject(new FirestoreError(D.UNAVAILABLE, \"Failed to get document from cache. (However, this document may exist on the server. Run again without setting 'source' in the GetOptions to attempt to retrieve the document from the server.)\"));\n } catch (e) {\n const r = __PRIVATE_wrapInUserErrorIfRecoverable(e, `Failed to get document '${t} from cache`);\n n.reject(r);\n }\n }\n /**\n * Retrieves a latency-compensated document from the backend via a\n * SnapshotListener.\n */(await __PRIVATE_getLocalStore(e), t, n)), n.promise;\n}\nfunction __PRIVATE_firestoreClientGetDocumentViaSnapshotListener(e, t, n = {}) {\n const r = new __PRIVATE_Deferred();\n return e.asyncQueue.enqueueAndForget(async () => function __PRIVATE_readDocumentViaSnapshotListener(e, t, n, r, i) {\n const s = new __PRIVATE_AsyncObserver({\n next: s => {\n // Remove query first before passing event to user to avoid\n // user actions affecting the now stale query.\n t.enqueueAndForget(() => __PRIVATE_eventManagerUnlisten(e, o));\n const _ = s.docs.has(n);\n !_ && s.fromCache ?\n // TODO(dimond): If we're online and the document doesn't\n // exist then we resolve with a doc.exists set to false. If\n // we're offline however, we reject the Promise in this\n // case. Two options: 1) Cache the negative response from\n // the server so we can deliver that even when you're\n // offline 2) Actually reject the Promise in the online case\n // if the document doesn't exist.\n i.reject(new FirestoreError(D.UNAVAILABLE, \"Failed to get document because the client is offline.\")) : _ && s.fromCache && r && \"server\" === r.source ? i.reject(new FirestoreError(D.UNAVAILABLE, 'Failed to get document from server. (However, this document does exist in the local cache. Run again without setting source to \"server\" to retrieve the cached document.)')) : i.resolve(s);\n },\n error: e => i.reject(e)\n }),\n o = new __PRIVATE_QueryListener(__PRIVATE_newQueryForPath(n.path), s, {\n includeMetadataChanges: !0,\n J_: !0\n });\n return __PRIVATE_eventManagerListen(e, o);\n }(await __PRIVATE_getEventManager(e), e.asyncQueue, t, n, r)), r.promise;\n}\nfunction __PRIVATE_firestoreClientGetDocumentsFromLocalCache(e, t) {\n const n = new __PRIVATE_Deferred();\n return e.asyncQueue.enqueueAndForget(async () => async function __PRIVATE_executeQueryFromCache(e, t, n) {\n try {\n const r = await __PRIVATE_localStoreExecuteQuery(e, t, /* usePreviousResults= */!0),\n i = new __PRIVATE_View(t, r.ls),\n s = i.ca(r.documents),\n o = i.applyChanges(s, /* limboResolutionEnabled= */!1);\n n.resolve(o.snapshot);\n } catch (e) {\n const r = __PRIVATE_wrapInUserErrorIfRecoverable(e, `Failed to execute query '${t} against cache`);\n n.reject(r);\n }\n }\n /**\n * Retrieves a latency-compensated query snapshot from the backend via a\n * SnapshotListener.\n */(await __PRIVATE_getLocalStore(e), t, n)), n.promise;\n}\nfunction __PRIVATE_firestoreClientGetDocumentsViaSnapshotListener(e, t, n = {}) {\n const r = new __PRIVATE_Deferred();\n return e.asyncQueue.enqueueAndForget(async () => function __PRIVATE_executeQueryViaSnapshotListener(e, t, n, r, i) {\n const s = new __PRIVATE_AsyncObserver({\n next: n => {\n // Remove query first before passing event to user to avoid\n // user actions affecting the now stale query.\n t.enqueueAndForget(() => __PRIVATE_eventManagerUnlisten(e, o)), n.fromCache && \"server\" === r.source ? i.reject(new FirestoreError(D.UNAVAILABLE, 'Failed to get documents from server. (However, these documents may exist in the local cache. Run again without setting source to \"server\" to retrieve the cached documents.)')) : i.resolve(n);\n },\n error: e => i.reject(e)\n }),\n o = new __PRIVATE_QueryListener(n, s, {\n includeMetadataChanges: !0,\n J_: !0\n });\n return __PRIVATE_eventManagerListen(e, o);\n }(await __PRIVATE_getEventManager(e), e.asyncQueue, t, n, r)), r.promise;\n}\nfunction __PRIVATE_firestoreClientAddSnapshotsInSyncListener(e, t) {\n const n = new __PRIVATE_AsyncObserver(t);\n return e.asyncQueue.enqueueAndForget(async () => function __PRIVATE_addSnapshotsInSyncListener(e, t) {\n __PRIVATE_debugCast(e).q_.add(t),\n // Immediately fire an initial event, indicating all existing listeners\n // are in-sync.\n t.next();\n }(await __PRIVATE_getEventManager(e), n)), () => {\n n.Na(), e.asyncQueue.enqueueAndForget(async () => function __PRIVATE_removeSnapshotsInSyncListener(e, t) {\n __PRIVATE_debugCast(e).q_.delete(t);\n }(await __PRIVATE_getEventManager(e), n));\n };\n}\n\n/**\n * Takes an updateFunction in which a set of reads and writes can be performed\n * atomically. In the updateFunction, the client can read and write values\n * using the supplied transaction object. After the updateFunction, all\n * changes will be committed. If a retryable error occurs (ex: some other\n * client has changed any of the data referenced), then the updateFunction\n * will be called again after a backoff. If the updateFunction still fails\n * after all retries, then the transaction will be rejected.\n *\n * The transaction object passed to the updateFunction contains methods for\n * accessing documents and collections. Unlike other datastore access, data\n * accessed with the transaction will not reflect local changes that have not\n * been committed. For this reason, it is required that all reads are\n * performed before any writes. Transactions must be performed while online.\n */\nfunction __PRIVATE_firestoreClientLoadBundle(e, t, n, r) {\n const i = function __PRIVATE_createBundleReader(e, t) {\n let n;\n n = \"string\" == typeof e ? __PRIVATE_newTextEncoder().encode(e) : e;\n return function __PRIVATE_newBundleReader(e, t) {\n return new __PRIVATE_BundleReaderImpl(e, t);\n }(function __PRIVATE_toByteStreamReader(e, t) {\n if (e instanceof Uint8Array) return __PRIVATE_toByteStreamReaderHelper(e, t);\n if (e instanceof ArrayBuffer) return __PRIVATE_toByteStreamReaderHelper(new Uint8Array(e), t);\n if (e instanceof ReadableStream) return e.getReader();\n throw new Error(\"Source of `toByteStreamReader` has to be a ArrayBuffer or ReadableStream\");\n }(n), t);\n }(n, __PRIVATE_newSerializer(t));\n e.asyncQueue.enqueueAndForget(async () => {\n __PRIVATE_syncEngineLoadBundle(await __PRIVATE_getSyncEngine(e), i, r);\n });\n}\nfunction __PRIVATE_firestoreClientGetNamedQuery(e, t) {\n return e.asyncQueue.enqueue(async () => function __PRIVATE_localStoreGetNamedQuery(e, t) {\n const n = __PRIVATE_debugCast(e);\n return n.persistence.runTransaction(\"Get named query\", \"readonly\", e => n.Kr.getNamedQuery(e, t));\n }(await __PRIVATE_getLocalStore(e), t));\n}\nfunction __PRIVATE_firestoreClientSetIndexConfiguration(e, t) {\n return e.asyncQueue.enqueue(async () => async function __PRIVATE_localStoreConfigureFieldIndexes(e, t) {\n const n = __PRIVATE_debugCast(e),\n r = n.indexManager,\n i = [];\n return n.persistence.runTransaction(\"Configure indexes\", \"readwrite\", e => r.getFieldIndexes(e).next(n =>\n /**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * Compares two array for equality using comparator. The method computes the\n * intersection and invokes `onAdd` for every element that is in `after` but not\n * `before`. `onRemove` is invoked for every element in `before` but missing\n * from `after`.\n *\n * The method creates a copy of both `before` and `after` and runs in O(n log\n * n), where n is the size of the two lists.\n *\n * @param before - The elements that exist in the original array.\n * @param after - The elements to diff against the original array.\n * @param comparator - The comparator for the elements in before and after.\n * @param onAdd - A function to invoke for every element that is part of `\n * after` but not `before`.\n * @param onRemove - A function to invoke for every element that is part of\n * `before` but not `after`.\n */\n function __PRIVATE_diffArrays(e, t, n, r, i) {\n e = [...e], t = [...t], e.sort(n), t.sort(n);\n const s = e.length,\n o = t.length;\n let _ = 0,\n a = 0;\n for (; _ < o && a < s;) {\n const s = n(e[a], t[_]);\n s < 0 ?\n // The element was removed if the next element in our ordered\n // walkthrough is only in `before`.\n i(e[a++]) : s > 0 ?\n // The element was added if the next element in our ordered walkthrough\n // is only in `after`.\n r(t[_++]) : (_++, a++);\n }\n for (; _ < o;) r(t[_++]);\n for (; a < s;) i(e[a++]);\n }(n, t, __PRIVATE_fieldIndexSemanticComparator, t => {\n i.push(r.addFieldIndex(e, t));\n }, t => {\n i.push(r.deleteFieldIndex(e, t));\n })).next(() => PersistencePromise.waitFor(i)));\n }(await __PRIVATE_getLocalStore(e), t));\n}\nfunction __PRIVATE_firestoreClientSetPersistentCacheIndexAutoCreationEnabled(e, t) {\n return e.asyncQueue.enqueue(async () => function __PRIVATE_localStoreSetIndexAutoCreationEnabled(e, t) {\n __PRIVATE_debugCast(e).es.$i = t;\n }(await __PRIVATE_getLocalStore(e), t));\n}\nfunction __PRIVATE_firestoreClientDeleteAllFieldIndexes(e) {\n return e.asyncQueue.enqueue(async () => function __PRIVATE_localStoreDeleteAllFieldIndexes(e) {\n const t = __PRIVATE_debugCast(e),\n n = t.indexManager;\n return t.persistence.runTransaction(\"Delete All Indexes\", \"readwrite\", e => n.deleteAllFieldIndexes(e));\n }\n /**\n * @license\n * Copyright 2019 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n // The format of the LocalStorage key that stores the client state is:\n // firestore_clients__\n (await __PRIVATE_getLocalStore(e)));\n}\n\n/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Compares two `ExperimentalLongPollingOptions` objects for equality.\n */\n/**\n * Creates and returns a new `ExperimentalLongPollingOptions` with the same\n * option values as the given instance.\n */\nfunction __PRIVATE_cloneLongPollingOptions(e) {\n const t = {};\n return void 0 !== e.timeoutSeconds && (t.timeoutSeconds = e.timeoutSeconds), t;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst me = new Map();\n\n/**\n * An instance map that ensures only one Datastore exists per Firestore\n * instance.\n */\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction __PRIVATE_validateNonEmptyArgument(e, t, n) {\n if (!n) throw new FirestoreError(D.INVALID_ARGUMENT, `Function ${e}() cannot be called with an empty ${t}.`);\n}\n\n/**\n * Validates that two boolean options are not set at the same time.\n * @internal\n */\nfunction __PRIVATE_validateIsNotUsedTogether(e, t, n, r) {\n if (!0 === t && !0 === r) throw new FirestoreError(D.INVALID_ARGUMENT, `${e} and ${n} cannot be used together.`);\n}\n\n/**\n * Validates that `path` refers to a document (indicated by the fact it contains\n * an even numbers of segments).\n */\nfunction __PRIVATE_validateDocumentPath(e) {\n if (!DocumentKey.isDocumentKey(e)) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid document reference. Document references must have an even number of segments, but ${e} has ${e.length}.`);\n}\n\n/**\n * Validates that `path` refers to a collection (indicated by the fact it\n * contains an odd numbers of segments).\n */\nfunction __PRIVATE_validateCollectionPath(e) {\n if (DocumentKey.isDocumentKey(e)) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid collection reference. Collection references must have an odd number of segments, but ${e} has ${e.length}.`);\n}\n\n/**\n * Returns true if it's a non-null object without a custom prototype\n * (i.e. excludes Array, Date, etc.).\n */\n/** Returns a string describing the type / value of the provided input. */\nfunction __PRIVATE_valueDescription(e) {\n if (void 0 === e) return \"undefined\";\n if (null === e) return \"null\";\n if (\"string\" == typeof e) return e.length > 20 && (e = `${e.substring(0, 20)}...`), JSON.stringify(e);\n if (\"number\" == typeof e || \"boolean\" == typeof e) return \"\" + e;\n if (\"object\" == typeof e) {\n if (e instanceof Array) return \"an array\";\n {\n const t = /** try to get the constructor name for an object. */\n function __PRIVATE_tryGetCustomObjectType(e) {\n if (e.constructor) return e.constructor.name;\n return null;\n }\n /**\n * Casts `obj` to `T`, optionally unwrapping Compat types to expose the\n * underlying instance. Throws if `obj` is not an instance of `T`.\n *\n * This cast is used in the Lite and Full SDK to verify instance types for\n * arguments passed to the public API.\n * @internal\n */(e);\n return t ? `a custom ${t} object` : \"an object\";\n }\n }\n return \"function\" == typeof e ? \"a function\" : fail();\n}\nfunction __PRIVATE_cast(e,\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nt) {\n if (\"_delegate\" in e && (\n // Unwrap Compat types\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n e = e._delegate), !(e instanceof t)) {\n if (t.name === e.constructor.name) throw new FirestoreError(D.INVALID_ARGUMENT, \"Type does not match the expected instance. Did you pass a reference from a different Firestore SDK?\");\n {\n const n = __PRIVATE_valueDescription(e);\n throw new FirestoreError(D.INVALID_ARGUMENT, `Expected type '${t.name}', but it was: ${n}`);\n }\n }\n return e;\n}\nfunction __PRIVATE_validatePositiveNumber(e, t) {\n if (t <= 0) throw new FirestoreError(D.INVALID_ARGUMENT, `Function ${e}() requires a positive number, but it was: ${t}.`);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// settings() defaults:\n/**\n * A concrete type describing all the values that can be applied via a\n * user-supplied `FirestoreSettings` object. This is a separate type so that\n * defaults can be supplied and the value can be checked for equality.\n */\nclass FirestoreSettingsImpl {\n constructor(e) {\n var t, n;\n if (void 0 === e.host) {\n if (void 0 !== e.ssl) throw new FirestoreError(D.INVALID_ARGUMENT, \"Can't provide ssl option if host option is not set\");\n this.host = \"firestore.googleapis.com\", this.ssl = true;\n } else this.host = e.host, this.ssl = null === (t = e.ssl) || void 0 === t || t;\n if (this.credentials = e.credentials, this.ignoreUndefinedProperties = !!e.ignoreUndefinedProperties, this.localCache = e.localCache, void 0 === e.cacheSizeBytes) this.cacheSizeBytes = 41943040;else {\n if (-1 !== e.cacheSizeBytes && e.cacheSizeBytes < 1048576) throw new FirestoreError(D.INVALID_ARGUMENT, \"cacheSizeBytes must be at least 1048576\");\n this.cacheSizeBytes = e.cacheSizeBytes;\n }\n __PRIVATE_validateIsNotUsedTogether(\"experimentalForceLongPolling\", e.experimentalForceLongPolling, \"experimentalAutoDetectLongPolling\", e.experimentalAutoDetectLongPolling), this.experimentalForceLongPolling = !!e.experimentalForceLongPolling, this.experimentalForceLongPolling ? this.experimentalAutoDetectLongPolling = !1 : void 0 === e.experimentalAutoDetectLongPolling ? this.experimentalAutoDetectLongPolling = true :\n // For backwards compatibility, coerce the value to boolean even though\n // the TypeScript compiler has narrowed the type to boolean already.\n // noinspection PointlessBooleanExpressionJS\n this.experimentalAutoDetectLongPolling = !!e.experimentalAutoDetectLongPolling, this.experimentalLongPollingOptions = __PRIVATE_cloneLongPollingOptions(null !== (n = e.experimentalLongPollingOptions) && void 0 !== n ? n : {}), function __PRIVATE_validateLongPollingOptions(e) {\n if (void 0 !== e.timeoutSeconds) {\n if (isNaN(e.timeoutSeconds)) throw new FirestoreError(D.INVALID_ARGUMENT, `invalid long polling timeout: ${e.timeoutSeconds} (must not be NaN)`);\n if (e.timeoutSeconds < 5) throw new FirestoreError(D.INVALID_ARGUMENT, `invalid long polling timeout: ${e.timeoutSeconds} (minimum allowed value is 5)`);\n if (e.timeoutSeconds > 30) throw new FirestoreError(D.INVALID_ARGUMENT, `invalid long polling timeout: ${e.timeoutSeconds} (maximum allowed value is 30)`);\n }\n }\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * The Cloud Firestore service interface.\n *\n * Do not call this constructor directly. Instead, use {@link (getFirestore:1)}.\n */(this.experimentalLongPollingOptions), this.useFetchStreams = !!e.useFetchStreams;\n }\n isEqual(e) {\n return this.host === e.host && this.ssl === e.ssl && this.credentials === e.credentials && this.cacheSizeBytes === e.cacheSizeBytes && this.experimentalForceLongPolling === e.experimentalForceLongPolling && this.experimentalAutoDetectLongPolling === e.experimentalAutoDetectLongPolling && function __PRIVATE_longPollingOptionsEqual(e, t) {\n return e.timeoutSeconds === t.timeoutSeconds;\n }(this.experimentalLongPollingOptions, e.experimentalLongPollingOptions) && this.ignoreUndefinedProperties === e.ignoreUndefinedProperties && this.useFetchStreams === e.useFetchStreams;\n }\n}\nclass Firestore$1 {\n /** @hideconstructor */\n constructor(e, t, n, r) {\n this._authCredentials = e, this._appCheckCredentials = t, this._databaseId = n, this._app = r,\n /**\n * Whether it's a Firestore or Firestore Lite instance.\n */\n this.type = \"firestore-lite\", this._persistenceKey = \"(lite)\", this._settings = new FirestoreSettingsImpl({}), this._settingsFrozen = !1;\n }\n /**\n * The {@link @firebase/app#FirebaseApp} associated with this `Firestore` service\n * instance.\n */\n get app() {\n if (!this._app) throw new FirestoreError(D.FAILED_PRECONDITION, \"Firestore was not initialized using the Firebase SDK. 'app' is not available\");\n return this._app;\n }\n get _initialized() {\n return this._settingsFrozen;\n }\n get _terminated() {\n return void 0 !== this._terminateTask;\n }\n _setSettings(e) {\n if (this._settingsFrozen) throw new FirestoreError(D.FAILED_PRECONDITION, \"Firestore has already been started and its settings can no longer be changed. You can only modify settings before calling any other methods on a Firestore object.\");\n this._settings = new FirestoreSettingsImpl(e), void 0 !== e.credentials && (this._authCredentials = function __PRIVATE_makeAuthCredentialsProvider(e) {\n if (!e) return new __PRIVATE_EmptyAuthCredentialsProvider();\n switch (e.type) {\n case \"firstParty\":\n return new __PRIVATE_FirstPartyAuthCredentialsProvider(e.sessionIndex || \"0\", e.iamToken || null, e.authTokenFactory || null);\n case \"provider\":\n return e.client;\n default:\n throw new FirestoreError(D.INVALID_ARGUMENT, \"makeAuthCredentialsProvider failed due to invalid credential type\");\n }\n }(e.credentials));\n }\n _getSettings() {\n return this._settings;\n }\n _freezeSettings() {\n return this._settingsFrozen = !0, this._settings;\n }\n _delete() {\n return this._terminateTask || (this._terminateTask = this._terminate()), this._terminateTask;\n }\n /** Returns a JSON-serializable representation of this `Firestore` instance. */\n toJSON() {\n return {\n app: this._app,\n databaseId: this._databaseId,\n settings: this._settings\n };\n }\n /**\n * Terminates all components used by this client. Subclasses can override\n * this method to clean up their own dependencies, but must also call this\n * method.\n *\n * Only ever called once.\n */\n _terminate() {\n /**\n * Removes all components associated with the provided instance. Must be called\n * when the `Firestore` instance is terminated.\n */\n return function __PRIVATE_removeComponents(e) {\n const t = me.get(e);\n t && (__PRIVATE_logDebug(\"ComponentProvider\", \"Removing Datastore\"), me.delete(e), t.terminate());\n }(this), Promise.resolve();\n }\n}\n\n/**\n * Modify this instance to communicate with the Cloud Firestore emulator.\n *\n * Note: This must be called before this instance has been used to do any\n * operations.\n *\n * @param firestore - The `Firestore` instance to configure to connect to the\n * emulator.\n * @param host - the emulator host (ex: localhost).\n * @param port - the emulator port (ex: 9000).\n * @param options.mockUserToken - the mock auth token to use for unit testing\n * Security Rules.\n */\nfunction connectFirestoreEmulator(e, t, n, r = {}) {\n var i;\n const s = (e = __PRIVATE_cast(e, Firestore$1))._getSettings(),\n o = `${t}:${n}`;\n if (\"firestore.googleapis.com\" !== s.host && s.host !== o && __PRIVATE_logWarn(\"Host has been set in both settings() and connectFirestoreEmulator(), emulator host will be used.\"), e._setSettings(Object.assign(Object.assign({}, s), {\n host: o,\n ssl: !1\n })), r.mockUserToken) {\n let t, n;\n if (\"string\" == typeof r.mockUserToken) t = r.mockUserToken, n = User.MOCK_USER;else {\n // Let createMockUserToken validate first (catches common mistakes like\n // invalid field \"uid\" and missing field \"sub\" / \"user_id\".)\n t = createMockUserToken(r.mockUserToken, null === (i = e._app) || void 0 === i ? void 0 : i.options.projectId);\n const s = r.mockUserToken.sub || r.mockUserToken.user_id;\n if (!s) throw new FirestoreError(D.INVALID_ARGUMENT, \"mockUserToken must contain 'sub' or 'user_id' field!\");\n n = new User(s);\n }\n e._authCredentials = new __PRIVATE_EmulatorAuthCredentialsProvider(new __PRIVATE_OAuthToken(t, n));\n }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A `Query` refers to a query which you can read or listen to. You can also\n * construct refined `Query` objects by adding filters and ordering.\n */\nclass Query {\n // This is the lite version of the Query class in the main SDK.\n /** @hideconstructor protected */\n constructor(e,\n /**\n * If provided, the `FirestoreDataConverter` associated with this instance.\n */\n t, n) {\n this.converter = t, this._query = n, /** The type of this Firestore reference. */\n this.type = \"query\", this.firestore = e;\n }\n withConverter(e) {\n return new Query(this.firestore, e, this._query);\n }\n}\n\n/**\n * A `DocumentReference` refers to a document location in a Firestore database\n * and can be used to write, read, or listen to the location. The document at\n * the referenced location may or may not exist.\n */\nclass DocumentReference {\n /** @hideconstructor */\n constructor(e,\n /**\n * If provided, the `FirestoreDataConverter` associated with this instance.\n */\n t, n) {\n this.converter = t, this._key = n, /** The type of this Firestore reference. */\n this.type = \"document\", this.firestore = e;\n }\n get _path() {\n return this._key.path;\n }\n /**\n * The document's identifier within its collection.\n */\n get id() {\n return this._key.path.lastSegment();\n }\n /**\n * A string representing the path of the referenced document (relative\n * to the root of the database).\n */\n get path() {\n return this._key.path.canonicalString();\n }\n /**\n * The collection this `DocumentReference` belongs to.\n */\n get parent() {\n return new CollectionReference(this.firestore, this.converter, this._key.path.popLast());\n }\n withConverter(e) {\n return new DocumentReference(this.firestore, e, this._key);\n }\n}\n\n/**\n * A `CollectionReference` object can be used for adding documents, getting\n * document references, and querying for documents (using {@link (query:1)}).\n */\nclass CollectionReference extends Query {\n /** @hideconstructor */\n constructor(e, t, n) {\n super(e, t, __PRIVATE_newQueryForPath(n)), this._path = n, /** The type of this Firestore reference. */\n this.type = \"collection\";\n }\n /** The collection's identifier. */\n get id() {\n return this._query.path.lastSegment();\n }\n /**\n * A string representing the path of the referenced collection (relative\n * to the root of the database).\n */\n get path() {\n return this._query.path.canonicalString();\n }\n /**\n * A reference to the containing `DocumentReference` if this is a\n * subcollection. If this isn't a subcollection, the reference is null.\n */\n get parent() {\n const e = this._path.popLast();\n return e.isEmpty() ? null : new DocumentReference(this.firestore, /* converter= */null, new DocumentKey(e));\n }\n withConverter(e) {\n return new CollectionReference(this.firestore, e, this._path);\n }\n}\nfunction collection(e, t, ...n) {\n if (e = getModularInstance(e), __PRIVATE_validateNonEmptyArgument(\"collection\", \"path\", t), e instanceof Firestore$1) {\n const r = ResourcePath.fromString(t, ...n);\n return __PRIVATE_validateCollectionPath(r), new CollectionReference(e, /* converter= */null, r);\n }\n {\n if (!(e instanceof DocumentReference || e instanceof CollectionReference)) throw new FirestoreError(D.INVALID_ARGUMENT, \"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore\");\n const r = e._path.child(ResourcePath.fromString(t, ...n));\n return __PRIVATE_validateCollectionPath(r), new CollectionReference(e.firestore, /* converter= */null, r);\n }\n}\n\n// TODO(firestorelite): Consider using ErrorFactory -\n// https://github.com/firebase/firebase-js-sdk/blob/0131e1f/packages/util/src/errors.ts#L106\n/**\n * Creates and returns a new `Query` instance that includes all documents in the\n * database that are contained in a collection or subcollection with the\n * given `collectionId`.\n *\n * @param firestore - A reference to the root `Firestore` instance.\n * @param collectionId - Identifies the collections to query over. Every\n * collection or subcollection with this ID as the last segment of its path\n * will be included. Cannot contain a slash.\n * @returns The created `Query`.\n */\nfunction collectionGroup(e, t) {\n if (e = __PRIVATE_cast(e, Firestore$1), __PRIVATE_validateNonEmptyArgument(\"collectionGroup\", \"collection id\", t), t.indexOf(\"/\") >= 0) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid collection ID '${t}' passed to function collectionGroup(). Collection IDs must not contain '/'.`);\n return new Query(e, /* converter= */null, function __PRIVATE_newQueryForCollectionGroup(e) {\n return new __PRIVATE_QueryImpl(ResourcePath.emptyPath(), e);\n }(t));\n}\nfunction doc(e, t, ...n) {\n if (e = getModularInstance(e),\n // We allow omission of 'pathString' but explicitly prohibit passing in both\n // 'undefined' and 'null'.\n 1 === arguments.length && (t = __PRIVATE_AutoId.newId()), __PRIVATE_validateNonEmptyArgument(\"doc\", \"path\", t), e instanceof Firestore$1) {\n const r = ResourcePath.fromString(t, ...n);\n return __PRIVATE_validateDocumentPath(r), new DocumentReference(e, /* converter= */null, new DocumentKey(r));\n }\n {\n if (!(e instanceof DocumentReference || e instanceof CollectionReference)) throw new FirestoreError(D.INVALID_ARGUMENT, \"Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore\");\n const r = e._path.child(ResourcePath.fromString(t, ...n));\n return __PRIVATE_validateDocumentPath(r), new DocumentReference(e.firestore, e instanceof CollectionReference ? e.converter : null, new DocumentKey(r));\n }\n}\n\n/**\n * Returns true if the provided references are equal.\n *\n * @param left - A reference to compare.\n * @param right - A reference to compare.\n * @returns true if the references point to the same location in the same\n * Firestore database.\n */\nfunction refEqual(e, t) {\n return e = getModularInstance(e), t = getModularInstance(t), (e instanceof DocumentReference || e instanceof CollectionReference) && (t instanceof DocumentReference || t instanceof CollectionReference) && e.firestore === t.firestore && e.path === t.path && e.converter === t.converter;\n}\n\n/**\n * Returns true if the provided queries point to the same collection and apply\n * the same constraints.\n *\n * @param left - A `Query` to compare.\n * @param right - A `Query` to compare.\n * @returns true if the references point to the same location in the same\n * Firestore database.\n */\nfunction queryEqual(e, t) {\n return e = getModularInstance(e), t = getModularInstance(t), e instanceof Query && t instanceof Query && e.firestore === t.firestore && __PRIVATE_queryEquals(e._query, t._query) && e.converter === t.converter;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass __PRIVATE_AsyncQueueImpl {\n constructor() {\n // The last promise in the queue.\n this.Ja = Promise.resolve(),\n // A list of retryable operations. Retryable operations are run in order and\n // retried with backoff.\n this.Ya = [],\n // Is this AsyncQueue being shut down? Once it is set to true, it will not\n // be changed again.\n this.Za = !1,\n // Operations scheduled to be queued in the future. Operations are\n // automatically removed after they are run or canceled.\n this.Xa = [],\n // visible for testing\n this.eu = null,\n // Flag set while there's an outstanding AsyncQueue operation, used for\n // assertion sanity-checks.\n this.tu = !1,\n // Enabled during shutdown on Safari to prevent future access to IndexedDB.\n this.nu = !1,\n // List of TimerIds to fast-forward delays for.\n this.ru = [],\n // Backoff timer used to schedule retries for retryable operations\n this.zo = new __PRIVATE_ExponentialBackoff(this, \"async_queue_retry\" /* TimerId.AsyncQueueRetry */),\n // Visibility handler that triggers an immediate retry of all retryable\n // operations. Meant to speed up recovery when we regain file system access\n // after page comes into foreground.\n this.iu = () => {\n const e = getDocument();\n e && __PRIVATE_logDebug(\"AsyncQueue\", \"Visibility state changed to \" + e.visibilityState), this.zo.Qo();\n };\n const e = getDocument();\n e && \"function\" == typeof e.addEventListener && e.addEventListener(\"visibilitychange\", this.iu);\n }\n get isShuttingDown() {\n return this.Za;\n }\n /**\n * Adds a new operation to the queue without waiting for it to complete (i.e.\n * we ignore the Promise result).\n */\n enqueueAndForget(e) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.enqueue(e);\n }\n enqueueAndForgetEvenWhileRestricted(e) {\n this.su(),\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.ou(e);\n }\n enterRestrictedMode(e) {\n if (!this.Za) {\n this.Za = !0, this.nu = e || !1;\n const t = getDocument();\n t && \"function\" == typeof t.removeEventListener && t.removeEventListener(\"visibilitychange\", this.iu);\n }\n }\n enqueue(e) {\n if (this.su(), this.Za)\n // Return a Promise which never resolves.\n return new Promise(() => {});\n // Create a deferred Promise that we can return to the callee. This\n // allows us to return a \"hanging Promise\" only to the callee and still\n // advance the queue even when the operation is not run.\n const t = new __PRIVATE_Deferred();\n return this.ou(() => this.Za && this.nu ? Promise.resolve() : (e().then(t.resolve, t.reject), t.promise)).then(() => t.promise);\n }\n enqueueRetryable(e) {\n this.enqueueAndForget(() => (this.Ya.push(e), this._u()));\n }\n /**\n * Runs the next operation from the retryable queue. If the operation fails,\n * reschedules with backoff.\n */\n async _u() {\n if (0 !== this.Ya.length) {\n try {\n await this.Ya[0](), this.Ya.shift(), this.zo.reset();\n } catch (e) {\n if (!__PRIVATE_isIndexedDbTransactionError(e)) throw e;\n // Failure will be handled by AsyncQueue\n __PRIVATE_logDebug(\"AsyncQueue\", \"Operation failed with retryable error: \" + e);\n }\n this.Ya.length > 0 &&\n // If there are additional operations, we re-schedule `retryNextOp()`.\n // This is necessary to run retryable operations that failed during\n // their initial attempt since we don't know whether they are already\n // enqueued. If, for example, `op1`, `op2`, `op3` are enqueued and `op1`\n // needs to be re-run, we will run `op1`, `op1`, `op2` using the\n // already enqueued calls to `retryNextOp()`. `op3()` will then run in the\n // call scheduled here.\n // Since `backoffAndRun()` cancels an existing backoff and schedules a\n // new backoff on every call, there is only ever a single additional\n // operation in the queue.\n this.zo.ko(() => this._u());\n }\n }\n ou(e) {\n const t = this.Ja.then(() => (this.tu = !0, e().catch(e => {\n this.eu = e, this.tu = !1;\n const t =\n /**\n * Chrome includes Error.message in Error.stack. Other browsers do not.\n * This returns expected output of message + stack when available.\n * @param error - Error or FirestoreError\n */\n function __PRIVATE_getMessageOrStack(e) {\n let t = e.message || \"\";\n e.stack && (t = e.stack.includes(e.message) ? e.stack : e.message + \"\\n\" + e.stack);\n return t;\n }\n /**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */(e);\n // Re-throw the error so that this.tail becomes a rejected Promise and\n // all further attempts to chain (via .then) will just short-circuit\n // and return the rejected Promise.\n throw __PRIVATE_logError(\"INTERNAL UNHANDLED ERROR: \", t), e;\n }).then(e => (this.tu = !1, e))));\n return this.Ja = t, t;\n }\n enqueueAfterDelay(e, t, n) {\n this.su(),\n // Fast-forward delays for timerIds that have been overriden.\n this.ru.indexOf(e) > -1 && (t = 0);\n const r = DelayedOperation.createAndSchedule(this, e, t, n, e => this.au(e));\n return this.Xa.push(r), r;\n }\n su() {\n this.eu && fail();\n }\n verifyOperationInProgress() {}\n /**\n * Waits until all currently queued tasks are finished executing. Delayed\n * operations are not run.\n */\n async uu() {\n // Operations in the queue prior to draining may have enqueued additional\n // operations. Keep draining the queue until the tail is no longer advanced,\n // which indicates that no more new operations were enqueued and that all\n // operations were executed.\n let e;\n do {\n e = this.Ja, await e;\n } while (e !== this.Ja);\n }\n /**\n * For Tests: Determine if a delayed operation with a particular TimerId\n * exists.\n */\n cu(e) {\n for (const t of this.Xa) if (t.timerId === e) return !0;\n return !1;\n }\n /**\n * For Tests: Runs some or all delayed operations early.\n *\n * @param lastTimerId - Delayed operations up to and including this TimerId\n * will be drained. Pass TimerId.All to run all delayed operations.\n * @returns a Promise that resolves once all operations have been run.\n */\n lu(e) {\n // Note that draining may generate more delayed ops, so we do that first.\n return this.uu().then(() => {\n // Run ops in the same order they'd run if they ran naturally.\n this.Xa.sort((e, t) => e.targetTimeMs - t.targetTimeMs);\n for (const t of this.Xa) if (t.skipDelay(), \"all\" /* TimerId.All */ !== e && t.timerId === e) break;\n return this.uu();\n });\n }\n /**\n * For Tests: Skip all subsequent delays for a timer id.\n */\n hu(e) {\n this.ru.push(e);\n }\n /** Called once a DelayedOperation is run or canceled. */\n au(e) {\n // NOTE: indexOf / slice are O(n), but delayedOperations is expected to be small.\n const t = this.Xa.indexOf(e);\n this.Xa.splice(t, 1);\n }\n}\nfunction __PRIVATE_isPartialObserver(e) {\n /**\n * Returns true if obj is an object and contains at least one of the specified\n * methods.\n */\n return function __PRIVATE_implementsAnyMethods(e, t) {\n if (\"object\" != typeof e || null === e) return !1;\n const n = e;\n for (const e of t) if (e in n && \"function\" == typeof n[e]) return !0;\n return !1;\n }\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * Represents the task of loading a Firestore bundle. It provides progress of bundle\n * loading, as well as task completion and error events.\n *\n * The API is compatible with `Promise`.\n */(e, [\"next\", \"error\", \"complete\"]);\n}\nclass LoadBundleTask {\n constructor() {\n this._progressObserver = {}, this._taskCompletionResolver = new __PRIVATE_Deferred(), this._lastProgress = {\n taskState: \"Running\",\n totalBytes: 0,\n totalDocuments: 0,\n bytesLoaded: 0,\n documentsLoaded: 0\n };\n }\n /**\n * Registers functions to listen to bundle loading progress events.\n * @param next - Called when there is a progress update from bundle loading. Typically `next` calls occur\n * each time a Firestore document is loaded from the bundle.\n * @param error - Called when an error occurs during bundle loading. The task aborts after reporting the\n * error, and there should be no more updates after this.\n * @param complete - Called when the loading task is complete.\n */\n onProgress(e, t, n) {\n this._progressObserver = {\n next: e,\n error: t,\n complete: n\n };\n }\n /**\n * Implements the `Promise.catch` interface.\n *\n * @param onRejected - Called when an error occurs during bundle loading.\n */\n catch(e) {\n return this._taskCompletionResolver.promise.catch(e);\n }\n /**\n * Implements the `Promise.then` interface.\n *\n * @param onFulfilled - Called on the completion of the loading task with a final `LoadBundleTaskProgress` update.\n * The update will always have its `taskState` set to `\"Success\"`.\n * @param onRejected - Called when an error occurs during bundle loading.\n */\n then(e, t) {\n return this._taskCompletionResolver.promise.then(e, t);\n }\n /**\n * Notifies all observers that bundle loading has completed, with a provided\n * `LoadBundleTaskProgress` object.\n *\n * @private\n */\n _completeWith(e) {\n this._updateProgress(e), this._progressObserver.complete && this._progressObserver.complete(), this._taskCompletionResolver.resolve(e);\n }\n /**\n * Notifies all observers that bundle loading has failed, with a provided\n * `Error` as the reason.\n *\n * @private\n */\n _failWith(e) {\n this._lastProgress.taskState = \"Error\", this._progressObserver.next && this._progressObserver.next(this._lastProgress), this._progressObserver.error && this._progressObserver.error(e), this._taskCompletionResolver.reject(e);\n }\n /**\n * Notifies a progress update of loading a bundle.\n * @param progress - The new progress.\n *\n * @private\n */\n _updateProgress(e) {\n this._lastProgress = e, this._progressObserver.next && this._progressObserver.next(e);\n }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Constant used to indicate the LRU garbage collection should be disabled.\n * Set this value as the `cacheSizeBytes` on the settings passed to the\n * {@link Firestore} instance.\n */\nconst fe = -1;\n\n/**\n * The Cloud Firestore service interface.\n *\n * Do not call this constructor directly. Instead, use {@link (getFirestore:1)}.\n */\nclass Firestore extends Firestore$1 {\n /** @hideconstructor */\n constructor(e, t, n, r) {\n super(e, t, n, r),\n /**\n * Whether it's a {@link Firestore} or Firestore Lite instance.\n */\n this.type = \"firestore\", this._queue = function __PRIVATE_newAsyncQueue() {\n return new __PRIVATE_AsyncQueueImpl();\n }(), this._persistenceKey = (null == r ? void 0 : r.name) || \"[DEFAULT]\";\n }\n _terminate() {\n return this._firestoreClient ||\n // The client must be initialized to ensure that all subsequent API\n // usage throws an exception.\n __PRIVATE_configureFirestore(this), this._firestoreClient.terminate();\n }\n}\n\n/**\n * Initializes a new instance of {@link Firestore} with the provided settings.\n * Can only be called before any other function, including\n * {@link (getFirestore:1)}. If the custom settings are empty, this function is\n * equivalent to calling {@link (getFirestore:1)}.\n *\n * @param app - The {@link @firebase/app#FirebaseApp} with which the {@link Firestore} instance will\n * be associated.\n * @param settings - A settings object to configure the {@link Firestore} instance.\n * @param databaseId - The name of the database.\n * @returns A newly initialized {@link Firestore} instance.\n */\nfunction initializeFirestore(e, t, n) {\n n || (n = \"(default)\");\n const r = _getProvider(e, \"firestore\");\n if (r.isInitialized(n)) {\n const e = r.getImmediate({\n identifier: n\n }),\n i = r.getOptions(n);\n if (deepEqual(i, t)) return e;\n throw new FirestoreError(D.FAILED_PRECONDITION, \"initializeFirestore() has already been called with different options. To avoid this error, call initializeFirestore() with the same options as when it was originally called, or call getFirestore() to return the already initialized instance.\");\n }\n if (void 0 !== t.cacheSizeBytes && void 0 !== t.localCache) throw new FirestoreError(D.INVALID_ARGUMENT, \"cache and cacheSizeBytes cannot be specified at the same time as cacheSizeBytes willbe deprecated. Instead, specify the cache size in the cache object\");\n if (void 0 !== t.cacheSizeBytes && -1 !== t.cacheSizeBytes && t.cacheSizeBytes < 1048576) throw new FirestoreError(D.INVALID_ARGUMENT, \"cacheSizeBytes must be at least 1048576\");\n return r.initialize({\n options: t,\n instanceIdentifier: n\n });\n}\nfunction getFirestore(t, n) {\n const r = \"object\" == typeof t ? t : getApp(),\n i = \"string\" == typeof t ? t : n || \"(default)\",\n s = _getProvider(r, \"firestore\").getImmediate({\n identifier: i\n });\n if (!s._initialized) {\n const e = getDefaultEmulatorHostnameAndPort(\"firestore\");\n e && connectFirestoreEmulator(s, ...e);\n }\n return s;\n}\n\n/**\n * @internal\n */\nfunction ensureFirestoreConfigured(e) {\n return e._firestoreClient || __PRIVATE_configureFirestore(e), e._firestoreClient.verifyNotTerminated(), e._firestoreClient;\n}\nfunction __PRIVATE_configureFirestore(e) {\n var t, n, r;\n const i = e._freezeSettings(),\n s = function __PRIVATE_makeDatabaseInfo(e, t, n, r) {\n return new DatabaseInfo(e, t, n, r.host, r.ssl, r.experimentalForceLongPolling, r.experimentalAutoDetectLongPolling, __PRIVATE_cloneLongPollingOptions(r.experimentalLongPollingOptions), r.useFetchStreams);\n }(e._databaseId, (null === (t = e._app) || void 0 === t ? void 0 : t.options.appId) || \"\", e._persistenceKey, i);\n e._firestoreClient = new FirestoreClient(e._authCredentials, e._appCheckCredentials, e._queue, s), (null === (n = i.localCache) || void 0 === n ? void 0 : n._offlineComponentProvider) && (null === (r = i.localCache) || void 0 === r ? void 0 : r._onlineComponentProvider) && (e._firestoreClient._uninitializedComponentsProvider = {\n _offlineKind: i.localCache.kind,\n _offline: i.localCache._offlineComponentProvider,\n _online: i.localCache._onlineComponentProvider\n });\n}\n\n/**\n * Attempts to enable persistent storage, if possible.\n *\n * Must be called before any other functions (other than\n * {@link initializeFirestore}, {@link (getFirestore:1)} or\n * {@link clearIndexedDbPersistence}.\n *\n * If this fails, `enableIndexedDbPersistence()` will reject the promise it\n * returns. Note that even after this failure, the {@link Firestore} instance will\n * remain usable, however offline persistence will be disabled.\n *\n * There are several reasons why this can fail, which can be identified by\n * the `code` on the error.\n *\n * * failed-precondition: The app is already open in another browser tab.\n * * unimplemented: The browser is incompatible with the offline\n * persistence implementation.\n *\n * Persistence cannot be used in a Node.js environment.\n *\n * @param firestore - The {@link Firestore} instance to enable persistence for.\n * @param persistenceSettings - Optional settings object to configure\n * persistence.\n * @returns A `Promise` that represents successfully enabling persistent storage.\n * @deprecated This function will be removed in a future major release. Instead, set\n * `FirestoreSettings.localCache` to an instance of `PersistentLocalCache` to\n * turn on IndexedDb cache. Calling this function when `FirestoreSettings.localCache`\n * is already specified will throw an exception.\n */\nfunction enableIndexedDbPersistence(e, t) {\n __PRIVATE_verifyNotInitialized(e = __PRIVATE_cast(e, Firestore));\n const n = ensureFirestoreConfigured(e);\n if (n._uninitializedComponentsProvider) throw new FirestoreError(D.FAILED_PRECONDITION, \"SDK cache is already specified.\");\n __PRIVATE_logWarn(\"enableIndexedDbPersistence() will be deprecated in the future, you can use `FirestoreSettings.cache` instead.\");\n const r = e._freezeSettings(),\n i = new OnlineComponentProvider();\n return __PRIVATE_setPersistenceProviders(n, i, new __PRIVATE_IndexedDbOfflineComponentProvider(i, r.cacheSizeBytes, null == t ? void 0 : t.forceOwnership));\n}\n\n/**\n * Attempts to enable multi-tab persistent storage, if possible. If enabled\n * across all tabs, all operations share access to local persistence, including\n * shared execution of queries and latency-compensated local document updates\n * across all connected instances.\n *\n * If this fails, `enableMultiTabIndexedDbPersistence()` will reject the promise\n * it returns. Note that even after this failure, the {@link Firestore} instance will\n * remain usable, however offline persistence will be disabled.\n *\n * There are several reasons why this can fail, which can be identified by\n * the `code` on the error.\n *\n * * failed-precondition: The app is already open in another browser tab and\n * multi-tab is not enabled.\n * * unimplemented: The browser is incompatible with the offline\n * persistence implementation.\n *\n * @param firestore - The {@link Firestore} instance to enable persistence for.\n * @returns A `Promise` that represents successfully enabling persistent\n * storage.\n * @deprecated This function will be removed in a future major release. Instead, set\n * `FirestoreSettings.localCache` to an instance of `PersistentLocalCache` to\n * turn on indexeddb cache. Calling this function when `FirestoreSettings.localCache`\n * is already specified will throw an exception.\n */\nfunction enableMultiTabIndexedDbPersistence(e) {\n __PRIVATE_verifyNotInitialized(e = __PRIVATE_cast(e, Firestore));\n const t = ensureFirestoreConfigured(e);\n if (t._uninitializedComponentsProvider) throw new FirestoreError(D.FAILED_PRECONDITION, \"SDK cache is already specified.\");\n __PRIVATE_logWarn(\"enableMultiTabIndexedDbPersistence() will be deprecated in the future, you can use `FirestoreSettings.cache` instead.\");\n const n = e._freezeSettings(),\n r = new OnlineComponentProvider();\n return __PRIVATE_setPersistenceProviders(t, r, new __PRIVATE_MultiTabOfflineComponentProvider(r, n.cacheSizeBytes));\n}\n\n/**\n * Registers both the `OfflineComponentProvider` and `OnlineComponentProvider`.\n * If the operation fails with a recoverable error (see\n * `canRecoverFromIndexedDbError()` below), the returned Promise is rejected\n * but the client remains usable.\n */\nfunction __PRIVATE_setPersistenceProviders(e, t, n) {\n const r = new __PRIVATE_Deferred();\n return e.asyncQueue.enqueue(async () => {\n try {\n await __PRIVATE_setOfflineComponentProvider(e, n), await __PRIVATE_setOnlineComponentProvider(e, t), r.resolve();\n } catch (e) {\n const t = e;\n if (!__PRIVATE_canFallbackFromIndexedDbError(t)) throw t;\n __PRIVATE_logWarn(\"Error enabling indexeddb cache. Falling back to memory cache: \" + t), r.reject(t);\n }\n }).then(() => r.promise);\n}\n\n/**\n * Clears the persistent storage. This includes pending writes and cached\n * documents.\n *\n * Must be called while the {@link Firestore} instance is not started (after the app is\n * terminated or when the app is first initialized). On startup, this function\n * must be called before other functions (other than {@link\n * initializeFirestore} or {@link (getFirestore:1)})). If the {@link Firestore}\n * instance is still running, the promise will be rejected with the error code\n * of `failed-precondition`.\n *\n * Note: `clearIndexedDbPersistence()` is primarily intended to help write\n * reliable tests that use Cloud Firestore. It uses an efficient mechanism for\n * dropping existing data but does not attempt to securely overwrite or\n * otherwise make cached data unrecoverable. For applications that are sensitive\n * to the disclosure of cached data in between user sessions, we strongly\n * recommend not enabling persistence at all.\n *\n * @param firestore - The {@link Firestore} instance to clear persistence for.\n * @returns A `Promise` that is resolved when the persistent storage is\n * cleared. Otherwise, the promise is rejected with an error.\n */\nfunction clearIndexedDbPersistence(e) {\n if (e._initialized && !e._terminated) throw new FirestoreError(D.FAILED_PRECONDITION, \"Persistence can only be cleared before a Firestore instance is initialized or after it is terminated.\");\n const t = new __PRIVATE_Deferred();\n return e._queue.enqueueAndForgetEvenWhileRestricted(async () => {\n try {\n await async function __PRIVATE_indexedDbClearPersistence(e) {\n if (!__PRIVATE_SimpleDb.D()) return Promise.resolve();\n const t = e + \"main\";\n await __PRIVATE_SimpleDb.delete(t);\n }(__PRIVATE_indexedDbStoragePrefix(e._databaseId, e._persistenceKey)), t.resolve();\n } catch (e) {\n t.reject(e);\n }\n }), t.promise;\n}\n\n/**\n * Waits until all currently pending writes for the active user have been\n * acknowledged by the backend.\n *\n * The returned promise resolves immediately if there are no outstanding writes.\n * Otherwise, the promise waits for all previously issued writes (including\n * those written in a previous app session), but it does not wait for writes\n * that were added after the function is called. If you want to wait for\n * additional writes, call `waitForPendingWrites()` again.\n *\n * Any outstanding `waitForPendingWrites()` promises are rejected during user\n * changes.\n *\n * @returns A `Promise` which resolves when all currently pending writes have been\n * acknowledged by the backend.\n */\nfunction waitForPendingWrites(e) {\n return function __PRIVATE_firestoreClientWaitForPendingWrites(e) {\n const t = new __PRIVATE_Deferred();\n return e.asyncQueue.enqueueAndForget(async () => __PRIVATE_syncEngineRegisterPendingWritesCallback(await __PRIVATE_getSyncEngine(e), t)), t.promise;\n }(ensureFirestoreConfigured(e = __PRIVATE_cast(e, Firestore)));\n}\n\n/**\n * Re-enables use of the network for this {@link Firestore} instance after a prior\n * call to {@link disableNetwork}.\n *\n * @returns A `Promise` that is resolved once the network has been enabled.\n */\nfunction enableNetwork(e) {\n return __PRIVATE_firestoreClientEnableNetwork(ensureFirestoreConfigured(e = __PRIVATE_cast(e, Firestore)));\n}\n\n/**\n * Disables network usage for this instance. It can be re-enabled via {@link\n * enableNetwork}. While the network is disabled, any snapshot listeners,\n * `getDoc()` or `getDocs()` calls will return results from cache, and any write\n * operations will be queued until the network is restored.\n *\n * @returns A `Promise` that is resolved once the network has been disabled.\n */\nfunction disableNetwork(e) {\n return __PRIVATE_firestoreClientDisableNetwork(ensureFirestoreConfigured(e = __PRIVATE_cast(e, Firestore)));\n}\n\n/**\n * Terminates the provided {@link Firestore} instance.\n *\n * After calling `terminate()` only the `clearIndexedDbPersistence()` function\n * may be used. Any other function will throw a `FirestoreError`.\n *\n * To restart after termination, create a new instance of FirebaseFirestore with\n * {@link (getFirestore:1)}.\n *\n * Termination does not cancel any pending writes, and any promises that are\n * awaiting a response from the server will not be resolved. If you have\n * persistence enabled, the next time you start this instance, it will resume\n * sending these writes to the server.\n *\n * Note: Under normal circumstances, calling `terminate()` is not required. This\n * function is useful only when you want to force this instance to release all\n * of its resources or in combination with `clearIndexedDbPersistence()` to\n * ensure that all local state is destroyed between test runs.\n *\n * @returns A `Promise` that is resolved when the instance has been successfully\n * terminated.\n */\nfunction terminate(e) {\n return _removeServiceInstance(e.app, \"firestore\", e._databaseId.database), e._delete();\n}\n\n/**\n * Loads a Firestore bundle into the local cache.\n *\n * @param firestore - The {@link Firestore} instance to load bundles for.\n * @param bundleData - An object representing the bundle to be loaded. Valid\n * objects are `ArrayBuffer`, `ReadableStream` or `string`.\n *\n * @returns A `LoadBundleTask` object, which notifies callers with progress\n * updates, and completion or error events. It can be used as a\n * `Promise`.\n */\nfunction loadBundle(e, t) {\n const n = ensureFirestoreConfigured(e = __PRIVATE_cast(e, Firestore)),\n r = new LoadBundleTask();\n return __PRIVATE_firestoreClientLoadBundle(n, e._databaseId, t, r), r;\n}\n\n/**\n * Reads a Firestore {@link Query} from local cache, identified by the given\n * name.\n *\n * The named queries are packaged into bundles on the server side (along\n * with resulting documents), and loaded to local cache using `loadBundle`. Once\n * in local cache, use this method to extract a {@link Query} by name.\n *\n * @param firestore - The {@link Firestore} instance to read the query from.\n * @param name - The name of the query.\n * @returns A `Promise` that is resolved with the Query or `null`.\n */\nfunction namedQuery(e, t) {\n return __PRIVATE_firestoreClientGetNamedQuery(ensureFirestoreConfigured(e = __PRIVATE_cast(e, Firestore)), t).then(t => t ? new Query(e, null, t.query) : null);\n}\nfunction __PRIVATE_verifyNotInitialized(e) {\n if (e._initialized || e._terminated) throw new FirestoreError(D.FAILED_PRECONDITION, \"Firestore has already been started and persistence can no longer be enabled. You can only enable persistence before calling any other methods on a Firestore object.\");\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Represents an aggregation that can be performed by Firestore.\n */\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nclass AggregateField {\n /**\n * Create a new AggregateField\n * @param aggregateType Specifies the type of aggregation operation to perform.\n * @param _internalFieldPath Optionally specifies the field that is aggregated.\n * @internal\n */\n constructor(e = \"count\", t) {\n this._internalFieldPath = t, /** A type string to uniquely identify instances of this class. */\n this.type = \"AggregateField\", this.aggregateType = e;\n }\n}\n\n/**\n * The results of executing an aggregation query.\n */\nclass AggregateQuerySnapshot {\n /** @hideconstructor */\n constructor(e, t, n) {\n this._userDataWriter = t, this._data = n, /** A type string to uniquely identify instances of this class. */\n this.type = \"AggregateQuerySnapshot\", this.query = e;\n }\n /**\n * Returns the results of the aggregations performed over the underlying\n * query.\n *\n * The keys of the returned object will be the same as those of the\n * `AggregateSpec` object specified to the aggregation method, and the values\n * will be the corresponding aggregation result.\n *\n * @returns The results of the aggregations performed over the underlying\n * query.\n */\n data() {\n return this._userDataWriter.convertObjectMap(this._data);\n }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An immutable object representing an array of bytes.\n */\nclass Bytes {\n /** @hideconstructor */\n constructor(e) {\n this._byteString = e;\n }\n /**\n * Creates a new `Bytes` object from the given Base64 string, converting it to\n * bytes.\n *\n * @param base64 - The Base64 string used to create the `Bytes` object.\n */\n static fromBase64String(e) {\n try {\n return new Bytes(ByteString.fromBase64String(e));\n } catch (e) {\n throw new FirestoreError(D.INVALID_ARGUMENT, \"Failed to construct data from Base64 string: \" + e);\n }\n }\n /**\n * Creates a new `Bytes` object from the given Uint8Array.\n *\n * @param array - The Uint8Array used to create the `Bytes` object.\n */\n static fromUint8Array(e) {\n return new Bytes(ByteString.fromUint8Array(e));\n }\n /**\n * Returns the underlying bytes as a Base64-encoded string.\n *\n * @returns The Base64-encoded string created from the `Bytes` object.\n */\n toBase64() {\n return this._byteString.toBase64();\n }\n /**\n * Returns the underlying bytes in a new `Uint8Array`.\n *\n * @returns The Uint8Array created from the `Bytes` object.\n */\n toUint8Array() {\n return this._byteString.toUint8Array();\n }\n /**\n * Returns a string representation of the `Bytes` object.\n *\n * @returns A string representation of the `Bytes` object.\n */\n toString() {\n return \"Bytes(base64: \" + this.toBase64() + \")\";\n }\n /**\n * Returns true if this `Bytes` object is equal to the provided one.\n *\n * @param other - The `Bytes` object to compare against.\n * @returns true if this `Bytes` object is equal to the provided one.\n */\n isEqual(e) {\n return this._byteString.isEqual(e._byteString);\n }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A `FieldPath` refers to a field in a document. The path may consist of a\n * single field name (referring to a top-level field in the document), or a\n * list of field names (referring to a nested field in the document).\n *\n * Create a `FieldPath` by providing field names. If more than one field\n * name is provided, the path will point to a nested field in a document.\n */\nclass FieldPath {\n /**\n * Creates a `FieldPath` from the provided field names. If more than one field\n * name is provided, the path will point to a nested field in a document.\n *\n * @param fieldNames - A list of field names.\n */\n constructor(...e) {\n for (let t = 0; t < e.length; ++t) if (0 === e[t].length) throw new FirestoreError(D.INVALID_ARGUMENT, \"Invalid field name at argument $(i + 1). Field names must not be empty.\");\n this._internalPath = new FieldPath$1(e);\n }\n /**\n * Returns true if this `FieldPath` is equal to the provided one.\n *\n * @param other - The `FieldPath` to compare against.\n * @returns true if this `FieldPath` is equal to the provided one.\n */\n isEqual(e) {\n return this._internalPath.isEqual(e._internalPath);\n }\n}\n\n/**\n * Returns a special sentinel `FieldPath` to refer to the ID of a document.\n * It can be used in queries to sort or filter by the document ID.\n */\nfunction documentId() {\n return new FieldPath(\"__name__\");\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Sentinel values that can be used when writing document fields with `set()`\n * or `update()`.\n */\nclass FieldValue {\n /**\n * @param _methodName - The public API endpoint that returns this class.\n * @hideconstructor\n */\n constructor(e) {\n this._methodName = e;\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * An immutable object representing a geographic location in Firestore. The\n * location is represented as latitude/longitude pair.\n *\n * Latitude values are in the range of [-90, 90].\n * Longitude values are in the range of [-180, 180].\n */\nclass GeoPoint {\n /**\n * Creates a new immutable `GeoPoint` object with the provided latitude and\n * longitude values.\n * @param latitude - The latitude as number between -90 and 90.\n * @param longitude - The longitude as number between -180 and 180.\n */\n constructor(e, t) {\n if (!isFinite(e) || e < -90 || e > 90) throw new FirestoreError(D.INVALID_ARGUMENT, \"Latitude must be a number between -90 and 90, but was: \" + e);\n if (!isFinite(t) || t < -180 || t > 180) throw new FirestoreError(D.INVALID_ARGUMENT, \"Longitude must be a number between -180 and 180, but was: \" + t);\n this._lat = e, this._long = t;\n }\n /**\n * The latitude of this `GeoPoint` instance.\n */\n get latitude() {\n return this._lat;\n }\n /**\n * The longitude of this `GeoPoint` instance.\n */\n get longitude() {\n return this._long;\n }\n /**\n * Returns true if this `GeoPoint` is equal to the provided one.\n *\n * @param other - The `GeoPoint` to compare against.\n * @returns true if this `GeoPoint` is equal to the provided one.\n */\n isEqual(e) {\n return this._lat === e._lat && this._long === e._long;\n }\n /** Returns a JSON-serializable representation of this GeoPoint. */\n toJSON() {\n return {\n latitude: this._lat,\n longitude: this._long\n };\n }\n /**\n * Actually private to JS consumers of our API, so this function is prefixed\n * with an underscore.\n */\n _compareTo(e) {\n return __PRIVATE_primitiveComparator(this._lat, e._lat) || __PRIVATE_primitiveComparator(this._long, e._long);\n }\n}\n\n/**\n * @license\n * Copyright 2017 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst ge = /^__.*__$/;\n\n/** The result of parsing document data (e.g. for a setData call). */\nclass ParsedSetData {\n constructor(e, t, n) {\n this.data = e, this.fieldMask = t, this.fieldTransforms = n;\n }\n toMutation(e, t) {\n return null !== this.fieldMask ? new __PRIVATE_PatchMutation(e, this.data, this.fieldMask, t, this.fieldTransforms) : new __PRIVATE_SetMutation(e, this.data, t, this.fieldTransforms);\n }\n}\n\n/** The result of parsing \"update\" data (i.e. for an updateData call). */\nclass ParsedUpdateData {\n constructor(e,\n // The fieldMask does not include document transforms.\n t, n) {\n this.data = e, this.fieldMask = t, this.fieldTransforms = n;\n }\n toMutation(e, t) {\n return new __PRIVATE_PatchMutation(e, this.data, this.fieldMask, t, this.fieldTransforms);\n }\n}\nfunction __PRIVATE_isWrite(e) {\n switch (e) {\n case 0 /* UserDataSource.Set */:\n // fall through\n case 2 /* UserDataSource.MergeSet */:\n // fall through\n case 1 /* UserDataSource.Update */:\n return !0;\n case 3 /* UserDataSource.Argument */:\n case 4 /* UserDataSource.ArrayArgument */:\n return !1;\n default:\n throw fail();\n }\n}\n\n/** A \"context\" object passed around while parsing user data. */\nclass __PRIVATE_ParseContextImpl {\n /**\n * Initializes a ParseContext with the given source and path.\n *\n * @param settings - The settings for the parser.\n * @param databaseId - The database ID of the Firestore instance.\n * @param serializer - The serializer to use to generate the Value proto.\n * @param ignoreUndefinedProperties - Whether to ignore undefined properties\n * rather than throw.\n * @param fieldTransforms - A mutable list of field transforms encountered\n * while parsing the data.\n * @param fieldMask - A mutable list of field paths encountered while parsing\n * the data.\n *\n * TODO(b/34871131): We don't support array paths right now, so path can be\n * null to indicate the context represents any location within an array (in\n * which case certain features will not work and errors will be somewhat\n * compromised).\n */\n constructor(e, t, n, r, i, s) {\n this.settings = e, this.databaseId = t, this.serializer = n, this.ignoreUndefinedProperties = r,\n // Minor hack: If fieldTransforms is undefined, we assume this is an\n // external call and we need to validate the entire path.\n void 0 === i && this.Pu(), this.fieldTransforms = i || [], this.fieldMask = s || [];\n }\n get path() {\n return this.settings.path;\n }\n get Iu() {\n return this.settings.Iu;\n }\n /** Returns a new context with the specified settings overwritten. */\n Tu(e) {\n return new __PRIVATE_ParseContextImpl(Object.assign(Object.assign({}, this.settings), e), this.databaseId, this.serializer, this.ignoreUndefinedProperties, this.fieldTransforms, this.fieldMask);\n }\n Eu(e) {\n var t;\n const n = null === (t = this.path) || void 0 === t ? void 0 : t.child(e),\n r = this.Tu({\n path: n,\n du: !1\n });\n return r.Au(e), r;\n }\n Ru(e) {\n var t;\n const n = null === (t = this.path) || void 0 === t ? void 0 : t.child(e),\n r = this.Tu({\n path: n,\n du: !1\n });\n return r.Pu(), r;\n }\n Vu(e) {\n // TODO(b/34871131): We don't support array paths right now; so make path\n // undefined.\n return this.Tu({\n path: void 0,\n du: !0\n });\n }\n mu(e) {\n return __PRIVATE_createError(e, this.settings.methodName, this.settings.fu || !1, this.path, this.settings.gu);\n }\n /** Returns 'true' if 'fieldPath' was traversed when creating this context. */\n contains(e) {\n return void 0 !== this.fieldMask.find(t => e.isPrefixOf(t)) || void 0 !== this.fieldTransforms.find(t => e.isPrefixOf(t.field));\n }\n Pu() {\n // TODO(b/34871131): Remove null check once we have proper paths for fields\n // within arrays.\n if (this.path) for (let e = 0; e < this.path.length; e++) this.Au(this.path.get(e));\n }\n Au(e) {\n if (0 === e.length) throw this.mu(\"Document fields must not be empty\");\n if (__PRIVATE_isWrite(this.Iu) && ge.test(e)) throw this.mu('Document fields cannot begin and end with \"__\"');\n }\n}\n\n/**\n * Helper for parsing raw user input (provided via the API) into internal model\n * classes.\n */\nclass __PRIVATE_UserDataReader {\n constructor(e, t, n) {\n this.databaseId = e, this.ignoreUndefinedProperties = t, this.serializer = n || __PRIVATE_newSerializer(e);\n }\n /** Creates a new top-level parse context. */\n pu(e, t, n, r = !1) {\n return new __PRIVATE_ParseContextImpl({\n Iu: e,\n methodName: t,\n gu: n,\n path: FieldPath$1.emptyPath(),\n du: !1,\n fu: r\n }, this.databaseId, this.serializer, this.ignoreUndefinedProperties);\n }\n}\nfunction __PRIVATE_newUserDataReader(e) {\n const t = e._freezeSettings(),\n n = __PRIVATE_newSerializer(e._databaseId);\n return new __PRIVATE_UserDataReader(e._databaseId, !!t.ignoreUndefinedProperties, n);\n}\n\n/** Parse document data from a set() call. */\nfunction __PRIVATE_parseSetData(e, t, n, r, i, s = {}) {\n const o = e.pu(s.merge || s.mergeFields ? 2 /* UserDataSource.MergeSet */ : 0 /* UserDataSource.Set */, t, n, i);\n __PRIVATE_validatePlainObject(\"Data must be an object, but it was:\", o, r);\n const _ = __PRIVATE_parseObject(r, o);\n let a, u;\n if (s.merge) a = new FieldMask(o.fieldMask), u = o.fieldTransforms;else if (s.mergeFields) {\n const e = [];\n for (const r of s.mergeFields) {\n const i = __PRIVATE_fieldPathFromArgument$1(t, r, n);\n if (!o.contains(i)) throw new FirestoreError(D.INVALID_ARGUMENT, `Field '${i}' is specified in your field mask but missing from your input data.`);\n __PRIVATE_fieldMaskContains(e, i) || e.push(i);\n }\n a = new FieldMask(e), u = o.fieldTransforms.filter(e => a.covers(e.field));\n } else a = null, u = o.fieldTransforms;\n return new ParsedSetData(new ObjectValue(_), a, u);\n}\nclass __PRIVATE_DeleteFieldValueImpl extends FieldValue {\n _toFieldTransform(e) {\n if (2 /* UserDataSource.MergeSet */ !== e.Iu) throw 1 /* UserDataSource.Update */ === e.Iu ? e.mu(`${this._methodName}() can only appear at the top level of your update data`) : e.mu(`${this._methodName}() cannot be used with set() unless you pass {merge:true}`);\n // No transform to add for a delete, but we need to add it to our\n // fieldMask so it gets deleted.\n return e.fieldMask.push(e.path), null;\n }\n isEqual(e) {\n return e instanceof __PRIVATE_DeleteFieldValueImpl;\n }\n}\n\n/**\n * Creates a child context for parsing SerializableFieldValues.\n *\n * This is different than calling `ParseContext.contextWith` because it keeps\n * the fieldTransforms and fieldMask separate.\n *\n * The created context has its `dataSource` set to `UserDataSource.Argument`.\n * Although these values are used with writes, any elements in these FieldValues\n * are not considered writes since they cannot contain any FieldValue sentinels,\n * etc.\n *\n * @param fieldValue - The sentinel FieldValue for which to create a child\n * context.\n * @param context - The parent context.\n * @param arrayElement - Whether or not the FieldValue has an array.\n */\nfunction __PRIVATE_createSentinelChildContext(e, t, n) {\n return new __PRIVATE_ParseContextImpl({\n Iu: 3 /* UserDataSource.Argument */,\n gu: t.settings.gu,\n methodName: e._methodName,\n du: n\n }, t.databaseId, t.serializer, t.ignoreUndefinedProperties);\n}\nclass __PRIVATE_ServerTimestampFieldValueImpl extends FieldValue {\n _toFieldTransform(e) {\n return new FieldTransform(e.path, new __PRIVATE_ServerTimestampTransform());\n }\n isEqual(e) {\n return e instanceof __PRIVATE_ServerTimestampFieldValueImpl;\n }\n}\nclass __PRIVATE_ArrayUnionFieldValueImpl extends FieldValue {\n constructor(e, t) {\n super(e), this.yu = t;\n }\n _toFieldTransform(e) {\n const t = __PRIVATE_createSentinelChildContext(this, e, /*array=*/!0),\n n = this.yu.map(e => __PRIVATE_parseData(e, t)),\n r = new __PRIVATE_ArrayUnionTransformOperation(n);\n return new FieldTransform(e.path, r);\n }\n isEqual(e) {\n // TODO(mrschmidt): Implement isEquals\n return this === e;\n }\n}\nclass __PRIVATE_ArrayRemoveFieldValueImpl extends FieldValue {\n constructor(e, t) {\n super(e), this.yu = t;\n }\n _toFieldTransform(e) {\n const t = __PRIVATE_createSentinelChildContext(this, e, /*array=*/!0),\n n = this.yu.map(e => __PRIVATE_parseData(e, t)),\n r = new __PRIVATE_ArrayRemoveTransformOperation(n);\n return new FieldTransform(e.path, r);\n }\n isEqual(e) {\n // TODO(mrschmidt): Implement isEquals\n return this === e;\n }\n}\nclass __PRIVATE_NumericIncrementFieldValueImpl extends FieldValue {\n constructor(e, t) {\n super(e), this.wu = t;\n }\n _toFieldTransform(e) {\n const t = new __PRIVATE_NumericIncrementTransformOperation(e.serializer, toNumber(e.serializer, this.wu));\n return new FieldTransform(e.path, t);\n }\n isEqual(e) {\n // TODO(mrschmidt): Implement isEquals\n return this === e;\n }\n}\n\n/** Parse update data from an update() call. */\nfunction __PRIVATE_parseUpdateData(e, t, n, r) {\n const i = e.pu(1 /* UserDataSource.Update */, t, n);\n __PRIVATE_validatePlainObject(\"Data must be an object, but it was:\", i, r);\n const s = [],\n o = ObjectValue.empty();\n forEach(r, (e, r) => {\n const _ = __PRIVATE_fieldPathFromDotSeparatedString(t, e, n);\n // For Compat types, we have to \"extract\" the underlying types before\n // performing validation.\n r = getModularInstance(r);\n const a = i.Ru(_);\n if (r instanceof __PRIVATE_DeleteFieldValueImpl)\n // Add it to the field mask, but don't add anything to updateData.\n s.push(_);else {\n const e = __PRIVATE_parseData(r, a);\n null != e && (s.push(_), o.set(_, e));\n }\n });\n const _ = new FieldMask(s);\n return new ParsedUpdateData(o, _, i.fieldTransforms);\n}\n\n/** Parse update data from a list of field/value arguments. */\nfunction __PRIVATE_parseUpdateVarargs(e, t, n, r, i, s) {\n const o = e.pu(1 /* UserDataSource.Update */, t, n),\n _ = [__PRIVATE_fieldPathFromArgument$1(t, r, n)],\n a = [i];\n if (s.length % 2 != 0) throw new FirestoreError(D.INVALID_ARGUMENT, `Function ${t}() needs to be called with an even number of arguments that alternate between field names and values.`);\n for (let e = 0; e < s.length; e += 2) _.push(__PRIVATE_fieldPathFromArgument$1(t, s[e])), a.push(s[e + 1]);\n const u = [],\n c = ObjectValue.empty();\n // We iterate in reverse order to pick the last value for a field if the\n // user specified the field multiple times.\n for (let e = _.length - 1; e >= 0; --e) if (!__PRIVATE_fieldMaskContains(u, _[e])) {\n const t = _[e];\n let n = a[e];\n // For Compat types, we have to \"extract\" the underlying types before\n // performing validation.\n n = getModularInstance(n);\n const r = o.Ru(t);\n if (n instanceof __PRIVATE_DeleteFieldValueImpl)\n // Add it to the field mask, but don't add anything to updateData.\n u.push(t);else {\n const e = __PRIVATE_parseData(n, r);\n null != e && (u.push(t), c.set(t, e));\n }\n }\n const l = new FieldMask(u);\n return new ParsedUpdateData(c, l, o.fieldTransforms);\n}\n\n/**\n * Parse a \"query value\" (e.g. value in a where filter or a value in a cursor\n * bound).\n *\n * @param allowArrays - Whether the query value is an array that may directly\n * contain additional arrays (e.g. the operand of an `in` query).\n */\nfunction __PRIVATE_parseQueryValue(e, t, n, r = !1) {\n return __PRIVATE_parseData(n, e.pu(r ? 4 /* UserDataSource.ArrayArgument */ : 3 /* UserDataSource.Argument */, t));\n}\n\n/**\n * Parses user data to Protobuf Values.\n *\n * @param input - Data to be parsed.\n * @param context - A context object representing the current path being parsed,\n * the source of the data being parsed, etc.\n * @returns The parsed value, or null if the value was a FieldValue sentinel\n * that should not be included in the resulting parsed data.\n */\nfunction __PRIVATE_parseData(e, t) {\n if (__PRIVATE_looksLikeJsonObject(\n // Unwrap the API type from the Compat SDK. This will return the API type\n // from firestore-exp.\n e = getModularInstance(e))) return __PRIVATE_validatePlainObject(\"Unsupported field value:\", t, e), __PRIVATE_parseObject(e, t);\n if (e instanceof FieldValue)\n // FieldValues usually parse into transforms (except deleteField())\n // in which case we do not want to include this field in our parsed data\n // (as doing so will overwrite the field directly prior to the transform\n // trying to transform it). So we don't add this location to\n // context.fieldMask and we return null as our parsing result.\n /**\n * \"Parses\" the provided FieldValueImpl, adding any necessary transforms to\n * context.fieldTransforms.\n */\n return function __PRIVATE_parseSentinelFieldValue(e, t) {\n // Sentinels are only supported with writes, and not within arrays.\n if (!__PRIVATE_isWrite(t.Iu)) throw t.mu(`${e._methodName}() can only be used with update() and set()`);\n if (!t.path) throw t.mu(`${e._methodName}() is not currently supported inside arrays`);\n const n = e._toFieldTransform(t);\n n && t.fieldTransforms.push(n);\n }\n /**\n * Helper to parse a scalar value (i.e. not an Object, Array, or FieldValue)\n *\n * @returns The parsed value\n */(e, t), null;\n if (void 0 === e && t.ignoreUndefinedProperties)\n // If the input is undefined it can never participate in the fieldMask, so\n // don't handle this below. If `ignoreUndefinedProperties` is false,\n // `parseScalarValue` will reject an undefined value.\n return null;\n if (\n // If context.path is null we are inside an array and we don't support\n // field mask paths more granular than the top-level array.\n t.path && t.fieldMask.push(t.path), e instanceof Array) {\n // TODO(b/34871131): Include the path containing the array in the error\n // message.\n // In the case of IN queries, the parsed data is an array (representing\n // the set of values to be included for the IN query) that may directly\n // contain additional arrays (each representing an individual field\n // value), so we disable this validation.\n if (t.settings.du && 4 /* UserDataSource.ArrayArgument */ !== t.Iu) throw t.mu(\"Nested arrays are not supported\");\n return function __PRIVATE_parseArray(e, t) {\n const n = [];\n let r = 0;\n for (const i of e) {\n let e = __PRIVATE_parseData(i, t.Vu(r));\n null == e && (\n // Just include nulls in the array for fields being replaced with a\n // sentinel.\n e = {\n nullValue: \"NULL_VALUE\"\n }), n.push(e), r++;\n }\n return {\n arrayValue: {\n values: n\n }\n };\n }(e, t);\n }\n return function __PRIVATE_parseScalarValue(e, t) {\n if (null === (e = getModularInstance(e))) return {\n nullValue: \"NULL_VALUE\"\n };\n if (\"number\" == typeof e) return toNumber(t.serializer, e);\n if (\"boolean\" == typeof e) return {\n booleanValue: e\n };\n if (\"string\" == typeof e) return {\n stringValue: e\n };\n if (e instanceof Date) {\n const n = Timestamp.fromDate(e);\n return {\n timestampValue: toTimestamp(t.serializer, n)\n };\n }\n if (e instanceof Timestamp) {\n // Firestore backend truncates precision down to microseconds. To ensure\n // offline mode works the same with regards to truncation, perform the\n // truncation immediately without waiting for the backend to do that.\n const n = new Timestamp(e.seconds, 1e3 * Math.floor(e.nanoseconds / 1e3));\n return {\n timestampValue: toTimestamp(t.serializer, n)\n };\n }\n if (e instanceof GeoPoint) return {\n geoPointValue: {\n latitude: e.latitude,\n longitude: e.longitude\n }\n };\n if (e instanceof Bytes) return {\n bytesValue: __PRIVATE_toBytes(t.serializer, e._byteString)\n };\n if (e instanceof DocumentReference) {\n const n = t.databaseId,\n r = e.firestore._databaseId;\n if (!r.isEqual(n)) throw t.mu(`Document reference is for database ${r.projectId}/${r.database} but should be for database ${n.projectId}/${n.database}`);\n return {\n referenceValue: __PRIVATE_toResourceName(e.firestore._databaseId || t.databaseId, e._key.path)\n };\n }\n throw t.mu(`Unsupported field value: ${__PRIVATE_valueDescription(e)}`);\n }\n /**\n * Checks whether an object looks like a JSON object that should be converted\n * into a struct. Normal class/prototype instances are considered to look like\n * JSON objects since they should be converted to a struct value. Arrays, Dates,\n * GeoPoints, etc. are not considered to look like JSON objects since they map\n * to specific FieldValue types other than ObjectValue.\n */(e, t);\n}\nfunction __PRIVATE_parseObject(e, t) {\n const n = {};\n return isEmpty(e) ?\n // If we encounter an empty object, we explicitly add it to the update\n // mask to ensure that the server creates a map entry.\n t.path && t.path.length > 0 && t.fieldMask.push(t.path) : forEach(e, (e, r) => {\n const i = __PRIVATE_parseData(r, t.Eu(e));\n null != i && (n[e] = i);\n }), {\n mapValue: {\n fields: n\n }\n };\n}\nfunction __PRIVATE_looksLikeJsonObject(e) {\n return !(\"object\" != typeof e || null === e || e instanceof Array || e instanceof Date || e instanceof Timestamp || e instanceof GeoPoint || e instanceof Bytes || e instanceof DocumentReference || e instanceof FieldValue);\n}\nfunction __PRIVATE_validatePlainObject(e, t, n) {\n if (!__PRIVATE_looksLikeJsonObject(n) || !function __PRIVATE_isPlainObject(e) {\n return \"object\" == typeof e && null !== e && (Object.getPrototypeOf(e) === Object.prototype || null === Object.getPrototypeOf(e));\n }(n)) {\n const r = __PRIVATE_valueDescription(n);\n throw \"an object\" === r ? t.mu(e + \" a custom object\") : t.mu(e + \" \" + r);\n }\n}\n\n/**\n * Helper that calls fromDotSeparatedString() but wraps any error thrown.\n */\nfunction __PRIVATE_fieldPathFromArgument$1(e, t, n) {\n if ((\n // If required, replace the FieldPath Compat class with with the firestore-exp\n // FieldPath.\n t = getModularInstance(t)) instanceof FieldPath) return t._internalPath;\n if (\"string\" == typeof t) return __PRIVATE_fieldPathFromDotSeparatedString(e, t);\n throw __PRIVATE_createError(\"Field path arguments must be of type string or \", e, /* hasConverter= */!1, /* path= */void 0, n);\n}\n\n/**\n * Matches any characters in a field path string that are reserved.\n */\nconst pe = new RegExp(\"[~\\\\*/\\\\[\\\\]]\");\n\n/**\n * Wraps fromDotSeparatedString with an error message about the method that\n * was thrown.\n * @param methodName - The publicly visible method name\n * @param path - The dot-separated string form of a field path which will be\n * split on dots.\n * @param targetDoc - The document against which the field path will be\n * evaluated.\n */\nfunction __PRIVATE_fieldPathFromDotSeparatedString(e, t, n) {\n if (t.search(pe) >= 0) throw __PRIVATE_createError(`Invalid field path (${t}). Paths must not contain '~', '*', '/', '[', or ']'`, e, /* hasConverter= */!1, /* path= */void 0, n);\n try {\n return new FieldPath(...t.split(\".\"))._internalPath;\n } catch (r) {\n throw __PRIVATE_createError(`Invalid field path (${t}). Paths must not be empty, begin with '.', end with '.', or contain '..'`, e, /* hasConverter= */!1, /* path= */void 0, n);\n }\n}\nfunction __PRIVATE_createError(e, t, n, r, i) {\n const s = r && !r.isEmpty(),\n o = void 0 !== i;\n let _ = `Function ${t}() called with invalid data`;\n n && (_ += \" (via `toFirestore()`)\"), _ += \". \";\n let a = \"\";\n return (s || o) && (a += \" (found\", s && (a += ` in field ${r}`), o && (a += ` in document ${i}`), a += \")\"), new FirestoreError(D.INVALID_ARGUMENT, _ + e + a);\n}\n\n/** Checks `haystack` if FieldPath `needle` is present. Runs in O(n). */\nfunction __PRIVATE_fieldMaskContains(e, t) {\n return e.some(e => e.isEqual(t));\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A `DocumentSnapshot` contains data read from a document in your Firestore\n * database. The data can be extracted with `.data()` or `.get()` to\n * get a specific field.\n *\n * For a `DocumentSnapshot` that points to a non-existing document, any data\n * access will return 'undefined'. You can use the `exists()` method to\n * explicitly verify a document's existence.\n */\nclass DocumentSnapshot$1 {\n // Note: This class is stripped down version of the DocumentSnapshot in\n // the legacy SDK. The changes are:\n // - No support for SnapshotMetadata.\n // - No support for SnapshotOptions.\n /** @hideconstructor protected */\n constructor(e, t, n, r, i) {\n this._firestore = e, this._userDataWriter = t, this._key = n, this._document = r, this._converter = i;\n }\n /** Property of the `DocumentSnapshot` that provides the document's ID. */\n get id() {\n return this._key.path.lastSegment();\n }\n /**\n * The `DocumentReference` for the document included in the `DocumentSnapshot`.\n */\n get ref() {\n return new DocumentReference(this._firestore, this._converter, this._key);\n }\n /**\n * Signals whether or not the document at the snapshot's location exists.\n *\n * @returns true if the document exists.\n */\n exists() {\n return null !== this._document;\n }\n /**\n * Retrieves all fields in the document as an `Object`. Returns `undefined` if\n * the document doesn't exist.\n *\n * @returns An `Object` containing all fields in the document or `undefined`\n * if the document doesn't exist.\n */\n data() {\n if (this._document) {\n if (this._converter) {\n // We only want to use the converter and create a new DocumentSnapshot\n // if a converter has been provided.\n const e = new QueryDocumentSnapshot$1(this._firestore, this._userDataWriter, this._key, this._document, /* converter= */null);\n return this._converter.fromFirestore(e);\n }\n return this._userDataWriter.convertValue(this._document.data.value);\n }\n }\n /**\n * Retrieves the field specified by `fieldPath`. Returns `undefined` if the\n * document or field doesn't exist.\n *\n * @param fieldPath - The path (for example 'foo' or 'foo.bar') to a specific\n * field.\n * @returns The data at the specified field location or undefined if no such\n * field exists in the document.\n */\n // We are using `any` here to avoid an explicit cast by our users.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get(e) {\n if (this._document) {\n const t = this._document.data.field(__PRIVATE_fieldPathFromArgument(\"DocumentSnapshot.get\", e));\n if (null !== t) return this._userDataWriter.convertValue(t);\n }\n }\n}\n\n/**\n * A `QueryDocumentSnapshot` contains data read from a document in your\n * Firestore database as part of a query. The document is guaranteed to exist\n * and its data can be extracted with `.data()` or `.get()` to get a\n * specific field.\n *\n * A `QueryDocumentSnapshot` offers the same API surface as a\n * `DocumentSnapshot`. Since query results contain only existing documents, the\n * `exists` property will always be true and `data()` will never return\n * 'undefined'.\n */\nclass QueryDocumentSnapshot$1 extends DocumentSnapshot$1 {\n /**\n * Retrieves all fields in the document as an `Object`.\n *\n * @override\n * @returns An `Object` containing all fields in the document.\n */\n data() {\n return super.data();\n }\n}\n\n/**\n * Helper that calls `fromDotSeparatedString()` but wraps any error thrown.\n */\nfunction __PRIVATE_fieldPathFromArgument(e, t) {\n return \"string\" == typeof t ? __PRIVATE_fieldPathFromDotSeparatedString(e, t) : t instanceof FieldPath ? t._internalPath : t._delegate._internalPath;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction __PRIVATE_validateHasExplicitOrderByForLimitToLast(e) {\n if (\"L\" /* LimitType.Last */ === e.limitType && 0 === e.explicitOrderBy.length) throw new FirestoreError(D.UNIMPLEMENTED, \"limitToLast() queries require specifying at least one orderBy() clause\");\n}\n\n/**\n * An `AppliableConstraint` is an abstraction of a constraint that can be applied\n * to a Firestore query.\n */\nclass AppliableConstraint {}\n\n/**\n * A `QueryConstraint` is used to narrow the set of documents returned by a\n * Firestore query. `QueryConstraint`s are created by invoking {@link where},\n * {@link orderBy}, {@link (startAt:1)}, {@link (startAfter:1)}, {@link\n * (endBefore:1)}, {@link (endAt:1)}, {@link limit}, {@link limitToLast} and\n * can then be passed to {@link (query:1)} to create a new query instance that\n * also contains this `QueryConstraint`.\n */\nclass QueryConstraint extends AppliableConstraint {}\nfunction query(e, t, ...n) {\n let r = [];\n t instanceof AppliableConstraint && r.push(t), r = r.concat(n), function __PRIVATE_validateQueryConstraintArray(e) {\n const t = e.filter(e => e instanceof QueryCompositeFilterConstraint).length,\n n = e.filter(e => e instanceof QueryFieldFilterConstraint).length;\n if (t > 1 || t > 0 && n > 0) throw new FirestoreError(D.INVALID_ARGUMENT, \"InvalidQuery. When using composite filters, you cannot use more than one filter at the top level. Consider nesting the multiple filters within an `and(...)` statement. For example: change `query(query, where(...), or(...))` to `query(query, and(where(...), or(...)))`.\");\n }\n /**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n /**\n * Converts Firestore's internal types to the JavaScript types that we expose\n * to the user.\n *\n * @internal\n */(r);\n for (const t of r) e = t._apply(e);\n return e;\n}\n\n/**\n * A `QueryFieldFilterConstraint` is used to narrow the set of documents returned by\n * a Firestore query by filtering on one or more document fields.\n * `QueryFieldFilterConstraint`s are created by invoking {@link where} and can then\n * be passed to {@link (query:1)} to create a new query instance that also contains\n * this `QueryFieldFilterConstraint`.\n */\nclass QueryFieldFilterConstraint extends QueryConstraint {\n /**\n * @internal\n */\n constructor(e, t, n) {\n super(), this._field = e, this._op = t, this._value = n, /** The type of this query constraint */\n this.type = \"where\";\n }\n static _create(e, t, n) {\n return new QueryFieldFilterConstraint(e, t, n);\n }\n _apply(e) {\n const t = this._parse(e);\n return __PRIVATE_validateNewFieldFilter(e._query, t), new Query(e.firestore, e.converter, __PRIVATE_queryWithAddedFilter(e._query, t));\n }\n _parse(e) {\n const t = __PRIVATE_newUserDataReader(e.firestore),\n n = function __PRIVATE_newQueryFilter(e, t, n, r, i, s, o) {\n let _;\n if (i.isKeyField()) {\n if (\"array-contains\" /* Operator.ARRAY_CONTAINS */ === s || \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */ === s) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid Query. You can't perform '${s}' queries on documentId().`);\n if (\"in\" /* Operator.IN */ === s || \"not-in\" /* Operator.NOT_IN */ === s) {\n __PRIVATE_validateDisjunctiveFilterElements(o, s);\n const t = [];\n for (const n of o) t.push(__PRIVATE_parseDocumentIdValue(r, e, n));\n _ = {\n arrayValue: {\n values: t\n }\n };\n } else _ = __PRIVATE_parseDocumentIdValue(r, e, o);\n } else \"in\" /* Operator.IN */ !== s && \"not-in\" /* Operator.NOT_IN */ !== s && \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */ !== s || __PRIVATE_validateDisjunctiveFilterElements(o, s), _ = __PRIVATE_parseQueryValue(n, t, o, /* allowArrays= */\"in\" /* Operator.IN */ === s || \"not-in\" /* Operator.NOT_IN */ === s);\n return FieldFilter.create(i, s, _);\n }(e._query, \"where\", t, e.firestore._databaseId, this._field, this._op, this._value);\n return n;\n }\n}\n\n/**\n * Creates a {@link QueryFieldFilterConstraint} that enforces that documents\n * must contain the specified field and that the value should satisfy the\n * relation constraint provided.\n *\n * @param fieldPath - The path to compare\n * @param opStr - The operation string (e.g \"<\", \"<=\", \"==\", \"<\",\n * \"<=\", \"!=\").\n * @param value - The value for comparison\n * @returns The created {@link QueryFieldFilterConstraint}.\n */\nfunction where(e, t, n) {\n const r = t,\n i = __PRIVATE_fieldPathFromArgument(\"where\", e);\n return QueryFieldFilterConstraint._create(i, r, n);\n}\n\n/**\n * A `QueryCompositeFilterConstraint` is used to narrow the set of documents\n * returned by a Firestore query by performing the logical OR or AND of multiple\n * {@link QueryFieldFilterConstraint}s or {@link QueryCompositeFilterConstraint}s.\n * `QueryCompositeFilterConstraint`s are created by invoking {@link or} or\n * {@link and} and can then be passed to {@link (query:1)} to create a new query\n * instance that also contains the `QueryCompositeFilterConstraint`.\n */\nclass QueryCompositeFilterConstraint extends AppliableConstraint {\n /**\n * @internal\n */\n constructor( /** The type of this query constraint */\n e, t) {\n super(), this.type = e, this._queryConstraints = t;\n }\n static _create(e, t) {\n return new QueryCompositeFilterConstraint(e, t);\n }\n _parse(e) {\n const t = this._queryConstraints.map(t => t._parse(e)).filter(e => e.getFilters().length > 0);\n return 1 === t.length ? t[0] : CompositeFilter.create(t, this._getOperator());\n }\n _apply(e) {\n const t = this._parse(e);\n return 0 === t.getFilters().length ? e : (function __PRIVATE_validateNewFilter(e, t) {\n let n = e;\n const r = t.getFlattenedFilters();\n for (const e of r) __PRIVATE_validateNewFieldFilter(n, e), n = __PRIVATE_queryWithAddedFilter(n, e);\n }\n // Checks if any of the provided filter operators are included in the given list of filters and\n // returns the first one that is, or null if none are.\n (e._query, t), new Query(e.firestore, e.converter, __PRIVATE_queryWithAddedFilter(e._query, t)));\n }\n _getQueryConstraints() {\n return this._queryConstraints;\n }\n _getOperator() {\n return \"and\" === this.type ? \"and\" /* CompositeOperator.AND */ : \"or\" /* CompositeOperator.OR */;\n }\n}\n\n/**\n * Creates a new {@link QueryCompositeFilterConstraint} that is a disjunction of\n * the given filter constraints. A disjunction filter includes a document if it\n * satisfies any of the given filters.\n *\n * @param queryConstraints - Optional. The list of\n * {@link QueryFilterConstraint}s to perform a disjunction for. These must be\n * created with calls to {@link where}, {@link or}, or {@link and}.\n * @returns The newly created {@link QueryCompositeFilterConstraint}.\n */\nfunction or(...e) {\n // Only support QueryFilterConstraints\n return e.forEach(e => __PRIVATE_validateQueryFilterConstraint(\"or\", e)), QueryCompositeFilterConstraint._create(\"or\" /* CompositeOperator.OR */, e);\n}\n\n/**\n * Creates a new {@link QueryCompositeFilterConstraint} that is a conjunction of\n * the given filter constraints. A conjunction filter includes a document if it\n * satisfies all of the given filters.\n *\n * @param queryConstraints - Optional. The list of\n * {@link QueryFilterConstraint}s to perform a conjunction for. These must be\n * created with calls to {@link where}, {@link or}, or {@link and}.\n * @returns The newly created {@link QueryCompositeFilterConstraint}.\n */\nfunction and(...e) {\n // Only support QueryFilterConstraints\n return e.forEach(e => __PRIVATE_validateQueryFilterConstraint(\"and\", e)), QueryCompositeFilterConstraint._create(\"and\" /* CompositeOperator.AND */, e);\n}\n\n/**\n * A `QueryOrderByConstraint` is used to sort the set of documents returned by a\n * Firestore query. `QueryOrderByConstraint`s are created by invoking\n * {@link orderBy} and can then be passed to {@link (query:1)} to create a new query\n * instance that also contains this `QueryOrderByConstraint`.\n *\n * Note: Documents that do not contain the orderBy field will not be present in\n * the query result.\n */\nclass QueryOrderByConstraint extends QueryConstraint {\n /**\n * @internal\n */\n constructor(e, t) {\n super(), this._field = e, this._direction = t, /** The type of this query constraint */\n this.type = \"orderBy\";\n }\n static _create(e, t) {\n return new QueryOrderByConstraint(e, t);\n }\n _apply(e) {\n const t = function __PRIVATE_newQueryOrderBy(e, t, n) {\n if (null !== e.startAt) throw new FirestoreError(D.INVALID_ARGUMENT, \"Invalid query. You must not call startAt() or startAfter() before calling orderBy().\");\n if (null !== e.endAt) throw new FirestoreError(D.INVALID_ARGUMENT, \"Invalid query. You must not call endAt() or endBefore() before calling orderBy().\");\n return new OrderBy(t, n);\n }\n /**\n * Create a `Bound` from a query and a document.\n *\n * Note that the `Bound` will always include the key of the document\n * and so only the provided document will compare equal to the returned\n * position.\n *\n * Will throw if the document does not contain all fields of the order by\n * of the query or if any of the fields in the order by are an uncommitted\n * server timestamp.\n */(e._query, this._field, this._direction);\n return new Query(e.firestore, e.converter, function __PRIVATE_queryWithAddedOrderBy(e, t) {\n // TODO(dimond): validate that orderBy does not list the same key twice.\n const n = e.explicitOrderBy.concat([t]);\n return new __PRIVATE_QueryImpl(e.path, e.collectionGroup, n, e.filters.slice(), e.limit, e.limitType, e.startAt, e.endAt);\n }(e._query, t));\n }\n}\n\n/**\n * Creates a {@link QueryOrderByConstraint} that sorts the query result by the\n * specified field, optionally in descending order instead of ascending.\n *\n * Note: Documents that do not contain the specified field will not be present\n * in the query result.\n *\n * @param fieldPath - The field to sort by.\n * @param directionStr - Optional direction to sort by ('asc' or 'desc'). If\n * not specified, order will be ascending.\n * @returns The created {@link QueryOrderByConstraint}.\n */\nfunction orderBy(e, t = \"asc\") {\n const n = t,\n r = __PRIVATE_fieldPathFromArgument(\"orderBy\", e);\n return QueryOrderByConstraint._create(r, n);\n}\n\n/**\n * A `QueryLimitConstraint` is used to limit the number of documents returned by\n * a Firestore query.\n * `QueryLimitConstraint`s are created by invoking {@link limit} or\n * {@link limitToLast} and can then be passed to {@link (query:1)} to create a new\n * query instance that also contains this `QueryLimitConstraint`.\n */\nclass QueryLimitConstraint extends QueryConstraint {\n /**\n * @internal\n */\n constructor( /** The type of this query constraint */\n e, t, n) {\n super(), this.type = e, this._limit = t, this._limitType = n;\n }\n static _create(e, t, n) {\n return new QueryLimitConstraint(e, t, n);\n }\n _apply(e) {\n return new Query(e.firestore, e.converter, __PRIVATE_queryWithLimit(e._query, this._limit, this._limitType));\n }\n}\n\n/**\n * Creates a {@link QueryLimitConstraint} that only returns the first matching\n * documents.\n *\n * @param limit - The maximum number of items to return.\n * @returns The created {@link QueryLimitConstraint}.\n */\nfunction limit(e) {\n return __PRIVATE_validatePositiveNumber(\"limit\", e), QueryLimitConstraint._create(\"limit\", e, \"F\" /* LimitType.First */);\n}\n\n/**\n * Creates a {@link QueryLimitConstraint} that only returns the last matching\n * documents.\n *\n * You must specify at least one `orderBy` clause for `limitToLast` queries,\n * otherwise an exception will be thrown during execution.\n *\n * @param limit - The maximum number of items to return.\n * @returns The created {@link QueryLimitConstraint}.\n */\nfunction limitToLast(e) {\n return __PRIVATE_validatePositiveNumber(\"limitToLast\", e), QueryLimitConstraint._create(\"limitToLast\", e, \"L\" /* LimitType.Last */);\n}\n\n/**\n * A `QueryStartAtConstraint` is used to exclude documents from the start of a\n * result set returned by a Firestore query.\n * `QueryStartAtConstraint`s are created by invoking {@link (startAt:1)} or\n * {@link (startAfter:1)} and can then be passed to {@link (query:1)} to create a\n * new query instance that also contains this `QueryStartAtConstraint`.\n */\nclass QueryStartAtConstraint extends QueryConstraint {\n /**\n * @internal\n */\n constructor( /** The type of this query constraint */\n e, t, n) {\n super(), this.type = e, this._docOrFields = t, this._inclusive = n;\n }\n static _create(e, t, n) {\n return new QueryStartAtConstraint(e, t, n);\n }\n _apply(e) {\n const t = __PRIVATE_newQueryBoundFromDocOrFields(e, this.type, this._docOrFields, this._inclusive);\n return new Query(e.firestore, e.converter, function __PRIVATE_queryWithStartAt(e, t) {\n return new __PRIVATE_QueryImpl(e.path, e.collectionGroup, e.explicitOrderBy.slice(), e.filters.slice(), e.limit, e.limitType, t, e.endAt);\n }(e._query, t));\n }\n}\nfunction startAt(...e) {\n return QueryStartAtConstraint._create(\"startAt\", e, /*inclusive=*/!0);\n}\nfunction startAfter(...e) {\n return QueryStartAtConstraint._create(\"startAfter\", e, /*inclusive=*/!1);\n}\n\n/**\n * A `QueryEndAtConstraint` is used to exclude documents from the end of a\n * result set returned by a Firestore query.\n * `QueryEndAtConstraint`s are created by invoking {@link (endAt:1)} or\n * {@link (endBefore:1)} and can then be passed to {@link (query:1)} to create a new\n * query instance that also contains this `QueryEndAtConstraint`.\n */\nclass QueryEndAtConstraint extends QueryConstraint {\n /**\n * @internal\n */\n constructor( /** The type of this query constraint */\n e, t, n) {\n super(), this.type = e, this._docOrFields = t, this._inclusive = n;\n }\n static _create(e, t, n) {\n return new QueryEndAtConstraint(e, t, n);\n }\n _apply(e) {\n const t = __PRIVATE_newQueryBoundFromDocOrFields(e, this.type, this._docOrFields, this._inclusive);\n return new Query(e.firestore, e.converter, function __PRIVATE_queryWithEndAt(e, t) {\n return new __PRIVATE_QueryImpl(e.path, e.collectionGroup, e.explicitOrderBy.slice(), e.filters.slice(), e.limit, e.limitType, e.startAt, t);\n }(e._query, t));\n }\n}\nfunction endBefore(...e) {\n return QueryEndAtConstraint._create(\"endBefore\", e, /*inclusive=*/!1);\n}\nfunction endAt(...e) {\n return QueryEndAtConstraint._create(\"endAt\", e, /*inclusive=*/!0);\n}\n\n/** Helper function to create a bound from a document or fields */\nfunction __PRIVATE_newQueryBoundFromDocOrFields(e, t, n, r) {\n if (n[0] = getModularInstance(n[0]), n[0] instanceof DocumentSnapshot$1) return function __PRIVATE_newQueryBoundFromDocument(e, t, n, r, i) {\n if (!r) throw new FirestoreError(D.NOT_FOUND, `Can't use a DocumentSnapshot that doesn't exist for ${n}().`);\n const s = [];\n // Because people expect to continue/end a query at the exact document\n // provided, we need to use the implicit sort order rather than the explicit\n // sort order, because it's guaranteed to contain the document key. That way\n // the position becomes unambiguous and the query continues/ends exactly at\n // the provided document. Without the key (by using the explicit sort\n // orders), multiple documents could match the position, yielding duplicate\n // results.\n for (const n of __PRIVATE_queryNormalizedOrderBy(e)) if (n.field.isKeyField()) s.push(__PRIVATE_refValue(t, r.key));else {\n const e = r.data.field(n.field);\n if (__PRIVATE_isServerTimestamp(e)) throw new FirestoreError(D.INVALID_ARGUMENT, 'Invalid query. You are trying to start or end a query using a document for which the field \"' + n.field + '\" is an uncommitted server timestamp. (Since the value of this field is unknown, you cannot start/end a query with it.)');\n if (null === e) {\n const e = n.field.canonicalString();\n throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid query. You are trying to start or end a query using a document for which the field '${e}' (used as the orderBy) does not exist.`);\n }\n s.push(e);\n }\n return new Bound(s, i);\n }\n /**\n * Converts a list of field values to a `Bound` for the given query.\n */(e._query, e.firestore._databaseId, t, n[0]._document, r);\n {\n const i = __PRIVATE_newUserDataReader(e.firestore);\n return function __PRIVATE_newQueryBoundFromFields(e, t, n, r, i, s) {\n // Use explicit order by's because it has to match the query the user made\n const o = e.explicitOrderBy;\n if (i.length > o.length) throw new FirestoreError(D.INVALID_ARGUMENT, `Too many arguments provided to ${r}(). The number of arguments must be less than or equal to the number of orderBy() clauses`);\n const _ = [];\n for (let s = 0; s < i.length; s++) {\n const a = i[s];\n if (o[s].field.isKeyField()) {\n if (\"string\" != typeof a) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid query. Expected a string for document ID in ${r}(), but got a ${typeof a}`);\n if (!__PRIVATE_isCollectionGroupQuery(e) && -1 !== a.indexOf(\"/\")) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid query. When querying a collection and ordering by documentId(), the value passed to ${r}() must be a plain document ID, but '${a}' contains a slash.`);\n const n = e.path.child(ResourcePath.fromString(a));\n if (!DocumentKey.isDocumentKey(n)) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid query. When querying a collection group and ordering by documentId(), the value passed to ${r}() must result in a valid document path, but '${n}' is not because it contains an odd number of segments.`);\n const i = new DocumentKey(n);\n _.push(__PRIVATE_refValue(t, i));\n } else {\n const e = __PRIVATE_parseQueryValue(n, r, a);\n _.push(e);\n }\n }\n return new Bound(_, s);\n }\n /**\n * Parses the given `documentIdValue` into a `ReferenceValue`, throwing\n * appropriate errors if the value is anything other than a `DocumentReference`\n * or `string`, or if the string is malformed.\n */(e._query, e.firestore._databaseId, i, t, n, r);\n }\n}\nfunction __PRIVATE_parseDocumentIdValue(e, t, n) {\n if (\"string\" == typeof (n = getModularInstance(n))) {\n if (\"\" === n) throw new FirestoreError(D.INVALID_ARGUMENT, \"Invalid query. When querying with documentId(), you must provide a valid document ID, but it was an empty string.\");\n if (!__PRIVATE_isCollectionGroupQuery(t) && -1 !== n.indexOf(\"/\")) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid query. When querying a collection by documentId(), you must provide a plain document ID, but '${n}' contains a '/' character.`);\n const r = t.path.child(ResourcePath.fromString(n));\n if (!DocumentKey.isDocumentKey(r)) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid query. When querying a collection group by documentId(), the value provided must result in a valid document path, but '${r}' is not because it has an odd number of segments (${r.length}).`);\n return __PRIVATE_refValue(e, new DocumentKey(r));\n }\n if (n instanceof DocumentReference) return __PRIVATE_refValue(e, n._key);\n throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid query. When querying with documentId(), you must provide a valid string or a DocumentReference, but it was: ${__PRIVATE_valueDescription(n)}.`);\n}\n\n/**\n * Validates that the value passed into a disjunctive filter satisfies all\n * array requirements.\n */\nfunction __PRIVATE_validateDisjunctiveFilterElements(e, t) {\n if (!Array.isArray(e) || 0 === e.length) throw new FirestoreError(D.INVALID_ARGUMENT, `Invalid Query. A non-empty array is required for '${t.toString()}' filters.`);\n}\n\n/**\n * Given an operator, returns the set of operators that cannot be used with it.\n *\n * This is not a comprehensive check, and this function should be removed in the\n * long term. Validations should occur in the Firestore backend.\n *\n * Operators in a query must adhere to the following set of rules:\n * 1. Only one inequality per query.\n * 2. `NOT_IN` cannot be used with array, disjunctive, or `NOT_EQUAL` operators.\n */\nfunction __PRIVATE_validateNewFieldFilter(e, t) {\n const n = function __PRIVATE_findOpInsideFilters(e, t) {\n for (const n of e) for (const e of n.getFlattenedFilters()) if (t.indexOf(e.op) >= 0) return e.op;\n return null;\n }(e.filters, function __PRIVATE_conflictingOps(e) {\n switch (e) {\n case \"!=\" /* Operator.NOT_EQUAL */:\n return [\"!=\" /* Operator.NOT_EQUAL */, \"not-in\" /* Operator.NOT_IN */];\n case \"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */:\n case \"in\" /* Operator.IN */:\n return [\"not-in\" /* Operator.NOT_IN */];\n case \"not-in\" /* Operator.NOT_IN */:\n return [\"array-contains-any\" /* Operator.ARRAY_CONTAINS_ANY */, \"in\" /* Operator.IN */, \"not-in\" /* Operator.NOT_IN */, \"!=\" /* Operator.NOT_EQUAL */];\n default:\n return [];\n }\n }(t.op));\n if (null !== n)\n // Special case when it's a duplicate op to give a slightly clearer error message.\n throw n === t.op ? new FirestoreError(D.INVALID_ARGUMENT, `Invalid query. You cannot use more than one '${t.op.toString()}' filter.`) : new FirestoreError(D.INVALID_ARGUMENT, `Invalid query. You cannot use '${t.op.toString()}' filters with '${n.toString()}' filters.`);\n}\nfunction __PRIVATE_validateQueryFilterConstraint(e, t) {\n if (!(t instanceof QueryFieldFilterConstraint || t instanceof QueryCompositeFilterConstraint)) throw new FirestoreError(D.INVALID_ARGUMENT, `Function ${e}() requires AppliableConstraints created with a call to 'where(...)', 'or(...)', or 'and(...)'.`);\n}\nclass AbstractUserDataWriter {\n convertValue(e, t = \"none\") {\n switch (__PRIVATE_typeOrder(e)) {\n case 0 /* TypeOrder.NullValue */:\n return null;\n case 1 /* TypeOrder.BooleanValue */:\n return e.booleanValue;\n case 2 /* TypeOrder.NumberValue */:\n return __PRIVATE_normalizeNumber(e.integerValue || e.doubleValue);\n case 3 /* TypeOrder.TimestampValue */:\n return this.convertTimestamp(e.timestampValue);\n case 4 /* TypeOrder.ServerTimestampValue */:\n return this.convertServerTimestamp(e, t);\n case 5 /* TypeOrder.StringValue */:\n return e.stringValue;\n case 6 /* TypeOrder.BlobValue */:\n return this.convertBytes(__PRIVATE_normalizeByteString(e.bytesValue));\n case 7 /* TypeOrder.RefValue */:\n return this.convertReference(e.referenceValue);\n case 8 /* TypeOrder.GeoPointValue */:\n return this.convertGeoPoint(e.geoPointValue);\n case 9 /* TypeOrder.ArrayValue */:\n return this.convertArray(e.arrayValue, t);\n case 10 /* TypeOrder.ObjectValue */:\n return this.convertObject(e.mapValue, t);\n default:\n throw fail();\n }\n }\n convertObject(e, t) {\n return this.convertObjectMap(e.fields, t);\n }\n /**\n * @internal\n */\n convertObjectMap(e, t = \"none\") {\n const n = {};\n return forEach(e, (e, r) => {\n n[e] = this.convertValue(r, t);\n }), n;\n }\n convertGeoPoint(e) {\n return new GeoPoint(__PRIVATE_normalizeNumber(e.latitude), __PRIVATE_normalizeNumber(e.longitude));\n }\n convertArray(e, t) {\n return (e.values || []).map(e => this.convertValue(e, t));\n }\n convertServerTimestamp(e, t) {\n switch (t) {\n case \"previous\":\n const n = __PRIVATE_getPreviousValue(e);\n return null == n ? null : this.convertValue(n, t);\n case \"estimate\":\n return this.convertTimestamp(__PRIVATE_getLocalWriteTime(e));\n default:\n return null;\n }\n }\n convertTimestamp(e) {\n const t = __PRIVATE_normalizeTimestamp(e);\n return new Timestamp(t.seconds, t.nanos);\n }\n convertDocumentKey(e, t) {\n const n = ResourcePath.fromString(e);\n __PRIVATE_hardAssert(__PRIVATE_isValidResourceName(n));\n const r = new DatabaseId(n.get(1), n.get(3)),\n i = new DocumentKey(n.popFirst(5));\n return r.isEqual(t) ||\n // TODO(b/64130202): Somehow support foreign references.\n __PRIVATE_logError(`Document ${i} contains a document reference within a different database (${r.projectId}/${r.database}) which is not supported. It will be treated as a reference in the current database (${t.projectId}/${t.database}) instead.`), i;\n }\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Converts custom model object of type T into `DocumentData` by applying the\n * converter if it exists.\n *\n * This function is used when converting user objects to `DocumentData`\n * because we want to provide the user with a more specific error message if\n * their `set()` or fails due to invalid data originating from a `toFirestore()`\n * call.\n */\nfunction __PRIVATE_applyFirestoreDataConverter(e, t, n) {\n let r;\n // Cast to `any` in order to satisfy the union type constraint on\n // toFirestore().\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return r = e ? n && (n.merge || n.mergeFields) ? e.toFirestore(t, n) : e.toFirestore(t) : t, r;\n}\nclass __PRIVATE_LiteUserDataWriter extends AbstractUserDataWriter {\n constructor(e) {\n super(), this.firestore = e;\n }\n convertBytes(e) {\n return new Bytes(e);\n }\n convertReference(e) {\n const t = this.convertDocumentKey(e, this.firestore._databaseId);\n return new DocumentReference(this.firestore, /* converter= */null, t);\n }\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Create an AggregateField object that can be used to compute the sum of\n * a specified field over a range of documents in the result set of a query.\n * @param field Specifies the field to sum across the result set.\n */\nfunction sum(e) {\n return new AggregateField(\"sum\", __PRIVATE_fieldPathFromArgument$1(\"sum\", e));\n}\n\n/**\n * Create an AggregateField object that can be used to compute the average of\n * a specified field over a range of documents in the result set of a query.\n * @param field Specifies the field to average across the result set.\n */\nfunction average(e) {\n return new AggregateField(\"avg\", __PRIVATE_fieldPathFromArgument$1(\"average\", e));\n}\n\n/**\n * Create an AggregateField object that can be used to compute the count of\n * documents in the result set of a query.\n */\nfunction count() {\n return new AggregateField(\"count\");\n}\n\n/**\n * Compares two 'AggregateField` instances for equality.\n *\n * @param left Compare this AggregateField to the `right`.\n * @param right Compare this AggregateField to the `left`.\n */\nfunction aggregateFieldEqual(e, t) {\n var n, r;\n return e instanceof AggregateField && t instanceof AggregateField && e.aggregateType === t.aggregateType && (null === (n = e._internalFieldPath) || void 0 === n ? void 0 : n.canonicalString()) === (null === (r = t._internalFieldPath) || void 0 === r ? void 0 : r.canonicalString());\n}\n\n/**\n * Compares two `AggregateQuerySnapshot` instances for equality.\n *\n * Two `AggregateQuerySnapshot` instances are considered \"equal\" if they have\n * underlying queries that compare equal, and the same data.\n *\n * @param left - The first `AggregateQuerySnapshot` to compare.\n * @param right - The second `AggregateQuerySnapshot` to compare.\n *\n * @returns `true` if the objects are \"equal\", as defined above, or `false`\n * otherwise.\n */\nfunction aggregateQuerySnapshotEqual(e, t) {\n return queryEqual(e.query, t.query) && deepEqual(e.data(), t.data());\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Metadata about a snapshot, describing the state of the snapshot.\n */\nclass SnapshotMetadata {\n /** @hideconstructor */\n constructor(e, t) {\n this.hasPendingWrites = e, this.fromCache = t;\n }\n /**\n * Returns true if this `SnapshotMetadata` is equal to the provided one.\n *\n * @param other - The `SnapshotMetadata` to compare against.\n * @returns true if this `SnapshotMetadata` is equal to the provided one.\n */\n isEqual(e) {\n return this.hasPendingWrites === e.hasPendingWrites && this.fromCache === e.fromCache;\n }\n}\n\n/**\n * A `DocumentSnapshot` contains data read from a document in your Firestore\n * database. The data can be extracted with `.data()` or `.get()` to\n * get a specific field.\n *\n * For a `DocumentSnapshot` that points to a non-existing document, any data\n * access will return 'undefined'. You can use the `exists()` method to\n * explicitly verify a document's existence.\n */\nclass DocumentSnapshot extends DocumentSnapshot$1 {\n /** @hideconstructor protected */\n constructor(e, t, n, r, i, s) {\n super(e, t, n, r, s), this._firestore = e, this._firestoreImpl = e, this.metadata = i;\n }\n /**\n * Returns whether or not the data exists. True if the document exists.\n */\n exists() {\n return super.exists();\n }\n /**\n * Retrieves all fields in the document as an `Object`. Returns `undefined` if\n * the document doesn't exist.\n *\n * By default, `serverTimestamp()` values that have not yet been\n * set to their final value will be returned as `null`. You can override\n * this by passing an options object.\n *\n * @param options - An options object to configure how data is retrieved from\n * the snapshot (for example the desired behavior for server timestamps that\n * have not yet been set to their final value).\n * @returns An `Object` containing all fields in the document or `undefined` if\n * the document doesn't exist.\n */\n data(e = {}) {\n if (this._document) {\n if (this._converter) {\n // We only want to use the converter and create a new DocumentSnapshot\n // if a converter has been provided.\n const t = new QueryDocumentSnapshot(this._firestore, this._userDataWriter, this._key, this._document, this.metadata, /* converter= */null);\n return this._converter.fromFirestore(t, e);\n }\n return this._userDataWriter.convertValue(this._document.data.value, e.serverTimestamps);\n }\n }\n /**\n * Retrieves the field specified by `fieldPath`. Returns `undefined` if the\n * document or field doesn't exist.\n *\n * By default, a `serverTimestamp()` that has not yet been set to\n * its final value will be returned as `null`. You can override this by\n * passing an options object.\n *\n * @param fieldPath - The path (for example 'foo' or 'foo.bar') to a specific\n * field.\n * @param options - An options object to configure how the field is retrieved\n * from the snapshot (for example the desired behavior for server timestamps\n * that have not yet been set to their final value).\n * @returns The data at the specified field location or undefined if no such\n * field exists in the document.\n */\n // We are using `any` here to avoid an explicit cast by our users.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get(e, t = {}) {\n if (this._document) {\n const n = this._document.data.field(__PRIVATE_fieldPathFromArgument(\"DocumentSnapshot.get\", e));\n if (null !== n) return this._userDataWriter.convertValue(n, t.serverTimestamps);\n }\n }\n}\n\n/**\n * A `QueryDocumentSnapshot` contains data read from a document in your\n * Firestore database as part of a query. The document is guaranteed to exist\n * and its data can be extracted with `.data()` or `.get()` to get a\n * specific field.\n *\n * A `QueryDocumentSnapshot` offers the same API surface as a\n * `DocumentSnapshot`. Since query results contain only existing documents, the\n * `exists` property will always be true and `data()` will never return\n * 'undefined'.\n */\nclass QueryDocumentSnapshot extends DocumentSnapshot {\n /**\n * Retrieves all fields in the document as an `Object`.\n *\n * By default, `serverTimestamp()` values that have not yet been\n * set to their final value will be returned as `null`. You can override\n * this by passing an options object.\n *\n * @override\n * @param options - An options object to configure how data is retrieved from\n * the snapshot (for example the desired behavior for server timestamps that\n * have not yet been set to their final value).\n * @returns An `Object` containing all fields in the document.\n */\n data(e = {}) {\n return super.data(e);\n }\n}\n\n/**\n * A `QuerySnapshot` contains zero or more `DocumentSnapshot` objects\n * representing the results of a query. The documents can be accessed as an\n * array via the `docs` property or enumerated using the `forEach` method. The\n * number of documents can be determined via the `empty` and `size`\n * properties.\n */\nclass QuerySnapshot {\n /** @hideconstructor */\n constructor(e, t, n, r) {\n this._firestore = e, this._userDataWriter = t, this._snapshot = r, this.metadata = new SnapshotMetadata(r.hasPendingWrites, r.fromCache), this.query = n;\n }\n /** An array of all the documents in the `QuerySnapshot`. */\n get docs() {\n const e = [];\n return this.forEach(t => e.push(t)), e;\n }\n /** The number of documents in the `QuerySnapshot`. */\n get size() {\n return this._snapshot.docs.size;\n }\n /** True if there are no documents in the `QuerySnapshot`. */\n get empty() {\n return 0 === this.size;\n }\n /**\n * Enumerates all of the documents in the `QuerySnapshot`.\n *\n * @param callback - A callback to be called with a `QueryDocumentSnapshot` for\n * each document in the snapshot.\n * @param thisArg - The `this` binding for the callback.\n */\n forEach(e, t) {\n this._snapshot.docs.forEach(n => {\n e.call(t, new QueryDocumentSnapshot(this._firestore, this._userDataWriter, n.key, n, new SnapshotMetadata(this._snapshot.mutatedKeys.has(n.key), this._snapshot.fromCache), this.query.converter));\n });\n }\n /**\n * Returns an array of the documents changes since the last snapshot. If this\n * is the first snapshot, all documents will be in the list as 'added'\n * changes.\n *\n * @param options - `SnapshotListenOptions` that control whether metadata-only\n * changes (i.e. only `DocumentSnapshot.metadata` changed) should trigger\n * snapshot events.\n */\n docChanges(e = {}) {\n const t = !!e.includeMetadataChanges;\n if (t && this._snapshot.excludesMetadataChanges) throw new FirestoreError(D.INVALID_ARGUMENT, \"To include metadata changes with your document changes, you must also pass { includeMetadataChanges:true } to onSnapshot().\");\n return this._cachedChanges && this._cachedChangesIncludeMetadataChanges === t || (this._cachedChanges = /** Calculates the array of `DocumentChange`s for a given `ViewSnapshot`. */\n function __PRIVATE_changesFromSnapshot(e, t) {\n if (e._snapshot.oldDocs.isEmpty()) {\n let t = 0;\n return e._snapshot.docChanges.map(n => {\n const r = new QueryDocumentSnapshot(e._firestore, e._userDataWriter, n.doc.key, n.doc, new SnapshotMetadata(e._snapshot.mutatedKeys.has(n.doc.key), e._snapshot.fromCache), e.query.converter);\n return n.doc, {\n type: \"added\",\n doc: r,\n oldIndex: -1,\n newIndex: t++\n };\n });\n }\n {\n // A `DocumentSet` that is updated incrementally as changes are applied to use\n // to lookup the index of a document.\n let n = e._snapshot.oldDocs;\n return e._snapshot.docChanges.filter(e => t || 3 /* ChangeType.Metadata */ !== e.type).map(t => {\n const r = new QueryDocumentSnapshot(e._firestore, e._userDataWriter, t.doc.key, t.doc, new SnapshotMetadata(e._snapshot.mutatedKeys.has(t.doc.key), e._snapshot.fromCache), e.query.converter);\n let i = -1,\n s = -1;\n return 0 /* ChangeType.Added */ !== t.type && (i = n.indexOf(t.doc.key), n = n.delete(t.doc.key)), 1 /* ChangeType.Removed */ !== t.type && (n = n.add(t.doc), s = n.indexOf(t.doc.key)), {\n type: __PRIVATE_resultChangeType(t.type),\n doc: r,\n oldIndex: i,\n newIndex: s\n };\n });\n }\n }(this, t), this._cachedChangesIncludeMetadataChanges = t), this._cachedChanges;\n }\n}\nfunction __PRIVATE_resultChangeType(e) {\n switch (e) {\n case 0 /* ChangeType.Added */:\n return \"added\";\n case 2 /* ChangeType.Modified */:\n case 3 /* ChangeType.Metadata */:\n return \"modified\";\n case 1 /* ChangeType.Removed */:\n return \"removed\";\n default:\n return fail();\n }\n}\n\n// TODO(firestoreexp): Add tests for snapshotEqual with different snapshot\n// metadata\n/**\n * Returns true if the provided snapshots are equal.\n *\n * @param left - A snapshot to compare.\n * @param right - A snapshot to compare.\n * @returns true if the snapshots are equal.\n */\nfunction snapshotEqual(e, t) {\n return e instanceof DocumentSnapshot && t instanceof DocumentSnapshot ? e._firestore === t._firestore && e._key.isEqual(t._key) && (null === e._document ? null === t._document : e._document.isEqual(t._document)) && e._converter === t._converter : e instanceof QuerySnapshot && t instanceof QuerySnapshot && e._firestore === t._firestore && queryEqual(e.query, t.query) && e.metadata.isEqual(t.metadata) && e._snapshot.isEqual(t._snapshot);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Reads the document referred to by this `DocumentReference`.\n *\n * Note: `getDoc()` attempts to provide up-to-date data when possible by waiting\n * for data from the server, but it may return cached data or fail if you are\n * offline and the server cannot be reached. To specify this behavior, invoke\n * {@link getDocFromCache} or {@link getDocFromServer}.\n *\n * @param reference - The reference of the document to fetch.\n * @returns A Promise resolved with a `DocumentSnapshot` containing the\n * current document contents.\n */\nfunction getDoc(e) {\n e = __PRIVATE_cast(e, DocumentReference);\n const t = __PRIVATE_cast(e.firestore, Firestore);\n return __PRIVATE_firestoreClientGetDocumentViaSnapshotListener(ensureFirestoreConfigured(t), e._key).then(n => __PRIVATE_convertToDocSnapshot(t, e, n));\n}\nclass __PRIVATE_ExpUserDataWriter extends AbstractUserDataWriter {\n constructor(e) {\n super(), this.firestore = e;\n }\n convertBytes(e) {\n return new Bytes(e);\n }\n convertReference(e) {\n const t = this.convertDocumentKey(e, this.firestore._databaseId);\n return new DocumentReference(this.firestore, /* converter= */null, t);\n }\n}\n\n/**\n * Reads the document referred to by this `DocumentReference` from cache.\n * Returns an error if the document is not currently cached.\n *\n * @returns A `Promise` resolved with a `DocumentSnapshot` containing the\n * current document contents.\n */\nfunction getDocFromCache(e) {\n e = __PRIVATE_cast(e, DocumentReference);\n const t = __PRIVATE_cast(e.firestore, Firestore),\n n = ensureFirestoreConfigured(t),\n r = new __PRIVATE_ExpUserDataWriter(t);\n return __PRIVATE_firestoreClientGetDocumentFromLocalCache(n, e._key).then(n => new DocumentSnapshot(t, r, e._key, n, new SnapshotMetadata(null !== n && n.hasLocalMutations, /* fromCache= */!0), e.converter));\n}\n\n/**\n * Reads the document referred to by this `DocumentReference` from the server.\n * Returns an error if the network is not available.\n *\n * @returns A `Promise` resolved with a `DocumentSnapshot` containing the\n * current document contents.\n */\nfunction getDocFromServer(e) {\n e = __PRIVATE_cast(e, DocumentReference);\n const t = __PRIVATE_cast(e.firestore, Firestore);\n return __PRIVATE_firestoreClientGetDocumentViaSnapshotListener(ensureFirestoreConfigured(t), e._key, {\n source: \"server\"\n }).then(n => __PRIVATE_convertToDocSnapshot(t, e, n));\n}\n\n/**\n * Executes the query and returns the results as a `QuerySnapshot`.\n *\n * Note: `getDocs()` attempts to provide up-to-date data when possible by\n * waiting for data from the server, but it may return cached data or fail if\n * you are offline and the server cannot be reached. To specify this behavior,\n * invoke {@link getDocsFromCache} or {@link getDocsFromServer}.\n *\n * @returns A `Promise` that will be resolved with the results of the query.\n */\nfunction getDocs(e) {\n e = __PRIVATE_cast(e, Query);\n const t = __PRIVATE_cast(e.firestore, Firestore),\n n = ensureFirestoreConfigured(t),\n r = new __PRIVATE_ExpUserDataWriter(t);\n return __PRIVATE_validateHasExplicitOrderByForLimitToLast(e._query), __PRIVATE_firestoreClientGetDocumentsViaSnapshotListener(n, e._query).then(n => new QuerySnapshot(t, r, e, n));\n}\n\n/**\n * Executes the query and returns the results as a `QuerySnapshot` from cache.\n * Returns an empty result set if no documents matching the query are currently\n * cached.\n *\n * @returns A `Promise` that will be resolved with the results of the query.\n */\nfunction getDocsFromCache(e) {\n e = __PRIVATE_cast(e, Query);\n const t = __PRIVATE_cast(e.firestore, Firestore),\n n = ensureFirestoreConfigured(t),\n r = new __PRIVATE_ExpUserDataWriter(t);\n return __PRIVATE_firestoreClientGetDocumentsFromLocalCache(n, e._query).then(n => new QuerySnapshot(t, r, e, n));\n}\n\n/**\n * Executes the query and returns the results as a `QuerySnapshot` from the\n * server. Returns an error if the network is not available.\n *\n * @returns A `Promise` that will be resolved with the results of the query.\n */\nfunction getDocsFromServer(e) {\n e = __PRIVATE_cast(e, Query);\n const t = __PRIVATE_cast(e.firestore, Firestore),\n n = ensureFirestoreConfigured(t),\n r = new __PRIVATE_ExpUserDataWriter(t);\n return __PRIVATE_firestoreClientGetDocumentsViaSnapshotListener(n, e._query, {\n source: \"server\"\n }).then(n => new QuerySnapshot(t, r, e, n));\n}\nfunction setDoc(e, t, n) {\n e = __PRIVATE_cast(e, DocumentReference);\n const r = __PRIVATE_cast(e.firestore, Firestore),\n i = __PRIVATE_applyFirestoreDataConverter(e.converter, t, n);\n return executeWrite(r, [__PRIVATE_parseSetData(__PRIVATE_newUserDataReader(r), \"setDoc\", e._key, i, null !== e.converter, n).toMutation(e._key, Precondition.none())]);\n}\nfunction updateDoc(e, t, n, ...r) {\n e = __PRIVATE_cast(e, DocumentReference);\n const i = __PRIVATE_cast(e.firestore, Firestore),\n s = __PRIVATE_newUserDataReader(i);\n let o;\n o = \"string\" == typeof (\n // For Compat types, we have to \"extract\" the underlying types before\n // performing validation.\n t = getModularInstance(t)) || t instanceof FieldPath ? __PRIVATE_parseUpdateVarargs(s, \"updateDoc\", e._key, t, n, r) : __PRIVATE_parseUpdateData(s, \"updateDoc\", e._key, t);\n return executeWrite(i, [o.toMutation(e._key, Precondition.exists(!0))]);\n}\n\n/**\n * Deletes the document referred to by the specified `DocumentReference`.\n *\n * @param reference - A reference to the document to delete.\n * @returns A Promise resolved once the document has been successfully\n * deleted from the backend (note that it won't resolve while you're offline).\n */\nfunction deleteDoc(e) {\n return executeWrite(__PRIVATE_cast(e.firestore, Firestore), [new __PRIVATE_DeleteMutation(e._key, Precondition.none())]);\n}\n\n/**\n * Add a new document to specified `CollectionReference` with the given data,\n * assigning it a document ID automatically.\n *\n * @param reference - A reference to the collection to add this document to.\n * @param data - An Object containing the data for the new document.\n * @returns A `Promise` resolved with a `DocumentReference` pointing to the\n * newly created document after it has been written to the backend (Note that it\n * won't resolve while you're offline).\n */\nfunction addDoc(e, t) {\n const n = __PRIVATE_cast(e.firestore, Firestore),\n r = doc(e),\n i = __PRIVATE_applyFirestoreDataConverter(e.converter, t);\n return executeWrite(n, [__PRIVATE_parseSetData(__PRIVATE_newUserDataReader(e.firestore), \"addDoc\", r._key, i, null !== e.converter, {}).toMutation(r._key, Precondition.exists(!1))]).then(() => r);\n}\nfunction onSnapshot(e, ...t) {\n var n, r, i;\n e = getModularInstance(e);\n let s = {\n includeMetadataChanges: !1\n },\n o = 0;\n \"object\" != typeof t[o] || __PRIVATE_isPartialObserver(t[o]) || (s = t[o], o++);\n const _ = {\n includeMetadataChanges: s.includeMetadataChanges\n };\n if (__PRIVATE_isPartialObserver(t[o])) {\n const e = t[o];\n t[o] = null === (n = e.next) || void 0 === n ? void 0 : n.bind(e), t[o + 1] = null === (r = e.error) || void 0 === r ? void 0 : r.bind(e), t[o + 2] = null === (i = e.complete) || void 0 === i ? void 0 : i.bind(e);\n }\n let a, u, c;\n if (e instanceof DocumentReference) u = __PRIVATE_cast(e.firestore, Firestore), c = __PRIVATE_newQueryForPath(e._key.path), a = {\n next: n => {\n t[o] && t[o](__PRIVATE_convertToDocSnapshot(u, e, n));\n },\n error: t[o + 1],\n complete: t[o + 2]\n };else {\n const n = __PRIVATE_cast(e, Query);\n u = __PRIVATE_cast(n.firestore, Firestore), c = n._query;\n const r = new __PRIVATE_ExpUserDataWriter(u);\n a = {\n next: e => {\n t[o] && t[o](new QuerySnapshot(u, r, n, e));\n },\n error: t[o + 1],\n complete: t[o + 2]\n }, __PRIVATE_validateHasExplicitOrderByForLimitToLast(e._query);\n }\n return function __PRIVATE_firestoreClientListen(e, t, n, r) {\n const i = new __PRIVATE_AsyncObserver(r),\n s = new __PRIVATE_QueryListener(t, i, n);\n return e.asyncQueue.enqueueAndForget(async () => __PRIVATE_eventManagerListen(await __PRIVATE_getEventManager(e), s)), () => {\n i.Na(), e.asyncQueue.enqueueAndForget(async () => __PRIVATE_eventManagerUnlisten(await __PRIVATE_getEventManager(e), s));\n };\n }(ensureFirestoreConfigured(u), c, _, a);\n}\nfunction onSnapshotsInSync(e, t) {\n return __PRIVATE_firestoreClientAddSnapshotsInSyncListener(ensureFirestoreConfigured(e = __PRIVATE_cast(e, Firestore)), __PRIVATE_isPartialObserver(t) ? t : {\n next: t\n });\n}\n\n/**\n * Locally writes `mutations` on the async queue.\n * @internal\n */\nfunction executeWrite(e, t) {\n return function __PRIVATE_firestoreClientWrite(e, t) {\n const n = new __PRIVATE_Deferred();\n return e.asyncQueue.enqueueAndForget(async () => __PRIVATE_syncEngineWrite(await __PRIVATE_getSyncEngine(e), t, n)), n.promise;\n }(ensureFirestoreConfigured(e), t);\n}\n\n/**\n * Converts a {@link ViewSnapshot} that contains the single document specified by `ref`\n * to a {@link DocumentSnapshot}.\n */\nfunction __PRIVATE_convertToDocSnapshot(e, t, n) {\n const r = n.docs.get(t._key),\n i = new __PRIVATE_ExpUserDataWriter(e);\n return new DocumentSnapshot(e, i, t._key, r, new SnapshotMetadata(n.hasPendingWrites, n.fromCache), t.converter);\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Calculates the number of documents in the result set of the given query,\n * without actually downloading the documents.\n *\n * Using this function to count the documents is efficient because only the\n * final count, not the documents' data, is downloaded. This function can even\n * count the documents if the result set would be prohibitively large to\n * download entirely (e.g. thousands of documents).\n *\n * The result received from the server is presented, unaltered, without\n * considering any local state. That is, documents in the local cache are not\n * taken into consideration, neither are local modifications not yet\n * synchronized with the server. Previously-downloaded results, if any, are not\n * used: every request using this source necessarily involves a round trip to\n * the server.\n *\n * @param query - The query whose result set size to calculate.\n * @returns A Promise that will be resolved with the count; the count can be\n * retrieved from `snapshot.data().count`, where `snapshot` is the\n * `AggregateQuerySnapshot` to which the returned Promise resolves.\n */\nfunction getCountFromServer(e) {\n return getAggregateFromServer(e, {\n count: count()\n });\n}\n\n/**\n * Calculates the specified aggregations over the documents in the result\n * set of the given query, without actually downloading the documents.\n *\n * Using this function to perform aggregations is efficient because only the\n * final aggregation values, not the documents' data, are downloaded. This\n * function can even perform aggregations of the documents if the result set\n * would be prohibitively large to download entirely (e.g. thousands of documents).\n *\n * The result received from the server is presented, unaltered, without\n * considering any local state. That is, documents in the local cache are not\n * taken into consideration, neither are local modifications not yet\n * synchronized with the server. Previously-downloaded results, if any, are not\n * used: every request using this source necessarily involves a round trip to\n * the server.\n *\n * @param query The query whose result set to aggregate over.\n * @param aggregateSpec An `AggregateSpec` object that specifies the aggregates\n * to perform over the result set. The AggregateSpec specifies aliases for each\n * aggregate, which can be used to retrieve the aggregate result.\n * @example\n * ```typescript\n * const aggregateSnapshot = await getAggregateFromServer(query, {\n * countOfDocs: count(),\n * totalHours: sum('hours'),\n * averageScore: average('score')\n * });\n *\n * const countOfDocs: number = aggregateSnapshot.data().countOfDocs;\n * const totalHours: number = aggregateSnapshot.data().totalHours;\n * const averageScore: number | null = aggregateSnapshot.data().averageScore;\n * ```\n */\nfunction getAggregateFromServer(e, t) {\n const n = __PRIVATE_cast(e.firestore, Firestore),\n r = ensureFirestoreConfigured(n),\n i = function __PRIVATE_mapToArray(e, t) {\n const n = [];\n for (const r in e) Object.prototype.hasOwnProperty.call(e, r) && n.push(t(e[r], r, e));\n return n;\n }(t, (e, t) => new __PRIVATE_AggregateImpl(t, e.aggregateType, e._internalFieldPath));\n // Run the aggregation and convert the results\n return function __PRIVATE_firestoreClientRunAggregateQuery(e, t, n) {\n const r = new __PRIVATE_Deferred();\n return e.asyncQueue.enqueueAndForget(async () => {\n // Implement and call executeAggregateQueryViaSnapshotListener, similar\n // to the implementation in firestoreClientGetDocumentsViaSnapshotListener\n // above\n try {\n // TODO(b/277628384): check `canUseNetwork()` and handle multi-tab.\n const i = await __PRIVATE_getDatastore(e);\n r.resolve(__PRIVATE_invokeRunAggregationQueryRpc(i, t, n));\n } catch (e) {\n r.reject(e);\n }\n }), r.promise;\n }(r, e._query, i).then(t =>\n /**\n * Converts the core aggregration result to an `AggregateQuerySnapshot`\n * that can be returned to the consumer.\n * @param query\n * @param aggregateResult Core aggregation result\n * @internal\n */\n function __PRIVATE_convertToAggregateQuerySnapshot(e, t, n) {\n const r = new __PRIVATE_ExpUserDataWriter(e);\n return new AggregateQuerySnapshot(t, r, n);\n }\n /**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */(n, e, t));\n}\nclass __PRIVATE_MemoryLocalCacheImpl {\n constructor(e) {\n this.kind = \"memory\", this._onlineComponentProvider = new OnlineComponentProvider(), (null == e ? void 0 : e.garbageCollector) ? this._offlineComponentProvider = e.garbageCollector._offlineComponentProvider : this._offlineComponentProvider = new MemoryOfflineComponentProvider();\n }\n toJSON() {\n return {\n kind: this.kind\n };\n }\n}\nclass __PRIVATE_PersistentLocalCacheImpl {\n constructor(e) {\n let t;\n this.kind = \"persistent\", (null == e ? void 0 : e.tabManager) ? (e.tabManager._initialize(e), t = e.tabManager) : (t = persistentSingleTabManager(void 0), t._initialize(e)), this._onlineComponentProvider = t._onlineComponentProvider, this._offlineComponentProvider = t._offlineComponentProvider;\n }\n toJSON() {\n return {\n kind: this.kind\n };\n }\n}\nclass __PRIVATE_MemoryEagerGabageCollectorImpl {\n constructor() {\n this.kind = \"memoryEager\", this._offlineComponentProvider = new MemoryOfflineComponentProvider();\n }\n toJSON() {\n return {\n kind: this.kind\n };\n }\n}\nclass __PRIVATE_MemoryLruGabageCollectorImpl {\n constructor(e) {\n this.kind = \"memoryLru\", this._offlineComponentProvider = new __PRIVATE_LruGcMemoryOfflineComponentProvider(e);\n }\n toJSON() {\n return {\n kind: this.kind\n };\n }\n}\n\n/**\n * Creates an instance of `MemoryEagerGarbageCollector`. This is also the\n * default garbage collector unless it is explicitly specified otherwise.\n */\nfunction memoryEagerGarbageCollector() {\n return new __PRIVATE_MemoryEagerGabageCollectorImpl();\n}\n\n/**\n * Creates an instance of `MemoryLruGarbageCollector`.\n *\n * A target size can be specified as part of the setting parameter. The\n * collector will start deleting documents once the cache size exceeds\n * the given size. The default cache size is 40MB (40 * 1024 * 1024 bytes).\n */\nfunction memoryLruGarbageCollector(e) {\n return new __PRIVATE_MemoryLruGabageCollectorImpl(null == e ? void 0 : e.cacheSizeBytes);\n}\n\n/**\n * Creates an instance of `MemoryLocalCache`. The instance can be set to\n * `FirestoreSettings.cache` to tell the SDK which cache layer to use.\n */\nfunction memoryLocalCache(e) {\n return new __PRIVATE_MemoryLocalCacheImpl(e);\n}\n\n/**\n * Creates an instance of `PersistentLocalCache`. The instance can be set to\n * `FirestoreSettings.cache` to tell the SDK which cache layer to use.\n *\n * Persistent cache cannot be used in a Node.js environment.\n */\nfunction persistentLocalCache(e) {\n return new __PRIVATE_PersistentLocalCacheImpl(e);\n}\nclass __PRIVATE_SingleTabManagerImpl {\n constructor(e) {\n this.forceOwnership = e, this.kind = \"persistentSingleTab\";\n }\n toJSON() {\n return {\n kind: this.kind\n };\n }\n /**\n * @internal\n */\n _initialize(e) {\n this._onlineComponentProvider = new OnlineComponentProvider(), this._offlineComponentProvider = new __PRIVATE_IndexedDbOfflineComponentProvider(this._onlineComponentProvider, null == e ? void 0 : e.cacheSizeBytes, this.forceOwnership);\n }\n}\nclass __PRIVATE_MultiTabManagerImpl {\n constructor() {\n this.kind = \"PersistentMultipleTab\";\n }\n toJSON() {\n return {\n kind: this.kind\n };\n }\n /**\n * @internal\n */\n _initialize(e) {\n this._onlineComponentProvider = new OnlineComponentProvider(), this._offlineComponentProvider = new __PRIVATE_MultiTabOfflineComponentProvider(this._onlineComponentProvider, null == e ? void 0 : e.cacheSizeBytes);\n }\n}\n\n/**\n * Creates an instance of `PersistentSingleTabManager`.\n *\n * @param settings Configures the created tab manager.\n */\nfunction persistentSingleTabManager(e) {\n return new __PRIVATE_SingleTabManagerImpl(null == e ? void 0 : e.forceOwnership);\n}\n\n/**\n * Creates an instance of `PersistentMultipleTabManager`.\n */\nfunction persistentMultipleTabManager() {\n return new __PRIVATE_MultiTabManagerImpl();\n}\n\n/**\n * @license\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst ye = {\n maxAttempts: 5\n};\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A write batch, used to perform multiple writes as a single atomic unit.\n *\n * A `WriteBatch` object can be acquired by calling {@link writeBatch}. It\n * provides methods for adding writes to the write batch. None of the writes\n * will be committed (or visible locally) until {@link WriteBatch.commit} is\n * called.\n */\nclass WriteBatch {\n /** @hideconstructor */\n constructor(e, t) {\n this._firestore = e, this._commitHandler = t, this._mutations = [], this._committed = !1, this._dataReader = __PRIVATE_newUserDataReader(e);\n }\n set(e, t, n) {\n this._verifyNotCommitted();\n const r = __PRIVATE_validateReference(e, this._firestore),\n i = __PRIVATE_applyFirestoreDataConverter(r.converter, t, n),\n s = __PRIVATE_parseSetData(this._dataReader, \"WriteBatch.set\", r._key, i, null !== r.converter, n);\n return this._mutations.push(s.toMutation(r._key, Precondition.none())), this;\n }\n update(e, t, n, ...r) {\n this._verifyNotCommitted();\n const i = __PRIVATE_validateReference(e, this._firestore);\n // For Compat types, we have to \"extract\" the underlying types before\n // performing validation.\n let s;\n return s = \"string\" == typeof (t = getModularInstance(t)) || t instanceof FieldPath ? __PRIVATE_parseUpdateVarargs(this._dataReader, \"WriteBatch.update\", i._key, t, n, r) : __PRIVATE_parseUpdateData(this._dataReader, \"WriteBatch.update\", i._key, t), this._mutations.push(s.toMutation(i._key, Precondition.exists(!0))), this;\n }\n /**\n * Deletes the document referred to by the provided {@link DocumentReference}.\n *\n * @param documentRef - A reference to the document to be deleted.\n * @returns This `WriteBatch` instance. Used for chaining method calls.\n */\n delete(e) {\n this._verifyNotCommitted();\n const t = __PRIVATE_validateReference(e, this._firestore);\n return this._mutations = this._mutations.concat(new __PRIVATE_DeleteMutation(t._key, Precondition.none())), this;\n }\n /**\n * Commits all of the writes in this write batch as a single atomic unit.\n *\n * The result of these writes will only be reflected in document reads that\n * occur after the returned promise resolves. If the client is offline, the\n * write fails. If you would like to see local modifications or buffer writes\n * until the client is online, use the full Firestore SDK.\n *\n * @returns A `Promise` resolved once all of the writes in the batch have been\n * successfully written to the backend as an atomic unit (note that it won't\n * resolve while you're offline).\n */\n commit() {\n return this._verifyNotCommitted(), this._committed = !0, this._mutations.length > 0 ? this._commitHandler(this._mutations) : Promise.resolve();\n }\n _verifyNotCommitted() {\n if (this._committed) throw new FirestoreError(D.FAILED_PRECONDITION, \"A write batch can no longer be used after commit() has been called.\");\n }\n}\nfunction __PRIVATE_validateReference(e, t) {\n if ((e = getModularInstance(e)).firestore !== t) throw new FirestoreError(D.INVALID_ARGUMENT, \"Provided document reference is from a different Firestore instance.\");\n return e;\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// TODO(mrschmidt) Consider using `BaseTransaction` as the base class in the\n// legacy SDK.\n/**\n * A reference to a transaction.\n *\n * The `Transaction` object passed to a transaction's `updateFunction` provides\n * the methods to read and write data within the transaction context. See\n * {@link runTransaction}.\n */\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A reference to a transaction.\n *\n * The `Transaction` object passed to a transaction's `updateFunction` provides\n * the methods to read and write data within the transaction context. See\n * {@link runTransaction}.\n */\nclass Transaction extends class Transaction$1 {\n /** @hideconstructor */\n constructor(e, t) {\n this._firestore = e, this._transaction = t, this._dataReader = __PRIVATE_newUserDataReader(e);\n }\n /**\n * Reads the document referenced by the provided {@link DocumentReference}.\n *\n * @param documentRef - A reference to the document to be read.\n * @returns A `DocumentSnapshot` with the read data.\n */\n get(e) {\n const t = __PRIVATE_validateReference(e, this._firestore),\n n = new __PRIVATE_LiteUserDataWriter(this._firestore);\n return this._transaction.lookup([t._key]).then(e => {\n if (!e || 1 !== e.length) return fail();\n const r = e[0];\n if (r.isFoundDocument()) return new DocumentSnapshot$1(this._firestore, n, r.key, r, t.converter);\n if (r.isNoDocument()) return new DocumentSnapshot$1(this._firestore, n, t._key, null, t.converter);\n throw fail();\n });\n }\n set(e, t, n) {\n const r = __PRIVATE_validateReference(e, this._firestore),\n i = __PRIVATE_applyFirestoreDataConverter(r.converter, t, n),\n s = __PRIVATE_parseSetData(this._dataReader, \"Transaction.set\", r._key, i, null !== r.converter, n);\n return this._transaction.set(r._key, s), this;\n }\n update(e, t, n, ...r) {\n const i = __PRIVATE_validateReference(e, this._firestore);\n // For Compat types, we have to \"extract\" the underlying types before\n // performing validation.\n let s;\n return s = \"string\" == typeof (t = getModularInstance(t)) || t instanceof FieldPath ? __PRIVATE_parseUpdateVarargs(this._dataReader, \"Transaction.update\", i._key, t, n, r) : __PRIVATE_parseUpdateData(this._dataReader, \"Transaction.update\", i._key, t), this._transaction.update(i._key, s), this;\n }\n /**\n * Deletes the document referred to by the provided {@link DocumentReference}.\n *\n * @param documentRef - A reference to the document to be deleted.\n * @returns This `Transaction` instance. Used for chaining method calls.\n */\n delete(e) {\n const t = __PRIVATE_validateReference(e, this._firestore);\n return this._transaction.delete(t._key), this;\n }\n} {\n // This class implements the same logic as the Transaction API in the Lite SDK\n // but is subclassed in order to return its own DocumentSnapshot types.\n /** @hideconstructor */\n constructor(e, t) {\n super(e, t), this._firestore = e;\n }\n /**\n * Reads the document referenced by the provided {@link DocumentReference}.\n *\n * @param documentRef - A reference to the document to be read.\n * @returns A `DocumentSnapshot` with the read data.\n */\n get(e) {\n const t = __PRIVATE_validateReference(e, this._firestore),\n n = new __PRIVATE_ExpUserDataWriter(this._firestore);\n return super.get(e).then(e => new DocumentSnapshot(this._firestore, n, t._key, e._document, new SnapshotMetadata( /* hasPendingWrites= */!1, /* fromCache= */!1), t.converter));\n }\n}\n\n/**\n * Executes the given `updateFunction` and then attempts to commit the changes\n * applied within the transaction. If any document read within the transaction\n * has changed, Cloud Firestore retries the `updateFunction`. If it fails to\n * commit after 5 attempts, the transaction fails.\n *\n * The maximum number of writes allowed in a single transaction is 500.\n *\n * @param firestore - A reference to the Firestore database to run this\n * transaction against.\n * @param updateFunction - The function to execute within the transaction\n * context.\n * @param options - An options object to configure maximum number of attempts to\n * commit.\n * @returns If the transaction completed successfully or was explicitly aborted\n * (the `updateFunction` returned a failed promise), the promise returned by the\n * `updateFunction `is returned here. Otherwise, if the transaction failed, a\n * rejected promise with the corresponding failure error is returned.\n */\nfunction runTransaction(e, t, n) {\n e = __PRIVATE_cast(e, Firestore);\n const r = Object.assign(Object.assign({}, ye), n);\n !function __PRIVATE_validateTransactionOptions(e) {\n if (e.maxAttempts < 1) throw new FirestoreError(D.INVALID_ARGUMENT, \"Max attempts must be at least 1\");\n }(r);\n return function __PRIVATE_firestoreClientTransaction(e, t, n) {\n const r = new __PRIVATE_Deferred();\n return e.asyncQueue.enqueueAndForget(async () => {\n const i = await __PRIVATE_getDatastore(e);\n new __PRIVATE_TransactionRunner(e.asyncQueue, i, n, t, r).run();\n }), r.promise;\n }(ensureFirestoreConfigured(e), n => t(new Transaction(e, n)), r);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Returns a sentinel for use with {@link @firebase/firestore/lite#(updateDoc:1)} or\n * {@link @firebase/firestore/lite#(setDoc:1)} with `{merge: true}` to mark a field for deletion.\n */\nfunction deleteField() {\n return new __PRIVATE_DeleteFieldValueImpl(\"deleteField\");\n}\n\n/**\n * Returns a sentinel used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link @firebase/firestore/lite#(updateDoc:1)} to\n * include a server-generated timestamp in the written data.\n */\nfunction serverTimestamp() {\n return new __PRIVATE_ServerTimestampFieldValueImpl(\"serverTimestamp\");\n}\n\n/**\n * Returns a special value that can be used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link\n * @firebase/firestore/lite#(updateDoc:1)} that tells the server to union the given elements with any array\n * value that already exists on the server. Each specified element that doesn't\n * already exist in the array will be added to the end. If the field being\n * modified is not already an array it will be overwritten with an array\n * containing exactly the specified elements.\n *\n * @param elements - The elements to union into the array.\n * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or\n * `updateDoc()`.\n */\nfunction arrayUnion(...e) {\n // NOTE: We don't actually parse the data until it's used in set() or\n // update() since we'd need the Firestore instance to do this.\n return new __PRIVATE_ArrayUnionFieldValueImpl(\"arrayUnion\", e);\n}\n\n/**\n * Returns a special value that can be used with {@link (setDoc:1)} or {@link\n * updateDoc:1} that tells the server to remove the given elements from any\n * array value that already exists on the server. All instances of each element\n * specified will be removed from the array. If the field being modified is not\n * already an array it will be overwritten with an empty array.\n *\n * @param elements - The elements to remove from the array.\n * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or\n * `updateDoc()`\n */\nfunction arrayRemove(...e) {\n // NOTE: We don't actually parse the data until it's used in set() or\n // update() since we'd need the Firestore instance to do this.\n return new __PRIVATE_ArrayRemoveFieldValueImpl(\"arrayRemove\", e);\n}\n\n/**\n * Returns a special value that can be used with {@link @firebase/firestore/lite#(setDoc:1)} or {@link\n * @firebase/firestore/lite#(updateDoc:1)} that tells the server to increment the field's current value by\n * the given value.\n *\n * If either the operand or the current field value uses floating point\n * precision, all arithmetic follows IEEE 754 semantics. If both values are\n * integers, values outside of JavaScript's safe number range\n * (`Number.MIN_SAFE_INTEGER` to `Number.MAX_SAFE_INTEGER`) are also subject to\n * precision loss. Furthermore, once processed by the Firestore backend, all\n * integer operations are capped between -2^63 and 2^63-1.\n *\n * If the current field value is not of type `number`, or if the field does not\n * yet exist, the transformation sets the field to the given value.\n *\n * @param n - The value to increment by.\n * @returns The `FieldValue` sentinel for use in a call to `setDoc()` or\n * `updateDoc()`\n */\nfunction increment(e) {\n return new __PRIVATE_NumericIncrementFieldValueImpl(\"increment\", e);\n}\n\n/**\n * @license\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Creates a write batch, used for performing multiple writes as a single\n * atomic operation. The maximum number of writes allowed in a single {@link WriteBatch}\n * is 500.\n *\n * Unlike transactions, write batches are persisted offline and therefore are\n * preferable when you don't need to condition your writes on read data.\n *\n * @returns A {@link WriteBatch} that can be used to atomically execute multiple\n * writes.\n */\nfunction writeBatch(e) {\n return ensureFirestoreConfigured(e = __PRIVATE_cast(e, Firestore)), new WriteBatch(e, t => executeWrite(e, t));\n}\n\n/**\n * @license\n * Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction setIndexConfiguration(e, t) {\n var n;\n const r = ensureFirestoreConfigured(e = __PRIVATE_cast(e, Firestore));\n if (!r._uninitializedComponentsProvider || \"memory\" === (null === (n = r._uninitializedComponentsProvider) || void 0 === n ? void 0 : n._offlineKind))\n // PORTING NOTE: We don't return an error if the user has not enabled\n // persistence since `enableIndexeddbPersistence()` can fail on the Web.\n return __PRIVATE_logWarn(\"Cannot enable indexes when persistence is disabled\"), Promise.resolve();\n const i = function __PRIVATE_parseIndexes(e) {\n const t = \"string\" == typeof e ? function __PRIVATE_tryParseJson(e) {\n try {\n return JSON.parse(e);\n } catch (e) {\n throw new FirestoreError(D.INVALID_ARGUMENT, \"Failed to parse JSON: \" + (null == e ? void 0 : e.message));\n }\n }(e) : e,\n n = [];\n if (Array.isArray(t.indexes)) for (const e of t.indexes) {\n const t = __PRIVATE_tryGetString(e, \"collectionGroup\"),\n r = [];\n if (Array.isArray(e.fields)) for (const t of e.fields) {\n const e = __PRIVATE_fieldPathFromDotSeparatedString(\"setIndexConfiguration\", __PRIVATE_tryGetString(t, \"fieldPath\"));\n \"CONTAINS\" === t.arrayConfig ? r.push(new IndexSegment(e, 2 /* IndexKind.CONTAINS */)) : \"ASCENDING\" === t.order ? r.push(new IndexSegment(e, 0 /* IndexKind.ASCENDING */)) : \"DESCENDING\" === t.order && r.push(new IndexSegment(e, 1 /* IndexKind.DESCENDING */));\n }\n n.push(new FieldIndex(FieldIndex.UNKNOWN_ID, t, r, IndexState.empty()));\n }\n return n;\n }(t);\n return __PRIVATE_firestoreClientSetIndexConfiguration(r, i);\n}\nfunction __PRIVATE_tryGetString(e, t) {\n if (\"string\" != typeof e[t]) throw new FirestoreError(D.INVALID_ARGUMENT, \"Missing string value for: \" + t);\n return e[t];\n}\n\n/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A `PersistentCacheIndexManager` for configuring persistent cache indexes used\n * for local query execution.\n *\n * To use, call `getPersistentCacheIndexManager()` to get an instance.\n */\nclass PersistentCacheIndexManager {\n /** @hideconstructor */\n constructor(e) {\n this._client = e, /** A type string to uniquely identify instances of this class. */\n this.type = \"PersistentCacheIndexManager\";\n }\n}\n\n/**\n * Returns the PersistentCache Index Manager used by the given `Firestore`\n * object.\n *\n * @return The `PersistentCacheIndexManager` instance, or `null` if local\n * persistent storage is not in use.\n */\nfunction getPersistentCacheIndexManager(e) {\n var t;\n e = __PRIVATE_cast(e, Firestore);\n const n = we.get(e);\n if (n) return n;\n const r = ensureFirestoreConfigured(e);\n if (\"persistent\" !== (null === (t = r._uninitializedComponentsProvider) || void 0 === t ? void 0 : t._offlineKind)) return null;\n const i = new PersistentCacheIndexManager(r);\n return we.set(e, i), i;\n}\n\n/**\n * Enables the SDK to create persistent cache indexes automatically for local\n * query execution when the SDK believes cache indexes can help improve\n * performance.\n *\n * This feature is disabled by default.\n */\nfunction enablePersistentCacheIndexAutoCreation(e) {\n __PRIVATE_setPersistentCacheIndexAutoCreationEnabled(e, !0);\n}\n\n/**\n * Stops creating persistent cache indexes automatically for local query\n * execution. The indexes which have been created by calling\n * `enablePersistentCacheIndexAutoCreation()` still take effect.\n */\nfunction disablePersistentCacheIndexAutoCreation(e) {\n __PRIVATE_setPersistentCacheIndexAutoCreationEnabled(e, !1);\n}\n\n/**\n * Removes all persistent cache indexes.\n *\n * Please note this function will also deletes indexes generated by\n * `setIndexConfiguration()`, which is deprecated.\n */\nfunction deleteAllPersistentCacheIndexes(e) {\n e._client.verifyNotTerminated();\n __PRIVATE_firestoreClientDeleteAllFieldIndexes(e._client).then(e => __PRIVATE_logDebug(\"deleting all persistent cache indexes succeeded\")).catch(e => __PRIVATE_logWarn(\"deleting all persistent cache indexes failed\", e));\n}\nfunction __PRIVATE_setPersistentCacheIndexAutoCreationEnabled(e, t) {\n e._client.verifyNotTerminated();\n __PRIVATE_firestoreClientSetPersistentCacheIndexAutoCreationEnabled(e._client, t).then(e => __PRIVATE_logDebug(`setting persistent cache index auto creation isEnabled=${t} succeeded`)).catch(e => __PRIVATE_logWarn(`setting persistent cache index auto creation isEnabled=${t} failed`, e));\n}\n\n/**\n * Maps `Firestore` instances to their corresponding\n * `PersistentCacheIndexManager` instances.\n *\n * Use a `WeakMap` so that the mapping will be automatically dropped when the\n * `Firestore` instance is garbage collected. This emulates a private member\n * as described in https://goo.gle/454yvug.\n */\nconst we = new WeakMap();\n\n/**\n * @license\n * Copyright 2023 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Testing hooks for use by Firestore's integration test suite to reach into the\n * SDK internals to validate logic and behavior that is not visible from the\n * public API surface.\n *\n * @internal\n */\nclass TestingHooks {\n constructor() {\n throw new Error(\"instances of this class should not be created\");\n }\n /**\n * Registers a callback to be notified when an existence filter mismatch\n * occurs in the Watch listen stream.\n *\n * The relative order in which callbacks are notified is unspecified; do not\n * rely on any particular ordering. If a given callback is registered multiple\n * times then it will be notified multiple times, once per registration.\n *\n * @param callback the callback to invoke upon existence filter mismatch.\n *\n * @return a function that, when called, unregisters the given callback; only\n * the first invocation of the returned function does anything; all subsequent\n * invocations do nothing.\n */\n static onExistenceFilterMismatch(e) {\n return __PRIVATE_TestingHooksSpiImpl.instance.onExistenceFilterMismatch(e);\n }\n}\n\n/**\n * The implementation of `TestingHooksSpi`.\n */\nclass __PRIVATE_TestingHooksSpiImpl {\n constructor() {\n this.Su = new Map();\n }\n static get instance() {\n return Se || (Se = new __PRIVATE_TestingHooksSpiImpl(), function __PRIVATE_setTestingHooksSpi(e) {\n if (ce) throw new Error(\"a TestingHooksSpi instance is already set\");\n ce = e;\n }(Se)), Se;\n }\n tt(e) {\n this.Su.forEach(t => t(e));\n }\n onExistenceFilterMismatch(e) {\n const t = Symbol(),\n n = this.Su;\n return n.set(t, e), () => n.delete(t);\n }\n}\nlet Se = null;\n\n/**\n * Cloud Firestore\n *\n * @packageDocumentation\n */\n!function __PRIVATE_registerFirestore(e, t = !0) {\n !function __PRIVATE_setSDKVersion(e) {\n S = e;\n }(SDK_VERSION), _registerComponent(new Component(\"firestore\", (e, {\n instanceIdentifier: n,\n options: r\n }) => {\n const i = e.getProvider(\"app\").getImmediate(),\n s = new Firestore(new __PRIVATE_FirebaseAuthCredentialsProvider(e.getProvider(\"auth-internal\")), new __PRIVATE_FirebaseAppCheckTokenProvider(e.getProvider(\"app-check-internal\")), function __PRIVATE_databaseIdFromApp(e, t) {\n if (!Object.prototype.hasOwnProperty.apply(e.options, [\"projectId\"])) throw new FirestoreError(D.INVALID_ARGUMENT, '\"projectId\" not provided in firebase.initializeApp.');\n return new DatabaseId(e.options.projectId, t);\n }(i, n), i);\n return r = Object.assign({\n useFetchStreams: t\n }, r), s._setSettings(r), s;\n }, \"PUBLIC\").setMultipleInstances(!0)), registerVersion(w, \"4.4.0\", e),\n // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation\n registerVersion(w, \"4.4.0\", \"esm2017\");\n}();\nexport { AbstractUserDataWriter, AggregateField, AggregateQuerySnapshot, Bytes, fe as CACHE_SIZE_UNLIMITED, CollectionReference, DocumentReference, DocumentSnapshot, FieldPath, FieldValue, Firestore, FirestoreError, GeoPoint, LoadBundleTask, PersistentCacheIndexManager, Query, QueryCompositeFilterConstraint, QueryConstraint, QueryDocumentSnapshot, QueryEndAtConstraint, QueryFieldFilterConstraint, QueryLimitConstraint, QueryOrderByConstraint, QuerySnapshot, QueryStartAtConstraint, SnapshotMetadata, Timestamp, Transaction, WriteBatch, __PRIVATE_AutoId as _AutoId, ByteString as _ByteString, DatabaseId as _DatabaseId, DocumentKey as _DocumentKey, __PRIVATE_EmptyAppCheckTokenProvider as _EmptyAppCheckTokenProvider, __PRIVATE_EmptyAuthCredentialsProvider as _EmptyAuthCredentialsProvider, FieldPath$1 as _FieldPath, TestingHooks as _TestingHooks, __PRIVATE_cast as _cast, __PRIVATE_debugAssert as _debugAssert, __PRIVATE_isBase64Available as _isBase64Available, __PRIVATE_logWarn as _logWarn, __PRIVATE_validateIsNotUsedTogether as _validateIsNotUsedTogether, addDoc, aggregateFieldEqual, aggregateQuerySnapshotEqual, and, arrayRemove, arrayUnion, average, clearIndexedDbPersistence, collection, collectionGroup, connectFirestoreEmulator, count, deleteAllPersistentCacheIndexes, deleteDoc, deleteField, disableNetwork, disablePersistentCacheIndexAutoCreation, doc, documentId, enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence, enableNetwork, enablePersistentCacheIndexAutoCreation, endAt, endBefore, ensureFirestoreConfigured, executeWrite, getAggregateFromServer, getCountFromServer, getDoc, getDocFromCache, getDocFromServer, getDocs, getDocsFromCache, getDocsFromServer, getFirestore, getPersistentCacheIndexManager, increment, initializeFirestore, limit, limitToLast, loadBundle, memoryEagerGarbageCollector, memoryLocalCache, memoryLruGarbageCollector, namedQuery, onSnapshot, onSnapshotsInSync, or, orderBy, persistentLocalCache, persistentMultipleTabManager, persistentSingleTabManager, query, queryEqual, refEqual, runTransaction, serverTimestamp, setDoc, setIndexConfiguration, setLogLevel, snapshotEqual, startAfter, startAt, sum, terminate, updateDoc, waitForPendingWrites, where, writeBatch };\n","import firebase from '@firebase/app-compat';\nimport { FirestoreError, Bytes, _isBase64Available, enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence, clearIndexedDbPersistence, _DatabaseId, _logWarn, connectFirestoreEmulator, enableNetwork, disableNetwork, _validateIsNotUsedTogether, waitForPendingWrites, onSnapshotsInSync, collection, doc, collectionGroup, runTransaction, ensureFirestoreConfigured, WriteBatch as WriteBatch$1, executeWrite, loadBundle, namedQuery, DocumentSnapshot as DocumentSnapshot$1, DocumentReference as DocumentReference$1, _DocumentKey, refEqual, setDoc, updateDoc, deleteDoc, onSnapshot, getDocFromCache, getDocFromServer, getDoc, snapshotEqual, query, where, orderBy, limit, limitToLast, startAt, startAfter, endBefore, endAt, queryEqual, getDocsFromCache, getDocsFromServer, getDocs, QuerySnapshot as QuerySnapshot$1, addDoc, _cast, AbstractUserDataWriter, setLogLevel as setLogLevel$1, QueryDocumentSnapshot as QueryDocumentSnapshot$1, _debugAssert, FieldPath as FieldPath$1, _FieldPath, serverTimestamp, deleteField, arrayUnion, arrayRemove, increment, GeoPoint, Timestamp, CACHE_SIZE_UNLIMITED } from '@firebase/firestore';\nimport { getModularInstance } from '@firebase/util';\nimport { Component } from '@firebase/component';\nconst name = \"@firebase/firestore-compat\";\nconst version = \"0.3.23\";\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction validateSetOptions(methodName, options) {\n if (options === undefined) {\n return {\n merge: false\n };\n }\n if (options.mergeFields !== undefined && options.merge !== undefined) {\n throw new FirestoreError('invalid-argument', `Invalid options passed to function ${methodName}(): You cannot ` + 'specify both \"merge\" and \"mergeFields\".');\n }\n return options;\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/** Helper function to assert Uint8Array is available at runtime. */\nfunction assertUint8ArrayAvailable() {\n if (typeof Uint8Array === 'undefined') {\n throw new FirestoreError('unimplemented', 'Uint8Arrays are not available in this environment.');\n }\n}\n/** Helper function to assert Base64 functions are available at runtime. */\nfunction assertBase64Available() {\n if (!_isBase64Available()) {\n throw new FirestoreError('unimplemented', 'Blobs are unavailable in Firestore in this environment.');\n }\n}\n/** Immutable class holding a blob (binary data) */\nclass Blob {\n constructor(_delegate) {\n this._delegate = _delegate;\n }\n static fromBase64String(base64) {\n assertBase64Available();\n return new Blob(Bytes.fromBase64String(base64));\n }\n static fromUint8Array(array) {\n assertUint8ArrayAvailable();\n return new Blob(Bytes.fromUint8Array(array));\n }\n toBase64() {\n assertBase64Available();\n return this._delegate.toBase64();\n }\n toUint8Array() {\n assertUint8ArrayAvailable();\n return this._delegate.toUint8Array();\n }\n isEqual(other) {\n return this._delegate.isEqual(other._delegate);\n }\n toString() {\n return 'Blob(base64: ' + this.toBase64() + ')';\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction isPartialObserver(obj) {\n return implementsAnyMethods(obj, ['next', 'error', 'complete']);\n}\n/**\r\n * Returns true if obj is an object and contains at least one of the specified\r\n * methods.\r\n */\nfunction implementsAnyMethods(obj, methods) {\n if (typeof obj !== 'object' || obj === null) {\n return false;\n }\n const object = obj;\n for (const method of methods) {\n if (method in object && typeof object[method] === 'function') {\n return true;\n }\n }\n return false;\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * The persistence provider included with the full Firestore SDK.\r\n */\nclass IndexedDbPersistenceProvider {\n enableIndexedDbPersistence(firestore, forceOwnership) {\n return enableIndexedDbPersistence(firestore._delegate, {\n forceOwnership\n });\n }\n enableMultiTabIndexedDbPersistence(firestore) {\n return enableMultiTabIndexedDbPersistence(firestore._delegate);\n }\n clearIndexedDbPersistence(firestore) {\n return clearIndexedDbPersistence(firestore._delegate);\n }\n}\n/**\r\n * Compat class for Firestore. Exposes Firestore Legacy API, but delegates\r\n * to the functional API of firestore-exp.\r\n */\nclass Firestore {\n constructor(databaseIdOrApp, _delegate, _persistenceProvider) {\n this._delegate = _delegate;\n this._persistenceProvider = _persistenceProvider;\n this.INTERNAL = {\n delete: () => this.terminate()\n };\n if (!(databaseIdOrApp instanceof _DatabaseId)) {\n this._appCompat = databaseIdOrApp;\n }\n }\n get _databaseId() {\n return this._delegate._databaseId;\n }\n settings(settingsLiteral) {\n const currentSettings = this._delegate._getSettings();\n if (!settingsLiteral.merge && currentSettings.host !== settingsLiteral.host) {\n _logWarn('You are overriding the original host. If you did not intend ' + 'to override your settings, use {merge: true}.');\n }\n if (settingsLiteral.merge) {\n settingsLiteral = Object.assign(Object.assign({}, currentSettings), settingsLiteral);\n // Remove the property from the settings once the merge is completed\n delete settingsLiteral.merge;\n }\n this._delegate._setSettings(settingsLiteral);\n }\n useEmulator(host, port, options = {}) {\n connectFirestoreEmulator(this._delegate, host, port, options);\n }\n enableNetwork() {\n return enableNetwork(this._delegate);\n }\n disableNetwork() {\n return disableNetwork(this._delegate);\n }\n enablePersistence(settings) {\n let synchronizeTabs = false;\n let experimentalForceOwningTab = false;\n if (settings) {\n synchronizeTabs = !!settings.synchronizeTabs;\n experimentalForceOwningTab = !!settings.experimentalForceOwningTab;\n _validateIsNotUsedTogether('synchronizeTabs', synchronizeTabs, 'experimentalForceOwningTab', experimentalForceOwningTab);\n }\n return synchronizeTabs ? this._persistenceProvider.enableMultiTabIndexedDbPersistence(this) : this._persistenceProvider.enableIndexedDbPersistence(this, experimentalForceOwningTab);\n }\n clearPersistence() {\n return this._persistenceProvider.clearIndexedDbPersistence(this);\n }\n terminate() {\n if (this._appCompat) {\n this._appCompat._removeServiceInstance('firestore-compat');\n this._appCompat._removeServiceInstance('firestore');\n }\n return this._delegate._delete();\n }\n waitForPendingWrites() {\n return waitForPendingWrites(this._delegate);\n }\n onSnapshotsInSync(arg) {\n return onSnapshotsInSync(this._delegate, arg);\n }\n get app() {\n if (!this._appCompat) {\n throw new FirestoreError('failed-precondition', \"Firestore was not initialized using the Firebase SDK. 'app' is \" + 'not available');\n }\n return this._appCompat;\n }\n collection(pathString) {\n try {\n return new CollectionReference(this, collection(this._delegate, pathString));\n } catch (e) {\n throw replaceFunctionName(e, 'collection()', 'Firestore.collection()');\n }\n }\n doc(pathString) {\n try {\n return new DocumentReference(this, doc(this._delegate, pathString));\n } catch (e) {\n throw replaceFunctionName(e, 'doc()', 'Firestore.doc()');\n }\n }\n collectionGroup(collectionId) {\n try {\n return new Query(this, collectionGroup(this._delegate, collectionId));\n } catch (e) {\n throw replaceFunctionName(e, 'collectionGroup()', 'Firestore.collectionGroup()');\n }\n }\n runTransaction(updateFunction) {\n return runTransaction(this._delegate, transaction => updateFunction(new Transaction(this, transaction)));\n }\n batch() {\n ensureFirestoreConfigured(this._delegate);\n return new WriteBatch(new WriteBatch$1(this._delegate, mutations => executeWrite(this._delegate, mutations)));\n }\n loadBundle(bundleData) {\n return loadBundle(this._delegate, bundleData);\n }\n namedQuery(name) {\n return namedQuery(this._delegate, name).then(expQuery => {\n if (!expQuery) {\n return null;\n }\n return new Query(this,\n // We can pass `expQuery` here directly since named queries don't have a UserDataConverter.\n // Otherwise, we would have to create a new ExpQuery and pass the old UserDataConverter.\n expQuery);\n });\n }\n}\nclass UserDataWriter extends AbstractUserDataWriter {\n constructor(firestore) {\n super();\n this.firestore = firestore;\n }\n convertBytes(bytes) {\n return new Blob(new Bytes(bytes));\n }\n convertReference(name) {\n const key = this.convertDocumentKey(name, this.firestore._databaseId);\n return DocumentReference.forKey(key, this.firestore, /* converter= */null);\n }\n}\nfunction setLogLevel(level) {\n setLogLevel$1(level);\n}\n/**\r\n * A reference to a transaction.\r\n */\nclass Transaction {\n constructor(_firestore, _delegate) {\n this._firestore = _firestore;\n this._delegate = _delegate;\n this._userDataWriter = new UserDataWriter(_firestore);\n }\n get(documentRef) {\n const ref = castReference(documentRef);\n return this._delegate.get(ref).then(result => new DocumentSnapshot(this._firestore, new DocumentSnapshot$1(this._firestore._delegate, this._userDataWriter, result._key, result._document, result.metadata, ref.converter)));\n }\n set(documentRef, data, options) {\n const ref = castReference(documentRef);\n if (options) {\n validateSetOptions('Transaction.set', options);\n this._delegate.set(ref, data, options);\n } else {\n this._delegate.set(ref, data);\n }\n return this;\n }\n update(documentRef, dataOrField, value, ...moreFieldsAndValues) {\n const ref = castReference(documentRef);\n if (arguments.length === 2) {\n this._delegate.update(ref, dataOrField);\n } else {\n this._delegate.update(ref, dataOrField, value, ...moreFieldsAndValues);\n }\n return this;\n }\n delete(documentRef) {\n const ref = castReference(documentRef);\n this._delegate.delete(ref);\n return this;\n }\n}\nclass WriteBatch {\n constructor(_delegate) {\n this._delegate = _delegate;\n }\n set(documentRef, data, options) {\n const ref = castReference(documentRef);\n if (options) {\n validateSetOptions('WriteBatch.set', options);\n this._delegate.set(ref, data, options);\n } else {\n this._delegate.set(ref, data);\n }\n return this;\n }\n update(documentRef, dataOrField, value, ...moreFieldsAndValues) {\n const ref = castReference(documentRef);\n if (arguments.length === 2) {\n this._delegate.update(ref, dataOrField);\n } else {\n this._delegate.update(ref, dataOrField, value, ...moreFieldsAndValues);\n }\n return this;\n }\n delete(documentRef) {\n const ref = castReference(documentRef);\n this._delegate.delete(ref);\n return this;\n }\n commit() {\n return this._delegate.commit();\n }\n}\n/**\r\n * Wraps a `PublicFirestoreDataConverter` translating the types from the\r\n * experimental SDK into corresponding types from the Classic SDK before passing\r\n * them to the wrapped converter.\r\n */\nclass FirestoreDataConverter {\n constructor(_firestore, _userDataWriter, _delegate) {\n this._firestore = _firestore;\n this._userDataWriter = _userDataWriter;\n this._delegate = _delegate;\n }\n fromFirestore(snapshot, options) {\n const expSnapshot = new QueryDocumentSnapshot$1(this._firestore._delegate, this._userDataWriter, snapshot._key, snapshot._document, snapshot.metadata, /* converter= */null);\n return this._delegate.fromFirestore(new QueryDocumentSnapshot(this._firestore, expSnapshot), options !== null && options !== void 0 ? options : {});\n }\n toFirestore(modelObject, options) {\n if (!options) {\n return this._delegate.toFirestore(modelObject);\n } else {\n return this._delegate.toFirestore(modelObject, options);\n }\n }\n // Use the same instance of `FirestoreDataConverter` for the given instances\n // of `Firestore` and `PublicFirestoreDataConverter` so that isEqual() will\n // compare equal for two objects created with the same converter instance.\n static getInstance(firestore, converter) {\n const converterMapByFirestore = FirestoreDataConverter.INSTANCES;\n let untypedConverterByConverter = converterMapByFirestore.get(firestore);\n if (!untypedConverterByConverter) {\n untypedConverterByConverter = new WeakMap();\n converterMapByFirestore.set(firestore, untypedConverterByConverter);\n }\n let instance = untypedConverterByConverter.get(converter);\n if (!instance) {\n instance = new FirestoreDataConverter(firestore, new UserDataWriter(firestore), converter);\n untypedConverterByConverter.set(converter, instance);\n }\n return instance;\n }\n}\nFirestoreDataConverter.INSTANCES = new WeakMap();\n/**\r\n * A reference to a particular document in a collection in the database.\r\n */\nclass DocumentReference {\n constructor(firestore, _delegate) {\n this.firestore = firestore;\n this._delegate = _delegate;\n this._userDataWriter = new UserDataWriter(firestore);\n }\n static forPath(path, firestore, converter) {\n if (path.length % 2 !== 0) {\n throw new FirestoreError('invalid-argument', 'Invalid document reference. Document ' + 'references must have an even number of segments, but ' + `${path.canonicalString()} has ${path.length}`);\n }\n return new DocumentReference(firestore, new DocumentReference$1(firestore._delegate, converter, new _DocumentKey(path)));\n }\n static forKey(key, firestore, converter) {\n return new DocumentReference(firestore, new DocumentReference$1(firestore._delegate, converter, key));\n }\n get id() {\n return this._delegate.id;\n }\n get parent() {\n return new CollectionReference(this.firestore, this._delegate.parent);\n }\n get path() {\n return this._delegate.path;\n }\n collection(pathString) {\n try {\n return new CollectionReference(this.firestore, collection(this._delegate, pathString));\n } catch (e) {\n throw replaceFunctionName(e, 'collection()', 'DocumentReference.collection()');\n }\n }\n isEqual(other) {\n other = getModularInstance(other);\n if (!(other instanceof DocumentReference$1)) {\n return false;\n }\n return refEqual(this._delegate, other);\n }\n set(value, options) {\n options = validateSetOptions('DocumentReference.set', options);\n try {\n if (options) {\n return setDoc(this._delegate, value, options);\n } else {\n return setDoc(this._delegate, value);\n }\n } catch (e) {\n throw replaceFunctionName(e, 'setDoc()', 'DocumentReference.set()');\n }\n }\n update(fieldOrUpdateData, value, ...moreFieldsAndValues) {\n try {\n if (arguments.length === 1) {\n return updateDoc(this._delegate, fieldOrUpdateData);\n } else {\n return updateDoc(this._delegate, fieldOrUpdateData, value, ...moreFieldsAndValues);\n }\n } catch (e) {\n throw replaceFunctionName(e, 'updateDoc()', 'DocumentReference.update()');\n }\n }\n delete() {\n return deleteDoc(this._delegate);\n }\n onSnapshot(...args) {\n const options = extractSnapshotOptions(args);\n const observer = wrapObserver(args, result => new DocumentSnapshot(this.firestore, new DocumentSnapshot$1(this.firestore._delegate, this._userDataWriter, result._key, result._document, result.metadata, this._delegate.converter)));\n return onSnapshot(this._delegate, options, observer);\n }\n get(options) {\n let snap;\n if ((options === null || options === void 0 ? void 0 : options.source) === 'cache') {\n snap = getDocFromCache(this._delegate);\n } else if ((options === null || options === void 0 ? void 0 : options.source) === 'server') {\n snap = getDocFromServer(this._delegate);\n } else {\n snap = getDoc(this._delegate);\n }\n return snap.then(result => new DocumentSnapshot(this.firestore, new DocumentSnapshot$1(this.firestore._delegate, this._userDataWriter, result._key, result._document, result.metadata, this._delegate.converter)));\n }\n withConverter(converter) {\n return new DocumentReference(this.firestore, converter ? this._delegate.withConverter(FirestoreDataConverter.getInstance(this.firestore, converter)) : this._delegate.withConverter(null));\n }\n}\n/**\r\n * Replaces the function name in an error thrown by the firestore-exp API\r\n * with the function names used in the classic API.\r\n */\nfunction replaceFunctionName(e, original, updated) {\n e.message = e.message.replace(original, updated);\n return e;\n}\n/**\r\n * Iterates the list of arguments from an `onSnapshot` call and returns the\r\n * first argument that may be an `SnapshotListenOptions` object. Returns an\r\n * empty object if none is found.\r\n */\nfunction extractSnapshotOptions(args) {\n for (const arg of args) {\n if (typeof arg === 'object' && !isPartialObserver(arg)) {\n return arg;\n }\n }\n return {};\n}\n/**\r\n * Creates an observer that can be passed to the firestore-exp SDK. The\r\n * observer converts all observed values into the format expected by the classic\r\n * SDK.\r\n *\r\n * @param args - The list of arguments from an `onSnapshot` call.\r\n * @param wrapper - The function that converts the firestore-exp type into the\r\n * type used by this shim.\r\n */\nfunction wrapObserver(args, wrapper) {\n var _a, _b;\n let userObserver;\n if (isPartialObserver(args[0])) {\n userObserver = args[0];\n } else if (isPartialObserver(args[1])) {\n userObserver = args[1];\n } else if (typeof args[0] === 'function') {\n userObserver = {\n next: args[0],\n error: args[1],\n complete: args[2]\n };\n } else {\n userObserver = {\n next: args[1],\n error: args[2],\n complete: args[3]\n };\n }\n return {\n next: val => {\n if (userObserver.next) {\n userObserver.next(wrapper(val));\n }\n },\n error: (_a = userObserver.error) === null || _a === void 0 ? void 0 : _a.bind(userObserver),\n complete: (_b = userObserver.complete) === null || _b === void 0 ? void 0 : _b.bind(userObserver)\n };\n}\nclass DocumentSnapshot {\n constructor(_firestore, _delegate) {\n this._firestore = _firestore;\n this._delegate = _delegate;\n }\n get ref() {\n return new DocumentReference(this._firestore, this._delegate.ref);\n }\n get id() {\n return this._delegate.id;\n }\n get metadata() {\n return this._delegate.metadata;\n }\n get exists() {\n return this._delegate.exists();\n }\n data(options) {\n return this._delegate.data(options);\n }\n get(fieldPath, options\n // We are using `any` here to avoid an explicit cast by our users.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) {\n return this._delegate.get(fieldPath, options);\n }\n isEqual(other) {\n return snapshotEqual(this._delegate, other._delegate);\n }\n}\nclass QueryDocumentSnapshot extends DocumentSnapshot {\n data(options) {\n const data = this._delegate.data(options);\n if (this._delegate._converter) {\n // Undefined is a possible valid value from converter.\n return data;\n } else {\n _debugAssert(data !== undefined, 'Document in a QueryDocumentSnapshot should exist');\n return data;\n }\n }\n}\nclass Query {\n constructor(firestore, _delegate) {\n this.firestore = firestore;\n this._delegate = _delegate;\n this._userDataWriter = new UserDataWriter(firestore);\n }\n where(fieldPath, opStr, value) {\n try {\n // The \"as string\" cast is a little bit of a hack. `where` accepts the\n // FieldPath Compat type as input, but is not typed as such in order to\n // not expose this via our public typings file.\n return new Query(this.firestore, query(this._delegate, where(fieldPath, opStr, value)));\n } catch (e) {\n throw replaceFunctionName(e, /(orderBy|where)\\(\\)/, 'Query.$1()');\n }\n }\n orderBy(fieldPath, directionStr) {\n try {\n // The \"as string\" cast is a little bit of a hack. `orderBy` accepts the\n // FieldPath Compat type as input, but is not typed as such in order to\n // not expose this via our public typings file.\n return new Query(this.firestore, query(this._delegate, orderBy(fieldPath, directionStr)));\n } catch (e) {\n throw replaceFunctionName(e, /(orderBy|where)\\(\\)/, 'Query.$1()');\n }\n }\n limit(n) {\n try {\n return new Query(this.firestore, query(this._delegate, limit(n)));\n } catch (e) {\n throw replaceFunctionName(e, 'limit()', 'Query.limit()');\n }\n }\n limitToLast(n) {\n try {\n return new Query(this.firestore, query(this._delegate, limitToLast(n)));\n } catch (e) {\n throw replaceFunctionName(e, 'limitToLast()', 'Query.limitToLast()');\n }\n }\n startAt(...args) {\n try {\n return new Query(this.firestore, query(this._delegate, startAt(...args)));\n } catch (e) {\n throw replaceFunctionName(e, 'startAt()', 'Query.startAt()');\n }\n }\n startAfter(...args) {\n try {\n return new Query(this.firestore, query(this._delegate, startAfter(...args)));\n } catch (e) {\n throw replaceFunctionName(e, 'startAfter()', 'Query.startAfter()');\n }\n }\n endBefore(...args) {\n try {\n return new Query(this.firestore, query(this._delegate, endBefore(...args)));\n } catch (e) {\n throw replaceFunctionName(e, 'endBefore()', 'Query.endBefore()');\n }\n }\n endAt(...args) {\n try {\n return new Query(this.firestore, query(this._delegate, endAt(...args)));\n } catch (e) {\n throw replaceFunctionName(e, 'endAt()', 'Query.endAt()');\n }\n }\n isEqual(other) {\n return queryEqual(this._delegate, other._delegate);\n }\n get(options) {\n let query;\n if ((options === null || options === void 0 ? void 0 : options.source) === 'cache') {\n query = getDocsFromCache(this._delegate);\n } else if ((options === null || options === void 0 ? void 0 : options.source) === 'server') {\n query = getDocsFromServer(this._delegate);\n } else {\n query = getDocs(this._delegate);\n }\n return query.then(result => new QuerySnapshot(this.firestore, new QuerySnapshot$1(this.firestore._delegate, this._userDataWriter, this._delegate, result._snapshot)));\n }\n onSnapshot(...args) {\n const options = extractSnapshotOptions(args);\n const observer = wrapObserver(args, snap => new QuerySnapshot(this.firestore, new QuerySnapshot$1(this.firestore._delegate, this._userDataWriter, this._delegate, snap._snapshot)));\n return onSnapshot(this._delegate, options, observer);\n }\n withConverter(converter) {\n return new Query(this.firestore, converter ? this._delegate.withConverter(FirestoreDataConverter.getInstance(this.firestore, converter)) : this._delegate.withConverter(null));\n }\n}\nclass DocumentChange {\n constructor(_firestore, _delegate) {\n this._firestore = _firestore;\n this._delegate = _delegate;\n }\n get type() {\n return this._delegate.type;\n }\n get doc() {\n return new QueryDocumentSnapshot(this._firestore, this._delegate.doc);\n }\n get oldIndex() {\n return this._delegate.oldIndex;\n }\n get newIndex() {\n return this._delegate.newIndex;\n }\n}\nclass QuerySnapshot {\n constructor(_firestore, _delegate) {\n this._firestore = _firestore;\n this._delegate = _delegate;\n }\n get query() {\n return new Query(this._firestore, this._delegate.query);\n }\n get metadata() {\n return this._delegate.metadata;\n }\n get size() {\n return this._delegate.size;\n }\n get empty() {\n return this._delegate.empty;\n }\n get docs() {\n return this._delegate.docs.map(doc => new QueryDocumentSnapshot(this._firestore, doc));\n }\n docChanges(options) {\n return this._delegate.docChanges(options).map(docChange => new DocumentChange(this._firestore, docChange));\n }\n forEach(callback, thisArg) {\n this._delegate.forEach(snapshot => {\n callback.call(thisArg, new QueryDocumentSnapshot(this._firestore, snapshot));\n });\n }\n isEqual(other) {\n return snapshotEqual(this._delegate, other._delegate);\n }\n}\nclass CollectionReference extends Query {\n constructor(firestore, _delegate) {\n super(firestore, _delegate);\n this.firestore = firestore;\n this._delegate = _delegate;\n }\n get id() {\n return this._delegate.id;\n }\n get path() {\n return this._delegate.path;\n }\n get parent() {\n const docRef = this._delegate.parent;\n return docRef ? new DocumentReference(this.firestore, docRef) : null;\n }\n doc(documentPath) {\n try {\n if (documentPath === undefined) {\n // Call `doc` without `documentPath` if `documentPath` is `undefined`\n // as `doc` validates the number of arguments to prevent users from\n // accidentally passing `undefined`.\n return new DocumentReference(this.firestore, doc(this._delegate));\n } else {\n return new DocumentReference(this.firestore, doc(this._delegate, documentPath));\n }\n } catch (e) {\n throw replaceFunctionName(e, 'doc()', 'CollectionReference.doc()');\n }\n }\n add(data) {\n return addDoc(this._delegate, data).then(docRef => new DocumentReference(this.firestore, docRef));\n }\n isEqual(other) {\n return refEqual(this._delegate, other._delegate);\n }\n withConverter(converter) {\n return new CollectionReference(this.firestore, converter ? this._delegate.withConverter(FirestoreDataConverter.getInstance(this.firestore, converter)) : this._delegate.withConverter(null));\n }\n}\nfunction castReference(documentRef) {\n return _cast(documentRef, DocumentReference$1);\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// The objects that are a part of this API are exposed to third-parties as\n// compiled javascript so we want to flag our private members with a leading\n// underscore to discourage their use.\n/**\r\n * A `FieldPath` refers to a field in a document. The path may consist of a\r\n * single field name (referring to a top-level field in the document), or a list\r\n * of field names (referring to a nested field in the document).\r\n */\nclass FieldPath {\n /**\r\n * Creates a FieldPath from the provided field names. If more than one field\r\n * name is provided, the path will point to a nested field in a document.\r\n *\r\n * @param fieldNames - A list of field names.\r\n */\n constructor(...fieldNames) {\n this._delegate = new FieldPath$1(...fieldNames);\n }\n static documentId() {\n /**\r\n * Internal Note: The backend doesn't technically support querying by\r\n * document ID. Instead it queries by the entire document name (full path\r\n * included), but in the cases we currently support documentId(), the net\r\n * effect is the same.\r\n */\n return new FieldPath(_FieldPath.keyField().canonicalString());\n }\n isEqual(other) {\n other = getModularInstance(other);\n if (!(other instanceof FieldPath$1)) {\n return false;\n }\n return this._delegate._internalPath.isEqual(other._internalPath);\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass FieldValue {\n constructor(_delegate) {\n this._delegate = _delegate;\n }\n static serverTimestamp() {\n const delegate = serverTimestamp();\n delegate._methodName = 'FieldValue.serverTimestamp';\n return new FieldValue(delegate);\n }\n static delete() {\n const delegate = deleteField();\n delegate._methodName = 'FieldValue.delete';\n return new FieldValue(delegate);\n }\n static arrayUnion(...elements) {\n const delegate = arrayUnion(...elements);\n delegate._methodName = 'FieldValue.arrayUnion';\n return new FieldValue(delegate);\n }\n static arrayRemove(...elements) {\n const delegate = arrayRemove(...elements);\n delegate._methodName = 'FieldValue.arrayRemove';\n return new FieldValue(delegate);\n }\n static increment(n) {\n const delegate = increment(n);\n delegate._methodName = 'FieldValue.increment';\n return new FieldValue(delegate);\n }\n isEqual(other) {\n return this._delegate.isEqual(other._delegate);\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst firestoreNamespace = {\n Firestore,\n GeoPoint,\n Timestamp,\n Blob,\n Transaction,\n WriteBatch,\n DocumentReference,\n DocumentSnapshot,\n Query,\n QueryDocumentSnapshot,\n QuerySnapshot,\n CollectionReference,\n FieldPath,\n FieldValue,\n setLogLevel,\n CACHE_SIZE_UNLIMITED\n};\n/**\r\n * Configures Firestore as part of the Firebase SDK by calling registerComponent.\r\n *\r\n * @param firebase - The FirebaseNamespace to register Firestore with\r\n * @param firestoreFactory - A factory function that returns a new Firestore\r\n * instance.\r\n */\nfunction configureForFirebase(firebase, firestoreFactory) {\n firebase.INTERNAL.registerComponent(new Component('firestore-compat', container => {\n const app = container.getProvider('app-compat').getImmediate();\n const firestoreExp = container.getProvider('firestore').getImmediate();\n return firestoreFactory(app, firestoreExp);\n }, 'PUBLIC').setServiceProps(Object.assign({}, firestoreNamespace)));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Registers the main Firestore build with the components framework.\r\n * Persistence can be enabled via `firebase.firestore().enablePersistence()`.\r\n */\nfunction registerFirestore(instance) {\n configureForFirebase(instance, (app, firestoreExp) => new Firestore(app, firestoreExp, new IndexedDbPersistenceProvider()));\n instance.registerVersion(name, version);\n}\nregisterFirestore(firebase);\nexport { registerFirestore };\n","import { isPlatformServer } from '@angular/common';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, NgModule } from '@angular/core';\nimport * as i1 from '@angular/fire';\nimport { keepUnstableUntilFirst, VERSION } from '@angular/fire';\nimport * as i3 from '@angular/fire/app-check';\nimport { ɵfirebaseAppFactory, ɵcacheInstance, FIREBASE_OPTIONS, FIREBASE_APP_NAME } from '@angular/fire/compat';\nimport * as i2 from '@angular/fire/compat/auth';\nimport { ɵauthFactory, USE_EMULATOR as USE_EMULATOR$1, SETTINGS as SETTINGS$1, TENANT_ID, LANGUAGE_CODE, USE_DEVICE_LANGUAGE, PERSISTENCE } from '@angular/fire/compat/auth';\nimport { Observable, asyncScheduler, from, of } from 'rxjs';\nimport { startWith, pairwise, map, scan, distinctUntilChanged, filter } from 'rxjs/operators';\nimport 'firebase/compat/auth';\nimport 'firebase/compat/firestore';\nimport firebase from 'firebase/compat/app';\nfunction _fromRef(ref, scheduler = asyncScheduler) {\n return new Observable(subscriber => {\n let unsubscribe;\n if (scheduler != null) {\n scheduler.schedule(() => {\n unsubscribe = ref.onSnapshot({\n includeMetadataChanges: true\n }, subscriber);\n });\n } else {\n unsubscribe = ref.onSnapshot({\n includeMetadataChanges: true\n }, subscriber);\n }\n return () => {\n if (unsubscribe != null) {\n unsubscribe();\n }\n };\n });\n}\nfunction fromRef(ref, scheduler) {\n return _fromRef(ref, scheduler);\n}\nfunction fromDocRef(ref, scheduler) {\n return fromRef(ref, scheduler).pipe(startWith(undefined), pairwise(), map(snapshots => {\n const [priorPayload, payload] = snapshots;\n if (!payload.exists) {\n return {\n payload,\n type: 'removed'\n };\n }\n if (!priorPayload?.exists) {\n return {\n payload,\n type: 'added'\n };\n }\n return {\n payload,\n type: 'modified'\n };\n }));\n}\nfunction fromCollectionRef(ref, scheduler) {\n return fromRef(ref, scheduler).pipe(map(payload => ({\n payload,\n type: 'query'\n })));\n}\n\n/**\n * AngularFirestoreDocument service\n *\n * This class creates a reference to a Firestore Document. A reference is provided in\n * in the constructor. The class is generic which gives you type safety for data update\n * methods and data streaming.\n *\n * This class uses Symbol.observable to transform into Observable using Observable.from().\n *\n * This class is rarely used directly and should be created from the AngularFirestore service.\n *\n * Example:\n *\n * const fakeStock = new AngularFirestoreDocument(doc('stocks/FAKE'));\n * await fakeStock.set({ name: 'FAKE', price: 0.01 });\n * fakeStock.valueChanges().map(snap => {\n * if(snap.exists) return snap.data();\n * return null;\n * }).subscribe(value => console.log(value));\n * // OR! Transform using Observable.from() and the data is unwrapped for you\n * Observable.from(fakeStock).subscribe(value => console.log(value));\n */\nclass AngularFirestoreDocument {\n ref;\n afs;\n /**\n * The constructor takes in a DocumentReference to provide wrapper methods\n * for data operations, data streaming, and Symbol.observable.\n */\n constructor(ref, afs) {\n this.ref = ref;\n this.afs = afs;\n }\n /**\n * Create or overwrite a single document.\n */\n set(data, options) {\n return this.ref.set(data, options);\n }\n /**\n * Update some fields of a document without overwriting the entire document.\n */\n update(data) {\n return this.ref.update(data);\n }\n /**\n * Delete a document.\n */\n delete() {\n return this.ref.delete();\n }\n /**\n * Create a reference to a sub-collection given a path and an optional query\n * function.\n */\n collection(path, queryFn) {\n const collectionRef = this.ref.collection(path);\n const {\n ref,\n query\n } = associateQuery(collectionRef, queryFn);\n return new AngularFirestoreCollection(ref, query, this.afs);\n }\n /**\n * Listen to snapshot updates from the document.\n */\n snapshotChanges() {\n const scheduledFromDocRef$ = fromDocRef(this.ref, this.afs.schedulers.outsideAngular);\n return scheduledFromDocRef$.pipe(keepUnstableUntilFirst);\n }\n valueChanges(options = {}) {\n return this.snapshotChanges().pipe(map(({\n payload\n }) => options.idField ? {\n ...payload.data(),\n ...{\n [options.idField]: payload.id\n }\n } : payload.data()));\n }\n /**\n * Retrieve the document once.\n */\n get(options) {\n return from(this.ref.get(options)).pipe(keepUnstableUntilFirst);\n }\n}\n\n/**\n * Return a stream of document changes on a query. These results are not in sort order but in\n * order of occurence.\n */\nfunction docChanges(query, scheduler) {\n return fromCollectionRef(query, scheduler).pipe(startWith(undefined), pairwise(), map(actionTuple => {\n const [priorAction, action] = actionTuple;\n const docChanges = action.payload.docChanges();\n const actions = docChanges.map(change => ({\n type: change.type,\n payload: change\n }));\n // the metadata has changed from the prior emission\n if (priorAction && JSON.stringify(priorAction.payload.metadata) !== JSON.stringify(action.payload.metadata)) {\n // go through all the docs in payload and figure out which ones changed\n action.payload.docs.forEach((currentDoc, currentIndex) => {\n const docChange = docChanges.find(d => d.doc.ref.isEqual(currentDoc.ref));\n const priorDoc = priorAction?.payload.docs.find(d => d.ref.isEqual(currentDoc.ref));\n if (docChange && JSON.stringify(docChange.doc.metadata) === JSON.stringify(currentDoc.metadata) || !docChange && priorDoc && JSON.stringify(priorDoc.metadata) === JSON.stringify(currentDoc.metadata)) {\n // document doesn't appear to have changed, don't log another action\n } else {\n // since the actions are processed in order just push onto the array\n actions.push({\n type: 'modified',\n payload: {\n oldIndex: currentIndex,\n newIndex: currentIndex,\n type: 'modified',\n doc: currentDoc\n }\n });\n }\n });\n }\n return actions;\n }));\n}\n/**\n * Return a stream of document changes on a query. These results are in sort order.\n */\nfunction sortedChanges(query, events, scheduler) {\n return docChanges(query, scheduler).pipe(scan((current, changes) => combineChanges(current, changes.map(it => it.payload), events), []), distinctUntilChanged(),\n // cut down on unneed change cycles\n map(changes => changes.map(c => ({\n type: c.type,\n payload: c\n }))));\n}\n/**\n * Combines the total result set from the current set of changes from an incoming set\n * of changes.\n */\nfunction combineChanges(current, changes, events) {\n changes.forEach(change => {\n // skip unwanted change types\n if (events.indexOf(change.type) > -1) {\n current = combineChange(current, change);\n }\n });\n return current;\n}\n/**\n * Splice arguments on top of a sliced array, to break top-level ===\n * this is useful for change-detection\n */\nfunction sliceAndSplice(original, start, deleteCount, ...args) {\n const returnArray = original.slice();\n returnArray.splice(start, deleteCount, ...args);\n return returnArray;\n}\n/**\n * Creates a new sorted array from a new change.\n * Build our own because we allow filtering of action types ('added', 'removed', 'modified') before scanning\n * and so we have greater control over change detection (by breaking ===)\n */\nfunction combineChange(combined, change) {\n switch (change.type) {\n case 'added':\n if (combined[change.newIndex] && combined[change.newIndex].doc.ref.isEqual(change.doc.ref)) {\n // Not sure why the duplicates are getting fired\n } else {\n return sliceAndSplice(combined, change.newIndex, 0, change);\n }\n break;\n case 'modified':\n if (combined[change.oldIndex] == null || combined[change.oldIndex].doc.ref.isEqual(change.doc.ref)) {\n // When an item changes position we first remove it\n // and then add it's new position\n if (change.oldIndex !== change.newIndex) {\n const copiedArray = combined.slice();\n copiedArray.splice(change.oldIndex, 1);\n copiedArray.splice(change.newIndex, 0, change);\n return copiedArray;\n } else {\n return sliceAndSplice(combined, change.newIndex, 1, change);\n }\n }\n break;\n case 'removed':\n if (combined[change.oldIndex] && combined[change.oldIndex].doc.ref.isEqual(change.doc.ref)) {\n return sliceAndSplice(combined, change.oldIndex, 1);\n }\n break;\n }\n return combined;\n}\nfunction validateEventsArray(events) {\n if (!events || events.length === 0) {\n events = ['added', 'removed', 'modified'];\n }\n return events;\n}\n/**\n * AngularFirestoreCollection service\n *\n * This class creates a reference to a Firestore Collection. A reference and a query are provided in\n * in the constructor. The query can be the unqueried reference if no query is desired.The class\n * is generic which gives you type safety for data update methods and data streaming.\n *\n * This class uses Symbol.observable to transform into Observable using Observable.from().\n *\n * This class is rarely used directly and should be created from the AngularFirestore service.\n *\n * Example:\n *\n * const collectionRef = firebase.firestore.collection('stocks');\n * const query = collectionRef.where('price', '>', '0.01');\n * const fakeStock = new AngularFirestoreCollection(collectionRef, query);\n *\n * // NOTE!: the updates are performed on the reference not the query\n * await fakeStock.add({ name: 'FAKE', price: 0.01 });\n *\n * // Subscribe to changes as snapshots. This provides you data updates as well as delta updates.\n * fakeStock.valueChanges().subscribe(value => console.log(value));\n */\nclass AngularFirestoreCollection {\n ref;\n query;\n afs;\n /**\n * The constructor takes in a CollectionReference and Query to provide wrapper methods\n * for data operations and data streaming.\n *\n * Note: Data operation methods are done on the reference not the query. This means\n * when you update data it is not updating data to the window of your query unless\n * the data fits the criteria of the query. See the AssociatedRefence type for details\n * on this implication.\n */\n constructor(ref, query, afs) {\n this.ref = ref;\n this.query = query;\n this.afs = afs;\n }\n /**\n * Listen to the latest change in the stream. This method returns changes\n * as they occur and they are not sorted by query order. This allows you to construct\n * your own data structure.\n */\n stateChanges(events) {\n let source = docChanges(this.query, this.afs.schedulers.outsideAngular);\n if (events && events.length > 0) {\n source = source.pipe(map(actions => actions.filter(change => events.indexOf(change.type) > -1)));\n }\n return source.pipe(\n // We want to filter out empty arrays, but always emit at first, so the developer knows\n // that the collection has been resolve; even if it's empty\n startWith(undefined), pairwise(), filter(([prior, current]) => current.length > 0 || !prior), map(([, current]) => current), keepUnstableUntilFirst);\n }\n /**\n * Create a stream of changes as they occur it time. This method is similar to stateChanges()\n * but it collects each event in an array over time.\n */\n auditTrail(events) {\n return this.stateChanges(events).pipe(scan((current, action) => [...current, ...action], []));\n }\n /**\n * Create a stream of synchronized changes. This method keeps the local array in sorted\n * query order.\n */\n snapshotChanges(events) {\n const validatedEvents = validateEventsArray(events);\n const scheduledSortedChanges$ = sortedChanges(this.query, validatedEvents, this.afs.schedulers.outsideAngular);\n return scheduledSortedChanges$.pipe(keepUnstableUntilFirst);\n }\n valueChanges(options = {}) {\n return fromCollectionRef(this.query, this.afs.schedulers.outsideAngular).pipe(map(actions => actions.payload.docs.map(a => {\n if (options.idField) {\n return {\n ...a.data(),\n ...{\n [options.idField]: a.id\n }\n };\n } else {\n return a.data();\n }\n })), keepUnstableUntilFirst);\n }\n /**\n * Retrieve the results of the query once.\n */\n get(options) {\n return from(this.query.get(options)).pipe(keepUnstableUntilFirst);\n }\n /**\n * Add data to a collection reference.\n *\n * Note: Data operation methods are done on the reference not the query. This means\n * when you update data it is not updating data to the window of your query unless\n * the data fits the criteria of the query.\n */\n add(data) {\n return this.ref.add(data);\n }\n /**\n * Create a reference to a single document in a collection.\n */\n doc(path) {\n // TODO is there a better way to solve this type issue\n return new AngularFirestoreDocument(this.ref.doc(path), this.afs);\n }\n}\n\n/**\n * AngularFirestoreCollectionGroup service\n *\n * This class holds a reference to a Firestore Collection Group Query.\n *\n * This class uses Symbol.observable to transform into Observable using Observable.from().\n *\n * This class is rarely used directly and should be created from the AngularFirestore service.\n *\n * Example:\n *\n * const collectionGroup = firebase.firestore.collectionGroup('stocks');\n * const query = collectionRef.where('price', '>', '0.01');\n * const fakeStock = new AngularFirestoreCollectionGroup(query, afs);\n *\n * // Subscribe to changes as snapshots. This provides you data updates as well as delta updates.\n * fakeStock.valueChanges().subscribe(value => console.log(value));\n */\nclass AngularFirestoreCollectionGroup {\n query;\n afs;\n /**\n * The constructor takes in a CollectionGroupQuery to provide wrapper methods\n * for data operations and data streaming.\n */\n constructor(query, afs) {\n this.query = query;\n this.afs = afs;\n }\n /**\n * Listen to the latest change in the stream. This method returns changes\n * as they occur and they are not sorted by query order. This allows you to construct\n * your own data structure.\n */\n stateChanges(events) {\n if (!events || events.length === 0) {\n return docChanges(this.query, this.afs.schedulers.outsideAngular).pipe(keepUnstableUntilFirst);\n }\n return docChanges(this.query, this.afs.schedulers.outsideAngular).pipe(map(actions => actions.filter(change => events.indexOf(change.type) > -1)), filter(changes => changes.length > 0), keepUnstableUntilFirst);\n }\n /**\n * Create a stream of changes as they occur it time. This method is similar to stateChanges()\n * but it collects each event in an array over time.\n */\n auditTrail(events) {\n return this.stateChanges(events).pipe(scan((current, action) => [...current, ...action], []));\n }\n /**\n * Create a stream of synchronized changes. This method keeps the local array in sorted\n * query order.\n */\n snapshotChanges(events) {\n const validatedEvents = validateEventsArray(events);\n const scheduledSortedChanges$ = sortedChanges(this.query, validatedEvents, this.afs.schedulers.outsideAngular);\n return scheduledSortedChanges$.pipe(keepUnstableUntilFirst);\n }\n valueChanges(options = {}) {\n const fromCollectionRefScheduled$ = fromCollectionRef(this.query, this.afs.schedulers.outsideAngular);\n return fromCollectionRefScheduled$.pipe(map(actions => actions.payload.docs.map(a => {\n if (options.idField) {\n return {\n [options.idField]: a.id,\n ...a.data()\n };\n } else {\n return a.data();\n }\n })), keepUnstableUntilFirst);\n }\n /**\n * Retrieve the results of the query once.\n */\n get(options) {\n return from(this.query.get(options)).pipe(keepUnstableUntilFirst);\n }\n}\n\n/**\n * The value of this token determines whether or not the firestore will have persistance enabled\n */\nconst ENABLE_PERSISTENCE = /*#__PURE__*/new InjectionToken('angularfire2.enableFirestorePersistence');\nconst PERSISTENCE_SETTINGS = /*#__PURE__*/new InjectionToken('angularfire2.firestore.persistenceSettings');\nconst SETTINGS = /*#__PURE__*/new InjectionToken('angularfire2.firestore.settings');\nconst USE_EMULATOR = /*#__PURE__*/new InjectionToken('angularfire2.firestore.use-emulator');\n/**\n * A utility methods for associating a collection reference with\n * a query.\n *\n * @param collectionRef - A collection reference to query\n * @param queryFn - The callback to create a query\n *\n * Example:\n * const { query, ref } = associateQuery(docRef.collection('items'), ref => {\n * return ref.where('age', '<', 200);\n * });\n */\nfunction associateQuery(collectionRef, queryFn = ref => ref) {\n const query = queryFn(collectionRef);\n const ref = collectionRef;\n return {\n query,\n ref\n };\n}\n/**\n * AngularFirestore Service\n *\n * This service is the main entry point for this feature module. It provides\n * an API for creating Collection and Reference services. These services can\n * then be used to do data updates and observable streams of the data.\n *\n * Example:\n *\n * import { Component } from '@angular/core';\n * import { AngularFirestore, AngularFirestoreCollection, AngularFirestoreDocument } from '@angular/fire/firestore';\n * import { Observable } from 'rxjs/Observable';\n * import { from } from 'rxjs/observable';\n *\n * @Component({\n * selector: 'app-my-component',\n * template: `\n * Items for {{ (profile | async)?.name }}\n * \n * \n * \n * Add Item \n *
\n * `\n * })\n * export class MyComponent implements OnInit {\n *\n * // services for data operations and data streaming\n * private readonly itemsRef: AngularFirestoreCollection- ;\n * private readonly profileRef: AngularFirestoreDocument
;\n *\n * // observables for template\n * items: Observable- ;\n * profile: Observable
;\n *\n * // inject main service\n * constructor(private readonly afs: AngularFirestore) {}\n *\n * ngOnInit() {\n * this.itemsRef = afs.collection('items', ref => ref.where('user', '==', 'davideast').limit(10));\n * this.items = this.itemsRef.valueChanges().map(snap => snap.docs.map(data => doc.data()));\n * // this.items = from(this.itemsRef); // you can also do this with no mapping\n *\n * this.profileRef = afs.doc('users/davideast');\n * this.profile = this.profileRef.valueChanges();\n * }\n *\n * addItem(name: string) {\n * const user = 'davideast';\n * this.itemsRef.add({ name, user });\n * }\n * }\n */\nlet AngularFirestore = /*#__PURE__*/(() => {\n class AngularFirestore {\n schedulers;\n firestore;\n persistenceEnabled$;\n /**\n * Each Feature of AngularFire has a FirebaseApp injected. This way we\n * don't rely on the main Firebase App instance and we can create named\n * apps and use multiple apps.\n */\n constructor(options, name, shouldEnablePersistence, settings,\n // eslint-disable-next-line @typescript-eslint/ban-types\n platformId, zone, schedulers, persistenceSettings, _useEmulator, auth, useAuthEmulator, authSettings,\n // can't use firebase.auth.AuthSettings here\n tenantId, languageCode, useDeviceLanguage, persistence, _appCheckInstances) {\n this.schedulers = schedulers;\n const app = ɵfirebaseAppFactory(options, zone, name);\n const useEmulator = _useEmulator;\n if (auth) {\n ɵauthFactory(app, zone, useAuthEmulator, tenantId, languageCode, useDeviceLanguage, authSettings, persistence);\n }\n [this.firestore, this.persistenceEnabled$] = ɵcacheInstance(`${app.name}.firestore`, 'AngularFirestore', app.name, () => {\n const firestore = zone.runOutsideAngular(() => app.firestore());\n if (settings) {\n firestore.settings(settings);\n }\n if (useEmulator) {\n firestore.useEmulator(...useEmulator);\n }\n if (shouldEnablePersistence && !isPlatformServer(platformId)) {\n // We need to try/catch here because not all enablePersistence() failures are caught\n // https://github.com/firebase/firebase-js-sdk/issues/608\n const enablePersistence = () => {\n try {\n return from(firestore.enablePersistence(persistenceSettings || undefined).then(() => true, () => false));\n } catch (e) {\n if (typeof console !== 'undefined') {\n console.warn(e);\n }\n return of(false);\n }\n };\n return [firestore, zone.runOutsideAngular(enablePersistence)];\n } else {\n return [firestore, of(false)];\n }\n }, [settings, useEmulator, shouldEnablePersistence]);\n }\n collection(pathOrRef, queryFn) {\n let collectionRef;\n if (typeof pathOrRef === 'string') {\n collectionRef = this.firestore.collection(pathOrRef);\n } else {\n collectionRef = pathOrRef;\n }\n const {\n ref,\n query\n } = associateQuery(collectionRef, queryFn);\n const refInZone = this.schedulers.ngZone.run(() => ref);\n return new AngularFirestoreCollection(refInZone, query, this);\n }\n /**\n * Create a reference to a Firestore Collection Group based on a collectionId\n * and an optional query function to narrow the result\n * set.\n */\n collectionGroup(collectionId, queryGroupFn) {\n const queryFn = queryGroupFn || (ref => ref);\n const collectionGroup = this.firestore.collectionGroup(collectionId);\n return new AngularFirestoreCollectionGroup(queryFn(collectionGroup), this);\n }\n doc(pathOrRef) {\n let ref;\n if (typeof pathOrRef === 'string') {\n ref = this.firestore.doc(pathOrRef);\n } else {\n ref = pathOrRef;\n }\n const refInZone = this.schedulers.ngZone.run(() => ref);\n return new AngularFirestoreDocument(refInZone, this);\n }\n /**\n * Returns a generated Firestore Document Id.\n */\n createId() {\n return this.firestore.collection('_').doc().id;\n }\n static ɵfac = function AngularFirestore_Factory(t) {\n return new (t || AngularFirestore)(i0.ɵɵinject(FIREBASE_OPTIONS), i0.ɵɵinject(FIREBASE_APP_NAME, 8), i0.ɵɵinject(ENABLE_PERSISTENCE, 8), i0.ɵɵinject(SETTINGS, 8), i0.ɵɵinject(PLATFORM_ID), i0.ɵɵinject(i0.NgZone), i0.ɵɵinject(i1.ɵAngularFireSchedulers), i0.ɵɵinject(PERSISTENCE_SETTINGS, 8), i0.ɵɵinject(USE_EMULATOR, 8), i0.ɵɵinject(i2.AngularFireAuth, 8), i0.ɵɵinject(USE_EMULATOR$1, 8), i0.ɵɵinject(SETTINGS$1, 8), i0.ɵɵinject(TENANT_ID, 8), i0.ɵɵinject(LANGUAGE_CODE, 8), i0.ɵɵinject(USE_DEVICE_LANGUAGE, 8), i0.ɵɵinject(PERSISTENCE, 8), i0.ɵɵinject(i3.AppCheckInstances, 8));\n };\n static ɵprov = /* @__PURE__ */i0.ɵɵdefineInjectable({\n token: AngularFirestore,\n factory: AngularFirestore.ɵfac,\n providedIn: 'any'\n });\n }\n return AngularFirestore;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet AngularFirestoreModule = /*#__PURE__*/(() => {\n class AngularFirestoreModule {\n constructor() {\n firebase.registerVersion('angularfire', VERSION.full, 'fst-compat');\n }\n /**\n * Attempt to enable persistent storage, if possible\n */\n static enablePersistence(persistenceSettings) {\n return {\n ngModule: AngularFirestoreModule,\n providers: [{\n provide: ENABLE_PERSISTENCE,\n useValue: true\n }, {\n provide: PERSISTENCE_SETTINGS,\n useValue: persistenceSettings\n }]\n };\n }\n static ɵfac = function AngularFirestoreModule_Factory(t) {\n return new (t || AngularFirestoreModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: AngularFirestoreModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [AngularFirestore]\n });\n }\n return AngularFirestoreModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AngularFirestore, AngularFirestoreCollection, AngularFirestoreCollectionGroup, AngularFirestoreDocument, AngularFirestoreModule, ENABLE_PERSISTENCE, PERSISTENCE_SETTINGS, SETTINGS, USE_EMULATOR, associateQuery, combineChange, combineChanges, docChanges, fromCollectionRef, fromDocRef, fromRef, sortedChanges, validateEventsArray };\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { RouterModule } from '@angular/router';\nimport { AlertComponent } from './alert.component';\nexport { AlertComponent, AlertTypes } from './alert.component';\nexport { AlertExtendedDirective } from './directives/alert-extended.directive';\n\nimport { AlertExtendedDirective } from './directives/alert-extended.directive';\n\nexport const MODULE_IMPORTS = [CommonModule, MatIconModule, MatButtonModule, RouterModule];\n\nexport const MODULE_DECLARATIONS = [AlertComponent, AlertExtendedDirective];\n\n@NgModule({\n declarations: MODULE_DECLARATIONS,\n exports: [AlertComponent, AlertExtendedDirective],\n imports: MODULE_IMPORTS,\n})\nexport class GalaxyAlertModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { ButtonLoadingIndicatorComponent } from './button-loading-indicator.component';\nexport { ButtonLoadingIndicatorComponent };\n\nexport const MODULE_IMPORTS = [CommonModule, MatProgressSpinnerModule];\n\nexport const MODULE_DECLARATIONS = [ButtonLoadingIndicatorComponent];\n\n@NgModule({\n declarations: MODULE_DECLARATIONS,\n imports: MODULE_IMPORTS,\n exports: [ButtonLoadingIndicatorComponent],\n})\nexport class GalaxyButtonLoadingIndicatorModule {}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { EmptyStateComponent } from './empty-state.component';\nexport { EmptyStateComponent } from './empty-state.component';\n\nimport { EmptyStateHeroDirective } from './directives/empty-state-hero.directive';\nimport { EmptyStateTitleDirective } from './directives/empty-state-title.directive';\nimport { EmptyStateActionsDirective } from './directives/empty-state-actions.directive';\nimport { EmptyStateFootnoteDirective } from './directives/empty-state-footnote.directive';\nexport { EmptyStateHeroDirective } from './directives/empty-state-hero.directive';\nexport { EmptyStateTitleDirective } from './directives/empty-state-title.directive';\nexport { EmptyStateActionsDirective } from './directives/empty-state-actions.directive';\nexport { EmptyStateFootnoteDirective } from './directives/empty-state-footnote.directive';\n\nexport const MODULE_IMPORTS = [CommonModule];\n\nexport const MODULE_DECLARATIONS = [\n EmptyStateComponent,\n EmptyStateHeroDirective,\n EmptyStateTitleDirective,\n EmptyStateActionsDirective,\n EmptyStateFootnoteDirective,\n];\n\n@NgModule({\n declarations: MODULE_DECLARATIONS,\n imports: [MODULE_IMPORTS],\n exports: [\n EmptyStateComponent,\n EmptyStateHeroDirective,\n EmptyStateTitleDirective,\n EmptyStateActionsDirective,\n EmptyStateFootnoteDirective,\n ],\n})\nexport class GalaxyEmptyStateModule {}\n","import { ComponentType } from '@angular/cdk/portal';\nimport { inject, Injectable, TemplateRef } from '@angular/core';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\n\n@Injectable()\nexport class ModalService {\n dialog = inject(MatDialog);\n\n openList(componentOrTemplateRef: ComponentType | TemplateRef): MatDialogRef {\n return this.dialog.open(componentOrTemplateRef, {\n width: '800px',\n height: '90vh',\n maxWidth: '100vw',\n maxHeight: '100vh',\n autoFocus: false,\n });\n }\n\n openInformational(componentOrTemplateRef: ComponentType | TemplateRef): MatDialogRef {\n return this.dialog.open(componentOrTemplateRef, {\n width: '800px',\n maxWidth: '100vw',\n maxHeight: '100vh',\n autoFocus: false,\n });\n }\n\n openFullscreen(componentOrTemplateRef: ComponentType | TemplateRef): MatDialogRef {\n return this.dialog.open(componentOrTemplateRef, {\n width: '100vw',\n height: '100vh',\n maxWidth: '100vw',\n maxHeight: '100vh',\n autoFocus: false,\n });\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n/**\n * Forked code, allows for usage within our Angular elements without\n * dependency on @angular/material\n */\nimport { AnimationEvent } from '@angular/animations';\nimport { AriaDescriber, FocusMonitor } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { BreakpointObserver, BreakpointState, Breakpoints } from '@angular/cdk/layout';\nimport {\n FlexibleConnectedPositionStrategy,\n HorizontalConnectionPos,\n OriginConnectionPosition,\n Overlay,\n OverlayConnectionPosition,\n OverlayRef,\n ScrollStrategy,\n VerticalConnectionPos,\n} from '@angular/cdk/overlay';\nimport { Platform, normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { ScrollDispatcher } from '@angular/cdk/scrolling';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Directive,\n ElementRef,\n HostBinding,\n Inject,\n InjectionToken,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Optional,\n ViewContainerRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { take, takeUntil } from 'rxjs/operators';\n\nimport { matTooltipAnimations } from './tooltip-animations';\n\n/** Possible positions for a tooltip. */\nexport type TooltipPosition = 'left' | 'right' | 'above' | 'below' | 'before' | 'after';\n\n/**\n * Options for how the tooltip trigger should handle touch gestures.\n * See `MatTooltipDirective.touchGestures` for more information.\n */\nexport type TooltipTouchGestures = 'auto' | 'on' | 'off';\n\n/** Possible visibility states of a tooltip. */\nexport type TooltipVisibility = 'initial' | 'visible' | 'hidden';\n\n/** Time in ms to throttle repositioning after scroll events. */\nexport const SCROLL_THROTTLE_MS = 20;\n\n/** CSS class that will be attached to the overlay panel. */\nexport const TOOLTIP_PANEL_CLASS = 'atlas_navbar--tooltip-panel';\n\n/** Options used to bind passive event listeners. */\nconst passiveListenerOptions = normalizePassiveListenerOptions({ passive: true });\n\n/**\n * Time between the user putting the pointer on a tooltip\n * trigger and the long press event being fired.\n */\nconst LONGPRESS_DELAY = 500;\n\n/**\n * Creates an error to be thrown if the user supplied an invalid tooltip position.\n * @docs-private\n */\nexport function getMatTooltipInvalidPositionError(position: string): Error {\n return Error(`Tooltip position \"${position}\" is invalid.`);\n}\n\n/** Injection token that determines the scroll handling while a tooltip is visible. */\nexport const MAT_TOOLTIP_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\n 'atlas_navbar--tooltip-scroll-strategy',\n);\n\n/** @docs-private */\nexport function MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy {\n return () => overlay.scrollStrategies.reposition({ scrollThrottle: SCROLL_THROTTLE_MS });\n}\n\n/** @docs-private */\nexport const MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: MAT_TOOLTIP_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY,\n};\n\n/** Default `atlasTooltip` options that can be overridden. */\nexport interface MatTooltipDefaultOptions {\n showDelay: number;\n hideDelay: number;\n touchendHideDelay: number;\n touchGestures?: TooltipTouchGestures;\n position?: TooltipPosition;\n}\n\n/** Injection token to be used to override the default options for `atlasTooltip`. */\nexport const MAT_TOOLTIP_DEFAULT_OPTIONS = new InjectionToken(\n 'atlas_navbar--tooltip-default-options',\n {\n providedIn: 'root',\n factory: MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY,\n },\n);\n\n/** @docs-private */\nexport function MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY(): MatTooltipDefaultOptions {\n return {\n showDelay: 0,\n hideDelay: 0,\n touchendHideDelay: 1500,\n };\n}\n\n/**\n * Directive that attaches a material design tooltip to the host element. Animates the showing and\n * hiding of a tooltip provided position (defaults to below the element).\n *\n * https://material.io/design/components/tooltips.html\n */\n@Directive({\n selector: '[atlasTooltip]',\n exportAs: 'atlasTooltip',\n})\nexport class MatTooltipDirective implements OnDestroy, OnInit {\n _overlayRef: OverlayRef | null;\n _tooltipInstance: TooltipComponent | null;\n\n private _portal: ComponentPortal;\n private _position: TooltipPosition = 'below';\n private _disabled = false;\n private _tooltipClass: string | string[] | Set | { [key: string]: any };\n private _scrollStrategy: () => ScrollStrategy;\n\n /** Allows the user to define the position of the tooltip relative to the parent element */\n @Input('atlasTooltipPosition')\n get position(): TooltipPosition {\n return this._position;\n }\n set position(value: TooltipPosition) {\n if (value !== this._position) {\n this._position = value;\n\n if (this._overlayRef) {\n this._updatePosition();\n\n if (this._tooltipInstance) {\n this._tooltipInstance.show(0);\n }\n\n this._overlayRef.updatePosition();\n }\n }\n }\n\n /** Disables the display of the tooltip. */\n @Input('atlasTooltipDisabled')\n get disabled(): boolean {\n return this._disabled;\n }\n // tslint:disable-next-line: typedef\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n\n // If tooltip is disabled, hide immediately.\n if (this._disabled) {\n this.hide(0);\n }\n }\n\n /** The default delay in ms before showing the tooltip after show is called */\n // tslint:disable-next-line:no-input-rename\n @Input('atlasTooltipShowDelay') showDelay = this._defaultOptions.showDelay;\n\n /** The default delay in ms before hiding the tooltip after hide is called */\n //tslint:disable-next-line:no-input-rename\n @Input('atlasTooltipHideDelay') hideDelay = this._defaultOptions.hideDelay;\n\n /**\n * How touch gestures should be handled by the tooltip. On touch devices the tooltip directive\n * uses a long press gesture to show and hide, however it can conflict with the native browser\n * gestures. To work around the conflict, Angular Material disables native gestures on the\n * trigger, but that might not be desirable on particular elements (e.g. inputs and draggable\n * elements). The different values for this option configure the touch event handling as follows:\n * - `auto` - Enables touch gestures for all elements, but tries to avoid conflicts with native\n * browser gestures on particular elements. In particular, it allows text selection on inputs\n * and textareas, and preserves the native browser dragging on elements marked as `draggable`.\n * - `on` - Enables touch gestures for all elements and disables native\n * browser gestures with no exceptions.\n * - `off` - Disables touch gestures. Note that this will prevent the tooltip from\n * showing on touch devices.\n */\n //tslint:disable-next-line:no-input-rename\n @Input('atlasTooltipTouchGestures') touchGestures: TooltipTouchGestures = 'auto';\n\n /** The message to be displayed in the tooltip */\n @Input('atlasTooltip')\n get message(): string {\n return this._message;\n }\n set message(value: string) {\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this._message);\n\n // If the message is not a string (e.g. number), convert it to a string and trim it.\n this._message = value != null ? `${value}`.trim() : '';\n\n if (!this._message && this._isTooltipVisible()) {\n this.hide(0);\n } else {\n this._updateTooltipMessage();\n this._ngZone.runOutsideAngular(() => {\n // The `AriaDescriber` has some functionality that avoids adding a description if it's the\n // same as the `aria-label` of an element, however we can't know whether the tooltip trigger\n // has a data-bound `aria-label` or when it'll be set for the first time. We can avoid the\n // issue by deferring the description by a tick so Angular has time to set the `aria-label`.\n Promise.resolve().then(() => {\n this._ariaDescriber.describe(this._elementRef.nativeElement, this.message);\n });\n });\n }\n }\n private _message = '';\n\n /** Classes to be passed to the tooltip. Supports the same syntax as `ngClass`. */\n @Input('atlasTooltipClass')\n get tooltipClass(): string | string[] | Set | { [key: string]: any } {\n return this._tooltipClass;\n }\n set tooltipClass(value: string | string[] | Set | { [key: string]: any }) {\n this._tooltipClass = value;\n if (this._tooltipInstance) {\n this._setTooltipClass(this._tooltipClass);\n }\n }\n\n /** Manually-bound passive event listeners. */\n private _passiveListeners = new Map();\n\n /** Timer started at the last `touchstart` event. */\n private _touchstartTimeout = 0;\n\n /** Emits when the component is destroyed. */\n private readonly _destroyed = new Subject();\n\n constructor(\n private _overlay: Overlay,\n private _elementRef: ElementRef,\n private _scrollDispatcher: ScrollDispatcher,\n private _viewContainerRef: ViewContainerRef,\n private _ngZone: NgZone,\n private _platform: Platform,\n private _ariaDescriber: AriaDescriber,\n private _focusMonitor: FocusMonitor,\n @Inject(MAT_TOOLTIP_SCROLL_STRATEGY) scrollStrategy: any,\n @Optional() private _dir: Directionality,\n @Optional()\n @Inject(MAT_TOOLTIP_DEFAULT_OPTIONS)\n private _defaultOptions: MatTooltipDefaultOptions,\n /**\n * @deprecated _hammerLoader parameter to be removed.\n * @breaking-change 9.0.0\n */\n // Note that we need to give Angular something to inject here so it doesn't throw.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n @Inject(ElementRef) _hammerLoader?: any,\n ) {\n this._scrollStrategy = scrollStrategy;\n\n if (_defaultOptions) {\n if (_defaultOptions.position) {\n this.position = _defaultOptions.position;\n }\n\n if (_defaultOptions.touchGestures) {\n this.touchGestures = _defaultOptions.touchGestures;\n }\n }\n\n _focusMonitor\n .monitor(_elementRef)\n .pipe(takeUntil(this._destroyed))\n .subscribe((origin) => {\n // Note that the focus monitor runs outside the Angular zone.\n if (!origin) {\n _ngZone.run(() => this.hide(0));\n } else if (origin === 'keyboard') {\n _ngZone.run(() => this.show());\n }\n });\n\n _ngZone.runOutsideAngular(() => {\n _elementRef.nativeElement.addEventListener('keydown', this._handleKeydown);\n });\n }\n\n /**\n * Setup styling-specific things\n */\n ngOnInit(): void {\n // This needs to happen in `ngOnInit` so the initial values for all inputs have been set.\n this._setupPointerEvents();\n }\n\n /**\n * Dispose the tooltip when destroyed.\n */\n ngOnDestroy(): void {\n const nativeElement = this._elementRef.nativeElement;\n\n window.clearTimeout(this._touchstartTimeout);\n\n if (this._overlayRef) {\n this._overlayRef.dispose();\n this._tooltipInstance = null;\n }\n\n // Clean up the event listeners set in the constructor\n nativeElement.removeEventListener('keydown', this._handleKeydown);\n this._passiveListeners.forEach((listener, event) => {\n nativeElement.removeEventListener(event, listener, passiveListenerOptions);\n });\n this._passiveListeners.clear();\n\n this._destroyed.next();\n this._destroyed.complete();\n\n this._ariaDescriber.removeDescription(nativeElement, this.message);\n this._focusMonitor.stopMonitoring(nativeElement);\n }\n\n /** Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input */\n show(delay: number = this.showDelay): void {\n if (\n this.disabled ||\n !this.message ||\n (this._isTooltipVisible() &&\n !!this._tooltipInstance &&\n !this._tooltipInstance._showTimeoutId &&\n !this._tooltipInstance._hideTimeoutId)\n ) {\n return;\n }\n\n const overlayRef = this._createOverlay();\n\n this._detach();\n this._portal = this._portal || new ComponentPortal(TooltipComponent, this._viewContainerRef);\n this._tooltipInstance = overlayRef.attach(this._portal).instance;\n this._tooltipInstance\n .afterHidden()\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this._detach());\n this._setTooltipClass(this._tooltipClass);\n this._updateTooltipMessage();\n this._tooltipInstance.show(delay);\n }\n\n /** Hides the tooltip after the delay in ms, defaults to tooltip-delay-hide or 0ms if no input */\n hide(delay: number = this.hideDelay): void {\n if (this._tooltipInstance) {\n this._tooltipInstance.hide(delay);\n }\n }\n\n /** Shows/hides the tooltip */\n toggle(): void {\n this._isTooltipVisible() ? this.hide() : this.show();\n }\n\n /** Returns true if the tooltip is currently visible to the user */\n _isTooltipVisible(): boolean {\n return !!this._tooltipInstance && this._tooltipInstance.isVisible();\n }\n\n /** Handles the keydown events on the host element. */\n private _handleKeydown = (e: KeyboardEvent) => {\n if (this._isTooltipVisible() && e.keyCode === ESCAPE && !hasModifierKey(e)) {\n e.preventDefault();\n e.stopPropagation();\n this._ngZone.run(() => this.hide(0));\n }\n };\n\n /** Create the overlay config and position strategy */\n private _createOverlay(): OverlayRef {\n if (this._overlayRef) {\n return this._overlayRef;\n }\n\n const scrollableAncestors = this._scrollDispatcher.getAncestorScrollContainers(this._elementRef);\n\n // Create connected position strategy that listens for scroll events to reposition.\n const strategy = this._overlay\n .position()\n .flexibleConnectedTo(this._elementRef)\n .withTransformOriginOn('.atlas_navbar--tooltip')\n .withFlexibleDimensions(false)\n .withViewportMargin(8)\n .withScrollableContainers(scrollableAncestors);\n\n strategy.positionChanges.pipe(takeUntil(this._destroyed)).subscribe((change) => {\n if (this._tooltipInstance) {\n if (change.scrollableViewProperties.isOverlayClipped && this._tooltipInstance.isVisible()) {\n // After position changes occur and the overlay is clipped by\n // a parent scrollable then close the tooltip.\n this._ngZone.run(() => this.hide(0));\n }\n }\n });\n\n this._overlayRef = this._overlay.create({\n direction: this._dir,\n positionStrategy: strategy,\n panelClass: TOOLTIP_PANEL_CLASS,\n scrollStrategy: this._scrollStrategy(),\n });\n\n this._updatePosition();\n\n this._overlayRef\n .detachments()\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this._detach());\n\n return this._overlayRef;\n }\n\n /** Detaches the currently-attached tooltip. */\n private _detach(): void {\n if (this._overlayRef && this._overlayRef.hasAttached()) {\n this._overlayRef.detach();\n }\n\n this._tooltipInstance = null;\n }\n\n /** Updates the position of the current tooltip. */\n private _updatePosition(): void {\n if (!this._overlayRef) {\n return;\n }\n const position = this._overlayRef.getConfig().positionStrategy as FlexibleConnectedPositionStrategy;\n const origin = this._getOrigin();\n const overlay = this._getOverlayPosition();\n\n position.withPositions([\n { ...origin.main, ...overlay.main },\n { ...origin.fallback, ...overlay.fallback },\n ]);\n }\n\n /**\n * Returns the origin position and a fallback position based on the user's position preference.\n * The fallback position is the inverse of the origin (e.g. `'below' -> 'above'`).\n */\n _getOrigin(): { main: OriginConnectionPosition; fallback: OriginConnectionPosition } {\n const isLtr = !this._dir || this._dir.value === 'ltr';\n const position = this.position;\n let originPosition: OriginConnectionPosition;\n\n if (position === 'above' || position === 'below') {\n originPosition = { originX: 'center', originY: position === 'above' ? 'top' : 'bottom' };\n } else if (position === 'before' || (position === 'left' && isLtr) || (position === 'right' && !isLtr)) {\n originPosition = { originX: 'start', originY: 'center' };\n } else if (position === 'after' || (position === 'right' && isLtr) || (position === 'left' && !isLtr)) {\n originPosition = { originX: 'end', originY: 'center' };\n } else {\n throw getMatTooltipInvalidPositionError(position);\n }\n\n const { x, y } = this._invertPosition(originPosition.originX, originPosition.originY);\n\n return {\n main: originPosition,\n fallback: { originX: x, originY: y },\n };\n }\n\n /** Returns the overlay position and a fallback position based on the user's preference */\n _getOverlayPosition(): { main: OverlayConnectionPosition; fallback: OverlayConnectionPosition } {\n const isLtr = !this._dir || this._dir.value === 'ltr';\n const position = this.position;\n let overlayPosition: OverlayConnectionPosition;\n\n if (position === 'above') {\n overlayPosition = { overlayX: 'center', overlayY: 'bottom' };\n } else if (position === 'below') {\n overlayPosition = { overlayX: 'center', overlayY: 'top' };\n } else if (position === 'before' || (position === 'left' && isLtr) || (position === 'right' && !isLtr)) {\n overlayPosition = { overlayX: 'end', overlayY: 'center' };\n } else if (position === 'after' || (position === 'right' && isLtr) || (position === 'left' && !isLtr)) {\n overlayPosition = { overlayX: 'start', overlayY: 'center' };\n } else {\n throw getMatTooltipInvalidPositionError(position);\n }\n\n const { x, y } = this._invertPosition(overlayPosition.overlayX, overlayPosition.overlayY);\n\n return {\n main: overlayPosition,\n fallback: { overlayX: x, overlayY: y },\n };\n }\n\n /** Updates the tooltip message and repositions the overlay according to the new message length */\n private _updateTooltipMessage(): void {\n // Must wait for the message to be painted to the tooltip so that the overlay can properly\n // calculate the correct positioning based on the size of the text.\n if (this._tooltipInstance) {\n this._tooltipInstance.message = this.message;\n this._tooltipInstance._markForCheck();\n\n this._ngZone.onMicrotaskEmpty\n .asObservable()\n .pipe(take(1), takeUntil(this._destroyed))\n .subscribe(() => {\n if (this._tooltipInstance) {\n if (this._overlayRef) {\n this._overlayRef.updatePosition();\n }\n }\n });\n }\n }\n\n /** Updates the tooltip class */\n private _setTooltipClass(tooltipClass: string | string[] | Set | { [key: string]: any }): void {\n if (this._tooltipInstance) {\n this._tooltipInstance.tooltipClass = tooltipClass;\n this._tooltipInstance._markForCheck();\n }\n }\n\n /** Inverts an overlay position. */\n private _invertPosition(x: HorizontalConnectionPos, y: VerticalConnectionPos): any {\n if (this.position === 'above' || this.position === 'below') {\n if (y === 'top') {\n y = 'bottom';\n } else if (y === 'bottom') {\n y = 'top';\n }\n } else {\n if (x === 'end') {\n x = 'start';\n } else if (x === 'start') {\n x = 'end';\n }\n }\n\n return { x, y };\n }\n\n /** Binds the pointer events to the tooltip trigger. */\n private _setupPointerEvents(): void {\n // The mouse events shouldn't be bound on mobile devices, because they can prevent the\n // first tap from firing its click event or can cause the tooltip to open for clicks.\n if (!this._platform.IOS && !this._platform.ANDROID) {\n this._passiveListeners.set('mouseenter', () => this.show()).set('mouseleave', () => this.hide());\n } else if (this.touchGestures !== 'off') {\n this._disableNativeGesturesIfNecessary();\n const touchendListener = () => {\n window.clearTimeout(this._touchstartTimeout);\n this.hide(this._defaultOptions.touchendHideDelay);\n };\n\n this._passiveListeners\n .set('touchend', touchendListener)\n .set('touchcancel', touchendListener)\n .set('touchstart', () => {\n // Note that it's important that we don't `preventDefault` here,\n // because it can prevent click events from firing on the element.\n window.clearTimeout(this._touchstartTimeout);\n this._touchstartTimeout = window.setTimeout(() => this.show(), LONGPRESS_DELAY);\n });\n }\n\n this._passiveListeners.forEach((listener, event) => {\n this._elementRef.nativeElement.addEventListener(event, listener, passiveListenerOptions);\n });\n }\n\n /** Disables the native browser gestures, based on how the tooltip has been configured. */\n private _disableNativeGesturesIfNecessary(): void {\n const element = this._elementRef.nativeElement;\n const style = element.style;\n const gestures = this.touchGestures;\n\n if (gestures !== 'off') {\n // If gestures are set to `auto`, we don't disable text selection on inputs and\n // textareas, because it prevents the user from typing into them on iOS Safari.\n if (gestures === 'on' || (element.nodeName !== 'INPUT' && element.nodeName !== 'TEXTAREA')) {\n style.userSelect = style.webkitUserSelect = (style as any).MozUserSelect = 'none';\n }\n\n // If we have `auto` gestures and the element uses native HTML dragging,\n // we don't set `-webkit-user-drag` because it prevents the native behavior.\n if (gestures === 'on' || !element.draggable) {\n (style as any).webkitUserDrag = 'none';\n }\n\n style.touchAction = 'none';\n }\n }\n}\n\n/**\n * Internal component that wraps the tooltip's content.\n * @docs-private\n */\n@Component({\n selector: 'atlas-tooltip-component',\n templateUrl: 'tooltip.html',\n styleUrls: ['tooltip.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [matTooltipAnimations.tooltipState],\n})\nexport class TooltipComponent implements OnDestroy {\n @HostBinding('[style.zoom]') _zoom: number | null = null;\n @HostBinding('(body:click)') _bodyClickEvent;\n @HostBinding('aria-hidden') _ariaHidden = 'true';\n /** Message to display in the tooltip */\n message: string;\n\n /** Classes to be added to the tooltip. Supports the same syntax as `ngClass`. */\n tooltipClass: string | string[] | Set | { [key: string]: any };\n\n /** The timeout ID of any current timer set to show the tooltip */\n _showTimeoutId = 0;\n\n /** The timeout ID of any current timer set to hide the tooltip */\n _hideTimeoutId = 0;\n\n /** Property watched by the animation framework to show or hide the tooltip */\n _visibility: TooltipVisibility = 'initial';\n\n /** Whether interactions on the page should close the tooltip */\n private _closeOnInteraction = false;\n\n /** Subject for notifying that the tooltip has been hidden from the view */\n private readonly _onHide: Subject = new Subject();\n\n /** Stream that emits whether the user has a handset-sized display. */\n _isHandset: Observable = this._breakpointObserver.observe(Breakpoints.Handset);\n\n constructor(private _changeDetectorRef: ChangeDetectorRef, private _breakpointObserver: BreakpointObserver) {\n this._zoom = this._visibility === 'visible' ? 1 : null;\n this._bodyClickEvent = this._handleBodyInteraction();\n }\n\n /**\n * Shows the tooltip with an animation originating from the provided origin\n * @param delay Amount of milliseconds to the delay showing the tooltip.\n */\n show(delay: number): void {\n // Cancel the delayed hide if it is scheduled\n if (this._hideTimeoutId) {\n window.clearTimeout(this._hideTimeoutId);\n this._hideTimeoutId = null;\n }\n\n // Body interactions should cancel the tooltip if there is a delay in showing.\n this._closeOnInteraction = true;\n this._showTimeoutId = window.setTimeout(() => {\n this._visibility = 'visible';\n this._showTimeoutId = null;\n\n // Mark for check so if any parent component has set the\n // ChangeDetectionStrategy to OnPush it will be checked anyways\n this._markForCheck();\n }, delay);\n }\n\n /**\n * Begins the animation to hide the tooltip after the provided delay in ms.\n * @param delay Amount of milliseconds to delay showing the tooltip.\n */\n hide(delay: number): void {\n // Cancel the delayed show if it is scheduled\n if (this._showTimeoutId) {\n window.clearTimeout(this._showTimeoutId);\n this._showTimeoutId = null;\n }\n\n this._hideTimeoutId = window.setTimeout(() => {\n this._visibility = 'hidden';\n this._hideTimeoutId = null;\n\n // Mark for check so if any parent component has set the\n // ChangeDetectionStrategy to OnPush it will be checked anyways\n this._markForCheck();\n }, delay);\n }\n\n /** Returns an observable that notifies when the tooltip has been hidden from view. */\n afterHidden(): Observable {\n return this._onHide.asObservable();\n }\n\n /** Whether the tooltip is being displayed. */\n isVisible(): boolean {\n return this._visibility === 'visible';\n }\n\n ngOnDestroy(): void {\n this._onHide.complete();\n }\n\n _animationStart(): void {\n this._closeOnInteraction = false;\n }\n\n _animationDone(event: AnimationEvent): void {\n const toState = event.toState as TooltipVisibility;\n\n if (toState === 'hidden' && !this.isVisible()) {\n this._onHide.next();\n }\n\n if (toState === 'visible' || toState === 'hidden') {\n this._closeOnInteraction = true;\n }\n }\n\n /**\n * Interactions on the HTML body should close the tooltip immediately as defined in the\n * material design spec.\n * https://material.io/design/components/tooltips.html#behavior\n */\n _handleBodyInteraction(): void {\n if (this._closeOnInteraction) {\n this.hide(0);\n }\n }\n\n /**\n * Marks that the tooltip needs to be checked in the next change detection run.\n * Mainly used for rendering the initial text before positioning a tooltip, which\n * can be problematic in components with OnPush change detection.\n */\n _markForCheck(): void {\n this._changeDetectorRef.markForCheck();\n }\n}\n","\n {{message}}\n
\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Forked code, allows for usage within our Angular elements without\n * dependency on @angular/material\n */\n\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport {\n MatTooltipDirective as AtlasTooltipDirective,\n TooltipComponent as AtlasTooltipComponent,\n MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER as ATLAS_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER,\n} from './tooltip';\n\n@NgModule({\n imports: [A11yModule, CommonModule, OverlayModule],\n exports: [AtlasTooltipDirective, AtlasTooltipComponent],\n declarations: [AtlasTooltipDirective, AtlasTooltipComponent],\n providers: [ATLAS_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER],\n})\nexport class AtlasTooltipModule {}\n","{\n \"MENU_TOGGLE\": \"Menu\",\n \"DROPDOWN_MENU\": {\n \"SIGNED_IN_AS\": \"Signed in as\",\n \"IMPERSONATING_USER_AS\": \"as\",\n \"EMAIL_IS_VERIFIED\": \"Your email address is verified\",\n \"EMAIL_IS_UNVERIFIED\": \"Your email address is not verified\",\n \"SWITCH_USER\": \"Switch user\"\n },\n \"NOTIFICATIONS\": {\n \"TITLE\": \"Notifications\",\n \"LOAD_FAILURE\": \"Failed to load notifications.\",\n \"NO_NOTIFICATIONS\": \"You have no notifications.\",\n \"ACTIONS\": {\n \"SETTINGS\": \"Settings\",\n \"MARK_ALL_AS_READ\": \"Mark all as read\",\n \"MARK_AS_READ\": \"Mark as read\",\n \"MARK_AS_UNREAD\": \"Mark as unread\",\n \"TURN_OFF_NOTIFICATION\": \"Turn off notification\",\n \"TURN_ON_NOTIFICATION\": \"Turn on notification\",\n \"DISCARD_CHANGES\": \"Discard changes\",\n \"SAVE\": \"Save\",\n \"UNDO\": \"Undo\",\n \"DISMISS\": \"Dismiss\",\n \"CONFIGURE_SMB_SETTING\": \"Configure notification settings for this account.\"\n },\n \"EMPTY_NOTIFICATION_SETTING\": {\n \"TITLE\": \"No notification settings available\",\n \"TEXT\": \"Notifications are currently turned off. To start receiving notifications, contact your account representative.\"\n },\n \"UNSUBSCRIBE_TEXT\": \"You will no longer receive this notification.\",\n \"SUBSCRIBE_TEXT\": \"You will now receive this notification.\",\n \"SETTINGS\": {\n \"ALL_DISABLED\": \"All notifications have been disabled. Emails will not be received.\",\n \"NO_ACCESS\": \"You don't have access to any settings.\",\n \"LOAD_FAILURE\": \"Failed to load settings. Please try again.\",\n \"ACTIVITY_SETTINGS_DESCRIPTION\": \"These notifications are currently in beta, you can view and update your activity notification settings here \",\n \"BETA\": \"BETA\",\n \"DESCRIPTION\": {\n \"SOME_ON\": \"Some on\",\n \"ALL_ON\": \"All on\",\n \"ALL_OFF\": \"All off\",\n \"ALL_EVENTS\": \"All events\",\n \"ALL_EVENTS_TOOLTIP\": \"Notify me for all events of this type.\",\n \"ONLY_MY_EVENTS\": \"Only my events\",\n \"ONLY_MY_EVENTS_TOOLTIP\": \"Notify me only when an event directly involves me.\"\n },\n \"MEDIUMS\": {\n \"APP\": \"App\",\n \"EMAIL\": \"Email\",\n \"UNKNOWN\": \"Unknown\"\n },\n \"UNAVAILABLE\": \"notifications are not available\",\n \"SNACKBAR\": {\n \"UPDATED\": \"Your notification settings were updated.\",\n \"FAILURE\": \"An error occurred while trying to load your notification settings, please try again.\",\n \"SAVE_FAILURE\": \"An error occurred trying to save your notification settings, please retry.\"\n }\n }\n },\n \"VBC_NOTIFICATIONS\": {\n \"GLOBAL_SETTINGS\": \"Global settings\",\n \"REPORTS\": \"Reports\",\n \"GLOBALLY_DISABLED\": \"has been globally disabled\",\n \"MEDIUMS\": {\n \"IN_APP\": \"In-app\",\n \"INSTANT_EMAIL\": \"Instant email\",\n \"DIGEST_EMAIL\": \"Digest email\",\n \"WEEKLY_EMAIL\": \"Weekly email\",\n \"MONTHLY_EMAIL\": \"Monthly email\"\n }\n },\n \"COMMON\": {\n \"POWERED_BY\": \"Powered by\",\n \"ERROR_TRY_AGAIN\": \"An error occurred. Please try again.\"\n },\n \"USER_LANGUAGE_MODAL\": {\n \"PROMPT_WITH_BROWSER_LANG\": \"We noticed your browser language is set to {{browserLang}} , but your user profile language is set to {{userLang}} .\",\n \"PROMPT_WITHOUT_BROWSER_LANG\": \"Your user profile language is currently set to {{userLang}} .\",\n \"WANT_TO_SWITCH\": \"Would you like to confirm your language preferences? We won't ask again for this device.\",\n \"USE_BROWSER_LANGUAGE\": \"Switch to {{browserLang}}\",\n \"CONFIRM_USER_LANGUAGE\": \"Use {{userLang}}\",\n \"SEE_ALL_LANGUAGE_OPTIONS\": \"Select another language\"\n },\n \"LANGUAGE\": {\n \"en\": \"English\",\n \"fr\": \"French\",\n \"fr-ca\": \"French (Canada)\",\n \"cs\": \"Czech\",\n \"de\": \"German\",\n \"nl\": \"Dutch\",\n \"es-419\": \"Spanish (Latin America)\",\n \"pt\": \"Portuguese (Brazil)\",\n \"ru\": \"Russian\",\n \"ja\": \"Japanese\",\n \"it\": \"Italian\",\n \"af\": \"Afrikaans\"\n },\n \"SWITCH_LANGUAGE_MODAL\": {\n \"SWITCH_LANGUAGE\": \"Switch language\",\n \"SEARCH_LANGUAGES\": \"Search languages\",\n \"TO_SELECT\": \"to select\",\n \"TO_NAVIGATE\": \"to navigate\",\n \"TO_CLOSE\": \"to close\",\n \"HELP_US_TRANSLATE\": \"Is your preferred language missing from this list? Are the translations incomplete? Help us translate using the Weblate translation portal!\",\n \"VISIT_TRANSLATION_PORTAL\": \"Visit Weblate\",\n \"IMPERSONATION_WARNING\": \"You are currently impersonating a user. Changing the language will affect your browser, but not change the user's language.\"\n },\n \"EMAIL_VERIFICATION\": {\n \"TITLE\": \"Verify your email address\",\n \"TO_IMPROVE_SECURITY\": \"To improve security, you'll need to verify your email address to continue using your account.\",\n \"TO_IMPROVE_SECURITY_WITH_DEADLINE\": \"To improve security, you'll need to verify your email address before {{ verificationDeadline }} to continue using your account.\",\n \"CLICK_BELOW\": \"Click below to send a verification email to the following email\",\n \"SEND_VERIFICATION_EMAIL\": \"Send verification email\",\n \"REMIND_ME_LATER\": \"Remind me later\",\n \"EMAIL_SENT\": \"Email sent\",\n \"CHECK_YOUR_INBOX\": \"Check your inbox for an email like this\",\n \"CONTACT_SUPPORT\": \"Need help? Contact your support team\"\n },\n \"USER_SWITCHER_MODAL\": {\n \"CANCEL\": \"Cancel\"\n }\n}\n","import { ErrorFactory, isBrowserExtension, isMobileCordova, isReactNative, FirebaseError, querystring, getModularInstance, base64Decode, getUA, isIE, createSubscribe, deepEqual, querystringDecode, extractQuerystring, isEmpty, getExperimentalSetting, getDefaultEmulatorHost } from '@firebase/util';\nimport { SDK_VERSION, _getProvider, _registerComponent, registerVersion, getApp } from '@firebase/app';\nimport { Logger, LogLevel } from '@firebase/logger';\nimport { __rest } from 'tslib';\nimport { Component } from '@firebase/component';\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * An enum of factors that may be used for multifactor authentication.\r\n *\r\n * @public\r\n */\nconst FactorId = {\n /** Phone as second factor */\n PHONE: 'phone',\n TOTP: 'totp'\n};\n/**\r\n * Enumeration of supported providers.\r\n *\r\n * @public\r\n */\nconst ProviderId = {\n /** Facebook provider ID */\n FACEBOOK: 'facebook.com',\n /** GitHub provider ID */\n GITHUB: 'github.com',\n /** Google provider ID */\n GOOGLE: 'google.com',\n /** Password provider */\n PASSWORD: 'password',\n /** Phone provider */\n PHONE: 'phone',\n /** Twitter provider ID */\n TWITTER: 'twitter.com'\n};\n/**\r\n * Enumeration of supported sign-in methods.\r\n *\r\n * @public\r\n */\nconst SignInMethod = {\n /** Email link sign in method */\n EMAIL_LINK: 'emailLink',\n /** Email/password sign in method */\n EMAIL_PASSWORD: 'password',\n /** Facebook sign in method */\n FACEBOOK: 'facebook.com',\n /** GitHub sign in method */\n GITHUB: 'github.com',\n /** Google sign in method */\n GOOGLE: 'google.com',\n /** Phone sign in method */\n PHONE: 'phone',\n /** Twitter sign in method */\n TWITTER: 'twitter.com'\n};\n/**\r\n * Enumeration of supported operation types.\r\n *\r\n * @public\r\n */\nconst OperationType = {\n /** Operation involving linking an additional provider to an already signed-in user. */\n LINK: 'link',\n /** Operation involving using a provider to reauthenticate an already signed-in user. */\n REAUTHENTICATE: 'reauthenticate',\n /** Operation involving signing in a user. */\n SIGN_IN: 'signIn'\n};\n/**\r\n * An enumeration of the possible email action types.\r\n *\r\n * @public\r\n */\nconst ActionCodeOperation = {\n /** The email link sign-in action. */\n EMAIL_SIGNIN: 'EMAIL_SIGNIN',\n /** The password reset action. */\n PASSWORD_RESET: 'PASSWORD_RESET',\n /** The email revocation action. */\n RECOVER_EMAIL: 'RECOVER_EMAIL',\n /** The revert second factor addition email action. */\n REVERT_SECOND_FACTOR_ADDITION: 'REVERT_SECOND_FACTOR_ADDITION',\n /** The revert second factor addition email action. */\n VERIFY_AND_CHANGE_EMAIL: 'VERIFY_AND_CHANGE_EMAIL',\n /** The email verification action. */\n VERIFY_EMAIL: 'VERIFY_EMAIL'\n};\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _debugErrorMap() {\n return {\n [\"admin-restricted-operation\" /* AuthErrorCode.ADMIN_ONLY_OPERATION */]: 'This operation is restricted to administrators only.',\n [\"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */]: '',\n [\"app-not-authorized\" /* AuthErrorCode.APP_NOT_AUTHORIZED */]: \"This app, identified by the domain where it's hosted, is not \" + 'authorized to use Firebase Authentication with the provided API key. ' + 'Review your key configuration in the Google API console.',\n [\"app-not-installed\" /* AuthErrorCode.APP_NOT_INSTALLED */]: 'The requested mobile application corresponding to the identifier (' + 'Android package name or iOS bundle ID) provided is not installed on ' + 'this device.',\n [\"captcha-check-failed\" /* AuthErrorCode.CAPTCHA_CHECK_FAILED */]: 'The reCAPTCHA response token provided is either invalid, expired, ' + 'already used or the domain associated with it does not match the list ' + 'of whitelisted domains.',\n [\"code-expired\" /* AuthErrorCode.CODE_EXPIRED */]: 'The SMS code has expired. Please re-send the verification code to try ' + 'again.',\n [\"cordova-not-ready\" /* AuthErrorCode.CORDOVA_NOT_READY */]: 'Cordova framework is not ready.',\n [\"cors-unsupported\" /* AuthErrorCode.CORS_UNSUPPORTED */]: 'This browser is not supported.',\n [\"credential-already-in-use\" /* AuthErrorCode.CREDENTIAL_ALREADY_IN_USE */]: 'This credential is already associated with a different user account.',\n [\"custom-token-mismatch\" /* AuthErrorCode.CREDENTIAL_MISMATCH */]: 'The custom token corresponds to a different audience.',\n [\"requires-recent-login\" /* AuthErrorCode.CREDENTIAL_TOO_OLD_LOGIN_AGAIN */]: 'This operation is sensitive and requires recent authentication. Log in ' + 'again before retrying this request.',\n [\"dependent-sdk-initialized-before-auth\" /* AuthErrorCode.DEPENDENT_SDK_INIT_BEFORE_AUTH */]: 'Another Firebase SDK was initialized and is trying to use Auth before Auth is ' + 'initialized. Please be sure to call `initializeAuth` or `getAuth` before ' + 'starting any other Firebase SDK.',\n [\"dynamic-link-not-activated\" /* AuthErrorCode.DYNAMIC_LINK_NOT_ACTIVATED */]: 'Please activate Dynamic Links in the Firebase Console and agree to the terms and ' + 'conditions.',\n [\"email-change-needs-verification\" /* AuthErrorCode.EMAIL_CHANGE_NEEDS_VERIFICATION */]: 'Multi-factor users must always have a verified email.',\n [\"email-already-in-use\" /* AuthErrorCode.EMAIL_EXISTS */]: 'The email address is already in use by another account.',\n [\"emulator-config-failed\" /* AuthErrorCode.EMULATOR_CONFIG_FAILED */]: 'Auth instance has already been used to make a network call. Auth can ' + 'no longer be configured to use the emulator. Try calling ' + '\"connectAuthEmulator()\" sooner.',\n [\"expired-action-code\" /* AuthErrorCode.EXPIRED_OOB_CODE */]: 'The action code has expired.',\n [\"cancelled-popup-request\" /* AuthErrorCode.EXPIRED_POPUP_REQUEST */]: 'This operation has been cancelled due to another conflicting popup being opened.',\n [\"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */]: 'An internal AuthError has occurred.',\n [\"invalid-app-credential\" /* AuthErrorCode.INVALID_APP_CREDENTIAL */]: 'The phone verification request contains an invalid application verifier.' + ' The reCAPTCHA token response is either invalid or expired.',\n [\"invalid-app-id\" /* AuthErrorCode.INVALID_APP_ID */]: 'The mobile app identifier is not registed for the current project.',\n [\"invalid-user-token\" /* AuthErrorCode.INVALID_AUTH */]: \"This user's credential isn't valid for this project. This can happen \" + \"if the user's token has been tampered with, or if the user isn't for \" + 'the project associated with this API key.',\n [\"invalid-auth-event\" /* AuthErrorCode.INVALID_AUTH_EVENT */]: 'An internal AuthError has occurred.',\n [\"invalid-verification-code\" /* AuthErrorCode.INVALID_CODE */]: 'The SMS verification code used to create the phone auth credential is ' + 'invalid. Please resend the verification code sms and be sure to use the ' + 'verification code provided by the user.',\n [\"invalid-continue-uri\" /* AuthErrorCode.INVALID_CONTINUE_URI */]: 'The continue URL provided in the request is invalid.',\n [\"invalid-cordova-configuration\" /* AuthErrorCode.INVALID_CORDOVA_CONFIGURATION */]: 'The following Cordova plugins must be installed to enable OAuth sign-in: ' + 'cordova-plugin-buildinfo, cordova-universal-links-plugin, ' + 'cordova-plugin-browsertab, cordova-plugin-inappbrowser and ' + 'cordova-plugin-customurlscheme.',\n [\"invalid-custom-token\" /* AuthErrorCode.INVALID_CUSTOM_TOKEN */]: 'The custom token format is incorrect. Please check the documentation.',\n [\"invalid-dynamic-link-domain\" /* AuthErrorCode.INVALID_DYNAMIC_LINK_DOMAIN */]: 'The provided dynamic link domain is not configured or authorized for the current project.',\n [\"invalid-email\" /* AuthErrorCode.INVALID_EMAIL */]: 'The email address is badly formatted.',\n [\"invalid-emulator-scheme\" /* AuthErrorCode.INVALID_EMULATOR_SCHEME */]: 'Emulator URL must start with a valid scheme (http:// or https://).',\n [\"invalid-api-key\" /* AuthErrorCode.INVALID_API_KEY */]: 'Your API key is invalid, please check you have copied it correctly.',\n [\"invalid-cert-hash\" /* AuthErrorCode.INVALID_CERT_HASH */]: 'The SHA-1 certificate hash provided is invalid.',\n [\"invalid-credential\" /* AuthErrorCode.INVALID_CREDENTIAL */]: 'The supplied auth credential is incorrect, malformed or has expired.',\n [\"invalid-message-payload\" /* AuthErrorCode.INVALID_MESSAGE_PAYLOAD */]: 'The email template corresponding to this action contains invalid characters in its message. ' + 'Please fix by going to the Auth email templates section in the Firebase Console.',\n [\"invalid-multi-factor-session\" /* AuthErrorCode.INVALID_MFA_SESSION */]: 'The request does not contain a valid proof of first factor successful sign-in.',\n [\"invalid-oauth-provider\" /* AuthErrorCode.INVALID_OAUTH_PROVIDER */]: 'EmailAuthProvider is not supported for this operation. This operation ' + 'only supports OAuth providers.',\n [\"invalid-oauth-client-id\" /* AuthErrorCode.INVALID_OAUTH_CLIENT_ID */]: 'The OAuth client ID provided is either invalid or does not match the ' + 'specified API key.',\n [\"unauthorized-domain\" /* AuthErrorCode.INVALID_ORIGIN */]: 'This domain is not authorized for OAuth operations for your Firebase ' + 'project. Edit the list of authorized domains from the Firebase console.',\n [\"invalid-action-code\" /* AuthErrorCode.INVALID_OOB_CODE */]: 'The action code is invalid. This can happen if the code is malformed, ' + 'expired, or has already been used.',\n [\"wrong-password\" /* AuthErrorCode.INVALID_PASSWORD */]: 'The password is invalid or the user does not have a password.',\n [\"invalid-persistence-type\" /* AuthErrorCode.INVALID_PERSISTENCE */]: 'The specified persistence type is invalid. It can only be local, session or none.',\n [\"invalid-phone-number\" /* AuthErrorCode.INVALID_PHONE_NUMBER */]: 'The format of the phone number provided is incorrect. Please enter the ' + 'phone number in a format that can be parsed into E.164 format. E.164 ' + 'phone numbers are written in the format [+][country code][subscriber ' + 'number including area code].',\n [\"invalid-provider-id\" /* AuthErrorCode.INVALID_PROVIDER_ID */]: 'The specified provider ID is invalid.',\n [\"invalid-recipient-email\" /* AuthErrorCode.INVALID_RECIPIENT_EMAIL */]: 'The email corresponding to this action failed to send as the provided ' + 'recipient email address is invalid.',\n [\"invalid-sender\" /* AuthErrorCode.INVALID_SENDER */]: 'The email template corresponding to this action contains an invalid sender email or name. ' + 'Please fix by going to the Auth email templates section in the Firebase Console.',\n [\"invalid-verification-id\" /* AuthErrorCode.INVALID_SESSION_INFO */]: 'The verification ID used to create the phone auth credential is invalid.',\n [\"invalid-tenant-id\" /* AuthErrorCode.INVALID_TENANT_ID */]: \"The Auth instance's tenant ID is invalid.\",\n [\"login-blocked\" /* AuthErrorCode.LOGIN_BLOCKED */]: 'Login blocked by user-provided method: {$originalMessage}',\n [\"missing-android-pkg-name\" /* AuthErrorCode.MISSING_ANDROID_PACKAGE_NAME */]: 'An Android Package Name must be provided if the Android App is required to be installed.',\n [\"auth-domain-config-required\" /* AuthErrorCode.MISSING_AUTH_DOMAIN */]: 'Be sure to include authDomain when calling firebase.initializeApp(), ' + 'by following the instructions in the Firebase console.',\n [\"missing-app-credential\" /* AuthErrorCode.MISSING_APP_CREDENTIAL */]: 'The phone verification request is missing an application verifier ' + 'assertion. A reCAPTCHA response token needs to be provided.',\n [\"missing-verification-code\" /* AuthErrorCode.MISSING_CODE */]: 'The phone auth credential was created with an empty SMS verification code.',\n [\"missing-continue-uri\" /* AuthErrorCode.MISSING_CONTINUE_URI */]: 'A continue URL must be provided in the request.',\n [\"missing-iframe-start\" /* AuthErrorCode.MISSING_IFRAME_START */]: 'An internal AuthError has occurred.',\n [\"missing-ios-bundle-id\" /* AuthErrorCode.MISSING_IOS_BUNDLE_ID */]: 'An iOS Bundle ID must be provided if an App Store ID is provided.',\n [\"missing-or-invalid-nonce\" /* AuthErrorCode.MISSING_OR_INVALID_NONCE */]: 'The request does not contain a valid nonce. This can occur if the ' + 'SHA-256 hash of the provided raw nonce does not match the hashed nonce ' + 'in the ID token payload.',\n [\"missing-password\" /* AuthErrorCode.MISSING_PASSWORD */]: 'A non-empty password must be provided',\n [\"missing-multi-factor-info\" /* AuthErrorCode.MISSING_MFA_INFO */]: 'No second factor identifier is provided.',\n [\"missing-multi-factor-session\" /* AuthErrorCode.MISSING_MFA_SESSION */]: 'The request is missing proof of first factor successful sign-in.',\n [\"missing-phone-number\" /* AuthErrorCode.MISSING_PHONE_NUMBER */]: 'To send verification codes, provide a phone number for the recipient.',\n [\"missing-verification-id\" /* AuthErrorCode.MISSING_SESSION_INFO */]: 'The phone auth credential was created with an empty verification ID.',\n [\"app-deleted\" /* AuthErrorCode.MODULE_DESTROYED */]: 'This instance of FirebaseApp has been deleted.',\n [\"multi-factor-info-not-found\" /* AuthErrorCode.MFA_INFO_NOT_FOUND */]: 'The user does not have a second factor matching the identifier provided.',\n [\"multi-factor-auth-required\" /* AuthErrorCode.MFA_REQUIRED */]: 'Proof of ownership of a second factor is required to complete sign-in.',\n [\"account-exists-with-different-credential\" /* AuthErrorCode.NEED_CONFIRMATION */]: 'An account already exists with the same email address but different ' + 'sign-in credentials. Sign in using a provider associated with this ' + 'email address.',\n [\"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */]: 'A network AuthError (such as timeout, interrupted connection or unreachable host) has occurred.',\n [\"no-auth-event\" /* AuthErrorCode.NO_AUTH_EVENT */]: 'An internal AuthError has occurred.',\n [\"no-such-provider\" /* AuthErrorCode.NO_SUCH_PROVIDER */]: 'User was not linked to an account with the given provider.',\n [\"null-user\" /* AuthErrorCode.NULL_USER */]: 'A null user object was provided as the argument for an operation which ' + 'requires a non-null user object.',\n [\"operation-not-allowed\" /* AuthErrorCode.OPERATION_NOT_ALLOWED */]: 'The given sign-in provider is disabled for this Firebase project. ' + 'Enable it in the Firebase console, under the sign-in method tab of the ' + 'Auth section.',\n [\"operation-not-supported-in-this-environment\" /* AuthErrorCode.OPERATION_NOT_SUPPORTED */]: 'This operation is not supported in the environment this application is ' + 'running on. \"location.protocol\" must be http, https or chrome-extension' + ' and web storage must be enabled.',\n [\"popup-blocked\" /* AuthErrorCode.POPUP_BLOCKED */]: 'Unable to establish a connection with the popup. It may have been blocked by the browser.',\n [\"popup-closed-by-user\" /* AuthErrorCode.POPUP_CLOSED_BY_USER */]: 'The popup has been closed by the user before finalizing the operation.',\n [\"provider-already-linked\" /* AuthErrorCode.PROVIDER_ALREADY_LINKED */]: 'User can only be linked to one identity for the given provider.',\n [\"quota-exceeded\" /* AuthErrorCode.QUOTA_EXCEEDED */]: \"The project's quota for this operation has been exceeded.\",\n [\"redirect-cancelled-by-user\" /* AuthErrorCode.REDIRECT_CANCELLED_BY_USER */]: 'The redirect operation has been cancelled by the user before finalizing.',\n [\"redirect-operation-pending\" /* AuthErrorCode.REDIRECT_OPERATION_PENDING */]: 'A redirect sign-in operation is already pending.',\n [\"rejected-credential\" /* AuthErrorCode.REJECTED_CREDENTIAL */]: 'The request contains malformed or mismatching credentials.',\n [\"second-factor-already-in-use\" /* AuthErrorCode.SECOND_FACTOR_ALREADY_ENROLLED */]: 'The second factor is already enrolled on this account.',\n [\"maximum-second-factor-count-exceeded\" /* AuthErrorCode.SECOND_FACTOR_LIMIT_EXCEEDED */]: 'The maximum allowed number of second factors on a user has been exceeded.',\n [\"tenant-id-mismatch\" /* AuthErrorCode.TENANT_ID_MISMATCH */]: \"The provided tenant ID does not match the Auth instance's tenant ID\",\n [\"timeout\" /* AuthErrorCode.TIMEOUT */]: 'The operation has timed out.',\n [\"user-token-expired\" /* AuthErrorCode.TOKEN_EXPIRED */]: \"The user's credential is no longer valid. The user must sign in again.\",\n [\"too-many-requests\" /* AuthErrorCode.TOO_MANY_ATTEMPTS_TRY_LATER */]: 'We have blocked all requests from this device due to unusual activity. ' + 'Try again later.',\n [\"unauthorized-continue-uri\" /* AuthErrorCode.UNAUTHORIZED_DOMAIN */]: 'The domain of the continue URL is not whitelisted. Please whitelist ' + 'the domain in the Firebase console.',\n [\"unsupported-first-factor\" /* AuthErrorCode.UNSUPPORTED_FIRST_FACTOR */]: 'Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor.',\n [\"unsupported-persistence-type\" /* AuthErrorCode.UNSUPPORTED_PERSISTENCE */]: 'The current environment does not support the specified persistence type.',\n [\"unsupported-tenant-operation\" /* AuthErrorCode.UNSUPPORTED_TENANT_OPERATION */]: 'This operation is not supported in a multi-tenant context.',\n [\"unverified-email\" /* AuthErrorCode.UNVERIFIED_EMAIL */]: 'The operation requires a verified email.',\n [\"user-cancelled\" /* AuthErrorCode.USER_CANCELLED */]: 'The user did not grant your application the permissions it requested.',\n [\"user-not-found\" /* AuthErrorCode.USER_DELETED */]: 'There is no user record corresponding to this identifier. The user may ' + 'have been deleted.',\n [\"user-disabled\" /* AuthErrorCode.USER_DISABLED */]: 'The user account has been disabled by an administrator.',\n [\"user-mismatch\" /* AuthErrorCode.USER_MISMATCH */]: 'The supplied credentials do not correspond to the previously signed in user.',\n [\"user-signed-out\" /* AuthErrorCode.USER_SIGNED_OUT */]: '',\n [\"weak-password\" /* AuthErrorCode.WEAK_PASSWORD */]: 'The password must be 6 characters long or more.',\n [\"web-storage-unsupported\" /* AuthErrorCode.WEB_STORAGE_UNSUPPORTED */]: 'This browser is not supported or 3rd party cookies and data may be disabled.',\n [\"already-initialized\" /* AuthErrorCode.ALREADY_INITIALIZED */]: 'initializeAuth() has already been called with ' + 'different options. To avoid this error, call initializeAuth() with the ' + 'same options as when it was originally called, or call getAuth() to return the' + ' already initialized instance.',\n [\"missing-recaptcha-token\" /* AuthErrorCode.MISSING_RECAPTCHA_TOKEN */]: 'The reCAPTCHA token is missing when sending request to the backend.',\n [\"invalid-recaptcha-token\" /* AuthErrorCode.INVALID_RECAPTCHA_TOKEN */]: 'The reCAPTCHA token is invalid when sending request to the backend.',\n [\"invalid-recaptcha-action\" /* AuthErrorCode.INVALID_RECAPTCHA_ACTION */]: 'The reCAPTCHA action is invalid when sending request to the backend.',\n [\"recaptcha-not-enabled\" /* AuthErrorCode.RECAPTCHA_NOT_ENABLED */]: 'reCAPTCHA Enterprise integration is not enabled for this project.',\n [\"missing-client-type\" /* AuthErrorCode.MISSING_CLIENT_TYPE */]: 'The reCAPTCHA client type is missing when sending request to the backend.',\n [\"missing-recaptcha-version\" /* AuthErrorCode.MISSING_RECAPTCHA_VERSION */]: 'The reCAPTCHA version is missing when sending request to the backend.',\n [\"invalid-req-type\" /* AuthErrorCode.INVALID_REQ_TYPE */]: 'Invalid request parameters.',\n [\"invalid-recaptcha-version\" /* AuthErrorCode.INVALID_RECAPTCHA_VERSION */]: 'The reCAPTCHA version is invalid when sending request to the backend.',\n [\"unsupported-password-policy-schema-version\" /* AuthErrorCode.UNSUPPORTED_PASSWORD_POLICY_SCHEMA_VERSION */]: 'The password policy received from the backend uses a schema version that is not supported by this version of the Firebase SDK.',\n [\"password-does-not-meet-requirements\" /* AuthErrorCode.PASSWORD_DOES_NOT_MEET_REQUIREMENTS */]: 'The password does not meet the requirements.'\n };\n}\nfunction _prodErrorMap() {\n // We will include this one message in the prod error map since by the very\n // nature of this error, developers will never be able to see the message\n // using the debugErrorMap (which is installed during auth initialization).\n return {\n [\"dependent-sdk-initialized-before-auth\" /* AuthErrorCode.DEPENDENT_SDK_INIT_BEFORE_AUTH */]: 'Another Firebase SDK was initialized and is trying to use Auth before Auth is ' + 'initialized. Please be sure to call `initializeAuth` or `getAuth` before ' + 'starting any other Firebase SDK.'\n };\n}\n/**\r\n * A verbose error map with detailed descriptions for most error codes.\r\n *\r\n * See discussion at {@link AuthErrorMap}\r\n *\r\n * @public\r\n */\nconst debugErrorMap = _debugErrorMap;\n/**\r\n * A minimal error map with all verbose error messages stripped.\r\n *\r\n * See discussion at {@link AuthErrorMap}\r\n *\r\n * @public\r\n */\nconst prodErrorMap = _prodErrorMap;\nconst _DEFAULT_AUTH_ERROR_FACTORY = new ErrorFactory('auth', 'Firebase', _prodErrorMap());\n/**\r\n * A map of potential `Auth` error codes, for easier comparison with errors\r\n * thrown by the SDK.\r\n *\r\n * @remarks\r\n * Note that you can't tree-shake individual keys\r\n * in the map, so by using the map you might substantially increase your\r\n * bundle size.\r\n *\r\n * @public\r\n */\nconst AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY = {\n ADMIN_ONLY_OPERATION: 'auth/admin-restricted-operation',\n ARGUMENT_ERROR: 'auth/argument-error',\n APP_NOT_AUTHORIZED: 'auth/app-not-authorized',\n APP_NOT_INSTALLED: 'auth/app-not-installed',\n CAPTCHA_CHECK_FAILED: 'auth/captcha-check-failed',\n CODE_EXPIRED: 'auth/code-expired',\n CORDOVA_NOT_READY: 'auth/cordova-not-ready',\n CORS_UNSUPPORTED: 'auth/cors-unsupported',\n CREDENTIAL_ALREADY_IN_USE: 'auth/credential-already-in-use',\n CREDENTIAL_MISMATCH: 'auth/custom-token-mismatch',\n CREDENTIAL_TOO_OLD_LOGIN_AGAIN: 'auth/requires-recent-login',\n DEPENDENT_SDK_INIT_BEFORE_AUTH: 'auth/dependent-sdk-initialized-before-auth',\n DYNAMIC_LINK_NOT_ACTIVATED: 'auth/dynamic-link-not-activated',\n EMAIL_CHANGE_NEEDS_VERIFICATION: 'auth/email-change-needs-verification',\n EMAIL_EXISTS: 'auth/email-already-in-use',\n EMULATOR_CONFIG_FAILED: 'auth/emulator-config-failed',\n EXPIRED_OOB_CODE: 'auth/expired-action-code',\n EXPIRED_POPUP_REQUEST: 'auth/cancelled-popup-request',\n INTERNAL_ERROR: 'auth/internal-error',\n INVALID_API_KEY: 'auth/invalid-api-key',\n INVALID_APP_CREDENTIAL: 'auth/invalid-app-credential',\n INVALID_APP_ID: 'auth/invalid-app-id',\n INVALID_AUTH: 'auth/invalid-user-token',\n INVALID_AUTH_EVENT: 'auth/invalid-auth-event',\n INVALID_CERT_HASH: 'auth/invalid-cert-hash',\n INVALID_CODE: 'auth/invalid-verification-code',\n INVALID_CONTINUE_URI: 'auth/invalid-continue-uri',\n INVALID_CORDOVA_CONFIGURATION: 'auth/invalid-cordova-configuration',\n INVALID_CUSTOM_TOKEN: 'auth/invalid-custom-token',\n INVALID_DYNAMIC_LINK_DOMAIN: 'auth/invalid-dynamic-link-domain',\n INVALID_EMAIL: 'auth/invalid-email',\n INVALID_EMULATOR_SCHEME: 'auth/invalid-emulator-scheme',\n INVALID_IDP_RESPONSE: 'auth/invalid-credential',\n INVALID_LOGIN_CREDENTIALS: 'auth/invalid-credential',\n INVALID_MESSAGE_PAYLOAD: 'auth/invalid-message-payload',\n INVALID_MFA_SESSION: 'auth/invalid-multi-factor-session',\n INVALID_OAUTH_CLIENT_ID: 'auth/invalid-oauth-client-id',\n INVALID_OAUTH_PROVIDER: 'auth/invalid-oauth-provider',\n INVALID_OOB_CODE: 'auth/invalid-action-code',\n INVALID_ORIGIN: 'auth/unauthorized-domain',\n INVALID_PASSWORD: 'auth/wrong-password',\n INVALID_PERSISTENCE: 'auth/invalid-persistence-type',\n INVALID_PHONE_NUMBER: 'auth/invalid-phone-number',\n INVALID_PROVIDER_ID: 'auth/invalid-provider-id',\n INVALID_RECIPIENT_EMAIL: 'auth/invalid-recipient-email',\n INVALID_SENDER: 'auth/invalid-sender',\n INVALID_SESSION_INFO: 'auth/invalid-verification-id',\n INVALID_TENANT_ID: 'auth/invalid-tenant-id',\n MFA_INFO_NOT_FOUND: 'auth/multi-factor-info-not-found',\n MFA_REQUIRED: 'auth/multi-factor-auth-required',\n MISSING_ANDROID_PACKAGE_NAME: 'auth/missing-android-pkg-name',\n MISSING_APP_CREDENTIAL: 'auth/missing-app-credential',\n MISSING_AUTH_DOMAIN: 'auth/auth-domain-config-required',\n MISSING_CODE: 'auth/missing-verification-code',\n MISSING_CONTINUE_URI: 'auth/missing-continue-uri',\n MISSING_IFRAME_START: 'auth/missing-iframe-start',\n MISSING_IOS_BUNDLE_ID: 'auth/missing-ios-bundle-id',\n MISSING_OR_INVALID_NONCE: 'auth/missing-or-invalid-nonce',\n MISSING_MFA_INFO: 'auth/missing-multi-factor-info',\n MISSING_MFA_SESSION: 'auth/missing-multi-factor-session',\n MISSING_PHONE_NUMBER: 'auth/missing-phone-number',\n MISSING_SESSION_INFO: 'auth/missing-verification-id',\n MODULE_DESTROYED: 'auth/app-deleted',\n NEED_CONFIRMATION: 'auth/account-exists-with-different-credential',\n NETWORK_REQUEST_FAILED: 'auth/network-request-failed',\n NULL_USER: 'auth/null-user',\n NO_AUTH_EVENT: 'auth/no-auth-event',\n NO_SUCH_PROVIDER: 'auth/no-such-provider',\n OPERATION_NOT_ALLOWED: 'auth/operation-not-allowed',\n OPERATION_NOT_SUPPORTED: 'auth/operation-not-supported-in-this-environment',\n POPUP_BLOCKED: 'auth/popup-blocked',\n POPUP_CLOSED_BY_USER: 'auth/popup-closed-by-user',\n PROVIDER_ALREADY_LINKED: 'auth/provider-already-linked',\n QUOTA_EXCEEDED: 'auth/quota-exceeded',\n REDIRECT_CANCELLED_BY_USER: 'auth/redirect-cancelled-by-user',\n REDIRECT_OPERATION_PENDING: 'auth/redirect-operation-pending',\n REJECTED_CREDENTIAL: 'auth/rejected-credential',\n SECOND_FACTOR_ALREADY_ENROLLED: 'auth/second-factor-already-in-use',\n SECOND_FACTOR_LIMIT_EXCEEDED: 'auth/maximum-second-factor-count-exceeded',\n TENANT_ID_MISMATCH: 'auth/tenant-id-mismatch',\n TIMEOUT: 'auth/timeout',\n TOKEN_EXPIRED: 'auth/user-token-expired',\n TOO_MANY_ATTEMPTS_TRY_LATER: 'auth/too-many-requests',\n UNAUTHORIZED_DOMAIN: 'auth/unauthorized-continue-uri',\n UNSUPPORTED_FIRST_FACTOR: 'auth/unsupported-first-factor',\n UNSUPPORTED_PERSISTENCE: 'auth/unsupported-persistence-type',\n UNSUPPORTED_TENANT_OPERATION: 'auth/unsupported-tenant-operation',\n UNVERIFIED_EMAIL: 'auth/unverified-email',\n USER_CANCELLED: 'auth/user-cancelled',\n USER_DELETED: 'auth/user-not-found',\n USER_DISABLED: 'auth/user-disabled',\n USER_MISMATCH: 'auth/user-mismatch',\n USER_SIGNED_OUT: 'auth/user-signed-out',\n WEAK_PASSWORD: 'auth/weak-password',\n WEB_STORAGE_UNSUPPORTED: 'auth/web-storage-unsupported',\n ALREADY_INITIALIZED: 'auth/already-initialized',\n RECAPTCHA_NOT_ENABLED: 'auth/recaptcha-not-enabled',\n MISSING_RECAPTCHA_TOKEN: 'auth/missing-recaptcha-token',\n INVALID_RECAPTCHA_TOKEN: 'auth/invalid-recaptcha-token',\n INVALID_RECAPTCHA_ACTION: 'auth/invalid-recaptcha-action',\n MISSING_CLIENT_TYPE: 'auth/missing-client-type',\n MISSING_RECAPTCHA_VERSION: 'auth/missing-recaptcha-version',\n INVALID_RECAPTCHA_VERSION: 'auth/invalid-recaptcha-version',\n INVALID_REQ_TYPE: 'auth/invalid-req-type'\n};\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst logClient = new Logger('@firebase/auth');\nfunction _logWarn(msg, ...args) {\n if (logClient.logLevel <= LogLevel.WARN) {\n logClient.warn(`Auth (${SDK_VERSION}): ${msg}`, ...args);\n }\n}\nfunction _logError(msg, ...args) {\n if (logClient.logLevel <= LogLevel.ERROR) {\n logClient.error(`Auth (${SDK_VERSION}): ${msg}`, ...args);\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _fail(authOrCode, ...rest) {\n throw createErrorInternal(authOrCode, ...rest);\n}\nfunction _createError(authOrCode, ...rest) {\n return createErrorInternal(authOrCode, ...rest);\n}\nfunction _errorWithCustomMessage(auth, code, message) {\n const errorMap = Object.assign(Object.assign({}, prodErrorMap()), {\n [code]: message\n });\n const factory = new ErrorFactory('auth', 'Firebase', errorMap);\n return factory.create(code, {\n appName: auth.name\n });\n}\nfunction _assertInstanceOf(auth, object, instance) {\n const constructorInstance = instance;\n if (!(object instanceof constructorInstance)) {\n if (constructorInstance.name !== object.constructor.name) {\n _fail(auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n }\n throw _errorWithCustomMessage(auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */, `Type of ${object.constructor.name} does not match expected instance.` + `Did you pass a reference from a different Auth SDK?`);\n }\n}\nfunction createErrorInternal(authOrCode, ...rest) {\n if (typeof authOrCode !== 'string') {\n const code = rest[0];\n const fullParams = [...rest.slice(1)];\n if (fullParams[0]) {\n fullParams[0].appName = authOrCode.name;\n }\n return authOrCode._errorFactory.create(code, ...fullParams);\n }\n return _DEFAULT_AUTH_ERROR_FACTORY.create(authOrCode, ...rest);\n}\nfunction _assert(assertion, authOrCode, ...rest) {\n if (!assertion) {\n throw createErrorInternal(authOrCode, ...rest);\n }\n}\n/**\r\n * Unconditionally fails, throwing an internal error with the given message.\r\n *\r\n * @param failure type of failure encountered\r\n * @throws Error\r\n */\nfunction debugFail(failure) {\n // Log the failure in addition to throw an exception, just in case the\n // exception is swallowed.\n const message = `INTERNAL ASSERTION FAILED: ` + failure;\n _logError(message);\n // NOTE: We don't use FirebaseError here because these are internal failures\n // that cannot be handled by the user. (Also it would create a circular\n // dependency between the error and assert modules which doesn't work.)\n throw new Error(message);\n}\n/**\r\n * Fails if the given assertion condition is false, throwing an Error with the\r\n * given message if it did.\r\n *\r\n * @param assertion\r\n * @param message\r\n */\nfunction debugAssert(assertion, message) {\n if (!assertion) {\n debugFail(message);\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _getCurrentUrl() {\n var _a;\n return typeof self !== 'undefined' && ((_a = self.location) === null || _a === void 0 ? void 0 : _a.href) || '';\n}\nfunction _isHttpOrHttps() {\n return _getCurrentScheme() === 'http:' || _getCurrentScheme() === 'https:';\n}\nfunction _getCurrentScheme() {\n var _a;\n return typeof self !== 'undefined' && ((_a = self.location) === null || _a === void 0 ? void 0 : _a.protocol) || null;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Determine whether the browser is working online\r\n */\nfunction _isOnline() {\n if (typeof navigator !== 'undefined' && navigator && 'onLine' in navigator && typeof navigator.onLine === 'boolean' && (\n // Apply only for traditional web apps and Chrome extensions.\n // This is especially true for Cordova apps which have unreliable\n // navigator.onLine behavior unless cordova-plugin-network-information is\n // installed which overwrites the native navigator.onLine value and\n // defines navigator.connection.\n _isHttpOrHttps() || isBrowserExtension() || 'connection' in navigator)) {\n return navigator.onLine;\n }\n // If we can't determine the state, assume it is online.\n return true;\n}\nfunction _getUserLanguage() {\n if (typeof navigator === 'undefined') {\n return null;\n }\n const navigatorLanguage = navigator;\n return (\n // Most reliable, but only supported in Chrome/Firefox.\n navigatorLanguage.languages && navigatorLanguage.languages[0] ||\n // Supported in most browsers, but returns the language of the browser\n // UI, not the language set in browser settings.\n navigatorLanguage.language ||\n // Couldn't determine language.\n null\n );\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * A structure to help pick between a range of long and short delay durations\r\n * depending on the current environment. In general, the long delay is used for\r\n * mobile environments whereas short delays are used for desktop environments.\r\n */\nclass Delay {\n constructor(shortDelay, longDelay) {\n this.shortDelay = shortDelay;\n this.longDelay = longDelay;\n // Internal error when improperly initialized.\n debugAssert(longDelay > shortDelay, 'Short delay should be less than long delay!');\n this.isMobile = isMobileCordova() || isReactNative();\n }\n get() {\n if (!_isOnline()) {\n // Pick the shorter timeout.\n return Math.min(5000 /* DelayMin.OFFLINE */, this.shortDelay);\n }\n // If running in a mobile environment, return the long delay, otherwise\n // return the short delay.\n // This could be improved in the future to dynamically change based on other\n // variables instead of just reading the current environment.\n return this.isMobile ? this.longDelay : this.shortDelay;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _emulatorUrl(config, path) {\n debugAssert(config.emulator, 'Emulator should always be set here');\n const {\n url\n } = config.emulator;\n if (!path) {\n return url;\n }\n return `${url}${path.startsWith('/') ? path.slice(1) : path}`;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass FetchProvider {\n static initialize(fetchImpl, headersImpl, responseImpl) {\n this.fetchImpl = fetchImpl;\n if (headersImpl) {\n this.headersImpl = headersImpl;\n }\n if (responseImpl) {\n this.responseImpl = responseImpl;\n }\n }\n static fetch() {\n if (this.fetchImpl) {\n return this.fetchImpl;\n }\n if (typeof self !== 'undefined' && 'fetch' in self) {\n return self.fetch;\n }\n if (typeof globalThis !== 'undefined' && globalThis.fetch) {\n return globalThis.fetch;\n }\n if (typeof fetch !== 'undefined') {\n return fetch;\n }\n debugFail('Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill');\n }\n static headers() {\n if (this.headersImpl) {\n return this.headersImpl;\n }\n if (typeof self !== 'undefined' && 'Headers' in self) {\n return self.Headers;\n }\n if (typeof globalThis !== 'undefined' && globalThis.Headers) {\n return globalThis.Headers;\n }\n if (typeof Headers !== 'undefined') {\n return Headers;\n }\n debugFail('Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill');\n }\n static response() {\n if (this.responseImpl) {\n return this.responseImpl;\n }\n if (typeof self !== 'undefined' && 'Response' in self) {\n return self.Response;\n }\n if (typeof globalThis !== 'undefined' && globalThis.Response) {\n return globalThis.Response;\n }\n if (typeof Response !== 'undefined') {\n return Response;\n }\n debugFail('Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill');\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Map from errors returned by the server to errors to developer visible errors\r\n */\nconst SERVER_ERROR_MAP = {\n // Custom token errors.\n [\"CREDENTIAL_MISMATCH\" /* ServerError.CREDENTIAL_MISMATCH */]: \"custom-token-mismatch\" /* AuthErrorCode.CREDENTIAL_MISMATCH */,\n\n // This can only happen if the SDK sends a bad request.\n [\"MISSING_CUSTOM_TOKEN\" /* ServerError.MISSING_CUSTOM_TOKEN */]: \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */,\n\n // Create Auth URI errors.\n [\"INVALID_IDENTIFIER\" /* ServerError.INVALID_IDENTIFIER */]: \"invalid-email\" /* AuthErrorCode.INVALID_EMAIL */,\n\n // This can only happen if the SDK sends a bad request.\n [\"MISSING_CONTINUE_URI\" /* ServerError.MISSING_CONTINUE_URI */]: \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */,\n\n // Sign in with email and password errors (some apply to sign up too).\n [\"INVALID_PASSWORD\" /* ServerError.INVALID_PASSWORD */]: \"wrong-password\" /* AuthErrorCode.INVALID_PASSWORD */,\n\n // This can only happen if the SDK sends a bad request.\n [\"MISSING_PASSWORD\" /* ServerError.MISSING_PASSWORD */]: \"missing-password\" /* AuthErrorCode.MISSING_PASSWORD */,\n\n // Thrown if Email Enumeration Protection is enabled in the project and the email or password is\n // invalid.\n [\"INVALID_LOGIN_CREDENTIALS\" /* ServerError.INVALID_LOGIN_CREDENTIALS */]: \"invalid-credential\" /* AuthErrorCode.INVALID_CREDENTIAL */,\n\n // Sign up with email and password errors.\n [\"EMAIL_EXISTS\" /* ServerError.EMAIL_EXISTS */]: \"email-already-in-use\" /* AuthErrorCode.EMAIL_EXISTS */,\n [\"PASSWORD_LOGIN_DISABLED\" /* ServerError.PASSWORD_LOGIN_DISABLED */]: \"operation-not-allowed\" /* AuthErrorCode.OPERATION_NOT_ALLOWED */,\n\n // Verify assertion for sign in with credential errors:\n [\"INVALID_IDP_RESPONSE\" /* ServerError.INVALID_IDP_RESPONSE */]: \"invalid-credential\" /* AuthErrorCode.INVALID_CREDENTIAL */,\n [\"INVALID_PENDING_TOKEN\" /* ServerError.INVALID_PENDING_TOKEN */]: \"invalid-credential\" /* AuthErrorCode.INVALID_CREDENTIAL */,\n [\"FEDERATED_USER_ID_ALREADY_LINKED\" /* ServerError.FEDERATED_USER_ID_ALREADY_LINKED */]: \"credential-already-in-use\" /* AuthErrorCode.CREDENTIAL_ALREADY_IN_USE */,\n\n // This can only happen if the SDK sends a bad request.\n [\"MISSING_REQ_TYPE\" /* ServerError.MISSING_REQ_TYPE */]: \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */,\n\n // Send Password reset email errors:\n [\"EMAIL_NOT_FOUND\" /* ServerError.EMAIL_NOT_FOUND */]: \"user-not-found\" /* AuthErrorCode.USER_DELETED */,\n [\"RESET_PASSWORD_EXCEED_LIMIT\" /* ServerError.RESET_PASSWORD_EXCEED_LIMIT */]: \"too-many-requests\" /* AuthErrorCode.TOO_MANY_ATTEMPTS_TRY_LATER */,\n [\"EXPIRED_OOB_CODE\" /* ServerError.EXPIRED_OOB_CODE */]: \"expired-action-code\" /* AuthErrorCode.EXPIRED_OOB_CODE */,\n [\"INVALID_OOB_CODE\" /* ServerError.INVALID_OOB_CODE */]: \"invalid-action-code\" /* AuthErrorCode.INVALID_OOB_CODE */,\n\n // This can only happen if the SDK sends a bad request.\n [\"MISSING_OOB_CODE\" /* ServerError.MISSING_OOB_CODE */]: \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */,\n\n // Operations that require ID token in request:\n [\"CREDENTIAL_TOO_OLD_LOGIN_AGAIN\" /* ServerError.CREDENTIAL_TOO_OLD_LOGIN_AGAIN */]: \"requires-recent-login\" /* AuthErrorCode.CREDENTIAL_TOO_OLD_LOGIN_AGAIN */,\n [\"INVALID_ID_TOKEN\" /* ServerError.INVALID_ID_TOKEN */]: \"invalid-user-token\" /* AuthErrorCode.INVALID_AUTH */,\n [\"TOKEN_EXPIRED\" /* ServerError.TOKEN_EXPIRED */]: \"user-token-expired\" /* AuthErrorCode.TOKEN_EXPIRED */,\n [\"USER_NOT_FOUND\" /* ServerError.USER_NOT_FOUND */]: \"user-token-expired\" /* AuthErrorCode.TOKEN_EXPIRED */,\n\n // Other errors.\n [\"TOO_MANY_ATTEMPTS_TRY_LATER\" /* ServerError.TOO_MANY_ATTEMPTS_TRY_LATER */]: \"too-many-requests\" /* AuthErrorCode.TOO_MANY_ATTEMPTS_TRY_LATER */,\n [\"PASSWORD_DOES_NOT_MEET_REQUIREMENTS\" /* ServerError.PASSWORD_DOES_NOT_MEET_REQUIREMENTS */]: \"password-does-not-meet-requirements\" /* AuthErrorCode.PASSWORD_DOES_NOT_MEET_REQUIREMENTS */,\n\n // Phone Auth related errors.\n [\"INVALID_CODE\" /* ServerError.INVALID_CODE */]: \"invalid-verification-code\" /* AuthErrorCode.INVALID_CODE */,\n [\"INVALID_SESSION_INFO\" /* ServerError.INVALID_SESSION_INFO */]: \"invalid-verification-id\" /* AuthErrorCode.INVALID_SESSION_INFO */,\n [\"INVALID_TEMPORARY_PROOF\" /* ServerError.INVALID_TEMPORARY_PROOF */]: \"invalid-credential\" /* AuthErrorCode.INVALID_CREDENTIAL */,\n [\"MISSING_SESSION_INFO\" /* ServerError.MISSING_SESSION_INFO */]: \"missing-verification-id\" /* AuthErrorCode.MISSING_SESSION_INFO */,\n [\"SESSION_EXPIRED\" /* ServerError.SESSION_EXPIRED */]: \"code-expired\" /* AuthErrorCode.CODE_EXPIRED */,\n\n // Other action code errors when additional settings passed.\n // MISSING_CONTINUE_URI is getting mapped to INTERNAL_ERROR above.\n // This is OK as this error will be caught by client side validation.\n [\"MISSING_ANDROID_PACKAGE_NAME\" /* ServerError.MISSING_ANDROID_PACKAGE_NAME */]: \"missing-android-pkg-name\" /* AuthErrorCode.MISSING_ANDROID_PACKAGE_NAME */,\n [\"UNAUTHORIZED_DOMAIN\" /* ServerError.UNAUTHORIZED_DOMAIN */]: \"unauthorized-continue-uri\" /* AuthErrorCode.UNAUTHORIZED_DOMAIN */,\n\n // getProjectConfig errors when clientId is passed.\n [\"INVALID_OAUTH_CLIENT_ID\" /* ServerError.INVALID_OAUTH_CLIENT_ID */]: \"invalid-oauth-client-id\" /* AuthErrorCode.INVALID_OAUTH_CLIENT_ID */,\n\n // User actions (sign-up or deletion) disabled errors.\n [\"ADMIN_ONLY_OPERATION\" /* ServerError.ADMIN_ONLY_OPERATION */]: \"admin-restricted-operation\" /* AuthErrorCode.ADMIN_ONLY_OPERATION */,\n\n // Multi factor related errors.\n [\"INVALID_MFA_PENDING_CREDENTIAL\" /* ServerError.INVALID_MFA_PENDING_CREDENTIAL */]: \"invalid-multi-factor-session\" /* AuthErrorCode.INVALID_MFA_SESSION */,\n [\"MFA_ENROLLMENT_NOT_FOUND\" /* ServerError.MFA_ENROLLMENT_NOT_FOUND */]: \"multi-factor-info-not-found\" /* AuthErrorCode.MFA_INFO_NOT_FOUND */,\n [\"MISSING_MFA_ENROLLMENT_ID\" /* ServerError.MISSING_MFA_ENROLLMENT_ID */]: \"missing-multi-factor-info\" /* AuthErrorCode.MISSING_MFA_INFO */,\n [\"MISSING_MFA_PENDING_CREDENTIAL\" /* ServerError.MISSING_MFA_PENDING_CREDENTIAL */]: \"missing-multi-factor-session\" /* AuthErrorCode.MISSING_MFA_SESSION */,\n [\"SECOND_FACTOR_EXISTS\" /* ServerError.SECOND_FACTOR_EXISTS */]: \"second-factor-already-in-use\" /* AuthErrorCode.SECOND_FACTOR_ALREADY_ENROLLED */,\n [\"SECOND_FACTOR_LIMIT_EXCEEDED\" /* ServerError.SECOND_FACTOR_LIMIT_EXCEEDED */]: \"maximum-second-factor-count-exceeded\" /* AuthErrorCode.SECOND_FACTOR_LIMIT_EXCEEDED */,\n\n // Blocking functions related errors.\n [\"BLOCKING_FUNCTION_ERROR_RESPONSE\" /* ServerError.BLOCKING_FUNCTION_ERROR_RESPONSE */]: \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */,\n\n // Recaptcha related errors.\n [\"RECAPTCHA_NOT_ENABLED\" /* ServerError.RECAPTCHA_NOT_ENABLED */]: \"recaptcha-not-enabled\" /* AuthErrorCode.RECAPTCHA_NOT_ENABLED */,\n [\"MISSING_RECAPTCHA_TOKEN\" /* ServerError.MISSING_RECAPTCHA_TOKEN */]: \"missing-recaptcha-token\" /* AuthErrorCode.MISSING_RECAPTCHA_TOKEN */,\n [\"INVALID_RECAPTCHA_TOKEN\" /* ServerError.INVALID_RECAPTCHA_TOKEN */]: \"invalid-recaptcha-token\" /* AuthErrorCode.INVALID_RECAPTCHA_TOKEN */,\n [\"INVALID_RECAPTCHA_ACTION\" /* ServerError.INVALID_RECAPTCHA_ACTION */]: \"invalid-recaptcha-action\" /* AuthErrorCode.INVALID_RECAPTCHA_ACTION */,\n [\"MISSING_CLIENT_TYPE\" /* ServerError.MISSING_CLIENT_TYPE */]: \"missing-client-type\" /* AuthErrorCode.MISSING_CLIENT_TYPE */,\n [\"MISSING_RECAPTCHA_VERSION\" /* ServerError.MISSING_RECAPTCHA_VERSION */]: \"missing-recaptcha-version\" /* AuthErrorCode.MISSING_RECAPTCHA_VERSION */,\n [\"INVALID_RECAPTCHA_VERSION\" /* ServerError.INVALID_RECAPTCHA_VERSION */]: \"invalid-recaptcha-version\" /* AuthErrorCode.INVALID_RECAPTCHA_VERSION */,\n [\"INVALID_REQ_TYPE\" /* ServerError.INVALID_REQ_TYPE */]: \"invalid-req-type\" /* AuthErrorCode.INVALID_REQ_TYPE */\n};\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst DEFAULT_API_TIMEOUT_MS = new Delay(30000, 60000);\nfunction _addTidIfNecessary(auth, request) {\n if (auth.tenantId && !request.tenantId) {\n return Object.assign(Object.assign({}, request), {\n tenantId: auth.tenantId\n });\n }\n return request;\n}\nasync function _performApiRequest(auth, method, path, request, customErrorMap = {}) {\n return _performFetchWithErrorHandling(auth, customErrorMap, async () => {\n let body = {};\n let params = {};\n if (request) {\n if (method === \"GET\" /* HttpMethod.GET */) {\n params = request;\n } else {\n body = {\n body: JSON.stringify(request)\n };\n }\n }\n const query = querystring(Object.assign({\n key: auth.config.apiKey\n }, params)).slice(1);\n const headers = await auth._getAdditionalHeaders();\n headers[\"Content-Type\" /* HttpHeader.CONTENT_TYPE */] = 'application/json';\n if (auth.languageCode) {\n headers[\"X-Firebase-Locale\" /* HttpHeader.X_FIREBASE_LOCALE */] = auth.languageCode;\n }\n return FetchProvider.fetch()(_getFinalTarget(auth, auth.config.apiHost, path, query), Object.assign({\n method,\n headers,\n referrerPolicy: 'no-referrer'\n }, body));\n });\n}\nasync function _performFetchWithErrorHandling(auth, customErrorMap, fetchFn) {\n auth._canInitEmulator = false;\n const errorMap = Object.assign(Object.assign({}, SERVER_ERROR_MAP), customErrorMap);\n try {\n const networkTimeout = new NetworkTimeout(auth);\n const response = await Promise.race([fetchFn(), networkTimeout.promise]);\n // If we've reached this point, the fetch succeeded and the networkTimeout\n // didn't throw; clear the network timeout delay so that Node won't hang\n networkTimeout.clearNetworkTimeout();\n const json = await response.json();\n if ('needConfirmation' in json) {\n throw _makeTaggedError(auth, \"account-exists-with-different-credential\" /* AuthErrorCode.NEED_CONFIRMATION */, json);\n }\n if (response.ok && !('errorMessage' in json)) {\n return json;\n } else {\n const errorMessage = response.ok ? json.errorMessage : json.error.message;\n const [serverErrorCode, serverErrorMessage] = errorMessage.split(' : ');\n if (serverErrorCode === \"FEDERATED_USER_ID_ALREADY_LINKED\" /* ServerError.FEDERATED_USER_ID_ALREADY_LINKED */) {\n throw _makeTaggedError(auth, \"credential-already-in-use\" /* AuthErrorCode.CREDENTIAL_ALREADY_IN_USE */, json);\n } else if (serverErrorCode === \"EMAIL_EXISTS\" /* ServerError.EMAIL_EXISTS */) {\n throw _makeTaggedError(auth, \"email-already-in-use\" /* AuthErrorCode.EMAIL_EXISTS */, json);\n } else if (serverErrorCode === \"USER_DISABLED\" /* ServerError.USER_DISABLED */) {\n throw _makeTaggedError(auth, \"user-disabled\" /* AuthErrorCode.USER_DISABLED */, json);\n }\n const authError = errorMap[serverErrorCode] || serverErrorCode.toLowerCase().replace(/[_\\s]+/g, '-');\n if (serverErrorMessage) {\n throw _errorWithCustomMessage(auth, authError, serverErrorMessage);\n } else {\n _fail(auth, authError);\n }\n }\n } catch (e) {\n if (e instanceof FirebaseError) {\n throw e;\n }\n // Changing this to a different error code will log user out when there is a network error\n // because we treat any error other than NETWORK_REQUEST_FAILED as token is invalid.\n // https://github.com/firebase/firebase-js-sdk/blob/4fbc73610d70be4e0852e7de63a39cb7897e8546/packages/auth/src/core/auth/auth_impl.ts#L309-L316\n _fail(auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */, {\n 'message': String(e)\n });\n }\n}\nasync function _performSignInRequest(auth, method, path, request, customErrorMap = {}) {\n const serverResponse = await _performApiRequest(auth, method, path, request, customErrorMap);\n if ('mfaPendingCredential' in serverResponse) {\n _fail(auth, \"multi-factor-auth-required\" /* AuthErrorCode.MFA_REQUIRED */, {\n _serverResponse: serverResponse\n });\n }\n return serverResponse;\n}\nfunction _getFinalTarget(auth, host, path, query) {\n const base = `${host}${path}?${query}`;\n if (!auth.config.emulator) {\n return `${auth.config.apiScheme}://${base}`;\n }\n return _emulatorUrl(auth.config, base);\n}\nfunction _parseEnforcementState(enforcementStateStr) {\n switch (enforcementStateStr) {\n case 'ENFORCE':\n return \"ENFORCE\" /* EnforcementState.ENFORCE */;\n case 'AUDIT':\n return \"AUDIT\" /* EnforcementState.AUDIT */;\n case 'OFF':\n return \"OFF\" /* EnforcementState.OFF */;\n default:\n return \"ENFORCEMENT_STATE_UNSPECIFIED\" /* EnforcementState.ENFORCEMENT_STATE_UNSPECIFIED */;\n }\n}\nclass NetworkTimeout {\n constructor(auth) {\n this.auth = auth;\n // Node timers and browser timers are fundamentally incompatible, but we\n // don't care about the value here\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.timer = null;\n this.promise = new Promise((_, reject) => {\n this.timer = setTimeout(() => {\n return reject(_createError(this.auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */));\n }, DEFAULT_API_TIMEOUT_MS.get());\n });\n }\n clearNetworkTimeout() {\n clearTimeout(this.timer);\n }\n}\nfunction _makeTaggedError(auth, code, response) {\n const errorParams = {\n appName: auth.name\n };\n if (response.email) {\n errorParams.email = response.email;\n }\n if (response.phoneNumber) {\n errorParams.phoneNumber = response.phoneNumber;\n }\n const error = _createError(auth, code, errorParams);\n // We know customData is defined on error because errorParams is defined\n error.customData._tokenResponse = response;\n return error;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction isV2(grecaptcha) {\n return grecaptcha !== undefined && grecaptcha.getResponse !== undefined;\n}\nfunction isEnterprise(grecaptcha) {\n return grecaptcha !== undefined && grecaptcha.enterprise !== undefined;\n}\nclass RecaptchaConfig {\n constructor(response) {\n /**\r\n * The reCAPTCHA site key.\r\n */\n this.siteKey = '';\n /**\r\n * The list of providers and their enablement status for reCAPTCHA Enterprise.\r\n */\n this.recaptchaEnforcementState = [];\n if (response.recaptchaKey === undefined) {\n throw new Error('recaptchaKey undefined');\n }\n // Example response.recaptchaKey: \"projects/proj123/keys/sitekey123\"\n this.siteKey = response.recaptchaKey.split('/')[3];\n this.recaptchaEnforcementState = response.recaptchaEnforcementState;\n }\n /**\r\n * Returns the reCAPTCHA Enterprise enforcement state for the given provider.\r\n *\r\n * @param providerStr - The provider whose enforcement state is to be returned.\r\n * @returns The reCAPTCHA Enterprise enforcement state for the given provider.\r\n */\n getProviderEnforcementState(providerStr) {\n if (!this.recaptchaEnforcementState || this.recaptchaEnforcementState.length === 0) {\n return null;\n }\n for (const recaptchaEnforcementState of this.recaptchaEnforcementState) {\n if (recaptchaEnforcementState.provider && recaptchaEnforcementState.provider === providerStr) {\n return _parseEnforcementState(recaptchaEnforcementState.enforcementState);\n }\n }\n return null;\n }\n /**\r\n * Returns true if the reCAPTCHA Enterprise enforcement state for the provider is set to ENFORCE or AUDIT.\r\n *\r\n * @param providerStr - The provider whose enablement state is to be returned.\r\n * @returns Whether or not reCAPTCHA Enterprise protection is enabled for the given provider.\r\n */\n isProviderEnabled(providerStr) {\n return this.getProviderEnforcementState(providerStr) === \"ENFORCE\" /* EnforcementState.ENFORCE */ || this.getProviderEnforcementState(providerStr) === \"AUDIT\" /* EnforcementState.AUDIT */;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function getRecaptchaParams(auth) {\n return (await _performApiRequest(auth, \"GET\" /* HttpMethod.GET */, \"/v1/recaptchaParams\" /* Endpoint.GET_RECAPTCHA_PARAM */)).recaptchaSiteKey || '';\n}\nasync function getRecaptchaConfig(auth, request) {\n return _performApiRequest(auth, \"GET\" /* HttpMethod.GET */, \"/v2/recaptchaConfig\" /* Endpoint.GET_RECAPTCHA_CONFIG */, _addTidIfNecessary(auth, request));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function deleteAccount(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:delete\" /* Endpoint.DELETE_ACCOUNT */, request);\n}\nasync function deleteLinkedAccounts(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:update\" /* Endpoint.SET_ACCOUNT_INFO */, request);\n}\nasync function getAccountInfo(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:lookup\" /* Endpoint.GET_ACCOUNT_INFO */, request);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction utcTimestampToDateString(utcTimestamp) {\n if (!utcTimestamp) {\n return undefined;\n }\n try {\n // Convert to date object.\n const date = new Date(Number(utcTimestamp));\n // Test date is valid.\n if (!isNaN(date.getTime())) {\n // Convert to UTC date string.\n return date.toUTCString();\n }\n } catch (e) {\n // Do nothing. undefined will be returned.\n }\n return undefined;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Returns a JSON Web Token (JWT) used to identify the user to a Firebase service.\r\n *\r\n * @remarks\r\n * Returns the current token if it has not expired or if it will not expire in the next five\r\n * minutes. Otherwise, this will refresh the token and return a new one.\r\n *\r\n * @param user - The user.\r\n * @param forceRefresh - Force refresh regardless of token expiration.\r\n *\r\n * @public\r\n */\nfunction getIdToken(user, forceRefresh = false) {\n return getModularInstance(user).getIdToken(forceRefresh);\n}\n/**\r\n * Returns a deserialized JSON Web Token (JWT) used to identify the user to a Firebase service.\r\n *\r\n * @remarks\r\n * Returns the current token if it has not expired or if it will not expire in the next five\r\n * minutes. Otherwise, this will refresh the token and return a new one.\r\n *\r\n * @param user - The user.\r\n * @param forceRefresh - Force refresh regardless of token expiration.\r\n *\r\n * @public\r\n */\nasync function getIdTokenResult(user, forceRefresh = false) {\n const userInternal = getModularInstance(user);\n const token = await userInternal.getIdToken(forceRefresh);\n const claims = _parseToken(token);\n _assert(claims && claims.exp && claims.auth_time && claims.iat, userInternal.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n const firebase = typeof claims.firebase === 'object' ? claims.firebase : undefined;\n const signInProvider = firebase === null || firebase === void 0 ? void 0 : firebase['sign_in_provider'];\n return {\n claims,\n token,\n authTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.auth_time)),\n issuedAtTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.iat)),\n expirationTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.exp)),\n signInProvider: signInProvider || null,\n signInSecondFactor: (firebase === null || firebase === void 0 ? void 0 : firebase['sign_in_second_factor']) || null\n };\n}\nfunction secondsStringToMilliseconds(seconds) {\n return Number(seconds) * 1000;\n}\nfunction _parseToken(token) {\n const [algorithm, payload, signature] = token.split('.');\n if (algorithm === undefined || payload === undefined || signature === undefined) {\n _logError('JWT malformed, contained fewer than 3 sections');\n return null;\n }\n try {\n const decoded = base64Decode(payload);\n if (!decoded) {\n _logError('Failed to decode base64 JWT payload');\n return null;\n }\n return JSON.parse(decoded);\n } catch (e) {\n _logError('Caught error parsing JWT payload as JSON', e === null || e === void 0 ? void 0 : e.toString());\n return null;\n }\n}\n/**\r\n * Extract expiresIn TTL from a token by subtracting the expiration from the issuance.\r\n */\nfunction _tokenExpiresIn(token) {\n const parsedToken = _parseToken(token);\n _assert(parsedToken, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n _assert(typeof parsedToken.exp !== 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n _assert(typeof parsedToken.iat !== 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n return Number(parsedToken.exp) - Number(parsedToken.iat);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function _logoutIfInvalidated(user, promise, bypassAuthState = false) {\n if (bypassAuthState) {\n return promise;\n }\n try {\n return await promise;\n } catch (e) {\n if (e instanceof FirebaseError && isUserInvalidated(e)) {\n if (user.auth.currentUser === user) {\n await user.auth.signOut();\n }\n }\n throw e;\n }\n}\nfunction isUserInvalidated({\n code\n}) {\n return code === `auth/${\"user-disabled\" /* AuthErrorCode.USER_DISABLED */}` || code === `auth/${\"user-token-expired\" /* AuthErrorCode.TOKEN_EXPIRED */}`;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass ProactiveRefresh {\n constructor(user) {\n this.user = user;\n this.isRunning = false;\n // Node timers and browser timers return fundamentally different types.\n // We don't actually care what the value is but TS won't accept unknown and\n // we can't cast properly in both environments.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.timerId = null;\n this.errorBackoff = 30000 /* Duration.RETRY_BACKOFF_MIN */;\n }\n _start() {\n if (this.isRunning) {\n return;\n }\n this.isRunning = true;\n this.schedule();\n }\n _stop() {\n if (!this.isRunning) {\n return;\n }\n this.isRunning = false;\n if (this.timerId !== null) {\n clearTimeout(this.timerId);\n }\n }\n getInterval(wasError) {\n var _a;\n if (wasError) {\n const interval = this.errorBackoff;\n this.errorBackoff = Math.min(this.errorBackoff * 2, 960000 /* Duration.RETRY_BACKOFF_MAX */);\n return interval;\n } else {\n // Reset the error backoff\n this.errorBackoff = 30000 /* Duration.RETRY_BACKOFF_MIN */;\n const expTime = (_a = this.user.stsTokenManager.expirationTime) !== null && _a !== void 0 ? _a : 0;\n const interval = expTime - Date.now() - 300000 /* Duration.OFFSET */;\n return Math.max(0, interval);\n }\n }\n schedule(wasError = false) {\n if (!this.isRunning) {\n // Just in case...\n return;\n }\n const interval = this.getInterval(wasError);\n this.timerId = setTimeout(async () => {\n await this.iteration();\n }, interval);\n }\n async iteration() {\n try {\n await this.user.getIdToken(true);\n } catch (e) {\n // Only retry on network errors\n if ((e === null || e === void 0 ? void 0 : e.code) === `auth/${\"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */}`) {\n this.schedule( /* wasError */true);\n }\n return;\n }\n this.schedule();\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass UserMetadata {\n constructor(createdAt, lastLoginAt) {\n this.createdAt = createdAt;\n this.lastLoginAt = lastLoginAt;\n this._initializeTime();\n }\n _initializeTime() {\n this.lastSignInTime = utcTimestampToDateString(this.lastLoginAt);\n this.creationTime = utcTimestampToDateString(this.createdAt);\n }\n _copy(metadata) {\n this.createdAt = metadata.createdAt;\n this.lastLoginAt = metadata.lastLoginAt;\n this._initializeTime();\n }\n toJSON() {\n return {\n createdAt: this.createdAt,\n lastLoginAt: this.lastLoginAt\n };\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function _reloadWithoutSaving(user) {\n var _a;\n const auth = user.auth;\n const idToken = await user.getIdToken();\n const response = await _logoutIfInvalidated(user, getAccountInfo(auth, {\n idToken\n }));\n _assert(response === null || response === void 0 ? void 0 : response.users.length, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n const coreAccount = response.users[0];\n user._notifyReloadListener(coreAccount);\n const newProviderData = ((_a = coreAccount.providerUserInfo) === null || _a === void 0 ? void 0 : _a.length) ? extractProviderData(coreAccount.providerUserInfo) : [];\n const providerData = mergeProviderData(user.providerData, newProviderData);\n // Preserves the non-nonymous status of the stored user, even if no more\n // credentials (federated or email/password) are linked to the user. If\n // the user was previously anonymous, then use provider data to update.\n // On the other hand, if it was not anonymous before, it should never be\n // considered anonymous now.\n const oldIsAnonymous = user.isAnonymous;\n const newIsAnonymous = !(user.email && coreAccount.passwordHash) && !(providerData === null || providerData === void 0 ? void 0 : providerData.length);\n const isAnonymous = !oldIsAnonymous ? false : newIsAnonymous;\n const updates = {\n uid: coreAccount.localId,\n displayName: coreAccount.displayName || null,\n photoURL: coreAccount.photoUrl || null,\n email: coreAccount.email || null,\n emailVerified: coreAccount.emailVerified || false,\n phoneNumber: coreAccount.phoneNumber || null,\n tenantId: coreAccount.tenantId || null,\n providerData,\n metadata: new UserMetadata(coreAccount.createdAt, coreAccount.lastLoginAt),\n isAnonymous\n };\n Object.assign(user, updates);\n}\n/**\r\n * Reloads user account data, if signed in.\r\n *\r\n * @param user - The user.\r\n *\r\n * @public\r\n */\nasync function reload(user) {\n const userInternal = getModularInstance(user);\n await _reloadWithoutSaving(userInternal);\n // Even though the current user hasn't changed, update\n // current user will trigger a persistence update w/ the\n // new info.\n await userInternal.auth._persistUserIfCurrent(userInternal);\n userInternal.auth._notifyListenersIfCurrent(userInternal);\n}\nfunction mergeProviderData(original, newData) {\n const deduped = original.filter(o => !newData.some(n => n.providerId === o.providerId));\n return [...deduped, ...newData];\n}\nfunction extractProviderData(providers) {\n return providers.map(_a => {\n var {\n providerId\n } = _a,\n provider = __rest(_a, [\"providerId\"]);\n return {\n providerId,\n uid: provider.rawId || '',\n displayName: provider.displayName || null,\n email: provider.email || null,\n phoneNumber: provider.phoneNumber || null,\n photoURL: provider.photoUrl || null\n };\n });\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function requestStsToken(auth, refreshToken) {\n const response = await _performFetchWithErrorHandling(auth, {}, async () => {\n const body = querystring({\n 'grant_type': 'refresh_token',\n 'refresh_token': refreshToken\n }).slice(1);\n const {\n tokenApiHost,\n apiKey\n } = auth.config;\n const url = _getFinalTarget(auth, tokenApiHost, \"/v1/token\" /* Endpoint.TOKEN */, `key=${apiKey}`);\n const headers = await auth._getAdditionalHeaders();\n headers[\"Content-Type\" /* HttpHeader.CONTENT_TYPE */] = 'application/x-www-form-urlencoded';\n return FetchProvider.fetch()(url, {\n method: \"POST\" /* HttpMethod.POST */,\n headers,\n body\n });\n });\n // The response comes back in snake_case. Convert to camel:\n return {\n accessToken: response.access_token,\n expiresIn: response.expires_in,\n refreshToken: response.refresh_token\n };\n}\nasync function revokeToken(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts:revokeToken\" /* Endpoint.REVOKE_TOKEN */, _addTidIfNecessary(auth, request));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * We need to mark this class as internal explicitly to exclude it in the public typings, because\r\n * it references AuthInternal which has a circular dependency with UserInternal.\r\n *\r\n * @internal\r\n */\nclass StsTokenManager {\n constructor() {\n this.refreshToken = null;\n this.accessToken = null;\n this.expirationTime = null;\n }\n get isExpired() {\n return !this.expirationTime || Date.now() > this.expirationTime - 30000 /* Buffer.TOKEN_REFRESH */;\n }\n updateFromServerResponse(response) {\n _assert(response.idToken, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n _assert(typeof response.idToken !== 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n _assert(typeof response.refreshToken !== 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n const expiresIn = 'expiresIn' in response && typeof response.expiresIn !== 'undefined' ? Number(response.expiresIn) : _tokenExpiresIn(response.idToken);\n this.updateTokensAndExpiration(response.idToken, response.refreshToken, expiresIn);\n }\n async getToken(auth, forceRefresh = false) {\n _assert(!this.accessToken || this.refreshToken, auth, \"user-token-expired\" /* AuthErrorCode.TOKEN_EXPIRED */);\n if (!forceRefresh && this.accessToken && !this.isExpired) {\n return this.accessToken;\n }\n if (this.refreshToken) {\n await this.refresh(auth, this.refreshToken);\n return this.accessToken;\n }\n return null;\n }\n clearRefreshToken() {\n this.refreshToken = null;\n }\n async refresh(auth, oldToken) {\n const {\n accessToken,\n refreshToken,\n expiresIn\n } = await requestStsToken(auth, oldToken);\n this.updateTokensAndExpiration(accessToken, refreshToken, Number(expiresIn));\n }\n updateTokensAndExpiration(accessToken, refreshToken, expiresInSec) {\n this.refreshToken = refreshToken || null;\n this.accessToken = accessToken || null;\n this.expirationTime = Date.now() + expiresInSec * 1000;\n }\n static fromJSON(appName, object) {\n const {\n refreshToken,\n accessToken,\n expirationTime\n } = object;\n const manager = new StsTokenManager();\n if (refreshToken) {\n _assert(typeof refreshToken === 'string', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */, {\n appName\n });\n manager.refreshToken = refreshToken;\n }\n if (accessToken) {\n _assert(typeof accessToken === 'string', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */, {\n appName\n });\n manager.accessToken = accessToken;\n }\n if (expirationTime) {\n _assert(typeof expirationTime === 'number', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */, {\n appName\n });\n manager.expirationTime = expirationTime;\n }\n return manager;\n }\n toJSON() {\n return {\n refreshToken: this.refreshToken,\n accessToken: this.accessToken,\n expirationTime: this.expirationTime\n };\n }\n _assign(stsTokenManager) {\n this.accessToken = stsTokenManager.accessToken;\n this.refreshToken = stsTokenManager.refreshToken;\n this.expirationTime = stsTokenManager.expirationTime;\n }\n _clone() {\n return Object.assign(new StsTokenManager(), this.toJSON());\n }\n _performRefresh() {\n return debugFail('not implemented');\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction assertStringOrUndefined(assertion, appName) {\n _assert(typeof assertion === 'string' || typeof assertion === 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */, {\n appName\n });\n}\nclass UserImpl {\n constructor(_a) {\n var {\n uid,\n auth,\n stsTokenManager\n } = _a,\n opt = __rest(_a, [\"uid\", \"auth\", \"stsTokenManager\"]);\n // For the user object, provider is always Firebase.\n this.providerId = \"firebase\" /* ProviderId.FIREBASE */;\n this.proactiveRefresh = new ProactiveRefresh(this);\n this.reloadUserInfo = null;\n this.reloadListener = null;\n this.uid = uid;\n this.auth = auth;\n this.stsTokenManager = stsTokenManager;\n this.accessToken = stsTokenManager.accessToken;\n this.displayName = opt.displayName || null;\n this.email = opt.email || null;\n this.emailVerified = opt.emailVerified || false;\n this.phoneNumber = opt.phoneNumber || null;\n this.photoURL = opt.photoURL || null;\n this.isAnonymous = opt.isAnonymous || false;\n this.tenantId = opt.tenantId || null;\n this.providerData = opt.providerData ? [...opt.providerData] : [];\n this.metadata = new UserMetadata(opt.createdAt || undefined, opt.lastLoginAt || undefined);\n }\n async getIdToken(forceRefresh) {\n const accessToken = await _logoutIfInvalidated(this, this.stsTokenManager.getToken(this.auth, forceRefresh));\n _assert(accessToken, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n if (this.accessToken !== accessToken) {\n this.accessToken = accessToken;\n await this.auth._persistUserIfCurrent(this);\n this.auth._notifyListenersIfCurrent(this);\n }\n return accessToken;\n }\n getIdTokenResult(forceRefresh) {\n return getIdTokenResult(this, forceRefresh);\n }\n reload() {\n return reload(this);\n }\n _assign(user) {\n if (this === user) {\n return;\n }\n _assert(this.uid === user.uid, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n this.displayName = user.displayName;\n this.photoURL = user.photoURL;\n this.email = user.email;\n this.emailVerified = user.emailVerified;\n this.phoneNumber = user.phoneNumber;\n this.isAnonymous = user.isAnonymous;\n this.tenantId = user.tenantId;\n this.providerData = user.providerData.map(userInfo => Object.assign({}, userInfo));\n this.metadata._copy(user.metadata);\n this.stsTokenManager._assign(user.stsTokenManager);\n }\n _clone(auth) {\n const newUser = new UserImpl(Object.assign(Object.assign({}, this), {\n auth,\n stsTokenManager: this.stsTokenManager._clone()\n }));\n newUser.metadata._copy(this.metadata);\n return newUser;\n }\n _onReload(callback) {\n // There should only ever be one listener, and that is a single instance of MultiFactorUser\n _assert(!this.reloadListener, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n this.reloadListener = callback;\n if (this.reloadUserInfo) {\n this._notifyReloadListener(this.reloadUserInfo);\n this.reloadUserInfo = null;\n }\n }\n _notifyReloadListener(userInfo) {\n if (this.reloadListener) {\n this.reloadListener(userInfo);\n } else {\n // If no listener is subscribed yet, save the result so it's available when they do subscribe\n this.reloadUserInfo = userInfo;\n }\n }\n _startProactiveRefresh() {\n this.proactiveRefresh._start();\n }\n _stopProactiveRefresh() {\n this.proactiveRefresh._stop();\n }\n async _updateTokensIfNecessary(response, reload = false) {\n let tokensRefreshed = false;\n if (response.idToken && response.idToken !== this.stsTokenManager.accessToken) {\n this.stsTokenManager.updateFromServerResponse(response);\n tokensRefreshed = true;\n }\n if (reload) {\n await _reloadWithoutSaving(this);\n }\n await this.auth._persistUserIfCurrent(this);\n if (tokensRefreshed) {\n this.auth._notifyListenersIfCurrent(this);\n }\n }\n async delete() {\n const idToken = await this.getIdToken();\n await _logoutIfInvalidated(this, deleteAccount(this.auth, {\n idToken\n }));\n this.stsTokenManager.clearRefreshToken();\n // TODO: Determine if cancellable-promises are necessary to use in this class so that delete()\n // cancels pending actions...\n return this.auth.signOut();\n }\n toJSON() {\n return Object.assign(Object.assign({\n uid: this.uid,\n email: this.email || undefined,\n emailVerified: this.emailVerified,\n displayName: this.displayName || undefined,\n isAnonymous: this.isAnonymous,\n photoURL: this.photoURL || undefined,\n phoneNumber: this.phoneNumber || undefined,\n tenantId: this.tenantId || undefined,\n providerData: this.providerData.map(userInfo => Object.assign({}, userInfo)),\n stsTokenManager: this.stsTokenManager.toJSON(),\n // Redirect event ID must be maintained in case there is a pending\n // redirect event.\n _redirectEventId: this._redirectEventId\n }, this.metadata.toJSON()), {\n // Required for compatibility with the legacy SDK (go/firebase-auth-sdk-persistence-parsing):\n apiKey: this.auth.config.apiKey,\n appName: this.auth.name\n });\n }\n get refreshToken() {\n return this.stsTokenManager.refreshToken || '';\n }\n static _fromJSON(auth, object) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n const displayName = (_a = object.displayName) !== null && _a !== void 0 ? _a : undefined;\n const email = (_b = object.email) !== null && _b !== void 0 ? _b : undefined;\n const phoneNumber = (_c = object.phoneNumber) !== null && _c !== void 0 ? _c : undefined;\n const photoURL = (_d = object.photoURL) !== null && _d !== void 0 ? _d : undefined;\n const tenantId = (_e = object.tenantId) !== null && _e !== void 0 ? _e : undefined;\n const _redirectEventId = (_f = object._redirectEventId) !== null && _f !== void 0 ? _f : undefined;\n const createdAt = (_g = object.createdAt) !== null && _g !== void 0 ? _g : undefined;\n const lastLoginAt = (_h = object.lastLoginAt) !== null && _h !== void 0 ? _h : undefined;\n const {\n uid,\n emailVerified,\n isAnonymous,\n providerData,\n stsTokenManager: plainObjectTokenManager\n } = object;\n _assert(uid && plainObjectTokenManager, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n const stsTokenManager = StsTokenManager.fromJSON(this.name, plainObjectTokenManager);\n _assert(typeof uid === 'string', auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n assertStringOrUndefined(displayName, auth.name);\n assertStringOrUndefined(email, auth.name);\n _assert(typeof emailVerified === 'boolean', auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n _assert(typeof isAnonymous === 'boolean', auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n assertStringOrUndefined(phoneNumber, auth.name);\n assertStringOrUndefined(photoURL, auth.name);\n assertStringOrUndefined(tenantId, auth.name);\n assertStringOrUndefined(_redirectEventId, auth.name);\n assertStringOrUndefined(createdAt, auth.name);\n assertStringOrUndefined(lastLoginAt, auth.name);\n const user = new UserImpl({\n uid,\n auth,\n email,\n emailVerified,\n displayName,\n isAnonymous,\n photoURL,\n phoneNumber,\n tenantId,\n stsTokenManager,\n createdAt,\n lastLoginAt\n });\n if (providerData && Array.isArray(providerData)) {\n user.providerData = providerData.map(userInfo => Object.assign({}, userInfo));\n }\n if (_redirectEventId) {\n user._redirectEventId = _redirectEventId;\n }\n return user;\n }\n /**\r\n * Initialize a User from an idToken server response\r\n * @param auth\r\n * @param idTokenResponse\r\n */\n static async _fromIdTokenResponse(auth, idTokenResponse, isAnonymous = false) {\n const stsTokenManager = new StsTokenManager();\n stsTokenManager.updateFromServerResponse(idTokenResponse);\n // Initialize the Firebase Auth user.\n const user = new UserImpl({\n uid: idTokenResponse.localId,\n auth,\n stsTokenManager,\n isAnonymous\n });\n // Updates the user info and data and resolves with a user instance.\n await _reloadWithoutSaving(user);\n return user;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst instanceCache = new Map();\nfunction _getInstance(cls) {\n debugAssert(cls instanceof Function, 'Expected a class definition');\n let instance = instanceCache.get(cls);\n if (instance) {\n debugAssert(instance instanceof cls, 'Instance stored in cache mismatched with class');\n return instance;\n }\n instance = new cls();\n instanceCache.set(cls, instance);\n return instance;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nlet InMemoryPersistence = /*#__PURE__*/(() => {\n class InMemoryPersistence {\n constructor() {\n this.type = \"NONE\" /* PersistenceType.NONE */;\n this.storage = {};\n }\n async _isAvailable() {\n return true;\n }\n async _set(key, value) {\n this.storage[key] = value;\n }\n async _get(key) {\n const value = this.storage[key];\n return value === undefined ? null : value;\n }\n async _remove(key) {\n delete this.storage[key];\n }\n _addListener(_key, _listener) {\n // Listeners are not supported for in-memory storage since it cannot be shared across windows/workers\n return;\n }\n _removeListener(_key, _listener) {\n // Listeners are not supported for in-memory storage since it cannot be shared across windows/workers\n return;\n }\n }\n InMemoryPersistence.type = 'NONE';\n /**\r\n * An implementation of {@link Persistence} of type 'NONE'.\r\n *\r\n * @public\r\n */\n return InMemoryPersistence;\n})();\nconst inMemoryPersistence = InMemoryPersistence;\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _persistenceKeyName(key, apiKey, appName) {\n return `${\"firebase\" /* Namespace.PERSISTENCE */}:${key}:${apiKey}:${appName}`;\n}\nclass PersistenceUserManager {\n constructor(persistence, auth, userKey) {\n this.persistence = persistence;\n this.auth = auth;\n this.userKey = userKey;\n const {\n config,\n name\n } = this.auth;\n this.fullUserKey = _persistenceKeyName(this.userKey, config.apiKey, name);\n this.fullPersistenceKey = _persistenceKeyName(\"persistence\" /* KeyName.PERSISTENCE_USER */, config.apiKey, name);\n this.boundEventHandler = auth._onStorageEvent.bind(auth);\n this.persistence._addListener(this.fullUserKey, this.boundEventHandler);\n }\n setCurrentUser(user) {\n return this.persistence._set(this.fullUserKey, user.toJSON());\n }\n async getCurrentUser() {\n const blob = await this.persistence._get(this.fullUserKey);\n return blob ? UserImpl._fromJSON(this.auth, blob) : null;\n }\n removeCurrentUser() {\n return this.persistence._remove(this.fullUserKey);\n }\n savePersistenceForRedirect() {\n return this.persistence._set(this.fullPersistenceKey, this.persistence.type);\n }\n async setPersistence(newPersistence) {\n if (this.persistence === newPersistence) {\n return;\n }\n const currentUser = await this.getCurrentUser();\n await this.removeCurrentUser();\n this.persistence = newPersistence;\n if (currentUser) {\n return this.setCurrentUser(currentUser);\n }\n }\n delete() {\n this.persistence._removeListener(this.fullUserKey, this.boundEventHandler);\n }\n static async create(auth, persistenceHierarchy, userKey = \"authUser\" /* KeyName.AUTH_USER */) {\n if (!persistenceHierarchy.length) {\n return new PersistenceUserManager(_getInstance(inMemoryPersistence), auth, userKey);\n }\n // Eliminate any persistences that are not available\n const availablePersistences = (await Promise.all(persistenceHierarchy.map(async persistence => {\n if (await persistence._isAvailable()) {\n return persistence;\n }\n return undefined;\n }))).filter(persistence => persistence);\n // Fall back to the first persistence listed, or in memory if none available\n let selectedPersistence = availablePersistences[0] || _getInstance(inMemoryPersistence);\n const key = _persistenceKeyName(userKey, auth.config.apiKey, auth.name);\n // Pull out the existing user, setting the chosen persistence to that\n // persistence if the user exists.\n let userToMigrate = null;\n // Note, here we check for a user in _all_ persistences, not just the\n // ones deemed available. If we can migrate a user out of a broken\n // persistence, we will (but only if that persistence supports migration).\n for (const persistence of persistenceHierarchy) {\n try {\n const blob = await persistence._get(key);\n if (blob) {\n const user = UserImpl._fromJSON(auth, blob); // throws for unparsable blob (wrong format)\n if (persistence !== selectedPersistence) {\n userToMigrate = user;\n }\n selectedPersistence = persistence;\n break;\n }\n } catch (_a) {}\n }\n // If we find the user in a persistence that does support migration, use\n // that migration path (of only persistences that support migration)\n const migrationHierarchy = availablePersistences.filter(p => p._shouldAllowMigration);\n // If the persistence does _not_ allow migration, just finish off here\n if (!selectedPersistence._shouldAllowMigration || !migrationHierarchy.length) {\n return new PersistenceUserManager(selectedPersistence, auth, userKey);\n }\n selectedPersistence = migrationHierarchy[0];\n if (userToMigrate) {\n // This normally shouldn't throw since chosenPersistence.isAvailable() is true, but if it does\n // we'll just let it bubble to surface the error.\n await selectedPersistence._set(key, userToMigrate.toJSON());\n }\n // Attempt to clear the key in other persistences but ignore errors. This helps prevent issues\n // such as users getting stuck with a previous account after signing out and refreshing the tab.\n await Promise.all(persistenceHierarchy.map(async persistence => {\n if (persistence !== selectedPersistence) {\n try {\n await persistence._remove(key);\n } catch (_a) {}\n }\n }));\n return new PersistenceUserManager(selectedPersistence, auth, userKey);\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Determine the browser for the purposes of reporting usage to the API\r\n */\nfunction _getBrowserName(userAgent) {\n const ua = userAgent.toLowerCase();\n if (ua.includes('opera/') || ua.includes('opr/') || ua.includes('opios/')) {\n return \"Opera\" /* BrowserName.OPERA */;\n } else if (_isIEMobile(ua)) {\n // Windows phone IEMobile browser.\n return \"IEMobile\" /* BrowserName.IEMOBILE */;\n } else if (ua.includes('msie') || ua.includes('trident/')) {\n return \"IE\" /* BrowserName.IE */;\n } else if (ua.includes('edge/')) {\n return \"Edge\" /* BrowserName.EDGE */;\n } else if (_isFirefox(ua)) {\n return \"Firefox\" /* BrowserName.FIREFOX */;\n } else if (ua.includes('silk/')) {\n return \"Silk\" /* BrowserName.SILK */;\n } else if (_isBlackBerry(ua)) {\n // Blackberry browser.\n return \"Blackberry\" /* BrowserName.BLACKBERRY */;\n } else if (_isWebOS(ua)) {\n // WebOS default browser.\n return \"Webos\" /* BrowserName.WEBOS */;\n } else if (_isSafari(ua)) {\n return \"Safari\" /* BrowserName.SAFARI */;\n } else if ((ua.includes('chrome/') || _isChromeIOS(ua)) && !ua.includes('edge/')) {\n return \"Chrome\" /* BrowserName.CHROME */;\n } else if (_isAndroid(ua)) {\n // Android stock browser.\n return \"Android\" /* BrowserName.ANDROID */;\n } else {\n // Most modern browsers have name/version at end of user agent string.\n const re = /([a-zA-Z\\d\\.]+)\\/[a-zA-Z\\d\\.]*$/;\n const matches = userAgent.match(re);\n if ((matches === null || matches === void 0 ? void 0 : matches.length) === 2) {\n return matches[1];\n }\n }\n return \"Other\" /* BrowserName.OTHER */;\n}\nfunction _isFirefox(ua = getUA()) {\n return /firefox\\//i.test(ua);\n}\nfunction _isSafari(userAgent = getUA()) {\n const ua = userAgent.toLowerCase();\n return ua.includes('safari/') && !ua.includes('chrome/') && !ua.includes('crios/') && !ua.includes('android');\n}\nfunction _isChromeIOS(ua = getUA()) {\n return /crios\\//i.test(ua);\n}\nfunction _isIEMobile(ua = getUA()) {\n return /iemobile/i.test(ua);\n}\nfunction _isAndroid(ua = getUA()) {\n return /android/i.test(ua);\n}\nfunction _isBlackBerry(ua = getUA()) {\n return /blackberry/i.test(ua);\n}\nfunction _isWebOS(ua = getUA()) {\n return /webos/i.test(ua);\n}\nfunction _isIOS(ua = getUA()) {\n return /iphone|ipad|ipod/i.test(ua) || /macintosh/i.test(ua) && /mobile/i.test(ua);\n}\nfunction _isIOS7Or8(ua = getUA()) {\n return /(iPad|iPhone|iPod).*OS 7_\\d/i.test(ua) || /(iPad|iPhone|iPod).*OS 8_\\d/i.test(ua);\n}\nfunction _isIOSStandalone(ua = getUA()) {\n var _a;\n return _isIOS(ua) && !!((_a = window.navigator) === null || _a === void 0 ? void 0 : _a.standalone);\n}\nfunction _isIE10() {\n return isIE() && document.documentMode === 10;\n}\nfunction _isMobileBrowser(ua = getUA()) {\n // TODO: implement getBrowserName equivalent for OS.\n return _isIOS(ua) || _isAndroid(ua) || _isWebOS(ua) || _isBlackBerry(ua) || /windows phone/i.test(ua) || _isIEMobile(ua);\n}\nfunction _isIframe() {\n try {\n // Check that the current window is not the top window.\n // If so, return true.\n return !!(window && window !== window.top);\n } catch (e) {\n return false;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/*\r\n * Determine the SDK version string\r\n */\nfunction _getClientVersion(clientPlatform, frameworks = []) {\n let reportedPlatform;\n switch (clientPlatform) {\n case \"Browser\" /* ClientPlatform.BROWSER */:\n // In a browser environment, report the browser name.\n reportedPlatform = _getBrowserName(getUA());\n break;\n case \"Worker\" /* ClientPlatform.WORKER */:\n // Technically a worker runs from a browser but we need to differentiate a\n // worker from a browser.\n // For example: Chrome-Worker/JsCore/4.9.1/FirebaseCore-web.\n reportedPlatform = `${_getBrowserName(getUA())}-${clientPlatform}`;\n break;\n default:\n reportedPlatform = clientPlatform;\n }\n const reportedFrameworks = frameworks.length ? frameworks.join(',') : 'FirebaseCore-web'; /* default value if no other framework is used */\n return `${reportedPlatform}/${\"JsCore\" /* ClientImplementation.CORE */}/${SDK_VERSION}/${reportedFrameworks}`;\n}\n\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass AuthMiddlewareQueue {\n constructor(auth) {\n this.auth = auth;\n this.queue = [];\n }\n pushCallback(callback, onAbort) {\n // The callback could be sync or async. Wrap it into a\n // function that is always async.\n const wrappedCallback = user => new Promise((resolve, reject) => {\n try {\n const result = callback(user);\n // Either resolve with existing promise or wrap a non-promise\n // return value into a promise.\n resolve(result);\n } catch (e) {\n // Sync callback throws.\n reject(e);\n }\n });\n // Attach the onAbort if present\n wrappedCallback.onAbort = onAbort;\n this.queue.push(wrappedCallback);\n const index = this.queue.length - 1;\n return () => {\n // Unsubscribe. Replace with no-op. Do not remove from array, or it will disturb\n // indexing of other elements.\n this.queue[index] = () => Promise.resolve();\n };\n }\n async runMiddleware(nextUser) {\n if (this.auth.currentUser === nextUser) {\n return;\n }\n // While running the middleware, build a temporary stack of onAbort\n // callbacks to call if one middleware callback rejects.\n const onAbortStack = [];\n try {\n for (const beforeStateCallback of this.queue) {\n await beforeStateCallback(nextUser);\n // Only push the onAbort if the callback succeeds\n if (beforeStateCallback.onAbort) {\n onAbortStack.push(beforeStateCallback.onAbort);\n }\n }\n } catch (e) {\n // Run all onAbort, with separate try/catch to ignore any errors and\n // continue\n onAbortStack.reverse();\n for (const onAbort of onAbortStack) {\n try {\n onAbort();\n } catch (_) {\n /* swallow error */\n }\n }\n throw this.auth._errorFactory.create(\"login-blocked\" /* AuthErrorCode.LOGIN_BLOCKED */, {\n originalMessage: e === null || e === void 0 ? void 0 : e.message\n });\n }\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2023 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Fetches the password policy for the currently set tenant or the project if no tenant is set.\r\n *\r\n * @param auth Auth object.\r\n * @param request Password policy request.\r\n * @returns Password policy response.\r\n */\nasync function _getPasswordPolicy(auth, request = {}) {\n return _performApiRequest(auth, \"GET\" /* HttpMethod.GET */, \"/v2/passwordPolicy\" /* Endpoint.GET_PASSWORD_POLICY */, _addTidIfNecessary(auth, request));\n}\n\n/**\r\n * @license\r\n * Copyright 2023 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// Minimum min password length enforced by the backend, even if no minimum length is set.\nconst MINIMUM_MIN_PASSWORD_LENGTH = 6;\n/**\r\n * Stores password policy requirements and provides password validation against the policy.\r\n *\r\n * @internal\r\n */\nclass PasswordPolicyImpl {\n constructor(response) {\n var _a, _b, _c, _d;\n // Only include custom strength options defined in the response.\n const responseOptions = response.customStrengthOptions;\n this.customStrengthOptions = {};\n // TODO: Remove once the backend is updated to include the minimum min password length instead of undefined when there is no minimum length set.\n this.customStrengthOptions.minPasswordLength = (_a = responseOptions.minPasswordLength) !== null && _a !== void 0 ? _a : MINIMUM_MIN_PASSWORD_LENGTH;\n if (responseOptions.maxPasswordLength) {\n this.customStrengthOptions.maxPasswordLength = responseOptions.maxPasswordLength;\n }\n if (responseOptions.containsLowercaseCharacter !== undefined) {\n this.customStrengthOptions.containsLowercaseLetter = responseOptions.containsLowercaseCharacter;\n }\n if (responseOptions.containsUppercaseCharacter !== undefined) {\n this.customStrengthOptions.containsUppercaseLetter = responseOptions.containsUppercaseCharacter;\n }\n if (responseOptions.containsNumericCharacter !== undefined) {\n this.customStrengthOptions.containsNumericCharacter = responseOptions.containsNumericCharacter;\n }\n if (responseOptions.containsNonAlphanumericCharacter !== undefined) {\n this.customStrengthOptions.containsNonAlphanumericCharacter = responseOptions.containsNonAlphanumericCharacter;\n }\n this.enforcementState = response.enforcementState;\n if (this.enforcementState === 'ENFORCEMENT_STATE_UNSPECIFIED') {\n this.enforcementState = 'OFF';\n }\n // Use an empty string if no non-alphanumeric characters are specified in the response.\n this.allowedNonAlphanumericCharacters = (_c = (_b = response.allowedNonAlphanumericCharacters) === null || _b === void 0 ? void 0 : _b.join('')) !== null && _c !== void 0 ? _c : '';\n this.forceUpgradeOnSignin = (_d = response.forceUpgradeOnSignin) !== null && _d !== void 0 ? _d : false;\n this.schemaVersion = response.schemaVersion;\n }\n validatePassword(password) {\n var _a, _b, _c, _d, _e, _f;\n const status = {\n isValid: true,\n passwordPolicy: this\n };\n // Check the password length and character options.\n this.validatePasswordLengthOptions(password, status);\n this.validatePasswordCharacterOptions(password, status);\n // Combine the status into single isValid property.\n status.isValid && (status.isValid = (_a = status.meetsMinPasswordLength) !== null && _a !== void 0 ? _a : true);\n status.isValid && (status.isValid = (_b = status.meetsMaxPasswordLength) !== null && _b !== void 0 ? _b : true);\n status.isValid && (status.isValid = (_c = status.containsLowercaseLetter) !== null && _c !== void 0 ? _c : true);\n status.isValid && (status.isValid = (_d = status.containsUppercaseLetter) !== null && _d !== void 0 ? _d : true);\n status.isValid && (status.isValid = (_e = status.containsNumericCharacter) !== null && _e !== void 0 ? _e : true);\n status.isValid && (status.isValid = (_f = status.containsNonAlphanumericCharacter) !== null && _f !== void 0 ? _f : true);\n return status;\n }\n /**\r\n * Validates that the password meets the length options for the policy.\r\n *\r\n * @param password Password to validate.\r\n * @param status Validation status.\r\n */\n validatePasswordLengthOptions(password, status) {\n const minPasswordLength = this.customStrengthOptions.minPasswordLength;\n const maxPasswordLength = this.customStrengthOptions.maxPasswordLength;\n if (minPasswordLength) {\n status.meetsMinPasswordLength = password.length >= minPasswordLength;\n }\n if (maxPasswordLength) {\n status.meetsMaxPasswordLength = password.length <= maxPasswordLength;\n }\n }\n /**\r\n * Validates that the password meets the character options for the policy.\r\n *\r\n * @param password Password to validate.\r\n * @param status Validation status.\r\n */\n validatePasswordCharacterOptions(password, status) {\n // Assign statuses for requirements even if the password is an empty string.\n this.updatePasswordCharacterOptionsStatuses(status, /* containsLowercaseCharacter= */false, /* containsUppercaseCharacter= */false, /* containsNumericCharacter= */false, /* containsNonAlphanumericCharacter= */false);\n let passwordChar;\n for (let i = 0; i < password.length; i++) {\n passwordChar = password.charAt(i);\n this.updatePasswordCharacterOptionsStatuses(status, /* containsLowercaseCharacter= */passwordChar >= 'a' && passwordChar <= 'z', /* containsUppercaseCharacter= */passwordChar >= 'A' && passwordChar <= 'Z', /* containsNumericCharacter= */passwordChar >= '0' && passwordChar <= '9', /* containsNonAlphanumericCharacter= */this.allowedNonAlphanumericCharacters.includes(passwordChar));\n }\n }\n /**\r\n * Updates the running validation status with the statuses for the character options.\r\n * Expected to be called each time a character is processed to update each option status\r\n * based on the current character.\r\n *\r\n * @param status Validation status.\r\n * @param containsLowercaseCharacter Whether the character is a lowercase letter.\r\n * @param containsUppercaseCharacter Whether the character is an uppercase letter.\r\n * @param containsNumericCharacter Whether the character is a numeric character.\r\n * @param containsNonAlphanumericCharacter Whether the character is a non-alphanumeric character.\r\n */\n updatePasswordCharacterOptionsStatuses(status, containsLowercaseCharacter, containsUppercaseCharacter, containsNumericCharacter, containsNonAlphanumericCharacter) {\n if (this.customStrengthOptions.containsLowercaseLetter) {\n status.containsLowercaseLetter || (status.containsLowercaseLetter = containsLowercaseCharacter);\n }\n if (this.customStrengthOptions.containsUppercaseLetter) {\n status.containsUppercaseLetter || (status.containsUppercaseLetter = containsUppercaseCharacter);\n }\n if (this.customStrengthOptions.containsNumericCharacter) {\n status.containsNumericCharacter || (status.containsNumericCharacter = containsNumericCharacter);\n }\n if (this.customStrengthOptions.containsNonAlphanumericCharacter) {\n status.containsNonAlphanumericCharacter || (status.containsNonAlphanumericCharacter = containsNonAlphanumericCharacter);\n }\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass AuthImpl {\n constructor(app, heartbeatServiceProvider, appCheckServiceProvider, config) {\n this.app = app;\n this.heartbeatServiceProvider = heartbeatServiceProvider;\n this.appCheckServiceProvider = appCheckServiceProvider;\n this.config = config;\n this.currentUser = null;\n this.emulatorConfig = null;\n this.operations = Promise.resolve();\n this.authStateSubscription = new Subscription(this);\n this.idTokenSubscription = new Subscription(this);\n this.beforeStateQueue = new AuthMiddlewareQueue(this);\n this.redirectUser = null;\n this.isProactiveRefreshEnabled = false;\n this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION = 1;\n // Any network calls will set this to true and prevent subsequent emulator\n // initialization\n this._canInitEmulator = true;\n this._isInitialized = false;\n this._deleted = false;\n this._initializationPromise = null;\n this._popupRedirectResolver = null;\n this._errorFactory = _DEFAULT_AUTH_ERROR_FACTORY;\n this._agentRecaptchaConfig = null;\n this._tenantRecaptchaConfigs = {};\n this._projectPasswordPolicy = null;\n this._tenantPasswordPolicies = {};\n // Tracks the last notified UID for state change listeners to prevent\n // repeated calls to the callbacks. Undefined means it's never been\n // called, whereas null means it's been called with a signed out user\n this.lastNotifiedUid = undefined;\n this.languageCode = null;\n this.tenantId = null;\n this.settings = {\n appVerificationDisabledForTesting: false\n };\n this.frameworks = [];\n this.name = app.name;\n this.clientVersion = config.sdkClientVersion;\n }\n _initializeWithPersistence(persistenceHierarchy, popupRedirectResolver) {\n if (popupRedirectResolver) {\n this._popupRedirectResolver = _getInstance(popupRedirectResolver);\n }\n // Have to check for app deletion throughout initialization (after each\n // promise resolution)\n this._initializationPromise = this.queue(async () => {\n var _a, _b;\n if (this._deleted) {\n return;\n }\n this.persistenceManager = await PersistenceUserManager.create(this, persistenceHierarchy);\n if (this._deleted) {\n return;\n }\n // Initialize the resolver early if necessary (only applicable to web:\n // this will cause the iframe to load immediately in certain cases)\n if ((_a = this._popupRedirectResolver) === null || _a === void 0 ? void 0 : _a._shouldInitProactively) {\n // If this fails, don't halt auth loading\n try {\n await this._popupRedirectResolver._initialize(this);\n } catch (e) {\n /* Ignore the error */\n }\n }\n await this.initializeCurrentUser(popupRedirectResolver);\n this.lastNotifiedUid = ((_b = this.currentUser) === null || _b === void 0 ? void 0 : _b.uid) || null;\n if (this._deleted) {\n return;\n }\n this._isInitialized = true;\n });\n return this._initializationPromise;\n }\n /**\r\n * If the persistence is changed in another window, the user manager will let us know\r\n */\n async _onStorageEvent() {\n if (this._deleted) {\n return;\n }\n const user = await this.assertedPersistence.getCurrentUser();\n if (!this.currentUser && !user) {\n // No change, do nothing (was signed out and remained signed out).\n return;\n }\n // If the same user is to be synchronized.\n if (this.currentUser && user && this.currentUser.uid === user.uid) {\n // Data update, simply copy data changes.\n this._currentUser._assign(user);\n // If tokens changed from previous user tokens, this will trigger\n // notifyAuthListeners_.\n await this.currentUser.getIdToken();\n return;\n }\n // Update current Auth state. Either a new login or logout.\n // Skip blocking callbacks, they should not apply to a change in another tab.\n await this._updateCurrentUser(user, /* skipBeforeStateCallbacks */true);\n }\n async initializeCurrentUser(popupRedirectResolver) {\n var _a;\n // First check to see if we have a pending redirect event.\n const previouslyStoredUser = await this.assertedPersistence.getCurrentUser();\n let futureCurrentUser = previouslyStoredUser;\n let needsTocheckMiddleware = false;\n if (popupRedirectResolver && this.config.authDomain) {\n await this.getOrInitRedirectPersistenceManager();\n const redirectUserEventId = (_a = this.redirectUser) === null || _a === void 0 ? void 0 : _a._redirectEventId;\n const storedUserEventId = futureCurrentUser === null || futureCurrentUser === void 0 ? void 0 : futureCurrentUser._redirectEventId;\n const result = await this.tryRedirectSignIn(popupRedirectResolver);\n // If the stored user (i.e. the old \"currentUser\") has a redirectId that\n // matches the redirect user, then we want to initially sign in with the\n // new user object from result.\n // TODO(samgho): More thoroughly test all of this\n if ((!redirectUserEventId || redirectUserEventId === storedUserEventId) && (result === null || result === void 0 ? void 0 : result.user)) {\n futureCurrentUser = result.user;\n needsTocheckMiddleware = true;\n }\n }\n // If no user in persistence, there is no current user. Set to null.\n if (!futureCurrentUser) {\n return this.directlySetCurrentUser(null);\n }\n if (!futureCurrentUser._redirectEventId) {\n // This isn't a redirect link operation, we can reload and bail.\n // First though, ensure that we check the middleware is happy.\n if (needsTocheckMiddleware) {\n try {\n await this.beforeStateQueue.runMiddleware(futureCurrentUser);\n } catch (e) {\n futureCurrentUser = previouslyStoredUser;\n // We know this is available since the bit is only set when the\n // resolver is available\n this._popupRedirectResolver._overrideRedirectResult(this, () => Promise.reject(e));\n }\n }\n if (futureCurrentUser) {\n return this.reloadAndSetCurrentUserOrClear(futureCurrentUser);\n } else {\n return this.directlySetCurrentUser(null);\n }\n }\n _assert(this._popupRedirectResolver, this, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n await this.getOrInitRedirectPersistenceManager();\n // If the redirect user's event ID matches the current user's event ID,\n // DO NOT reload the current user, otherwise they'll be cleared from storage.\n // This is important for the reauthenticateWithRedirect() flow.\n if (this.redirectUser && this.redirectUser._redirectEventId === futureCurrentUser._redirectEventId) {\n return this.directlySetCurrentUser(futureCurrentUser);\n }\n return this.reloadAndSetCurrentUserOrClear(futureCurrentUser);\n }\n async tryRedirectSignIn(redirectResolver) {\n // The redirect user needs to be checked (and signed in if available)\n // during auth initialization. All of the normal sign in and link/reauth\n // flows call back into auth and push things onto the promise queue. We\n // need to await the result of the redirect sign in *inside the promise\n // queue*. This presents a problem: we run into deadlock. See:\n // ┌> [Initialization] ─────┐\n // ┌> [] │\n // └─ [getRedirectResult] <─┘\n // where [] are tasks on the queue and arrows denote awaits\n // Initialization will never complete because it's waiting on something\n // that's waiting for initialization to complete!\n //\n // Instead, this method calls getRedirectResult() (stored in\n // _completeRedirectFn) with an optional parameter that instructs all of\n // the underlying auth operations to skip anything that mutates auth state.\n let result = null;\n try {\n // We know this._popupRedirectResolver is set since redirectResolver\n // is passed in. The _completeRedirectFn expects the unwrapped extern.\n result = await this._popupRedirectResolver._completeRedirectFn(this, redirectResolver, true);\n } catch (e) {\n // Swallow any errors here; the code can retrieve them in\n // getRedirectResult().\n await this._setRedirectUser(null);\n }\n return result;\n }\n async reloadAndSetCurrentUserOrClear(user) {\n try {\n await _reloadWithoutSaving(user);\n } catch (e) {\n if ((e === null || e === void 0 ? void 0 : e.code) !== `auth/${\"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */}`) {\n // Something's wrong with the user's token. Log them out and remove\n // them from storage\n return this.directlySetCurrentUser(null);\n }\n }\n return this.directlySetCurrentUser(user);\n }\n useDeviceLanguage() {\n this.languageCode = _getUserLanguage();\n }\n async _delete() {\n this._deleted = true;\n }\n async updateCurrentUser(userExtern) {\n // The public updateCurrentUser method needs to make a copy of the user,\n // and also check that the project matches\n const user = userExtern ? getModularInstance(userExtern) : null;\n if (user) {\n _assert(user.auth.config.apiKey === this.config.apiKey, this, \"invalid-user-token\" /* AuthErrorCode.INVALID_AUTH */);\n }\n return this._updateCurrentUser(user && user._clone(this));\n }\n async _updateCurrentUser(user, skipBeforeStateCallbacks = false) {\n if (this._deleted) {\n return;\n }\n if (user) {\n _assert(this.tenantId === user.tenantId, this, \"tenant-id-mismatch\" /* AuthErrorCode.TENANT_ID_MISMATCH */);\n }\n if (!skipBeforeStateCallbacks) {\n await this.beforeStateQueue.runMiddleware(user);\n }\n return this.queue(async () => {\n await this.directlySetCurrentUser(user);\n this.notifyAuthListeners();\n });\n }\n async signOut() {\n // Run first, to block _setRedirectUser() if any callbacks fail.\n await this.beforeStateQueue.runMiddleware(null);\n // Clear the redirect user when signOut is called\n if (this.redirectPersistenceManager || this._popupRedirectResolver) {\n await this._setRedirectUser(null);\n }\n // Prevent callbacks from being called again in _updateCurrentUser, as\n // they were already called in the first line.\n return this._updateCurrentUser(null, /* skipBeforeStateCallbacks */true);\n }\n setPersistence(persistence) {\n return this.queue(async () => {\n await this.assertedPersistence.setPersistence(_getInstance(persistence));\n });\n }\n _getRecaptchaConfig() {\n if (this.tenantId == null) {\n return this._agentRecaptchaConfig;\n } else {\n return this._tenantRecaptchaConfigs[this.tenantId];\n }\n }\n async validatePassword(password) {\n if (!this._getPasswordPolicyInternal()) {\n await this._updatePasswordPolicy();\n }\n // Password policy will be defined after fetching.\n const passwordPolicy = this._getPasswordPolicyInternal();\n // Check that the policy schema version is supported by the SDK.\n // TODO: Update this logic to use a max supported policy schema version once we have multiple schema versions.\n if (passwordPolicy.schemaVersion !== this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION) {\n return Promise.reject(this._errorFactory.create(\"unsupported-password-policy-schema-version\" /* AuthErrorCode.UNSUPPORTED_PASSWORD_POLICY_SCHEMA_VERSION */, {}));\n }\n return passwordPolicy.validatePassword(password);\n }\n _getPasswordPolicyInternal() {\n if (this.tenantId === null) {\n return this._projectPasswordPolicy;\n } else {\n return this._tenantPasswordPolicies[this.tenantId];\n }\n }\n async _updatePasswordPolicy() {\n const response = await _getPasswordPolicy(this);\n const passwordPolicy = new PasswordPolicyImpl(response);\n if (this.tenantId === null) {\n this._projectPasswordPolicy = passwordPolicy;\n } else {\n this._tenantPasswordPolicies[this.tenantId] = passwordPolicy;\n }\n }\n _getPersistence() {\n return this.assertedPersistence.persistence.type;\n }\n _updateErrorMap(errorMap) {\n this._errorFactory = new ErrorFactory('auth', 'Firebase', errorMap());\n }\n onAuthStateChanged(nextOrObserver, error, completed) {\n return this.registerStateListener(this.authStateSubscription, nextOrObserver, error, completed);\n }\n beforeAuthStateChanged(callback, onAbort) {\n return this.beforeStateQueue.pushCallback(callback, onAbort);\n }\n onIdTokenChanged(nextOrObserver, error, completed) {\n return this.registerStateListener(this.idTokenSubscription, nextOrObserver, error, completed);\n }\n authStateReady() {\n return new Promise((resolve, reject) => {\n if (this.currentUser) {\n resolve();\n } else {\n const unsubscribe = this.onAuthStateChanged(() => {\n unsubscribe();\n resolve();\n }, reject);\n }\n });\n }\n /**\r\n * Revokes the given access token. Currently only supports Apple OAuth access tokens.\r\n */\n async revokeAccessToken(token) {\n if (this.currentUser) {\n const idToken = await this.currentUser.getIdToken();\n // Generalize this to accept other providers once supported.\n const request = {\n providerId: 'apple.com',\n tokenType: \"ACCESS_TOKEN\" /* TokenType.ACCESS_TOKEN */,\n token,\n idToken\n };\n if (this.tenantId != null) {\n request.tenantId = this.tenantId;\n }\n await revokeToken(this, request);\n }\n }\n toJSON() {\n var _a;\n return {\n apiKey: this.config.apiKey,\n authDomain: this.config.authDomain,\n appName: this.name,\n currentUser: (_a = this._currentUser) === null || _a === void 0 ? void 0 : _a.toJSON()\n };\n }\n async _setRedirectUser(user, popupRedirectResolver) {\n const redirectManager = await this.getOrInitRedirectPersistenceManager(popupRedirectResolver);\n return user === null ? redirectManager.removeCurrentUser() : redirectManager.setCurrentUser(user);\n }\n async getOrInitRedirectPersistenceManager(popupRedirectResolver) {\n if (!this.redirectPersistenceManager) {\n const resolver = popupRedirectResolver && _getInstance(popupRedirectResolver) || this._popupRedirectResolver;\n _assert(resolver, this, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n this.redirectPersistenceManager = await PersistenceUserManager.create(this, [_getInstance(resolver._redirectPersistence)], \"redirectUser\" /* KeyName.REDIRECT_USER */);\n this.redirectUser = await this.redirectPersistenceManager.getCurrentUser();\n }\n return this.redirectPersistenceManager;\n }\n async _redirectUserForId(id) {\n var _a, _b;\n // Make sure we've cleared any pending persistence actions if we're not in\n // the initializer\n if (this._isInitialized) {\n await this.queue(async () => {});\n }\n if (((_a = this._currentUser) === null || _a === void 0 ? void 0 : _a._redirectEventId) === id) {\n return this._currentUser;\n }\n if (((_b = this.redirectUser) === null || _b === void 0 ? void 0 : _b._redirectEventId) === id) {\n return this.redirectUser;\n }\n return null;\n }\n async _persistUserIfCurrent(user) {\n if (user === this.currentUser) {\n return this.queue(async () => this.directlySetCurrentUser(user));\n }\n }\n /** Notifies listeners only if the user is current */\n _notifyListenersIfCurrent(user) {\n if (user === this.currentUser) {\n this.notifyAuthListeners();\n }\n }\n _key() {\n return `${this.config.authDomain}:${this.config.apiKey}:${this.name}`;\n }\n _startProactiveRefresh() {\n this.isProactiveRefreshEnabled = true;\n if (this.currentUser) {\n this._currentUser._startProactiveRefresh();\n }\n }\n _stopProactiveRefresh() {\n this.isProactiveRefreshEnabled = false;\n if (this.currentUser) {\n this._currentUser._stopProactiveRefresh();\n }\n }\n /** Returns the current user cast as the internal type */\n get _currentUser() {\n return this.currentUser;\n }\n notifyAuthListeners() {\n var _a, _b;\n if (!this._isInitialized) {\n return;\n }\n this.idTokenSubscription.next(this.currentUser);\n const currentUid = (_b = (_a = this.currentUser) === null || _a === void 0 ? void 0 : _a.uid) !== null && _b !== void 0 ? _b : null;\n if (this.lastNotifiedUid !== currentUid) {\n this.lastNotifiedUid = currentUid;\n this.authStateSubscription.next(this.currentUser);\n }\n }\n registerStateListener(subscription, nextOrObserver, error, completed) {\n if (this._deleted) {\n return () => {};\n }\n const cb = typeof nextOrObserver === 'function' ? nextOrObserver : nextOrObserver.next.bind(nextOrObserver);\n let isUnsubscribed = false;\n const promise = this._isInitialized ? Promise.resolve() : this._initializationPromise;\n _assert(promise, this, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n // The callback needs to be called asynchronously per the spec.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n promise.then(() => {\n if (isUnsubscribed) {\n return;\n }\n cb(this.currentUser);\n });\n if (typeof nextOrObserver === 'function') {\n const unsubscribe = subscription.addObserver(nextOrObserver, error, completed);\n return () => {\n isUnsubscribed = true;\n unsubscribe();\n };\n } else {\n const unsubscribe = subscription.addObserver(nextOrObserver);\n return () => {\n isUnsubscribed = true;\n unsubscribe();\n };\n }\n }\n /**\r\n * Unprotected (from race conditions) method to set the current user. This\r\n * should only be called from within a queued callback. This is necessary\r\n * because the queue shouldn't rely on another queued callback.\r\n */\n async directlySetCurrentUser(user) {\n if (this.currentUser && this.currentUser !== user) {\n this._currentUser._stopProactiveRefresh();\n }\n if (user && this.isProactiveRefreshEnabled) {\n user._startProactiveRefresh();\n }\n this.currentUser = user;\n if (user) {\n await this.assertedPersistence.setCurrentUser(user);\n } else {\n await this.assertedPersistence.removeCurrentUser();\n }\n }\n queue(action) {\n // In case something errors, the callback still should be called in order\n // to keep the promise chain alive\n this.operations = this.operations.then(action, action);\n return this.operations;\n }\n get assertedPersistence() {\n _assert(this.persistenceManager, this, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n return this.persistenceManager;\n }\n _logFramework(framework) {\n if (!framework || this.frameworks.includes(framework)) {\n return;\n }\n this.frameworks.push(framework);\n // Sort alphabetically so that \"FirebaseCore-web,FirebaseUI-web\" and\n // \"FirebaseUI-web,FirebaseCore-web\" aren't viewed as different.\n this.frameworks.sort();\n this.clientVersion = _getClientVersion(this.config.clientPlatform, this._getFrameworks());\n }\n _getFrameworks() {\n return this.frameworks;\n }\n async _getAdditionalHeaders() {\n var _a;\n // Additional headers on every request\n const headers = {\n [\"X-Client-Version\" /* HttpHeader.X_CLIENT_VERSION */]: this.clientVersion\n };\n if (this.app.options.appId) {\n headers[\"X-Firebase-gmpid\" /* HttpHeader.X_FIREBASE_GMPID */] = this.app.options.appId;\n }\n // If the heartbeat service exists, add the heartbeat string\n const heartbeatsHeader = await ((_a = this.heartbeatServiceProvider.getImmediate({\n optional: true\n })) === null || _a === void 0 ? void 0 : _a.getHeartbeatsHeader());\n if (heartbeatsHeader) {\n headers[\"X-Firebase-Client\" /* HttpHeader.X_FIREBASE_CLIENT */] = heartbeatsHeader;\n }\n // If the App Check service exists, add the App Check token in the headers\n const appCheckToken = await this._getAppCheckToken();\n if (appCheckToken) {\n headers[\"X-Firebase-AppCheck\" /* HttpHeader.X_FIREBASE_APP_CHECK */] = appCheckToken;\n }\n return headers;\n }\n async _getAppCheckToken() {\n var _a;\n const appCheckTokenResult = await ((_a = this.appCheckServiceProvider.getImmediate({\n optional: true\n })) === null || _a === void 0 ? void 0 : _a.getToken());\n if (appCheckTokenResult === null || appCheckTokenResult === void 0 ? void 0 : appCheckTokenResult.error) {\n // Context: appCheck.getToken() will never throw even if an error happened.\n // In the error case, a dummy token will be returned along with an error field describing\n // the error. In general, we shouldn't care about the error condition and just use\n // the token (actual or dummy) to send requests.\n _logWarn(`Error while retrieving App Check token: ${appCheckTokenResult.error}`);\n }\n return appCheckTokenResult === null || appCheckTokenResult === void 0 ? void 0 : appCheckTokenResult.token;\n }\n}\n/**\r\n * Method to be used to cast down to our private implmentation of Auth.\r\n * It will also handle unwrapping from the compat type if necessary\r\n *\r\n * @param auth Auth object passed in from developer\r\n */\nfunction _castAuth(auth) {\n return getModularInstance(auth);\n}\n/** Helper class to wrap subscriber logic */\nclass Subscription {\n constructor(auth) {\n this.auth = auth;\n this.observer = null;\n this.addObserver = createSubscribe(observer => this.observer = observer);\n }\n get next() {\n _assert(this.observer, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n return this.observer.next.bind(this.observer);\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction getScriptParentElement() {\n var _a, _b;\n return (_b = (_a = document.getElementsByTagName('head')) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : document;\n}\nfunction _loadJS(url) {\n // TODO: consider adding timeout support & cancellation\n return new Promise((resolve, reject) => {\n const el = document.createElement('script');\n el.setAttribute('src', url);\n el.onload = resolve;\n el.onerror = e => {\n const error = _createError(\"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n error.customData = e;\n reject(error);\n };\n el.type = 'text/javascript';\n el.charset = 'UTF-8';\n getScriptParentElement().appendChild(el);\n });\n}\nfunction _generateCallbackName(prefix) {\n return `__${prefix}${Math.floor(Math.random() * 1000000)}`;\n}\n\n/* eslint-disable @typescript-eslint/no-require-imports */\nconst RECAPTCHA_ENTERPRISE_URL = 'https://www.google.com/recaptcha/enterprise.js?render=';\nconst RECAPTCHA_ENTERPRISE_VERIFIER_TYPE = 'recaptcha-enterprise';\nconst FAKE_TOKEN = 'NO_RECAPTCHA';\nclass RecaptchaEnterpriseVerifier {\n /**\r\n *\r\n * @param authExtern - The corresponding Firebase {@link Auth} instance.\r\n *\r\n */\n constructor(authExtern) {\n /**\r\n * Identifies the type of application verifier (e.g. \"recaptcha-enterprise\").\r\n */\n this.type = RECAPTCHA_ENTERPRISE_VERIFIER_TYPE;\n this.auth = _castAuth(authExtern);\n }\n /**\r\n * Executes the verification process.\r\n *\r\n * @returns A Promise for a token that can be used to assert the validity of a request.\r\n */\n async verify(action = 'verify', forceRefresh = false) {\n async function retrieveSiteKey(auth) {\n if (!forceRefresh) {\n if (auth.tenantId == null && auth._agentRecaptchaConfig != null) {\n return auth._agentRecaptchaConfig.siteKey;\n }\n if (auth.tenantId != null && auth._tenantRecaptchaConfigs[auth.tenantId] !== undefined) {\n return auth._tenantRecaptchaConfigs[auth.tenantId].siteKey;\n }\n }\n return new Promise(async (resolve, reject) => {\n getRecaptchaConfig(auth, {\n clientType: \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */,\n version: \"RECAPTCHA_ENTERPRISE\" /* RecaptchaVersion.ENTERPRISE */\n }).then(response => {\n if (response.recaptchaKey === undefined) {\n reject(new Error('recaptcha Enterprise site key undefined'));\n } else {\n const config = new RecaptchaConfig(response);\n if (auth.tenantId == null) {\n auth._agentRecaptchaConfig = config;\n } else {\n auth._tenantRecaptchaConfigs[auth.tenantId] = config;\n }\n return resolve(config.siteKey);\n }\n }).catch(error => {\n reject(error);\n });\n });\n }\n function retrieveRecaptchaToken(siteKey, resolve, reject) {\n const grecaptcha = window.grecaptcha;\n if (isEnterprise(grecaptcha)) {\n grecaptcha.enterprise.ready(() => {\n grecaptcha.enterprise.execute(siteKey, {\n action\n }).then(token => {\n resolve(token);\n }).catch(() => {\n resolve(FAKE_TOKEN);\n });\n });\n } else {\n reject(Error('No reCAPTCHA enterprise script loaded.'));\n }\n }\n return new Promise((resolve, reject) => {\n retrieveSiteKey(this.auth).then(siteKey => {\n if (!forceRefresh && isEnterprise(window.grecaptcha)) {\n retrieveRecaptchaToken(siteKey, resolve, reject);\n } else {\n if (typeof window === 'undefined') {\n reject(new Error('RecaptchaVerifier is only supported in browser'));\n return;\n }\n _loadJS(RECAPTCHA_ENTERPRISE_URL + siteKey).then(() => {\n retrieveRecaptchaToken(siteKey, resolve, reject);\n }).catch(error => {\n reject(error);\n });\n }\n }).catch(error => {\n reject(error);\n });\n });\n }\n}\nasync function injectRecaptchaFields(auth, request, action, captchaResp = false) {\n const verifier = new RecaptchaEnterpriseVerifier(auth);\n let captchaResponse;\n try {\n captchaResponse = await verifier.verify(action);\n } catch (error) {\n captchaResponse = await verifier.verify(action, true);\n }\n const newRequest = Object.assign({}, request);\n if (!captchaResp) {\n Object.assign(newRequest, {\n captchaResponse\n });\n } else {\n Object.assign(newRequest, {\n 'captchaResp': captchaResponse\n });\n }\n Object.assign(newRequest, {\n 'clientType': \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */\n });\n Object.assign(newRequest, {\n 'recaptchaVersion': \"RECAPTCHA_ENTERPRISE\" /* RecaptchaVersion.ENTERPRISE */\n });\n return newRequest;\n}\nasync function handleRecaptchaFlow(authInstance, request, actionName, actionMethod) {\n var _a;\n if ((_a = authInstance._getRecaptchaConfig()) === null || _a === void 0 ? void 0 : _a.isProviderEnabled(\"EMAIL_PASSWORD_PROVIDER\" /* RecaptchaProvider.EMAIL_PASSWORD_PROVIDER */)) {\n const requestWithRecaptcha = await injectRecaptchaFields(authInstance, request, actionName, actionName === \"getOobCode\" /* RecaptchaActionName.GET_OOB_CODE */);\n return actionMethod(authInstance, requestWithRecaptcha);\n } else {\n return actionMethod(authInstance, request).catch(async error => {\n if (error.code === `auth/${\"missing-recaptcha-token\" /* AuthErrorCode.MISSING_RECAPTCHA_TOKEN */}`) {\n console.log(`${actionName} is protected by reCAPTCHA Enterprise for this project. Automatically triggering the reCAPTCHA flow and restarting the flow.`);\n const requestWithRecaptcha = await injectRecaptchaFields(authInstance, request, actionName, actionName === \"getOobCode\" /* RecaptchaActionName.GET_OOB_CODE */);\n return actionMethod(authInstance, requestWithRecaptcha);\n } else {\n return Promise.reject(error);\n }\n });\n }\n}\nasync function _initializeRecaptchaConfig(auth) {\n const authInternal = _castAuth(auth);\n const response = await getRecaptchaConfig(authInternal, {\n clientType: \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */,\n version: \"RECAPTCHA_ENTERPRISE\" /* RecaptchaVersion.ENTERPRISE */\n });\n const config = new RecaptchaConfig(response);\n if (authInternal.tenantId == null) {\n authInternal._agentRecaptchaConfig = config;\n } else {\n authInternal._tenantRecaptchaConfigs[authInternal.tenantId] = config;\n }\n if (config.isProviderEnabled(\"EMAIL_PASSWORD_PROVIDER\" /* RecaptchaProvider.EMAIL_PASSWORD_PROVIDER */)) {\n const verifier = new RecaptchaEnterpriseVerifier(authInternal);\n void verifier.verify();\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Initializes an {@link Auth} instance with fine-grained control over\r\n * {@link Dependencies}.\r\n *\r\n * @remarks\r\n *\r\n * This function allows more control over the {@link Auth} instance than\r\n * {@link getAuth}. `getAuth` uses platform-specific defaults to supply\r\n * the {@link Dependencies}. In general, `getAuth` is the easiest way to\r\n * initialize Auth and works for most use cases. Use `initializeAuth` if you\r\n * need control over which persistence layer is used, or to minimize bundle\r\n * size if you're not using either `signInWithPopup` or `signInWithRedirect`.\r\n *\r\n * For example, if your app only uses anonymous accounts and you only want\r\n * accounts saved for the current session, initialize `Auth` with:\r\n *\r\n * ```js\r\n * const auth = initializeAuth(app, {\r\n * persistence: browserSessionPersistence,\r\n * popupRedirectResolver: undefined,\r\n * });\r\n * ```\r\n *\r\n * @public\r\n */\nfunction initializeAuth(app, deps) {\n const provider = _getProvider(app, 'auth');\n if (provider.isInitialized()) {\n const auth = provider.getImmediate();\n const initialOptions = provider.getOptions();\n if (deepEqual(initialOptions, deps !== null && deps !== void 0 ? deps : {})) {\n return auth;\n } else {\n _fail(auth, \"already-initialized\" /* AuthErrorCode.ALREADY_INITIALIZED */);\n }\n }\n const auth = provider.initialize({\n options: deps\n });\n return auth;\n}\nfunction _initializeAuthInstance(auth, deps) {\n const persistence = (deps === null || deps === void 0 ? void 0 : deps.persistence) || [];\n const hierarchy = (Array.isArray(persistence) ? persistence : [persistence]).map(_getInstance);\n if (deps === null || deps === void 0 ? void 0 : deps.errorMap) {\n auth._updateErrorMap(deps.errorMap);\n }\n // This promise is intended to float; auth initialization happens in the\n // background, meanwhile the auth object may be used by the app.\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n auth._initializeWithPersistence(hierarchy, deps === null || deps === void 0 ? void 0 : deps.popupRedirectResolver);\n}\n\n/**\r\n * Changes the {@link Auth} instance to communicate with the Firebase Auth Emulator, instead of production\r\n * Firebase Auth services.\r\n *\r\n * @remarks\r\n * This must be called synchronously immediately following the first call to\r\n * {@link initializeAuth}. Do not use with production credentials as emulator\r\n * traffic is not encrypted.\r\n *\r\n *\r\n * @example\r\n * ```javascript\r\n * connectAuthEmulator(auth, 'http://127.0.0.1:9099', { disableWarnings: true });\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param url - The URL at which the emulator is running (eg, 'http://localhost:9099').\r\n * @param options - Optional. `options.disableWarnings` defaults to `false`. Set it to\r\n * `true` to disable the warning banner attached to the DOM.\r\n *\r\n * @public\r\n */\nfunction connectAuthEmulator(auth, url, options) {\n const authInternal = _castAuth(auth);\n _assert(authInternal._canInitEmulator, authInternal, \"emulator-config-failed\" /* AuthErrorCode.EMULATOR_CONFIG_FAILED */);\n _assert(/^https?:\\/\\//.test(url), authInternal, \"invalid-emulator-scheme\" /* AuthErrorCode.INVALID_EMULATOR_SCHEME */);\n const disableWarnings = !!(options === null || options === void 0 ? void 0 : options.disableWarnings);\n const protocol = extractProtocol(url);\n const {\n host,\n port\n } = extractHostAndPort(url);\n const portStr = port === null ? '' : `:${port}`;\n // Always replace path with \"/\" (even if input url had no path at all, or had a different one).\n authInternal.config.emulator = {\n url: `${protocol}//${host}${portStr}/`\n };\n authInternal.settings.appVerificationDisabledForTesting = true;\n authInternal.emulatorConfig = Object.freeze({\n host,\n port,\n protocol: protocol.replace(':', ''),\n options: Object.freeze({\n disableWarnings\n })\n });\n if (!disableWarnings) {\n emitEmulatorWarning();\n }\n}\nfunction extractProtocol(url) {\n const protocolEnd = url.indexOf(':');\n return protocolEnd < 0 ? '' : url.substr(0, protocolEnd + 1);\n}\nfunction extractHostAndPort(url) {\n const protocol = extractProtocol(url);\n const authority = /(\\/\\/)?([^?#/]+)/.exec(url.substr(protocol.length)); // Between // and /, ? or #.\n if (!authority) {\n return {\n host: '',\n port: null\n };\n }\n const hostAndPort = authority[2].split('@').pop() || ''; // Strip out \"username:password@\".\n const bracketedIPv6 = /^(\\[[^\\]]+\\])(:|$)/.exec(hostAndPort);\n if (bracketedIPv6) {\n const host = bracketedIPv6[1];\n return {\n host,\n port: parsePort(hostAndPort.substr(host.length + 1))\n };\n } else {\n const [host, port] = hostAndPort.split(':');\n return {\n host,\n port: parsePort(port)\n };\n }\n}\nfunction parsePort(portStr) {\n if (!portStr) {\n return null;\n }\n const port = Number(portStr);\n if (isNaN(port)) {\n return null;\n }\n return port;\n}\nfunction emitEmulatorWarning() {\n function attachBanner() {\n const el = document.createElement('p');\n const sty = el.style;\n el.innerText = 'Running in emulator mode. Do not use with production credentials.';\n sty.position = 'fixed';\n sty.width = '100%';\n sty.backgroundColor = '#ffffff';\n sty.border = '.1em solid #000000';\n sty.color = '#b50000';\n sty.bottom = '0px';\n sty.left = '0px';\n sty.margin = '0px';\n sty.zIndex = '10000';\n sty.textAlign = 'center';\n el.classList.add('firebase-emulator-warning');\n document.body.appendChild(el);\n }\n if (typeof console !== 'undefined' && typeof console.info === 'function') {\n console.info('WARNING: You are using the Auth Emulator,' + ' which is intended for local testing only. Do not use with' + ' production credentials.');\n }\n if (typeof window !== 'undefined' && typeof document !== 'undefined') {\n if (document.readyState === 'loading') {\n window.addEventListener('DOMContentLoaded', attachBanner);\n } else {\n attachBanner();\n }\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Interface that represents the credentials returned by an {@link AuthProvider}.\r\n *\r\n * @remarks\r\n * Implementations specify the details about each auth provider's credential requirements.\r\n *\r\n * @public\r\n */\nclass AuthCredential {\n /** @internal */\n constructor(\n /**\r\n * The authentication provider ID for the credential.\r\n *\r\n * @remarks\r\n * For example, 'facebook.com', or 'google.com'.\r\n */\n providerId,\n /**\r\n * The authentication sign in method for the credential.\r\n *\r\n * @remarks\r\n * For example, {@link SignInMethod}.EMAIL_PASSWORD, or\r\n * {@link SignInMethod}.EMAIL_LINK. This corresponds to the sign-in method\r\n * identifier as returned in {@link fetchSignInMethodsForEmail}.\r\n */\n signInMethod) {\n this.providerId = providerId;\n this.signInMethod = signInMethod;\n }\n /**\r\n * Returns a JSON-serializable representation of this object.\r\n *\r\n * @returns a JSON-serializable representation of this object.\r\n */\n toJSON() {\n return debugFail('not implemented');\n }\n /** @internal */\n _getIdTokenResponse(_auth) {\n return debugFail('not implemented');\n }\n /** @internal */\n _linkToIdToken(_auth, _idToken) {\n return debugFail('not implemented');\n }\n /** @internal */\n _getReauthenticationResolver(_auth) {\n return debugFail('not implemented');\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function resetPassword(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:resetPassword\" /* Endpoint.RESET_PASSWORD */, _addTidIfNecessary(auth, request));\n}\nasync function updateEmailPassword(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:update\" /* Endpoint.SET_ACCOUNT_INFO */, request);\n}\n// Used for linking an email/password account to an existing idToken. Uses the same request/response\n// format as updateEmailPassword.\nasync function linkEmailPassword(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signUp\" /* Endpoint.SIGN_UP */, request);\n}\nasync function applyActionCode$1(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:update\" /* Endpoint.SET_ACCOUNT_INFO */, _addTidIfNecessary(auth, request));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function signInWithPassword(auth, request) {\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithPassword\" /* Endpoint.SIGN_IN_WITH_PASSWORD */, _addTidIfNecessary(auth, request));\n}\nasync function sendOobCode(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:sendOobCode\" /* Endpoint.SEND_OOB_CODE */, _addTidIfNecessary(auth, request));\n}\nasync function sendEmailVerification$1(auth, request) {\n return sendOobCode(auth, request);\n}\nasync function sendPasswordResetEmail$1(auth, request) {\n return sendOobCode(auth, request);\n}\nasync function sendSignInLinkToEmail$1(auth, request) {\n return sendOobCode(auth, request);\n}\nasync function verifyAndChangeEmail(auth, request) {\n return sendOobCode(auth, request);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function signInWithEmailLink$1(auth, request) {\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithEmailLink\" /* Endpoint.SIGN_IN_WITH_EMAIL_LINK */, _addTidIfNecessary(auth, request));\n}\nasync function signInWithEmailLinkForLinking(auth, request) {\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithEmailLink\" /* Endpoint.SIGN_IN_WITH_EMAIL_LINK */, _addTidIfNecessary(auth, request));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Interface that represents the credentials returned by {@link EmailAuthProvider} for\r\n * {@link ProviderId}.PASSWORD\r\n *\r\n * @remarks\r\n * Covers both {@link SignInMethod}.EMAIL_PASSWORD and\r\n * {@link SignInMethod}.EMAIL_LINK.\r\n *\r\n * @public\r\n */\nclass EmailAuthCredential extends AuthCredential {\n /** @internal */\n constructor( /** @internal */\n _email, /** @internal */\n _password, signInMethod, /** @internal */\n _tenantId = null) {\n super(\"password\" /* ProviderId.PASSWORD */, signInMethod);\n this._email = _email;\n this._password = _password;\n this._tenantId = _tenantId;\n }\n /** @internal */\n static _fromEmailAndPassword(email, password) {\n return new EmailAuthCredential(email, password, \"password\" /* SignInMethod.EMAIL_PASSWORD */);\n }\n /** @internal */\n static _fromEmailAndCode(email, oobCode, tenantId = null) {\n return new EmailAuthCredential(email, oobCode, \"emailLink\" /* SignInMethod.EMAIL_LINK */, tenantId);\n }\n /** {@inheritdoc AuthCredential.toJSON} */\n toJSON() {\n return {\n email: this._email,\n password: this._password,\n signInMethod: this.signInMethod,\n tenantId: this._tenantId\n };\n }\n /**\r\n * Static method to deserialize a JSON representation of an object into an {@link AuthCredential}.\r\n *\r\n * @param json - Either `object` or the stringified representation of the object. When string is\r\n * provided, `JSON.parse` would be called first.\r\n *\r\n * @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.\r\n */\n static fromJSON(json) {\n const obj = typeof json === 'string' ? JSON.parse(json) : json;\n if ((obj === null || obj === void 0 ? void 0 : obj.email) && (obj === null || obj === void 0 ? void 0 : obj.password)) {\n if (obj.signInMethod === \"password\" /* SignInMethod.EMAIL_PASSWORD */) {\n return this._fromEmailAndPassword(obj.email, obj.password);\n } else if (obj.signInMethod === \"emailLink\" /* SignInMethod.EMAIL_LINK */) {\n return this._fromEmailAndCode(obj.email, obj.password, obj.tenantId);\n }\n }\n return null;\n }\n /** @internal */\n async _getIdTokenResponse(auth) {\n switch (this.signInMethod) {\n case \"password\" /* SignInMethod.EMAIL_PASSWORD */:\n const request = {\n returnSecureToken: true,\n email: this._email,\n password: this._password,\n clientType: \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */\n };\n return handleRecaptchaFlow(auth, request, \"signInWithPassword\" /* RecaptchaActionName.SIGN_IN_WITH_PASSWORD */, signInWithPassword);\n case \"emailLink\" /* SignInMethod.EMAIL_LINK */:\n return signInWithEmailLink$1(auth, {\n email: this._email,\n oobCode: this._password\n });\n default:\n _fail(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n }\n }\n /** @internal */\n async _linkToIdToken(auth, idToken) {\n switch (this.signInMethod) {\n case \"password\" /* SignInMethod.EMAIL_PASSWORD */:\n const request = {\n idToken,\n returnSecureToken: true,\n email: this._email,\n password: this._password,\n clientType: \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */\n };\n return handleRecaptchaFlow(auth, request, \"signUpPassword\" /* RecaptchaActionName.SIGN_UP_PASSWORD */, linkEmailPassword);\n case \"emailLink\" /* SignInMethod.EMAIL_LINK */:\n return signInWithEmailLinkForLinking(auth, {\n idToken,\n email: this._email,\n oobCode: this._password\n });\n default:\n _fail(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n }\n }\n /** @internal */\n _getReauthenticationResolver(auth) {\n return this._getIdTokenResponse(auth);\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function signInWithIdp(auth, request) {\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithIdp\" /* Endpoint.SIGN_IN_WITH_IDP */, _addTidIfNecessary(auth, request));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst IDP_REQUEST_URI$1 = 'http://localhost';\n/**\r\n * Represents the OAuth credentials returned by an {@link OAuthProvider}.\r\n *\r\n * @remarks\r\n * Implementations specify the details about each auth provider's credential requirements.\r\n *\r\n * @public\r\n */\nclass OAuthCredential extends AuthCredential {\n constructor() {\n super(...arguments);\n this.pendingToken = null;\n }\n /** @internal */\n static _fromParams(params) {\n const cred = new OAuthCredential(params.providerId, params.signInMethod);\n if (params.idToken || params.accessToken) {\n // OAuth 2 and either ID token or access token.\n if (params.idToken) {\n cred.idToken = params.idToken;\n }\n if (params.accessToken) {\n cred.accessToken = params.accessToken;\n }\n // Add nonce if available and no pendingToken is present.\n if (params.nonce && !params.pendingToken) {\n cred.nonce = params.nonce;\n }\n if (params.pendingToken) {\n cred.pendingToken = params.pendingToken;\n }\n } else if (params.oauthToken && params.oauthTokenSecret) {\n // OAuth 1 and OAuth token with token secret\n cred.accessToken = params.oauthToken;\n cred.secret = params.oauthTokenSecret;\n } else {\n _fail(\"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n }\n return cred;\n }\n /** {@inheritdoc AuthCredential.toJSON} */\n toJSON() {\n return {\n idToken: this.idToken,\n accessToken: this.accessToken,\n secret: this.secret,\n nonce: this.nonce,\n pendingToken: this.pendingToken,\n providerId: this.providerId,\n signInMethod: this.signInMethod\n };\n }\n /**\r\n * Static method to deserialize a JSON representation of an object into an\r\n * {@link AuthCredential}.\r\n *\r\n * @param json - Input can be either Object or the stringified representation of the object.\r\n * When string is provided, JSON.parse would be called first.\r\n *\r\n * @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.\r\n */\n static fromJSON(json) {\n const obj = typeof json === 'string' ? JSON.parse(json) : json;\n const {\n providerId,\n signInMethod\n } = obj,\n rest = __rest(obj, [\"providerId\", \"signInMethod\"]);\n if (!providerId || !signInMethod) {\n return null;\n }\n const cred = new OAuthCredential(providerId, signInMethod);\n cred.idToken = rest.idToken || undefined;\n cred.accessToken = rest.accessToken || undefined;\n cred.secret = rest.secret;\n cred.nonce = rest.nonce;\n cred.pendingToken = rest.pendingToken || null;\n return cred;\n }\n /** @internal */\n _getIdTokenResponse(auth) {\n const request = this.buildRequest();\n return signInWithIdp(auth, request);\n }\n /** @internal */\n _linkToIdToken(auth, idToken) {\n const request = this.buildRequest();\n request.idToken = idToken;\n return signInWithIdp(auth, request);\n }\n /** @internal */\n _getReauthenticationResolver(auth) {\n const request = this.buildRequest();\n request.autoCreate = false;\n return signInWithIdp(auth, request);\n }\n buildRequest() {\n const request = {\n requestUri: IDP_REQUEST_URI$1,\n returnSecureToken: true\n };\n if (this.pendingToken) {\n request.pendingToken = this.pendingToken;\n } else {\n const postBody = {};\n if (this.idToken) {\n postBody['id_token'] = this.idToken;\n }\n if (this.accessToken) {\n postBody['access_token'] = this.accessToken;\n }\n if (this.secret) {\n postBody['oauth_token_secret'] = this.secret;\n }\n postBody['providerId'] = this.providerId;\n if (this.nonce && !this.pendingToken) {\n postBody['nonce'] = this.nonce;\n }\n request.postBody = querystring(postBody);\n }\n return request;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function sendPhoneVerificationCode(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:sendVerificationCode\" /* Endpoint.SEND_VERIFICATION_CODE */, _addTidIfNecessary(auth, request));\n}\nasync function signInWithPhoneNumber$1(auth, request) {\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithPhoneNumber\" /* Endpoint.SIGN_IN_WITH_PHONE_NUMBER */, _addTidIfNecessary(auth, request));\n}\nasync function linkWithPhoneNumber$1(auth, request) {\n const response = await _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithPhoneNumber\" /* Endpoint.SIGN_IN_WITH_PHONE_NUMBER */, _addTidIfNecessary(auth, request));\n if (response.temporaryProof) {\n throw _makeTaggedError(auth, \"account-exists-with-different-credential\" /* AuthErrorCode.NEED_CONFIRMATION */, response);\n }\n return response;\n}\nconst VERIFY_PHONE_NUMBER_FOR_EXISTING_ERROR_MAP_ = {\n [\"USER_NOT_FOUND\" /* ServerError.USER_NOT_FOUND */]: \"user-not-found\" /* AuthErrorCode.USER_DELETED */\n};\nasync function verifyPhoneNumberForExisting(auth, request) {\n const apiRequest = Object.assign(Object.assign({}, request), {\n operation: 'REAUTH'\n });\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithPhoneNumber\" /* Endpoint.SIGN_IN_WITH_PHONE_NUMBER */, _addTidIfNecessary(auth, apiRequest), VERIFY_PHONE_NUMBER_FOR_EXISTING_ERROR_MAP_);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Represents the credentials returned by {@link PhoneAuthProvider}.\r\n *\r\n * @public\r\n */\nclass PhoneAuthCredential extends AuthCredential {\n constructor(params) {\n super(\"phone\" /* ProviderId.PHONE */, \"phone\" /* SignInMethod.PHONE */);\n this.params = params;\n }\n /** @internal */\n static _fromVerification(verificationId, verificationCode) {\n return new PhoneAuthCredential({\n verificationId,\n verificationCode\n });\n }\n /** @internal */\n static _fromTokenResponse(phoneNumber, temporaryProof) {\n return new PhoneAuthCredential({\n phoneNumber,\n temporaryProof\n });\n }\n /** @internal */\n _getIdTokenResponse(auth) {\n return signInWithPhoneNumber$1(auth, this._makeVerificationRequest());\n }\n /** @internal */\n _linkToIdToken(auth, idToken) {\n return linkWithPhoneNumber$1(auth, Object.assign({\n idToken\n }, this._makeVerificationRequest()));\n }\n /** @internal */\n _getReauthenticationResolver(auth) {\n return verifyPhoneNumberForExisting(auth, this._makeVerificationRequest());\n }\n /** @internal */\n _makeVerificationRequest() {\n const {\n temporaryProof,\n phoneNumber,\n verificationId,\n verificationCode\n } = this.params;\n if (temporaryProof && phoneNumber) {\n return {\n temporaryProof,\n phoneNumber\n };\n }\n return {\n sessionInfo: verificationId,\n code: verificationCode\n };\n }\n /** {@inheritdoc AuthCredential.toJSON} */\n toJSON() {\n const obj = {\n providerId: this.providerId\n };\n if (this.params.phoneNumber) {\n obj.phoneNumber = this.params.phoneNumber;\n }\n if (this.params.temporaryProof) {\n obj.temporaryProof = this.params.temporaryProof;\n }\n if (this.params.verificationCode) {\n obj.verificationCode = this.params.verificationCode;\n }\n if (this.params.verificationId) {\n obj.verificationId = this.params.verificationId;\n }\n return obj;\n }\n /** Generates a phone credential based on a plain object or a JSON string. */\n static fromJSON(json) {\n if (typeof json === 'string') {\n json = JSON.parse(json);\n }\n const {\n verificationId,\n verificationCode,\n phoneNumber,\n temporaryProof\n } = json;\n if (!verificationCode && !verificationId && !phoneNumber && !temporaryProof) {\n return null;\n }\n return new PhoneAuthCredential({\n verificationId,\n verificationCode,\n phoneNumber,\n temporaryProof\n });\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Maps the mode string in action code URL to Action Code Info operation.\r\n *\r\n * @param mode\r\n */\nfunction parseMode(mode) {\n switch (mode) {\n case 'recoverEmail':\n return \"RECOVER_EMAIL\" /* ActionCodeOperation.RECOVER_EMAIL */;\n case 'resetPassword':\n return \"PASSWORD_RESET\" /* ActionCodeOperation.PASSWORD_RESET */;\n case 'signIn':\n return \"EMAIL_SIGNIN\" /* ActionCodeOperation.EMAIL_SIGNIN */;\n case 'verifyEmail':\n return \"VERIFY_EMAIL\" /* ActionCodeOperation.VERIFY_EMAIL */;\n case 'verifyAndChangeEmail':\n return \"VERIFY_AND_CHANGE_EMAIL\" /* ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL */;\n case 'revertSecondFactorAddition':\n return \"REVERT_SECOND_FACTOR_ADDITION\" /* ActionCodeOperation.REVERT_SECOND_FACTOR_ADDITION */;\n default:\n return null;\n }\n}\n/**\r\n * Helper to parse FDL links\r\n *\r\n * @param url\r\n */\nfunction parseDeepLink(url) {\n const link = querystringDecode(extractQuerystring(url))['link'];\n // Double link case (automatic redirect).\n const doubleDeepLink = link ? querystringDecode(extractQuerystring(link))['deep_link_id'] : null;\n // iOS custom scheme links.\n const iOSDeepLink = querystringDecode(extractQuerystring(url))['deep_link_id'];\n const iOSDoubleDeepLink = iOSDeepLink ? querystringDecode(extractQuerystring(iOSDeepLink))['link'] : null;\n return iOSDoubleDeepLink || iOSDeepLink || doubleDeepLink || link || url;\n}\n/**\r\n * A utility class to parse email action URLs such as password reset, email verification,\r\n * email link sign in, etc.\r\n *\r\n * @public\r\n */\nclass ActionCodeURL {\n /**\r\n * @param actionLink - The link from which to extract the URL.\r\n * @returns The {@link ActionCodeURL} object, or null if the link is invalid.\r\n *\r\n * @internal\r\n */\n constructor(actionLink) {\n var _a, _b, _c, _d, _e, _f;\n const searchParams = querystringDecode(extractQuerystring(actionLink));\n const apiKey = (_a = searchParams[\"apiKey\" /* QueryField.API_KEY */]) !== null && _a !== void 0 ? _a : null;\n const code = (_b = searchParams[\"oobCode\" /* QueryField.CODE */]) !== null && _b !== void 0 ? _b : null;\n const operation = parseMode((_c = searchParams[\"mode\" /* QueryField.MODE */]) !== null && _c !== void 0 ? _c : null);\n // Validate API key, code and mode.\n _assert(apiKey && code && operation, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n this.apiKey = apiKey;\n this.operation = operation;\n this.code = code;\n this.continueUrl = (_d = searchParams[\"continueUrl\" /* QueryField.CONTINUE_URL */]) !== null && _d !== void 0 ? _d : null;\n this.languageCode = (_e = searchParams[\"languageCode\" /* QueryField.LANGUAGE_CODE */]) !== null && _e !== void 0 ? _e : null;\n this.tenantId = (_f = searchParams[\"tenantId\" /* QueryField.TENANT_ID */]) !== null && _f !== void 0 ? _f : null;\n }\n /**\r\n * Parses the email action link string and returns an {@link ActionCodeURL} if the link is valid,\r\n * otherwise returns null.\r\n *\r\n * @param link - The email action link string.\r\n * @returns The {@link ActionCodeURL} object, or null if the link is invalid.\r\n *\r\n * @public\r\n */\n static parseLink(link) {\n const actionLink = parseDeepLink(link);\n try {\n return new ActionCodeURL(actionLink);\n } catch (_a) {\n return null;\n }\n }\n}\n/**\r\n * Parses the email action link string and returns an {@link ActionCodeURL} if\r\n * the link is valid, otherwise returns null.\r\n *\r\n * @public\r\n */\nfunction parseActionCodeURL(link) {\n return ActionCodeURL.parseLink(link);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Provider for generating {@link EmailAuthCredential}.\r\n *\r\n * @public\r\n */\nlet EmailAuthProvider = /*#__PURE__*/(() => {\n class EmailAuthProvider {\n constructor() {\n /**\r\n * Always set to {@link ProviderId}.PASSWORD, even for email link.\r\n */\n this.providerId = EmailAuthProvider.PROVIDER_ID;\n }\n /**\r\n * Initialize an {@link AuthCredential} using an email and password.\r\n *\r\n * @example\r\n * ```javascript\r\n * const authCredential = EmailAuthProvider.credential(email, password);\r\n * const userCredential = await signInWithCredential(auth, authCredential);\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * const userCredential = await signInWithEmailAndPassword(auth, email, password);\r\n * ```\r\n *\r\n * @param email - Email address.\r\n * @param password - User account password.\r\n * @returns The auth provider credential.\r\n */\n static credential(email, password) {\n return EmailAuthCredential._fromEmailAndPassword(email, password);\n }\n /**\r\n * Initialize an {@link AuthCredential} using an email and an email link after a sign in with\r\n * email link operation.\r\n *\r\n * @example\r\n * ```javascript\r\n * const authCredential = EmailAuthProvider.credentialWithLink(auth, email, emailLink);\r\n * const userCredential = await signInWithCredential(auth, authCredential);\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * await sendSignInLinkToEmail(auth, email);\r\n * // Obtain emailLink from user.\r\n * const userCredential = await signInWithEmailLink(auth, email, emailLink);\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance used to verify the link.\r\n * @param email - Email address.\r\n * @param emailLink - Sign-in email link.\r\n * @returns - The auth provider credential.\r\n */\n static credentialWithLink(email, emailLink) {\n const actionCodeUrl = ActionCodeURL.parseLink(emailLink);\n _assert(actionCodeUrl, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n return EmailAuthCredential._fromEmailAndCode(email, actionCodeUrl.code, actionCodeUrl.tenantId);\n }\n }\n /**\r\n * Always set to {@link ProviderId}.PASSWORD, even for email link.\r\n */\n\n /**\r\n * Always set to {@link SignInMethod}.EMAIL_PASSWORD.\r\n */\n\n /**\r\n * Always set to {@link SignInMethod}.EMAIL_LINK.\r\n */\n EmailAuthProvider.PROVIDER_ID = \"password\" /* ProviderId.PASSWORD */;\n\n EmailAuthProvider.EMAIL_PASSWORD_SIGN_IN_METHOD = \"password\" /* SignInMethod.EMAIL_PASSWORD */;\n\n EmailAuthProvider.EMAIL_LINK_SIGN_IN_METHOD = \"emailLink\" /* SignInMethod.EMAIL_LINK */;\n\n /**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n /**\r\n * The base class for all Federated providers (OAuth (including OIDC), SAML).\r\n *\r\n * This class is not meant to be instantiated directly.\r\n *\r\n * @public\r\n */\n return EmailAuthProvider;\n})();\nclass FederatedAuthProvider {\n /**\r\n * Constructor for generic OAuth providers.\r\n *\r\n * @param providerId - Provider for which credentials should be generated.\r\n */\n constructor(providerId) {\n this.providerId = providerId;\n /** @internal */\n this.defaultLanguageCode = null;\n /** @internal */\n this.customParameters = {};\n }\n /**\r\n * Set the language gode.\r\n *\r\n * @param languageCode - language code\r\n */\n setDefaultLanguage(languageCode) {\n this.defaultLanguageCode = languageCode;\n }\n /**\r\n * Sets the OAuth custom parameters to pass in an OAuth request for popup and redirect sign-in\r\n * operations.\r\n *\r\n * @remarks\r\n * For a detailed list, check the reserved required OAuth 2.0 parameters such as `client_id`,\r\n * `redirect_uri`, `scope`, `response_type`, and `state` are not allowed and will be ignored.\r\n *\r\n * @param customOAuthParameters - The custom OAuth parameters to pass in the OAuth request.\r\n */\n setCustomParameters(customOAuthParameters) {\n this.customParameters = customOAuthParameters;\n return this;\n }\n /**\r\n * Retrieve the current list of {@link CustomParameters}.\r\n */\n getCustomParameters() {\n return this.customParameters;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Common code to all OAuth providers. This is separate from the\r\n * {@link OAuthProvider} so that child providers (like\r\n * {@link GoogleAuthProvider}) don't inherit the `credential` instance method.\r\n * Instead, they rely on a static `credential` method.\r\n */\nclass BaseOAuthProvider extends FederatedAuthProvider {\n constructor() {\n super(...arguments);\n /** @internal */\n this.scopes = [];\n }\n /**\r\n * Add an OAuth scope to the credential.\r\n *\r\n * @param scope - Provider OAuth scope to add.\r\n */\n addScope(scope) {\n // If not already added, add scope to list.\n if (!this.scopes.includes(scope)) {\n this.scopes.push(scope);\n }\n return this;\n }\n /**\r\n * Retrieve the current list of OAuth scopes.\r\n */\n getScopes() {\n return [...this.scopes];\n }\n}\n/**\r\n * Provider for generating generic {@link OAuthCredential}.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new OAuthProvider('google.com');\r\n * // Start a sign in process for an unauthenticated user.\r\n * provider.addScope('profile');\r\n * provider.addScope('email');\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n * // This is the signed-in user\r\n * const user = result.user;\r\n * // This gives you a OAuth Access Token for the provider.\r\n * const credential = provider.credentialFromResult(auth, result);\r\n * const token = credential.accessToken;\r\n * }\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new OAuthProvider('google.com');\r\n * provider.addScope('profile');\r\n * provider.addScope('email');\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a OAuth Access Token for the provider.\r\n * const credential = provider.credentialFromResult(auth, result);\r\n * const token = credential.accessToken;\r\n * ```\r\n * @public\r\n */\nclass OAuthProvider extends BaseOAuthProvider {\n /**\r\n * Creates an {@link OAuthCredential} from a JSON string or a plain object.\r\n * @param json - A plain object or a JSON string\r\n */\n static credentialFromJSON(json) {\n const obj = typeof json === 'string' ? JSON.parse(json) : json;\n _assert('providerId' in obj && 'signInMethod' in obj, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n return OAuthCredential._fromParams(obj);\n }\n /**\r\n * Creates a {@link OAuthCredential} from a generic OAuth provider's access token or ID token.\r\n *\r\n * @remarks\r\n * The raw nonce is required when an ID token with a nonce field is provided. The SHA-256 hash of\r\n * the raw nonce must match the nonce field in the ID token.\r\n *\r\n * @example\r\n * ```javascript\r\n * // `googleUser` from the onsuccess Google Sign In callback.\r\n * // Initialize a generate OAuth provider with a `google.com` providerId.\r\n * const provider = new OAuthProvider('google.com');\r\n * const credential = provider.credential({\r\n * idToken: googleUser.getAuthResponse().id_token,\r\n * });\r\n * const result = await signInWithCredential(credential);\r\n * ```\r\n *\r\n * @param params - Either the options object containing the ID token, access token and raw nonce\r\n * or the ID token string.\r\n */\n credential(params) {\n return this._credential(Object.assign(Object.assign({}, params), {\n nonce: params.rawNonce\n }));\n }\n /** An internal credential method that accepts more permissive options */\n _credential(params) {\n _assert(params.idToken || params.accessToken, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n // For OAuthCredential, sign in method is same as providerId.\n return OAuthCredential._fromParams(Object.assign(Object.assign({}, params), {\n providerId: this.providerId,\n signInMethod: this.providerId\n }));\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromResult(userCredential) {\n return OAuthProvider.oauthCredentialFromTaggedObject(userCredential);\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n * thrown during a sign-in, link, or reauthenticate operation.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromError(error) {\n return OAuthProvider.oauthCredentialFromTaggedObject(error.customData || {});\n }\n static oauthCredentialFromTaggedObject({\n _tokenResponse: tokenResponse\n }) {\n if (!tokenResponse) {\n return null;\n }\n const {\n oauthIdToken,\n oauthAccessToken,\n oauthTokenSecret,\n pendingToken,\n nonce,\n providerId\n } = tokenResponse;\n if (!oauthAccessToken && !oauthTokenSecret && !oauthIdToken && !pendingToken) {\n return null;\n }\n if (!providerId) {\n return null;\n }\n try {\n return new OAuthProvider(providerId)._credential({\n idToken: oauthIdToken,\n accessToken: oauthAccessToken,\n nonce,\n pendingToken\n });\n } catch (e) {\n return null;\n }\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Provider for generating an {@link OAuthCredential} for {@link ProviderId}.FACEBOOK.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new FacebookAuthProvider();\r\n * // Start a sign in process for an unauthenticated user.\r\n * provider.addScope('user_birthday');\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n * // This is the signed-in user\r\n * const user = result.user;\r\n * // This gives you a Facebook Access Token.\r\n * const credential = FacebookAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * }\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new FacebookAuthProvider();\r\n * provider.addScope('user_birthday');\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a Facebook Access Token.\r\n * const credential = FacebookAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * ```\r\n *\r\n * @public\r\n */\nlet FacebookAuthProvider = /*#__PURE__*/(() => {\n class FacebookAuthProvider extends BaseOAuthProvider {\n constructor() {\n super(\"facebook.com\" /* ProviderId.FACEBOOK */);\n }\n /**\r\n * Creates a credential for Facebook.\r\n *\r\n * @example\r\n * ```javascript\r\n * // `event` from the Facebook auth.authResponseChange callback.\r\n * const credential = FacebookAuthProvider.credential(event.authResponse.accessToken);\r\n * const result = await signInWithCredential(credential);\r\n * ```\r\n *\r\n * @param accessToken - Facebook access token.\r\n */\n static credential(accessToken) {\n return OAuthCredential._fromParams({\n providerId: FacebookAuthProvider.PROVIDER_ID,\n signInMethod: FacebookAuthProvider.FACEBOOK_SIGN_IN_METHOD,\n accessToken\n });\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromResult(userCredential) {\n return FacebookAuthProvider.credentialFromTaggedObject(userCredential);\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n * thrown during a sign-in, link, or reauthenticate operation.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromError(error) {\n return FacebookAuthProvider.credentialFromTaggedObject(error.customData || {});\n }\n static credentialFromTaggedObject({\n _tokenResponse: tokenResponse\n }) {\n if (!tokenResponse || !('oauthAccessToken' in tokenResponse)) {\n return null;\n }\n if (!tokenResponse.oauthAccessToken) {\n return null;\n }\n try {\n return FacebookAuthProvider.credential(tokenResponse.oauthAccessToken);\n } catch (_a) {\n return null;\n }\n }\n }\n /** Always set to {@link SignInMethod}.FACEBOOK. */\n\n /** Always set to {@link ProviderId}.FACEBOOK. */FacebookAuthProvider.FACEBOOK_SIGN_IN_METHOD = \"facebook.com\" /* SignInMethod.FACEBOOK */;\n\n FacebookAuthProvider.PROVIDER_ID = \"facebook.com\" /* ProviderId.FACEBOOK */;\n\n /**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n /**\r\n * Provider for generating an an {@link OAuthCredential} for {@link ProviderId}.GOOGLE.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new GoogleAuthProvider();\r\n * // Start a sign in process for an unauthenticated user.\r\n * provider.addScope('profile');\r\n * provider.addScope('email');\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n * // This is the signed-in user\r\n * const user = result.user;\r\n * // This gives you a Google Access Token.\r\n * const credential = GoogleAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * }\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new GoogleAuthProvider();\r\n * provider.addScope('profile');\r\n * provider.addScope('email');\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a Google Access Token.\r\n * const credential = GoogleAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * ```\r\n *\r\n * @public\r\n */\n return FacebookAuthProvider;\n})();\nlet GoogleAuthProvider = /*#__PURE__*/(() => {\n class GoogleAuthProvider extends BaseOAuthProvider {\n constructor() {\n super(\"google.com\" /* ProviderId.GOOGLE */);\n this.addScope('profile');\n }\n /**\r\n * Creates a credential for Google. At least one of ID token and access token is required.\r\n *\r\n * @example\r\n * ```javascript\r\n * // \\`googleUser\\` from the onsuccess Google Sign In callback.\r\n * const credential = GoogleAuthProvider.credential(googleUser.getAuthResponse().id_token);\r\n * const result = await signInWithCredential(credential);\r\n * ```\r\n *\r\n * @param idToken - Google ID token.\r\n * @param accessToken - Google access token.\r\n */\n static credential(idToken, accessToken) {\n return OAuthCredential._fromParams({\n providerId: GoogleAuthProvider.PROVIDER_ID,\n signInMethod: GoogleAuthProvider.GOOGLE_SIGN_IN_METHOD,\n idToken,\n accessToken\n });\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromResult(userCredential) {\n return GoogleAuthProvider.credentialFromTaggedObject(userCredential);\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n * thrown during a sign-in, link, or reauthenticate operation.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromError(error) {\n return GoogleAuthProvider.credentialFromTaggedObject(error.customData || {});\n }\n static credentialFromTaggedObject({\n _tokenResponse: tokenResponse\n }) {\n if (!tokenResponse) {\n return null;\n }\n const {\n oauthIdToken,\n oauthAccessToken\n } = tokenResponse;\n if (!oauthIdToken && !oauthAccessToken) {\n // This could be an oauth 1 credential or a phone credential\n return null;\n }\n try {\n return GoogleAuthProvider.credential(oauthIdToken, oauthAccessToken);\n } catch (_a) {\n return null;\n }\n }\n }\n /** Always set to {@link SignInMethod}.GOOGLE. */\n\n /** Always set to {@link ProviderId}.GOOGLE. */GoogleAuthProvider.GOOGLE_SIGN_IN_METHOD = \"google.com\" /* SignInMethod.GOOGLE */;\n\n GoogleAuthProvider.PROVIDER_ID = \"google.com\" /* ProviderId.GOOGLE */;\n\n /**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n /**\r\n * Provider for generating an {@link OAuthCredential} for {@link ProviderId}.GITHUB.\r\n *\r\n * @remarks\r\n * GitHub requires an OAuth 2.0 redirect, so you can either handle the redirect directly, or use\r\n * the {@link signInWithPopup} handler:\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new GithubAuthProvider();\r\n * // Start a sign in process for an unauthenticated user.\r\n * provider.addScope('repo');\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n * // This is the signed-in user\r\n * const user = result.user;\r\n * // This gives you a Github Access Token.\r\n * const credential = GithubAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * }\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new GithubAuthProvider();\r\n * provider.addScope('repo');\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a Github Access Token.\r\n * const credential = GithubAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * ```\r\n * @public\r\n */\n return GoogleAuthProvider;\n})();\nlet GithubAuthProvider = /*#__PURE__*/(() => {\n class GithubAuthProvider extends BaseOAuthProvider {\n constructor() {\n super(\"github.com\" /* ProviderId.GITHUB */);\n }\n /**\r\n * Creates a credential for Github.\r\n *\r\n * @param accessToken - Github access token.\r\n */\n static credential(accessToken) {\n return OAuthCredential._fromParams({\n providerId: GithubAuthProvider.PROVIDER_ID,\n signInMethod: GithubAuthProvider.GITHUB_SIGN_IN_METHOD,\n accessToken\n });\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromResult(userCredential) {\n return GithubAuthProvider.credentialFromTaggedObject(userCredential);\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n * thrown during a sign-in, link, or reauthenticate operation.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromError(error) {\n return GithubAuthProvider.credentialFromTaggedObject(error.customData || {});\n }\n static credentialFromTaggedObject({\n _tokenResponse: tokenResponse\n }) {\n if (!tokenResponse || !('oauthAccessToken' in tokenResponse)) {\n return null;\n }\n if (!tokenResponse.oauthAccessToken) {\n return null;\n }\n try {\n return GithubAuthProvider.credential(tokenResponse.oauthAccessToken);\n } catch (_a) {\n return null;\n }\n }\n }\n /** Always set to {@link SignInMethod}.GITHUB. */\n\n /** Always set to {@link ProviderId}.GITHUB. */GithubAuthProvider.GITHUB_SIGN_IN_METHOD = \"github.com\" /* SignInMethod.GITHUB */;\n\n GithubAuthProvider.PROVIDER_ID = \"github.com\" /* ProviderId.GITHUB */;\n\n /**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n return GithubAuthProvider;\n})();\nconst IDP_REQUEST_URI = 'http://localhost';\n/**\r\n * @public\r\n */\nclass SAMLAuthCredential extends AuthCredential {\n /** @internal */\n constructor(providerId, pendingToken) {\n super(providerId, providerId);\n this.pendingToken = pendingToken;\n }\n /** @internal */\n _getIdTokenResponse(auth) {\n const request = this.buildRequest();\n return signInWithIdp(auth, request);\n }\n /** @internal */\n _linkToIdToken(auth, idToken) {\n const request = this.buildRequest();\n request.idToken = idToken;\n return signInWithIdp(auth, request);\n }\n /** @internal */\n _getReauthenticationResolver(auth) {\n const request = this.buildRequest();\n request.autoCreate = false;\n return signInWithIdp(auth, request);\n }\n /** {@inheritdoc AuthCredential.toJSON} */\n toJSON() {\n return {\n signInMethod: this.signInMethod,\n providerId: this.providerId,\n pendingToken: this.pendingToken\n };\n }\n /**\r\n * Static method to deserialize a JSON representation of an object into an\r\n * {@link AuthCredential}.\r\n *\r\n * @param json - Input can be either Object or the stringified representation of the object.\r\n * When string is provided, JSON.parse would be called first.\r\n *\r\n * @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.\r\n */\n static fromJSON(json) {\n const obj = typeof json === 'string' ? JSON.parse(json) : json;\n const {\n providerId,\n signInMethod,\n pendingToken\n } = obj;\n if (!providerId || !signInMethod || !pendingToken || providerId !== signInMethod) {\n return null;\n }\n return new SAMLAuthCredential(providerId, pendingToken);\n }\n /**\r\n * Helper static method to avoid exposing the constructor to end users.\r\n *\r\n * @internal\r\n */\n static _create(providerId, pendingToken) {\n return new SAMLAuthCredential(providerId, pendingToken);\n }\n buildRequest() {\n return {\n requestUri: IDP_REQUEST_URI,\n returnSecureToken: true,\n pendingToken: this.pendingToken\n };\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst SAML_PROVIDER_PREFIX = 'saml.';\n/**\r\n * An {@link AuthProvider} for SAML.\r\n *\r\n * @public\r\n */\nclass SAMLAuthProvider extends FederatedAuthProvider {\n /**\r\n * Constructor. The providerId must start with \"saml.\"\r\n * @param providerId - SAML provider ID.\r\n */\n constructor(providerId) {\n _assert(providerId.startsWith(SAML_PROVIDER_PREFIX), \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n super(providerId);\n }\n /**\r\n * Generates an {@link AuthCredential} from a {@link UserCredential} after a\r\n * successful SAML flow completes.\r\n *\r\n * @remarks\r\n *\r\n * For example, to get an {@link AuthCredential}, you could write the\r\n * following code:\r\n *\r\n * ```js\r\n * const userCredential = await signInWithPopup(auth, samlProvider);\r\n * const credential = SAMLAuthProvider.credentialFromResult(userCredential);\r\n * ```\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromResult(userCredential) {\n return SAMLAuthProvider.samlCredentialFromTaggedObject(userCredential);\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n * thrown during a sign-in, link, or reauthenticate operation.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromError(error) {\n return SAMLAuthProvider.samlCredentialFromTaggedObject(error.customData || {});\n }\n /**\r\n * Creates an {@link AuthCredential} from a JSON string or a plain object.\r\n * @param json - A plain object or a JSON string\r\n */\n static credentialFromJSON(json) {\n const credential = SAMLAuthCredential.fromJSON(json);\n _assert(credential, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n return credential;\n }\n static samlCredentialFromTaggedObject({\n _tokenResponse: tokenResponse\n }) {\n if (!tokenResponse) {\n return null;\n }\n const {\n pendingToken,\n providerId\n } = tokenResponse;\n if (!pendingToken || !providerId) {\n return null;\n }\n try {\n return SAMLAuthCredential._create(providerId, pendingToken);\n } catch (e) {\n return null;\n }\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Provider for generating an {@link OAuthCredential} for {@link ProviderId}.TWITTER.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new TwitterAuthProvider();\r\n * // Start a sign in process for an unauthenticated user.\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n * // This is the signed-in user\r\n * const user = result.user;\r\n * // This gives you a Twitter Access Token and Secret.\r\n * const credential = TwitterAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * const secret = credential.secret;\r\n * }\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new TwitterAuthProvider();\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a Twitter Access Token and Secret.\r\n * const credential = TwitterAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * const secret = credential.secret;\r\n * ```\r\n *\r\n * @public\r\n */\nlet TwitterAuthProvider = /*#__PURE__*/(() => {\n class TwitterAuthProvider extends BaseOAuthProvider {\n constructor() {\n super(\"twitter.com\" /* ProviderId.TWITTER */);\n }\n /**\r\n * Creates a credential for Twitter.\r\n *\r\n * @param token - Twitter access token.\r\n * @param secret - Twitter secret.\r\n */\n static credential(token, secret) {\n return OAuthCredential._fromParams({\n providerId: TwitterAuthProvider.PROVIDER_ID,\n signInMethod: TwitterAuthProvider.TWITTER_SIGN_IN_METHOD,\n oauthToken: token,\n oauthTokenSecret: secret\n });\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromResult(userCredential) {\n return TwitterAuthProvider.credentialFromTaggedObject(userCredential);\n }\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n * thrown during a sign-in, link, or reauthenticate operation.\r\n *\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromError(error) {\n return TwitterAuthProvider.credentialFromTaggedObject(error.customData || {});\n }\n static credentialFromTaggedObject({\n _tokenResponse: tokenResponse\n }) {\n if (!tokenResponse) {\n return null;\n }\n const {\n oauthAccessToken,\n oauthTokenSecret\n } = tokenResponse;\n if (!oauthAccessToken || !oauthTokenSecret) {\n return null;\n }\n try {\n return TwitterAuthProvider.credential(oauthAccessToken, oauthTokenSecret);\n } catch (_a) {\n return null;\n }\n }\n }\n /** Always set to {@link SignInMethod}.TWITTER. */\n\n /** Always set to {@link ProviderId}.TWITTER. */TwitterAuthProvider.TWITTER_SIGN_IN_METHOD = \"twitter.com\" /* SignInMethod.TWITTER */;\n\n TwitterAuthProvider.PROVIDER_ID = \"twitter.com\" /* ProviderId.TWITTER */;\n\n /**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n return TwitterAuthProvider;\n})();\nasync function signUp(auth, request) {\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signUp\" /* Endpoint.SIGN_UP */, _addTidIfNecessary(auth, request));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass UserCredentialImpl {\n constructor(params) {\n this.user = params.user;\n this.providerId = params.providerId;\n this._tokenResponse = params._tokenResponse;\n this.operationType = params.operationType;\n }\n static async _fromIdTokenResponse(auth, operationType, idTokenResponse, isAnonymous = false) {\n const user = await UserImpl._fromIdTokenResponse(auth, idTokenResponse, isAnonymous);\n const providerId = providerIdForResponse(idTokenResponse);\n const userCred = new UserCredentialImpl({\n user,\n providerId,\n _tokenResponse: idTokenResponse,\n operationType\n });\n return userCred;\n }\n static async _forOperation(user, operationType, response) {\n await user._updateTokensIfNecessary(response, /* reload */true);\n const providerId = providerIdForResponse(response);\n return new UserCredentialImpl({\n user,\n providerId,\n _tokenResponse: response,\n operationType\n });\n }\n}\nfunction providerIdForResponse(response) {\n if (response.providerId) {\n return response.providerId;\n }\n if ('phoneNumber' in response) {\n return \"phone\" /* ProviderId.PHONE */;\n }\n return null;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Asynchronously signs in as an anonymous user.\r\n *\r\n * @remarks\r\n * If there is already an anonymous user signed in, that user will be returned; otherwise, a\r\n * new anonymous user identity will be created and returned.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n *\r\n * @public\r\n */\nasync function signInAnonymously(auth) {\n var _a;\n const authInternal = _castAuth(auth);\n await authInternal._initializationPromise;\n if ((_a = authInternal.currentUser) === null || _a === void 0 ? void 0 : _a.isAnonymous) {\n // If an anonymous user is already signed in, no need to sign them in again.\n return new UserCredentialImpl({\n user: authInternal.currentUser,\n providerId: null,\n operationType: \"signIn\" /* OperationType.SIGN_IN */\n });\n }\n const response = await signUp(authInternal, {\n returnSecureToken: true\n });\n const userCredential = await UserCredentialImpl._fromIdTokenResponse(authInternal, \"signIn\" /* OperationType.SIGN_IN */, response, true);\n await authInternal._updateCurrentUser(userCredential.user);\n return userCredential;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass MultiFactorError extends FirebaseError {\n constructor(auth, error, operationType, user) {\n var _a;\n super(error.code, error.message);\n this.operationType = operationType;\n this.user = user;\n // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n Object.setPrototypeOf(this, MultiFactorError.prototype);\n this.customData = {\n appName: auth.name,\n tenantId: (_a = auth.tenantId) !== null && _a !== void 0 ? _a : undefined,\n _serverResponse: error.customData._serverResponse,\n operationType\n };\n }\n static _fromErrorAndOperation(auth, error, operationType, user) {\n return new MultiFactorError(auth, error, operationType, user);\n }\n}\nfunction _processCredentialSavingMfaContextIfNecessary(auth, operationType, credential, user) {\n const idTokenProvider = operationType === \"reauthenticate\" /* OperationType.REAUTHENTICATE */ ? credential._getReauthenticationResolver(auth) : credential._getIdTokenResponse(auth);\n return idTokenProvider.catch(error => {\n if (error.code === `auth/${\"multi-factor-auth-required\" /* AuthErrorCode.MFA_REQUIRED */}`) {\n throw MultiFactorError._fromErrorAndOperation(auth, error, operationType, user);\n }\n throw error;\n });\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Takes a set of UserInfo provider data and converts it to a set of names\r\n */\nfunction providerDataAsNames(providerData) {\n return new Set(providerData.map(({\n providerId\n }) => providerId).filter(pid => !!pid));\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Unlinks a provider from a user account.\r\n *\r\n * @param user - The user.\r\n * @param providerId - The provider to unlink.\r\n *\r\n * @public\r\n */\nasync function unlink(user, providerId) {\n const userInternal = getModularInstance(user);\n await _assertLinkedStatus(true, userInternal, providerId);\n const {\n providerUserInfo\n } = await deleteLinkedAccounts(userInternal.auth, {\n idToken: await userInternal.getIdToken(),\n deleteProvider: [providerId]\n });\n const providersLeft = providerDataAsNames(providerUserInfo || []);\n userInternal.providerData = userInternal.providerData.filter(pd => providersLeft.has(pd.providerId));\n if (!providersLeft.has(\"phone\" /* ProviderId.PHONE */)) {\n userInternal.phoneNumber = null;\n }\n await userInternal.auth._persistUserIfCurrent(userInternal);\n return userInternal;\n}\nasync function _link$1(user, credential, bypassAuthState = false) {\n const response = await _logoutIfInvalidated(user, credential._linkToIdToken(user.auth, await user.getIdToken()), bypassAuthState);\n return UserCredentialImpl._forOperation(user, \"link\" /* OperationType.LINK */, response);\n}\nasync function _assertLinkedStatus(expected, user, provider) {\n await _reloadWithoutSaving(user);\n const providerIds = providerDataAsNames(user.providerData);\n const code = expected === false ? \"provider-already-linked\" /* AuthErrorCode.PROVIDER_ALREADY_LINKED */ : \"no-such-provider\" /* AuthErrorCode.NO_SUCH_PROVIDER */;\n _assert(providerIds.has(provider) === expected, user.auth, code);\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function _reauthenticate(user, credential, bypassAuthState = false) {\n const {\n auth\n } = user;\n const operationType = \"reauthenticate\" /* OperationType.REAUTHENTICATE */;\n try {\n const response = await _logoutIfInvalidated(user, _processCredentialSavingMfaContextIfNecessary(auth, operationType, credential, user), bypassAuthState);\n _assert(response.idToken, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n const parsed = _parseToken(response.idToken);\n _assert(parsed, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n const {\n sub: localId\n } = parsed;\n _assert(user.uid === localId, auth, \"user-mismatch\" /* AuthErrorCode.USER_MISMATCH */);\n return UserCredentialImpl._forOperation(user, operationType, response);\n } catch (e) {\n // Convert user deleted error into user mismatch\n if ((e === null || e === void 0 ? void 0 : e.code) === `auth/${\"user-not-found\" /* AuthErrorCode.USER_DELETED */}`) {\n _fail(auth, \"user-mismatch\" /* AuthErrorCode.USER_MISMATCH */);\n }\n throw e;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function _signInWithCredential(auth, credential, bypassAuthState = false) {\n const operationType = \"signIn\" /* OperationType.SIGN_IN */;\n const response = await _processCredentialSavingMfaContextIfNecessary(auth, operationType, credential);\n const userCredential = await UserCredentialImpl._fromIdTokenResponse(auth, operationType, response);\n if (!bypassAuthState) {\n await auth._updateCurrentUser(userCredential.user);\n }\n return userCredential;\n}\n/**\r\n * Asynchronously signs in with the given credentials.\r\n *\r\n * @remarks\r\n * An {@link AuthProvider} can be used to generate the credential.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param credential - The auth credential.\r\n *\r\n * @public\r\n */\nasync function signInWithCredential(auth, credential) {\n return _signInWithCredential(_castAuth(auth), credential);\n}\n/**\r\n * Links the user account with the given credentials.\r\n *\r\n * @remarks\r\n * An {@link AuthProvider} can be used to generate the credential.\r\n *\r\n * @param user - The user.\r\n * @param credential - The auth credential.\r\n *\r\n * @public\r\n */\nasync function linkWithCredential(user, credential) {\n const userInternal = getModularInstance(user);\n await _assertLinkedStatus(false, userInternal, credential.providerId);\n return _link$1(userInternal, credential);\n}\n/**\r\n * Re-authenticates a user using a fresh credential.\r\n *\r\n * @remarks\r\n * Use before operations such as {@link updatePassword} that require tokens from recent sign-in\r\n * attempts. This method can be used to recover from a `CREDENTIAL_TOO_OLD_LOGIN_AGAIN` error\r\n * or a `TOKEN_EXPIRED` error.\r\n *\r\n * @param user - The user.\r\n * @param credential - The auth credential.\r\n *\r\n * @public\r\n */\nasync function reauthenticateWithCredential(user, credential) {\n return _reauthenticate(getModularInstance(user), credential);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function signInWithCustomToken$1(auth, request) {\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithCustomToken\" /* Endpoint.SIGN_IN_WITH_CUSTOM_TOKEN */, _addTidIfNecessary(auth, request));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Asynchronously signs in using a custom token.\r\n *\r\n * @remarks\r\n * Custom tokens are used to integrate Firebase Auth with existing auth systems, and must\r\n * be generated by an auth backend using the\r\n * {@link https://firebase.google.com/docs/reference/admin/node/admin.auth.Auth#createcustomtoken | createCustomToken}\r\n * method in the {@link https://firebase.google.com/docs/auth/admin | Admin SDK} .\r\n *\r\n * Fails with an error if the token is invalid, expired, or not accepted by the Firebase Auth service.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param customToken - The custom token to sign in with.\r\n *\r\n * @public\r\n */\nasync function signInWithCustomToken(auth, customToken) {\n const authInternal = _castAuth(auth);\n const response = await signInWithCustomToken$1(authInternal, {\n token: customToken,\n returnSecureToken: true\n });\n const cred = await UserCredentialImpl._fromIdTokenResponse(authInternal, \"signIn\" /* OperationType.SIGN_IN */, response);\n await authInternal._updateCurrentUser(cred.user);\n return cred;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass MultiFactorInfoImpl {\n constructor(factorId, response) {\n this.factorId = factorId;\n this.uid = response.mfaEnrollmentId;\n this.enrollmentTime = new Date(response.enrolledAt).toUTCString();\n this.displayName = response.displayName;\n }\n static _fromServerResponse(auth, enrollment) {\n if ('phoneInfo' in enrollment) {\n return PhoneMultiFactorInfoImpl._fromServerResponse(auth, enrollment);\n } else if ('totpInfo' in enrollment) {\n return TotpMultiFactorInfoImpl._fromServerResponse(auth, enrollment);\n }\n return _fail(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n }\n}\nclass PhoneMultiFactorInfoImpl extends MultiFactorInfoImpl {\n constructor(response) {\n super(\"phone\" /* FactorId.PHONE */, response);\n this.phoneNumber = response.phoneInfo;\n }\n static _fromServerResponse(_auth, enrollment) {\n return new PhoneMultiFactorInfoImpl(enrollment);\n }\n}\nclass TotpMultiFactorInfoImpl extends MultiFactorInfoImpl {\n constructor(response) {\n super(\"totp\" /* FactorId.TOTP */, response);\n }\n static _fromServerResponse(_auth, enrollment) {\n return new TotpMultiFactorInfoImpl(enrollment);\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _setActionCodeSettingsOnRequest(auth, request, actionCodeSettings) {\n var _a;\n _assert(((_a = actionCodeSettings.url) === null || _a === void 0 ? void 0 : _a.length) > 0, auth, \"invalid-continue-uri\" /* AuthErrorCode.INVALID_CONTINUE_URI */);\n _assert(typeof actionCodeSettings.dynamicLinkDomain === 'undefined' || actionCodeSettings.dynamicLinkDomain.length > 0, auth, \"invalid-dynamic-link-domain\" /* AuthErrorCode.INVALID_DYNAMIC_LINK_DOMAIN */);\n request.continueUrl = actionCodeSettings.url;\n request.dynamicLinkDomain = actionCodeSettings.dynamicLinkDomain;\n request.canHandleCodeInApp = actionCodeSettings.handleCodeInApp;\n if (actionCodeSettings.iOS) {\n _assert(actionCodeSettings.iOS.bundleId.length > 0, auth, \"missing-ios-bundle-id\" /* AuthErrorCode.MISSING_IOS_BUNDLE_ID */);\n request.iOSBundleId = actionCodeSettings.iOS.bundleId;\n }\n if (actionCodeSettings.android) {\n _assert(actionCodeSettings.android.packageName.length > 0, auth, \"missing-android-pkg-name\" /* AuthErrorCode.MISSING_ANDROID_PACKAGE_NAME */);\n request.androidInstallApp = actionCodeSettings.android.installApp;\n request.androidMinimumVersionCode = actionCodeSettings.android.minimumVersion;\n request.androidPackageName = actionCodeSettings.android.packageName;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Updates the password policy cached in the {@link Auth} instance if a policy is already\r\n * cached for the project or tenant.\r\n *\r\n * @remarks\r\n * We only fetch the password policy if the password did not meet policy requirements and\r\n * there is an existing policy cached. A developer must call validatePassword at least\r\n * once for the cache to be automatically updated.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n *\r\n * @private\r\n */\nasync function recachePasswordPolicy(auth) {\n const authInternal = _castAuth(auth);\n if (authInternal._getPasswordPolicyInternal()) {\n await authInternal._updatePasswordPolicy();\n }\n}\n/**\r\n * Sends a password reset email to the given email address. This method does not throw an error when\r\n * there's no user account with the given email address and\r\n * [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled.\r\n *\r\n * @remarks\r\n * To complete the password reset, call {@link confirmPasswordReset} with the code supplied in\r\n * the email sent to the user, along with the new password specified by the user.\r\n *\r\n * @example\r\n * ```javascript\r\n * const actionCodeSettings = {\r\n * url: 'https://www.example.com/?email=user@example.com',\r\n * iOS: {\r\n * bundleId: 'com.example.ios'\r\n * },\r\n * android: {\r\n * packageName: 'com.example.android',\r\n * installApp: true,\r\n * minimumVersion: '12'\r\n * },\r\n * handleCodeInApp: true\r\n * };\r\n * await sendPasswordResetEmail(auth, 'user@example.com', actionCodeSettings);\r\n * // Obtain code from user.\r\n * await confirmPasswordReset('user@example.com', code);\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param email - The user's email address.\r\n * @param actionCodeSettings - The {@link ActionCodeSettings}.\r\n *\r\n * @public\r\n */\nasync function sendPasswordResetEmail(auth, email, actionCodeSettings) {\n const authInternal = _castAuth(auth);\n const request = {\n requestType: \"PASSWORD_RESET\" /* ActionCodeOperation.PASSWORD_RESET */,\n email,\n clientType: \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */\n };\n if (actionCodeSettings) {\n _setActionCodeSettingsOnRequest(authInternal, request, actionCodeSettings);\n }\n await handleRecaptchaFlow(authInternal, request, \"getOobCode\" /* RecaptchaActionName.GET_OOB_CODE */, sendPasswordResetEmail$1);\n}\n/**\r\n * Completes the password reset process, given a confirmation code and new password.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param oobCode - A confirmation code sent to the user.\r\n * @param newPassword - The new password.\r\n *\r\n * @public\r\n */\nasync function confirmPasswordReset(auth, oobCode, newPassword) {\n await resetPassword(getModularInstance(auth), {\n oobCode,\n newPassword\n }).catch(async error => {\n if (error.code === `auth/${\"password-does-not-meet-requirements\" /* AuthErrorCode.PASSWORD_DOES_NOT_MEET_REQUIREMENTS */}`) {\n void recachePasswordPolicy(auth);\n }\n throw error;\n });\n // Do not return the email.\n}\n/**\r\n * Applies a verification code sent to the user by email or other out-of-band mechanism.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param oobCode - A verification code sent to the user.\r\n *\r\n * @public\r\n */\nasync function applyActionCode(auth, oobCode) {\n await applyActionCode$1(getModularInstance(auth), {\n oobCode\n });\n}\n/**\r\n * Checks a verification code sent to the user by email or other out-of-band mechanism.\r\n *\r\n * @returns metadata about the code.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param oobCode - A verification code sent to the user.\r\n *\r\n * @public\r\n */\nasync function checkActionCode(auth, oobCode) {\n const authModular = getModularInstance(auth);\n const response = await resetPassword(authModular, {\n oobCode\n });\n // Email could be empty only if the request type is EMAIL_SIGNIN or\n // VERIFY_AND_CHANGE_EMAIL.\n // New email should not be empty if the request type is\n // VERIFY_AND_CHANGE_EMAIL.\n // Multi-factor info could not be empty if the request type is\n // REVERT_SECOND_FACTOR_ADDITION.\n const operation = response.requestType;\n _assert(operation, authModular, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n switch (operation) {\n case \"EMAIL_SIGNIN\" /* ActionCodeOperation.EMAIL_SIGNIN */:\n break;\n case \"VERIFY_AND_CHANGE_EMAIL\" /* ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL */:\n _assert(response.newEmail, authModular, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n break;\n case \"REVERT_SECOND_FACTOR_ADDITION\" /* ActionCodeOperation.REVERT_SECOND_FACTOR_ADDITION */:\n _assert(response.mfaInfo, authModular, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n // fall through\n default:\n _assert(response.email, authModular, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n }\n // The multi-factor info for revert second factor addition\n let multiFactorInfo = null;\n if (response.mfaInfo) {\n multiFactorInfo = MultiFactorInfoImpl._fromServerResponse(_castAuth(authModular), response.mfaInfo);\n }\n return {\n data: {\n email: (response.requestType === \"VERIFY_AND_CHANGE_EMAIL\" /* ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL */ ? response.newEmail : response.email) || null,\n previousEmail: (response.requestType === \"VERIFY_AND_CHANGE_EMAIL\" /* ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL */ ? response.email : response.newEmail) || null,\n multiFactorInfo\n },\n operation\n };\n}\n/**\r\n * Checks a password reset code sent to the user by email or other out-of-band mechanism.\r\n *\r\n * @returns the user's email address if valid.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param code - A verification code sent to the user.\r\n *\r\n * @public\r\n */\nasync function verifyPasswordResetCode(auth, code) {\n const {\n data\n } = await checkActionCode(getModularInstance(auth), code);\n // Email should always be present since a code was sent to it\n return data.email;\n}\n/**\r\n * Creates a new user account associated with the specified email address and password.\r\n *\r\n * @remarks\r\n * On successful creation of the user account, this user will also be signed in to your application.\r\n *\r\n * User account creation can fail if the account already exists or the password is invalid.\r\n *\r\n * Note: The email address acts as a unique identifier for the user and enables an email-based\r\n * password reset. This function will create a new user account and set the initial user password.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param email - The user's email address.\r\n * @param password - The user's chosen password.\r\n *\r\n * @public\r\n */\nasync function createUserWithEmailAndPassword(auth, email, password) {\n const authInternal = _castAuth(auth);\n const request = {\n returnSecureToken: true,\n email,\n password,\n clientType: \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */\n };\n const signUpResponse = handleRecaptchaFlow(authInternal, request, \"signUpPassword\" /* RecaptchaActionName.SIGN_UP_PASSWORD */, signUp);\n const response = await signUpResponse.catch(error => {\n if (error.code === `auth/${\"password-does-not-meet-requirements\" /* AuthErrorCode.PASSWORD_DOES_NOT_MEET_REQUIREMENTS */}`) {\n void recachePasswordPolicy(auth);\n }\n throw error;\n });\n const userCredential = await UserCredentialImpl._fromIdTokenResponse(authInternal, \"signIn\" /* OperationType.SIGN_IN */, response);\n await authInternal._updateCurrentUser(userCredential.user);\n return userCredential;\n}\n/**\r\n * Asynchronously signs in using an email and password.\r\n *\r\n * @remarks\r\n * Fails with an error if the email address and password do not match.\r\n * When [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled,\r\n * this method fails with \"auth/invalid-credential\" in case of an invalid email/password.\r\n *\r\n * Note: The user's password is NOT the password used to access the user's email account. The\r\n * email address serves as a unique identifier for the user, and the password is used to access\r\n * the user's account in your Firebase project. See also: {@link createUserWithEmailAndPassword}.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param email - The users email address.\r\n * @param password - The users password.\r\n *\r\n * @public\r\n */\nfunction signInWithEmailAndPassword(auth, email, password) {\n return signInWithCredential(getModularInstance(auth), EmailAuthProvider.credential(email, password)).catch(async error => {\n if (error.code === `auth/${\"password-does-not-meet-requirements\" /* AuthErrorCode.PASSWORD_DOES_NOT_MEET_REQUIREMENTS */}`) {\n void recachePasswordPolicy(auth);\n }\n throw error;\n });\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Sends a sign-in email link to the user with the specified email.\r\n *\r\n * @remarks\r\n * The sign-in operation has to always be completed in the app unlike other out of band email\r\n * actions (password reset and email verifications). This is because, at the end of the flow,\r\n * the user is expected to be signed in and their Auth state persisted within the app.\r\n *\r\n * To complete sign in with the email link, call {@link signInWithEmailLink} with the email\r\n * address and the email link supplied in the email sent to the user.\r\n *\r\n * @example\r\n * ```javascript\r\n * const actionCodeSettings = {\r\n * url: 'https://www.example.com/?email=user@example.com',\r\n * iOS: {\r\n * bundleId: 'com.example.ios'\r\n * },\r\n * android: {\r\n * packageName: 'com.example.android',\r\n * installApp: true,\r\n * minimumVersion: '12'\r\n * },\r\n * handleCodeInApp: true\r\n * };\r\n * await sendSignInLinkToEmail(auth, 'user@example.com', actionCodeSettings);\r\n * // Obtain emailLink from the user.\r\n * if(isSignInWithEmailLink(auth, emailLink)) {\r\n * await signInWithEmailLink(auth, 'user@example.com', emailLink);\r\n * }\r\n * ```\r\n *\r\n * @param authInternal - The {@link Auth} instance.\r\n * @param email - The user's email address.\r\n * @param actionCodeSettings - The {@link ActionCodeSettings}.\r\n *\r\n * @public\r\n */\nasync function sendSignInLinkToEmail(auth, email, actionCodeSettings) {\n const authInternal = _castAuth(auth);\n const request = {\n requestType: \"EMAIL_SIGNIN\" /* ActionCodeOperation.EMAIL_SIGNIN */,\n email,\n clientType: \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */\n };\n function setActionCodeSettings(request, actionCodeSettings) {\n _assert(actionCodeSettings.handleCodeInApp, authInternal, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n if (actionCodeSettings) {\n _setActionCodeSettingsOnRequest(authInternal, request, actionCodeSettings);\n }\n }\n setActionCodeSettings(request, actionCodeSettings);\n await handleRecaptchaFlow(authInternal, request, \"getOobCode\" /* RecaptchaActionName.GET_OOB_CODE */, sendSignInLinkToEmail$1);\n}\n/**\r\n * Checks if an incoming link is a sign-in with email link suitable for {@link signInWithEmailLink}.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param emailLink - The link sent to the user's email address.\r\n *\r\n * @public\r\n */\nfunction isSignInWithEmailLink(auth, emailLink) {\n const actionCodeUrl = ActionCodeURL.parseLink(emailLink);\n return (actionCodeUrl === null || actionCodeUrl === void 0 ? void 0 : actionCodeUrl.operation) === \"EMAIL_SIGNIN\" /* ActionCodeOperation.EMAIL_SIGNIN */;\n}\n/**\r\n * Asynchronously signs in using an email and sign-in email link.\r\n *\r\n * @remarks\r\n * If no link is passed, the link is inferred from the current URL.\r\n *\r\n * Fails with an error if the email address is invalid or OTP in email link expires.\r\n *\r\n * Note: Confirm the link is a sign-in email link before calling this method firebase.auth.Auth.isSignInWithEmailLink.\r\n *\r\n * @example\r\n * ```javascript\r\n * const actionCodeSettings = {\r\n * url: 'https://www.example.com/?email=user@example.com',\r\n * iOS: {\r\n * bundleId: 'com.example.ios'\r\n * },\r\n * android: {\r\n * packageName: 'com.example.android',\r\n * installApp: true,\r\n * minimumVersion: '12'\r\n * },\r\n * handleCodeInApp: true\r\n * };\r\n * await sendSignInLinkToEmail(auth, 'user@example.com', actionCodeSettings);\r\n * // Obtain emailLink from the user.\r\n * if(isSignInWithEmailLink(auth, emailLink)) {\r\n * await signInWithEmailLink(auth, 'user@example.com', emailLink);\r\n * }\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param email - The user's email address.\r\n * @param emailLink - The link sent to the user's email address.\r\n *\r\n * @public\r\n */\nasync function signInWithEmailLink(auth, email, emailLink) {\n const authModular = getModularInstance(auth);\n const credential = EmailAuthProvider.credentialWithLink(email, emailLink || _getCurrentUrl());\n // Check if the tenant ID in the email link matches the tenant ID on Auth\n // instance.\n _assert(credential._tenantId === (authModular.tenantId || null), authModular, \"tenant-id-mismatch\" /* AuthErrorCode.TENANT_ID_MISMATCH */);\n return signInWithCredential(authModular, credential);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function createAuthUri(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:createAuthUri\" /* Endpoint.CREATE_AUTH_URI */, _addTidIfNecessary(auth, request));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Gets the list of possible sign in methods for the given email address. This method returns an\r\n * empty list when [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled, irrespective of the number of\r\n * authentication methods available for the given email.\r\n *\r\n * @remarks\r\n * This is useful to differentiate methods of sign-in for the same provider, eg.\r\n * {@link EmailAuthProvider} which has 2 methods of sign-in,\r\n * {@link SignInMethod}.EMAIL_PASSWORD and\r\n * {@link SignInMethod}.EMAIL_LINK.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param email - The user's email address.\r\n *\r\n * Deprecated. Migrating off of this method is recommended as a security best-practice.\r\n * Learn more in the Identity Platform documentation for [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection).\r\n * @public\r\n */\nasync function fetchSignInMethodsForEmail(auth, email) {\n // createAuthUri returns an error if continue URI is not http or https.\n // For environments like Cordova, Chrome extensions, native frameworks, file\n // systems, etc, use http://localhost as continue URL.\n const continueUri = _isHttpOrHttps() ? _getCurrentUrl() : 'http://localhost';\n const request = {\n identifier: email,\n continueUri\n };\n const {\n signinMethods\n } = await createAuthUri(getModularInstance(auth), request);\n return signinMethods || [];\n}\n/**\r\n * Sends a verification email to a user.\r\n *\r\n * @remarks\r\n * The verification process is completed by calling {@link applyActionCode}.\r\n *\r\n * @example\r\n * ```javascript\r\n * const actionCodeSettings = {\r\n * url: 'https://www.example.com/?email=user@example.com',\r\n * iOS: {\r\n * bundleId: 'com.example.ios'\r\n * },\r\n * android: {\r\n * packageName: 'com.example.android',\r\n * installApp: true,\r\n * minimumVersion: '12'\r\n * },\r\n * handleCodeInApp: true\r\n * };\r\n * await sendEmailVerification(user, actionCodeSettings);\r\n * // Obtain code from the user.\r\n * await applyActionCode(auth, code);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param actionCodeSettings - The {@link ActionCodeSettings}.\r\n *\r\n * @public\r\n */\nasync function sendEmailVerification(user, actionCodeSettings) {\n const userInternal = getModularInstance(user);\n const idToken = await user.getIdToken();\n const request = {\n requestType: \"VERIFY_EMAIL\" /* ActionCodeOperation.VERIFY_EMAIL */,\n idToken\n };\n if (actionCodeSettings) {\n _setActionCodeSettingsOnRequest(userInternal.auth, request, actionCodeSettings);\n }\n const {\n email\n } = await sendEmailVerification$1(userInternal.auth, request);\n if (email !== user.email) {\n await user.reload();\n }\n}\n/**\r\n * Sends a verification email to a new email address.\r\n *\r\n * @remarks\r\n * The user's email will be updated to the new one after being verified.\r\n *\r\n * If you have a custom email action handler, you can complete the verification process by calling\r\n * {@link applyActionCode}.\r\n *\r\n * @example\r\n * ```javascript\r\n * const actionCodeSettings = {\r\n * url: 'https://www.example.com/?email=user@example.com',\r\n * iOS: {\r\n * bundleId: 'com.example.ios'\r\n * },\r\n * android: {\r\n * packageName: 'com.example.android',\r\n * installApp: true,\r\n * minimumVersion: '12'\r\n * },\r\n * handleCodeInApp: true\r\n * };\r\n * await verifyBeforeUpdateEmail(user, 'newemail@example.com', actionCodeSettings);\r\n * // Obtain code from the user.\r\n * await applyActionCode(auth, code);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param newEmail - The new email address to be verified before update.\r\n * @param actionCodeSettings - The {@link ActionCodeSettings}.\r\n *\r\n * @public\r\n */\nasync function verifyBeforeUpdateEmail(user, newEmail, actionCodeSettings) {\n const userInternal = getModularInstance(user);\n const idToken = await user.getIdToken();\n const request = {\n requestType: \"VERIFY_AND_CHANGE_EMAIL\" /* ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL */,\n idToken,\n newEmail\n };\n if (actionCodeSettings) {\n _setActionCodeSettingsOnRequest(userInternal.auth, request, actionCodeSettings);\n }\n const {\n email\n } = await verifyAndChangeEmail(userInternal.auth, request);\n if (email !== user.email) {\n // If the local copy of the email on user is outdated, reload the\n // user.\n await user.reload();\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function updateProfile$1(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:update\" /* Endpoint.SET_ACCOUNT_INFO */, request);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Updates a user's profile data.\r\n *\r\n * @param user - The user.\r\n * @param profile - The profile's `displayName` and `photoURL` to update.\r\n *\r\n * @public\r\n */\nasync function updateProfile(user, {\n displayName,\n photoURL: photoUrl\n}) {\n if (displayName === undefined && photoUrl === undefined) {\n return;\n }\n const userInternal = getModularInstance(user);\n const idToken = await userInternal.getIdToken();\n const profileRequest = {\n idToken,\n displayName,\n photoUrl,\n returnSecureToken: true\n };\n const response = await _logoutIfInvalidated(userInternal, updateProfile$1(userInternal.auth, profileRequest));\n userInternal.displayName = response.displayName || null;\n userInternal.photoURL = response.photoUrl || null;\n // Update the password provider as well\n const passwordProvider = userInternal.providerData.find(({\n providerId\n }) => providerId === \"password\" /* ProviderId.PASSWORD */);\n if (passwordProvider) {\n passwordProvider.displayName = userInternal.displayName;\n passwordProvider.photoURL = userInternal.photoURL;\n }\n await userInternal._updateTokensIfNecessary(response);\n}\n/**\r\n * Updates the user's email address.\r\n *\r\n * @remarks\r\n * An email will be sent to the original email address (if it was set) that allows to revoke the\r\n * email address change, in order to protect them from account hijacking.\r\n *\r\n * Important: this is a security sensitive operation that requires the user to have recently signed\r\n * in. If this requirement isn't met, ask the user to authenticate again and then call\r\n * {@link reauthenticateWithCredential}.\r\n *\r\n * @param user - The user.\r\n * @param newEmail - The new email address.\r\n *\r\n * Throws \"auth/operation-not-allowed\" error when [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled.\r\n * Deprecated - Use {@link verifyBeforeUpdateEmail} instead.\r\n *\r\n * @public\r\n */\nfunction updateEmail(user, newEmail) {\n return updateEmailOrPassword(getModularInstance(user), newEmail, null);\n}\n/**\r\n * Updates the user's password.\r\n *\r\n * @remarks\r\n * Important: this is a security sensitive operation that requires the user to have recently signed\r\n * in. If this requirement isn't met, ask the user to authenticate again and then call\r\n * {@link reauthenticateWithCredential}.\r\n *\r\n * @param user - The user.\r\n * @param newPassword - The new password.\r\n *\r\n * @public\r\n */\nfunction updatePassword(user, newPassword) {\n return updateEmailOrPassword(getModularInstance(user), null, newPassword);\n}\nasync function updateEmailOrPassword(user, email, password) {\n const {\n auth\n } = user;\n const idToken = await user.getIdToken();\n const request = {\n idToken,\n returnSecureToken: true\n };\n if (email) {\n request.email = email;\n }\n if (password) {\n request.password = password;\n }\n const response = await _logoutIfInvalidated(user, updateEmailPassword(auth, request));\n await user._updateTokensIfNecessary(response, /* reload */true);\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Parse the `AdditionalUserInfo` from the ID token response.\r\n *\r\n */\nfunction _fromIdTokenResponse(idTokenResponse) {\n var _a, _b;\n if (!idTokenResponse) {\n return null;\n }\n const {\n providerId\n } = idTokenResponse;\n const profile = idTokenResponse.rawUserInfo ? JSON.parse(idTokenResponse.rawUserInfo) : {};\n const isNewUser = idTokenResponse.isNewUser || idTokenResponse.kind === \"identitytoolkit#SignupNewUserResponse\" /* IdTokenResponseKind.SignupNewUser */;\n if (!providerId && (idTokenResponse === null || idTokenResponse === void 0 ? void 0 : idTokenResponse.idToken)) {\n const signInProvider = (_b = (_a = _parseToken(idTokenResponse.idToken)) === null || _a === void 0 ? void 0 : _a.firebase) === null || _b === void 0 ? void 0 : _b['sign_in_provider'];\n if (signInProvider) {\n const filteredProviderId = signInProvider !== \"anonymous\" /* ProviderId.ANONYMOUS */ && signInProvider !== \"custom\" /* ProviderId.CUSTOM */ ? signInProvider : null;\n // Uses generic class in accordance with the legacy SDK.\n return new GenericAdditionalUserInfo(isNewUser, filteredProviderId);\n }\n }\n if (!providerId) {\n return null;\n }\n switch (providerId) {\n case \"facebook.com\" /* ProviderId.FACEBOOK */:\n return new FacebookAdditionalUserInfo(isNewUser, profile);\n case \"github.com\" /* ProviderId.GITHUB */:\n return new GithubAdditionalUserInfo(isNewUser, profile);\n case \"google.com\" /* ProviderId.GOOGLE */:\n return new GoogleAdditionalUserInfo(isNewUser, profile);\n case \"twitter.com\" /* ProviderId.TWITTER */:\n return new TwitterAdditionalUserInfo(isNewUser, profile, idTokenResponse.screenName || null);\n case \"custom\" /* ProviderId.CUSTOM */:\n case \"anonymous\" /* ProviderId.ANONYMOUS */:\n return new GenericAdditionalUserInfo(isNewUser, null);\n default:\n return new GenericAdditionalUserInfo(isNewUser, providerId, profile);\n }\n}\nclass GenericAdditionalUserInfo {\n constructor(isNewUser, providerId, profile = {}) {\n this.isNewUser = isNewUser;\n this.providerId = providerId;\n this.profile = profile;\n }\n}\nclass FederatedAdditionalUserInfoWithUsername extends GenericAdditionalUserInfo {\n constructor(isNewUser, providerId, profile, username) {\n super(isNewUser, providerId, profile);\n this.username = username;\n }\n}\nclass FacebookAdditionalUserInfo extends GenericAdditionalUserInfo {\n constructor(isNewUser, profile) {\n super(isNewUser, \"facebook.com\" /* ProviderId.FACEBOOK */, profile);\n }\n}\nclass GithubAdditionalUserInfo extends FederatedAdditionalUserInfoWithUsername {\n constructor(isNewUser, profile) {\n super(isNewUser, \"github.com\" /* ProviderId.GITHUB */, profile, typeof (profile === null || profile === void 0 ? void 0 : profile.login) === 'string' ? profile === null || profile === void 0 ? void 0 : profile.login : null);\n }\n}\nclass GoogleAdditionalUserInfo extends GenericAdditionalUserInfo {\n constructor(isNewUser, profile) {\n super(isNewUser, \"google.com\" /* ProviderId.GOOGLE */, profile);\n }\n}\nclass TwitterAdditionalUserInfo extends FederatedAdditionalUserInfoWithUsername {\n constructor(isNewUser, profile, screenName) {\n super(isNewUser, \"twitter.com\" /* ProviderId.TWITTER */, profile, screenName);\n }\n}\n/**\r\n * Extracts provider specific {@link AdditionalUserInfo} for the given credential.\r\n *\r\n * @param userCredential - The user credential.\r\n *\r\n * @public\r\n */\nfunction getAdditionalUserInfo(userCredential) {\n const {\n user,\n _tokenResponse\n } = userCredential;\n if (user.isAnonymous && !_tokenResponse) {\n // Handle the special case where signInAnonymously() gets called twice.\n // No network call is made so there's nothing to actually fill this in\n return {\n providerId: null,\n isNewUser: false,\n profile: null\n };\n }\n return _fromIdTokenResponse(_tokenResponse);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// Non-optional auth methods.\n/**\r\n * Changes the type of persistence on the {@link Auth} instance for the currently saved\r\n * `Auth` session and applies this type of persistence for future sign-in requests, including\r\n * sign-in with redirect requests.\r\n *\r\n * @remarks\r\n * This makes it easy for a user signing in to specify whether their session should be\r\n * remembered or not. It also makes it easier to never persist the `Auth` state for applications\r\n * that are shared by other users or have sensitive data.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * setPersistence(auth, browserSessionPersistence);\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param persistence - The {@link Persistence} to use.\r\n * @returns A `Promise` that resolves once the persistence change has completed\r\n *\r\n * @public\r\n */\nfunction setPersistence(auth, persistence) {\n return getModularInstance(auth).setPersistence(persistence);\n}\n/**\r\n * Loads the reCAPTCHA configuration into the `Auth` instance.\r\n *\r\n * @remarks\r\n * This will load the reCAPTCHA config, which indicates whether the reCAPTCHA\r\n * verification flow should be triggered for each auth provider, into the\r\n * current Auth session.\r\n *\r\n * If initializeRecaptchaConfig() is not invoked, the auth flow will always start\r\n * without reCAPTCHA verification. If the provider is configured to require reCAPTCHA\r\n * verification, the SDK will transparently load the reCAPTCHA config and restart the\r\n * auth flows.\r\n *\r\n * Thus, by calling this optional method, you will reduce the latency of future auth flows.\r\n * Loading the reCAPTCHA config early will also enhance the signal collected by reCAPTCHA.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * initializeRecaptchaConfig(auth);\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n *\r\n * @public\r\n */\nfunction initializeRecaptchaConfig(auth) {\n return _initializeRecaptchaConfig(auth);\n}\n/**\r\n * Validates the password against the password policy configured for the project or tenant.\r\n *\r\n * @remarks\r\n * If no tenant ID is set on the `Auth` instance, then this method will use the password\r\n * policy configured for the project. Otherwise, this method will use the policy configured\r\n * for the tenant. If a password policy has not been configured, then the default policy\r\n * configured for all projects will be used.\r\n *\r\n * If an auth flow fails because a submitted password does not meet the password policy\r\n * requirements and this method has previously been called, then this method will use the\r\n * most recent policy available when called again.\r\n *\r\n * @example\r\n * ```javascript\r\n * validatePassword(auth, 'some-password');\r\n * ```\r\n *\r\n * @param auth The {@link Auth} instance.\r\n * @param password The password to validate.\r\n *\r\n * @public\r\n */\nasync function validatePassword(auth, password) {\n const authInternal = _castAuth(auth);\n return authInternal.validatePassword(password);\n}\n/**\r\n * Adds an observer for changes to the signed-in user's ID token.\r\n *\r\n * @remarks\r\n * This includes sign-in, sign-out, and token refresh events.\r\n * This will not be triggered automatically upon ID token expiration. Use {@link User.getIdToken} to refresh the ID token.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param nextOrObserver - callback triggered on change.\r\n * @param error - Deprecated. This callback is never triggered. Errors\r\n * on signing in/out can be caught in promises returned from\r\n * sign-in/sign-out functions.\r\n * @param completed - Deprecated. This callback is never triggered.\r\n *\r\n * @public\r\n */\nfunction onIdTokenChanged(auth, nextOrObserver, error, completed) {\n return getModularInstance(auth).onIdTokenChanged(nextOrObserver, error, completed);\n}\n/**\r\n * Adds a blocking callback that runs before an auth state change\r\n * sets a new user.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param callback - callback triggered before new user value is set.\r\n * If this throws, it blocks the user from being set.\r\n * @param onAbort - callback triggered if a later `beforeAuthStateChanged()`\r\n * callback throws, allowing you to undo any side effects.\r\n */\nfunction beforeAuthStateChanged(auth, callback, onAbort) {\n return getModularInstance(auth).beforeAuthStateChanged(callback, onAbort);\n}\n/**\r\n * Adds an observer for changes to the user's sign-in state.\r\n *\r\n * @remarks\r\n * To keep the old behavior, see {@link onIdTokenChanged}.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param nextOrObserver - callback triggered on change.\r\n * @param error - Deprecated. This callback is never triggered. Errors\r\n * on signing in/out can be caught in promises returned from\r\n * sign-in/sign-out functions.\r\n * @param completed - Deprecated. This callback is never triggered.\r\n *\r\n * @public\r\n */\nfunction onAuthStateChanged(auth, nextOrObserver, error, completed) {\n return getModularInstance(auth).onAuthStateChanged(nextOrObserver, error, completed);\n}\n/**\r\n * Sets the current language to the default device/browser preference.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n *\r\n * @public\r\n */\nfunction useDeviceLanguage(auth) {\n getModularInstance(auth).useDeviceLanguage();\n}\n/**\r\n * Asynchronously sets the provided user as {@link Auth.currentUser} on the\r\n * {@link Auth} instance.\r\n *\r\n * @remarks\r\n * A new instance copy of the user provided will be made and set as currentUser.\r\n *\r\n * This will trigger {@link onAuthStateChanged} and {@link onIdTokenChanged} listeners\r\n * like other sign in methods.\r\n *\r\n * The operation fails with an error if the user to be updated belongs to a different Firebase\r\n * project.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param user - The new {@link User}.\r\n *\r\n * @public\r\n */\nfunction updateCurrentUser(auth, user) {\n return getModularInstance(auth).updateCurrentUser(user);\n}\n/**\r\n * Signs out the current user.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n *\r\n * @public\r\n */\nfunction signOut(auth) {\n return getModularInstance(auth).signOut();\n}\n/**\r\n * Revokes the given access token. Currently only supports Apple OAuth access tokens.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param token - The Apple OAuth access token.\r\n *\r\n * @public\r\n */\nfunction revokeAccessToken(auth, token) {\n const authInternal = _castAuth(auth);\n return authInternal.revokeAccessToken(token);\n}\n/**\r\n * Deletes and signs out the user.\r\n *\r\n * @remarks\r\n * Important: this is a security-sensitive operation that requires the user to have recently\r\n * signed in. If this requirement isn't met, ask the user to authenticate again and then call\r\n * {@link reauthenticateWithCredential}.\r\n *\r\n * @param user - The user.\r\n *\r\n * @public\r\n */\nasync function deleteUser(user) {\n return getModularInstance(user).delete();\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass MultiFactorSessionImpl {\n constructor(type, credential, user) {\n this.type = type;\n this.credential = credential;\n this.user = user;\n }\n static _fromIdtoken(idToken, user) {\n return new MultiFactorSessionImpl(\"enroll\" /* MultiFactorSessionType.ENROLL */, idToken, user);\n }\n static _fromMfaPendingCredential(mfaPendingCredential) {\n return new MultiFactorSessionImpl(\"signin\" /* MultiFactorSessionType.SIGN_IN */, mfaPendingCredential);\n }\n toJSON() {\n const key = this.type === \"enroll\" /* MultiFactorSessionType.ENROLL */ ? 'idToken' : 'pendingCredential';\n return {\n multiFactorSession: {\n [key]: this.credential\n }\n };\n }\n static fromJSON(obj) {\n var _a, _b;\n if (obj === null || obj === void 0 ? void 0 : obj.multiFactorSession) {\n if ((_a = obj.multiFactorSession) === null || _a === void 0 ? void 0 : _a.pendingCredential) {\n return MultiFactorSessionImpl._fromMfaPendingCredential(obj.multiFactorSession.pendingCredential);\n } else if ((_b = obj.multiFactorSession) === null || _b === void 0 ? void 0 : _b.idToken) {\n return MultiFactorSessionImpl._fromIdtoken(obj.multiFactorSession.idToken);\n }\n }\n return null;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass MultiFactorResolverImpl {\n constructor(session, hints, signInResolver) {\n this.session = session;\n this.hints = hints;\n this.signInResolver = signInResolver;\n }\n /** @internal */\n static _fromError(authExtern, error) {\n const auth = _castAuth(authExtern);\n const serverResponse = error.customData._serverResponse;\n const hints = (serverResponse.mfaInfo || []).map(enrollment => MultiFactorInfoImpl._fromServerResponse(auth, enrollment));\n _assert(serverResponse.mfaPendingCredential, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n const session = MultiFactorSessionImpl._fromMfaPendingCredential(serverResponse.mfaPendingCredential);\n return new MultiFactorResolverImpl(session, hints, async assertion => {\n const mfaResponse = await assertion._process(auth, session);\n // Clear out the unneeded fields from the old login response\n delete serverResponse.mfaInfo;\n delete serverResponse.mfaPendingCredential;\n // Use in the new token & refresh token in the old response\n const idTokenResponse = Object.assign(Object.assign({}, serverResponse), {\n idToken: mfaResponse.idToken,\n refreshToken: mfaResponse.refreshToken\n });\n // TODO: we should collapse this switch statement into UserCredentialImpl._forOperation and have it support the SIGN_IN case\n switch (error.operationType) {\n case \"signIn\" /* OperationType.SIGN_IN */:\n const userCredential = await UserCredentialImpl._fromIdTokenResponse(auth, error.operationType, idTokenResponse);\n await auth._updateCurrentUser(userCredential.user);\n return userCredential;\n case \"reauthenticate\" /* OperationType.REAUTHENTICATE */:\n _assert(error.user, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n return UserCredentialImpl._forOperation(error.user, error.operationType, idTokenResponse);\n default:\n _fail(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n }\n });\n }\n async resolveSignIn(assertionExtern) {\n const assertion = assertionExtern;\n return this.signInResolver(assertion);\n }\n}\n/**\r\n * Provides a {@link MultiFactorResolver} suitable for completion of a\r\n * multi-factor flow.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param error - The {@link MultiFactorError} raised during a sign-in, or\r\n * reauthentication operation.\r\n *\r\n * @public\r\n */\nfunction getMultiFactorResolver(auth, error) {\n var _a;\n const authModular = getModularInstance(auth);\n const errorInternal = error;\n _assert(error.customData.operationType, authModular, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n _assert((_a = errorInternal.customData._serverResponse) === null || _a === void 0 ? void 0 : _a.mfaPendingCredential, authModular, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n return MultiFactorResolverImpl._fromError(authModular, errorInternal);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction startEnrollPhoneMfa(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaEnrollment:start\" /* Endpoint.START_MFA_ENROLLMENT */, _addTidIfNecessary(auth, request));\n}\nfunction finalizeEnrollPhoneMfa(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaEnrollment:finalize\" /* Endpoint.FINALIZE_MFA_ENROLLMENT */, _addTidIfNecessary(auth, request));\n}\nfunction startEnrollTotpMfa(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaEnrollment:start\" /* Endpoint.START_MFA_ENROLLMENT */, _addTidIfNecessary(auth, request));\n}\nfunction finalizeEnrollTotpMfa(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaEnrollment:finalize\" /* Endpoint.FINALIZE_MFA_ENROLLMENT */, _addTidIfNecessary(auth, request));\n}\nfunction withdrawMfa(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaEnrollment:withdraw\" /* Endpoint.WITHDRAW_MFA */, _addTidIfNecessary(auth, request));\n}\nclass MultiFactorUserImpl {\n constructor(user) {\n this.user = user;\n this.enrolledFactors = [];\n user._onReload(userInfo => {\n if (userInfo.mfaInfo) {\n this.enrolledFactors = userInfo.mfaInfo.map(enrollment => MultiFactorInfoImpl._fromServerResponse(user.auth, enrollment));\n }\n });\n }\n static _fromUser(user) {\n return new MultiFactorUserImpl(user);\n }\n async getSession() {\n return MultiFactorSessionImpl._fromIdtoken(await this.user.getIdToken(), this.user);\n }\n async enroll(assertionExtern, displayName) {\n const assertion = assertionExtern;\n const session = await this.getSession();\n const finalizeMfaResponse = await _logoutIfInvalidated(this.user, assertion._process(this.user.auth, session, displayName));\n // New tokens will be issued after enrollment of the new second factors.\n // They need to be updated on the user.\n await this.user._updateTokensIfNecessary(finalizeMfaResponse);\n // The user needs to be reloaded to get the new multi-factor information\n // from server. USER_RELOADED event will be triggered and `enrolledFactors`\n // will be updated.\n return this.user.reload();\n }\n async unenroll(infoOrUid) {\n const mfaEnrollmentId = typeof infoOrUid === 'string' ? infoOrUid : infoOrUid.uid;\n const idToken = await this.user.getIdToken();\n try {\n const idTokenResponse = await _logoutIfInvalidated(this.user, withdrawMfa(this.user.auth, {\n idToken,\n mfaEnrollmentId\n }));\n // Remove the second factor from the user's list.\n this.enrolledFactors = this.enrolledFactors.filter(({\n uid\n }) => uid !== mfaEnrollmentId);\n // Depending on whether the backend decided to revoke the user's session,\n // the tokenResponse may be empty. If the tokens were not updated (and they\n // are now invalid), reloading the user will discover this and invalidate\n // the user's state accordingly.\n await this.user._updateTokensIfNecessary(idTokenResponse);\n await this.user.reload();\n } catch (e) {\n throw e;\n }\n }\n}\nconst multiFactorUserCache = new WeakMap();\n/**\r\n * The {@link MultiFactorUser} corresponding to the user.\r\n *\r\n * @remarks\r\n * This is used to access all multi-factor properties and operations related to the user.\r\n *\r\n * @param user - The user.\r\n *\r\n * @public\r\n */\nfunction multiFactor(user) {\n const userModular = getModularInstance(user);\n if (!multiFactorUserCache.has(userModular)) {\n multiFactorUserCache.set(userModular, MultiFactorUserImpl._fromUser(userModular));\n }\n return multiFactorUserCache.get(userModular);\n}\nconst STORAGE_AVAILABLE_KEY = '__sak';\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// There are two different browser persistence types: local and session.\n// Both have the same implementation but use a different underlying storage\n// object.\nclass BrowserPersistenceClass {\n constructor(storageRetriever, type) {\n this.storageRetriever = storageRetriever;\n this.type = type;\n }\n _isAvailable() {\n try {\n if (!this.storage) {\n return Promise.resolve(false);\n }\n this.storage.setItem(STORAGE_AVAILABLE_KEY, '1');\n this.storage.removeItem(STORAGE_AVAILABLE_KEY);\n return Promise.resolve(true);\n } catch (_a) {\n return Promise.resolve(false);\n }\n }\n _set(key, value) {\n this.storage.setItem(key, JSON.stringify(value));\n return Promise.resolve();\n }\n _get(key) {\n const json = this.storage.getItem(key);\n return Promise.resolve(json ? JSON.parse(json) : null);\n }\n _remove(key) {\n this.storage.removeItem(key);\n return Promise.resolve();\n }\n get storage() {\n return this.storageRetriever();\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _iframeCannotSyncWebStorage() {\n const ua = getUA();\n return _isSafari(ua) || _isIOS(ua);\n}\n// The polling period in case events are not supported\nconst _POLLING_INTERVAL_MS$1 = 1000;\n// The IE 10 localStorage cross tab synchronization delay in milliseconds\nconst IE10_LOCAL_STORAGE_SYNC_DELAY = 10;\nlet BrowserLocalPersistence = /*#__PURE__*/(() => {\n class BrowserLocalPersistence extends BrowserPersistenceClass {\n constructor() {\n super(() => window.localStorage, \"LOCAL\" /* PersistenceType.LOCAL */);\n this.boundEventHandler = (event, poll) => this.onStorageEvent(event, poll);\n this.listeners = {};\n this.localCache = {};\n // setTimeout return value is platform specific\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.pollTimer = null;\n // Safari or iOS browser and embedded in an iframe.\n this.safariLocalStorageNotSynced = _iframeCannotSyncWebStorage() && _isIframe();\n // Whether to use polling instead of depending on window events\n this.fallbackToPolling = _isMobileBrowser();\n this._shouldAllowMigration = true;\n }\n forAllChangedKeys(cb) {\n // Check all keys with listeners on them.\n for (const key of Object.keys(this.listeners)) {\n // Get value from localStorage.\n const newValue = this.storage.getItem(key);\n const oldValue = this.localCache[key];\n // If local map value does not match, trigger listener with storage event.\n // Differentiate this simulated event from the real storage event.\n if (newValue !== oldValue) {\n cb(key, oldValue, newValue);\n }\n }\n }\n onStorageEvent(event, poll = false) {\n // Key would be null in some situations, like when localStorage is cleared\n if (!event.key) {\n this.forAllChangedKeys((key, _oldValue, newValue) => {\n this.notifyListeners(key, newValue);\n });\n return;\n }\n const key = event.key;\n // Check the mechanism how this event was detected.\n // The first event will dictate the mechanism to be used.\n if (poll) {\n // Environment detects storage changes via polling.\n // Remove storage event listener to prevent possible event duplication.\n this.detachListener();\n } else {\n // Environment detects storage changes via storage event listener.\n // Remove polling listener to prevent possible event duplication.\n this.stopPolling();\n }\n // Safari embedded iframe. Storage event will trigger with the delta\n // changes but no changes will be applied to the iframe localStorage.\n if (this.safariLocalStorageNotSynced) {\n // Get current iframe page value.\n const storedValue = this.storage.getItem(key);\n // Value not synchronized, synchronize manually.\n if (event.newValue !== storedValue) {\n if (event.newValue !== null) {\n // Value changed from current value.\n this.storage.setItem(key, event.newValue);\n } else {\n // Current value deleted.\n this.storage.removeItem(key);\n }\n } else if (this.localCache[key] === event.newValue && !poll) {\n // Already detected and processed, do not trigger listeners again.\n return;\n }\n }\n const triggerListeners = () => {\n // Keep local map up to date in case storage event is triggered before\n // poll.\n const storedValue = this.storage.getItem(key);\n if (!poll && this.localCache[key] === storedValue) {\n // Real storage event which has already been detected, do nothing.\n // This seems to trigger in some IE browsers for some reason.\n return;\n }\n this.notifyListeners(key, storedValue);\n };\n const storedValue = this.storage.getItem(key);\n if (_isIE10() && storedValue !== event.newValue && event.newValue !== event.oldValue) {\n // IE 10 has this weird bug where a storage event would trigger with the\n // correct key, oldValue and newValue but localStorage.getItem(key) does\n // not yield the updated value until a few milliseconds. This ensures\n // this recovers from that situation.\n setTimeout(triggerListeners, IE10_LOCAL_STORAGE_SYNC_DELAY);\n } else {\n triggerListeners();\n }\n }\n notifyListeners(key, value) {\n this.localCache[key] = value;\n const listeners = this.listeners[key];\n if (listeners) {\n for (const listener of Array.from(listeners)) {\n listener(value ? JSON.parse(value) : value);\n }\n }\n }\n startPolling() {\n this.stopPolling();\n this.pollTimer = setInterval(() => {\n this.forAllChangedKeys((key, oldValue, newValue) => {\n this.onStorageEvent(new StorageEvent('storage', {\n key,\n oldValue,\n newValue\n }), /* poll */true);\n });\n }, _POLLING_INTERVAL_MS$1);\n }\n stopPolling() {\n if (this.pollTimer) {\n clearInterval(this.pollTimer);\n this.pollTimer = null;\n }\n }\n attachListener() {\n window.addEventListener('storage', this.boundEventHandler);\n }\n detachListener() {\n window.removeEventListener('storage', this.boundEventHandler);\n }\n _addListener(key, listener) {\n if (Object.keys(this.listeners).length === 0) {\n // Whether browser can detect storage event when it had already been pushed to the background.\n // This may happen in some mobile browsers. A localStorage change in the foreground window\n // will not be detected in the background window via the storage event.\n // This was detected in iOS 7.x mobile browsers\n if (this.fallbackToPolling) {\n this.startPolling();\n } else {\n this.attachListener();\n }\n }\n if (!this.listeners[key]) {\n this.listeners[key] = new Set();\n // Populate the cache to avoid spuriously triggering on first poll.\n this.localCache[key] = this.storage.getItem(key);\n }\n this.listeners[key].add(listener);\n }\n _removeListener(key, listener) {\n if (this.listeners[key]) {\n this.listeners[key].delete(listener);\n if (this.listeners[key].size === 0) {\n delete this.listeners[key];\n }\n }\n if (Object.keys(this.listeners).length === 0) {\n this.detachListener();\n this.stopPolling();\n }\n }\n // Update local cache on base operations:\n async _set(key, value) {\n await super._set(key, value);\n this.localCache[key] = JSON.stringify(value);\n }\n async _get(key) {\n const value = await super._get(key);\n this.localCache[key] = JSON.stringify(value);\n return value;\n }\n async _remove(key) {\n await super._remove(key);\n delete this.localCache[key];\n }\n }\n BrowserLocalPersistence.type = 'LOCAL';\n /**\r\n * An implementation of {@link Persistence} of type `LOCAL` using `localStorage`\r\n * for the underlying storage.\r\n *\r\n * @public\r\n */\n return BrowserLocalPersistence;\n})();\nconst browserLocalPersistence = BrowserLocalPersistence;\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nlet BrowserSessionPersistence = /*#__PURE__*/(() => {\n class BrowserSessionPersistence extends BrowserPersistenceClass {\n constructor() {\n super(() => window.sessionStorage, \"SESSION\" /* PersistenceType.SESSION */);\n }\n _addListener(_key, _listener) {\n // Listeners are not supported for session storage since it cannot be shared across windows\n return;\n }\n _removeListener(_key, _listener) {\n // Listeners are not supported for session storage since it cannot be shared across windows\n return;\n }\n }\n BrowserSessionPersistence.type = 'SESSION';\n /**\r\n * An implementation of {@link Persistence} of `SESSION` using `sessionStorage`\r\n * for the underlying storage.\r\n *\r\n * @public\r\n */\n return BrowserSessionPersistence;\n})();\nconst browserSessionPersistence = BrowserSessionPersistence;\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Shim for Promise.allSettled, note the slightly different format of `fulfilled` vs `status`.\r\n *\r\n * @param promises - Array of promises to wait on.\r\n */\nfunction _allSettled(promises) {\n return Promise.all(promises.map(async promise => {\n try {\n const value = await promise;\n return {\n fulfilled: true,\n value\n };\n } catch (reason) {\n return {\n fulfilled: false,\n reason\n };\n }\n }));\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Interface class for receiving messages.\r\n *\r\n */\nlet Receiver = /*#__PURE__*/(() => {\n class Receiver {\n constructor(eventTarget) {\n this.eventTarget = eventTarget;\n this.handlersMap = {};\n this.boundEventHandler = this.handleEvent.bind(this);\n }\n /**\r\n * Obtain an instance of a Receiver for a given event target, if none exists it will be created.\r\n *\r\n * @param eventTarget - An event target (such as window or self) through which the underlying\r\n * messages will be received.\r\n */\n static _getInstance(eventTarget) {\n // The results are stored in an array since objects can't be keys for other\n // objects. In addition, setting a unique property on an event target as a\n // hash map key may not be allowed due to CORS restrictions.\n const existingInstance = this.receivers.find(receiver => receiver.isListeningto(eventTarget));\n if (existingInstance) {\n return existingInstance;\n }\n const newInstance = new Receiver(eventTarget);\n this.receivers.push(newInstance);\n return newInstance;\n }\n isListeningto(eventTarget) {\n return this.eventTarget === eventTarget;\n }\n /**\r\n * Fans out a MessageEvent to the appropriate listeners.\r\n *\r\n * @remarks\r\n * Sends an {@link Status.ACK} upon receipt and a {@link Status.DONE} once all handlers have\r\n * finished processing.\r\n *\r\n * @param event - The MessageEvent.\r\n *\r\n */\n async handleEvent(event) {\n const messageEvent = event;\n const {\n eventId,\n eventType,\n data\n } = messageEvent.data;\n const handlers = this.handlersMap[eventType];\n if (!(handlers === null || handlers === void 0 ? void 0 : handlers.size)) {\n return;\n }\n messageEvent.ports[0].postMessage({\n status: \"ack\" /* _Status.ACK */,\n eventId,\n eventType\n });\n const promises = Array.from(handlers).map(async handler => handler(messageEvent.origin, data));\n const response = await _allSettled(promises);\n messageEvent.ports[0].postMessage({\n status: \"done\" /* _Status.DONE */,\n eventId,\n eventType,\n response\n });\n }\n /**\r\n * Subscribe an event handler for a particular event.\r\n *\r\n * @param eventType - Event name to subscribe to.\r\n * @param eventHandler - The event handler which should receive the events.\r\n *\r\n */\n _subscribe(eventType, eventHandler) {\n if (Object.keys(this.handlersMap).length === 0) {\n this.eventTarget.addEventListener('message', this.boundEventHandler);\n }\n if (!this.handlersMap[eventType]) {\n this.handlersMap[eventType] = new Set();\n }\n this.handlersMap[eventType].add(eventHandler);\n }\n /**\r\n * Unsubscribe an event handler from a particular event.\r\n *\r\n * @param eventType - Event name to unsubscribe from.\r\n * @param eventHandler - Optinoal event handler, if none provided, unsubscribe all handlers on this event.\r\n *\r\n */\n _unsubscribe(eventType, eventHandler) {\n if (this.handlersMap[eventType] && eventHandler) {\n this.handlersMap[eventType].delete(eventHandler);\n }\n if (!eventHandler || this.handlersMap[eventType].size === 0) {\n delete this.handlersMap[eventType];\n }\n if (Object.keys(this.handlersMap).length === 0) {\n this.eventTarget.removeEventListener('message', this.boundEventHandler);\n }\n }\n }\n Receiver.receivers = [];\n\n /**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n return Receiver;\n})();\nfunction _generateEventId(prefix = '', digits = 10) {\n let random = '';\n for (let i = 0; i < digits; i++) {\n random += Math.floor(Math.random() * 10);\n }\n return prefix + random;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Interface for sending messages and waiting for a completion response.\r\n *\r\n */\nclass Sender {\n constructor(target) {\n this.target = target;\n this.handlers = new Set();\n }\n /**\r\n * Unsubscribe the handler and remove it from our tracking Set.\r\n *\r\n * @param handler - The handler to unsubscribe.\r\n */\n removeMessageHandler(handler) {\n if (handler.messageChannel) {\n handler.messageChannel.port1.removeEventListener('message', handler.onMessage);\n handler.messageChannel.port1.close();\n }\n this.handlers.delete(handler);\n }\n /**\r\n * Send a message to the Receiver located at {@link target}.\r\n *\r\n * @remarks\r\n * We'll first wait a bit for an ACK , if we get one we will wait significantly longer until the\r\n * receiver has had a chance to fully process the event.\r\n *\r\n * @param eventType - Type of event to send.\r\n * @param data - The payload of the event.\r\n * @param timeout - Timeout for waiting on an ACK from the receiver.\r\n *\r\n * @returns An array of settled promises from all the handlers that were listening on the receiver.\r\n */\n async _send(eventType, data, timeout = 50 /* _TimeoutDuration.ACK */) {\n const messageChannel = typeof MessageChannel !== 'undefined' ? new MessageChannel() : null;\n if (!messageChannel) {\n throw new Error(\"connection_unavailable\" /* _MessageError.CONNECTION_UNAVAILABLE */);\n }\n // Node timers and browser timers return fundamentally different types.\n // We don't actually care what the value is but TS won't accept unknown and\n // we can't cast properly in both environments.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n let completionTimer;\n let handler;\n return new Promise((resolve, reject) => {\n const eventId = _generateEventId('', 20);\n messageChannel.port1.start();\n const ackTimer = setTimeout(() => {\n reject(new Error(\"unsupported_event\" /* _MessageError.UNSUPPORTED_EVENT */));\n }, timeout);\n handler = {\n messageChannel,\n onMessage(event) {\n const messageEvent = event;\n if (messageEvent.data.eventId !== eventId) {\n return;\n }\n switch (messageEvent.data.status) {\n case \"ack\" /* _Status.ACK */:\n // The receiver should ACK first.\n clearTimeout(ackTimer);\n completionTimer = setTimeout(() => {\n reject(new Error(\"timeout\" /* _MessageError.TIMEOUT */));\n }, 3000 /* _TimeoutDuration.COMPLETION */);\n break;\n case \"done\" /* _Status.DONE */:\n // Once the receiver's handlers are finished we will get the results.\n clearTimeout(completionTimer);\n resolve(messageEvent.data.response);\n break;\n default:\n clearTimeout(ackTimer);\n clearTimeout(completionTimer);\n reject(new Error(\"invalid_response\" /* _MessageError.INVALID_RESPONSE */));\n break;\n }\n }\n };\n this.handlers.add(handler);\n messageChannel.port1.addEventListener('message', handler.onMessage);\n this.target.postMessage({\n eventType,\n eventId,\n data\n }, [messageChannel.port2]);\n }).finally(() => {\n if (handler) {\n this.removeMessageHandler(handler);\n }\n });\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Lazy accessor for window, since the compat layer won't tree shake this out,\r\n * we need to make sure not to mess with window unless we have to\r\n */\nfunction _window() {\n return window;\n}\nfunction _setWindowLocation(url) {\n _window().location.href = url;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction _isWorker() {\n return typeof _window()['WorkerGlobalScope'] !== 'undefined' && typeof _window()['importScripts'] === 'function';\n}\nasync function _getActiveServiceWorker() {\n if (!(navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker)) {\n return null;\n }\n try {\n const registration = await navigator.serviceWorker.ready;\n return registration.active;\n } catch (_a) {\n return null;\n }\n}\nfunction _getServiceWorkerController() {\n var _a;\n return ((_a = navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker) === null || _a === void 0 ? void 0 : _a.controller) || null;\n}\nfunction _getWorkerGlobalScope() {\n return _isWorker() ? self : null;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst DB_NAME = 'firebaseLocalStorageDb';\nconst DB_VERSION = 1;\nconst DB_OBJECTSTORE_NAME = 'firebaseLocalStorage';\nconst DB_DATA_KEYPATH = 'fbase_key';\n/**\r\n * Promise wrapper for IDBRequest\r\n *\r\n * Unfortunately we can't cleanly extend Promise since promises are not callable in ES6\r\n *\r\n */\nclass DBPromise {\n constructor(request) {\n this.request = request;\n }\n toPromise() {\n return new Promise((resolve, reject) => {\n this.request.addEventListener('success', () => {\n resolve(this.request.result);\n });\n this.request.addEventListener('error', () => {\n reject(this.request.error);\n });\n });\n }\n}\nfunction getObjectStore(db, isReadWrite) {\n return db.transaction([DB_OBJECTSTORE_NAME], isReadWrite ? 'readwrite' : 'readonly').objectStore(DB_OBJECTSTORE_NAME);\n}\nfunction _deleteDatabase() {\n const request = indexedDB.deleteDatabase(DB_NAME);\n return new DBPromise(request).toPromise();\n}\nfunction _openDatabase() {\n const request = indexedDB.open(DB_NAME, DB_VERSION);\n return new Promise((resolve, reject) => {\n request.addEventListener('error', () => {\n reject(request.error);\n });\n request.addEventListener('upgradeneeded', () => {\n const db = request.result;\n try {\n db.createObjectStore(DB_OBJECTSTORE_NAME, {\n keyPath: DB_DATA_KEYPATH\n });\n } catch (e) {\n reject(e);\n }\n });\n request.addEventListener('success', async () => {\n const db = request.result;\n // Strange bug that occurs in Firefox when multiple tabs are opened at the\n // same time. The only way to recover seems to be deleting the database\n // and re-initializing it.\n // https://github.com/firebase/firebase-js-sdk/issues/634\n if (!db.objectStoreNames.contains(DB_OBJECTSTORE_NAME)) {\n // Need to close the database or else you get a `blocked` event\n db.close();\n await _deleteDatabase();\n resolve(await _openDatabase());\n } else {\n resolve(db);\n }\n });\n });\n}\nasync function _putObject(db, key, value) {\n const request = getObjectStore(db, true).put({\n [DB_DATA_KEYPATH]: key,\n value\n });\n return new DBPromise(request).toPromise();\n}\nasync function getObject(db, key) {\n const request = getObjectStore(db, false).get(key);\n const data = await new DBPromise(request).toPromise();\n return data === undefined ? null : data.value;\n}\nfunction _deleteObject(db, key) {\n const request = getObjectStore(db, true).delete(key);\n return new DBPromise(request).toPromise();\n}\nconst _POLLING_INTERVAL_MS = 800;\nconst _TRANSACTION_RETRY_COUNT = 3;\nlet IndexedDBLocalPersistence = /*#__PURE__*/(() => {\n class IndexedDBLocalPersistence {\n constructor() {\n this.type = \"LOCAL\" /* PersistenceType.LOCAL */;\n this._shouldAllowMigration = true;\n this.listeners = {};\n this.localCache = {};\n // setTimeout return value is platform specific\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this.pollTimer = null;\n this.pendingWrites = 0;\n this.receiver = null;\n this.sender = null;\n this.serviceWorkerReceiverAvailable = false;\n this.activeServiceWorker = null;\n // Fire & forget the service worker registration as it may never resolve\n this._workerInitializationPromise = this.initializeServiceWorkerMessaging().then(() => {}, () => {});\n }\n async _openDb() {\n if (this.db) {\n return this.db;\n }\n this.db = await _openDatabase();\n return this.db;\n }\n async _withRetries(op) {\n let numAttempts = 0;\n while (true) {\n try {\n const db = await this._openDb();\n return await op(db);\n } catch (e) {\n if (numAttempts++ > _TRANSACTION_RETRY_COUNT) {\n throw e;\n }\n if (this.db) {\n this.db.close();\n this.db = undefined;\n }\n // TODO: consider adding exponential backoff\n }\n }\n }\n /**\r\n * IndexedDB events do not propagate from the main window to the worker context. We rely on a\r\n * postMessage interface to send these events to the worker ourselves.\r\n */\n async initializeServiceWorkerMessaging() {\n return _isWorker() ? this.initializeReceiver() : this.initializeSender();\n }\n /**\r\n * As the worker we should listen to events from the main window.\r\n */\n async initializeReceiver() {\n this.receiver = Receiver._getInstance(_getWorkerGlobalScope());\n // Refresh from persistence if we receive a KeyChanged message.\n this.receiver._subscribe(\"keyChanged\" /* _EventType.KEY_CHANGED */, async (_origin, data) => {\n const keys = await this._poll();\n return {\n keyProcessed: keys.includes(data.key)\n };\n });\n // Let the sender know that we are listening so they give us more timeout.\n this.receiver._subscribe(\"ping\" /* _EventType.PING */, async (_origin, _data) => {\n return [\"keyChanged\" /* _EventType.KEY_CHANGED */];\n });\n }\n /**\r\n * As the main window, we should let the worker know when keys change (set and remove).\r\n *\r\n * @remarks\r\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/ready | ServiceWorkerContainer.ready}\r\n * may not resolve.\r\n */\n async initializeSender() {\n var _a, _b;\n // Check to see if there's an active service worker.\n this.activeServiceWorker = await _getActiveServiceWorker();\n if (!this.activeServiceWorker) {\n return;\n }\n this.sender = new Sender(this.activeServiceWorker);\n // Ping the service worker to check what events they can handle.\n const results = await this.sender._send(\"ping\" /* _EventType.PING */, {}, 800 /* _TimeoutDuration.LONG_ACK */);\n if (!results) {\n return;\n }\n if (((_a = results[0]) === null || _a === void 0 ? void 0 : _a.fulfilled) && ((_b = results[0]) === null || _b === void 0 ? void 0 : _b.value.includes(\"keyChanged\" /* _EventType.KEY_CHANGED */))) {\n this.serviceWorkerReceiverAvailable = true;\n }\n }\n /**\r\n * Let the worker know about a changed key, the exact key doesn't technically matter since the\r\n * worker will just trigger a full sync anyway.\r\n *\r\n * @remarks\r\n * For now, we only support one service worker per page.\r\n *\r\n * @param key - Storage key which changed.\r\n */\n async notifyServiceWorker(key) {\n if (!this.sender || !this.activeServiceWorker || _getServiceWorkerController() !== this.activeServiceWorker) {\n return;\n }\n try {\n await this.sender._send(\"keyChanged\" /* _EventType.KEY_CHANGED */, {\n key\n },\n // Use long timeout if receiver has previously responded to a ping from us.\n this.serviceWorkerReceiverAvailable ? 800 /* _TimeoutDuration.LONG_ACK */ : 50 /* _TimeoutDuration.ACK */);\n } catch (_a) {\n // This is a best effort approach. Ignore errors.\n }\n }\n async _isAvailable() {\n try {\n if (!indexedDB) {\n return false;\n }\n const db = await _openDatabase();\n await _putObject(db, STORAGE_AVAILABLE_KEY, '1');\n await _deleteObject(db, STORAGE_AVAILABLE_KEY);\n return true;\n } catch (_a) {}\n return false;\n }\n async _withPendingWrite(write) {\n this.pendingWrites++;\n try {\n await write();\n } finally {\n this.pendingWrites--;\n }\n }\n async _set(key, value) {\n return this._withPendingWrite(async () => {\n await this._withRetries(db => _putObject(db, key, value));\n this.localCache[key] = value;\n return this.notifyServiceWorker(key);\n });\n }\n async _get(key) {\n const obj = await this._withRetries(db => getObject(db, key));\n this.localCache[key] = obj;\n return obj;\n }\n async _remove(key) {\n return this._withPendingWrite(async () => {\n await this._withRetries(db => _deleteObject(db, key));\n delete this.localCache[key];\n return this.notifyServiceWorker(key);\n });\n }\n async _poll() {\n // TODO: check if we need to fallback if getAll is not supported\n const result = await this._withRetries(db => {\n const getAllRequest = getObjectStore(db, false).getAll();\n return new DBPromise(getAllRequest).toPromise();\n });\n if (!result) {\n return [];\n }\n // If we have pending writes in progress abort, we'll get picked up on the next poll\n if (this.pendingWrites !== 0) {\n return [];\n }\n const keys = [];\n const keysInResult = new Set();\n if (result.length !== 0) {\n for (const {\n fbase_key: key,\n value\n } of result) {\n keysInResult.add(key);\n if (JSON.stringify(this.localCache[key]) !== JSON.stringify(value)) {\n this.notifyListeners(key, value);\n keys.push(key);\n }\n }\n }\n for (const localKey of Object.keys(this.localCache)) {\n if (this.localCache[localKey] && !keysInResult.has(localKey)) {\n // Deleted\n this.notifyListeners(localKey, null);\n keys.push(localKey);\n }\n }\n return keys;\n }\n notifyListeners(key, newValue) {\n this.localCache[key] = newValue;\n const listeners = this.listeners[key];\n if (listeners) {\n for (const listener of Array.from(listeners)) {\n listener(newValue);\n }\n }\n }\n startPolling() {\n this.stopPolling();\n this.pollTimer = setInterval(async () => this._poll(), _POLLING_INTERVAL_MS);\n }\n stopPolling() {\n if (this.pollTimer) {\n clearInterval(this.pollTimer);\n this.pollTimer = null;\n }\n }\n _addListener(key, listener) {\n if (Object.keys(this.listeners).length === 0) {\n this.startPolling();\n }\n if (!this.listeners[key]) {\n this.listeners[key] = new Set();\n // Populate the cache to avoid spuriously triggering on first poll.\n void this._get(key); // This can happen in the background async and we can return immediately.\n }\n this.listeners[key].add(listener);\n }\n _removeListener(key, listener) {\n if (this.listeners[key]) {\n this.listeners[key].delete(listener);\n if (this.listeners[key].size === 0) {\n delete this.listeners[key];\n }\n }\n if (Object.keys(this.listeners).length === 0) {\n this.stopPolling();\n }\n }\n }\n IndexedDBLocalPersistence.type = 'LOCAL';\n /**\r\n * An implementation of {@link Persistence} of type `LOCAL` using `indexedDB`\r\n * for the underlying storage.\r\n *\r\n * @public\r\n */\n return IndexedDBLocalPersistence;\n})();\nconst indexedDBLocalPersistence = IndexedDBLocalPersistence;\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction startSignInPhoneMfa(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaSignIn:start\" /* Endpoint.START_MFA_SIGN_IN */, _addTidIfNecessary(auth, request));\n}\nfunction finalizeSignInPhoneMfa(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaSignIn:finalize\" /* Endpoint.FINALIZE_MFA_SIGN_IN */, _addTidIfNecessary(auth, request));\n}\nfunction finalizeSignInTotpMfa(auth, request) {\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaSignIn:finalize\" /* Endpoint.FINALIZE_MFA_SIGN_IN */, _addTidIfNecessary(auth, request));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst _SOLVE_TIME_MS = 500;\nconst _EXPIRATION_TIME_MS = 60000;\nconst _WIDGET_ID_START = 1000000000000;\nclass MockReCaptcha {\n constructor(auth) {\n this.auth = auth;\n this.counter = _WIDGET_ID_START;\n this._widgets = new Map();\n }\n render(container, parameters) {\n const id = this.counter;\n this._widgets.set(id, new MockWidget(container, this.auth.name, parameters || {}));\n this.counter++;\n return id;\n }\n reset(optWidgetId) {\n var _a;\n const id = optWidgetId || _WIDGET_ID_START;\n void ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.delete());\n this._widgets.delete(id);\n }\n getResponse(optWidgetId) {\n var _a;\n const id = optWidgetId || _WIDGET_ID_START;\n return ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.getResponse()) || '';\n }\n async execute(optWidgetId) {\n var _a;\n const id = optWidgetId || _WIDGET_ID_START;\n void ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.execute());\n return '';\n }\n}\nclass MockWidget {\n constructor(containerOrId, appName, params) {\n this.params = params;\n this.timerId = null;\n this.deleted = false;\n this.responseToken = null;\n this.clickHandler = () => {\n this.execute();\n };\n const container = typeof containerOrId === 'string' ? document.getElementById(containerOrId) : containerOrId;\n _assert(container, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */, {\n appName\n });\n this.container = container;\n this.isVisible = this.params.size !== 'invisible';\n if (this.isVisible) {\n this.execute();\n } else {\n this.container.addEventListener('click', this.clickHandler);\n }\n }\n getResponse() {\n this.checkIfDeleted();\n return this.responseToken;\n }\n delete() {\n this.checkIfDeleted();\n this.deleted = true;\n if (this.timerId) {\n clearTimeout(this.timerId);\n this.timerId = null;\n }\n this.container.removeEventListener('click', this.clickHandler);\n }\n execute() {\n this.checkIfDeleted();\n if (this.timerId) {\n return;\n }\n this.timerId = window.setTimeout(() => {\n this.responseToken = generateRandomAlphaNumericString(50);\n const {\n callback,\n 'expired-callback': expiredCallback\n } = this.params;\n if (callback) {\n try {\n callback(this.responseToken);\n } catch (e) {}\n }\n this.timerId = window.setTimeout(() => {\n this.timerId = null;\n this.responseToken = null;\n if (expiredCallback) {\n try {\n expiredCallback();\n } catch (e) {}\n }\n if (this.isVisible) {\n this.execute();\n }\n }, _EXPIRATION_TIME_MS);\n }, _SOLVE_TIME_MS);\n }\n checkIfDeleted() {\n if (this.deleted) {\n throw new Error('reCAPTCHA mock was already deleted!');\n }\n }\n}\nfunction generateRandomAlphaNumericString(len) {\n const chars = [];\n const allowedChars = '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n for (let i = 0; i < len; i++) {\n chars.push(allowedChars.charAt(Math.floor(Math.random() * allowedChars.length)));\n }\n return chars.join('');\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// ReCaptcha will load using the same callback, so the callback function needs\n// to be kept around\nconst _JSLOAD_CALLBACK = _generateCallbackName('rcb');\nconst NETWORK_TIMEOUT_DELAY = new Delay(30000, 60000);\nconst RECAPTCHA_BASE = 'https://www.google.com/recaptcha/api.js?';\n/**\r\n * Loader for the GReCaptcha library. There should only ever be one of this.\r\n */\nclass ReCaptchaLoaderImpl {\n constructor() {\n var _a;\n this.hostLanguage = '';\n this.counter = 0;\n /**\r\n * Check for `render()` method. `window.grecaptcha` will exist if the Enterprise\r\n * version of the ReCAPTCHA script was loaded by someone else (e.g. App Check) but\r\n * `window.grecaptcha.render()` will not. Another load will add it.\r\n */\n this.librarySeparatelyLoaded = !!((_a = _window().grecaptcha) === null || _a === void 0 ? void 0 : _a.render);\n }\n load(auth, hl = '') {\n _assert(isHostLanguageValid(hl), auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n if (this.shouldResolveImmediately(hl) && isV2(_window().grecaptcha)) {\n return Promise.resolve(_window().grecaptcha);\n }\n return new Promise((resolve, reject) => {\n const networkTimeout = _window().setTimeout(() => {\n reject(_createError(auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */));\n }, NETWORK_TIMEOUT_DELAY.get());\n _window()[_JSLOAD_CALLBACK] = () => {\n _window().clearTimeout(networkTimeout);\n delete _window()[_JSLOAD_CALLBACK];\n const recaptcha = _window().grecaptcha;\n if (!recaptcha || !isV2(recaptcha)) {\n reject(_createError(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */));\n return;\n }\n // Wrap the greptcha render function so that we know if the developer has\n // called it separately\n const render = recaptcha.render;\n recaptcha.render = (container, params) => {\n const widgetId = render(container, params);\n this.counter++;\n return widgetId;\n };\n this.hostLanguage = hl;\n resolve(recaptcha);\n };\n const url = `${RECAPTCHA_BASE}?${querystring({\n onload: _JSLOAD_CALLBACK,\n render: 'explicit',\n hl\n })}`;\n _loadJS(url).catch(() => {\n clearTimeout(networkTimeout);\n reject(_createError(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */));\n });\n });\n }\n clearedOneInstance() {\n this.counter--;\n }\n shouldResolveImmediately(hl) {\n var _a;\n // We can resolve immediately if:\n // • grecaptcha is already defined AND (\n // 1. the requested language codes are the same OR\n // 2. there exists already a ReCaptcha on the page\n // 3. the library was already loaded by the app\n // In cases (2) and (3), we _can't_ reload as it would break the recaptchas\n // that are already in the page\n return !!((_a = _window().grecaptcha) === null || _a === void 0 ? void 0 : _a.render) && (hl === this.hostLanguage || this.counter > 0 || this.librarySeparatelyLoaded);\n }\n}\nfunction isHostLanguageValid(hl) {\n return hl.length <= 6 && /^\\s*[a-zA-Z0-9\\-]*\\s*$/.test(hl);\n}\nclass MockReCaptchaLoaderImpl {\n async load(auth) {\n return new MockReCaptcha(auth);\n }\n clearedOneInstance() {}\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst RECAPTCHA_VERIFIER_TYPE = 'recaptcha';\nconst DEFAULT_PARAMS = {\n theme: 'light',\n type: 'image'\n};\n/**\r\n * An {@link https://www.google.com/recaptcha/ | reCAPTCHA}-based application verifier.\r\n *\r\n * @remarks\r\n * `RecaptchaVerifier` does not work in a Node.js environment.\r\n *\r\n * @public\r\n */\nclass RecaptchaVerifier {\n /**\r\n * @param authExtern - The corresponding Firebase {@link Auth} instance.\r\n *\r\n * @param containerOrId - The reCAPTCHA container parameter.\r\n *\r\n * @remarks\r\n * This has different meaning depending on whether the reCAPTCHA is hidden or visible. For a\r\n * visible reCAPTCHA the container must be empty. If a string is used, it has to correspond to\r\n * an element ID. The corresponding element must also must be in the DOM at the time of\r\n * initialization.\r\n *\r\n * @param parameters - The optional reCAPTCHA parameters.\r\n *\r\n * @remarks\r\n * Check the reCAPTCHA docs for a comprehensive list. All parameters are accepted except for\r\n * the sitekey. Firebase Auth backend provisions a reCAPTCHA for each project and will\r\n * configure this upon rendering. For an invisible reCAPTCHA, a size key must have the value\r\n * 'invisible'.\r\n */\n constructor(authExtern, containerOrId, parameters = Object.assign({}, DEFAULT_PARAMS)) {\n this.parameters = parameters;\n /**\r\n * The application verifier type.\r\n *\r\n * @remarks\r\n * For a reCAPTCHA verifier, this is 'recaptcha'.\r\n */\n this.type = RECAPTCHA_VERIFIER_TYPE;\n this.destroyed = false;\n this.widgetId = null;\n this.tokenChangeListeners = new Set();\n this.renderPromise = null;\n this.recaptcha = null;\n this.auth = _castAuth(authExtern);\n this.isInvisible = this.parameters.size === 'invisible';\n _assert(typeof document !== 'undefined', this.auth, \"operation-not-supported-in-this-environment\" /* AuthErrorCode.OPERATION_NOT_SUPPORTED */);\n const container = typeof containerOrId === 'string' ? document.getElementById(containerOrId) : containerOrId;\n _assert(container, this.auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n this.container = container;\n this.parameters.callback = this.makeTokenCallback(this.parameters.callback);\n this._recaptchaLoader = this.auth.settings.appVerificationDisabledForTesting ? new MockReCaptchaLoaderImpl() : new ReCaptchaLoaderImpl();\n this.validateStartingState();\n // TODO: Figure out if sdk version is needed\n }\n /**\r\n * Waits for the user to solve the reCAPTCHA and resolves with the reCAPTCHA token.\r\n *\r\n * @returns A Promise for the reCAPTCHA token.\r\n */\n async verify() {\n this.assertNotDestroyed();\n const id = await this.render();\n const recaptcha = this.getAssertedRecaptcha();\n const response = recaptcha.getResponse(id);\n if (response) {\n return response;\n }\n return new Promise(resolve => {\n const tokenChange = token => {\n if (!token) {\n return; // Ignore token expirations.\n }\n this.tokenChangeListeners.delete(tokenChange);\n resolve(token);\n };\n this.tokenChangeListeners.add(tokenChange);\n if (this.isInvisible) {\n recaptcha.execute(id);\n }\n });\n }\n /**\r\n * Renders the reCAPTCHA widget on the page.\r\n *\r\n * @returns A Promise that resolves with the reCAPTCHA widget ID.\r\n */\n render() {\n try {\n this.assertNotDestroyed();\n } catch (e) {\n // This method returns a promise. Since it's not async (we want to return the\n // _same_ promise if rendering is still occurring), the API surface should\n // reject with the error rather than just throw\n return Promise.reject(e);\n }\n if (this.renderPromise) {\n return this.renderPromise;\n }\n this.renderPromise = this.makeRenderPromise().catch(e => {\n this.renderPromise = null;\n throw e;\n });\n return this.renderPromise;\n }\n /** @internal */\n _reset() {\n this.assertNotDestroyed();\n if (this.widgetId !== null) {\n this.getAssertedRecaptcha().reset(this.widgetId);\n }\n }\n /**\r\n * Clears the reCAPTCHA widget from the page and destroys the instance.\r\n */\n clear() {\n this.assertNotDestroyed();\n this.destroyed = true;\n this._recaptchaLoader.clearedOneInstance();\n if (!this.isInvisible) {\n this.container.childNodes.forEach(node => {\n this.container.removeChild(node);\n });\n }\n }\n validateStartingState() {\n _assert(!this.parameters.sitekey, this.auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n _assert(this.isInvisible || !this.container.hasChildNodes(), this.auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n _assert(typeof document !== 'undefined', this.auth, \"operation-not-supported-in-this-environment\" /* AuthErrorCode.OPERATION_NOT_SUPPORTED */);\n }\n makeTokenCallback(existing) {\n return token => {\n this.tokenChangeListeners.forEach(listener => listener(token));\n if (typeof existing === 'function') {\n existing(token);\n } else if (typeof existing === 'string') {\n const globalFunc = _window()[existing];\n if (typeof globalFunc === 'function') {\n globalFunc(token);\n }\n }\n };\n }\n assertNotDestroyed() {\n _assert(!this.destroyed, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n }\n async makeRenderPromise() {\n await this.init();\n if (!this.widgetId) {\n let container = this.container;\n if (!this.isInvisible) {\n const guaranteedEmpty = document.createElement('div');\n container.appendChild(guaranteedEmpty);\n container = guaranteedEmpty;\n }\n this.widgetId = this.getAssertedRecaptcha().render(container, this.parameters);\n }\n return this.widgetId;\n }\n async init() {\n _assert(_isHttpOrHttps() && !_isWorker(), this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n await domReady();\n this.recaptcha = await this._recaptchaLoader.load(this.auth, this.auth.languageCode || undefined);\n const siteKey = await getRecaptchaParams(this.auth);\n _assert(siteKey, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n this.parameters.sitekey = siteKey;\n }\n getAssertedRecaptcha() {\n _assert(this.recaptcha, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n return this.recaptcha;\n }\n}\nfunction domReady() {\n let resolver = null;\n return new Promise(resolve => {\n if (document.readyState === 'complete') {\n resolve();\n return;\n }\n // Document not ready, wait for load before resolving.\n // Save resolver, so we can remove listener in case it was externally\n // cancelled.\n resolver = () => resolve();\n window.addEventListener('load', resolver);\n }).catch(e => {\n if (resolver) {\n window.removeEventListener('load', resolver);\n }\n throw e;\n });\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass ConfirmationResultImpl {\n constructor(verificationId, onConfirmation) {\n this.verificationId = verificationId;\n this.onConfirmation = onConfirmation;\n }\n confirm(verificationCode) {\n const authCredential = PhoneAuthCredential._fromVerification(this.verificationId, verificationCode);\n return this.onConfirmation(authCredential);\n }\n}\n/**\r\n * Asynchronously signs in using a phone number.\r\n *\r\n * @remarks\r\n * This method sends a code via SMS to the given\r\n * phone number, and returns a {@link ConfirmationResult}. After the user\r\n * provides the code sent to their phone, call {@link ConfirmationResult.confirm}\r\n * with the code to sign the user in.\r\n *\r\n * For abuse prevention, this method also requires a {@link ApplicationVerifier}.\r\n * This SDK includes a reCAPTCHA-based implementation, {@link RecaptchaVerifier}.\r\n * This function can work on other platforms that do not support the\r\n * {@link RecaptchaVerifier} (like React Native), but you need to use a\r\n * third-party {@link ApplicationVerifier} implementation.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // 'recaptcha-container' is the ID of an element in the DOM.\r\n * const applicationVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container');\r\n * const confirmationResult = await signInWithPhoneNumber(auth, phoneNumber, applicationVerifier);\r\n * // Obtain a verificationCode from the user.\r\n * const credential = await confirmationResult.confirm(verificationCode);\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).\r\n * @param appVerifier - The {@link ApplicationVerifier}.\r\n *\r\n * @public\r\n */\nasync function signInWithPhoneNumber(auth, phoneNumber, appVerifier) {\n const authInternal = _castAuth(auth);\n const verificationId = await _verifyPhoneNumber(authInternal, phoneNumber, getModularInstance(appVerifier));\n return new ConfirmationResultImpl(verificationId, cred => signInWithCredential(authInternal, cred));\n}\n/**\r\n * Links the user account with the given phone number.\r\n *\r\n * @remarks\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @param user - The user.\r\n * @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).\r\n * @param appVerifier - The {@link ApplicationVerifier}.\r\n *\r\n * @public\r\n */\nasync function linkWithPhoneNumber(user, phoneNumber, appVerifier) {\n const userInternal = getModularInstance(user);\n await _assertLinkedStatus(false, userInternal, \"phone\" /* ProviderId.PHONE */);\n const verificationId = await _verifyPhoneNumber(userInternal.auth, phoneNumber, getModularInstance(appVerifier));\n return new ConfirmationResultImpl(verificationId, cred => linkWithCredential(userInternal, cred));\n}\n/**\r\n * Re-authenticates a user using a fresh phone credential.\r\n *\r\n * @remarks\r\n * Use before operations such as {@link updatePassword} that require tokens from recent sign-in attempts.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @param user - The user.\r\n * @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).\r\n * @param appVerifier - The {@link ApplicationVerifier}.\r\n *\r\n * @public\r\n */\nasync function reauthenticateWithPhoneNumber(user, phoneNumber, appVerifier) {\n const userInternal = getModularInstance(user);\n const verificationId = await _verifyPhoneNumber(userInternal.auth, phoneNumber, getModularInstance(appVerifier));\n return new ConfirmationResultImpl(verificationId, cred => reauthenticateWithCredential(userInternal, cred));\n}\n/**\r\n * Returns a verification ID to be used in conjunction with the SMS code that is sent.\r\n *\r\n */\nasync function _verifyPhoneNumber(auth, options, verifier) {\n var _a;\n const recaptchaToken = await verifier.verify();\n try {\n _assert(typeof recaptchaToken === 'string', auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n _assert(verifier.type === RECAPTCHA_VERIFIER_TYPE, auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n let phoneInfoOptions;\n if (typeof options === 'string') {\n phoneInfoOptions = {\n phoneNumber: options\n };\n } else {\n phoneInfoOptions = options;\n }\n if ('session' in phoneInfoOptions) {\n const session = phoneInfoOptions.session;\n if ('phoneNumber' in phoneInfoOptions) {\n _assert(session.type === \"enroll\" /* MultiFactorSessionType.ENROLL */, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n const response = await startEnrollPhoneMfa(auth, {\n idToken: session.credential,\n phoneEnrollmentInfo: {\n phoneNumber: phoneInfoOptions.phoneNumber,\n recaptchaToken\n }\n });\n return response.phoneSessionInfo.sessionInfo;\n } else {\n _assert(session.type === \"signin\" /* MultiFactorSessionType.SIGN_IN */, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n const mfaEnrollmentId = ((_a = phoneInfoOptions.multiFactorHint) === null || _a === void 0 ? void 0 : _a.uid) || phoneInfoOptions.multiFactorUid;\n _assert(mfaEnrollmentId, auth, \"missing-multi-factor-info\" /* AuthErrorCode.MISSING_MFA_INFO */);\n const response = await startSignInPhoneMfa(auth, {\n mfaPendingCredential: session.credential,\n mfaEnrollmentId,\n phoneSignInInfo: {\n recaptchaToken\n }\n });\n return response.phoneResponseInfo.sessionInfo;\n }\n } else {\n const {\n sessionInfo\n } = await sendPhoneVerificationCode(auth, {\n phoneNumber: phoneInfoOptions.phoneNumber,\n recaptchaToken\n });\n return sessionInfo;\n }\n } finally {\n verifier._reset();\n }\n}\n/**\r\n * Updates the user's phone number.\r\n *\r\n * @remarks\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```\r\n * // 'recaptcha-container' is the ID of an element in the DOM.\r\n * const applicationVerifier = new RecaptchaVerifier('recaptcha-container');\r\n * const provider = new PhoneAuthProvider(auth);\r\n * const verificationId = await provider.verifyPhoneNumber('+16505550101', applicationVerifier);\r\n * // Obtain the verificationCode from the user.\r\n * const phoneCredential = PhoneAuthProvider.credential(verificationId, verificationCode);\r\n * await updatePhoneNumber(user, phoneCredential);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param credential - A credential authenticating the new phone number.\r\n *\r\n * @public\r\n */\nasync function updatePhoneNumber(user, credential) {\n await _link$1(getModularInstance(user), credential);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Provider for generating an {@link PhoneAuthCredential}.\r\n *\r\n * @remarks\r\n * `PhoneAuthProvider` does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // 'recaptcha-container' is the ID of an element in the DOM.\r\n * const applicationVerifier = new RecaptchaVerifier('recaptcha-container');\r\n * const provider = new PhoneAuthProvider(auth);\r\n * const verificationId = await provider.verifyPhoneNumber('+16505550101', applicationVerifier);\r\n * // Obtain the verificationCode from the user.\r\n * const phoneCredential = PhoneAuthProvider.credential(verificationId, verificationCode);\r\n * const userCredential = await signInWithCredential(auth, phoneCredential);\r\n * ```\r\n *\r\n * @public\r\n */\nlet PhoneAuthProvider = /*#__PURE__*/(() => {\n class PhoneAuthProvider {\n /**\r\n * @param auth - The Firebase {@link Auth} instance in which sign-ins should occur.\r\n *\r\n */\n constructor(auth) {\n /** Always set to {@link ProviderId}.PHONE. */\n this.providerId = PhoneAuthProvider.PROVIDER_ID;\n this.auth = _castAuth(auth);\n }\n /**\r\n *\r\n * Starts a phone number authentication flow by sending a verification code to the given phone\r\n * number.\r\n *\r\n * @example\r\n * ```javascript\r\n * const provider = new PhoneAuthProvider(auth);\r\n * const verificationId = await provider.verifyPhoneNumber(phoneNumber, applicationVerifier);\r\n * // Obtain verificationCode from the user.\r\n * const authCredential = PhoneAuthProvider.credential(verificationId, verificationCode);\r\n * const userCredential = await signInWithCredential(auth, authCredential);\r\n * ```\r\n *\r\n * @example\r\n * An alternative flow is provided using the `signInWithPhoneNumber` method.\r\n * ```javascript\r\n * const confirmationResult = signInWithPhoneNumber(auth, phoneNumber, applicationVerifier);\r\n * // Obtain verificationCode from the user.\r\n * const userCredential = confirmationResult.confirm(verificationCode);\r\n * ```\r\n *\r\n * @param phoneInfoOptions - The user's {@link PhoneInfoOptions}. The phone number should be in\r\n * E.164 format (e.g. +16505550101).\r\n * @param applicationVerifier - For abuse prevention, this method also requires a\r\n * {@link ApplicationVerifier}. This SDK includes a reCAPTCHA-based implementation,\r\n * {@link RecaptchaVerifier}.\r\n *\r\n * @returns A Promise for a verification ID that can be passed to\r\n * {@link PhoneAuthProvider.credential} to identify this flow..\r\n */\n verifyPhoneNumber(phoneOptions, applicationVerifier) {\n return _verifyPhoneNumber(this.auth, phoneOptions, getModularInstance(applicationVerifier));\n }\n /**\r\n * Creates a phone auth credential, given the verification ID from\r\n * {@link PhoneAuthProvider.verifyPhoneNumber} and the code that was sent to the user's\r\n * mobile device.\r\n *\r\n * @example\r\n * ```javascript\r\n * const provider = new PhoneAuthProvider(auth);\r\n * const verificationId = provider.verifyPhoneNumber(phoneNumber, applicationVerifier);\r\n * // Obtain verificationCode from the user.\r\n * const authCredential = PhoneAuthProvider.credential(verificationId, verificationCode);\r\n * const userCredential = signInWithCredential(auth, authCredential);\r\n * ```\r\n *\r\n * @example\r\n * An alternative flow is provided using the `signInWithPhoneNumber` method.\r\n * ```javascript\r\n * const confirmationResult = await signInWithPhoneNumber(auth, phoneNumber, applicationVerifier);\r\n * // Obtain verificationCode from the user.\r\n * const userCredential = await confirmationResult.confirm(verificationCode);\r\n * ```\r\n *\r\n * @param verificationId - The verification ID returned from {@link PhoneAuthProvider.verifyPhoneNumber}.\r\n * @param verificationCode - The verification code sent to the user's mobile device.\r\n *\r\n * @returns The auth provider credential.\r\n */\n static credential(verificationId, verificationCode) {\n return PhoneAuthCredential._fromVerification(verificationId, verificationCode);\n }\n /**\r\n * Generates an {@link AuthCredential} from a {@link UserCredential}.\r\n * @param userCredential - The user credential.\r\n */\n static credentialFromResult(userCredential) {\n const credential = userCredential;\n return PhoneAuthProvider.credentialFromTaggedObject(credential);\n }\n /**\r\n * Returns an {@link AuthCredential} when passed an error.\r\n *\r\n * @remarks\r\n *\r\n * This method works for errors like\r\n * `auth/account-exists-with-different-credentials`. This is useful for\r\n * recovering when attempting to set a user's phone number but the number\r\n * in question is already tied to another account. For example, the following\r\n * code tries to update the current user's phone number, and if that\r\n * fails, links the user with the account associated with that number:\r\n *\r\n * ```js\r\n * const provider = new PhoneAuthProvider(auth);\r\n * const verificationId = await provider.verifyPhoneNumber(number, verifier);\r\n * try {\r\n * const code = ''; // Prompt the user for the verification code\r\n * await updatePhoneNumber(\r\n * auth.currentUser,\r\n * PhoneAuthProvider.credential(verificationId, code));\r\n * } catch (e) {\r\n * if ((e as FirebaseError)?.code === 'auth/account-exists-with-different-credential') {\r\n * const cred = PhoneAuthProvider.credentialFromError(e);\r\n * await linkWithCredential(auth.currentUser, cred);\r\n * }\r\n * }\r\n *\r\n * // At this point, auth.currentUser.phoneNumber === number.\r\n * ```\r\n *\r\n * @param error - The error to generate a credential from.\r\n */\n static credentialFromError(error) {\n return PhoneAuthProvider.credentialFromTaggedObject(error.customData || {});\n }\n static credentialFromTaggedObject({\n _tokenResponse: tokenResponse\n }) {\n if (!tokenResponse) {\n return null;\n }\n const {\n phoneNumber,\n temporaryProof\n } = tokenResponse;\n if (phoneNumber && temporaryProof) {\n return PhoneAuthCredential._fromTokenResponse(phoneNumber, temporaryProof);\n }\n return null;\n }\n }\n /** Always set to {@link ProviderId}.PHONE. */\n\n /** Always set to {@link SignInMethod}.PHONE. */PhoneAuthProvider.PROVIDER_ID = \"phone\" /* ProviderId.PHONE */;\n\n PhoneAuthProvider.PHONE_SIGN_IN_METHOD = \"phone\" /* SignInMethod.PHONE */;\n\n /**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n /**\r\n * Chooses a popup/redirect resolver to use. This prefers the override (which\r\n * is directly passed in), and falls back to the property set on the auth\r\n * object. If neither are available, this function errors w/ an argument error.\r\n */\n return PhoneAuthProvider;\n})();\nfunction _withDefaultResolver(auth, resolverOverride) {\n if (resolverOverride) {\n return _getInstance(resolverOverride);\n }\n _assert(auth._popupRedirectResolver, auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n return auth._popupRedirectResolver;\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass IdpCredential extends AuthCredential {\n constructor(params) {\n super(\"custom\" /* ProviderId.CUSTOM */, \"custom\" /* ProviderId.CUSTOM */);\n this.params = params;\n }\n _getIdTokenResponse(auth) {\n return signInWithIdp(auth, this._buildIdpRequest());\n }\n _linkToIdToken(auth, idToken) {\n return signInWithIdp(auth, this._buildIdpRequest(idToken));\n }\n _getReauthenticationResolver(auth) {\n return signInWithIdp(auth, this._buildIdpRequest());\n }\n _buildIdpRequest(idToken) {\n const request = {\n requestUri: this.params.requestUri,\n sessionId: this.params.sessionId,\n postBody: this.params.postBody,\n tenantId: this.params.tenantId,\n pendingToken: this.params.pendingToken,\n returnSecureToken: true,\n returnIdpCredential: true\n };\n if (idToken) {\n request.idToken = idToken;\n }\n return request;\n }\n}\nfunction _signIn(params) {\n return _signInWithCredential(params.auth, new IdpCredential(params), params.bypassAuthState);\n}\nfunction _reauth(params) {\n const {\n auth,\n user\n } = params;\n _assert(user, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n return _reauthenticate(user, new IdpCredential(params), params.bypassAuthState);\n}\nasync function _link(params) {\n const {\n auth,\n user\n } = params;\n _assert(user, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n return _link$1(user, new IdpCredential(params), params.bypassAuthState);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Popup event manager. Handles the popup's entire lifecycle; listens to auth\r\n * events\r\n */\nclass AbstractPopupRedirectOperation {\n constructor(auth, filter, resolver, user, bypassAuthState = false) {\n this.auth = auth;\n this.resolver = resolver;\n this.user = user;\n this.bypassAuthState = bypassAuthState;\n this.pendingPromise = null;\n this.eventManager = null;\n this.filter = Array.isArray(filter) ? filter : [filter];\n }\n execute() {\n return new Promise(async (resolve, reject) => {\n this.pendingPromise = {\n resolve,\n reject\n };\n try {\n this.eventManager = await this.resolver._initialize(this.auth);\n await this.onExecution();\n this.eventManager.registerConsumer(this);\n } catch (e) {\n this.reject(e);\n }\n });\n }\n async onAuthEvent(event) {\n const {\n urlResponse,\n sessionId,\n postBody,\n tenantId,\n error,\n type\n } = event;\n if (error) {\n this.reject(error);\n return;\n }\n const params = {\n auth: this.auth,\n requestUri: urlResponse,\n sessionId: sessionId,\n tenantId: tenantId || undefined,\n postBody: postBody || undefined,\n user: this.user,\n bypassAuthState: this.bypassAuthState\n };\n try {\n this.resolve(await this.getIdpTask(type)(params));\n } catch (e) {\n this.reject(e);\n }\n }\n onError(error) {\n this.reject(error);\n }\n getIdpTask(type) {\n switch (type) {\n case \"signInViaPopup\" /* AuthEventType.SIGN_IN_VIA_POPUP */:\n case \"signInViaRedirect\" /* AuthEventType.SIGN_IN_VIA_REDIRECT */:\n return _signIn;\n case \"linkViaPopup\" /* AuthEventType.LINK_VIA_POPUP */:\n case \"linkViaRedirect\" /* AuthEventType.LINK_VIA_REDIRECT */:\n return _link;\n case \"reauthViaPopup\" /* AuthEventType.REAUTH_VIA_POPUP */:\n case \"reauthViaRedirect\" /* AuthEventType.REAUTH_VIA_REDIRECT */:\n return _reauth;\n default:\n _fail(this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n }\n }\n resolve(cred) {\n debugAssert(this.pendingPromise, 'Pending promise was never set');\n this.pendingPromise.resolve(cred);\n this.unregisterAndCleanUp();\n }\n reject(error) {\n debugAssert(this.pendingPromise, 'Pending promise was never set');\n this.pendingPromise.reject(error);\n this.unregisterAndCleanUp();\n }\n unregisterAndCleanUp() {\n if (this.eventManager) {\n this.eventManager.unregisterConsumer(this);\n }\n this.pendingPromise = null;\n this.cleanUp();\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst _POLL_WINDOW_CLOSE_TIMEOUT = new Delay(2000, 10000);\n/**\r\n * Authenticates a Firebase client using a popup-based OAuth authentication flow.\r\n *\r\n * @remarks\r\n * If succeeds, returns the signed in user along with the provider's credential. If sign in was\r\n * unsuccessful, returns an error object containing additional information about the error.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new FacebookAuthProvider();\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a Facebook Access Token.\r\n * const credential = provider.credentialFromResult(auth, result);\r\n * const token = credential.accessToken;\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\nasync function signInWithPopup(auth, provider, resolver) {\n const authInternal = _castAuth(auth);\n _assertInstanceOf(auth, provider, FederatedAuthProvider);\n const resolverInternal = _withDefaultResolver(authInternal, resolver);\n const action = new PopupOperation(authInternal, \"signInViaPopup\" /* AuthEventType.SIGN_IN_VIA_POPUP */, provider, resolverInternal);\n return action.executeNotNull();\n}\n/**\r\n * Reauthenticates the current user with the specified {@link OAuthProvider} using a pop-up based\r\n * OAuth flow.\r\n *\r\n * @remarks\r\n * If the reauthentication is successful, the returned result will contain the user and the\r\n * provider's credential.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new FacebookAuthProvider();\r\n * const result = await signInWithPopup(auth, provider);\r\n * // Reauthenticate using a popup.\r\n * await reauthenticateWithPopup(result.user, provider);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\nasync function reauthenticateWithPopup(user, provider, resolver) {\n const userInternal = getModularInstance(user);\n _assertInstanceOf(userInternal.auth, provider, FederatedAuthProvider);\n const resolverInternal = _withDefaultResolver(userInternal.auth, resolver);\n const action = new PopupOperation(userInternal.auth, \"reauthViaPopup\" /* AuthEventType.REAUTH_VIA_POPUP */, provider, resolverInternal, userInternal);\n return action.executeNotNull();\n}\n/**\r\n * Links the authenticated provider to the user account using a pop-up based OAuth flow.\r\n *\r\n * @remarks\r\n * If the linking is successful, the returned result will contain the user and the provider's credential.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using some other provider.\r\n * const result = await signInWithEmailAndPassword(auth, email, password);\r\n * // Link using a popup.\r\n * const provider = new FacebookAuthProvider();\r\n * await linkWithPopup(result.user, provider);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\nasync function linkWithPopup(user, provider, resolver) {\n const userInternal = getModularInstance(user);\n _assertInstanceOf(userInternal.auth, provider, FederatedAuthProvider);\n const resolverInternal = _withDefaultResolver(userInternal.auth, resolver);\n const action = new PopupOperation(userInternal.auth, \"linkViaPopup\" /* AuthEventType.LINK_VIA_POPUP */, provider, resolverInternal, userInternal);\n return action.executeNotNull();\n}\n/**\r\n * Popup event manager. Handles the popup's entire lifecycle; listens to auth\r\n * events\r\n *\r\n */\nlet PopupOperation = /*#__PURE__*/(() => {\n class PopupOperation extends AbstractPopupRedirectOperation {\n constructor(auth, filter, provider, resolver, user) {\n super(auth, filter, resolver, user);\n this.provider = provider;\n this.authWindow = null;\n this.pollId = null;\n if (PopupOperation.currentPopupAction) {\n PopupOperation.currentPopupAction.cancel();\n }\n PopupOperation.currentPopupAction = this;\n }\n async executeNotNull() {\n const result = await this.execute();\n _assert(result, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n return result;\n }\n async onExecution() {\n debugAssert(this.filter.length === 1, 'Popup operations only handle one event');\n const eventId = _generateEventId();\n this.authWindow = await this.resolver._openPopup(this.auth, this.provider, this.filter[0],\n // There's always one, see constructor\n eventId);\n this.authWindow.associatedEvent = eventId;\n // Check for web storage support and origin validation _after_ the popup is\n // loaded. These operations are slow (~1 second or so) Rather than\n // waiting on them before opening the window, optimistically open the popup\n // and check for storage support at the same time. If storage support is\n // not available, this will cause the whole thing to reject properly. It\n // will also close the popup, but since the promise has already rejected,\n // the popup closed by user poll will reject into the void.\n this.resolver._originValidation(this.auth).catch(e => {\n this.reject(e);\n });\n this.resolver._isIframeWebStorageSupported(this.auth, isSupported => {\n if (!isSupported) {\n this.reject(_createError(this.auth, \"web-storage-unsupported\" /* AuthErrorCode.WEB_STORAGE_UNSUPPORTED */));\n }\n });\n // Handle user closure. Notice this does *not* use await\n this.pollUserCancellation();\n }\n get eventId() {\n var _a;\n return ((_a = this.authWindow) === null || _a === void 0 ? void 0 : _a.associatedEvent) || null;\n }\n cancel() {\n this.reject(_createError(this.auth, \"cancelled-popup-request\" /* AuthErrorCode.EXPIRED_POPUP_REQUEST */));\n }\n cleanUp() {\n if (this.authWindow) {\n this.authWindow.close();\n }\n if (this.pollId) {\n window.clearTimeout(this.pollId);\n }\n this.authWindow = null;\n this.pollId = null;\n PopupOperation.currentPopupAction = null;\n }\n pollUserCancellation() {\n const poll = () => {\n var _a, _b;\n if ((_b = (_a = this.authWindow) === null || _a === void 0 ? void 0 : _a.window) === null || _b === void 0 ? void 0 : _b.closed) {\n // Make sure that there is sufficient time for whatever action to\n // complete. The window could have closed but the sign in network\n // call could still be in flight. This is specifically true for\n // Firefox or if the opener is in an iframe, in which case the oauth\n // helper closes the popup.\n this.pollId = window.setTimeout(() => {\n this.pollId = null;\n this.reject(_createError(this.auth, \"popup-closed-by-user\" /* AuthErrorCode.POPUP_CLOSED_BY_USER */));\n }, 8000 /* _Timeout.AUTH_EVENT */);\n return;\n }\n this.pollId = window.setTimeout(poll, _POLL_WINDOW_CLOSE_TIMEOUT.get());\n };\n poll();\n }\n }\n // Only one popup is ever shown at once. The lifecycle of the current popup\n // can be managed / cancelled by the constructor.\n PopupOperation.currentPopupAction = null;\n\n /**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n return PopupOperation;\n})();\nconst PENDING_REDIRECT_KEY = 'pendingRedirect';\n// We only get one redirect outcome for any one auth, so just store it\n// in here.\nconst redirectOutcomeMap = new Map();\nclass RedirectAction extends AbstractPopupRedirectOperation {\n constructor(auth, resolver, bypassAuthState = false) {\n super(auth, [\"signInViaRedirect\" /* AuthEventType.SIGN_IN_VIA_REDIRECT */, \"linkViaRedirect\" /* AuthEventType.LINK_VIA_REDIRECT */, \"reauthViaRedirect\" /* AuthEventType.REAUTH_VIA_REDIRECT */, \"unknown\" /* AuthEventType.UNKNOWN */], resolver, undefined, bypassAuthState);\n this.eventId = null;\n }\n /**\r\n * Override the execute function; if we already have a redirect result, then\r\n * just return it.\r\n */\n async execute() {\n let readyOutcome = redirectOutcomeMap.get(this.auth._key());\n if (!readyOutcome) {\n try {\n const hasPendingRedirect = await _getAndClearPendingRedirectStatus(this.resolver, this.auth);\n const result = hasPendingRedirect ? await super.execute() : null;\n readyOutcome = () => Promise.resolve(result);\n } catch (e) {\n readyOutcome = () => Promise.reject(e);\n }\n redirectOutcomeMap.set(this.auth._key(), readyOutcome);\n }\n // If we're not bypassing auth state, the ready outcome should be set to\n // null.\n if (!this.bypassAuthState) {\n redirectOutcomeMap.set(this.auth._key(), () => Promise.resolve(null));\n }\n return readyOutcome();\n }\n async onAuthEvent(event) {\n if (event.type === \"signInViaRedirect\" /* AuthEventType.SIGN_IN_VIA_REDIRECT */) {\n return super.onAuthEvent(event);\n } else if (event.type === \"unknown\" /* AuthEventType.UNKNOWN */) {\n // This is a sentinel value indicating there's no pending redirect\n this.resolve(null);\n return;\n }\n if (event.eventId) {\n const user = await this.auth._redirectUserForId(event.eventId);\n if (user) {\n this.user = user;\n return super.onAuthEvent(event);\n } else {\n this.resolve(null);\n }\n }\n }\n async onExecution() {}\n cleanUp() {}\n}\nasync function _getAndClearPendingRedirectStatus(resolver, auth) {\n const key = pendingRedirectKey(auth);\n const persistence = resolverPersistence(resolver);\n if (!(await persistence._isAvailable())) {\n return false;\n }\n const hasPendingRedirect = (await persistence._get(key)) === 'true';\n await persistence._remove(key);\n return hasPendingRedirect;\n}\nasync function _setPendingRedirectStatus(resolver, auth) {\n return resolverPersistence(resolver)._set(pendingRedirectKey(auth), 'true');\n}\nfunction _clearRedirectOutcomes() {\n redirectOutcomeMap.clear();\n}\nfunction _overrideRedirectResult(auth, result) {\n redirectOutcomeMap.set(auth._key(), result);\n}\nfunction resolverPersistence(resolver) {\n return _getInstance(resolver._redirectPersistence);\n}\nfunction pendingRedirectKey(auth) {\n return _persistenceKeyName(PENDING_REDIRECT_KEY, auth.config.apiKey, auth.name);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * Authenticates a Firebase client using a full-page redirect flow.\r\n *\r\n * @remarks\r\n * To handle the results and errors for this operation, refer to {@link getRedirectResult}.\r\n * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices\r\n * | best practices} when using {@link signInWithRedirect}.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new FacebookAuthProvider();\r\n * // You can add additional scopes to the provider:\r\n * provider.addScope('user_birthday');\r\n * // Start a sign in process for an unauthenticated user.\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n * // This is the signed-in user\r\n * const user = result.user;\r\n * // This gives you a Facebook Access Token.\r\n * const credential = provider.credentialFromResult(auth, result);\r\n * const token = credential.accessToken;\r\n * }\r\n * // As this API can be used for sign-in, linking and reauthentication,\r\n * // check the operationType to determine what triggered this redirect\r\n * // operation.\r\n * const operationType = result.operationType;\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\nfunction signInWithRedirect(auth, provider, resolver) {\n return _signInWithRedirect(auth, provider, resolver);\n}\nasync function _signInWithRedirect(auth, provider, resolver) {\n const authInternal = _castAuth(auth);\n _assertInstanceOf(auth, provider, FederatedAuthProvider);\n // Wait for auth initialization to complete, this will process pending redirects and clear the\n // PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new\n // redirect and creating a PENDING_REDIRECT_KEY entry.\n await authInternal._initializationPromise;\n const resolverInternal = _withDefaultResolver(authInternal, resolver);\n await _setPendingRedirectStatus(resolverInternal, authInternal);\n return resolverInternal._openRedirect(authInternal, provider, \"signInViaRedirect\" /* AuthEventType.SIGN_IN_VIA_REDIRECT */);\n}\n/**\r\n * Reauthenticates the current user with the specified {@link OAuthProvider} using a full-page redirect flow.\r\n * @remarks\r\n * To handle the results and errors for this operation, refer to {@link getRedirectResult}.\r\n * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices\r\n * | best practices} when using {@link reauthenticateWithRedirect}.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new FacebookAuthProvider();\r\n * const result = await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * // Reauthenticate using a redirect.\r\n * await reauthenticateWithRedirect(result.user, provider);\r\n * // This will again trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\nfunction reauthenticateWithRedirect(user, provider, resolver) {\n return _reauthenticateWithRedirect(user, provider, resolver);\n}\nasync function _reauthenticateWithRedirect(user, provider, resolver) {\n const userInternal = getModularInstance(user);\n _assertInstanceOf(userInternal.auth, provider, FederatedAuthProvider);\n // Wait for auth initialization to complete, this will process pending redirects and clear the\n // PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new\n // redirect and creating a PENDING_REDIRECT_KEY entry.\n await userInternal.auth._initializationPromise;\n // Allow the resolver to error before persisting the redirect user\n const resolverInternal = _withDefaultResolver(userInternal.auth, resolver);\n await _setPendingRedirectStatus(resolverInternal, userInternal.auth);\n const eventId = await prepareUserForRedirect(userInternal);\n return resolverInternal._openRedirect(userInternal.auth, provider, \"reauthViaRedirect\" /* AuthEventType.REAUTH_VIA_REDIRECT */, eventId);\n}\n/**\r\n * Links the {@link OAuthProvider} to the user account using a full-page redirect flow.\r\n * @remarks\r\n * To handle the results and errors for this operation, refer to {@link getRedirectResult}.\r\n * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices\r\n * | best practices} when using {@link linkWithRedirect}.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using some other provider.\r\n * const result = await signInWithEmailAndPassword(auth, email, password);\r\n * // Link using a redirect.\r\n * const provider = new FacebookAuthProvider();\r\n * await linkWithRedirect(result.user, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\nfunction linkWithRedirect(user, provider, resolver) {\n return _linkWithRedirect(user, provider, resolver);\n}\nasync function _linkWithRedirect(user, provider, resolver) {\n const userInternal = getModularInstance(user);\n _assertInstanceOf(userInternal.auth, provider, FederatedAuthProvider);\n // Wait for auth initialization to complete, this will process pending redirects and clear the\n // PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new\n // redirect and creating a PENDING_REDIRECT_KEY entry.\n await userInternal.auth._initializationPromise;\n // Allow the resolver to error before persisting the redirect user\n const resolverInternal = _withDefaultResolver(userInternal.auth, resolver);\n await _assertLinkedStatus(false, userInternal, provider.providerId);\n await _setPendingRedirectStatus(resolverInternal, userInternal.auth);\n const eventId = await prepareUserForRedirect(userInternal);\n return resolverInternal._openRedirect(userInternal.auth, provider, \"linkViaRedirect\" /* AuthEventType.LINK_VIA_REDIRECT */, eventId);\n}\n/**\r\n * Returns a {@link UserCredential} from the redirect-based sign-in flow.\r\n *\r\n * @remarks\r\n * If sign-in succeeded, returns the signed in user. If sign-in was unsuccessful, fails with an\r\n * error. If no redirect operation was called, returns `null`.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new FacebookAuthProvider();\r\n * // You can add additional scopes to the provider:\r\n * provider.addScope('user_birthday');\r\n * // Start a sign in process for an unauthenticated user.\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n * // This is the signed-in user\r\n * const user = result.user;\r\n * // This gives you a Facebook Access Token.\r\n * const credential = provider.credentialFromResult(auth, result);\r\n * const token = credential.accessToken;\r\n * }\r\n * // As this API can be used for sign-in, linking and reauthentication,\r\n * // check the operationType to determine what triggered this redirect\r\n * // operation.\r\n * const operationType = result.operationType;\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\nasync function getRedirectResult(auth, resolver) {\n await _castAuth(auth)._initializationPromise;\n return _getRedirectResult(auth, resolver, false);\n}\nasync function _getRedirectResult(auth, resolverExtern, bypassAuthState = false) {\n const authInternal = _castAuth(auth);\n const resolver = _withDefaultResolver(authInternal, resolverExtern);\n const action = new RedirectAction(authInternal, resolver, bypassAuthState);\n const result = await action.execute();\n if (result && !bypassAuthState) {\n delete result.user._redirectEventId;\n await authInternal._persistUserIfCurrent(result.user);\n await authInternal._setRedirectUser(null, resolverExtern);\n }\n return result;\n}\nasync function prepareUserForRedirect(user) {\n const eventId = _generateEventId(`${user.uid}:::`);\n user._redirectEventId = eventId;\n await user.auth._setRedirectUser(user);\n await user.auth._persistUserIfCurrent(user);\n return eventId;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n// The amount of time to store the UIDs of seen events; this is\n// set to 10 min by default\nconst EVENT_DUPLICATION_CACHE_DURATION_MS = 10 * 60 * 1000;\nclass AuthEventManager {\n constructor(auth) {\n this.auth = auth;\n this.cachedEventUids = new Set();\n this.consumers = new Set();\n this.queuedRedirectEvent = null;\n this.hasHandledPotentialRedirect = false;\n this.lastProcessedEventTime = Date.now();\n }\n registerConsumer(authEventConsumer) {\n this.consumers.add(authEventConsumer);\n if (this.queuedRedirectEvent && this.isEventForConsumer(this.queuedRedirectEvent, authEventConsumer)) {\n this.sendToConsumer(this.queuedRedirectEvent, authEventConsumer);\n this.saveEventToCache(this.queuedRedirectEvent);\n this.queuedRedirectEvent = null;\n }\n }\n unregisterConsumer(authEventConsumer) {\n this.consumers.delete(authEventConsumer);\n }\n onEvent(event) {\n // Check if the event has already been handled\n if (this.hasEventBeenHandled(event)) {\n return false;\n }\n let handled = false;\n this.consumers.forEach(consumer => {\n if (this.isEventForConsumer(event, consumer)) {\n handled = true;\n this.sendToConsumer(event, consumer);\n this.saveEventToCache(event);\n }\n });\n if (this.hasHandledPotentialRedirect || !isRedirectEvent(event)) {\n // If we've already seen a redirect before, or this is a popup event,\n // bail now\n return handled;\n }\n this.hasHandledPotentialRedirect = true;\n // If the redirect wasn't handled, hang on to it\n if (!handled) {\n this.queuedRedirectEvent = event;\n handled = true;\n }\n return handled;\n }\n sendToConsumer(event, consumer) {\n var _a;\n if (event.error && !isNullRedirectEvent(event)) {\n const code = ((_a = event.error.code) === null || _a === void 0 ? void 0 : _a.split('auth/')[1]) || \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */;\n consumer.onError(_createError(this.auth, code));\n } else {\n consumer.onAuthEvent(event);\n }\n }\n isEventForConsumer(event, consumer) {\n const eventIdMatches = consumer.eventId === null || !!event.eventId && event.eventId === consumer.eventId;\n return consumer.filter.includes(event.type) && eventIdMatches;\n }\n hasEventBeenHandled(event) {\n if (Date.now() - this.lastProcessedEventTime >= EVENT_DUPLICATION_CACHE_DURATION_MS) {\n this.cachedEventUids.clear();\n }\n return this.cachedEventUids.has(eventUid(event));\n }\n saveEventToCache(event) {\n this.cachedEventUids.add(eventUid(event));\n this.lastProcessedEventTime = Date.now();\n }\n}\nfunction eventUid(e) {\n return [e.type, e.eventId, e.sessionId, e.tenantId].filter(v => v).join('-');\n}\nfunction isNullRedirectEvent({\n type,\n error\n}) {\n return type === \"unknown\" /* AuthEventType.UNKNOWN */ && (error === null || error === void 0 ? void 0 : error.code) === `auth/${\"no-auth-event\" /* AuthErrorCode.NO_AUTH_EVENT */}`;\n}\nfunction isRedirectEvent(event) {\n switch (event.type) {\n case \"signInViaRedirect\" /* AuthEventType.SIGN_IN_VIA_REDIRECT */:\n case \"linkViaRedirect\" /* AuthEventType.LINK_VIA_REDIRECT */:\n case \"reauthViaRedirect\" /* AuthEventType.REAUTH_VIA_REDIRECT */:\n return true;\n case \"unknown\" /* AuthEventType.UNKNOWN */:\n return isNullRedirectEvent(event);\n default:\n return false;\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nasync function _getProjectConfig(auth, request = {}) {\n return _performApiRequest(auth, \"GET\" /* HttpMethod.GET */, \"/v1/projects\" /* Endpoint.GET_PROJECT_CONFIG */, request);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst IP_ADDRESS_REGEX = /^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/;\nconst HTTP_REGEX = /^https?/;\nasync function _validateOrigin(auth) {\n // Skip origin validation if we are in an emulated environment\n if (auth.config.emulator) {\n return;\n }\n const {\n authorizedDomains\n } = await _getProjectConfig(auth);\n for (const domain of authorizedDomains) {\n try {\n if (matchDomain(domain)) {\n return;\n }\n } catch (_a) {\n // Do nothing if there's a URL error; just continue searching\n }\n }\n // In the old SDK, this error also provides helpful messages.\n _fail(auth, \"unauthorized-domain\" /* AuthErrorCode.INVALID_ORIGIN */);\n}\nfunction matchDomain(expected) {\n const currentUrl = _getCurrentUrl();\n const {\n protocol,\n hostname\n } = new URL(currentUrl);\n if (expected.startsWith('chrome-extension://')) {\n const ceUrl = new URL(expected);\n if (ceUrl.hostname === '' && hostname === '') {\n // For some reason we're not parsing chrome URLs properly\n return protocol === 'chrome-extension:' && expected.replace('chrome-extension://', '') === currentUrl.replace('chrome-extension://', '');\n }\n return protocol === 'chrome-extension:' && ceUrl.hostname === hostname;\n }\n if (!HTTP_REGEX.test(protocol)) {\n return false;\n }\n if (IP_ADDRESS_REGEX.test(expected)) {\n // The domain has to be exactly equal to the pattern, as an IP domain will\n // only contain the IP, no extra character.\n return hostname === expected;\n }\n // Dots in pattern should be escaped.\n const escapedDomainPattern = expected.replace(/\\./g, '\\\\.');\n // Non ip address domains.\n // domain.com = *.domain.com OR domain.com\n const re = new RegExp('^(.+\\\\.' + escapedDomainPattern + '|' + escapedDomainPattern + ')$', 'i');\n return re.test(hostname);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst NETWORK_TIMEOUT = new Delay(30000, 60000);\n/**\r\n * Reset unlaoded GApi modules. If gapi.load fails due to a network error,\r\n * it will stop working after a retrial. This is a hack to fix this issue.\r\n */\nfunction resetUnloadedGapiModules() {\n // Clear last failed gapi.load state to force next gapi.load to first\n // load the failed gapi.iframes module.\n // Get gapix.beacon context.\n const beacon = _window().___jsl;\n // Get current hint.\n if (beacon === null || beacon === void 0 ? void 0 : beacon.H) {\n // Get gapi hint.\n for (const hint of Object.keys(beacon.H)) {\n // Requested modules.\n beacon.H[hint].r = beacon.H[hint].r || [];\n // Loaded modules.\n beacon.H[hint].L = beacon.H[hint].L || [];\n // Set requested modules to a copy of the loaded modules.\n beacon.H[hint].r = [...beacon.H[hint].L];\n // Clear pending callbacks.\n if (beacon.CP) {\n for (let i = 0; i < beacon.CP.length; i++) {\n // Remove all failed pending callbacks.\n beacon.CP[i] = null;\n }\n }\n }\n }\n}\nfunction loadGapi(auth) {\n return new Promise((resolve, reject) => {\n var _a, _b, _c;\n // Function to run when gapi.load is ready.\n function loadGapiIframe() {\n // The developer may have tried to previously run gapi.load and failed.\n // Run this to fix that.\n resetUnloadedGapiModules();\n gapi.load('gapi.iframes', {\n callback: () => {\n resolve(gapi.iframes.getContext());\n },\n ontimeout: () => {\n // The above reset may be sufficient, but having this reset after\n // failure ensures that if the developer calls gapi.load after the\n // connection is re-established and before another attempt to embed\n // the iframe, it would work and would not be broken because of our\n // failed attempt.\n // Timeout when gapi.iframes.Iframe not loaded.\n resetUnloadedGapiModules();\n reject(_createError(auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */));\n },\n timeout: NETWORK_TIMEOUT.get()\n });\n }\n if ((_b = (_a = _window().gapi) === null || _a === void 0 ? void 0 : _a.iframes) === null || _b === void 0 ? void 0 : _b.Iframe) {\n // If gapi.iframes.Iframe available, resolve.\n resolve(gapi.iframes.getContext());\n } else if (!!((_c = _window().gapi) === null || _c === void 0 ? void 0 : _c.load)) {\n // Gapi loader ready, load gapi.iframes.\n loadGapiIframe();\n } else {\n // Create a new iframe callback when this is called so as not to overwrite\n // any previous defined callback. This happens if this method is called\n // multiple times in parallel and could result in the later callback\n // overwriting the previous one. This would end up with a iframe\n // timeout.\n const cbName = _generateCallbackName('iframefcb');\n // GApi loader not available, dynamically load platform.js.\n _window()[cbName] = () => {\n // GApi loader should be ready.\n if (!!gapi.load) {\n loadGapiIframe();\n } else {\n // Gapi loader failed, throw error.\n reject(_createError(auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */));\n }\n };\n // Load GApi loader.\n return _loadJS(`https://apis.google.com/js/api.js?onload=${cbName}`).catch(e => reject(e));\n }\n }).catch(error => {\n // Reset cached promise to allow for retrial.\n cachedGApiLoader = null;\n throw error;\n });\n}\nlet cachedGApiLoader = null;\nfunction _loadGapi(auth) {\n cachedGApiLoader = cachedGApiLoader || loadGapi(auth);\n return cachedGApiLoader;\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst PING_TIMEOUT = new Delay(5000, 15000);\nconst IFRAME_PATH = '__/auth/iframe';\nconst EMULATED_IFRAME_PATH = 'emulator/auth/iframe';\nconst IFRAME_ATTRIBUTES = {\n style: {\n position: 'absolute',\n top: '-100px',\n width: '1px',\n height: '1px'\n },\n 'aria-hidden': 'true',\n tabindex: '-1'\n};\n// Map from apiHost to endpoint ID for passing into iframe. In current SDK, apiHost can be set to\n// anything (not from a list of endpoints with IDs as in legacy), so this is the closest we can get.\nconst EID_FROM_APIHOST = new Map([[\"identitytoolkit.googleapis.com\" /* DefaultConfig.API_HOST */, 'p'], ['staging-identitytoolkit.sandbox.googleapis.com', 's'], ['test-identitytoolkit.sandbox.googleapis.com', 't'] // test\n]);\nfunction getIframeUrl(auth) {\n const config = auth.config;\n _assert(config.authDomain, auth, \"auth-domain-config-required\" /* AuthErrorCode.MISSING_AUTH_DOMAIN */);\n const url = config.emulator ? _emulatorUrl(config, EMULATED_IFRAME_PATH) : `https://${auth.config.authDomain}/${IFRAME_PATH}`;\n const params = {\n apiKey: config.apiKey,\n appName: auth.name,\n v: SDK_VERSION\n };\n const eid = EID_FROM_APIHOST.get(auth.config.apiHost);\n if (eid) {\n params.eid = eid;\n }\n const frameworks = auth._getFrameworks();\n if (frameworks.length) {\n params.fw = frameworks.join(',');\n }\n return `${url}?${querystring(params).slice(1)}`;\n}\nasync function _openIframe(auth) {\n const context = await _loadGapi(auth);\n const gapi = _window().gapi;\n _assert(gapi, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n return context.open({\n where: document.body,\n url: getIframeUrl(auth),\n messageHandlersFilter: gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER,\n attributes: IFRAME_ATTRIBUTES,\n dontclear: true\n }, iframe => new Promise(async (resolve, reject) => {\n await iframe.restyle({\n // Prevent iframe from closing on mouse out.\n setHideOnLeave: false\n });\n const networkError = _createError(auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */);\n // Confirm iframe is correctly loaded.\n // To fallback on failure, set a timeout.\n const networkErrorTimer = _window().setTimeout(() => {\n reject(networkError);\n }, PING_TIMEOUT.get());\n // Clear timer and resolve pending iframe ready promise.\n function clearTimerAndResolve() {\n _window().clearTimeout(networkErrorTimer);\n resolve(iframe);\n }\n // This returns an IThenable. However the reject part does not call\n // when the iframe is not loaded.\n iframe.ping(clearTimerAndResolve).then(clearTimerAndResolve, () => {\n reject(networkError);\n });\n }));\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst BASE_POPUP_OPTIONS = {\n location: 'yes',\n resizable: 'yes',\n statusbar: 'yes',\n toolbar: 'no'\n};\nconst DEFAULT_WIDTH = 500;\nconst DEFAULT_HEIGHT = 600;\nconst TARGET_BLANK = '_blank';\nconst FIREFOX_EMPTY_URL = 'http://localhost';\nclass AuthPopup {\n constructor(window) {\n this.window = window;\n this.associatedEvent = null;\n }\n close() {\n if (this.window) {\n try {\n this.window.close();\n } catch (e) {}\n }\n }\n}\nfunction _open(auth, url, name, width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT) {\n const top = Math.max((window.screen.availHeight - height) / 2, 0).toString();\n const left = Math.max((window.screen.availWidth - width) / 2, 0).toString();\n let target = '';\n const options = Object.assign(Object.assign({}, BASE_POPUP_OPTIONS), {\n width: width.toString(),\n height: height.toString(),\n top,\n left\n });\n // Chrome iOS 7 and 8 is returning an undefined popup win when target is\n // specified, even though the popup is not necessarily blocked.\n const ua = getUA().toLowerCase();\n if (name) {\n target = _isChromeIOS(ua) ? TARGET_BLANK : name;\n }\n if (_isFirefox(ua)) {\n // Firefox complains when invalid URLs are popped out. Hacky way to bypass.\n url = url || FIREFOX_EMPTY_URL;\n // Firefox disables by default scrolling on popup windows, which can create\n // issues when the user has many Google accounts, for instance.\n options.scrollbars = 'yes';\n }\n const optionsString = Object.entries(options).reduce((accum, [key, value]) => `${accum}${key}=${value},`, '');\n if (_isIOSStandalone(ua) && target !== '_self') {\n openAsNewWindowIOS(url || '', target);\n return new AuthPopup(null);\n }\n // about:blank getting sanitized causing browsers like IE/Edge to display\n // brief error message before redirecting to handler.\n const newWin = window.open(url || '', target, optionsString);\n _assert(newWin, auth, \"popup-blocked\" /* AuthErrorCode.POPUP_BLOCKED */);\n // Flaky on IE edge, encapsulate with a try and catch.\n try {\n newWin.focus();\n } catch (e) {}\n return new AuthPopup(newWin);\n}\nfunction openAsNewWindowIOS(url, target) {\n const el = document.createElement('a');\n el.href = url;\n el.target = target;\n const click = document.createEvent('MouseEvent');\n click.initMouseEvent('click', true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 1, null);\n el.dispatchEvent(click);\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * URL for Authentication widget which will initiate the OAuth handshake\r\n *\r\n * @internal\r\n */\nconst WIDGET_PATH = '__/auth/handler';\n/**\r\n * URL for emulated environment\r\n *\r\n * @internal\r\n */\nconst EMULATOR_WIDGET_PATH = 'emulator/auth/handler';\n/**\r\n * Fragment name for the App Check token that gets passed to the widget\r\n *\r\n * @internal\r\n */\nconst FIREBASE_APP_CHECK_FRAGMENT_ID = encodeURIComponent('fac');\nasync function _getRedirectUrl(auth, provider, authType, redirectUrl, eventId, additionalParams) {\n _assert(auth.config.authDomain, auth, \"auth-domain-config-required\" /* AuthErrorCode.MISSING_AUTH_DOMAIN */);\n _assert(auth.config.apiKey, auth, \"invalid-api-key\" /* AuthErrorCode.INVALID_API_KEY */);\n const params = {\n apiKey: auth.config.apiKey,\n appName: auth.name,\n authType,\n redirectUrl,\n v: SDK_VERSION,\n eventId\n };\n if (provider instanceof FederatedAuthProvider) {\n provider.setDefaultLanguage(auth.languageCode);\n params.providerId = provider.providerId || '';\n if (!isEmpty(provider.getCustomParameters())) {\n params.customParameters = JSON.stringify(provider.getCustomParameters());\n }\n // TODO set additionalParams from the provider as well?\n for (const [key, value] of Object.entries(additionalParams || {})) {\n params[key] = value;\n }\n }\n if (provider instanceof BaseOAuthProvider) {\n const scopes = provider.getScopes().filter(scope => scope !== '');\n if (scopes.length > 0) {\n params.scopes = scopes.join(',');\n }\n }\n if (auth.tenantId) {\n params.tid = auth.tenantId;\n }\n // TODO: maybe set eid as endipointId\n // TODO: maybe set fw as Frameworks.join(\",\")\n const paramsDict = params;\n for (const key of Object.keys(paramsDict)) {\n if (paramsDict[key] === undefined) {\n delete paramsDict[key];\n }\n }\n // Sets the App Check token to pass to the widget\n const appCheckToken = await auth._getAppCheckToken();\n const appCheckTokenFragment = appCheckToken ? `#${FIREBASE_APP_CHECK_FRAGMENT_ID}=${encodeURIComponent(appCheckToken)}` : '';\n // Start at index 1 to skip the leading '&' in the query string\n return `${getHandlerBase(auth)}?${querystring(paramsDict).slice(1)}${appCheckTokenFragment}`;\n}\nfunction getHandlerBase({\n config\n}) {\n if (!config.emulator) {\n return `https://${config.authDomain}/${WIDGET_PATH}`;\n }\n return _emulatorUrl(config, EMULATOR_WIDGET_PATH);\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\n/**\r\n * The special web storage event\r\n *\r\n */\nconst WEB_STORAGE_SUPPORT_KEY = 'webStorageSupport';\nclass BrowserPopupRedirectResolver {\n constructor() {\n this.eventManagers = {};\n this.iframes = {};\n this.originValidationPromises = {};\n this._redirectPersistence = browserSessionPersistence;\n this._completeRedirectFn = _getRedirectResult;\n this._overrideRedirectResult = _overrideRedirectResult;\n }\n // Wrapping in async even though we don't await anywhere in order\n // to make sure errors are raised as promise rejections\n async _openPopup(auth, provider, authType, eventId) {\n var _a;\n debugAssert((_a = this.eventManagers[auth._key()]) === null || _a === void 0 ? void 0 : _a.manager, '_initialize() not called before _openPopup()');\n const url = await _getRedirectUrl(auth, provider, authType, _getCurrentUrl(), eventId);\n return _open(auth, url, _generateEventId());\n }\n async _openRedirect(auth, provider, authType, eventId) {\n await this._originValidation(auth);\n const url = await _getRedirectUrl(auth, provider, authType, _getCurrentUrl(), eventId);\n _setWindowLocation(url);\n return new Promise(() => {});\n }\n _initialize(auth) {\n const key = auth._key();\n if (this.eventManagers[key]) {\n const {\n manager,\n promise\n } = this.eventManagers[key];\n if (manager) {\n return Promise.resolve(manager);\n } else {\n debugAssert(promise, 'If manager is not set, promise should be');\n return promise;\n }\n }\n const promise = this.initAndGetManager(auth);\n this.eventManagers[key] = {\n promise\n };\n // If the promise is rejected, the key should be removed so that the\n // operation can be retried later.\n promise.catch(() => {\n delete this.eventManagers[key];\n });\n return promise;\n }\n async initAndGetManager(auth) {\n const iframe = await _openIframe(auth);\n const manager = new AuthEventManager(auth);\n iframe.register('authEvent', iframeEvent => {\n _assert(iframeEvent === null || iframeEvent === void 0 ? void 0 : iframeEvent.authEvent, auth, \"invalid-auth-event\" /* AuthErrorCode.INVALID_AUTH_EVENT */);\n // TODO: Consider splitting redirect and popup events earlier on\n const handled = manager.onEvent(iframeEvent.authEvent);\n return {\n status: handled ? \"ACK\" /* GapiOutcome.ACK */ : \"ERROR\" /* GapiOutcome.ERROR */\n };\n }, gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER);\n this.eventManagers[auth._key()] = {\n manager\n };\n this.iframes[auth._key()] = iframe;\n return manager;\n }\n _isIframeWebStorageSupported(auth, cb) {\n const iframe = this.iframes[auth._key()];\n iframe.send(WEB_STORAGE_SUPPORT_KEY, {\n type: WEB_STORAGE_SUPPORT_KEY\n }, result => {\n var _a;\n const isSupported = (_a = result === null || result === void 0 ? void 0 : result[0]) === null || _a === void 0 ? void 0 : _a[WEB_STORAGE_SUPPORT_KEY];\n if (isSupported !== undefined) {\n cb(!!isSupported);\n }\n _fail(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n }, gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER);\n }\n _originValidation(auth) {\n const key = auth._key();\n if (!this.originValidationPromises[key]) {\n this.originValidationPromises[key] = _validateOrigin(auth);\n }\n return this.originValidationPromises[key];\n }\n get _shouldInitProactively() {\n // Mobile browsers and Safari need to optimistically initialize\n return _isMobileBrowser() || _isSafari() || _isIOS();\n }\n}\n/**\r\n * An implementation of {@link PopupRedirectResolver} suitable for browser\r\n * based applications.\r\n *\r\n * @remarks\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @public\r\n */\nconst browserPopupRedirectResolver = BrowserPopupRedirectResolver;\nclass MultiFactorAssertionImpl {\n constructor(factorId) {\n this.factorId = factorId;\n }\n _process(auth, session, displayName) {\n switch (session.type) {\n case \"enroll\" /* MultiFactorSessionType.ENROLL */:\n return this._finalizeEnroll(auth, session.credential, displayName);\n case \"signin\" /* MultiFactorSessionType.SIGN_IN */:\n return this._finalizeSignIn(auth, session.credential);\n default:\n return debugFail('unexpected MultiFactorSessionType');\n }\n }\n}\n\n/**\r\n * {@inheritdoc PhoneMultiFactorAssertion}\r\n *\r\n * @public\r\n */\nclass PhoneMultiFactorAssertionImpl extends MultiFactorAssertionImpl {\n constructor(credential) {\n super(\"phone\" /* FactorId.PHONE */);\n this.credential = credential;\n }\n /** @internal */\n static _fromCredential(credential) {\n return new PhoneMultiFactorAssertionImpl(credential);\n }\n /** @internal */\n _finalizeEnroll(auth, idToken, displayName) {\n return finalizeEnrollPhoneMfa(auth, {\n idToken,\n displayName,\n phoneVerificationInfo: this.credential._makeVerificationRequest()\n });\n }\n /** @internal */\n _finalizeSignIn(auth, mfaPendingCredential) {\n return finalizeSignInPhoneMfa(auth, {\n mfaPendingCredential,\n phoneVerificationInfo: this.credential._makeVerificationRequest()\n });\n }\n}\n/**\r\n * Provider for generating a {@link PhoneMultiFactorAssertion}.\r\n *\r\n * @public\r\n */\nlet PhoneMultiFactorGenerator = /*#__PURE__*/(() => {\n class PhoneMultiFactorGenerator {\n constructor() {}\n /**\r\n * Provides a {@link PhoneMultiFactorAssertion} to confirm ownership of the phone second factor.\r\n *\r\n * @remarks\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @param phoneAuthCredential - A credential provided by {@link PhoneAuthProvider.credential}.\r\n * @returns A {@link PhoneMultiFactorAssertion} which can be used with\r\n * {@link MultiFactorResolver.resolveSignIn}\r\n */\n static assertion(credential) {\n return PhoneMultiFactorAssertionImpl._fromCredential(credential);\n }\n }\n /**\r\n * The identifier of the phone second factor: `phone`.\r\n */\n PhoneMultiFactorGenerator.FACTOR_ID = 'phone';\n\n /**\r\n * Provider for generating a {@link TotpMultiFactorAssertion}.\r\n *\r\n * @public\r\n */\n return PhoneMultiFactorGenerator;\n})();\nlet TotpMultiFactorGenerator = /*#__PURE__*/(() => {\n class TotpMultiFactorGenerator {\n /**\r\n * Provides a {@link TotpMultiFactorAssertion} to confirm ownership of\r\n * the TOTP (time-based one-time password) second factor.\r\n * This assertion is used to complete enrollment in TOTP second factor.\r\n *\r\n * @param secret A {@link TotpSecret} containing the shared secret key and other TOTP parameters.\r\n * @param oneTimePassword One-time password from TOTP App.\r\n * @returns A {@link TotpMultiFactorAssertion} which can be used with\r\n * {@link MultiFactorUser.enroll}.\r\n */\n static assertionForEnrollment(secret, oneTimePassword) {\n return TotpMultiFactorAssertionImpl._fromSecret(secret, oneTimePassword);\n }\n /**\r\n * Provides a {@link TotpMultiFactorAssertion} to confirm ownership of the TOTP second factor.\r\n * This assertion is used to complete signIn with TOTP as the second factor.\r\n *\r\n * @param enrollmentId identifies the enrolled TOTP second factor.\r\n * @param oneTimePassword One-time password from TOTP App.\r\n * @returns A {@link TotpMultiFactorAssertion} which can be used with\r\n * {@link MultiFactorResolver.resolveSignIn}.\r\n */\n static assertionForSignIn(enrollmentId, oneTimePassword) {\n return TotpMultiFactorAssertionImpl._fromEnrollmentId(enrollmentId, oneTimePassword);\n }\n /**\r\n * Returns a promise to {@link TotpSecret} which contains the TOTP shared secret key and other parameters.\r\n * Creates a TOTP secret as part of enrolling a TOTP second factor.\r\n * Used for generating a QR code URL or inputting into a TOTP app.\r\n * This method uses the auth instance corresponding to the user in the multiFactorSession.\r\n *\r\n * @param session The {@link MultiFactorSession} that the user is part of.\r\n * @returns A promise to {@link TotpSecret}.\r\n */\n static async generateSecret(session) {\n var _a;\n const mfaSession = session;\n _assert(typeof ((_a = mfaSession.user) === null || _a === void 0 ? void 0 : _a.auth) !== 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\n const response = await startEnrollTotpMfa(mfaSession.user.auth, {\n idToken: mfaSession.credential,\n totpEnrollmentInfo: {}\n });\n return TotpSecret._fromStartTotpMfaEnrollmentResponse(response, mfaSession.user.auth);\n }\n }\n /**\r\n * The identifier of the TOTP second factor: `totp`.\r\n */\n TotpMultiFactorGenerator.FACTOR_ID = \"totp\" /* FactorId.TOTP */;\n return TotpMultiFactorGenerator;\n})();\nclass TotpMultiFactorAssertionImpl extends MultiFactorAssertionImpl {\n constructor(otp, enrollmentId, secret) {\n super(\"totp\" /* FactorId.TOTP */);\n this.otp = otp;\n this.enrollmentId = enrollmentId;\n this.secret = secret;\n }\n /** @internal */\n static _fromSecret(secret, otp) {\n return new TotpMultiFactorAssertionImpl(otp, undefined, secret);\n }\n /** @internal */\n static _fromEnrollmentId(enrollmentId, otp) {\n return new TotpMultiFactorAssertionImpl(otp, enrollmentId);\n }\n /** @internal */\n async _finalizeEnroll(auth, idToken, displayName) {\n _assert(typeof this.secret !== 'undefined', auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n return finalizeEnrollTotpMfa(auth, {\n idToken,\n displayName,\n totpVerificationInfo: this.secret._makeTotpVerificationInfo(this.otp)\n });\n }\n /** @internal */\n async _finalizeSignIn(auth, mfaPendingCredential) {\n _assert(this.enrollmentId !== undefined && this.otp !== undefined, auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\n const totpVerificationInfo = {\n verificationCode: this.otp\n };\n return finalizeSignInTotpMfa(auth, {\n mfaPendingCredential,\n mfaEnrollmentId: this.enrollmentId,\n totpVerificationInfo\n });\n }\n}\n/**\r\n * Provider for generating a {@link TotpMultiFactorAssertion}.\r\n *\r\n * Stores the shared secret key and other parameters to generate time-based OTPs.\r\n * Implements methods to retrieve the shared secret key and generate a QR code URL.\r\n * @public\r\n */\nclass TotpSecret {\n // The public members are declared outside the constructor so the docs can be generated.\n constructor(secretKey, hashingAlgorithm, codeLength, codeIntervalSeconds, enrollmentCompletionDeadline, sessionInfo, auth) {\n this.sessionInfo = sessionInfo;\n this.auth = auth;\n this.secretKey = secretKey;\n this.hashingAlgorithm = hashingAlgorithm;\n this.codeLength = codeLength;\n this.codeIntervalSeconds = codeIntervalSeconds;\n this.enrollmentCompletionDeadline = enrollmentCompletionDeadline;\n }\n /** @internal */\n static _fromStartTotpMfaEnrollmentResponse(response, auth) {\n return new TotpSecret(response.totpSessionInfo.sharedSecretKey, response.totpSessionInfo.hashingAlgorithm, response.totpSessionInfo.verificationCodeLength, response.totpSessionInfo.periodSec, new Date(response.totpSessionInfo.finalizeEnrollmentTime).toUTCString(), response.totpSessionInfo.sessionInfo, auth);\n }\n /** @internal */\n _makeTotpVerificationInfo(otp) {\n return {\n sessionInfo: this.sessionInfo,\n verificationCode: otp\n };\n }\n /**\r\n * Returns a QR code URL as described in\r\n * https://github.com/google/google-authenticator/wiki/Key-Uri-Format\r\n * This can be displayed to the user as a QR code to be scanned into a TOTP app like Google Authenticator.\r\n * If the optional parameters are unspecified, an accountName of and issuer of are used.\r\n *\r\n * @param accountName the name of the account/app along with a user identifier.\r\n * @param issuer issuer of the TOTP (likely the app name).\r\n * @returns A QR code URL string.\r\n */\n generateQrCodeUrl(accountName, issuer) {\n var _a;\n let useDefaults = false;\n if (_isEmptyString(accountName) || _isEmptyString(issuer)) {\n useDefaults = true;\n }\n if (useDefaults) {\n if (_isEmptyString(accountName)) {\n accountName = ((_a = this.auth.currentUser) === null || _a === void 0 ? void 0 : _a.email) || 'unknownuser';\n }\n if (_isEmptyString(issuer)) {\n issuer = this.auth.name;\n }\n }\n return `otpauth://totp/${issuer}:${accountName}?secret=${this.secretKey}&issuer=${issuer}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`;\n }\n}\n/** @internal */\nfunction _isEmptyString(input) {\n return typeof input === 'undefined' || (input === null || input === void 0 ? void 0 : input.length) === 0;\n}\nvar name = \"@firebase/auth\";\nvar version = \"1.5.1\";\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nclass AuthInterop {\n constructor(auth) {\n this.auth = auth;\n this.internalListeners = new Map();\n }\n getUid() {\n var _a;\n this.assertAuthConfigured();\n return ((_a = this.auth.currentUser) === null || _a === void 0 ? void 0 : _a.uid) || null;\n }\n async getToken(forceRefresh) {\n this.assertAuthConfigured();\n await this.auth._initializationPromise;\n if (!this.auth.currentUser) {\n return null;\n }\n const accessToken = await this.auth.currentUser.getIdToken(forceRefresh);\n return {\n accessToken\n };\n }\n addAuthTokenListener(listener) {\n this.assertAuthConfigured();\n if (this.internalListeners.has(listener)) {\n return;\n }\n const unsubscribe = this.auth.onIdTokenChanged(user => {\n listener((user === null || user === void 0 ? void 0 : user.stsTokenManager.accessToken) || null);\n });\n this.internalListeners.set(listener, unsubscribe);\n this.updateProactiveRefresh();\n }\n removeAuthTokenListener(listener) {\n this.assertAuthConfigured();\n const unsubscribe = this.internalListeners.get(listener);\n if (!unsubscribe) {\n return;\n }\n this.internalListeners.delete(listener);\n unsubscribe();\n this.updateProactiveRefresh();\n }\n assertAuthConfigured() {\n _assert(this.auth._initializationPromise, \"dependent-sdk-initialized-before-auth\" /* AuthErrorCode.DEPENDENT_SDK_INIT_BEFORE_AUTH */);\n }\n updateProactiveRefresh() {\n if (this.internalListeners.size > 0) {\n this.auth._startProactiveRefresh();\n } else {\n this.auth._stopProactiveRefresh();\n }\n }\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nfunction getVersionForPlatform(clientPlatform) {\n switch (clientPlatform) {\n case \"Node\" /* ClientPlatform.NODE */:\n return 'node';\n case \"ReactNative\" /* ClientPlatform.REACT_NATIVE */:\n return 'rn';\n case \"Worker\" /* ClientPlatform.WORKER */:\n return 'webworker';\n case \"Cordova\" /* ClientPlatform.CORDOVA */:\n return 'cordova';\n default:\n return undefined;\n }\n}\n/** @internal */\nfunction registerAuth(clientPlatform) {\n _registerComponent(new Component(\"auth\" /* _ComponentName.AUTH */, (container, {\n options: deps\n }) => {\n const app = container.getProvider('app').getImmediate();\n const heartbeatServiceProvider = container.getProvider('heartbeat');\n const appCheckServiceProvider = container.getProvider('app-check-internal');\n const {\n apiKey,\n authDomain\n } = app.options;\n _assert(apiKey && !apiKey.includes(':'), \"invalid-api-key\" /* AuthErrorCode.INVALID_API_KEY */, {\n appName: app.name\n });\n const config = {\n apiKey,\n authDomain,\n clientPlatform,\n apiHost: \"identitytoolkit.googleapis.com\" /* DefaultConfig.API_HOST */,\n tokenApiHost: \"securetoken.googleapis.com\" /* DefaultConfig.TOKEN_API_HOST */,\n apiScheme: \"https\" /* DefaultConfig.API_SCHEME */,\n sdkClientVersion: _getClientVersion(clientPlatform)\n };\n const authInstance = new AuthImpl(app, heartbeatServiceProvider, appCheckServiceProvider, config);\n _initializeAuthInstance(authInstance, deps);\n return authInstance;\n }, \"PUBLIC\" /* ComponentType.PUBLIC */)\n /**\r\n * Auth can only be initialized by explicitly calling getAuth() or initializeAuth()\r\n * For why we do this, See go/firebase-next-auth-init\r\n */.setInstantiationMode(\"EXPLICIT\" /* InstantiationMode.EXPLICIT */)\n /**\r\n * Because all firebase products that depend on auth depend on auth-internal directly,\r\n * we need to initialize auth-internal after auth is initialized to make it available to other firebase products.\r\n */.setInstanceCreatedCallback((container, _instanceIdentifier, _instance) => {\n const authInternalProvider = container.getProvider(\"auth-internal\" /* _ComponentName.AUTH_INTERNAL */);\n authInternalProvider.initialize();\n }));\n _registerComponent(new Component(\"auth-internal\" /* _ComponentName.AUTH_INTERNAL */, container => {\n const auth = _castAuth(container.getProvider(\"auth\" /* _ComponentName.AUTH */).getImmediate());\n return (auth => new AuthInterop(auth))(auth);\n }, \"PRIVATE\" /* ComponentType.PRIVATE */).setInstantiationMode(\"EXPLICIT\" /* InstantiationMode.EXPLICIT */));\n registerVersion(name, version, getVersionForPlatform(clientPlatform));\n // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation\n registerVersion(name, version, 'esm2017');\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\nconst DEFAULT_ID_TOKEN_MAX_AGE = 5 * 60;\nconst authIdTokenMaxAge = getExperimentalSetting('authIdTokenMaxAge') || DEFAULT_ID_TOKEN_MAX_AGE;\nlet lastPostedIdToken = null;\nconst mintCookieFactory = url => async user => {\n const idTokenResult = user && (await user.getIdTokenResult());\n const idTokenAge = idTokenResult && (new Date().getTime() - Date.parse(idTokenResult.issuedAtTime)) / 1000;\n if (idTokenAge && idTokenAge > authIdTokenMaxAge) {\n return;\n }\n // Specifically trip null => undefined when logged out, to delete any existing cookie\n const idToken = idTokenResult === null || idTokenResult === void 0 ? void 0 : idTokenResult.token;\n if (lastPostedIdToken === idToken) {\n return;\n }\n lastPostedIdToken = idToken;\n await fetch(url, {\n method: idToken ? 'POST' : 'DELETE',\n headers: idToken ? {\n 'Authorization': `Bearer ${idToken}`\n } : {}\n });\n};\n/**\r\n * Returns the Auth instance associated with the provided {@link @firebase/app#FirebaseApp}.\r\n * If no instance exists, initializes an Auth instance with platform-specific default dependencies.\r\n *\r\n * @param app - The Firebase App.\r\n *\r\n * @public\r\n */\nfunction getAuth(app = getApp()) {\n const provider = _getProvider(app, 'auth');\n if (provider.isInitialized()) {\n return provider.getImmediate();\n }\n const auth = initializeAuth(app, {\n popupRedirectResolver: browserPopupRedirectResolver,\n persistence: [indexedDBLocalPersistence, browserLocalPersistence, browserSessionPersistence]\n });\n const authTokenSyncUrl = getExperimentalSetting('authTokenSyncURL');\n if (authTokenSyncUrl) {\n const mintCookie = mintCookieFactory(authTokenSyncUrl);\n beforeAuthStateChanged(auth, mintCookie, () => mintCookie(auth.currentUser));\n onIdTokenChanged(auth, user => mintCookie(user));\n }\n const authEmulatorHost = getDefaultEmulatorHost('auth');\n if (authEmulatorHost) {\n connectAuthEmulator(auth, `http://${authEmulatorHost}`);\n }\n return auth;\n}\nregisterAuth(\"Browser\" /* ClientPlatform.BROWSER */);\nexport { TwitterAuthProvider as $, ActionCodeOperation as A, updateCurrentUser as B, signOut as C, revokeAccessToken as D, deleteUser as E, FactorId as F, debugErrorMap as G, prodErrorMap as H, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as I, initializeAuth as J, connectAuthEmulator as K, AuthCredential as L, EmailAuthCredential as M, OAuthCredential as N, OperationType as O, PhoneAuthProvider as P, PhoneAuthCredential as Q, RecaptchaVerifier as R, SignInMethod as S, TotpMultiFactorGenerator as T, inMemoryPersistence as U, EmailAuthProvider as V, FacebookAuthProvider as W, GoogleAuthProvider as X, GithubAuthProvider as Y, OAuthProvider as Z, SAMLAuthProvider as _, browserSessionPersistence as a, signInAnonymously as a0, signInWithCredential as a1, linkWithCredential as a2, reauthenticateWithCredential as a3, signInWithCustomToken as a4, sendPasswordResetEmail as a5, confirmPasswordReset as a6, applyActionCode as a7, checkActionCode as a8, verifyPasswordResetCode as a9, _isIOS7Or8 as aA, _createError as aB, _assert as aC, AuthEventManager as aD, _getInstance as aE, _persistenceKeyName as aF, _getRedirectResult as aG, _overrideRedirectResult as aH, _clearRedirectOutcomes as aI, _castAuth as aJ, UserImpl as aK, AuthImpl as aL, _getClientVersion as aM, _generateEventId as aN, AuthPopup as aO, FetchProvider as aP, SAMLAuthCredential as aQ, createUserWithEmailAndPassword as aa, signInWithEmailAndPassword as ab, sendSignInLinkToEmail as ac, isSignInWithEmailLink as ad, signInWithEmailLink as ae, fetchSignInMethodsForEmail as af, sendEmailVerification as ag, verifyBeforeUpdateEmail as ah, ActionCodeURL as ai, parseActionCodeURL as aj, updateProfile as ak, updateEmail as al, updatePassword as am, getIdToken as an, getIdTokenResult as ao, unlink as ap, getAdditionalUserInfo as aq, reload as ar, getMultiFactorResolver as as, multiFactor as at, debugAssert as au, _isIOS as av, _isAndroid as aw, _fail as ax, _getRedirectUrl as ay, _getProjectConfig as az, browserLocalPersistence as b, signInWithPopup as c, linkWithPopup as d, reauthenticateWithPopup as e, signInWithRedirect as f, linkWithRedirect as g, reauthenticateWithRedirect as h, indexedDBLocalPersistence as i, getRedirectResult as j, browserPopupRedirectResolver as k, linkWithPhoneNumber as l, PhoneMultiFactorGenerator as m, TotpSecret as n, getAuth as o, ProviderId as p, setPersistence as q, reauthenticateWithPhoneNumber as r, signInWithPhoneNumber as s, initializeRecaptchaConfig as t, updatePhoneNumber as u, validatePassword as v, onIdTokenChanged as w, beforeAuthStateChanged as x, onAuthStateChanged as y, useDeviceLanguage as z };\n","import { ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, VERSION, ɵAngularFireSchedulers, ɵAppCheckInstances, ɵzoneWrap } from '@angular/fire';\nimport { from, timer } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Optional, NgModule, NgZone, Injector } from '@angular/core';\nimport { FirebaseApp, FirebaseApps } from '@angular/fire/app';\nimport { registerVersion } from 'firebase/app';\nimport { authState as authState$1, user as user$1, idToken as idToken$1 } from 'rxfire/auth';\nimport { applyActionCode as applyActionCode$1, beforeAuthStateChanged as beforeAuthStateChanged$1, checkActionCode as checkActionCode$1, confirmPasswordReset as confirmPasswordReset$1, connectAuthEmulator as connectAuthEmulator$1, createUserWithEmailAndPassword as createUserWithEmailAndPassword$1, deleteUser as deleteUser$1, fetchSignInMethodsForEmail as fetchSignInMethodsForEmail$1, getAdditionalUserInfo as getAdditionalUserInfo$1, getAuth as getAuth$1, getIdToken as getIdToken$1, getIdTokenResult as getIdTokenResult$1, getMultiFactorResolver as getMultiFactorResolver$1, getRedirectResult as getRedirectResult$1, initializeAuth as initializeAuth$1, initializeRecaptchaConfig as initializeRecaptchaConfig$1, isSignInWithEmailLink as isSignInWithEmailLink$1, linkWithCredential as linkWithCredential$1, linkWithPhoneNumber as linkWithPhoneNumber$1, linkWithPopup as linkWithPopup$1, linkWithRedirect as linkWithRedirect$1, multiFactor as multiFactor$1, onAuthStateChanged as onAuthStateChanged$1, onIdTokenChanged as onIdTokenChanged$1, parseActionCodeURL as parseActionCodeURL$1, reauthenticateWithCredential as reauthenticateWithCredential$1, reauthenticateWithPhoneNumber as reauthenticateWithPhoneNumber$1, reauthenticateWithPopup as reauthenticateWithPopup$1, reauthenticateWithRedirect as reauthenticateWithRedirect$1, reload as reload$1, revokeAccessToken as revokeAccessToken$1, sendEmailVerification as sendEmailVerification$1, sendPasswordResetEmail as sendPasswordResetEmail$1, sendSignInLinkToEmail as sendSignInLinkToEmail$1, setPersistence as setPersistence$1, signInAnonymously as signInAnonymously$1, signInWithCredential as signInWithCredential$1, signInWithCustomToken as signInWithCustomToken$1, signInWithEmailAndPassword as signInWithEmailAndPassword$1, signInWithEmailLink as signInWithEmailLink$1, signInWithPhoneNumber as signInWithPhoneNumber$1, signInWithPopup as signInWithPopup$1, signInWithRedirect as signInWithRedirect$1, signOut as signOut$1, unlink as unlink$1, updateCurrentUser as updateCurrentUser$1, updateEmail as updateEmail$1, updatePassword as updatePassword$1, updatePhoneNumber as updatePhoneNumber$1, updateProfile as updateProfile$1, useDeviceLanguage as useDeviceLanguage$1, validatePassword as validatePassword$1, verifyBeforeUpdateEmail as verifyBeforeUpdateEmail$1, verifyPasswordResetCode as verifyPasswordResetCode$1 } from 'firebase/auth';\nexport * from 'firebase/auth';\nconst AUTH_PROVIDER_NAME = 'auth';\nclass Auth {\n constructor(auth) {\n return auth;\n }\n}\nclass AuthInstances {\n constructor() {\n return ɵgetAllInstancesOf(AUTH_PROVIDER_NAME);\n }\n}\nconst authInstance$ = /*#__PURE__*/ /*#__PURE__*/timer(0, 300).pipe( /*#__PURE__*/concatMap(() => from(ɵgetAllInstancesOf(AUTH_PROVIDER_NAME))), /*#__PURE__*/distinct());\nconst PROVIDED_AUTH_INSTANCES = /*#__PURE__*/new InjectionToken('angularfire2.auth-instances');\nfunction defaultAuthInstanceFactory(provided, defaultApp) {\n const defaultAuth = ɵgetDefaultInstanceOf(AUTH_PROVIDER_NAME, provided, defaultApp);\n return defaultAuth && new Auth(defaultAuth);\n}\nfunction authInstanceFactory(fn) {\n return (zone, injector) => {\n const auth = zone.runOutsideAngular(() => fn(injector));\n return new Auth(auth);\n };\n}\nconst AUTH_INSTANCES_PROVIDER = {\n provide: AuthInstances,\n deps: [[/*#__PURE__*/new Optional(), PROVIDED_AUTH_INSTANCES]]\n};\nconst DEFAULT_AUTH_INSTANCE_PROVIDER = {\n provide: Auth,\n useFactory: defaultAuthInstanceFactory,\n deps: [[/*#__PURE__*/new Optional(), PROVIDED_AUTH_INSTANCES], FirebaseApp]\n};\nlet AuthModule = /*#__PURE__*/(() => {\n class AuthModule {\n constructor() {\n registerVersion('angularfire', VERSION.full, 'auth');\n }\n static ɵfac = function AuthModule_Factory(t) {\n return new (t || AuthModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: AuthModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [DEFAULT_AUTH_INSTANCE_PROVIDER, AUTH_INSTANCES_PROVIDER]\n });\n }\n return AuthModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction provideAuth(fn, ...deps) {\n return {\n ngModule: AuthModule,\n providers: [{\n provide: PROVIDED_AUTH_INSTANCES,\n useFactory: authInstanceFactory(fn),\n multi: true,\n deps: [NgZone, Injector, ɵAngularFireSchedulers, FirebaseApps, [new Optional(), ɵAppCheckInstances], ...deps]\n }]\n };\n}\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nconst authState = /*#__PURE__*/ɵzoneWrap(authState$1, true);\nconst user = /*#__PURE__*/ɵzoneWrap(user$1, true);\nconst idToken = /*#__PURE__*/ɵzoneWrap(idToken$1, true);\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nconst applyActionCode = /*#__PURE__*/ɵzoneWrap(applyActionCode$1, true);\nconst beforeAuthStateChanged = /*#__PURE__*/ɵzoneWrap(beforeAuthStateChanged$1, true);\nconst checkActionCode = /*#__PURE__*/ɵzoneWrap(checkActionCode$1, true);\nconst confirmPasswordReset = /*#__PURE__*/ɵzoneWrap(confirmPasswordReset$1, true);\nconst connectAuthEmulator = /*#__PURE__*/ɵzoneWrap(connectAuthEmulator$1, true);\nconst createUserWithEmailAndPassword = /*#__PURE__*/ɵzoneWrap(createUserWithEmailAndPassword$1, true);\nconst deleteUser = /*#__PURE__*/ɵzoneWrap(deleteUser$1, true);\nconst fetchSignInMethodsForEmail = /*#__PURE__*/ɵzoneWrap(fetchSignInMethodsForEmail$1, true);\nconst getAdditionalUserInfo = /*#__PURE__*/ɵzoneWrap(getAdditionalUserInfo$1, true);\nconst getAuth = /*#__PURE__*/ɵzoneWrap(getAuth$1, true);\nconst getIdToken = /*#__PURE__*/ɵzoneWrap(getIdToken$1, true);\nconst getIdTokenResult = /*#__PURE__*/ɵzoneWrap(getIdTokenResult$1, true);\nconst getMultiFactorResolver = /*#__PURE__*/ɵzoneWrap(getMultiFactorResolver$1, true);\nconst getRedirectResult = /*#__PURE__*/ɵzoneWrap(getRedirectResult$1, true);\nconst initializeAuth = /*#__PURE__*/ɵzoneWrap(initializeAuth$1, true);\nconst initializeRecaptchaConfig = /*#__PURE__*/ɵzoneWrap(initializeRecaptchaConfig$1, true);\nconst isSignInWithEmailLink = /*#__PURE__*/ɵzoneWrap(isSignInWithEmailLink$1, true);\nconst linkWithCredential = /*#__PURE__*/ɵzoneWrap(linkWithCredential$1, true);\nconst linkWithPhoneNumber = /*#__PURE__*/ɵzoneWrap(linkWithPhoneNumber$1, true);\nconst linkWithPopup = /*#__PURE__*/ɵzoneWrap(linkWithPopup$1, true);\nconst linkWithRedirect = /*#__PURE__*/ɵzoneWrap(linkWithRedirect$1, true);\nconst multiFactor = /*#__PURE__*/ɵzoneWrap(multiFactor$1, true);\nconst onAuthStateChanged = /*#__PURE__*/ɵzoneWrap(onAuthStateChanged$1, true);\nconst onIdTokenChanged = /*#__PURE__*/ɵzoneWrap(onIdTokenChanged$1, true);\nconst parseActionCodeURL = /*#__PURE__*/ɵzoneWrap(parseActionCodeURL$1, true);\nconst reauthenticateWithCredential = /*#__PURE__*/ɵzoneWrap(reauthenticateWithCredential$1, true);\nconst reauthenticateWithPhoneNumber = /*#__PURE__*/ɵzoneWrap(reauthenticateWithPhoneNumber$1, true);\nconst reauthenticateWithPopup = /*#__PURE__*/ɵzoneWrap(reauthenticateWithPopup$1, true);\nconst reauthenticateWithRedirect = /*#__PURE__*/ɵzoneWrap(reauthenticateWithRedirect$1, true);\nconst reload = /*#__PURE__*/ɵzoneWrap(reload$1, true);\nconst revokeAccessToken = /*#__PURE__*/ɵzoneWrap(revokeAccessToken$1, true);\nconst sendEmailVerification = /*#__PURE__*/ɵzoneWrap(sendEmailVerification$1, true);\nconst sendPasswordResetEmail = /*#__PURE__*/ɵzoneWrap(sendPasswordResetEmail$1, true);\nconst sendSignInLinkToEmail = /*#__PURE__*/ɵzoneWrap(sendSignInLinkToEmail$1, true);\nconst setPersistence = /*#__PURE__*/ɵzoneWrap(setPersistence$1, true);\nconst signInAnonymously = /*#__PURE__*/ɵzoneWrap(signInAnonymously$1, true);\nconst signInWithCredential = /*#__PURE__*/ɵzoneWrap(signInWithCredential$1, true);\nconst signInWithCustomToken = /*#__PURE__*/ɵzoneWrap(signInWithCustomToken$1, true);\nconst signInWithEmailAndPassword = /*#__PURE__*/ɵzoneWrap(signInWithEmailAndPassword$1, true);\nconst signInWithEmailLink = /*#__PURE__*/ɵzoneWrap(signInWithEmailLink$1, true);\nconst signInWithPhoneNumber = /*#__PURE__*/ɵzoneWrap(signInWithPhoneNumber$1, true);\nconst signInWithPopup = /*#__PURE__*/ɵzoneWrap(signInWithPopup$1, true);\nconst signInWithRedirect = /*#__PURE__*/ɵzoneWrap(signInWithRedirect$1, true);\nconst signOut = /*#__PURE__*/ɵzoneWrap(signOut$1, true);\nconst unlink = /*#__PURE__*/ɵzoneWrap(unlink$1, true);\nconst updateCurrentUser = /*#__PURE__*/ɵzoneWrap(updateCurrentUser$1, true);\nconst updateEmail = /*#__PURE__*/ɵzoneWrap(updateEmail$1, true);\nconst updatePassword = /*#__PURE__*/ɵzoneWrap(updatePassword$1, true);\nconst updatePhoneNumber = /*#__PURE__*/ɵzoneWrap(updatePhoneNumber$1, true);\nconst updateProfile = /*#__PURE__*/ɵzoneWrap(updateProfile$1, true);\nconst useDeviceLanguage = /*#__PURE__*/ɵzoneWrap(useDeviceLanguage$1, true);\nconst validatePassword = /*#__PURE__*/ɵzoneWrap(validatePassword$1, true);\nconst verifyBeforeUpdateEmail = /*#__PURE__*/ɵzoneWrap(verifyBeforeUpdateEmail$1, true);\nconst verifyPasswordResetCode = /*#__PURE__*/ɵzoneWrap(verifyPasswordResetCode$1, true);\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { Auth, AuthInstances, AuthModule, applyActionCode, authInstance$, authState, beforeAuthStateChanged, checkActionCode, confirmPasswordReset, connectAuthEmulator, createUserWithEmailAndPassword, deleteUser, fetchSignInMethodsForEmail, getAdditionalUserInfo, getAuth, getIdToken, getIdTokenResult, getMultiFactorResolver, getRedirectResult, idToken, initializeAuth, initializeRecaptchaConfig, isSignInWithEmailLink, linkWithCredential, linkWithPhoneNumber, linkWithPopup, linkWithRedirect, multiFactor, onAuthStateChanged, onIdTokenChanged, parseActionCodeURL, provideAuth, reauthenticateWithCredential, reauthenticateWithPhoneNumber, reauthenticateWithPopup, reauthenticateWithRedirect, reload, revokeAccessToken, sendEmailVerification, sendPasswordResetEmail, sendSignInLinkToEmail, setPersistence, signInAnonymously, signInWithCredential, signInWithCustomToken, signInWithEmailAndPassword, signInWithEmailLink, signInWithPhoneNumber, signInWithPopup, signInWithRedirect, signOut, unlink, updateCurrentUser, updateEmail, updatePassword, updatePhoneNumber, updateProfile, useDeviceLanguage, user, validatePassword, verifyBeforeUpdateEmail, verifyPasswordResetCode };\n","import { ɵgetAllInstancesOf, ɵgetDefaultInstanceOf, VERSION, ɵAngularFireSchedulers, ɵAppCheckInstances, ɵzoneWrap } from '@angular/fire';\nimport { from, timer } from 'rxjs';\nimport { concatMap, distinct } from 'rxjs/operators';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Optional, NgModule, NgZone, Injector } from '@angular/core';\nimport { FirebaseApp, FirebaseApps } from '@angular/fire/app';\nimport { AuthInstances } from '@angular/fire/auth';\nimport { registerVersion } from 'firebase/app';\nimport { collectionChanges as collectionChanges$1, collection as collection$1, sortedChanges as sortedChanges$1, auditTrail as auditTrail$1, collectionData as collectionData$1, collectionCountSnap as collectionCountSnap$1, collectionCount as collectionCount$1, doc as doc$1, docData as docData$1, snapToData as snapToData$1, fromRef as fromRef$1 } from 'rxfire/firestore';\nimport { addDoc as addDoc$1, aggregateFieldEqual as aggregateFieldEqual$1, aggregateQuerySnapshotEqual as aggregateQuerySnapshotEqual$1, and as and$1, arrayRemove as arrayRemove$1, arrayUnion as arrayUnion$1, average as average$1, clearIndexedDbPersistence as clearIndexedDbPersistence$1, collection as collection$2, collectionGroup as collectionGroup$1, connectFirestoreEmulator as connectFirestoreEmulator$1, count as count$1, deleteAllPersistentCacheIndexes as deleteAllPersistentCacheIndexes$1, deleteDoc as deleteDoc$1, deleteField as deleteField$1, disableNetwork as disableNetwork$1, disablePersistentCacheIndexAutoCreation as disablePersistentCacheIndexAutoCreation$1, doc as doc$2, documentId as documentId$1, enableIndexedDbPersistence as enableIndexedDbPersistence$1, enableMultiTabIndexedDbPersistence as enableMultiTabIndexedDbPersistence$1, enableNetwork as enableNetwork$1, enablePersistentCacheIndexAutoCreation as enablePersistentCacheIndexAutoCreation$1, endAt as endAt$1, endBefore as endBefore$1, getAggregateFromServer as getAggregateFromServer$1, getCountFromServer as getCountFromServer$1, getDoc as getDoc$1, getDocFromCache as getDocFromCache$1, getDocFromServer as getDocFromServer$1, getDocs as getDocs$1, getDocsFromCache as getDocsFromCache$1, getDocsFromServer as getDocsFromServer$1, getFirestore as getFirestore$1, getPersistentCacheIndexManager as getPersistentCacheIndexManager$1, increment as increment$1, initializeFirestore as initializeFirestore$1, limit as limit$1, limitToLast as limitToLast$1, loadBundle as loadBundle$1, memoryEagerGarbageCollector as memoryEagerGarbageCollector$1, memoryLocalCache as memoryLocalCache$1, memoryLruGarbageCollector as memoryLruGarbageCollector$1, namedQuery as namedQuery$1, onSnapshot as onSnapshot$1, onSnapshotsInSync as onSnapshotsInSync$1, or as or$1, orderBy as orderBy$1, persistentLocalCache as persistentLocalCache$1, persistentMultipleTabManager as persistentMultipleTabManager$1, persistentSingleTabManager as persistentSingleTabManager$1, query as query$1, queryEqual as queryEqual$1, refEqual as refEqual$1, runTransaction as runTransaction$1, serverTimestamp as serverTimestamp$1, setDoc as setDoc$1, setIndexConfiguration as setIndexConfiguration$1, setLogLevel as setLogLevel$1, snapshotEqual as snapshotEqual$1, startAfter as startAfter$1, startAt as startAt$1, sum as sum$1, terminate as terminate$1, updateDoc as updateDoc$1, waitForPendingWrites as waitForPendingWrites$1, where as where$1, writeBatch as writeBatch$1 } from 'firebase/firestore';\nexport * from 'firebase/firestore';\nclass Firestore {\n constructor(firestore) {\n return firestore;\n }\n}\nconst FIRESTORE_PROVIDER_NAME = 'firestore';\nclass FirestoreInstances {\n constructor() {\n return ɵgetAllInstancesOf(FIRESTORE_PROVIDER_NAME);\n }\n}\nconst firestoreInstance$ = /*#__PURE__*/ /*#__PURE__*/timer(0, 300).pipe( /*#__PURE__*/concatMap(() => from(ɵgetAllInstancesOf(FIRESTORE_PROVIDER_NAME))), /*#__PURE__*/distinct());\nconst PROVIDED_FIRESTORE_INSTANCES = /*#__PURE__*/new InjectionToken('angularfire2.firestore-instances');\nfunction defaultFirestoreInstanceFactory(provided, defaultApp) {\n const defaultFirestore = ɵgetDefaultInstanceOf(FIRESTORE_PROVIDER_NAME, provided, defaultApp);\n return defaultFirestore && new Firestore(defaultFirestore);\n}\nfunction firestoreInstanceFactory(fn) {\n return (zone, injector) => {\n const firestore = zone.runOutsideAngular(() => fn(injector));\n return new Firestore(firestore);\n };\n}\nconst FIRESTORE_INSTANCES_PROVIDER = {\n provide: FirestoreInstances,\n deps: [[/*#__PURE__*/new Optional(), PROVIDED_FIRESTORE_INSTANCES]]\n};\nconst DEFAULT_FIRESTORE_INSTANCE_PROVIDER = {\n provide: Firestore,\n useFactory: defaultFirestoreInstanceFactory,\n deps: [[/*#__PURE__*/new Optional(), PROVIDED_FIRESTORE_INSTANCES], FirebaseApp]\n};\nlet FirestoreModule = /*#__PURE__*/(() => {\n class FirestoreModule {\n constructor() {\n registerVersion('angularfire', VERSION.full, 'fst');\n }\n static ɵfac = function FirestoreModule_Factory(t) {\n return new (t || FirestoreModule)();\n };\n static ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: FirestoreModule\n });\n static ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n providers: [DEFAULT_FIRESTORE_INSTANCE_PROVIDER, FIRESTORE_INSTANCES_PROVIDER]\n });\n }\n return FirestoreModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nfunction provideFirestore(fn, ...deps) {\n return {\n ngModule: FirestoreModule,\n providers: [{\n provide: PROVIDED_FIRESTORE_INSTANCES,\n useFactory: firestoreInstanceFactory(fn),\n multi: true,\n deps: [NgZone, Injector, ɵAngularFireSchedulers, FirebaseApps,\n // Firestore+Auth work better if Auth is loaded first\n [new Optional(), AuthInstances], [new Optional(), ɵAppCheckInstances], ...deps]\n }]\n };\n}\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nconst collectionChanges = /*#__PURE__*/ɵzoneWrap(collectionChanges$1, true);\nconst collectionSnapshots = /*#__PURE__*/ɵzoneWrap(collection$1, true);\nconst sortedChanges = /*#__PURE__*/ɵzoneWrap(sortedChanges$1, true);\nconst auditTrail = /*#__PURE__*/ɵzoneWrap(auditTrail$1, true);\nconst collectionData = /*#__PURE__*/ɵzoneWrap(collectionData$1, true);\nconst collectionCountSnap = /*#__PURE__*/ɵzoneWrap(collectionCountSnap$1, true);\nconst collectionCount = /*#__PURE__*/ɵzoneWrap(collectionCount$1, true);\nconst docSnapshots = /*#__PURE__*/ɵzoneWrap(doc$1, true);\nconst docData = /*#__PURE__*/ɵzoneWrap(docData$1, true);\nconst snapToData = /*#__PURE__*/ɵzoneWrap(snapToData$1, true);\nconst fromRef = /*#__PURE__*/ɵzoneWrap(fromRef$1, true);\n\n// DO NOT MODIFY, this file is autogenerated by tools/build.ts\nconst addDoc = /*#__PURE__*/ɵzoneWrap(addDoc$1, true);\nconst aggregateFieldEqual = /*#__PURE__*/ɵzoneWrap(aggregateFieldEqual$1, true);\nconst aggregateQuerySnapshotEqual = /*#__PURE__*/ɵzoneWrap(aggregateQuerySnapshotEqual$1, true);\nconst and = /*#__PURE__*/ɵzoneWrap(and$1, true);\nconst arrayRemove = /*#__PURE__*/ɵzoneWrap(arrayRemove$1, true);\nconst arrayUnion = /*#__PURE__*/ɵzoneWrap(arrayUnion$1, true);\nconst average = /*#__PURE__*/ɵzoneWrap(average$1, true);\nconst clearIndexedDbPersistence = /*#__PURE__*/ɵzoneWrap(clearIndexedDbPersistence$1, true);\nconst collection = /*#__PURE__*/ɵzoneWrap(collection$2, true);\nconst collectionGroup = /*#__PURE__*/ɵzoneWrap(collectionGroup$1, true);\nconst connectFirestoreEmulator = /*#__PURE__*/ɵzoneWrap(connectFirestoreEmulator$1, true);\nconst count = /*#__PURE__*/ɵzoneWrap(count$1, true);\nconst deleteAllPersistentCacheIndexes = /*#__PURE__*/ɵzoneWrap(deleteAllPersistentCacheIndexes$1, true);\nconst deleteDoc = /*#__PURE__*/ɵzoneWrap(deleteDoc$1, true);\nconst deleteField = /*#__PURE__*/ɵzoneWrap(deleteField$1, true);\nconst disableNetwork = /*#__PURE__*/ɵzoneWrap(disableNetwork$1, true);\nconst disablePersistentCacheIndexAutoCreation = /*#__PURE__*/ɵzoneWrap(disablePersistentCacheIndexAutoCreation$1, true);\nconst doc = /*#__PURE__*/ɵzoneWrap(doc$2, true);\nconst documentId = /*#__PURE__*/ɵzoneWrap(documentId$1, true);\nconst enableIndexedDbPersistence = /*#__PURE__*/ɵzoneWrap(enableIndexedDbPersistence$1, true);\nconst enableMultiTabIndexedDbPersistence = /*#__PURE__*/ɵzoneWrap(enableMultiTabIndexedDbPersistence$1, true);\nconst enableNetwork = /*#__PURE__*/ɵzoneWrap(enableNetwork$1, true);\nconst enablePersistentCacheIndexAutoCreation = /*#__PURE__*/ɵzoneWrap(enablePersistentCacheIndexAutoCreation$1, true);\nconst endAt = /*#__PURE__*/ɵzoneWrap(endAt$1, true);\nconst endBefore = /*#__PURE__*/ɵzoneWrap(endBefore$1, true);\nconst getAggregateFromServer = /*#__PURE__*/ɵzoneWrap(getAggregateFromServer$1, true);\nconst getCountFromServer = /*#__PURE__*/ɵzoneWrap(getCountFromServer$1, true);\nconst getDoc = /*#__PURE__*/ɵzoneWrap(getDoc$1, true);\nconst getDocFromCache = /*#__PURE__*/ɵzoneWrap(getDocFromCache$1, true);\nconst getDocFromServer = /*#__PURE__*/ɵzoneWrap(getDocFromServer$1, true);\nconst getDocs = /*#__PURE__*/ɵzoneWrap(getDocs$1, true);\nconst getDocsFromCache = /*#__PURE__*/ɵzoneWrap(getDocsFromCache$1, true);\nconst getDocsFromServer = /*#__PURE__*/ɵzoneWrap(getDocsFromServer$1, true);\nconst getFirestore = /*#__PURE__*/ɵzoneWrap(getFirestore$1, true);\nconst getPersistentCacheIndexManager = /*#__PURE__*/ɵzoneWrap(getPersistentCacheIndexManager$1, true);\nconst increment = /*#__PURE__*/ɵzoneWrap(increment$1, true);\nconst initializeFirestore = /*#__PURE__*/ɵzoneWrap(initializeFirestore$1, true);\nconst limit = /*#__PURE__*/ɵzoneWrap(limit$1, true);\nconst limitToLast = /*#__PURE__*/ɵzoneWrap(limitToLast$1, true);\nconst loadBundle = /*#__PURE__*/ɵzoneWrap(loadBundle$1, true);\nconst memoryEagerGarbageCollector = /*#__PURE__*/ɵzoneWrap(memoryEagerGarbageCollector$1, true);\nconst memoryLocalCache = /*#__PURE__*/ɵzoneWrap(memoryLocalCache$1, true);\nconst memoryLruGarbageCollector = /*#__PURE__*/ɵzoneWrap(memoryLruGarbageCollector$1, true);\nconst namedQuery = /*#__PURE__*/ɵzoneWrap(namedQuery$1, true);\nconst onSnapshot = /*#__PURE__*/ɵzoneWrap(onSnapshot$1, true);\nconst onSnapshotsInSync = /*#__PURE__*/ɵzoneWrap(onSnapshotsInSync$1, true);\nconst or = /*#__PURE__*/ɵzoneWrap(or$1, true);\nconst orderBy = /*#__PURE__*/ɵzoneWrap(orderBy$1, true);\nconst persistentLocalCache = /*#__PURE__*/ɵzoneWrap(persistentLocalCache$1, true);\nconst persistentMultipleTabManager = /*#__PURE__*/ɵzoneWrap(persistentMultipleTabManager$1, true);\nconst persistentSingleTabManager = /*#__PURE__*/ɵzoneWrap(persistentSingleTabManager$1, true);\nconst query = /*#__PURE__*/ɵzoneWrap(query$1, true);\nconst queryEqual = /*#__PURE__*/ɵzoneWrap(queryEqual$1, true);\nconst refEqual = /*#__PURE__*/ɵzoneWrap(refEqual$1, true);\nconst runTransaction = /*#__PURE__*/ɵzoneWrap(runTransaction$1, true);\nconst serverTimestamp = /*#__PURE__*/ɵzoneWrap(serverTimestamp$1, true);\nconst setDoc = /*#__PURE__*/ɵzoneWrap(setDoc$1, true);\nconst setIndexConfiguration = /*#__PURE__*/ɵzoneWrap(setIndexConfiguration$1, true);\nconst setLogLevel = /*#__PURE__*/ɵzoneWrap(setLogLevel$1, true);\nconst snapshotEqual = /*#__PURE__*/ɵzoneWrap(snapshotEqual$1, true);\nconst startAfter = /*#__PURE__*/ɵzoneWrap(startAfter$1, true);\nconst startAt = /*#__PURE__*/ɵzoneWrap(startAt$1, true);\nconst sum = /*#__PURE__*/ɵzoneWrap(sum$1, true);\nconst terminate = /*#__PURE__*/ɵzoneWrap(terminate$1, true);\nconst updateDoc = /*#__PURE__*/ɵzoneWrap(updateDoc$1, true);\nconst waitForPendingWrites = /*#__PURE__*/ɵzoneWrap(waitForPendingWrites$1, true);\nconst where = /*#__PURE__*/ɵzoneWrap(where$1, true);\nconst writeBatch = /*#__PURE__*/ɵzoneWrap(writeBatch$1, true);\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { Firestore, FirestoreInstances, FirestoreModule, addDoc, aggregateFieldEqual, aggregateQuerySnapshotEqual, and, arrayRemove, arrayUnion, auditTrail, average, clearIndexedDbPersistence, collection, collectionChanges, collectionCount, collectionCountSnap, collectionData, collectionGroup, collectionSnapshots, connectFirestoreEmulator, count, deleteAllPersistentCacheIndexes, deleteDoc, deleteField, disableNetwork, disablePersistentCacheIndexAutoCreation, doc, docData, docSnapshots, documentId, enableIndexedDbPersistence, enableMultiTabIndexedDbPersistence, enableNetwork, enablePersistentCacheIndexAutoCreation, endAt, endBefore, firestoreInstance$, fromRef, getAggregateFromServer, getCountFromServer, getDoc, getDocFromCache, getDocFromServer, getDocs, getDocsFromCache, getDocsFromServer, getFirestore, getPersistentCacheIndexManager, increment, initializeFirestore, limit, limitToLast, loadBundle, memoryEagerGarbageCollector, memoryLocalCache, memoryLruGarbageCollector, namedQuery, onSnapshot, onSnapshotsInSync, or, orderBy, persistentLocalCache, persistentMultipleTabManager, persistentSingleTabManager, provideFirestore, query, queryEqual, refEqual, runTransaction, serverTimestamp, setDoc, setIndexConfiguration, setLogLevel, snapToData, snapshotEqual, sortedChanges, startAfter, startAt, sum, terminate, updateDoc, waitForPendingWrites, where, writeBatch };\n","import { Injectable } from '@angular/core';\nimport { Environment } from '@galaxy/core';\nimport { Realtime } from './interface';\nimport { query, collection, Query, Firestore } from 'firebase/firestore';\n\n@Injectable()\nexport class FirestoreDB implements Realtime {\n newChangeQuery(firestore: Firestore, env: Environment, email: string): Query {\n const environment = env === Environment.PROD ? 'prod' : 'demo';\n // firebase requires this to be something, however we can subscribe to a value change of an unknown document.\n email = email || '(unknown)';\n\n return query(collection(firestore, `env/${environment}/user/${email}/notification`)) as Query;\n }\n}\n","import { CommonModule, TitleCasePipe } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { SentenceCasePipe } from './sentence-case/sentence-case.pipe';\nexport { SentenceCasePipe };\n\nimport { GalaxyAddressPipe } from './address/address.pipe';\nexport { GalaxyAddressPipe };\n\nimport { GlxyAsyncStatus, GalaxyAsyncStatusPipe } from './async-status/async-status.pipe';\nexport { GalaxyAsyncStatusPipe, GlxyAsyncStatus };\n\nimport { GalaxyCurrencyPipe } from './currency/currency.pipe';\nexport { GalaxyCurrencyPipe };\n\nimport { GalaxyDatePipe } from './date/date.pipe';\nexport { GalaxyDatePipe };\n\nimport { GalaxyOrdinalPipe } from './ordinal/ordinal.pipe';\nexport { GalaxyOrdinalPipe };\n\nimport { GalaxyITrustThisHtmlPipe } from './i-trust-this-html/i-trust-this-html.pipe';\nexport { GalaxyITrustThisHtmlPipe };\n\nimport { LinkyPipe } from './linky/linky.pipe';\nexport { LinkyPipe };\n\nimport { FormatStatPipe } from './format-stat/format-stat.pipe';\nexport { FormatStatPipe };\n\nimport { TruncateUrlPipe } from './truncate-url/truncate-url.pipe';\nexport { TruncateUrlPipe };\n@NgModule({\n providers: [TitleCasePipe],\n imports: [CommonModule, LinkyPipe, TruncateUrlPipe],\n declarations: [\n GalaxyDatePipe,\n GalaxyOrdinalPipe,\n GalaxyCurrencyPipe,\n GalaxyAddressPipe,\n GalaxyITrustThisHtmlPipe,\n GalaxyAsyncStatusPipe,\n SentenceCasePipe,\n ],\n exports: [\n GalaxyDatePipe,\n GalaxyOrdinalPipe,\n GalaxyCurrencyPipe,\n GalaxyAddressPipe,\n GalaxyITrustThisHtmlPipe,\n GalaxyAsyncStatusPipe,\n SentenceCasePipe,\n LinkyPipe,\n TruncateUrlPipe,\n ],\n})\nexport class GalaxyPipesModule {}\n","export const firebaseConfig = {\n apiKey: 'AIzaSyC1B6OwyBcbFX1vlF6pxPUunC_yoge4ujo',\n authDomain: 'notifications-realtime.firebaseapp.com',\n databaseURL: 'https://notifications-realtime.firebaseio.com',\n projectId: 'notifications-realtime',\n storageBucket: 'notifications-realtime.appspot.com',\n messagingSenderId: '120235207080',\n};\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { BadgeComponent } from './badge.component';\nexport { BadgeComponent };\n\nexport const MODULE_IMPORTS = [CommonModule];\n\nexport const MODULE_DECLARATIONS = [BadgeComponent];\n\n@NgModule({\n declarations: MODULE_DECLARATIONS,\n imports: MODULE_IMPORTS,\n exports: [BadgeComponent],\n})\nexport class GalaxyBadgeModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { AngularFireAuthModule } from '@angular/fire/compat/auth';\nimport { AngularFirestoreModule } from '@angular/fire/compat/firestore';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { RouterModule } from '@angular/router';\nimport { LexiconModule } from '@galaxy/lexicon';\nimport { GalaxyAlertModule } from '@vendasta/galaxy/alert';\nimport { GalaxyButtonLoadingIndicatorModule } from '@vendasta/galaxy/button-loading-indicator';\nimport { GalaxyEmptyStateModule } from '@vendasta/galaxy/empty-state';\nimport { CenterSelectorComponent } from './center-selector/center-selector.component';\nimport { AccordionComponent } from './core-components/accordion/accordion.component';\nimport { ButtonComponent } from './core-components/button/button.component';\nimport { IconButtonDirective } from './core-components/button/icon-button.directive';\nimport { CheckboxComponent } from './core-components/checkbox/checkbox.component';\nimport { ChipComponent } from './core-components/chip/chip.component';\nimport { InkBarComponent } from './core-components/ink-bar/ink-bar.component';\nimport { LoaderComponent } from './core-components/loader/loader.component';\nimport { ModalContentComponent } from './core-components/modal/modal-content.component';\nimport { ModalFooterComponent } from './core-components/modal/modal-footer.component';\nimport { ModalHeaderComponent } from './core-components/modal/modal-header.component';\nimport { ModalComponent } from './core-components/modal/modal.component';\nimport { ModalService } from './core-components/modal/modal.service';\nimport { PanelContentComponent } from './core-components/panel/panel-content.component';\nimport { PanelDescriptionComponent } from './core-components/panel/panel-description.component';\nimport { PanelHeaderComponent } from './core-components/panel/panel-header.component';\nimport { PanelTitleComponent } from './core-components/panel/panel-title.component';\nimport { PanelComponent } from './core-components/panel/panel.component';\nimport { SlideToggleComponent } from './core-components/slide-toggle/slide-toggle.component';\nimport { SnackbarComponent } from './core-components/snackbar/snackbar.component';\nimport { TabGroupComponent } from './core-components/tab/tab-group.component';\nimport { TabHeaderComponent } from './core-components/tab/tab-header.component';\nimport { TabComponent } from './core-components/tab/tab.component';\nimport { AtlasTooltipModule } from './core-components/tooltip/tooltip-module';\nimport { EmailVerificationComponent } from './email-verification/email-verification.component';\nimport { SearchBoxComponent } from './form-controls/search-box/search-box.component';\nimport { ItemComponent } from './item/item.component';\nimport { AtlasLanguageSelectorComponent } from './language-selector/language-selector.component';\nimport { LanguageListItemComponent } from './language-selector/modal/language-list/language-list-item/language-list-item.component';\nimport { LanguageListComponent } from './language-selector/modal/language-list/language-list.component';\nimport { AtlasLanguageSelectorModalComponent } from './language-selector/modal/language-selector-modal.component';\nimport * as baseTranslation from './languages/en_devel.json';\nimport { MenuItemComponent } from './menu-item/menu-item.component';\nimport { MenuComponent } from './menu/menu.component';\nimport { NavComponent } from './nav/nav.component';\nimport { FlyoutComponent } from './notifications/flyout/flyout.component';\nimport { NotificationComponent } from './notifications/notification/notification.component';\nimport { NotificationsComponent } from './notifications/notifications.component';\nimport { AccountsFormSettingsComponent } from './notifications/settings/accounts-form/accounts-form-settings.component';\nimport { AccountsFormComponent } from './notifications/settings/accounts-form/accounts-form.component';\nimport { SettingsFormComponent } from './notifications/settings/settings-form/settings-form.component';\nimport { SettingsComponent } from './notifications/settings/settings.component';\nimport { FirestoreDB } from './realtime/firestore';\nimport { TitleComponent } from './title/title.component';\nimport { AtlasTopBarComponent } from './top-bar/top-bar.component';\nimport { UserDropdownComponent } from './user-dropdown/user-dropdown.component';\nimport { AtlasUserLanguageModalComponent } from './user-language-modal/user-language-modal.component';\nimport { GalaxyPipesModule } from '@vendasta/galaxy/pipes';\nimport { getApp, initializeApp, provideFirebaseApp } from '@angular/fire/app';\nimport { firebaseConfig } from './realtime/config';\nimport { getFirestore, provideFirestore } from '@angular/fire/firestore';\nimport { UserSwitcherModalComponent } from './user-switcher-modal/user-switcher-modal.component';\nimport { GalaxyBadgeModule } from '@vendasta/galaxy/badge';\n\n@NgModule({\n declarations: [\n NotificationsComponent,\n NotificationComponent,\n FlyoutComponent,\n CenterSelectorComponent,\n MenuComponent,\n MenuItemComponent,\n TitleComponent,\n NavComponent,\n UserDropdownComponent,\n ItemComponent,\n AtlasTopBarComponent,\n ChipComponent,\n CheckboxComponent,\n LoaderComponent,\n IconButtonDirective,\n AtlasLanguageSelectorComponent,\n AtlasLanguageSelectorModalComponent,\n AtlasUserLanguageModalComponent,\n LanguageListComponent,\n LanguageListItemComponent,\n ButtonComponent,\n ModalComponent,\n ModalContentComponent,\n ModalFooterComponent,\n ModalHeaderComponent,\n SettingsComponent,\n SettingsFormComponent,\n AccountsFormComponent,\n AccountsFormSettingsComponent,\n PanelComponent,\n AccordionComponent,\n PanelHeaderComponent,\n PanelContentComponent,\n PanelTitleComponent,\n PanelDescriptionComponent,\n SnackbarComponent,\n TabComponent,\n TabGroupComponent,\n TabHeaderComponent,\n InkBarComponent,\n SlideToggleComponent,\n SearchBoxComponent,\n EmailVerificationComponent,\n UserSwitcherModalComponent,\n ],\n exports: [\n NavComponent,\n ItemComponent,\n MenuComponent,\n MenuItemComponent,\n TitleComponent,\n AtlasLanguageSelectorComponent,\n ModalComponent,\n ModalContentComponent,\n ModalFooterComponent,\n ModalHeaderComponent,\n SettingsComponent,\n ],\n providers: [FirestoreDB, ModalService],\n imports: [\n CommonModule,\n RouterModule,\n AtlasTooltipModule,\n AngularFirestoreModule,\n AngularFireAuthModule,\n FormsModule,\n GalaxyAlertModule,\n GalaxyEmptyStateModule,\n MatIconModule,\n GalaxyButtonLoadingIndicatorModule,\n MatProgressSpinnerModule,\n MatButtonModule,\n MatSnackBarModule,\n LexiconModule.forChild({\n componentName: 'common/atlas',\n baseTranslation,\n }),\n MatDialogModule,\n GalaxyPipesModule,\n GalaxyBadgeModule,\n provideFirebaseApp(() => initializeApp(firebaseConfig, 'notifications')),\n provideFirestore(() => getFirestore(getApp('notifications'))),\n ],\n})\nexport class AtlasModule {}\n","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { RouterModule } from '@angular/router';\nimport { LayoutModule } from '@angular/cdk/layout';\nimport { MatBadgeModule } from '@angular/material/badge';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatSidenavModule } from '@angular/material/sidenav';\nimport { MatToolbarModule } from '@angular/material/toolbar';\n\nimport { TranslateModule } from '@ngx-translate/core';\nimport { LexiconModule } from '@galaxy/lexicon';\nimport { VaBreadcrumbsModule } from '../va-breadcrumbs/va-breadcrumbs.module';\nimport { VaFilterModule } from '../va-filter/filter.module';\nimport { VaProductNavItemComponent } from './va-product-nav-item.component';\nimport { VaProductNavComponent, VaNavCustomSideContentDirective } from './va-product-nav.component';\nimport { MobileActionBarComponent } from './mobile-action-bar.component';\nimport { VaProductNavService } from './va-product-nav.service';\nimport baseTranslation from '../assets/i18n/en_devel.json';\nimport { WEBLATE_COMPONENT_NAME } from '../constants';\nimport { AtlasModule } from '@galaxy/atlas';\nimport { GalaxyBadgeModule } from '@vendasta/galaxy/badge';\n\nconst materialModules = [\n MatToolbarModule,\n MatIconModule,\n MatSidenavModule,\n MatButtonModule,\n MatMenuModule,\n MatRadioModule,\n MatBadgeModule,\n MatInputModule,\n MatChipsModule,\n];\n\n@NgModule({\n declarations: [\n VaProductNavComponent,\n VaProductNavItemComponent,\n VaNavCustomSideContentDirective,\n MobileActionBarComponent,\n ],\n imports: [\n RouterModule,\n CommonModule,\n FormsModule,\n LayoutModule,\n VaBreadcrumbsModule,\n VaFilterModule,\n TranslateModule,\n LexiconModule.forChild({\n componentName: WEBLATE_COMPONENT_NAME,\n baseTranslation: baseTranslation,\n }),\n materialModules,\n AtlasModule,\n GalaxyBadgeModule,\n ],\n exports: [VaProductNavComponent, VaProductNavItemComponent, VaNavCustomSideContentDirective],\n providers: [],\n})\nexport class VaProductNavModule {\n static forRoot(): ModuleWithProviders {\n return {\n ngModule: VaProductNavModule,\n providers: [VaProductNavService],\n };\n }\n}\n","import { NgModule } from '@angular/core';\nimport { MatIconModule } from '@angular/material/icon';\nimport { VaStatusBannerComponent } from './va-status-banner.component';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n declarations: [VaStatusBannerComponent],\n imports: [CommonModule, MatIconModule],\n exports: [VaStatusBannerComponent],\n})\nexport class VaStatusBannerModule {}\n","import { NgModule } from '@angular/core';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\nimport { CommonModule } from '@angular/common';\n\nimport { CardStencilComponent } from './card-stencil.component';\nimport { CardListStencilComponent } from './card-list-stencil.component';\nimport { SearchBarStencilComponent } from './search-bar-stencil.component';\nimport { ListStencilComponent } from './list-stencil.component';\n\n@NgModule({\n imports: [\n CommonModule,\n MatCardModule,\n MatIconModule,\n MatInputModule,\n MatSelectModule,\n MatExpansionModule,\n MatCheckboxModule,\n ],\n declarations: [CardStencilComponent, CardListStencilComponent, SearchBarStencilComponent, ListStencilComponent],\n exports: [CardStencilComponent, CardListStencilComponent, SearchBarStencilComponent, ListStencilComponent],\n})\nexport class VaStencilsModule {}\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { PopoverComponent } from './popover.component';\nexport { PopoverComponent } from './popover.component';\n\nimport { PopoverActionsDirective } from './directives/popover-actions.directive';\nexport { PopoverActionsDirective } from './directives/popover-actions.directive';\n\nimport { PopoverTitleDirective } from './directives/popover-title.directive';\nexport { PopoverTitleDirective } from './directives/popover-title.directive';\n\nimport { GalaxyPopoverDirective } from './directives/popover.directive';\nexport { GalaxyPopoverDirective } from './directives/popover.directive';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\n\nexport const MODULE_IMPORTS = [CommonModule, OverlayModule, MatIconModule, MatButtonModule];\nexport const MODULE_DECLARATIONS = [\n PopoverComponent,\n PopoverTitleDirective,\n PopoverActionsDirective,\n GalaxyPopoverDirective,\n];\n\n@NgModule({\n declarations: MODULE_DECLARATIONS,\n exports: MODULE_DECLARATIONS,\n imports: [MODULE_IMPORTS],\n})\nexport class GalaxyPopoverModule {}\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { GalaxyPopoverModule } from '@vendasta/galaxy/popover';\nimport { GalaxyTooltipDirective } from './directive/tooltip.directive';\nimport { TooltipComponent } from './tooltip.component';\n\nexport const MODULE_IMPORTS = [CommonModule, OverlayModule, GalaxyPopoverModule, TranslateModule];\n\nexport const MODULE_DECLARATIONS = [TooltipComponent, GalaxyTooltipDirective];\n\n@NgModule({\n declarations: MODULE_DECLARATIONS,\n imports: MODULE_IMPORTS,\n exports: [TooltipComponent, GalaxyTooltipDirective],\n})\nexport class GalaxyTooltipModule {}\n","import { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { VaIconModule } from '../../va-icon/icon.module';\nimport { VaButtonComponent } from './va-button.component';\nimport { GalaxyTooltipModule } from '@vendasta/galaxy/tooltip';\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule,\n VaIconModule,\n MatIconModule,\n MatTooltipModule,\n MatButtonModule,\n GalaxyTooltipModule,\n ],\n declarations: [VaButtonComponent],\n exports: [VaButtonComponent],\n})\nexport class VaButtonModule {}\n","import { CommonModule } from '@angular/common';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { NgModule } from '@angular/core';\nimport { VaCheckboxComponent } from './va-checkbox.component';\n\n@NgModule({\n imports: [CommonModule, MatCheckboxModule],\n declarations: [VaCheckboxComponent],\n exports: [VaCheckboxComponent],\n})\nexport class VaCheckboxModule {}\n","import { CommonModule } from '@angular/common';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { NgModule } from '@angular/core';\nimport { VaChipComponent } from './va-chip.component';\n\n@NgModule({\n imports: [CommonModule, MatChipsModule],\n declarations: [VaChipComponent],\n exports: [VaChipComponent],\n})\nexport class VaChipModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { VaExpandDirective } from './va-expand.directive';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [VaExpandDirective],\n exports: [VaExpandDirective],\n})\nexport class VaExpandModule {}\n","import { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { GalaxyTooltipModule } from '@vendasta/galaxy/tooltip';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { VaIconModule } from '../../va-icon/icon.module';\nimport { VaMenuComponent } from './va-menu.component';\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule,\n VaIconModule,\n MatIconModule,\n MatMenuModule,\n MatButtonModule,\n MatIconModule,\n GalaxyTooltipModule,\n ],\n declarations: [VaMenuComponent],\n exports: [VaMenuComponent],\n})\nexport class VaMenuModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { VaMultilineComponent } from './va-multiline.component';\n\n@NgModule({\n imports: [CommonModule, RouterModule],\n declarations: [VaMultilineComponent],\n exports: [VaMultilineComponent],\n})\nexport class VaMultilineModule {}\n","import { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { VaSwitchComponent } from './va-switch.component';\n\n@NgModule({\n imports: [CommonModule, MatSlideToggleModule],\n declarations: [VaSwitchComponent],\n exports: [VaSwitchComponent],\n})\nexport class VaSwitchModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatListModule } from '@angular/material/list';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { VaButtonModule } from '../wrappers/va-button/va-button.module';\nimport { VaCheckboxModule } from '../wrappers/va-checkbox/va-checkbox.module';\nimport { VaChipModule } from '../wrappers/va-chip/va-chip.module';\nimport { VaExpandModule } from '../wrappers/va-expand/va-expand.module';\nimport { VaMenuModule } from '../wrappers/va-menu/va-menu.module';\nimport { VaMultilineModule } from '../wrappers/va-multiline/va-multiline.module';\nimport { VaSwitchModule } from '../wrappers/va-switch/va-switch.module';\n\nimport { TranslateModule } from '@ngx-translate/core';\nimport { CellDirective } from './cells/cell.directive';\nimport { ColumnSelectorComponent } from './column-selector.component';\nimport { TableComponent } from './table.component';\nimport {\n AsObjectCellPipe,\n AsTextCellPipe,\n GetMaxWidthPipe,\n GetMinWidthPipe,\n GetSortingIndicatorClassPipe,\n IsSortedPropertyPipe,\n RowStatusCssPipe,\n TextDirectionPipe,\n} from './table.pipe';\n\n@NgModule({\n imports: [\n CommonModule,\n MatButtonModule,\n MatIconModule,\n MatProgressSpinnerModule,\n MatCheckboxModule,\n MatListModule,\n MatCardModule,\n VaButtonModule,\n VaCheckboxModule,\n VaExpandModule,\n VaMultilineModule,\n VaSwitchModule,\n VaMenuModule,\n VaChipModule,\n TranslateModule,\n ],\n declarations: [\n TableComponent,\n ColumnSelectorComponent,\n CellDirective,\n GetSortingIndicatorClassPipe,\n AsTextCellPipe,\n AsObjectCellPipe,\n GetMinWidthPipe,\n GetMaxWidthPipe,\n RowStatusCssPipe,\n TextDirectionPipe,\n IsSortedPropertyPipe,\n ],\n exports: [TableComponent, ColumnSelectorComponent],\n})\nexport class VaTableModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatRippleModule } from '@angular/material/core';\nimport { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { LexiconModule } from '@galaxy/lexicon';\nimport { TranslateModule } from '@ngx-translate/core';\nimport baseTranslation from '../assets/i18n/en_devel.json';\nimport { WEBLATE_COMPONENT_NAME } from '../constants';\nimport { UpgradeCTADialogModule } from '../get-pro-dialog/get-pro-dialog.module';\nimport { WelcomeComponent, WelcomeCustomActionDirective } from './welcome.component';\n\n@NgModule({\n imports: [\n CommonModule,\n TranslateModule,\n LexiconModule.forChild({\n componentName: WEBLATE_COMPONENT_NAME,\n baseTranslation: baseTranslation,\n }),\n MatButtonModule,\n MatIconModule,\n MatTabsModule,\n MatRadioModule,\n MatRippleModule,\n MatDialogModule,\n MatProgressSpinnerModule,\n UpgradeCTADialogModule,\n ],\n providers: [\n { provide: MatDialogRef, useValue: {} },\n { provide: MAT_DIALOG_DATA, useValue: [] },\n ],\n declarations: [WelcomeComponent, WelcomeCustomActionDirective],\n exports: [WelcomeComponent, WelcomeCustomActionDirective],\n})\nexport class WelcomeModule {}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { CommonPipesModule } from './common-pipes/common-pipes.module';\nimport { UpgradeCTADialogModule } from './get-pro-dialog/get-pro-dialog.module';\nimport { VaGoalTableModule } from './goal-table/goal-table.module';\nimport { ProjectMilestonesModule } from './project-milestones/project-milestones.module';\nimport { VaSafeHtmlModule } from './safe-html/safe-html.module';\nimport { VaSearchBoxModule } from './search-box/va-search-box.module';\nimport { VaActionMenuModule } from './va-action-menu/va-action-menu.module';\nimport { VaBadgeModule } from './va-badge/va-badge.module';\nimport { VaBreadcrumbsModule } from './va-breadcrumbs/va-breadcrumbs.module';\nimport { VaCardsModule } from './va-cards/va-cards.module';\nimport { VaFilterChipsModule } from './va-filter-chips/va-filter-chips.module';\nimport { VaFilterModule } from './va-filter/filter.module';\nimport { VaIconModule } from './va-icon/icon.module';\nimport { VaImageGalleryComponent } from './va-image-gallery';\nimport { VaItemsAndStatusModule } from './va-items-and-status/va-items-and-status.module';\nimport { VaListModule } from './va-list/va-list.module';\nimport { VaMaterialTableModule } from './va-mat-table/va-mat-table.module';\nimport { VaMultiSelectModule } from './va-multi-select/va-multi-select.module';\nimport { VaNavItemListModule } from './va-nav/nav-item-list/nav-item-list.module';\nimport { VaNavItemModule } from './va-nav/nav-item/nav-item.module';\nimport { VaNavModule } from './va-nav/nav.module';\nimport { VaNestedSelectorModule } from './va-nested-selector/va-nested-selector.module';\nimport { VaProductNavModule } from './va-product-nav/va-product-nav.module';\nimport { VaSearchSelectModule } from './va-search-select/va-search-select.module';\nimport { VaStatusBannerModule } from './va-status-banner/va-status-banner.module';\nimport { VaStencilsModule } from './va-stencils/stencils.module';\nimport { VaTableModule } from './va-table/table.module';\nimport { WelcomeModule } from './va-welcome/welcome.module';\nimport { VaButtonModule } from './wrappers/va-button/va-button.module';\nimport { VaCheckboxModule } from './wrappers/va-checkbox/va-checkbox.module';\nimport { VaChipModule } from './wrappers/va-chip/va-chip.module';\nimport { VaExpandModule } from './wrappers/va-expand/va-expand.module';\nimport { VaMenuModule } from './wrappers/va-menu/va-menu.module';\nimport { VaMultilineModule } from './wrappers/va-multiline/va-multiline.module';\nimport { VaSwitchModule } from './wrappers/va-switch/va-switch.module';\n\nconst UIKIT_MODULES = [\n VaCardsModule,\n CommonModule,\n VaSearchBoxModule,\n VaIconModule,\n VaTableModule,\n VaButtonModule,\n VaCheckboxModule,\n VaMenuModule,\n VaExpandModule,\n VaSwitchModule,\n VaMultilineModule,\n VaFilterModule,\n VaItemsAndStatusModule,\n VaMultiSelectModule,\n VaSearchSelectModule,\n VaChipModule,\n VaSafeHtmlModule,\n VaImageGalleryComponent,\n VaListModule,\n VaActionMenuModule,\n VaNestedSelectorModule,\n VaBreadcrumbsModule,\n VaNavModule,\n VaNavItemModule,\n VaNavItemListModule,\n VaProductNavModule,\n VaStencilsModule,\n CommonPipesModule,\n VaBadgeModule,\n UpgradeCTADialogModule,\n WelcomeModule,\n VaMaterialTableModule,\n VaFilterChipsModule,\n VaStatusBannerModule,\n ProjectMilestonesModule,\n VaGoalTableModule,\n];\n\n@NgModule({\n imports: UIKIT_MODULES,\n exports: UIKIT_MODULES,\n})\nexport class UIKitModule {}\n","import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html',\n styleUrls: ['./app.component.scss'],\n})\nexport class AppComponent {}\n","\n \n
\n","import { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nconst routes: Routes = [\n // TODO: what should we do for an unknown route?\n {\n path: '',\n redirectTo: 'account-selector',\n pathMatch: 'full',\n },\n {\n path: 'verify',\n loadChildren: () => import('./email-verification/email-verification.module').then((m) => m.EmailVerificationModule),\n },\n {\n path: 'account-selector',\n loadChildren: () => import('./account-selector/account-selector.module').then((m) => m.AccountSelectorModule),\n },\n {\n path: ':partnerId/account-selector',\n loadChildren: () => import('./account-selector/account-selector.module').then((m) => m.AccountSelectorModule),\n },\n];\n\n@NgModule({\n imports: [RouterModule.forRoot(routes, {})],\n exports: [RouterModule],\n})\nexport class RoutingModule {}\n","import * as i1 from '@angular/cdk/a11y';\nimport { SelectionModel } from '@angular/cdk/collections';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, forwardRef, EventEmitter, booleanAttribute, Directive, Optional, Inject, ContentChildren, Input, Output, Component, ViewEncapsulation, ChangeDetectionStrategy, Attribute, ViewChild, NgModule } from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { MatRipple, MatPseudoCheckbox, MatCommonModule, MatRippleModule } from '@angular/material/core';\n\n/**\n * Injection token that can be used to configure the\n * default options for all button toggles within an app.\n */\nconst _c0 = [\"button\"];\nconst _c1 = [\"*\"];\nfunction MatButtonToggle_Conditional_3_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"mat-pseudo-checkbox\", 6);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"disabled\", ctx_r1.disabled);\n }\n}\nfunction MatButtonToggle_Conditional_4_Template(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵelement(0, \"mat-pseudo-checkbox\", 6);\n }\n if (rf & 2) {\n const ctx_r1 = i0.ɵɵnextContext();\n i0.ɵɵproperty(\"disabled\", ctx_r1.disabled);\n }\n}\nconst MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS = /*#__PURE__*/new InjectionToken('MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS', {\n providedIn: 'root',\n factory: MAT_BUTTON_TOGGLE_GROUP_DEFAULT_OPTIONS_FACTORY\n});\nfunction MAT_BUTTON_TOGGLE_GROUP_DEFAULT_OPTIONS_FACTORY() {\n return {\n hideSingleSelectionIndicator: false,\n hideMultipleSelectionIndicator: false\n };\n}\n/**\n * Injection token that can be used to reference instances of `MatButtonToggleGroup`.\n * It serves as alternative token to the actual `MatButtonToggleGroup` class which\n * could cause unnecessary retention of the class and its component metadata.\n */\nconst MAT_BUTTON_TOGGLE_GROUP = /*#__PURE__*/new InjectionToken('MatButtonToggleGroup');\n/**\n * Provider Expression that allows mat-button-toggle-group to register as a ControlValueAccessor.\n * This allows it to support [(ngModel)].\n * @docs-private\n */\nconst MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: /*#__PURE__*/forwardRef(() => MatButtonToggleGroup),\n multi: true\n};\n// Counter used to generate unique IDs.\nlet uniqueIdCounter = 0;\n/** Change event object emitted by button toggle. */\nclass MatButtonToggleChange {\n constructor( /** The button toggle that emits the event. */\n source, /** The value assigned to the button toggle. */\n value) {\n this.source = source;\n this.value = value;\n }\n}\n/** Exclusive selection button toggle group that behaves like a radio-button group. */\nlet MatButtonToggleGroup = /*#__PURE__*/(() => {\n class MatButtonToggleGroup {\n /** `name` attribute for the underlying `input` element. */\n get name() {\n return this._name;\n }\n set name(value) {\n this._name = value;\n this._markButtonsForCheck();\n }\n /** Value of the toggle group. */\n get value() {\n const selected = this._selectionModel ? this._selectionModel.selected : [];\n if (this.multiple) {\n return selected.map(toggle => toggle.value);\n }\n return selected[0] ? selected[0].value : undefined;\n }\n set value(newValue) {\n this._setSelectionByValue(newValue);\n this.valueChange.emit(this.value);\n }\n /** Selected button toggles in the group. */\n get selected() {\n const selected = this._selectionModel ? this._selectionModel.selected : [];\n return this.multiple ? selected : selected[0] || null;\n }\n /** Whether multiple button toggles can be selected. */\n get multiple() {\n return this._multiple;\n }\n set multiple(value) {\n this._multiple = value;\n this._markButtonsForCheck();\n }\n /** Whether multiple button toggle group is disabled. */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = value;\n this._markButtonsForCheck();\n }\n /** Whether checkmark indicator for single-selection button toggle groups is hidden. */\n get hideSingleSelectionIndicator() {\n return this._hideSingleSelectionIndicator;\n }\n set hideSingleSelectionIndicator(value) {\n this._hideSingleSelectionIndicator = value;\n this._markButtonsForCheck();\n }\n /** Whether checkmark indicator for multiple-selection button toggle groups is hidden. */\n get hideMultipleSelectionIndicator() {\n return this._hideMultipleSelectionIndicator;\n }\n set hideMultipleSelectionIndicator(value) {\n this._hideMultipleSelectionIndicator = value;\n this._markButtonsForCheck();\n }\n constructor(_changeDetector, defaultOptions) {\n this._changeDetector = _changeDetector;\n this._multiple = false;\n this._disabled = false;\n /**\n * The method to be called in order to update ngModel.\n * Now `ngModel` binding is not supported in multiple selection mode.\n */\n this._controlValueAccessorChangeFn = () => {};\n /** onTouch function registered via registerOnTouch (ControlValueAccessor). */\n this._onTouched = () => {};\n this._name = `mat-button-toggle-group-${uniqueIdCounter++}`;\n /**\n * Event that emits whenever the value of the group changes.\n * Used to facilitate two-way data binding.\n * @docs-private\n */\n this.valueChange = new EventEmitter();\n /** Event emitted when the group's value changes. */\n this.change = new EventEmitter();\n this.appearance = defaultOptions && defaultOptions.appearance ? defaultOptions.appearance : 'standard';\n this.hideSingleSelectionIndicator = defaultOptions?.hideSingleSelectionIndicator ?? false;\n this.hideMultipleSelectionIndicator = defaultOptions?.hideMultipleSelectionIndicator ?? false;\n }\n ngOnInit() {\n this._selectionModel = new SelectionModel(this.multiple, undefined, false);\n }\n ngAfterContentInit() {\n this._selectionModel.select(...this._buttonToggles.filter(toggle => toggle.checked));\n }\n /**\n * Sets the model value. Implemented as part of ControlValueAccessor.\n * @param value Value to be set to the model.\n */\n writeValue(value) {\n this.value = value;\n this._changeDetector.markForCheck();\n }\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn) {\n this._controlValueAccessorChangeFn = fn;\n }\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn) {\n this._onTouched = fn;\n }\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled) {\n this.disabled = isDisabled;\n }\n /** Dispatch change event with current selection and group value. */\n _emitChangeEvent(toggle) {\n const event = new MatButtonToggleChange(toggle, this.value);\n this._rawValue = event.value;\n this._controlValueAccessorChangeFn(event.value);\n this.change.emit(event);\n }\n /**\n * Syncs a button toggle's selected state with the model value.\n * @param toggle Toggle to be synced.\n * @param select Whether the toggle should be selected.\n * @param isUserInput Whether the change was a result of a user interaction.\n * @param deferEvents Whether to defer emitting the change events.\n */\n _syncButtonToggle(toggle, select, isUserInput = false, deferEvents = false) {\n // Deselect the currently-selected toggle, if we're in single-selection\n // mode and the button being toggled isn't selected at the moment.\n if (!this.multiple && this.selected && !toggle.checked) {\n this.selected.checked = false;\n }\n if (this._selectionModel) {\n if (select) {\n this._selectionModel.select(toggle);\n } else {\n this._selectionModel.deselect(toggle);\n }\n } else {\n deferEvents = true;\n }\n // We need to defer in some cases in order to avoid \"changed after checked errors\", however\n // the side-effect is that we may end up updating the model value out of sequence in others\n // The `deferEvents` flag allows us to decide whether to do it on a case-by-case basis.\n if (deferEvents) {\n Promise.resolve().then(() => this._updateModelValue(toggle, isUserInput));\n } else {\n this._updateModelValue(toggle, isUserInput);\n }\n }\n /** Checks whether a button toggle is selected. */\n _isSelected(toggle) {\n return this._selectionModel && this._selectionModel.isSelected(toggle);\n }\n /** Determines whether a button toggle should be checked on init. */\n _isPrechecked(toggle) {\n if (typeof this._rawValue === 'undefined') {\n return false;\n }\n if (this.multiple && Array.isArray(this._rawValue)) {\n return this._rawValue.some(value => toggle.value != null && value === toggle.value);\n }\n return toggle.value === this._rawValue;\n }\n /** Updates the selection state of the toggles in the group based on a value. */\n _setSelectionByValue(value) {\n this._rawValue = value;\n if (!this._buttonToggles) {\n return;\n }\n if (this.multiple && value) {\n if (!Array.isArray(value) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Value must be an array in multiple-selection mode.');\n }\n this._clearSelection();\n value.forEach(currentValue => this._selectValue(currentValue));\n } else {\n this._clearSelection();\n this._selectValue(value);\n }\n }\n /** Clears the selected toggles. */\n _clearSelection() {\n this._selectionModel.clear();\n this._buttonToggles.forEach(toggle => toggle.checked = false);\n }\n /** Selects a value if there's a toggle that corresponds to it. */\n _selectValue(value) {\n const correspondingOption = this._buttonToggles.find(toggle => {\n return toggle.value != null && toggle.value === value;\n });\n if (correspondingOption) {\n correspondingOption.checked = true;\n this._selectionModel.select(correspondingOption);\n }\n }\n /** Syncs up the group's value with the model and emits the change event. */\n _updateModelValue(toggle, isUserInput) {\n // Only emit the change event for user input.\n if (isUserInput) {\n this._emitChangeEvent(toggle);\n }\n // Note: we emit this one no matter whether it was a user interaction, because\n // it is used by Angular to sync up the two-way data binding.\n this.valueChange.emit(this.value);\n }\n /** Marks all of the child button toggles to be checked. */\n _markButtonsForCheck() {\n this._buttonToggles?.forEach(toggle => toggle._markForCheck());\n }\n static {\n this.ɵfac = function MatButtonToggleGroup_Factory(t) {\n return new (t || MatButtonToggleGroup)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS, 8));\n };\n }\n static {\n this.ɵdir = /* @__PURE__ */i0.ɵɵdefineDirective({\n type: MatButtonToggleGroup,\n selectors: [[\"mat-button-toggle-group\"]],\n contentQueries: function MatButtonToggleGroup_ContentQueries(rf, ctx, dirIndex) {\n if (rf & 1) {\n i0.ɵɵcontentQuery(dirIndex, MatButtonToggle, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._buttonToggles = _t);\n }\n },\n hostAttrs: [\"role\", \"group\", 1, \"mat-button-toggle-group\"],\n hostVars: 5,\n hostBindings: function MatButtonToggleGroup_HostBindings(rf, ctx) {\n if (rf & 2) {\n i0.ɵɵattribute(\"aria-disabled\", ctx.disabled);\n i0.ɵɵclassProp(\"mat-button-toggle-vertical\", ctx.vertical)(\"mat-button-toggle-group-appearance-standard\", ctx.appearance === \"standard\");\n }\n },\n inputs: {\n appearance: \"appearance\",\n name: \"name\",\n vertical: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"vertical\", \"vertical\", booleanAttribute],\n value: \"value\",\n multiple: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"multiple\", \"multiple\", booleanAttribute],\n disabled: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"disabled\", \"disabled\", booleanAttribute],\n hideSingleSelectionIndicator: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"hideSingleSelectionIndicator\", \"hideSingleSelectionIndicator\", booleanAttribute],\n hideMultipleSelectionIndicator: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"hideMultipleSelectionIndicator\", \"hideMultipleSelectionIndicator\", booleanAttribute]\n },\n outputs: {\n valueChange: \"valueChange\",\n change: \"change\"\n },\n exportAs: [\"matButtonToggleGroup\"],\n standalone: true,\n features: [i0.ɵɵProvidersFeature([MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR, {\n provide: MAT_BUTTON_TOGGLE_GROUP,\n useExisting: MatButtonToggleGroup\n }]), i0.ɵɵInputTransformsFeature]\n });\n }\n }\n return MatButtonToggleGroup;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n/** Single button inside of a toggle group. */\nlet MatButtonToggle = /*#__PURE__*/(() => {\n class MatButtonToggle {\n /** Unique ID for the underlying `button` element. */\n get buttonId() {\n return `${this.id}-button`;\n }\n /** The appearance style of the button. */\n get appearance() {\n return this.buttonToggleGroup ? this.buttonToggleGroup.appearance : this._appearance;\n }\n set appearance(value) {\n this._appearance = value;\n }\n /** Whether the button is checked. */\n get checked() {\n return this.buttonToggleGroup ? this.buttonToggleGroup._isSelected(this) : this._checked;\n }\n set checked(value) {\n if (value !== this._checked) {\n this._checked = value;\n if (this.buttonToggleGroup) {\n this.buttonToggleGroup._syncButtonToggle(this, this._checked);\n }\n this._changeDetectorRef.markForCheck();\n }\n }\n /** Whether the button is disabled. */\n get disabled() {\n return this._disabled || this.buttonToggleGroup && this.buttonToggleGroup.disabled;\n }\n set disabled(value) {\n this._disabled = value;\n }\n constructor(toggleGroup, _changeDetectorRef, _elementRef, _focusMonitor, defaultTabIndex, defaultOptions) {\n this._changeDetectorRef = _changeDetectorRef;\n this._elementRef = _elementRef;\n this._focusMonitor = _focusMonitor;\n this._checked = false;\n /**\n * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element\n */\n this.ariaLabelledby = null;\n this._disabled = false;\n /** Event emitted when the group value changes. */\n this.change = new EventEmitter();\n const parsedTabIndex = Number(defaultTabIndex);\n this.tabIndex = parsedTabIndex || parsedTabIndex === 0 ? parsedTabIndex : null;\n this.buttonToggleGroup = toggleGroup;\n this.appearance = defaultOptions && defaultOptions.appearance ? defaultOptions.appearance : 'standard';\n }\n ngOnInit() {\n const group = this.buttonToggleGroup;\n this.id = this.id || `mat-button-toggle-${uniqueIdCounter++}`;\n if (group) {\n if (group._isPrechecked(this)) {\n this.checked = true;\n } else if (group._isSelected(this) !== this._checked) {\n // As side effect of the circular dependency between the toggle group and the button,\n // we may end up in a state where the button is supposed to be checked on init, but it\n // isn't, because the checked value was assigned too early. This can happen when Ivy\n // assigns the static input value before the `ngOnInit` has run.\n group._syncButtonToggle(this, this._checked);\n }\n }\n }\n ngAfterViewInit() {\n this._focusMonitor.monitor(this._elementRef, true);\n }\n ngOnDestroy() {\n const group = this.buttonToggleGroup;\n this._focusMonitor.stopMonitoring(this._elementRef);\n // Remove the toggle from the selection once it's destroyed. Needs to happen\n // on the next tick in order to avoid \"changed after checked\" errors.\n if (group && group._isSelected(this)) {\n group._syncButtonToggle(this, false, false, true);\n }\n }\n /** Focuses the button. */\n focus(options) {\n this._buttonElement.nativeElement.focus(options);\n }\n /** Checks the button toggle due to an interaction with the underlying native button. */\n _onButtonClick() {\n const newChecked = this._isSingleSelector() ? true : !this._checked;\n if (newChecked !== this._checked) {\n this._checked = newChecked;\n if (this.buttonToggleGroup) {\n this.buttonToggleGroup._syncButtonToggle(this, this._checked, true);\n this.buttonToggleGroup._onTouched();\n }\n }\n // Emit a change event when it's the single selector\n this.change.emit(new MatButtonToggleChange(this, this.value));\n }\n /**\n * Marks the button toggle as needing checking for change detection.\n * This method is exposed because the parent button toggle group will directly\n * update bound properties of the radio button.\n */\n _markForCheck() {\n // When the group value changes, the button will not be notified.\n // Use `markForCheck` to explicit update button toggle's status.\n this._changeDetectorRef.markForCheck();\n }\n /** Gets the name that should be assigned to the inner DOM node. */\n _getButtonName() {\n if (this._isSingleSelector()) {\n return this.buttonToggleGroup.name;\n }\n return this.name || null;\n }\n /** Whether the toggle is in single selection mode. */\n _isSingleSelector() {\n return this.buttonToggleGroup && !this.buttonToggleGroup.multiple;\n }\n static {\n this.ɵfac = function MatButtonToggle_Factory(t) {\n return new (t || MatButtonToggle)(i0.ɵɵdirectiveInject(MAT_BUTTON_TOGGLE_GROUP, 8), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1.FocusMonitor), i0.ɵɵinjectAttribute('tabindex'), i0.ɵɵdirectiveInject(MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS, 8));\n };\n }\n static {\n this.ɵcmp = /* @__PURE__ */i0.ɵɵdefineComponent({\n type: MatButtonToggle,\n selectors: [[\"mat-button-toggle\"]],\n viewQuery: function MatButtonToggle_Query(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵviewQuery(_c0, 5);\n }\n if (rf & 2) {\n let _t;\n i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx._buttonElement = _t.first);\n }\n },\n hostAttrs: [\"role\", \"presentation\", 1, \"mat-button-toggle\"],\n hostVars: 12,\n hostBindings: function MatButtonToggle_HostBindings(rf, ctx) {\n if (rf & 1) {\n i0.ɵɵlistener(\"focus\", function MatButtonToggle_focus_HostBindingHandler() {\n return ctx.focus();\n });\n }\n if (rf & 2) {\n i0.ɵɵattribute(\"aria-label\", null)(\"aria-labelledby\", null)(\"id\", ctx.id)(\"name\", null);\n i0.ɵɵclassProp(\"mat-button-toggle-standalone\", !ctx.buttonToggleGroup)(\"mat-button-toggle-checked\", ctx.checked)(\"mat-button-toggle-disabled\", ctx.disabled)(\"mat-button-toggle-appearance-standard\", ctx.appearance === \"standard\");\n }\n },\n inputs: {\n ariaLabel: [i0.ɵɵInputFlags.None, \"aria-label\", \"ariaLabel\"],\n ariaLabelledby: [i0.ɵɵInputFlags.None, \"aria-labelledby\", \"ariaLabelledby\"],\n id: \"id\",\n name: \"name\",\n value: \"value\",\n tabIndex: \"tabIndex\",\n disableRipple: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"disableRipple\", \"disableRipple\", booleanAttribute],\n appearance: \"appearance\",\n checked: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"checked\", \"checked\", booleanAttribute],\n disabled: [i0.ɵɵInputFlags.HasDecoratorInputTransform, \"disabled\", \"disabled\", booleanAttribute]\n },\n outputs: {\n change: \"change\"\n },\n exportAs: [\"matButtonToggle\"],\n standalone: true,\n features: [i0.ɵɵInputTransformsFeature, i0.ɵɵStandaloneFeature],\n ngContentSelectors: _c1,\n decls: 8,\n vars: 11,\n consts: [[\"button\", \"\"], [\"type\", \"button\", 1, \"mat-button-toggle-button\", \"mat-focus-indicator\", 3, \"click\", \"id\", \"disabled\"], [1, \"mat-button-toggle-label-content\"], [\"state\", \"checked\", \"aria-hidden\", \"true\", \"appearance\", \"minimal\", 1, \"mat-mdc-option-pseudo-checkbox\"], [1, \"mat-button-toggle-focus-overlay\"], [\"matRipple\", \"\", 1, \"mat-button-toggle-ripple\", 3, \"matRippleTrigger\", \"matRippleDisabled\"], [\"state\", \"checked\", \"aria-hidden\", \"true\", \"appearance\", \"minimal\", 1, \"mat-mdc-option-pseudo-checkbox\", 3, \"disabled\"]],\n template: function MatButtonToggle_Template(rf, ctx) {\n if (rf & 1) {\n const _r1 = i0.ɵɵgetCurrentView();\n i0.ɵɵprojectionDef();\n i0.ɵɵelementStart(0, \"button\", 1, 0);\n i0.ɵɵlistener(\"click\", function MatButtonToggle_Template_button_click_0_listener() {\n i0.ɵɵrestoreView(_r1);\n return i0.ɵɵresetView(ctx._onButtonClick());\n });\n i0.ɵɵelementStart(2, \"span\", 2);\n i0.ɵɵtemplate(3, MatButtonToggle_Conditional_3_Template, 1, 1, \"mat-pseudo-checkbox\", 3)(4, MatButtonToggle_Conditional_4_Template, 1, 1, \"mat-pseudo-checkbox\", 3);\n i0.ɵɵprojection(5);\n i0.ɵɵelementEnd()();\n i0.ɵɵelement(6, \"span\", 4)(7, \"span\", 5);\n }\n if (rf & 2) {\n const button_r3 = i0.ɵɵreference(1);\n i0.ɵɵproperty(\"id\", ctx.buttonId)(\"disabled\", ctx.disabled || null);\n i0.ɵɵattribute(\"tabindex\", ctx.disabled ? -1 : ctx.tabIndex)(\"aria-pressed\", ctx.checked)(\"name\", ctx._getButtonName())(\"aria-label\", ctx.ariaLabel)(\"aria-labelledby\", ctx.ariaLabelledby);\n i0.ɵɵadvance(3);\n i0.ɵɵconditional(3, ctx.buttonToggleGroup && ctx.checked && !ctx.buttonToggleGroup.multiple && !ctx.buttonToggleGroup.hideSingleSelectionIndicator ? 3 : -1);\n i0.ɵɵadvance();\n i0.ɵɵconditional(4, ctx.buttonToggleGroup && ctx.checked && ctx.buttonToggleGroup.multiple && !ctx.buttonToggleGroup.hideMultipleSelectionIndicator ? 4 : -1);\n i0.ɵɵadvance(3);\n i0.ɵɵproperty(\"matRippleTrigger\", button_r3)(\"matRippleDisabled\", ctx.disableRipple || ctx.disabled);\n }\n },\n dependencies: [MatRipple, MatPseudoCheckbox],\n styles: [\".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);transform:translateZ(0);border-radius:var(--mat-legacy-button-toggle-shape)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}.cdk-high-contrast-active .mat-button-toggle-standalone,.cdk-high-contrast-active .mat-button-toggle-group{outline:solid 1px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-standard-button-toggle-shape);border:solid 1px var(--mat-standard-button-toggle-divider-color)}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-selected-checkmark-color: var( --mat-standard-button-toggle-selected-state-text-color )}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}.cdk-high-contrast-active .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.cdk-high-contrast-active .mat-button-toggle-group-appearance-standard{outline:0}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-legacy-button-toggle-text-color);font-family:var(--mat-legacy-button-toggle-label-text-font);font-size:var(--mat-legacy-button-toggle-label-text-size);line-height:var(--mat-legacy-button-toggle-label-text-line-height);font-weight:var(--mat-legacy-button-toggle-label-text-weight);letter-spacing:var(--mat-legacy-button-toggle-label-text-tracking);--mat-minimal-pseudo-checkbox-selected-checkmark-color: var( --mat-legacy-button-toggle-selected-state-text-color )}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-legacy-button-toggle-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle .mat-pseudo-checkbox{margin-right:12px}[dir=rtl] .mat-button-toggle .mat-pseudo-checkbox{margin-right:0;margin-left:12px}.mat-button-toggle-checked{color:var(--mat-legacy-button-toggle-selected-state-text-color);background-color:var(--mat-legacy-button-toggle-selected-state-background-color)}.mat-button-toggle-disabled{color:var(--mat-legacy-button-toggle-disabled-state-text-color);background-color:var(--mat-legacy-button-toggle-disabled-state-background-color);--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var( --mat-legacy-button-toggle-disabled-state-text-color )}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-legacy-button-toggle-disabled-selected-state-background-color)}.mat-button-toggle-appearance-standard{color:var(--mat-standard-button-toggle-text-color);background-color:var(--mat-standard-button-toggle-background-color);font-family:var(--mat-standard-button-toggle-label-text-font);font-size:var(--mat-standard-button-toggle-label-text-size);line-height:var(--mat-standard-button-toggle-label-text-line-height);font-weight:var(--mat-standard-button-toggle-label-text-weight);letter-spacing:var(--mat-standard-button-toggle-label-text-tracking)}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-standard-button-toggle-divider-color)}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-standard-button-toggle-divider-color)}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-standard-button-toggle-divider-color)}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-standard-button-toggle-selected-state-text-color);background-color:var(--mat-standard-button-toggle-selected-state-background-color)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-standard-button-toggle-disabled-state-text-color);background-color:var(--mat-standard-button-toggle-disabled-state-background-color)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: var( --mat-standard-button-toggle-disabled-selected-state-text-color )}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-standard-button-toggle-disabled-selected-state-text-color);background-color:var(--mat-standard-button-toggle-disabled-selected-state-background-color)}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-standard-button-toggle-state-layer-color)}.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{opacity:var(--mat-standard-button-toggle-hover-state-layer-opacity)}.mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:var(--mat-standard-button-toggle-focus-state-layer-opacity)}@media(hover: none){.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-legacy-button-toggle-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-standard-button-toggle-height)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-legacy-button-toggle-state-layer-color)}.cdk-high-contrast-active .mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.cdk-high-contrast-active .mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.cdk-high-contrast-active .mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}\"],\n encapsulation: 2,\n changeDetection: 0\n });\n }\n }\n return MatButtonToggle;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\nlet MatButtonToggleModule = /*#__PURE__*/(() => {\n class MatButtonToggleModule {\n static {\n this.ɵfac = function MatButtonToggleModule_Factory(t) {\n return new (t || MatButtonToggleModule)();\n };\n }\n static {\n this.ɵmod = /* @__PURE__ */i0.ɵɵdefineNgModule({\n type: MatButtonToggleModule\n });\n }\n static {\n this.ɵinj = /* @__PURE__ */i0.ɵɵdefineInjector({\n imports: [MatCommonModule, MatRippleModule, MatButtonToggle, MatCommonModule]\n });\n }\n }\n return MatButtonToggleModule;\n})();\n/*#__PURE__*/(() => {\n (typeof ngDevMode === \"undefined\" || ngDevMode) && void 0;\n})();\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS, MAT_BUTTON_TOGGLE_GROUP, MAT_BUTTON_TOGGLE_GROUP_DEFAULT_OPTIONS_FACTORY, MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR, MatButtonToggle, MatButtonToggleChange, MatButtonToggleGroup, MatButtonToggleModule };\n","import { EnvironmentProviders, Provider } from '@angular/core';\nimport { MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS } from '@angular/material/button-toggle';\nimport { MAT_CARD_CONFIG } from '@angular/material/card';\nimport { MAT_CHECKBOX_DEFAULT_OPTIONS } from '@angular/material/checkbox';\nimport { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';\nimport { MAT_RADIO_DEFAULT_OPTIONS } from '@angular/material/radio';\nimport { MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS } from '@angular/material/slide-toggle';\nimport { MAT_TABS_CONFIG } from '@angular/material/tabs';\nimport { MAT_TOOLTIP_DEFAULT_OPTIONS } from '@angular/material/tooltip';\n\nexport const GalaxyDefaultProviderOverrides: (Provider | EnvironmentProviders)[] = [\n {\n // Vendasta design settled on \"outlined\" as the default appearance for cards,\n // but the angular default is \"raised\".\n provide: MAT_CARD_CONFIG,\n useValue: { appearance: 'outlined' },\n },\n {\n // We want our checkboxes to be primary colored by default.\n provide: MAT_CHECKBOX_DEFAULT_OPTIONS,\n useValue: { color: 'primary' },\n },\n {\n // We want our radio buttons to be primary colored by default.\n provide: MAT_RADIO_DEFAULT_OPTIONS,\n useValue: { color: 'primary' },\n },\n {\n // We want our slide toggles to be primary colored by default.\n provide: MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS,\n useValue: { color: 'primary' },\n },\n {\n // The Mat tabs animation can look very chunky/stuttery when switching tabs if the tabs\n // have a lot of content. Disabling the animation makes the UI feel faster. The default\n // animationDuration is '500ms'\n //\n // In the Material 15 update, tabs stretch by default. This is a problem\n // as it can look weird when there are only a few tabs which take up the whole\n // width of the tab group. In Material 16, we will be able to override this behavior.\n provide: MAT_TABS_CONFIG,\n useValue: {\n animationDuration: '0ms',\n stretchTabs: false,\n },\n },\n {\n // Mat tooltip recently changed its default behavior and now allows you to\n // interact with the tooltip by default. This causes the tooltip to get in the\n // way of elements under it (like butons) and can be a hassle.\n // Disabling this new behavior makes the tooltip behave like it did before.\n provide: MAT_TOOLTIP_DEFAULT_OPTIONS,\n useValue: { disableTooltipInteractivity: true },\n },\n {\n // Vendasta design settled on \"outline\" as the default appearance for form fields,\n // but the angular default is \"fill\". This rule overrides the default to be \"outline\".\n provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,\n useValue: { appearance: 'outline' },\n },\n {\n // Don't show indicator ✓ on button toggles by default\n provide: MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS,\n useValue: { hideMultipleSelectionIndicator: true, hideSingleSelectionIndicator: true },\n },\n];\n","import { NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\nimport { UIKitModule } from '@vendasta/uikit';\n\nimport { CommonModule } from '@angular/common';\nimport { AppComponent } from './app.component';\nimport { CommonModule as VLCCommonModule } from './common';\nimport { RoutingModule } from './routing.module';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { DEFAULT_LANGUAGE, LexiconModule } from '@galaxy/lexicon';\nimport { TranslateModule } from '@ngx-translate/core';\nimport { GalaxyI18NModule, getLocale } from '@vendasta/galaxy/i18n';\nimport { GalaxyDefaultProviderOverrides } from '@vendasta/galaxy/provider-default-overrides';\nimport { RECAPTCHA_V3_SITE_KEY, RecaptchaV3Module } from 'ng-recaptcha';\nimport baseTranslations from '../assets/i18n/en_devel.json';\nimport { WEBLATE_COMPONENT_NAME } from './common/constants';\n\n@NgModule({\n declarations: [AppComponent],\n imports: [\n RoutingModule,\n UIKitModule,\n CommonModule,\n BrowserModule,\n VLCCommonModule,\n BrowserAnimationsModule,\n RecaptchaV3Module,\n MatButtonModule,\n TranslateModule,\n GalaxyI18NModule,\n LexiconModule.forRoot({\n componentName: WEBLATE_COMPONENT_NAME,\n baseTranslation: baseTranslations,\n }),\n ],\n providers: [\n ...GalaxyDefaultProviderOverrides,\n {\n provide: DEFAULT_LANGUAGE,\n useFactory: () => getLocale(),\n },\n {\n provide: RECAPTCHA_V3_SITE_KEY,\n useValue: '6LfDbqghAAAAAEjSBFRh_4TBj836XmCDEHgymWyl',\n },\n ],\n bootstrap: [AppComponent],\n})\nexport class AppModule {}\n","export const environment: string = globalThis.environment || 'prod';\nexport const deployment: string = globalThis.deployment || null;\nexport const devServer: boolean = globalThis.devServer || false;\n","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { devServer } from './globals';\n\nif (!devServer) {\n enableProdMode();\n}\n\nplatformBrowserDynamic()\n .bootstrapModule(AppModule)\n .catch((err) => console.log(err));\n"],"mappings":"+vEAAA,IAAAA,GAAAC,GAAA,CAAAC,GAAAC,KAAA,EAOC,SAAUC,EAAQC,EAAS,CAC1B,OAAOH,IAAY,UAAY,OAAOC,GAAW,IAAcA,GAAO,QAAUE,EAAQ,EAAI,OAAO,QAAW,YAAc,OAAO,IAAM,OAAOA,CAAO,EAAID,EAAO,OAASC,EAAQ,CACrL,GAAGH,GAAM,UAAY,CACnB,aAEA,IAAII,EACJ,SAASC,GAAQ,CACf,OAAOD,E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MAAOA,CAAS,yCAATA,EAAS,sBAATA,EAASC,UAAA,CAFRC,EAAY,CAAA,CAAA,2BAXb,CACT,GAAGC,GACH,CACEC,QAASC,GACTC,WAAYA,IAAMC,GAAS,GAE7B,CACEH,QAASI,GACTC,SAAU,2CACX,EACFC,QAAA,CAzBCC,GACAC,GACAC,EACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,GAAcC,QAAQ,CACpBC,cAAeC,GACfC,gBAAiBC,GAClB,CAAC,CAAA,CAAA,EAeA,IAAO1B,EAAP2B,SAAO3B,CAAS,GAAA,EClDf,IAAM4B,IAAsBC,WAAWD,aAAe,OAChDE,IAAqBD,WAAWC,YAAc,KAC9CC,GAAqBF,WAAWE,WAAa,GCIrDC,IACHC,OAGFC,GAAA,EACGC,gBAAgBC,EAAS,EACzBC,MAAOC,GAAQC,QAAQC,IAAIF,CAAG,CAAC","names":["require_moment","__commonJSMin","exports","module","global","factory","hookCallback","hooks","setHookCallback","callback","isArray","input","isObject","hasOwnProp","a","b","isObjectEmpty","obj","k","isUndefined","isNumber","isDate","map","arr","fn","res","i","arrLen","extend","createUTC","format","locale","strict","createLocalOrUTC","defaultParsingFlags","getParsingFlags","m","some","fun","t","len","isValid","flags","parsedParts","isNowValid","createInvalid","momentProperties","updateInProgress","copyConfig","to","from","prop","val","momentPropertiesLen","Moment","config","isMoment","warn","msg","deprecate","firstTime","args","arg","key","argLen","deprecations","deprecateSimple","name","isFunction","set","mergeConfigs","parentConfig","childConfig","Locale","keys","defaultCalendar","calendar","mom","now","output","zeroFill","number","targetLength","forceSign","absNumber","zerosToFill","sign","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","token","padded","ordinal","func","removeFormattingTokens","makeFormatFunction","array","length","formatMoment","expandFormat","replaceLongDateFormatTokens","defaultLongDateFormat","longDateFormat","formatUpper","tok","defaultInvalidDate","invalidDate","defaultOrdinal","defaultDayOfMonthOrdinalParse","defaultRelativeTime","relativeTime","withoutSuffix","string","isFuture","pastFuture","diff","aliases","normalizeUnits","units","normalizeObjectUnits","inputObject","normalizedInput","normalizedProp","priorities","getPrioritizedUnits","unitsObj","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchTimestamp","matchWord","match1to2NoLeadingZero","match1to2HasZero","regexes","addRegexToken","regex","strictRegex","isStrict","localeData","getParseRegexForToken","unescapeFormat","s","regexEscape","matched","p1","p2","p3","p4","absFloor","toInt","argumentForCoercion","coercedNumber","value","tokens","addParseToken","tokenLen","addWeekParseToken","addTimeToArrayFromToken","isLeapYear","year","YEAR","MONTH","DATE","HOUR","MINUTE","SECOND","MILLISECOND","WEEK","WEEKDAY","y","daysInYear","getSetYear","makeGetSet","getIsLeapYear","unit","keepTime","set$1","get","d","isUTC","month","date","stringGet","stringSet","prioritized","prioritizedLen","mod","n","x","indexOf","o","daysInMonth","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","localeMonths","localeMonthsShort","handleStrictParse","monthName","ii","llc","localeMonthsParse","setMonth","getSetMonth","getDaysInMonth","monthsShortRegex","computeMonthsParse","monthsRegex","cmpLenRev","shortPieces","longPieces","mixedPieces","shortP","longP","createDate","h","M","ms","createUTCDate","firstWeekOffset","dow","doy","fwd","fwdlw","dayOfYearFromWeeks","week","weekday","localWeekday","weekOffset","dayOfYear","resYear","resDayOfYear","weekOfYear","resWeek","weeksInYear","weekOffsetNext","localeWeek","defaultLocaleWeek","localeFirstDayOfWeek","localeFirstDayOfYear","getSetWeek","getSetISOWeek","parseWeekday","parseIsoWeekday","shiftWeekdays","ws","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","localeWeekdays","weekdays","localeWeekdaysShort","localeWeekdaysMin","handleStrictParse$1","weekdayName","localeWeekdaysParse","getSetDayOfWeek","day","getSetLocaleDayOfWeek","getSetISODayOfWeek","weekdaysRegex","computeWeekdaysParse","weekdaysShortRegex","weekdaysMinRegex","minPieces","minp","shortp","longp","hFormat","kFormat","meridiem","lowercase","matchMeridiem","kInput","pos","pos1","pos2","localeIsPM","defaultLocaleMeridiemParse","getSetHour","localeMeridiem","hours","minutes","isLower","baseConfig","locales","localeFamilies","globalLocale","commonPrefix","arr1","arr2","minl","normalizeLocale","chooseLocale","names","j","next","split","loadLocale","isLocaleNameSane","oldLocale","aliasedRequire","__require","getSetGlobalLocale","values","data","getLocale","defineLocale","updateLocale","tmpLocale","listLocales","checkOverflow","overflow","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","rfc2822","obsOffsets","configFromISO","l","match","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","extractFromRFC2822Strings","yearStr","monthStr","dayStr","hourStr","minuteStr","secondStr","result","untruncateYear","preprocessRFC2822","checkWeekday","weekdayStr","parsedInput","weekdayProvided","weekdayActual","calculateOffset","obsOffset","militaryOffset","numOffset","hm","configFromRFC2822","parsedArray","configFromString","defaults","c","currentDateArray","nowValue","configFromArray","currentDate","expectedWeekday","yearToUse","dayOfYearFromWeekInfo","w","weekYear","temp","weekdayOverflow","curWeek","createLocal","skipped","stringLength","totalParsedInputLength","era","meridiemFixWrap","hour","isPm","configFromStringAndArray","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","configFromObject","dayOrDate","createFromConfig","prepareConfig","configFromInput","prototypeMin","other","prototypeMax","pickBy","moments","min","max","ordering","isDurationValid","unitHasDecimal","orderLen","isValid$1","createInvalid$1","createDuration","Duration","duration","years","quarters","months","weeks","days","seconds","milliseconds","isDuration","absRound","compareArrays","array1","array2","dontConvert","lengthDiff","diffs","offset","separator","offsetFromString","chunkOffset","matcher","matches","chunk","parts","cloneWithOffset","model","getDateOffset","getSetOffset","keepLocalTime","keepMinutes","localAdjust","addSubtract","getSetZone","setOffsetToUTC","setOffsetToLocal","setOffsetToParsedOffset","tZone","hasAlignedHourOffset","isDaylightSavingTime","isDaylightSavingTimeShifted","isLocal","isUtcOffset","isUtc","aspNetRegex","isoRegex","ret","diffRes","parseIso","momentsDifference","inp","positiveMomentsDifference","base","createAdder","direction","period","dur","tmp","isAdding","updateOffset","add","subtract","isString","isMomentInput","isNumberOrStringArray","isMomentInputObject","objectTest","propertyTest","properties","property","propertyLen","arrayTest","dataTypeTest","item","isCalendarSpec","getCalendarFormat","myMoment","calendar$1","time","formats","sod","clone","isAfter","localInput","isBefore","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","asFloat","that","zoneDelta","monthDiff","wholeMonthDiff","anchor","anchor2","adjust","toString","toISOString","keepOffset","utc","inspect","zone","prefix","datetime","suffix","inputString","fromNow","toNow","newLocaleData","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","startOf","startOfDate","endOf","valueOf","unix","toDate","toArray","toObject","toJSON","isValid$2","parsingFlags","invalidAt","creationData","matchEraAbbr","matchEraName","matchEraNarrow","matchEraYearOrdinal","localeEras","eras","localeErasParse","eraName","abbr","narrow","localeErasConvertYear","dir","getEraName","getEraNarrow","getEraAbbr","getEraYear","erasNameRegex","computeErasParse","erasAbbrRegex","erasNarrowRegex","abbrPieces","namePieces","narrowPieces","erasName","erasAbbr","erasNarrow","addWeekYearFormatToken","getter","getSetWeekYear","getSetWeekYearHelper","getSetISOWeekYear","getISOWeeksInYear","getISOWeeksInISOWeekYear","getWeeksInYear","weekInfo","getWeeksInWeekYear","weeksTarget","setWeekAll","dayOfYearData","getSetQuarter","getSetDayOfMonth","getSetDayOfYear","getSetMinute","getSetSecond","getSetMillisecond","parseMs","getZoneAbbr","getZoneName","proto","createUnix","createInZone","preParsePostFormat","proto$1","get$1","index","field","setter","listMonthsImpl","out","listWeekdaysImpl","localeSorted","shift","listMonths","listMonthsShort","listWeekdays","listWeekdaysShort","listWeekdaysMin","mathAbs","abs","addSubtract$1","add$1","subtract$1","absCeil","bubble","monthsFromDays","monthsToDays","daysToMonths","as","makeAs","alias","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","valueOf$1","clone$1","get$2","makeGetter","round","thresholds","substituteTimeAgo","relativeTime$1","posNegDuration","getSetRelativeTimeRounding","roundingFunction","getSetRelativeTimeThreshold","threshold","limit","humanize","argWithSuffix","argThresholds","withSuffix","th","abs$1","toISOString$1","total","totalSign","ymSign","daysSign","hmsSign","proto$2","invalidTimingValue","exp","RuntimeError","negativeStepValue","negativeDelayValue","invalidStyleParams","varName","invalidParamValue","invalidNodeType","nodeType","invalidCssUnitValue","userProvidedProperty","value","invalidTrigger","invalidDefinition","invalidState","metadataName","missingSubs","invalidStyleValue","invalidParallelAnimation","prop","firstStart","firstEnd","secondStart","secondEnd","RuntimeError","invalidKeyframes","invalidOffset","keyframeOffsetsOutOfOrder","keyframesMissingOffsets","invalidStagger","invalidQuery","selector","invalidExpression","expr","invalidTransitionAlias","alias","triggerBuildFailed","name","errors","RuntimeError","animationFailed","registerFailed","missingOrDestroyedAnimation","createAnimationFailed","missingPlayer","id","missingTrigger","phase","missingEvent","unsupportedTriggerEvent","unregisteredTrigger","triggerTransitionsFailed","transitionFailed","name","errors","RuntimeError","optimizeGroupPlayer","players","NoopAnimationPlayer","AnimationGroupPlayer","normalizeKeyframes$1","normalizer","keyframes","preStyles","postStyles","errors","normalizedKeyframes","previousOffset","previousKeyframe","kf","offset","isSameOffset","normalizedKeyframe","val","prop","normalizedProp","normalizedValue","ɵPRE_STYLE","AUTO_STYLE","animationFailed","listenOnPlayer","player","eventName","event","callback","copyAnimationEvent","e","phaseName","totalTime","disabled","makeAnimationEvent","data","element","triggerName","fromState","toState","getOrSetDefaultValue","map","key","defaultValue","value","parseTimelineCommand","command","separatorPos","id","action","documentElement","getParentElement","parent","containsVendorPrefix","_CACHED_BODY","_IS_WEBKIT","validateStyleProperty","getBodyNode","result","getBodyNode","containsElement","elm1","elm2","getParentElement","invokeQuery","element","selector","multi","elem","NoopAnimationDriver","_NoopAnimationDriver","prop","validateStyleProperty","_element","_selector","elm1","elm2","containsElement","element","getParentElement","selector","multi","invokeQuery","defaultValue","keyframes","duration","delay","easing","previousPlayers","scrubberAccessRequested","NoopAnimationPlayer","t","ɵɵdefineInjectable","_AnimationDriver","AnimationDriver","AnimationStyleNormalizer","ONE_SECOND","SUBSTITUTION_EXPR_START","SUBSTITUTION_EXPR_END","ENTER_CLASSNAME","LEAVE_CLASSNAME","NG_TRIGGER_CLASSNAME","NG_TRIGGER_SELECTOR","NG_ANIMATING_CLASSNAME","NG_ANIMATING_SELECTOR","resolveTimingValue","value","matches","_convertTimeValueToMS","unit","resolveTiming","timings","errors","allowNegativeValues","parseTimeExpression","exp","regex","duration","delay","easing","invalidTimingValue","delayMatch","easingVal","containsErrors","startIndex","negativeStepValue","negativeDelayValue","normalizeKeyframes","keyframes","kf","setStyles","element","styles","formerStyles","val","prop","camelProp","dashCaseToCamelCase","eraseStyles","_","normalizeAnimationEntry","steps","sequence","validateStyleParams","value","options","errors","params","matches","extractStyleParams","varName","invalidStyleParams","PARAM_REGEX","SUBSTITUTION_EXPR_START","SUBSTITUTION_EXPR_END","match","interpolateParams","original","str","localVal","invalidParamValue","DASH_CASE_REGEXP","input","m","allowPreviousPlayerStylesMerge","duration","delay","balancePreviousStylesIntoKeyframes","element","keyframes","previousStyles","startingKeyframe","missingStyleProps","val","prop","i","kf","computeStyle","visitDslNode","visitor","node","context","AnimationMetadataType","invalidNodeType","DIMENSIONAL_PROP_SET","WebAnimationsStyleNormalizer","AnimationStyleNormalizer","propertyName","errors","dashCaseToCamelCase","userProvidedProperty","normalizedProperty","value","unit","strVal","valAndSuffixMatch","invalidCssUnitValue","ANY_STATE","parseTransitionExpr","transitionValue","errors","expressions","str","parseInnerTransitionStr","eventStr","result","parseAnimationAlias","match","invalidExpression","fromState","separator","toState","makeLambdaFromStates","isFullAnyStateExpr","alias","invalidTransitionAlias","TRUE_BOOLEAN_VALUES","FALSE_BOOLEAN_VALUES","lhs","rhs","LHS_MATCH_BOOLEAN","RHS_MATCH_BOOLEAN","lhsMatch","rhsMatch","SELF_TOKEN","SELF_TOKEN_REGEX","buildAnimationAst","driver","metadata","warnings","AnimationAstBuilderVisitor","ROOT_SELECTOR","_driver","context","AnimationAstBuilderContext","visitDslNode","normalizeAnimationEntry","queryCount","depCount","states","transitions","invalidTrigger","def","AnimationMetadataType","stateDef","name","n","transition","invalidDefinition","styleAst","astParams","missingSubs","params","style","value","extractStyleParams","sub","invalidState","animation","matchers","normalizeAnimationOptions","s","currentTime","furthestTime","steps","step","innerAst","timingAst","constructTimingAst","styleMetadata","isEmpty","newStyleData","_styleAst","ast","styles","metadataStyles","styleTuple","AUTO_STYLE","invalidStyleValue","containsDynamicStyles","collectedEasing","styleData","SUBSTITUTION_EXPR_START","timings","endTime","startTime","tuple","prop","collectedStyles","collectedEntry","updateCollectedStyle","invalidParallelAnimation","validateStyleParams","invalidKeyframes","MAX_KEYFRAME_OFFSET","totalKeyframesWithOffsets","offsets","offsetsOutOfOrder","keyframesOutOfRange","previousOffset","keyframes","offsetVal","consumeOffset","offset","invalidOffset","keyframeOffsetsOutOfOrder","length","generatedOffset","keyframesMissingOffsets","limit","currentAnimateTimings","animateDuration","kf","i","durationUpToThisFrame","parentSelector","options","selector","includeSelf","normalizeSelector","getOrSetDefaultValue","invalidStagger","resolveTiming","hasAmpersand","token","NG_TRIGGER_SELECTOR","NG_ANIMATING_SELECTOR","normalizeParams","obj","__spreadValues","duration","makeTimingAst","strValue","v","delay","easing","createTimelineInstruction","element","preStyleProps","postStyleProps","subTimeline","ElementInstructionMap","instructions","existingInstructions","ONE_FRAME_IN_MILLISECONDS","ENTER_TOKEN","ENTER_TOKEN_REGEX","LEAVE_TOKEN","LEAVE_TOKEN_REGEX","buildAnimationTimelines","rootElement","enterClassName","leaveClassName","startingStyles","finalStyles","subInstructions","AnimationTimelineBuilderVisitor","AnimationTimelineContext","resolveTimingValue","timelines","timeline","lastRootTimeline","elementInstructions","innerContext","animationsRefsOptions","animationRefOptions","animationDelay","animationDelayValue","interpolateParams","instruction","instructionTimings","subContextCount","ctx","DEFAULT_NOOP_PREVIOUS_NODE","innerTimelines","timingValue","innerTimeline","elms","sameElementTimeline","parentContext","tl","maxTime","startingTime","_AnimationTimelineContext","_enterClassName","_leaveClassName","initialTimeline","TimelineBuilder","skipIfExists","newOptions","optionsToUpdate","newParams","paramsToUpdate","oldParams","newTime","target","updatedTimings","builder","SubTimelineBuilder","time","originalSelector","optional","results","multi","elements","invalidQuery","_TimelineBuilder","_elementTimelineStylesLookup","hasPreStyleStep","input","flattenStyles","val","properties","details1","details0","finalKeyframes","keyframe","finalKeyframe","ɵPRE_STYLE","preProps","postProps","kf0","kf1","_stretchStartingKeyframe","newKeyframes","totalTime","startingGap","newFirstKeyframe","oldFirstKeyframe","roundOffset","oldOffset","timeAtKeyframe","decimalPoints","mult","allStyles","allProperties","createTransitionInstruction","triggerName","isRemovalTransition","fromStyles","toStyles","queriedElements","EMPTY_OBJECT","AnimationTransitionFactory","_triggerName","_stateStyles","currentState","nextState","oneOrMoreTransitionsMatch","stateName","styler","currentOptions","nextOptions","skipAstBuild","transitionAnimationParams","currentAnimationParams","currentStateStyles","nextAnimationParams","nextStateStyles","preStyleMap","postStyleMap","isRemoval","animationOptions","applyParamDefaults","elm","oneOrMoreTransitionsMatch","matchFns","currentState","nextState","element","params","fn","applyParamDefaults","userParams","defaults","result","__spreadValues","key","value","AnimationStateStyles","styles","defaultParams","normalizer","errors","finalStyles","combinedParams","val","prop","interpolateParams","normalizedProp","buildTrigger","name","ast","AnimationTrigger","_normalizer","balanceProperties","AnimationTransitionFactory","createFallbackTransition","f","triggerName","states","matchers","fromState","toState","animation","AnimationMetadataType","transition","stateMap","key1","key2","EMPTY_INSTRUCTION_MAP","ElementInstructionMap","TimelineAnimationEngine","bodyNode","_driver","id","metadata","warnings","buildAnimationAst","registerFailed","i","preStyles","postStyles","keyframes","normalizeKeyframes$1","options","instructions","autoStylesMap","buildAnimationTimelines","ENTER_CLASSNAME","LEAVE_CLASSNAME","inst","getOrSetDefaultValue","missingOrDestroyedAnimation","createAnimationFailed","AUTO_STYLE","players","player","optimizeGroupPlayer","index","missingPlayer","eventName","callback","baseEvent","makeAnimationEvent","listenOnPlayer","command","args","QUEUED_CLASSNAME","QUEUED_SELECTOR","DISABLED_CLASSNAME","DISABLED_SELECTOR","STAR_CLASSNAME","STAR_SELECTOR","EMPTY_PLAYER_ARRAY","NULL_REMOVAL_STATE","NULL_REMOVED_QUERIED_STATE","REMOVAL_FLAG","StateValue","input","namespaceId","isObj","normalizeTriggerValue","_a","__objRest","newParams","oldParams","VOID_VALUE","DEFAULT_STATE_VALUE","AnimationTransitionNamespace","hostElement","_engine","addClass","phase","missingTrigger","missingEvent","isTriggerEventValid","unsupportedTriggerEvent","listeners","data","triggersWithStates","NG_TRIGGER_CLASSNAME","trigger","unregisteredTrigger","defaultToFallback","TransitionAnimationPlayer","objEquals","fromStyles","toStyles","eraseStyles","setStyles","playersOnElement","isFallbackTransition","removeClass","entry","elementPlayers","rootElement","context","elements","NG_TRIGGER_SELECTOR","elm","namespaces","ns","destroyAfterComplete","triggerStates","previousTriggersValues","state","elementStates","visitedTriggers","listener","engine","containsPotentialParentTransition","currentPlayers","parent","removalFlag","microtaskId","a","b","d0","d1","p","TransitionAnimationEngine","driver","scheduler","namespaceList","namespacesByHostElement","found","ancestor","ancestorNs","stateValue","isElementNode","insertBefore","details","hostNS","hasAnimation","subTimelines","enterClassName","leaveClassName","skipBuildAst","containerElement","NG_ANIMATING_SELECTOR","resolve","node","cleanupFns","quietFns","triggerTransitionsFailed","skippedPlayers","skippedPlayersMap","queuedInstructions","queriedElements","allPreStyleElements","allPostStyleElements","disabledElementsSet","nodesThatAreDisabled","allTriggerElements","enterNodeMap","buildRootMap","enterNodeMapIds","nodes","root","className","allLeaveNodes","mergedLeaveNodes","leaveNodesWithoutAnimations","leaveNodeMapIds","leaveNodeMap","allPlayers","erroneousTransitions","previousValue","nodeIsOrphaned","instruction","timelines","tl","tuple","stringMap","setVal","_","transitionFailed","allPreviousPlayersMap","animationElementMap","prevPlayer","replaceNodes","replacePostStylesAsPre","postStylesMap","cloakAndComputeStyles","preStylesMap","ɵPRE_STYLE","post","pre","rootPlayers","subPlayers","NO_PARENT_ANIMATION_ELEMENT_DETECTED","parentWithAnimation","parentsToAdd","detectedParent","innerPlayer","parentPlayers","playersForElement","queriedPlayerResults","queriedInnerElements","j","queriedPlayers","activePlayers","removeNodesAfterAnimationDone","isQueriedElement","toStateValue","queriedElementPlayers","isRemovalAnimation","targetNameSpaceId","targetTriggerName","timelineInstruction","realPlayer","allQueriedPlayers","allConsumedElements","allSubElements","allNewPlayers","NoopAnimationPlayer","previousPlayers","flattenGroupPlayers","pp","wrappedPlayer","deleteOrUnsetInMap","NG_ANIMATING_CLASSNAME","callbacks","totalTime","phaseName","map","currentValues","cloakElement","oldValue","valuesMap","elementPropsMap","defaultStyle","cloakVals","failedElements","props","roots","rootMap","NULL_NODE","nodeSet","localRootMap","getRoot","finalPlayers","_flattenGroupPlayersRecur","AnimationGroupPlayer","k1","k2","postEntry","preEntry","AnimationEngine","doc","componentId","cacheKey","triggerBuildFailed","disable","property","action","parseTimelineCommand","eventPhase","cb","packageNonAnimatableStyles","startStyles","endStyles","filterNonAnimatableStyles","SpecialCasedStyles","_SpecialCasedStyles","_element","_startStyles","_endStyles","initialStyles","isNonAnimatableStyle","WebAnimationsPlayer","_specialStyles","onFinish","kfs","frame","computeStyle","methods","WebAnimationsDriver","_selector","elm1","elm2","containsElement","getParentElement","selector","multi","invokeQuery","defaultValue","duration","delay","easing","fill","playerOptions","previousStyles","previousWebAnimationPlayers","allowPreviousPlayerStylesMerge","_keyframes","normalizeKeyframes","balancePreviousStylesIntoKeyframes","specialStyles","ANIMATION_PREFIX","DISABLE_ANIMATIONS_FLAG","BaseAnimationRenderer","namespaceId","delegate","engine","_onDestroy","node","name","namespace","value","parent","newChild","refChild","isMove","oldChild","isHostElement","selectorOrNode","preserveContent","el","style","flags","target","eventName","callback","element","AnimationRenderer","factory","onDestroy","resolveElementFromTarget","phase","parseTriggerCallbackName","event","countId","triggerName","dotIndex","trigger","AnimationRendererFactory","_zone","parentNode","hostElement","type","EMPTY_NAMESPACE_ID","cache","renderer","onRendererDestroy","componentId","registerTrigger","count","fn","data","animationCallbacksBuffer","tuple","InjectableAnimationEngine","_InjectableAnimationEngine","AnimationEngine","doc","driver","normalizer","inject","ChangeDetectionScheduler","t","ɵɵinject","DOCUMENT","AnimationDriver","AnimationStyleNormalizer","ɵɵdefineInjectable","instantiateDefaultStyleNormalizer","WebAnimationsStyleNormalizer","instantiateRendererFactory","renderer","engine","zone","AnimationRendererFactory","SHARED_ANIMATION_PROVIDERS","RendererFactory2","DomRendererFactory2","NgZone","BROWSER_ANIMATIONS_PROVIDERS","WebAnimationsDriver","ANIMATION_MODULE_TYPE","BROWSER_NOOP_ANIMATIONS_PROVIDERS","NoopAnimationDriver","BrowserAnimationsModule","_BrowserAnimationsModule","config","ɵɵdefineNgModule","ɵɵdefineInjector","BrowserModule","metadata_min_json_default","withMetadataArgument","func","_arguments","args","metadata_min_json_default","_typeof","obj","_defineProperties","target","props","i","descriptor","_createClass","Constructor","protoProps","staticProps","_classCallCheck","instance","_inherits","subClass","superClass","_setPrototypeOf","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","Super","_getPrototypeOf","result","NewTarget","_possibleConstructorReturn","self","call","_assertThisInitialized","_wrapNativeSuper","Class","_cache","_isNativeFunction","Wrapper","_construct","Parent","args","a","fn","o","p","ParseError","_Error","_super","code","_this","MIN_LENGTH_FOR_NSN","MAX_LENGTH_FOR_NSN","MAX_LENGTH_COUNTRY_CODE","VALID_DIGITS","DASHES","SLASHES","DOTS","WHITESPACE","BRACKETS","TILDES","VALID_PUNCTUATION","PLUS_CHARS","semver_compare_default","a","b","pa","pb","i","na","nb","objectConstructor","isObject","object","_typeof","obj","_classCallCheck","instance","Constructor","_defineProperties","target","props","i","descriptor","_createClass","protoProps","staticProps","V3","V4","DEFAULT_EXT_PREFIX","CALLING_CODE_REG_EXP","Metadata","metadata","_classCallCheck","validateMetadata","setVersion","_createClass","_","countryCode","country","callingCode","countryCodes","NumberingPlan","_type","NumberingPlan","metadata","globalMetadataObject","_classCallCheck","setVersion","_createClass","_this","formats","_","Format","_type2","getType","Type","DEFAULT_EXT_PREFIX","format","FIRST_GROUP_ONLY_PREFIX_PATTERN","type","types","validateMetadata","isObject","typeOf","_typeof","getCountryCallingCode","country","metadata","Metadata","setVersion","metadata","version","semver_compare_default","V3","V4","RFC3966_EXTN_PREFIX","getExtensionDigitsPattern","maxLength","VALID_DIGITS","createExtensionPattern","purpose","extLimitAfterExplicitLabel","extLimitAfterLikelyLabel","extLimitAfterAmbiguousChar","extLimitWhenNotSure","possibleSeparatorsBetweenNumberAndExtLabel","possibleCharsAfterExtLabel","optionalExtnSuffix","explicitExtLabels","ambiguousExtLabels","ambiguousSeparator","possibleSeparatorsNumberExtLabelNoComma","autoDiallingAndExtLabelsFound","rfcExtn","explicitExtn","ambiguousExtn","americanStyleExtnWithSuffix","autoDiallingExtn","onlyCommasExtn","MIN_LENGTH_PHONE_NUMBER_PATTERN","VALID_DIGITS","MIN_LENGTH_FOR_NSN","VALID_PHONE_NUMBER","PLUS_CHARS","VALID_PUNCTUATION","VALID_PHONE_NUMBER_START_REG_EXP","VALID_PHONE_NUMBER_WITH_EXTENSION","createExtensionPattern","VALID_PHONE_NUMBER_PATTERN","isViablePhoneNumber","number","isViablePhoneNumberStart","EXTN_PATTERN","createExtensionPattern","extractExtension","number","start","numberWithoutExtension","matches","i","DIGITS","parseDigit","character","_createForOfIteratorHelperLoose","o","allowArrayLike","it","_unsupportedIterableToArray","i","minLen","_arrayLikeToArray","n","arr","len","arr2","parseIncompletePhoneNumber","string","result","_iterator","_step","character","parsePhoneNumberCharacter","prevParsedCharacters","emitEvent","parseDigit","_createForOfIteratorHelperLoose","o","allowArrayLike","it","_unsupportedIterableToArray","i","minLen","_arrayLikeToArray","n","arr","len","arr2","mergeArrays","a","b","merged","_iterator","_step","element","checkNumberLength","nationalNumber","metadata","checkNumberLengthForType","type","type_info","possible_lengths","mobile_type","mergeArrays","actual_length","minimum_length","isPossiblePhoneNumber","input","options","metadata","Metadata","isPossibleNumber","nationalNumber","checkNumberLength","matchesEntirely","text","regular_expression","_createForOfIteratorHelperLoose","o","allowArrayLike","it","_unsupportedIterableToArray","i","minLen","_arrayLikeToArray","n","arr","len","arr2","NON_FIXED_LINE_PHONE_TYPES","getNumberType","input","options","metadata","Metadata","nationalNumber","matchesEntirely","isNumberTypeEqualTo","_iterator","_step","type","isValidNumber","input","options","metadata","Metadata","getNumberType","nationalNumber","matchesEntirely","getPossibleCountriesForNumber","callingCode","nationalNumber","metadata","_metadata","Metadata","possibleCountries","country","couldNationalNumberBelongToCountry","applyInternationalSeparatorStyle","formattedNumber","VALID_PUNCTUATION","FIRST_GROUP_PATTERN","formatNationalNumberUsingFormat","number","format","_ref","useInternationalFormat","withNationalPrefix","carrierCode","metadata","formattedNumber","applyInternationalSeparatorStyle","SINGLE_IDD_PREFIX_REG_EXP","getIddPrefix","country","callingCode","metadata","countryMetadata","Metadata","formatRFC3966","_ref","number","ext","_createForOfIteratorHelperLoose","o","allowArrayLike","it","_unsupportedIterableToArray","i","minLen","_arrayLikeToArray","n","arr","len","arr2","ownKeys","object","enumerableOnly","keys","symbols","sym","_objectSpread","target","source","key","_defineProperty","obj","value","DEFAULT_OPTIONS","formattedNumber","extension","metadata","formatNumber","input","format","options","Metadata","countryCallingCode","nationalNumber","number","formatNationalNumber","addExtension","formatRFC3966","formatIDD","carrierCode","formatAs","chooseFormatForNumber","formatNationalNumberUsingFormat","availableFormats","nationalNnumber","_iterator","_step","lastLeadingDigitsPattern","matchesEntirely","ext","formatExtension","fromCountry","fromCountryCallingCode","getCountryCallingCode","iddPrefix","getIddPrefix","ownKeys","object","enumerableOnly","keys","symbols","sym","_objectSpread","target","i","source","key","_defineProperty","obj","value","_classCallCheck","instance","Constructor","_defineProperties","props","descriptor","_createClass","protoProps","staticProps","USE_NON_GEOGRAPHIC_COUNTRY_CODE","PhoneNumber","countryOrCountryCallingCode","nationalNumber","metadata","_getCountryAndCountry","getCountryAndCountryCallingCode","country","countryCallingCode","ext","getPossibleCountriesForNumber","isPossiblePhoneNumber","isValidNumber","Metadata","phoneNumber","getNumberType","_format","options","formatNumber","isCountryCode","value","getCountryAndCountryCallingCode","countryOrCountryCallingCode","metadataJson","country","countryCallingCode","metadata","Metadata","USE_NON_GEOGRAPHIC_COUNTRY_CODE","CAPTURING_DIGIT_PATTERN","VALID_DIGITS","stripIddPrefix","number","country","callingCode","metadata","countryMetadata","Metadata","IDDPrefixPattern","matchedGroups","extractNationalNumberFromPossiblyIncompleteNumber","number","metadata","prefixPattern","prefixMatch","nationalNumber","carrierCode","capturedGroupsCount","hasCapturedGroups","prefixBeforeNationalNumber","nationalPrefix","possiblePositionOfTheFirstCapturedGroup","possibleNationalPrefix","extractNationalNumber","number","metadata","_extractNationalNumbe","extractNationalNumberFromPossiblyIncompleteNumber","carrierCode","nationalNumber","shouldHaveExtractedNationalPrefix","isPossibleIncompleteNationalNumber","nationalNumberBefore","nationalNumberAfter","matchesEntirely","checkNumberLength","extractCountryCallingCodeFromInternationalNumberWithoutPlusSign","number","country","callingCode","metadata","countryCallingCode","getCountryCallingCode","Metadata","possibleShorterNumber","_extractNationalNumbe","extractNationalNumber","possibleShorterNationalNumber","_extractNationalNumbe2","nationalNumber","matchesEntirely","checkNumberLength","extractCountryCallingCode","number","country","callingCode","metadata","isNumberWithIddPrefix","numberWithoutIDD","stripIddPrefix","_extractCountryCallin","extractCountryCallingCodeFromInternationalNumberWithoutPlusSign","countryCallingCode","shorterNumber","Metadata","i","MAX_LENGTH_COUNTRY_CODE","_countryCallingCode","_createForOfIteratorHelperLoose","o","allowArrayLike","it","_unsupportedIterableToArray","i","minLen","_arrayLikeToArray","n","arr","len","arr2","getCountryByNationalNumber","nationalPhoneNumber","_ref","countries","defaultCountry","metadata","Metadata","matchingCountries","_iterator","_step","country","getNumberType","USE_NON_GEOGRAPHIC_COUNTRY_CODE","getCountryByCallingCode","callingCode","_ref","nationalPhoneNumber","defaultCountry","metadata","possibleCountries","getCountryByNationalNumber","PLUS_SIGN","RFC3966_VISUAL_SEPARATOR_","RFC3966_PHONE_DIGIT_","VALID_DIGITS","RFC3966_GLOBAL_NUMBER_DIGITS_","RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_","ALPHANUM_","RFC3966_DOMAINLABEL_","VALID_ALPHA_","RFC3966_TOPLABEL_","RFC3966_DOMAINNAME_","RFC3966_DOMAINNAME_PATTERN_","RFC3966_PREFIX_","RFC3966_PHONE_CONTEXT_","RFC3966_ISDN_SUBADDRESS_","extractPhoneContext","numberToExtractFrom","indexOfPhoneContext","phoneContextStart","phoneContextEnd","isPhoneContextValid","phoneContext","extractFormattedPhoneNumberFromPossibleRfc3966NumberUri","numberToParse","_ref","extractFormattedPhoneNumber","phoneContext","extractPhoneContext","isPhoneContextValid","ParseError","phoneNumberString","PLUS_SIGN","indexOfRfc3966Prefix","RFC3966_PREFIX_","indexOfNationalNumber","indexOfPhoneContext","RFC3966_PHONE_CONTEXT_","indexOfIsdn","RFC3966_ISDN_SUBADDRESS_","MAX_INPUT_STRING_LENGTH","PHONE_NUMBER_START_PATTERN","PLUS_CHARS","VALID_DIGITS","AFTER_PHONE_NUMBER_END_PATTERN","USE_NON_GEOGRAPHIC_COUNTRY_CODE","parse","text","options","metadata","Metadata","ParseError","_parseInput","parseInput","formattedPhoneNumber","ext","error","_parsePhoneNumber","parsePhoneNumber","country","nationalNumber","countryCallingCode","countryCallingCodeSource","carrierCode","MIN_LENGTH_FOR_NSN","MAX_LENGTH_FOR_NSN","phoneNumber","PhoneNumber","valid","matchesEntirely","isPossibleNumber","result","_extractFormattedPhoneNumber","extract","throwOnError","startsAt","v2","number","extractFormattedPhoneNumberFromPossibleRfc3966NumberUri","isViablePhoneNumber","isViablePhoneNumberStart","withExtensionStripped","extractExtension","defaultCountry","defaultCallingCode","_extractCountryCallin","extractCountryCallingCode","parseIncompletePhoneNumber","getCountryCallingCode","_extractNationalNumbe","extractNationalNumber","exactCountry","getCountryByCallingCode","_slicedToArray","arr","i","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","o","minLen","_arrayLikeToArray","n","len","arr2","_i","_arr","_n","_d","_s","_e","err","formatNumber","_normalizeArguments","normalizeArguments","input","format","options","metadata","args","_Array$prototype$slic","_Array$prototype$slic2","arg_1","arg_2","arg_3","arg_4","arg_5","parse","isObject","format","withMetadataArgument","formatNumber","formatPhoneNumber","phoneNumber","formatForInternational","countryCode","numberString","toString","formatting","newCountryCode","formatNumber","PhoneNumberFormatPipe","transform","pure","_PhoneNumberFormatPipe","InternationalPhoneNumberFormatPipe","_InternationalPhoneNumberFormatPipe","DEFAULT_CURRENCY_CODE","DEFAULT_LOCALE","DisplayValuePipe","constructor","translateService","locale","updateValue","displayType","currencyPipe","CurrencyPipe","displayValue","transform","value","currencyCode","percentPipe","PercentPipe","digitsInfo","decimalPipe","DecimalPipe","instant","outOfValue","maxDecimalPlaces","undefined","onTranslationChange","subscribe","onLangChange","onDefaultLangChange","ngOnDestroy","unsubscribe","ɵɵdirectiveInject","TranslateService","pure","_DisplayValuePipe","CommonPipesModule","InternationalPhoneNumberFormatPipe","PhoneNumberFormatPipe","DisplayValuePipe","_CommonPipesModule","_c0","_c1","_c2","nextUniqueId","MatRadioChange","source","value","MAT_RADIO_GROUP","InjectionToken","MAT_RADIO_DEFAULT_OPTIONS","MAT_RADIO_DEFAULT_OPTIONS_FACTORY","MatRadioButton","_MatRadioButton","value","newValue","radioGroup","_elementRef","_changeDetector","_focusMonitor","_radioDispatcher","animationMode","_providerOverride","tabIndex","nextUniqueId","EventEmitter","numberAttribute","options","origin","id","name","focusOrigin","MatRadioChange","event","groupValueChanged","group","input","t","ɵɵdirectiveInject","MAT_RADIO_GROUP","ElementRef","ChangeDetectorRef","FocusMonitor","UniqueSelectionDispatcher","ANIMATION_MODULE_TYPE","MAT_RADIO_DEFAULT_OPTIONS","ɵɵinjectAttribute","ɵɵdefineComponent","rf","ctx","ɵɵviewQuery","_c0","_c1","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵlistener","ɵɵattribute","ɵɵclassProp","InputFlags","booleanAttribute","ɵɵInputTransformsFeature","ɵɵStandaloneFeature","_c2","_r1","ɵɵgetCurrentView","ɵɵprojectionDef","ɵɵelementStart","$event","ɵɵrestoreView","ɵɵresetView","ɵɵelementEnd","ɵɵelement","ɵɵprojection","ɵɵproperty","ɵɵadvance","MatRipple","_MatInternalFormField","MatRadioModule","_MatRadioModule","ɵɵdefineNgModule","ɵɵdefineInjector","MatCommonModule","CommonModule","MatRippleModule","_c0","MatCalendarBody_Conditional_0_Template","rf","ctx","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ctx_r0","ɵɵnextContext","ɵɵadvance","ɵɵstyleProp","ɵɵattribute","ɵɵtextInterpolate1","MatCalendarBody_For_2_Conditional_1_Template","MatCalendarBody_For_2_For_3_Template","_r2","ɵɵgetCurrentView","ɵɵlistener","$event","item_r3","ɵɵrestoreView","ɵɵresetView","ɵɵelement","colIndex_r4","rowIndex_r5","ɵɵclassProp","ɵɵproperty","MatCalendarBody_For_2_Template","ɵɵtemplate","ɵɵrepeaterCreate","ɵɵrepeaterTrackByIdentity","row_r6","ɵɵconditional","ɵɵrepeater","MatMonthView_For_4_Template","day_r1","ɵɵtextInterpolate","_c1","MatCalendar_ng_template_0_Template","MatCalendar_Case_2_Template","_r1","ɵɵtwoWayListener","ctx_r1","ɵɵtwoWayBindingSet","ɵɵtwoWayProperty","MatCalendar_Case_3_Template","_r3","MatCalendar_Case_4_Template","_r4","MatDatepickerContent_ng_template_2_Template","_c2","_c3","_c4","MatDatepickerToggle_Conditional_2_Template","ɵɵnamespaceSVG","MatDatepickerIntl","_MatDatepickerIntl","Subject","start","end","t","ɵɵdefineInjectable","MatCalendarCell","value","displayValue","ariaLabel","enabled","cssClasses","compareValue","rawValue","calendarBodyId","activeCapturingEventOptions","normalizePassiveListenerOptions","passiveCapturingEventOptions","passiveEventOptions","MatCalendarBody","_MatCalendarBody","_elementRef","_ngZone","inject","Platform","EventEmitter","event","cell","target","getActualTouchTarget","getCellElement","cellElement","element","changes","columnChanges","rows","numCols","rowIndex","colIndex","cellNumber","movePreview","take","activeCell","isStart","isEnd","isInRange","previousCell","previousRow","nextCell","nextRow","row","col","ɵɵdirectiveInject","ElementRef","NgZone","ɵɵdefineComponent","ɵɵNgOnChangesFeature","ɵɵStandaloneFeature","_c0","rf","ctx","ɵɵtemplate","MatCalendarBody_Conditional_0_Template","ɵɵrepeaterCreate","MatCalendarBody_For_2_Template","ɵɵrepeaterTrackByIdentity","ɵɵelementStart","ɵɵtext","ɵɵelementEnd","ɵɵconditional","ɵɵadvance","ɵɵrepeater","ɵɵproperty","ɵɵtextInterpolate1","NgClass","isTableCell","node","rangeEnabled","touchLocation","DateRange","MatDateSelectionModel","_MatDateSelectionModel","selection","_adapter","source","oldValue","date","ɵɵinvalidFactory","MatSingleDateSelectionModel","_MatSingleDateSelectionModel","adapter","clone","ɵɵinject","DateAdapter","MAT_SINGLE_DATE_SELECTION_MODEL_FACTORY","parent","adapter","MatSingleDateSelectionModel","MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER","MatDateSelectionModel","Optional","SkipSelf","DateAdapter","MAT_DATE_RANGE_SELECTION_STRATEGY","InjectionToken","DAYS_PER_WEEK","MatMonthView","_MatMonthView","value","oldActiveDate","validDate","DateRange","_changeDetectorRef","_dateFormats","_dateAdapter","_dir","_rangeStrategy","Subscription","EventEmitter","startWith","changes","comparisonChange","event","date","selectedDate","rangeStartDate","rangeEndDate","month","isRtl","hasModifierKey","firstOfMonth","movePreview","cell","previewRange","dragRange","dragDropResult","dayOfMonth","firstDayOfWeek","narrowWeekdays","weekdays","long","i","daysInMonth","dateNames","enabled","ariaLabel","cellClasses","MatCalendarCell","d1","d2","year","day","selectedValue","t","ɵɵdirectiveInject","ChangeDetectorRef","MAT_DATE_FORMATS","DateAdapter","Directionality","MAT_DATE_RANGE_SELECTION_STRATEGY","ɵɵdefineComponent","rf","ctx","ɵɵviewQuery","MatCalendarBody","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵNgOnChangesFeature","ɵɵStandaloneFeature","ɵɵelementStart","ɵɵrepeaterCreate","MatMonthView_For_4_Template","ɵɵrepeaterTrackByIdentity","ɵɵelementEnd","ɵɵelement","ɵɵlistener","$event","ɵɵadvance","ɵɵrepeater","ɵɵproperty","yearsPerPage","yearsPerRow","MatMultiYearView","_MatMultiYearView","isSameMultiYearView","minYearOfPage","getActiveOffset","row","selectedYear","activeMonth","yearName","firstOfYear","displayValue","dateAdapter","date1","date2","minDate","maxDate","year1","year2","startingYear","getStartingYear","activeDate","activeYear","euclideanModulo","a","b","MatYearView","_MatYearView","selectedMonth","monthNames","normalizedDate","monthName","maxYear","maxMonth","minYear","minMonth","calendarHeaderId","MatCalendarHeader","_MatCalendarHeader","_intl","calendar","changeDetectorRef","maxYearOfPage","minYearLabel","maxYearLabel","MatDatepickerIntl","forwardRef","MatCalendar","_c1","ɵɵprojectionDef","ɵɵtext","ɵɵnamespaceSVG","ɵɵnamespaceHTML","ɵɵprojection","ɵɵtextInterpolate","ɵɵattribute","ɵɵclassProp","MatButton","MatIconButton","_MatCalendar","viewChangedResult","Subject","ComponentPortal","minDateChange","maxDateChange","change","view","normalizedYear","normalizedMonth","ɵɵProvidersFeature","MAT_SINGLE_DATE_SELECTION_MODEL_PROVIDER","ɵɵtemplate","MatCalendar_ng_template_0_Template","MatCalendar_Case_2_Template","MatCalendar_Case_3_Template","MatCalendar_Case_4_Template","tmp_1_0","ɵɵconditional","CdkPortalOutlet","CdkMonitorFocus","matDatepickerAnimations","trigger","transition","animate","keyframes","style","state","MAT_DATEPICKER_SCROLL_STRATEGY","InjectionToken","overlay","inject","Overlay","MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY","MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER","MatDatepickerContent","_MatDatepickerContent","_elementRef","_changeDetectorRef","_globalModel","_dateAdapter","_rangeSelectionStrategy","intl","Subscription","Subject","event","selection","value","isRange","DateRange","newSelection","portal","forceRerender","t","ɵɵdirectiveInject","ElementRef","ChangeDetectorRef","MatDateSelectionModel","DateAdapter","MAT_DATE_RANGE_SELECTION_STRATEGY","MatDatepickerIntl","ɵɵdefineComponent","rf","ctx","ɵɵviewQuery","MatCalendar","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵsyntheticHostListener","$event","ɵɵsyntheticHostProperty","ɵɵclassMap","ɵɵclassProp","ɵɵStandaloneFeature","ɵɵelementStart","ɵɵlistener","ɵɵelementEnd","ɵɵtemplate","MatDatepickerContent_ng_template_2_Template","ɵɵtext","tmp_3_0","ɵɵattribute","ɵɵadvance","ɵɵproperty","ɵɵtextInterpolate","CdkTrapFocus","NgClass","CdkPortalOutlet","MatButton","matDatepickerAnimations","MatDatepickerToggleIcon","_MatDatepickerToggleIcon","t","ɵɵdefineDirective","MatDatepickerToggle","_MatDatepickerToggle","value","_intl","_changeDetectorRef","defaultTabIndex","Subscription","parsedTabIndex","changes","event","datepickerStateChanged","of","inputStateChanged","datepickerToggled","merge","ɵɵdirectiveInject","MatDatepickerIntl","ChangeDetectorRef","ɵɵinjectAttribute","ɵɵdefineComponent","rf","ctx","dirIndex","ɵɵcontentQuery","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵviewQuery","_c2","ɵɵlistener","$event","ɵɵattribute","ɵɵclassProp","InputFlags","booleanAttribute","ɵɵInputTransformsFeature","ɵɵNgOnChangesFeature","ɵɵStandaloneFeature","_c4","ɵɵprojectionDef","_c3","ɵɵelementStart","ɵɵtemplate","MatDatepickerToggle_Conditional_2_Template","ɵɵprojection","ɵɵelementEnd","ɵɵproperty","ɵɵadvance","ɵɵconditional","MatIconButton","MatDatepickerModule","_MatDatepickerModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","MatDatepickerIntl","MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER","CommonModule","MatButtonModule","OverlayModule","A11yModule","PortalModule","MatCommonModule","MatDatepickerContent","MatDatepickerToggle","MatCalendarHeader","CdkScrollableModule","en_devel_default","WEBLATE_COMPONENT_NAME","MAT_CHIPS_DEFAULT_OPTIONS","InjectionToken","MatChipsModule","_MatChipsModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","ErrorStateMatcher","MAT_CHIPS_DEFAULT_OPTIONS","MatCommonModule","MatRippleModule","UpgradeCTADialogModule","CommonModule","MatDialogModule","MatIconModule","MatButtonModule","MatChipsModule","MatProgressSpinnerModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","_UpgradeCTADialogModule","CdkTableModule","_CdkTableModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","ScrollingModule","MatTableModule","_MatTableModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","MatCommonModule","CdkTableModule","VaCardsModule","CommonModule","MatCardModule","MatIconModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","MatTooltipModule","CommonPipesModule","_VaCardsModule","VaGoalTableModule","MatTableModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","VaCardsModule","CommonModule","MatCardModule","MatIconModule","_VaGoalTableModule","LocalStorageService","get","name","browserSupport","localStorage","getItem","set","value","setItem","remove","removeItem","factory","ɵfac","providedIn","_LocalStorageService","CdkAccordionModule","_CdkAccordionModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","MatExpansionModule","_MatExpansionModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","MatCommonModule","CdkAccordionModule","PortalModule","getDefaults","defaults","changeDefaults","newDefaults","escapeTest","escapeReplace","escapeTestNoEncode","escapeReplaceNoEncode","escapeReplacements","getEscapeReplacement","ch","escape","html","encode","unescapeTest","unescape","_","n","caret","edit","regex","opt","obj","name","val","nonWordAndColonTest","originIndependentUrl","cleanUrl","sanitize","base","href","prot","resolveUrl","baseUrls","justDomain","protocol","domain","rtrim","relativeBase","noopTest","splitCells","tableRow","count","row","match","offset","str","escaped","curr","cells","i","c","invert","l","suffLen","currChar","findClosingBracket","b","level","checkSanitizeDeprecation","repeatString","pattern","result","outputLink","cap","link","raw","lexer","title","text","token","indentCodeCompensation","matchIndentToCode","indentToCode","node","matchIndentInNode","indentInNode","Tokenizer","options","src","trimmed","top","tokens","istask","ischecked","indent","blankLine","endsWithBlankLine","line","nextLine","rawLine","itemContents","endEarly","bull","isordered","list","itemRegex","t","nextBulletRegex","hrRegex","fencesBeginRegex","headingBeginRegex","spacers","hasMultipleLineBreaks","tag","item","j","k","trimmedUrl","rtrimSlash","lastParenIndex","linkLen","links","maskedSrc","prevChar","nextChar","lLength","rDelim","rLength","delimTotal","midDelimTotal","endReg","hasNonSpaceChars","hasSpaceCharsOnBothEnds","mangle","prevCapZero","smartypants","block","__spreadValues","__spreadProps","inline","out","Lexer","_Lexer","rules","next","leading","tabs","lastToken","cutSrc","lastParagraphClipped","extTokenizer","startIndex","tempSrc","tempStart","getStartIndex","errMsg","keepPrevChar","Renderer","code","infostring","lang","quote","slugger","id","body","ordered","start","type","startatt","checked","header","content","flags","TextRenderer","Slugger","value","originalSlug","isDryRun","slug","occurenceAccumulator","Parser","_Parser","l2","l3","cell","loose","itemBody","task","checkbox","ret","renderer","Hooks","markdown","onError","silent","async","callback","e","msg","parseMarkdown","parser","origOpt","marked","throwError","highlight","done","err","pending","args","extensions","pack","opts","ext","prevRenderer","prop","tokenizer","prevTokenizer","hooks","prevHook","arg","walkTokens","values","childTokens","setOptions","use","parseInline","parser","Parser","lexer","Lexer","BUTTON_TEXT_COPY","BUTTON_TEXT_COPIED","ClipboardButtonComponent","Subject","switchMap","merge","of","timer","mapTo","distinctUntilChanged","shareReplay","startWith","map","copied","ɵɵdefineComponent","rf","ctx","ɵɵelementStart","ɵɵpipe","ɵɵlistener","ɵɵtext","ɵɵelementEnd","ɵɵclassProp","ɵɵpipeBind1","ɵɵadvance","ɵɵtextInterpolate","AsyncPipe","ClipboardOptions","MarkedOptions","errorJoyPixelsNotLoaded","errorKatexNotLoaded","errorMermaidNotLoaded","errorClipboardNotLoaded","errorClipboardViewContainerRequired","errorSrcWithoutHttpClient","SECURITY_CONTEXT","InjectionToken","MarkdownService","platform","securityContext","http","clipboardOptions","options","sanitizer","Renderer","Subject","value","__spreadValues","markdown","decodeHtml","inline","emoji","mermaid","markedOptions","trimmed","decoded","emojified","marked","element","viewContainerRef","clipboard","katex","katexOptions","mermaidOptions","src","errorSrcWithoutHttpClient","map","isPlatformBrowser","noLanguageElements","x","html","textarea","renderer","extendedRenderer","defaultCode","code","language","isEscaped","urlProtocolIndex","urlWithoutProtocol","lastSlashIndex","lastUrlSegment","lastDotIndex","extension","errorJoyPixelsNotLoaded","errorKatexNotLoaded","errorClipboardNotLoaded","errorClipboardViewContainerRequired","buttonComponent","buttonTemplate","preElements","i","preElement","preWrapperElement","toolbarWrapperElement","embeddedViewRef","ClipboardButtonComponent","clipboardInstance","node","errorMermaidNotLoaded","mermaidElements","indentStart","line","lineIdentStart","ɵɵinject","PLATFORM_ID","SECURITY_CONTEXT","HttpClient","ClipboardOptions","MarkedOptions","DomSanitizer","ɵɵdefineInjectable","MarkdownModule","markdownModuleConfig","MarkdownService","SECURITY_CONTEXT","SecurityContext","ɵɵdefineNgModule","ɵɵdefineInjector","CommonModule","MermaidAPI","SecurityLevel","Theme","LogLevel","VaIconModule","_VaIconModule","ProjectMilestonesModule","CommonModule","MatCardModule","MatExpansionModule","MatIconModule","MatProgressBarModule","VaIconModule","MarkdownModule","_ProjectMilestonesModule","VaSafeHtmlModule","CommonModule","_VaSafeHtmlModule","VaSearchInputDirective","constructor","elementRef","focus","nativeElement","selector","select","ɵɵdirectiveInject","ElementRef","selectors","standalone","_VaSearchInputDirective","SEARCH_TERM_FILTER","SearchBoxService","constructor","localStorageService","saveSearchTerm","contextKey","input","set","getSearchTerm","get","ɵɵinject","LocalStorageService","factory","ɵfac","providedIn","_SearchBoxService","SearchBoxComponent","constructor","searchBoxService","update","EventEmitter","submit","highlightWhenSelected","disabled","initial","enabledSaveSearchTerm","contextKey","placeholder","isSelected","ngOnInit","getSearchTerm","emit","submitSearch","term","saveSearchTerm","inputArea","selector","updateSearch","focusOnSearchBox","window","setTimeout","focus","ɵɵdirectiveInject","SearchBoxService","selectors","viewQuery","rf","ctx","VaSearchInputDirective","ɵɵelementStart","ɵɵlistener","ɵɵrestoreView","_r1","input_r2","ɵɵreference","ɵɵresetView","value","i0","ɵɵelementEnd","ɵɵtext","ɵɵproperty","ɵɵpureFunction3","_c0","ɵɵadvance","CommonModule","NgClass","FormsModule","MatIconModule","MatIcon","styles","changeDetection","_SearchBoxComponent","VaSearchBoxModule","SearchBoxComponent","_VaSearchBoxModule","VaActionMenuModule","CommonModule","MatButtonModule","MatIconModule","MatMenuModule","_VaActionMenuModule","VaBadgeModule","_VaBadgeModule","VaBreadcrumbsModule","CommonModule","RouterModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","_VaBreadcrumbsModule","MatDividerModule","_MatDividerModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","MatCommonModule","VaFilterChipsModule","CommonModule","MatIconModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","CommonPipesModule","MatDialogModule","MatDividerModule","MatButtonModule","MatRippleModule","MatMenuModule","_VaFilterChipsModule","_rollupMoment","import_moment","moment","_rollupMoment__default","MAT_MOMENT_DATE_ADAPTER_OPTIONS","InjectionToken","MAT_MOMENT_DATE_ADAPTER_OPTIONS_FACTORY","range","length","valueFunction","valuesArray","i","MomentDateAdapter","_MomentDateAdapter","DateAdapter","dateLocale","_options","locale","momentLocaleData","date","style","year","month","result","value","parseFormat","displayFormat","years","months","days","obj","format","strict","useUtc","t","ɵɵinject","MAT_DATE_LOCALE","ɵɵdefineInjectable","MAT_MOMENT_DATE_FORMATS","MatMomentDateModule","_MatMomentDateModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","provideMomentDateAdapter","formats","MAT_MOMENT_DATE_FORMATS","options","providers","DateAdapter","MomentDateAdapter","MAT_DATE_LOCALE","MAT_MOMENT_DATE_ADAPTER_OPTIONS","MAT_DATE_FORMATS","MatListModule","_MatListModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","ObserversModule","CommonModule","MatCommonModule","MatRippleModule","MatPseudoCheckboxModule","MatDividerModule","MAT_TABS_CONFIG","InjectionToken","MatTabsModule","_MatTabsModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","MatCommonModule","GalaxyWrapModule","CommonModule","_GalaxyWrapModule","VaSearchSelectModule","CommonModule","VaSearchBoxModule","MatIconModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","_VaSearchSelectModule","VaItemsAndStatusModule","CommonModule","VaSearchSelectModule","_VaItemsAndStatusModule","Language","LanguageMap","code","ENGLISH","label","flag","SPANISH_LATIN_AMERICA","FRENCH_FRANCE","FRENCH_CANADA","CZECH","DUTCH","GERMAN","ITALIAN","LOCALE_LOCALSTORAGE_KEY","LANGUAGE_OPTIONS","Language","AFRIKAANS","CZECH","DUTCH","ENGLISH","FRENCH","FRENCH_CANADA","GERMAN","ITALIAN","PORTUGUESE","RUSSIAN","SPANISH_LATIN_AMERICA","getLocale","overrideLanguageOptions","locale","getLanguageFromLocalStorage","detectLanguageFromBrowser","Language","ENGLISH","toString","getLanguageFromLocalStorage","overrideLanguageOptions","localStorage","languageCode","getItem","LOCALE_LOCALSTORAGE_KEY","findLanguageFromCode","toLowerCase","detectLanguageFromBrowser","browserLanguageCode","getBrowserCultureLang","window","navigator","browserCultureLang","Intl","NumberFormat","resolvedOptions","locale","languages","length","language","browserLanguage","userLanguage","replace","languageOptions","LANGUAGE_OPTIONS","find","opt","toString","startsWith","indexOf","slice","VaMultiSelectModule","CommonModule","MatIconModule","GalaxyWrapModule","MatSelectModule","MatInputModule","GalaxyFormFieldModule","FormsModule","MatAutocompleteModule","ReactiveFormsModule","MatChipsModule","_VaMultiSelectModule","VaFilterModule","RouterModule","CommonModule","VaSearchBoxModule","VaSearchSelectModule","VaItemsAndStatusModule","VaMultiSelectModule","MatCheckboxModule","MatTabsModule","MatMenuModule","MatIconModule","MatRadioModule","MatButtonModule","MatInputModule","MatDialogModule","MatListModule","MatDatepickerModule","FormsModule","ReactiveFormsModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","MatMomentDateModule","LayoutModule","MatTooltipModule","GalaxyWrapModule","MatChipsModule","_VaFilterModule","_c0","_c1","MatSlideToggle_Conditional_10_Template","rf","ctx","ɵɵelementStart","ɵɵnamespaceSVG","ɵɵelement","ɵɵelementEnd","MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS","InjectionToken","MAT_SLIDE_TOGGLE_VALUE_ACCESSOR","NG_VALUE_ACCESSOR","forwardRef","MatSlideToggle","MatSlideToggleChange","source","checked","nextUniqueId","_MatSlideToggle","isChecked","value","_elementRef","_focusMonitor","_changeDetectorRef","tabIndex","defaults","animationMode","_","EventEmitter","focusOrigin","changes","fn","control","isDisabled","t","ɵɵdirectiveInject","ElementRef","FocusMonitor","ChangeDetectorRef","ɵɵinjectAttribute","ANIMATION_MODULE_TYPE","ɵɵdefineComponent","ɵɵviewQuery","_t","ɵɵqueryRefresh","ɵɵloadQuery","ɵɵhostProperty","ɵɵattribute","ɵɵclassMap","ɵɵclassProp","InputFlags","booleanAttribute","numberAttribute","ɵɵProvidersFeature","NG_VALIDATORS","ɵɵInputTransformsFeature","ɵɵNgOnChangesFeature","ɵɵStandaloneFeature","_r1","ɵɵgetCurrentView","ɵɵprojectionDef","ɵɵlistener","ɵɵrestoreView","ɵɵresetView","ɵɵtemplate","$event","ɵɵprojection","switch_r2","ɵɵreference","ɵɵproperty","ɵɵadvance","ɵɵconditional","MatRipple","_MatInternalFormField","MatSlideToggleModule","_MatSlideToggleModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","MatSlideToggle","MatCommonModule","VaListModule","CommonModule","MatCheckboxModule","MatButtonModule","MatIconModule","MatSlideToggleModule","MatTooltipModule","MatProgressSpinnerModule","MatProgressBarModule","MatChipsModule","VaIconModule","VaActionMenuModule","_VaListModule","extendStyles","dest","source","importantProperties","key","value","toggleNativeDragInteractions","element","enable","userSelect","toggleVisibility","combineTransforms","transform","initialTransform","parseCssTimeUnitsToMs","multiplier","getTransformTransitionDurationInMs","computedStyle","transitionedProperties","parseCssPropertyValue","property","prop","propertyIndex","rawDurations","rawDelays","name","part","getMutableClientRect","rect","isInsideClientRect","clientRect","x","y","top","bottom","left","right","adjustDomRect","domRect","isPointerNearDomRect","threshold","pointerX","pointerY","width","height","xThreshold","yThreshold","ParentPositionTracker","_document","elements","event","target","_getEventTarget","cachedPosition","scrollPosition","newTop","newLeft","viewportScrollPosition","topDifference","leftDifference","position","node","deepCloneNode","clone","descendantsWithId","nodeName","i","transferCanvasData","transferInputData","transferData","selector","callback","descendantElements","cloneElements","cloneUniqueId","context","passiveEventListenerOptions","normalizePassiveListenerOptions","activeEventListenerOptions","MOUSE_EVENT_IGNORE_TIME","dragImportantProperties","DragRef","handle","_config","_ngZone","_viewportRuler","_dragDropRegistry","Subject","Subscription","targetHandle","pointerPosition","distanceX","distanceY","isDelayElapsed","container","constrainedPointerPosition","offset","activeTransform","handles","coerceElement","disabledHandles","template","rootElement","boundaryElement","parent","direction","isTouchEvent","dropContainer","placeholder","anchor","shadowRoot","referenceElement","isDragging","isTouchSequence","isAuxiliaryMouseButton","isSyntheticEvent","isFakeEvent","isFakeTouchstartFromScreenReader","isFakeMousedownFromScreenReader","rootStyles","scrollEvent","previewTemplate","currentIndex","distance","isPointerOverContainer","rawX","rawY","newContainer","previewConfig","previewClass","preview","rootRect","viewRef","getRootNode","matchElementSize","getTransform","className","placeholderRect","duration","resolve","handler","timeout","placeholderConfig","placeholderTemplate","elementRect","handleElement","referenceRect","point","svgMatrix","svgPoint","dropContainerLock","pickupX","pickupY","boundaryRect","previewWidth","previewHeight","minY","maxY","minX","maxX","clamp$1","pointerPositionOnPage","delta","positionSinceLastChange","changeX","changeY","shouldEnable","styles","currentPosition","pickupPosition","leftOverflow","rightOverflow","topOverflow","bottomOverflow","scrollDifference","_getShadowRoot","initialParent","previewContainer","documentRef","min","max","rootNodes","wrapper","sourceRect","moveItemInArray","array","fromIndex","toIndex","from","clamp","to","clamp","value","max","SingleAxisSortStrategy","_element","_dragDropRegistry","items","item","pointerX","pointerY","pointerDelta","siblings","newIndex","isHorizontal","currentIndex","currentItem","siblingAtNewPosition","currentPosition","newPosition","delta","itemOffset","siblingOffset","oldOrder","moveItemInArray","sibling","index","isDraggedItem","offset","elementToOffset","combineTransforms","adjustDomRect","isInsideClientRect","activeDraggables","placeholder","newPositionReference","element","coerceElement","predicate","rootElement","initialTransform","p","topDifference","leftDifference","clientRect","drag","elementToMeasure","getMutableClientRect","a","b","immediateSibling","start","end","itemPositions","lastItemRect","firstItemRect","direction","DROP_PROXIMITY_THRESHOLD","SCROLL_PROXIMITY_THRESHOLD","AutoScrollVerticalDirection","AutoScrollHorizontalDirection","DropListRef","_document","_ngZone","_viewportRuler","Subject","Subscription","interval","animationFrameScheduler","takeUntil","node","scrollStep","ParentPositionTracker","previousIndex","previousContainer","isPointerOverContainer","distance","dropPoint","event","previousItems","connectedTo","orientation","elements","isPointerNearDomRect","result","scrollNode","verticalScrollDirection","horizontalScrollDirection","position","getElementScrollDirections","width","height","domRect","getVerticalScrollDirection","getHorizontalScrollDirection","styles","x","y","elementFromPoint","nativeElement","activeSiblings","scrollDifference","shadowRoot","_getShadowRoot","draggedItems","top","bottom","yThreshold","left","right","xThreshold","computedVertical","computedHorizontal","scrollTop","scrollLeft","activeCapturingEventOptions","normalizePassiveListenerOptions","DragDropRegistry","_DragDropRegistry","drop","isTouchEvent","e","config","name","streams","Observable","observer","callback","merge","instance","t","ɵɵinject","NgZone","DOCUMENT","ɵɵdefineInjectable","DEFAULT_CONFIG","DragDrop","_DragDrop","DragRef","ViewportRuler","DragDropModule","_DragDropModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","DragDrop","CdkScrollableModule","SORT_ANIMATION_TRANSITION","AnimationDurations","AnimationCurves","MatSortHeaderIntl","_MatSortHeaderIntl","Subject","t","ɵɵdefineInjectable","MAT_SORT_HEADER_INTL_PROVIDER_FACTORY","parentIntl","MAT_SORT_HEADER_INTL_PROVIDER","Optional","SkipSelf","MatSortModule","_MatSortModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","MAT_SORT_HEADER_INTL_PROVIDER","MatCommonModule","VaMaterialTableModule","CommonModule","MatTableModule","MatSortModule","MatButtonModule","MatIconModule","MatCardModule","DragDropModule","MatMenuModule","MatCheckboxModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","MatDialogModule","VaSearchBoxModule","MatTabsModule","_VaMaterialTableModule","VaNavItemListModule","CommonModule","MatButtonModule","MatIconModule","_VaNavItemListModule","VaNavItemModule","CommonModule","MatButtonModule","MatIconModule","RouterModule","_VaNavItemModule","MatSidenavModule","_MatSidenavModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","MatCommonModule","CdkScrollableModule","MatToolbarModule","_MatToolbarModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","MatCommonModule","VaNavModule","CommonModule","MatSidenavModule","MatButtonModule","MatToolbarModule","MatIconModule","_VaNavModule","VaNestedSelectorModule","CommonModule","_VaNestedSelectorModule","MatBadgeModule","_MatBadgeModule","t","ɵɵdefineNgModule","ɵɵdefineInjector","A11yModule","MatCommonModule","VaProductNavService","constructor","router","filters$$","BehaviorSubject","infoSidebar$$","primaryActionButton$$","secondaryActionButton$$","breadcrumbs$$","navBadges$$","search$$","showInfoIcon$$","scroll$$","toggleNav$$","Subject","isSelected","navItem","isChild","children","length","forEach","child","selected","find","ch","isActive","url","setNavItems","navItems","_navItems","map","item","events","pipe","filter","event","NavigationEnd","subscribe","setFilters","filters","next","setInfoSidebar","pageInfo","Array","isArray","setPrimaryActionButton","actionButton","setSecondaryActionButton","setBreadcrumbs","breadcrumbs","setNavBadges","navBadges","setSearch","search","setShowInfoIcon","flag","setScroll","scrollEvent","toggleNav","breadcrumbs$","asObservable","primaryActionButton$","secondaryActionButton$","infoSidebar$","filters$","navBadges$","search$","showInfoIcon$","scroll$","shareReplay","toggleNav$","value","ɵɵinject","Router","factory","ɵfac","_VaProductNavService","name","version","registerVersion","VERSION","Version","ɵgetDefaultInstanceOf","identifier","provided","defaultApp","providedUsingDefaultApp","it","ɵgetAllInstancesOf","app","apps","getApps","instances","instance","ɵAppCheckInstances","ɵAPP_CHECK_PROVIDER_NAME","noop","ɵZoneScheduler","zone","delegate","queueScheduler","work","delay","state","targetZone","workInZone","BlockUntilFirstOperator","subscriber","source","unscheduleTask","tap","ɵAngularFireSchedulers","ngZone","asyncScheduler","t","ɵɵinject","NgZone","ɵɵdefineInjectable","getSchedulers","schedulers","runOutsideAngular","fn","run","keepUnstableUntilFirst","obs$","ɵkeepUnstableUntilFirstFactory","getSchedulers","schedulers","BlockUntilFirstOperator","subscribeOn","observeOn","zoneWrapFn","it","macrotask","_arguments","run","ɵzoneWrap","blockUntilFirst","i","noop","ret","runOutsideAngular","Observable","resolve","reject","reason","FirebaseApp","app","FirebaseApps","getApps","defaultFirebaseAppFactory","provided","FirebaseApp","getApp","PROVIDED_FIREBASE_APPS","InjectionToken","DEFAULT_FIREBASE_APP_PROVIDER","Optional","FIREBASE_APPS_PROVIDER","FirebaseApps","firebaseAppFactory","fn","zone","injector","app","FirebaseAppModule","platformId","registerVersion","VERSION","t","ɵɵinject","PLATFORM_ID","ɵɵdefineNgModule","ɵɵdefineInjector","provideFirebaseApp","deps","NgZone","Injector","ɵAngularFireSchedulers","getApp","ɵzoneWrap","initializeApp","ɵzoneWrap","APP_CHECK_STATES","DEFAULT_STATE","DEBUG_STATE","getStateReference","app","getDebugState","DEBUG_STATE","BASE_ENDPOINT","EXCHANGE_DEBUG_TOKEN_METHOD","TOKEN_REFRESH_TIME","ONE_DAY","Refresher","operation","retryPolicy","getWaitDuration","lowerBound","upperBound","hasSucceeded","__async","Deferred","_e","sleep","error","currentErrorWaitInterval","ms","resolve","ERRORS","ERROR_FACTORY","ErrorFactory","ensureActivated","app","getStateReference","ERROR_FACTORY","exchangeToken","_0","_1","__async","url","body","heartbeatServiceProvider","headers","heartbeatService","heartbeatsHeader","options","response","originalError","ERROR_FACTORY","responseBody","match","timeToLiveAsNumber","now","getExchangeDebugTokenRequest","app","debugToken","projectId","appId","apiKey","BASE_ENDPOINT","EXCHANGE_DEBUG_TOKEN_METHOD","DB_NAME","DB_VERSION","STORE_NAME","dbPromise","getDBPromise","resolve","reject","request","DB_NAME","DB_VERSION","event","_a","ERROR_FACTORY","db","STORE_NAME","e","writeTokenToIndexedDB","app","token","write","computeKey","write","key","value","__async","transaction","getDBPromise","STORE_NAME","request","resolve","reject","_event","event","_a","ERROR_FACTORY","computeKey","app","logger","Logger","writeTokenToStorage","app","token","isIndexedDBAvailable","writeTokenToIndexedDB","e","logger","isDebugMode","getDebugState","getDebugToken","__async","state","defaultTokenErrorData","formatDummyToken","tokenErrorData","base64","getToken$2","appCheck","forceRefresh","__async","app","ensureActivated","state","getStateReference","token","error","isValid","cachedToken","writeTokenToStorage","shouldCallListeners","isDebugMode","exchangeToken","getExchangeDebugTokenRequest","getDebugToken","tokenFromDebugExchange","e","logger","interopTokenResult","makeDummyTokenResult","notifyTokenListeners","getLimitedUseToken$1","provider","debugToken","addTokenListener","type","listener","onError","tokenObserver","validToken","initTokenRefresher","removeTokenListener","newObservers","refresher","createTokenRefresher","Refresher","result","nextRefreshTimeMillis","latestAllowableRefresh","TOKEN_REFRESH_TIME","observers","observer","AppCheckService","heartbeatServiceProvider","tokenObservers","factory","internalFactory","name","version","APP_CHECK_NAME","APP_CHECK_NAME_INTERNAL","registerAppCheck","_registerComponent","Component","container","app","heartbeatServiceProvider","factory","_identifier","_appcheckService","appCheck","internalFactory","registerVersion","name","version","LOCALHOSTS","isLocalhost","name","version","firebase","noopFunctions","ɵlazySDKProxy","klass","observable","zone","options","_","name","promise","mod","ret","res","self","args","it","FirebaseApp","app","FIREBASE_OPTIONS","InjectionToken","FIREBASE_APP_NAME","ɵfirebaseAppFactory","options","zone","nameOrConfig","name","config","firebase","hmr","log$1","level","args","isDevMode","ɵcacheInstance","cacheKey","moduleName","appName","fn","deps","instance","cachedDeps","it","matchDep","log","IS_HMR","newInstance","a","b","level","args","isDevMode","USE_EMULATOR","InjectionToken","SETTINGS","TENANT_ID","LANGUAGE_CODE","USE_DEVICE_LANGUAGE","PERSISTENCE","ɵauthFactory","app","zone","useEmulator","tenantId","languageCode","useDeviceLanguage","settings","persistence","ɵcacheInstance","auth","k","v","AngularFireAuth","options","name","platformId","schedulers","_appCheckInstances","logins","Subject","of","observeOn","switchMap","map","ɵfirebaseAppFactory","shareReplay","isPlatformServer","first","redirectResult","it","keepUnstableUntilFirst","authStateChanged","Observable","sub","next","err","idTokenChanged","switchMapTo","subscribeOn","user","from","merge","filter","credential","ɵlazySDKProxy","_","val","t","ɵɵinject","FIREBASE_OPTIONS","FIREBASE_APP_NAME","PLATFORM_ID","NgZone","ɵAngularFireSchedulers","ɵAppCheckInstances","ɵɵdefineInjectable","AngularFireAuthModule","firebase","VERSION","ɵɵdefineNgModule","ɵɵdefineInjector","commonjsGlobal","esm","k","goog","l","aa","a","b","p","ba","ca","da","ea","c","fa","d","e","q","ha","r","f","h","n","v","ia","ka","ma","na","w","oa","x","pa","y","qa","ra","sa","ta","z","ua","va","wa","xa","ya","za","Aa","Ba","Ca","Da","Ea","Fa","A","Ga","Ha","Ia","Ja","Ma","Na","Oa","Pa","Qa","Ra","Sa","Ta","Ua","Va","Wa","Ya","Za","$a","ab","bb","cb","db","eb","fb","gb","hb","B","C","ib","t","jb","kb","lb","mb","nb","ob","pb","qb","rb","sb","tb","vb","ub","wb","xb","yb","zb","Ab","Bb","Cb","Eb","Fb","Gb","Hb","m","u","L","Ib","D","Jb","Kb","E","Lb","Mb","Nb","Ob","Pb","F","Qb","Rb","Sb","Tb","Ub","Vb","Wb","Xb","Yb","Zb","$b","ac","bc","cc","dc","ec","fc","gc","hc","G","ic","jc","kc","lc","H","mc","nc","oc","I","pc","qc","rc","sc","tc","uc","vc","wc","xc","yc","zc","Ac","Bc","J","Ka","la","La","Cc","Db","K","Dc","Ec","Fc","Gc","Hc","Ic","Jc","Kc","Lc","Mc","M","Nc","Oc","Pc","Qc","Rc","Sc","Tc","Uc","Vc","Wc","Xc","Yc","Zc","N","O","$c","ad","bd","cd","dd","ed","fd","gd","hd","id","jd","kd","ld","md","nd","od","pd","qd","rd","P","sd","td","ud","vd","wd","xd","yd","zd","Ad","Bd","Cd","Dd","Ed","Fd","Gd","Hd","Id","Jd","Kd","Ld","Md","Nd","Od","Q","R","Pd","Qd","Rd","S","Sd","T","Td","U","V","W","Ud","Vd","Wd","Xd","X","Y","Yd","Zd","$d","ae","be","Z","createWebChannelTransport","getStatEventTarget","ErrorCode","EventType","Event","Stat","FetchXmlHttpFactory","WebChannel","XhrIo","Md5","Integer","w","User","S","b","Logger","__PRIVATE_getLogLevel","setLogLevel","e","__PRIVATE_logDebug","t","LogLevel","n","__PRIVATE_argToString","__PRIVATE_logError","__PRIVATE_logWarn","fail","__PRIVATE_hardAssert","__PRIVATE_debugAssert","__PRIVATE_debugCast","D","FirestoreError","FirebaseError","__PRIVATE_Deferred","__PRIVATE_OAuthToken","__PRIVATE_EmptyAuthCredentialsProvider","__PRIVATE_EmulatorAuthCredentialsProvider","__PRIVATE_FirebaseAuthCredentialsProvider","__PRIVATE_guardedChangeListener","r","__PRIVATE_awaitNextToken","__async","__PRIVATE_registerAuth","__PRIVATE_FirstPartyToken","__PRIVATE_FirstPartyAuthCredentialsProvider","AppCheckToken","__PRIVATE_FirebaseAppCheckTokenProvider","onTokenChanged","__PRIVATE_registerAppCheck","__PRIVATE_randomBytes","e","t","n","__PRIVATE_AutoId","i","__PRIVATE_primitiveComparator","__PRIVATE_arrayEquals","__PRIVATE_immediateSuccessor","Timestamp","_Timestamp","FirestoreError","D","SnapshotVersion","_SnapshotVersion","BasePath","_BasePath","fail","ResourcePath","_ResourcePath","C","FieldPath$1","_FieldPath$1","__PRIVATE_addCurrentSegment","DocumentKey","_DocumentKey","FieldIndex","__PRIVATE_fieldIndexGetArraySegment","__PRIVATE_fieldIndexGetDirectionalSegments","FieldIndex","IndexSegment","IndexState","_IndexState","IndexOffset","__PRIVATE_newIndexOffsetSuccessorFromReadTime","e","t","n","r","i","SnapshotVersion","Timestamp","DocumentKey","__PRIVATE_newIndexOffsetFromDocument","_IndexOffset","__PRIVATE_indexOffsetComparator","__PRIVATE_primitiveComparator","v","PersistenceTransaction","__PRIVATE_ignoreIfPrimaryLeaseLoss","__async","D","__PRIVATE_logDebug","PersistencePromise","_PersistencePromise","fail","s","o","_","a","process","__PRIVATE_SimpleDbTransaction","___PRIVATE_SimpleDbTransaction","__PRIVATE_Deferred","__PRIVATE_IndexedDbTransactionError","__PRIVATE_checkForAndReportiOSError","__PRIVATE_SimpleDbStore","__PRIVATE_SimpleDb","___PRIVATE_SimpleDb","getUA","__PRIVATE_logError","__PRIVATE_wrapRequest","isIndexedDBAvailable","FirestoreError","__PRIVATE_IterationController","__PRIVATE_isIndexedDbTransactionError","F","__PRIVATE_IndexBackfillerScheduler","__PRIVATE_IndexBackfiller","__PRIVATE_ListenSequence","__PRIVATE_isNullOrUndefined","__PRIVATE_isNegativeZero","isSafeInteger","__PRIVATE_encodeResourcePath","__PRIVATE_encodeSeparator","__PRIVATE_encodeSegment","__PRIVATE_decodeResourcePath","__PRIVATE_hardAssert","ResourcePath","__PRIVATE_lastReasonableEscapeIndex","M","__PRIVATE_newDbDocumentMutationPrefixForPath","__PRIVATE_newDbDocumentMutationKey","x","O","N","B","L","k","q","Q","K","$","U","W","G","z","j","H","J","Y","Z","X","__PRIVATE_IndexedDbTransaction","__PRIVATE_getStore","__PRIVATE_debugCast","__PRIVATE_objectSize","forEach","isEmpty","SortedMap","_SortedMap","LLRBNode","SortedMapIterator","_LLRBNode","SortedSet","_SortedSet","SortedSetIterator","__PRIVATE_advanceIterator","FieldMask","_FieldMask","FieldPath$1","__PRIVATE_arrayEquals","__PRIVATE_Base64DecodeError","__PRIVATE_isBase64Available","ByteString","_ByteString","ee","__PRIVATE_normalizeTimestamp","__PRIVATE_normalizeNumber","__PRIVATE_normalizeByteString","__PRIVATE_isServerTimestamp","__PRIVATE_getPreviousValue","__PRIVATE_getLocalWriteTime","DatabaseInfo","DatabaseId","_DatabaseId","te","ne","__PRIVATE_typeOrder","__PRIVATE_isMaxValue","__PRIVATE_valueEquals","__PRIVATE_arrayValueContains","__PRIVATE_valueCompare","__PRIVATE_compareTimestamps","canonicalId","__PRIVATE_canonifyValue","__PRIVATE_refValue","e","t","isInteger","isArray","__PRIVATE_isNullValue","__PRIVATE_isNanValue","__PRIVATE_isMapValue","__PRIVATE_deepClone","forEach","n","__PRIVATE_isMaxValue","__PRIVATE_valuesGetLowerBound","ne","DatabaseId","DocumentKey","fail","__PRIVATE_valuesGetUpperBound","te","__PRIVATE_lowerBoundCompare","__PRIVATE_valueCompare","__PRIVATE_upperBoundCompare","ObjectValue","_ObjectValue","FieldPath$1","i","__PRIVATE_valueEquals","__PRIVATE_extractFieldMask","FieldMask","MutableDocument","_MutableDocument","s","o","SnapshotVersion","Bound","__PRIVATE_boundCompareToDocument","r","__PRIVATE_boundEquals","OrderBy","__PRIVATE_orderByEquals","Filter","FieldFilter","_FieldFilter","__PRIVATE_KeyFieldFilter","__PRIVATE_ArrayContainsFilter","__PRIVATE_InFilter","__PRIVATE_NotInFilter","__PRIVATE_ArrayContainsAnyFilter","__PRIVATE_KeyFieldInFilter","__PRIVATE_KeyFieldNotInFilter","__PRIVATE_typeOrder","CompositeFilter","_CompositeFilter","__PRIVATE_compositeFilterIsConjunction","__PRIVATE_compositeFilterIsDisjunction","__PRIVATE_compositeFilterIsFlatConjunction","__PRIVATE_compositeFilterIsFlat","__PRIVATE_canonifyFilter","canonicalId","__PRIVATE_filterEquals","__PRIVATE_compositeFilterWithAddedFilters","__PRIVATE_stringifyFilter","__PRIVATE_extractDocumentKeysFromArrayValue","__PRIVATE_arrayValueContains","__PRIVATE_TargetImpl","__PRIVATE_newTarget","__PRIVATE_canonifyTarget","__PRIVATE_debugCast","__PRIVATE_isNullOrUndefined","__PRIVATE_targetEquals","__PRIVATE_targetIsDocumentTarget","__PRIVATE_targetGetFieldFiltersForPath","__PRIVATE_targetGetAscendingBound","__PRIVATE_targetGetDescendingBound","__PRIVATE_QueryImpl","_","__PRIVATE_newQuery","__PRIVATE_newQueryForPath","__PRIVATE_queryMatchesAllDocuments","__PRIVATE_isCollectionGroupQuery","__PRIVATE_queryNormalizedOrderBy","SortedSet","__PRIVATE_queryToTarget","__PRIVATE__queryToTarget","__PRIVATE_queryWithAddedFilter","__PRIVATE_queryWithLimit","__PRIVATE_queryEquals","__PRIVATE_canonifyQuery","__PRIVATE_stringifyQuery","__PRIVATE_queryMatches","__PRIVATE_queryCollectionGroup","__PRIVATE_newQueryComparator","__PRIVATE_compareDocs","ObjectMap","isEmpty","re","SortedMap","__PRIVATE_mutableDocumentMap","ie","documentMap","__PRIVATE_convertOverlayedDocumentMapToDocumentMap","__PRIVATE_newOverlayMap","__PRIVATE_newDocumentKeyMap","__PRIVATE_newMutationMap","se","oe","__PRIVATE_documentKeySet","_e","__PRIVATE_primitiveComparator","__PRIVATE_targetIdSet","__PRIVATE_toDouble","__PRIVATE_isNegativeZero","__PRIVATE_toInteger","toNumber","isSafeInteger","TransformOperation","__PRIVATE_applyTransformOperationToLocalView","__PRIVATE_ServerTimestampTransform","__PRIVATE_isServerTimestamp","__PRIVATE_getPreviousValue","__PRIVATE_ArrayUnionTransformOperation","__PRIVATE_applyArrayUnionTransformOperation","__PRIVATE_ArrayRemoveTransformOperation","__PRIVATE_applyArrayRemoveTransformOperation","__PRIVATE_computeTransformOperationBaseValue","asNumber","__PRIVATE_applyTransformOperationToRemoteDocument","__PRIVATE_NumericIncrementTransformOperation","__PRIVATE_coercedFieldValuesArray","__PRIVATE_normalizeNumber","FieldTransform","__PRIVATE_fieldTransformEquals","__PRIVATE_arrayEquals","MutationResult","Precondition","_Precondition","__PRIVATE_preconditionIsValidForDocument","Mutation","__PRIVATE_calculateOverlayMutation","__PRIVATE_DeleteMutation","__PRIVATE_SetMutation","__PRIVATE_PatchMutation","__PRIVATE_mutationApplyToRemoteDocument","__PRIVATE_serverTransformResults","__PRIVATE_getPatch","__PRIVATE_mutationApplyToLocalView","__PRIVATE_localTransformResults","__PRIVATE_mutationExtractBaseValue","__PRIVATE_mutationEquals","__PRIVATE_hardAssert","__PRIVATE_VerifyMutation","MutationBatch","MutationBatchResult","_MutationBatchResult","Overlay","ExistenceFilter","ae","ue","__PRIVATE_isPermanentError","e","fail","D","__PRIVATE_mapCodeFromRpcCode","__PRIVATE_logError","ce","__PRIVATE_newTextEncoder","le","Integer","__PRIVATE_getMd5HashValue","t","n","Md5","__PRIVATE_get64BitUints","r","i","s","BloomFilter","_BloomFilter","__PRIVATE_BloomFilterError","RemoteEvent","_RemoteEvent","TargetChange","SnapshotVersion","SortedMap","__PRIVATE_primitiveComparator","__PRIVATE_mutableDocumentMap","__PRIVATE_documentKeySet","_TargetChange","__PRIVATE_DocumentWatchChange","__PRIVATE_ExistenceFilterChange","__PRIVATE_WatchTargetChange","ByteString","__PRIVATE_TargetState","__PRIVATE_snapshotChangesMap","__PRIVATE_hardAssert","__PRIVATE_WatchChangeAggregator","__PRIVATE_documentTargetMap","__PRIVATE_targetIsDocumentTarget","DocumentKey","MutableDocument","o","_","a","u","c","l","h","__PRIVATE_normalizeByteString","__PRIVATE_Base64DecodeError","__PRIVATE_logWarn","SortedSet","__PRIVATE_logDebug","he","Pe","Ie","JsonProtoSerializer","__PRIVATE_toInt32Proto","__PRIVATE_isNullOrUndefined","toTimestamp","__PRIVATE_toBytes","__PRIVATE_toVersion","__PRIVATE_fromVersion","__PRIVATE_normalizeTimestamp","Timestamp","__PRIVATE_toResourceName","ResourcePath","__PRIVATE_fromResourceName","__PRIVATE_isValidResourceName","__PRIVATE_toName","fromName","FirestoreError","__PRIVATE_extractLocalPathFromResourceName","__PRIVATE_toQueryPath","__PRIVATE_fromQueryPath","__PRIVATE_getEncodedDatabaseId","__PRIVATE_toMutationDocument","__PRIVATE_fromDocument","ObjectValue","__PRIVATE_fromBatchGetDocumentsResponse","__PRIVATE_fromWatchChange","toMutation","__PRIVATE_SetMutation","__PRIVATE_DeleteMutation","__PRIVATE_PatchMutation","__PRIVATE_toDocumentMask","__PRIVATE_VerifyMutation","__PRIVATE_ServerTimestampTransform","__PRIVATE_ArrayUnionTransformOperation","__PRIVATE_ArrayRemoveTransformOperation","__PRIVATE_NumericIncrementTransformOperation","__PRIVATE_fromMutation","Precondition","FieldPath$1","FieldTransform","FieldMask","__PRIVATE_fromWriteResults","MutationResult","__PRIVATE_toDocumentsTarget","__PRIVATE_toQueryTarget","__PRIVATE_toFilter","CompositeFilter","__PRIVATE_toFieldPathReference","__PRIVATE_toDirection","__PRIVATE_convertQueryTargetToQuery","__PRIVATE_fromFilter","__PRIVATE_compositeFilterIsFlatConjunction","OrderBy","__PRIVATE_fromFieldPathReference","Bound","__PRIVATE_newQuery","__PRIVATE_toListenRequestLabels","FieldFilter","__PRIVATE_toOperatorName","__PRIVATE_toCompositeOperatorName","__PRIVATE_isNanValue","__PRIVATE_isNullValue","TargetData","_TargetData","__PRIVATE_LocalSerializer","__PRIVATE_fromDbRemoteDocument","__PRIVATE_fromDbTimestamp","__PRIVATE_toDbRemoteDocument","__PRIVATE_toDbTimestampKey","__PRIVATE_toDbTimestamp","__PRIVATE_fromDbMutationBatch","MutationBatch","__PRIVATE_fromDbTarget","__PRIVATE_queryToTarget","__PRIVATE_newQueryForPath","__PRIVATE_toDbTarget","__PRIVATE_canonifyTarget","__PRIVATE_fromBundledQuery","__PRIVATE_queryWithLimit","__PRIVATE_fromDbDocumentOverlay","Overlay","__PRIVATE_toDbDocumentOverlayKey","__PRIVATE_encodeResourcePath","__PRIVATE_toDbIndexState","__PRIVATE_IndexedDbBundleCache","__PRIVATE_bundlesStore","__PRIVATE_namedQueriesStore","__PRIVATE_getStore","__PRIVATE_IndexedDbDocumentOverlayCache","___PRIVATE_IndexedDbDocumentOverlayCache","__PRIVATE_documentOverlayStore","__PRIVATE_newOverlayMap","PersistencePromise","__PRIVATE_FirestoreIndexValueWriter","__PRIVATE_normalizeNumber","__PRIVATE_isNegativeZero","__PRIVATE_isMaxValue","__PRIVATE_numberOfLeadingZerosInByte","__PRIVATE_unsignedNumLength","__PRIVATE_OrderedCodeWriter","__PRIVATE_AscendingIndexByteEncoder","__PRIVATE_DescendingIndexByteEncoder","__PRIVATE_IndexByteEncoder","__PRIVATE_IndexEntry","___PRIVATE_IndexEntry","__PRIVATE_indexEntryComparator","__PRIVATE_compareByteArrays","__PRIVATE_TargetIndexMatcher","__PRIVATE_fieldIndexGetArraySegment","__PRIVATE_fieldIndexGetDirectionalSegments","IndexSegment","FieldIndex","IndexState","__PRIVATE_computeInExpansion","__PRIVATE_InFilter","__PRIVATE_getDnfTerms","__PRIVATE_computeDistributedNormalForm","__PRIVATE_isDisjunctiveNormalForm","__PRIVATE_isSingleFieldFilter","__PRIVATE_isFlatConjunction","__PRIVATE_compositeFilterIsDisjunction","__PRIVATE_applyAssociation","__PRIVATE_compositeFilterIsConjunction","__PRIVATE_applyDistribution","__PRIVATE_applyDistributionFieldAndCompositeFilters","__PRIVATE_compositeFilterWithAddedFilters","__PRIVATE_compositeFilterIsFlat","__PRIVATE_MemoryIndexManager","__PRIVATE_MemoryCollectionParentIndex","IndexOffset","Te","__PRIVATE_IndexedDbIndexManager","ObjectMap","__PRIVATE_targetEquals","__PRIVATE_collectionParentsStore","__PRIVATE_immediateSuccessor","__PRIVATE_decodeResourcePath","__PRIVATE_indexConfigurationStore","__PRIVATE_indexStateStore","__PRIVATE_indexEntriesStore","__PRIVATE_targetGetFieldFiltersForPath","__PRIVATE_targetGetAscendingBound","__PRIVATE_targetGetDescendingBound","P","__PRIVATE_newTarget","__PRIVATE_refValue","isArray","__PRIVATE_advanceIterator","__PRIVATE_getMinOffsetFromFieldIndexes","__PRIVATE_indexOffsetComparator","Ee","LruParams","_LruParams","removeMutationBatch","__PRIVATE_newDbDocumentMutationKey","__PRIVATE_dbDocumentSize","__PRIVATE_IndexedDbMutationQueue","___PRIVATE_IndexedDbMutationQueue","__PRIVATE_mutationsStore","__PRIVATE_documentMutationsStore","x","__PRIVATE_newDbDocumentMutationPrefixForPath","__PRIVATE_mutationQueueContainsKey","__PRIVATE_mutationQueuesStore","__PRIVATE_TargetIdGenerator","___PRIVATE_TargetIdGenerator","__PRIVATE_IndexedDbTargetCache","__PRIVATE_targetsStore","__PRIVATE_globalTargetStore","__PRIVATE_documentTargetStore","__PRIVATE_bufferEntryComparator","__PRIVATE_RollingSequenceNumberBuffer","__PRIVATE_LruScheduler","__async","__PRIVATE_isIndexedDbTransactionError","__PRIVATE_ignoreIfPrimaryLeaseLoss","__PRIVATE_LruGarbageCollectorImpl","__PRIVATE_ListenSequence","__PRIVATE_getLogLevel","LogLevel","__PRIVATE_newLruGarbageCollector","__PRIVATE_IndexedDbLruDelegateImpl","__PRIVATE_writeSentinelKey","RemoteDocumentChangeBuffer","__PRIVATE_IndexedDbRemoteDocumentCacheImpl","__PRIVATE_remoteDocumentsStore","__PRIVATE_dbKey","__PRIVATE_dbKeyComparator","__PRIVATE_queryMatches","__PRIVATE_dbCollectionGroupKey","__PRIVATE_IndexedDbRemoteDocumentChangeBuffer","__PRIVATE_documentGlobalStore","__PRIVATE_newIndexedDbRemoteDocumentCache","OverlayedDocument","LocalDocumentsView","__PRIVATE_mutationApplyToLocalView","documentMap","__PRIVATE_newDocumentKeyMap","__PRIVATE_newMutationMap","__PRIVATE_calculateOverlayMutation","__PRIVATE_isCollectionGroupQuery","__PRIVATE_convertOverlayedDocumentMapToDocumentMap","__PRIVATE_QueryImpl","__PRIVATE_MemoryBundleCache","__PRIVATE_MemoryDocumentOverlayCache","__PRIVATE_ReferenceSet","__PRIVATE_DocReference","__PRIVATE_MemoryMutationQueue","__PRIVATE_MemoryRemoteDocumentCacheImpl","__PRIVATE_newIndexOffsetFromDocument","__PRIVATE_MemoryRemoteDocumentChangeBuffer","__PRIVATE_MemoryTargetCache","__PRIVATE_MemoryPersistence","__PRIVATE_MemoryTransaction","PersistenceTransaction","__PRIVATE_MemoryEagerDelegate","___PRIVATE_MemoryEagerDelegate","__PRIVATE_SchemaConverter","i","__PRIVATE_SimpleDbTransaction","e","M","__PRIVATE_createQueryCache","s","PersistencePromise","t","n","SnapshotVersion","r","G","z","j","O","N","B","K","$","U","W","__PRIVATE_dbDocumentSize","__PRIVATE_hardAssert","__PRIVATE_fromDbMutationBatch","removeMutationBatch","ResourcePath","o","__PRIVATE_encodeResourcePath","Q","__PRIVATE_MemoryCollectionParentIndex","addEntry","__PRIVATE_decodeResourcePath","__PRIVATE_fromDbTarget","__PRIVATE_toDbTarget","DocumentKey","fail","__PRIVATE_newIndexedDbRemoteDocumentCache","__PRIVATE_MemoryPersistence","__PRIVATE_MemoryEagerDelegate","__PRIVATE_documentKeySet","User","__PRIVATE_IndexedDbDocumentOverlayCache","a","__PRIVATE_IndexedDbMutationQueue","LocalDocumentsView","__PRIVATE_IndexedDbTransaction","__PRIVATE_ListenSequence","k","q","L","de","__PRIVATE_IndexedDbPersistence","___PRIVATE_IndexedDbPersistence","_","u","c","FirestoreError","D","__PRIVATE_IndexedDbLruDelegateImpl","__PRIVATE_LocalSerializer","__PRIVATE_SimpleDb","__PRIVATE_IndexedDbTargetCache","__PRIVATE_IndexedDbBundleCache","__PRIVATE_logError","__async","__PRIVATE_clientMetadataStore","__PRIVATE_isIndexedDbTransactionError","__PRIVATE_logDebug","__PRIVATE_primaryClientStore","__PRIVATE_getStore","__PRIVATE_IndexedDbIndexManager","X","Z","Y","J","H","v","isSafari","__PRIVATE_indexedDbStoragePrefix","__PRIVATE_LocalViewChanges","___PRIVATE_LocalViewChanges","QueryContext","__PRIVATE_QueryEngine","__PRIVATE_getLogLevel","LogLevel","__PRIVATE_stringifyQuery","__PRIVATE_queryToTarget","__PRIVATE_queryMatchesAllDocuments","__PRIVATE_queryWithLimit","__PRIVATE_newIndexOffsetSuccessorFromReadTime","SortedSet","__PRIVATE_newQueryComparator","__PRIVATE_queryMatches","IndexOffset","__PRIVATE_LocalStoreImpl","SortedMap","__PRIVATE_primitiveComparator","ObjectMap","__PRIVATE_canonifyTarget","__PRIVATE_targetEquals","__PRIVATE_newLocalStore","__PRIVATE_localStoreHandleUserChange","__PRIVATE_debugCast","__PRIVATE_localStoreAcknowledgeBatch","__PRIVATE_localStoreGetLastRemoteSnapshotVersion","__PRIVATE_localStoreApplyRemoteEventToLocalCache","ByteString","__PRIVATE_mutableDocumentMap","__PRIVATE_populateDocumentChangeBuffer","__PRIVATE_localStoreGetNextMutationBatch","__PRIVATE_localStoreAllocateTarget","TargetData","__PRIVATE_localStoreReleaseTarget","__PRIVATE_localStoreExecuteQuery","__PRIVATE_setMaxReadTime","__PRIVATE_queryCollectionGroup","__PRIVATE_localStoreGetCachedTarget","__PRIVATE_localStoreGetNewDocumentChanges","__PRIVATE_localStoreApplyBundledDocuments","__PRIVATE_newQueryForPath","__PRIVATE_localStoreSaveNamedQuery","_0","_1","__PRIVATE_fromBundledQuery","__PRIVATE_fromVersion","createWebStorageClientStateKey","createWebStorageMutationBatchKey","createWebStorageQueryTargetMetadataKey","__PRIVATE_MutationMetadata","___PRIVATE_MutationMetadata","__PRIVATE_QueryTargetMetadata","___PRIVATE_QueryTargetMetadata","__PRIVATE_RemoteClientState","___PRIVATE_RemoteClientState","__PRIVATE_targetIdSet","isSafeInteger","__PRIVATE_SharedOnlineState","___PRIVATE_SharedOnlineState","__PRIVATE_LocalClientState","__PRIVATE_WebStorageSharedClientState","__PRIVATE_MemorySharedClientState","__PRIVATE_NoopConnectivityMonitor","__PRIVATE_BrowserConnectivityMonitor","Ae","__PRIVATE_generateUniqueDebugId","Re","__PRIVATE_StreamBridge","Ve","__PRIVATE_WebChannelConnection","__PRIVATE_logWarn","S","XhrIo","EventType","ErrorCode","createWebChannelTransport","getStatEventTarget","l","h","P","__PRIVATE_unguardedEventListen","WebChannel","ae","__PRIVATE_mapCodeFromRpcCode","Event","Stat","__PRIVATE_getWindow","getDocument","__PRIVATE_newSerializer","JsonProtoSerializer","__PRIVATE_ExponentialBackoff","__PRIVATE_PersistentStream","__PRIVATE_PersistentListenStream","__PRIVATE_fromWatchChange","__PRIVATE_getEncodedDatabaseId","__PRIVATE_targetIsDocumentTarget","__PRIVATE_toDocumentsTarget","__PRIVATE_toQueryTarget","__PRIVATE_toBytes","__PRIVATE_toInt32Proto","toTimestamp","__PRIVATE_toListenRequestLabels","__PRIVATE_PersistentWriteStream","__PRIVATE_fromWriteResults","toMutation","__PRIVATE_DatastoreImpl","__PRIVATE_OnlineStateTracker","__PRIVATE_logError","__PRIVATE_logDebug","__PRIVATE_RemoteStoreImpl","i","e","__async","__PRIVATE_canUseNetwork","t","__PRIVATE_debugCast","__PRIVATE_disableNetworkInternal","__PRIVATE_enableNetworkInternal","__PRIVATE_remoteStoreListen","n","__PRIVATE_shouldStartWatchStream","__PRIVATE_startWatchStream","__PRIVATE_ensureWatchStream","__PRIVATE_sendWatchRequest","__PRIVATE_remoteStoreUnlisten","r","__PRIVATE_sendUnwatchRequest","SnapshotVersion","__PRIVATE_WatchChangeAggregator","__PRIVATE_cleanUpWatchStreamState","__PRIVATE_onWatchStreamOpen","__PRIVATE_onWatchStreamClose","__PRIVATE_onWatchStreamChange","__PRIVATE_WatchTargetChange","__PRIVATE_disableNetworkUntilRecovery","__PRIVATE_DocumentWatchChange","__PRIVATE_ExistenceFilterChange","__PRIVATE_localStoreGetLastRemoteSnapshotVersion","ByteString","TargetData","__PRIVATE_isIndexedDbTransactionError","__PRIVATE_executeWithRecovery","__PRIVATE_fillWritePipeline","__PRIVATE_ensureWriteStream","__PRIVATE_canAddToWritePipeline","__PRIVATE_localStoreGetNextMutationBatch","__PRIVATE_addToWritePipeline","__PRIVATE_shouldStartWriteStream","__PRIVATE_startWriteStream","__PRIVATE_onWriteStreamOpen","__PRIVATE_onWriteHandshakeComplete","__PRIVATE_onMutationResult","MutationBatchResult","__PRIVATE_onWriteStreamClose","__PRIVATE_isPermanentError","D","__PRIVATE_remoteStoreHandleCredentialChange","__PRIVATE_remoteStoreApplyPrimaryState","__PRIVATE_PersistentListenStream","__PRIVATE_PersistentWriteStream","DelayedOperation","_DelayedOperation","__PRIVATE_Deferred","s","o","FirestoreError","__PRIVATE_wrapInUserErrorIfRecoverable","DocumentSet","_DocumentSet","DocumentKey","documentMap","SortedMap","__PRIVATE_DocumentChangeSet","fail","ViewSnapshot","_ViewSnapshot","_","a","__PRIVATE_queryEquals","__PRIVATE_QueryListenersInfo","__PRIVATE_EventManagerImpl","ObjectMap","__PRIVATE_canonifyQuery","__PRIVATE_eventManagerListen","__PRIVATE_stringifyQuery","__PRIVATE_raiseSnapshotsInSyncEvent","__PRIVATE_eventManagerUnlisten","__PRIVATE_eventManagerOnWatchChange","__PRIVATE_eventManagerOnWatchError","__PRIVATE_QueryListener","__PRIVATE_SizedBundleElement","__PRIVATE_BundleConverterImpl","fromName","__PRIVATE_fromDocument","MutableDocument","__PRIVATE_fromVersion","__PRIVATE_BundleLoader","__PRIVATE_bundleInitialProgress","ResourcePath","__PRIVATE_documentKeySet","__PRIVATE_localStoreApplyBundledDocuments","__PRIVATE_localStoreSaveNamedQuery","__PRIVATE_AddedLimboDocument","__PRIVATE_RemovedLimboDocument","__PRIVATE_View","__PRIVATE_newQueryComparator","u","c","__PRIVATE_queryMatches","l","h","P","order","__PRIVATE_QueryView","LimboResolution","__PRIVATE_SyncEngineImpl","__PRIVATE_ReferenceSet","__PRIVATE_TargetIdGenerator","__PRIVATE_syncEngineListen","__PRIVATE_ensureWatchCallbacks","__PRIVATE_localStoreAllocateTarget","__PRIVATE_queryToTarget","__PRIVATE_initializeViewAndComputeSnapshot","__PRIVATE_localStoreExecuteQuery","__PRIVATE_updateTrackedLimbos","TargetChange","__PRIVATE_syncEngineUnlisten","__PRIVATE_localStoreReleaseTarget","__PRIVATE_removeAndCleanupTarget","__PRIVATE_ignoreIfPrimaryLeaseLoss","__PRIVATE_syncEngineWrite","__PRIVATE_syncEngineEnsureWriteCallbacks","Timestamp","__PRIVATE_mutableDocumentMap","__PRIVATE_mutationExtractBaseValue","__PRIVATE_PatchMutation","__PRIVATE_extractFieldMask","Precondition","__PRIVATE_convertOverlayedDocumentMapToDocumentMap","__PRIVATE_primitiveComparator","__PRIVATE_syncEngineEmitNewSnapsAndNotifyLocalStore","__PRIVATE_syncEngineApplyRemoteEvent","__PRIVATE_localStoreApplyRemoteEventToLocalCache","__PRIVATE_hardAssert","__PRIVATE_syncEngineApplyOnlineStateChange","__PRIVATE_syncEngineRejectListen","RemoteEvent","__PRIVATE_pumpEnqueuedLimboResolutions","__PRIVATE_syncEngineApplySuccessfulWrite","__PRIVATE_localStoreAcknowledgeBatch","__PRIVATE_processUserCallback","__PRIVATE_triggerPendingWritesCallbacks","__PRIVATE_syncEngineRejectFailedWrite","__PRIVATE_syncEngineRegisterPendingWritesCallback","__PRIVATE_removeLimboTarget","__PRIVATE_trackLimboChange","__PRIVATE_newQueryForPath","__PRIVATE_ListenSequence","__PRIVATE_LocalViewChanges","PersistencePromise","__PRIVATE_syncEngineHandleCredentialChange","__PRIVATE_localStoreHandleUserChange","__PRIVATE_syncEngineGetRemoteKeysForTarget","__PRIVATE_synchronizeViewAndComputeSnapshot","__PRIVATE_syncEngineSynchronizeWithChangedDocuments","__PRIVATE_localStoreGetNewDocumentChanges","__PRIVATE_syncEngineApplyBatchState","__PRIVATE_syncEngineApplyPrimaryState","__PRIVATE_synchronizeQueryViewsAndRaiseSnapshots","__PRIVATE_localStoreGetCachedTarget","__PRIVATE_synthesizeTargetToQuery","__PRIVATE_newQuery","__PRIVATE_syncEngineGetActiveClients","__PRIVATE_syncEngineApplyTargetState","__PRIVATE_queryCollectionGroup","__PRIVATE_syncEngineApplyActiveTargetsChange","__PRIVATE_syncEngineLoadBundle","__PRIVATE_logWarn","MemoryOfflineComponentProvider","__PRIVATE_newSerializer","__PRIVATE_newLocalStore","__PRIVATE_QueryEngine","__PRIVATE_MemoryPersistence","__PRIVATE_MemoryEagerDelegate","__PRIVATE_MemorySharedClientState","__PRIVATE_IndexedDbOfflineComponentProvider","___PRIVATE_IndexedDbOfflineComponentProvider","MemoryOfflineComponentProvider","__async","__superGet","__PRIVATE_syncEngineEnsureWriteCallbacks","__PRIVATE_fillWritePipeline","__PRIVATE_newLocalStore","__PRIVATE_QueryEngine","__PRIVATE_LruScheduler","__PRIVATE_IndexBackfiller","__PRIVATE_IndexBackfillerScheduler","__PRIVATE_indexedDbStoragePrefix","LruParams","__PRIVATE_IndexedDbPersistence","__PRIVATE_getWindow","getDocument","__PRIVATE_MemorySharedClientState","__PRIVATE_MultiTabOfflineComponentProvider","___PRIVATE_MultiTabOfflineComponentProvider","__PRIVATE_WebStorageSharedClientState","__PRIVATE_syncEngineApplyBatchState","__PRIVATE_syncEngineApplyTargetState","__PRIVATE_syncEngineApplyActiveTargetsChange","__PRIVATE_syncEngineGetActiveClients","__PRIVATE_syncEngineSynchronizeWithChangedDocuments","e","__PRIVATE_syncEngineApplyPrimaryState","FirestoreError","D","OnlineComponentProvider","__PRIVATE_syncEngineApplyOnlineStateChange","__PRIVATE_syncEngineHandleCredentialChange","__PRIVATE_remoteStoreApplyPrimaryState","__PRIVATE_EventManagerImpl","__PRIVATE_newSerializer","__PRIVATE_WebChannelConnection","t","n","r","__PRIVATE_DatastoreImpl","i","__PRIVATE_RemoteStoreImpl","__PRIVATE_BrowserConnectivityMonitor","__PRIVATE_NoopConnectivityMonitor","s","o","_","__PRIVATE_SyncEngineImpl","__PRIVATE_debugCast","__PRIVATE_logDebug","__PRIVATE_disableNetworkInternal","__PRIVATE_toByteStreamReaderHelper","__PRIVATE_AsyncObserver","__PRIVATE_logError","__PRIVATE_BundleReaderImpl","__PRIVATE_Deferred","__PRIVATE_SizedBundleElement","Transaction$2","__PRIVATE_getEncodedDatabaseId","__PRIVATE_toName","__PRIVATE_fromBatchGetDocumentsResponse","__PRIVATE_hardAssert","__PRIVATE_DeleteMutation","DocumentKey","__PRIVATE_VerifyMutation","toMutation","fail","SnapshotVersion","Precondition","__PRIVATE_TransactionRunner","__PRIVATE_ExponentialBackoff","__PRIVATE_isNullOrUndefined","__PRIVATE_isPermanentError","FirestoreClient","User","__PRIVATE_AutoId","__PRIVATE_wrapInUserErrorIfRecoverable","__PRIVATE_setOfflineComponentProvider","__PRIVATE_localStoreHandleUserChange","__PRIVATE_setOnlineComponentProvider","__PRIVATE_ensureOfflineComponents","__PRIVATE_remoteStoreHandleCredentialChange","__PRIVATE_canFallbackFromIndexedDbError","__PRIVATE_logWarn","__PRIVATE_ensureOnlineComponents","__PRIVATE_getPersistence","__PRIVATE_getLocalStore","__PRIVATE_getRemoteStore","__PRIVATE_getSyncEngine","__PRIVATE_getDatastore","__PRIVATE_getEventManager","__PRIVATE_syncEngineListen","__PRIVATE_syncEngineUnlisten","__PRIVATE_firestoreClientEnableNetwork","__PRIVATE_enableNetworkInternal","__PRIVATE_firestoreClientDisableNetwork","__PRIVATE_firestoreClientGetDocumentFromLocalCache","__PRIVATE_firestoreClientGetDocumentViaSnapshotListener","__PRIVATE_eventManagerUnlisten","__PRIVATE_QueryListener","__PRIVATE_newQueryForPath","__PRIVATE_eventManagerListen","__PRIVATE_firestoreClientGetDocumentsFromLocalCache","__PRIVATE_localStoreExecuteQuery","__PRIVATE_View","__PRIVATE_firestoreClientGetDocumentsViaSnapshotListener","__PRIVATE_firestoreClientAddSnapshotsInSyncListener","__PRIVATE_firestoreClientLoadBundle","__PRIVATE_newTextEncoder","__PRIVATE_syncEngineLoadBundle","__PRIVATE_firestoreClientGetNamedQuery","__PRIVATE_cloneLongPollingOptions","e","t","me","__PRIVATE_validateNonEmptyArgument","n","FirestoreError","D","__PRIVATE_validateIsNotUsedTogether","r","__PRIVATE_validateDocumentPath","DocumentKey","__PRIVATE_validateCollectionPath","__PRIVATE_valueDescription","fail","__PRIVATE_cast","__PRIVATE_validatePositiveNumber","FirestoreSettingsImpl","Firestore$1","__PRIVATE_EmptyAuthCredentialsProvider","__PRIVATE_FirstPartyAuthCredentialsProvider","__PRIVATE_logDebug","connectFirestoreEmulator","i","s","__PRIVATE_logWarn","User","createMockUserToken","__PRIVATE_EmulatorAuthCredentialsProvider","__PRIVATE_OAuthToken","Query","_Query","DocumentReference","_DocumentReference","CollectionReference","_CollectionReference","__PRIVATE_newQueryForPath","collection","getModularInstance","ResourcePath","collectionGroup","__PRIVATE_QueryImpl","doc","__PRIVATE_AutoId","refEqual","queryEqual","__PRIVATE_queryEquals","__PRIVATE_AsyncQueueImpl","__PRIVATE_ExponentialBackoff","getDocument","__PRIVATE_Deferred","__async","__PRIVATE_isIndexedDbTransactionError","__PRIVATE_logError","DelayedOperation","__PRIVATE_isPartialObserver","LoadBundleTask","fe","Firestore","__PRIVATE_configureFirestore","getFirestore","t","n","r","getApp","i","s","_getProvider","e","getDefaultEmulatorHostnameAndPort","connectFirestoreEmulator","ensureFirestoreConfigured","__PRIVATE_configureFirestore","DatabaseInfo","__PRIVATE_cloneLongPollingOptions","FirestoreClient","enableIndexedDbPersistence","__PRIVATE_verifyNotInitialized","__PRIVATE_cast","Firestore","FirestoreError","D","__PRIVATE_logWarn","OnlineComponentProvider","__PRIVATE_setPersistenceProviders","__PRIVATE_IndexedDbOfflineComponentProvider","enableMultiTabIndexedDbPersistence","__PRIVATE_MultiTabOfflineComponentProvider","__PRIVATE_Deferred","__async","__PRIVATE_setOfflineComponentProvider","__PRIVATE_setOnlineComponentProvider","__PRIVATE_canFallbackFromIndexedDbError","clearIndexedDbPersistence","__PRIVATE_SimpleDb","__PRIVATE_indexedDbStoragePrefix","waitForPendingWrites","__PRIVATE_syncEngineRegisterPendingWritesCallback","__PRIVATE_getSyncEngine","enableNetwork","__PRIVATE_firestoreClientEnableNetwork","disableNetwork","__PRIVATE_firestoreClientDisableNetwork","loadBundle","e","t","n","ensureFirestoreConfigured","__PRIVATE_cast","Firestore","r","LoadBundleTask","__PRIVATE_firestoreClientLoadBundle","namedQuery","__PRIVATE_firestoreClientGetNamedQuery","Query","__PRIVATE_verifyNotInitialized","FirestoreError","D","Bytes","_Bytes","ByteString","e","FirestoreError","D","FieldPath","FieldPath$1","FieldValue","GeoPoint","FirestoreError","D","__PRIVATE_primitiveComparator","ge","ParsedSetData","__PRIVATE_PatchMutation","__PRIVATE_SetMutation","ParsedUpdateData","__PRIVATE_isWrite","e","fail","__PRIVATE_ParseContextImpl","___PRIVATE_ParseContextImpl","i","s","__PRIVATE_createError","__PRIVATE_UserDataReader","__PRIVATE_newSerializer","FieldPath$1","__PRIVATE_newUserDataReader","t","n","__PRIVATE_parseSetData","r","__PRIVATE_validatePlainObject","_","__PRIVATE_parseObject","a","u","FieldMask","__PRIVATE_fieldPathFromArgument$1","__PRIVATE_fieldMaskContains","ObjectValue","__PRIVATE_DeleteFieldValueImpl","___PRIVATE_DeleteFieldValueImpl","__PRIVATE_createSentinelChildContext","__PRIVATE_ServerTimestampFieldValueImpl","___PRIVATE_ServerTimestampFieldValueImpl","FieldTransform","__PRIVATE_ServerTimestampTransform","__PRIVATE_ArrayUnionFieldValueImpl","__PRIVATE_parseData","__PRIVATE_ArrayUnionTransformOperation","__PRIVATE_ArrayRemoveFieldValueImpl","__PRIVATE_ArrayRemoveTransformOperation","__PRIVATE_NumericIncrementFieldValueImpl","__PRIVATE_NumericIncrementTransformOperation","toNumber","__PRIVATE_parseUpdateData","forEach","__PRIVATE_fieldPathFromDotSeparatedString","getModularInstance","__PRIVATE_parseUpdateVarargs","c","l","__PRIVATE_parseQueryValue","__PRIVATE_looksLikeJsonObject","Timestamp","toTimestamp","Bytes","__PRIVATE_toBytes","DocumentReference","__PRIVATE_toResourceName","__PRIVATE_valueDescription","isEmpty","FieldPath","pe","DocumentSnapshot$1","QueryDocumentSnapshot$1","__PRIVATE_fieldPathFromArgument","__PRIVATE_validateHasExplicitOrderByForLimitToLast","AppliableConstraint","QueryConstraint","query","QueryCompositeFilterConstraint","QueryFieldFilterConstraint","_QueryFieldFilterConstraint","__PRIVATE_validateNewFieldFilter","Query","__PRIVATE_queryWithAddedFilter","o","__PRIVATE_validateDisjunctiveFilterElements","__PRIVATE_parseDocumentIdValue","FieldFilter","where","_QueryCompositeFilterConstraint","CompositeFilter","QueryOrderByConstraint","_QueryOrderByConstraint","QueryConstraint","e","t","n","FirestoreError","D","OrderBy","Query","__PRIVATE_QueryImpl","orderBy","r","__PRIVATE_fieldPathFromArgument","QueryLimitConstraint","_QueryLimitConstraint","__PRIVATE_queryWithLimit","limit","__PRIVATE_validatePositiveNumber","limitToLast","QueryStartAtConstraint","_QueryStartAtConstraint","__PRIVATE_newQueryBoundFromDocOrFields","startAt","startAfter","QueryEndAtConstraint","_QueryEndAtConstraint","endBefore","endAt","getModularInstance","DocumentSnapshot$1","i","s","__PRIVATE_queryNormalizedOrderBy","__PRIVATE_refValue","__PRIVATE_isServerTimestamp","Bound","__PRIVATE_newUserDataReader","o","_","a","__PRIVATE_isCollectionGroupQuery","ResourcePath","DocumentKey","__PRIVATE_parseQueryValue","__PRIVATE_parseDocumentIdValue","DocumentReference","__PRIVATE_valueDescription","__PRIVATE_validateDisjunctiveFilterElements","__PRIVATE_validateNewFieldFilter","AbstractUserDataWriter","__PRIVATE_typeOrder","__PRIVATE_normalizeNumber","__PRIVATE_normalizeByteString","fail","forEach","e","r","GeoPoint","__PRIVATE_getPreviousValue","__PRIVATE_getLocalWriteTime","__PRIVATE_normalizeTimestamp","Timestamp","ResourcePath","__PRIVATE_hardAssert","__PRIVATE_isValidResourceName","DatabaseId","i","DocumentKey","__PRIVATE_logError","__PRIVATE_applyFirestoreDataConverter","t","n","__PRIVATE_LiteUserDataWriter","Bytes","DocumentReference","SnapshotMetadata","DocumentSnapshot","DocumentSnapshot$1","i","s","QueryDocumentSnapshot","__PRIVATE_fieldPathFromArgument","QuerySnapshot","FirestoreError","D","e","t","n","r","__PRIVATE_resultChangeType","fail","snapshotEqual","queryEqual","getDoc","__PRIVATE_cast","DocumentReference","Firestore","__PRIVATE_firestoreClientGetDocumentViaSnapshotListener","ensureFirestoreConfigured","__PRIVATE_convertToDocSnapshot","__PRIVATE_ExpUserDataWriter","AbstractUserDataWriter","Bytes","getDocFromCache","__PRIVATE_firestoreClientGetDocumentFromLocalCache","getDocFromServer","getDocs","Query","__PRIVATE_validateHasExplicitOrderByForLimitToLast","__PRIVATE_firestoreClientGetDocumentsViaSnapshotListener","getDocsFromCache","__PRIVATE_firestoreClientGetDocumentsFromLocalCache","getDocsFromServer","setDoc","__PRIVATE_applyFirestoreDataConverter","executeWrite","__PRIVATE_parseSetData","__PRIVATE_newUserDataReader","Precondition","updateDoc","getModularInstance","FieldPath","__PRIVATE_parseUpdateVarargs","__PRIVATE_parseUpdateData","deleteDoc","__PRIVATE_DeleteMutation","addDoc","doc","onSnapshot","__PRIVATE_isPartialObserver","_","a","u","c","__PRIVATE_newQueryForPath","__PRIVATE_AsyncObserver","__PRIVATE_QueryListener","__async","__PRIVATE_eventManagerListen","__PRIVATE_getEventManager","__PRIVATE_eventManagerUnlisten","onSnapshotsInSync","__PRIVATE_firestoreClientAddSnapshotsInSyncListener","__PRIVATE_Deferred","__PRIVATE_syncEngineWrite","__PRIVATE_getSyncEngine","ye","WriteBatch","__PRIVATE_newUserDataReader","__PRIVATE_validateReference","i","__PRIVATE_applyFirestoreDataConverter","s","__PRIVATE_parseSetData","Precondition","getModularInstance","FieldPath","__PRIVATE_parseUpdateVarargs","__PRIVATE_parseUpdateData","__PRIVATE_DeleteMutation","FirestoreError","D","e","t","Transaction","n","__PRIVATE_LiteUserDataWriter","fail","r","DocumentSnapshot$1","__PRIVATE_ExpUserDataWriter","DocumentSnapshot","SnapshotMetadata","runTransaction","__PRIVATE_cast","Firestore","__PRIVATE_Deferred","__async","__PRIVATE_getDatastore","__PRIVATE_TransactionRunner","ensureFirestoreConfigured","deleteField","__PRIVATE_DeleteFieldValueImpl","serverTimestamp","__PRIVATE_ServerTimestampFieldValueImpl","arrayUnion","__PRIVATE_ArrayUnionFieldValueImpl","arrayRemove","__PRIVATE_ArrayRemoveFieldValueImpl","increment","__PRIVATE_NumericIncrementFieldValueImpl","e","S","SDK_VERSION","_registerComponent","Component","n","r","i","Firestore","__PRIVATE_FirebaseAuthCredentialsProvider","__PRIVATE_FirebaseAppCheckTokenProvider","t","FirestoreError","D","DatabaseId","registerVersion","w","name","version","validateSetOptions","methodName","options","FirestoreError","assertUint8ArrayAvailable","assertBase64Available","__PRIVATE_isBase64Available","Blob","_Blob","_delegate","base64","Bytes","array","other","isPartialObserver","obj","implementsAnyMethods","methods","object","method","IndexedDbPersistenceProvider","firestore","forceOwnership","enableIndexedDbPersistence","enableMultiTabIndexedDbPersistence","clearIndexedDbPersistence","Firestore","databaseIdOrApp","_persistenceProvider","DatabaseId","settingsLiteral","currentSettings","__PRIVATE_logWarn","host","port","connectFirestoreEmulator","enableNetwork","disableNetwork","settings","synchronizeTabs","experimentalForceOwningTab","__PRIVATE_validateIsNotUsedTogether","waitForPendingWrites","arg","onSnapshotsInSync","pathString","CollectionReference","collection","e","replaceFunctionName","DocumentReference","doc","collectionId","Query","collectionGroup","updateFunction","runTransaction","transaction","Transaction","ensureFirestoreConfigured","WriteBatch","mutations","executeWrite","bundleData","loadBundle","namedQuery","expQuery","UserDataWriter","AbstractUserDataWriter","bytes","key","setLogLevel","level","_firestore","documentRef","ref","castReference","result","DocumentSnapshot","data","dataOrField","value","moreFieldsAndValues","FirestoreDataConverter","_FirestoreDataConverter","_userDataWriter","snapshot","expSnapshot","QueryDocumentSnapshot","modelObject","converter","converterMapByFirestore","untypedConverterByConverter","instance","_DocumentReference","path","DocumentKey","getModularInstance","refEqual","setDoc","fieldOrUpdateData","updateDoc","deleteDoc","args","extractSnapshotOptions","observer","wrapObserver","onSnapshot","snap","getDocFromCache","getDocFromServer","getDoc","original","updated","wrapper","_a","_b","userObserver","val","fieldPath","snapshotEqual","__PRIVATE_debugAssert","_Query","opStr","query","where","directionStr","orderBy","n","limit","limitToLast","startAt","startAfter","endBefore","endAt","queryEqual","getDocsFromCache","getDocsFromServer","getDocs","QuerySnapshot","DocumentChange","docChange","callback","thisArg","_CollectionReference","docRef","documentPath","addDoc","__PRIVATE_cast","FieldPath","_FieldPath","fieldNames","FieldPath$1","FieldValue","_FieldValue","delegate","serverTimestamp","deleteField","elements","arrayUnion","arrayRemove","increment","firestoreNamespace","GeoPoint","Timestamp","fe","configureForFirebase","firebase","firestoreFactory","Component","container","app","firestoreExp","registerFirestore","_fromRef","ref","scheduler","asyncScheduler","Observable","subscriber","unsubscribe","fromRef","fromDocRef","startWith","pairwise","map","snapshots","priorPayload","payload","fromCollectionRef","AngularFirestoreDocument","afs","data","options","path","queryFn","collectionRef","query","associateQuery","AngularFirestoreCollection","keepUnstableUntilFirst","__spreadProps","__spreadValues","from","docChanges","actionTuple","priorAction","action","actions","change","currentDoc","currentIndex","docChange","d","priorDoc","sortedChanges","events","scan","current","changes","combineChanges","it","distinctUntilChanged","c","combineChange","sliceAndSplice","original","start","deleteCount","args","returnArray","combined","copiedArray","validateEventsArray","source","filter","prior","validatedEvents","a","AngularFirestoreCollectionGroup","ENABLE_PERSISTENCE","InjectionToken","PERSISTENCE_SETTINGS","SETTINGS","USE_EMULATOR","AngularFirestore","name","shouldEnablePersistence","settings","platformId","zone","schedulers","persistenceSettings","_useEmulator","auth","useAuthEmulator","authSettings","tenantId","languageCode","useDeviceLanguage","persistence","_appCheckInstances","app","ɵfirebaseAppFactory","useEmulator","ɵauthFactory","ɵcacheInstance","firestore","isPlatformServer","enablePersistence","e","of","pathOrRef","refInZone","collectionId","queryGroupFn","collectionGroup","t","ɵɵinject","FIREBASE_OPTIONS","FIREBASE_APP_NAME","PLATFORM_ID","NgZone","ɵAngularFireSchedulers","AngularFireAuth","TENANT_ID","LANGUAGE_CODE","USE_DEVICE_LANGUAGE","PERSISTENCE","ɵAppCheckInstances","ɵɵdefineInjectable","AngularFirestoreModule","firebase","VERSION","ɵɵdefineNgModule","ɵɵdefineInjector","MODULE_IMPORTS","CommonModule","MatIconModule","MatButtonModule","RouterModule","GalaxyAlertModule","MODULE_IMPORTS","_GalaxyAlertModule","MODULE_IMPORTS","CommonModule","MatProgressSpinnerModule","GalaxyButtonLoadingIndicatorModule","MODULE_IMPORTS","_GalaxyButtonLoadingIndicatorModule","MODULE_IMPORTS","CommonModule","GalaxyEmptyStateModule","MODULE_IMPORTS","_GalaxyEmptyStateModule","ModalService","constructor","dialog","inject","MatDialog","openList","componentOrTemplateRef","open","width","height","maxWidth","maxHeight","autoFocus","openInformational","openFullscreen","factory","ɵfac","_ModalService","SCROLL_THROTTLE_MS","passiveListenerOptions","normalizePassiveListenerOptions","passive","MAT_TOOLTIP_SCROLL_STRATEGY","InjectionToken","MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY","overlay","scrollStrategies","reposition","scrollThrottle","SCROLL_THROTTLE_MS","MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER","provide","deps","Overlay","useFactory","MAT_TOOLTIP_DEFAULT_OPTIONS","providedIn","factory","MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY","showDelay","hideDelay","touchendHideDelay","AtlasTooltipModule","ATLAS_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER","imports","A11yModule","CommonModule","OverlayModule","_AtlasTooltipModule","en_devel_exports","__export","COMMON","DROPDOWN_MENU","EMAIL_VERIFICATION","LANGUAGE","MENU_TOGGLE","NOTIFICATIONS","SWITCH_LANGUAGE_MODAL","USER_LANGUAGE_MODAL","USER_SWITCHER_MODAL","VBC_NOTIFICATIONS","en_devel_default","_prodErrorMap","prodErrorMap","_prodErrorMap","_DEFAULT_AUTH_ERROR_FACTORY","ErrorFactory","logClient","Logger","_logWarn","msg","args","LogLevel","SDK_VERSION","_logError","_fail","authOrCode","rest","createErrorInternal","_createError","_errorWithCustomMessage","auth","code","message","errorMap","prodErrorMap","ErrorFactory","createErrorInternal","authOrCode","rest","code","fullParams","_DEFAULT_AUTH_ERROR_FACTORY","_assert","assertion","debugFail","failure","message","_logError","debugAssert","_isHttpOrHttps","_getCurrentScheme","_a","_isOnline","isBrowserExtension","_getUserLanguage","navigatorLanguage","Delay","shortDelay","longDelay","debugAssert","isMobileCordova","isReactNative","_emulatorUrl","config","path","url","FetchProvider","fetchImpl","headersImpl","responseImpl","debugFail","SERVER_ERROR_MAP","DEFAULT_API_TIMEOUT_MS","_addTidIfNecessary","auth","request","_performApiRequest","_0","_1","_2","_3","__async","method","customErrorMap","_performFetchWithErrorHandling","body","params","query","querystring","headers","_getFinalTarget","fetchFn","errorMap","networkTimeout","NetworkTimeout","response","json","_makeTaggedError","errorMessage","serverErrorCode","serverErrorMessage","authError","_errorWithCustomMessage","_fail","e","FirebaseError","_getFinalTarget","auth","host","path","query","base","_emulatorUrl","NetworkTimeout","auth","_","reject","_createError","DEFAULT_API_TIMEOUT_MS","_makeTaggedError","code","response","errorParams","error","deleteAccount","auth","request","__async","_performApiRequest","getAccountInfo","auth","request","__async","_performApiRequest","utcTimestampToDateString","utcTimestamp","date","getIdTokenResult","user","forceRefresh","__async","userInternal","getModularInstance","token","claims","_parseToken","_assert","firebase","signInProvider","utcTimestampToDateString","secondsStringToMilliseconds","seconds","algorithm","payload","signature","_logError","decoded","base64Decode","e","_tokenExpiresIn","parsedToken","_logoutIfInvalidated","promise","bypassAuthState","FirebaseError","isUserInvalidated","code","ProactiveRefresh","wasError","_a","interval","UserMetadata","createdAt","lastLoginAt","metadata","_reloadWithoutSaving","auth","idToken","response","getAccountInfo","coreAccount","newProviderData","extractProviderData","providerData","mergeProviderData","oldIsAnonymous","newIsAnonymous","isAnonymous","updates","reload","original","newData","o","n","providers","providerId","provider","__rest","requestStsToken","refreshToken","_performFetchWithErrorHandling","body","querystring","tokenApiHost","apiKey","url","_getFinalTarget","headers","FetchProvider","revokeToken","request","_performApiRequest","_addTidIfNecessary","StsTokenManager","_StsTokenManager","expiresIn","oldToken","accessToken","expiresInSec","appName","object","expirationTime","manager","stsTokenManager","debugFail","assertStringOrUndefined","assertion","UserImpl","_UserImpl","uid","opt","userInfo","newUser","callback","tokensRefreshed","deleteAccount","_b","_c","_d","_e","_f","_g","_h","displayName","email","phoneNumber","photoURL","tenantId","_redirectEventId","emailVerified","plainObjectTokenManager","idTokenResponse","instanceCache","_getInstance","cls","debugAssert","instance","InMemoryPersistence","key","value","_key","_listener","inMemoryPersistence","_persistenceKeyName","PersistenceUserManager","_PersistenceUserManager","persistence","userKey","config","name","blob","newPersistence","currentUser","persistenceHierarchy","availablePersistences","selectedPersistence","userToMigrate","migrationHierarchy","p","_getBrowserName","userAgent","ua","_isIEMobile","_isFirefox","_isBlackBerry","_isWebOS","_isSafari","_isChromeIOS","_isAndroid","re","matches","getUA","_getClientVersion","clientPlatform","frameworks","reportedPlatform","_getBrowserName","getUA","reportedFrameworks","SDK_VERSION","AuthMiddlewareQueue","auth","callback","onAbort","wrappedCallback","user","resolve","reject","result","e","index","nextUser","__async","onAbortStack","beforeStateCallback","_getPasswordPolicy","_0","request","_performApiRequest","_addTidIfNecessary","MINIMUM_MIN_PASSWORD_LENGTH","PasswordPolicyImpl","response","_a","_b","_c","_d","responseOptions","password","_e","_f","status","minPasswordLength","maxPasswordLength","passwordChar","i","containsLowercaseCharacter","containsUppercaseCharacter","containsNumericCharacter","containsNonAlphanumericCharacter","AuthImpl","app","heartbeatServiceProvider","appCheckServiceProvider","config","Subscription","_DEFAULT_AUTH_ERROR_FACTORY","persistenceHierarchy","popupRedirectResolver","_getInstance","PersistenceUserManager","previouslyStoredUser","futureCurrentUser","needsTocheckMiddleware","redirectUserEventId","storedUserEventId","_assert","redirectResolver","_reloadWithoutSaving","_getUserLanguage","userExtern","getModularInstance","skipBeforeStateCallbacks","persistence","passwordPolicy","errorMap","ErrorFactory","nextOrObserver","error","completed","unsubscribe","token","idToken","revokeToken","redirectManager","resolver","id","currentUid","subscription","cb","isUnsubscribed","promise","action","framework","headers","heartbeatsHeader","appCheckToken","appCheckTokenResult","_logWarn","_castAuth","createSubscribe","observer","_generateCallbackName","prefix","_initializeAuthInstance","auth","deps","persistence","hierarchy","_getInstance","_JSLOAD_CALLBACK","_generateCallbackName","NETWORK_TIMEOUT_DELAY","Delay","_POLL_WINDOW_CLOSE_TIMEOUT","Delay","EVENT_DUPLICATION_CACHE_DURATION_MS","NETWORK_TIMEOUT","Delay","PING_TIMEOUT","Delay","FIREBASE_APP_CHECK_FRAGMENT_ID","name","version","AuthInterop","auth","_a","forceRefresh","__async","listener","unsubscribe","user","_assert","getVersionForPlatform","clientPlatform","registerAuth","_registerComponent","Component","container","deps","app","heartbeatServiceProvider","appCheckServiceProvider","apiKey","authDomain","config","_getClientVersion","authInstance","AuthImpl","_initializeAuthInstance","_instanceIdentifier","_instance","_castAuth","registerVersion","DEFAULT_ID_TOKEN_MAX_AGE","authIdTokenMaxAge","getExperimentalSetting","registerAuth","AUTH_PROVIDER_NAME","AuthInstances","ɵgetAllInstancesOf","AUTH_PROVIDER_NAME","Firestore","firestore","FIRESTORE_PROVIDER_NAME","FirestoreInstances","ɵgetAllInstancesOf","PROVIDED_FIRESTORE_INSTANCES","InjectionToken","defaultFirestoreInstanceFactory","provided","defaultApp","defaultFirestore","ɵgetDefaultInstanceOf","FIRESTORE_PROVIDER_NAME","Firestore","firestoreInstanceFactory","fn","zone","injector","firestore","FIRESTORE_INSTANCES_PROVIDER","FirestoreInstances","Optional","DEFAULT_FIRESTORE_INSTANCE_PROVIDER","FirebaseApp","FirestoreModule","registerVersion","VERSION","t","ɵɵdefineNgModule","ɵɵdefineInjector","provideFirestore","deps","NgZone","Injector","ɵAngularFireSchedulers","FirebaseApps","AuthInstances","ɵAppCheckInstances","getFirestore","ɵzoneWrap","FirestoreDB","newChangeQuery","firestore","env","email","environment","Environment","PROD","query","collection","factory","ɵfac","_FirestoreDB","GalaxyPipesModule","TitleCasePipe","imports","CommonModule","_GalaxyPipesModule","firebaseConfig","apiKey","authDomain","databaseURL","projectId","storageBucket","messagingSenderId","MODULE_IMPORTS","CommonModule","GalaxyBadgeModule","MODULE_IMPORTS","_GalaxyBadgeModule","AtlasModule","FirestoreDB","ModalService","imports","CommonModule","RouterModule","AtlasTooltipModule","AngularFirestoreModule","AngularFireAuthModule","FormsModule","GalaxyAlertModule","GalaxyEmptyStateModule","MatIconModule","GalaxyButtonLoadingIndicatorModule","MatProgressSpinnerModule","MatButtonModule","MatSnackBarModule","LexiconModule","forChild","componentName","baseTranslation","MatDialogModule","GalaxyPipesModule","GalaxyBadgeModule","provideFirebaseApp","initializeApp","firebaseConfig","provideFirestore","getFirestore","getApp","_AtlasModule","materialModules","MatToolbarModule","MatIconModule","MatSidenavModule","MatButtonModule","MatMenuModule","MatRadioModule","MatBadgeModule","MatInputModule","MatChipsModule","VaProductNavModule","forRoot","ngModule","providers","VaProductNavService","RouterModule","CommonModule","FormsModule","LayoutModule","VaBreadcrumbsModule","VaFilterModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","AtlasModule","GalaxyBadgeModule","_VaProductNavModule","VaStatusBannerModule","CommonModule","MatIconModule","_VaStatusBannerModule","VaStencilsModule","CommonModule","MatCardModule","MatIconModule","MatInputModule","MatSelectModule","MatExpansionModule","MatCheckboxModule","_VaStencilsModule","MODULE_IMPORTS","CommonModule","OverlayModule","MatIconModule","MatButtonModule","GalaxyPopoverModule","MODULE_IMPORTS","_GalaxyPopoverModule","MODULE_IMPORTS","CommonModule","OverlayModule","GalaxyPopoverModule","TranslateModule","GalaxyTooltipModule","MODULE_IMPORTS","_GalaxyTooltipModule","VaButtonModule","CommonModule","RouterModule","VaIconModule","MatIconModule","MatTooltipModule","MatButtonModule","GalaxyTooltipModule","_VaButtonModule","VaCheckboxModule","CommonModule","MatCheckboxModule","_VaCheckboxModule","VaChipModule","CommonModule","MatChipsModule","_VaChipModule","VaExpandModule","CommonModule","_VaExpandModule","VaMenuModule","CommonModule","RouterModule","VaIconModule","MatIconModule","MatMenuModule","MatButtonModule","GalaxyTooltipModule","_VaMenuModule","VaMultilineModule","CommonModule","RouterModule","_VaMultilineModule","VaSwitchModule","CommonModule","MatSlideToggleModule","_VaSwitchModule","VaTableModule","CommonModule","MatButtonModule","MatIconModule","MatProgressSpinnerModule","MatCheckboxModule","MatListModule","MatCardModule","VaButtonModule","VaCheckboxModule","VaExpandModule","VaMultilineModule","VaSwitchModule","VaMenuModule","VaChipModule","TranslateModule","_VaTableModule","WelcomeModule","provide","MatDialogRef","useValue","MAT_DIALOG_DATA","imports","CommonModule","TranslateModule","LexiconModule","forChild","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","MatButtonModule","MatIconModule","MatTabsModule","MatRadioModule","MatRippleModule","MatDialogModule","MatProgressSpinnerModule","UpgradeCTADialogModule","_WelcomeModule","UIKitModule","VaCardsModule","CommonModule","VaSearchBoxModule","VaIconModule","VaTableModule","VaButtonModule","VaCheckboxModule","VaMenuModule","VaExpandModule","VaSwitchModule","VaMultilineModule","VaFilterModule","VaItemsAndStatusModule","VaMultiSelectModule","VaSearchSelectModule","VaChipModule","VaSafeHtmlModule","VaListModule","VaActionMenuModule","VaNestedSelectorModule","VaBreadcrumbsModule","VaNavModule","VaNavItemModule","VaNavItemListModule","VaProductNavModule","VaStencilsModule","CommonPipesModule","VaBadgeModule","UpgradeCTADialogModule","WelcomeModule","VaMaterialTableModule","VaFilterChipsModule","VaStatusBannerModule","ProjectMilestonesModule","VaGoalTableModule","_UIKitModule","AppComponent","selectors","decls","vars","consts","template","rf","ctx","ɵɵelementStart","ɵɵelement","ɵɵelementEnd","_AppComponent","routes","path","redirectTo","pathMatch","loadChildren","then","m","EmailVerificationModule","AccountSelectorModule","RoutingModule","RouterModule","forRoot","_RoutingModule","MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS","InjectionToken","MAT_BUTTON_TOGGLE_GROUP_DEFAULT_OPTIONS_FACTORY","GalaxyDefaultProviderOverrides","provide","MAT_CARD_CONFIG","useValue","appearance","MAT_CHECKBOX_DEFAULT_OPTIONS","color","MAT_RADIO_DEFAULT_OPTIONS","MAT_SLIDE_TOGGLE_DEFAULT_OPTIONS","MAT_TABS_CONFIG","animationDuration","stretchTabs","MAT_TOOLTIP_DEFAULT_OPTIONS","disableTooltipInteractivity","MAT_FORM_FIELD_DEFAULT_OPTIONS","MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS","hideMultipleSelectionIndicator","hideSingleSelectionIndicator","AppModule","bootstrap","AppComponent","GalaxyDefaultProviderOverrides","provide","DEFAULT_LANGUAGE","useFactory","getLocale","RECAPTCHA_V3_SITE_KEY","useValue","imports","RoutingModule","UIKitModule","CommonModule","BrowserModule","VLCCommonModule","BrowserAnimationsModule","RecaptchaV3Module","MatButtonModule","TranslateModule","GalaxyI18NModule","LexiconModule","forRoot","componentName","WEBLATE_COMPONENT_NAME","baseTranslation","baseTranslations","_AppModule","environment","globalThis","deployment","devServer","devServer","enableProdMode","platformBrowser","bootstrapModule","AppModule","catch","err","console","log"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,43,44,47,49,50,54,55,56,57,68,70,71,72,80,82,83,87,88,91,93,94,95,96,97,98,99,100,101,102,103,104,113,114,115,139]}