quasar 2.11.3 → 2.11.5

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.
Files changed (147) hide show
  1. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  2. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  3. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  4. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  5. package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +1 -1
  6. package/dist/icon-set/fontawesome-v6.umd.prod.js +1 -1
  7. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  8. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  9. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  10. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  11. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  12. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  13. package/dist/icon-set/material-symbols-outlined.umd.prod.js +1 -1
  14. package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
  15. package/dist/icon-set/material-symbols-sharp.umd.prod.js +1 -1
  16. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  17. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  18. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  19. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  20. package/dist/icon-set/mdi-v7.umd.prod.js +1 -1
  21. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  22. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  23. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  24. package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +1 -1
  25. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  26. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  27. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  28. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  29. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  30. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  31. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  32. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  33. package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +1 -1
  34. package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +1 -1
  35. package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +1 -1
  36. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  37. package/dist/icon-set/svg-mdi-v7.umd.prod.js +1 -1
  38. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  39. package/dist/icon-set/themify.umd.prod.js +1 -1
  40. package/dist/lang/ar-TN.umd.prod.js +1 -1
  41. package/dist/lang/ar.umd.prod.js +1 -1
  42. package/dist/lang/az-Latn.umd.prod.js +1 -1
  43. package/dist/lang/bg.umd.prod.js +1 -1
  44. package/dist/lang/bn.umd.prod.js +1 -1
  45. package/dist/lang/ca.umd.prod.js +1 -1
  46. package/dist/lang/cs.umd.prod.js +1 -1
  47. package/dist/lang/da.umd.prod.js +1 -1
  48. package/dist/lang/de.umd.prod.js +1 -1
  49. package/dist/lang/el.umd.prod.js +1 -1
  50. package/dist/lang/en-GB.umd.prod.js +1 -1
  51. package/dist/lang/en-US.umd.prod.js +1 -1
  52. package/dist/lang/eo.umd.prod.js +1 -1
  53. package/dist/lang/es.umd.prod.js +1 -1
  54. package/dist/lang/et.umd.prod.js +1 -1
  55. package/dist/lang/eu.umd.prod.js +1 -1
  56. package/dist/lang/fa-IR.umd.prod.js +1 -1
  57. package/dist/lang/fa.umd.prod.js +1 -1
  58. package/dist/lang/fi.umd.prod.js +1 -1
  59. package/dist/lang/fr.umd.prod.js +1 -1
  60. package/dist/lang/gn.umd.prod.js +1 -1
  61. package/dist/lang/he.umd.prod.js +1 -1
  62. package/dist/lang/hr.umd.prod.js +1 -1
  63. package/dist/lang/hu.umd.prod.js +1 -1
  64. package/dist/lang/id.umd.prod.js +1 -1
  65. package/dist/lang/is.umd.prod.js +1 -1
  66. package/dist/lang/it.umd.prod.js +1 -1
  67. package/dist/lang/ja.umd.prod.js +1 -1
  68. package/dist/lang/kk.umd.prod.js +1 -1
  69. package/dist/lang/km.umd.prod.js +1 -1
  70. package/dist/lang/ko-KR.umd.prod.js +1 -1
  71. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  72. package/dist/lang/lt.umd.prod.js +1 -1
  73. package/dist/lang/lu.umd.prod.js +1 -1
  74. package/dist/lang/lv.umd.prod.js +1 -1
  75. package/dist/lang/ml.umd.prod.js +1 -1
  76. package/dist/lang/mm.umd.prod.js +1 -1
  77. package/dist/lang/ms.umd.prod.js +1 -1
  78. package/dist/lang/my.umd.prod.js +1 -1
  79. package/dist/lang/nb-NO.umd.prod.js +1 -1
  80. package/dist/lang/nl.umd.prod.js +1 -1
  81. package/dist/lang/pl.umd.prod.js +1 -1
  82. package/dist/lang/pt-BR.umd.prod.js +1 -1
  83. package/dist/lang/pt.umd.prod.js +1 -1
  84. package/dist/lang/ro.umd.prod.js +1 -1
  85. package/dist/lang/ru.umd.prod.js +1 -1
  86. package/dist/lang/sk.umd.prod.js +1 -1
  87. package/dist/lang/sl.umd.prod.js +1 -1
  88. package/dist/lang/sm.umd.prod.js +1 -1
  89. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  90. package/dist/lang/sr.umd.prod.js +1 -1
  91. package/dist/lang/sv.umd.prod.js +1 -1
  92. package/dist/lang/ta.umd.prod.js +1 -1
  93. package/dist/lang/th.umd.prod.js +1 -1
  94. package/dist/lang/tr.umd.prod.js +1 -1
  95. package/dist/lang/ug.umd.prod.js +1 -1
  96. package/dist/lang/uk.umd.prod.js +1 -1
  97. package/dist/lang/uz-Cyrl.umd.prod.js +1 -1
  98. package/dist/lang/uz-Latn.umd.prod.js +1 -1
  99. package/dist/lang/vi.umd.prod.js +1 -1
  100. package/dist/lang/zh-CN.umd.prod.js +1 -1
  101. package/dist/lang/zh-TW.umd.prod.js +1 -1
  102. package/dist/quasar.cjs.prod.js +2 -2
  103. package/dist/quasar.esm.js +445 -196
  104. package/dist/quasar.esm.prod.js +2 -2
  105. package/dist/quasar.sass +1 -1
  106. package/dist/quasar.umd.js +445 -196
  107. package/dist/quasar.umd.prod.js +2 -2
  108. package/dist/web-types/web-types.json +1 -1
  109. package/package.json +1 -1
  110. package/src/components/ajax-bar/QAjaxBar.js +13 -5
  111. package/src/components/btn/QBtn.js +3 -2
  112. package/src/components/carousel/QCarousel.js +17 -10
  113. package/src/components/dialog/QDialog.js +10 -5
  114. package/src/components/drawer/QDrawer.js +8 -3
  115. package/src/components/img/QImg.js +25 -11
  116. package/src/components/infinite-scroll/QInfiniteScroll.js +26 -4
  117. package/src/components/input/QInput.js +14 -4
  118. package/src/components/layout/QLayout.js +5 -5
  119. package/src/components/menu/QMenu.js +1 -1
  120. package/src/components/pull-to-refresh/QPullToRefresh.js +5 -4
  121. package/src/components/rating/QRating.js +3 -3
  122. package/src/components/resize-observer/QResizeObserver.js +9 -4
  123. package/src/components/scroll-area/QScrollArea.js +8 -8
  124. package/src/components/select/QSelect.js +19 -8
  125. package/src/components/slide-item/QSlideItem.js +4 -2
  126. package/src/components/slide-transition/QSlideTransition.js +17 -3
  127. package/src/components/tabs/QTabs.js +12 -5
  128. package/src/components/tooltip/QTooltip.js +1 -1
  129. package/src/components/virtual-scroll/use-virtual-scroll.js +5 -1
  130. package/src/composables/private/use-anchor.js +8 -3
  131. package/src/composables/private/use-field.js +10 -4
  132. package/src/composables/private/use-portal.js +3 -3
  133. package/src/composables/private/use-timeout.js +6 -3
  134. package/src/directives/TouchHold.js +9 -4
  135. package/src/directives/TouchRepeat.js +10 -3
  136. package/src/plugins/Loading.js +16 -11
  137. package/src/plugins/Meta.js +4 -2
  138. package/src/plugins/Notify.js +13 -3
  139. package/src/utils/copy-to-clipboard.js +8 -0
  140. package/src/utils/debounce.js +9 -6
  141. package/src/utils/is.js +11 -6
  142. package/src/utils/morph.js +7 -6
  143. package/src/utils/prevent-scroll.js +14 -7
  144. package/src/utils/private/click-outside.js +10 -3
  145. package/src/utils/private/global-dialog.js +1 -1
  146. package/src/utils/private/global-nodes.js +44 -13
  147. package/src/utils/private/position-engine.js +67 -25
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quasar Framework v2.11.3
2
+ * Quasar Framework v2.11.5
3
3
  * (c) 2015-present Razvan Stoenescu
4
4
  * Released under the MIT License.
5
5
  */
@@ -555,27 +555,30 @@ var event = {
555
555
  };
556
556
 
557
557
  function debounce (fn, wait = 250, immediate) {
558
- let timeout;
558
+ let timer = null;
559
559
 
560
560
  function debounced (/* ...args */) {
561
561
  const args = arguments;
562
562
 
563
563
  const later = () => {
564
- timeout = void 0;
564
+ timer = null;
565
565
  if (immediate !== true) {
566
566
  fn.apply(this, args);
567
567
  }
568
568
  };
569
569
 
570
- clearTimeout(timeout);
571
- if (immediate === true && timeout === void 0) {
570
+ if (timer !== null) {
571
+ clearTimeout(timer);
572
+ }
573
+ else if (immediate === true) {
572
574
  fn.apply(this, args);
573
575
  }
574
- timeout = setTimeout(later, wait);
576
+
577
+ timer = setTimeout(later, wait);
575
578
  }
576
579
 
577
580
  debounced.cancel = () => {
578
- clearTimeout(timeout);
581
+ timer !== null && clearTimeout(timer);
579
582
  };
580
583
 
581
584
  return debounced
@@ -1471,20 +1474,23 @@ function isDeepEqual (a, b) {
1471
1474
  return false
1472
1475
  }
1473
1476
 
1474
- i = a.entries().next();
1477
+ let iter = a.entries();
1478
+
1479
+ i = iter.next();
1475
1480
  while (i.done !== true) {
1476
1481
  if (b.has(i.value[ 0 ]) !== true) {
1477
1482
  return false
1478
1483
  }
1479
- i = i.next();
1484
+ i = iter.next();
1480
1485
  }
1481
1486
 
1482
- i = a.entries().next();
1487
+ iter = a.entries();
1488
+ i = iter.next();
1483
1489
  while (i.done !== true) {
1484
1490
  if (isDeepEqual(i.value[ 1 ], b.get(i.value[ 0 ])) !== true) {
1485
1491
  return false
1486
1492
  }
1487
- i = i.next();
1493
+ i = iter.next();
1488
1494
  }
1489
1495
 
1490
1496
  return true
@@ -1495,12 +1501,14 @@ function isDeepEqual (a, b) {
1495
1501
  return false
1496
1502
  }
1497
1503
 
1498
- i = a.entries().next();
1504
+ const iter = a.entries();
1505
+
1506
+ i = iter.next();
1499
1507
  while (i.done !== true) {
1500
1508
  if (b.has(i.value[ 0 ]) !== true) {
1501
1509
  return false
1502
1510
  }
1503
- i = i.next();
1511
+ i = iter.next();
1504
1512
  }
1505
1513
 
1506
1514
  return true
@@ -1643,7 +1651,7 @@ function prepareApp (app, uiOpts, pluginOpts) {
1643
1651
  }
1644
1652
 
1645
1653
  var installQuasar = function (parentApp, opts = {}) {
1646
- const $q = { version: '2.11.3' };
1654
+ const $q = { version: '2.11.5' };
1647
1655
 
1648
1656
  if (globalConfigIsFrozen === false) {
1649
1657
  if (opts.config !== void 0) {
@@ -1842,7 +1850,7 @@ var QAjaxBar = createComponent({
1842
1850
  const onScreen = ref(false);
1843
1851
  const animate = ref(true);
1844
1852
 
1845
- let sessions = 0, timer, speed;
1853
+ let sessions = 0, timer = null, speed;
1846
1854
 
1847
1855
  const classes = computed(() =>
1848
1856
  `q-loading-bar q-loading-bar--${ props.position }`
@@ -1894,19 +1902,21 @@ var QAjaxBar = createComponent({
1894
1902
  if (oldSpeed === 0 && newSpeed > 0) {
1895
1903
  planNextStep();
1896
1904
  }
1897
- else if (oldSpeed > 0 && newSpeed <= 0) {
1905
+ else if (timer !== null && oldSpeed > 0 && newSpeed <= 0) {
1898
1906
  clearTimeout(timer);
1907
+ timer = null;
1899
1908
  }
1900
1909
 
1901
1910
  return sessions
1902
1911
  }
1903
1912
 
1904
- clearTimeout(timer);
1913
+ timer !== null && clearTimeout(timer);
1905
1914
  emit('start');
1906
1915
 
1907
1916
  progress.value = 0;
1908
1917
 
1909
1918
  timer = setTimeout(() => {
1919
+ timer = null;
1910
1920
  animate.value = true;
1911
1921
  newSpeed > 0 && planNextStep();
1912
1922
  }, onScreen.value === true ? 500 : 1);
@@ -1933,13 +1943,18 @@ var QAjaxBar = createComponent({
1933
1943
  return sessions
1934
1944
  }
1935
1945
 
1936
- clearTimeout(timer);
1946
+ if (timer !== null) {
1947
+ clearTimeout(timer);
1948
+ timer = null;
1949
+ }
1950
+
1937
1951
  emit('stop');
1938
1952
 
1939
1953
  const end = () => {
1940
1954
  animate.value = true;
1941
1955
  progress.value = 100;
1942
1956
  timer = setTimeout(() => {
1957
+ timer = null;
1943
1958
  onScreen.value = false;
1944
1959
  }, 1000);
1945
1960
  };
@@ -1957,6 +1972,7 @@ var QAjaxBar = createComponent({
1957
1972
  function planNextStep () {
1958
1973
  if (progress.value < 100) {
1959
1974
  timer = setTimeout(() => {
1975
+ timer = null;
1960
1976
  increment();
1961
1977
  planNextStep();
1962
1978
  }, speed);
@@ -1977,7 +1993,7 @@ var QAjaxBar = createComponent({
1977
1993
  });
1978
1994
 
1979
1995
  onBeforeUnmount(() => {
1980
- clearTimeout(timer);
1996
+ timer !== null && clearTimeout(timer);
1981
1997
  hijacked === true && restoreAjax(start);
1982
1998
  });
1983
1999
 
@@ -3581,7 +3597,7 @@ var QBtn = createComponent({
3581
3597
  const rootRef = ref(null);
3582
3598
  const blurTargetRef = ref(null);
3583
3599
 
3584
- let localTouchTargetEl = null, avoidMouseRipple, mouseTimer;
3600
+ let localTouchTargetEl = null, avoidMouseRipple, mouseTimer = null;
3585
3601
 
3586
3602
  const hasLabel = computed(() =>
3587
3603
  props.label !== void 0 && props.label !== null && props.label !== ''
@@ -3727,8 +3743,9 @@ var QBtn = createComponent({
3727
3743
  // avoid duplicated mousedown event
3728
3744
  // triggering another early ripple
3729
3745
  avoidMouseRipple = true;
3730
- clearTimeout(mouseTimer);
3746
+ mouseTimer !== null && clearTimeout(mouseTimer);
3731
3747
  mouseTimer = setTimeout(() => {
3748
+ mouseTimer = null;
3732
3749
  avoidMouseRipple = false;
3733
3750
  }, 200);
3734
3751
  }
@@ -3974,7 +3991,7 @@ function useAnchor ({
3974
3991
 
3975
3992
  const anchorEl = ref(null);
3976
3993
 
3977
- let touchTimer;
3994
+ let touchTimer = null;
3978
3995
 
3979
3996
  function canShow (evt) {
3980
3997
  // abort with no parent configured or on multi-touch
@@ -4033,6 +4050,7 @@ function useAnchor ({
4033
4050
  ]);
4034
4051
 
4035
4052
  touchTimer = setTimeout(() => {
4053
+ touchTimer = null;
4036
4054
  proxy.show(evt);
4037
4055
  evt.qAnchorHandled = true;
4038
4056
  }, 300);
@@ -4040,7 +4058,11 @@ function useAnchor ({
4040
4058
 
4041
4059
  mobileCleanup (evt) {
4042
4060
  anchorEl.value.classList.remove('non-selectable');
4043
- clearTimeout(touchTimer);
4061
+
4062
+ if (touchTimer !== null) {
4063
+ clearTimeout(touchTimer);
4064
+ touchTimer = null;
4065
+ }
4044
4066
 
4045
4067
  if (showing.value === true && evt !== void 0) {
4046
4068
  clearSelection();
@@ -4154,7 +4176,7 @@ function useAnchor ({
4154
4176
  });
4155
4177
 
4156
4178
  onBeforeUnmount(() => {
4157
- clearTimeout(touchTimer);
4179
+ touchTimer !== null && clearTimeout(touchTimer);
4158
4180
  unconfigureAnchorEl();
4159
4181
  });
4160
4182
 
@@ -4395,15 +4417,18 @@ function removeFocusFn (fn) {
4395
4417
  queue = queue.filter(entry => entry !== fn);
4396
4418
  }
4397
4419
 
4398
- const globalNodes = [];
4420
+ const nodesList = [];
4421
+ const portalTypeList = [];
4422
+
4423
+ let portalIndex = 1;
4399
4424
  let target = document.body;
4400
4425
 
4401
- function createGlobalNode (id) {
4426
+ function createGlobalNode (id, portalType) {
4402
4427
  const el = document.createElement('div');
4403
4428
 
4404
- if (id !== void 0) {
4405
- el.id = id;
4406
- }
4429
+ el.id = portalType !== void 0
4430
+ ? `q-portal--${ portalType }--${ portalIndex++ }`
4431
+ : id;
4407
4432
 
4408
4433
  if (globalConfig.globalNodes !== void 0) {
4409
4434
  const cls = globalConfig.globalNodes.class;
@@ -4413,25 +4438,53 @@ function createGlobalNode (id) {
4413
4438
  }
4414
4439
 
4415
4440
  target.appendChild(el);
4416
- globalNodes.push(el);
4441
+ nodesList.push(el);
4442
+ portalTypeList.push(portalType);
4417
4443
 
4418
4444
  return el
4419
4445
  }
4420
4446
 
4421
4447
  function removeGlobalNode (el) {
4422
- globalNodes.splice(globalNodes.indexOf(el), 1);
4448
+ const nodeIndex = nodesList.indexOf(el);
4449
+
4450
+ nodesList.splice(nodeIndex, 1);
4451
+ portalTypeList.splice(nodeIndex, 1);
4452
+
4423
4453
  el.remove();
4424
4454
  }
4425
4455
 
4426
- function changeGlobalNodesTarget (el) {
4427
- if (el !== target) {
4428
- target = el;
4456
+ function changeGlobalNodesTarget (newTarget) {
4457
+ if (newTarget === target) {
4458
+ return
4459
+ }
4460
+
4461
+ target = newTarget;
4429
4462
 
4430
- globalNodes.forEach(el => {
4431
- if (el.contains(target) === false) {
4432
- target.appendChild(el);
4463
+ if (
4464
+ target === document.body
4465
+ // or we have less than 2 dialogs:
4466
+ || portalTypeList.reduce((acc, type) => (type === 'dialog' ? acc + 1 : acc), 0) < 2
4467
+ ) {
4468
+ nodesList.forEach(node => {
4469
+ if (node.contains(target) === false) {
4470
+ target.appendChild(node);
4433
4471
  }
4434
4472
  });
4473
+
4474
+ return
4475
+ }
4476
+
4477
+ const lastDialogIndex = portalTypeList.lastIndexOf('dialog');
4478
+
4479
+ for (let i = 0; i < nodesList.length; i++) {
4480
+ const el = nodesList[ i ];
4481
+
4482
+ if (
4483
+ (i === lastDialogIndex || portalTypeList[ i ] !== 'dialog')
4484
+ && el.contains(target) === false
4485
+ ) {
4486
+ target.appendChild(el);
4487
+ }
4435
4488
  }
4436
4489
  }
4437
4490
 
@@ -4510,7 +4563,7 @@ function isOnGlobalDialog (vm) {
4510
4563
  // Warning!
4511
4564
  // You MUST specify "inheritAttrs: false" in your component
4512
4565
 
4513
- function usePortal (vm, innerRef, renderPortalContent, checkGlobalDialog) {
4566
+ function usePortal (vm, innerRef, renderPortalContent, type) {
4514
4567
  // showing, including while in show/hide transition
4515
4568
  const portalIsActive = ref(false);
4516
4569
 
@@ -4519,7 +4572,7 @@ function usePortal (vm, innerRef, renderPortalContent, checkGlobalDialog) {
4519
4572
 
4520
4573
  let portalEl = null;
4521
4574
  const focusObj = {};
4522
- const onGlobalDialog = checkGlobalDialog === true && isOnGlobalDialog(vm);
4575
+ const onGlobalDialog = type === 'dialog' && isOnGlobalDialog(vm);
4523
4576
 
4524
4577
  function showPortal (isReady) {
4525
4578
  if (isReady === true) {
@@ -4532,7 +4585,7 @@ function usePortal (vm, innerRef, renderPortalContent, checkGlobalDialog) {
4532
4585
 
4533
4586
  if (portalIsActive.value === false) {
4534
4587
  if (onGlobalDialog === false && portalEl === null) {
4535
- portalEl = createGlobalNode();
4588
+ portalEl = createGlobalNode(false, type);
4536
4589
  }
4537
4590
 
4538
4591
  portalIsActive.value = true;
@@ -4673,11 +4726,14 @@ function useTick () {
4673
4726
  */
4674
4727
 
4675
4728
  function useTimeout () {
4676
- let timer;
4729
+ let timer = null;
4677
4730
  const vm = getCurrentInstance();
4678
4731
 
4679
4732
  function removeTimeout () {
4680
- clearTimeout(timer);
4733
+ if (timer !== null) {
4734
+ clearTimeout(timer);
4735
+ timer = null;
4736
+ }
4681
4737
  }
4682
4738
 
4683
4739
  onDeactivated(removeTimeout);
@@ -4687,7 +4743,7 @@ function useTimeout () {
4687
4743
  removeTimeout,
4688
4744
 
4689
4745
  registerTimeout (fn, delay) {
4690
- clearTimeout(timer);
4746
+ removeTimeout();
4691
4747
 
4692
4748
  if (vmIsDestroyed(vm) === false) {
4693
4749
  timer = setTimeout(fn, delay);
@@ -4969,14 +5025,11 @@ function removeFocusout (fn) {
4969
5025
  }
4970
5026
  }
4971
5027
 
4972
- let timer;
4973
-
4974
5028
  const
4975
5029
  { notPassiveCapture } = listenOpts,
4976
5030
  registeredList = [];
4977
5031
 
4978
5032
  function globalHandler (evt) {
4979
- clearTimeout(timer);
4980
5033
 
4981
5034
  const target = evt.target;
4982
5035
 
@@ -5049,7 +5102,7 @@ function removeClickOutside (clickOutsideProps) {
5049
5102
  registeredList.splice(index, 1);
5050
5103
 
5051
5104
  if (registeredList.length === 0) {
5052
- clearTimeout(timer);
5105
+
5053
5106
  document.removeEventListener('mousedown', globalHandler, notPassiveCapture);
5054
5107
  document.removeEventListener('touchstart', globalHandler, notPassiveCapture);
5055
5108
  }
@@ -5117,17 +5170,32 @@ function getAnchorProps (el, offset) {
5117
5170
  }
5118
5171
 
5119
5172
  return {
5120
- top,
5121
- left,
5122
- right,
5123
- bottom,
5124
- width,
5125
- height,
5173
+ top, bottom, height,
5174
+ left, right, width,
5126
5175
  middle: left + (right - left) / 2,
5127
5176
  center: top + (bottom - top) / 2
5128
5177
  }
5129
5178
  }
5130
5179
 
5180
+ function getAbsoluteAnchorProps (el, absoluteOffset, offset) {
5181
+ let { top, left } = el.getBoundingClientRect();
5182
+
5183
+ top += absoluteOffset.top;
5184
+ left += absoluteOffset.left;
5185
+
5186
+ if (offset !== void 0) {
5187
+ top += offset[ 1 ];
5188
+ left += offset[ 0 ];
5189
+ }
5190
+
5191
+ return {
5192
+ top, bottom: top + 1, height: 1,
5193
+ left, right: left + 1, width: 1,
5194
+ middle: left,
5195
+ center: top
5196
+ }
5197
+ }
5198
+
5131
5199
  function getTargetProps (el) {
5132
5200
  return {
5133
5201
  top: 0,
@@ -5139,6 +5207,13 @@ function getTargetProps (el) {
5139
5207
  }
5140
5208
  }
5141
5209
 
5210
+ function getTopLeftProps (anchorProps, targetProps, cfg) {
5211
+ return {
5212
+ top: anchorProps[ cfg.anchorOrigin.vertical ] - targetProps[ cfg.selfOrigin.vertical ],
5213
+ left: anchorProps[ cfg.anchorOrigin.horizontal ] - targetProps[ cfg.selfOrigin.horizontal ]
5214
+ }
5215
+ }
5216
+
5142
5217
  // cfg: { el, anchorEl, anchorOrigin, selfOrigin, offset, absoluteOffset, cover, fit, maxHeight, maxWidth }
5143
5218
  function setPosition (cfg) {
5144
5219
  if (client.is.ios === true && window.visualViewport !== void 0) {
@@ -5157,25 +5232,15 @@ function setPosition (cfg) {
5157
5232
  }
5158
5233
  }
5159
5234
 
5160
- let anchorProps;
5161
-
5162
5235
  // scroll position might change
5163
5236
  // if max-height/-width changes, so we
5164
5237
  // need to restore it after we calculate
5165
5238
  // the new positioning
5166
5239
  const { scrollLeft, scrollTop } = cfg.el;
5167
5240
 
5168
- if (cfg.absoluteOffset === void 0) {
5169
- anchorProps = getAnchorProps(cfg.anchorEl, cfg.cover === true ? [ 0, 0 ] : cfg.offset);
5170
- }
5171
- else {
5172
- const
5173
- { top: anchorTop, left: anchorLeft } = cfg.anchorEl.getBoundingClientRect(),
5174
- top = anchorTop + cfg.absoluteOffset.top,
5175
- left = anchorLeft + cfg.absoluteOffset.left;
5176
-
5177
- anchorProps = { top, left, width: 1, height: 1, right: left + 1, center: top, middle: left, bottom: top + 1 };
5178
- }
5241
+ const anchorProps = cfg.absoluteOffset === void 0
5242
+ ? getAnchorProps(cfg.anchorEl, cfg.cover === true ? [ 0, 0 ] : cfg.offset)
5243
+ : getAbsoluteAnchorProps(cfg.anchorEl, cfg.absoluteOffset, cfg.offset);
5179
5244
 
5180
5245
  let elStyle = {
5181
5246
  maxHeight: cfg.maxHeight,
@@ -5192,14 +5257,44 @@ function setPosition (cfg) {
5192
5257
 
5193
5258
  Object.assign(cfg.el.style, elStyle);
5194
5259
 
5195
- const
5196
- targetProps = getTargetProps(cfg.el),
5197
- props = {
5198
- top: anchorProps[ cfg.anchorOrigin.vertical ] - targetProps[ cfg.selfOrigin.vertical ],
5199
- left: anchorProps[ cfg.anchorOrigin.horizontal ] - targetProps[ cfg.selfOrigin.horizontal ]
5200
- };
5260
+ const targetProps = getTargetProps(cfg.el);
5261
+ let props = getTopLeftProps(anchorProps, targetProps, cfg);
5201
5262
 
5202
- applyBoundaries(props, anchorProps, targetProps, cfg.anchorOrigin, cfg.selfOrigin);
5263
+ if (cfg.absoluteOffset === void 0 || cfg.offset === void 0) {
5264
+ applyBoundaries(props, anchorProps, targetProps, cfg.anchorOrigin, cfg.selfOrigin);
5265
+ }
5266
+ else { // we have touch position or context menu with offset
5267
+ const { top, left } = props; // cache initial values
5268
+
5269
+ // apply initial boundaries
5270
+ applyBoundaries(props, anchorProps, targetProps, cfg.anchorOrigin, cfg.selfOrigin);
5271
+
5272
+ let hasChanged = false;
5273
+
5274
+ // did it flip vertically?
5275
+ if (props.top !== top) {
5276
+ hasChanged = true;
5277
+ const offsetY = 2 * cfg.offset[ 1 ];
5278
+ anchorProps.center = anchorProps.top -= offsetY;
5279
+ anchorProps.bottom -= offsetY + 2;
5280
+ }
5281
+
5282
+ // did it flip horizontally?
5283
+ if (props.left !== left) {
5284
+ hasChanged = true;
5285
+ const offsetX = 2 * cfg.offset[ 0 ];
5286
+ anchorProps.middle = anchorProps.left -= offsetX;
5287
+ anchorProps.right -= offsetX + 2;
5288
+ }
5289
+
5290
+ if (hasChanged === true) {
5291
+ // re-calculate props with the new anchor
5292
+ props = getTopLeftProps(anchorProps, targetProps, cfg);
5293
+
5294
+ // and re-apply boundaries
5295
+ applyBoundaries(props, anchorProps, targetProps, cfg.anchorOrigin, cfg.selfOrigin);
5296
+ }
5297
+ }
5203
5298
 
5204
5299
  elStyle = {
5205
5300
  top: props.top + 'px',
@@ -5380,7 +5475,7 @@ var QMenu = createComponent({
5380
5475
  processOnMount: true
5381
5476
  });
5382
5477
 
5383
- const { showPortal, hidePortal, renderPortal } = usePortal(vm, innerRef, renderPortalContent);
5478
+ const { showPortal, hidePortal, renderPortal } = usePortal(vm, innerRef, renderPortalContent, 'menu');
5384
5479
 
5385
5480
  const clickOutsideProps = {
5386
5481
  anchorEl,
@@ -6997,7 +7092,7 @@ var QCarousel = createComponent({
6997
7092
 
6998
7093
  const isDark = useDark(props, $q);
6999
7094
 
7000
- let timer, panelsLen;
7095
+ let timer = null, panelsLen;
7001
7096
 
7002
7097
  const {
7003
7098
  updatePanelsList, getPanelContent,
@@ -7051,7 +7146,6 @@ var QCarousel = createComponent({
7051
7146
 
7052
7147
  watch(() => props.modelValue, () => {
7053
7148
  if (props.autoplay) {
7054
- clearInterval(timer);
7055
7149
  startTimer();
7056
7150
  }
7057
7151
  });
@@ -7060,20 +7154,28 @@ var QCarousel = createComponent({
7060
7154
  if (val) {
7061
7155
  startTimer();
7062
7156
  }
7063
- else {
7064
- clearInterval(timer);
7157
+ else if (timer !== null) {
7158
+ clearTimeout(timer);
7159
+ timer = null;
7065
7160
  }
7066
7161
  });
7067
7162
 
7068
7163
  function startTimer () {
7069
7164
  const duration = isNumber(props.autoplay) === true
7070
- ? props.autoplay
7165
+ ? Math.abs(props.autoplay)
7071
7166
  : 5000;
7072
7167
 
7073
- timer = setTimeout(
7074
- duration >= 0 ? nextPanel : previousPanel,
7075
- Math.abs(duration)
7076
- );
7168
+ timer !== null && clearTimeout(timer);
7169
+ timer = setTimeout(() => {
7170
+ timer = null;
7171
+
7172
+ if (duration >= 0) {
7173
+ nextPanel();
7174
+ }
7175
+ else {
7176
+ previousPanel();
7177
+ }
7178
+ }, duration);
7077
7179
  }
7078
7180
 
7079
7181
  onMounted(() => {
@@ -7081,7 +7183,7 @@ var QCarousel = createComponent({
7081
7183
  });
7082
7184
 
7083
7185
  onBeforeUnmount(() => {
7084
- clearInterval(timer);
7186
+ timer !== null && clearTimeout(timer);
7085
7187
  });
7086
7188
 
7087
7189
  function getNavigationContainer (type, mapping) {
@@ -9399,8 +9501,10 @@ var QResizeObserver = createComponent({
9399
9501
  }
9400
9502
 
9401
9503
  function emitEvent () {
9402
- clearTimeout(timer);
9403
- timer = null;
9504
+ if (timer !== null) {
9505
+ clearTimeout(timer);
9506
+ timer = null;
9507
+ }
9404
9508
 
9405
9509
  if (targetEl) {
9406
9510
  const { offsetWidth: width, offsetHeight: height } = targetEl;
@@ -9434,7 +9538,7 @@ var QResizeObserver = createComponent({
9434
9538
  onMounted(() => { init(); });
9435
9539
 
9436
9540
  onBeforeUnmount(() => {
9437
- clearTimeout(timer);
9541
+ timer !== null && clearTimeout(timer);
9438
9542
 
9439
9543
  if (observer !== void 0) {
9440
9544
  if (observer.disconnect !== void 0) {
@@ -9454,7 +9558,10 @@ var QResizeObserver = createComponent({
9454
9558
  let curDocView;
9455
9559
 
9456
9560
  function cleanup () {
9457
- clearTimeout(timer);
9561
+ if (timer !== null) {
9562
+ clearTimeout(timer);
9563
+ timer = null;
9564
+ }
9458
9565
 
9459
9566
  if (curDocView !== void 0) {
9460
9567
  // iOS is fuzzy, need to check it first
@@ -9607,7 +9714,7 @@ var QTabs = createComponent({
9607
9714
  const tabDataListLen = ref(0);
9608
9715
  const hasFocus = ref(false);
9609
9716
 
9610
- let animateTimer, scrollTimer, unwatchRoute;
9717
+ let animateTimer = null, scrollTimer = null, unwatchRoute;
9611
9718
 
9612
9719
  const tabProps = computed(() => ({
9613
9720
  activeClass: props.activeClass,
@@ -9743,7 +9850,10 @@ var QTabs = createComponent({
9743
9850
  oldEl = oldTab.tabIndicatorRef.value,
9744
9851
  newEl = newTab.tabIndicatorRef.value;
9745
9852
 
9746
- clearTimeout(animateTimer);
9853
+ if (animateTimer !== null) {
9854
+ clearTimeout(animateTimer);
9855
+ animateTimer = null;
9856
+ }
9747
9857
 
9748
9858
  oldEl.style.transition = 'none';
9749
9859
  oldEl.style.transform = 'none';
@@ -9761,6 +9871,7 @@ var QTabs = createComponent({
9761
9871
  // allow scope updates to kick in (QRouteTab needs more time)
9762
9872
  registerAnimateTick(() => {
9763
9873
  animateTimer = setTimeout(() => {
9874
+ animateTimer = null;
9764
9875
  newEl.style.transition = 'transform .25s cubic-bezier(.4, 0, .2, 1)';
9765
9876
  newEl.style.transform = 'none';
9766
9877
  }, 70);
@@ -9813,7 +9924,7 @@ var QTabs = createComponent({
9813
9924
  }
9814
9925
 
9815
9926
  function animScrollTo (value) {
9816
- stopAnimScroll();
9927
+ scrollTimer !== null && clearInterval(scrollTimer);
9817
9928
  scrollTimer = setInterval(() => {
9818
9929
  if (scrollTowards(value) === true) {
9819
9930
  stopAnimScroll();
@@ -9830,7 +9941,10 @@ var QTabs = createComponent({
9830
9941
  }
9831
9942
 
9832
9943
  function stopAnimScroll () {
9833
- clearInterval(scrollTimer);
9944
+ if (scrollTimer !== null) {
9945
+ clearInterval(scrollTimer);
9946
+ scrollTimer = null;
9947
+ }
9834
9948
  }
9835
9949
 
9836
9950
  function onKbdNavigate (keyCode, fromEl) {
@@ -10134,7 +10248,7 @@ var QTabs = createComponent({
10134
10248
  provide(tabsKey, $tabs);
10135
10249
 
10136
10250
  function cleanup () {
10137
- clearTimeout(animateTimer);
10251
+ animateTimer !== null && clearTimeout(animateTimer);
10138
10252
  stopAnimScroll();
10139
10253
  unwatchRoute !== void 0 && unwatchRoute();
10140
10254
  }
@@ -14526,7 +14640,8 @@ let
14526
14640
  vpPendingUpdate = false,
14527
14641
  bodyLeft,
14528
14642
  bodyTop,
14529
- closeTimer;
14643
+ href,
14644
+ closeTimer = null;
14530
14645
 
14531
14646
  function onWheel (e) {
14532
14647
  if (shouldPreventScroll(e)) {
@@ -14612,6 +14727,8 @@ function apply$1 (action) {
14612
14727
  bodyLeft = body.style.left;
14613
14728
  bodyTop = body.style.top;
14614
14729
 
14730
+ href = window.location.href;
14731
+
14615
14732
  body.style.left = `-${ scrollPositionX }px`;
14616
14733
  body.style.top = `-${ scrollPositionY }px`;
14617
14734
 
@@ -14624,6 +14741,7 @@ function apply$1 (action) {
14624
14741
 
14625
14742
  body.classList.add('q-body--prevent-scroll');
14626
14743
  document.qScrollPrevented = true;
14744
+
14627
14745
  if (client.is.ios === true) {
14628
14746
  if (hasViewport === true) {
14629
14747
  window.scrollTo(0, 0);
@@ -14662,7 +14780,11 @@ function apply$1 (action) {
14662
14780
  body.style.left = bodyLeft;
14663
14781
  body.style.top = bodyTop;
14664
14782
 
14665
- window.scrollTo(scrollPositionX, scrollPositionY);
14783
+ // scroll back only if route has not changed
14784
+ if (window.location.href === href) {
14785
+ window.scrollTo(scrollPositionX, scrollPositionY);
14786
+ }
14787
+
14666
14788
  maxScrollTop = void 0;
14667
14789
  }
14668
14790
  }
@@ -14673,9 +14795,9 @@ function preventScroll (state) {
14673
14795
  if (state === true) {
14674
14796
  registered++;
14675
14797
 
14676
- if (closeTimer !== void 0) {
14798
+ if (closeTimer !== null) {
14677
14799
  clearTimeout(closeTimer);
14678
- closeTimer = void 0;
14800
+ closeTimer = null;
14679
14801
  return
14680
14802
  }
14681
14803
 
@@ -14697,11 +14819,10 @@ function preventScroll (state) {
14697
14819
  action = 'remove';
14698
14820
 
14699
14821
  if (client.is.ios === true && client.is.nativeMobile === true) {
14700
- clearTimeout(closeTimer);
14701
-
14822
+ closeTimer !== null && clearTimeout(closeTimer);
14702
14823
  closeTimer = setTimeout(() => {
14703
14824
  apply$1(action);
14704
- closeTimer = void 0;
14825
+ closeTimer = null;
14705
14826
  }, 100);
14706
14827
  return
14707
14828
  }
@@ -14790,12 +14911,13 @@ var QDialog = createComponent({
14790
14911
 
14791
14912
  setup (props, { slots, emit, attrs }) {
14792
14913
  const vm = getCurrentInstance();
14914
+ const { proxy: { $q } } = vm;
14793
14915
 
14794
14916
  const innerRef = ref(null);
14795
14917
  const showing = ref(false);
14796
14918
  const animating = ref(false);
14797
14919
 
14798
- let shakeTimeout, refocusTarget = null, isMaximized, avoidAutoClose;
14920
+ let shakeTimeout = null, refocusTarget = null, isMaximized, avoidAutoClose;
14799
14921
 
14800
14922
  const hideOnRouteChange = computed(() =>
14801
14923
  props.persistent !== true
@@ -14814,7 +14936,7 @@ var QDialog = createComponent({
14814
14936
  );
14815
14937
 
14816
14938
  const { showPortal, hidePortal, portalIsAccessible, renderPortal } = usePortal(
14817
- vm, innerRef, renderPortalContent, /* pls do check if on a global dialog */ true
14939
+ vm, innerRef, renderPortalContent, 'dialog'
14818
14940
  );
14819
14941
 
14820
14942
  const { hide } = useModelToggle({
@@ -14977,8 +15099,9 @@ var QDialog = createComponent({
14977
15099
  if (node !== null) {
14978
15100
  node.classList.remove('q-animate--scale');
14979
15101
  node.classList.add('q-animate--scale');
14980
- clearTimeout(shakeTimeout);
15102
+ shakeTimeout !== null && clearTimeout(shakeTimeout);
14981
15103
  shakeTimeout = setTimeout(() => {
15104
+ shakeTimeout = null;
14982
15105
  if (innerRef.value !== null) {
14983
15106
  node.classList.remove('q-animate--scale');
14984
15107
  // some platforms (like desktop Chrome)
@@ -15002,7 +15125,10 @@ var QDialog = createComponent({
15002
15125
  }
15003
15126
 
15004
15127
  function cleanup (hiding) {
15005
- clearTimeout(shakeTimeout);
15128
+ if (shakeTimeout !== null) {
15129
+ clearTimeout(shakeTimeout);
15130
+ shakeTimeout = null;
15131
+ }
15006
15132
 
15007
15133
  if (hiding === true || showing.value === true) {
15008
15134
  updateMaximized(false);
@@ -15077,7 +15203,7 @@ var QDialog = createComponent({
15077
15203
 
15078
15204
  onBeforeUnmount(cleanup);
15079
15205
 
15080
- const backdropEvt = vm.proxy.$q.platform.is.ios === true ? 'onClick' : 'onFocusin';
15206
+ const backdropEvt = $q.platform.is.ios === true || $q.platform.is.safari ? 'onClick' : 'onFocusin';
15081
15207
 
15082
15208
  function renderPortalContent () {
15083
15209
  return h('div', {
@@ -15193,7 +15319,7 @@ var QDrawer = createComponent({
15193
15319
  return emptyRenderFn
15194
15320
  }
15195
15321
 
15196
- let lastDesktopState, timerMini, layoutTotalWidthWatcher;
15322
+ let lastDesktopState, timerMini = null, layoutTotalWidthWatcher;
15197
15323
 
15198
15324
  const belowBreakpoint = ref(
15199
15325
  props.behavior === 'mobile'
@@ -15568,7 +15694,7 @@ var QDrawer = createComponent({
15568
15694
  }
15569
15695
 
15570
15696
  function animateMini () {
15571
- clearTimeout(timerMini);
15697
+ timerMini !== null && clearTimeout(timerMini);
15572
15698
 
15573
15699
  if (vm.proxy && vm.proxy.$el) {
15574
15700
  // need to speed it up and apply it immediately,
@@ -15578,6 +15704,7 @@ var QDrawer = createComponent({
15578
15704
 
15579
15705
  flagMiniAnimate.value = true;
15580
15706
  timerMini = setTimeout(() => {
15707
+ timerMini = null;
15581
15708
  flagMiniAnimate.value = false;
15582
15709
  if (vm && vm.proxy && vm.proxy.$el) {
15583
15710
  vm.proxy.$el.classList.remove('q-drawer--mini-animate');
@@ -15730,7 +15857,11 @@ var QDrawer = createComponent({
15730
15857
 
15731
15858
  onBeforeUnmount(() => {
15732
15859
  layoutTotalWidthWatcher !== void 0 && layoutTotalWidthWatcher();
15733
- clearTimeout(timerMini);
15860
+
15861
+ if (timerMini !== null) {
15862
+ clearTimeout(timerMini);
15863
+ timerMini = null;
15864
+ }
15734
15865
 
15735
15866
  showing.value === true && cleanup();
15736
15867
 
@@ -16265,7 +16396,7 @@ var QTooltip = createComponent({
16265
16396
 
16266
16397
  Object.assign(anchorEvents, { delayShow, delayHide });
16267
16398
 
16268
- const { showPortal, hidePortal, renderPortal } = usePortal(vm, innerRef, renderPortalContent);
16399
+ const { showPortal, hidePortal, renderPortal } = usePortal(vm, innerRef, renderPortalContent, 'tooltip');
16269
16400
 
16270
16401
  // if we're on mobile, let's improve the experience
16271
16402
  // by closing it when user taps outside of it
@@ -17600,15 +17731,23 @@ var QSlideTransition = createComponent({
17600
17731
 
17601
17732
  setup (props, { slots, emit }) {
17602
17733
  let animating = false, doneFn, element;
17603
- let timer, timerFallback, animListener, lastEvent;
17734
+ let timer = null, timerFallback = null, animListener, lastEvent;
17604
17735
 
17605
17736
  function cleanup () {
17606
17737
  doneFn && doneFn();
17607
17738
  doneFn = null;
17608
17739
  animating = false;
17609
17740
 
17610
- clearTimeout(timer);
17611
- clearTimeout(timerFallback);
17741
+ if (timer !== null) {
17742
+ clearTimeout(timer);
17743
+ timer = null;
17744
+ }
17745
+
17746
+ if (timerFallback !== null) {
17747
+ clearTimeout(timerFallback);
17748
+ timerFallback = null;
17749
+ }
17750
+
17612
17751
  element !== void 0 && element.removeEventListener('transitionend', animListener);
17613
17752
  animListener = null;
17614
17753
  }
@@ -17647,8 +17786,11 @@ var QSlideTransition = createComponent({
17647
17786
  begin(el, pos, done);
17648
17787
 
17649
17788
  timer = setTimeout(() => {
17789
+ timer = null;
17650
17790
  el.style.height = `${ el.scrollHeight }px`;
17651
17791
  animListener = evt => {
17792
+ timerFallback = null;
17793
+
17652
17794
  if (Object(evt) !== evt || evt.target === el) {
17653
17795
  end(el, 'show');
17654
17796
  }
@@ -17673,8 +17815,11 @@ var QSlideTransition = createComponent({
17673
17815
  begin(el, pos, done);
17674
17816
 
17675
17817
  timer = setTimeout(() => {
17818
+ timer = null;
17676
17819
  el.style.height = 0;
17677
17820
  animListener = evt => {
17821
+ timerFallback = null;
17822
+
17678
17823
  if (Object(evt) !== evt || evt.target === el) {
17679
17824
  end(el, 'hide');
17680
17825
  }
@@ -18810,7 +18955,7 @@ function useField (state) {
18810
18955
  const { props, emit, slots, attrs, proxy } = getCurrentInstance();
18811
18956
  const { $q } = proxy;
18812
18957
 
18813
- let focusoutTimer;
18958
+ let focusoutTimer = null;
18814
18959
 
18815
18960
  if (state.hasValue === void 0) {
18816
18961
  state.hasValue = computed(() => fieldValueIsFilled(props.modelValue));
@@ -18976,7 +19121,11 @@ function useField (state) {
18976
19121
  }
18977
19122
 
18978
19123
  function onControlFocusin (e) {
18979
- clearTimeout(focusoutTimer);
19124
+ if (focusoutTimer !== null) {
19125
+ clearTimeout(focusoutTimer);
19126
+ focusoutTimer = null;
19127
+ }
19128
+
18980
19129
  if (state.editable.value === true && state.focused.value === false) {
18981
19130
  state.focused.value = true;
18982
19131
  emit('focus', e);
@@ -18984,8 +19133,10 @@ function useField (state) {
18984
19133
  }
18985
19134
 
18986
19135
  function onControlFocusout (e, then) {
18987
- clearTimeout(focusoutTimer);
19136
+ focusoutTimer !== null && clearTimeout(focusoutTimer);
18988
19137
  focusoutTimer = setTimeout(() => {
19138
+ focusoutTimer = null;
19139
+
18989
19140
  if (
18990
19141
  document.hasFocus() === true && (
18991
19142
  state.hasPopupOpen === true
@@ -19235,7 +19386,7 @@ function useField (state) {
19235
19386
  });
19236
19387
 
19237
19388
  onBeforeUnmount(() => {
19238
- clearTimeout(focusoutTimer);
19389
+ focusoutTimer !== null && clearTimeout(focusoutTimer);
19239
19390
  });
19240
19391
 
19241
19392
  // expose public methods
@@ -20538,7 +20689,7 @@ var QImg = createComponent({
20538
20689
  const naturalRatio = ref(props.initialRatio);
20539
20690
  const ratioStyle = useRatio(props, naturalRatio);
20540
20691
 
20541
- let loadTimer;
20692
+ let loadTimer = null, isDestroyed = false;
20542
20693
 
20543
20694
  const images = [
20544
20695
  ref(null),
@@ -20589,7 +20740,11 @@ var QImg = createComponent({
20589
20740
  }
20590
20741
 
20591
20742
  function addImage (imgProps) {
20592
- clearTimeout(loadTimer);
20743
+ if (loadTimer !== null) {
20744
+ clearTimeout(loadTimer);
20745
+ loadTimer = null;
20746
+ }
20747
+
20593
20748
  hasError.value = false;
20594
20749
 
20595
20750
  if (imgProps === null) {
@@ -20604,10 +20759,12 @@ var QImg = createComponent({
20604
20759
  }
20605
20760
 
20606
20761
  function onLoad ({ target }) {
20607
- // if component has been already destroyed
20608
- if (loadTimer === null) { return }
20762
+ if (isDestroyed === true) { return }
20609
20763
 
20610
- clearTimeout(loadTimer);
20764
+ if (loadTimer !== null) {
20765
+ clearTimeout(loadTimer);
20766
+ loadTimer = null;
20767
+ }
20611
20768
 
20612
20769
  naturalRatio.value = target.naturalHeight === 0
20613
20770
  ? 0.5
@@ -20618,21 +20775,21 @@ var QImg = createComponent({
20618
20775
 
20619
20776
  function waitForCompleteness (target, count) {
20620
20777
  // protect against running forever
20621
- if (loadTimer === null || count === 1000) { return }
20778
+ if (isDestroyed === true || count === 1000) { return }
20622
20779
 
20623
20780
  if (target.complete === true) {
20624
20781
  onReady(target);
20625
20782
  }
20626
20783
  else {
20627
20784
  loadTimer = setTimeout(() => {
20785
+ loadTimer = null;
20628
20786
  waitForCompleteness(target, count + 1);
20629
20787
  }, 50);
20630
20788
  }
20631
20789
  }
20632
20790
 
20633
20791
  function onReady (img) {
20634
- // if component has been already destroyed
20635
- if (loadTimer === null) { return }
20792
+ if (isDestroyed === true) { return }
20636
20793
 
20637
20794
  position.value = position.value ^ 1;
20638
20795
  images[ position.value ].value = null;
@@ -20642,7 +20799,11 @@ var QImg = createComponent({
20642
20799
  }
20643
20800
 
20644
20801
  function onError (err) {
20645
- clearTimeout(loadTimer);
20802
+ if (loadTimer !== null) {
20803
+ clearTimeout(loadTimer);
20804
+ loadTimer = null;
20805
+ }
20806
+
20646
20807
  isLoading.value = false;
20647
20808
  hasError.value = true;
20648
20809
  images[ position.value ].value = null;
@@ -20722,8 +20883,12 @@ var QImg = createComponent({
20722
20883
  }
20723
20884
 
20724
20885
  onBeforeUnmount(() => {
20725
- clearTimeout(loadTimer);
20726
- loadTimer = null;
20886
+ isDestroyed = true;
20887
+
20888
+ if (loadTimer !== null) {
20889
+ clearTimeout(loadTimer);
20890
+ loadTimer = null;
20891
+ }
20727
20892
  });
20728
20893
  }
20729
20894
 
@@ -20792,6 +20957,7 @@ var QInfiniteScroll = createComponent({
20792
20957
  const isFetching = ref(false);
20793
20958
  const isWorking = ref(true);
20794
20959
  const rootRef = ref(null);
20960
+ const loadingRef = ref(null);
20795
20961
 
20796
20962
  let index = props.initialIndex || 0;
20797
20963
  let localScrollTarget, poll;
@@ -20923,12 +21089,32 @@ var QInfiniteScroll = createComponent({
20923
21089
  }
20924
21090
  }
20925
21091
 
21092
+ function updateSvgAnimations (isRetry) {
21093
+ if (renderLoadingSlot.value === true) {
21094
+ if (loadingRef.value === null) {
21095
+ isRetry !== true && nextTick(() => { updateSvgAnimations(true); });
21096
+ return
21097
+ }
21098
+
21099
+ // we need to pause svg animations (if any) when hiding
21100
+ // otherwise the browser will keep on recalculating the style
21101
+ const action = `${ isFetching.value === true ? 'un' : '' }pauseAnimations`;
21102
+ Array.from(loadingRef.value.getElementsByTagName('svg')).forEach(el => {
21103
+ el[ action ]();
21104
+ });
21105
+ }
21106
+ }
21107
+
21108
+ const renderLoadingSlot = computed(() => props.disable !== true && isWorking.value === true);
21109
+
21110
+ watch([ isFetching, renderLoadingSlot ], () => { updateSvgAnimations(); });
21111
+
20926
21112
  watch(() => props.disable, val => {
20927
21113
  if (val === true) { stop(); }
20928
21114
  else { resume(); }
20929
21115
  });
20930
21116
 
20931
- watch(() => props.reverse, val => {
21117
+ watch(() => props.reverse, () => {
20932
21118
  if (isFetching.value === false && isWorking.value === true) {
20933
21119
  immediatePoll();
20934
21120
  }
@@ -20959,8 +21145,9 @@ var QInfiniteScroll = createComponent({
20959
21145
 
20960
21146
  onMounted(() => {
20961
21147
  setDebounce(props.debounce);
20962
-
20963
21148
  updateScrollTarget();
21149
+
21150
+ isFetching.value === false && updateSvgAnimations();
20964
21151
  });
20965
21152
 
20966
21153
  // expose public methods
@@ -20973,9 +21160,9 @@ var QInfiniteScroll = createComponent({
20973
21160
  return () => {
20974
21161
  const child = hUniqueSlot(slots.default, []);
20975
21162
 
20976
- if (props.disable !== true && isWorking.value === true) {
21163
+ if (renderLoadingSlot.value === true) {
20977
21164
  child[ props.reverse === false ? 'push' : 'unshift' ](
20978
- h('div', { class: classes.value }, hSlot(slots.loading))
21165
+ h('div', { ref: loadingRef, class: classes.value }, hSlot(slots.loading))
20979
21166
  );
20980
21167
  }
20981
21168
 
@@ -21667,7 +21854,7 @@ var QInput = createComponent({
21667
21854
  const { $q } = proxy;
21668
21855
 
21669
21856
  const temp = {};
21670
- let emitCachedValue = NaN, typedNumber, stopValueWatcher, emitTimer, emitValueFn;
21857
+ let emitCachedValue = NaN, typedNumber, stopValueWatcher, emitTimer = null, emitValueFn;
21671
21858
 
21672
21859
  const inputRef = ref(null);
21673
21860
  const nameProp = useFormInputNameAttr(props);
@@ -21879,6 +22066,8 @@ var QInput = createComponent({
21879
22066
 
21880
22067
  function emitValue (val, stopWatcher) {
21881
22068
  emitValueFn = () => {
22069
+ emitTimer = null;
22070
+
21882
22071
  if (
21883
22072
  props.type !== 'number'
21884
22073
  && temp.hasOwnProperty('value') === true
@@ -21906,7 +22095,7 @@ var QInput = createComponent({
21906
22095
  }
21907
22096
 
21908
22097
  if (props.debounce !== void 0) {
21909
- clearTimeout(emitTimer);
22098
+ emitTimer !== null && clearTimeout(emitTimer);
21910
22099
  temp.value = val;
21911
22100
  emitTimer = setTimeout(emitValueFn, props.debounce);
21912
22101
  }
@@ -21940,7 +22129,11 @@ var QInput = createComponent({
21940
22129
  function onChange (e) {
21941
22130
  onComposition(e);
21942
22131
 
21943
- clearTimeout(emitTimer);
22132
+ if (emitTimer !== null) {
22133
+ clearTimeout(emitTimer);
22134
+ emitTimer = null;
22135
+ }
22136
+
21944
22137
  emitValueFn !== void 0 && emitValueFn();
21945
22138
 
21946
22139
  emit('change', e.target.value);
@@ -21949,7 +22142,11 @@ var QInput = createComponent({
21949
22142
  function onFinishEditing (e) {
21950
22143
  e !== void 0 && stop(e);
21951
22144
 
21952
- clearTimeout(emitTimer);
22145
+ if (emitTimer !== null) {
22146
+ clearTimeout(emitTimer);
22147
+ emitTimer = null;
22148
+ }
22149
+
21953
22150
  emitValueFn !== void 0 && emitValueFn();
21954
22151
 
21955
22152
  typedNumber = false;
@@ -22793,7 +22990,7 @@ var QLayout = createComponent({
22793
22990
  }
22794
22991
  }
22795
22992
 
22796
- let timer;
22993
+ let animateTimer = null;
22797
22994
 
22798
22995
  const $layout = {
22799
22996
  instances: {},
@@ -22824,16 +23021,16 @@ var QLayout = createComponent({
22824
23021
  scroll,
22825
23022
 
22826
23023
  animate () {
22827
- if (timer !== void 0) {
22828
- clearTimeout(timer);
23024
+ if (animateTimer !== null) {
23025
+ clearTimeout(animateTimer);
22829
23026
  }
22830
23027
  else {
22831
23028
  document.body.classList.add('q-body--layout-animate');
22832
23029
  }
22833
23030
 
22834
- timer = setTimeout(() => {
23031
+ animateTimer = setTimeout(() => {
23032
+ animateTimer = null;
22835
23033
  document.body.classList.remove('q-body--layout-animate');
22836
- timer = void 0;
22837
23034
  }, 155);
22838
23035
  },
22839
23036
 
@@ -24901,6 +25098,8 @@ var QPullToRefresh = createComponent({
24901
25098
  });
24902
25099
  }
24903
25100
 
25101
+ let $el, localScrollTarget, timer = null;
25102
+
24904
25103
  function animateTo ({ pos, ratio }, done) {
24905
25104
  animating.value = true;
24906
25105
  pullPosition.value = pos;
@@ -24909,15 +25108,14 @@ var QPullToRefresh = createComponent({
24909
25108
  pullRatio.value = ratio;
24910
25109
  }
24911
25110
 
24912
- clearTimeout(timer);
25111
+ timer !== null && clearTimeout(timer);
24913
25112
  timer = setTimeout(() => {
25113
+ timer = null;
24914
25114
  animating.value = false;
24915
25115
  done && done();
24916
25116
  }, 300);
24917
25117
  }
24918
25118
 
24919
- let $el, localScrollTarget, timer;
24920
-
24921
25119
  function updateScrollTarget () {
24922
25120
  localScrollTarget = getScrollTarget($el, props.scrollTarget);
24923
25121
  }
@@ -24930,7 +25128,7 @@ var QPullToRefresh = createComponent({
24930
25128
  });
24931
25129
 
24932
25130
  onBeforeUnmount(() => {
24933
- clearTimeout(timer);
25131
+ timer !== null && clearTimeout(timer);
24934
25132
  });
24935
25133
 
24936
25134
  // expose public methods
@@ -25562,13 +25760,13 @@ var QRating = createComponent({
25562
25760
  case 37: // LEFT ARROW
25563
25761
  case 40: // DOWN ARROW
25564
25762
  if (iconRefs[ `rt${ i - 1 }` ]) {
25565
- iconRefs[ `rt${ i - 1 }` ].$el.focus();
25763
+ iconRefs[ `rt${ i - 1 }` ].focus();
25566
25764
  }
25567
25765
  return stopAndPrevent(e)
25568
25766
  case 39: // RIGHT ARROW
25569
25767
  case 38: // UP ARROW
25570
25768
  if (iconRefs[ `rt${ i + 1 }` ]) {
25571
- iconRefs[ `rt${ i + 1 }` ].$el.focus();
25769
+ iconRefs[ `rt${ i + 1 }` ].focus();
25572
25770
  }
25573
25771
  return stopAndPrevent(e)
25574
25772
  }
@@ -25591,7 +25789,7 @@ var QRating = createComponent({
25591
25789
  child.push(
25592
25790
  h('div', {
25593
25791
  key: i,
25594
- ref: vm => { iconRefs[ `rt${ i }` ] = vm; },
25792
+ ref: el => { iconRefs[ `rt${ i }` ] = el; },
25595
25793
  class: 'q-rating__icon-container flex flex-center',
25596
25794
  ...attrs,
25597
25795
  onClick () { set(i); },
@@ -25719,7 +25917,7 @@ var QScrollArea = createComponent({
25719
25917
 
25720
25918
  const isDark = useDark(props, proxy.$q);
25721
25919
 
25722
- let timer, panRefPos;
25920
+ let timer = null, panRefPos;
25723
25921
 
25724
25922
  const targetRef = ref(null);
25725
25923
 
@@ -25968,14 +26166,14 @@ var QScrollArea = createComponent({
25968
26166
  }
25969
26167
 
25970
26168
  function startTimer () {
25971
- if (tempShowing.value === true) {
25972
- clearTimeout(timer);
25973
- }
25974
- else {
25975
- tempShowing.value = true;
25976
- }
26169
+ tempShowing.value = true;
26170
+
26171
+ timer !== null && clearTimeout(timer);
26172
+ timer = setTimeout(() => {
26173
+ timer = null;
26174
+ tempShowing.value = false;
26175
+ }, props.delay);
25977
26176
 
25978
- timer = setTimeout(() => { tempShowing.value = false; }, props.delay);
25979
26177
  props.onScroll !== void 0 && emitScroll();
25980
26178
  }
25981
26179
 
@@ -26136,12 +26334,16 @@ const setOverflowAnchor = __QUASAR_SSR__ || window.getComputedStyle(document.bod
26136
26334
  return
26137
26335
  }
26138
26336
 
26139
- cancelAnimationFrame(contentEl._qOverflowAnimationFrame);
26337
+ if (contentEl._qOverflowAnimationFrame !== void 0) {
26338
+ cancelAnimationFrame(contentEl._qOverflowAnimationFrame);
26339
+ }
26340
+
26140
26341
  contentEl._qOverflowAnimationFrame = requestAnimationFrame(() => {
26141
26342
  if (contentEl === null) {
26142
26343
  return
26143
26344
  }
26144
26345
 
26346
+ contentEl._qOverflowAnimationFrame = void 0;
26145
26347
  const children = contentEl.children || [];
26146
26348
 
26147
26349
  filterProto
@@ -26977,8 +27179,8 @@ var QSelect = createComponent({
26977
27179
  const dialogFieldFocused = ref(false);
26978
27180
  const innerLoadingIndicator = ref(false);
26979
27181
 
26980
- let inputTimer, innerValueCache,
26981
- hasDialog, userInputValue, filterId, defaultInputValue,
27182
+ let inputTimer = null, innerValueCache,
27183
+ hasDialog, userInputValue, filterId = null, defaultInputValue,
26982
27184
  transitionShowComputed, searchBuffer, searchBufferExp;
26983
27185
 
26984
27186
  const inputRef = ref(null);
@@ -27484,7 +27686,12 @@ var QSelect = createComponent({
27484
27686
  }
27485
27687
 
27486
27688
  e.target.value = '';
27487
- clearTimeout(inputTimer);
27689
+
27690
+ if (inputTimer !== null) {
27691
+ clearTimeout(inputTimer);
27692
+ inputTimer = null;
27693
+ }
27694
+
27488
27695
  resetInputValue();
27489
27696
 
27490
27697
  if (typeof value === 'string' && value.length > 0) {
@@ -27849,7 +28056,10 @@ var QSelect = createComponent({
27849
28056
  }
27850
28057
 
27851
28058
  function onInput (e) {
27852
- clearTimeout(inputTimer);
28059
+ if (inputTimer !== null) {
28060
+ clearTimeout(inputTimer);
28061
+ inputTimer = null;
28062
+ }
27853
28063
 
27854
28064
  if (e && e.target && e.target.qComposing === true) {
27855
28065
  return
@@ -27870,6 +28080,7 @@ var QSelect = createComponent({
27870
28080
 
27871
28081
  if (props.onFilter !== void 0) {
27872
28082
  inputTimer = setTimeout(() => {
28083
+ inputTimer = null;
27873
28084
  filter(inputValue.value);
27874
28085
  }, props.inputDebounce);
27875
28086
  }
@@ -27923,7 +28134,7 @@ var QSelect = createComponent({
27923
28134
  menu.value === true && (menu.value = false);
27924
28135
  }, 10);
27925
28136
 
27926
- clearTimeout(filterId);
28137
+ filterId !== null && clearTimeout(filterId);
27927
28138
  filterId = localFilterId;
27928
28139
 
27929
28140
  emit(
@@ -28115,8 +28326,10 @@ var QSelect = createComponent({
28115
28326
  }
28116
28327
 
28117
28328
  if (state.focused.value === false) {
28118
- clearTimeout(filterId);
28119
- filterId = void 0;
28329
+ if (filterId !== null) {
28330
+ clearTimeout(filterId);
28331
+ filterId = null;
28332
+ }
28120
28333
 
28121
28334
  if (state.innerLoading.value === true) {
28122
28335
  emit('filterAbort');
@@ -28237,7 +28450,7 @@ var QSelect = createComponent({
28237
28450
  updatePreState();
28238
28451
 
28239
28452
  onBeforeUnmount(() => {
28240
- clearTimeout(inputTimer);
28453
+ inputTimer !== null && clearTimeout(inputTimer);
28241
28454
  });
28242
28455
 
28243
28456
  // expose public methods
@@ -28497,7 +28710,7 @@ var QSlideItem = createComponent({
28497
28710
 
28498
28711
  const contentRef = ref(null);
28499
28712
 
28500
- let timer, pan = {}, dirRefs = {}, dirContentRefs = {};
28713
+ let timer = null, pan = {}, dirRefs = {}, dirContentRefs = {};
28501
28714
 
28502
28715
  const langDir = computed(() => (
28503
28716
  $q.lang.rtl === true
@@ -28548,7 +28761,9 @@ var QSlideItem = createComponent({
28548
28761
  if (pan.scale === 1) {
28549
28762
  node.style.transform = `translate${ pan.axis }(${ pan.dir * 100 }%)`;
28550
28763
 
28764
+ timer !== null && clearTimeout(timer);
28551
28765
  timer = setTimeout(() => {
28766
+ timer = null;
28552
28767
  emit(pan.showing, { reset });
28553
28768
  emit('action', { side: pan.showing, reset });
28554
28769
  }, 230);
@@ -28619,7 +28834,7 @@ var QSlideItem = createComponent({
28619
28834
  });
28620
28835
 
28621
28836
  onBeforeUnmount(() => {
28622
- clearTimeout(timer);
28837
+ timer !== null && clearTimeout(timer);
28623
28838
  });
28624
28839
 
28625
28840
  // expose public methods
@@ -36854,12 +37069,11 @@ function morph (_options) {
36854
37069
  : (
36855
37070
  options.waitFor === 'transitionend'
36856
37071
  ? new Promise(resolve => {
36857
- const timer = setTimeout(() => {
36858
- endFn();
36859
- }, 400);
36860
-
36861
- const endFn = ev => {
36862
- clearTimeout(timer);
37072
+ const endFn = () => {
37073
+ if (timer !== null) {
37074
+ clearTimeout(timer);
37075
+ timer = null;
37076
+ }
36863
37077
 
36864
37078
  if (elTo) {
36865
37079
  elTo.removeEventListener('transitionend', endFn);
@@ -36869,6 +37083,8 @@ function morph (_options) {
36869
37083
  resolve();
36870
37084
  };
36871
37085
 
37086
+ let timer = setTimeout(endFn, 400);
37087
+
36872
37088
  elTo.addEventListener('transitionend', endFn);
36873
37089
  elTo.addEventListener('transitioncancel', endFn);
36874
37090
  })
@@ -37337,6 +37553,7 @@ var TouchHold = createDirective({
37337
37553
  : ctx.touchSensitivity;
37338
37554
 
37339
37555
  ctx.timer = setTimeout(() => {
37556
+ ctx.timer = void 0;
37340
37557
  clearSelection();
37341
37558
  ctx.triggered = true;
37342
37559
 
@@ -37353,10 +37570,13 @@ var TouchHold = createDirective({
37353
37570
  move (evt) {
37354
37571
  const { top, left } = position(evt);
37355
37572
  if (
37356
- Math.abs(left - ctx.origin.left) >= ctx.sensitivity
37357
- || Math.abs(top - ctx.origin.top) >= ctx.sensitivity
37573
+ ctx.timer !== void 0 && (
37574
+ Math.abs(left - ctx.origin.left) >= ctx.sensitivity
37575
+ || Math.abs(top - ctx.origin.top) >= ctx.sensitivity
37576
+ )
37358
37577
  ) {
37359
37578
  clearTimeout(ctx.timer);
37579
+ ctx.timer = void 0;
37360
37580
  }
37361
37581
  },
37362
37582
 
@@ -37369,8 +37589,9 @@ var TouchHold = createDirective({
37369
37589
  if (ctx.triggered === true) {
37370
37590
  evt !== void 0 && stopAndPrevent(evt);
37371
37591
  }
37372
- else {
37592
+ else if (ctx.timer !== void 0) {
37373
37593
  clearTimeout(ctx.timer);
37594
+ ctx.timer = void 0;
37374
37595
  }
37375
37596
  }
37376
37597
  };
@@ -37422,7 +37643,7 @@ var TouchHold = createDirective({
37422
37643
  cleanEvt(ctx, 'main');
37423
37644
  cleanEvt(ctx, 'temp');
37424
37645
 
37425
- clearTimeout(ctx.timer);
37646
+ ctx.timer !== void 0 && clearTimeout(ctx.timer);
37426
37647
  ctx.styleCleanup !== void 0 && ctx.styleCleanup();
37427
37648
 
37428
37649
  delete el.__qtouchhold;
@@ -37561,6 +37782,8 @@ var TouchRepeat = createDirective({
37561
37782
  };
37562
37783
 
37563
37784
  const fn = () => {
37785
+ ctx.timer = void 0;
37786
+
37564
37787
  if (ctx.event === void 0) {
37565
37788
  return
37566
37789
  }
@@ -37604,8 +37827,9 @@ var TouchRepeat = createDirective({
37604
37827
  },
37605
37828
 
37606
37829
  move (evt) {
37607
- if (ctx.event !== void 0 && shouldEnd(evt, ctx.origin) === true) {
37830
+ if (ctx.event !== void 0 && ctx.timer !== void 0 && shouldEnd(evt, ctx.origin) === true) {
37608
37831
  clearTimeout(ctx.timer);
37832
+ ctx.timer = void 0;
37609
37833
  }
37610
37834
  },
37611
37835
 
@@ -37618,7 +37842,11 @@ var TouchRepeat = createDirective({
37618
37842
  evt !== void 0 && ctx.event.repeatCount > 0 && stopAndPrevent(evt);
37619
37843
 
37620
37844
  cleanEvt(ctx, 'temp');
37621
- clearTimeout(ctx.timer);
37845
+
37846
+ if (ctx.timer !== void 0) {
37847
+ clearTimeout(ctx.timer);
37848
+ ctx.timer = void 0;
37849
+ }
37622
37850
 
37623
37851
  ctx.event = void 0;
37624
37852
  }
@@ -37667,7 +37895,7 @@ var TouchRepeat = createDirective({
37667
37895
  const ctx = el.__qtouchrepeat;
37668
37896
 
37669
37897
  if (ctx !== void 0) {
37670
- clearTimeout(ctx.timer);
37898
+ ctx.timer !== void 0 && clearTimeout(ctx.timer);
37671
37899
 
37672
37900
  cleanEvt(ctx, 'main');
37673
37901
  cleanEvt(ctx, 'temp');
@@ -38116,7 +38344,7 @@ function globalDialog (DefaultComponent, supportsCustomComponent, parentApp) {
38116
38344
 
38117
38345
  let vm, emittedOK = false;
38118
38346
  const dialogRef = ref(null);
38119
- const el = createGlobalNode();
38347
+ const el = createGlobalNode(false, 'dialog');
38120
38348
 
38121
38349
  const applyState = cmd => {
38122
38350
  if (dialogRef.value !== null && dialogRef.value[ cmd ] !== void 0) {
@@ -38824,7 +39052,7 @@ let
38824
39052
  app,
38825
39053
  vm,
38826
39054
  uid$1 = 0,
38827
- timeout,
39055
+ timeout = null,
38828
39056
  props = {},
38829
39057
  activeGroups = {};
38830
39058
 
@@ -38873,14 +39101,14 @@ const Plugin$2 = defineReactivePlugin({
38873
39101
  }
38874
39102
  else {
38875
39103
  props.uid = ++uid$1;
38876
- clearTimeout(timeout);
39104
+ timeout !== null && clearTimeout(timeout);
38877
39105
 
38878
39106
  timeout = setTimeout(() => {
38879
- timeout = void 0;
39107
+ timeout = null;
38880
39108
 
38881
39109
  const el = createGlobalNode('q-loading');
38882
39110
 
38883
- app = createApp({
39111
+ app = createChildApp({
38884
39112
  name: 'QLoading',
38885
39113
 
38886
39114
  setup () {
@@ -38942,7 +39170,7 @@ const Plugin$2 = defineReactivePlugin({
38942
39170
  onAfterLeave
38943
39171
  }, getContent)
38944
39172
  }
38945
- });
39173
+ }, Plugin$2.__parentApp);
38946
39174
 
38947
39175
  vm = app.mount(el);
38948
39176
  }, props.delay);
@@ -38986,9 +39214,9 @@ const Plugin$2 = defineReactivePlugin({
38986
39214
  }
38987
39215
  }
38988
39216
 
38989
- if (timeout !== void 0) {
39217
+ if (timeout !== null) {
38990
39218
  clearTimeout(timeout);
38991
- timeout = void 0;
39219
+ timeout = null;
38992
39220
  }
38993
39221
 
38994
39222
  Plugin$2.isActive = false;
@@ -39001,16 +39229,20 @@ const Plugin$2 = defineReactivePlugin({
39001
39229
  }
39002
39230
  },
39003
39231
 
39004
- install ({ $q }) {
39232
+ install ({ $q, parentApp }) {
39005
39233
  $q.loading = this;
39006
39234
 
39007
- if ($q.config.loading !== void 0) {
39008
- this.setDefaults($q.config.loading);
39235
+ {
39236
+ Plugin$2.__parentApp = parentApp;
39237
+
39238
+ if ($q.config.loading !== void 0) {
39239
+ this.setDefaults($q.config.loading);
39240
+ }
39009
39241
  }
39010
39242
  }
39011
39243
  });
39012
39244
 
39013
- let updateId, currentClientMeta;
39245
+ let updateId = null, currentClientMeta;
39014
39246
  const clientList = [];
39015
39247
 
39016
39248
  function normalize (meta) {
@@ -39144,6 +39376,8 @@ function apply ({ add, remove }) {
39144
39376
  }
39145
39377
 
39146
39378
  function updateClientMeta () {
39379
+ updateId = null;
39380
+
39147
39381
  const data = {
39148
39382
  title: '',
39149
39383
  titleTemplate: null,
@@ -39169,7 +39403,7 @@ function updateClientMeta () {
39169
39403
  }
39170
39404
 
39171
39405
  function planClientUpdate () {
39172
- clearTimeout(updateId);
39406
+ updateId !== null && clearTimeout(updateId);
39173
39407
  updateId = setTimeout(updateClientMeta, 50);
39174
39408
  }
39175
39409
 
@@ -39396,7 +39630,10 @@ function addNotification (config, $q, originalApi) {
39396
39630
 
39397
39631
  if (originalApi !== void 0) {
39398
39632
  // reset timeout if any
39399
- clearTimeout(originalApi.notif.meta.timer);
39633
+ if (originalApi.notif.meta.timer) {
39634
+ clearTimeout(originalApi.notif.meta.timer);
39635
+ originalApi.notif.meta.timer = void 0;
39636
+ }
39400
39637
 
39401
39638
  // retain uid
39402
39639
  notif.meta.uid = originalApi.notif.meta.uid;
@@ -39432,7 +39669,10 @@ function addNotification (config, $q, originalApi) {
39432
39669
  // ok, so it's NOT a new one
39433
39670
  else {
39434
39671
  // reset timeout if any
39435
- clearTimeout(original.meta.timer);
39672
+ if (original.meta.timer) {
39673
+ clearTimeout(original.meta.timer);
39674
+ original.meta.timer = void 0;
39675
+ }
39436
39676
 
39437
39677
  if (notif.badgePosition !== void 0) {
39438
39678
  if (badgePositions.includes(notif.badgePosition) === false) {
@@ -39462,6 +39702,7 @@ function addNotification (config, $q, originalApi) {
39462
39702
 
39463
39703
  if (notif.timeout > 0) {
39464
39704
  notif.meta.timer = setTimeout(() => {
39705
+ notif.meta.timer = void 0;
39465
39706
  dismiss();
39466
39707
  }, notif.timeout + /* show duration */ 1000);
39467
39708
  }
@@ -39510,7 +39751,10 @@ function addNotification (config, $q, originalApi) {
39510
39751
  }
39511
39752
 
39512
39753
  function removeNotification (notif) {
39513
- clearTimeout(notif.meta.timer);
39754
+ if (notif.meta.timer) {
39755
+ clearTimeout(notif.meta.timer);
39756
+ notif.meta.timer = void 0;
39757
+ }
39514
39758
 
39515
39759
  const index = notificationsList[ notif.position ].value.indexOf(notif);
39516
39760
  if (index !== -1) {
@@ -39949,6 +40193,9 @@ function fallback (text) {
39949
40193
  area.contentEditable = 'true';
39950
40194
  area.style.position = 'fixed'; // avoid scrolling to bottom
39951
40195
 
40196
+ const fn = () => {};
40197
+ addFocusout(fn);
40198
+
39952
40199
  document.body.appendChild(area);
39953
40200
  area.focus();
39954
40201
  area.select();
@@ -39956,6 +40203,8 @@ function fallback (text) {
39956
40203
  const res = document.execCommand('copy');
39957
40204
 
39958
40205
  area.remove();
40206
+ removeFocusout(fn);
40207
+
39959
40208
  return res
39960
40209
  }
39961
40210
 
@@ -40340,7 +40589,7 @@ function runSequentialPromises (
40340
40589
  */
40341
40590
 
40342
40591
  const Quasar = {
40343
- version: '2.11.3',
40592
+ version: '2.11.5',
40344
40593
  install: installQuasar,
40345
40594
  lang: Plugin$8,
40346
40595
  iconSet: Plugin$7