se-design 1.0.82 → 1.0.83-dev.0
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.
- package/dist/assets/style.css +1 -1
- package/dist/components/NLSearch/ClearAiFiltersBar.d.ts +21 -0
- package/dist/components/NLSearch/NLDynamicChip.d.ts +18 -0
- package/dist/components/NLSearch/NLSearchInput.d.ts +21 -0
- package/dist/components/NLSearch/index.d.ts +6 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/index.js +131 -124
- package/dist/index.js.map +1 -1
- package/dist/index100.js +1 -1
- package/dist/index100.js.map +1 -1
- package/dist/index101.js +1 -1
- package/dist/index101.js.map +1 -1
- package/dist/index102.js +1 -1
- package/dist/index102.js.map +1 -1
- package/dist/index103.js +1 -1
- package/dist/index103.js.map +1 -1
- package/dist/index104.js +1 -1
- package/dist/index104.js.map +1 -1
- package/dist/index105.js +1 -1
- package/dist/index105.js.map +1 -1
- package/dist/index106.js +1 -1
- package/dist/index106.js.map +1 -1
- package/dist/index107.js +1 -1
- package/dist/index107.js.map +1 -1
- package/dist/index108.js +1 -1
- package/dist/index108.js.map +1 -1
- package/dist/index109.js +2 -2
- package/dist/index109.js.map +1 -1
- package/dist/index11.js +1 -1
- package/dist/index110.js +2 -2
- package/dist/index110.js.map +1 -1
- package/dist/index111.js +1 -1
- package/dist/index111.js.map +1 -1
- package/dist/index112.js +1 -1
- package/dist/index112.js.map +1 -1
- package/dist/index113.js +2 -2
- package/dist/index113.js.map +1 -1
- package/dist/index114.js +1 -1
- package/dist/index114.js.map +1 -1
- package/dist/index115.js +2 -2
- package/dist/index115.js.map +1 -1
- package/dist/index116.js +1 -1
- package/dist/index116.js.map +1 -1
- package/dist/index117.js +1 -1
- package/dist/index117.js.map +1 -1
- package/dist/index118.js +2 -2
- package/dist/index118.js.map +1 -1
- package/dist/index119.js +2 -2
- package/dist/index119.js.map +1 -1
- package/dist/index12.js +3 -3
- package/dist/index120.js +1 -1
- package/dist/index120.js.map +1 -1
- package/dist/index121.js +2 -2
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +2 -2
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +2 -2
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +1 -1
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +2 -2
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +2 -2
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +2 -2
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +1 -1
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +1 -1
- package/dist/index129.js.map +1 -1
- package/dist/index13.js +2 -2
- package/dist/index130.js +2 -2
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +2 -2
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +2 -2
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +1 -1
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +1 -1
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +2 -2
- package/dist/index135.js.map +1 -1
- package/dist/index136.js +2 -2
- package/dist/index136.js.map +1 -1
- package/dist/index137.js +1 -1
- package/dist/index137.js.map +1 -1
- package/dist/index138.js +1 -1
- package/dist/index138.js.map +1 -1
- package/dist/index139.js +1 -1
- package/dist/index139.js.map +1 -1
- package/dist/index140.js +1 -1
- package/dist/index140.js.map +1 -1
- package/dist/index141.js +1 -1
- package/dist/index141.js.map +1 -1
- package/dist/index142.js +2 -2
- package/dist/index142.js.map +1 -1
- package/dist/index143.js +1 -1
- package/dist/index143.js.map +1 -1
- package/dist/index144.js +1 -1
- package/dist/index144.js.map +1 -1
- package/dist/index145.js +1 -1
- package/dist/index145.js.map +1 -1
- package/dist/index146.js +2 -2
- package/dist/index146.js.map +1 -1
- package/dist/index147.js +1 -1
- package/dist/index147.js.map +1 -1
- package/dist/index148.js +1 -1
- package/dist/index148.js.map +1 -1
- package/dist/index149.js +1 -1
- package/dist/index149.js.map +1 -1
- package/dist/index150.js +1 -1
- package/dist/index150.js.map +1 -1
- package/dist/index151.js +2 -2
- package/dist/index151.js.map +1 -1
- package/dist/index152.js +2 -2
- package/dist/index152.js.map +1 -1
- package/dist/index153.js +1 -1
- package/dist/index153.js.map +1 -1
- package/dist/index154.js +2 -2
- package/dist/index154.js.map +1 -1
- package/dist/index155.js +1 -1
- package/dist/index155.js.map +1 -1
- package/dist/index156.js +2 -2
- package/dist/index156.js.map +1 -1
- package/dist/index157.js +1 -1
- package/dist/index157.js.map +1 -1
- package/dist/index158.js +2 -2
- package/dist/index158.js.map +1 -1
- package/dist/index159.js +2 -2
- package/dist/index159.js.map +1 -1
- package/dist/index16.js +3 -3
- package/dist/index160.js +1 -1
- package/dist/index160.js.map +1 -1
- package/dist/index161.js +1 -1
- package/dist/index161.js.map +1 -1
- package/dist/index162.js +1 -1
- package/dist/index162.js.map +1 -1
- package/dist/index163.js +1 -1
- package/dist/index163.js.map +1 -1
- package/dist/index164.js +1 -1
- package/dist/index164.js.map +1 -1
- package/dist/index165.js +1 -1
- package/dist/index165.js.map +1 -1
- package/dist/index166.js +1 -1
- package/dist/index166.js.map +1 -1
- package/dist/index167.js +1 -1
- package/dist/index167.js.map +1 -1
- package/dist/index168.js +1 -1
- package/dist/index168.js.map +1 -1
- package/dist/index169.js +1 -1
- package/dist/index169.js.map +1 -1
- package/dist/index170.js +1 -1
- package/dist/index170.js.map +1 -1
- package/dist/index171.js +1 -1
- package/dist/index171.js.map +1 -1
- package/dist/index172.js +1 -1
- package/dist/index172.js.map +1 -1
- package/dist/index173.js +1 -1
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +1 -1
- package/dist/index174.js.map +1 -1
- package/dist/index175.js +1 -1
- package/dist/index175.js.map +1 -1
- package/dist/index176.js +1 -1
- package/dist/index176.js.map +1 -1
- package/dist/index177.js +1 -1
- package/dist/index177.js.map +1 -1
- package/dist/index178.js +1 -1
- package/dist/index178.js.map +1 -1
- package/dist/index179.js +1 -1
- package/dist/index179.js.map +1 -1
- package/dist/index18.js +2 -2
- package/dist/index180.js +1 -1
- package/dist/index180.js.map +1 -1
- package/dist/index181.js +2 -2
- package/dist/index181.js.map +1 -1
- package/dist/index182.js +1 -1
- package/dist/index182.js.map +1 -1
- package/dist/index183.js +1 -1
- package/dist/index183.js.map +1 -1
- package/dist/index184.js +1 -1
- package/dist/index184.js.map +1 -1
- package/dist/index185.js +2 -2
- package/dist/index185.js.map +1 -1
- package/dist/index186.js +1 -1
- package/dist/index186.js.map +1 -1
- package/dist/index187.js +1 -1
- package/dist/index187.js.map +1 -1
- package/dist/index188.js +1 -1
- package/dist/index188.js.map +1 -1
- package/dist/index189.js +2 -2
- package/dist/index189.js.map +1 -1
- package/dist/index19.js +5 -5
- package/dist/index190.js +1 -1
- package/dist/index190.js.map +1 -1
- package/dist/index191.js +1 -1
- package/dist/index191.js.map +1 -1
- package/dist/index192.js +1 -1
- package/dist/index192.js.map +1 -1
- package/dist/index193.js +1 -1
- package/dist/index193.js.map +1 -1
- package/dist/index194.js +1 -1
- package/dist/index194.js.map +1 -1
- package/dist/index195.js +1 -1
- package/dist/index195.js.map +1 -1
- package/dist/index196.js +2 -2
- package/dist/index196.js.map +1 -1
- package/dist/index197.js +1 -1
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +2 -2
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +2 -149
- package/dist/index199.js.map +1 -1
- package/dist/index200.js +2 -9
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +2 -6
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +2 -5
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +149 -42
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +8 -20
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +9 -0
- package/dist/index205.js.map +1 -0
- package/dist/index206.js +8 -0
- package/dist/index206.js.map +1 -0
- package/dist/index207.js +45 -0
- package/dist/index207.js.map +1 -0
- package/dist/index208.js +24 -0
- package/dist/index208.js.map +1 -0
- package/dist/{index211.js → index215.js} +1 -1
- package/dist/{index211.js.map → index215.js.map} +1 -1
- package/dist/{index212.js → index216.js} +3 -3
- package/dist/{index212.js.map → index216.js.map} +1 -1
- package/dist/{index220.js → index224.js} +1 -1
- package/dist/{index220.js.map → index224.js.map} +1 -1
- package/dist/index23.js +4 -4
- package/dist/{index228.js → index232.js} +1 -1
- package/dist/{index228.js.map → index232.js.map} +1 -1
- package/dist/{index231.js → index235.js} +1 -1
- package/dist/{index231.js.map → index235.js.map} +1 -1
- package/dist/index244.js +168 -8
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +3 -9
- package/dist/index245.js.map +1 -1
- package/dist/index247.js +18 -169
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +10 -11
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +8 -4
- package/dist/index249.js.map +1 -1
- package/dist/index25.js +3 -3
- package/dist/index250.js +4 -5
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +168 -36
- package/dist/index251.js.map +1 -1
- package/dist/index252.js +11 -2
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +5 -7
- package/dist/index253.js.map +1 -1
- package/dist/index254.js +5 -326
- package/dist/index254.js.map +1 -1
- package/dist/index255.js +36 -48
- package/dist/index255.js.map +1 -1
- package/dist/index256.js +2 -2
- package/dist/index257.js +7 -75
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +308 -74
- package/dist/index258.js.map +1 -1
- package/dist/index259.js +45 -47
- package/dist/index259.js.map +1 -1
- package/dist/index260.js +2 -8
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +75 -4
- package/dist/index261.js.map +1 -1
- package/dist/index262.js +89 -48
- package/dist/index262.js.map +1 -1
- package/dist/index263.js +52 -2
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +8 -2
- package/dist/index264.js.map +1 -1
- package/dist/index265.js +8 -0
- package/dist/index265.js.map +1 -0
- package/dist/index266.js +55 -0
- package/dist/index266.js.map +1 -0
- package/dist/index267.js +5 -0
- package/dist/index267.js.map +1 -0
- package/dist/index268.js +5 -0
- package/dist/index268.js.map +1 -0
- package/dist/index27.js +1 -1
- package/dist/index28.js +4 -4
- package/dist/index29.js +3 -3
- package/dist/index3.js +3 -3
- package/dist/index30.js +4 -4
- package/dist/index32.js +10 -11
- package/dist/index33.js +1 -1
- package/dist/index35.js +4 -4
- package/dist/index36.js +5 -5
- package/dist/index38.js +3 -3
- package/dist/index39.js +4 -4
- package/dist/index4.js +3 -3
- package/dist/index40.js +1 -1
- package/dist/index42.js +7 -8
- package/dist/index43.js +9 -10
- package/dist/index45.js +4 -4
- package/dist/index46.js +142 -193
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +21 -38
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +36 -33
- package/dist/index48.js.map +1 -1
- package/dist/index50.js +189 -78
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +36 -459
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +33 -98
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +151 -36
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +84 -36
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +456 -88
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +96 -161
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +35 -146
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +38 -33
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +89 -83
- package/dist/index59.js.map +1 -1
- package/dist/index6.js +123 -123
- package/dist/index60.js +157 -113
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +143 -61
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +33 -152
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +80 -312
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +118 -45
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +62 -140
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +152 -12
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +316 -44
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +44 -82
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +143 -18
- package/dist/index69.js.map +1 -1
- package/dist/index7.js +9 -10
- package/dist/index70.js +9 -63
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +45 -26
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +78 -102
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +18 -61
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +63 -18
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +27 -5
- package/dist/index75.js.map +1 -1
- package/dist/index76.js +102 -48
- package/dist/index76.js.map +1 -1
- package/dist/index77.js +58 -20
- package/dist/index77.js.map +1 -1
- package/dist/index78.js +19 -7
- package/dist/index78.js.map +1 -1
- package/dist/index79.js +8 -0
- package/dist/index79.js.map +1 -0
- package/dist/index80.js +54 -2
- package/dist/index80.js.map +1 -1
- package/dist/index81.js +24 -2
- package/dist/index81.js.map +1 -1
- package/dist/index82.js +9 -2
- package/dist/index82.js.map +1 -1
- package/dist/index84.js +2 -2
- package/dist/index84.js.map +1 -1
- package/dist/index85.js +2 -2
- package/dist/index85.js.map +1 -1
- package/dist/index86.js +1 -1
- package/dist/index86.js.map +1 -1
- package/dist/index87.js +2 -2
- package/dist/index87.js.map +1 -1
- package/dist/index88.js +1 -1
- package/dist/index88.js.map +1 -1
- package/dist/index89.js +1 -1
- package/dist/index89.js.map +1 -1
- package/dist/index9.js +5 -5
- package/dist/index90.js +1 -1
- package/dist/index90.js.map +1 -1
- package/dist/index91.js +1 -1
- package/dist/index91.js.map +1 -1
- package/dist/index92.js +1 -1
- package/dist/index92.js.map +1 -1
- package/dist/index93.js +1 -1
- package/dist/index93.js.map +1 -1
- package/dist/index94.js +1 -1
- package/dist/index94.js.map +1 -1
- package/dist/index95.js +1 -1
- package/dist/index95.js.map +1 -1
- package/dist/index96.js +1 -1
- package/dist/index96.js.map +1 -1
- package/dist/index97.js +1 -1
- package/dist/index97.js.map +1 -1
- package/dist/index98.js +1 -1
- package/dist/index98.js.map +1 -1
- package/dist/index99.js +1 -1
- package/dist/index99.js.map +1 -1
- package/package.json +1 -1
- package/dist/index240.js +0 -173
- package/dist/index240.js.map +0 -1
- package/dist/index241.js +0 -7
- package/dist/index241.js.map +0 -1
- package/dist/index243.js +0 -22
- package/dist/index243.js.map +0 -1
- package/dist/index246.js +0 -8
- package/dist/index246.js.map +0 -1
- package/dist/index49.js +0 -152
- package/dist/index49.js.map +0 -1
- package/dist/index83.js +0 -5
- package/dist/index83.js.map +0 -1
package/dist/index63.js
CHANGED
|
@@ -1,321 +1,89 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { Icon as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
class: "-top-5 left-0"
|
|
1
|
+
import e, { useRef as S, useState as f } from "react";
|
|
2
|
+
import { CustomModal as T } from "./index13.js";
|
|
3
|
+
import { Icon as v } from "./index6.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
const C = ({
|
|
6
|
+
children: c = null,
|
|
7
|
+
title: n = "",
|
|
8
|
+
onClose: s = () => {
|
|
10
9
|
},
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
showCloseIcon: l = !1,
|
|
11
|
+
showBackButton: a = !1,
|
|
12
|
+
onBack: m = () => {
|
|
14
13
|
},
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
"bottom-right": {
|
|
20
|
-
rotate: "135",
|
|
21
|
-
class: "-bottom-5 right-0"
|
|
22
|
-
}
|
|
23
|
-
}, V = (s) => {
|
|
24
|
-
const d = document.querySelector(s);
|
|
25
|
-
if (!d)
|
|
26
|
-
return console.warn(`Iframe not found: ${s}`), null;
|
|
27
|
-
try {
|
|
28
|
-
return d.contentDocument || d.contentWindow?.document || null;
|
|
29
|
-
} catch (u) {
|
|
30
|
-
return console.error("Cannot access iframe document:", u), null;
|
|
31
|
-
}
|
|
32
|
-
}, C = (s, d) => {
|
|
33
|
-
if (!d)
|
|
34
|
-
return document.querySelector(s);
|
|
35
|
-
const u = V(d);
|
|
36
|
-
return u ? u.querySelector(s) : null;
|
|
37
|
-
}, j = (s, d) => {
|
|
38
|
-
const u = s.getBoundingClientRect();
|
|
39
|
-
if (!d)
|
|
40
|
-
return u;
|
|
41
|
-
const h = document.querySelector(d);
|
|
42
|
-
if (!h)
|
|
43
|
-
return u;
|
|
44
|
-
const E = h.getBoundingClientRect(), x = h.clientLeft || 0, y = h.clientTop || 0;
|
|
45
|
-
return new DOMRect(u.left + E.left + x, u.top + E.top + y, u.width, u.height);
|
|
46
|
-
}, ct = (s) => {
|
|
47
|
-
switch (s) {
|
|
48
|
-
case "left-bottom":
|
|
49
|
-
case "left-center":
|
|
50
|
-
case "bottom-left":
|
|
51
|
-
return "top-right";
|
|
52
|
-
case "right-bottom":
|
|
53
|
-
case "right-center":
|
|
54
|
-
case "bottom-right":
|
|
55
|
-
case "bottom-center":
|
|
56
|
-
return "top-left";
|
|
57
|
-
case "top-left":
|
|
58
|
-
case "left-top":
|
|
59
|
-
return "bottom-right";
|
|
60
|
-
case "top-right":
|
|
61
|
-
case "top-center":
|
|
62
|
-
case "right-top":
|
|
63
|
-
return "bottom-left";
|
|
64
|
-
default:
|
|
65
|
-
return "top-left";
|
|
66
|
-
}
|
|
67
|
-
}, z = () => ({
|
|
68
|
-
x: window.scrollX || window.pageXOffset,
|
|
69
|
-
y: window.scrollY || window.pageYOffset
|
|
70
|
-
}), at = (s, d, u) => {
|
|
71
|
-
let h;
|
|
72
|
-
const E = () => {
|
|
73
|
-
const x = C(s, u);
|
|
74
|
-
x ? d(x) : h = requestAnimationFrame(E);
|
|
75
|
-
};
|
|
76
|
-
return h = requestAnimationFrame(E), () => {
|
|
77
|
-
h && cancelAnimationFrame(h);
|
|
78
|
-
};
|
|
79
|
-
}, pt = ({
|
|
80
|
-
steps: s,
|
|
81
|
-
screenBaseElementSelector: d,
|
|
82
|
-
onClose: u,
|
|
83
|
-
tooltipBackgroundColor: h = "#E04E05",
|
|
84
|
-
tooltipTextColor: E = "var(--color-white)",
|
|
85
|
-
maxWidth: x = 350
|
|
14
|
+
className: i = "",
|
|
15
|
+
automationId: r = "",
|
|
16
|
+
minHeight: u = "auto"
|
|
86
17
|
}) => {
|
|
87
|
-
const [
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
|
|
18
|
+
const t = S(null), [g, p] = f(0), [E, h] = f(0), [b, Y] = f(!1), k = (o) => {
|
|
19
|
+
p(o.touches[0].clientY), h(o.touches[0].clientY), Y(!0);
|
|
20
|
+
}, N = (o) => {
|
|
21
|
+
if (!b) return;
|
|
22
|
+
const d = o.touches[0].clientY, x = d - g;
|
|
23
|
+
x > 0 && (h(d), t.current && (t.current.style.transform = `translateY(${x}px)`));
|
|
24
|
+
}, y = () => {
|
|
25
|
+
if (!b) return;
|
|
26
|
+
E - g > 60 ? s() : t.current && (t.current.style.transform = "translateY(0)"), Y(!1), p(0), h(0);
|
|
91
27
|
};
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
const P = s[s.length - 1], A = C(P.targetElementSelector, P.iframeSelector);
|
|
101
|
-
A && A.contains(v) && u();
|
|
102
|
-
}
|
|
103
|
-
}, m = setTimeout(() => {
|
|
104
|
-
document.body.addEventListener("mousedown", c, !0);
|
|
105
|
-
}, q + U);
|
|
106
|
-
return () => {
|
|
107
|
-
clearTimeout(m), document.body.removeEventListener("mousedown", c, !0);
|
|
108
|
-
};
|
|
109
|
-
}, [y, s, u]), $(() => {
|
|
110
|
-
W(0), g.current = null;
|
|
111
|
-
const r = M.current;
|
|
112
|
-
r && (r.style.maxWidth = `${x}px`, r.style.backgroundColor = h, r.style.color = E);
|
|
113
|
-
}, [x, h, E]), $(() => {
|
|
114
|
-
const r = s[y];
|
|
115
|
-
if (!r?.targetElementSelector) {
|
|
116
|
-
u?.();
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
const c = d ? document.querySelector(d) : null, m = M.current;
|
|
120
|
-
if (!m) return;
|
|
121
|
-
let b = null, v = null, w = null;
|
|
122
|
-
const T = !!(c && c.scrollHeight > c.clientHeight), P = {
|
|
123
|
-
height: c?.clientHeight || window.innerHeight,
|
|
124
|
-
width: c?.clientWidth || window.innerWidth
|
|
125
|
-
}, A = (D) => {
|
|
126
|
-
b = D, b.addEventListener("click", H);
|
|
127
|
-
const I = (t, o, f, e) => {
|
|
128
|
-
const p = r.tooltipPosition || "bottom-center", n = r.tooltipPositionOffset?.vertical || 0, i = r.tooltipPositionOffset?.horizontal || 0;
|
|
129
|
-
let l = 0, a = 0;
|
|
130
|
-
switch (p) {
|
|
131
|
-
case "bottom-center":
|
|
132
|
-
l = t.bottom + e.y + n, a = t.left + e.x + t.width / 2 + i;
|
|
133
|
-
break;
|
|
134
|
-
case "bottom-left":
|
|
135
|
-
l = t.bottom + e.y + n, a = t.left + e.x - o + i;
|
|
136
|
-
break;
|
|
137
|
-
case "bottom-right":
|
|
138
|
-
l = t.bottom + e.y + n, a = t.right + e.x + i;
|
|
139
|
-
break;
|
|
140
|
-
case "top-center":
|
|
141
|
-
l = t.top - f + e.y + n, a = t.left + e.x + t.width / 2 + i;
|
|
142
|
-
break;
|
|
143
|
-
case "top-left":
|
|
144
|
-
l = t.top - f + e.y + n, a = t.left + e.x - o + i;
|
|
145
|
-
break;
|
|
146
|
-
case "top-right":
|
|
147
|
-
l = t.top - f + e.y + n, a = t.right + e.x + i;
|
|
148
|
-
break;
|
|
149
|
-
case "left-top":
|
|
150
|
-
l = t.top - f + e.y + n, a = t.left + e.x - o + i;
|
|
151
|
-
break;
|
|
152
|
-
case "left-center":
|
|
153
|
-
l = t.top + e.y + t.height / 2 + n, a = t.left + e.x - o + i;
|
|
154
|
-
break;
|
|
155
|
-
case "left-bottom":
|
|
156
|
-
l = t.bottom + e.y + n, a = t.left + e.x - o + i;
|
|
157
|
-
break;
|
|
158
|
-
case "right-top":
|
|
159
|
-
l = t.top - f + e.y + n, a = t.right + e.x + i;
|
|
160
|
-
break;
|
|
161
|
-
case "right-center":
|
|
162
|
-
l = t.top + e.y + t.height / 2 + n, a = t.right + e.x + i;
|
|
163
|
-
break;
|
|
164
|
-
case "right-bottom":
|
|
165
|
-
l = t.bottom + e.y + n, a = t.right + e.x + i;
|
|
166
|
-
break;
|
|
167
|
-
default:
|
|
168
|
-
l = t.bottom + e.y + n, a = t.left + e.x + t.width / 2 + i;
|
|
169
|
-
break;
|
|
170
|
-
}
|
|
171
|
-
return {
|
|
172
|
-
top: l,
|
|
173
|
-
left: a
|
|
174
|
-
};
|
|
175
|
-
}, N = (t, o) => {
|
|
176
|
-
m.style.position = "absolute";
|
|
177
|
-
const f = () => {
|
|
178
|
-
m.style.top = `${t.top}px`, m.style.left = `${t.left}px`;
|
|
179
|
-
};
|
|
180
|
-
o && g.current ? (m.style.transition = `top ${q}ms ease-in-out, left ${q}ms ease-in-out`, f(), g.current = t) : (f(), g.current = t);
|
|
181
|
-
}, B = () => {
|
|
182
|
-
if (!m || !b) return;
|
|
183
|
-
const t = {
|
|
184
|
-
width: m.offsetWidth || 0,
|
|
185
|
-
height: m.offsetHeight || 0
|
|
186
|
-
};
|
|
187
|
-
if (t.width === 0 && t.height === 0) {
|
|
188
|
-
requestAnimationFrame(B);
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
const o = j(b, r.iframeSelector), f = z(), e = I(o, t.width, t.height, f), p = g.current !== null;
|
|
192
|
-
N(e, p);
|
|
193
|
-
};
|
|
194
|
-
w = lt(() => {
|
|
195
|
-
if (!b || !m) return;
|
|
196
|
-
const t = {
|
|
197
|
-
top: parseFloat(m.style.top) || 0,
|
|
198
|
-
left: parseFloat(m.style.left) || 0
|
|
199
|
-
};
|
|
200
|
-
!g.current && (t.top !== 0 || t.left !== 0) && (g.current = t), B(), g.current && setTimeout(() => {
|
|
201
|
-
const o = {
|
|
202
|
-
top: parseFloat(m.style.top) || 0,
|
|
203
|
-
left: parseFloat(m.style.left) || 0
|
|
204
|
-
};
|
|
205
|
-
(o.top !== 0 || o.left !== 0) && (g.current = o);
|
|
206
|
-
}, q);
|
|
207
|
-
}, U);
|
|
208
|
-
const K = (t, o, f, e, p) => {
|
|
209
|
-
const n = {
|
|
210
|
-
top: Math.min(t.top, o),
|
|
211
|
-
bottom: Math.max(t.bottom, o + p),
|
|
212
|
-
left: Math.min(t.left, f),
|
|
213
|
-
right: Math.max(t.right, f + e)
|
|
214
|
-
};
|
|
215
|
-
if (c) {
|
|
216
|
-
const i = c.getBoundingClientRect();
|
|
217
|
-
return n.top >= i.top + S && n.bottom <= i.top + i.height - S && n.left >= i.left + S && n.right <= i.left + i.width - S && t.width > 0 && t.height > 0;
|
|
218
|
-
}
|
|
219
|
-
return n.top >= S && n.bottom <= P.height - S && n.left >= S && n.right <= P.width - S && t.width > 0 && t.height > 0;
|
|
220
|
-
}, Q = (t, o, f) => {
|
|
221
|
-
const e = Math.min(t.top, o), p = Math.max(t.bottom, o + f), n = p - e, i = !!(c && T), l = i ? c.getBoundingClientRect() : null, a = i ? l.height : window.innerHeight, O = i ? c.scrollTop : z().y, R = i ? c.scrollHeight - c.clientHeight : document.documentElement.scrollHeight - window.innerHeight, tt = a - 2 * S;
|
|
222
|
-
let _;
|
|
223
|
-
if (n > tt) {
|
|
224
|
-
const L = (t.top + t.bottom) / 2;
|
|
225
|
-
_ = i ? L - l.top + O : L + O;
|
|
226
|
-
} else {
|
|
227
|
-
const L = (e + p) / 2;
|
|
228
|
-
_ = i ? L - l.top + O : L + O;
|
|
229
|
-
}
|
|
230
|
-
const et = _ - a / 2;
|
|
231
|
-
return Math.max(0, Math.min(et, R));
|
|
232
|
-
}, Z = () => {
|
|
233
|
-
if (!m || !b) return;
|
|
234
|
-
const t = () => {
|
|
235
|
-
if (!m || !b) return;
|
|
236
|
-
const o = {
|
|
237
|
-
width: m.offsetWidth || 0,
|
|
238
|
-
height: m.offsetHeight || 0
|
|
239
|
-
};
|
|
240
|
-
if (o.width === 0 && o.height === 0) {
|
|
241
|
-
requestAnimationFrame(t);
|
|
242
|
-
return;
|
|
243
|
-
}
|
|
244
|
-
const f = j(b, r.iframeSelector), e = z(), p = I(f, o.width, o.height, e), n = {
|
|
245
|
-
top: p.top - e.y,
|
|
246
|
-
left: p.left - e.x
|
|
247
|
-
};
|
|
248
|
-
if (K(f, n.top, n.left, o.width, o.height)) {
|
|
249
|
-
const l = g.current !== null;
|
|
250
|
-
N(p, l);
|
|
251
|
-
} else {
|
|
252
|
-
const l = Q(f, n.top, o.height);
|
|
253
|
-
if (l !== null)
|
|
254
|
-
(T && c ? c : window).scrollTo({
|
|
255
|
-
top: l,
|
|
256
|
-
behavior: "auto"
|
|
257
|
-
}), requestAnimationFrame(() => B());
|
|
258
|
-
else {
|
|
259
|
-
const a = g.current !== null;
|
|
260
|
-
N(p, a);
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
};
|
|
264
|
-
t();
|
|
265
|
-
};
|
|
266
|
-
if (window.addEventListener("scroll", w, {
|
|
267
|
-
passive: !0
|
|
268
|
-
}), T && c && c.addEventListener("scroll", w, {
|
|
269
|
-
passive: !0
|
|
270
|
-
}), r.iframeSelector) {
|
|
271
|
-
const o = V(r.iframeSelector)?.defaultView;
|
|
272
|
-
o && o.addEventListener("scroll", w, {
|
|
273
|
-
passive: !0
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
Z();
|
|
277
|
-
};
|
|
278
|
-
if (r.waitForElement)
|
|
279
|
-
v = at(r.targetElementSelector, A, r.iframeSelector);
|
|
280
|
-
else {
|
|
281
|
-
const D = C(r.targetElementSelector, r.iframeSelector);
|
|
282
|
-
if (!D) return;
|
|
283
|
-
A(D);
|
|
284
|
-
}
|
|
285
|
-
return () => {
|
|
286
|
-
if (v && v(), b && b.removeEventListener("click", H), w) {
|
|
287
|
-
if (window.removeEventListener("scroll", w), T && c && c.removeEventListener("scroll", w), r.iframeSelector) {
|
|
288
|
-
const I = V(r.iframeSelector)?.defaultView;
|
|
289
|
-
I && I.removeEventListener("scroll", w);
|
|
290
|
-
}
|
|
291
|
-
w.cancel();
|
|
292
|
-
}
|
|
293
|
-
};
|
|
294
|
-
}, [y, s, u, d, x]), y >= s.length)
|
|
295
|
-
return null;
|
|
296
|
-
const k = s[y], J = ct(k?.tooltipPosition), G = st[J];
|
|
297
|
-
return /* @__PURE__ */ nt(/* @__PURE__ */ F.createElement("div", {
|
|
298
|
-
ref: M,
|
|
299
|
-
className: "guided-tour-tooltip relative rounded-md p-1",
|
|
300
|
-
"data-automation-id": `${k?.automationId || "guided-tour"}-tooltip`,
|
|
28
|
+
return /* @__PURE__ */ e.createElement("div", {
|
|
29
|
+
ref: t,
|
|
30
|
+
className: `se-design-bottom-sheet relative h-max max-h-[98vh] rounded-t-2xl flex flex-col pt-5 ${i}`,
|
|
31
|
+
onClick: (o) => o.stopPropagation(),
|
|
32
|
+
onTouchStart: k,
|
|
33
|
+
onTouchMove: N,
|
|
34
|
+
onTouchEnd: y,
|
|
35
|
+
"data-automation-id": r,
|
|
301
36
|
style: {
|
|
302
|
-
|
|
37
|
+
minHeight: u
|
|
303
38
|
}
|
|
304
|
-
}, /* @__PURE__ */
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
className: "
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
39
|
+
}, (n || a) && /* @__PURE__ */ e.createElement("div", {
|
|
40
|
+
className: "se-design-bottom-sheet-header flex items-center justify-left gap-3 mr-6 px-4"
|
|
41
|
+
}, a && /* @__PURE__ */ e.createElement(v, {
|
|
42
|
+
name: "back",
|
|
43
|
+
stroke: "var(--color-gray-700)",
|
|
44
|
+
onClick: m,
|
|
45
|
+
className: "se-design-bottom-sheet-back-icon cursor-pointer",
|
|
46
|
+
automationId: `${r}-back-icon`
|
|
47
|
+
}), n && /* @__PURE__ */ e.createElement("div", {
|
|
48
|
+
className: "se-design-bottom-sheet-title text-lg font-semibold"
|
|
49
|
+
}, n)), l && /* @__PURE__ */ e.createElement(v, {
|
|
50
|
+
name: "close",
|
|
51
|
+
onClick: s,
|
|
52
|
+
className: "se-design-bottom-sheet-close-icon absolute top-6 right-4 cursor-pointer z-10",
|
|
53
|
+
automationId: `${r}-close-icon`
|
|
54
|
+
}), /* @__PURE__ */ e.createElement("div", {
|
|
55
|
+
className: "se-design-bottom-sheet-content px-4 pb-5 flex-1 min-h-0 overflow-y-auto"
|
|
56
|
+
}, c));
|
|
57
|
+
}, I = ({
|
|
58
|
+
isOpen: c = !1,
|
|
59
|
+
title: n = "",
|
|
60
|
+
onClose: s = () => {
|
|
61
|
+
},
|
|
62
|
+
children: l = null,
|
|
63
|
+
showCloseIcon: a = !0,
|
|
64
|
+
showBackButton: m = !1,
|
|
65
|
+
onBack: i = () => {
|
|
66
|
+
},
|
|
67
|
+
className: r = "",
|
|
68
|
+
automationId: u = "bottomsheet",
|
|
69
|
+
minHeight: t = ""
|
|
70
|
+
}) => /* @__PURE__ */ e.createElement(T, {
|
|
71
|
+
isOpen: c,
|
|
72
|
+
onClose: s,
|
|
73
|
+
onModalClick: s,
|
|
74
|
+
className: "custom-bottom-sheet",
|
|
75
|
+
renderModalContent: () => /* @__PURE__ */ e.createElement(C, {
|
|
76
|
+
title: n,
|
|
77
|
+
onClose: s,
|
|
78
|
+
showCloseIcon: a,
|
|
79
|
+
showBackButton: m,
|
|
80
|
+
onBack: i,
|
|
81
|
+
className: r,
|
|
82
|
+
automationId: u,
|
|
83
|
+
minHeight: t
|
|
84
|
+
}, l)
|
|
85
|
+
});
|
|
318
86
|
export {
|
|
319
|
-
|
|
87
|
+
I as BottomSheet
|
|
320
88
|
};
|
|
321
89
|
//# sourceMappingURL=index63.js.map
|
package/dist/index63.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index63.js","sources":["../src/components/GuidedTour/index.tsx"],"sourcesContent":["import React, { FC, useEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { Icon, RotationTypes } from '../Icon';\nimport { Button } from '../Button';\nimport { debounce } from 'src/utils/debounce';\n\n// Constants\nconst ANIMATION_DURATION_MS = 500;\nconst VIEWPORT_MARGIN_PX = 50;\nconst SCROLL_DEBOUNCE_MS = 150;\n\nconst ARROW_STYLES = {\n 'top-left': { rotate: '315', class: '-top-5 left-0' },\n 'top-right': { rotate: '45', class: '-top-5 right-0' },\n 'bottom-left': { rotate: '225', class: '-bottom-5 left-0' },\n 'bottom-right': { rotate: '135', class: '-bottom-5 right-0' }\n};\n\nexport type TooltipArrowPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';\n\nexport interface GuidedTourStep {\n targetElementSelector: string;\n iframeSelector?: string;\n content: string;\n tooltipPosition?:\n | 'top-left'\n | 'top-right'\n | 'top-center'\n | 'bottom-left'\n | 'bottom-right'\n | 'bottom-center'\n | 'left-top'\n | 'left-center'\n | 'left-bottom'\n | 'right-top'\n | 'right-center'\n | 'right-bottom';\n tooltipPositionOffset?: {\n horizontal?: number;\n vertical?: number;\n };\n isOptionalStep?: boolean;\n automationId?: string;\n waitForElement?: boolean;\n zIndex?: number;\n isDropdownStep?: boolean;\n}\n\nexport interface GuidedTourProps {\n steps: GuidedTourStep[];\n screenBaseElementSelector?: string;\n onClose: () => void;\n tooltipBackgroundColor?: string;\n tooltipTextColor?: string;\n maxWidth?: number;\n automationId?: string;\n}\n\ninterface TooltipPosition {\n top: number;\n left: number;\n}\n\n// Helper to get the iframe's content document\nconst getIframeDocument = (iframeSelector: string): Document | null => {\n const iframe = document.querySelector(iframeSelector) as HTMLIFrameElement;\n if (!iframe) {\n console.warn(`Iframe not found: ${iframeSelector}`);\n return null;\n }\n\n try {\n return iframe.contentDocument || iframe.contentWindow?.document || null;\n } catch (error) {\n console.error('Cannot access iframe document:', error);\n return null;\n }\n};\n\n// Helper to get target element from main document or iframe\nconst getTargetElement = (selector: string, iframeSelector?: string): HTMLElement | null => {\n if (!iframeSelector) {\n return document.querySelector(selector);\n }\n\n const iframeDoc = getIframeDocument(iframeSelector);\n return iframeDoc ? iframeDoc.querySelector(selector) : null;\n};\n\n// Helper to get adjusted bounding rect accounting for iframe position\nconst getAdjustedBoundingRect = (element: HTMLElement, iframeSelector?: string): DOMRect => {\n const rect = element.getBoundingClientRect();\n\n if (!iframeSelector) {\n return rect;\n }\n\n const iframe = document.querySelector(iframeSelector) as HTMLIFrameElement;\n if (!iframe) {\n return rect;\n }\n\n const iframeRect = iframe.getBoundingClientRect();\n\n // Get iframe's computed styles to account for borders\n const borderLeft = iframe.clientLeft || 0;\n const borderTop = iframe.clientTop || 0;\n\n // Adjust coordinates relative to the main document\n return new DOMRect(\n rect.left + iframeRect.left + borderLeft,\n rect.top + iframeRect.top + borderTop,\n rect.width,\n rect.height\n );\n};\n\n// Determines the arrow position based on the tooltip position\nconst getArrowPosition = (position?: GuidedTourStep['tooltipPosition']): TooltipArrowPosition => {\n switch (position) {\n case 'left-bottom':\n case 'left-center':\n case 'bottom-left':\n return 'top-right';\n case 'right-bottom':\n case 'right-center':\n case 'bottom-right':\n case 'bottom-center':\n return 'top-left';\n case 'top-left':\n case 'left-top':\n return 'bottom-right';\n case 'top-right':\n case 'top-center':\n case 'right-top':\n return 'bottom-left';\n default:\n return 'top-left';\n }\n};\n\n// Gets current scroll position for window or container\nconst getScrollPosition = (): { x: number; y: number } => ({\n x: window.scrollX || window.pageXOffset,\n y: window.scrollY || window.pageYOffset\n});\n\n// Helper to wait for an element to appear using requestAnimationFrame\nconst waitForElement = (\n selector: string,\n callback: (element: HTMLElement) => void,\n iframeSelector?: string\n): (() => void) => {\n let rafId: number;\n\n const checkElement = () => {\n const element = getTargetElement(selector, iframeSelector);\n if (element) {\n callback(element);\n } else {\n rafId = requestAnimationFrame(checkElement);\n }\n };\n\n rafId = requestAnimationFrame(checkElement);\n\n // Return cleanup function\n return () => {\n if (rafId) {\n cancelAnimationFrame(rafId);\n }\n };\n};\n\nexport const GuidedTour: FC<GuidedTourProps> = ({\n steps,\n screenBaseElementSelector,\n onClose,\n tooltipBackgroundColor = '#E04E05',\n tooltipTextColor = 'var(--color-white)',\n maxWidth = 350\n}) => {\n const [currentStepIndex, setCurrentStepIndex] = useState<number>(0);\n const previousTooltipPositionRef = useRef<TooltipPosition | null>(null);\n const tooltipRef = useRef<HTMLDivElement>(null);\n\n // To handle navigation to the next step\n const navigateToNextStep = () => {\n if (currentStepIndex < steps.length - 1) {\n setCurrentStepIndex(currentStepIndex + 1);\n } else {\n onClose?.();\n }\n };\n\n const handleTargetElementClick = () => {\n navigateToNextStep();\n };\n\n // To handle clicks outside current target\n useEffect(() => {\n const currentStep = steps[currentStepIndex];\n\n const handleBodyClick = (event: MouseEvent) => {\n const target = event.target as Node;\n const currentTargetElement = getTargetElement(currentStep?.targetElementSelector, currentStep?.iframeSelector);\n const tooltipElement = tooltipRef.current;\n\n // Ignore clicks on the tooltip itself\n if (tooltipElement && tooltipElement.contains(target)) {\n return;\n }\n\n // Check if click is outside current target element\n if (currentTargetElement && !currentTargetElement.contains(target)) {\n // If dropdown step, go to next step on any outside click\n if (currentStep?.isDropdownStep) {\n navigateToNextStep();\n return;\n }\n\n // Otherwise, check if click is on last step's target to close tour\n const lastStep = steps[steps.length - 1];\n const lastStepTargetElement = getTargetElement(lastStep.targetElementSelector, lastStep.iframeSelector);\n\n if (lastStepTargetElement && lastStepTargetElement.contains(target)) {\n onClose();\n }\n }\n };\n\n // Wait for tooltip positioning animation to complete before listening\n const timeoutId = setTimeout(() => {\n document.body.addEventListener('mousedown', handleBodyClick, true);\n }, ANIMATION_DURATION_MS + SCROLL_DEBOUNCE_MS);\n\n return () => {\n clearTimeout(timeoutId);\n document.body.removeEventListener('mousedown', handleBodyClick, true);\n };\n }, [currentStepIndex, steps, onClose]);\n\n // Initialize tooltip styles\n useEffect(() => {\n setCurrentStepIndex(0);\n previousTooltipPositionRef.current = null;\n\n const tooltipElement = tooltipRef.current;\n if (tooltipElement) {\n tooltipElement.style.maxWidth = `${maxWidth}px`;\n tooltipElement.style.backgroundColor = tooltipBackgroundColor;\n tooltipElement.style.color = tooltipTextColor;\n }\n }, [maxWidth, tooltipBackgroundColor, tooltipTextColor]);\n\n // To position and manage the current step\n useEffect(() => {\n const currentStep = steps[currentStepIndex];\n\n if (!currentStep?.targetElementSelector) {\n onClose?.();\n return;\n }\n\n const scrollableContainer = screenBaseElementSelector\n ? (document.querySelector(screenBaseElementSelector) as HTMLElement)\n : null;\n\n const tooltipElement = tooltipRef.current;\n if (!tooltipElement) return;\n\n let targetElement: HTMLElement | null = null;\n let cleanupWait: (() => void) | null = null;\n let handleScroll: (ReturnType<typeof debounce> & (() => void)) | null = null;\n\n const hasScrollableContainer = Boolean(\n scrollableContainer && scrollableContainer.scrollHeight > scrollableContainer.clientHeight\n );\n\n const viewportDimensions = {\n height: scrollableContainer?.clientHeight || window.innerHeight,\n width: scrollableContainer?.clientWidth || window.innerWidth\n };\n\n const initializeStep = (element: HTMLElement) => {\n targetElement = element;\n targetElement.addEventListener('click', handleTargetElementClick);\n\n // To calculate the tooltip position relative to the target element\n const calculateTooltipPosition = (\n targetRect: DOMRect,\n tooltipWidth: number,\n tooltipHeight: number,\n scroll: { x: number; y: number }\n ): TooltipPosition => {\n const position = currentStep.tooltipPosition || 'bottom-center';\n const offsetVertical = currentStep.tooltipPositionOffset?.vertical || 0;\n const offsetHorizontal = currentStep.tooltipPositionOffset?.horizontal || 0;\n\n let top = 0;\n let left = 0;\n\n // To calculate the position based on the tooltip position prop and the offset\n switch (position) {\n case 'bottom-center':\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x + targetRect.width / 2 + offsetHorizontal;\n break;\n case 'bottom-left':\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x - tooltipWidth + offsetHorizontal;\n break;\n case 'bottom-right':\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.right + scroll.x + offsetHorizontal;\n break;\n case 'top-center':\n top = targetRect.top - tooltipHeight + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x + targetRect.width / 2 + offsetHorizontal;\n break;\n case 'top-left':\n top = targetRect.top - tooltipHeight + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x - tooltipWidth + offsetHorizontal;\n break;\n case 'top-right':\n top = targetRect.top - tooltipHeight + scroll.y + offsetVertical;\n left = targetRect.right + scroll.x + offsetHorizontal;\n break;\n case 'left-top':\n top = targetRect.top - tooltipHeight + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x - tooltipWidth + offsetHorizontal;\n break;\n case 'left-center':\n top = targetRect.top + scroll.y + targetRect.height / 2 + offsetVertical;\n left = targetRect.left + scroll.x - tooltipWidth + offsetHorizontal;\n break;\n case 'left-bottom':\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x - tooltipWidth + offsetHorizontal;\n break;\n case 'right-top':\n top = targetRect.top - tooltipHeight + scroll.y + offsetVertical;\n left = targetRect.right + scroll.x + offsetHorizontal;\n break;\n case 'right-center':\n top = targetRect.top + scroll.y + targetRect.height / 2 + offsetVertical;\n left = targetRect.right + scroll.x + offsetHorizontal;\n break;\n case 'right-bottom':\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.right + scroll.x + offsetHorizontal;\n break;\n default:\n top = targetRect.bottom + scroll.y + offsetVertical;\n left = targetRect.left + scroll.x + targetRect.width / 2 + offsetHorizontal;\n break;\n }\n\n return { top, left };\n };\n\n // To apply the position to the tooltip with optional animation\n const applyTooltipPosition = (position: TooltipPosition, shouldAnimate: boolean) => {\n tooltipElement.style.position = 'absolute';\n\n const applyStyles = () => {\n tooltipElement.style.top = `${position.top}px`;\n tooltipElement.style.left = `${position.left}px`;\n };\n\n if (shouldAnimate && previousTooltipPositionRef.current) {\n // Animate to new position immediately\n tooltipElement.style.transition = `top ${ANIMATION_DURATION_MS}ms ease-in-out, left ${ANIMATION_DURATION_MS}ms ease-in-out`;\n applyStyles();\n previousTooltipPositionRef.current = position;\n } else {\n // Direct positioning without animation for first time\n applyStyles();\n previousTooltipPositionRef.current = position;\n }\n };\n\n const positionTooltip = () => {\n if (!tooltipElement || !targetElement) return;\n\n // Wait for tooltip to be rendered with valid dimensions\n const tooltipDimensions = {\n width: tooltipElement.offsetWidth || 0,\n height: tooltipElement.offsetHeight || 0\n };\n\n if (tooltipDimensions.width === 0 && tooltipDimensions.height === 0) {\n requestAnimationFrame(positionTooltip);\n return;\n }\n\n const targetRect = getAdjustedBoundingRect(targetElement, currentStep.iframeSelector);\n const scroll = getScrollPosition();\n const position = calculateTooltipPosition(\n targetRect,\n tooltipDimensions.width,\n tooltipDimensions.height,\n scroll\n );\n\n const shouldAnimate = previousTooltipPositionRef.current !== null;\n applyTooltipPosition(position, shouldAnimate);\n };\n\n // To handle scroll events with debouncing to prevent excessive repositioning\n handleScroll = debounce(() => {\n if (!targetElement || !tooltipElement) return;\n\n // Preserve current position for animation\n const currentPosition = {\n top: parseFloat(tooltipElement.style.top) || 0,\n left: parseFloat(tooltipElement.style.left) || 0\n };\n\n if (!previousTooltipPositionRef.current && (currentPosition.top !== 0 || currentPosition.left !== 0)) {\n previousTooltipPositionRef.current = currentPosition;\n }\n\n positionTooltip();\n\n // Update reference after animation completes\n if (previousTooltipPositionRef.current) {\n setTimeout(() => {\n const finalPosition = {\n top: parseFloat(tooltipElement.style.top) || 0,\n left: parseFloat(tooltipElement.style.left) || 0\n };\n if (finalPosition.top !== 0 || finalPosition.left !== 0) {\n previousTooltipPositionRef.current = finalPosition;\n }\n }, ANIMATION_DURATION_MS);\n }\n }, SCROLL_DEBOUNCE_MS);\n\n // Checks if both target and tooltip are fully visible in viewport\n const areElementsVisible = (\n targetRect: DOMRect,\n tooltipTopViewport: number,\n tooltipLeftViewport: number,\n tooltipWidth: number,\n tooltipHeight: number\n ): boolean => {\n const combinedBoundingBox = {\n top: Math.min(targetRect.top, tooltipTopViewport),\n bottom: Math.max(targetRect.bottom, tooltipTopViewport + tooltipHeight),\n left: Math.min(targetRect.left, tooltipLeftViewport),\n right: Math.max(targetRect.right, tooltipLeftViewport + tooltipWidth)\n };\n\n if (scrollableContainer) {\n const containerRect = scrollableContainer.getBoundingClientRect();\n return (\n combinedBoundingBox.top >= containerRect.top + VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.bottom <= containerRect.top + containerRect.height - VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.left >= containerRect.left + VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.right <= containerRect.left + containerRect.width - VIEWPORT_MARGIN_PX &&\n targetRect.width > 0 &&\n targetRect.height > 0\n );\n }\n\n return (\n combinedBoundingBox.top >= VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.bottom <= viewportDimensions.height - VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.left >= VIEWPORT_MARGIN_PX &&\n combinedBoundingBox.right <= viewportDimensions.width - VIEWPORT_MARGIN_PX &&\n targetRect.width > 0 &&\n targetRect.height > 0\n );\n };\n\n // Calculates the scroll position needed to make both target and tooltip in viewport\n const calculateScrollToCenter = (\n targetRect: DOMRect,\n tooltipTopViewport: number,\n tooltipHeight: number\n ): number | null => {\n const combinedTop = Math.min(targetRect.top, tooltipTopViewport);\n const combinedBottom = Math.max(targetRect.bottom, tooltipTopViewport + tooltipHeight);\n const combinedHeight = combinedBottom - combinedTop;\n\n // Determine scroll context (container or window)\n const isContainer = Boolean(scrollableContainer && hasScrollableContainer);\n const containerRect = isContainer ? scrollableContainer!.getBoundingClientRect() : null;\n\n const viewportHeight = isContainer ? containerRect!.height : window.innerHeight;\n const currentScroll = isContainer ? scrollableContainer!.scrollTop : getScrollPosition().y;\n const maxScroll = isContainer\n ? scrollableContainer!.scrollHeight - scrollableContainer!.clientHeight\n : document.documentElement.scrollHeight - window.innerHeight;\n\n const availableHeight = viewportHeight - 2 * VIEWPORT_MARGIN_PX;\n\n // To calculate the center point\n let centerPoint: number;\n\n if (combinedHeight > availableHeight) {\n // Combined area too tall - center the target element only\n const targetCenter = (targetRect.top + targetRect.bottom) / 2;\n centerPoint = isContainer ? targetCenter - containerRect!.top + currentScroll : targetCenter + currentScroll;\n } else {\n // Center the combined area (target + tooltip)\n const combinedCenter = (combinedTop + combinedBottom) / 2;\n centerPoint = isContainer\n ? combinedCenter - containerRect!.top + currentScroll\n : combinedCenter + currentScroll;\n }\n\n // Calculate final scroll position and clamp to valid range\n const scrollPosition = centerPoint - viewportHeight / 2;\n return Math.max(0, Math.min(scrollPosition, maxScroll));\n };\n\n // To initialize the tooltip positioning and handle scrolling if needed\n const initializeTooltip = () => {\n if (!tooltipElement || !targetElement) return;\n\n const waitForDimensions = () => {\n if (!tooltipElement || !targetElement) return;\n\n const tooltipDimensions = {\n width: tooltipElement.offsetWidth || 0,\n height: tooltipElement.offsetHeight || 0\n };\n\n if (tooltipDimensions.width === 0 && tooltipDimensions.height === 0) {\n requestAnimationFrame(waitForDimensions);\n return;\n }\n\n const targetRect = getAdjustedBoundingRect(targetElement, currentStep.iframeSelector);\n const scroll = getScrollPosition();\n\n // Calculate tooltip position in absolute coordinates\n const tooltipAbsolutePosition = calculateTooltipPosition(\n targetRect,\n tooltipDimensions.width,\n tooltipDimensions.height,\n scroll\n );\n\n // Convert to viewport coordinates for visibility check\n const tooltipViewportPosition = {\n top: tooltipAbsolutePosition.top - scroll.y,\n left: tooltipAbsolutePosition.left - scroll.x\n };\n\n // Check if both elements are visible\n const isVisible = areElementsVisible(\n targetRect,\n tooltipViewportPosition.top,\n tooltipViewportPosition.left,\n tooltipDimensions.width,\n tooltipDimensions.height\n );\n\n if (!isVisible) {\n // Calculate scroll needed to make both visible\n const requiredScrollY = calculateScrollToCenter(\n targetRect,\n tooltipViewportPosition.top,\n tooltipDimensions.height\n );\n\n if (requiredScrollY !== null) {\n const scrollElement = hasScrollableContainer && scrollableContainer ? scrollableContainer : window;\n scrollElement.scrollTo({ top: requiredScrollY, behavior: 'auto' });\n\n // Position tooltip immediately after instant scroll\n requestAnimationFrame(() => positionTooltip());\n } else {\n // Cannot fit with scrolling, position anyway\n const shouldAnimate = previousTooltipPositionRef.current !== null;\n applyTooltipPosition(tooltipAbsolutePosition, shouldAnimate);\n }\n } else {\n // Both are visible, position tooltip\n const shouldAnimate = previousTooltipPositionRef.current !== null;\n applyTooltipPosition(tooltipAbsolutePosition, shouldAnimate);\n }\n };\n\n waitForDimensions();\n };\n\n window.addEventListener('scroll', handleScroll, { passive: true });\n if (hasScrollableContainer && scrollableContainer) {\n scrollableContainer.addEventListener('scroll', handleScroll, { passive: true });\n }\n\n // Add scroll listener for iframe if target is inside iframe\n if (currentStep.iframeSelector) {\n const iframeDoc = getIframeDocument(currentStep.iframeSelector);\n const iframeWindow = iframeDoc?.defaultView;\n if (iframeWindow) {\n iframeWindow.addEventListener('scroll', handleScroll, { passive: true });\n }\n }\n\n initializeTooltip();\n };\n\n // Check if we need to wait for the element or get it immediately\n if (currentStep.waitForElement) {\n // Wait for element to appear\n cleanupWait = waitForElement(currentStep.targetElementSelector, initializeStep, currentStep.iframeSelector);\n } else {\n const element = getTargetElement(currentStep.targetElementSelector, currentStep.iframeSelector);\n if (!element) return;\n initializeStep(element);\n }\n\n return () => {\n if (cleanupWait) {\n cleanupWait();\n }\n if (targetElement) {\n targetElement.removeEventListener('click', handleTargetElementClick);\n }\n if (handleScroll) {\n window.removeEventListener('scroll', handleScroll);\n if (hasScrollableContainer && scrollableContainer) {\n scrollableContainer.removeEventListener('scroll', handleScroll);\n }\n // Clean up iframe scroll listener\n if (currentStep.iframeSelector) {\n const iframeDoc = getIframeDocument(currentStep.iframeSelector);\n const iframeWindow = iframeDoc?.defaultView;\n if (iframeWindow) {\n iframeWindow.removeEventListener('scroll', handleScroll);\n }\n }\n // Cancel any pending debounced calls\n (handleScroll as ReturnType<typeof debounce> & (() => void)).cancel();\n }\n };\n }, [currentStepIndex, steps, onClose, screenBaseElementSelector, maxWidth]);\n\n // Don't render if all steps completed\n if (currentStepIndex >= steps.length) {\n return null;\n }\n\n const currentStep = steps[currentStepIndex];\n const arrowPosition = getArrowPosition(currentStep?.tooltipPosition);\n const arrowStyle = ARROW_STYLES[arrowPosition];\n\n return createPortal(\n <div\n ref={tooltipRef}\n className={`guided-tour-tooltip relative rounded-md p-1`}\n data-automation-id={`${currentStep?.automationId || 'guided-tour'}-tooltip`}\n style={{ zIndex: currentStep?.zIndex || 1300 }}\n >\n <Icon\n name=\"arrow-head\"\n fill={tooltipBackgroundColor}\n rotation={arrowStyle.rotate as RotationTypes}\n className={`guided-tour-tooltip-arrow absolute ${arrowStyle.class}`}\n />\n <div className=\"guided-tour-tooltip-content flex flex-col gap-2\">\n <p>{currentStep?.content}</p>\n {currentStep?.isOptionalStep && (\n <Button type=\"link\" label=\"Got it\" className=\"!text-white !underline\" onClick={handleTargetElementClick} />\n )}\n </div>\n </div>,\n document.body\n );\n};\n"],"names":["ANIMATION_DURATION_MS","VIEWPORT_MARGIN_PX","SCROLL_DEBOUNCE_MS","ARROW_STYLES","rotate","class","getIframeDocument","iframeSelector","iframe","document","querySelector","console","warn","contentDocument","contentWindow","error","getTargetElement","selector","iframeDoc","getAdjustedBoundingRect","element","rect","getBoundingClientRect","iframeRect","borderLeft","clientLeft","borderTop","clientTop","DOMRect","left","top","width","height","getArrowPosition","position","getScrollPosition","x","window","scrollX","pageXOffset","y","scrollY","pageYOffset","waitForElement","callback","rafId","checkElement","requestAnimationFrame","cancelAnimationFrame","GuidedTour","steps","screenBaseElementSelector","onClose","tooltipBackgroundColor","tooltipTextColor","maxWidth","currentStepIndex","setCurrentStepIndex","useState","previousTooltipPositionRef","useRef","tooltipRef","navigateToNextStep","length","handleTargetElementClick","useEffect","currentStep","handleBodyClick","event","target","currentTargetElement","targetElementSelector","tooltipElement","current","contains","isDropdownStep","lastStep","lastStepTargetElement","timeoutId","setTimeout","body","addEventListener","clearTimeout","removeEventListener","style","backgroundColor","color","scrollableContainer","targetElement","cleanupWait","handleScroll","hasScrollableContainer","Boolean","scrollHeight","clientHeight","viewportDimensions","innerHeight","clientWidth","innerWidth","initializeStep","calculateTooltipPosition","targetRect","tooltipWidth","tooltipHeight","scroll","tooltipPosition","offsetVertical","tooltipPositionOffset","vertical","offsetHorizontal","horizontal","bottom","right","applyTooltipPosition","shouldAnimate","applyStyles","transition","positionTooltip","tooltipDimensions","offsetWidth","offsetHeight","debounce","currentPosition","parseFloat","finalPosition","areElementsVisible","tooltipTopViewport","tooltipLeftViewport","combinedBoundingBox","Math","min","max","containerRect","calculateScrollToCenter","combinedTop","combinedBottom","combinedHeight","isContainer","viewportHeight","currentScroll","scrollTop","maxScroll","documentElement","availableHeight","centerPoint","targetCenter","combinedCenter","scrollPosition","initializeTooltip","waitForDimensions","tooltipAbsolutePosition","tooltipViewportPosition","requiredScrollY","scrollElement","scrollTo","behavior","passive","iframeWindow","defaultView","cancel","arrowPosition","arrowStyle","createPortal","React","createElement","ref","className","automationId","zIndex","Icon","name","fill","rotation","content","isOptionalStep","Button","type","label","onClick"],"mappings":";;;;;AAOA,MAAMA,IAAwB,KACxBC,IAAqB,IACrBC,IAAqB,KAErBC,KAAe;AAAA,EACnB,YAAY;AAAA,IAAEC,QAAQ;AAAA,IAAOC,OAAO;AAAA,EAAA;AAAA,EACpC,aAAa;AAAA,IAAED,QAAQ;AAAA,IAAMC,OAAO;AAAA,EAAA;AAAA,EACpC,eAAe;AAAA,IAAED,QAAQ;AAAA,IAAOC,OAAO;AAAA,EAAA;AAAA,EACvC,gBAAgB;AAAA,IAAED,QAAQ;AAAA,IAAOC,OAAO;AAAA,EAAA;AAC1C,GAgDMC,IAAoBA,CAACC,MAA4C;AACrE,QAAMC,IAASC,SAASC,cAAcH,CAAc;AACpD,MAAI,CAACC;AACHG,mBAAQC,KAAK,qBAAqBL,CAAc,E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AC3B3G,GAAa4G,kBACZX,gBAAAA,EAAAC,cAACW,IAAM;AAAA,IAACC,MAAK;AAAA,IAAOC,OAAM;AAAA,IAASX,WAAU;AAAA,IAAyBY,SAASlH;AAAAA,EAAAA,CAA2B,CAEzG,CACF,GACLvD,SAASuE,IACX;AACF;"}
|
|
1
|
+
{"version":3,"file":"index63.js","sources":["../src/components/BottomSheet/index.tsx"],"sourcesContent":["import React, { FC, useState, useRef } from 'react';\nimport { CustomModal } from '../CustomModal';\nimport { Icon } from '../Icon';\n\nimport './style.scss';\n\nexport interface BottomSheetProps {\n isOpen: boolean;\n title?: string;\n onClose: () => void;\n showCloseIcon?: boolean;\n showBackButton?: boolean;\n onBack?: () => void;\n children: React.ReactNode;\n className?: string;\n automationId?: string;\n minHeight?: string;\n}\n\ninterface BottomSheetContentProps {\n title?: string;\n onClose: () => void;\n showCloseIcon?: boolean;\n showBackButton?: boolean;\n onBack?: () => void;\n children: React.ReactNode;\n className?: string;\n automationId?: string;\n minHeight?: string;\n}\n\nconst BottomSheetContent: FC<BottomSheetContentProps> = ({\n children = null,\n title = '',\n onClose = () => {},\n showCloseIcon = false,\n showBackButton = false,\n onBack = () => {},\n className = '',\n automationId = '',\n minHeight = 'auto'\n}) => {\n const contentRef = useRef<HTMLDivElement>(null);\n const [startY, setStartY] = useState<number>(0);\n const [currentY, setCurrentY] = useState<number>(0);\n const [isDragging, setIsDragging] = useState<boolean>(false);\n\n const handleTouchStart = (e: React.TouchEvent) => {\n setStartY(e.touches[0].clientY);\n setCurrentY(e.touches[0].clientY);\n setIsDragging(true);\n };\n\n const handleTouchMove = (e: React.TouchEvent) => {\n if (!isDragging) return;\n\n const touchY = e.touches[0].clientY;\n const deltaY = touchY - startY;\n\n // Only allow dragging down\n if (deltaY > 0) {\n setCurrentY(touchY);\n if (contentRef.current) {\n contentRef.current.style.transform = `translateY(${deltaY}px)`;\n }\n }\n };\n\n const handleTouchEnd = () => {\n if (!isDragging) return;\n\n const deltaY = currentY - startY;\n const threshold = 60; // pixels to swipe down to trigger close\n\n if (deltaY > threshold) {\n // Trigger close\n onClose();\n } else {\n // Reset position\n if (contentRef.current) {\n contentRef.current.style.transform = 'translateY(0)';\n }\n }\n\n setIsDragging(false);\n setStartY(0);\n setCurrentY(0);\n };\n\n return (\n <div\n ref={contentRef}\n className={`se-design-bottom-sheet relative h-max max-h-[98vh] rounded-t-2xl flex flex-col pt-5 ${className}`}\n onClick={(e) => e.stopPropagation()}\n onTouchStart={handleTouchStart}\n onTouchMove={handleTouchMove}\n onTouchEnd={handleTouchEnd}\n data-automation-id={automationId}\n style={{ minHeight }}\n >\n {(title || showBackButton) && (\n <div className=\"se-design-bottom-sheet-header flex items-center justify-left gap-3 mr-6 px-4\">\n {showBackButton && (\n <Icon\n name=\"back\"\n stroke=\"var(--color-gray-700)\"\n onClick={onBack}\n className=\"se-design-bottom-sheet-back-icon cursor-pointer\"\n automationId={`${automationId}-back-icon`}\n />\n )}\n {title && <div className=\"se-design-bottom-sheet-title text-lg font-semibold\">{title}</div>}\n </div>\n )}\n {showCloseIcon && (\n <Icon\n name=\"close\"\n onClick={onClose}\n className=\"se-design-bottom-sheet-close-icon absolute top-6 right-4 cursor-pointer z-10\"\n automationId={`${automationId}-close-icon`}\n />\n )}\n <div className=\"se-design-bottom-sheet-content px-4 pb-5 flex-1 min-h-0 overflow-y-auto\">{children}</div>\n </div>\n );\n};\n\nexport const BottomSheet: FC<BottomSheetProps> = ({\n isOpen = false,\n title = '',\n onClose = () => {},\n children = null,\n showCloseIcon = true,\n showBackButton = false,\n onBack = () => {},\n className = '',\n automationId = 'bottomsheet',\n minHeight = ''\n}) => {\n return (\n <CustomModal\n isOpen={isOpen}\n onClose={onClose}\n onModalClick={onClose}\n className=\"custom-bottom-sheet\"\n renderModalContent={() => (\n <BottomSheetContent\n title={title}\n onClose={onClose}\n showCloseIcon={showCloseIcon}\n showBackButton={showBackButton}\n onBack={onBack}\n className={className}\n automationId={automationId}\n minHeight={minHeight}\n >\n {children}\n </BottomSheetContent>\n )}\n />\n );\n};\n"],"names":["BottomSheetContent","children","title","onClose","showCloseIcon","showBackButton","onBack","className","automationId","minHeight","contentRef","useRef","startY","setStartY","useState","currentY","setCurrentY","isDragging","setIsDragging","handleTouchStart","e","touches","clientY","handleTouchMove","touchY","deltaY","current","style","transform","handleTouchEnd","React","createElement","ref","onClick","stopPropagation","onTouchStart","onTouchMove","onTouchEnd","Icon","name","stroke","BottomSheet","isOpen","CustomModal","onModalClick","renderModalContent"],"mappings":";;;;AA+BA,MAAMA,IAAkDA,CAAC;AAAA,EACvDC,UAAAA,IAAW;AAAA,EACXC,OAAAA,IAAQ;AAAA,EACRC,SAAAA,IAAUA,MAAM;AAAA,EAAC;AAAA,EACjBC,eAAAA,IAAgB;AAAA,EAChBC,gBAAAA,IAAiB;AAAA,EACjBC,QAAAA,IAASA,MAAM;AAAA,EAAC;AAAA,EAChBC,WAAAA,IAAY;AAAA,EACZC,cAAAA,IAAe;AAAA,EACfC,WAAAA,IAAY;AACd,MAAM;AACJ,QAAMC,IAAaC,EAAuB,IAAI,GACxC,CAACC,GAAQC,CAAS,IAAIC,EAAiB,CAAC,GACxC,CAACC,GAAUC,CAAW,IAAIF,EAAiB,CAAC,GAC5C,CAACG,GAAYC,CAAa,IAAIJ,EAAkB,EAAK,GAErDK,IAAmBA,CAACC,MAAwB;AAChDP,IAAAA,EAAUO,EAAEC,QAAQ,CAAC,EAAEC,OAAO,GAC9BN,EAAYI,EAAEC,QAAQ,CAAC,EAAEC,OAAO,GAChCJ,EAAc,EAAI;AAAA,EACpB,GAEMK,IAAkBA,CAACH,MAAwB;AAC/C,QAAI,CAACH,EAAY;AAEjB,UAAMO,IAASJ,EAAEC,QAAQ,CAAC,EAAEC,SACtBG,IAASD,IAASZ;AAGxB,IAAIa,IAAS,MACXT,EAAYQ,CAAM,GACdd,EAAWgB,YACbhB,EAAWgB,QAAQC,MAAMC,YAAY,cAAcH,CAAM;AAAA,EAG/D,GAEMI,IAAiB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