bitboss-ui 0.2.73 → 0.2.74

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 (145) hide show
  1. package/dist/index101.js +2 -2
  2. package/dist/index103.js +2 -2
  3. package/dist/index109.js +1 -1
  4. package/dist/index11.js +2 -2
  5. package/dist/index111.js +4 -4
  6. package/dist/index113.js +1 -1
  7. package/dist/index116.js +1 -1
  8. package/dist/index117.js +1 -1
  9. package/dist/index118.js +1 -1
  10. package/dist/index119.js +1 -1
  11. package/dist/index125.js +1 -1
  12. package/dist/index126.js +1 -1
  13. package/dist/index127.js +1 -1
  14. package/dist/index131.js +2 -2
  15. package/dist/index15.js +8 -8
  16. package/dist/index17.js +9 -9
  17. package/dist/index19.js +3 -3
  18. package/dist/index197.js +2 -10
  19. package/dist/index197.js.map +1 -1
  20. package/dist/index198.js +4 -2
  21. package/dist/index198.js.map +1 -1
  22. package/dist/index199.js +235 -4
  23. package/dist/index199.js.map +1 -1
  24. package/dist/index200.js +3 -235
  25. package/dist/index200.js.map +1 -1
  26. package/dist/index201.js +3 -3
  27. package/dist/index201.js.map +1 -1
  28. package/dist/index202.js +3 -35
  29. package/dist/index202.js.map +1 -1
  30. package/dist/index203.js +35 -6
  31. package/dist/index203.js.map +1 -1
  32. package/dist/index204.js +6 -295
  33. package/dist/index204.js.map +1 -1
  34. package/dist/index205.js +5 -16
  35. package/dist/index205.js.map +1 -1
  36. package/dist/index206.js +10 -10
  37. package/dist/index206.js.map +1 -1
  38. package/dist/index207.js +15 -18
  39. package/dist/index207.js.map +1 -1
  40. package/dist/index208.js +18 -19
  41. package/dist/index208.js.map +1 -1
  42. package/dist/index209.js +15 -24
  43. package/dist/index209.js.map +1 -1
  44. package/dist/index21.js +2 -2
  45. package/dist/index210.js +29 -8
  46. package/dist/index210.js.map +1 -1
  47. package/dist/index211.js +8 -2
  48. package/dist/index211.js.map +1 -1
  49. package/dist/index212.js +2 -368
  50. package/dist/index212.js.map +1 -1
  51. package/dist/index213.js +10 -134
  52. package/dist/index213.js.map +1 -1
  53. package/dist/index214.js +2 -2
  54. package/dist/index214.js.map +1 -1
  55. package/dist/index215.js +2 -174
  56. package/dist/index215.js.map +1 -1
  57. package/dist/index216.js +121 -23
  58. package/dist/index216.js.map +1 -1
  59. package/dist/index217.js +2 -373
  60. package/dist/index217.js.map +1 -1
  61. package/dist/index218.js +368 -2
  62. package/dist/index218.js.map +1 -1
  63. package/dist/index219.js +373 -3
  64. package/dist/index219.js.map +1 -1
  65. package/dist/index220.js +134 -3
  66. package/dist/index220.js.map +1 -1
  67. package/dist/index221.js +166 -113
  68. package/dist/index221.js.map +1 -1
  69. package/dist/index222.js +23 -2
  70. package/dist/index222.js.map +1 -1
  71. package/dist/index224.js +6 -79
  72. package/dist/index224.js.map +1 -1
  73. package/dist/index225.js +17 -6
  74. package/dist/index225.js.map +1 -1
  75. package/dist/index226.js +79 -17
  76. package/dist/index226.js.map +1 -1
  77. package/dist/index227.js +2 -69
  78. package/dist/index227.js.map +1 -1
  79. package/dist/index228.js +4 -5
  80. package/dist/index228.js.map +1 -1
  81. package/dist/index229.js +224 -2
  82. package/dist/index229.js.map +1 -1
  83. package/dist/index230.js +257 -159
  84. package/dist/index230.js.map +1 -1
  85. package/dist/index231.js +437 -1
  86. package/dist/index231.js.map +1 -1
  87. package/dist/index232.js +88 -3
  88. package/dist/index232.js.map +1 -1
  89. package/dist/index233.js +69 -15
  90. package/dist/index233.js.map +1 -1
  91. package/dist/index234.js +151 -426
  92. package/dist/index234.js.map +1 -1
  93. package/dist/index235.js +1 -91
  94. package/dist/index235.js.map +1 -1
  95. package/dist/index236.js +5 -200
  96. package/dist/index236.js.map +1 -1
  97. package/dist/index237.js +200 -6
  98. package/dist/index237.js.map +1 -1
  99. package/dist/index238.js +295 -2
  100. package/dist/index238.js.map +1 -1
  101. package/dist/index239.js +6 -2
  102. package/dist/index239.js.map +1 -1
  103. package/dist/index240.js +2 -2
  104. package/dist/index244.js +2 -2
  105. package/dist/index245.js +2 -117
  106. package/dist/index245.js.map +1 -1
  107. package/dist/index246.js +2 -106
  108. package/dist/index246.js.map +1 -1
  109. package/dist/index247.js +100 -218
  110. package/dist/index247.js.map +1 -1
  111. package/dist/index248.js +2 -258
  112. package/dist/index248.js.map +1 -1
  113. package/dist/index249.js +117 -2
  114. package/dist/index249.js.map +1 -1
  115. package/dist/index25.js +2 -2
  116. package/dist/index250.js +15 -4
  117. package/dist/index250.js.map +1 -1
  118. package/dist/index251.js +4 -4
  119. package/dist/index251.js.map +1 -1
  120. package/dist/index252.js +4 -61
  121. package/dist/index252.js.map +1 -1
  122. package/dist/index253.js +61 -2
  123. package/dist/index253.js.map +1 -1
  124. package/dist/index254.js +2 -3
  125. package/dist/index254.js.map +1 -1
  126. package/dist/index255.js +3 -2
  127. package/dist/index255.js.map +1 -1
  128. package/dist/index256.js +5 -0
  129. package/dist/index256.js.map +1 -0
  130. package/dist/index29.js +3 -3
  131. package/dist/index31.js +7 -7
  132. package/dist/index33.js +1 -1
  133. package/dist/index35.js +2 -2
  134. package/dist/index47.js +1 -1
  135. package/dist/index49.js +1 -1
  136. package/dist/index65.js +4 -4
  137. package/dist/index69.js +2 -2
  138. package/dist/index72.js +1 -1
  139. package/dist/index75.js +1 -1
  140. package/dist/index77.js +1 -1
  141. package/dist/index79.js +4 -4
  142. package/dist/index99.js +1 -1
  143. package/dist/index99.js.map +1 -1
  144. package/dist/style.css +1 -1
  145. package/package.json +1 -1
package/dist/index216.js CHANGED
@@ -1,26 +1,124 @@
1
- const e = {
2
- inert: ":not([inert]):not([inert] *)",
3
- negTabIndex: ':not([tabindex^="-"])',
4
- disabled: ":not(:disabled)"
5
- }, n = [
6
- `a[href]${e.inert}${e.negTabIndex}`,
7
- `area[href]${e.inert}${e.negTabIndex}`,
8
- `input:not([type="hidden"]):not([type="radio"])${e.inert}${e.negTabIndex}${e.disabled}`,
9
- `input[type="radio"]${e.inert}${e.negTabIndex}${e.disabled}`,
10
- `select${e.inert}${e.negTabIndex}${e.disabled}`,
11
- `textarea${e.inert}${e.negTabIndex}${e.disabled}`,
12
- `button${e.inert}${e.negTabIndex}${e.disabled}`,
13
- `details${e.inert} > summary:first-of-type${e.negTabIndex}`,
14
- // Discard until Firefox supports `:has()`
15
- // See: https://github.com/KittyGiraudel/focusable-selectors/issues/12
16
- // `details:not(:has(> summary))${not.inert}${not.negTabIndex}`,
17
- `iframe${e.inert}${e.negTabIndex}`,
18
- `audio[controls]${e.inert}${e.negTabIndex}`,
19
- `video[controls]${e.inert}${e.negTabIndex}`,
20
- `[contenteditable]${e.inert}${e.negTabIndex}`,
21
- `[tabindex]${e.inert}${e.negTabIndex}`
22
- ];
1
+ import { arrow as j, computePosition as A } from "./index218.js";
2
+ import { autoUpdate as T, flip as W, platform as X, shift as Y } from "./index218.js";
3
+ import { unref as o, computed as r, ref as f, shallowRef as B, watch as h, getCurrentScope as F, onScopeDispose as I, shallowReadonly as a } from "vue";
4
+ import { isNode as U, getNodeName as k } from "./index247.js";
5
+ import { getOverflowAncestors as ee } from "./index247.js";
6
+ function q(n) {
7
+ return n != null && typeof n == "object" && "$el" in n;
8
+ }
9
+ function g(n) {
10
+ if (q(n)) {
11
+ const l = n.$el;
12
+ return U(l) && k(l) === "#comment" ? null : l;
13
+ }
14
+ return n;
15
+ }
16
+ function J(n) {
17
+ return {
18
+ name: "arrow",
19
+ options: n,
20
+ fn(l) {
21
+ const t = g(o(n.element));
22
+ return t == null ? {} : j({
23
+ element: t,
24
+ padding: n.padding
25
+ }).fn(l);
26
+ }
27
+ };
28
+ }
29
+ function S(n) {
30
+ return typeof window > "u" ? 1 : (n.ownerDocument.defaultView || window).devicePixelRatio || 1;
31
+ }
32
+ function M(n, l) {
33
+ const t = S(n);
34
+ return Math.round(l * t) / t;
35
+ }
36
+ function K(n, l, t) {
37
+ t === void 0 && (t = {});
38
+ const x = t.whileElementsMounted, D = r(() => {
39
+ var e;
40
+ return (e = o(t.open)) != null ? e : !0;
41
+ }), O = r(() => o(t.middleware)), d = r(() => {
42
+ var e;
43
+ return (e = o(t.placement)) != null ? e : "bottom";
44
+ }), v = r(() => {
45
+ var e;
46
+ return (e = o(t.strategy)) != null ? e : "absolute";
47
+ }), _ = r(() => {
48
+ var e;
49
+ return (e = o(t.transform)) != null ? e : !0;
50
+ }), i = r(() => g(n.value)), u = r(() => g(l.value)), p = f(0), w = f(0), c = f(v.value), P = f(d.value), E = B({}), y = f(!1), N = r(() => {
51
+ const e = {
52
+ position: c.value,
53
+ left: "0",
54
+ top: "0"
55
+ };
56
+ if (!u.value)
57
+ return e;
58
+ const b = M(u.value, p.value), C = M(u.value, w.value);
59
+ return _.value ? {
60
+ ...e,
61
+ transform: "translate(" + b + "px, " + C + "px)",
62
+ ...S(u.value) >= 1.5 && {
63
+ willChange: "transform"
64
+ }
65
+ } : {
66
+ position: c.value,
67
+ left: b + "px",
68
+ top: C + "px"
69
+ };
70
+ });
71
+ let s;
72
+ function m() {
73
+ i.value == null || u.value == null || A(i.value, u.value, {
74
+ middleware: O.value,
75
+ placement: d.value,
76
+ strategy: v.value
77
+ }).then((e) => {
78
+ p.value = e.x, w.value = e.y, c.value = e.strategy, P.value = e.placement, E.value = e.middlewareData, y.value = !0;
79
+ });
80
+ }
81
+ function R() {
82
+ typeof s == "function" && (s(), s = void 0);
83
+ }
84
+ function V() {
85
+ if (R(), x === void 0) {
86
+ m();
87
+ return;
88
+ }
89
+ if (i.value != null && u.value != null) {
90
+ s = x(i.value, u.value, m);
91
+ return;
92
+ }
93
+ }
94
+ function $() {
95
+ D.value || (y.value = !1);
96
+ }
97
+ return h([O, d, v], m, {
98
+ flush: "sync"
99
+ }), h([i, u], V, {
100
+ flush: "sync"
101
+ }), h(D, $, {
102
+ flush: "sync"
103
+ }), F() && I(R), {
104
+ x: a(p),
105
+ y: a(w),
106
+ strategy: a(c),
107
+ placement: a(P),
108
+ middlewareData: a(E),
109
+ isPositioned: a(y),
110
+ floatingStyles: N,
111
+ update: m
112
+ };
113
+ }
23
114
  export {
24
- n as default
115
+ J as arrow,
116
+ T as autoUpdate,
117
+ A as computePosition,
118
+ W as flip,
119
+ ee as getOverflowAncestors,
120
+ X as platform,
121
+ Y as shift,
122
+ K as useFloating
25
123
  };
26
124
  //# sourceMappingURL=index216.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index216.js","sources":["../node_modules/focusable-selectors/index.js"],"sourcesContent":["const not = {\n inert: ':not([inert]):not([inert] *)',\n negTabIndex: ':not([tabindex^=\"-\"])',\n disabled: ':not(:disabled)',\n}\n\nexport default [\n `a[href]${not.inert}${not.negTabIndex}`,\n `area[href]${not.inert}${not.negTabIndex}`,\n `input:not([type=\"hidden\"]):not([type=\"radio\"])${not.inert}${not.negTabIndex}${not.disabled}`,\n `input[type=\"radio\"]${not.inert}${not.negTabIndex}${not.disabled}`,\n `select${not.inert}${not.negTabIndex}${not.disabled}`,\n `textarea${not.inert}${not.negTabIndex}${not.disabled}`,\n `button${not.inert}${not.negTabIndex}${not.disabled}`,\n `details${not.inert} > summary:first-of-type${not.negTabIndex}`,\n // Discard until Firefox supports `:has()`\n // See: https://github.com/KittyGiraudel/focusable-selectors/issues/12\n // `details:not(:has(> summary))${not.inert}${not.negTabIndex}`,\n `iframe${not.inert}${not.negTabIndex}`,\n `audio[controls]${not.inert}${not.negTabIndex}`,\n `video[controls]${not.inert}${not.negTabIndex}`,\n `[contenteditable]${not.inert}${not.negTabIndex}`,\n `[tabindex]${not.inert}${not.negTabIndex}`,\n]\n"],"names":["not","selectors"],"mappings":"AAAA,MAAMA,IAAM;AAAA,EACV,OAAO;AAAA,EACP,aAAa;AAAA,EACb,UAAU;AACZ,GAEeC,IAAA;AAAA,EACb,UAAUD,EAAI,KAAK,GAAGA,EAAI,WAAW;AAAA,EACrC,aAAaA,EAAI,KAAK,GAAGA,EAAI,WAAW;AAAA,EACxC,iDAAiDA,EAAI,KAAK,GAAGA,EAAI,WAAW,GAAGA,EAAI,QAAQ;AAAA,EAC3F,sBAAsBA,EAAI,KAAK,GAAGA,EAAI,WAAW,GAAGA,EAAI,QAAQ;AAAA,EAChE,SAASA,EAAI,KAAK,GAAGA,EAAI,WAAW,GAAGA,EAAI,QAAQ;AAAA,EACnD,WAAWA,EAAI,KAAK,GAAGA,EAAI,WAAW,GAAGA,EAAI,QAAQ;AAAA,EACrD,SAASA,EAAI,KAAK,GAAGA,EAAI,WAAW,GAAGA,EAAI,QAAQ;AAAA,EACnD,UAAUA,EAAI,KAAK,2BAA2BA,EAAI,WAAW;AAAA;AAAA;AAAA;AAAA,EAI7D,SAASA,EAAI,KAAK,GAAGA,EAAI,WAAW;AAAA,EACpC,kBAAkBA,EAAI,KAAK,GAAGA,EAAI,WAAW;AAAA,EAC7C,kBAAkBA,EAAI,KAAK,GAAGA,EAAI,WAAW;AAAA,EAC7C,oBAAoBA,EAAI,KAAK,GAAGA,EAAI,WAAW;AAAA,EAC/C,aAAaA,EAAI,KAAK,GAAGA,EAAI,WAAW;AAC1C;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index216.js","sources":["../node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs"],"sourcesContent":["import { arrow as arrow$1, computePosition } from '@floating-ui/dom';\nexport { autoPlacement, autoUpdate, computePosition, detectOverflow, flip, getOverflowAncestors, hide, inline, limitShift, offset, platform, shift, size } from '@floating-ui/dom';\nimport { unref, computed, ref, shallowRef, watch, getCurrentScope, onScopeDispose, shallowReadonly } from 'vue-demi';\nimport { isNode, getNodeName } from '@floating-ui/utils/dom';\n\nfunction isComponentPublicInstance(target) {\n return target != null && typeof target === 'object' && '$el' in target;\n}\nfunction unwrapElement(target) {\n if (isComponentPublicInstance(target)) {\n const element = target.$el;\n return isNode(element) && getNodeName(element) === '#comment' ? null : element;\n }\n return target;\n}\n\n/**\n * Positions an inner element of the floating element such that it is centered to the reference element.\n * @param options The arrow options.\n * @see https://floating-ui.com/docs/arrow\n */\nfunction arrow(options) {\n return {\n name: 'arrow',\n options,\n fn(args) {\n const element = unwrapElement(unref(options.element));\n if (element == null) {\n return {};\n }\n return arrow$1({\n element,\n padding: options.padding\n }).fn(args);\n }\n };\n}\n\nfunction getDPR(element) {\n if (typeof window === 'undefined') {\n return 1;\n }\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element next to a reference element when it is given a certain CSS positioning strategy.\n * @param reference The reference template ref.\n * @param floating The floating template ref.\n * @param options The floating options.\n * @see https://floating-ui.com/docs/vue\n */\nfunction useFloating(reference, floating, options) {\n if (options === void 0) {\n options = {};\n }\n const whileElementsMountedOption = options.whileElementsMounted;\n const openOption = computed(() => {\n var _unref;\n return (_unref = unref(options.open)) != null ? _unref : true;\n });\n const middlewareOption = computed(() => unref(options.middleware));\n const placementOption = computed(() => {\n var _unref2;\n return (_unref2 = unref(options.placement)) != null ? _unref2 : 'bottom';\n });\n const strategyOption = computed(() => {\n var _unref3;\n return (_unref3 = unref(options.strategy)) != null ? _unref3 : 'absolute';\n });\n const transformOption = computed(() => {\n var _unref4;\n return (_unref4 = unref(options.transform)) != null ? _unref4 : true;\n });\n const referenceElement = computed(() => unwrapElement(reference.value));\n const floatingElement = computed(() => unwrapElement(floating.value));\n const x = ref(0);\n const y = ref(0);\n const strategy = ref(strategyOption.value);\n const placement = ref(placementOption.value);\n const middlewareData = shallowRef({});\n const isPositioned = ref(false);\n const floatingStyles = computed(() => {\n const initialStyles = {\n position: strategy.value,\n left: '0',\n top: '0'\n };\n if (!floatingElement.value) {\n return initialStyles;\n }\n const xVal = roundByDPR(floatingElement.value, x.value);\n const yVal = roundByDPR(floatingElement.value, y.value);\n if (transformOption.value) {\n return {\n ...initialStyles,\n transform: \"translate(\" + xVal + \"px, \" + yVal + \"px)\",\n ...(getDPR(floatingElement.value) >= 1.5 && {\n willChange: 'transform'\n })\n };\n }\n return {\n position: strategy.value,\n left: xVal + \"px\",\n top: yVal + \"px\"\n };\n });\n let whileElementsMountedCleanup;\n function update() {\n if (referenceElement.value == null || floatingElement.value == null) {\n return;\n }\n computePosition(referenceElement.value, floatingElement.value, {\n middleware: middlewareOption.value,\n placement: placementOption.value,\n strategy: strategyOption.value\n }).then(position => {\n x.value = position.x;\n y.value = position.y;\n strategy.value = position.strategy;\n placement.value = position.placement;\n middlewareData.value = position.middlewareData;\n isPositioned.value = true;\n });\n }\n function cleanup() {\n if (typeof whileElementsMountedCleanup === 'function') {\n whileElementsMountedCleanup();\n whileElementsMountedCleanup = undefined;\n }\n }\n function attach() {\n cleanup();\n if (whileElementsMountedOption === undefined) {\n update();\n return;\n }\n if (referenceElement.value != null && floatingElement.value != null) {\n whileElementsMountedCleanup = whileElementsMountedOption(referenceElement.value, floatingElement.value, update);\n return;\n }\n }\n function reset() {\n if (!openOption.value) {\n isPositioned.value = false;\n }\n }\n watch([middlewareOption, placementOption, strategyOption], update, {\n flush: 'sync'\n });\n watch([referenceElement, floatingElement], attach, {\n flush: 'sync'\n });\n watch(openOption, reset, {\n flush: 'sync'\n });\n if (getCurrentScope()) {\n onScopeDispose(cleanup);\n }\n return {\n x: shallowReadonly(x),\n y: shallowReadonly(y),\n strategy: shallowReadonly(strategy),\n placement: shallowReadonly(placement),\n middlewareData: shallowReadonly(middlewareData),\n isPositioned: shallowReadonly(isPositioned),\n floatingStyles,\n update\n };\n}\n\nexport { arrow, useFloating };\n"],"names":["isComponentPublicInstance","target","unwrapElement","element","isNode","getNodeName","arrow","options","args","unref","arrow$1","getDPR","roundByDPR","value","dpr","useFloating","reference","floating","whileElementsMountedOption","openOption","computed","_unref","middlewareOption","placementOption","_unref2","strategyOption","_unref3","transformOption","_unref4","referenceElement","floatingElement","x","ref","y","strategy","placement","middlewareData","shallowRef","isPositioned","floatingStyles","initialStyles","xVal","yVal","whileElementsMountedCleanup","update","computePosition","position","cleanup","attach","reset","watch","getCurrentScope","onScopeDispose","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217.js CHANGED
@@ -1,376 +1,5 @@
1
- import { evaluate as j, getSide as M, getOppositePlacement as G, getExpandedPlacements as J, getOppositeAxisPlacements as K, getAlignmentSides as N, getAlignment as F, getSideAxis as Y, clamp as B, getPaddingObject as z, rectToClientRect as $, getAlignmentAxis as H, getOppositeAxis as Q, getAxisLength as I, min as X } from "./index245.js";
2
- function _(o, i, m) {
3
- let {
4
- reference: n,
5
- floating: r
6
- } = o;
7
- const e = Y(i), l = H(i), a = I(l), g = M(i), x = e === "y", d = n.x + n.width / 2 - r.width / 2, c = n.y + n.height / 2 - r.height / 2, f = n[a] / 2 - r[a] / 2;
8
- let t;
9
- switch (g) {
10
- case "top":
11
- t = {
12
- x: d,
13
- y: n.y - r.height
14
- };
15
- break;
16
- case "bottom":
17
- t = {
18
- x: d,
19
- y: n.y + n.height
20
- };
21
- break;
22
- case "right":
23
- t = {
24
- x: n.x + n.width,
25
- y: c
26
- };
27
- break;
28
- case "left":
29
- t = {
30
- x: n.x - r.width,
31
- y: c
32
- };
33
- break;
34
- default:
35
- t = {
36
- x: n.x,
37
- y: n.y
38
- };
39
- }
40
- switch (F(i)) {
41
- case "start":
42
- t[l] -= f * (m && x ? -1 : 1);
43
- break;
44
- case "end":
45
- t[l] += f * (m && x ? -1 : 1);
46
- break;
47
- }
48
- return t;
49
- }
50
- const tt = async (o, i, m) => {
51
- const {
52
- placement: n = "bottom",
53
- strategy: r = "absolute",
54
- middleware: e = [],
55
- platform: l
56
- } = m, a = e.filter(Boolean), g = await (l.isRTL == null ? void 0 : l.isRTL(i));
57
- let x = await l.getElementRects({
58
- reference: o,
59
- floating: i,
60
- strategy: r
61
- }), {
62
- x: d,
63
- y: c
64
- } = _(x, n, g), f = n, t = {}, s = 0;
65
- for (let w = 0; w < a.length; w++) {
66
- const {
67
- name: u,
68
- fn: p
69
- } = a[w], {
70
- x: h,
71
- y,
72
- data: P,
73
- reset: v
74
- } = await p({
75
- x: d,
76
- y: c,
77
- initialPlacement: n,
78
- placement: f,
79
- strategy: r,
80
- middlewareData: t,
81
- rects: x,
82
- platform: l,
83
- elements: {
84
- reference: o,
85
- floating: i
86
- }
87
- });
88
- d = h ?? d, c = y ?? c, t = {
89
- ...t,
90
- [u]: {
91
- ...t[u],
92
- ...P
93
- }
94
- }, v && s <= 50 && (s++, typeof v == "object" && (v.placement && (f = v.placement), v.rects && (x = v.rects === !0 ? await l.getElementRects({
95
- reference: o,
96
- floating: i,
97
- strategy: r
98
- }) : v.rects), {
99
- x: d,
100
- y: c
101
- } = _(x, f, g)), w = -1);
102
- }
103
- return {
104
- x: d,
105
- y: c,
106
- placement: f,
107
- strategy: r,
108
- middlewareData: t
109
- };
110
- };
111
- async function W(o, i) {
112
- var m;
113
- i === void 0 && (i = {});
114
- const {
115
- x: n,
116
- y: r,
117
- platform: e,
118
- rects: l,
119
- elements: a,
120
- strategy: g
121
- } = o, {
122
- boundary: x = "clippingAncestors",
123
- rootBoundary: d = "viewport",
124
- elementContext: c = "floating",
125
- altBoundary: f = !1,
126
- padding: t = 0
127
- } = j(i, o), s = z(t), u = a[f ? c === "floating" ? "reference" : "floating" : c], p = $(await e.getClippingRect({
128
- element: (m = await (e.isElement == null ? void 0 : e.isElement(u))) == null || m ? u : u.contextElement || await (e.getDocumentElement == null ? void 0 : e.getDocumentElement(a.floating)),
129
- boundary: x,
130
- rootBoundary: d,
131
- strategy: g
132
- })), h = c === "floating" ? {
133
- ...l.floating,
134
- x: n,
135
- y: r
136
- } : l.reference, y = await (e.getOffsetParent == null ? void 0 : e.getOffsetParent(a.floating)), P = await (e.isElement == null ? void 0 : e.isElement(y)) ? await (e.getScale == null ? void 0 : e.getScale(y)) || {
137
- x: 1,
138
- y: 1
139
- } : {
140
- x: 1,
141
- y: 1
142
- }, v = $(e.convertOffsetParentRelativeRectToViewportRelativeRect ? await e.convertOffsetParentRelativeRectToViewportRelativeRect({
143
- elements: a,
144
- rect: h,
145
- offsetParent: y,
146
- strategy: g
147
- }) : h);
148
- return {
149
- top: (p.top - v.top + s.top) / P.y,
150
- bottom: (v.bottom - p.bottom + s.bottom) / P.y,
151
- left: (p.left - v.left + s.left) / P.x,
152
- right: (v.right - p.right + s.right) / P.x
153
- };
154
- }
155
- const et = (o) => ({
156
- name: "arrow",
157
- options: o,
158
- async fn(i) {
159
- const {
160
- x: m,
161
- y: n,
162
- placement: r,
163
- rects: e,
164
- platform: l,
165
- elements: a,
166
- middlewareData: g
167
- } = i, {
168
- element: x,
169
- padding: d = 0
170
- } = j(o, i) || {};
171
- if (x == null)
172
- return {};
173
- const c = z(d), f = {
174
- x: m,
175
- y: n
176
- }, t = H(r), s = I(t), w = await l.getDimensions(x), u = t === "y", p = u ? "top" : "left", h = u ? "bottom" : "right", y = u ? "clientHeight" : "clientWidth", P = e.reference[s] + e.reference[t] - f[t] - e.floating[s], v = f[t] - e.reference[t], D = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(x));
177
- let O = D ? D[y] : 0;
178
- (!O || !await (l.isElement == null ? void 0 : l.isElement(D))) && (O = a.floating[y] || e.floating[s]);
179
- const E = P / 2 - v / 2, S = O / 2 - w[s] / 2 - 1, T = X(c[p], S), L = X(c[h], S), b = T, V = O - w[s] - L, A = O / 2 - w[s] / 2 + E, R = B(b, A, V), k = !g.arrow && F(r) != null && A !== R && e.reference[s] / 2 - (A < b ? T : L) - w[s] / 2 < 0, C = k ? A < b ? A - b : A - V : 0;
180
- return {
181
- [t]: f[t] + C,
182
- data: {
183
- [t]: R,
184
- centerOffset: A - R - C,
185
- ...k && {
186
- alignmentOffset: C
187
- }
188
- },
189
- reset: k
190
- };
191
- }
192
- }), nt = function(o) {
193
- return o === void 0 && (o = {}), {
194
- name: "flip",
195
- options: o,
196
- async fn(i) {
197
- var m, n;
198
- const {
199
- placement: r,
200
- middlewareData: e,
201
- rects: l,
202
- initialPlacement: a,
203
- platform: g,
204
- elements: x
205
- } = i, {
206
- mainAxis: d = !0,
207
- crossAxis: c = !0,
208
- fallbackPlacements: f,
209
- fallbackStrategy: t = "bestFit",
210
- fallbackAxisSideDirection: s = "none",
211
- flipAlignment: w = !0,
212
- ...u
213
- } = j(o, i);
214
- if ((m = e.arrow) != null && m.alignmentOffset)
215
- return {};
216
- const p = M(r), h = M(a) === a, y = await (g.isRTL == null ? void 0 : g.isRTL(x.floating)), P = f || (h || !w ? [G(a)] : J(a));
217
- !f && s !== "none" && P.push(...K(a, w, s, y));
218
- const v = [a, ...P], D = await W(i, u), O = [];
219
- let E = ((n = e.flip) == null ? void 0 : n.overflows) || [];
220
- if (d && O.push(D[p]), c) {
221
- const b = N(r, l, y);
222
- O.push(D[b[0]], D[b[1]]);
223
- }
224
- if (E = [...E, {
225
- placement: r,
226
- overflows: O
227
- }], !O.every((b) => b <= 0)) {
228
- var S, T;
229
- const b = (((S = e.flip) == null ? void 0 : S.index) || 0) + 1, V = v[b];
230
- if (V)
231
- return {
232
- data: {
233
- index: b,
234
- overflows: E
235
- },
236
- reset: {
237
- placement: V
238
- }
239
- };
240
- let A = (T = E.filter((R) => R.overflows[0] <= 0).sort((R, k) => R.overflows[1] - k.overflows[1])[0]) == null ? void 0 : T.placement;
241
- if (!A)
242
- switch (t) {
243
- case "bestFit": {
244
- var L;
245
- const R = (L = E.map((k) => [k.placement, k.overflows.filter((C) => C > 0).reduce((C, q) => C + q, 0)]).sort((k, C) => k[1] - C[1])[0]) == null ? void 0 : L[0];
246
- R && (A = R);
247
- break;
248
- }
249
- case "initialPlacement":
250
- A = a;
251
- break;
252
- }
253
- if (r !== A)
254
- return {
255
- reset: {
256
- placement: A
257
- }
258
- };
259
- }
260
- return {};
261
- }
262
- };
263
- };
264
- async function U(o, i) {
265
- const {
266
- placement: m,
267
- platform: n,
268
- elements: r
269
- } = o, e = await (n.isRTL == null ? void 0 : n.isRTL(r.floating)), l = M(m), a = F(m), g = Y(m) === "y", x = ["left", "top"].includes(l) ? -1 : 1, d = e && g ? -1 : 1, c = j(i, o);
270
- let {
271
- mainAxis: f,
272
- crossAxis: t,
273
- alignmentAxis: s
274
- } = typeof c == "number" ? {
275
- mainAxis: c,
276
- crossAxis: 0,
277
- alignmentAxis: null
278
- } : {
279
- mainAxis: 0,
280
- crossAxis: 0,
281
- alignmentAxis: null,
282
- ...c
283
- };
284
- return a && typeof s == "number" && (t = a === "end" ? s * -1 : s), g ? {
285
- x: t * d,
286
- y: f * x
287
- } : {
288
- x: f * x,
289
- y: t * d
290
- };
291
- }
292
- const it = function(o) {
293
- return o === void 0 && (o = 0), {
294
- name: "offset",
295
- options: o,
296
- async fn(i) {
297
- var m, n;
298
- const {
299
- x: r,
300
- y: e,
301
- placement: l,
302
- middlewareData: a
303
- } = i, g = await U(i, o);
304
- return l === ((m = a.offset) == null ? void 0 : m.placement) && (n = a.arrow) != null && n.alignmentOffset ? {} : {
305
- x: r + g.x,
306
- y: e + g.y,
307
- data: {
308
- ...g,
309
- placement: l
310
- }
311
- };
312
- }
313
- };
314
- }, ot = function(o) {
315
- return o === void 0 && (o = {}), {
316
- name: "shift",
317
- options: o,
318
- async fn(i) {
319
- const {
320
- x: m,
321
- y: n,
322
- placement: r
323
- } = i, {
324
- mainAxis: e = !0,
325
- crossAxis: l = !1,
326
- limiter: a = {
327
- fn: (u) => {
328
- let {
329
- x: p,
330
- y: h
331
- } = u;
332
- return {
333
- x: p,
334
- y: h
335
- };
336
- }
337
- },
338
- ...g
339
- } = j(o, i), x = {
340
- x: m,
341
- y: n
342
- }, d = await W(i, g), c = Y(M(r)), f = Q(c);
343
- let t = x[f], s = x[c];
344
- if (e) {
345
- const u = f === "y" ? "top" : "left", p = f === "y" ? "bottom" : "right", h = t + d[u], y = t - d[p];
346
- t = B(h, t, y);
347
- }
348
- if (l) {
349
- const u = c === "y" ? "top" : "left", p = c === "y" ? "bottom" : "right", h = s + d[u], y = s - d[p];
350
- s = B(h, s, y);
351
- }
352
- const w = a.fn({
353
- ...i,
354
- [f]: t,
355
- [c]: s
356
- });
357
- return {
358
- ...w,
359
- data: {
360
- x: w.x - m,
361
- y: w.y - n
362
- }
363
- };
364
- }
365
- };
366
- };
1
+ const o = (e) => e[0];
367
2
  export {
368
- et as arrow,
369
- tt as computePosition,
370
- W as detectOverflow,
371
- nt as flip,
372
- it as offset,
373
- $ as rectToClientRect,
374
- ot as shift
3
+ o as head
375
4
  };
376
5
  //# sourceMappingURL=index217.js.map