rmt-fileupload 0.2.14 → 0.2.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -65523,931 +65523,931 @@ module.exports = normalizeWheel;
65523
65523
 
65524
65524
  "use strict";
65525
65525
  __webpack_require__.r(__webpack_exports__);
65526
- /**
65527
- * A collection of shims that provide minimal functionality of the ES6 collections.
65528
- *
65529
- * These implementations are not meant to be used outside of the ResizeObserver
65530
- * modules as they cover only a limited range of use cases.
65531
- */
65532
- /* eslint-disable require-jsdoc, valid-jsdoc */
65533
- var MapShim = (function () {
65534
- if (typeof Map !== 'undefined') {
65535
- return Map;
65536
- }
65537
- /**
65538
- * Returns index in provided array that matches the specified key.
65539
- *
65540
- * @param {Array<Array>} arr
65541
- * @param {*} key
65542
- * @returns {number}
65543
- */
65544
- function getIndex(arr, key) {
65545
- var result = -1;
65546
- arr.some(function (entry, index) {
65547
- if (entry[0] === key) {
65548
- result = index;
65549
- return true;
65550
- }
65551
- return false;
65552
- });
65553
- return result;
65554
- }
65555
- return /** @class */ (function () {
65556
- function class_1() {
65557
- this.__entries__ = [];
65558
- }
65559
- Object.defineProperty(class_1.prototype, "size", {
65560
- /**
65561
- * @returns {boolean}
65562
- */
65563
- get: function () {
65564
- return this.__entries__.length;
65565
- },
65566
- enumerable: true,
65567
- configurable: true
65568
- });
65569
- /**
65570
- * @param {*} key
65571
- * @returns {*}
65572
- */
65573
- class_1.prototype.get = function (key) {
65574
- var index = getIndex(this.__entries__, key);
65575
- var entry = this.__entries__[index];
65576
- return entry && entry[1];
65577
- };
65578
- /**
65579
- * @param {*} key
65580
- * @param {*} value
65581
- * @returns {void}
65582
- */
65583
- class_1.prototype.set = function (key, value) {
65584
- var index = getIndex(this.__entries__, key);
65585
- if (~index) {
65586
- this.__entries__[index][1] = value;
65587
- }
65588
- else {
65589
- this.__entries__.push([key, value]);
65590
- }
65591
- };
65592
- /**
65593
- * @param {*} key
65594
- * @returns {void}
65595
- */
65596
- class_1.prototype.delete = function (key) {
65597
- var entries = this.__entries__;
65598
- var index = getIndex(entries, key);
65599
- if (~index) {
65600
- entries.splice(index, 1);
65601
- }
65602
- };
65603
- /**
65604
- * @param {*} key
65605
- * @returns {void}
65606
- */
65607
- class_1.prototype.has = function (key) {
65608
- return !!~getIndex(this.__entries__, key);
65609
- };
65610
- /**
65611
- * @returns {void}
65612
- */
65613
- class_1.prototype.clear = function () {
65614
- this.__entries__.splice(0);
65615
- };
65616
- /**
65617
- * @param {Function} callback
65618
- * @param {*} [ctx=null]
65619
- * @returns {void}
65620
- */
65621
- class_1.prototype.forEach = function (callback, ctx) {
65622
- if (ctx === void 0) { ctx = null; }
65623
- for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
65624
- var entry = _a[_i];
65625
- callback.call(ctx, entry[1], entry[0]);
65626
- }
65627
- };
65628
- return class_1;
65629
- }());
65526
+ /**
65527
+ * A collection of shims that provide minimal functionality of the ES6 collections.
65528
+ *
65529
+ * These implementations are not meant to be used outside of the ResizeObserver
65530
+ * modules as they cover only a limited range of use cases.
65531
+ */
65532
+ /* eslint-disable require-jsdoc, valid-jsdoc */
65533
+ var MapShim = (function () {
65534
+ if (typeof Map !== 'undefined') {
65535
+ return Map;
65536
+ }
65537
+ /**
65538
+ * Returns index in provided array that matches the specified key.
65539
+ *
65540
+ * @param {Array<Array>} arr
65541
+ * @param {*} key
65542
+ * @returns {number}
65543
+ */
65544
+ function getIndex(arr, key) {
65545
+ var result = -1;
65546
+ arr.some(function (entry, index) {
65547
+ if (entry[0] === key) {
65548
+ result = index;
65549
+ return true;
65550
+ }
65551
+ return false;
65552
+ });
65553
+ return result;
65554
+ }
65555
+ return /** @class */ (function () {
65556
+ function class_1() {
65557
+ this.__entries__ = [];
65558
+ }
65559
+ Object.defineProperty(class_1.prototype, "size", {
65560
+ /**
65561
+ * @returns {boolean}
65562
+ */
65563
+ get: function () {
65564
+ return this.__entries__.length;
65565
+ },
65566
+ enumerable: true,
65567
+ configurable: true
65568
+ });
65569
+ /**
65570
+ * @param {*} key
65571
+ * @returns {*}
65572
+ */
65573
+ class_1.prototype.get = function (key) {
65574
+ var index = getIndex(this.__entries__, key);
65575
+ var entry = this.__entries__[index];
65576
+ return entry && entry[1];
65577
+ };
65578
+ /**
65579
+ * @param {*} key
65580
+ * @param {*} value
65581
+ * @returns {void}
65582
+ */
65583
+ class_1.prototype.set = function (key, value) {
65584
+ var index = getIndex(this.__entries__, key);
65585
+ if (~index) {
65586
+ this.__entries__[index][1] = value;
65587
+ }
65588
+ else {
65589
+ this.__entries__.push([key, value]);
65590
+ }
65591
+ };
65592
+ /**
65593
+ * @param {*} key
65594
+ * @returns {void}
65595
+ */
65596
+ class_1.prototype.delete = function (key) {
65597
+ var entries = this.__entries__;
65598
+ var index = getIndex(entries, key);
65599
+ if (~index) {
65600
+ entries.splice(index, 1);
65601
+ }
65602
+ };
65603
+ /**
65604
+ * @param {*} key
65605
+ * @returns {void}
65606
+ */
65607
+ class_1.prototype.has = function (key) {
65608
+ return !!~getIndex(this.__entries__, key);
65609
+ };
65610
+ /**
65611
+ * @returns {void}
65612
+ */
65613
+ class_1.prototype.clear = function () {
65614
+ this.__entries__.splice(0);
65615
+ };
65616
+ /**
65617
+ * @param {Function} callback
65618
+ * @param {*} [ctx=null]
65619
+ * @returns {void}
65620
+ */
65621
+ class_1.prototype.forEach = function (callback, ctx) {
65622
+ if (ctx === void 0) { ctx = null; }
65623
+ for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
65624
+ var entry = _a[_i];
65625
+ callback.call(ctx, entry[1], entry[0]);
65626
+ }
65627
+ };
65628
+ return class_1;
65629
+ }());
65630
65630
  })();
65631
65631
 
65632
- /**
65633
- * Detects whether window and document objects are available in current environment.
65634
- */
65632
+ /**
65633
+ * Detects whether window and document objects are available in current environment.
65634
+ */
65635
65635
  var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
65636
65636
 
65637
- // Returns global object of a current environment.
65638
- var global$1 = (function () {
65639
- if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.Math === Math) {
65640
- return __webpack_require__.g;
65641
- }
65642
- if (typeof self !== 'undefined' && self.Math === Math) {
65643
- return self;
65644
- }
65645
- if (typeof window !== 'undefined' && window.Math === Math) {
65646
- return window;
65647
- }
65648
- // eslint-disable-next-line no-new-func
65649
- return Function('return this')();
65637
+ // Returns global object of a current environment.
65638
+ var global$1 = (function () {
65639
+ if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.Math === Math) {
65640
+ return __webpack_require__.g;
65641
+ }
65642
+ if (typeof self !== 'undefined' && self.Math === Math) {
65643
+ return self;
65644
+ }
65645
+ if (typeof window !== 'undefined' && window.Math === Math) {
65646
+ return window;
65647
+ }
65648
+ // eslint-disable-next-line no-new-func
65649
+ return Function('return this')();
65650
65650
  })();
65651
65651
 
65652
- /**
65653
- * A shim for the requestAnimationFrame which falls back to the setTimeout if
65654
- * first one is not supported.
65655
- *
65656
- * @returns {number} Requests' identifier.
65657
- */
65658
- var requestAnimationFrame$1 = (function () {
65659
- if (typeof requestAnimationFrame === 'function') {
65660
- // It's required to use a bounded function because IE sometimes throws
65661
- // an "Invalid calling object" error if rAF is invoked without the global
65662
- // object on the left hand side.
65663
- return requestAnimationFrame.bind(global$1);
65664
- }
65665
- return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
65652
+ /**
65653
+ * A shim for the requestAnimationFrame which falls back to the setTimeout if
65654
+ * first one is not supported.
65655
+ *
65656
+ * @returns {number} Requests' identifier.
65657
+ */
65658
+ var requestAnimationFrame$1 = (function () {
65659
+ if (typeof requestAnimationFrame === 'function') {
65660
+ // It's required to use a bounded function because IE sometimes throws
65661
+ // an "Invalid calling object" error if rAF is invoked without the global
65662
+ // object on the left hand side.
65663
+ return requestAnimationFrame.bind(global$1);
65664
+ }
65665
+ return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
65666
65666
  })();
65667
65667
 
65668
- // Defines minimum timeout before adding a trailing call.
65669
- var trailingTimeout = 2;
65670
- /**
65671
- * Creates a wrapper function which ensures that provided callback will be
65672
- * invoked only once during the specified delay period.
65673
- *
65674
- * @param {Function} callback - Function to be invoked after the delay period.
65675
- * @param {number} delay - Delay after which to invoke callback.
65676
- * @returns {Function}
65677
- */
65678
- function throttle (callback, delay) {
65679
- var leadingCall = false, trailingCall = false, lastCallTime = 0;
65680
- /**
65681
- * Invokes the original callback function and schedules new invocation if
65682
- * the "proxy" was called during current request.
65683
- *
65684
- * @returns {void}
65685
- */
65686
- function resolvePending() {
65687
- if (leadingCall) {
65688
- leadingCall = false;
65689
- callback();
65690
- }
65691
- if (trailingCall) {
65692
- proxy();
65693
- }
65694
- }
65695
- /**
65696
- * Callback invoked after the specified delay. It will further postpone
65697
- * invocation of the original function delegating it to the
65698
- * requestAnimationFrame.
65699
- *
65700
- * @returns {void}
65701
- */
65702
- function timeoutCallback() {
65703
- requestAnimationFrame$1(resolvePending);
65704
- }
65705
- /**
65706
- * Schedules invocation of the original function.
65707
- *
65708
- * @returns {void}
65709
- */
65710
- function proxy() {
65711
- var timeStamp = Date.now();
65712
- if (leadingCall) {
65713
- // Reject immediately following calls.
65714
- if (timeStamp - lastCallTime < trailingTimeout) {
65715
- return;
65716
- }
65717
- // Schedule new call to be in invoked when the pending one is resolved.
65718
- // This is important for "transitions" which never actually start
65719
- // immediately so there is a chance that we might miss one if change
65720
- // happens amids the pending invocation.
65721
- trailingCall = true;
65722
- }
65723
- else {
65724
- leadingCall = true;
65725
- trailingCall = false;
65726
- setTimeout(timeoutCallback, delay);
65727
- }
65728
- lastCallTime = timeStamp;
65729
- }
65730
- return proxy;
65668
+ // Defines minimum timeout before adding a trailing call.
65669
+ var trailingTimeout = 2;
65670
+ /**
65671
+ * Creates a wrapper function which ensures that provided callback will be
65672
+ * invoked only once during the specified delay period.
65673
+ *
65674
+ * @param {Function} callback - Function to be invoked after the delay period.
65675
+ * @param {number} delay - Delay after which to invoke callback.
65676
+ * @returns {Function}
65677
+ */
65678
+ function throttle (callback, delay) {
65679
+ var leadingCall = false, trailingCall = false, lastCallTime = 0;
65680
+ /**
65681
+ * Invokes the original callback function and schedules new invocation if
65682
+ * the "proxy" was called during current request.
65683
+ *
65684
+ * @returns {void}
65685
+ */
65686
+ function resolvePending() {
65687
+ if (leadingCall) {
65688
+ leadingCall = false;
65689
+ callback();
65690
+ }
65691
+ if (trailingCall) {
65692
+ proxy();
65693
+ }
65694
+ }
65695
+ /**
65696
+ * Callback invoked after the specified delay. It will further postpone
65697
+ * invocation of the original function delegating it to the
65698
+ * requestAnimationFrame.
65699
+ *
65700
+ * @returns {void}
65701
+ */
65702
+ function timeoutCallback() {
65703
+ requestAnimationFrame$1(resolvePending);
65704
+ }
65705
+ /**
65706
+ * Schedules invocation of the original function.
65707
+ *
65708
+ * @returns {void}
65709
+ */
65710
+ function proxy() {
65711
+ var timeStamp = Date.now();
65712
+ if (leadingCall) {
65713
+ // Reject immediately following calls.
65714
+ if (timeStamp - lastCallTime < trailingTimeout) {
65715
+ return;
65716
+ }
65717
+ // Schedule new call to be in invoked when the pending one is resolved.
65718
+ // This is important for "transitions" which never actually start
65719
+ // immediately so there is a chance that we might miss one if change
65720
+ // happens amids the pending invocation.
65721
+ trailingCall = true;
65722
+ }
65723
+ else {
65724
+ leadingCall = true;
65725
+ trailingCall = false;
65726
+ setTimeout(timeoutCallback, delay);
65727
+ }
65728
+ lastCallTime = timeStamp;
65729
+ }
65730
+ return proxy;
65731
65731
  }
65732
65732
 
65733
- // Minimum delay before invoking the update of observers.
65734
- var REFRESH_DELAY = 20;
65735
- // A list of substrings of CSS properties used to find transition events that
65736
- // might affect dimensions of observed elements.
65737
- var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
65738
- // Check if MutationObserver is available.
65739
- var mutationObserverSupported = typeof MutationObserver !== 'undefined';
65740
- /**
65741
- * Singleton controller class which handles updates of ResizeObserver instances.
65742
- */
65743
- var ResizeObserverController = /** @class */ (function () {
65744
- /**
65745
- * Creates a new instance of ResizeObserverController.
65746
- *
65747
- * @private
65748
- */
65749
- function ResizeObserverController() {
65750
- /**
65751
- * Indicates whether DOM listeners have been added.
65752
- *
65753
- * @private {boolean}
65754
- */
65755
- this.connected_ = false;
65756
- /**
65757
- * Tells that controller has subscribed for Mutation Events.
65758
- *
65759
- * @private {boolean}
65760
- */
65761
- this.mutationEventsAdded_ = false;
65762
- /**
65763
- * Keeps reference to the instance of MutationObserver.
65764
- *
65765
- * @private {MutationObserver}
65766
- */
65767
- this.mutationsObserver_ = null;
65768
- /**
65769
- * A list of connected observers.
65770
- *
65771
- * @private {Array<ResizeObserverSPI>}
65772
- */
65773
- this.observers_ = [];
65774
- this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
65775
- this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
65776
- }
65777
- /**
65778
- * Adds observer to observers list.
65779
- *
65780
- * @param {ResizeObserverSPI} observer - Observer to be added.
65781
- * @returns {void}
65782
- */
65783
- ResizeObserverController.prototype.addObserver = function (observer) {
65784
- if (!~this.observers_.indexOf(observer)) {
65785
- this.observers_.push(observer);
65786
- }
65787
- // Add listeners if they haven't been added yet.
65788
- if (!this.connected_) {
65789
- this.connect_();
65790
- }
65791
- };
65792
- /**
65793
- * Removes observer from observers list.
65794
- *
65795
- * @param {ResizeObserverSPI} observer - Observer to be removed.
65796
- * @returns {void}
65797
- */
65798
- ResizeObserverController.prototype.removeObserver = function (observer) {
65799
- var observers = this.observers_;
65800
- var index = observers.indexOf(observer);
65801
- // Remove observer if it's present in registry.
65802
- if (~index) {
65803
- observers.splice(index, 1);
65804
- }
65805
- // Remove listeners if controller has no connected observers.
65806
- if (!observers.length && this.connected_) {
65807
- this.disconnect_();
65808
- }
65809
- };
65810
- /**
65811
- * Invokes the update of observers. It will continue running updates insofar
65812
- * it detects changes.
65813
- *
65814
- * @returns {void}
65815
- */
65816
- ResizeObserverController.prototype.refresh = function () {
65817
- var changesDetected = this.updateObservers_();
65818
- // Continue running updates if changes have been detected as there might
65819
- // be future ones caused by CSS transitions.
65820
- if (changesDetected) {
65821
- this.refresh();
65822
- }
65823
- };
65824
- /**
65825
- * Updates every observer from observers list and notifies them of queued
65826
- * entries.
65827
- *
65828
- * @private
65829
- * @returns {boolean} Returns "true" if any observer has detected changes in
65830
- * dimensions of it's elements.
65831
- */
65832
- ResizeObserverController.prototype.updateObservers_ = function () {
65833
- // Collect observers that have active observations.
65834
- var activeObservers = this.observers_.filter(function (observer) {
65835
- return observer.gatherActive(), observer.hasActive();
65836
- });
65837
- // Deliver notifications in a separate cycle in order to avoid any
65838
- // collisions between observers, e.g. when multiple instances of
65839
- // ResizeObserver are tracking the same element and the callback of one
65840
- // of them changes content dimensions of the observed target. Sometimes
65841
- // this may result in notifications being blocked for the rest of observers.
65842
- activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
65843
- return activeObservers.length > 0;
65844
- };
65845
- /**
65846
- * Initializes DOM listeners.
65847
- *
65848
- * @private
65849
- * @returns {void}
65850
- */
65851
- ResizeObserverController.prototype.connect_ = function () {
65852
- // Do nothing if running in a non-browser environment or if listeners
65853
- // have been already added.
65854
- if (!isBrowser || this.connected_) {
65855
- return;
65856
- }
65857
- // Subscription to the "Transitionend" event is used as a workaround for
65858
- // delayed transitions. This way it's possible to capture at least the
65859
- // final state of an element.
65860
- document.addEventListener('transitionend', this.onTransitionEnd_);
65861
- window.addEventListener('resize', this.refresh);
65862
- if (mutationObserverSupported) {
65863
- this.mutationsObserver_ = new MutationObserver(this.refresh);
65864
- this.mutationsObserver_.observe(document, {
65865
- attributes: true,
65866
- childList: true,
65867
- characterData: true,
65868
- subtree: true
65869
- });
65870
- }
65871
- else {
65872
- document.addEventListener('DOMSubtreeModified', this.refresh);
65873
- this.mutationEventsAdded_ = true;
65874
- }
65875
- this.connected_ = true;
65876
- };
65877
- /**
65878
- * Removes DOM listeners.
65879
- *
65880
- * @private
65881
- * @returns {void}
65882
- */
65883
- ResizeObserverController.prototype.disconnect_ = function () {
65884
- // Do nothing if running in a non-browser environment or if listeners
65885
- // have been already removed.
65886
- if (!isBrowser || !this.connected_) {
65887
- return;
65888
- }
65889
- document.removeEventListener('transitionend', this.onTransitionEnd_);
65890
- window.removeEventListener('resize', this.refresh);
65891
- if (this.mutationsObserver_) {
65892
- this.mutationsObserver_.disconnect();
65893
- }
65894
- if (this.mutationEventsAdded_) {
65895
- document.removeEventListener('DOMSubtreeModified', this.refresh);
65896
- }
65897
- this.mutationsObserver_ = null;
65898
- this.mutationEventsAdded_ = false;
65899
- this.connected_ = false;
65900
- };
65901
- /**
65902
- * "Transitionend" event handler.
65903
- *
65904
- * @private
65905
- * @param {TransitionEvent} event
65906
- * @returns {void}
65907
- */
65908
- ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
65909
- var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
65910
- // Detect whether transition may affect dimensions of an element.
65911
- var isReflowProperty = transitionKeys.some(function (key) {
65912
- return !!~propertyName.indexOf(key);
65913
- });
65914
- if (isReflowProperty) {
65915
- this.refresh();
65916
- }
65917
- };
65918
- /**
65919
- * Returns instance of the ResizeObserverController.
65920
- *
65921
- * @returns {ResizeObserverController}
65922
- */
65923
- ResizeObserverController.getInstance = function () {
65924
- if (!this.instance_) {
65925
- this.instance_ = new ResizeObserverController();
65926
- }
65927
- return this.instance_;
65928
- };
65929
- /**
65930
- * Holds reference to the controller's instance.
65931
- *
65932
- * @private {ResizeObserverController}
65933
- */
65934
- ResizeObserverController.instance_ = null;
65935
- return ResizeObserverController;
65733
+ // Minimum delay before invoking the update of observers.
65734
+ var REFRESH_DELAY = 20;
65735
+ // A list of substrings of CSS properties used to find transition events that
65736
+ // might affect dimensions of observed elements.
65737
+ var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
65738
+ // Check if MutationObserver is available.
65739
+ var mutationObserverSupported = typeof MutationObserver !== 'undefined';
65740
+ /**
65741
+ * Singleton controller class which handles updates of ResizeObserver instances.
65742
+ */
65743
+ var ResizeObserverController = /** @class */ (function () {
65744
+ /**
65745
+ * Creates a new instance of ResizeObserverController.
65746
+ *
65747
+ * @private
65748
+ */
65749
+ function ResizeObserverController() {
65750
+ /**
65751
+ * Indicates whether DOM listeners have been added.
65752
+ *
65753
+ * @private {boolean}
65754
+ */
65755
+ this.connected_ = false;
65756
+ /**
65757
+ * Tells that controller has subscribed for Mutation Events.
65758
+ *
65759
+ * @private {boolean}
65760
+ */
65761
+ this.mutationEventsAdded_ = false;
65762
+ /**
65763
+ * Keeps reference to the instance of MutationObserver.
65764
+ *
65765
+ * @private {MutationObserver}
65766
+ */
65767
+ this.mutationsObserver_ = null;
65768
+ /**
65769
+ * A list of connected observers.
65770
+ *
65771
+ * @private {Array<ResizeObserverSPI>}
65772
+ */
65773
+ this.observers_ = [];
65774
+ this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
65775
+ this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
65776
+ }
65777
+ /**
65778
+ * Adds observer to observers list.
65779
+ *
65780
+ * @param {ResizeObserverSPI} observer - Observer to be added.
65781
+ * @returns {void}
65782
+ */
65783
+ ResizeObserverController.prototype.addObserver = function (observer) {
65784
+ if (!~this.observers_.indexOf(observer)) {
65785
+ this.observers_.push(observer);
65786
+ }
65787
+ // Add listeners if they haven't been added yet.
65788
+ if (!this.connected_) {
65789
+ this.connect_();
65790
+ }
65791
+ };
65792
+ /**
65793
+ * Removes observer from observers list.
65794
+ *
65795
+ * @param {ResizeObserverSPI} observer - Observer to be removed.
65796
+ * @returns {void}
65797
+ */
65798
+ ResizeObserverController.prototype.removeObserver = function (observer) {
65799
+ var observers = this.observers_;
65800
+ var index = observers.indexOf(observer);
65801
+ // Remove observer if it's present in registry.
65802
+ if (~index) {
65803
+ observers.splice(index, 1);
65804
+ }
65805
+ // Remove listeners if controller has no connected observers.
65806
+ if (!observers.length && this.connected_) {
65807
+ this.disconnect_();
65808
+ }
65809
+ };
65810
+ /**
65811
+ * Invokes the update of observers. It will continue running updates insofar
65812
+ * it detects changes.
65813
+ *
65814
+ * @returns {void}
65815
+ */
65816
+ ResizeObserverController.prototype.refresh = function () {
65817
+ var changesDetected = this.updateObservers_();
65818
+ // Continue running updates if changes have been detected as there might
65819
+ // be future ones caused by CSS transitions.
65820
+ if (changesDetected) {
65821
+ this.refresh();
65822
+ }
65823
+ };
65824
+ /**
65825
+ * Updates every observer from observers list and notifies them of queued
65826
+ * entries.
65827
+ *
65828
+ * @private
65829
+ * @returns {boolean} Returns "true" if any observer has detected changes in
65830
+ * dimensions of it's elements.
65831
+ */
65832
+ ResizeObserverController.prototype.updateObservers_ = function () {
65833
+ // Collect observers that have active observations.
65834
+ var activeObservers = this.observers_.filter(function (observer) {
65835
+ return observer.gatherActive(), observer.hasActive();
65836
+ });
65837
+ // Deliver notifications in a separate cycle in order to avoid any
65838
+ // collisions between observers, e.g. when multiple instances of
65839
+ // ResizeObserver are tracking the same element and the callback of one
65840
+ // of them changes content dimensions of the observed target. Sometimes
65841
+ // this may result in notifications being blocked for the rest of observers.
65842
+ activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
65843
+ return activeObservers.length > 0;
65844
+ };
65845
+ /**
65846
+ * Initializes DOM listeners.
65847
+ *
65848
+ * @private
65849
+ * @returns {void}
65850
+ */
65851
+ ResizeObserverController.prototype.connect_ = function () {
65852
+ // Do nothing if running in a non-browser environment or if listeners
65853
+ // have been already added.
65854
+ if (!isBrowser || this.connected_) {
65855
+ return;
65856
+ }
65857
+ // Subscription to the "Transitionend" event is used as a workaround for
65858
+ // delayed transitions. This way it's possible to capture at least the
65859
+ // final state of an element.
65860
+ document.addEventListener('transitionend', this.onTransitionEnd_);
65861
+ window.addEventListener('resize', this.refresh);
65862
+ if (mutationObserverSupported) {
65863
+ this.mutationsObserver_ = new MutationObserver(this.refresh);
65864
+ this.mutationsObserver_.observe(document, {
65865
+ attributes: true,
65866
+ childList: true,
65867
+ characterData: true,
65868
+ subtree: true
65869
+ });
65870
+ }
65871
+ else {
65872
+ document.addEventListener('DOMSubtreeModified', this.refresh);
65873
+ this.mutationEventsAdded_ = true;
65874
+ }
65875
+ this.connected_ = true;
65876
+ };
65877
+ /**
65878
+ * Removes DOM listeners.
65879
+ *
65880
+ * @private
65881
+ * @returns {void}
65882
+ */
65883
+ ResizeObserverController.prototype.disconnect_ = function () {
65884
+ // Do nothing if running in a non-browser environment or if listeners
65885
+ // have been already removed.
65886
+ if (!isBrowser || !this.connected_) {
65887
+ return;
65888
+ }
65889
+ document.removeEventListener('transitionend', this.onTransitionEnd_);
65890
+ window.removeEventListener('resize', this.refresh);
65891
+ if (this.mutationsObserver_) {
65892
+ this.mutationsObserver_.disconnect();
65893
+ }
65894
+ if (this.mutationEventsAdded_) {
65895
+ document.removeEventListener('DOMSubtreeModified', this.refresh);
65896
+ }
65897
+ this.mutationsObserver_ = null;
65898
+ this.mutationEventsAdded_ = false;
65899
+ this.connected_ = false;
65900
+ };
65901
+ /**
65902
+ * "Transitionend" event handler.
65903
+ *
65904
+ * @private
65905
+ * @param {TransitionEvent} event
65906
+ * @returns {void}
65907
+ */
65908
+ ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
65909
+ var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
65910
+ // Detect whether transition may affect dimensions of an element.
65911
+ var isReflowProperty = transitionKeys.some(function (key) {
65912
+ return !!~propertyName.indexOf(key);
65913
+ });
65914
+ if (isReflowProperty) {
65915
+ this.refresh();
65916
+ }
65917
+ };
65918
+ /**
65919
+ * Returns instance of the ResizeObserverController.
65920
+ *
65921
+ * @returns {ResizeObserverController}
65922
+ */
65923
+ ResizeObserverController.getInstance = function () {
65924
+ if (!this.instance_) {
65925
+ this.instance_ = new ResizeObserverController();
65926
+ }
65927
+ return this.instance_;
65928
+ };
65929
+ /**
65930
+ * Holds reference to the controller's instance.
65931
+ *
65932
+ * @private {ResizeObserverController}
65933
+ */
65934
+ ResizeObserverController.instance_ = null;
65935
+ return ResizeObserverController;
65936
65936
  }());
65937
65937
 
65938
- /**
65939
- * Defines non-writable/enumerable properties of the provided target object.
65940
- *
65941
- * @param {Object} target - Object for which to define properties.
65942
- * @param {Object} props - Properties to be defined.
65943
- * @returns {Object} Target object.
65944
- */
65945
- var defineConfigurable = (function (target, props) {
65946
- for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
65947
- var key = _a[_i];
65948
- Object.defineProperty(target, key, {
65949
- value: props[key],
65950
- enumerable: false,
65951
- writable: false,
65952
- configurable: true
65953
- });
65954
- }
65955
- return target;
65938
+ /**
65939
+ * Defines non-writable/enumerable properties of the provided target object.
65940
+ *
65941
+ * @param {Object} target - Object for which to define properties.
65942
+ * @param {Object} props - Properties to be defined.
65943
+ * @returns {Object} Target object.
65944
+ */
65945
+ var defineConfigurable = (function (target, props) {
65946
+ for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
65947
+ var key = _a[_i];
65948
+ Object.defineProperty(target, key, {
65949
+ value: props[key],
65950
+ enumerable: false,
65951
+ writable: false,
65952
+ configurable: true
65953
+ });
65954
+ }
65955
+ return target;
65956
65956
  });
65957
65957
 
65958
- /**
65959
- * Returns the global object associated with provided element.
65960
- *
65961
- * @param {Object} target
65962
- * @returns {Object}
65963
- */
65964
- var getWindowOf = (function (target) {
65965
- // Assume that the element is an instance of Node, which means that it
65966
- // has the "ownerDocument" property from which we can retrieve a
65967
- // corresponding global object.
65968
- var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
65969
- // Return the local global object if it's not possible extract one from
65970
- // provided element.
65971
- return ownerGlobal || global$1;
65958
+ /**
65959
+ * Returns the global object associated with provided element.
65960
+ *
65961
+ * @param {Object} target
65962
+ * @returns {Object}
65963
+ */
65964
+ var getWindowOf = (function (target) {
65965
+ // Assume that the element is an instance of Node, which means that it
65966
+ // has the "ownerDocument" property from which we can retrieve a
65967
+ // corresponding global object.
65968
+ var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
65969
+ // Return the local global object if it's not possible extract one from
65970
+ // provided element.
65971
+ return ownerGlobal || global$1;
65972
65972
  });
65973
65973
 
65974
- // Placeholder of an empty content rectangle.
65975
- var emptyRect = createRectInit(0, 0, 0, 0);
65976
- /**
65977
- * Converts provided string to a number.
65978
- *
65979
- * @param {number|string} value
65980
- * @returns {number}
65981
- */
65982
- function toFloat(value) {
65983
- return parseFloat(value) || 0;
65984
- }
65985
- /**
65986
- * Extracts borders size from provided styles.
65987
- *
65988
- * @param {CSSStyleDeclaration} styles
65989
- * @param {...string} positions - Borders positions (top, right, ...)
65990
- * @returns {number}
65991
- */
65992
- function getBordersSize(styles) {
65993
- var positions = [];
65994
- for (var _i = 1; _i < arguments.length; _i++) {
65995
- positions[_i - 1] = arguments[_i];
65996
- }
65997
- return positions.reduce(function (size, position) {
65998
- var value = styles['border-' + position + '-width'];
65999
- return size + toFloat(value);
66000
- }, 0);
66001
- }
66002
- /**
66003
- * Extracts paddings sizes from provided styles.
66004
- *
66005
- * @param {CSSStyleDeclaration} styles
66006
- * @returns {Object} Paddings box.
66007
- */
66008
- function getPaddings(styles) {
66009
- var positions = ['top', 'right', 'bottom', 'left'];
66010
- var paddings = {};
66011
- for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
66012
- var position = positions_1[_i];
66013
- var value = styles['padding-' + position];
66014
- paddings[position] = toFloat(value);
66015
- }
66016
- return paddings;
66017
- }
66018
- /**
66019
- * Calculates content rectangle of provided SVG element.
66020
- *
66021
- * @param {SVGGraphicsElement} target - Element content rectangle of which needs
66022
- * to be calculated.
66023
- * @returns {DOMRectInit}
66024
- */
66025
- function getSVGContentRect(target) {
66026
- var bbox = target.getBBox();
66027
- return createRectInit(0, 0, bbox.width, bbox.height);
66028
- }
66029
- /**
66030
- * Calculates content rectangle of provided HTMLElement.
66031
- *
66032
- * @param {HTMLElement} target - Element for which to calculate the content rectangle.
66033
- * @returns {DOMRectInit}
66034
- */
66035
- function getHTMLElementContentRect(target) {
66036
- // Client width & height properties can't be
66037
- // used exclusively as they provide rounded values.
66038
- var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
66039
- // By this condition we can catch all non-replaced inline, hidden and
66040
- // detached elements. Though elements with width & height properties less
66041
- // than 0.5 will be discarded as well.
66042
- //
66043
- // Without it we would need to implement separate methods for each of
66044
- // those cases and it's not possible to perform a precise and performance
66045
- // effective test for hidden elements. E.g. even jQuery's ':visible' filter
66046
- // gives wrong results for elements with width & height less than 0.5.
66047
- if (!clientWidth && !clientHeight) {
66048
- return emptyRect;
66049
- }
66050
- var styles = getWindowOf(target).getComputedStyle(target);
66051
- var paddings = getPaddings(styles);
66052
- var horizPad = paddings.left + paddings.right;
66053
- var vertPad = paddings.top + paddings.bottom;
66054
- // Computed styles of width & height are being used because they are the
66055
- // only dimensions available to JS that contain non-rounded values. It could
66056
- // be possible to utilize the getBoundingClientRect if only it's data wasn't
66057
- // affected by CSS transformations let alone paddings, borders and scroll bars.
66058
- var width = toFloat(styles.width), height = toFloat(styles.height);
66059
- // Width & height include paddings and borders when the 'border-box' box
66060
- // model is applied (except for IE).
66061
- if (styles.boxSizing === 'border-box') {
66062
- // Following conditions are required to handle Internet Explorer which
66063
- // doesn't include paddings and borders to computed CSS dimensions.
66064
- //
66065
- // We can say that if CSS dimensions + paddings are equal to the "client"
66066
- // properties then it's either IE, and thus we don't need to subtract
66067
- // anything, or an element merely doesn't have paddings/borders styles.
66068
- if (Math.round(width + horizPad) !== clientWidth) {
66069
- width -= getBordersSize(styles, 'left', 'right') + horizPad;
66070
- }
66071
- if (Math.round(height + vertPad) !== clientHeight) {
66072
- height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
66073
- }
66074
- }
66075
- // Following steps can't be applied to the document's root element as its
66076
- // client[Width/Height] properties represent viewport area of the window.
66077
- // Besides, it's as well not necessary as the <html> itself neither has
66078
- // rendered scroll bars nor it can be clipped.
66079
- if (!isDocumentElement(target)) {
66080
- // In some browsers (only in Firefox, actually) CSS width & height
66081
- // include scroll bars size which can be removed at this step as scroll
66082
- // bars are the only difference between rounded dimensions + paddings
66083
- // and "client" properties, though that is not always true in Chrome.
66084
- var vertScrollbar = Math.round(width + horizPad) - clientWidth;
66085
- var horizScrollbar = Math.round(height + vertPad) - clientHeight;
66086
- // Chrome has a rather weird rounding of "client" properties.
66087
- // E.g. for an element with content width of 314.2px it sometimes gives
66088
- // the client width of 315px and for the width of 314.7px it may give
66089
- // 314px. And it doesn't happen all the time. So just ignore this delta
66090
- // as a non-relevant.
66091
- if (Math.abs(vertScrollbar) !== 1) {
66092
- width -= vertScrollbar;
66093
- }
66094
- if (Math.abs(horizScrollbar) !== 1) {
66095
- height -= horizScrollbar;
66096
- }
66097
- }
66098
- return createRectInit(paddings.left, paddings.top, width, height);
66099
- }
66100
- /**
66101
- * Checks whether provided element is an instance of the SVGGraphicsElement.
66102
- *
66103
- * @param {Element} target - Element to be checked.
66104
- * @returns {boolean}
66105
- */
66106
- var isSVGGraphicsElement = (function () {
66107
- // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
66108
- // interface.
66109
- if (typeof SVGGraphicsElement !== 'undefined') {
66110
- return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
66111
- }
66112
- // If it's so, then check that element is at least an instance of the
66113
- // SVGElement and that it has the "getBBox" method.
66114
- // eslint-disable-next-line no-extra-parens
66115
- return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
66116
- typeof target.getBBox === 'function'); };
66117
- })();
66118
- /**
66119
- * Checks whether provided element is a document element (<html>).
66120
- *
66121
- * @param {Element} target - Element to be checked.
66122
- * @returns {boolean}
66123
- */
66124
- function isDocumentElement(target) {
66125
- return target === getWindowOf(target).document.documentElement;
66126
- }
66127
- /**
66128
- * Calculates an appropriate content rectangle for provided html or svg element.
66129
- *
66130
- * @param {Element} target - Element content rectangle of which needs to be calculated.
66131
- * @returns {DOMRectInit}
66132
- */
66133
- function getContentRect(target) {
66134
- if (!isBrowser) {
66135
- return emptyRect;
66136
- }
66137
- if (isSVGGraphicsElement(target)) {
66138
- return getSVGContentRect(target);
66139
- }
66140
- return getHTMLElementContentRect(target);
66141
- }
66142
- /**
66143
- * Creates rectangle with an interface of the DOMRectReadOnly.
66144
- * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
66145
- *
66146
- * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
66147
- * @returns {DOMRectReadOnly}
66148
- */
66149
- function createReadOnlyRect(_a) {
66150
- var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
66151
- // If DOMRectReadOnly is available use it as a prototype for the rectangle.
66152
- var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
66153
- var rect = Object.create(Constr.prototype);
66154
- // Rectangle's properties are not writable and non-enumerable.
66155
- defineConfigurable(rect, {
66156
- x: x, y: y, width: width, height: height,
66157
- top: y,
66158
- right: x + width,
66159
- bottom: height + y,
66160
- left: x
66161
- });
66162
- return rect;
66163
- }
66164
- /**
66165
- * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
66166
- * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
66167
- *
66168
- * @param {number} x - X coordinate.
66169
- * @param {number} y - Y coordinate.
66170
- * @param {number} width - Rectangle's width.
66171
- * @param {number} height - Rectangle's height.
66172
- * @returns {DOMRectInit}
66173
- */
66174
- function createRectInit(x, y, width, height) {
66175
- return { x: x, y: y, width: width, height: height };
65974
+ // Placeholder of an empty content rectangle.
65975
+ var emptyRect = createRectInit(0, 0, 0, 0);
65976
+ /**
65977
+ * Converts provided string to a number.
65978
+ *
65979
+ * @param {number|string} value
65980
+ * @returns {number}
65981
+ */
65982
+ function toFloat(value) {
65983
+ return parseFloat(value) || 0;
65984
+ }
65985
+ /**
65986
+ * Extracts borders size from provided styles.
65987
+ *
65988
+ * @param {CSSStyleDeclaration} styles
65989
+ * @param {...string} positions - Borders positions (top, right, ...)
65990
+ * @returns {number}
65991
+ */
65992
+ function getBordersSize(styles) {
65993
+ var positions = [];
65994
+ for (var _i = 1; _i < arguments.length; _i++) {
65995
+ positions[_i - 1] = arguments[_i];
65996
+ }
65997
+ return positions.reduce(function (size, position) {
65998
+ var value = styles['border-' + position + '-width'];
65999
+ return size + toFloat(value);
66000
+ }, 0);
66001
+ }
66002
+ /**
66003
+ * Extracts paddings sizes from provided styles.
66004
+ *
66005
+ * @param {CSSStyleDeclaration} styles
66006
+ * @returns {Object} Paddings box.
66007
+ */
66008
+ function getPaddings(styles) {
66009
+ var positions = ['top', 'right', 'bottom', 'left'];
66010
+ var paddings = {};
66011
+ for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
66012
+ var position = positions_1[_i];
66013
+ var value = styles['padding-' + position];
66014
+ paddings[position] = toFloat(value);
66015
+ }
66016
+ return paddings;
66017
+ }
66018
+ /**
66019
+ * Calculates content rectangle of provided SVG element.
66020
+ *
66021
+ * @param {SVGGraphicsElement} target - Element content rectangle of which needs
66022
+ * to be calculated.
66023
+ * @returns {DOMRectInit}
66024
+ */
66025
+ function getSVGContentRect(target) {
66026
+ var bbox = target.getBBox();
66027
+ return createRectInit(0, 0, bbox.width, bbox.height);
66028
+ }
66029
+ /**
66030
+ * Calculates content rectangle of provided HTMLElement.
66031
+ *
66032
+ * @param {HTMLElement} target - Element for which to calculate the content rectangle.
66033
+ * @returns {DOMRectInit}
66034
+ */
66035
+ function getHTMLElementContentRect(target) {
66036
+ // Client width & height properties can't be
66037
+ // used exclusively as they provide rounded values.
66038
+ var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
66039
+ // By this condition we can catch all non-replaced inline, hidden and
66040
+ // detached elements. Though elements with width & height properties less
66041
+ // than 0.5 will be discarded as well.
66042
+ //
66043
+ // Without it we would need to implement separate methods for each of
66044
+ // those cases and it's not possible to perform a precise and performance
66045
+ // effective test for hidden elements. E.g. even jQuery's ':visible' filter
66046
+ // gives wrong results for elements with width & height less than 0.5.
66047
+ if (!clientWidth && !clientHeight) {
66048
+ return emptyRect;
66049
+ }
66050
+ var styles = getWindowOf(target).getComputedStyle(target);
66051
+ var paddings = getPaddings(styles);
66052
+ var horizPad = paddings.left + paddings.right;
66053
+ var vertPad = paddings.top + paddings.bottom;
66054
+ // Computed styles of width & height are being used because they are the
66055
+ // only dimensions available to JS that contain non-rounded values. It could
66056
+ // be possible to utilize the getBoundingClientRect if only it's data wasn't
66057
+ // affected by CSS transformations let alone paddings, borders and scroll bars.
66058
+ var width = toFloat(styles.width), height = toFloat(styles.height);
66059
+ // Width & height include paddings and borders when the 'border-box' box
66060
+ // model is applied (except for IE).
66061
+ if (styles.boxSizing === 'border-box') {
66062
+ // Following conditions are required to handle Internet Explorer which
66063
+ // doesn't include paddings and borders to computed CSS dimensions.
66064
+ //
66065
+ // We can say that if CSS dimensions + paddings are equal to the "client"
66066
+ // properties then it's either IE, and thus we don't need to subtract
66067
+ // anything, or an element merely doesn't have paddings/borders styles.
66068
+ if (Math.round(width + horizPad) !== clientWidth) {
66069
+ width -= getBordersSize(styles, 'left', 'right') + horizPad;
66070
+ }
66071
+ if (Math.round(height + vertPad) !== clientHeight) {
66072
+ height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
66073
+ }
66074
+ }
66075
+ // Following steps can't be applied to the document's root element as its
66076
+ // client[Width/Height] properties represent viewport area of the window.
66077
+ // Besides, it's as well not necessary as the <html> itself neither has
66078
+ // rendered scroll bars nor it can be clipped.
66079
+ if (!isDocumentElement(target)) {
66080
+ // In some browsers (only in Firefox, actually) CSS width & height
66081
+ // include scroll bars size which can be removed at this step as scroll
66082
+ // bars are the only difference between rounded dimensions + paddings
66083
+ // and "client" properties, though that is not always true in Chrome.
66084
+ var vertScrollbar = Math.round(width + horizPad) - clientWidth;
66085
+ var horizScrollbar = Math.round(height + vertPad) - clientHeight;
66086
+ // Chrome has a rather weird rounding of "client" properties.
66087
+ // E.g. for an element with content width of 314.2px it sometimes gives
66088
+ // the client width of 315px and for the width of 314.7px it may give
66089
+ // 314px. And it doesn't happen all the time. So just ignore this delta
66090
+ // as a non-relevant.
66091
+ if (Math.abs(vertScrollbar) !== 1) {
66092
+ width -= vertScrollbar;
66093
+ }
66094
+ if (Math.abs(horizScrollbar) !== 1) {
66095
+ height -= horizScrollbar;
66096
+ }
66097
+ }
66098
+ return createRectInit(paddings.left, paddings.top, width, height);
66099
+ }
66100
+ /**
66101
+ * Checks whether provided element is an instance of the SVGGraphicsElement.
66102
+ *
66103
+ * @param {Element} target - Element to be checked.
66104
+ * @returns {boolean}
66105
+ */
66106
+ var isSVGGraphicsElement = (function () {
66107
+ // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
66108
+ // interface.
66109
+ if (typeof SVGGraphicsElement !== 'undefined') {
66110
+ return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
66111
+ }
66112
+ // If it's so, then check that element is at least an instance of the
66113
+ // SVGElement and that it has the "getBBox" method.
66114
+ // eslint-disable-next-line no-extra-parens
66115
+ return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
66116
+ typeof target.getBBox === 'function'); };
66117
+ })();
66118
+ /**
66119
+ * Checks whether provided element is a document element (<html>).
66120
+ *
66121
+ * @param {Element} target - Element to be checked.
66122
+ * @returns {boolean}
66123
+ */
66124
+ function isDocumentElement(target) {
66125
+ return target === getWindowOf(target).document.documentElement;
66126
+ }
66127
+ /**
66128
+ * Calculates an appropriate content rectangle for provided html or svg element.
66129
+ *
66130
+ * @param {Element} target - Element content rectangle of which needs to be calculated.
66131
+ * @returns {DOMRectInit}
66132
+ */
66133
+ function getContentRect(target) {
66134
+ if (!isBrowser) {
66135
+ return emptyRect;
66136
+ }
66137
+ if (isSVGGraphicsElement(target)) {
66138
+ return getSVGContentRect(target);
66139
+ }
66140
+ return getHTMLElementContentRect(target);
66141
+ }
66142
+ /**
66143
+ * Creates rectangle with an interface of the DOMRectReadOnly.
66144
+ * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
66145
+ *
66146
+ * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
66147
+ * @returns {DOMRectReadOnly}
66148
+ */
66149
+ function createReadOnlyRect(_a) {
66150
+ var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
66151
+ // If DOMRectReadOnly is available use it as a prototype for the rectangle.
66152
+ var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
66153
+ var rect = Object.create(Constr.prototype);
66154
+ // Rectangle's properties are not writable and non-enumerable.
66155
+ defineConfigurable(rect, {
66156
+ x: x, y: y, width: width, height: height,
66157
+ top: y,
66158
+ right: x + width,
66159
+ bottom: height + y,
66160
+ left: x
66161
+ });
66162
+ return rect;
66163
+ }
66164
+ /**
66165
+ * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
66166
+ * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
66167
+ *
66168
+ * @param {number} x - X coordinate.
66169
+ * @param {number} y - Y coordinate.
66170
+ * @param {number} width - Rectangle's width.
66171
+ * @param {number} height - Rectangle's height.
66172
+ * @returns {DOMRectInit}
66173
+ */
66174
+ function createRectInit(x, y, width, height) {
66175
+ return { x: x, y: y, width: width, height: height };
66176
66176
  }
66177
66177
 
66178
- /**
66179
- * Class that is responsible for computations of the content rectangle of
66180
- * provided DOM element and for keeping track of it's changes.
66181
- */
66182
- var ResizeObservation = /** @class */ (function () {
66183
- /**
66184
- * Creates an instance of ResizeObservation.
66185
- *
66186
- * @param {Element} target - Element to be observed.
66187
- */
66188
- function ResizeObservation(target) {
66189
- /**
66190
- * Broadcasted width of content rectangle.
66191
- *
66192
- * @type {number}
66193
- */
66194
- this.broadcastWidth = 0;
66195
- /**
66196
- * Broadcasted height of content rectangle.
66197
- *
66198
- * @type {number}
66199
- */
66200
- this.broadcastHeight = 0;
66201
- /**
66202
- * Reference to the last observed content rectangle.
66203
- *
66204
- * @private {DOMRectInit}
66205
- */
66206
- this.contentRect_ = createRectInit(0, 0, 0, 0);
66207
- this.target = target;
66208
- }
66209
- /**
66210
- * Updates content rectangle and tells whether it's width or height properties
66211
- * have changed since the last broadcast.
66212
- *
66213
- * @returns {boolean}
66214
- */
66215
- ResizeObservation.prototype.isActive = function () {
66216
- var rect = getContentRect(this.target);
66217
- this.contentRect_ = rect;
66218
- return (rect.width !== this.broadcastWidth ||
66219
- rect.height !== this.broadcastHeight);
66220
- };
66221
- /**
66222
- * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
66223
- * from the corresponding properties of the last observed content rectangle.
66224
- *
66225
- * @returns {DOMRectInit} Last observed content rectangle.
66226
- */
66227
- ResizeObservation.prototype.broadcastRect = function () {
66228
- var rect = this.contentRect_;
66229
- this.broadcastWidth = rect.width;
66230
- this.broadcastHeight = rect.height;
66231
- return rect;
66232
- };
66233
- return ResizeObservation;
66178
+ /**
66179
+ * Class that is responsible for computations of the content rectangle of
66180
+ * provided DOM element and for keeping track of it's changes.
66181
+ */
66182
+ var ResizeObservation = /** @class */ (function () {
66183
+ /**
66184
+ * Creates an instance of ResizeObservation.
66185
+ *
66186
+ * @param {Element} target - Element to be observed.
66187
+ */
66188
+ function ResizeObservation(target) {
66189
+ /**
66190
+ * Broadcasted width of content rectangle.
66191
+ *
66192
+ * @type {number}
66193
+ */
66194
+ this.broadcastWidth = 0;
66195
+ /**
66196
+ * Broadcasted height of content rectangle.
66197
+ *
66198
+ * @type {number}
66199
+ */
66200
+ this.broadcastHeight = 0;
66201
+ /**
66202
+ * Reference to the last observed content rectangle.
66203
+ *
66204
+ * @private {DOMRectInit}
66205
+ */
66206
+ this.contentRect_ = createRectInit(0, 0, 0, 0);
66207
+ this.target = target;
66208
+ }
66209
+ /**
66210
+ * Updates content rectangle and tells whether it's width or height properties
66211
+ * have changed since the last broadcast.
66212
+ *
66213
+ * @returns {boolean}
66214
+ */
66215
+ ResizeObservation.prototype.isActive = function () {
66216
+ var rect = getContentRect(this.target);
66217
+ this.contentRect_ = rect;
66218
+ return (rect.width !== this.broadcastWidth ||
66219
+ rect.height !== this.broadcastHeight);
66220
+ };
66221
+ /**
66222
+ * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
66223
+ * from the corresponding properties of the last observed content rectangle.
66224
+ *
66225
+ * @returns {DOMRectInit} Last observed content rectangle.
66226
+ */
66227
+ ResizeObservation.prototype.broadcastRect = function () {
66228
+ var rect = this.contentRect_;
66229
+ this.broadcastWidth = rect.width;
66230
+ this.broadcastHeight = rect.height;
66231
+ return rect;
66232
+ };
66233
+ return ResizeObservation;
66234
66234
  }());
66235
66235
 
66236
- var ResizeObserverEntry = /** @class */ (function () {
66237
- /**
66238
- * Creates an instance of ResizeObserverEntry.
66239
- *
66240
- * @param {Element} target - Element that is being observed.
66241
- * @param {DOMRectInit} rectInit - Data of the element's content rectangle.
66242
- */
66243
- function ResizeObserverEntry(target, rectInit) {
66244
- var contentRect = createReadOnlyRect(rectInit);
66245
- // According to the specification following properties are not writable
66246
- // and are also not enumerable in the native implementation.
66247
- //
66248
- // Property accessors are not being used as they'd require to define a
66249
- // private WeakMap storage which may cause memory leaks in browsers that
66250
- // don't support this type of collections.
66251
- defineConfigurable(this, { target: target, contentRect: contentRect });
66252
- }
66253
- return ResizeObserverEntry;
66236
+ var ResizeObserverEntry = /** @class */ (function () {
66237
+ /**
66238
+ * Creates an instance of ResizeObserverEntry.
66239
+ *
66240
+ * @param {Element} target - Element that is being observed.
66241
+ * @param {DOMRectInit} rectInit - Data of the element's content rectangle.
66242
+ */
66243
+ function ResizeObserverEntry(target, rectInit) {
66244
+ var contentRect = createReadOnlyRect(rectInit);
66245
+ // According to the specification following properties are not writable
66246
+ // and are also not enumerable in the native implementation.
66247
+ //
66248
+ // Property accessors are not being used as they'd require to define a
66249
+ // private WeakMap storage which may cause memory leaks in browsers that
66250
+ // don't support this type of collections.
66251
+ defineConfigurable(this, { target: target, contentRect: contentRect });
66252
+ }
66253
+ return ResizeObserverEntry;
66254
66254
  }());
66255
66255
 
66256
- var ResizeObserverSPI = /** @class */ (function () {
66257
- /**
66258
- * Creates a new instance of ResizeObserver.
66259
- *
66260
- * @param {ResizeObserverCallback} callback - Callback function that is invoked
66261
- * when one of the observed elements changes it's content dimensions.
66262
- * @param {ResizeObserverController} controller - Controller instance which
66263
- * is responsible for the updates of observer.
66264
- * @param {ResizeObserver} callbackCtx - Reference to the public
66265
- * ResizeObserver instance which will be passed to callback function.
66266
- */
66267
- function ResizeObserverSPI(callback, controller, callbackCtx) {
66268
- /**
66269
- * Collection of resize observations that have detected changes in dimensions
66270
- * of elements.
66271
- *
66272
- * @private {Array<ResizeObservation>}
66273
- */
66274
- this.activeObservations_ = [];
66275
- /**
66276
- * Registry of the ResizeObservation instances.
66277
- *
66278
- * @private {Map<Element, ResizeObservation>}
66279
- */
66280
- this.observations_ = new MapShim();
66281
- if (typeof callback !== 'function') {
66282
- throw new TypeError('The callback provided as parameter 1 is not a function.');
66283
- }
66284
- this.callback_ = callback;
66285
- this.controller_ = controller;
66286
- this.callbackCtx_ = callbackCtx;
66287
- }
66288
- /**
66289
- * Starts observing provided element.
66290
- *
66291
- * @param {Element} target - Element to be observed.
66292
- * @returns {void}
66293
- */
66294
- ResizeObserverSPI.prototype.observe = function (target) {
66295
- if (!arguments.length) {
66296
- throw new TypeError('1 argument required, but only 0 present.');
66297
- }
66298
- // Do nothing if current environment doesn't have the Element interface.
66299
- if (typeof Element === 'undefined' || !(Element instanceof Object)) {
66300
- return;
66301
- }
66302
- if (!(target instanceof getWindowOf(target).Element)) {
66303
- throw new TypeError('parameter 1 is not of type "Element".');
66304
- }
66305
- var observations = this.observations_;
66306
- // Do nothing if element is already being observed.
66307
- if (observations.has(target)) {
66308
- return;
66309
- }
66310
- observations.set(target, new ResizeObservation(target));
66311
- this.controller_.addObserver(this);
66312
- // Force the update of observations.
66313
- this.controller_.refresh();
66314
- };
66315
- /**
66316
- * Stops observing provided element.
66317
- *
66318
- * @param {Element} target - Element to stop observing.
66319
- * @returns {void}
66320
- */
66321
- ResizeObserverSPI.prototype.unobserve = function (target) {
66322
- if (!arguments.length) {
66323
- throw new TypeError('1 argument required, but only 0 present.');
66324
- }
66325
- // Do nothing if current environment doesn't have the Element interface.
66326
- if (typeof Element === 'undefined' || !(Element instanceof Object)) {
66327
- return;
66328
- }
66329
- if (!(target instanceof getWindowOf(target).Element)) {
66330
- throw new TypeError('parameter 1 is not of type "Element".');
66331
- }
66332
- var observations = this.observations_;
66333
- // Do nothing if element is not being observed.
66334
- if (!observations.has(target)) {
66335
- return;
66336
- }
66337
- observations.delete(target);
66338
- if (!observations.size) {
66339
- this.controller_.removeObserver(this);
66340
- }
66341
- };
66342
- /**
66343
- * Stops observing all elements.
66344
- *
66345
- * @returns {void}
66346
- */
66347
- ResizeObserverSPI.prototype.disconnect = function () {
66348
- this.clearActive();
66349
- this.observations_.clear();
66350
- this.controller_.removeObserver(this);
66351
- };
66352
- /**
66353
- * Collects observation instances the associated element of which has changed
66354
- * it's content rectangle.
66355
- *
66356
- * @returns {void}
66357
- */
66358
- ResizeObserverSPI.prototype.gatherActive = function () {
66359
- var _this = this;
66360
- this.clearActive();
66361
- this.observations_.forEach(function (observation) {
66362
- if (observation.isActive()) {
66363
- _this.activeObservations_.push(observation);
66364
- }
66365
- });
66366
- };
66367
- /**
66368
- * Invokes initial callback function with a list of ResizeObserverEntry
66369
- * instances collected from active resize observations.
66370
- *
66371
- * @returns {void}
66372
- */
66373
- ResizeObserverSPI.prototype.broadcastActive = function () {
66374
- // Do nothing if observer doesn't have active observations.
66375
- if (!this.hasActive()) {
66376
- return;
66377
- }
66378
- var ctx = this.callbackCtx_;
66379
- // Create ResizeObserverEntry instance for every active observation.
66380
- var entries = this.activeObservations_.map(function (observation) {
66381
- return new ResizeObserverEntry(observation.target, observation.broadcastRect());
66382
- });
66383
- this.callback_.call(ctx, entries, ctx);
66384
- this.clearActive();
66385
- };
66386
- /**
66387
- * Clears the collection of active observations.
66388
- *
66389
- * @returns {void}
66390
- */
66391
- ResizeObserverSPI.prototype.clearActive = function () {
66392
- this.activeObservations_.splice(0);
66393
- };
66394
- /**
66395
- * Tells whether observer has active observations.
66396
- *
66397
- * @returns {boolean}
66398
- */
66399
- ResizeObserverSPI.prototype.hasActive = function () {
66400
- return this.activeObservations_.length > 0;
66401
- };
66402
- return ResizeObserverSPI;
66256
+ var ResizeObserverSPI = /** @class */ (function () {
66257
+ /**
66258
+ * Creates a new instance of ResizeObserver.
66259
+ *
66260
+ * @param {ResizeObserverCallback} callback - Callback function that is invoked
66261
+ * when one of the observed elements changes it's content dimensions.
66262
+ * @param {ResizeObserverController} controller - Controller instance which
66263
+ * is responsible for the updates of observer.
66264
+ * @param {ResizeObserver} callbackCtx - Reference to the public
66265
+ * ResizeObserver instance which will be passed to callback function.
66266
+ */
66267
+ function ResizeObserverSPI(callback, controller, callbackCtx) {
66268
+ /**
66269
+ * Collection of resize observations that have detected changes in dimensions
66270
+ * of elements.
66271
+ *
66272
+ * @private {Array<ResizeObservation>}
66273
+ */
66274
+ this.activeObservations_ = [];
66275
+ /**
66276
+ * Registry of the ResizeObservation instances.
66277
+ *
66278
+ * @private {Map<Element, ResizeObservation>}
66279
+ */
66280
+ this.observations_ = new MapShim();
66281
+ if (typeof callback !== 'function') {
66282
+ throw new TypeError('The callback provided as parameter 1 is not a function.');
66283
+ }
66284
+ this.callback_ = callback;
66285
+ this.controller_ = controller;
66286
+ this.callbackCtx_ = callbackCtx;
66287
+ }
66288
+ /**
66289
+ * Starts observing provided element.
66290
+ *
66291
+ * @param {Element} target - Element to be observed.
66292
+ * @returns {void}
66293
+ */
66294
+ ResizeObserverSPI.prototype.observe = function (target) {
66295
+ if (!arguments.length) {
66296
+ throw new TypeError('1 argument required, but only 0 present.');
66297
+ }
66298
+ // Do nothing if current environment doesn't have the Element interface.
66299
+ if (typeof Element === 'undefined' || !(Element instanceof Object)) {
66300
+ return;
66301
+ }
66302
+ if (!(target instanceof getWindowOf(target).Element)) {
66303
+ throw new TypeError('parameter 1 is not of type "Element".');
66304
+ }
66305
+ var observations = this.observations_;
66306
+ // Do nothing if element is already being observed.
66307
+ if (observations.has(target)) {
66308
+ return;
66309
+ }
66310
+ observations.set(target, new ResizeObservation(target));
66311
+ this.controller_.addObserver(this);
66312
+ // Force the update of observations.
66313
+ this.controller_.refresh();
66314
+ };
66315
+ /**
66316
+ * Stops observing provided element.
66317
+ *
66318
+ * @param {Element} target - Element to stop observing.
66319
+ * @returns {void}
66320
+ */
66321
+ ResizeObserverSPI.prototype.unobserve = function (target) {
66322
+ if (!arguments.length) {
66323
+ throw new TypeError('1 argument required, but only 0 present.');
66324
+ }
66325
+ // Do nothing if current environment doesn't have the Element interface.
66326
+ if (typeof Element === 'undefined' || !(Element instanceof Object)) {
66327
+ return;
66328
+ }
66329
+ if (!(target instanceof getWindowOf(target).Element)) {
66330
+ throw new TypeError('parameter 1 is not of type "Element".');
66331
+ }
66332
+ var observations = this.observations_;
66333
+ // Do nothing if element is not being observed.
66334
+ if (!observations.has(target)) {
66335
+ return;
66336
+ }
66337
+ observations.delete(target);
66338
+ if (!observations.size) {
66339
+ this.controller_.removeObserver(this);
66340
+ }
66341
+ };
66342
+ /**
66343
+ * Stops observing all elements.
66344
+ *
66345
+ * @returns {void}
66346
+ */
66347
+ ResizeObserverSPI.prototype.disconnect = function () {
66348
+ this.clearActive();
66349
+ this.observations_.clear();
66350
+ this.controller_.removeObserver(this);
66351
+ };
66352
+ /**
66353
+ * Collects observation instances the associated element of which has changed
66354
+ * it's content rectangle.
66355
+ *
66356
+ * @returns {void}
66357
+ */
66358
+ ResizeObserverSPI.prototype.gatherActive = function () {
66359
+ var _this = this;
66360
+ this.clearActive();
66361
+ this.observations_.forEach(function (observation) {
66362
+ if (observation.isActive()) {
66363
+ _this.activeObservations_.push(observation);
66364
+ }
66365
+ });
66366
+ };
66367
+ /**
66368
+ * Invokes initial callback function with a list of ResizeObserverEntry
66369
+ * instances collected from active resize observations.
66370
+ *
66371
+ * @returns {void}
66372
+ */
66373
+ ResizeObserverSPI.prototype.broadcastActive = function () {
66374
+ // Do nothing if observer doesn't have active observations.
66375
+ if (!this.hasActive()) {
66376
+ return;
66377
+ }
66378
+ var ctx = this.callbackCtx_;
66379
+ // Create ResizeObserverEntry instance for every active observation.
66380
+ var entries = this.activeObservations_.map(function (observation) {
66381
+ return new ResizeObserverEntry(observation.target, observation.broadcastRect());
66382
+ });
66383
+ this.callback_.call(ctx, entries, ctx);
66384
+ this.clearActive();
66385
+ };
66386
+ /**
66387
+ * Clears the collection of active observations.
66388
+ *
66389
+ * @returns {void}
66390
+ */
66391
+ ResizeObserverSPI.prototype.clearActive = function () {
66392
+ this.activeObservations_.splice(0);
66393
+ };
66394
+ /**
66395
+ * Tells whether observer has active observations.
66396
+ *
66397
+ * @returns {boolean}
66398
+ */
66399
+ ResizeObserverSPI.prototype.hasActive = function () {
66400
+ return this.activeObservations_.length > 0;
66401
+ };
66402
+ return ResizeObserverSPI;
66403
66403
  }());
66404
66404
 
66405
- // Registry of internal observers. If WeakMap is not available use current shim
66406
- // for the Map collection as it has all required methods and because WeakMap
66407
- // can't be fully polyfilled anyway.
66408
- var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
66409
- /**
66410
- * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
66411
- * exposing only those methods and properties that are defined in the spec.
66412
- */
66413
- var ResizeObserver = /** @class */ (function () {
66414
- /**
66415
- * Creates a new instance of ResizeObserver.
66416
- *
66417
- * @param {ResizeObserverCallback} callback - Callback that is invoked when
66418
- * dimensions of the observed elements change.
66419
- */
66420
- function ResizeObserver(callback) {
66421
- if (!(this instanceof ResizeObserver)) {
66422
- throw new TypeError('Cannot call a class as a function.');
66423
- }
66424
- if (!arguments.length) {
66425
- throw new TypeError('1 argument required, but only 0 present.');
66426
- }
66427
- var controller = ResizeObserverController.getInstance();
66428
- var observer = new ResizeObserverSPI(callback, controller, this);
66429
- observers.set(this, observer);
66430
- }
66431
- return ResizeObserver;
66432
- }());
66433
- // Expose public methods of ResizeObserver.
66434
- [
66435
- 'observe',
66436
- 'unobserve',
66437
- 'disconnect'
66438
- ].forEach(function (method) {
66439
- ResizeObserver.prototype[method] = function () {
66440
- var _a;
66441
- return (_a = observers.get(this))[method].apply(_a, arguments);
66442
- };
66405
+ // Registry of internal observers. If WeakMap is not available use current shim
66406
+ // for the Map collection as it has all required methods and because WeakMap
66407
+ // can't be fully polyfilled anyway.
66408
+ var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
66409
+ /**
66410
+ * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
66411
+ * exposing only those methods and properties that are defined in the spec.
66412
+ */
66413
+ var ResizeObserver = /** @class */ (function () {
66414
+ /**
66415
+ * Creates a new instance of ResizeObserver.
66416
+ *
66417
+ * @param {ResizeObserverCallback} callback - Callback that is invoked when
66418
+ * dimensions of the observed elements change.
66419
+ */
66420
+ function ResizeObserver(callback) {
66421
+ if (!(this instanceof ResizeObserver)) {
66422
+ throw new TypeError('Cannot call a class as a function.');
66423
+ }
66424
+ if (!arguments.length) {
66425
+ throw new TypeError('1 argument required, but only 0 present.');
66426
+ }
66427
+ var controller = ResizeObserverController.getInstance();
66428
+ var observer = new ResizeObserverSPI(callback, controller, this);
66429
+ observers.set(this, observer);
66430
+ }
66431
+ return ResizeObserver;
66432
+ }());
66433
+ // Expose public methods of ResizeObserver.
66434
+ [
66435
+ 'observe',
66436
+ 'unobserve',
66437
+ 'disconnect'
66438
+ ].forEach(function (method) {
66439
+ ResizeObserver.prototype[method] = function () {
66440
+ var _a;
66441
+ return (_a = observers.get(this))[method].apply(_a, arguments);
66442
+ };
66443
66443
  });
66444
66444
 
66445
- var index = (function () {
66446
- // Export existing implementation if available.
66447
- if (typeof global$1.ResizeObserver !== 'undefined') {
66448
- return global$1.ResizeObserver;
66449
- }
66450
- return ResizeObserver;
66445
+ var index = (function () {
66446
+ // Export existing implementation if available.
66447
+ if (typeof global$1.ResizeObserver !== 'undefined') {
66448
+ return global$1.ResizeObserver;
66449
+ }
66450
+ return ResizeObserver;
66451
66451
  })();
66452
66452
 
66453
66453
  /* harmony default export */ __webpack_exports__["default"] = (index);
@@ -67111,7 +67111,7 @@ if (typeof window !== 'undefined') {
67111
67111
  // EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
67112
67112
  var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__(7203);
67113
67113
  var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
67114
- ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/rmtFileUpload/rmtFileUpload.vue?vue&type=template&id=0c678fc6&scoped=true&
67114
+ ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/rmtFileUpload/rmtFileUpload.vue?vue&type=template&id=0c678fc6&scoped=true&
67115
67115
  var render = function render() {
67116
67116
  var _vm = this,
67117
67117
  _c = _vm._self._c;