@local-logic/sdks-app 1.0.0-beta.52 → 1.0.0-beta.53
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/{chevron_right.ec5f150c.js → chevron_right.f4a05ecb.js} +6 -6
- package/dist/assets/index.039c8af5.js +156 -0
- package/dist/assets/index.8143f5fa.js +183 -0
- package/dist/assets/{index.a0d0f2b6.js → index.bd887e31.js} +356 -314
- package/dist/index.html +1 -1
- package/dist/types/components/AnimateHeight/index.d.ts +10 -0
- package/dist/types/components/AnimateHeight/index.d.ts.map +1 -0
- package/dist/types/components/AnimateHeight/index.js +22 -0
- package/dist/types/components/AnimateHeight/index.js.map +1 -0
- package/dist/types/components/AnimateHeight/styles.d.ts +2 -0
- package/dist/types/components/AnimateHeight/styles.d.ts.map +1 -0
- package/dist/types/components/AnimateHeight/styles.js +6 -0
- package/dist/types/components/AnimateHeight/styles.js.map +1 -0
- package/dist/types/features/geocodes/index.d.ts +3 -0
- package/dist/types/features/geocodes/index.d.ts.map +1 -0
- package/dist/types/features/geocodes/index.js +3 -0
- package/dist/types/features/geocodes/index.js.map +1 -0
- package/dist/types/features/geocodes/keyFactory.d.ts +11 -0
- package/dist/types/features/geocodes/keyFactory.d.ts.map +1 -0
- package/dist/types/features/geocodes/keyFactory.js +5 -0
- package/dist/types/features/geocodes/keyFactory.js.map +1 -0
- package/dist/types/features/geocodes/types.d.ts +11 -0
- package/dist/types/features/geocodes/types.d.ts.map +1 -0
- package/dist/types/features/geocodes/types.js +2 -0
- package/dist/types/features/geocodes/types.js.map +1 -0
- package/dist/types/features/reverse-geocodes/index.d.ts +3 -0
- package/dist/types/features/reverse-geocodes/index.d.ts.map +1 -0
- package/dist/types/features/reverse-geocodes/index.js +3 -0
- package/dist/types/features/reverse-geocodes/index.js.map +1 -0
- package/dist/types/features/reverse-geocodes/keyFactory.d.ts +13 -0
- package/dist/types/features/reverse-geocodes/keyFactory.d.ts.map +1 -0
- package/dist/types/features/reverse-geocodes/keyFactory.js +5 -0
- package/dist/types/features/reverse-geocodes/keyFactory.js.map +1 -0
- package/dist/types/features/reverse-geocodes/types.d.ts +14 -0
- package/dist/types/features/reverse-geocodes/types.d.ts.map +1 -0
- package/dist/types/features/reverse-geocodes/types.js +2 -0
- package/dist/types/features/reverse-geocodes/types.js.map +1 -0
- package/dist/types/features/suggestions/index.d.ts +3 -0
- package/dist/types/features/suggestions/index.d.ts.map +1 -0
- package/dist/types/features/suggestions/index.js +3 -0
- package/dist/types/features/suggestions/index.js.map +1 -0
- package/dist/types/features/suggestions/keyFactory.d.ts +13 -0
- package/dist/types/features/suggestions/keyFactory.d.ts.map +1 -0
- package/dist/types/features/suggestions/keyFactory.js +5 -0
- package/dist/types/features/suggestions/keyFactory.js.map +1 -0
- package/dist/types/features/suggestions/types.d.ts +16 -0
- package/dist/types/features/suggestions/types.d.ts.map +1 -0
- package/dist/types/features/suggestions/types.js +2 -0
- package/dist/types/features/suggestions/types.js.map +1 -0
- package/dist/types/hooks/useOnEventOutside.d.ts +4 -0
- package/dist/types/hooks/useOnEventOutside.d.ts.map +1 -0
- package/dist/types/hooks/useOnEventOutside.js +14 -0
- package/dist/types/hooks/useOnEventOutside.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Map/Search/index.d.ts +10 -0
- package/dist/types/sdks/DataExplorer/components/Map/Search/index.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Map/Search/index.js +50 -0
- package/dist/types/sdks/DataExplorer/components/Map/Search/index.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Map/Search/styles.d.ts +6 -0
- package/dist/types/sdks/DataExplorer/components/Map/Search/styles.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Map/Search/styles.js +46 -0
- package/dist/types/sdks/DataExplorer/components/Map/Search/styles.js.map +1 -0
- package/dist/types/sdks/DataExplorer/components/Map/index.d.ts.map +1 -1
- package/dist/types/sdks/DataExplorer/components/Map/index.js +67 -28
- package/dist/types/sdks/DataExplorer/components/Map/index.js.map +1 -1
- package/dist/types/sdks/DataExplorer/components/Map/styles.d.ts +1 -0
- package/dist/types/sdks/DataExplorer/components/Map/styles.d.ts.map +1 -1
- package/dist/types/sdks/DataExplorer/components/Map/styles.js +22 -0
- package/dist/types/sdks/DataExplorer/components/Map/styles.js.map +1 -1
- package/dist/types/sdks/DataExplorer/features/useGeocodes.d.ts +3 -0
- package/dist/types/sdks/DataExplorer/features/useGeocodes.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/features/useGeocodes.js +17 -0
- package/dist/types/sdks/DataExplorer/features/useGeocodes.js.map +1 -0
- package/dist/types/sdks/DataExplorer/features/useReverseGeocodes.d.ts +5 -0
- package/dist/types/sdks/DataExplorer/features/useReverseGeocodes.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/features/useReverseGeocodes.js +23 -0
- package/dist/types/sdks/DataExplorer/features/useReverseGeocodes.js.map +1 -0
- package/dist/types/sdks/DataExplorer/features/useSuggestions.d.ts +3 -0
- package/dist/types/sdks/DataExplorer/features/useSuggestions.d.ts.map +1 -0
- package/dist/types/sdks/DataExplorer/features/useSuggestions.js +15 -0
- package/dist/types/sdks/DataExplorer/features/useSuggestions.js.map +1 -0
- package/package.json +3 -3
- package/dist/assets/index.1f109f78.js +0 -183
- package/dist/assets/index.3f82b283.js +0 -95
package/dist/index.html
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<link rel="manifest" href="data:application/manifest+json;base64,eyJuYW1lIjoiIiwic2hvcnRfbmFtZSI6IiIsImljb25zIjpbeyJzcmMiOiIvYW5kcm9pZC1jaHJvbWUtMTkyeDE5Mi5wbmciLCJzaXplcyI6IjE5MngxOTIiLCJ0eXBlIjoiaW1hZ2UvcG5nIn0seyJzcmMiOiIvYW5kcm9pZC1jaHJvbWUtNTEyeDUxMi5wbmciLCJzaXplcyI6IjUxMng1MTIiLCJ0eXBlIjoiaW1hZ2UvcG5nIn1dLCJ0aGVtZV9jb2xvciI6IiNmZmZmZmYiLCJiYWNrZ3JvdW5kX2NvbG9yIjoiI2ZmZmZmZiIsImRpc3BsYXkiOiJzdGFuZGFsb25lIn0=" />
|
|
24
24
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
25
25
|
<title>Local Logic</title>
|
|
26
|
-
<script type="module" crossorigin src="/sdks-app/v1/assets/index.
|
|
26
|
+
<script type="module" crossorigin src="/sdks-app/v1/assets/index.bd887e31.js"></script>
|
|
27
27
|
</head>
|
|
28
28
|
<body style="overflow: hidden; margin: 0;">
|
|
29
29
|
<script src="http://localhost:8097"></script>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface AnimateHeightProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
defaultHeight?: number;
|
|
5
|
+
transitionOpacity?: boolean;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare const AnimateHeight: React.FC<AnimateHeightProps>;
|
|
9
|
+
export default AnimateHeight;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/AnimateHeight/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,kBAAkB;IAC1B,IAAI,EAAE,OAAO,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA+B/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import useMeasure from "~/hooks/useMeasure";
|
|
3
|
+
import * as S from "./styles";
|
|
4
|
+
const AnimateHeight = ({ transitionOpacity = true, defaultHeight = 0, open, children, }) => {
|
|
5
|
+
const [ref, rect] = useMeasure();
|
|
6
|
+
const variants = {
|
|
7
|
+
open: {
|
|
8
|
+
height: rect.height,
|
|
9
|
+
opacity: 1,
|
|
10
|
+
},
|
|
11
|
+
closed: {
|
|
12
|
+
height: defaultHeight,
|
|
13
|
+
opacity: transitionOpacity ? 0 : 1,
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
return (React.createElement(S.AnimateHeight, { variants: variants, initial: open ? "open" : "closed", animate: open ? "open" : "closed", transition: {
|
|
17
|
+
ease: "easeInOut",
|
|
18
|
+
} },
|
|
19
|
+
React.createElement("div", { ref: ref }, children)));
|
|
20
|
+
};
|
|
21
|
+
export default AnimateHeight;
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/AnimateHeight/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,oBAAoB,CAAC;AAC5C,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAS9B,MAAM,aAAa,GAAiC,CAAC,EACnD,iBAAiB,GAAG,IAAI,EACxB,aAAa,GAAG,CAAC,EACjB,IAAI,EACJ,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,UAAU,EAAkB,CAAC;IAEjD,MAAM,QAAQ,GAAG;QACf,IAAI,EAAE;YACJ,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,OAAO,EAAE,CAAC;SACX;QACD,MAAM,EAAE;YACN,MAAM,EAAE,aAAa;YACrB,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SACnC;KACF,CAAC;IAEF,OAAO,CACL,oBAAC,CAAC,CAAC,aAAa,IACd,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,EACjC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,EACjC,UAAU,EAAE;YACV,IAAI,EAAE,WAAW;SAClB;QAED,6BAAK,GAAG,EAAE,GAAG,IAAG,QAAQ,CAAO,CACf,CACnB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/AnimateHeight/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,0KAEzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/components/AnimateHeight/styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,MAAM,CAAC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;;CAE9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/geocodes/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/geocodes/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const geocodeKeys: {
|
|
2
|
+
all: () => readonly ["geocodes"];
|
|
3
|
+
list: (filters: Partial<{
|
|
4
|
+
locationid: string;
|
|
5
|
+
apiKey: string;
|
|
6
|
+
}>) => readonly ["geocodes", Partial<{
|
|
7
|
+
locationid: string;
|
|
8
|
+
apiKey: string;
|
|
9
|
+
}>];
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=keyFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyFactory.d.ts","sourceRoot":"","sources":["../../../../src/features/geocodes/keyFactory.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;oBAGX,QAAQ;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;oBAFY,MAAM;gBACV,MAAM;;CAGnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyFactory.js","sourceRoot":"","sources":["../../../../src/features/geocodes/keyFactory.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,UAAU,CAAU;IAChC,IAAI,EAAE,CACJ,OAGE,EACF,EAAE,CAAC,CAAC,GAAG,WAAW,CAAC,GAAG,EAAE,EAAE,OAAO,CAAU;CAC9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/features/geocodes/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,eAAe,EAAE;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/features/geocodes/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/reverse-geocodes/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/reverse-geocodes/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const reverseGeocodeKeys: {
|
|
2
|
+
all: () => readonly ["reverse-geocodes"];
|
|
3
|
+
list: (filters: Partial<{
|
|
4
|
+
lat: string;
|
|
5
|
+
lng: string;
|
|
6
|
+
apiKey: string;
|
|
7
|
+
}>) => readonly ["reverse-geocodes", Partial<{
|
|
8
|
+
lat: string;
|
|
9
|
+
lng: string;
|
|
10
|
+
apiKey: string;
|
|
11
|
+
}>];
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=keyFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyFactory.d.ts","sourceRoot":"","sources":["../../../../src/features/reverse-geocodes/keyFactory.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;;oBAGlB,QAAQ;QACf,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;aAHK,MAAM;aACN,MAAM;gBACH,MAAM;;CAGnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyFactory.js","sourceRoot":"","sources":["../../../../src/features/reverse-geocodes/keyFactory.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,kBAAkB,CAAU;IACxC,IAAI,EAAE,CACJ,OAIE,EACF,EAAE,CAAC,CAAC,GAAG,kBAAkB,CAAC,GAAG,EAAE,EAAE,OAAO,CAAU;CACrD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ReverseGeocode {
|
|
2
|
+
address: {
|
|
3
|
+
Label: string;
|
|
4
|
+
Country: string;
|
|
5
|
+
};
|
|
6
|
+
location: {
|
|
7
|
+
Latitude: number;
|
|
8
|
+
Longitude: number;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export interface ReverseGeocodeResponse {
|
|
12
|
+
data: ReverseGeocode;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/features/reverse-geocodes/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,QAAQ,EAAE;QACR,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,cAAc,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/features/reverse-geocodes/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/features/suggestions/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/suggestions/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const suggestionKeys: {
|
|
2
|
+
all: () => readonly ["suggestions"];
|
|
3
|
+
list: (filters: Partial<{
|
|
4
|
+
lat: string;
|
|
5
|
+
lng: string;
|
|
6
|
+
apiKey: string;
|
|
7
|
+
}>) => readonly ["suggestions", Partial<{
|
|
8
|
+
lat: string;
|
|
9
|
+
lng: string;
|
|
10
|
+
apiKey: string;
|
|
11
|
+
}>];
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=keyFactory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyFactory.d.ts","sourceRoot":"","sources":["../../../../src/features/suggestions/keyFactory.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;oBAGd,QAAQ;QACf,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;aAHK,MAAM;aACN,MAAM;gBACH,MAAM;;CAGnB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyFactory.js","sourceRoot":"","sources":["../../../../src/features/suggestions/keyFactory.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,aAAa,CAAU;IACnC,IAAI,EAAE,CACJ,OAIE,EACF,EAAE,CAAC,CAAC,GAAG,cAAc,CAAC,GAAG,EAAE,EAAE,OAAO,CAAU;CACjD,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface Suggestion {
|
|
2
|
+
label: string;
|
|
3
|
+
language: string;
|
|
4
|
+
countryCode: string;
|
|
5
|
+
locationId: string;
|
|
6
|
+
address: {
|
|
7
|
+
country: string;
|
|
8
|
+
state: string;
|
|
9
|
+
city: string;
|
|
10
|
+
postCode: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface SuggestionsResponse {
|
|
14
|
+
suggestions: Suggestion[];
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/features/suggestions/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE;QACP,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/features/suggestions/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOnEventOutside.d.ts","sourceRoot":"","sources":["../../../src/hooks/useOnEventOutside.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7C,QAAA,MAAM,iBAAiB,QAChB,UAAU,WAAW,CAAC,aAChB,OAAO,GAAG,SAAS,GAAG,WAAW,YAClC,MAAM,IAAI,SAYrB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
const useOnEventOutside = (ref, eventType, callback) => {
|
|
3
|
+
useEffect(() => {
|
|
4
|
+
const handleMouseupOutside = (event) => {
|
|
5
|
+
if (ref.current && !ref.current.contains(event.target)) {
|
|
6
|
+
callback();
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
window.addEventListener(eventType, handleMouseupOutside);
|
|
10
|
+
return () => window.removeEventListener(eventType, handleMouseupOutside);
|
|
11
|
+
}, [ref]);
|
|
12
|
+
};
|
|
13
|
+
export default useOnEventOutside;
|
|
14
|
+
//# sourceMappingURL=useOnEventOutside.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOnEventOutside.js","sourceRoot":"","sources":["../../../src/hooks/useOnEventOutside.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAE7C,MAAM,iBAAiB,GAAG,CACxB,GAA2B,EAC3B,SAA4C,EAC5C,QAAoB,EACpB,EAAE;IACF,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,oBAAoB,GAAG,CAAC,KAAiB,EAAE,EAAE;YACjD,IAAI,GAAG,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,EAAE;gBAC9D,QAAQ,EAAE,CAAC;aACZ;QACH,CAAC,CAAC;QAEF,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;QACzD,OAAO,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;IAC3E,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AACZ,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface SearchProps {
|
|
3
|
+
onSearch: (location: {
|
|
4
|
+
latitude: number;
|
|
5
|
+
longitude: number;
|
|
6
|
+
}) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const Search: ({ onSearch }: SearchProps) => JSX.Element;
|
|
9
|
+
export default Search;
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/sdks/DataExplorer/components/Map/Search/index.tsx"],"names":[],"mappings":";AAWA,UAAU,WAAW;IACnB,QAAQ,EAAE,CAAC,QAAQ,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CACvE;AAED,QAAA,MAAM,MAAM,iBAAkB,WAAW,gBA6ExC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React, { useState, useEffect, useRef } from "react";
|
|
2
|
+
import { motion } from "framer-motion";
|
|
3
|
+
import { Input } from "@local-logic/ui";
|
|
4
|
+
import useDebounce from "~/hooks/useDebounce";
|
|
5
|
+
import AnimateHeight from "~/components/AnimateHeight";
|
|
6
|
+
import useOnEventOutside from "~/hooks/useOnEventOutside";
|
|
7
|
+
import { useGeocodes } from "../../../features/useGeocodes";
|
|
8
|
+
import { useSuggestions } from "../../../features/useSuggestions";
|
|
9
|
+
import * as S from "./styles";
|
|
10
|
+
const Search = ({ onSearch }) => {
|
|
11
|
+
const searchContainerRef = useRef(null);
|
|
12
|
+
const [query, setQuery] = useState("");
|
|
13
|
+
const [locationId, setLocationId] = useState("");
|
|
14
|
+
const { data: geocodes, isLoading: geocodesLoading } = useGeocodes(locationId);
|
|
15
|
+
const debouncedQuery = useDebounce(query, 300);
|
|
16
|
+
const [showResults, setShowResults] = useState(true);
|
|
17
|
+
const { data, isLoading } = useSuggestions(debouncedQuery);
|
|
18
|
+
useOnEventOutside(searchContainerRef, "click", () => setShowResults(false));
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
if (!geocodes || geocodesLoading) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
onSearch({
|
|
24
|
+
longitude: geocodes.Location.DisplayPosition.Longitude,
|
|
25
|
+
latitude: geocodes.Location.DisplayPosition.Latitude,
|
|
26
|
+
});
|
|
27
|
+
setShowResults(false);
|
|
28
|
+
}, [geocodes]);
|
|
29
|
+
const handleItemClick = ({ locationId: lid, label }) => {
|
|
30
|
+
setLocationId(lid);
|
|
31
|
+
setQuery(label);
|
|
32
|
+
};
|
|
33
|
+
const textWithHighlighting = (text, highlight) => {
|
|
34
|
+
const parts = text.split(new RegExp(`(${highlight})`, "gi"));
|
|
35
|
+
return parts.map((part, i) => part.toLowerCase() === highlight.toLowerCase() ? (React.createElement("strong", { key: i }, part)) : (React.createElement("span", { key: i }, part)));
|
|
36
|
+
};
|
|
37
|
+
return (React.createElement(S.Search, { ref: searchContainerRef },
|
|
38
|
+
React.createElement(Input, { value: query, placeholder: "Search map...", onChange: (e) => setQuery(e.currentTarget.value), onFocus: () => setShowResults(true) }),
|
|
39
|
+
React.createElement(S.SearchList, null,
|
|
40
|
+
React.createElement(AnimateHeight, { open: showResults && !!(data === null || data === void 0 ? void 0 : data.suggestions.length) },
|
|
41
|
+
React.createElement(S.SearchListUl, null, data === null || data === void 0 ? void 0 : data.suggestions.map((suggestion, i) => (React.createElement(S.SearchListItem, { key: suggestion.locationId },
|
|
42
|
+
React.createElement(S.ItemButton, { onClick: () => handleItemClick(suggestion) },
|
|
43
|
+
React.createElement(motion.div, { animate: { y: [10, 0], opacity: [0, 1] }, transition: {
|
|
44
|
+
delay: (i + 1) * 0.03,
|
|
45
|
+
type: "spring",
|
|
46
|
+
duration: 0.4,
|
|
47
|
+
} }, textWithHighlighting(suggestion.label, query)))))))))));
|
|
48
|
+
};
|
|
49
|
+
export default Search;
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/sdks/DataExplorer/components/Map/Search/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,E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AAW,CAAC,MAAM,CAAA;gBAC5D,oBAAC,CAAC,CAAC,YAAY,QACZ,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC,CACxC,oBAAC,CAAC,CAAC,cAAc,IAAC,GAAG,EAAE,UAAU,CAAC,UAAU;oBAC1C,oBAAC,CAAC,CAAC,UAAU,IACX,OAAO,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,UAAU,CAAC;wBAG1C,oBAAC,MAAM,CAAC,GAAG,IACT,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EACxC,UAAU,EAAE;gCACV,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI;gCACrB,IAAI,EAAE,QAAQ;gCACd,QAAQ,EAAE,GAAG;6BACd,IAEA,oBAAoB,CAAC,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,CACnC,CACA,CACE,CACpB,CAAC,CACa,CACH,CACH,CACN,CACZ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const Search: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const SearchList: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const ItemButton: import("styled-components").StyledComponent<"button", any, {}, never>;
|
|
4
|
+
export declare const SearchListUl: import("styled-components").StyledComponent<"ul", any, {}, never>;
|
|
5
|
+
export declare const SearchListItem: import("styled-components").StyledComponent<"li", any, {}, never>;
|
|
6
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../../../src/sdks/DataExplorer/components/Map/Search/styles.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM,oEAGlB,CAAC;AAEF,eAAO,MAAM,UAAU,oEAStB,CAAC;AAEF,eAAO,MAAM,UAAU,uEAYtB,CAAC;AAEF,eAAO,MAAM,YAAY,mEAIxB,CAAC;AAEF,eAAO,MAAM,cAAc,mEAU1B,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { theme } from "@local-logic/ui";
|
|
3
|
+
export const Search = styled.div `
|
|
4
|
+
max-width: 300px;
|
|
5
|
+
position: relative;
|
|
6
|
+
`;
|
|
7
|
+
export const SearchList = styled.div `
|
|
8
|
+
position: absolute;
|
|
9
|
+
top: calc(100% + 6px);
|
|
10
|
+
width: 100%;
|
|
11
|
+
box-shadow: 0px 5px 8px -4px rgba(0, 0, 0, 0.5);
|
|
12
|
+
transform: translateY(-3px);
|
|
13
|
+
background-color: ${theme["--ll-color-background"]};
|
|
14
|
+
border-radius:${theme["--ll-border-radius-small"]};
|
|
15
|
+
z-index: 2;
|
|
16
|
+
`;
|
|
17
|
+
export const ItemButton = styled.button `
|
|
18
|
+
width: 100%;
|
|
19
|
+
border: none;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
text-align: left;
|
|
22
|
+
padding: ${theme["--ll-spacing-medium"]} ${theme["--ll-spacing-small"]};
|
|
23
|
+
background-color: var(--color-white);
|
|
24
|
+
margin: 0;
|
|
25
|
+
|
|
26
|
+
&:focus {
|
|
27
|
+
transform: translate3d(0, 0, 0);
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
export const SearchListUl = styled.ul `
|
|
31
|
+
list-style-type: none;
|
|
32
|
+
padding: 0;
|
|
33
|
+
margin: 0;
|
|
34
|
+
`;
|
|
35
|
+
export const SearchListItem = styled.li `
|
|
36
|
+
&:last-child {
|
|
37
|
+
${ItemButton} {
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
border-radius: 0 0 ${theme["--ll-border-radius-small"]} ${theme["--ll-border-radius-small"]};
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:not(:last-child) {
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
46
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../../../src/sdks/DataExplorer/components/Map/Search/styles.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAG/B,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;sBAMd,KAAK,CAAC,uBAAuB,CAAC;kBAClC,KAAK,CAAC,0BAA0B,CAAC;;CAElD,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAA;;;;;aAK1B,KAAK,CAAC,qBAAqB,CAAC,IAAI,KAAK,CAAC,oBAAoB,CAAC;;;;;;;CAOvE,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,EAAE,CAAA;;;;CAIpC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,EAAE,CAAA;;MAEjC,UAAU;;2BAEW,KAAK,CAAC,0BAA0B,CAAC,IAAI,KAAK,CAAC,0BAA0B,CAAC;;;;;;CAMhG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/sdks/DataExplorer/components/Map/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/sdks/DataExplorer/components/Map/index.tsx"],"names":[],"mappings":";AAWA,QAAA,MAAM,GAAG,mBAsGR,CAAC;AAEF,eAAe,GAAG,CAAC"}
|
|
@@ -2,11 +2,15 @@ import React, { useState, useRef } from "react";
|
|
|
2
2
|
import MapGL, { NavigationControl } from "react-map-gl";
|
|
3
3
|
import maplibregl from "maplibre-gl";
|
|
4
4
|
import Pin from "~/components/Pin";
|
|
5
|
+
import { LoadingItem, Spacer, Text } from "@local-logic/ui";
|
|
5
6
|
import { useDataExplorer } from "../../context";
|
|
6
7
|
import { useStateManagerContext } from "../../../../context/stateManager";
|
|
8
|
+
import Search from "./Search";
|
|
7
9
|
import * as S from "./styles";
|
|
8
10
|
const Map = () => {
|
|
9
11
|
var _a, _b, _c, _d;
|
|
12
|
+
const mapRef = useRef();
|
|
13
|
+
const [mapIsLoading, setMapIsLoading] = useState(true);
|
|
10
14
|
const { dataExplorerState, setDataExplorerState } = useDataExplorer();
|
|
11
15
|
const { sdkState } = useStateManagerContext();
|
|
12
16
|
const [longClick, setLongClick] = useState(false);
|
|
@@ -15,35 +19,70 @@ const Map = () => {
|
|
|
15
19
|
const mapTilerTheme = ((_b = (_a = sdkState === null || sdkState === void 0 ? void 0 : sdkState.globalOptions) === null || _a === void 0 ? void 0 : _a.appearance) === null || _b === void 0 ? void 0 : _b.theme) === "night"
|
|
16
20
|
? "basic-v2-dark"
|
|
17
21
|
: "600d69cb-288d-445e-9839-3dfe4d76b31a";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
const baseMapStyles = {
|
|
23
|
+
position: "absolute",
|
|
24
|
+
top: "0",
|
|
25
|
+
left: "0",
|
|
26
|
+
height: "100%",
|
|
27
|
+
width: "100%",
|
|
28
|
+
};
|
|
29
|
+
return (React.createElement("div", null,
|
|
30
|
+
React.createElement(Search, { onSearch: (e) => {
|
|
31
|
+
var _a;
|
|
32
|
+
setDataExplorerState({
|
|
33
|
+
location: { lat: e.latitude, lng: e.longitude },
|
|
34
|
+
});
|
|
35
|
+
(_a = mapRef === null || mapRef === void 0 ? void 0 : mapRef.current) === null || _a === void 0 ? void 0 : _a.flyTo({
|
|
36
|
+
center: [e.longitude, e.latitude],
|
|
37
|
+
duration: 2000,
|
|
38
|
+
});
|
|
39
|
+
} }),
|
|
40
|
+
React.createElement(Spacer, { vertical: true, spacing: "--ll-spacing-small" }),
|
|
41
|
+
React.createElement(S.MapContainer, null,
|
|
42
|
+
mapIsLoading && React.createElement(LoadingItem, { height: "400px", width: "100%" }),
|
|
43
|
+
React.createElement(MapGL
|
|
44
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
, {
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
48
|
+
// @ts-ignore
|
|
49
|
+
ref: mapRef, style: mapIsLoading
|
|
50
|
+
? Object.assign({ visibility: "hidden" }, baseMapStyles) : baseMapStyles, onLoad: () => setMapIsLoading(false), mapLib: maplibregl, mapStyle: `https://api.maptiler.com/maps/${mapTilerTheme}/style.json?key=${import.meta.env.VITE_REACT_APP_MAPTILER_KEY}`, initialViewState: {
|
|
51
|
+
longitude: (_c = sdkState.options) === null || _c === void 0 ? void 0 : _c.lng,
|
|
52
|
+
latitude: (_d = sdkState.options) === null || _d === void 0 ? void 0 : _d.lat,
|
|
53
|
+
zoom: 10,
|
|
54
|
+
}, onMouseDown: (e) => {
|
|
55
|
+
timeoutRef.current = setTimeout(() => {
|
|
56
|
+
if (!isDragging.current) {
|
|
57
|
+
setLongClick(true);
|
|
58
|
+
}
|
|
59
|
+
}, 1000);
|
|
60
|
+
}, onMouseUp: (e) => {
|
|
61
|
+
if (longClick) {
|
|
62
|
+
setDataExplorerState({
|
|
63
|
+
location: { lat: e.lngLat.lat, lng: e.lngLat.lng },
|
|
64
|
+
});
|
|
27
65
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
66
|
+
clearTimeout(timeoutRef.current);
|
|
67
|
+
setLongClick(false);
|
|
68
|
+
}, onDragStart: () => {
|
|
69
|
+
isDragging.current = true;
|
|
70
|
+
}, onDragEnd: () => {
|
|
71
|
+
isDragging.current = false;
|
|
72
|
+
} },
|
|
73
|
+
React.createElement(S.LocationIndicator, null,
|
|
74
|
+
React.createElement(Text, { noMargin: true, family: "mono" },
|
|
75
|
+
"Lat:",
|
|
76
|
+
" ",
|
|
77
|
+
Math.round(dataExplorerState.location.lat * 100000) / 100000,
|
|
78
|
+
", Lng:",
|
|
79
|
+
" ",
|
|
80
|
+
Math.round(dataExplorerState.location.lng * 100000) / 100000)),
|
|
81
|
+
React.createElement(NavigationControl, { showCompass: true, style: {
|
|
82
|
+
marginTop: 16,
|
|
83
|
+
marginRight: 16,
|
|
84
|
+
} }),
|
|
85
|
+
React.createElement(Pin, { marker: dataExplorerState.location })))));
|
|
47
86
|
};
|
|
48
87
|
export default Map;
|
|
49
88
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/sdks/DataExplorer/components/Map/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/sdks/DataExplorer/components/Map/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,KAAK,EAAE,EAAU,iBAAiB,EAAE,MAAM,cA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