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,gBAAkB,WAE1C,GAAK,KAAK,YAAV,CAIA,IAAI,EAAM,KAAK,aAGX,EAAU,KAAK,oBAAoB,KAAI,SAAU,GACjD,OAAO,IAAI,EAAoB,EAAY,OAAQ,EAAY,gBACnE,IAEA,KAAK,UAAU,KAAK,EAAK,EAAS,GAClC,KAAK,aAVL,CAWJ,EAOA,EAAkB,UAAU,YAAc,WACtC,KAAK,oBAAoB,OAAO,EACpC,EAOA,EAAkB,UAAU,UAAY,WACpC,OAAO,KAAK,oBAAoB,OAAS,CAC7C,EAKA,IAAI,EAA8B,oBAAX,QAAyB,IAAI,QAAY,IAAI,EAMhE,EAAmB,SAAS,GAC5B,IAAK,UAAU,OACX,MAAM,IAAI,UAAU,4CAGxB,IAAI,EAAa,EAAyB,cACtC,EAAW,IAAI,EAAkB,EAAU,EAAY,MAE3D,EAAU,IAAI,KAAM,EACxB,EAoBA,MAjBA,CAAC,UAAW,YAAa,cAAc,SAAQ,SAAU,GACrD,EAAiB,UAAU,GAAU,WACjC,OAAQ,EAAM,EAAU,IAAI,OAAO,GAAQ,MAAM,EAAK,WACtD,IAAI,CACR,CACJ,IAIiC,oBAAlB,eAEA,eAGJ,CAKV","file":"/npm/resize-observer-polyfill-futurepress@1.4.2/dist/ResizeObserver.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/resize-observer-polyfill-futurepress@1.4.2/dist/ResizeObserver.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n\ttypeof define === 'function' && define.amd ? define(factory) :\n\t(global.ResizeObserver = factory());\n}(this, (function () { 'use strict';\n\n/**\n * A collection of shims that provide minimal functionality of the ES6 collections.\n *\n * These implementations are not meant to be used outside of the ResizeObserver\n * modules as they cover only a limited range of use cases.\n */\n/* eslint-disable require-jsdoc, valid-jsdoc */\nvar MapShim = (function () {\n    if (typeof Map != 'undefined') {\n        return Map;\n    }\n\n    /**\n     * Returns index in provided array that matches the specified key.\n     *\n     * @param {Array<Array>} arr\n     * @param {*} key\n     * @returns {number}\n     */\n    function getIndex(arr, key) {\n        var result = -1;\n\n        arr.some(function (entry, index) {\n            if (entry[0] === key) {\n                result = index;\n\n                return true;\n            }\n\n            return false;\n        });\n\n        return result;\n    }\n\n    return (function () {\n        function anonymous() {\n            this.__entries__ = [];\n        }\n\n        var prototypeAccessors = { size: {} };\n\n        /**\n         * @returns {boolean}\n         */\n        prototypeAccessors.size.get = function () {\n            return this.__entries__.length;\n        };\n\n        /**\n         * @param {*} key\n         * @returns {*}\n         */\n        anonymous.prototype.get = function (key) {\n            var index = getIndex(this.__entries__, key);\n            var entry = this.__entries__[index];\n\n            return entry && entry[1];\n        };\n\n        /**\n         * @param {*} key\n         * @param {*} value\n         * @returns {void}\n         */\n        anonymous.prototype.set = function (key, value) {\n            var index = getIndex(this.__entries__, key);\n\n            if (~index) {\n                this.__entries__[index][1] = value;\n            } else {\n                this.__entries__.push([key, value]);\n            }\n        };\n\n        /**\n         * @param {*} key\n         * @returns {void}\n         */\n        anonymous.prototype.delete = function (key) {\n            var entries = this.__entries__;\n            var index = getIndex(entries, key);\n\n            if (~index) {\n                entries.splice(index, 1);\n            }\n        };\n\n        /**\n         * @param {*} key\n         * @returns {void}\n         */\n        anonymous.prototype.has = function (key) {\n            return !!~getIndex(this.__entries__, key);\n        };\n\n        /**\n         * @returns {void}\n         */\n        anonymous.prototype.clear = function () {\n            this.__entries__.splice(0);\n        };\n\n        /**\n         * @param {Function} callback\n         * @param {*} [ctx=null]\n         * @returns {void}\n         */\n        anonymous.prototype.forEach = function (callback, ctx) {\n            var this$1 = this;\n            if ( ctx === void 0 ) ctx = null;\n\n            for (var i = 0, list = this$1.__entries__; i < list.length; i += 1) {\n                var entry = list[i];\n\n                callback.call(ctx, entry[1], entry[0]);\n            }\n        };\n\n        Object.defineProperties( anonymous.prototype, prototypeAccessors );\n\n        return anonymous;\n    }());\n})();\n\n/**\n * Detects whether window and document objects are available in current environment.\n */\nvar isBrowser = typeof window != 'undefined' && typeof document != 'undefined' && window.document === document;\n\n/**\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\n * first one is not supported.\n *\n * @returns {number} Requests' identifier.\n */\nvar requestAnimationFrame$1 = (function () {\n    if (typeof requestAnimationFrame === 'function') {\n        return requestAnimationFrame;\n    }\n\n    return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };\n})();\n\n// Defines minimum timeout before adding a trailing call.\nvar trailingTimeout = 2;\n\n/**\n * Creates a wrapper function which ensures that provided callback will be\n * invoked only once during the specified delay period.\n *\n * @param {Function} callback - Function to be invoked after the delay period.\n * @param {number} delay - Delay after which to invoke callback.\n * @returns {Function}\n */\nvar throttle = function (callback, delay) {\n    var leadingCall = false,\n        trailingCall = false,\n        lastCallTime = 0;\n\n    /**\n     * Invokes the original callback function and schedules new invocation if\n     * the \"proxy\" was called during current request.\n     *\n     * @returns {void}\n     */\n    function resolvePending() {\n        if (leadingCall) {\n            leadingCall = false;\n\n            callback();\n        }\n\n        if (trailingCall) {\n            proxy();\n        }\n    }\n\n    /**\n     * Callback invoked after the specified delay. It will further postpone\n     * invocation of the original function delegating it to the\n     * requestAnimationFrame.\n     *\n     * @returns {void}\n     */\n    function timeoutCallback() {\n        requestAnimationFrame$1(resolvePending);\n    }\n\n    /**\n     * Schedules invocation of the original function.\n     *\n     * @returns {void}\n     */\n    function proxy() {\n        var timeStamp = Date.now();\n\n        if (leadingCall) {\n            // Reject immediately following calls.\n            if (timeStamp - lastCallTime < trailingTimeout) {\n                return;\n            }\n\n            // Schedule new call to be in invoked when the pending one is resolved.\n            // This is important for \"transitions\" which never actually start\n            // immediately so there is a chance that we might miss one if change\n            // happens amids the pending invocation.\n            trailingCall = true;\n        } else {\n            leadingCall = true;\n            trailingCall = false;\n\n            setTimeout(timeoutCallback, delay);\n        }\n\n        lastCallTime = timeStamp;\n    }\n\n    return proxy;\n};\n\n// Minimum delay before invoking the update of observers.\nvar REFRESH_DELAY = 20;\n\n// A list of substrings of CSS properties used to find transition events that\n// might affect dimensions of observed elements.\nvar transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];\n\n// Detect whether running in IE 11 (facepalm).\nvar isIE11 = typeof navigator != 'undefined' && /Trident\\/.*rv:11/.test(navigator.userAgent);\n\n// MutationObserver should not be used if running in Internet Explorer 11 as it's\n// implementation is unreliable. Example: https://jsfiddle.net/x2r3jpuz/2/\n//\n// It's a real bummer that there is no other way to check for this issue but to\n// use the UA information.\nvar mutationObserverSupported = typeof MutationObserver != 'undefined' && !isIE11;\n\n/**\n * Singleton controller class which handles updates of ResizeObserver instances.\n */\nvar ResizeObserverController = function() {\n    this.connected_ = false;\n    this.mutationEventsAdded_ = false;\n    this.mutationsObserver_ = null;\n    this.observers_ = [];\n\n    this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\n    this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\n};\n\n/**\n * Adds observer to observers list.\n *\n * @param {ResizeObserverSPI} observer - Observer to be added.\n * @returns {void}\n */\n\n\n/**\n * Holds reference to the controller's instance.\n *\n * @private {ResizeObserverController}\n */\n\n\n/**\n * Keeps reference to the instance of MutationObserver.\n *\n * @private {MutationObserver}\n */\n\n/**\n * Indicates whether DOM listeners have been added.\n *\n * @private {boolean}\n */\nResizeObserverController.prototype.addObserver = function (observer) {\n    if (!~this.observers_.indexOf(observer)) {\n        this.observers_.push(observer);\n    }\n\n    // Add listeners if they haven't been added yet.\n    if (!this.connected_) {\n        this.connect_();\n    }\n};\n\n/**\n * Removes observer from observers list.\n *\n * @param {ResizeObserverSPI} observer - Observer to be removed.\n * @returns {void}\n */\nResizeObserverController.prototype.removeObserver = function (observer) {\n    var observers = this.observers_;\n    var index = observers.indexOf(observer);\n\n    // Remove observer if it's present in registry.\n    if (~index) {\n        observers.splice(index, 1);\n    }\n\n    // Remove listeners if controller has no connected observers.\n    if (!observers.length && this.connected_) {\n        this.disconnect_();\n    }\n};\n\n/**\n * Invokes the update of observers. It will continue running updates insofar\n * it detects changes.\n *\n * @returns {void}\n */\nResizeObserverController.prototype.refresh = function () {\n    var changesDetected = this.updateObservers_();\n\n    // Continue running updates if changes have been detected as there might\n    // be future ones caused by CSS transitions.\n    if (changesDetected) {\n        this.refresh();\n    }\n};\n\n/**\n * Updates every observer from observers list and notifies them of queued\n * entries.\n *\n * @private\n * @returns {boolean} Returns \"true\" if any observer has detected changes in\n *  dimensions of it's elements.\n */\nResizeObserverController.prototype.updateObservers_ = function () {\n    // Collect observers that have active observations.\n    var activeObservers = this.observers_.filter(function (observer) {\n        return observer.gatherActive(), observer.hasActive();\n    });\n\n    // Deliver notifications in a separate cycle in order to avoid any\n    // collisions between observers, e.g. when multiple instances of\n    // ResizeObserver are tracking the same element and the callback of one\n    // of them changes content dimensions of the observed target. Sometimes\n    // this may result in notifications being blocked for the rest of observers.\n    activeObservers.forEach(function (observer) { return observer.broadcastActive(); });\n\n    return activeObservers.length > 0;\n};\n\n/**\n * Initializes DOM listeners.\n *\n * @private\n * @returns {void}\n */\nResizeObserverController.prototype.connect_ = function () {\n    // Do nothing if running in a non-browser environment or if listeners\n    // have been already added.\n    if (!isBrowser || this.connected_) {\n        return;\n    }\n\n    // Subscription to the \"Transitionend\" event is used as a workaround for\n    // delayed transitions. This way it's possible to capture at least the\n    // final state of an element.\n    document.addEventListener('transitionend', this.onTransitionEnd_);\n\n    window.addEventListener('resize', this.refresh);\n\n    if (mutationObserverSupported) {\n        this.mutationsObserver_ = new MutationObserver(this.refresh);\n\n        this.mutationsObserver_.observe(document, {\n            attributes: true,\n            childList: true,\n            characterData: true,\n            subtree: true\n        });\n    } else {\n        document.addEventListener('DOMSubtreeModified', this.refresh);\n\n        this.mutationEventsAdded_ = true;\n    }\n\n    this.connected_ = true;\n};\n\n/**\n * Removes DOM listeners.\n *\n * @private\n * @returns {void}\n */\nResizeObserverController.prototype.disconnect_ = function () {\n    // Do nothing if running in a non-browser environment or if listeners\n    // have been already removed.\n    if (!isBrowser || !this.connected_) {\n        return;\n    }\n\n    document.removeEventListener('transitionend', this.onTransitionEnd_);\n    window.removeEventListener('resize', this.refresh);\n\n    if (this.mutationsObserver_) {\n        this.mutationsObserver_.disconnect();\n    }\n\n    if (this.mutationEventsAdded_) {\n        document.removeEventListener('DOMSubtreeModified', this.refresh);\n    }\n\n    this.mutationsObserver_ = null;\n    this.mutationEventsAdded_ = false;\n    this.connected_ = false;\n};\n\n/**\n * \"Transitionend\" event handler.\n *\n * @private\n * @param {TransitionEvent} event\n * @returns {void}\n */\nResizeObserverController.prototype.onTransitionEnd_ = function (ref) {\n        var propertyName = ref.propertyName;\n\n    // Detect whether transition may affect dimensions of an element.\n    var isReflowProperty = transitionKeys.some(function (key) {\n        return !!~propertyName.indexOf(key);\n    });\n\n    if (isReflowProperty) {\n        this.refresh();\n    }\n};\n\n/**\n * Returns instance of the ResizeObserverController.\n *\n * @returns {ResizeObserverController}\n */\nResizeObserverController.getInstance = function () {\n    if (!this.instance_) {\n        this.instance_ = new ResizeObserverController();\n    }\n\n    return this.instance_;\n};\n\nResizeObserverController.instance_ = null;\n\n/**\n * Defines non-writable/enumerable properties of the provided target object.\n *\n * @param {Object} target - Object for which to define properties.\n * @param {Object} props - Properties to be defined.\n * @returns {Object} Target object.\n */\nvar defineConfigurable = (function (target, props) {\n    for (var i = 0, list = Object.keys(props); i < list.length; i += 1) {\n        var key = list[i];\n\n        Object.defineProperty(target, key, {\n            value: props[key],\n            enumerable: false,\n            writable: false,\n            configurable: true\n        });\n    }\n\n    return target;\n});\n\n// Placeholder of an empty content rectangle.\nvar emptyRect = createRectInit(0, 0, 0, 0);\n\n/**\n * Converts provided string to a number.\n *\n * @param {number|string} value\n * @returns {number}\n */\nfunction toFloat(value) {\n    return parseFloat(value) || 0;\n}\n\n/**\n * Extracts borders size from provided styles.\n *\n * @param {CSSStyleDeclaration} styles\n * @param {...string} positions - Borders positions (top, right, ...)\n * @returns {number}\n */\nfunction getBordersSize(styles) {\n    var positions = [], len = arguments.length - 1;\n    while ( len-- > 0 ) positions[ len ] = arguments[ len + 1 ];\n\n    return positions.reduce(function (size, position) {\n        var value = styles['border-' + position + '-width'];\n\n        return size + toFloat(value);\n    }, 0);\n}\n\n/**\n * Extracts paddings sizes from provided styles.\n *\n * @param {CSSStyleDeclaration} styles\n * @returns {Object} Paddings box.\n */\nfunction getPaddings(styles) {\n    var positions = ['top', 'right', 'bottom', 'left'];\n    var paddings = {};\n\n    for (var i = 0, list = positions; i < list.length; i += 1) {\n        var position = list[i];\n\n        var value = styles['padding-' + position];\n\n        paddings[position] = toFloat(value);\n    }\n\n    return paddings;\n}\n\n/**\n * Calculates content rectangle of provided SVG element.\n *\n * @param {SVGGraphicsElement} target - Element content rectangle of which needs\n *      to be calculated.\n * @returns {DOMRectInit}\n */\nfunction getSVGContentRect(target) {\n    var bbox = target.getBBox();\n\n    return createRectInit(0, 0, bbox.width, bbox.height);\n}\n\n/**\n * Calculates content rectangle of provided HTMLElement.\n *\n * @param {HTMLElement} target - Element for which to calculate the content rectangle.\n * @returns {DOMRectInit}\n */\nfunction getHTMLElementContentRect(target) {\n    // Client width & height properties can't be\n    // used exclusively as they provide rounded values.\n    var clientWidth = target.clientWidth;\n    var clientHeight = target.clientHeight;\n\n    // By this condition we can catch all non-replaced inline, hidden and\n    // detached elements. Though elements with width & height properties less\n    // than 0.5 will be discarded as well.\n    //\n    // Without it we would need to implement separate methods for each of\n    // those cases and it's not possible to perform a precise and performance\n    // effective test for hidden elements. E.g. even jQuery's ':visible' filter\n    // gives wrong results for elements with width & height less than 0.5.\n    if (!clientWidth && !clientHeight) {\n        return emptyRect;\n    }\n\n    var styles = getComputedStyle(target);\n    var paddings = getPaddings(styles);\n    var horizPad = paddings.left + paddings.right;\n    var vertPad = paddings.top + paddings.bottom;\n\n    // Computed styles of width & height are being used because they are the\n    // only dimensions available to JS that contain non-rounded values. It could\n    // be possible to utilize the getBoundingClientRect if only it's data wasn't\n    // affected by CSS transformations let alone paddings, borders and scroll bars.\n    var width = toFloat(styles.width),\n        height = toFloat(styles.height);\n\n    // Width & height include paddings and borders when the 'border-box' box\n    // model is applied (except for IE).\n    if (styles.boxSizing === 'border-box') {\n        // Following conditions are required to handle Internet Explorer which\n        // doesn't include paddings and borders to computed CSS dimensions.\n        //\n        // We can say that if CSS dimensions + paddings are equal to the \"client\"\n        // properties then it's either IE, and thus we don't need to subtract\n        // anything, or an element merely doesn't have paddings/borders styles.\n        if (Math.round(width + horizPad) !== clientWidth) {\n            width -= getBordersSize(styles, 'left', 'right') + horizPad;\n        }\n\n        if (Math.round(height + vertPad) !== clientHeight) {\n            height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\n        }\n    }\n\n    // Following steps can't be applied to the document's root element as its\n    // client[Width/Height] properties represent viewport area of the window.\n    // Besides, it's as well not necessary as the <html> itself neither has\n    // rendered scroll bars nor it can be clipped.\n    if (!isDocumentElement(target)) {\n        // In some browsers (only in Firefox, actually) CSS width & height\n        // include scroll bars size which can be removed at this step as scroll\n        // bars are the only difference between rounded dimensions + paddings\n        // and \"client\" properties, though that is not always true in Chrome.\n        var vertScrollbar = Math.round(width + horizPad) - clientWidth;\n        var horizScrollbar = Math.round(height + vertPad) - clientHeight;\n\n        // Chrome has a rather weird rounding of \"client\" properties.\n        // E.g. for an element with content width of 314.2px it sometimes gives\n        // the client width of 315px and for the width of 314.7px it may give\n        // 314px. And it doesn't happen all the time. So just ignore this delta\n        // as a non-relevant.\n        if (Math.abs(vertScrollbar) !== 1) {\n            width -= vertScrollbar;\n        }\n\n        if (Math.abs(horizScrollbar) !== 1) {\n            height -= horizScrollbar;\n        }\n    }\n\n    return createRectInit(paddings.left, paddings.top, width, height);\n}\n\n/**\n * Checks whether provided element is an instance of the SVGGraphicsElement.\n *\n * @param {Element} target - Element to be checked.\n * @returns {boolean}\n */\nvar isSVGGraphicsElement = (function () {\n    // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\n    // interface.\n    if (typeof SVGGraphicsElement != 'undefined') {\n        return function (target) { return target instanceof SVGGraphicsElement; };\n    }\n\n    // If it's so, then check that element is at least an instance of the\n    // SVGElement and that it has the \"getBBox\" method.\n    // eslint-disable-next-line no-extra-parens\n    return function (target) { return target instanceof SVGElement && typeof target.getBBox === 'function'; };\n})();\n\n/**\n * Checks whether provided element is a document element (<html>).\n *\n * @param {Element} target - Element to be checked.\n * @returns {boolean}\n */\nfunction isDocumentElement(target) {\n    return target === document.documentElement;\n}\n\n/**\n * Calculates an appropriate content rectangle for provided html or svg element.\n *\n * @param {Element} target - Element content rectangle of which needs to be calculated.\n * @returns {DOMRectInit}\n */\nfunction getContentRect(target) {\n    if (!isBrowser) {\n        return emptyRect;\n    }\n\n    if (isSVGGraphicsElement(target)) {\n        return getSVGContentRect(target);\n    }\n\n    return getHTMLElementContentRect(target);\n}\n\n/**\n * Creates rectangle with an interface of the DOMRectReadOnly.\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\n *\n * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.\n * @returns {DOMRectReadOnly}\n */\nfunction createReadOnlyRect(ref) {\n    var x = ref.x;\n    var y = ref.y;\n    var width = ref.width;\n    var height = ref.height;\n\n    // If DOMRectReadOnly is available use it as a prototype for the rectangle.\n    var Constr = typeof DOMRectReadOnly != 'undefined' ? DOMRectReadOnly : Object;\n    var rect = Object.create(Constr.prototype);\n\n    // Rectangle's properties are not writable and non-enumerable.\n    defineConfigurable(rect, {\n        x: x, y: y, width: width, height: height,\n        top: y,\n        right: x + width,\n        bottom: height + y,\n        left: x\n    });\n\n    return rect;\n}\n\n/**\n * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.\n * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\n *\n * @param {number} x - X coordinate.\n * @param {number} y - Y coordinate.\n * @param {number} width - Rectangle's width.\n * @param {number} height - Rectangle's height.\n * @returns {DOMRectInit}\n */\nfunction createRectInit(x, y, width, height) {\n    return { x: x, y: y, width: width, height: height };\n}\n\n/**\n * Class that is responsible for computations of the content rectangle of\n * provided DOM element and for keeping track of it's changes.\n */\nvar ResizeObservation = function(target) {\n  this.broadcastWidth = 0;\n  this.broadcastHeight = 0;\n  this.contentRect_ = createRectInit(0, 0, 0, 0);\n\n  this.target = target;\n};\n\n/**\n * Updates content rectangle and tells whether it's width or height properties\n * have changed since the last broadcast.\n *\n * @returns {boolean}\n */\n\n\n/**\n * Reference to the last observed content rectangle.\n *\n * @private {DOMRectInit}\n */\n\n\n/**\n * Broadcasted width of content rectangle.\n *\n * @type {number}\n */\nResizeObservation.prototype.isActive = function () {\n  var rect = getContentRect(this.target);\n\n  this.contentRect_ = rect;\n\n  return rect.width !== this.broadcastWidth || rect.height !== this.broadcastHeight;\n};\n\n/**\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\n * from the corresponding properties of the last observed content rectangle.\n *\n * @returns {DOMRectInit} Last observed content rectangle.\n */\nResizeObservation.prototype.broadcastRect = function () {\n  var rect = this.contentRect_;\n\n  this.broadcastWidth = rect.width;\n  this.broadcastHeight = rect.height;\n\n  return rect;\n};\n\nvar ResizeObserverEntry = function(target, rectInit) {\n  var contentRect = createReadOnlyRect(rectInit);\n\n  // According to the specification following properties are not writable\n  // and are also not enumerable in the native implementation.\n  //\n  // Property accessors are not being used as they'd require to define a\n  // private WeakMap storage which may cause memory leaks in browsers that\n  // don't support this type of collections.\n  defineConfigurable(this, { target: target, contentRect: contentRect });\n};\n\nvar ResizeObserverSPI = function(callback, controller, callbackCtx) {\n    this.activeObservations_ = [];\n    this.observations_ = new MapShim();\n\n    if (typeof callback !== 'function') {\n        throw new TypeError('The callback provided as parameter 1 is not a function.');\n    }\n\n    this.callback_ = callback;\n    this.controller_ = controller;\n    this.callbackCtx_ = callbackCtx;\n};\n\n/**\n * Starts observing provided element.\n *\n * @param {Element} target - Element to be observed.\n * @returns {void}\n */\n\n\n/**\n * Registry of the ResizeObservation instances.\n *\n * @private {Map<Element, ResizeObservation>}\n */\n\n\n/**\n * Public ResizeObserver instance which will be passed to the callback\n * function and used as a value of it's \"this\" binding.\n *\n * @private {ResizeObserver}\n */\n\n/**\n * Collection of resize observations that have detected changes in dimensions\n * of elements.\n *\n * @private {Array<ResizeObservation>}\n */\nResizeObserverSPI.prototype.observe = function (target) {\n    if (!arguments.length) {\n        throw new TypeError('1 argument required, but only 0 present.');\n    }\n\n    // Do nothing if current environment doesn't have the Element interface.\n    if (typeof Element === 'undefined' || !(Element instanceof Object)) {\n        return;\n    }\n\n    if (!target || typeof target.nodeType === 'undefined' || !(target.nodeType === 1)) {\n        throw new TypeError('parameter 1 is not of type \"Element\".');\n    }\n\n    var observations = this.observations_;\n\n    // Do nothing if element is already being observed.\n    if (observations.has(target)) {\n        return;\n    }\n\n    observations.set(target, new ResizeObservation(target));\n\n    this.controller_.addObserver(this);\n\n    // Force the update of observations.\n    this.controller_.refresh();\n};\n\n/**\n * Stops observing provided element.\n *\n * @param {Element} target - Element to stop observing.\n * @returns {void}\n */\nResizeObserverSPI.prototype.unobserve = function (target) {\n    if (!arguments.length) {\n        throw new TypeError('1 argument required, but only 0 present.');\n    }\n\n    // Do nothing if current environment doesn't have the Element interface.\n    if (typeof Element === 'undefined' || !(Element instanceof Object)) {\n        return;\n    }\n\n    if (!target || typeof target.nodeType === 'undefined' || !(target.nodeType === 1)) {\n        throw new TypeError('parameter 1 is not of type \"Element\".');\n    }\n\n    var observations = this.observations_;\n\n    // Do nothing if element is not being observed.\n    if (!observations.has(target)) {\n        return;\n    }\n\n    observations.delete(target);\n\n    if (!observations.size) {\n        this.controller_.removeObserver(this);\n    }\n};\n\n/**\n * Stops observing all elements.\n *\n * @returns {void}\n */\nResizeObserverSPI.prototype.disconnect = function () {\n    this.clearActive();\n    this.observations_.clear();\n    this.controller_.removeObserver(this);\n};\n\n/**\n * Collects observation instances the associated element of which has changed\n * it's content rectangle.\n *\n * @returns {void}\n */\nResizeObserverSPI.prototype.gatherActive = function () {\n        var this$1 = this;\n\n    this.clearActive();\n\n    this.observations_.forEach(function (observation) {\n        if (observation.isActive()) {\n            this$1.activeObservations_.push(observation);\n        }\n    });\n};\n\n/**\n * Invokes initial callback function with a list of ResizeObserverEntry\n * instances collected from active resize observations.\n *\n * @returns {void}\n */\nResizeObserverSPI.prototype.broadcastActive = function () {\n    // Do nothing if observer doesn't have active observations.\n    if (!this.hasActive()) {\n        return;\n    }\n\n    var ctx = this.callbackCtx_;\n\n    // Create ResizeObserverEntry instance for every active observation.\n    var entries = this.activeObservations_.map(function (observation) {\n        return new ResizeObserverEntry(observation.target, observation.broadcastRect());\n    });\n\n    this.callback_.call(ctx, entries, ctx);\n    this.clearActive();\n};\n\n/**\n * Clears the collection of active observations.\n *\n * @returns {void}\n */\nResizeObserverSPI.prototype.clearActive = function () {\n    this.activeObservations_.splice(0);\n};\n\n/**\n * Tells whether observer has active observations.\n *\n * @returns {boolean}\n */\nResizeObserverSPI.prototype.hasActive = function () {\n    return this.activeObservations_.length > 0;\n};\n\n// Registry of internal observers. If WeakMap is not available use current shim\n// for the Map collection as it has all required methods and because WeakMap\n// can't be fully polyfilled anyway.\nvar observers = typeof WeakMap != 'undefined' ? new WeakMap() : new MapShim();\n\n/**\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\n * exposing only those methods and properties that are defined in the spec.\n */\nvar ResizeObserver$1 = function(callback) {\n    if (!arguments.length) {\n        throw new TypeError('1 argument required, but only 0 present.');\n    }\n\n    var controller = ResizeObserverController.getInstance();\n    var observer = new ResizeObserverSPI(callback, controller, this);\n\n    observers.set(this, observer);\n};\n\n// Expose public methods of ResizeObserver.\n['observe', 'unobserve', 'disconnect'].forEach(function (method) {\n    ResizeObserver$1.prototype[method] = function () {\n        return (ref = observers.get(this))[method].apply(ref, arguments);\n        var ref;\n    };\n});\n\nvar index = (function () {\n    // Export existing implementation if available.\n    if (typeof ResizeObserver != 'undefined') {\n        // eslint-disable-next-line no-undef\n        return ResizeObserver;\n    }\n\n    return ResizeObserver$1;\n})();\n\nreturn index;\n\n})));\n"]}