/
www
/
wwwroot
/
alo88.autos
/
wp-content
/
plugins
/
wp-content-crawler
/
app
/
public
/
node_modules
/
tether
/
dist
/
js
/
Upload File
HOME
{"version":3,"file":"tether.min.js","sources":["../../src/js/utils/type-check.js","../../src/js/utils/classes.js","../../src/js/utils/deferred.js","../../src/js/utils/general.js","../../src/js/utils/bounds.js","../../src/js/abutment.js","../../src/js/constraint.js","../../src/js/shift.js","../../src/js/evented.js","../../src/js/utils/offset.js","../../src/js/utils/parents.js","../../src/js/tether.js"],"sourcesContent":["/**\n * Checks if `value` is classified as a `Function` object.\n * @param {*} value The param to check if it is a function\n */\nexport function isFunction(value) {\n return typeof value === 'function';\n}\n\n/**\n * Checks if `value` is classified as a `Number` object.\n * @param {*} value The param to check if it is a number\n */\nexport function isNumber(value) {\n return typeof value === 'number';\n}\n\n/**\n * Checks if `value` is classified as an `Object`.\n * @param {*} value The param to check if it is an object\n */\nexport function isObject(value) {\n return typeof value === 'object';\n}\n\n/**\n * Checks if `value` is classified as a `String` object.\n * @param {*} value The param to check if it is a string\n */\nexport function isString(value) {\n return typeof value === 'string';\n}\n\n/**\n * Checks if `value` is undefined.\n * @param {*} value The param to check if it is undefined\n */\nexport function isUndefined(value) {\n return value === undefined;\n}\n","import { isUndefined } from './type-check';\n\nexport function addClass(el, name) {\n name.split(' ').forEach((cls) => {\n if (cls.trim()) {\n el.classList.add(cls);\n }\n });\n}\n\n/**\n * Get class string based on previously determined classes\n * @param {String} [key=''] - default value for the classes object\n * @param {Object} classes\n * @param {String} classPrefix\n */\nexport function getClass(key = '', classes, classPrefix) {\n if (!isUndefined(classes) && !isUndefined(classes[key])) {\n if (classes[key] === false) {\n return '';\n }\n return classes[key];\n } else if (classPrefix) {\n return `${classPrefix}-${key}`;\n } else {\n return key;\n }\n}\n\nexport function removeClass(el, name) {\n name.split(' ').forEach((cls) => {\n if (cls.trim()) {\n el.classList.remove(cls);\n }\n });\n}\n\nexport function updateClasses(el, add, all) {\n // Of the set of 'all' classes, we need the 'add' classes, and only the\n // 'add' classes to be set.\n all.forEach((cls) => {\n if (add.indexOf(cls) === -1 && el.classList.contains(cls)) {\n removeClass(el, cls);\n }\n });\n\n add.forEach((cls) => {\n if (!el.classList.contains(cls)) {\n addClass(el, cls);\n }\n });\n}\n","const deferred = [];\n\nexport function defer(fn) {\n deferred.push(fn);\n}\n\nexport function flush() {\n let fn;\n // eslint-disable-next-line\n while (fn = deferred.pop()) {\n fn();\n }\n}\n","let _scrollBarSize = null;\n\nexport function extend(out = {}) {\n const args = [];\n\n Array.prototype.push.apply(args, arguments);\n\n args.slice(1).forEach((obj) => {\n if (obj) {\n for (let key in obj) {\n if ({}.hasOwnProperty.call(obj, key)) {\n out[key] = obj[key];\n }\n }\n }\n });\n\n return out;\n}\n\nexport function getScrollBarSize() {\n if (_scrollBarSize) {\n return _scrollBarSize;\n }\n const inner = document.createElement('div');\n inner.style.width = '100%';\n inner.style.height = '200px';\n\n const outer = document.createElement('div');\n extend(outer.style, {\n position: 'absolute',\n top: 0,\n left: 0,\n pointerEvents: 'none',\n visibility: 'hidden',\n width: '200px',\n height: '150px',\n overflow: 'hidden'\n });\n\n outer.appendChild(inner);\n\n document.body.appendChild(outer);\n\n const widthContained = inner.offsetWidth;\n outer.style.overflow = 'scroll';\n let widthScroll = inner.offsetWidth;\n\n if (widthContained === widthScroll) {\n widthScroll = outer.clientWidth;\n }\n\n document.body.removeChild(outer);\n\n const width = widthContained - widthScroll;\n\n _scrollBarSize = { width, height: width };\n return _scrollBarSize;\n}\n\nexport const uniqueId = (() => {\n let id = 0;\n return () => ++id;\n})();\n","import { defer } from './deferred';\nimport { extend, uniqueId } from './general';\nimport { isUndefined } from './type-check';\n\nconst zeroPosCache = {};\nlet zeroElement = null;\n\nexport function getBounds(body, el) {\n let doc;\n if (el === document) {\n doc = document;\n el = document.documentElement;\n } else {\n doc = el.ownerDocument;\n }\n\n const docEl = doc.documentElement;\n\n const box = _getActualBoundingClientRect(el);\n\n const origin = _getOrigin(body);\n\n box.top -= origin.top;\n box.left -= origin.left;\n\n if (isUndefined(box.width)) {\n box.width = document.body.scrollWidth - box.left - box.right;\n }\n if (isUndefined(box.height)) {\n box.height = document.body.scrollHeight - box.top - box.bottom;\n }\n\n box.top = box.top - docEl.clientTop;\n box.left = box.left - docEl.clientLeft;\n box.right = doc.body.clientWidth - box.width - box.left;\n box.bottom = doc.body.clientHeight - box.height - box.top;\n\n return box;\n}\n\n/**\n * Gets bounds for when target modifiier is 'scroll-handle'\n * @param target\n * @return {{left: number, width: number, height: number}}\n */\nexport function getScrollHandleBounds(body, target) {\n let bounds;\n // We have to do the check for the scrollTop and if target === document.body here and set to variables\n // because we may reset target below.\n const targetScrollTop = target.scrollTop;\n const targetIsBody = target === document.body;\n\n if (targetIsBody) {\n target = document.documentElement;\n\n bounds = {\n left: pageXOffset,\n top: pageYOffset,\n height: innerHeight,\n width: innerWidth\n };\n } else {\n bounds = getBounds(body, target);\n }\n\n const style = getComputedStyle(target);\n\n const hasBottomScroll = (\n target.scrollWidth > target.clientWidth ||\n [style.overflow, style.overflowX].indexOf('scroll') >= 0 ||\n !targetIsBody\n );\n\n let scrollBottom = 0;\n if (hasBottomScroll) {\n scrollBottom = 15;\n }\n\n const height = bounds.height - parseFloat(style.borderTopWidth) - parseFloat(style.borderBottomWidth) - scrollBottom;\n\n const out = {\n width: 15,\n height: height * 0.975 * (height / target.scrollHeight),\n left: bounds.left + bounds.width - parseFloat(style.borderLeftWidth) - 15\n };\n\n let fitAdj = 0;\n if (height < 408 && targetIsBody) {\n fitAdj = -0.00011 * Math.pow(height, 2) - 0.00727 * height + 22.58;\n }\n\n if (!targetIsBody) {\n out.height = Math.max(out.height, 24);\n }\n\n const scrollPercentage = targetScrollTop / (target.scrollHeight - height);\n out.top = scrollPercentage * (height - out.height - fitAdj) + bounds.top + parseFloat(style.borderTopWidth);\n\n if (targetIsBody) {\n out.height = Math.max(out.height, 24);\n }\n\n return out;\n}\n\n/**\n * Gets bounds for when target modifiier is 'visible\n * @param target\n * @return {{top: *, left: *, width: *, height: *}}\n */\nexport function getVisibleBounds(body, target) {\n if (target === document.body) {\n return { top: pageYOffset, left: pageXOffset, height: innerHeight, width: innerWidth };\n } else {\n const bounds = getBounds(body, target);\n\n const out = {\n height: bounds.height,\n width: bounds.width,\n top: bounds.top,\n left: bounds.left\n };\n\n out.height = Math.min(out.height, bounds.height - (pageYOffset - bounds.top));\n out.height = Math.min(out.height, bounds.height - ((bounds.top + bounds.height) - (pageYOffset + innerHeight)));\n out.height = Math.min(innerHeight, out.height);\n out.height -= 2;\n\n out.width = Math.min(out.width, bounds.width - (pageXOffset - bounds.left));\n out.width = Math.min(out.width, bounds.width - ((bounds.left + bounds.width) - (pageXOffset + innerWidth)));\n out.width = Math.min(innerWidth, out.width);\n out.width -= 2;\n\n if (out.top < pageYOffset) {\n out.top = pageYOffset;\n }\n if (out.left < pageXOffset) {\n out.left = pageXOffset;\n }\n\n return out;\n }\n}\n\nexport function removeUtilElements(body) {\n if (zeroElement) {\n body.removeChild(zeroElement);\n }\n zeroElement = null;\n}\n\n/**\n * Same as native getBoundingClientRect, except it takes into account parent <frame> offsets\n * if the element lies within a nested document (<frame> or <iframe>-like).\n * @param node\n */\nfunction _getActualBoundingClientRect(node) {\n let boundingRect = node.getBoundingClientRect();\n\n // The original object returned by getBoundingClientRect is immutable, so we clone it\n // We can't use extend because the properties are not considered part of the object by hasOwnProperty in IE9\n let rect = {};\n for (let k in boundingRect) {\n rect[k] = boundingRect[k];\n }\n\n try {\n if (node.ownerDocument !== document) {\n let { frameElement } = node.ownerDocument.defaultView;\n if (frameElement) {\n let frameRect = _getActualBoundingClientRect(frameElement);\n rect.top += frameRect.top;\n rect.bottom += frameRect.top;\n rect.left += frameRect.left;\n rect.right += frameRect.left;\n }\n }\n } catch(err) {\n // Ignore \"Access is denied\" in IE11/Edge\n }\n\n return rect;\n}\n\nfunction _getOrigin(body) {\n // getBoundingClientRect is unfortunately too accurate. It introduces a pixel or two of\n // jitter as the user scrolls that messes with our ability to detect if two positions\n // are equivilant or not. We place an element at the top left of the page that will\n // get the same jitter, so we can cancel the two out.\n let node = zeroElement;\n if (!node || !body.contains(node)) {\n node = document.createElement('div');\n node.setAttribute('data-tether-id', uniqueId());\n extend(node.style, {\n top: 0,\n left: 0,\n position: 'absolute'\n });\n\n body.appendChild(node);\n\n zeroElement = node;\n }\n\n const id = node.getAttribute('data-tether-id');\n if (isUndefined(zeroPosCache[id])) {\n zeroPosCache[id] = _getActualBoundingClientRect(node);\n\n // Clear the cache when this position call is done\n defer(() => {\n delete zeroPosCache[id];\n });\n }\n\n return zeroPosCache[id];\n}\n","import { getClass, updateClasses } from './utils/classes';\nimport { defer } from './utils/deferred';\nimport { getBounds } from './utils/bounds';\n\nexport default {\n position({ top, left }) {\n const { height, width } = this.cache('element-bounds', () => {\n return getBounds(this.element);\n });\n\n const targetPos = this.getTargetBounds();\n\n const bottom = top + height;\n const right = left + width;\n\n const abutted = [];\n if (top <= targetPos.bottom && bottom >= targetPos.top) {\n ['left', 'right'].forEach((side) => {\n const targetPosSide = targetPos[side];\n if (targetPosSide === left || targetPosSide === right) {\n abutted.push(side);\n }\n });\n }\n\n if (left <= targetPos.right && right >= targetPos.left) {\n ['top', 'bottom'].forEach((side) => {\n const targetPosSide = targetPos[side];\n if (targetPosSide === top || targetPosSide === bottom) {\n abutted.push(side);\n }\n });\n }\n\n const sides = ['left', 'top', 'right', 'bottom'];\n const { classes, classPrefix } = this.options;\n this.all.push(getClass('abutted', classes, classPrefix));\n sides.forEach((side) => {\n this.all.push(`${getClass('abutted', classes, classPrefix)}-${side}`);\n });\n\n if (abutted.length) {\n this.add.push(getClass('abutted', classes, classPrefix));\n }\n\n abutted.forEach((side) => {\n this.add.push(`${getClass('abutted', classes, classPrefix)}-${side}`);\n });\n\n defer(() => {\n if (!(this.options.addTargetClasses === false)) {\n updateClasses(this.target, this.add, this.all);\n }\n updateClasses(this.element, this.add, this.all);\n });\n\n return true;\n }\n};\n","import { getClass, updateClasses } from './utils/classes';\nimport { defer } from './utils/deferred';\nimport { extend } from './utils/general';\nimport { getBounds } from './utils/bounds';\nimport { isString, isUndefined } from './utils/type-check';\n\nconst BOUNDS_FORMAT = ['left', 'top', 'right', 'bottom'];\n\n/**\n * Returns an array of bounds of the format [left, top, right, bottom]\n * @param tether\n * @param to\n * @return {*[]|HTMLElement|ActiveX.IXMLDOMElement}\n */\nfunction getBoundingRect(body, tether, to) {\n // arg to is required\n if (!to) {\n return null;\n }\n if (to === 'scrollParent') {\n to = tether.scrollParents[0];\n } else if (to === 'window') {\n to = [pageXOffset, pageYOffset, innerWidth + pageXOffset, innerHeight + pageYOffset];\n }\n\n if (to === document) {\n to = to.documentElement;\n }\n\n if (!isUndefined(to.nodeType)) {\n const node = to;\n const size = getBounds(body, to);\n const pos = size;\n const style = getComputedStyle(to);\n\n to = [pos.left, pos.top, size.width + pos.left, size.height + pos.top];\n\n // Account any parent Frames scroll offset\n if (node.ownerDocument !== document) {\n let win = node.ownerDocument.defaultView;\n to[0] += win.pageXOffset;\n to[1] += win.pageYOffset;\n to[2] += win.pageXOffset;\n to[3] += win.pageYOffset;\n }\n\n BOUNDS_FORMAT.forEach((side, i) => {\n side = side[0].toUpperCase() + side.substr(1);\n if (side === 'Top' || side === 'Left') {\n to[i] += parseFloat(style[`border${side}Width`]);\n } else {\n to[i] -= parseFloat(style[`border${side}Width`]);\n }\n });\n }\n\n return to;\n}\n\n/**\n * Add out of bounds classes to the list of classes we add to tether\n * @param {string[]} oob An array of directions that are out of bounds\n * @param {string[]} addClasses The array of classes to add to Tether\n * @param {string[]} classes The array of class types for Tether\n * @param {string} classPrefix The prefix to add to the front of the class\n * @param {string} outOfBoundsClass The class to apply when out of bounds\n * @private\n */\nfunction _addOutOfBoundsClass(oob, addClasses, classes, classPrefix, outOfBoundsClass) {\n if (oob.length) {\n let oobClass;\n if (!isUndefined(outOfBoundsClass)) {\n oobClass = outOfBoundsClass;\n } else {\n oobClass = getClass('out-of-bounds', classes, classPrefix);\n }\n\n addClasses.push(oobClass);\n oob.forEach((side) => {\n addClasses.push(`${oobClass}-${side}`);\n });\n }\n}\n\n/**\n * Calculates if out of bounds or pinned in the X direction.\n *\n * @param {number} left\n * @param {number[]} bounds Array of bounds of the format [left, top, right, bottom]\n * @param {number} width\n * @param pin\n * @param pinned\n * @param {string[]} oob\n * @return {number}\n * @private\n */\nfunction _calculateOOBAndPinnedLeft(left, bounds, width, pin, pinned, oob) {\n if (left < bounds[0]) {\n if (pin.indexOf('left') >= 0) {\n left = bounds[0];\n pinned.push('left');\n } else {\n oob.push('left');\n }\n }\n\n if (left + width > bounds[2]) {\n if (pin.indexOf('right') >= 0) {\n left = bounds[2] - width;\n pinned.push('right');\n } else {\n oob.push('right');\n }\n }\n\n return left;\n}\n\n/**\n * Calculates if out of bounds or pinned in the Y direction.\n *\n * @param {number} top\n * @param {number[]} bounds Array of bounds of the format [left, top, right, bottom]\n * @param {number} height\n * @param pin\n * @param {string[]} pinned\n * @param {string[]} oob\n * @return {number}\n * @private\n */\nfunction _calculateOOBAndPinnedTop(top, bounds, height, pin, pinned, oob) {\n if (top < bounds[1]) {\n if (pin.indexOf('top') >= 0) {\n top = bounds[1];\n pinned.push('top');\n } else {\n oob.push('top');\n }\n }\n\n if (top + height > bounds[3]) {\n if (pin.indexOf('bottom') >= 0) {\n top = bounds[3] - height;\n pinned.push('bottom');\n } else {\n oob.push('bottom');\n }\n }\n\n return top;\n}\n\n/**\n * Flip X \"together\"\n * @param {object} tAttachment The target attachment\n * @param {object} eAttachment The element attachment\n * @param {number[]} bounds Array of bounds of the format [left, top, right, bottom]\n * @param {number} width\n * @param targetWidth\n * @param {number} left\n * @private\n */\nfunction _flipXTogether(tAttachment, eAttachment, bounds, width, targetWidth, left) {\n if (left < bounds[0] && tAttachment.left === 'left') {\n if (eAttachment.left === 'right') {\n left += targetWidth;\n tAttachment.left = 'right';\n\n left += width;\n eAttachment.left = 'left';\n\n } else if (eAttachment.left === 'left') {\n left += targetWidth;\n tAttachment.left = 'right';\n\n left -= width;\n eAttachment.left = 'right';\n }\n\n } else if (left + width > bounds[2] && tAttachment.left === 'right') {\n if (eAttachment.left === 'left') {\n left -= targetWidth;\n tAttachment.left = 'left';\n\n left -= width;\n eAttachment.left = 'right';\n\n } else if (eAttachment.left === 'right') {\n left -= targetWidth;\n tAttachment.left = 'left';\n\n left += width;\n eAttachment.left = 'left';\n }\n\n } else if (tAttachment.left === 'center') {\n if (left + width > bounds[2] && eAttachment.left === 'left') {\n left -= width;\n eAttachment.left = 'right';\n\n } else if (left < bounds[0] && eAttachment.left === 'right') {\n left += width;\n eAttachment.left = 'left';\n }\n }\n\n return left;\n}\n\n/**\n * Flip Y \"together\"\n * @param {object} tAttachment The target attachment\n * @param {object} eAttachment The element attachment\n * @param {number[]} bounds Array of bounds of the format [left, top, right, bottom]\n * @param {number} height\n * @param targetHeight\n * @param {number} top\n * @private\n */\nfunction _flipYTogether(tAttachment, eAttachment, bounds, height, targetHeight, top) {\n if (tAttachment.top === 'top') {\n if (eAttachment.top === 'bottom' && top < bounds[1]) {\n top += targetHeight;\n tAttachment.top = 'bottom';\n\n top += height;\n eAttachment.top = 'top';\n\n } else if (eAttachment.top === 'top' && top + height > bounds[3] && top - (height - targetHeight) >= bounds[1]) {\n top -= height - targetHeight;\n tAttachment.top = 'bottom';\n\n eAttachment.top = 'bottom';\n }\n }\n\n if (tAttachment.top === 'bottom') {\n if (eAttachment.top === 'top' && top + height > bounds[3]) {\n top -= targetHeight;\n tAttachment.top = 'top';\n\n top -= height;\n eAttachment.top = 'bottom';\n\n } else if (eAttachment.top === 'bottom' && top < bounds[1] && top + (height * 2 - targetHeight) <= bounds[3]) {\n top += height - targetHeight;\n tAttachment.top = 'top';\n\n eAttachment.top = 'top';\n\n }\n }\n\n if (tAttachment.top === 'middle') {\n if (top + height > bounds[3] && eAttachment.top === 'top') {\n top -= height;\n eAttachment.top = 'bottom';\n\n } else if (top < bounds[1] && eAttachment.top === 'bottom') {\n top += height;\n eAttachment.top = 'top';\n }\n }\n\n return top;\n}\n\n/**\n * Get all the initial classes\n * @param classes\n * @param {string} classPrefix\n * @param constraints\n * @return {[*, *]}\n * @private\n */\nfunction _getAllClasses(classes, classPrefix, constraints) {\n const allClasses = [getClass('pinned', classes, classPrefix), getClass('out-of-bounds', classes, classPrefix)];\n\n constraints.forEach((constraint) => {\n const { outOfBoundsClass, pinnedClass } = constraint;\n if (outOfBoundsClass) {\n allClasses.push(outOfBoundsClass);\n }\n if (pinnedClass) {\n allClasses.push(pinnedClass);\n }\n });\n\n allClasses.forEach((cls) => {\n ['left', 'top', 'right', 'bottom'].forEach((side) => {\n allClasses.push(`${cls}-${side}`);\n });\n });\n\n return allClasses;\n}\n\nexport default {\n position({ top, left, targetAttachment }) {\n if (!this.options.constraints) {\n return true;\n }\n\n let { height, width } = this.cache('element-bounds', () => {\n return getBounds(this.bodyElement, this.element);\n });\n\n if (width === 0 && height === 0 && !isUndefined(this.lastSize)) {\n // Handle the item getting hidden as a result of our positioning without glitching\n // the classes in and out\n ({ width, height } = this.lastSize);\n }\n\n const targetSize = this.cache('target-bounds', () => {\n return this.getTargetBounds();\n });\n\n const { height: targetHeight, width: targetWidth } = targetSize;\n const { classes, classPrefix } = this.options;\n\n const allClasses = _getAllClasses(classes, classPrefix, this.options.constraints);\n const addClasses = [];\n\n const tAttachment = extend({}, targetAttachment);\n const eAttachment = extend({}, this.attachment);\n\n this.options.constraints.forEach((constraint) => {\n let { to, attachment, pin } = constraint;\n\n if (isUndefined(attachment)) {\n attachment = '';\n }\n\n let changeAttachX, changeAttachY;\n if (attachment.indexOf(' ') >= 0) {\n [changeAttachY, changeAttachX] = attachment.split(' ');\n } else {\n changeAttachX = changeAttachY = attachment;\n }\n\n const bounds = getBoundingRect(this.bodyElement, this, to);\n\n if (changeAttachY === 'target' || changeAttachY === 'both') {\n if (top < bounds[1] && tAttachment.top === 'top') {\n top += targetHeight;\n tAttachment.top = 'bottom';\n }\n\n if (top + height > bounds[3] && tAttachment.top === 'bottom') {\n top -= targetHeight;\n tAttachment.top = 'top';\n }\n }\n\n if (changeAttachY === 'together') {\n top = _flipYTogether(tAttachment, eAttachment, bounds, height, targetHeight, top);\n }\n\n if (changeAttachX === 'target' || changeAttachX === 'both') {\n if (left < bounds[0] && tAttachment.left === 'left') {\n left += targetWidth;\n tAttachment.left = 'right';\n }\n\n if (left + width > bounds[2] && tAttachment.left === 'right') {\n left -= targetWidth;\n tAttachment.left = 'left';\n }\n }\n\n if (changeAttachX === 'together') {\n left = _flipXTogether(tAttachment, eAttachment, bounds, width, targetWidth, left);\n }\n\n if (changeAttachY === 'element' || changeAttachY === 'both') {\n if (top < bounds[1] && eAttachment.top === 'bottom') {\n top += height;\n eAttachment.top = 'top';\n }\n\n if (top + height > bounds[3] && eAttachment.top === 'top') {\n top -= height;\n eAttachment.top = 'bottom';\n }\n }\n\n if (changeAttachX === 'element' || changeAttachX === 'both') {\n if (left < bounds[0]) {\n if (eAttachment.left === 'right') {\n left += width;\n eAttachment.left = 'left';\n } else if (eAttachment.left === 'center') {\n left += (width / 2);\n eAttachment.left = 'left';\n }\n }\n\n if (left + width > bounds[2]) {\n if (eAttachment.left === 'left') {\n left -= width;\n eAttachment.left = 'right';\n } else if (eAttachment.left === 'center') {\n left -= (width / 2);\n eAttachment.left = 'right';\n }\n }\n }\n\n if (isString(pin)) {\n pin = pin.split(',').map((p) => p.trim());\n } else if (pin === true) {\n pin = ['top', 'left', 'right', 'bottom'];\n }\n\n pin = pin || [];\n\n const pinned = [];\n const oob = [];\n\n left = _calculateOOBAndPinnedLeft(left, bounds, width, pin, pinned, oob);\n top = _calculateOOBAndPinnedTop(top, bounds, height, pin, pinned, oob);\n\n if (pinned.length) {\n let pinnedClass;\n if (!isUndefined(this.options.pinnedClass)) {\n pinnedClass = this.options.pinnedClass;\n } else {\n pinnedClass = getClass('pinned', classes, classPrefix);\n }\n\n addClasses.push(pinnedClass);\n pinned.forEach((side) => {\n addClasses.push(`${pinnedClass}-${side}`);\n });\n }\n\n _addOutOfBoundsClass(oob, addClasses, classes, classPrefix, this.options.outOfBoundsClass);\n\n if (pinned.indexOf('left') >= 0 || pinned.indexOf('right') >= 0) {\n eAttachment.left = tAttachment.left = false;\n }\n if (pinned.indexOf('top') >= 0 || pinned.indexOf('bottom') >= 0) {\n eAttachment.top = tAttachment.top = false;\n }\n\n if (tAttachment.top !== targetAttachment.top ||\n tAttachment.left !== targetAttachment.left ||\n eAttachment.top !== this.attachment.top ||\n eAttachment.left !== this.attachment.left) {\n this.updateAttachClasses(eAttachment, tAttachment);\n this.trigger('update', {\n attachment: eAttachment,\n targetAttachment: tAttachment\n });\n }\n });\n\n defer(() => {\n if (!(this.options.addTargetClasses === false)) {\n updateClasses(this.target, addClasses, allClasses);\n }\n updateClasses(this.element, addClasses, allClasses);\n });\n\n return { top, left };\n }\n};\n","import { isFunction, isString } from './utils/type-check';\n\nexport default {\n position({ top, left }) {\n if (!this.options.shift) {\n return;\n }\n\n let { shift } = this.options;\n if (isFunction(shift)) {\n shift = shift.call(this, { top, left });\n }\n\n let shiftTop, shiftLeft;\n if (isString(shift)) {\n shift = shift.split(' ');\n shift[1] = shift[1] || shift[0];\n\n ([shiftTop, shiftLeft] = shift);\n\n shiftTop = parseFloat(shiftTop, 10);\n shiftLeft = parseFloat(shiftLeft, 10);\n } else {\n ([shiftTop, shiftLeft] = [shift.top, shift.left]);\n }\n\n top += shiftTop;\n left += shiftLeft;\n\n return { top, left };\n }\n};\n","import { isUndefined } from './utils/type-check';\n\nexport class Evented {\n on(event, handler, ctx, once = false) {\n if (isUndefined(this.bindings)) {\n this.bindings = {};\n }\n if (isUndefined(this.bindings[event])) {\n this.bindings[event] = [];\n }\n this.bindings[event].push({ handler, ctx, once });\n\n return this;\n }\n\n once(event, handler, ctx) {\n return this.on(event, handler, ctx, true);\n }\n\n off(event, handler) {\n if (isUndefined(this.bindings) ||\n isUndefined(this.bindings[event])) {\n return this;\n }\n\n if (isUndefined(handler)) {\n delete this.bindings[event];\n } else {\n this.bindings[event].forEach((binding, index) => {\n if (binding.handler === handler) {\n this.bindings[event].splice(index, 1);\n }\n });\n }\n\n return this;\n }\n\n trigger(event, ...args) {\n if (!isUndefined(this.bindings) && this.bindings[event]) {\n this.bindings[event].forEach((binding, index) => {\n const { ctx, handler, once } = binding;\n\n const context = ctx || this;\n\n handler.apply(context, args);\n\n if (once) {\n this.bindings[event].splice(index, 1);\n }\n });\n }\n\n return this;\n }\n}\n","import { isString, isUndefined } from './type-check';\n\nconst MIRROR_LR = {\n center: 'center',\n left: 'right',\n right: 'left'\n};\n\nconst MIRROR_TB = {\n middle: 'middle',\n top: 'bottom',\n bottom: 'top'\n};\n\nconst OFFSET_MAP = {\n top: 0,\n left: 0,\n middle: '50%',\n center: '50%',\n bottom: '100%',\n right: '100%'\n};\n\nexport function addOffset(...offsets) {\n const out = { top: 0, left: 0 };\n\n offsets.forEach(({ top, left }) => {\n if (isString(top)) {\n top = parseFloat(top);\n }\n if (isString(left)) {\n left = parseFloat(left);\n }\n\n out.top += top;\n out.left += left;\n });\n\n return out;\n}\n\nexport function attachmentToOffset(attachment) {\n let { left, top } = attachment;\n\n if (!isUndefined(OFFSET_MAP[attachment.left])) {\n left = OFFSET_MAP[attachment.left];\n }\n\n if (!isUndefined(OFFSET_MAP[attachment.top])) {\n top = OFFSET_MAP[attachment.top];\n }\n\n return { left, top };\n}\n\nexport function autoToFixedAttachment(attachment, relativeToAttachment) {\n let { left, top } = attachment;\n\n if (left === 'auto') {\n left = MIRROR_LR[relativeToAttachment.left];\n }\n\n if (top === 'auto') {\n top = MIRROR_TB[relativeToAttachment.top];\n }\n\n return { left, top };\n}\n\nexport function offsetToPx(offset, size) {\n if (isString(offset.left) && offset.left.indexOf('%') !== -1) {\n offset.left = parseFloat(offset.left) / 100 * size.width;\n }\n if (isString(offset.top) && offset.top.indexOf('%') !== -1) {\n offset.top = parseFloat(offset.top) / 100 * size.height;\n }\n\n return offset;\n}\n\nexport function parseTopLeft(value) {\n const [top, left] = value.split(' ');\n return { top, left };\n}\n","import { isUndefined } from './type-check';\n\nexport function getScrollParents(el) {\n // In firefox if the el is inside an iframe with display: none; window.getComputedStyle() will return null;\n // https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n const computedStyle = getComputedStyle(el) || {};\n const { position } = computedStyle;\n let parents = [];\n\n if (position === 'fixed') {\n return [el];\n }\n\n let parent = el;\n while ((parent = parent.parentNode) && parent && parent.nodeType === 1) {\n let style;\n try {\n style = getComputedStyle(parent);\n } catch(err) {\n // Intentionally blank\n }\n\n if (isUndefined(style) || style === null) {\n parents.push(parent);\n return parents;\n }\n\n const { overflow, overflowX, overflowY } = style;\n if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) {\n if (position !== 'absolute' || ['relative', 'absolute', 'fixed'].indexOf(style.position) >= 0) {\n parents.push(parent);\n }\n }\n }\n\n parents.push(el.ownerDocument.body);\n\n // If the node is within a frame, account for the parent window scroll\n if (el.ownerDocument !== document) {\n parents.push(el.ownerDocument.defaultView);\n }\n\n return parents;\n}\n\nexport function getOffsetParent(el) {\n return el.offsetParent || document.documentElement;\n}\n","import '../css/tether.scss';\nimport '../css/tether-theme-arrows.scss';\nimport '../css/tether-theme-arrows-dark.scss';\nimport '../css/tether-theme-basic.scss';\nimport Abutment from './abutment';\nimport Constraint from './constraint';\nimport Shift from './shift';\nimport { Evented } from './evented';\nimport { addClass, getClass, removeClass, updateClasses } from './utils/classes';\nimport { defer, flush } from './utils/deferred';\nimport { extend, getScrollBarSize } from './utils/general';\nimport { addOffset, attachmentToOffset, autoToFixedAttachment, offsetToPx, parseTopLeft } from './utils/offset';\nimport { getBounds, getScrollHandleBounds, getVisibleBounds, removeUtilElements } from './utils/bounds';\nimport { getOffsetParent, getScrollParents } from './utils/parents';\nimport { isNumber, isObject, isString, isUndefined } from './utils/type-check';\n\nconst TetherBase = { modules: [Constraint, Abutment, Shift] };\n\nfunction isFullscreenElement(e) {\n let d = e.ownerDocument;\n let fe = d.fullscreenElement || d.webkitFullscreenElement || d.mozFullScreenElement || d.msFullscreenElement;\n return fe === e;\n}\n\nfunction within(a, b, diff = 1) {\n return (a + diff >= b && b >= a - diff);\n}\n\nconst transformKey = (() => {\n if (isUndefined(document)) {\n return '';\n }\n const el = document.createElement('div');\n\n const transforms = ['transform', 'WebkitTransform', 'OTransform', 'MozTransform', 'msTransform'];\n for (let i = 0; i < transforms.length; ++i) {\n const key = transforms[i];\n if (el.style[key] !== undefined) {\n return key;\n }\n }\n})();\n\nconst tethers = [];\n\nconst position = () => {\n tethers.forEach((tether) => {\n tether.position(false);\n });\n flush();\n};\n\nfunction now() {\n return performance.now();\n}\n\n(() => {\n let lastCall = null;\n let lastDuration = null;\n let pendingTimeout = null;\n\n const tick = () => {\n if (!isUndefined(lastDuration) && lastDuration > 16) {\n // We voluntarily throttle ourselves if we can't manage 60fps\n lastDuration = Math.min(lastDuration - 16, 250);\n\n // Just in case this is the last event, remember to position just once more\n pendingTimeout = setTimeout(tick, 250);\n return;\n }\n\n if (!isUndefined(lastCall) && (now() - lastCall) < 10) {\n // Some browsers call events a little too frequently, refuse to run more than is reasonable\n return;\n }\n\n if (pendingTimeout != null) {\n clearTimeout(pendingTimeout);\n pendingTimeout = null;\n }\n\n lastCall = now();\n position();\n lastDuration = now() - lastCall;\n };\n\n if (!isUndefined(window) && !isUndefined(window.addEventListener)) {\n ['resize', 'scroll', 'touchmove'].forEach((event) => {\n window.addEventListener(event, tick);\n });\n }\n})();\n\nclass TetherClass extends Evented {\n constructor(options) {\n super();\n this.position = this.position.bind(this);\n\n tethers.push(this);\n\n this.history = [];\n\n this.setOptions(options, false);\n\n TetherBase.modules.forEach((module) => {\n if (!isUndefined(module.initialize)) {\n module.initialize.call(this);\n }\n });\n\n this.position();\n }\n\n setOptions(options, pos = true) {\n const defaults = {\n offset: '0 0',\n targetOffset: '0 0',\n targetAttachment: 'auto auto',\n classPrefix: 'tether',\n bodyElement: document.body\n };\n\n this.options = extend(defaults, options);\n\n let { element, target, targetModifier, bodyElement } = this.options;\n this.element = element;\n this.target = target;\n this.targetModifier = targetModifier;\n\n if (typeof bodyElement === 'string') {\n bodyElement = document.querySelector(bodyElement);\n }\n this.bodyElement = bodyElement;\n\n if (this.target === 'viewport') {\n this.target = document.body;\n this.targetModifier = 'visible';\n } else if (this.target === 'scroll-handle') {\n this.target = document.body;\n this.targetModifier = 'scroll-handle';\n }\n\n ['element', 'target'].forEach((key) => {\n if (isUndefined(this[key])) {\n throw new Error('Tether Error: Both element and target must be defined');\n }\n\n if (!isUndefined(this[key].jquery)) {\n this[key] = this[key][0];\n } else if (isString(this[key])) {\n this[key] = document.querySelector(this[key]);\n }\n });\n\n this._addClasses();\n\n if (!this.options.attachment) {\n throw new Error('Tether Error: You must provide an attachment');\n }\n\n this.targetAttachment = parseTopLeft(this.options.targetAttachment);\n this.attachment = parseTopLeft(this.options.attachment);\n this.offset = parseTopLeft(this.options.offset);\n this.targetOffset = parseTopLeft(this.options.targetOffset);\n\n if (!isUndefined(this.scrollParents)) {\n this.disable();\n }\n\n if (this.targetModifier === 'scroll-handle') {\n this.scrollParents = [this.target];\n } else {\n this.scrollParents = getScrollParents(this.target);\n }\n\n if (!(this.options.enabled === false)) {\n this.enable(pos);\n }\n }\n\n getTargetBounds() {\n if (!isUndefined(this.targetModifier)) {\n if (this.targetModifier === 'visible') {\n return getVisibleBounds(this.bodyElement, this.target);\n } else if (this.targetModifier === 'scroll-handle') {\n return getScrollHandleBounds(this.bodyElement, this.target);\n }\n } else {\n return getBounds(this.bodyElement, this.target);\n }\n }\n\n clearCache() {\n this._cache = {};\n }\n\n cache(k, getter) {\n // More than one module will often need the same DOM info, so\n // we keep a cache which is cleared on each position call\n if (isUndefined(this._cache)) {\n this._cache = {};\n }\n\n if (isUndefined(this._cache[k])) {\n this._cache[k] = getter.call(this);\n }\n\n return this._cache[k];\n }\n\n enable(pos = true) {\n const { classes, classPrefix } = this.options;\n if (!(this.options.addTargetClasses === false)) {\n addClass(this.target, getClass('enabled', classes, classPrefix));\n }\n addClass(this.element, getClass('enabled', classes, classPrefix));\n this.enabled = true;\n\n this.scrollParents.forEach((parent) => {\n if (parent !== this.target.ownerDocument) {\n parent.addEventListener('scroll', this.position);\n }\n });\n\n if (pos) {\n this.position();\n }\n }\n\n disable() {\n const { classes, classPrefix } = this.options;\n removeClass(this.target, getClass('enabled', classes, classPrefix));\n removeClass(this.element, getClass('enabled', classes, classPrefix));\n this.enabled = false;\n\n if (!isUndefined(this.scrollParents)) {\n this.scrollParents.forEach((parent) => {\n parent.removeEventListener('scroll', this.position);\n });\n }\n }\n\n destroy() {\n this.disable();\n\n this._removeClasses();\n\n tethers.forEach((tether, i) => {\n if (tether === this) {\n tethers.splice(i, 1);\n }\n });\n\n // Remove any elements we were using for convenience from the DOM\n if (tethers.length === 0) {\n removeUtilElements(this.bodyElement);\n }\n }\n\n updateAttachClasses(elementAttach, targetAttach) {\n elementAttach = elementAttach || this.attachment;\n targetAttach = targetAttach || this.targetAttachment;\n const sides = ['left', 'top', 'bottom', 'right', 'middle', 'center'];\n const { classes, classPrefix } = this.options;\n\n if (!isUndefined(this._addAttachClasses) && this._addAttachClasses.length) {\n // updateAttachClasses can be called more than once in a position call, so\n // we need to clean up after ourselves such that when the last defer gets\n // ran it doesn't add any extra classes from previous calls.\n this._addAttachClasses.splice(0, this._addAttachClasses.length);\n }\n\n if (isUndefined(this._addAttachClasses)) {\n this._addAttachClasses = [];\n }\n this.add = this._addAttachClasses;\n\n if (elementAttach.top) {\n this.add.push(`${getClass('element-attached', classes, classPrefix)}-${elementAttach.top}`);\n }\n if (elementAttach.left) {\n this.add.push(`${getClass('element-attached', classes, classPrefix)}-${elementAttach.left}`);\n }\n if (targetAttach.top) {\n this.add.push(`${getClass('target-attached', classes, classPrefix)}-${targetAttach.top}`);\n }\n if (targetAttach.left) {\n this.add.push(`${getClass('target-attached', classes, classPrefix)}-${targetAttach.left}`);\n }\n\n this.all = [];\n sides.forEach((side) => {\n this.all.push(`${getClass('element-attached', classes, classPrefix)}-${side}`);\n this.all.push(`${getClass('target-attached', classes, classPrefix)}-${side}`);\n });\n\n defer(() => {\n if (isUndefined(this._addAttachClasses)) {\n return;\n }\n\n updateClasses(this.element, this._addAttachClasses, this.all);\n if (!(this.options.addTargetClasses === false)) {\n updateClasses(this.target, this._addAttachClasses, this.all);\n }\n\n delete this._addAttachClasses;\n });\n }\n\n position(flushChanges = true) {\n // flushChanges commits the changes immediately, leave true unless you are positioning multiple\n // tethers (in which case call Tether.Utils.flush yourself when you're done)\n\n if (!this.enabled) {\n return;\n }\n\n this.clearCache();\n\n // Turn 'auto' attachments into the appropriate corner or edge\n const targetAttachment = autoToFixedAttachment(this.targetAttachment, this.attachment);\n\n this.updateAttachClasses(this.attachment, targetAttachment);\n\n const elementPos = this.cache('element-bounds', () => {\n return getBounds(this.bodyElement, this.element);\n });\n\n let { width, height } = elementPos;\n\n if (width === 0 && height === 0 && !isUndefined(this.lastSize)) {\n // We cache the height and width to make it possible to position elements that are\n // getting hidden.\n ({ width, height } = this.lastSize);\n } else {\n this.lastSize = { width, height };\n }\n\n const targetPos = this.cache('target-bounds', () => {\n return this.getTargetBounds();\n });\n const targetSize = targetPos;\n\n // Get an actual px offset from the attachment\n let offset = offsetToPx(attachmentToOffset(this.attachment), { width, height });\n let targetOffset = offsetToPx(attachmentToOffset(targetAttachment), targetSize);\n\n const manualOffset = offsetToPx(this.offset, { width, height });\n const manualTargetOffset = offsetToPx(this.targetOffset, targetSize);\n\n // Add the manually provided offset\n offset = addOffset(offset, manualOffset);\n targetOffset = addOffset(targetOffset, manualTargetOffset);\n\n // It's now our goal to make (element position + offset) == (target position + target offset)\n let left = targetPos.left + targetOffset.left - offset.left;\n let top = targetPos.top + targetOffset.top - offset.top;\n\n for (let i = 0; i < TetherBase.modules.length; ++i) {\n const module = TetherBase.modules[i];\n const ret = module.position.call(this, {\n left,\n top,\n targetAttachment,\n targetPos,\n elementPos,\n offset,\n targetOffset,\n manualOffset,\n manualTargetOffset,\n scrollbarSize,\n attachment: this.attachment\n });\n\n if (ret === false) {\n return false;\n } else if (isUndefined(ret) || !isObject(ret)) {\n continue;\n } else {\n ({ top, left } = ret);\n }\n }\n\n // We describe the position three different ways to give the optimizer\n // a chance to decide the best possible way to position the element\n // with the fewest repaints.\n const next = {\n // It's position relative to the page (absolute positioning when\n // the element is a child of the body)\n page: {\n top,\n left\n },\n\n // It's position relative to the viewport (fixed positioning)\n viewport: {\n top: top - pageYOffset,\n bottom: pageYOffset - top - height + innerHeight,\n left: left - pageXOffset,\n right: pageXOffset - left - width + innerWidth\n }\n };\n\n let doc = this.target.ownerDocument;\n let win = doc.defaultView;\n\n let scrollbarSize;\n if (win.innerHeight > doc.documentElement.clientHeight) {\n scrollbarSize = this.cache('scrollbar-size', getScrollBarSize);\n next.viewport.bottom -= scrollbarSize.height;\n }\n\n if (win.innerWidth > doc.documentElement.clientWidth) {\n scrollbarSize = this.cache('scrollbar-size', getScrollBarSize);\n next.viewport.right -= scrollbarSize.width;\n }\n\n if (['', 'static'].indexOf(doc.body.style.position) === -1 ||\n ['', 'static'].indexOf(doc.body.parentElement.style.position) === -1) {\n // Absolute positioning in the body will be relative to the page, not the 'initial containing block'\n next.page.bottom = doc.body.scrollHeight - top - height;\n next.page.right = doc.body.scrollWidth - left - width;\n }\n\n if (!isUndefined(this.options.optimizations) &&\n this.options.optimizations.moveElement !== false &&\n isUndefined(this.targetModifier)) {\n const offsetParent = this.cache('target-offsetparent', () => getOffsetParent(this.target));\n const offsetPosition = this.cache('target-offsetparent-bounds', () => getBounds(this.bodyElement, offsetParent));\n const offsetParentStyle = getComputedStyle(offsetParent);\n const offsetParentSize = offsetPosition;\n\n const offsetBorder = {};\n ['Top', 'Left', 'Bottom', 'Right'].forEach((side) => {\n offsetBorder[side.toLowerCase()] = parseFloat(offsetParentStyle[`border${side}Width`]);\n });\n\n offsetPosition.right = doc.body.scrollWidth - offsetPosition.left - offsetParentSize.width + offsetBorder.right;\n offsetPosition.bottom = doc.body.scrollHeight - offsetPosition.top - offsetParentSize.height + offsetBorder.bottom;\n\n if (next.page.top >= (offsetPosition.top + offsetBorder.top) && next.page.bottom >= offsetPosition.bottom) {\n if (next.page.left >= (offsetPosition.left + offsetBorder.left) && next.page.right >= offsetPosition.right) {\n // We're within the visible part of the target's scroll parent\n const { scrollLeft, scrollTop } = offsetParent;\n\n // It's position relative to the target's offset parent (absolute positioning when\n // the element is moved to be a child of the target's offset parent).\n next.offset = {\n top: next.page.top - offsetPosition.top + scrollTop - offsetBorder.top,\n left: next.page.left - offsetPosition.left + scrollLeft - offsetBorder.left\n };\n }\n }\n }\n\n // We could also travel up the DOM and try each containing context, rather than only\n // looking at the body, but we're gonna get diminishing returns.\n\n this.move(next);\n\n this.history.unshift(next);\n\n if (this.history.length > 3) {\n this.history.pop();\n }\n\n if (flushChanges) {\n flush();\n }\n\n return true;\n }\n\n // THE ISSUE\n move(pos) {\n if (isUndefined(this.element.parentNode)) {\n return;\n }\n\n const same = {};\n\n for (let type in pos) {\n same[type] = {};\n\n for (let key in pos[type]) {\n let found = false;\n\n for (let i = 0; i < this.history.length; ++i) {\n const point = this.history[i];\n if (!isUndefined(point[type]) &&\n !within(point[type][key], pos[type][key])) {\n found = true;\n break;\n }\n\n }\n\n if (!found) {\n same[type][key] = true;\n }\n }\n }\n\n let css = { top: '', left: '', right: '', bottom: '' };\n\n const transcribe = (_same, _pos) => {\n const hasOptimizations = !isUndefined(this.options.optimizations);\n const gpu = hasOptimizations ? this.options.optimizations.gpu : null;\n if (gpu !== false) {\n let yPos, xPos;\n if (_same.top) {\n css.top = 0;\n yPos = _pos.top;\n } else {\n css.bottom = 0;\n yPos = -_pos.bottom;\n }\n\n if (_same.left) {\n css.left = 0;\n xPos = _pos.left;\n } else {\n css.right = 0;\n xPos = -_pos.right;\n }\n\n if (isNumber(window.devicePixelRatio) && devicePixelRatio % 1 === 0) {\n xPos = Math.round(xPos * devicePixelRatio) / devicePixelRatio;\n yPos = Math.round(yPos * devicePixelRatio) / devicePixelRatio;\n }\n\n css[transformKey] = `translateX(${xPos}px) translateY(${yPos}px)`;\n\n if (transformKey !== 'msTransform') {\n // The Z transform will keep this in the GPU (faster, and prevents artifacts),\n // but IE9 doesn't support 3d transforms and will choke.\n css[transformKey] += ' translateZ(0)';\n }\n\n } else {\n if (_same.top) {\n css.top = `${_pos.top}px`;\n } else {\n css.bottom = `${_pos.bottom}px`;\n }\n\n if (_same.left) {\n css.left = `${_pos.left}px`;\n } else {\n css.right = `${_pos.right}px`;\n }\n }\n };\n\n const hasOptimizations = !isUndefined(this.options.optimizations);\n let allowPositionFixed = true;\n\n if (hasOptimizations && this.options.optimizations.allowPositionFixed === false) {\n allowPositionFixed = false;\n }\n\n let moved = false;\n if ((same.page.top || same.page.bottom) && (same.page.left || same.page.right)) {\n css.position = 'absolute';\n transcribe(same.page, pos.page);\n\n } else if (allowPositionFixed && (same.viewport.top || same.viewport.bottom) && (same.viewport.left || same.viewport.right)) {\n css.position = 'fixed';\n transcribe(same.viewport, pos.viewport);\n } else if (!isUndefined(same.offset) && same.offset.top && same.offset.left) {\n css.position = 'absolute';\n const offsetParent = this.cache('target-offsetparent', () => getOffsetParent(this.target));\n\n if (getOffsetParent(this.element) !== offsetParent) {\n defer(() => {\n this.element.parentNode.removeChild(this.element);\n offsetParent.appendChild(this.element);\n });\n }\n\n transcribe(same.offset, pos.offset);\n moved = true;\n\n } else {\n css.position = 'absolute';\n transcribe({ top: true, left: true }, pos.page);\n }\n\n if (!moved) {\n if (this.options.bodyElement) {\n if (this.element.parentNode !== this.options.bodyElement) {\n this.options.bodyElement.appendChild(this.element);\n }\n } else {\n let offsetParentIsBody = true;\n\n let currentNode = this.element.parentNode;\n while (currentNode && currentNode.nodeType === 1 && currentNode.tagName !== 'BODY' && !isFullscreenElement(currentNode)) {\n if (getComputedStyle(currentNode).position !== 'static') {\n offsetParentIsBody = false;\n break;\n }\n\n currentNode = currentNode.parentNode;\n }\n\n if (!offsetParentIsBody) {\n this.element.parentNode.removeChild(this.element);\n this.element.ownerDocument.body.appendChild(this.element);\n }\n }\n }\n\n // Any css change will trigger a repaint, so let's avoid one if nothing changed\n const writeCSS = {};\n let write = false;\n for (let key in css) {\n let val = css[key];\n let elVal = this.element.style[key];\n\n if (elVal !== val) {\n write = true;\n writeCSS[key] = val;\n }\n }\n\n if (write) {\n defer(() => {\n extend(this.element.style, writeCSS);\n this.trigger('repositioned');\n });\n }\n }\n\n _addClasses() {\n const { classes, classPrefix } = this.options;\n addClass(this.element, getClass('element', classes, classPrefix));\n if (!(this.options.addTargetClasses === false)) {\n addClass(this.target, getClass('target', classes, classPrefix));\n }\n }\n\n _removeClasses() {\n const { classes, classPrefix } = this.options;\n removeClass(this.element, getClass('element', classes, classPrefix));\n if (!(this.options.addTargetClasses === false)) {\n removeClass(this.target, getClass('target', classes, classPrefix));\n }\n\n this.all.forEach((className) => {\n this.element.classList.remove(className);\n this.target.classList.remove(className);\n });\n }\n}\n\nTetherClass.modules = [];\n\nTetherBase.position = position;\n\nlet Tether = extend(TetherClass, TetherBase);\n\nTether.modules.push({\n initialize() {\n const { classes, classPrefix } = this.options;\n this.markers = {};\n\n ['target', 'element'].forEach((type) => {\n const el = document.createElement('div');\n el.className = getClass(`${type}-marker`, classes, classPrefix);\n\n const dot = document.createElement('div');\n dot.className = getClass('marker-dot', classes, classPrefix);\n el.appendChild(dot);\n\n this[type].appendChild(el);\n\n this.markers[type] = { dot, el };\n });\n },\n\n position({ manualOffset, manualTargetOffset }) {\n const offsets = {\n element: manualOffset,\n target: manualTargetOffset\n };\n\n for (let type in offsets) {\n const offset = offsets[type];\n for (let side in offset) {\n let val = offset[side];\n if (!isString(val) ||\n val.indexOf('%') === -1 &&\n val.indexOf('px') === -1) {\n val += 'px';\n }\n\n if (this.markers[type].dot.style[side] !== val) {\n this.markers[type].dot.style[side] = val;\n }\n }\n }\n\n return true;\n }\n});\n\nexport default Tether;\n"],"names":["isString","value","isUndefined","undefined","addClass","el","name","split","forEach","cls","trim","classList","add","getClass","key","classes","classPrefix","removeClass","remove","updateClasses","all","indexOf","contains","deferred","defer","fn","push","flush","pop","_scrollBarSize","extend","out","args","Array","prototype","apply","arguments","slice","obj","hasOwnProperty","call","getScrollBarSize","inner","document","createElement","style","width","height","outer","position","top","left","pointerEvents","visibility","overflow","appendChild","body","widthContained","offsetWidth","widthScroll","clientWidth","removeChild","id","uniqueId","zeroPosCache","zeroElement","getBounds","doc","documentElement","ownerDocument","docEl","box","_getActualBoundingClientRect","origin","node","setAttribute","getAttribute","_getOrigin","scrollWidth","right","scrollHeight","bottom","clientTop","clientLeft","clientHeight","boundingRect","getBoundingClientRect","rect","k","frameElement","defaultView","frameRect","err","this","cache","_this","element","targetPos","getTargetBounds","abutted","side","targetPosSide","options","length","addTargetClasses","target","BOUNDS_FORMAT","targetAttachment","constraints","bodyElement","lastSize","targetSize","targetHeight","targetWidth","allClasses","constraint","outOfBoundsClass","pinnedClass","_getAllClasses","addClasses","tAttachment","eAttachment","attachment","changeAttachX","changeAttachY","to","pin","bounds","tether","scrollParents","pageXOffset","pageYOffset","innerWidth","innerHeight","nodeType","size","pos","getComputedStyle","win","i","toUpperCase","substr","parseFloat","getBoundingRect","_flipYTogether","_flipXTogether","map","p","pinned","oob","_calculateOOBAndPinnedLeft","_calculateOOBAndPinnedTop","oobClass","_addOutOfBoundsClass","updateAttachClasses","trigger","shift","shiftTop","shiftLeft","Evented","on","event","handler","ctx","once","bindings","off","binding","index","splice","context","_this2","MIRROR_LR","center","MIRROR_TB","middle","OFFSET_MAP","addOffset","offsets","attachmentToOffset","offsetToPx","offset","parseTopLeft","getOffsetParent","offsetParent","TetherBase","modules","Constraint","Abutment","Shift","lastCall","lastDuration","pendingTimeout","tick","transformKey","transforms","tethers","now","performance","Math","min","setTimeout","clearTimeout","window","addEventListener","TetherClass","bind","history","setOptions","module","initialize","defaults","targetOffset","targetModifier","querySelector","Error","jquery","_addClasses","disable","parents","parent","parentNode","overflowX","overflowY","test","getScrollParents","enabled","enable","getVisibleBounds","targetScrollTop","scrollTop","targetIsBody","scrollBottom","borderTopWidth","borderBottomWidth","borderLeftWidth","fitAdj","pow","max","scrollPercentage","getScrollHandleBounds","clearCache","_cache","getter","_this3","removeEventListener","_this4","destroy","_removeClasses","_this5","elementAttach","targetAttach","_addAttachClasses","_this6","flushChanges","relativeToAttachment","autoToFixedAttachment","elementPos","_this7","manualOffset","manualTargetOffset","ret","scrollbarSize","next","page","viewport","parentElement","optimizations","moveElement","offsetPosition","offsetParentStyle","offsetParentSize","offsetBorder","toLowerCase","scrollLeft","move","unshift","a","b","diff","same","type","found","point","within","css","transcribe","_same","_pos","yPos","xPos","_this8","gpu","devicePixelRatio","round","allowPositionFixed","e","d","moved","offsetParentIsBody","currentNode","tagName","fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement","writeCSS","write","val","className","_this9","Tether","markers","dot","_this10"],"mappings":";;wTA4BO,SAASA,EAASC,SACC,iBAAVA,EAOT,SAASC,EAAYD,eACTE,IAAVF,ECnCF,SAASG,EAASC,EAAIC,GAC3BA,EAAKC,MAAM,KAAKC,SAAQ,SAACC,GACnBA,EAAIC,QACNL,EAAGM,UAAUC,IAAIH,MAWhB,SAASI,EAASC,EAAUC,EAASC,mBAAnBF,IAAAA,EAAM,IACxBZ,EAAYa,IAAab,EAAYa,EAAQD,IAKvCE,EACCA,MAAeF,EAElBA,GAPc,IAAjBC,EAAQD,GACH,GAEFC,EAAQD,GAQZ,SAASG,EAAYZ,EAAIC,GAC9BA,EAAKC,MAAM,KAAKC,SAAQ,SAACC,GACnBA,EAAIC,QACNL,EAAGM,UAAUO,OAAOT,MAKnB,SAASU,EAAcd,EAAIO,EAAKQ,GAGrCA,EAAIZ,SAAQ,SAACC,IACe,IAAtBG,EAAIS,QAAQZ,IAAeJ,EAAGM,UAAUW,SAASb,IACnDQ,EAAYZ,EAAII,MAIpBG,EAAIJ,SAAQ,SAACC,GACNJ,EAAGM,UAAU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