summaryrefslogtreecommitdiffstats
path: root/web-tools/web/_static/popperjs/popper-base.js.map
diff options
context:
space:
mode:
Diffstat (limited to 'web-tools/web/_static/popperjs/popper-base.js.map')
-rw-r--r--web-tools/web/_static/popperjs/popper-base.js.map1
1 files changed, 1 insertions, 0 deletions
diff --git a/web-tools/web/_static/popperjs/popper-base.js.map b/web-tools/web/_static/popperjs/popper-base.js.map
new file mode 100644
index 0000000..49fc9a8
--- /dev/null
+++ b/web-tools/web/_static/popperjs/popper-base.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"popper-base.js","sources":["../../src/dom-utils/getBoundingClientRect.js","../../src/dom-utils/getWindow.js","../../src/dom-utils/getWindowScroll.js","../../src/dom-utils/instanceOf.js","../../src/dom-utils/getHTMLElementScroll.js","../../src/dom-utils/getNodeScroll.js","../../src/dom-utils/getNodeName.js","../../src/dom-utils/getDocumentElement.js","../../src/dom-utils/getWindowScrollBarX.js","../../src/dom-utils/getComputedStyle.js","../../src/dom-utils/isScrollParent.js","../../src/dom-utils/getCompositeRect.js","../../src/dom-utils/getLayoutRect.js","../../src/dom-utils/getParentNode.js","../../src/dom-utils/getScrollParent.js","../../src/dom-utils/listScrollParents.js","../../src/dom-utils/isTableElement.js","../../src/dom-utils/getOffsetParent.js","../../src/enums.js","../../src/utils/orderModifiers.js","../../src/utils/debounce.js","../../src/utils/format.js","../../src/utils/validateModifiers.js","../../src/utils/uniqueBy.js","../../src/utils/getBasePlacement.js","../../src/utils/mergeByName.js","../../src/dom-utils/getViewportRect.js","../../src/dom-utils/getDocumentRect.js","../../src/dom-utils/contains.js","../../src/utils/rectToClientRect.js","../../src/dom-utils/getClippingRect.js","../../src/utils/getVariation.js","../../src/utils/getMainAxisFromPlacement.js","../../src/utils/computeOffsets.js","../../src/utils/getFreshSideObject.js","../../src/utils/mergePaddingObject.js","../../src/utils/expandToHashMap.js","../../src/utils/detectOverflow.js","../../src/createPopper.js"],"sourcesContent":["// @flow\nimport type { ClientRectObject, VirtualElement } from '../types';\n\nexport default function getBoundingClientRect(\n element: Element | VirtualElement\n): ClientRectObject {\n const rect = element.getBoundingClientRect();\n\n return {\n width: rect.width,\n height: rect.height,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left,\n x: rect.left,\n y: rect.top,\n };\n}\n","// @flow\n/*:: import type { Window } from '../types'; */\n/*:: declare function getWindow(node: Node | Window): Window; */\n\nexport default function getWindow(node) {\n if (node.toString() !== '[object Window]') {\n const ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}\n","// @flow\nimport getWindow from './getWindow';\nimport type { Window } from '../types';\n\nexport default function getWindowScroll(node: Node | Window) {\n const win = getWindow(node);\n const scrollLeft = win.pageXOffset;\n const scrollTop = win.pageYOffset;\n\n return {\n scrollLeft,\n scrollTop,\n };\n}\n","// @flow\nimport getWindow from './getWindow';\n\n/*:: declare function isElement(node: mixed): boolean %checks(node instanceof\n Element); */\n\nfunction isElement(node) {\n const OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\n/*:: declare function isHTMLElement(node: mixed): boolean %checks(node instanceof\n HTMLElement); */\n\nfunction isHTMLElement(node) {\n const OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\n/*:: declare function isShadowRoot(node: mixed): boolean %checks(node instanceof\n ShadowRoot); */\n\nfunction isShadowRoot(node) {\n const OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };\n","// @flow\n\nexport default function getHTMLElementScroll(element: HTMLElement) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop,\n };\n}\n","// @flow\nimport getWindowScroll from './getWindowScroll';\nimport getWindow from './getWindow';\nimport { isHTMLElement } from './instanceOf';\nimport getHTMLElementScroll from './getHTMLElementScroll';\nimport type { Window } from '../types';\n\nexport default function getNodeScroll(node: Node | Window) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}\n","// @flow\nimport type { Window } from '../types';\n\nexport default function getNodeName(element: ?Node | Window): ?string {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}\n","// @flow\nimport { isElement } from './instanceOf';\nimport type { Window } from '../types';\n\nexport default function getDocumentElement(\n element: Element | Window\n): HTMLElement {\n // $FlowFixMe: assume body is always available\n return ((isElement(element) ? element.ownerDocument : element.document) || window.document)\n .documentElement;\n}\n","// @flow\nimport getBoundingClientRect from './getBoundingClientRect';\nimport getDocumentElement from './getDocumentElement';\nimport getWindowScroll from './getWindowScroll';\n\nexport default function getWindowScrollBarX(element: Element): number {\n // If <html> has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on <html>\n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return (\n getBoundingClientRect(getDocumentElement(element)).left +\n getWindowScroll(element).scrollLeft\n );\n}\n","// @flow\nimport getWindow from './getWindow';\n\nexport default function getComputedStyle(\n element: Element\n): CSSStyleDeclaration {\n return getWindow(element).getComputedStyle(element);\n}\n","// @flow\nimport getComputedStyle from './getComputedStyle';\n\nexport default function isScrollParent(element: HTMLElement): boolean {\n // Firefox wants us to check `-x` and `-y` variations as well\n const { overflow, overflowX, overflowY } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}\n","// @flow\nimport type { Rect, VirtualElement, Window } from '../types';\nimport getBoundingClientRect from './getBoundingClientRect';\nimport getNodeScroll from './getNodeScroll';\nimport getNodeName from './getNodeName';\nimport { isHTMLElement } from './instanceOf';\nimport getWindowScrollBarX from './getWindowScrollBarX';\nimport getDocumentElement from './getDocumentElement';\nimport isScrollParent from './isScrollParent';\n\n// Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\nexport default function getCompositeRect(\n elementOrVirtualElement: Element | VirtualElement,\n offsetParent: Element | Window,\n isFixed: boolean = false\n): Rect {\n const documentElement = getDocumentElement(offsetParent);\n const rect = getBoundingClientRect(elementOrVirtualElement);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n\n let scroll = { scrollLeft: 0, scrollTop: 0 };\n let offsets = { x: 0, y: 0 };\n\n if (isOffsetParentAnElement || (!isOffsetParentAnElement && !isFixed)) {\n if (\n getNodeName(offsetParent) !== 'body' ||\n // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)\n ) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height,\n };\n}\n","// @flow\nimport type { Rect } from '../types';\n\n// Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\nexport default function getLayoutRect(element: HTMLElement): Rect {\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: element.offsetWidth,\n height: element.offsetHeight,\n };\n}\n","// @flow\nimport getNodeName from './getNodeName';\nimport getDocumentElement from './getDocumentElement';\n\nexport default function getParentNode(element: Node | ShadowRoot): Node {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (\n // $FlowFixMe: this is a quicker (but less type safe) way to save quite some bytes from the bundle\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || // DOM Element detected\n // $FlowFixMe: need a better way to handle this...\n element.host || // ShadowRoot detected\n // $FlowFixMe: HTMLElement is a Node\n getDocumentElement(element) // fallback\n );\n}\n","// @flow\nimport getParentNode from './getParentNode';\nimport isScrollParent from './isScrollParent';\nimport getNodeName from './getNodeName';\nimport { isHTMLElement } from './instanceOf';\n\nexport default function getScrollParent(node: Node): HTMLElement {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}\n","// @flow\nimport getScrollParent from './getScrollParent';\nimport getParentNode from './getParentNode';\nimport getNodeName from './getNodeName';\nimport getWindow from './getWindow';\nimport type { Window, VisualViewport } from '../types';\nimport isScrollParent from './isScrollParent';\n\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the \nreference element's position.\n*/\nexport default function listScrollParents(\n element: Node,\n list: Array<Element | Window> = []\n): Array<Element | Window | VisualViewport> {\n const scrollParent = getScrollParent(element);\n const isBody = getNodeName(scrollParent) === 'body';\n const win = getWindow(scrollParent);\n const target = isBody\n ? [win].concat(\n win.visualViewport || [],\n isScrollParent(scrollParent) ? scrollParent : []\n )\n : scrollParent;\n const updatedList = list.concat(target);\n\n return isBody\n ? updatedList\n : // $FlowFixMe: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}\n","// @flow\nimport getNodeName from './getNodeName';\n\nexport default function isTableElement(element: Element): boolean {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}\n","// @flow\nimport getWindow from './getWindow';\nimport getNodeName from './getNodeName';\nimport getComputedStyle from './getComputedStyle';\nimport { isHTMLElement } from './instanceOf';\nimport isTableElement from './isTableElement';\nimport getParentNode from './getParentNode';\nimport getDocumentElement from './getDocumentElement';\n\nfunction getTrueOffsetParent(element: Element): ?Element {\n if (\n !isHTMLElement(element) ||\n // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed'\n ) {\n return null;\n }\n\n const offsetParent = element.offsetParent;\n\n if (offsetParent) {\n const html = getDocumentElement(offsetParent);\n\n if (\n getNodeName(offsetParent) === 'body' &&\n getComputedStyle(offsetParent).position === 'static' &&\n getComputedStyle(html).position !== 'static'\n ) {\n return html;\n }\n }\n\n return offsetParent;\n}\n\n// `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\nfunction getContainingBlock(element: Element) {\n let currentNode = getParentNode(element);\n\n while (\n isHTMLElement(currentNode) &&\n ['html', 'body'].indexOf(getNodeName(currentNode)) < 0\n ) {\n const css = getComputedStyle(currentNode);\n\n // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n if (\n css.transform !== 'none' ||\n css.perspective !== 'none' ||\n (css.willChange && css.willChange !== 'auto')\n ) {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nexport default function getOffsetParent(element: Element) {\n const window = getWindow(element);\n\n let offsetParent = getTrueOffsetParent(element);\n\n while (\n offsetParent &&\n isTableElement(offsetParent) &&\n getComputedStyle(offsetParent).position === 'static'\n ) {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (\n offsetParent &&\n getNodeName(offsetParent) === 'body' &&\n getComputedStyle(offsetParent).position === 'static'\n ) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}\n","// @flow\nexport const top: 'top' = 'top';\nexport const bottom: 'bottom' = 'bottom';\nexport const right: 'right' = 'right';\nexport const left: 'left' = 'left';\nexport const auto: 'auto' = 'auto';\nexport type BasePlacement =\n | typeof top\n | typeof bottom\n | typeof right\n | typeof left;\nexport const basePlacements: Array<BasePlacement> = [top, bottom, right, left];\n\nexport const start: 'start' = 'start';\nexport const end: 'end' = 'end';\nexport type Variation = typeof start | typeof end;\n\nexport const clippingParents: 'clippingParents' = 'clippingParents';\nexport const viewport: 'viewport' = 'viewport';\nexport type Boundary =\n | HTMLElement\n | Array<HTMLElement>\n | typeof clippingParents;\nexport type RootBoundary = typeof viewport | 'document';\n\nexport const popper: 'popper' = 'popper';\nexport const reference: 'reference' = 'reference';\nexport type Context = typeof popper | typeof reference;\n\nexport type VariationPlacement =\n | 'top-start'\n | 'top-end'\n | 'bottom-start'\n | 'bottom-end'\n | 'right-start'\n | 'right-end'\n | 'left-start'\n | 'left-end';\nexport type AutoPlacement = 'auto' | 'auto-start' | 'auto-end';\nexport type ComputedPlacement = VariationPlacement | BasePlacement;\nexport type Placement = AutoPlacement | BasePlacement | VariationPlacement;\n\nexport const variationPlacements: Array<VariationPlacement> = basePlacements.reduce(\n (acc: Array<VariationPlacement>, placement: BasePlacement) =>\n acc.concat([(`${placement}-${start}`: any), (`${placement}-${end}`: any)]),\n []\n);\nexport const placements: Array<Placement> = [...basePlacements, auto].reduce(\n (\n acc: Array<Placement>,\n placement: BasePlacement | typeof auto\n ): Array<Placement> =>\n acc.concat([\n placement,\n (`${placement}-${start}`: any),\n (`${placement}-${end}`: any),\n ]),\n []\n);\n\n// modifiers that need to read the DOM\nexport const beforeRead: 'beforeRead' = 'beforeRead';\nexport const read: 'read' = 'read';\nexport const afterRead: 'afterRead' = 'afterRead';\n// pure-logic modifiers\nexport const beforeMain: 'beforeMain' = 'beforeMain';\nexport const main: 'main' = 'main';\nexport const afterMain: 'afterMain' = 'afterMain';\n// modifier with the purpose to write to the DOM (or write into a framework state)\nexport const beforeWrite: 'beforeWrite' = 'beforeWrite';\nexport const write: 'write' = 'write';\nexport const afterWrite: 'afterWrite' = 'afterWrite';\nexport const modifierPhases: Array<ModifierPhases> = [\n beforeRead,\n read,\n afterRead,\n beforeMain,\n main,\n afterMain,\n beforeWrite,\n write,\n afterWrite,\n];\n\nexport type ModifierPhases =\n | typeof beforeRead\n | typeof read\n | typeof afterRead\n | typeof beforeMain\n | typeof main\n | typeof afterMain\n | typeof beforeWrite\n | typeof write\n | typeof afterWrite;\n","// @flow\nimport type { Modifier } from '../types';\nimport { modifierPhases } from '../enums';\n\n// source: https://stackoverflow.com/questions/49875255\nfunction order(modifiers) {\n const map = new Map();\n const visited = new Set();\n const result = [];\n\n modifiers.forEach(modifier => {\n map.set(modifier.name, modifier);\n });\n\n // On visiting object, check for its dependencies and visit them recursively\n function sort(modifier: Modifier<any, any>) {\n visited.add(modifier.name);\n\n const requires = [\n ...(modifier.requires || []),\n ...(modifier.requiresIfExists || []),\n ];\n\n requires.forEach(dep => {\n if (!visited.has(dep)) {\n const depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n\n result.push(modifier);\n }\n\n modifiers.forEach(modifier => {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n\n return result;\n}\n\nexport default function orderModifiers(\n modifiers: Array<Modifier<any, any>>\n): Array<Modifier<any, any>> {\n // order based on dependencies\n const orderedModifiers = order(modifiers);\n\n // order based on phase\n return modifierPhases.reduce((acc, phase) => {\n return acc.concat(\n orderedModifiers.filter(modifier => modifier.phase === phase)\n );\n }, []);\n}\n","// @flow\n\nexport default function debounce<T>(fn: Function): () => Promise<T> {\n let pending;\n return () => {\n if (!pending) {\n pending = new Promise<T>(resolve => {\n Promise.resolve().then(() => {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}\n","// @flow\n\nexport default function format(str: string, ...args: Array<string>) {\n return [...args].reduce((p, c) => p.replace(/%s/, c), str);\n}\n","// @flow\nimport format from './format';\nimport { modifierPhases } from '../enums';\n\nconst INVALID_MODIFIER_ERROR =\n 'Popper: modifier \"%s\" provided an invalid %s property, expected %s but got %s';\nconst MISSING_DEPENDENCY_ERROR =\n 'Popper: modifier \"%s\" requires \"%s\", but \"%s\" modifier is not available';\nconst VALID_PROPERTIES = [\n 'name',\n 'enabled',\n 'phase',\n 'fn',\n 'effect',\n 'requires',\n 'options',\n];\n\nexport default function validateModifiers(modifiers: Array<any>): void {\n modifiers.forEach(modifier => {\n Object.keys(modifier).forEach(key => {\n switch (key) {\n case 'name':\n if (typeof modifier.name !== 'string') {\n console.error(\n format(\n INVALID_MODIFIER_ERROR,\n String(modifier.name),\n '\"name\"',\n '\"string\"',\n `\"${String(modifier.name)}\"`\n )\n );\n }\n break;\n case 'enabled':\n if (typeof modifier.enabled !== 'boolean') {\n console.error(\n format(\n INVALID_MODIFIER_ERROR,\n modifier.name,\n '\"enabled\"',\n '\"boolean\"',\n `\"${String(modifier.enabled)}\"`\n )\n );\n }\n case 'phase':\n if (modifierPhases.indexOf(modifier.phase) < 0) {\n console.error(\n format(\n INVALID_MODIFIER_ERROR,\n modifier.name,\n '\"phase\"',\n `either ${modifierPhases.join(', ')}`,\n `\"${String(modifier.phase)}\"`\n )\n );\n }\n break;\n case 'fn':\n if (typeof modifier.fn !== 'function') {\n console.error(\n format(\n INVALID_MODIFIER_ERROR,\n modifier.name,\n '\"fn\"',\n '\"function\"',\n `\"${String(modifier.fn)}\"`\n )\n );\n }\n break;\n case 'effect':\n if (typeof modifier.effect !== 'function') {\n console.error(\n format(\n INVALID_MODIFIER_ERROR,\n modifier.name,\n '\"effect\"',\n '\"function\"',\n `\"${String(modifier.fn)}\"`\n )\n );\n }\n break;\n case 'requires':\n if (!Array.isArray(modifier.requires)) {\n console.error(\n format(\n INVALID_MODIFIER_ERROR,\n modifier.name,\n '\"requires\"',\n '\"array\"',\n `\"${String(modifier.requires)}\"`\n )\n );\n }\n break;\n case 'requiresIfExists':\n if (!Array.isArray(modifier.requiresIfExists)) {\n console.error(\n format(\n INVALID_MODIFIER_ERROR,\n modifier.name,\n '\"requiresIfExists\"',\n '\"array\"',\n `\"${String(modifier.requiresIfExists)}\"`\n )\n );\n }\n break;\n case 'options':\n case 'data':\n break;\n default:\n console.error(\n `PopperJS: an invalid property has been provided to the \"${\n modifier.name\n }\" modifier, valid properties are ${VALID_PROPERTIES.map(\n s => `\"${s}\"`\n ).join(', ')}; but \"${key}\" was provided.`\n );\n }\n\n modifier.requires &&\n modifier.requires.forEach(requirement => {\n if (modifiers.find(mod => mod.name === requirement) == null) {\n console.error(\n format(\n MISSING_DEPENDENCY_ERROR,\n String(modifier.name),\n requirement,\n requirement\n )\n );\n }\n });\n });\n });\n}\n","// @flow\n\nexport default function uniqueBy<T>(arr: Array<T>, fn: T => any): Array<T> {\n const identifiers = new Set();\n\n return arr.filter(item => {\n const identifier = fn(item);\n\n if (!identifiers.has(identifier)) {\n identifiers.add(identifier);\n return true;\n }\n });\n}\n","// @flow\nimport { type BasePlacement, type Placement, auto } from '../enums';\n\nexport default function getBasePlacement(\n placement: Placement | typeof auto\n): BasePlacement {\n return (placement.split('-')[0]: any);\n}\n","// @flow\nimport type { Modifier } from '../types';\n\nexport default function mergeByName(\n modifiers: Array<$Shape<Modifier<any, any>>>\n): Array<$Shape<Modifier<any, any>>> {\n const merged = modifiers.reduce((merged, current) => {\n const existing = merged[current.name];\n merged[current.name] = existing\n ? {\n ...existing,\n ...current,\n options: { ...existing.options, ...current.options },\n data: { ...existing.data, ...current.data },\n }\n : current;\n return merged;\n }, {});\n\n // IE11 does not support Object.values\n return Object.keys(merged).map(key => merged[key]);\n}\n","// @flow\nimport getWindow from './getWindow';\nimport getDocumentElement from './getDocumentElement';\nimport getWindowScrollBarX from './getWindowScrollBarX';\n\nexport default function getViewportRect(element: Element) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n\n // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper\n // can be obscured underneath it.\n // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even\n // if it isn't open, so if this isn't available, the popper will be detected\n // to overflow the bottom of the screen too early.\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n\n // Uses Layout Viewport (like Chrome; Safari does not currently)\n // In Chrome, it returns a value very close to 0 (+/-) but contains rounding\n // errors due to floating point numbers, so we need to check precision.\n // Safari returns a number <= 0, usually < -1 when pinch-zoomed\n\n // Feature detection fails in mobile emulation mode in Chrome.\n // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <\n // 0.001\n // Fallback here: \"Not Safari\" userAgent\n if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width,\n height,\n x: x + getWindowScrollBarX(element),\n y,\n };\n}\n","// @flow\nimport type { Rect } from '../types';\nimport getDocumentElement from './getDocumentElement';\nimport getComputedStyle from './getComputedStyle';\nimport getWindowScrollBarX from './getWindowScrollBarX';\nimport getWindowScroll from './getWindowScroll';\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable\nexport default function getDocumentRect(element: HTMLElement): Rect {\n const html = getDocumentElement(element);\n const winScroll = getWindowScroll(element);\n const body = element.ownerDocument.body;\n\n const width = Math.max(\n html.scrollWidth,\n html.clientWidth,\n body ? body.scrollWidth : 0,\n body ? body.clientWidth : 0\n );\n const height = Math.max(\n html.scrollHeight,\n html.clientHeight,\n body ? body.scrollHeight : 0,\n body ? body.clientHeight : 0\n );\n\n let x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n const y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += Math.max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return { width, height, x, y };\n}\n","// @flow\nimport { isShadowRoot } from './instanceOf';\n\nexport default function contains(parent: Element, child: Element) {\n const rootNode = child.getRootNode && child.getRootNode();\n\n // First, attempt with faster native method\n if (parent.contains(child)) {\n return true;\n }\n // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n let next = child;\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n }\n // $FlowFixMe: need a better way to handle this...\n next = next.parentNode || next.host;\n } while (next);\n }\n\n // Give up, the result is false\n return false;\n}\n","// @flow\nimport type { Rect, ClientRectObject } from '../types';\n\nexport default function rectToClientRect(rect: Rect): ClientRectObject {\n return {\n ...rect,\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height,\n };\n}\n","// @flow\nimport type { ClientRectObject } from '../types';\nimport type { Boundary, RootBoundary } from '../enums';\nimport { viewport } from '../enums';\nimport getViewportRect from './getViewportRect';\nimport getDocumentRect from './getDocumentRect';\nimport listScrollParents from './listScrollParents';\nimport getOffsetParent from './getOffsetParent';\nimport getDocumentElement from './getDocumentElement';\nimport getComputedStyle from './getComputedStyle';\nimport { isElement, isHTMLElement } from './instanceOf';\nimport getBoundingClientRect from './getBoundingClientRect';\nimport getParentNode from './getParentNode';\nimport contains from './contains';\nimport getNodeName from './getNodeName';\nimport rectToClientRect from '../utils/rectToClientRect';\n\nfunction getInnerBoundingClientRect(element: Element) {\n const rect = getBoundingClientRect(element);\n\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n\n return rect;\n}\n\nfunction getClientRectFromMixedType(\n element: Element,\n clippingParent: Element | RootBoundary\n): ClientRectObject {\n return clippingParent === viewport\n ? rectToClientRect(getViewportRect(element))\n : isHTMLElement(clippingParent)\n ? getInnerBoundingClientRect(clippingParent)\n : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n}\n\n// A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\nfunction getClippingParents(element: Element): Array<Element> {\n const clippingParents = listScrollParents(getParentNode(element));\n const canEscapeClipping =\n ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n const clipperElement =\n canEscapeClipping && isHTMLElement(element)\n ? getOffsetParent(element)\n : element;\n\n if (!isElement(clipperElement)) {\n return [];\n }\n\n // $FlowFixMe: https://github.com/facebook/flow/issues/1414\n return clippingParents.filter(\n (clippingParent) =>\n isElement(clippingParent) &&\n contains(clippingParent, clipperElement) &&\n getNodeName(clippingParent) !== 'body'\n );\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping parents\nexport default function getClippingRect(\n element: Element,\n boundary: Boundary,\n rootBoundary: RootBoundary\n): ClientRectObject {\n const mainClippingParents =\n boundary === 'clippingParents'\n ? getClippingParents(element)\n : [].concat(boundary);\n const clippingParents = [...mainClippingParents, rootBoundary];\n const firstClippingParent = clippingParents[0];\n\n const clippingRect = clippingParents.reduce((accRect, clippingParent) => {\n const rect = getClientRectFromMixedType(element, clippingParent);\n\n accRect.top = Math.max(rect.top, accRect.top);\n accRect.right = Math.min(rect.right, accRect.right);\n accRect.bottom = Math.min(rect.bottom, accRect.bottom);\n accRect.left = Math.max(rect.left, accRect.left);\n\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent));\n\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n\n return clippingRect;\n}\n","// @flow\nimport { type Variation, type Placement } from '../enums';\n\nexport default function getVariation(placement: Placement): ?Variation {\n return (placement.split('-')[1]: any);\n}\n","// @flow\nimport type { Placement } from '../enums';\n\nexport default function getMainAxisFromPlacement(\n placement: Placement\n): 'x' | 'y' {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}\n","// @flow\nimport getBasePlacement from './getBasePlacement';\nimport getVariation from './getVariation';\nimport getMainAxisFromPlacement from './getMainAxisFromPlacement';\nimport type {\n Rect,\n PositioningStrategy,\n Offsets,\n ClientRectObject,\n} from '../types';\nimport { top, right, bottom, left, start, end, type Placement } from '../enums';\n\nexport default function computeOffsets({\n reference,\n element,\n placement,\n}: {\n reference: Rect | ClientRectObject,\n element: Rect | ClientRectObject,\n strategy: PositioningStrategy,\n placement?: Placement,\n}): Offsets {\n const basePlacement = placement ? getBasePlacement(placement) : null;\n const variation = placement ? getVariation(placement) : null;\n const commonX = reference.x + reference.width / 2 - element.width / 2;\n const commonY = reference.y + reference.height / 2 - element.height / 2;\n\n let offsets;\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height,\n };\n break;\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height,\n };\n break;\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY,\n };\n break;\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY,\n };\n break;\n default:\n offsets = {\n x: reference.x,\n y: reference.y,\n };\n }\n\n const mainAxis = basePlacement\n ? getMainAxisFromPlacement(basePlacement)\n : null;\n\n if (mainAxis != null) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] =\n Math.floor(offsets[mainAxis]) -\n Math.floor(reference[len] / 2 - element[len] / 2);\n break;\n case end:\n offsets[mainAxis] =\n Math.floor(offsets[mainAxis]) +\n Math.ceil(reference[len] / 2 - element[len] / 2);\n break;\n default:\n }\n }\n\n return offsets;\n}\n","// @flow\nimport type { SideObject } from '../types';\n\nexport default function getFreshSideObject(): SideObject {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n };\n}\n","// @flow\nimport type { SideObject } from '../types';\nimport getFreshSideObject from './getFreshSideObject';\n\nexport default function mergePaddingObject(\n paddingObject: $Shape<SideObject>\n): SideObject {\n return {\n ...getFreshSideObject(),\n ...paddingObject,\n };\n}\n","// @flow\n\nexport default function expandToHashMap<\n T: number | string | boolean,\n K: string\n>(value: T, keys: Array<K>): { [key: string]: T } {\n return keys.reduce((hashMap, key) => {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}\n","// @flow\nimport type { State, SideObject, Padding } from '../types';\nimport type { Placement, Boundary, RootBoundary, Context } from '../enums';\nimport getBoundingClientRect from '../dom-utils/getBoundingClientRect';\nimport getClippingRect from '../dom-utils/getClippingRect';\nimport getDocumentElement from '../dom-utils/getDocumentElement';\nimport computeOffsets from './computeOffsets';\nimport rectToClientRect from './rectToClientRect';\nimport {\n clippingParents,\n reference,\n popper,\n bottom,\n top,\n right,\n basePlacements,\n viewport,\n} from '../enums';\nimport { isElement } from '../dom-utils/instanceOf';\nimport mergePaddingObject from './mergePaddingObject';\nimport expandToHashMap from './expandToHashMap';\n\n// eslint-disable-next-line import/no-unused-modules\nexport type Options = {\n placement: Placement,\n boundary: Boundary,\n rootBoundary: RootBoundary,\n elementContext: Context,\n altBoundary: boolean,\n padding: Padding,\n};\n\nexport default function detectOverflow(\n state: State,\n options: $Shape<Options> = {}\n): SideObject {\n const {\n placement = state.placement,\n boundary = clippingParents,\n rootBoundary = viewport,\n elementContext = popper,\n altBoundary = false,\n padding = 0,\n } = options;\n\n const paddingObject = mergePaddingObject(\n typeof padding !== 'number'\n ? padding\n : expandToHashMap(padding, basePlacements)\n );\n\n const altContext = elementContext === popper ? reference : popper;\n\n const referenceElement = state.elements.reference;\n const popperRect = state.rects.popper;\n const element = state.elements[altBoundary ? altContext : elementContext];\n\n const clippingClientRect = getClippingRect(\n isElement(element)\n ? element\n : element.contextElement || getDocumentElement(state.elements.popper),\n boundary,\n rootBoundary\n );\n\n const referenceClientRect = getBoundingClientRect(referenceElement);\n\n const popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement,\n });\n\n const popperClientRect = rectToClientRect({\n ...popperRect,\n ...popperOffsets,\n });\n\n const elementClientRect =\n elementContext === popper ? popperClientRect : referenceClientRect;\n\n // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n const overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom:\n elementClientRect.bottom -\n clippingClientRect.bottom +\n paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right:\n elementClientRect.right - clippingClientRect.right + paddingObject.right,\n };\n\n const offsetData = state.modifiersData.offset;\n\n // Offsets can be applied only to the popper element\n if (elementContext === popper && offsetData) {\n const offset = offsetData[placement];\n\n Object.keys(overflowOffsets).forEach((key) => {\n const multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n const axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}\n","// @flow\nimport type {\n State,\n OptionsGeneric,\n Modifier,\n Instance,\n VirtualElement,\n} from './types';\nimport getCompositeRect from './dom-utils/getCompositeRect';\nimport getLayoutRect from './dom-utils/getLayoutRect';\nimport listScrollParents from './dom-utils/listScrollParents';\nimport getOffsetParent from './dom-utils/getOffsetParent';\nimport getComputedStyle from './dom-utils/getComputedStyle';\nimport orderModifiers from './utils/orderModifiers';\nimport debounce from './utils/debounce';\nimport validateModifiers from './utils/validateModifiers';\nimport uniqueBy from './utils/uniqueBy';\nimport getBasePlacement from './utils/getBasePlacement';\nimport mergeByName from './utils/mergeByName';\nimport detectOverflow from './utils/detectOverflow';\nimport { isElement } from './dom-utils/instanceOf';\nimport { auto } from './enums';\n\nconst INVALID_ELEMENT_ERROR =\n 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nconst INFINITE_LOOP_ERROR =\n 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\n\nconst DEFAULT_OPTIONS: OptionsGeneric<any> = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute',\n};\n\ntype PopperGeneratorArgs = {\n defaultModifiers?: Array<Modifier<any, any>>,\n defaultOptions?: $Shape<OptionsGeneric<any>>,\n};\n\nfunction areValidElements(...args: Array<any>): boolean {\n return !args.some(\n (element) =>\n !(element && typeof element.getBoundingClientRect === 'function')\n );\n}\n\nexport function popperGenerator(generatorOptions: PopperGeneratorArgs = {}) {\n const {\n defaultModifiers = [],\n defaultOptions = DEFAULT_OPTIONS,\n } = generatorOptions;\n\n return function createPopper<TModifier: $Shape<Modifier<any, any>>>(\n reference: Element | VirtualElement,\n popper: HTMLElement,\n options: $Shape<OptionsGeneric<TModifier>> = defaultOptions\n ): Instance {\n let state: $Shape<State> = {\n placement: 'bottom',\n orderedModifiers: [],\n options: { ...DEFAULT_OPTIONS, ...defaultOptions },\n modifiersData: {},\n elements: {\n reference,\n popper,\n },\n attributes: {},\n styles: {},\n };\n\n let effectCleanupFns: Array<() => void> = [];\n let isDestroyed = false;\n\n const instance = {\n state,\n setOptions(options) {\n cleanupModifierEffects();\n\n state.options = {\n // $FlowFixMe\n ...defaultOptions,\n ...state.options,\n ...options,\n };\n\n state.scrollParents = {\n reference: isElement(reference)\n ? listScrollParents(reference)\n : reference.contextElement\n ? listScrollParents(reference.contextElement)\n : [],\n popper: listScrollParents(popper),\n };\n\n // Orders the modifiers based on their dependencies and `phase`\n // properties\n const orderedModifiers = orderModifiers(\n mergeByName([...defaultModifiers, ...state.options.modifiers])\n );\n\n // Strip out disabled modifiers\n state.orderedModifiers = orderedModifiers.filter((m) => m.enabled);\n\n // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n if (__DEV__) {\n const modifiers = uniqueBy(\n [...orderedModifiers, ...state.options.modifiers],\n ({ name }) => name\n );\n\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n const flipModifier = state.orderedModifiers.find(\n ({ name }) => name === 'flip'\n );\n\n if (!flipModifier) {\n console.error(\n [\n 'Popper: \"auto\" placements require the \"flip\" modifier be',\n 'present and enabled to work.',\n ].join(' ')\n );\n }\n }\n\n const {\n marginTop,\n marginRight,\n marginBottom,\n marginLeft,\n } = getComputedStyle(popper);\n\n // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n if (\n [marginTop, marginRight, marginBottom, marginLeft].some((margin) =>\n parseFloat(margin)\n )\n ) {\n console.warn(\n [\n 'Popper: CSS \"margin\" styles cannot be used to apply padding',\n 'between the popper and its reference element or boundary.',\n 'To replicate margin, use the `offset` modifier, as well as',\n 'the `padding` option in the `preventOverflow` and `flip`',\n 'modifiers.',\n ].join(' ')\n );\n }\n }\n\n runModifierEffects();\n\n return instance.update();\n },\n\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n const { reference, popper } = state.elements;\n\n // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n if (!areValidElements(reference, popper)) {\n if (__DEV__) {\n console.error(INVALID_ELEMENT_ERROR);\n }\n return;\n }\n\n // Store the reference and popper rects to be read by modifiers\n state.rects = {\n reference: getCompositeRect(\n reference,\n getOffsetParent(popper),\n state.options.strategy === 'fixed'\n ),\n popper: getLayoutRect(popper),\n };\n\n // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n state.reset = false;\n\n state.placement = state.options.placement;\n\n // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n state.orderedModifiers.forEach(\n (modifier) =>\n (state.modifiersData[modifier.name] = {\n ...modifier.data,\n })\n );\n\n let __debug_loops__ = 0;\n for (let index = 0; index < state.orderedModifiers.length; index++) {\n if (__DEV__) {\n __debug_loops__ += 1;\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n const { fn, options = {}, name } = state.orderedModifiers[index];\n\n if (typeof fn === 'function') {\n state = fn({ state, options, name, instance }) || state;\n }\n }\n },\n\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce<$Shape<State>>(\n () =>\n new Promise<$Shape<State>>((resolve) => {\n instance.forceUpdate();\n resolve(state);\n })\n ),\n\n destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n },\n };\n\n if (!areValidElements(reference, popper)) {\n if (__DEV__) {\n console.error(INVALID_ELEMENT_ERROR);\n }\n return instance;\n }\n\n instance.setOptions(options).then((state) => {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n });\n\n // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n function runModifierEffects() {\n state.orderedModifiers.forEach(({ name, options = {}, effect }) => {\n if (typeof effect === 'function') {\n const cleanupFn = effect({ state, name, instance, options });\n const noopFn = () => {};\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach((fn) => fn());\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\n\nexport const createPopper = popperGenerator();\n\n// eslint-disable-next-line import/no-unused-modules\nexport { detectOverflow };\n"],"names":["getBoundingClientRect","element","rect","width","height","top","right","bottom","left","x","y","getWindow","node","toString","ownerDocument","defaultView","window","getWindowScroll","win","scrollLeft","pageXOffset","scrollTop","pageYOffset","isElement","OwnElement","Element","isHTMLElement","HTMLElement","isShadowRoot","ShadowRoot","getHTMLElementScroll","getNodeScroll","getNodeName","nodeName","toLowerCase","getDocumentElement","document","documentElement","getWindowScrollBarX","getComputedStyle","isScrollParent","overflow","overflowX","overflowY","test","getCompositeRect","elementOrVirtualElement","offsetParent","isFixed","isOffsetParentAnElement","scroll","offsets","clientLeft","clientTop","getLayoutRect","offsetLeft","offsetTop","offsetWidth","offsetHeight","getParentNode","assignedSlot","parentNode","host","getScrollParent","indexOf","body","listScrollParents","list","scrollParent","isBody","target","concat","visualViewport","updatedList","isTableElement","getTrueOffsetParent","position","html","getContainingBlock","currentNode","css","transform","perspective","willChange","getOffsetParent","auto","basePlacements","start","end","clippingParents","viewport","popper","reference","beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite","modifierPhases","order","modifiers","map","Map","visited","Set","result","forEach","modifier","set","name","sort","add","requires","requiresIfExists","dep","has","depModifier","get","push","orderModifiers","orderedModifiers","reduce","acc","phase","filter","debounce","fn","pending","Promise","resolve","then","undefined","format","str","args","p","c","replace","INVALID_MODIFIER_ERROR","MISSING_DEPENDENCY_ERROR","VALID_PROPERTIES","validateModifiers","Object","keys","key","console","error","String","enabled","join","effect","Array","isArray","s","requirement","find","mod","uniqueBy","arr","identifiers","item","identifier","getBasePlacement","placement","split","mergeByName","merged","current","existing","options","data","getViewportRect","clientWidth","clientHeight","navigator","userAgent","getDocumentRect","winScroll","Math","max","scrollWidth","scrollHeight","direction","contains","parent","child","rootNode","getRootNode","next","isSameNode","rectToClientRect","getInnerBoundingClientRect","getClientRectFromMixedType","clippingParent","getClippingParents","canEscapeClipping","clipperElement","getClippingRect","boundary","rootBoundary","mainClippingParents","firstClippingParent","clippingRect","accRect","min","getVariation","getMainAxisFromPlacement","computeOffsets","basePlacement","variation","commonX","commonY","mainAxis","len","floor","ceil","getFreshSideObject","mergePaddingObject","paddingObject","expandToHashMap","value","hashMap","detectOverflow","state","elementContext","altBoundary","padding","altContext","referenceElement","elements","popperRect","rects","clippingClientRect","contextElement","referenceClientRect","popperOffsets","strategy","popperClientRect","elementClientRect","overflowOffsets","offsetData","modifiersData","offset","multiply","axis","INVALID_ELEMENT_ERROR","INFINITE_LOOP_ERROR","DEFAULT_OPTIONS","areValidElements","some","popperGenerator","generatorOptions","defaultModifiers","defaultOptions","createPopper","attributes","styles","effectCleanupFns","isDestroyed","instance","setOptions","cleanupModifierEffects","scrollParents","m","flipModifier","marginTop","marginRight","marginBottom","marginLeft","margin","parseFloat","warn","runModifierEffects","update","forceUpdate","reset","__debug_loops__","index","length","destroy","onFirstUpdate","cleanupFn","noopFn"],"mappings":";;;;;;;;;;EAGe,SAASA,qBAAT,CACbC,OADa,EAEK;EAClB,MAAMC,IAAI,GAAGD,OAAO,CAACD,qBAAR,EAAb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