bitboss-ui 2.0.0 → 2.0.2

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 (170) hide show
  1. package/dist/components/BbTable/BbTable.vue.d.ts +3 -0
  2. package/dist/index105.js +5 -5
  3. package/dist/index105.js.map +1 -1
  4. package/dist/index113.js +1 -1
  5. package/dist/index115.js +2 -2
  6. package/dist/index117.js +1 -1
  7. package/dist/index12.js +1 -1
  8. package/dist/index121.js +1 -1
  9. package/dist/index122.js +1 -1
  10. package/dist/index123.js +1 -1
  11. package/dist/index128.js +1 -1
  12. package/dist/index14.js +3 -3
  13. package/dist/index16.js +2 -2
  14. package/dist/index18.js +8 -8
  15. package/dist/index199.js +158 -3
  16. package/dist/index199.js.map +1 -1
  17. package/dist/index20.js +5 -5
  18. package/dist/index200.js +84 -3
  19. package/dist/index200.js.map +1 -1
  20. package/dist/index202.js +3 -6
  21. package/dist/index202.js.map +1 -1
  22. package/dist/index203.js +35 -7
  23. package/dist/index203.js.map +1 -1
  24. package/dist/index204.js +5 -4
  25. package/dist/index204.js.map +1 -1
  26. package/dist/index205.js +7 -2
  27. package/dist/index205.js.map +1 -1
  28. package/dist/index206.js +5 -4
  29. package/dist/index206.js.map +1 -1
  30. package/dist/index207.js +5 -2
  31. package/dist/index207.js.map +1 -1
  32. package/dist/index208.js +14 -279
  33. package/dist/index208.js.map +1 -1
  34. package/dist/index209.js +10 -10
  35. package/dist/index209.js.map +1 -1
  36. package/dist/index210.js +18 -15
  37. package/dist/index210.js.map +1 -1
  38. package/dist/index211.js +18 -18
  39. package/dist/index211.js.map +1 -1
  40. package/dist/index212.js +22 -14
  41. package/dist/index212.js.map +1 -1
  42. package/dist/index213.js +8 -27
  43. package/dist/index213.js.map +1 -1
  44. package/dist/index214.js +2 -8
  45. package/dist/index214.js.map +1 -1
  46. package/dist/index215.js +2 -2
  47. package/dist/index215.js.map +1 -1
  48. package/dist/index216.js +4 -158
  49. package/dist/index216.js.map +1 -1
  50. package/dist/index217.js +2 -84
  51. package/dist/index217.js.map +1 -1
  52. package/dist/index218.js +6 -0
  53. package/dist/index218.js.map +1 -0
  54. package/dist/index219.js +2 -2
  55. package/dist/index22.js +5 -5
  56. package/dist/index220.js +2 -2
  57. package/dist/index223.js +1 -1
  58. package/dist/index225.js +1 -1
  59. package/dist/index226.js +3 -3
  60. package/dist/index234.js +1 -1
  61. package/dist/index237.js +3 -224
  62. package/dist/index237.js.map +1 -1
  63. package/dist/index238.js +11 -8
  64. package/dist/index238.js.map +1 -1
  65. package/dist/index239.js +9 -23
  66. package/dist/index239.js.map +1 -1
  67. package/dist/index24.js +1 -1
  68. package/dist/index240.js +9 -431
  69. package/dist/index240.js.map +1 -1
  70. package/dist/index241.js +15 -87
  71. package/dist/index241.js.map +1 -1
  72. package/dist/index242.js +431 -6
  73. package/dist/index242.js.map +1 -1
  74. package/dist/index243.js +89 -16
  75. package/dist/index243.js.map +1 -1
  76. package/dist/index244.js +199 -3
  77. package/dist/index244.js.map +1 -1
  78. package/dist/index245.js +7 -198
  79. package/dist/index245.js.map +1 -1
  80. package/dist/index246.js +23 -6
  81. package/dist/index246.js.map +1 -1
  82. package/dist/index247.js +6 -2
  83. package/dist/index247.js.map +1 -1
  84. package/dist/index248.js +16 -2
  85. package/dist/index248.js.map +1 -1
  86. package/dist/index249.js +9 -2
  87. package/dist/index249.js.map +1 -1
  88. package/dist/index250.js +281 -2
  89. package/dist/index250.js.map +1 -1
  90. package/dist/index251.js +6 -2
  91. package/dist/index251.js.map +1 -1
  92. package/dist/index252.js +2 -2
  93. package/dist/index253.js +2 -3
  94. package/dist/index253.js.map +1 -1
  95. package/dist/index254.js +2 -12
  96. package/dist/index254.js.map +1 -1
  97. package/dist/index255.js +2 -9
  98. package/dist/index255.js.map +1 -1
  99. package/dist/index256.js +2 -9
  100. package/dist/index256.js.map +1 -1
  101. package/dist/index257.js +2 -17
  102. package/dist/index257.js.map +1 -1
  103. package/dist/index258.js +4 -9
  104. package/dist/index258.js.map +1 -1
  105. package/dist/index259.js +224 -2
  106. package/dist/index259.js.map +1 -1
  107. package/dist/index260.js +3 -126
  108. package/dist/index260.js.map +1 -1
  109. package/dist/index262.js +10 -0
  110. package/dist/index262.js.map +1 -0
  111. package/dist/index263.js +2 -7
  112. package/dist/index263.js.map +1 -1
  113. package/dist/index264.js +69 -2
  114. package/dist/index264.js.map +1 -1
  115. package/dist/index265.js +5 -69
  116. package/dist/index265.js.map +1 -1
  117. package/dist/index266.js +2 -436
  118. package/dist/index266.js.map +1 -1
  119. package/dist/index267.js +120 -121
  120. package/dist/index267.js.map +1 -1
  121. package/dist/index270.js +1 -1
  122. package/dist/index272.js +431 -23
  123. package/dist/index272.js.map +1 -1
  124. package/dist/index273.js +127 -5
  125. package/dist/index273.js.map +1 -1
  126. package/dist/index274.js +26 -13
  127. package/dist/index274.js.map +1 -1
  128. package/dist/index275.js +15 -4
  129. package/dist/index275.js.map +1 -1
  130. package/dist/index276.js +11 -4
  131. package/dist/index276.js.map +1 -1
  132. package/dist/index277.js +4 -59
  133. package/dist/index277.js.map +1 -1
  134. package/dist/index278.js +4 -11
  135. package/dist/index278.js.map +1 -1
  136. package/dist/index279.js +58 -34
  137. package/dist/index279.js.map +1 -1
  138. package/dist/index28.js +2 -2
  139. package/dist/index280.js +34 -46
  140. package/dist/index280.js.map +1 -1
  141. package/dist/index281.js +1 -1
  142. package/dist/index282.js +50 -0
  143. package/dist/index282.js.map +1 -0
  144. package/dist/index284.js +416 -42
  145. package/dist/index284.js.map +1 -1
  146. package/dist/index285.js +50 -0
  147. package/dist/index285.js.map +1 -0
  148. package/dist/index30.js +2 -2
  149. package/dist/index32.js +2 -2
  150. package/dist/index34.js +38 -37
  151. package/dist/index34.js.map +1 -1
  152. package/dist/index36.js +1 -1
  153. package/dist/index38.js +2 -2
  154. package/dist/index40.js +2 -2
  155. package/dist/index42.js +2 -2
  156. package/dist/index52.js +1 -1
  157. package/dist/index54.js +1 -1
  158. package/dist/index70.js +2 -2
  159. package/dist/index74.js +2 -2
  160. package/dist/index76.js +1 -1
  161. package/dist/index79.js +2 -2
  162. package/dist/index81.js +1 -1
  163. package/dist/index83.js +1 -1
  164. package/package.json +1 -1
  165. package/dist/index201.js +0 -38
  166. package/dist/index201.js.map +0 -1
  167. package/dist/index261.js +0 -6
  168. package/dist/index261.js.map +0 -1
  169. package/dist/index283.js +0 -424
  170. package/dist/index283.js.map +0 -1
package/dist/index241.js CHANGED
@@ -1,92 +1,20 @@
1
- import { getDefaultExportFromCjs as M, commonjsGlobal as b } from "./index246.js";
2
- var k = "Expected a function", E = NaN, N = "[object Symbol]", $ = /^\s+|\s+$/g, A = /^[-+]0x[0-9a-f]+$/i, B = /^0b[01]+$/i, R = /^0o[0-7]+$/i, _ = parseInt, D = typeof b == "object" && b && b.Object === Object && b, G = typeof self == "object" && self && self.Object === Object && self, P = D || G || Function("return this")(), H = Object.prototype, U = H.toString, X = Math.max, q = Math.min, v = function() {
3
- return P.Date.now();
4
- };
5
- function z(e, n, r) {
6
- var f, a, m, u, i, c, s = 0, x = !1, l = !1, j = !0;
7
- if (typeof e != "function")
8
- throw new TypeError(k);
9
- n = S(n) || 0, y(r) && (x = !!r.leading, l = "maxWait" in r, m = l ? X(S(r.maxWait) || 0, n) : m, j = "trailing" in r ? !!r.trailing : j);
10
- function p(t) {
11
- var o = f, d = a;
12
- return f = a = void 0, s = t, u = e.apply(d, o), u;
13
- }
14
- function C(t) {
15
- return s = t, i = setTimeout(g, n), x ? p(t) : u;
16
- }
17
- function L(t) {
18
- var o = t - c, d = t - s, O = n - o;
19
- return l ? q(O, m - d) : O;
20
- }
21
- function h(t) {
22
- var o = t - c, d = t - s;
23
- return c === void 0 || o >= n || o < 0 || l && d >= m;
24
- }
25
- function g() {
26
- var t = v();
27
- if (h(t))
28
- return I(t);
29
- i = setTimeout(g, L(t));
30
- }
31
- function I(t) {
32
- return i = void 0, j && f ? p(t) : (f = a = void 0, u);
33
- }
34
- function W() {
35
- i !== void 0 && clearTimeout(i), s = 0, f = c = a = i = void 0;
36
- }
37
- function F() {
38
- return i === void 0 ? u : I(v());
39
- }
40
- function T() {
41
- var t = v(), o = h(t);
42
- if (f = arguments, a = this, c = t, o) {
43
- if (i === void 0)
44
- return C(c);
45
- if (l)
46
- return i = setTimeout(g, n), p(c);
1
+ import { get as t } from "./index276.js";
2
+ const o = () => ({
3
+ getItemText(r, n) {
4
+ if (typeof r == "string" && !n) return r;
5
+ if (n) {
6
+ if (typeof n == "function") {
7
+ let f = n(r);
8
+ return typeof f != "string" && (f = JSON.stringify(f)), f;
9
+ } else if (typeof n == "string") {
10
+ const f = t(r, n);
11
+ return typeof f == "string" ? f : JSON.stringify(f);
12
+ }
47
13
  }
48
- return i === void 0 && (i = setTimeout(g, n)), u;
49
- }
50
- return T.cancel = W, T.flush = F, T;
51
- }
52
- function J(e, n, r) {
53
- var f = !0, a = !0;
54
- if (typeof e != "function")
55
- throw new TypeError(k);
56
- return y(r) && (f = "leading" in r ? !!r.leading : f, a = "trailing" in r ? !!r.trailing : a), z(e, n, {
57
- leading: f,
58
- maxWait: n,
59
- trailing: a
60
- });
61
- }
62
- function y(e) {
63
- var n = typeof e;
64
- return !!e && (n == "object" || n == "function");
65
- }
66
- function K(e) {
67
- return !!e && typeof e == "object";
68
- }
69
- function Q(e) {
70
- return typeof e == "symbol" || K(e) && U.call(e) == N;
71
- }
72
- function S(e) {
73
- if (typeof e == "number")
74
- return e;
75
- if (Q(e))
76
- return E;
77
- if (y(e)) {
78
- var n = typeof e.valueOf == "function" ? e.valueOf() : e;
79
- e = y(n) ? n + "" : n;
14
+ return JSON.stringify(r);
80
15
  }
81
- if (typeof e != "string")
82
- return e === 0 ? e : +e;
83
- e = e.replace($, "");
84
- var r = B.test(e);
85
- return r || R.test(e) ? _(e.slice(2), r ? 2 : 8) : A.test(e) ? E : +e;
86
- }
87
- var V = J;
88
- const Z = /* @__PURE__ */ M(V);
16
+ });
89
17
  export {
90
- Z as default
18
+ o as useItemText
91
19
  };
92
20
  //# sourceMappingURL=index241.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index241.js","sources":["../node_modules/lodash.throttle/index.js"],"sourcesContent":["/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = throttle;\n"],"names":["FUNC_ERROR_TEXT","NAN","symbolTag","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","freeGlobal","global","freeSelf","root","objectProto","objectToString","nativeMax","nativeMin","now","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","toNumber","isObject","invokeFunc","time","args","thisArg","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","thro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AAAM,IAAiBP;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index241.js","sources":["../src/composables/useItemText.ts"],"sourcesContent":["import { get } from '@/utilities/functions/get';\n\ntype NestedKeyOf<ObjectType extends object> = {\n\t[Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object\n\t\t? `${Key}` | `${Key}.${NestedKeyOf<ObjectType[Key]>}`\n\t\t: `${Key}`;\n}[keyof ObjectType & (string | number)];\n\nexport type Path<T> = T extends object\n\t?\n\t\t\t| NestedKeyOf<T>\n\t\t\t| ((item: T) => string | number)\n\t\t\t| undefined\n\t\t\t| (string & Record<never, never>)\n\t: undefined;\n\nexport const useItemText = () => ({\n\tgetItemText<T>(item: T, getter?: Path<T>): string {\n\t\tif (typeof item === 'string' && !getter) return item;\n\t\telse if (getter) {\n\t\t\tif (typeof getter === 'function') {\n\t\t\t\tlet found = getter(item);\n\t\t\t\tif (typeof found !== 'string') found = JSON.stringify(found);\n\t\t\t\treturn found;\n\t\t\t} else if (typeof getter === 'string') {\n\t\t\t\tconst found = get(item, getter as any);\n\t\t\t\tif (typeof found === 'string') return found;\n\t\t\t\telse return JSON.stringify(found);\n\t\t\t}\n\t\t}\n\t\treturn JSON.stringify(item);\n\t},\n});\n"],"names":["useItemText","item","getter","found","get"],"mappings":";AAgBO,MAAMA,IAAc,OAAO;AAAA,EACjC,YAAeC,GAASC,GAA0B;AACjD,QAAI,OAAOD,KAAS,YAAY,CAACC,EAAe,QAAAD;AAAA,QACvCC;AACJ,UAAA,OAAOA,KAAW,YAAY;AAC7B,YAAAC,IAAQD,EAAOD,CAAI;AACvB,eAAI,OAAOE,KAAU,aAAkBA,IAAA,KAAK,UAAUA,CAAK,IACpDA;AAAA,MAAA,WACG,OAAOD,KAAW,UAAU;AAChC,cAAAC,IAAQC,EAAIH,GAAMC,CAAa;AACjC,eAAA,OAAOC,KAAU,WAAiBA,IAC1B,KAAK,UAAUA,CAAK;AAAA,MACjC;AAAA;AAEM,WAAA,KAAK,UAAUF,CAAI;AAAA,EAC3B;AACD;"}
package/dist/index242.js CHANGED
@@ -1,9 +1,434 @@
1
- import e from "./index275.js";
2
- import r from "./index276.js";
3
- import o from "./index277.js";
4
- const f = new o(r, e)._freeze();
1
+ import { isFocusable as G, tabbable as te, focusable as ae, isTabbable as T, getTabIndex as K } from "./index244.js";
2
+ /*!
3
+ * focus-trap 7.5.4
4
+ * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
5
+ */
6
+ function z(u, a) {
7
+ var o = Object.keys(u);
8
+ if (Object.getOwnPropertySymbols) {
9
+ var i = Object.getOwnPropertySymbols(u);
10
+ a && (i = i.filter(function(m) {
11
+ return Object.getOwnPropertyDescriptor(u, m).enumerable;
12
+ })), o.push.apply(o, i);
13
+ }
14
+ return o;
15
+ }
16
+ function J(u) {
17
+ for (var a = 1; a < arguments.length; a++) {
18
+ var o = arguments[a] != null ? arguments[a] : {};
19
+ a % 2 ? z(Object(o), !0).forEach(function(i) {
20
+ ne(u, i, o[i]);
21
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(u, Object.getOwnPropertyDescriptors(o)) : z(Object(o)).forEach(function(i) {
22
+ Object.defineProperty(u, i, Object.getOwnPropertyDescriptor(o, i));
23
+ });
24
+ }
25
+ return u;
26
+ }
27
+ function ne(u, a, o) {
28
+ return a = ie(a), a in u ? Object.defineProperty(u, a, {
29
+ value: o,
30
+ enumerable: !0,
31
+ configurable: !0,
32
+ writable: !0
33
+ }) : u[a] = o, u;
34
+ }
35
+ function re(u, a) {
36
+ if (typeof u != "object" || u === null) return u;
37
+ var o = u[Symbol.toPrimitive];
38
+ if (o !== void 0) {
39
+ var i = o.call(u, a || "default");
40
+ if (typeof i != "object") return i;
41
+ throw new TypeError("@@toPrimitive must return a primitive value.");
42
+ }
43
+ return (a === "string" ? String : Number)(u);
44
+ }
45
+ function ie(u) {
46
+ var a = re(u, "string");
47
+ return typeof a == "symbol" ? a : String(a);
48
+ }
49
+ var Q = {
50
+ activateTrap: function(a, o) {
51
+ if (a.length > 0) {
52
+ var i = a[a.length - 1];
53
+ i !== o && i.pause();
54
+ }
55
+ var m = a.indexOf(o);
56
+ m === -1 || a.splice(m, 1), a.push(o);
57
+ },
58
+ deactivateTrap: function(a, o) {
59
+ var i = a.indexOf(o);
60
+ i !== -1 && a.splice(i, 1), a.length > 0 && a[a.length - 1].unpause();
61
+ }
62
+ }, oe = function(a) {
63
+ return a.tagName && a.tagName.toLowerCase() === "input" && typeof a.select == "function";
64
+ }, ue = function(a) {
65
+ return (a == null ? void 0 : a.key) === "Escape" || (a == null ? void 0 : a.key) === "Esc" || (a == null ? void 0 : a.keyCode) === 27;
66
+ }, L = function(a) {
67
+ return (a == null ? void 0 : a.key) === "Tab" || (a == null ? void 0 : a.keyCode) === 9;
68
+ }, se = function(a) {
69
+ return L(a) && !a.shiftKey;
70
+ }, ce = function(a) {
71
+ return L(a) && a.shiftKey;
72
+ }, W = function(a) {
73
+ return setTimeout(a, 0);
74
+ }, X = function(a, o) {
75
+ var i = -1;
76
+ return a.every(function(m, s) {
77
+ return o(m) ? (i = s, !1) : !0;
78
+ }), i;
79
+ }, B = function(a) {
80
+ for (var o = arguments.length, i = new Array(o > 1 ? o - 1 : 0), m = 1; m < o; m++)
81
+ i[m - 1] = arguments[m];
82
+ return typeof a == "function" ? a.apply(void 0, i) : a;
83
+ }, C = function(a) {
84
+ return a.target.shadowRoot && typeof a.composedPath == "function" ? a.composedPath()[0] : a.target;
85
+ }, le = [], de = function(a, o) {
86
+ var i = (o == null ? void 0 : o.document) || document, m = (o == null ? void 0 : o.trapStack) || le, s = J({
87
+ returnFocusOnDeactivate: !0,
88
+ escapeDeactivates: !0,
89
+ delayInitialFocus: !0,
90
+ isKeyForward: se,
91
+ isKeyBackward: ce
92
+ }, o), n = {
93
+ // containers given to createFocusTrap()
94
+ // @type {Array<HTMLElement>}
95
+ containers: [],
96
+ // list of objects identifying tabbable nodes in `containers` in the trap
97
+ // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
98
+ // is active, but the trap should never get to a state where there isn't at least one group
99
+ // with at least one tabbable node in it (that would lead to an error condition that would
100
+ // result in an error being thrown)
101
+ // @type {Array<{
102
+ // container: HTMLElement,
103
+ // tabbableNodes: Array<HTMLElement>, // empty if none
104
+ // focusableNodes: Array<HTMLElement>, // empty if none
105
+ // posTabIndexesFound: boolean,
106
+ // firstTabbableNode: HTMLElement|undefined,
107
+ // lastTabbableNode: HTMLElement|undefined,
108
+ // firstDomTabbableNode: HTMLElement|undefined,
109
+ // lastDomTabbableNode: HTMLElement|undefined,
110
+ // nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
111
+ // }>}
112
+ containerGroups: [],
113
+ // same order/length as `containers` list
114
+ // references to objects in `containerGroups`, but only those that actually have
115
+ // tabbable nodes in them
116
+ // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
117
+ // the same length
118
+ tabbableGroups: [],
119
+ nodeFocusedBeforeActivation: null,
120
+ mostRecentlyFocusedNode: null,
121
+ active: !1,
122
+ paused: !1,
123
+ // timer ID for when delayInitialFocus is true and initial focus in this trap
124
+ // has been delayed during activation
125
+ delayInitialFocusTimer: void 0,
126
+ // the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
127
+ recentNavEvent: void 0
128
+ }, g, h = function(t, e, r) {
129
+ return t && t[e] !== void 0 ? t[e] : s[r || e];
130
+ }, F = function(t, e) {
131
+ var r = typeof (e == null ? void 0 : e.composedPath) == "function" ? e.composedPath() : void 0;
132
+ return n.containerGroups.findIndex(function(c) {
133
+ var l = c.container, d = c.tabbableNodes;
134
+ return l.contains(t) || // fall back to explicit tabbable search which will take into consideration any
135
+ // web components if the `tabbableOptions.getShadowRoot` option was used for
136
+ // the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
137
+ // look inside web components even if open)
138
+ (r == null ? void 0 : r.includes(l)) || d.find(function(v) {
139
+ return v === t;
140
+ });
141
+ });
142
+ }, E = function(t) {
143
+ var e = s[t];
144
+ if (typeof e == "function") {
145
+ for (var r = arguments.length, c = new Array(r > 1 ? r - 1 : 0), l = 1; l < r; l++)
146
+ c[l - 1] = arguments[l];
147
+ e = e.apply(void 0, c);
148
+ }
149
+ if (e === !0 && (e = void 0), !e) {
150
+ if (e === void 0 || e === !1)
151
+ return e;
152
+ throw new Error("`".concat(t, "` was specified but was not a node, or did not return a node"));
153
+ }
154
+ var d = e;
155
+ if (typeof e == "string" && (d = i.querySelector(e), !d))
156
+ throw new Error("`".concat(t, "` as selector refers to no known node"));
157
+ return d;
158
+ }, P = function() {
159
+ var t = E("initialFocus");
160
+ if (t === !1)
161
+ return !1;
162
+ if (t === void 0 || !G(t, s.tabbableOptions))
163
+ if (F(i.activeElement) >= 0)
164
+ t = i.activeElement;
165
+ else {
166
+ var e = n.tabbableGroups[0], r = e && e.firstTabbableNode;
167
+ t = r || E("fallbackFocus");
168
+ }
169
+ if (!t)
170
+ throw new Error("Your focus-trap needs to have at least one focusable element");
171
+ return t;
172
+ }, D = function() {
173
+ if (n.containerGroups = n.containers.map(function(t) {
174
+ var e = te(t, s.tabbableOptions), r = ae(t, s.tabbableOptions), c = e.length > 0 ? e[0] : void 0, l = e.length > 0 ? e[e.length - 1] : void 0, d = r.find(function(b) {
175
+ return T(b);
176
+ }), v = r.slice().reverse().find(function(b) {
177
+ return T(b);
178
+ }), p = !!e.find(function(b) {
179
+ return K(b) > 0;
180
+ });
181
+ return {
182
+ container: t,
183
+ tabbableNodes: e,
184
+ focusableNodes: r,
185
+ /** True if at least one node with positive `tabindex` was found in this container. */
186
+ posTabIndexesFound: p,
187
+ /** First tabbable node in container, __tabindex__ order; `undefined` if none. */
188
+ firstTabbableNode: c,
189
+ /** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
190
+ lastTabbableNode: l,
191
+ // NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
192
+ // would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
193
+ // because that API doesn't work with Shadow DOM as well as it should (@see
194
+ // https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,
195
+ // to address an edge case related to positive tabindex support, this seems like a much easier,
196
+ // "close enough most of the time" alternative for positive tabindexes which should generally
197
+ // be avoided anyway...
198
+ /** First tabbable node in container, __DOM__ order; `undefined` if none. */
199
+ firstDomTabbableNode: d,
200
+ /** Last tabbable node in container, __DOM__ order; `undefined` if none. */
201
+ lastDomTabbableNode: v,
202
+ /**
203
+ * Finds the __tabbable__ node that follows the given node in the specified direction,
204
+ * in this container, if any.
205
+ * @param {HTMLElement} node
206
+ * @param {boolean} [forward] True if going in forward tab order; false if going
207
+ * in reverse.
208
+ * @returns {HTMLElement|undefined} The next tabbable node, if any.
209
+ */
210
+ nextTabbableNode: function(N) {
211
+ var O = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, y = e.indexOf(N);
212
+ return y < 0 ? O ? r.slice(r.indexOf(N) + 1).find(function(R) {
213
+ return T(R);
214
+ }) : r.slice(0, r.indexOf(N)).reverse().find(function(R) {
215
+ return T(R);
216
+ }) : e[y + (O ? 1 : -1)];
217
+ }
218
+ };
219
+ }), n.tabbableGroups = n.containerGroups.filter(function(t) {
220
+ return t.tabbableNodes.length > 0;
221
+ }), n.tabbableGroups.length <= 0 && !E("fallbackFocus"))
222
+ throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
223
+ if (n.containerGroups.find(function(t) {
224
+ return t.posTabIndexesFound;
225
+ }) && n.containerGroups.length > 1)
226
+ throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
227
+ }, Z = function f(t) {
228
+ var e = t.activeElement;
229
+ if (e)
230
+ return e.shadowRoot && e.shadowRoot.activeElement !== null ? f(e.shadowRoot) : e;
231
+ }, w = function f(t) {
232
+ if (t !== !1 && t !== Z(document)) {
233
+ if (!t || !t.focus) {
234
+ f(P());
235
+ return;
236
+ }
237
+ t.focus({
238
+ preventScroll: !!s.preventScroll
239
+ }), n.mostRecentlyFocusedNode = t, oe(t) && t.select();
240
+ }
241
+ }, S = function(t) {
242
+ var e = E("setReturnFocus", t);
243
+ return e || (e === !1 ? !1 : t);
244
+ }, U = function(t) {
245
+ var e = t.target, r = t.event, c = t.isBackward, l = c === void 0 ? !1 : c;
246
+ e = e || C(r), D();
247
+ var d = null;
248
+ if (n.tabbableGroups.length > 0) {
249
+ var v = F(e, r), p = v >= 0 ? n.containerGroups[v] : void 0;
250
+ if (v < 0)
251
+ l ? d = n.tabbableGroups[n.tabbableGroups.length - 1].lastTabbableNode : d = n.tabbableGroups[0].firstTabbableNode;
252
+ else if (l) {
253
+ var b = X(n.tabbableGroups, function(I) {
254
+ var x = I.firstTabbableNode;
255
+ return e === x;
256
+ });
257
+ if (b < 0 && (p.container === e || G(e, s.tabbableOptions) && !T(e, s.tabbableOptions) && !p.nextTabbableNode(e, !1)) && (b = v), b >= 0) {
258
+ var N = b === 0 ? n.tabbableGroups.length - 1 : b - 1, O = n.tabbableGroups[N];
259
+ d = K(e) >= 0 ? O.lastTabbableNode : O.lastDomTabbableNode;
260
+ } else L(r) || (d = p.nextTabbableNode(e, !1));
261
+ } else {
262
+ var y = X(n.tabbableGroups, function(I) {
263
+ var x = I.lastTabbableNode;
264
+ return e === x;
265
+ });
266
+ if (y < 0 && (p.container === e || G(e, s.tabbableOptions) && !T(e, s.tabbableOptions) && !p.nextTabbableNode(e)) && (y = v), y >= 0) {
267
+ var R = y === n.tabbableGroups.length - 1 ? 0 : y + 1, $ = n.tabbableGroups[R];
268
+ d = K(e) >= 0 ? $.firstTabbableNode : $.firstDomTabbableNode;
269
+ } else L(r) || (d = p.nextTabbableNode(e));
270
+ }
271
+ } else
272
+ d = E("fallbackFocus");
273
+ return d;
274
+ }, A = function(t) {
275
+ var e = C(t);
276
+ if (!(F(e, t) >= 0)) {
277
+ if (B(s.clickOutsideDeactivates, t)) {
278
+ g.deactivate({
279
+ // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
280
+ // which will result in the outside click setting focus to the node
281
+ // that was clicked (and if not focusable, to "nothing"); by setting
282
+ // `returnFocus: true`, we'll attempt to re-focus the node originally-focused
283
+ // on activation (or the configured `setReturnFocus` node), whether the
284
+ // outside click was on a focusable node or not
285
+ returnFocus: s.returnFocusOnDeactivate
286
+ });
287
+ return;
288
+ }
289
+ B(s.allowOutsideClick, t) || t.preventDefault();
290
+ }
291
+ }, q = function(t) {
292
+ var e = C(t), r = F(e, t) >= 0;
293
+ if (r || e instanceof Document)
294
+ r && (n.mostRecentlyFocusedNode = e);
295
+ else {
296
+ t.stopImmediatePropagation();
297
+ var c, l = !0;
298
+ if (n.mostRecentlyFocusedNode)
299
+ if (K(n.mostRecentlyFocusedNode) > 0) {
300
+ var d = F(n.mostRecentlyFocusedNode), v = n.containerGroups[d].tabbableNodes;
301
+ if (v.length > 0) {
302
+ var p = v.findIndex(function(b) {
303
+ return b === n.mostRecentlyFocusedNode;
304
+ });
305
+ p >= 0 && (s.isKeyForward(n.recentNavEvent) ? p + 1 < v.length && (c = v[p + 1], l = !1) : p - 1 >= 0 && (c = v[p - 1], l = !1));
306
+ }
307
+ } else
308
+ n.containerGroups.some(function(b) {
309
+ return b.tabbableNodes.some(function(N) {
310
+ return K(N) > 0;
311
+ });
312
+ }) || (l = !1);
313
+ else
314
+ l = !1;
315
+ l && (c = U({
316
+ // move FROM the MRU node, not event-related node (which will be the node that is
317
+ // outside the trap causing the focus escape we're trying to fix)
318
+ target: n.mostRecentlyFocusedNode,
319
+ isBackward: s.isKeyBackward(n.recentNavEvent)
320
+ })), w(c || n.mostRecentlyFocusedNode || P());
321
+ }
322
+ n.recentNavEvent = void 0;
323
+ }, _ = function(t) {
324
+ var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
325
+ n.recentNavEvent = t;
326
+ var r = U({
327
+ event: t,
328
+ isBackward: e
329
+ });
330
+ r && (L(t) && t.preventDefault(), w(r));
331
+ }, H = function(t) {
332
+ if (ue(t) && B(s.escapeDeactivates, t) !== !1) {
333
+ t.preventDefault(), g.deactivate();
334
+ return;
335
+ }
336
+ (s.isKeyForward(t) || s.isKeyBackward(t)) && _(t, s.isKeyBackward(t));
337
+ }, M = function(t) {
338
+ var e = C(t);
339
+ F(e, t) >= 0 || B(s.clickOutsideDeactivates, t) || B(s.allowOutsideClick, t) || (t.preventDefault(), t.stopImmediatePropagation());
340
+ }, Y = function() {
341
+ if (n.active)
342
+ return Q.activateTrap(m, g), n.delayInitialFocusTimer = s.delayInitialFocus ? W(function() {
343
+ w(P());
344
+ }) : w(P()), i.addEventListener("focusin", q, !0), i.addEventListener("mousedown", A, {
345
+ capture: !0,
346
+ passive: !1
347
+ }), i.addEventListener("touchstart", A, {
348
+ capture: !0,
349
+ passive: !1
350
+ }), i.addEventListener("click", M, {
351
+ capture: !0,
352
+ passive: !1
353
+ }), i.addEventListener("keydown", H, {
354
+ capture: !0,
355
+ passive: !1
356
+ }), g;
357
+ }, V = function() {
358
+ if (n.active)
359
+ return i.removeEventListener("focusin", q, !0), i.removeEventListener("mousedown", A, !0), i.removeEventListener("touchstart", A, !0), i.removeEventListener("click", M, !0), i.removeEventListener("keydown", H, !0), g;
360
+ }, ee = function(t) {
361
+ var e = t.some(function(r) {
362
+ var c = Array.from(r.removedNodes);
363
+ return c.some(function(l) {
364
+ return l === n.mostRecentlyFocusedNode;
365
+ });
366
+ });
367
+ e && w(P());
368
+ }, j = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(ee) : void 0, k = function() {
369
+ j && (j.disconnect(), n.active && !n.paused && n.containers.map(function(t) {
370
+ j.observe(t, {
371
+ subtree: !0,
372
+ childList: !0
373
+ });
374
+ }));
375
+ };
376
+ return g = {
377
+ get active() {
378
+ return n.active;
379
+ },
380
+ get paused() {
381
+ return n.paused;
382
+ },
383
+ activate: function(t) {
384
+ if (n.active)
385
+ return this;
386
+ var e = h(t, "onActivate"), r = h(t, "onPostActivate"), c = h(t, "checkCanFocusTrap");
387
+ c || D(), n.active = !0, n.paused = !1, n.nodeFocusedBeforeActivation = i.activeElement, e == null || e();
388
+ var l = function() {
389
+ c && D(), Y(), k(), r == null || r();
390
+ };
391
+ return c ? (c(n.containers.concat()).then(l, l), this) : (l(), this);
392
+ },
393
+ deactivate: function(t) {
394
+ if (!n.active)
395
+ return this;
396
+ var e = J({
397
+ onDeactivate: s.onDeactivate,
398
+ onPostDeactivate: s.onPostDeactivate,
399
+ checkCanReturnFocus: s.checkCanReturnFocus
400
+ }, t);
401
+ clearTimeout(n.delayInitialFocusTimer), n.delayInitialFocusTimer = void 0, V(), n.active = !1, n.paused = !1, k(), Q.deactivateTrap(m, g);
402
+ var r = h(e, "onDeactivate"), c = h(e, "onPostDeactivate"), l = h(e, "checkCanReturnFocus"), d = h(e, "returnFocus", "returnFocusOnDeactivate");
403
+ r == null || r();
404
+ var v = function() {
405
+ W(function() {
406
+ d && w(S(n.nodeFocusedBeforeActivation)), c == null || c();
407
+ });
408
+ };
409
+ return d && l ? (l(S(n.nodeFocusedBeforeActivation)).then(v, v), this) : (v(), this);
410
+ },
411
+ pause: function(t) {
412
+ if (n.paused || !n.active)
413
+ return this;
414
+ var e = h(t, "onPause"), r = h(t, "onPostPause");
415
+ return n.paused = !0, e == null || e(), V(), k(), r == null || r(), this;
416
+ },
417
+ unpause: function(t) {
418
+ if (!n.paused || !n.active)
419
+ return this;
420
+ var e = h(t, "onUnpause"), r = h(t, "onPostUnpause");
421
+ return n.paused = !1, e == null || e(), D(), Y(), k(), r == null || r(), this;
422
+ },
423
+ updateContainerElements: function(t) {
424
+ var e = [].concat(t).filter(Boolean);
425
+ return n.containers = e.map(function(r) {
426
+ return typeof r == "string" ? i.querySelector(r) : r;
427
+ }), n.active && D(), k(), this;
428
+ }
429
+ }, g.updateContainerElements(a), g;
430
+ };
5
431
  export {
6
- o as Mime,
7
- f as default
432
+ de as createFocusTrap
8
433
  };
9
434
  //# sourceMappingURL=index242.js.map