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